summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Application.cpp23
-rw-r--r--BUILD/Changelog.txt15
-rw-r--r--BUILD/FreeFileSync.chmbin440642 -> 429709 bytes
-rw-r--r--BUILD/Help/FreeFileSync.hhc (renamed from BUILD/Help/Table of Contents.hhc)0
-rw-r--r--BUILD/Help/FreeFileSync.hhp2
-rw-r--r--BUILD/Help/html/Batch Scripting.html32
-rw-r--r--BUILD/Help/html/Compare by File Size.html6
-rw-r--r--BUILD/Help/html/Comparison Settings.html15
-rw-r--r--BUILD/Help/html/Daylight Saving Time.html4
-rw-r--r--BUILD/Help/html/Exclude Items.html23
-rw-r--r--BUILD/Help/html/External Applications.html24
-rw-r--r--BUILD/Help/html/FreeFileSync.html37
-rw-r--r--BUILD/Help/html/Links.html30
-rw-r--r--BUILD/Help/html/Macros.html25
-rw-r--r--BUILD/Help/html/RealtimeSync.html39
-rw-r--r--BUILD/Help/html/Run as Service.html12
-rw-r--r--BUILD/Help/html/Schedule a Batch Job.html95
-rw-r--r--BUILD/Help/html/Synchronize with FTP.html14
-rw-r--r--BUILD/Help/html/Variable Drive Letters.html18
-rw-r--r--BUILD/Help/html/Versioning.html50
-rw-r--r--BUILD/Help/html/Volume Shadow Copy.html21
-rw-r--r--BUILD/Help/img/FFS_logo.pngbin0 -> 8711 bytes
-rw-r--r--BUILD/Help/img/RTS_logo.pngbin0 -> 6798 bytes
-rw-r--r--BUILD/Help/img/SetupBatch.pngbin30205 -> 30294 bytes
-rw-r--r--BUILD/Help/img/ffsicon.pngbin12746 -> 0 bytes
-rw-r--r--BUILD/Help/img/rtsicon.pngbin13179 -> 0 bytes
-rw-r--r--BUILD/Languages/arabic.lng110
-rw-r--r--BUILD/Languages/german.lng4
-rw-r--r--BUILD/Languages/russian.lng2
-rw-r--r--BUILD/License.txt621
-rw-r--r--BUILD/Resources.zipbin225731 -> 263950 bytes
-rw-r--r--BUILD/styles.gtk_rc (renamed from BUILD/styles.rc)0
-rw-r--r--FreeFileSync.vcxproj2
-rw-r--r--Makefile83
-rw-r--r--RealtimeSync/RealtimeSync.icobin136291 -> 111386 bytes
-rw-r--r--RealtimeSync/RealtimeSync.vcxproj1
-rw-r--r--RealtimeSync/application.cpp11
-rw-r--r--RealtimeSync/gui_generated.cpp14
-rw-r--r--RealtimeSync/main_dlg.cpp18
-rw-r--r--RealtimeSync/makefile64
-rw-r--r--RealtimeSync/resource.rc44
-rw-r--r--RealtimeSync/resources.cpp9
-rw-r--r--RealtimeSync/tray_menu.cpp12
-rw-r--r--RealtimeSync/xml_ffs.cpp2
-rw-r--r--RealtimeSync/xml_proc.cpp6
-rw-r--r--algorithm.cpp9
-rw-r--r--comparison.cpp151
-rw-r--r--lib/Batch.icobin117121 -> 103260 bytes
-rw-r--r--lib/FreeFileSync.icobin132428 -> 114124 bytes
-rw-r--r--lib/ShadowCopy/LockFile.cpp43
-rw-r--r--lib/ShadowCopy/shadow.cpp4
-rw-r--r--lib/SyncDB.icobin133875 -> 111496 bytes
-rw-r--r--lib/Thumbnail/Thumbnail.vcxproj18
-rw-r--r--lib/Thumbnail/thumbnail.cpp11
-rw-r--r--lib/db_file.cpp10
-rw-r--r--lib/dir_exist_async.h55
-rw-r--r--lib/dir_lock.cpp201
-rw-r--r--lib/dir_lock.h2
-rw-r--r--lib/ffs_paths.cpp146
-rw-r--r--lib/ffs_paths.h106
-rw-r--r--lib/hard_filter.cpp6
-rw-r--r--lib/help_provider.h28
-rw-r--r--lib/icon_buffer.cpp108
-rw-r--r--lib/icon_buffer.h6
-rw-r--r--lib/localization.cpp29
-rw-r--r--lib/lock_holder.h21
-rw-r--r--lib/parallel_scan.cpp37
-rw-r--r--lib/perf_check.cpp43
-rw-r--r--lib/perf_check.h6
-rw-r--r--lib/process_xml.cpp6
-rw-r--r--lib/process_xml.h20
-rw-r--r--lib/resolve_path.cpp86
-rw-r--r--lib/resources.cpp10
-rw-r--r--lib/shadow.cpp4
-rw-r--r--lib/status_handler.cpp2
-rw-r--r--lib/xml_base.cpp2
-rw-r--r--resource.rc51
-rw-r--r--structures.cpp16
-rw-r--r--structures.h5
-rw-r--r--synchronization.cpp98
-rw-r--r--ui/batch_config.cpp8
-rw-r--r--ui/batch_status_handler.cpp14
-rw-r--r--ui/batch_status_handler.h2
-rw-r--r--ui/check_version.cpp10
-rw-r--r--ui/column_attr.h13
-rw-r--r--ui/custom_grid.cpp170
-rw-r--r--ui/dir_name.cpp3
-rw-r--r--ui/exec_finished_box.cpp4
-rw-r--r--ui/folder_history_box.cpp36
-rw-r--r--ui/folder_history_box.h2
-rw-r--r--ui/folder_pair.h6
-rw-r--r--ui/gui_generated.cpp7043
-rw-r--r--ui/gui_generated.h1564
-rw-r--r--ui/gui_status_handler.cpp9
-rw-r--r--ui/gui_status_handler.h4
-rw-r--r--ui/main_dlg.cpp108
-rw-r--r--ui/main_dlg.h6
-rw-r--r--ui/msg_popup.cpp4
-rw-r--r--ui/osx_dock.h30
-rw-r--r--ui/osx_dock.mm35
-rw-r--r--ui/progress_indicator.cpp283
-rw-r--r--ui/progress_indicator.h34
-rw-r--r--ui/search.cpp1
-rw-r--r--ui/small_dlgs.cpp55
-rw-r--r--ui/sync_cfg.cpp8
-rw-r--r--ui/taskbar.cpp51
-rw-r--r--ui/taskbar.h1
-rw-r--r--ui/tray_icon.cpp55
-rw-r--r--ui/tray_icon.h2
-rw-r--r--ui/tree_view.cpp80
-rw-r--r--ui/triple_splitter.cpp2
-rw-r--r--ui/triple_splitter.h2
-rw-r--r--ui/wx_form_build_hide_warnings.h4
-rw-r--r--version/version.h2
-rw-r--r--version/version.rc2
-rw-r--r--wx+/button.cpp44
-rw-r--r--wx+/button.h20
-rw-r--r--wx+/font_size.h25
-rw-r--r--wx+/graph.cpp31
-rw-r--r--wx+/grid.cpp58
-rw-r--r--wx+/grid.h5
-rw-r--r--wx+/shell_execute.h5
-rw-r--r--wx+/tooltip.cpp7
-rw-r--r--wx+/zlib_wrap.cpp2
-rw-r--r--zen/basic_math.h23
-rw-r--r--zen/build_info.h2
-rw-r--r--zen/com_error.h8
-rw-r--r--zen/debug_log.h7
-rw-r--r--zen/debug_minidump.cpp2
-rw-r--r--zen/dir_watcher.cpp31
-rw-r--r--zen/dll.h28
-rw-r--r--zen/file_handling.cpp131
-rw-r--r--zen/file_id.cpp6
-rw-r--r--zen/file_id_def.h4
-rw-r--r--zen/file_io.cpp22
-rw-r--r--zen/file_io.h9
-rw-r--r--zen/file_traverser.cpp7
-rw-r--r--zen/file_traverser.h2
-rw-r--r--zen/format_unit.cpp190
-rw-r--r--zen/format_unit.h6
-rw-r--r--zen/guid.h4
-rw-r--r--zen/int64.h4
-rw-r--r--zen/last_error.h51
-rw-r--r--zen/process_priority.cpp149
-rw-r--r--zen/process_priority.h68
-rw-r--r--zen/read_txt.cpp2
-rw-r--r--zen/recycler.cpp69
-rw-r--r--zen/symlink_target.h12
-rw-r--r--zen/thread.h19
-rw-r--r--zen/tick_count.h34
-rw-r--r--zen/warn_static.h7
-rw-r--r--zen/zstring.cpp196
-rw-r--r--zen/zstring.h168
-rw-r--r--zenxml/bind.h389
-rw-r--r--zenxml/cvrt_struc.h218
-rw-r--r--zenxml/cvrt_text.h229
-rw-r--r--zenxml/dom.h324
-rw-r--r--zenxml/error.h19
-rw-r--r--zenxml/io.h124
-rw-r--r--zenxml/parser.h609
-rw-r--r--zenxml/summary.dox680
-rw-r--r--zenxml/unit_test.cpp95
-rw-r--r--zenxml/xml.h15
163 files changed, 9484 insertions, 7157 deletions
diff --git a/Application.cpp b/Application.cpp
index 733311b7..39e38d5b 100644
--- a/Application.cpp
+++ b/Application.cpp
@@ -11,6 +11,7 @@
#include <wx/tooltip.h> //wxWidgets v2.9
#include <wx/log.h>
#include <wx+/app_main.h>
+#include <wx+/string_conv.h>
#include "comparison.h"
#include "algorithm.h"
#include "synchronization.h"
@@ -38,7 +39,6 @@ void runGuiMode(const xmlAccess::XmlGuiConfig& guiCfg);
void runGuiMode(const std::vector<wxString>& cfgFileName);
void runBatchMode(const Zstring& filename, FfsReturnCode& returnCode);
-
#ifdef FFS_WIN
namespace
{
@@ -154,10 +154,9 @@ void Application::OnStartApplication(wxIdleEvent&)
//Quote: "Best practice is that all applications call the process-wide ::SetErrorMode() function with a parameter of
//SEM_FAILCRITICALERRORS at startup. This is to prevent error mode dialogs from hanging the application."
::SetErrorMode(SEM_FAILCRITICALERRORS);
-
#elif defined FFS_LINUX
::gtk_init(nullptr, nullptr);
- ::gtk_rc_parse((getResourceDir() + "styles.rc").c_str()); //remove inner border from bitmap buttons
+ ::gtk_rc_parse((getResourceDir() + "styles.gtk_rc").c_str()); //remove inner border from bitmap buttons
#endif
#if wxCHECK_VERSION(2, 9, 1)
@@ -191,19 +190,19 @@ void Application::OnStartApplication(wxIdleEvent&)
{
size_t index = it - commandArgs.begin();
- FolderPairEnh& fp = [&]() -> FolderPairEnh&
+ FolderPairEnh* fp = nullptr;
+ if (index < 2)
+ fp = &guiCfg.mainCfg.firstPair;
+ else
{
- if (index < 2)
- return guiCfg.mainCfg.firstPair;
-
guiCfg.mainCfg.additionalPairs.resize((index - 2) / 2 + 1);
- return guiCfg.mainCfg.additionalPairs.back();
- }();
+ fp = &guiCfg.mainCfg.additionalPairs.back();
+ }
if (index % 2 == 0)
- fp.leftDirectory = toZ(*it);
+ fp->leftDirectory = toZ(*it);
else
- fp.rightDirectory = toZ(*it);
+ fp->rightDirectory = toZ(*it);
}
runGuiMode(guiCfg);
@@ -369,7 +368,7 @@ void runBatchMode(const Zstring& filename, FfsReturnCode& returnCode)
//all settings have been read successfully...
//regular check for program updates -> disabled for batch
- //if (batchCfg.showProgress)
+ //if (batchCfg.showProgress && manualProgramUpdateRequired())
// checkForUpdatePeriodically(globalCfg.lastUpdateCheck);
try //begin of synchronization process (all in one try-catch block)
diff --git a/BUILD/Changelog.txt b/BUILD/Changelog.txt
index fa82072f..2da00c16 100644
--- a/BUILD/Changelog.txt
+++ b/BUILD/Changelog.txt
@@ -2,6 +2,21 @@
|FreeFileSync|
--------------
+Changelog v5.13
+---------------
+Time out for not existing directories after 10 seconds
+Check directory existence in parallel
+Inform about all missing directories via a single error message
+Show remaining time considering relative error of 10%
+Check for grid icon updates only when needed
+Revised directory lock process detection
+Implemented high resolution icons
+Accessibility: fixed unreadable labels
+Prepared support for new build on Mac OS X
+More polished user interfaces
+Fixed time stamp not being set on NFS/Samba shares (Linux)
+
+
Changelog v5.12
---------------
Dynamic statistics adjustment during synchronization
diff --git a/BUILD/FreeFileSync.chm b/BUILD/FreeFileSync.chm
index deb1bb4f..23937729 100644
--- a/BUILD/FreeFileSync.chm
+++ b/BUILD/FreeFileSync.chm
Binary files differ
diff --git a/BUILD/Help/Table of Contents.hhc b/BUILD/Help/FreeFileSync.hhc
index f54645e7..f54645e7 100644
--- a/BUILD/Help/Table of Contents.hhc
+++ b/BUILD/Help/FreeFileSync.hhc
diff --git a/BUILD/Help/FreeFileSync.hhp b/BUILD/Help/FreeFileSync.hhp
index 262f58c1..32851646 100644
--- a/BUILD/Help/FreeFileSync.hhp
+++ b/BUILD/Help/FreeFileSync.hhp
@@ -1,7 +1,7 @@
[OPTIONS]
Compatibility=1.1 or later
Compiled file=..\FreeFileSync.chm
-Contents file=Table of Contents.hhc
+Contents file=FreeFileSync.hhc
Default topic=html\FreeFileSync.html
Display compile progress=No
Full-text search=Yes
diff --git a/BUILD/Help/html/Batch Scripting.html b/BUILD/Help/html/Batch Scripting.html
index b812ee1e..4e162b12 100644
--- a/BUILD/Help/html/Batch Scripting.html
+++ b/BUILD/Help/html/Batch Scripting.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20121005;17531200">
+ <META NAME="CHANGED" CONTENT="20130206;19571611">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,17 +23,17 @@
<BODY LANG="en-US" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Batch
Scripting</FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync
can be called from command line and supports integration into batch
scripts. This section gives some general hints and examples for
-Windows *.cmd and *.bat scripts.</FONT></P>
+Windows <FONT FACE="Courier New, monospace">*.cmd</FONT> and <FONT FACE="Courier New, monospace">*.bat</FONT>
+scripts.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">When
-FreeFileSync is started in batch mode (a *.ffs_batch file is passed
-as argument) it returns one of the following status codes:</FONT></P>
+FreeFileSync is started in batch mode (a <FONT FACE="Courier New, monospace">*.ffs_batch</FONT>
+file is passed as argument) it returns one of the following status
+codes:</FONT></P>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
<UL>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Return
@@ -69,16 +69,16 @@ email notification (using a third party tool).</FONT>
options when setting up a FreeFileSync batch job:</FONT></P>
<UL>
<LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Disable
- checkbox &quot;<I>Show progress dialog</I>&quot; or have &quot;On
- completion&quot; automatically close the results dialog after
- synchronization.</FONT></P>
+ checkbox <SPAN STYLE="font-style: normal"><B>Show progress dialog</B></SPAN>
+ or have <B>On completion</B> automatically close the results dialog
+ after synchronization.</FONT></P>
<LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Set
- &quot;</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><I><SPAN STYLE="font-weight: normal">Error
- handling</SPAN></I></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">&quot;
- to &quot;</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><I><SPAN STYLE="font-weight: normal">Exit
- instantly</SPAN></I></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">&quot;
- or &quot;</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><I><SPAN STYLE="font-weight: normal">Ignore
- errors</SPAN></I></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">&quot;.</SPAN></FONT></P>
+ e</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">rror
+ handling</SPAN></SPAN></FONT> <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">to
+ </SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Exit
+ instantly</B></SPAN></FONT> <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">or
+ </SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Ignore
+ errors</B></SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">.</SPAN></FONT></P>
</UL>
</SPAN><BR CLEAR=LEFT><BR>
</P>
diff --git a/BUILD/Help/html/Compare by File Size.html b/BUILD/Help/html/Compare by File Size.html
index 0dbb4fb8..5f38aa5f 100644
--- a/BUILD/Help/html/Compare by File Size.html
+++ b/BUILD/Help/html/Compare by File Size.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20120619;12310700">
+ <META NAME="CHANGED" CONTENT="20130206;18224747">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,8 +23,6 @@
<BODY LANG="en-US" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Compare
by file size only</FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Sometimes
you might want to compare both sides by file size only, ignoring last
modification timestamps.</FONT></P>
diff --git a/BUILD/Help/html/Comparison Settings.html b/BUILD/Help/html/Comparison Settings.html
index 783b0728..0d02f3ec 100644
--- a/BUILD/Help/html/Comparison Settings.html
+++ b/BUILD/Help/html/Comparison Settings.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20130120;18372197">
+ <META NAME="CHANGED" CONTENT="20130206;19283574">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -31,9 +31,9 @@ Settings</FONT></FONT></H2>
<H3 CLASS="western" STYLE="page-break-after: avoid"><FONT FACE="Tahoma, sans-serif">I.
Compare by &quot;File time and size&quot;</FONT></H3>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">This
-variant considers two files with the same name as equal when
-modification time <B>and</B> file size match. The following cases are
-distinguished:</FONT></P>
+variant considers two files with the same name as equal when both
+modification time <B>and</B> file size match. The following
+categories are distinguished:</FONT></P>
<OL TYPE=i>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>file
exists on one side only</B></FONT></P>
@@ -124,12 +124,11 @@ called symlinks or soft links):</FONT></P>
<UL>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Note</B></FONT></P>
<LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Under
- Windows the symbolic link options apply to all symbolic links,
- <I>&quot;volume mount points&quot; </I>and <I>&quot;NTFS junction
- points&quot;</I>.</FONT></P>
+ Windows the symbolic link options apply to symbolic lin<SPAN STYLE="font-style: normal">ks,
+ volume mount points and NTFS junction points.</SPAN></FONT></P>
<LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm; font-style: normal">
<FONT FACE="Tahoma, sans-serif">Copying symbolic links requires
- administrator rights.</FONT></P>
+ FreeFileSync to be started with administrator rights.</FONT></P>
</UL>
</SPAN><BR CLEAR=LEFT><BR>
</P>
diff --git a/BUILD/Help/html/Daylight Saving Time.html b/BUILD/Help/html/Daylight Saving Time.html
index 31c5f8e2..192eff98 100644
--- a/BUILD/Help/html/Daylight Saving Time.html
+++ b/BUILD/Help/html/Daylight Saving Time.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091208;20054200">
- <META NAME="CHANGED" CONTENT="20130116;18385122">
+ <META NAME="CHANGED" CONTENT="20130206;18224323">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,8 +23,6 @@
<BODY LANG="en-US" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN STYLE="font-style: normal">Daylight
saving time </SPAN><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">(Windows)</SPAN></SPAN></FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">A
common problem synchronization software has to deal with are +-1 hour
file time shifts after a Daylight Saving Time (DST) switch has
diff --git a/BUILD/Help/html/Exclude Items.html b/BUILD/Help/html/Exclude Items.html
index 8d4c5979..d0478dd6 100644
--- a/BUILD/Help/html/Exclude Items.html
+++ b/BUILD/Help/html/Exclude Items.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
+ <META NAME="GENERATOR" CONTENT="LibreOffice 4.0.0.3 (Windows)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20130109;13371476">
+ <META NAME="CHANGED" CONTENT="20130211;23214007">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -16,7 +16,6 @@
P { margin-bottom: 0.21cm }
H2.cjk { font-family: "SimSun" }
H2.ctl { font-family: "Mangal" }
- A:link { so-language: zxx }
-->
</STYLE>
</HEAD>
@@ -25,16 +24,17 @@
items</FONT></FONT></H2>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Files
and directories are only considered for synchronization if they pass
-the filter. They have to match at least one entry in the include list
-and none of the entries in the exclude list:</FONT></P>
+the filter. They have to match <B>at least one</B> entry in the
+include list and <B>none</B> of the entries in the exclude list:</FONT></P>
<OL>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Each
list item must be a file or directory path </FONT><FONT FACE="Tahoma, sans-serif"><B>relative</B></FONT>
- <FONT FACE="Tahoma, sans-serif">to synchronization base directories</FONT></P>
+ <FONT FACE="Tahoma, sans-serif">to synchronization base directories.</FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Multiple
- items must be separated by ';' or a new line</FONT></P>
+ items must be separated by <B>;</B> or a new line.</FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Wild
- cards like '*' or '?' may be used</FONT></P>
+ cards <B>*</B> and <B>?</B> may be used: <B>*</B> means zero or more
+ characters while <B>?</B> represents exactly one character.</FONT></P>
</OL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
@@ -64,7 +64,7 @@ Exclude items for m<SPAN STYLE="font-weight: normal">irror-sync from
in their path:<BR></SPAN></FONT>&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Exclude:
</SPAN></FONT><FONT FACE="Courier New, monospace">*temp*</FONT></P>
<P ALIGN=LEFT STYLE="margin-left: 0.82cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Multiple
- entries separated by semicolon:<BR></SPAN><FONT FACE="Times New Roman, serif"><SPAN STYLE="font-weight: normal">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></FONT><SPAN STYLE="font-weight: normal">Exclude:
+ entries separated by semicolon:<BR></SPAN>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN STYLE="font-weight: normal">Exclude:
</SPAN><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">*.tmp;
*.doc; *.bak</SPAN></FONT></FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
@@ -93,11 +93,10 @@ located in subdirectories of base directories</SPAN></FONT></P>
<LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">For
simple exclusions just right-click and exclude one or a list of
items directly on main grid via context menu.</FONT></P>
- <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm; font-style: normal">
+ <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm; font-variant: normal; font-style: normal">
<FONT FACE="Tahoma, sans-serif">A filter string is compared against
both file and directory paths. If you want to consider directories
- only, you can give a hint by appending a path separator:
- &quot;dirname<FONT FACE="Courier New, monospace">\</FONT>&quot;.</FONT></P>
+ only, you can give a hint by appending a path separator (<FONT FACE="Courier New, monospace"><B>\</B></FONT>).</FONT></P>
</UL>
</SPAN><BR CLEAR=LEFT><BR>
</P>
diff --git a/BUILD/Help/html/External Applications.html b/BUILD/Help/html/External Applications.html
index bdf08cb5..74bb73c3 100644
--- a/BUILD/Help/html/External Applications.html
+++ b/BUILD/Help/html/External Applications.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20130122;19292537">
+ <META NAME="CHANGED" CONTENT="20130206;19555336">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,22 +23,22 @@
<BODY LANG="en-US" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">External
applications</FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">By
default FreeFileSync opens the operating system's file browser on
-each mouse double-click by invoking &quot;<FONT FACE="Courier New, monospace">explorer
-/select, &quot;%item_path%&quot;</FONT>&quot; on Windows and
-&quot;<FONT FACE="Courier New, monospace">xdg-open &quot;%item_folder%&quot;</FONT>&quot;
+each mouse double-click by invoking &quot;</FONT><FONT FACE="Courier New, monospace">explorer
+/select, &quot;%item_path%&quot;</FONT><FONT FACE="Tahoma, sans-serif">&quot;
+on Windows and &quot;</FONT><FONT FACE="Courier New, monospace">xdg-open
+&quot;%item_folder%&quot;</FONT><FONT FACE="Tahoma, sans-serif">&quot;
on Linux.</FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">However
you may integrate other external applications into FreeFileSync:
-navigate to &quot;</FONT><FONT FACE="Tahoma, sans-serif"><I>Menu -&gt;
-Advanced -&gt; Global settings: External Applications</I></FONT><FONT FACE="Tahoma, sans-serif">&quot;
-and add or replace a command. The first entry is executed when
-double-clicking a row or pressing ENTER on main grid while all other
-entries can only be accessed via the context menu shown after a
-right-click. The following internal macros are available:</FONT></P>
+navigate to </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Menu
+&rarr; Advanced &rarr; Global settings: External Applications</B></SPAN></FONT>
+<FONT FACE="Tahoma, sans-serif">and add or replace a command. The
+first entry is executed when double-clicking a row or pressing ENTER
+on main grid while all other entries can only be accessed via the
+context menu shown after a right-click. The following internal macros
+are available:</FONT></P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen3" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Courier New, monospace">%item_path%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-
diff --git a/BUILD/Help/html/FreeFileSync.html b/BUILD/Help/html/FreeFileSync.html
index 215ec4d1..2582efa9 100644
--- a/BUILD/Help/html/FreeFileSync.html
+++ b/BUILD/Help/html/FreeFileSync.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20120928;19211700">
+ <META NAME="CHANGED" CONTENT="20130206;19035695">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,23 +23,22 @@
</STYLE>
</HEAD>
<BODY LANG="de-DE" DIR="LTR">
-<H3 CLASS="western" ALIGN=CENTER><IMG SRC="../img/ffsicon.png" NAME="Grafik6" ALIGN=ABSMIDDLE WIDTH=36 HEIGHT=36 BORDER=0>
-<FONT SIZE=4 STYLE="font-size: 16pt">FreeFileSync<BR></FONT><FONT SIZE=3><I><SPAN STYLE="font-weight: normal">-
-Folder Comparison and Synchronization -</SPAN></I></FONT></H3>
+<H3 CLASS="western" ALIGN=CENTER><IMG SRC="../img/FFS_logo.png" NAME="Grafik6" ALIGN=ABSMIDDLE WIDTH=258 HEIGHT=59 BORDER=0><FONT SIZE=4 STYLE="font-size: 16pt"><BR></FONT><FONT SIZE=3><I><SPAN STYLE="font-weight: normal">Folder
+Comparison and Synchronization</SPAN></I></FONT></H3>
<H3 CLASS="western" ALIGN=LEFT>Usage:</H3>
<OL>
<LI VALUE=1><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Choose
- left and right directories.<BR></FONT><IMG SRC="../img/SourceTarget.png" NAME="Grafik4" ALIGN=TEXTTOP BORDER=0></P>
+ left and right directories.<BR></FONT><IMG SRC="../img/SourceTarget.png" NAME="Grafik4" ALIGN=TEXTTOP WIDTH=426 HEIGHT=50 BORDER=0></P>
<P STYLE="margin-bottom: 0cm">&nbsp;</P>
- <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">&quot;</FONT><FONT FACE="Tahoma, sans-serif"><I>Compare</I></FONT><FONT FACE="Tahoma, sans-serif">&quot;
- them.<BR></FONT><IMG SRC="../img/CompareButton.png" NAME="Grafik1" ALIGN=BOTTOM BORDER=0></P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Compare</B></SPAN></FONT><FONT FACE="Tahoma, sans-serif">
+ them.<BR></FONT><IMG SRC="../img/CompareButton.png" NAME="Grafik1" ALIGN=BOTTOM WIDTH=178 HEIGHT=44 BORDER=0></P>
<P STYLE="margin-bottom: 0cm">&nbsp;</P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Select
- synchronization settings.<BR></FONT><IMG SRC="../img/SyncConfigButton.png" NAME="Grafik3" ALIGN=BOTTOM BORDER=0></P>
+ synchronization settings.<BR></FONT><IMG SRC="../img/SyncConfigButton.png" NAME="Grafik3" ALIGN=BOTTOM WIDTH=44 HEIGHT=44 BORDER=0></P>
<P STYLE="margin-bottom: 0cm">&nbsp;</P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Press
- &quot;</FONT><FONT FACE="Tahoma, sans-serif"><I>Synchronize...</I></FONT><FONT FACE="Tahoma, sans-serif">&quot;
- to begin synchronization.<BR></FONT><IMG SRC="../img/SynchronizeButton.png" NAME="Grafik2" ALIGN=BOTTOM BORDER=0></P>
+ </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Synchronize</B></SPAN></FONT><FONT FACE="Tahoma, sans-serif">
+ to begin synchronization.<BR></FONT><IMG SRC="../img/SynchronizeButton.png" NAME="Grafik2" ALIGN=BOTTOM WIDTH=178 HEIGHT=44 BORDER=0></P>
</OL>
<P STYLE="margin-bottom: 0cm; border-top: none; border-bottom: 1px solid #000000; border-left: none; border-right: none; padding-top: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm">
<BR>
@@ -47,18 +46,18 @@ Folder Comparison and Synchronization -</SPAN></I></FONT></H3>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<H3 CLASS="western" STYLE="page-break-before: always"><FONT FACE="Tahoma, sans-serif">Main
-Dialog:</FONT></H3>
+Dialog Overview</FONT></H3>
<OL>
- <P STYLE="margin-bottom: 0cm"><IMG SRC="../img/MainDialog.png" NAME="Grafik5" ALIGN=BOTTOM BORDER=0></P>
+ <P STYLE="margin-bottom: 0cm"><IMG SRC="../img/MainDialog.png" NAME="Grafik5" ALIGN=BOTTOM WIDTH=671 HEIGHT=428 BORDER=0></P>
</OL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<OL>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Start
comparison</FONT></FONT></P>
- <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Setup
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Change
comparison settings</FONT></FONT></P>
- <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Setup
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Change
synchronization settings</FONT></FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Start
synchronization</FONT></FONT></P>
@@ -73,11 +72,11 @@ Dialog:</FONT></H3>
</P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Save/load
configuration</FONT></FONT></P>
- <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Filter
- files</FONT></FONT></P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Include/exclude
+ specific files</FONT></FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Select
- categories for preview</FONT></FONT></P>
- <LI><P STYLE="margin-bottom: 0cm"><FONT SIZE=4><FONT FACE="Tahoma, sans-serif">Synchronization
+ categories to show on grid</FONT></FONT></P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4>Synchronization
statistics</FONT></FONT></P>
</OL>
</BODY>
diff --git a/BUILD/Help/html/Links.html b/BUILD/Help/html/Links.html
index ba9daab0..aef94d23 100644
--- a/BUILD/Help/html/Links.html
+++ b/BUILD/Help/html/Links.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20121201;15395784">
+ <META NAME="CHANGED" CONTENT="20130206;20020705">
<STYLE TYPE="text/css">
<!--
@page { margin: 2cm }
@@ -19,22 +19,18 @@
<BODY LANG="de-DE" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">FreeFileSync
Links</FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Homepage:<BR></FONT><A HREF="http://freefilesync.sourceforge.net/"><FONT COLOR="#000080"><FONT FACE="Tahoma, sans-serif"><SPAN LANG="zxx"><U>http://freefilesync.sourceforge.net</U></SPAN></FONT></FONT></A></P>
-<P STYLE="margin-bottom: 0cm"><BR>
+<P STYLE="margin-bottom: 0cm"><SPAN ID="Rahmen3" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
+ <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Tahoma, sans-serif"><B>Homepage:</B></FONT><FONT FACE="Tahoma, sans-serif"><BR></FONT><A HREF="http://freefilesync.sourceforge.net/"><FONT COLOR="#000080"><FONT FACE="Tahoma, sans-serif"><SPAN LANG="zxx"><U>http://freefilesync.sourceforge.net</U></SPAN></FONT></FONT></A></P>
+ <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Tahoma, sans-serif"><B>Project on SourceForge:</B></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">
+ feedback, suggestions and
+ bug-reports</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><B><BR></B></FONT><A HREF="http://sourceforge.net/projects/freefilesync"><FONT FACE="Tahoma, sans-serif">http://sourceforge.net/projects/freefilesync</FONT></A></P>
+ <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Tahoma, sans-serif"><B>If you like FreeFileSync consider
+ supporting the project by a donation:<BR></B></FONT><A HREF="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=zenju@gmx.de&amp;no_shipping=1&amp;lc=US&amp;currency_code=EUR"><FONT FACE="Tahoma, sans-serif">Donate
+ via PayPal</FONT></A></P>
+</SPAN><BR CLEAR=LEFT><BR>
</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Project
-on SourceForge: feedback, suggestions and
-bug-reports<BR><A HREF="http://sourceforge.net/projects/freefilesync">http://sourceforge.net/projects/freefilesync</A></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Direct
-email support:<BR><A HREF="mailto:zenju@gmx.de">zenju [at] gmx [dot]
-de</A></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">If you
-like FreeFileSync consider supporting the project by a
-donation:<BR><A HREF="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=zenju@gmx.de&amp;no_shipping=1&amp;lc=US&amp;currency_code=EUR">Donate
-via PayPal</A></FONT></P>
</BODY>
</HTML> \ No newline at end of file
diff --git a/BUILD/Help/html/Macros.html b/BUILD/Help/html/Macros.html
index 39267590..7ec0cb53 100644
--- a/BUILD/Help/html/Macros.html
+++ b/BUILD/Help/html/Macros.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20121226;13095515">
+ <META NAME="CHANGED" CONTENT="20130206;19332267">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -22,14 +22,13 @@
</HEAD>
<BODY LANG="de-DE" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Macros</FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">All
directory names may contain macros that are expanded during
-synchronization. Begin and end of each macro is marked by a '%'
-character. Besides special macros handling time and date, the
-<SPAN STYLE="text-decoration: none"><B>operating system's environment
-variables</B></SPAN> can also be used.</FONT></P>
+synchronization. Begin and end of each macro is marked by a </FONT><FONT FACE="Tahoma, sans-serif"><B>%</B></FONT>
+<FONT FACE="Tahoma, sans-serif">character. Besides special macros
+handling time and date, the </FONT><SPAN STYLE="text-decoration: none"><FONT FACE="Tahoma, sans-serif"><B>operating
+system's environment variables</B></FONT></SPAN> <FONT FACE="Tahoma, sans-serif">can
+also be used.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Internal
@@ -94,9 +93,10 @@ folder locations </B><SPAN STYLE="font-weight: normal">(Windows)</SPAN></FONT></
<FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Start
Menu\Programs\StartUp<BR>%csidl_Templates%&nbsp;&nbsp;&nbsp;</FONT>e.
g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Templates</FONT></FONT></P>
-</SPAN><BR CLEAR=LEFT>Note: Most macros listed here also have a
-variant for public folders. E.g. <FONT FACE="Courier New, monospace">csidl_MyMusic</FONT>
-&rarr; <FONT FACE="Courier New, monospace">csidl_PublicMusic</FONT>
+</SPAN><BR CLEAR=LEFT><FONT FACE="Tahoma, sans-serif">Note: Most
+macros listed here also have a variant for public folders.</FONT>
+E.g. <FONT FACE="Courier New, monospace">csidl_MyMusic</FONT> &rarr;
+<FONT FACE="Courier New, monospace">csidl_PublicMusic</FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
@@ -120,9 +120,8 @@ add a great amount of flexibility to batch synchronization
*.bat/*.cmd file that are evaluated by FreeFileSync at runtime!</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The
-FreeFileSync batch file <FONT FACE="Courier New, monospace">C:\SyncJob.ffs_batch
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B>
+The FreeFileSync batch file <FONT FACE="Courier New, monospace">C:\SyncJob.ffs_batch
</FONT>contains macro <FONT FACE="Courier New, monospace">%MyVar%
</FONT>instead of an absolute target folder and is invoked by a *.cmd
file:</FONT></P>
diff --git a/BUILD/Help/html/RealtimeSync.html b/BUILD/Help/html/RealtimeSync.html
index b8a94c62..ed28df7a 100644
--- a/BUILD/Help/html/RealtimeSync.html
+++ b/BUILD/Help/html/RealtimeSync.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20121017;18372400">
+ <META NAME="CHANGED" CONTENT="20130206;20451343">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,16 +23,14 @@
</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
-<H3 CLASS="western" ALIGN=CENTER><IMG SRC="../img/rtsicon.png" NAME="Grafik6" ALIGN=ABSMIDDLE WIDTH=36 HEIGHT=36 BORDER=0>
-<FONT SIZE=4 STYLE="font-size: 16pt">RealtimeSync<BR></FONT><FONT SIZE=3><I><SPAN STYLE="font-weight: normal">-
-Automated Synchronization -</SPAN></I></FONT></H3>
-<P ALIGN=LEFT><BR><BR>
-</P>
+<H3 CLASS="western" ALIGN=CENTER><IMG SRC="../img/RTS_logo.png" NAME="Grafik6" ALIGN=ABSMIDDLE WIDTH=269 HEIGHT=59 BORDER=0><FONT SIZE=4 STYLE="font-size: 16pt"><BR></FONT><FONT SIZE=3><I><SPAN STYLE="font-weight: normal">Automated
+Synchronization</SPAN></I></FONT></H3>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">RealtimeSync
is a small tool which executes a command line each time it detects
-changes in one of the monitored directories <SPAN STYLE="font-style: normal"><B>or</B></SPAN>
-a directory becomes available (e. g. insert of a USB-stick). Usually
-this command line will simply trigger a FreeFileSync batch job.</FONT></P>
+changes in one of the monitored directories </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>or</B></SPAN></FONT>
+<FONT FACE="Tahoma, sans-serif">a directory becomes available (e. g.
+insert of a USB-stick). Usually this command line will simply trigger
+a FreeFileSync batch job.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT>
@@ -42,15 +40,15 @@ combination with FreeFileSync</FONT></P>
RealtimeSync.exe located in FreeFileSync's installation directory.
Then specify all folders that shall be monitored. Instead of doing
this manually you can import a </FONT><FONT FACE="Courier New, monospace">*.ffs_batch</FONT>
-<FONT FACE="Tahoma, sans-serif">file via </FONT><FONT FACE="Tahoma, sans-serif"><I>Menu
--&gt; Program -&gt; Open</I></FONT><FONT FACE="Tahoma, sans-serif">.
+<FONT FACE="Tahoma, sans-serif">file via </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Menu
+&rarr; Program &rarr; Open</B></SPAN></FONT><FONT FACE="Tahoma, sans-serif">.
This not only extracts all directories relevant for synchronization
but also sets up the command line to execute the </FONT><FONT FACE="Courier New, monospace">*.ffs_batch</FONT>
<FONT FACE="Tahoma, sans-serif">file each time changes are detected.
-Now press &quot;</FONT><FONT FACE="Tahoma, sans-serif"><I>Start</I></FONT><FONT FACE="Tahoma, sans-serif">&quot;
-to begin monitoring.</FONT></P>
+Now press </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Start</B></SPAN></FONT>
+<FONT FACE="Tahoma, sans-serif">to begin monitoring.</FONT></P>
<UL>
- <P STYLE="margin-bottom: 0cm"><IMG SRC="../img/RealtimeSync.png" NAME="Grafik3" ALIGN=MIDDLE BORDER=0></P>
+ <P STYLE="margin-bottom: 0cm"><IMG SRC="../img/RealtimeSync.png" NAME="Grafik3" ALIGN=MIDDLE WIDTH=461 HEIGHT=388 BORDER=0></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
@@ -67,7 +65,7 @@ to begin monitoring.</FONT></P>
settings dialog can be skipped by passing a RealtimeSync
configuration file (<FONT FACE="Courier New, monospace">*.ffs_real</FONT>)
<B>or</B> a FreeFileSync batch file (<FONT FACE="Courier New, monospace">*.ffs_batch</FONT>)
- as first command-line argument to RealtimeSync.exe. This can be
+ as first command line argument to RealtimeSync.exe. This can be
integrated into the operating system's auto start
facility:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE="Courier New, monospace">&quot;C:\Program
Files\FreeFileSync\RealtimeSync.exe&quot;
@@ -90,7 +88,7 @@ ffs_batch configuration into the USB stick's root directory and have
it called when the stick is mounted. Then configure RealtimeSync as
shown in the following:</FONT></P>
<UL>
- <P><IMG SRC="../img/WatchUsbInsert.png" NAME="Grafik2" ALIGN=BOTTOM BORDER=0></P>
+ <P><IMG SRC="../img/WatchUsbInsert.png" NAME="Grafik2" ALIGN=BOTTOM WIDTH=437 HEIGHT=362 BORDER=0></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
@@ -108,8 +106,9 @@ files are modified in &quot;</FONT><FONT FACE="Courier New, monospace">H:\Data</
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Note<BR></B></FONT><FONT FACE="Tahoma, sans-serif">The
full path of the last changed file and the action that triggered
the change notification (create, update or delete) are </FONT><SPAN STYLE="text-decoration: none"><FONT FACE="Tahoma, sans-serif">written
- to the environment variables </FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Courier New, monospace">&quot;change_path&quot;</FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Tahoma, sans-serif">
- and </FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Courier New, monospace">&quot;change_action&quot;.</FONT></SPAN></P>
+ to the environment variables </FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Courier New, monospace"><B>%change_path%</B></FONT></SPAN><SPAN STYLE="text-decoration: none">
+ </SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Tahoma, sans-serif">and
+ </FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Courier New, monospace"><B>%change_action%</B></FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Courier New, monospace">.</FONT></SPAN></P>
</UL>
</SPAN><BR CLEAR=LEFT><BR>
</P>
@@ -147,7 +146,7 @@ directories. (Windows)</FONT></P>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
-<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Tahoma, sans-serif">Limitations:</FONT></P>
+<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Tahoma, sans-serif"><B>Limitations</B>:</FONT></P>
<UL>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">If
multiple changes happen at the same time, only the name of the first
diff --git a/BUILD/Help/html/Run as Service.html b/BUILD/Help/html/Run as Service.html
index ae8f57c3..c00f2c71 100644
--- a/BUILD/Help/html/Run as Service.html
+++ b/BUILD/Help/html/Run as Service.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20130126;13004654">
+ <META NAME="CHANGED" CONTENT="20130206;19210588">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,16 +23,14 @@
<BODY LANG="en-US" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Run
as Service <SPAN STYLE="font-weight: normal">(Windows)</SPAN></FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">RealtimeSync
is designed as a background process which does not need further
attention once it is running. Depending on your requirements there
are a number of ways to start it together with the operating system.
Generally the goal is to execute a command line like the following:
-</FONT><FONT FACE="Tahoma, sans-serif"><I><SPAN STYLE="font-weight: normal">&lt;installation
+</FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">&lt;installation
folder&gt;\RealtimeSync.exe &lt;path to *.ffs_real or *.ffs_batch
-file&gt;</SPAN></I></FONT></P>
+file&gt;</SPAN></SPAN></FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT></P>
@@ -61,8 +59,8 @@ file&gt;</SPAN></I></FONT></P>
systems's task scheduler and have it execute the command line above
when the system starts. See <A HREF="Schedule%20a%20Batch%20Job.html">Schedule
a Batch Job</A> for an example how to add a new task. Then change
- the user to run the task to &quot;SYSTEM&quot; - a special user
- account always running in the background.</FONT></P>
+ the user to run the task to </FONT><FONT FACE="Tahoma, sans-serif"><B>SYSTEM</B></FONT><FONT FACE="Tahoma, sans-serif">
+ - a special user account always running in the background.</FONT></P>
<P STYLE="margin-bottom: 0cm"><IMG SRC="../img/schedule_realtimesync.png" NAME="Grafik1" ALIGN=BOTTOM WIDTH=708 HEIGHT=284 BORDER=0></P>
</OL>
<P STYLE="margin-bottom: 0cm"><BR>
diff --git a/BUILD/Help/html/Schedule a Batch Job.html b/BUILD/Help/html/Schedule a Batch Job.html
index ee306e47..e0673c2d 100644
--- a/BUILD/Help/html/Schedule a Batch Job.html
+++ b/BUILD/Help/html/Schedule a Batch Job.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20120512;16135500">
+ <META NAME="CHANGED" CONTENT="20130207;1441045">
<STYLE TYPE="text/css">
<!--
@page { margin: 2cm }
@@ -19,27 +19,27 @@
<BODY LANG="de-DE" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Schedule
a Batch Job</FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<OL>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Create
- a new batch job via FreeFileSync's main
- dialog:<BR></FONT><FONT FACE="Tahoma, sans-serif"><I>Menu-&gt;Advanced-&gt;Create
- batch job</I></FONT><FONT FACE="Tahoma, sans-serif"><BR>&nbsp;</FONT></P>
+ a new batch job via FreeFileSync's main dialog: </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Menu
+ &rarr; Program &rarr; Save as batch job...</B></SPAN></FONT><FONT FACE="Tahoma, sans-serif"><BR>&nbsp;</FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">If
the batch job shall run without user interaction or as part of an
unattended batch script, make sure that no popup dialog stops the
- progress:<BR>Disable checkbox &quot;<I>Show progress dialog</I>&quot;
- to avoid blocking while showing the result after synchronization.
- Alternatively you can select the &quot;On completion&quot; action
- &quot;Close progress dialog&quot; located in synchronization
- settings. <B>Note:</B> Even if the progress dialog is not shown at
- the beginning, a user can make it visible <B>during</B>
- synchronization by double-clicking the FreeFileSync systray icon.<BR><IMG SRC="../img/SetupBatch.png" NAME="Grafik3" ALIGN=BOTTOM BORDER=0></FONT></P>
+ progress:<BR>Disable checkbox <SPAN STYLE="font-style: normal"><B>Show
+ progress dialog</B></SPAN> to avoid blocking while showing the
+ result after synchronization. Alternatively you can select the &quot;On
+ completion&quot; action <B>Close progress dialog</B> located in
+ synchronization settings.<BR><B>Note:</B> Even if the progress
+ dialog is not shown at the beginning, a user can make it visible
+ <B>during</B> synchronization by double-clicking the FreeFileSync
+ systray icon.<BR><IMG SRC="../img/SetupBatch.png" NAME="Grafik3" ALIGN=BOTTOM WIDTH=660 HEIGHT=263 BORDER=0></FONT></P>
<P STYLE="margin-bottom: 0cm">&nbsp;</P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">In
order to prevent error or warning popup messages from stopping
- progress, set &quot;<I>Error handling</I>&quot; to either &quot;<I>Ignore</I>&quot; or &quot;<I>Exit</I>&quot;.</FONT></P>
+ progress, set <SPAN STYLE="font-style: normal"><B>Error handling</B></SPAN>
+ to either <SPAN STYLE="font-style: normal"><B>Ignore</B></SPAN> or
+ <SPAN STYLE="font-style: normal"><B>Exit</B></SPAN>.</FONT></P>
<P STYLE="margin-bottom: 0cm">&nbsp;</P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Setup
your operating system's scheduler</FONT></P>
@@ -50,33 +50,26 @@ a Batch Job</FONT></FONT></H2>
7 Task Scheduler:</B></FONT></P>
<UL>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Go
- to Start and e</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><FONT SIZE=3><SPAN STYLE="font-weight: normal">nter
- </SPAN></FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=3><SPAN STYLE="font-weight: normal">&quot;</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3><SPAN STYLE="font-weight: normal">taskschd.msc&quot;</SPAN></FONT></FONT></FONT></P>
+ to Start and run</SPAN></FONT> <FONT FACE="Tahoma, sans-serif"><FONT SIZE=3><B>taskschd.msc</B></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=3><SPAN STYLE="font-weight: normal">.</SPAN></FONT></FONT></FONT></P>
<LI><P STYLE="margin-bottom: 0cm; font-weight: normal"><FONT COLOR="#000000"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=3>Create
a new basic task and follow the wizard.</FONT></FONT></FONT></P>
<LI><P STYLE="margin-bottom: 0cm; font-weight: normal"><FONT COLOR="#000000"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=3>Make
- &quot;Program/script&quot; point to the location of
- FreeFileSync.exe and specify the ffs_batch file under &quot;Add
- arguments&quot;.</FONT></FONT></FONT></P>
- </UL>
- </OL>
-</OL>
-<OL>
- <OL TYPE=A>
- <UL>
+ <B>Program/script</B> point to the location of FreeFileSync.exe
+ and insert the <FONT FACE="Courier New, monospace">*.ffs_batch</FONT>
+ file into <B>Add arguments</B>.</FONT></FONT></FONT></P>
<LI><P STYLE="margin-bottom: 0cm; font-weight: normal"><FONT FACE="Tahoma, sans-serif"><FONT COLOR="#000000"><FONT SIZE=3>Use
- quotes if any paths contain spaces, e.g.: </FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>&quot;C:\some
- folder\SyncJob.ffs_batch&quot;</FONT></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=3><BR></FONT></FONT><IMG SRC="../img/win7scheduler.png" NAME="Grafik1" ALIGN=BOTTOM BORDER=0></FONT></P>
+ quotation marks to protect spaces in path names, e.g.: </FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>&quot;C:\some
+ folder\SyncJob.ffs_batch&quot;</FONT></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=3><BR></FONT></FONT><IMG SRC="../img/win7scheduler.png" NAME="Grafik1" ALIGN=BOTTOM WIDTH=708 HEIGHT=284 BORDER=0></FONT></P>
</UL>
</OL>
<P STYLE="margin-bottom: 0cm"><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Tahoma, sans-serif"><B>Note</B></FONT><FONT FACE="Tahoma, sans-serif"><BR>Beginning
- with Windows Vista the &quot;Program/script&quot; always needs to
- be a path to &quot;FreeFileSync.exe&quot; even if ffs_batch file
- associations are set!</FONT> <FONT FACE="Tahoma, sans-serif">Else
- the task will return with error code 0xC1, &quot;%1 is not a valid
- Win32 application&quot; if a ffs_batch file is entered directly.</FONT></P>
+ with Windows Vista the &quot;Program/script&quot; always needs
+ point to an executable file like &quot;FreeFileSync.exe&quot; even
+ if ffs_batch file associations have been set!</FONT> I<FONT FACE="Tahoma, sans-serif">f
+ a ffs_batch file were entered instead the task would return with
+ error code 0xC1, &quot;%1 is not a valid Win32 application&quot;.</FONT></P>
</SPAN><BR CLEAR=LEFT>&nbsp;
</P>
</OL>
@@ -86,14 +79,15 @@ a Batch Job</FONT></FONT></H2>
XP Scheduled Tasks:</B></FONT></P>
<UL>
<LI VALUE=1><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Go
- to <I>Start &rarr; Control Panel &rarr; Scheduled Tasks</I> and
- select &quot;<I>Add Scheduled Task</I>&quot;.</FONT></P>
+ to <SPAN STYLE="font-style: normal"><B>Start &rarr; Control Panel
+ &rarr; Scheduled Tasks</B></SPAN> and select <SPAN STYLE="font-style: normal"><B>Add
+ Scheduled Task</B></SPAN>.</FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Follow
the wizard and select FreeFileSync.exe as program to run.</FONT></P>
- <LI><P STYLE="margin-bottom: 0cm; font-weight: normal"><FONT FACE="Tahoma, sans-serif">Enter
- &quot;Run:&quot; as: <FONT FACE="Courier New, monospace">&lt;FreeFileSync
- installation directory&gt;\FreeFileSync.exe &lt;job
- name&gt;.ffs_batch</FONT><BR><IMG SRC="../img/ScheduleBatch.png" NAME="Grafik2" ALIGN=BOTTOM BORDER=0><BR>&nbsp;</FONT></P>
+ <LI><P STYLE="margin-bottom: 0cm; font-weight: normal"><FONT FACE="Tahoma, sans-serif">Fill
+ input field <B>Run:</B> as: <FONT FACE="Courier New, monospace">&lt;FreeFileSync
+ installation folder&gt;\FreeFileSync.exe &lt;job
+ name&gt;.ffs_batch</FONT><BR><IMG SRC="../img/ScheduleBatch.png" NAME="Grafik2" ALIGN=BOTTOM WIDTH=406 HEIGHT=455 BORDER=0><BR>&nbsp;</FONT></P>
</UL>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Ubuntu
Linux Gnome-schedule:</B></FONT></P>
@@ -101,24 +95,13 @@ a Batch Job</FONT></FONT></H2>
<LI><P STYLE="margin-bottom: 0cm; font-weight: normal"><FONT FACE="Tahoma, sans-serif">Install
Gnome-schedule, if necessary: <FONT FACE="Courier New, monospace">sudo
apt-get install gnome-schedule</FONT></FONT></P>
- </UL>
- </OL>
-</OL>
-<OL>
- <OL TYPE=A START=2>
- <UL>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Go
- to </SPAN></FONT><FONT FACE="Tahoma, sans-serif"><I>System -&gt;
- Preferences -&gt; Scheduled tasks</I></FONT></P>
- </UL>
- </OL>
-</OL>
-<OL>
- <OL TYPE=A START=2>
- <UL>
- <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">Specify
- the command as:</SPAN></SPAN></FONT> <FONT FACE="Courier New, monospace"><I><SPAN STYLE="font-weight: normal">&lt;FreeFileSync
- installation directory&gt;/FreeFileSync &lt;job name&gt;.ffs_batch<BR></SPAN></I></FONT><IMG SRC="../img/ubuntuScheduler.png" NAME="Grafik5" ALIGN=BOTTOM BORDER=0></P>
+ to </SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>System
+ &rarr; Preferences &rarr; Scheduled tasks</B></SPAN></FONT></P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">Enter
+ the command </SPAN></SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">as:</SPAN></SPAN></FONT><SPAN STYLE="font-style: normal">
+ </SPAN><FONT FACE="Courier New, monospace"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">&lt;FreeFileSync
+ installation folder&gt;/FreeFileSync &lt;job name&gt;.ffs_batch</SPAN></SPAN></FONT><FONT FACE="Courier New, monospace"><I><SPAN STYLE="font-weight: normal"><BR></SPAN></I></FONT><IMG SRC="../img/ubuntuScheduler.png" NAME="Grafik5" ALIGN=BOTTOM WIDTH=629 HEIGHT=560 BORDER=0></P>
</UL>
</OL>
</OL>
diff --git a/BUILD/Help/html/Synchronize with FTP.html b/BUILD/Help/html/Synchronize with FTP.html
index 2f452c6e..cd623777 100644
--- a/BUILD/Help/html/Synchronize with FTP.html
+++ b/BUILD/Help/html/Synchronize with FTP.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20120511;23103900">
+ <META NAME="CHANGED" CONTENT="20130206;19102356">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -27,8 +27,6 @@
<BODY LANG="en-US" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Synchronize
with FTP/WebDAV <SPAN STYLE="font-weight: normal">(Windows)</SPAN></FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync
does not support accessing FTP volumes directly. But this
functionality can be integrated by mapping the FTP web space to a
@@ -40,17 +38,17 @@ drive letter:</FONT></P>
(<A HREF="http://www.netdrive.net/">http://www.netdrive.net</A>)</FONT></P>
<UL>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Add
- a &quot;<I>New Site</I>&quot; and specify site name, site URL, drive
- letter, account and password.</FONT></P>
+ a <SPAN STYLE="font-style: normal"><B>New Site</B></SPAN> and
+ specify site name, site URL, drive letter, account and password.</FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Use
- the newly created drive as if it were a regular hard disk.</FONT></P>
+ the newly created drive as if it were a normal hard disk.</FONT></P>
</UL>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Tahoma, sans-serif"><B>Note</B><BR>Most FTP drives set a
file's time stamp to the current time when synchronizing ignoring
the source file's time and date. As a workaround you can do a
- &quot;<I>compare by filesize</I>&quot;; see corresponding section.</FONT></P>
+ <A HREF="Compare%20by%20File%20Size.html">Compare by File Size</A>.</FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
diff --git a/BUILD/Help/html/Variable Drive Letters.html b/BUILD/Help/html/Variable Drive Letters.html
index 07620ded..8bdc20b8 100644
--- a/BUILD/Help/html/Variable Drive Letters.html
+++ b/BUILD/Help/html/Variable Drive Letters.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20120511;23102900">
+ <META NAME="CHANGED" CONTENT="20130206;18481035">
<STYLE TYPE="text/css">
<!--
@page { margin: 2cm }
@@ -19,8 +19,6 @@
<BODY LANG="de-DE" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Variable
drive letters</FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">USB
sticks often get different volume names assigned when plugged into
different computers. FreeFileSync offers two solutions to handle this
@@ -39,9 +37,15 @@ name]\path</FONT></FONT></P>
G:\.</FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">It is
-not required to look up and enter the volume name manually! Just
-select the corresponding entry in the drop down menu.<BR></FONT><IMG SRC="../img/VolumeName.png" NAME="Grafik1" ALIGN=BOTTOM BORDER=0></P>
+<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen4" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
+ <UL>
+ <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Note<BR></B>It
+ is not required to look up and enter the volume name manually! Just
+ select the corresponding entry in the drop down menu.</FONT></P>
+ <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><IMG SRC="../img/VolumeName.png" NAME="Grafik1" ALIGN=BOTTOM WIDTH=424 HEIGHT=86 BORDER=0></P>
+ </UL>
+</SPAN><BR CLEAR=LEFT><BR>
+</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Option
diff --git a/BUILD/Help/html/Versioning.html b/BUILD/Help/html/Versioning.html
index 8b1eeee5..587c396b 100644
--- a/BUILD/Help/html/Versioning.html
+++ b/BUILD/Help/html/Versioning.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20121230;16514190">
+ <META NAME="CHANGED" CONTENT="20130206;20140180">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,29 +23,27 @@
<BODY LANG="en-US" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">File
Versioning</FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">When
you need to preserve files that have been deleted or overwritten it's
-often sufficient to select &quot;Recycle Bin&quot; in synchronization
+often sufficient to select <B>Recycle Bin</B> in synchronization
settings. However this is only available on local drives and offers
little control on how to store and how long to keep the files.
-FreeFileSync therefore has an additional option, &quot;Versioning&quot;.</FONT></P>
+FreeFileSync therefore has an additional option, <B>Versioning</B>.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>1.
Keep all versions of old files</B></FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">In
synchronization settings set both deletion handling and naming
-convention to &quot;<B>Versioning</B>&quot;. FreeFileSync will move
-deleted files into the provided folder and add a time stamp to each
-file name. The structure of the synchronized folders is preserved so
-that old versions of a file can be conveniently accessed via a file
-browser.</FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example
-</B></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">(A
-file &quot;Folder\File.txt&quot; was updated three times and old
-versions were moved to folder &quot;C:\Revisions&quot;)</SPAN></FONT></P>
+convention to <B>Versioning</B>. FreeFileSync will move deleted files
+into the provided folder and add a time stamp to each file name. The
+structure of the synchronized folders is preserved so that old
+versions of a file can be conveniently accessed via a file browser.</FONT></P>
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:
+</B></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">A
+file &quot;</SPAN></FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">Folder\File.txt</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">&quot;
+was updated three times and old versions were moved to folder
+&quot;</SPAN></FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">C:\Revisions</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">&quot;</SPAN></FONT></P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">C:\Revisions\Folder\File.txt
@@ -61,24 +59,24 @@ versions were moved to folder &quot;C:\Revisions&quot;)</SPAN></FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>2.
Save only most recent version</B></FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Set
-deletion handling to &quot;Versioning&quot; and naming convention to
-&quot;<B>Replace</B>&quot;. Deleted files will be moved to the
-specified folder without any decoration and will replace already
-existing older versions.</FONT></P>
+deletion handling to <B>Versioning</B> and naming convention to
+<B>Replace</B>. Deleted files will be moved to the specified folder
+without any decoration and will replace already existing older
+versions.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>3.
Save versions at certain intervals</B></FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">With
-naming convention &quot;</FONT><FONT FACE="Tahoma, sans-serif"><B>Replace</B></FONT><FONT FACE="Tahoma, sans-serif">&quot;
-it's possible to refine the granularity of versions to keep by adding
-<A HREF="Macros.html">macros</A> to the versioning folder path. For
-example you can save deleted files on a per sync session basis by
-adding the </FONT><FONT FACE="Tahoma, sans-serif"><B>%timestamp%</B></FONT>
+naming convention </FONT><FONT FACE="Tahoma, sans-serif"><B>Replace</B></FONT>
+<FONT FACE="Tahoma, sans-serif">it's possible to refine the
+granularity of versions to keep by adding <A HREF="Macros.html">macros</A>
+to the versioning folder path. For example you can save deleted files
+on a per sync session basis by adding the </FONT><FONT FACE="Tahoma, sans-serif"><B>%timestamp%</B></FONT>
<FONT FACE="Tahoma, sans-serif">macro:</FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example
-</B></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">(Using
-the dynamically generated folder name &quot;C:\Revisions\</SPAN></FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">%timestamp%</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">&quot;)</SPAN></FONT></P>
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:
+</B></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Using
+the dynamically generated folder name &quot;</SPAN></FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">C:\Revisions\%timestamp%</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">&quot;</SPAN></FONT></P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">C:\Revisions\</FONT><FONT FACE="Courier New, monospace"><B>2012-12-12
diff --git a/BUILD/Help/html/Volume Shadow Copy.html b/BUILD/Help/html/Volume Shadow Copy.html
index fa10a9e0..ee4eef4a 100644
--- a/BUILD/Help/html/Volume Shadow Copy.html
+++ b/BUILD/Help/html/Volume Shadow Copy.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20120511;23094200">
+ <META NAME="CHANGED" CONTENT="20130207;1532278">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -23,21 +23,20 @@
<BODY LANG="en-US" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Volume
Shadow Copy Service <SPAN STYLE="font-weight: normal">(Windows only)</SPAN></FONT></FONT></H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync
supports copying locked or shared files by creating a Volume Shadow
-Copy of the source drive. To enable this feature go to </FONT><FONT FACE="Tahoma, sans-serif"><I>Menu
--&gt; Advanced -&gt; Global settings: Copy locked files</I></FONT><FONT FACE="Tahoma, sans-serif">.</FONT></P>
+Copy of the source drive. This feature can be configured via </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Menu
+&rarr; Advanced &rarr; Global settings: Copy locked files</B></SPAN></FONT><FONT FACE="Tahoma, sans-serif">.</FONT></P>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen3" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
<UL>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Note</B></FONT></P>
- <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">This
- functionality is applied to locked files only. Regular files will
- not use Volume Shadow Copy Service when being synchronized.</FONT></P>
+ <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The
+ volume snapshot created by the Volume Shadow Copy Service is used
+ when copying locked files only.</FONT></P>
<LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm; font-style: normal">
- <FONT FACE="Tahoma, sans-serif">Creating Volume Snapshots using VSS
- requires the application to be started with administrator rights.</FONT></P>
+ <FONT FACE="Tahoma, sans-serif">Accessing the Volume Shadow Copy
+ Service requires FreeFileSync to be started with administrator
+ rights.</FONT></P>
</UL>
</SPAN><BR CLEAR=LEFT><BR>
</P>
diff --git a/BUILD/Help/img/FFS_logo.png b/BUILD/Help/img/FFS_logo.png
new file mode 100644
index 00000000..6a1a53e5
--- /dev/null
+++ b/BUILD/Help/img/FFS_logo.png
Binary files differ
diff --git a/BUILD/Help/img/RTS_logo.png b/BUILD/Help/img/RTS_logo.png
new file mode 100644
index 00000000..344da623
--- /dev/null
+++ b/BUILD/Help/img/RTS_logo.png
Binary files differ
diff --git a/BUILD/Help/img/SetupBatch.png b/BUILD/Help/img/SetupBatch.png
index 980796a9..01d1ecff 100644
--- a/BUILD/Help/img/SetupBatch.png
+++ b/BUILD/Help/img/SetupBatch.png
Binary files differ
diff --git a/BUILD/Help/img/ffsicon.png b/BUILD/Help/img/ffsicon.png
deleted file mode 100644
index ed2eafc1..00000000
--- a/BUILD/Help/img/ffsicon.png
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/img/rtsicon.png b/BUILD/Help/img/rtsicon.png
deleted file mode 100644
index af51f1bf..00000000
--- a/BUILD/Help/img/rtsicon.png
+++ /dev/null
Binary files differ
diff --git a/BUILD/Languages/arabic.lng b/BUILD/Languages/arabic.lng
index 7a3ee9b1..07334ec6 100644
--- a/BUILD/Languages/arabic.lng
+++ b/BUILD/Languages/arabic.lng
@@ -1,6 +1,6 @@
<header>
<language name>العربية</language name>
- <translator>Awadh Al-Ghaamdi</translator>
+ <translator></translator>
<locale>ar</locale>
<flag file>arabic.png</flag file>
<plural forms>6</plural forms>
@@ -97,11 +97,8 @@
<source>Fatal Error</source>
<target>خطأ فادح</target>
-<source>Windows Error Code %x:</source>
-<target>رمز خطأ Windows %x:</target>
-
-<source>Linux Error Code %x:</source>
-<target>رمز الخطأ لينكس %x:</target>
+<source>Error Code %x:</source>
+<target></target>
<source>Cannot resolve symbolic link %x.</source>
<target>لا يمكن حل الارتباط الرمزي %x.</target>
@@ -160,6 +157,9 @@
<source>Cannot set directory lock %x.</source>
<target>لا يمكن تعيين الدليل قفل %x.</target>
+<source>Creating file %x</source>
+<target>إنشاء ملف %x</target>
+
<source>
<pluralform>1 sec</pluralform>
<pluralform>%x sec</pluralform>
@@ -450,18 +450,12 @@ The command is triggered if:
<source>Compare</source>
<target>قارن</target>
-<source>Compare both sides</source>
-<target>المقارنة بين كلا الجانبين</target>
-
<source>&Abort</source>
<target>إحباط</target>
<source>Synchronize</source>
<target>مزامنة</target>
-<source>Start synchronization</source>
-<target>بدء تشغيل المزامنة</target>
-
<source>Add folder pair</source>
<target>إضافة مجلد زوج</target>
@@ -471,15 +465,6 @@ The command is triggered if:
<source>Swap sides</source>
<target>مبادلة الجانبين</target>
-<source>Open</source>
-<target>فتح</target>
-
-<source>Save</source>
-<target>حفظ</target>
-
-<source>Last used configurations (press DEL to remove from list)</source>
-<target>آخر استخدام تكوينات (اضغط DEL لإزالة من القائمة)</target>
-
<source>Hide excluded items</source>
<target>إخفاء العناصر المستبعدة</target>
@@ -513,6 +498,9 @@ The command is triggered if:
<source>Batch job</source>
<target>مهمة المجموعة</target>
+<source>Create a batch file to automate synchronization. Double-click this file or schedule in your system's task planner: FreeFileSync.exe <job name>.ffs_batch</source>
+<target></target>
+
<source>Help</source>
<target>تعليمات</target>
@@ -759,6 +747,9 @@ Note: File names must be relative to base directories!
<source>Description</source>
<target>الوصف</target>
+<source>Start synchronization</source>
+<target>بدء تشغيل المزامنة</target>
+
<source>Variant</source>
<target>البديل</target>
@@ -795,6 +786,15 @@ Note: File names must be relative to base directories!
<source>Select view</source>
<target>حدد طريقة العرض</target>
+<source>Open...</source>
+<target></target>
+
+<source>Save</source>
+<target>حفظ</target>
+
+<source>Compare both sides</source>
+<target>المقارنة بين كلا الجانبين</target>
+
<source>Set direction:</source>
<target>تحديد الاتجاه:</target>
@@ -948,6 +948,9 @@ Note: File names must be relative to base directories!
<source>Show files that won't be copied</source>
<target>إظهار الملفات التي لن يتم نسخها</target>
+<source>Set as default</source>
+<target></target>
+
<source>All folders are in sync!</source>
<target>تكون الكل المجلدات متزامنة</target>
@@ -961,12 +964,6 @@ Note: File names must be relative to base directories!
<target>تصدير قائمة الملف</target>
<source>
-<pluralform>Object deleted successfully!</pluralform>
-<pluralform>%x objects deleted successfully!</pluralform>
-</source>
-<target></target>
-
-<source>
<pluralform>1 directory</pluralform>
<pluralform>%x directories</pluralform>
</source>
@@ -1107,15 +1104,15 @@ Note: File names must be relative to base directories!
<source>Leave as unresolved conflict</source>
<target>ترك كالصراعات التي لم تحل</target>
+<source>Append a timestamp to each file name</source>
+<target>إلحاق طابع زمني لكل ملف اسم</target>
+
<source>Replace</source>
<target>استبدال</target>
<source>Move files and replace if existing</source>
<target>نقل الملفات واستبدال إذا كان موجود</target>
-<source>Append a timestamp to each file name</source>
-<target>إلحاق طابع زمني لكل ملف اسم</target>
-
<source>Folder</source>
<target>مجلد</target>
@@ -1239,14 +1236,35 @@ Note: File names must be relative to base directories!
<source>Setting default synchronization directions: Old files will be overwritten with newer files.</source>
<target>الإعداد الافتراضي في الاتجاهين المزامنة: ستتم الكتابة فوق الملفات القديمة بالملفات الأحدث.</target>
+<source>Checking recycle bin availability for folder %x...</source>
+<target></target>
+
+<source>Moving file %x to recycle bin</source>
+<target>نقل ملف %x سلة المحذوفات</target>
+
+<source>Moving folder %x to recycle bin</source>
+<target>نقل المجلد %x سلة المحذوفات</target>
+
+<source>Moving symbolic link %x to recycle bin</source>
+<target>نقل الارتباط الرمزي %x سلة المحذوفات</target>
+
+<source>Deleting file %x</source>
+<target>حذف الملف %x</target>
+
+<source>Deleting folder %x</source>
+<target>حذف المجلد %x</target>
+
+<source>Deleting symbolic link %x</source>
+<target>حذف الارتباط الرمزي %x</target>
+
<source>Recycle Bin is not available for the following paths! Files will be deleted permanently instead:</source>
<target>سلة المهملات غير متوفر للمسارات التالية! سيتم حذف الملفات بشكل دائم بدلاً من ذلك:</target>
-<source>You can ignore this error to consider the folder as empty.</source>
-<target>يمكنك تجاهل هذا الخطأ للنظر في مجلد فارغ.</target>
+<source>You can ignore this error to consider each folder as empty.</source>
+<target></target>
-<source>Cannot find folder %x.</source>
-<target>لا يمكن العثور على المجلد %x.</target>
+<source>Cannot find the following folders:</source>
+<target></target>
<source>Directories are dependent! Be careful when setting up synchronization rules:</source>
<target>تعتمد الدلائل! كن حذراً عند إعداد قواعد المزامنة:</target>
@@ -1320,24 +1338,6 @@ Note: File names must be relative to base directories!
<source>Multiple...</source>
<target>متعددة...</target>
-<source>Deleting file %x</source>
-<target>حذف الملف %x</target>
-
-<source>Deleting folder %x</source>
-<target>حذف المجلد %x</target>
-
-<source>Deleting symbolic link %x</source>
-<target>حذف الارتباط الرمزي %x</target>
-
-<source>Moving file %x to recycle bin</source>
-<target>نقل ملف %x سلة المحذوفات</target>
-
-<source>Moving folder %x to recycle bin</source>
-<target>نقل المجلد %x سلة المحذوفات</target>
-
-<source>Moving symbolic link %x to recycle bin</source>
-<target>نقل الارتباط الرمزي %x سلة المحذوفات</target>
-
<source>Moving file %x to %y</source>
<target>نقل ملف %x إلى %y</target>
@@ -1350,9 +1350,6 @@ Note: File names must be relative to base directories!
<source>Removing old versions...</source>
<target>إزالة الإصدارات القديمة...</target>
-<source>Creating file %x</source>
-<target>إنشاء ملف %x</target>
-
<source>Creating symbolic link %x</source>
<target>إنشاء ارتباط رمزي %x</target>
@@ -1371,6 +1368,9 @@ Note: File names must be relative to base directories!
<source>Updating attributes of %x</source>
<target>تحديث سمات %x</target>
+<source>Cannot find %x.</source>
+<target></target>
+
<source>Target folder %x already existing.</source>
<target>المجلد الهدف %x الموجودة بالفعل.</target>
diff --git a/BUILD/Languages/german.lng b/BUILD/Languages/german.lng
index af14bcd2..da7b62b4 100644
--- a/BUILD/Languages/german.lng
+++ b/BUILD/Languages/german.lng
@@ -1293,8 +1293,8 @@ Achtung: Dateinamen müssen relativ zu den Basisverzeichnissen sein!
<source>Recycle Bin is not available for the following paths! Files will be deleted permanently instead:</source>
<target>Der Papierkorb ist für die folgenden Pfade nicht verfügbar! Die Dateien werden stattdessen permanent gelöscht:</target>
-<source>You can ignore this error to consider the folder as empty.</source>
-<target>Dieser Fehler kann ignoriert werden, um den Ordner als leer anzusehen.</target>
+<source>You can ignore this error to consider each folder as empty.</source>
+<target>Dieser Fehler kann ignoriert werden, um alle Ordner als leer anzusehen.</target>
<source>Cannot find folder %x.</source>
<target>Der Ordner %x wurde nicht gefunden.</target>
diff --git a/BUILD/Languages/russian.lng b/BUILD/Languages/russian.lng
index 597f548c..7a3b93cf 100644
--- a/BUILD/Languages/russian.lng
+++ b/BUILD/Languages/russian.lng
@@ -418,7 +418,7 @@ The command is triggered if:
<target>Закрыть окно процесса</target>
<source>Standby</source>
-<target>Перейти в оджидание</target>
+<target>Перейти в ожидании</target>
<source>Log off</source>
<target>Выйти из системы (разлогиниться)</target>
diff --git a/BUILD/License.txt b/BUILD/License.txt
deleted file mode 100644
index 94a04532..00000000
--- a/BUILD/License.txt
+++ /dev/null
@@ -1,621 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
diff --git a/BUILD/Resources.zip b/BUILD/Resources.zip
index 79efed0d..c0d59262 100644
--- a/BUILD/Resources.zip
+++ b/BUILD/Resources.zip
Binary files differ
diff --git a/BUILD/styles.rc b/BUILD/styles.gtk_rc
index c6b1b5ab..c6b1b5ab 100644
--- a/BUILD/styles.rc
+++ b/BUILD/styles.gtk_rc
diff --git a/FreeFileSync.vcxproj b/FreeFileSync.vcxproj
index 5bc30a85..ee27a426 100644
--- a/FreeFileSync.vcxproj
+++ b/FreeFileSync.vcxproj
@@ -236,6 +236,7 @@
<ClCompile Include="lib\binary.cpp" />
<ClCompile Include="lib\db_file.cpp" />
<ClCompile Include="lib\dir_lock.cpp" />
+ <ClCompile Include="lib\ffs_paths.cpp" />
<ClCompile Include="lib\hard_filter.cpp" />
<ClCompile Include="lib\icon_buffer.cpp" />
<ClCompile Include="lib\localization.cpp" />
@@ -289,6 +290,7 @@
<ClCompile Include="zen\file_traverser.cpp" />
<ClCompile Include="zen\format_unit.cpp" />
<ClCompile Include="zen\privilege.cpp" />
+ <ClCompile Include="zen\process_priority.cpp" />
<ClCompile Include="zen\recycler.cpp" />
<ClCompile Include="zen\scroll_window_under_cursor.cpp" />
<ClCompile Include="zen\zstring.cpp" />
diff --git a/Makefile b/Makefile
index 84484198..bacc1e7f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+BLAH_BLUBB_123=
+#for some buggy reason the first row in the make file has no effect on Suse Linux! => make sure there's no important command
APPNAME = FreeFileSync
prefix = /usr
BINDIR = $(DESTDIR)$(prefix)/bin
@@ -5,23 +7,20 @@ SHAREDIR = $(DESTDIR)$(prefix)/share
APPSHAREDIR = $(SHAREDIR)/$(APPNAME)
DOCSHAREDIR = $(SHAREDIR)/doc/$(APPNAME)
-CPPFLAGS = -Wall -pipe -O3 -pthread -std=gnu++0x -DNDEBUG -DwxUSE_UNICODE -DFFS_LINUX -DZEN_PLATFORM_OTHER -DWXINTL_NO_GETTEXT_MACRO -I. -include "zen/i18n.h" -include "zen/warn_static.h"
-LINKFLAGS = -pthread -lrt -lz
+CPPFLAGS = -std=c++11 -Wall -pipe -O3 -DNDEBUG -DwxUSE_UNICODE -DZEN_PLATFORM_OTHER -DWXINTL_NO_GETTEXT_MACRO -I. -include "zen/i18n.h" -include "zen/warn_static.h"
+LINKFLAGS =
-ifeq ($(BUILD),release)
-#static wxWidgets and boost library linkage for precompiled release
-CPPFLAGS += `wx-config --cxxflags --debug=no --unicode=yes --static=yes`
-LINKFLAGS += `wx-config --libs std,aui --debug=no --unicode=yes --static=yes` -Wl,-Bstatic -lboost_thread -lboost_system -Wl,-Bdynamic
-else
-#default build
-CPPFLAGS += `wx-config --cxxflags --debug=no --unicode=yes`
-LINKFLAGS += `wx-config --libs std,aui --debug=no --unicode=yes` -lboost_thread -lboost_system
-endif
-#####################################################################################################
+#distinguish Linux/OSX builds
+OPERATING_SYSTEM_NAME := $(shell uname)
+
+#################### Linux ############################
+ifeq ($(OPERATING_SYSTEM_NAME), Linux)
+COMPILER_BIN=g++ -pthread
+CPPFLAGS += -DFFS_LINUX
-#Gtk - recycler/icon loading
+#Gtk - support recycler/icon loading/no button border/grid scrolling
CPPFLAGS += `pkg-config --cflags gtk+-2.0`
-LINKFLAGS += `pkg-config --libs gtk+-2.0`
+LINKFLAGS += `pkg-config --libs gtk+-2.0`
#support for SELinux (optional)
SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES)
@@ -37,6 +36,40 @@ CPPFLAGS += `pkg-config --cflags unity` -DHAVE_UBUNTU_UNITY
LINKFLAGS += `pkg-config --libs unity`
endif
+ifeq ($(BUILD),Launchpad)
+#default build/Launchpad
+CPPFLAGS += `wx-config --cxxflags --debug=no`
+LINKFLAGS += `wx-config --libs std, aui --debug=no` -lboost_thread -lboost_system
+else
+#static wxWidgets and boost library linkage for precompiled release
+WX_CONFIG_BIN =$(HOME)/Desktop/wxGTK-2.8.12/lib/release/bin/wx-config
+CPPFLAGS += -I$(HOME)/Desktop/boost_1_53_0
+BOOST_LIB_DIR =$(HOME)/Desktop/boost_1_53_0/stage/lib
+
+CPPFLAGS += `$(WX_CONFIG_BIN) --cxxflags --debug=no --static=yes`
+LINKFLAGS += `$(WX_CONFIG_BIN) --libs std, aui --debug=no --static=yes` $(BOOST_LIB_DIR)/libboost_thread.a $(BOOST_LIB_DIR)/libboost_system.a
+endif
+
+endif
+#################### OS X ############################
+ifeq ($(OPERATING_SYSTEM_NAME), Darwin)
+COMPILER_BIN=clang++ -stdlib=libc++
+CPPFLAGS += -DFFS_MAC
+
+WX_CONFIG_BIN =$(HOME)/Desktop/wxWidgets-2.9.4/lib/release/bin/wx-config
+CPPFLAGS += -I$(HOME)/Desktop/boost_1_53_0
+BOOST_LIB_DIR =$(HOME)/Desktop/boost_1_53_0/stage/lib
+MACOS_SDK =-mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
+
+#-Wl,-Bstatic not supported on OSX!
+
+# link wxWidgets and boost statically -> check dependencies with: otool -L FreeFileSync
+CPPFLAGS += $(MACOS_SDK) `$(WX_CONFIG_BIN) --cxxflags --debug=no --static=yes`
+LINKFLAGS += $(MACOS_SDK) `$(WX_CONFIG_BIN) --libs std, aui --debug=no --static=yes` $(BOOST_LIB_DIR)/libboost_thread.a $(BOOST_LIB_DIR)/libboost_system.a
+
+endif
+#####################################################################################################
+
CPP_LIST= #internal list of all *.cpp files needed for compilation
CPP_LIST+=algorithm.cpp
CPP_LIST+=application.cpp
@@ -77,6 +110,7 @@ CPP_LIST+=lib/resources.cpp
CPP_LIST+=lib/perf_check.cpp
CPP_LIST+=lib/status_handler.cpp
CPP_LIST+=lib/versioning.cpp
+CPP_LIST+=lib/ffs_paths.cpp
CPP_LIST+=lib/xml_base.cpp
CPP_LIST+=zen/recycler.cpp
CPP_LIST+=zen/file_handling.cpp
@@ -85,28 +119,41 @@ CPP_LIST+=zen/file_io.cpp
CPP_LIST+=zen/file_traverser.cpp
CPP_LIST+=zen/zstring.cpp
CPP_LIST+=zen/format_unit.cpp
+CPP_LIST+=zen/process_priority.cpp
CPP_LIST+=wx+/grid.cpp
CPP_LIST+=wx+/button.cpp
CPP_LIST+=wx+/graph.cpp
CPP_LIST+=wx+/tooltip.cpp
CPP_LIST+=wx+/zlib_wrap.cpp
+# OS X
+ifeq ($(OPERATING_SYSTEM_NAME), Darwin)
+MM_LIST= #objective C files
+MM_LIST+=ui/osx_dock.mm
+endif
+
#list of all *.o files
-OBJECT_LIST=$(CPP_LIST:%.cpp=OBJ/FFS_Release_GCC_Make/%.o)
+OBJECT_LIST = $(CPP_LIST:%.cpp=OBJ/FFS_Release_GCC_Make/%.o)
+OBJECT_LIST += $(MM_LIST:%.mm=OBJ/FFS_Release_GCC_Make/%.mm.o)
all: FreeFileSync
+OBJ/FFS_Release_GCC_Make/%.mm.o : %.mm
+ mkdir -p $(dir $@)
+ $(COMPILER_BIN) $(CPPFLAGS) -c $< -o $@
+
OBJ/FFS_Release_GCC_Make/%.o : %.cpp
mkdir -p $(dir $@)
- g++ $(CPPFLAGS) -c $< -o $@
+ $(COMPILER_BIN) $(CPPFLAGS) -c $< -o $@
FreeFileSync: $(OBJECT_LIST)
- g++ -o ./BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS)
+ $(COMPILER_BIN) -o ./BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS)
clean:
#-f doesn't work when deleting directories
if [ -d OBJ/FFS_Release_GCC_Make ]; then rm -rf OBJ/FFS_Release_GCC_Make; fi
rm -f BUILD/$(APPNAME)
+ rm -f wx+/pch.h.gch
install:
mkdir -p $(BINDIR)
@@ -118,7 +165,7 @@ install:
BUILD/Compare_Complete.wav \
BUILD/Sync_Complete.wav \
BUILD/Resources.zip \
- BUILD/styles.rc \
+ BUILD/styles.gtk_rc \
$(APPSHAREDIR)
mkdir -p $(DOCSHAREDIR)
diff --git a/RealtimeSync/RealtimeSync.ico b/RealtimeSync/RealtimeSync.ico
index 1c5a3eb6..f9012b12 100644
--- a/RealtimeSync/RealtimeSync.ico
+++ b/RealtimeSync/RealtimeSync.ico
Binary files differ
diff --git a/RealtimeSync/RealtimeSync.vcxproj b/RealtimeSync/RealtimeSync.vcxproj
index 3a2ebf8b..73674abc 100644
--- a/RealtimeSync/RealtimeSync.vcxproj
+++ b/RealtimeSync/RealtimeSync.vcxproj
@@ -218,6 +218,7 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\lib\ffs_paths.cpp" />
<ClCompile Include="..\lib\localization.cpp" />
<ClCompile Include="..\lib\process_xml.cpp" />
<ClCompile Include="..\lib\resolve_path.cpp" />
diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp
index 23e7ab25..1d7640df 100644
--- a/RealtimeSync/application.cpp
+++ b/RealtimeSync/application.cpp
@@ -6,11 +6,12 @@
#include "application.h"
#include "main_dlg.h"
+#include <zen/file_handling.h>
#include <wx/event.h>
#include <wx/log.h>
#include <wx/msgdlg.h>
#include <wx+/string_conv.h>
-#include "resources.h"
+//#include "resources.h"
#include "xml_ffs.h"
#include "../lib/localization.h"
#include "../lib/ffs_paths.h"
@@ -75,16 +76,17 @@ void Application::OnStartApplication(wxIdleEvent& event)
{
Disconnect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), nullptr, this);
+ warn_static("fix")
+
//if appname is not set, the default is the executable's name!
- SetAppName(wxT("FreeFileSync")); //use a different app name, to have "GetUserDataDir()" return the same directory as for FreeFileSync
+ SetAppName(L"FreeFileSync"); //abuse FFS's name, to have "GetUserDataDir()" return the same directory
#ifdef FFS_WIN
//Quote: "Best practice is that all applications call the process-wide SetErrorMode function with a parameter of
//SEM_FAILCRITICALERRORS at startup. This is to prevent error mode dialogs from hanging the application."
::SetErrorMode(SEM_FAILCRITICALERRORS);
-
#elif defined FFS_LINUX
- ::gtk_rc_parse((zen::getResourceDir() + "styles.rc").c_str()); //remove inner border from bitmap buttons
+ ::gtk_rc_parse((zen::getResourceDir() + "styles.gtk_rc").c_str()); //remove inner border from bitmap buttons
#endif
//set program language
@@ -124,7 +126,6 @@ void Application::OnStartApplication(wxIdleEvent& event)
cfgFilename = commandArgs[0];
MainDialog* frame = new MainDialog(nullptr, cfgFilename);
- frame->SetIcon(GlobalResources::instance().programIcon); //set application icon
frame->Show();
}
diff --git a/RealtimeSync/gui_generated.cpp b/RealtimeSync/gui_generated.cpp
index b32fa8bb..ca891fc9 100644
--- a/RealtimeSync/gui_generated.cpp
+++ b/RealtimeSync/gui_generated.cpp
@@ -127,12 +127,12 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
wxBoxSizer* bSizer20;
bSizer20 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonAddFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
+ m_bpButtonAddFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
m_bpButtonAddFolder->SetToolTip( _("Add folder") );
bSizer20->Add( m_bpButtonAddFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonRemoveTopFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
+ m_bpButtonRemoveTopFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") );
bSizer20->Add( m_bpButtonRemoveTopFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
@@ -217,9 +217,9 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
bSizer141->Add( 0, 0, 1, wxEXPAND, 5 );
- m_buttonStart = new zen::BitmapButton( m_panel4, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1,50 ), 0 );
+ m_buttonStart = new zen::BitmapButton( m_panel4, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_buttonStart->SetDefault();
- m_buttonStart->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) );
+ m_buttonStart->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bSizer141->Add( m_buttonStart, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
@@ -275,7 +275,7 @@ FolderGenerated::FolderGenerated( wxWindow* parent, wxWindowID id, const wxPoint
wxBoxSizer* bSizer114;
bSizer114 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonRemoveFolder = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
+ m_bpButtonRemoveFolder = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") );
bSizer114->Add( m_bpButtonRemoveFolder, 0, wxALIGN_CENTER_VERTICAL, 5 );
@@ -337,12 +337,12 @@ ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
m_buttonRetry = new wxButton( m_panel3, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 );
m_buttonRetry->SetDefault();
- m_buttonRetry->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+ m_buttonRetry->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
bSizer13->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_buttonAbort = new wxButton( m_panel3, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+ m_buttonAbort->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
bSizer13->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
diff --git a/RealtimeSync/main_dlg.cpp b/RealtimeSync/main_dlg.cpp
index ca6fa4fa..758babd5 100644
--- a/RealtimeSync/main_dlg.cpp
+++ b/RealtimeSync/main_dlg.cpp
@@ -14,6 +14,7 @@
#include <wx+/button.h>
#include <wx+/string_conv.h>
#include <wx+/mouse_move_dlg.h>
+#include <wx+/font_size.h>
#include <zen/assert_static.h>
#include <zen/file_handling.h>
#include <zen/build_info.h>
@@ -46,8 +47,16 @@ private:
MainDialog::MainDialog(wxDialog* dlg, const wxString& cfgFileName)
: MainDlgGenerated(dlg)
{
+#ifdef FFS_WIN
+ new MouseMoveWindow(*this); //ownership passed to "this"
+#endif
wxWindowUpdateLocker dummy(this); //avoid display distortion
+ SetIcon(GlobalResources::instance().programIcon); //set application icon
+
+ setRelativeFontSize(*m_buttonStart, 1.5);
+ m_buttonStart->setInnerBorderSize(8);
+
m_bpButtonRemoveTopFolder->Hide();
m_panelMainFolder->Layout();
@@ -61,15 +70,10 @@ MainDialog::MainDialog(wxDialog* dlg, const wxString& cfgFileName)
//prepare drag & drop
dirNameFirst.reset(new DirectoryName<wxTextCtrl>(*m_panelMainFolder, *m_buttonSelectDirMain, *m_txtCtrlDirectoryMain, m_staticTextFinalPath));
-#ifdef FFS_WIN
- new MouseMoveWindow(*this); //ownership passed to "this"
-#endif
-
//--------------------------- load config values ------------------------------------
xmlAccess::XmlRealConfig newConfig;
const wxString currentConfigFile = cfgFileName.empty() ? lastConfigFileName() : cfgFileName;
-
bool loadCfgSuccess = false;
if (!cfgFileName.empty() || wxFileExists(lastConfigFileName()))
try
@@ -139,7 +143,7 @@ const wxString& MainDialog::lastConfigFileName()
void MainDialog::OnShowHelp(wxCommandEvent& event)
{
- zen::displayHelpEntry(L"html/RealtimeSync.html");
+ zen::displayHelpEntry(L"html/RealtimeSync.html", this);
}
@@ -363,7 +367,7 @@ void MainDialog::OnRemoveTopFolder(wxCommandEvent& event)
#ifdef FFS_WIN
static const size_t MAX_ADD_FOLDERS = 8;
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
static const size_t MAX_ADD_FOLDERS = 6;
#endif
diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile
index c0386603..b1c78f61 100644
--- a/RealtimeSync/makefile
+++ b/RealtimeSync/makefile
@@ -2,23 +2,53 @@ APPNAME = RealtimeSync
prefix = /usr
BINDIR = $(DESTDIR)$(prefix)/bin
-CPPFLAGS = -Wall -pipe -O3 -pthread -std=gnu++0x -DNDEBUG -DwxUSE_UNICODE -DFFS_LINUX -DZEN_PLATFORM_OTHER -DWXINTL_NO_GETTEXT_MACRO -I.. -include "../zen/i18n.h" -include "zen/warn_static.h"
-LINKFLAGS = -pthread -lrt
+CPPFLAGS = -std=c++11 -Wall -pipe -O3 -DNDEBUG -DwxUSE_UNICODE -DZEN_PLATFORM_OTHER -DWXINTL_NO_GETTEXT_MACRO -I.. -include "zen/i18n.h" -include "zen/warn_static.h"
+LINKFLAGS =
-ifeq ($(BUILD),release)
-#static wxWidgets and boost library linkage for precompiled release
-CPPFLAGS += `wx-config --cxxflags --debug=no --unicode=yes --static=yes`
-LINKFLAGS += `wx-config --libs --debug=no --unicode=yes --static=yes` -Wl,-Bstatic -lboost_thread -lboost_system -Wl,-Bdynamic
+#distinguish Linux/Mac builds
+OPERATING_SYSTEM_NAME := $(shell uname)
+
+#################### Linux ############################
+ifeq ($(OPERATING_SYSTEM_NAME), Linux)
+COMPILER_BIN=g++ -pthread
+CPPFLAGS += -DFFS_LINUX
+
+#Gtk - support "no button border"
+CPPFLAGS += `pkg-config --cflags gtk+-2.0`
+LINKFLAGS += `pkg-config --libs gtk+-2.0`
+
+ifeq ($(BUILD),Launchpad)
+#default build/Launchpad
+CPPFLAGS += `wx-config --cxxflags --debug=no`
+LINKFLAGS += `wx-config --libs --debug=no` -lboost_thread -lboost_system
else
-#default build
-CPPFLAGS += `wx-config --cxxflags --debug=no --unicode=yes`
-LINKFLAGS += `wx-config --libs --debug=no --unicode=yes` -lboost_thread -lboost_system
+#static wxWidgets and boost library linkage for precompiled release
+WX_CONFIG_BIN =$(HOME)/Desktop/wxGTK-2.8.12/lib/release/bin/wx-config
+CPPFLAGS += -I$(HOME)/Desktop/boost_1_53_0
+BOOST_LIB_DIR =$(HOME)/Desktop/boost_1_53_0/stage/lib
+
+CPPFLAGS += `$(WX_CONFIG_BIN) --cxxflags --debug=no --static=yes`
+LINKFLAGS += `$(WX_CONFIG_BIN) --libs --debug=no --static=yes` $(BOOST_LIB_DIR)/libboost_thread.a $(BOOST_LIB_DIR)/libboost_system.a
endif
-#####################################################################################################
-#Gtk - no button border
-CPPFLAGS += `pkg-config --cflags gtk+-2.0`
-LINKFLAGS += `pkg-config --libs gtk+-2.0`
+endif
+#################### OS X ############################
+ifeq ($(OPERATING_SYSTEM_NAME), Darwin)
+COMPILER_BIN=clang++ -stdlib=libc++
+CPPFLAGS += -DFFS_MAC
+
+WX_CONFIG_BIN =$(HOME)/Desktop/wxWidgets-2.9.4/lib/release/bin/wx-config
+CPPFLAGS += -I$(HOME)/Desktop/boost_1_53_0
+BOOST_LIB_DIR =$(HOME)/Desktop/boost_1_53_0/stage/lib
+MACOS_SDK =-mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
+#-Wl,-Bstatic not supported on OSX!
+
+# link wxWidgets and boost statically -> check dependencies with: otool -L RealtimeSync
+CPPFLAGS += $(MACOS_SDK) `$(WX_CONFIG_BIN) --cxxflags --debug=no --static=yes`
+LINKFLAGS += $(MACOS_SDK) `$(WX_CONFIG_BIN) --libs --debug=no --static=yes` $(BOOST_LIB_DIR)/libboost_thread.a $(BOOST_LIB_DIR)/libboost_system.a
+
+endif
+#####################################################################################################
CPP_LIST= #internal list of all *.cpp files needed for compilation
CPP_LIST+=application.cpp
@@ -36,6 +66,7 @@ CPP_LIST+=../lib/localization.cpp
CPP_LIST+=../lib/process_xml.cpp
CPP_LIST+=../lib/resolve_path.cpp
CPP_LIST+=../lib/xml_base.cpp
+CPP_LIST+=../lib/ffs_paths.cpp
CPP_LIST+=../zen/dir_watcher.cpp
CPP_LIST+=../zen/file_handling.cpp
CPP_LIST+=../zen/file_io.cpp
@@ -43,22 +74,23 @@ CPP_LIST+=../zen/file_traverser.cpp
CPP_LIST+=../zen/zstring.cpp
CPP_LIST+=../wx+/button.cpp
-#list of all *.o files
+#list of all *.o files (we need the "RTS" subdirectory to handle "../*.cpp" files
OBJECT_LIST=$(CPP_LIST:%.cpp=../OBJ/RTS_Release_GCC_Make/RTS/%.o)
all: RealtimeSync
../OBJ/RTS_Release_GCC_Make/RTS/%.o : %.cpp
mkdir -p $(dir $@)
- g++ $(CPPFLAGS) -c $< -o $@
+ $(COMPILER_BIN) $(CPPFLAGS) -c $< -o $@
RealtimeSync: $(OBJECT_LIST)
- g++ -o ../BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS)
+ $(COMPILER_BIN) -o ../BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS)
clean:
#-f doesn't work when deleting directories
if [ -d ../OBJ/RTS_Release_GCC_Make ]; then rm -rf ../OBJ/RTS_Release_GCC_Make; fi
rm -f ../BUILD/$(APPNAME)
+ rm -f ../wx+/pch.h.gch
install:
mkdir -p $(BINDIR)
diff --git a/RealtimeSync/resource.rc b/RealtimeSync/resource.rc
deleted file mode 100644
index ecf568da..00000000
--- a/RealtimeSync/resource.rc
+++ /dev/null
@@ -1,44 +0,0 @@
-#define IDR_VERSION1 1
-
-#include <Winver.h>
-#include "../version/version.rc"
-
-#define wxUSE_NO_MANIFEST 1 //lame resource compiler requires us to define an integer here
-#include <wx/msw/wx.rc>
-//see comments in FFS resource file on manifests
-
-//MSDN on manifests: http://msdn.microsoft.com/en-us/library/bb756929.aspx
-#define MANIFEST_RESOURCE_ID 1
-#if defined(WX_CPU_AMD64) //check for 64 bit *first*
-MANIFEST_RESOURCE_ID RT_MANIFEST "../amd64.manifest"
-#elif defined(WX_CPU_X86)
-MANIFEST_RESOURCE_ID RT_MANIFEST "../win32.manifest"
-#else
-#error What is going on?
-#endif
-
-
-A_PROGRAM_ICON ICON DISCARDABLE "RealtimeSync.ico"
-
-IDR_VERSION1 VERSIONINFO
-FILEVERSION FREEFILESYNC_VER
-PRODUCTVERSION FREEFILESYNC_VER
-FILEOS VOS__WINDOWS32
-FILETYPE VFT_APP
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "FFFF04B0"
- BEGIN
- VALUE "FileDescription", "Real-time Command Line Launcher\0"
- VALUE "FileVersion", FREEFILESYNC_VER_STR
- VALUE "ProductName", "RealtimeSync\0"
- VALUE "ProductVersion", FREEFILESYNC_VER_STR
- VALUE "LegalCopyright", "Zenju - All Rights Reserved\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0xFFFF, 0x04B0
- END
-END
diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp
index 87bca60f..bde89393 100644
--- a/RealtimeSync/resources.cpp
+++ b/RealtimeSync/resources.cpp
@@ -6,6 +6,7 @@
#include "resources.h"
#include <memory>
+#include <zen/utf.h>
#include <wx/wfstream.h>
#include <wx/zipstrm.h>
#include <wx/image.h>
@@ -23,7 +24,7 @@ const GlobalResources& GlobalResources::instance()
GlobalResources::GlobalResources()
{
- wxFFileInputStream input(toWx(zen::getResourceDir()) + L"Resources.zip");
+ wxFFileInputStream input(utfCvrtTo<wxString>(zen::getResourceDir()) + L"Resources.zip");
if (input.IsOk()) //if not... we don't want to react too harsh here
{
//activate support for .png files
@@ -49,11 +50,11 @@ GlobalResources::GlobalResources()
#ifdef FFS_WIN
//for compatibility it seems we need to stick with a "real" icon
programIcon = wxIcon(L"A_PROGRAM_ICON");
-#else
+
+#elif defined FFS_LINUX || defined FFS_MAC
//use big logo bitmap for better quality
- programIcon.CopyFromBitmap(getImageInt(L"RealtimeSync.png"));
+ programIcon.CopyFromBitmap(getImageInt(L"RealtimeSync"));
#endif
-
}
diff --git a/RealtimeSync/tray_menu.cpp b/RealtimeSync/tray_menu.cpp
index eec568ad..1e9f2ffe 100644
--- a/RealtimeSync/tray_menu.cpp
+++ b/RealtimeSync/tray_menu.cpp
@@ -153,10 +153,10 @@ public:
void showIconActive()
{
wxIcon realtimeIcon;
-#ifdef FFS_WIN
- realtimeIcon.CopyFromBitmap(GlobalResources::getImage(L"RTS_tray_win")); //use a 16x16 bitmap
+#if defined FFS_WIN || defined FFS_MAC //16x16 seems to be the only size that is shown correctly on OS X
+ realtimeIcon.CopyFromBitmap(GlobalResources::getImage(L"RTS_tray_16x16")); //use a 16x16 bitmap
#elif defined FFS_LINUX
- realtimeIcon.CopyFromBitmap(GlobalResources::getImage(L"RTS_tray_linux")); //use a 22x22 bitmap for perfect fit
+ realtimeIcon.CopyFromBitmap(GlobalResources::getImage(L"RTS_tray_24x24")); //use a 24x24 bitmap for perfect fit
#endif
const wxString postFix = jobName_.empty() ? wxString() : (L"\n\"" + jobName_ + L"\"");
trayMenu->SetIcon(realtimeIcon, _("Monitoring active...") + postFix);
@@ -165,10 +165,10 @@ public:
void showIconWaiting()
{
wxIcon realtimeIcon;
-#ifdef FFS_WIN
- realtimeIcon.CopyFromBitmap(greyScale(GlobalResources::getImage(L"RTS_tray_win"))); //use a 16x16 bitmap
+#if defined FFS_WIN || defined FFS_MAC
+ realtimeIcon.CopyFromBitmap(greyScale(GlobalResources::getImage(L"RTS_tray_16x16")));
#elif defined FFS_LINUX
- realtimeIcon.CopyFromBitmap(greyScale(GlobalResources::getImage(L"RTS_tray_linux"))); //use a 22x22 bitmap for perfect fit
+ realtimeIcon.CopyFromBitmap(greyScale(GlobalResources::getImage(L"RTS_tray_24x24")));
#endif
const wxString postFix = jobName_.empty() ? wxString() : (L"\n\"" + jobName_ + L"\"");
trayMenu->SetIcon(realtimeIcon, _("Waiting for missing directories...") + postFix);
diff --git a/RealtimeSync/xml_ffs.cpp b/RealtimeSync/xml_ffs.cpp
index 8126ec05..1f3fb1b1 100644
--- a/RealtimeSync/xml_ffs.cpp
+++ b/RealtimeSync/xml_ffs.cpp
@@ -39,7 +39,7 @@ xmlAccess::XmlRealConfig convertBatchToReal(const xmlAccess::XmlBatchConfig& bat
std::transform(uniqueFolders.begin(), uniqueFolders.end(), std::back_inserter(output.directories),
[](const Zstring & fn) { return toWx(fn); });
- output.commandline = std::wstring(L"\"") + zen::getLauncher() + L"\"" +
+ output.commandline = std::wstring(L"\"") + zen::getFreeFileSyncLauncher() + L"\"" +
L" \"" + filename + L"\"";
return output;
diff --git a/RealtimeSync/xml_proc.cpp b/RealtimeSync/xml_proc.cpp
index a4cd715c..5e645a31 100644
--- a/RealtimeSync/xml_proc.cpp
+++ b/RealtimeSync/xml_proc.cpp
@@ -18,8 +18,8 @@ namespace
void readConfig(const XmlIn& in, XmlRealConfig& config)
{
in["Directories"](config.directories);
- in["Commandline"](config.commandline);
in["Delay" ](config.delay);
+ in["Commandline"](config.commandline);
}
@@ -58,8 +58,8 @@ namespace
void writeConfig(const XmlRealConfig& config, XmlOut& out)
{
out["Directories"](config.directories);
- out["Commandline"](config.commandline);
out["Delay" ](config.delay);
+ out["Commandline"](config.commandline);
}
}
@@ -72,5 +72,5 @@ void xmlAccess::writeRealConfig(const XmlRealConfig& config, const Zstring& file
XmlOut out(doc);
writeConfig(config, out);
- saveXmlDocument(doc, filename); //throw (FfsXmlError)
+ saveXmlDocument(doc, filename); //throw FfsXmlError
}
diff --git a/algorithm.cpp b/algorithm.cpp
index 0c47410a..05b840ff 100644
--- a/algorithm.cpp
+++ b/algorithm.cpp
@@ -1237,7 +1237,7 @@ void categorize(const std::set<FileSystemObject*>& rowsIn,
if (it != hasRecyclerBuffer.end())
return it->second;
return hasRecyclerBuffer.insert(std::make_pair(baseDirPf, recycleBinStatusUpdating(baseDirPf, callback) == STATUS_REC_EXISTS)).first->second;
-#else
+#elif defined FFS_LINUX || defined FFS_MAC
return true;
#endif
};
@@ -1444,14 +1444,13 @@ void zen::deleteFromGridAndHD(const std::vector<FileSystemObject*>& rowsToDelete
if (useRecycleBin &&
std::any_of(hasRecyclerBuffer.begin(), hasRecyclerBuffer.end(), [](std::pair<Zstring, bool> item) { return !item.second; }))
{
- std::wstring warningMessage = _("Recycle Bin is not available for the following paths! Files will be deleted permanently instead:");
- warningMessage += L"\n";
+ std::wstring msg = _("Recycle Bin is not available for the following paths! Files will be deleted permanently instead:") + L"\n";
for (auto it = hasRecyclerBuffer.begin(); it != hasRecyclerBuffer.end(); ++it)
if (!it->second)
- warningMessage += L"\n" + utfCvrtTo<std::wstring>(it->first);
+ msg += std::wstring(L"\n") + it->first;
- statusHandler.reportWarning(warningMessage, warningRecyclerMissing);
+ statusHandler.reportWarning(msg, warningRecyclerMissing);
}
deleteFromGridAndHDOneSide<LEFT_SIDE>(deleteRecylerLeft, true, statusHandler);
diff --git a/comparison.cpp b/comparison.cpp
index 56ec2735..52cfee9f 100644
--- a/comparison.cpp
+++ b/comparison.cpp
@@ -72,99 +72,36 @@ void checkForIncompleteInput(const std::vector<FolderPairCfg>& folderPairsForm,
{
if (havePartialPair == haveFullPair) //error if: all empty or exist both full and partial pairs -> support single-dir scenario
throw FileError(_("A folder input field is empty.") + L" \n\n" +
- _("You can ignore this error to consider the folder as empty."));
+ _("You can ignore this error to consider each folder as empty."));
}, callback);
}
-void determineExistentDirs(const std::set<Zstring, LessFilename>& dirnames,
- std::set<Zstring, LessFilename>& dirnamesExisting,
- bool allowUserInteraction,
- ProcessCallback& callback)
+std::set<Zstring, LessFilename> determineExistentDirs(const std::vector<Zstring>& dirnames,
+ bool allowUserInteraction,
+ ProcessCallback& callback)
{
- std::vector<Zstring> dirs(dirnames.begin(), dirnames.end());
- vector_remove_if(dirs, [](const Zstring& dir) { return dir.empty(); });
+ std::set<Zstring, LessFilename> dirsEx;
-
-
- warn_static("finish")
- /*
- //check existence of all directories in parallel! (avoid adding up search times if multiple network drives are not reachable)
- FixedList<boost::unique_future<bool>> asyncDirChecks;
- std::for_each(dirs.begin(), dirs.end(), [&](const Zstring& dirname)
- {
- asyncDirChecks.emplace_back(async([=]() -> bool
- {
- #ifdef FFS_WIN
- //1. login to network share, if necessary
- loginNetworkShare(dirname, allowUserInteraction);
- #endif
- //2. check dir existence
- return zen::dirExists(dirname);
- }));
- });
-
- auto timeMax = boost::get_system_time() + boost::posix_time::seconds(10); //limit total directory search time
-
- auto iterCheckDir = asyncDirChecks.begin();
- for (auto it = dirs.begin(); it != dirs.end(); ++it, ++iterCheckDir)
+ tryReportingError([&]
{
- const Zstring& dirname = *it;
- callback.reportStatus(replaceCpy(_("Searching for folder %x..."), L"%x", fmtFileName(dirname), false));
-
- while (boost::get_system_time() < timeMax && !iterCheckDir->timed_wait(boost::posix_time::milliseconds(UI_UPDATE_INTERVAL / 2)))
- callback.requestUiRefresh(); //may throw!
+ dirsEx = getExistingDirsUpdating(dirnames, allowUserInteraction, callback); //check *all* directories on each try!
- //only (still) existing files should be included in the list
- if (iterCheckDir->is_ready() && iterCheckDir->get())
- dirnamesExisting.insert(dirname);
- else
- {
+ //get list of not existing directories
+ std::vector<Zstring> dirsMissing = dirnames;
+ vector_remove_if(dirsMissing, [&](const Zstring& dirname) { return dirname.empty() || dirsEx.find(dirname) != dirsEx.end(); });
- switch (callback.reportError(replaceCpy(_("Cannot find folder %x."), L"%x", fmtFileName(dirname)) + L"\n\n" +
- _("You can ignore this error to consider the folder as empty."))) //may throw!
+ if (!dirsMissing.empty())
{
- case ProcessCallback::IGNORE_ERROR:
- break;
- case ProcessCallback::RETRY:
- break; //continue with loop
+ std::wstring msg = _("Cannot find the following folders:") + L"\n";
+ std::for_each(dirsMissing.begin(), dirsMissing.end(),
+ [&](const Zstring& dirname) { msg += std::wstring(L"\n") + dirname; });
+ msg += L"\n\n" + _("You can ignore this error to consider each folder as empty.");
+ throw FileError(msg);
}
+ }, callback);
-
- if (tryReportingError([&]
- {
- if (!dirExistsUpdating(dirname, allowUserInteraction, callback))
- throw FileError();
-
-
-
-
- }, callback))
- dirnamesExisting.insert(dirname);
- }
- }
- */
-
-
-
-
-
-
-
-
-
-
- std::for_each(dirs.begin(), dirs.end(),
- [&](const Zstring& dirname)
- {
- if (tryReportingError([&]
- {
- if (!dirExistsUpdating(dirname, allowUserInteraction, callback))
- throw FileError(replaceCpy(_("Cannot find folder %x."), L"%x", fmtFileName(dirname)) + L"\n\n" +
- _("You can ignore this error to consider the folder as empty."));
- }, callback))
- dirnamesExisting.insert(dirname);
- });
+ return dirsEx;
}
@@ -193,9 +130,9 @@ std::wstring checkFolderDependency(const std::vector<FolderPairCfg>& folderPairs
{
warningMsg = _("Directories are dependent! Be careful when setting up synchronization rules:");
for (auto it = dependentDirs.begin(); it != dependentDirs.end(); ++it)
- warningMsg += L"\n\n" +
- fmtFileName(it->first) + L"\n" +
- fmtFileName(it->second);
+ warningMsg += std::wstring(L"\n\n") +
+ it->first + L"\n" +
+ it->second;
}
return warningMsg;
}
@@ -332,11 +269,27 @@ void zen::compare(size_t fileTimeTolerance,
//specify process and resource handling priorities
std::unique_ptr<ScheduleForBackgroundProcessing> backgroundPrio;
if (runWithBackgroundPriority)
- backgroundPrio = make_unique<ScheduleForBackgroundProcessing>();
+ try
+ {
+ backgroundPrio = make_unique<ScheduleForBackgroundProcessing>(); //throw FileError
+ }
+ catch (const FileError& e)
+ {
+ //not an error in this context
+ callback.reportInfo(e.toString()); //may throw!
+ }
//prevent operating system going into sleep state
- PreventStandby dummy2;
- (void)dummy2;
+ std::unique_ptr<PreventStandby> noStandby;
+ try
+ {
+ noStandby = make_unique<PreventStandby>(); //throw FileError
+ }
+ catch (const FileError& e)
+ {
+ //not an error in this context
+ callback.reportInfo(e.toString()); //may throw!
+ }
//PERF_START;
@@ -354,14 +307,14 @@ void zen::compare(size_t fileTimeTolerance,
//list of directories that are *expected* to be existent (and need to be scanned)!
//directory existence only checked *once* to avoid race conditions!
{
- std::set<Zstring, LessFilename> dirnames;
+ std::vector<Zstring> dirnames;
std::for_each(cfgList.begin(), cfgList.end(),
[&](const FolderPairCfg& fpCfg)
{
- dirnames.insert(fpCfg.leftDirectoryFmt);
- dirnames.insert(fpCfg.rightDirectoryFmt);
+ dirnames.push_back(fpCfg.leftDirectoryFmt);
+ dirnames.push_back(fpCfg.rightDirectoryFmt);
});
- determineExistentDirs(dirnames, dirnamesExisting, allowUserInteraction, callback);
+ dirnamesExisting = determineExistentDirs(dirnames, allowUserInteraction, callback);
}
auto dirAvailable = [&](const Zstring& dirnameFmt) { return dirnamesExisting.find(dirnameFmt) != dirnamesExisting.end(); };
@@ -904,21 +857,21 @@ void ComparisonBuffer::performComparison(const FolderPairCfg& fpCfg,
//PERF_START;
- DirectoryValue emptyDummy;
- auto getDirValue = [&](const Zstring& dirnameFmt) -> const DirectoryValue&
+ auto getDirValue = [&](const Zstring& dirnameFmt) -> const DirectoryValue*
{
auto it = directoryBuffer.find(DirectoryKey(dirnameFmt, fpCfg.filter.nameFilter, fpCfg.handleSymlinks));
- return it == directoryBuffer.end() ? emptyDummy : it->second;
+ return it != directoryBuffer.end() ? &it->second : nullptr;
};
- const DirectoryValue& bufValueLeft = getDirValue(fpCfg.leftDirectoryFmt);
- const DirectoryValue& bufValueRight = getDirValue(fpCfg.rightDirectoryFmt);
+ const DirectoryValue* bufValueLeft = getDirValue(fpCfg.leftDirectoryFmt);
+ const DirectoryValue* bufValueRight = getDirValue(fpCfg.rightDirectoryFmt);
callback_.reportStatus(_("Generating file list..."));
callback_.forceUiRefresh();
//PERF_START;
- MergeSides(undefinedFiles, undefinedLinks).execute(bufValueLeft.dirCont, bufValueRight.dirCont, output);
+ MergeSides(undefinedFiles, undefinedLinks).execute(bufValueLeft ? bufValueLeft ->dirCont : DirContainer(),
+ bufValueRight ? bufValueRight->dirCont : DirContainer(), output);
//PERF_STOP;
//##################### in/exclude rows according to filtering #####################
@@ -932,8 +885,8 @@ void ComparisonBuffer::performComparison(const FolderPairCfg& fpCfg,
//properly handle (user-ignored) traversing errors: just uncheck them, no need to physically delete them (<automatic> mode will be grateful)
std::set<Zstring> failedReads;
- failedReads.insert(bufValueLeft .failedReads.begin(), bufValueLeft .failedReads.end());
- failedReads.insert(bufValueRight.failedReads.begin(), bufValueRight.failedReads.end());
+ if (bufValueLeft ) failedReads.insert(bufValueLeft ->failedReads.begin(), bufValueLeft ->failedReads.end());
+ if (bufValueRight) failedReads.insert(bufValueRight->failedReads.begin(), bufValueRight->failedReads.end());
if (!failedReads.empty())
{
diff --git a/lib/Batch.ico b/lib/Batch.ico
index f742b9a3..d27f35d1 100644
--- a/lib/Batch.ico
+++ b/lib/Batch.ico
Binary files differ
diff --git a/lib/FreeFileSync.ico b/lib/FreeFileSync.ico
index 02925b10..88f656ee 100644
--- a/lib/FreeFileSync.ico
+++ b/lib/FreeFileSync.ico
Binary files differ
diff --git a/lib/ShadowCopy/LockFile.cpp b/lib/ShadowCopy/LockFile.cpp
deleted file mode 100644
index a09e7f94..00000000
--- a/lib/ShadowCopy/LockFile.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// **************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
-// **************************************************************************
-
-
-#include <string>
-#include <iostream>
-#define WIN32_LEAN_AND_MEAN
-#include "windows.h"
-
-int wmain(int argc, wchar_t* argv[])
-{
- if (argc <= 1)
- {
- std::wcout << "Please enter the filename to be locked as %1 parameter!" << "\n\n";
- system("pause");
- return -1;
- }
- std::wstring filename = argv[1];
-
- HANDLE hFile = ::CreateFile(filename.c_str(),
- GENERIC_READ,
- 0, //obtain *exclusive* lock on test file
- nullptr,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- nullptr);
- if (hFile == INVALID_HANDLE_VALUE)
- {
- std::wcout << "Error obtaining exclusive lock on test file: " << filename << "\n\n";
- system("pause");
- return -1;
- }
-
- std::wcout << "File " << filename << " is locked! Press a key to unlock." << "\n\n";
- system("pause");
-
- ::CloseHandle(hFile);
- return 0;
-}
-
diff --git a/lib/ShadowCopy/shadow.cpp b/lib/ShadowCopy/shadow.cpp
index 93026039..65387f3b 100644
--- a/lib/ShadowCopy/shadow.cpp
+++ b/lib/ShadowCopy/shadow.cpp
@@ -151,8 +151,8 @@ shadow::ShadowHandle shadow::createShadowCopy(const wchar_t* volumeName)
{
try
{
- ShadowData result = ::createShadowCopy(volumeName); //shadow handle owned by caller! throw ComError
- return new ShadowData(result); //std::bad_alloc?
+ ShadowData result = ::createShadowCopy(volumeName); //throw ComError
+ return new ShadowData(result); //shadow handle owned by caller! std::bad_alloc?
}
catch (const zen::ComError& e)
{
diff --git a/lib/SyncDB.ico b/lib/SyncDB.ico
index 6fc5d264..9740a338 100644
--- a/lib/SyncDB.ico
+++ b/lib/SyncDB.ico
Binary files differ
diff --git a/lib/Thumbnail/Thumbnail.vcxproj b/lib/Thumbnail/Thumbnail.vcxproj
index 3baa2d61..de9b22ae 100644
--- a/lib/Thumbnail/Thumbnail.vcxproj
+++ b/lib/Thumbnail/Thumbnail.vcxproj
@@ -87,7 +87,7 @@
</BuildLog>
<ClCompile>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;THUMBNAIL_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>FFS_WIN;_DEBUG;_WINDOWS;_USRDLL;THUMBNAIL_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -155,7 +155,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;THUMBNAIL_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>FFS_WIN;NDEBUG;_WINDOWS;_USRDLL;THUMBNAIL_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
@@ -221,20 +221,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\zen\debug_memory_leaks.cpp" />
- <ClCompile Include="dll_main.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- </PrecompiledHeader>
- <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- </PrecompiledHeader>
- <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- </PrecompiledHeader>
- <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- </PrecompiledHeader>
- <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
- </ClCompile>
<ClCompile Include="thumbnail.cpp" />
</ItemGroup>
<ItemGroup>
diff --git a/lib/Thumbnail/thumbnail.cpp b/lib/Thumbnail/thumbnail.cpp
index 0c7162b9..284d1093 100644
--- a/lib/Thumbnail/thumbnail.cpp
+++ b/lib/Thumbnail/thumbnail.cpp
@@ -118,8 +118,13 @@ thumb::HICON thumb::getThumbnail(const wchar_t* filename, int requestedSize) //r
&bmpInfo) == 0) //__out LPVOID lpvObject
return nullptr;
- HBITMAP bitmapMask = ::CreateCompatibleBitmap(::GetDC(nullptr), bmpInfo.bmWidth, bmpInfo.bmHeight);
- if (bitmapMask == 0)
+ HDC hDC = ::GetDC(nullptr);
+ if (!hDC)
+ return nullptr;
+ ZEN_ON_SCOPE_EXIT(::ReleaseDC(nullptr, hDC));
+
+ HBITMAP bitmapMask = ::CreateCompatibleBitmap(hDC, bmpInfo.bmWidth, bmpInfo.bmHeight);
+ if (!bitmapMask)
return nullptr;
ZEN_ON_SCOPE_EXIT(::DeleteObject(bitmapMask));
@@ -156,7 +161,7 @@ thumb::HICON thumb::getIconByIndex(int iconIndex, int shilIconType) //return 0 o
::HICON hIcon = nullptr; //perf: 1,5 ms - the dominant block
{
HRESULT hr = imageList->GetIcon(iconIndex, // [in] int i,
- hasAlpha ? ILD_IMAGE : ILD_NORMAL, // [in] UINT flags,
+ (hasAlpha ? ILD_IMAGE : ILD_NORMAL), // [in] UINT flags,
//ILD_IMAGE -> do not draw mask - fixes glitch with ILD_NORMAL where both mask *and* alpha channel are applied, e.g. for ffs_batch and folder icon
//other flags: http://msdn.microsoft.com/en-us/library/windows/desktop/bb775230(v=vs.85).aspx
&hIcon); // [out] HICON *picon
diff --git a/lib/db_file.cpp b/lib/db_file.cpp
index 7f8da45a..368cf56b 100644
--- a/lib/db_file.cpp
+++ b/lib/db_file.cpp
@@ -44,7 +44,7 @@ Zstring getDBFilename(const BaseDirMapping& baseMap, bool tempfile = false)
//make sure they end with ".ffs_db". These files will be excluded from comparison
#ifdef FFS_WIN
Zstring dbname = Zstring(Zstr("sync")) + (tempfile ? Zstr(".tmp") : Zstr("")) + SYNC_DB_FILE_ENDING;
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
//files beginning with dots are hidden e.g. in Nautilus
Zstring dbname = Zstring(Zstr(".sync")) + (tempfile ? Zstr(".tmp") : Zstr("")) + SYNC_DB_FILE_ENDING;
#endif
@@ -452,7 +452,7 @@ private:
auto it = map.lower_bound(key);
if (it != map.end() && !(map.key_comp()(key, it->first)))
{
-#ifdef FFS_WIN //caveat: key might need to be updated, too, if there is a change in short name case!!!
+#if defined FFS_WIN || defined FFS_MAC //caveat: key might need to be updated, too, if there is a change in short name case!!!
if (it->first != key)
{
map.erase(it); //don't fiddle with decrementing "it"! - you might lose while optimizing pointlessly
@@ -567,7 +567,7 @@ private:
auto insertResult = dbDirs.insert(std::make_pair(key, InSyncDir(InSyncDir::STATUS_IN_SYNC))); //get or create
auto it = insertResult.first;
-#ifdef FFS_WIN //caveat: key might need to be updated, too, if there is a change in short name case!!!
+#if defined FFS_WIN || defined FFS_MAC //caveat: key might need to be updated, too, if there is a change in short name case!!!
const bool alreadyExisting = !insertResult.second;
if (alreadyExisting && it->first != key)
{
@@ -620,7 +620,9 @@ private:
const Zstring& shortName = v.first;
return filter_.passDirFilter(parentRelativeNamePf + shortName, nullptr);
//if directory is not included in "currentDirs", it is either not existing anymore, in which case it should be deleted from database
- //or it was excluded via filter, in which case the database entry should be preserved -> we can't tell and need to preserve the old db entry
+ //or it was excluded via filter, in which case the database entry should be preserved
+ //-> we can't tell and need to preserve the old db entry -> all child db elements are preserved since they are not recursed in the loop above!!!
+ //-> no problem with filter logic of excluding complete directory subtrees, if top folder is excluded directly!
});
}
diff --git a/lib/dir_exist_async.h b/lib/dir_exist_async.h
index 306c9ab9..33af8fa8 100644
--- a/lib/dir_exist_async.h
+++ b/lib/dir_exist_async.h
@@ -9,31 +9,62 @@
#include <zen/thread.h>
#include <zen/file_handling.h>
-#include "process_callback.h"
#include <zen/file_error.h>
+#include "process_callback.h"
#include "resolve_path.h"
-//dir existence checking may hang for non-existent network drives => run asynchronously and update UI!
namespace
{
-bool dirExistsUpdating(const Zstring& dirname, bool allowUserInteraction, ProcessCallback& procCallback)
+//directory existence checking may hang for non-existent network drives => run asynchronously and update UI!
+//- check existence of all directories in parallel! (avoid adding up search times if multiple network drives are not reachable)
+//- add reasonable time-out time!
+std::set<Zstring, LessFilename> getExistingDirsUpdating(const std::vector<Zstring>& dirnames, bool allowUserInteraction, ProcessCallback& procCallback)
{
using namespace zen;
- procCallback.reportStatus(replaceCpy(_("Searching for folder %x..."), L"%x", fmtFileName(dirname), false));
+ std::list<boost::unique_future<bool>> dirEx;
- auto ft = async([=]() -> bool
+ std::for_each(dirnames.begin(), dirnames.end(),
+ [&](const Zstring& dirname)
{
+ dirEx.push_back(zen::async2<bool>([=]() -> bool
+ {
+ if (dirname.empty())
+ return false;
#ifdef FFS_WIN
- //1. login to network share, if necessary
- loginNetworkShare(dirname, allowUserInteraction);
+ //1. login to network share, if necessary
+ loginNetworkShare(dirname, allowUserInteraction);
#endif
- //2. check dir existence
- return zen::dirExists(dirname);
+ //2. check dir existence
+ return dirExists(dirname);
+ }));
});
- while (!ft.timed_wait(boost::posix_time::milliseconds(UI_UPDATE_INTERVAL / 2)))
- procCallback.requestUiRefresh(); //may throw!
- return ft.get();
+
+ std::set<Zstring, LessFilename> output;
+ const boost::system_time endTime = boost::get_system_time() + boost::posix_time::seconds(10); //10 sec should be enough even if Win32 waits much longer
+
+ auto itDirname = dirnames.begin();
+ for (auto it = dirEx.begin(); it != dirEx.end(); ++it, ++itDirname)
+ {
+ procCallback.reportStatus(replaceCpy(_("Searching for folder %x..."), L"%x", fmtFileName(*itDirname), false)); //may throw!
+
+ while (boost::get_system_time() < endTime &&
+ !it->timed_wait(boost::posix_time::milliseconds(UI_UPDATE_INTERVAL / 2)))
+ procCallback.requestUiRefresh(); //may throw!
+
+ if (it->is_ready() && it->get())
+ output.insert(*itDirname);
+ }
+ return output;
+}
+
+
+bool dirExistsUpdating(const Zstring& dirname, bool allowUserInteraction, ProcessCallback& procCallback)
+{
+ std::vector<Zstring> dirnames;
+ dirnames.push_back(dirname);
+ std::set<Zstring, LessFilename> dirsEx = getExistingDirsUpdating(dirnames, allowUserInteraction, procCallback);
+ return dirsEx.find(dirname) != dirsEx.end();
}
}
diff --git a/lib/dir_lock.cpp b/lib/dir_lock.cpp
index 5041b37e..f263d4ac 100644
--- a/lib/dir_lock.cpp
+++ b/lib/dir_lock.cpp
@@ -16,6 +16,7 @@
#include <zen/int64.h>
#include <zen/file_handling.h>
#include <zen/serialize.h>
+#include <zen/optional.h>
#ifdef FFS_WIN
#include <tlhelp32.h>
@@ -24,10 +25,12 @@
#include <Sddl.h> //login sid
#include <Lmcons.h> //UNLEN
-#elif defined FFS_LINUX
-#include <fcntl.h> //::open()
+#elif defined FFS_LINUX || defined FFS_MAC
+#include <fcntl.h> //open()
#include <sys/stat.h> //
-#include <unistd.h>
+#include <unistd.h> //getsid()
+#include <signal.h> //kill()
+#include <pwd.h> //getpwuid_r()
#endif
using namespace zen;
@@ -103,7 +106,7 @@ public:
&bytesWritten, //__out_opt LPDWORD lpNumberOfBytesWritten,
nullptr); //__inout_opt LPOVERLAPPED lpOverlapped
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
const int fileHandle = ::open(lockfilename_.c_str(), O_WRONLY | O_APPEND);
if (fileHandle < 0)
return;
@@ -132,7 +135,7 @@ UInt64 getLockFileSize(const Zstring& filename) //throw FileError, ErrorNotExist
return UInt64(fileInfo.nFileSizeLow, fileInfo.nFileSizeHigh);
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
struct ::stat fileInfo = {};
if (::stat(filename.c_str(), &fileInfo) == 0) //follow symbolic links
return UInt64(fileInfo.st_size);
@@ -159,13 +162,13 @@ Zstring deleteAbandonedLockName(const Zstring& lockfilename) //make sure to NOT
#ifdef FFS_WIN
-std::wstring getLoginSid() //throw FileError
+Zstring getLoginSid() //throw FileError
{
HANDLE hToken = 0;
if (!::OpenProcessToken(::GetCurrentProcess(), //__in HANDLE ProcessHandle,
TOKEN_ALL_ACCESS, //__in DWORD DesiredAccess,
&hToken)) //__out PHANDLE TokenHandle
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted());
+ throw FileError(_("Cannot get process information.") + L" (OpenProcessToken)" + L"\n\n" + getLastErrorFormatted());
ZEN_ON_SCOPE_EXIT(::CloseHandle(hToken));
DWORD bufferSize = 0;
@@ -177,7 +180,7 @@ std::wstring getLoginSid() //throw FileError
&buffer[0], //__out_opt LPVOID TokenInformation,
bufferSize, //__in DWORD TokenInformationLength,
&bufferSize)) //__out PDWORD ReturnLength
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted());
+ throw FileError(_("Cannot get process information.") + L" (GetTokenInformation)" + L"\n\n" + getLastErrorFormatted());
auto groups = reinterpret_cast<const TOKEN_GROUPS*>(&buffer[0]);
@@ -187,67 +190,126 @@ std::wstring getLoginSid() //throw FileError
LPTSTR sidStr = nullptr;
if (!::ConvertSidToStringSid(groups->Groups[i].Sid, //__in PSID Sid,
&sidStr)) //__out LPTSTR *StringSid
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted());
+ throw FileError(_("Cannot get process information.") + L" (ConvertSidToStringSid)" + L"\n\n" + getLastErrorFormatted());
ZEN_ON_SCOPE_EXIT(::LocalFree(sidStr));
return sidStr;
}
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted() + L"(no login found)"); //shouldn't happen
+ throw FileError(_("Cannot get process information.") + L" (no login found)" + L"\n\n" + getLastErrorFormatted()); //shouldn't happen
}
#endif
+#ifdef FFS_WIN
+typedef DWORD ProcessId;
+typedef DWORD SessionId;
+#elif defined FFS_LINUX || defined FFS_MAC
+typedef pid_t ProcessId;
+typedef pid_t SessionId;
+#endif
+
+//return ppid on Windows, sid on Linux/Mac, "no value" if process corresponding to "processId" is not existing
+Opt<SessionId> getSessionId(ProcessId processId) //throw FileError
+{
+#ifdef FFS_WIN
+ //note: ::OpenProcess() is no alternative as it may successfully return for crashed processes! -> remark: "WaitForSingleObject" may identify this case!
+ HANDLE snapshot = ::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, //__in DWORD dwFlags,
+ 0); //__in DWORD th32ProcessID
+ if (snapshot == INVALID_HANDLE_VALUE)
+ throw FileError(_("Cannot get process information.") + L" (CreateToolhelp32Snapshot)" + L"\n\n" + getLastErrorFormatted());
+ ZEN_ON_SCOPE_EXIT(::CloseHandle(snapshot));
+
+ PROCESSENTRY32 processEntry = {};
+ processEntry.dwSize = sizeof(processEntry);
+
+ if (!::Process32First(snapshot, //__in HANDLE hSnapshot,
+ &processEntry)) //__inout LPPROCESSENTRY32 lppe
+ throw FileError(_("Cannot get process information.") + L" (Process32First)" + L"\n\n" + getLastErrorFormatted()); //ERROR_NO_MORE_FILES not possible
+ do
+ {
+ if (processEntry.th32ProcessID == processId) //yes, MSDN says this is the way: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684868(v=vs.85).aspx
+ return processEntry.th32ParentProcessID; //parent id is stable, even if parent process has already terminated!
+ }
+ while (::Process32Next(snapshot, &processEntry));
+ if (::GetLastError() != ERROR_NO_MORE_FILES) //yes, they call it "files"
+ throw FileError(_("Cannot get process information.") + L" (Process32Next)" + L"\n\n" + getLastErrorFormatted());
+
+ return NoValue();
+
+#elif defined FFS_LINUX || defined FFS_MAC
+ if (::kill(processId, 0) != 0) //sig == 0: no signal sent, just existence check
+ return NoValue();
+
+ pid_t procSid = ::getsid(processId); //NOT to be confused with "login session", e.g. not stable on OS X!!!
+ if (procSid == -1)
+ throw FileError(_("Cannot get process information.") + L" (getsid)" + L"\n\n" + getLastErrorFormatted());
+
+ return procSid;
+#endif
+}
+
+
class FromCurrentProcess {}; //tag
struct LockInformation //throw FileError
{
explicit LockInformation(FromCurrentProcess) :
lockId(zen::generateGUID()),
+ sessionId(), //dummy value
#ifdef FFS_WIN
- sessionId(utfCvrtTo<std::string>(getLoginSid())), //throw FileError
processId(::GetCurrentProcessId()) //never fails
{
DWORD bufferSize = 0;
::GetComputerNameEx(ComputerNameDnsFullyQualified, nullptr, &bufferSize); //get required buffer size
std::vector<wchar_t> buffer(bufferSize);
- if (!GetComputerNameEx(ComputerNameDnsFullyQualified, //__in COMPUTER_NAME_FORMAT NameType,
- &buffer[0], //__out LPTSTR lpBuffer,
- &bufferSize)) //__inout LPDWORD lpnSize
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted());
+ if (!::GetComputerNameEx(ComputerNameDnsFullyQualified, //__in COMPUTER_NAME_FORMAT NameType,
+ &buffer[0], //__out LPTSTR lpBuffer,
+ &bufferSize)) //__inout LPDWORD lpnSize
+ throw FileError(_("Cannot get process information.") + L" (GetComputerNameEx)" + L"\n\n" + getLastErrorFormatted());
computerName = "Windows." + utfCvrtTo<std::string>(&buffer[0]);
bufferSize = UNLEN + 1;
buffer.resize(bufferSize);
if (!::GetUserName(&buffer[0], //__out LPTSTR lpBuffer,
&bufferSize)) //__inout LPDWORD lpnSize
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted());
+ throw FileError(_("Cannot get process information.") + L" (GetUserName)" + L"\n\n" + getLastErrorFormatted());
userId = utfCvrtTo<std::string>(&buffer[0]);
- }
-#elif defined FFS_LINUX
+
+#elif defined FFS_LINUX || defined FFS_MAC
processId(::getpid()) //never fails
{
std::vector<char> buffer(10000);
- if (::gethostname(&buffer[0], buffer.size()) != 0)
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted());
+ if (::gethostname(&buffer[0], buffer.size()) != 0)
+ throw FileError(_("Cannot get process information.") + L" (gethostname)" + L"\n\n" + getLastErrorFormatted());
computerName += "Linux."; //distinguish linux/windows lock files
computerName += &buffer[0];
if (::getdomainname(&buffer[0], buffer.size()) != 0)
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted());
+ throw FileError(_("Cannot get process information.") + L" (getdomainname)" + L"\n\n" + getLastErrorFormatted());
computerName += ".";
computerName += &buffer[0];
- uid_t userIdTmp = ::getuid(); //never fails
- userId.assign(reinterpret_cast<const char*>(&userIdTmp), sizeof(userIdTmp));
+ const uid_t userIdNo = ::getuid(); //never fails
+ userId.assign(reinterpret_cast<const char*>(&userIdNo), sizeof(userIdNo));
+
+ //the id alone is not very distinctive, e.g. often 1000 on Ubuntu => add name
+ buffer.resize(std::max<long>(buffer.size(), ::sysconf(_SC_GETPW_R_SIZE_MAX))); //::sysconf may return long(-1)
+ struct passwd buffer2 = {};
+ struct passwd* pwsEntry = nullptr;
+ if (::getpwuid_r(userIdNo, &buffer2, &buffer[0], buffer.size(), &pwsEntry) != 0) //getlogin() is deprecated and not working on Ubuntu at all!!!
+ throw FileError(_("Cannot get process information.") + L" (getpwuid_r)" + L"\n\n" + getLastErrorFormatted());
+ if (!pwsEntry)
+ throw FileError(_("Cannot get process information.") + L" (no login found)" + L"\n\n" + getLastErrorFormatted());
+ userId += pwsEntry->pw_name;
+#endif
- pid_t sessionIdTmp = ::getsid(0); //new after each restart!
- if (sessionIdTmp == -1)
- throw FileError(_("Cannot get process information.") + L"\n\n" + getLastErrorFormatted());
- sessionId.assign(reinterpret_cast<const char*>(&sessionIdTmp), sizeof(sessionIdTmp));
+ Opt<SessionId> sessionIdTmp = getSessionId(processId); //throw FileError
+ if (!sessionIdTmp)
+ throw FileError(_("Cannot get process information.") + L" (getSessionId)" + L"\n\n" + getLastErrorFormatted());
+ sessionId = *sessionIdTmp;
}
-#endif
explicit LockInformation(BinStreamIn& stream) //throw UnexpectedEndOfStreamError
{
@@ -262,8 +324,8 @@ struct LockInformation //throw FileError
lockId = readContainer<std::string>(stream); //
computerName = readContainer<std::string>(stream); //UnexpectedEndOfStreamError
userId = readContainer<std::string>(stream); //
- sessionId = readContainer<std::string>(stream); //
- processId = static_cast<decltype(processId)>(readNumber<std::uint64_t>(stream)); //[!] conversion
+ sessionId = static_cast<SessionId>(readNumber<std::uint64_t>(stream)); //[!] conversion
+ processId = static_cast<ProcessId>(readNumber<std::uint64_t>(stream)); //[!] conversion
}
void toStream(BinStreamOut& stream) const //throw ()
@@ -271,25 +333,25 @@ struct LockInformation //throw FileError
writeArray(stream, LOCK_FORMAT_DESCR, sizeof(LOCK_FORMAT_DESCR));
writeNumber<boost::int32_t>(stream, LOCK_FORMAT_VER);
- assert_static(sizeof(processId) <= sizeof(std::uint64_t)); //ensure portability
+ assert_static(sizeof(processId) <= sizeof(std::uint64_t)); //ensure cross-platform compatibility!
+ assert_static(sizeof(sessionId) <= sizeof(std::uint64_t)); //
writeContainer(stream, lockId);
writeContainer(stream, computerName);
writeContainer(stream, userId);
- writeContainer(stream, sessionId);
+ writeNumber<std::uint64_t>(stream, sessionId);
writeNumber<std::uint64_t>(stream, processId);
}
std::string lockId; //16 byte GUID - a universal identifier for this lock (no matter what the path is, considering symlinks, distributed network, etc.)
+ //identify local computer
std::string computerName; //format: HostName.DomainName
- std::string userId; //non-readable!
- std::string sessionId; //
-#ifdef FFS_WIN
- DWORD processId;
-#elif defined FFS_LINUX
- pid_t processId;
-#endif
+ std::string userId;
+
+ //identify running process
+ SessionId sessionId; //Windows: parent process id; Linux/OS X: session of the process, NOT the user
+ ProcessId processId;
};
@@ -325,71 +387,40 @@ std::string retrieveLockId(const Zstring& lockfilename) //throw FileError, Error
}
-//true: process not available, false: cannot say anything
enum ProcessStatus
{
PROC_STATUS_NOT_RUNNING,
PROC_STATUS_RUNNING,
PROC_STATUS_ITS_US,
- PROC_STATUS_NO_IDEA
+ PROC_STATUS_CANT_TELL
};
+
ProcessStatus getProcessStatus(const LockInformation& lockInfo) //throw FileError
{
const LockInformation localInfo((FromCurrentProcess())); //throw FileError
if (lockInfo.computerName != localInfo.computerName ||
lockInfo.userId != localInfo.userId) //another user may run a session right now!
- return PROC_STATUS_NO_IDEA; //lock owned by different computer in this network
+ return PROC_STATUS_CANT_TELL; //lock owned by different computer in this network
- if (lockInfo.sessionId != localInfo.sessionId)
- return PROC_STATUS_NOT_RUNNING; //different session but same user? there can be only one
-
- if (lockInfo.processId == localInfo.processId) //obscure, but possible: deletion failed or a lock file is "stolen" and put back while the program is running
+ if (lockInfo.sessionId == localInfo.sessionId &&
+ lockInfo.processId == localInfo.processId) //obscure, but possible: deletion failed or a lock file is "stolen" and put back while the program is running
return PROC_STATUS_ITS_US;
-#ifdef FFS_WIN
- //note: ::OpenProcess() is no alternative as it may successfully return for crashed processes! -> remark: "WaitForSingleObject" may identify this case!
- HANDLE snapshot = ::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, //__in DWORD dwFlags,
- 0); //__in DWORD th32ProcessID
- if (snapshot == INVALID_HANDLE_VALUE)
- return PROC_STATUS_NO_IDEA;
- ZEN_ON_SCOPE_EXIT(::CloseHandle(snapshot));
-
- PROCESSENTRY32 processEntry = {};
- processEntry.dwSize = sizeof(processEntry);
-
- if (!::Process32First(snapshot, //__in HANDLE hSnapshot,
- &processEntry)) //__inout LPPROCESSENTRY32 lppe
- return PROC_STATUS_NO_IDEA; //ERROR_NO_MORE_FILES not possible
- do
- {
- if (processEntry.th32ProcessID == lockInfo.processId)
- return PROC_STATUS_RUNNING; //process still running
- }
- while (::Process32Next(snapshot, &processEntry));
- if (::GetLastError() != ERROR_NO_MORE_FILES) //yes, they call it "files"
- return PROC_STATUS_NO_IDEA;
-
+ if (Opt<SessionId> sessionId = getSessionId(lockInfo.processId)) //throw FileError
+ return *sessionId == lockInfo.sessionId ? PROC_STATUS_RUNNING : PROC_STATUS_NOT_RUNNING;
return PROC_STATUS_NOT_RUNNING;
-
-#elif defined FFS_LINUX
- if (lockInfo.processId <= 0 || lockInfo.processId >= 65536)
- return PROC_STATUS_NO_IDEA; //invalid process id
-
- return zen::dirExists("/proc/" + zen::numberTo<Zstring>(lockInfo.processId)) ? PROC_STATUS_RUNNING : PROC_STATUS_NOT_RUNNING;
-#endif
}
const std::int64_t TICKS_PER_SEC = ticksPerSec(); //= 0 on error
-
void waitOnDirLock(const Zstring& lockfilename, DirLockCallback* callback) //throw FileError
{
const std::wstring infoMsg = replaceCpy(_("Waiting while directory is locked (%x)..."), L"%x", fmtFileName(lockfilename));
if (callback)
- callback->reportInfo(infoMsg);
+ callback->reportStatus(infoMsg);
//---------------------------------------------------------------
try
{
@@ -407,7 +438,7 @@ void waitOnDirLock(const Zstring& lockfilename, DirLockCallback* callback) //thr
lockOwnderDead = true;
break;
case PROC_STATUS_RUNNING:
- case PROC_STATUS_NO_IDEA:
+ case PROC_STATUS_CANT_TELL:
break;
}
}
@@ -462,10 +493,10 @@ void waitOnDirLock(const Zstring& lockfilename, DirLockCallback* callback) //thr
{
const int remainingSeconds = std::max<int>(0, DETECT_ABANDONED_INTERVAL - dist(lastLifeSign, getTicks()) / TICKS_PER_SEC);
const std::wstring remSecMsg = replaceCpy(_P("1 sec", "%x sec", remainingSeconds), L"%x", numberTo<std::wstring>(remainingSeconds));
- callback->reportInfo(infoMsg + L" " + remSecMsg);
+ callback->reportStatus(infoMsg + L" " + remSecMsg);
}
else
- callback->reportInfo(infoMsg); //emit a message in any case (might clear other one)
+ callback->reportStatus(infoMsg); //emit a message in any case (might clear other one)
}
}
}
@@ -510,7 +541,7 @@ bool tryLock(const Zstring& lockfilename) //throw FileError
::SetFileAttributes(applyLongPathPrefix(lockfilename).c_str(), FILE_ATTRIBUTE_HIDDEN); //(try to) hide it
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
//O_EXCL contains a race condition on NFS file systems: http://linux.die.net/man/2/open
::umask(0); //important! -> why?
const int fileHandle = ::open(lockfilename.c_str(), O_CREAT | O_WRONLY | O_EXCL, S_IRWXU | S_IRWXG | S_IRWXO);
@@ -538,7 +569,7 @@ bool tryLock(const Zstring& lockfilename) //throw FileError
class DirLock::SharedDirLock
{
public:
- SharedDirLock(const Zstring& lockfilename, DirLockCallback* callback = nullptr) : //throw FileError
+ SharedDirLock(const Zstring& lockfilename, DirLockCallback* callback) : //throw FileError
lockfilename_(lockfilename)
{
while (!::tryLock(lockfilename)) //throw FileError
@@ -560,7 +591,6 @@ private:
SharedDirLock& operator=(const DirLock&);
const Zstring lockfilename_;
-
boost::thread threadObj;
};
@@ -633,6 +663,9 @@ private:
DirLock::DirLock(const Zstring& lockfilename, DirLockCallback* callback) //throw FileError
{
+ if (callback)
+ callback->reportStatus(replaceCpy(_("Creating file %x"), L"%x", fmtFileName(lockfilename)));
+
#ifdef FFS_WIN
const DWORD bufferSize = 10000;
std::vector<wchar_t> volName(bufferSize);
diff --git a/lib/dir_lock.h b/lib/dir_lock.h
index 85b9058e..ec2a431a 100644
--- a/lib/dir_lock.h
+++ b/lib/dir_lock.h
@@ -17,7 +17,7 @@ struct DirLockCallback //while waiting for the lock
{
virtual ~DirLockCallback() {}
virtual void requestUiRefresh() = 0; //allowed to throw exceptions
- virtual void reportInfo(const std::wstring& text) = 0;
+ virtual void reportStatus(const std::wstring& text) = 0;
};
/*
diff --git a/lib/ffs_paths.cpp b/lib/ffs_paths.cpp
new file mode 100644
index 00000000..3a0b557d
--- /dev/null
+++ b/lib/ffs_paths.cpp
@@ -0,0 +1,146 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#include "ffs_paths.h"
+#include <zen/file_handling.h>
+#include <wx/stdpaths.h>
+#include <wx+/string_conv.h>
+
+#ifdef FFS_MAC
+#include <vector>
+#include <zen/scope_guard.h>
+#include <CoreServices/CoreServices.h> //keep in .cpp file to not pollute global namespace! e.g. with UInt64
+#endif
+
+using namespace zen;
+
+
+namespace
+{
+#if defined FFS_WIN || defined FFS_LINUX
+inline
+Zstring getExecutableDir() //directory containing executable WITH path separator at end
+{
+ return appendSeparator(beforeLast(utfCvrtTo<Zstring>(wxStandardPaths::Get().GetExecutablePath()), FILE_NAME_SEPARATOR));
+}
+#endif
+
+#ifdef FFS_WIN
+inline
+Zstring getInstallDir() //root install directory WITH path separator at end
+{
+ return appendSeparator(beforeLast(beforeLast(getExecutableDir(), FILE_NAME_SEPARATOR), FILE_NAME_SEPARATOR));
+}
+#endif
+
+
+#ifdef FFS_WIN
+inline
+bool isPortableVersion() { return !fileExists(getInstallDir() + L"uninstall.exe"); } //this check is a bit lame...
+#elif defined FFS_LINUX
+inline
+bool isPortableVersion() { return !endsWith(getExecutableDir(), "/bin/"); } //this check is a bit lame...
+#endif
+}
+
+
+bool zen::manualProgramUpdateRequired()
+{
+#if defined FFS_WIN || defined FFS_MAC
+ return true;
+#elif defined FFS_LINUX
+ return isPortableVersion(); //locally installed version is updated by system
+#endif
+}
+
+
+Zstring zen::getResourceDir()
+{
+#ifdef FFS_WIN
+ return getInstallDir();
+#elif defined FFS_LINUX
+ if (isPortableVersion())
+ return getExecutableDir();
+ else //use OS' standard paths
+ return appendSeparator(toZ(wxStandardPathsBase::Get().GetResourcesDir()));
+#elif defined FFS_MAC
+ return appendSeparator(toZ(wxStandardPathsBase::Get().GetResourcesDir()));
+#endif
+}
+
+
+Zstring zen::getConfigDir()
+{
+#ifdef FFS_WIN
+ if (isPortableVersion())
+ return getInstallDir();
+#elif defined FFS_LINUX
+ if (isPortableVersion())
+ return getExecutableDir();
+#elif defined FFS_MAC
+ //portable apps do not seem common on OS - fine with me: http://theocacao.com/document.page/319
+#endif
+ //use OS' standard paths
+ Zstring userDirectory = toZ(wxStandardPathsBase::Get().GetUserDataDir());
+
+ if (!dirExists(userDirectory))
+ try
+ {
+ makeDirectory(userDirectory); //throw FileError
+ }
+ catch (const FileError&) {}
+
+ return appendSeparator(userDirectory);
+}
+
+
+//this function is called by RealtimeSync!!!
+Zstring zen::getFreeFileSyncLauncher()
+{
+#ifdef FFS_WIN
+ return getInstallDir() + Zstr("FreeFileSync.exe");
+#elif defined FFS_LINUX
+ return getExecutableDir() + Zstr("FreeFileSync");
+#elif defined FFS_MAC
+ auto CFStringRefToUtf8 = [](const CFStringRef& cfs) -> Zstring
+ {
+ if (cfs)
+ {
+ CFIndex length = ::CFStringGetLength(cfs);
+ if (length > 0)
+ {
+ CFIndex bufferSize = ::CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8);
+ std::vector<char> buffer(bufferSize);
+
+ if (::CFStringGetCString(cfs, &buffer[0], bufferSize, kCFStringEncodingUTF8))
+ return Zstring(&buffer[0]);
+ }
+ }
+ return Zstring();
+ };
+
+ CFURLRef appURL = nullptr;
+ ZEN_ON_SCOPE_EXIT(if (appURL) ::CFRelease(appURL));
+
+ if (::LSFindApplicationForInfo(kLSUnknownCreator, // OSType inCreator,
+ CFSTR("net.SourceForge.FreeFileSync"),//CFStringRef inBundleID,
+ nullptr, //CFStringRef inName,
+ nullptr, //FSRef *outAppRef,
+ &appURL) == noErr) //CFURLRef *outAppURL
+ if (appURL)
+ if (CFURLRef absUrl = ::CFURLCopyAbsoluteURL(appURL))
+ {
+ ZEN_ON_SCOPE_EXIT(::CFRelease(absUrl));
+
+ if (CFStringRef path = ::CFURLCopyFileSystemPath(absUrl, kCFURLPOSIXPathStyle))
+ {
+ ZEN_ON_SCOPE_EXIT(::CFRelease(path));
+ return appendSeparator(CFStringRefToUtf8(path)) + "Contents/MacOS/FreeFileSync";
+ }
+ }
+ return Zstr("./FreeFileSync"); //fallback: at least give some hint...
+#endif
+}
diff --git a/lib/ffs_paths.h b/lib/ffs_paths.h
index 2aef2322..cb0b9c3c 100644
--- a/lib/ffs_paths.h
+++ b/lib/ffs_paths.h
@@ -7,10 +7,7 @@
#ifndef STANDARDPATHS_H_INCLUDED
#define STANDARDPATHS_H_INCLUDED
-#include <wx/stdpaths.h>
#include <zen/zstring.h>
-#include <zen/file_handling.h>
-#include <wx+/string_conv.h>
namespace zen
{
@@ -18,108 +15,11 @@ namespace zen
//global program directories
//------------------------------------------------------------------------------
Zstring getResourceDir(); //resource directory WITH path separator at end
-Zstring getConfigDir(); //config directory WITH path separator at end
+Zstring getConfigDir (); //config directory WITH path separator at end
//------------------------------------------------------------------------------
-Zstring getLauncher(); //full path to application launcher C:\...\FreeFileSync.exe
-bool isPortableVersion();
-
-
-
-
-
-
-
-
-
-
-
-
-
-//---------------- implementation ----------------
-namespace impl
-{
-inline
-const Zstring& getBinaryDir() //directory containing executable WITH path separator at end
-{
- static Zstring instance = beforeLast(utfCvrtTo<Zstring>(wxStandardPaths::Get().GetExecutablePath()), FILE_NAME_SEPARATOR) + Zstring(FILE_NAME_SEPARATOR); //extern linkage!
- return instance;
-}
-
-#ifdef FFS_WIN
-inline
-Zstring getInstallDir() //root install directory WITH path separator at end
-{
- return beforeLast(beforeLast(getBinaryDir(), FILE_NAME_SEPARATOR), FILE_NAME_SEPARATOR) + FILE_NAME_SEPARATOR;
-}
-#endif
-}
-
-
-inline
-bool isPortableVersion()
-{
-#ifdef FFS_WIN
- static const bool isPortable = !fileExists(impl::getInstallDir() + L"uninstall.exe"); //this check is a bit lame...
-
-#elif defined FFS_LINUX
- static const bool isPortable = !endsWith(impl::getBinaryDir(), "/bin/"); //this check is a bit lame...
-#endif
- return isPortable;
-}
-
-
-inline
-Zstring getResourceDir()
-{
-#ifdef FFS_WIN
- return impl::getInstallDir();
-
-#elif defined FFS_LINUX
- if (isPortableVersion())
- return impl::getBinaryDir();
- else //use OS' standard paths
- return appendSeparator(toZ(wxStandardPathsBase::Get().GetResourcesDir()));
-#endif
-}
-
-
-inline
-Zstring getConfigDir()
-{
- if (isPortableVersion())
-#ifdef FFS_WIN
- return impl::getInstallDir();
-#elif defined FFS_LINUX
- //wxString(wxT(".")) + zToWx(FILE_NAME_SEPARATOR) -> don't use current working directory
- //avoid surprises with GlobalSettings.xml being newly created in each working directory
- return impl::getBinaryDir();
-#endif
- else //use OS' standard paths
- {
- Zstring userDirectory = toZ(wxStandardPathsBase::Get().GetUserDataDir());
-
- if (!dirExists(userDirectory))
- try
- {
- makeDirectory(userDirectory); //only top directory needs to be created: no recursion necessary
- }
- catch (const FileError&) {}
-
- return appendSeparator(userDirectory);
- }
-}
-
-
-inline
-Zstring getLauncher()
-{
-#ifdef FFS_WIN
- return impl::getInstallDir() + Zstr("FreeFileSync.exe");
-#elif defined FFS_LINUX
- return impl::getBinaryDir() + Zstr("FreeFileSync");
-#endif
-}
+Zstring getFreeFileSyncLauncher(); //full path to application launcher C:\...\FreeFileSync.exe
+bool manualProgramUpdateRequired();
}
#endif // STANDARDPATHS_H_INCLUDED
diff --git a/lib/hard_filter.cpp b/lib/hard_filter.cpp
index 5664da83..bb94b25d 100644
--- a/lib/hard_filter.cpp
+++ b/lib/hard_filter.cpp
@@ -69,7 +69,7 @@ void addFilterEntry(const Zstring& filtername, std::vector<Zstring>& fileFilter,
{
Zstring filterFormatted = filtername;
-#ifdef FFS_WIN
+#if defined FFS_WIN || defined FFS_MAC
//Windows does NOT distinguish between upper/lower-case
makeUpper(filterFormatted);
#elif defined FFS_LINUX
@@ -289,7 +289,7 @@ NameFilter::NameFilter(const Zstring& includeFilter, const Zstring& excludeFilte
bool NameFilter::passFileFilter(const Zstring& relFilename) const
{
-#ifdef FFS_WIN //Windows does NOT distinguish between upper/lower-case
+#if defined FFS_WIN || defined FFS_MAC //Windows does NOT distinguish between upper/lower-case
Zstring nameFormatted = relFilename;
makeUpper(nameFormatted);
#elif defined FFS_LINUX //Linux DOES distinguish between upper/lower-case
@@ -305,7 +305,7 @@ bool NameFilter::passDirFilter(const Zstring& relDirname, bool* subObjMightMatch
{
assert(!subObjMightMatch || *subObjMightMatch == true); //check correct usage
-#ifdef FFS_WIN //Windows does NOT distinguish between upper/lower-case
+#if defined FFS_WIN || defined FFS_MAC //Windows does NOT distinguish between upper/lower-case
Zstring nameFormatted = relDirname;
makeUpper(nameFormatted);
#elif defined FFS_LINUX //Linux DOES distinguish between upper/lower-case
diff --git a/lib/help_provider.h b/lib/help_provider.h
index 15ae4f60..215b7dac 100644
--- a/lib/help_provider.h
+++ b/lib/help_provider.h
@@ -8,12 +8,14 @@
#define HELPPROVIDER_H_INCLUDED
#include <wx/help.h>
-#include "ffs_paths.h"
#include <zen/zstring.h>
+#include "ffs_paths.h"
namespace zen
{
-void displayHelpEntry(const wxString& section = wxEmptyString); //use '/' as path separator!
+//use '/' as path separator!
+void displayHelpEntry(wxWindow* parent);
+void displayHelpEntry(const wxString& section, wxWindow* parent);
@@ -36,10 +38,10 @@ wxHelpController& getHelpCtrl()
if (!initialized)
{
initialized = true;
- controller.Initialize(toWx(zen::getResourceDir()) +
+ controller.Initialize(utfCvrtTo<wxString>(zen::getResourceDir()) +
#ifdef FFS_WIN
L"FreeFileSync.chm");
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
L"Help/FreeFileSync.hhp");
#endif
}
@@ -48,12 +50,20 @@ wxHelpController& getHelpCtrl()
inline
-void displayHelpEntry(const wxString& section)
+void displayHelpEntry(const wxString& section, wxWindow* parent)
+{
+ getHelpCtrl().SetParentWindow(parent); //this nicely solves modal issues on OSX with help file going to the background
+ getHelpCtrl().DisplaySection(replaceCpy(section, L'/', utfCvrtTo<wxString>(FILE_NAME_SEPARATOR)));
+ getHelpCtrl().SetParentWindow(nullptr);
+}
+
+
+inline
+void displayHelpEntry(wxWindow* parent)
{
- if (section.empty())
- getHelpCtrl().DisplayContents();
- else
- getHelpCtrl().DisplaySection(replaceCpy(section, L'/', utfCvrtTo<std::wstring>(FILE_NAME_SEPARATOR)));
+ getHelpCtrl().SetParentWindow(parent);
+ getHelpCtrl().DisplayContents();
+ getHelpCtrl().SetParentWindow(nullptr);
}
}
diff --git a/lib/icon_buffer.cpp b/lib/icon_buffer.cpp
index 1d391dfc..44440be8 100644
--- a/lib/icon_buffer.cpp
+++ b/lib/icon_buffer.cpp
@@ -21,32 +21,22 @@
using namespace zen;
+warn_static("mac")
+
+#if defined FFS_MAC
+struct IconBuffer::Pimpl {};
+IconBuffer::IconBuffer(IconSize sz): pimpl(), icoSize(sz), genDirIcon(), genFileIcon() {}
+IconBuffer::~IconBuffer() {}
+int IconBuffer::getSize(IconSize icoSize) {return 16; }
+bool IconBuffer::requestFileIcon(const Zstring& filename, wxIcon* icon) { return false; }
+void IconBuffer::setWorkload(const std::vector<Zstring>& load) {}
+#else
+
namespace
{
const size_t BUFFER_SIZE_MAX = 800; //maximum number of icons to buffer
-inline
-int cvrtSize(IconBuffer::IconSize sz) //get size in pixel
-{
- switch (sz)
- {
- case IconBuffer::SIZE_SMALL:
-#ifdef FFS_WIN
- return 16;
-#elif defined FFS_LINUX
- return 24;
-#endif
- case IconBuffer::SIZE_MEDIUM:
- return 48;
- case IconBuffer::SIZE_LARGE:
- return 128;
- }
- assert(false);
- return 0;
-}
-
-
class IconHolder //handle HICON/GdkPixbuf ownership WITHOUT ref-counting to allow thread-safe usage (in contrast to wxIcon)
{
public:
@@ -259,23 +249,22 @@ IconHolder getThumbnail(const Zstring& filename, int requestedSize) //return 0 o
}
-const char* mimeFileIcons[] =
-{
- "application-x-zerosize", //Kubuntu: /usr/share/icons/oxygen/48x48/mimetypes
- "text-x-generic", //http://live.gnome.org/GnomeArt/Tutorials/IconThemes
- "empty", //
- "gtk-file", //Ubuntu: /usr/share/icons/Humanity/mimes/48
- "gnome-fs-regular", //
-};
-
-
IconHolder getGenericFileIcon(IconBuffer::IconSize sz)
{
#ifdef FFS_WIN
return getIconByAttribute(L"dummy", FILE_ATTRIBUTE_NORMAL, sz);
#elif defined FFS_LINUX
- const int requestedSize = cvrtSize(sz);
+ const char* mimeFileIcons[] =
+ {
+ "application-x-zerosize", //Kubuntu: /usr/share/icons/oxygen/48x48/mimetypes
+ "text-x-generic", //http://live.gnome.org/GnomeArt/Tutorials/IconThemes
+ "empty", //
+ "gtk-file", //Ubuntu: /usr/share/icons/Humanity/mimes/48
+ "gnome-fs-regular", //
+ };
+
+ const int requestedSize = IconBuffer::getSize(sz);
if (GtkIconTheme* defaultTheme = gtk_icon_theme_get_default()) //not owned!
for (auto it = std::begin(mimeFileIcons); it != std::end(mimeFileIcons); ++it)
@@ -296,7 +285,7 @@ IconHolder getAssociatedIcon(const Zstring& filename, IconBuffer::IconSize sz)
case IconBuffer::SIZE_MEDIUM:
case IconBuffer::SIZE_LARGE:
{
- IconHolder ico = getThumbnail(filename, cvrtSize(sz));
+ IconHolder ico = getThumbnail(filename, IconBuffer::getSize(sz));
if (ico)
return ico;
//else: fallback to non-thumbnail icon
@@ -314,11 +303,12 @@ IconHolder getAssociatedIcon(const Zstring& filename, IconBuffer::IconSize sz)
//which means the access to get thumbnail failed: thumbnail failure is not dependent from extension in general!
SHFILEINFO fileInfo = {};
- DWORD_PTR imgList = ::SHGetFileInfo(filename.c_str(), //zen::removeLongPathPrefix(fileName), //::SHGetFileInfo() can't handle \\?\-prefix!
- 0,
- &fileInfo,
- sizeof(fileInfo),
- SHGFI_SYSICONINDEX);
+ DWORD_PTR imgList = ::SHGetFileInfo(filename.c_str(), //_In_ LPCTSTR pszPath, -> note: ::SHGetFileInfo() can't handle \\?\-prefix!
+ 0, //DWORD dwFileAttributes,
+ &fileInfo, //_Inout_ SHFILEINFO *psfi,
+ sizeof(fileInfo), //UINT cbFileInfo,
+ SHGFI_SYSICONINDEX); //UINT uFlags
+
//Quote: "The IImageList pointer type, such as that returned in the ppv parameter, can be cast as an HIMAGELIST as
// needed; for example, for use in a list view. Conversely, an HIMAGELIST can be cast as a pointer to an IImageList."
//http://msdn.microsoft.com/en-us/library/windows/desktop/bb762185(v=vs.85).aspx
@@ -328,14 +318,14 @@ IconHolder getAssociatedIcon(const Zstring& filename, IconBuffer::IconSize sz)
//imgList->Release(); //empiric study: crash on XP if we release this! Seems we do not own it... -> also no GDI leak on Win7 -> okay
//another comment on http://msdn.microsoft.com/en-us/library/bb762179(v=VS.85).aspx describes exact same behavior on Win7/XP
- boost::call_once(initGetIconByIndexOnce, [] //thread-safe init
+ boost::call_once(initGetIconByIndexOnce, [] //thread-safe init
{
getIconByIndex = DllFun<thumb::FunType_getIconByIndex>(thumb::getDllName(), thumb::funName_getIconByIndex);
});
return IconHolder(getIconByIndex ? static_cast<HICON>(getIconByIndex(fileInfo.iIcon, getShilIconType(sz))) : nullptr);
#elif defined FFS_LINUX
- const int requestedSize = cvrtSize(sz);
+ const int requestedSize = IconBuffer::getSize(sz);
GFile* file = g_file_new_for_path(filename.c_str()); //never fails
ZEN_ON_SCOPE_EXIT(g_object_unref(file);)
@@ -403,7 +393,6 @@ public:
boost::unique_lock<boost::mutex> dummy(lockFiles);
filesToLoad = newLoad;
}
-
conditionNewFiles.notify_all(); //instead of notify_one(); workaround bug: https://svn.boost.org/trac/boost/ticket/7796
//condition handling, see: http://www.boost.org/doc/libs/1_43_0/doc/html/thread/synchronization.html#thread.synchronization.condvar_ref
}
@@ -428,7 +417,7 @@ public:
auto it = iconMappping.find(fileName);
if (it != iconMappping.end())
{
- if (icon != nullptr)
+ if (icon)
*icon = it->second;
return true;
}
@@ -460,7 +449,7 @@ private:
NameIconMap iconMappping; //use synchronisation when accessing this!
IconDbSequence iconSequence; //save sequence of buffer entry to delete oldest elements
};
-//-------------------------------------------------------------
+
//################################################################################################################################################
class WorkerThread //lifetime is part of icon buffer
@@ -516,8 +505,7 @@ void WorkerThread::operator()() //thread entry
struct IconBuffer::Pimpl
{
- Pimpl() :
- workload(std::make_shared<WorkLoad>()),
+ Pimpl() : workload(std::make_shared<WorkLoad>()),
buffer(std::make_shared<Buffer>()) {}
std::shared_ptr<WorkLoad> workload;
@@ -527,11 +515,10 @@ struct IconBuffer::Pimpl
};
-IconBuffer::IconBuffer(IconSize sz) :
- pimpl(new Pimpl),
+IconBuffer::IconBuffer(IconSize sz) : pimpl(make_unique<Pimpl>()),
icoSize(sz),
- genDirIcon(::getGenericDirectoryIcon(sz).toWxIcon(cvrtSize(icoSize))),
- genFileIcon(::getGenericFileIcon(sz).toWxIcon(cvrtSize(icoSize)))
+ genDirIcon(::getGenericDirectoryIcon(sz).toWxIcon(IconBuffer::getSize(icoSize))),
+ genFileIcon(::getGenericFileIcon(sz).toWxIcon(IconBuffer::getSize(icoSize)))
{
pimpl->worker = boost::thread(WorkerThread(pimpl->workload, pimpl->buffer, sz));
}
@@ -545,9 +532,23 @@ IconBuffer::~IconBuffer()
}
-int IconBuffer::getSize() const
+int IconBuffer::getSize(IconSize icoSize)
{
- return cvrtSize(icoSize);
+ switch (icoSize)
+ {
+ case IconBuffer::SIZE_SMALL:
+#if defined FFS_WIN || defined FFS_MAC
+ return 16;
+#elif defined FFS_LINUX
+ return 24;
+#endif
+ case IconBuffer::SIZE_MEDIUM:
+ return 48;
+ case IconBuffer::SIZE_LARGE:
+ return 128;
+ }
+ assert(false);
+ return 0;
}
@@ -561,7 +562,7 @@ bool IconBuffer::requestFileIcon(const Zstring& filename, wxIcon* icon)
IconHolder heldIcon;
if (!pimpl->buffer->requestFileIcon(entryName, &heldIcon))
return false;
- *icon = heldIcon.toWxIcon(cvrtSize(icoSize));
+ *icon = heldIcon.toWxIcon(IconBuffer::getSize(icoSize));
return true;
};
@@ -577,7 +578,7 @@ bool IconBuffer::requestFileIcon(const Zstring& filename, wxIcon* icon)
IconHolder heldIcon = getAssociatedIconByExt(extension, icoSize); //fast!
pimpl->buffer->insertIntoBuffer(extension, heldIcon);
if (icon)
- *icon = heldIcon.toWxIcon(cvrtSize(icoSize));
+ *icon = heldIcon.toWxIcon(IconBuffer::getSize(icoSize));
}
return true;
}
@@ -588,3 +589,4 @@ bool IconBuffer::requestFileIcon(const Zstring& filename, wxIcon* icon)
}
void IconBuffer::setWorkload(const std::vector<Zstring>& load) { pimpl->workload->setWorkload(load); }
+#endif
diff --git a/lib/icon_buffer.h b/lib/icon_buffer.h
index 75bf54c8..ba34faa2 100644
--- a/lib/icon_buffer.h
+++ b/lib/icon_buffer.h
@@ -8,6 +8,7 @@
#define ICONBUFFER_H_INCLUDED
#include <memory>
+#include <wx/bitmap.h>
#include <wx/icon.h>
#include <zen/zstring.h>
@@ -27,11 +28,12 @@ public:
IconBuffer(IconSize sz);
~IconBuffer();
+ static int getSize(IconSize icoSize); //*maximum* icon size in pixel
+ int getSize() const { return getSize(icoSize); } //
+
const wxIcon& genericFileIcon() { return genFileIcon; }
const wxIcon& genericDirIcon () { return genDirIcon; }
- int getSize() const; //*maximum* icon size in pixel
-
bool requestFileIcon(const Zstring& filename, wxIcon* icon = nullptr); //returns false if icon is not in buffer
void setWorkload(const std::vector<Zstring>& load); //(re-)set new workload of icons to be retrieved;
diff --git a/lib/localization.cpp b/lib/localization.cpp
index 78e03545..33494cf4 100644
--- a/lib/localization.cpp
+++ b/lib/localization.cpp
@@ -20,6 +20,10 @@
#include "parse_lng.h"
#include "ffs_paths.h"
+#ifdef FFS_MAC
+#include <CoreServices/CoreServices.h>
+#endif
+
using namespace zen;
@@ -129,8 +133,8 @@ struct LessTranslation : public std::binary_function<ExistingTranslations::Entry
{
bool operator()(const ExistingTranslations::Entry& lhs, const ExistingTranslations::Entry& rhs) const
{
+ //use a more "natural" sort: ignore case and diacritics
#ifdef FFS_WIN
- //use a more "natural" sort, that is ignore case and diacritics
const int rv = ::CompareString(LOCALE_USER_DEFAULT, //__in LCID Locale,
NORM_IGNORECASE, //__in DWORD dwCmpFlags,
lhs.languageName.c_str(), //__in LPCTSTR lpString1,
@@ -141,8 +145,25 @@ struct LessTranslation : public std::binary_function<ExistingTranslations::Entry
throw std::runtime_error("Error comparing strings!");
else
return rv == CSTR_LESS_THAN; //convert to C-style string compare result
-#else
- return lhs.languageName < rhs.languageName;
+
+#elif defined FFS_LINUX
+ return lhs.languageName.CmpNoCase(rhs.languageName) < 0;
+
+#elif defined FFS_MAC
+ auto allocCFStringRef = [](const wxString& str) -> CFStringRef //output not owned!
+ {
+ return ::CFStringCreateWithCString(nullptr, //CFAllocatorRef alloc,
+ utfCvrtTo<std::string>(str).c_str(), //const char *cStr,
+ kCFStringEncodingUTF8); //CFStringEncoding encoding
+ };
+
+ CFStringRef langL = allocCFStringRef(lhs.languageName);
+ ZEN_ON_SCOPE_EXIT(::CFRelease(langL));
+
+ CFStringRef langR = allocCFStringRef(rhs.languageName);
+ ZEN_ON_SCOPE_EXIT(::CFRelease(langR));
+
+ return::CFStringCompare(langL, langR, kCFCompareLocalized | kCFCompareCaseInsensitive) == kCFCompareLessThan; //no-fail
#endif
}
};
@@ -405,7 +426,7 @@ void zen::setLanguage(int language) //throw FileError
catch (lngfile::ParsingError& e)
{
throw FileError(replaceCpy(replaceCpy(replaceCpy(_("Error parsing file %x, row %y, column %z."),
- L"%x", fmtFileName(toZ(languageFile))),
+ L"%x", fmtFileName(utfCvrtTo<Zstring>(languageFile))),
L"%y", numberTo<std::wstring>(e.row + 1)),
L"%z", numberTo<std::wstring>(e.col + 1)));
}
diff --git a/lib/lock_holder.h b/lib/lock_holder.h
index d4fe27a9..9cde59a7 100644
--- a/lib/lock_holder.h
+++ b/lib/lock_holder.h
@@ -18,20 +18,14 @@ class LockHolder
public:
LockHolder(const std::vector<Zstring>& dirnamesFmt, //resolved dirname ending with path separator
ProcessCallback& procCallback,
- bool allowUserInteraction) : allowUserInteraction_(allowUserInteraction)
+ bool allowUserInteraction)
{
- std::vector<Zstring> dirs = dirnamesFmt;
- vector_remove_if(dirs, [](const Zstring& dir) { return dir.empty(); });
+ std::set<Zstring, LessFilename> existingDirs = getExistingDirsUpdating(dirnamesFmt, allowUserInteraction, procCallback);
- for (auto it = dirs.begin(); it != dirs.end(); ++it)
+ for (auto it = existingDirs.begin(); it != existingDirs.end(); ++it)
{
const Zstring& dirnameFmt = *it;
- if (!dirExistsUpdating(dirnameFmt, allowUserInteraction_, procCallback))
- continue;
-
- if (lockHolder.find(dirnameFmt) != lockHolder.end())
- continue;
assert(endsWith(dirnameFmt, FILE_NAME_SEPARATOR)); //this is really the contract, formatting does other things as well, e.g. macro substitution
class WaitOnLockHandler : public DirLockCallback
@@ -39,7 +33,7 @@ public:
public:
WaitOnLockHandler(ProcessCallback& pc) : pc_(pc) {}
virtual void requestUiRefresh() { pc_.requestUiRefresh(); } //allowed to throw exceptions
- virtual void reportInfo(const std::wstring& text) { pc_.reportStatus(text); }
+ virtual void reportStatus(const std::wstring& text) { pc_.reportStatus(text); }
private:
ProcessCallback& pc_;
} callback(procCallback);
@@ -47,8 +41,7 @@ public:
try
{
//lock file creation is synchronous and may block noticeably for very slow devices (usb sticks, mapped cloud storages)
- procCallback.forceUiRefresh(); //=> make sure the right folder name is shown on GUI during this time!
- lockHolder.insert(std::make_pair(dirnameFmt, DirLock(dirnameFmt + Zstr("sync") + LOCK_FILE_ENDING, &callback)));
+ lockHolder.push_back(DirLock(dirnameFmt + Zstr("sync") + LOCK_FILE_ENDING, &callback)); //throw FileError
}
catch (const FileError& e)
{
@@ -59,9 +52,7 @@ public:
}
private:
- typedef std::map<Zstring, DirLock, LessFilename> DirnameLockMap;
- DirnameLockMap lockHolder;
- const bool allowUserInteraction_;
+ std::vector<DirLock> lockHolder;
};
}
diff --git a/lib/parallel_scan.cpp b/lib/parallel_scan.cpp
index 94f6b0f4..37dd350e 100644
--- a/lib/parallel_scan.cpp
+++ b/lib/parallel_scan.cpp
@@ -13,11 +13,11 @@
#include <zen/thread.h> //includes <boost/thread.hpp>
#include <zen/scope_guard.h>
#include <zen/fixed_list.h>
+#include <boost/detail/atomic_count.hpp>
using namespace zen;
-
namespace
{
/*
@@ -111,8 +111,6 @@ DiskInfo retrieveDiskInfo(const Zstring& pathName)
return output;
}
-
-#elif defined FFS_LINUX
#endif
*/
@@ -195,16 +193,16 @@ public:
if (!errorMsg.empty() && !errorResponse.get())
{
FillBufferCallback::HandleError rv = callback.reportError(copyStringTo<std::wstring>(errorMsg)); //throw!
- errorResponse.reset(new FillBufferCallback::HandleError(rv));
+ errorResponse = make_unique<FillBufferCallback::HandleError>(rv);
dummy.unlock(); //optimization for condition_variable::notify_one()
conditionGotResponse.notify_all(); //instead of notify_one(); workaround bug: https://svn.boost.org/trac/boost/ticket/7796
}
}
- void setNotifyingThread(size_t threadID) { notifyingThreadID = threadID; } //context of main thread
+ void incrementNotifyingThreadId() { ++notifyingThreadID; } //context of main thread
- void reportCurrentFile(const Zstring& filename, size_t threadID) //context of worker thread
+ void reportCurrentFile(const Zstring& filename, long threadID) //context of worker thread
{
if (threadID != notifyingThreadID) return; //only one thread at a time may report status
@@ -213,7 +211,7 @@ public:
currentStatus.clear();
}
- void reportCurrentStatus(const std::wstring& status, size_t threadID) //context of worker thread
+ void reportCurrentStatus(const std::wstring& status, long threadID) //context of worker thread
{
if (threadID != notifyingThreadID) return; //only one thread may report status
@@ -264,7 +262,7 @@ private:
std::unique_ptr<FillBufferCallback::HandleError> errorResponse;
//---- status updates ----
- volatile size_t notifyingThreadID; //theoretically racy, but there is nothing that could go wrong...
+ boost::detail::atomic_count notifyingThreadID;
//CAVEAT: do NOT use boost::thread::id as long as this showstopper exists: https://svn.boost.org/trac/boost/ticket/5754
boost::mutex lockCurrentStatus; //use a different lock for current file: continue traversing while some thread may process an error
Zstring currentFile; //only one of these two is filled at a time!
@@ -282,7 +280,7 @@ private:
struct TraverserShared
{
public:
- TraverserShared(size_t threadID,
+ TraverserShared(long threadID,
SymLinkHandling handleSymlinks,
const HardFilter::FilterRef& filter,
std::set<Zstring>& failedReads,
@@ -299,7 +297,7 @@ public:
std::set<Zstring>& failedReads_; //relative postfixed names of directories that could not be read (empty for root)
AsyncCallback& acb_;
- size_t threadID_;
+ long threadID_;
};
@@ -445,7 +443,7 @@ DirCallback::HandleError DirCallback::onError(const std::wstring& msg)
class DstHackCallbackImpl : public DstHackCallback
{
public:
- DstHackCallbackImpl(AsyncCallback& acb, size_t threadID) :
+ DstHackCallbackImpl(AsyncCallback& acb, long threadID) :
acb_(acb),
threadID_(threadID),
textApplyingDstHack(replaceCpy(_("Encoding extended time information: %x"), L"%x", L"\n%x")) {}
@@ -457,7 +455,7 @@ private:
}
AsyncCallback& acb_;
- size_t threadID_;
+ long threadID_;
const std::wstring textApplyingDstHack;
};
#endif
@@ -467,7 +465,7 @@ private:
class WorkerThread
{
public:
- WorkerThread(size_t threadID,
+ WorkerThread(long threadID,
const std::shared_ptr<AsyncCallback>& acb,
const DirectoryKey& dirKey,
DirectoryValue& dirOutput) :
@@ -504,7 +502,7 @@ public:
}
private:
- size_t threadID_;
+ long threadID_;
std::shared_ptr<AsyncCallback> acb_;
const DirectoryKey dirKey_;
DirectoryValue& dirOutput_;
@@ -531,7 +529,7 @@ void zen::fillBuffer(const std::set<DirectoryKey>& keysToRead, //in
});
});
- std::shared_ptr<AsyncCallback> acb = std::make_shared<AsyncCallback>();
+ auto acb = std::make_shared<AsyncCallback>();
//init worker threads
std::for_each(keysToRead.begin(), keysToRead.end(),
@@ -540,18 +538,15 @@ void zen::fillBuffer(const std::set<DirectoryKey>& keysToRead, //in
assert(buf.find(key) == buf.end());
DirectoryValue& dirOutput = buf[key];
- const size_t threadId = worker.size();
+ const long threadId = static_cast<long>(worker.size());
worker.emplace_back(WorkerThread(threadId, acb, key, dirOutput));
});
//wait until done
- size_t threadId = 0;
- for (auto it = worker.begin(); it != worker.end(); ++it, ++threadId)
+ for (auto it = worker.begin(); it != worker.end(); ++it)
{
boost::thread& wt = *it;
- acb->setNotifyingThread(threadId); //process info messages of first (active) thread only
-
do
{
//update status
@@ -561,6 +556,8 @@ void zen::fillBuffer(const std::set<DirectoryKey>& keysToRead, //in
acb->processErrors(callback);
}
while (!wt.timed_join(boost::posix_time::milliseconds(updateInterval)));
+
+ acb->incrementNotifyingThreadId(); //process info messages of one thread at a time only
}
guardWorker.dismiss();
diff --git a/lib/perf_check.cpp b/lib/perf_check.cpp
index 85a98910..33361201 100644
--- a/lib/perf_check.cpp
+++ b/lib/perf_check.cpp
@@ -49,57 +49,54 @@ void PerfCheck::addSample(int objectsCurrent, double dataCurrent, long timeMs)
//remove all records earlier than "now - windowMax"
const long newBegin = timeMs - windowMax;
- auto iterWindowBegin = samples.upper_bound(newBegin);
- if (iterWindowBegin != samples.begin())
- samples.erase(samples.begin(), --iterWindowBegin); //keep one point before newBegin in order to handle "measurement holes"
+ auto it = samples.upper_bound(newBegin);
+ if (it != samples.begin())
+ samples.erase(samples.begin(), --it); //keep one point before newBegin in order to handle "measurement holes"
}
-wxString PerfCheck::getRemainingTime(double dataRemaining) const
+std::wstring PerfCheck::getRemainingTime(double dataRemaining) const
{
if (!samples.empty())
{
const auto& recordBack = *samples.rbegin();
//find start of records "window"
- auto iterFront = samples.upper_bound(recordBack.first - windowSizeRemTime);
- if (iterFront != samples.begin())
- --iterFront; //one point before window begin in order to handle "measurement holes"
+ auto itFront = samples.upper_bound(recordBack.first - windowSizeRemTime);
+ if (itFront != samples.begin())
+ --itFront; //one point before window begin in order to handle "measurement holes"
- const auto& recordFront = *iterFront;
+ const auto& recordFront = *itFront;
//-----------------------------------------------------------------------------------------------
- const double timeDelta = recordBack.first - recordFront.first;
+ const long timeDelta = recordBack.first - recordFront.first;
const double dataDelta = recordBack.second.data_ - recordFront.second.data_;
- //objects do *NOT* correspond to disk accesses, so we better play safe and use "bytes" only!
- //https://sourceforge.net/tracker/index.php?func=detail&aid=3452469&group_id=234430&atid=1093083
+ //objects model logical operations *NOT* disk accesses, so we better play safe and use "bytes" only!
+ //http://sourceforge.net/p/freefilesync/feature-requests/197/
if (!numeric::isNull(dataDelta)) //sign(dataRemaining) != sign(dataDelta) usually an error, so show it!
- {
- const double remTimeSec = dataRemaining * timeDelta / (1000.0 * dataDelta);
- return remainingTimeToShortString(remTimeSec);
- }
+ return remainingTimeToString(dataRemaining * timeDelta / (1000.0 * dataDelta));
}
return L"-"; //fallback
}
-wxString PerfCheck::getBytesPerSecond() const
+std::wstring PerfCheck::getBytesPerSecond() const
{
if (!samples.empty())
{
const auto& recordBack = *samples.rbegin();
//find start of records "window"
- auto iterFront = samples.upper_bound(recordBack.first - windowSizeBPS);
- if (iterFront != samples.begin())
- --iterFront; //one point before window begin in order to handle "measurement holes"
+ auto itFront = samples.upper_bound(recordBack.first - windowSizeBPS);
+ if (itFront != samples.begin())
+ --itFront; //one point before window begin in order to handle "measurement holes"
- const auto& recordFront = *iterFront;
+ const auto& recordFront = *itFront;
//-----------------------------------------------------------------------------------------------
- const double timeDelta = recordBack.first - recordFront.first;
+ const long timeDelta = recordBack.first - recordFront.first;
const double dataDelta = recordBack.second.data_ - recordFront.second.data_;
- if (!numeric::isNull(timeDelta) && dataDelta > 0)
- return filesizeToShortString(zen::Int64(dataDelta * 1000 / timeDelta)) + _("/sec");
+ if (timeDelta != 0 && dataDelta > 0)
+ return filesizeToShortString(zen::Int64(dataDelta * 1000 / timeDelta)) + _("/sec");
}
return L"-"; //fallback
}
diff --git a/lib/perf_check.h b/lib/perf_check.h
index f314f842..3e04b778 100644
--- a/lib/perf_check.h
+++ b/lib/perf_check.h
@@ -8,7 +8,7 @@
#define STATISTICS_H_INCLUDED
#include <map>
-#include <wx/string.h>
+#include <string>
class PerfCheck
{
@@ -19,8 +19,8 @@ public:
void addSample(int objectsCurrent, double dataCurrent, long timeMs); //timeMs must be ascending!
- wxString getRemainingTime(double dataRemaining) const;
- wxString getBytesPerSecond() const; //for window
+ std::wstring getRemainingTime(double dataRemaining) const;
+ std::wstring getBytesPerSecond() const; //for window
private:
const long windowSizeRemTime; //unit: [ms]
diff --git a/lib/process_xml.cpp b/lib/process_xml.cpp
index e38749f9..0c5b5581 100644
--- a/lib/process_xml.cpp
+++ b/lib/process_xml.cpp
@@ -75,7 +75,7 @@ void setXmlType(XmlDoc& doc, XmlType type) //throw()
wxString xmlAccess::getGlobalConfigFile()
{
- return toWx(zen::getConfigDir()) + L"GlobalSettings.xml";
+ return utfCvrtTo<wxString>(zen::getConfigDir()) + L"GlobalSettings.xml";
}
@@ -1177,7 +1177,7 @@ void xmlAccess::readConfig(const Zstring& filename, xmlAccess::XmlBatchConfig& c
void xmlAccess::readConfig(xmlAccess::XmlGlobalSettings& config)
{
- ::readConfig(toZ(getGlobalConfigFile()), XML_TYPE_GLOBAL, config);
+ ::readConfig(utfCvrtTo<Zstring>(getGlobalConfigFile()), XML_TYPE_GLOBAL, config);
}
@@ -1448,7 +1448,7 @@ void xmlAccess::writeConfig(const XmlBatchConfig& config, const Zstring& filenam
void xmlAccess::writeConfig(const XmlGlobalSettings& config)
{
- ::writeConfig(config, XML_TYPE_GLOBAL, toZ(getGlobalConfigFile())); //throw FfsXmlError
+ ::writeConfig(config, XML_TYPE_GLOBAL, utfCvrtTo<Zstring>(getGlobalConfigFile())); //throw FfsXmlError
}
diff --git a/lib/process_xml.h b/lib/process_xml.h
index d0396d6e..9dda330e 100644
--- a/lib/process_xml.h
+++ b/lib/process_xml.h
@@ -175,7 +175,7 @@ struct XmlGlobalSettings
onCompletionHistoryMax(8),
//deleteOnBothSides(false),
useRecyclerForManualDeletion(true), //enable if OS supports it; else user will have to activate first and then get an error message
-#ifdef FFS_WIN
+#if defined FFS_WIN || defined FFS_MAC
textSearchRespectCase(false),
#elif defined FFS_LINUX
textSearchRespectCase(true),
@@ -186,15 +186,17 @@ struct XmlGlobalSettings
{
//default external apps will be translated "on the fly"!!! First entry will be used for [Enter] or mouse double-click!
#ifdef FFS_WIN
- externelApplications.push_back(std::make_pair(L"Show in Explorer", //mark for extraction: _("Show in Explorer")
- L"explorer /select, \"%item_path%\""));
- externelApplications.push_back(std::make_pair(L"Open with default application", //mark for extraction: _("Open with default application")
- L"\"%item_path%\""));
+ externelApplications.push_back(std::make_pair(L"Show in Explorer", L"explorer /select, \"%item_path%\""));
+ externelApplications.push_back(std::make_pair(L"Open with default application", L"\"%item_path%\""));
+ //mark for extraction: _("Show in Explorer")
+ //mark for extraction: _("Open with default application")
#elif defined FFS_LINUX
- externelApplications.push_back(std::make_pair(L"Browse directory", //mark for extraction: _("Browse directory") Linux doesn't use the term "folder"
- L"xdg-open \"%item_folder%\""));
- externelApplications.push_back(std::make_pair(L"Open with default application", //mark for extraction: _("Open with default application")
- L"xdg-open \"%item_path%\""));
+ externelApplications.push_back(std::make_pair(L"Browse directory", L"xdg-open \"%item_folder%\""));
+ externelApplications.push_back(std::make_pair(L"Open with default application", L"xdg-open \"%item_path%\""));
+ //mark for extraction: _("Browse directory") Linux doesn't use the term "folder"
+#elif defined FFS_MAC
+ externelApplications.push_back(std::make_pair(L"Browse directory", L"open -R \"%item_path%\""));
+ externelApplications.push_back(std::make_pair(L"Open with default application", L"open \"%item_path%\""));
#endif
}
diff --git a/lib/resolve_path.cpp b/lib/resolve_path.cpp
index 9c690c9a..b735d1f9 100644
--- a/lib/resolve_path.cpp
+++ b/lib/resolve_path.cpp
@@ -1,25 +1,21 @@
#include "resolve_path.h"
+#include <set> //not necessarily included by <map>!
#include <map>
-#include <set>
#include <zen/time.h>
-#include <zen/scope_guard.h>
#include <zen/thread.h>
-#include <wx/utils.h>
-#include <wx+/string_conv.h>
+#include <zen/utf.h>
+#include <wx/utils.h> //wxGetEnv
#ifdef FFS_WIN
-#include <zen/dll.h>
-#include <Shlobj.h>
#include <zen/win.h> //includes "windows.h"
+#include <Shlobj.h>
#include <zen/long_path_prefix.h>
#include <zen/file_handling.h>
#ifdef _MSC_VER
#pragma comment(lib, "Mpr.lib")
#endif
-#elif defined FFS_LINUX
-#include <zen/file_traverser.h>
-#include <unistd.h>
+#elif defined FFS_LINUX || defined FFS_MAC
#include <stdlib.h> //getenv()
#endif
@@ -44,7 +40,7 @@ Zstring resolveRelativePath(const Zstring& relativeName) //note: ::GetFullPathNa
return removeLongPathPrefix(Zstring(&buffer[0], charsWritten)); //GetFullPathName() preserves long path prefix -> a low-level detail we don't want to leak out!
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
Zstring resolveRelativePath(const Zstring& relativeName)
{
//http://linux.die.net/man/2/path_resolution
@@ -70,21 +66,12 @@ Zstring resolveRelativePath(const Zstring& relativeName)
return homeDir;
}
- //unfortunately ::realpath only resolves *existing* relative paths, so we need to do it by ourselves
+ //we cannot use ::realpath() since it resolves *existing* relative paths only!
std::vector<char> buffer(10000);
if (::getcwd(&buffer[0], buffer.size()) != nullptr)
return appendSeparator(&buffer[0]) + relativeName;
}
return relativeName;
-
- /*
- char* absPath = ::realpath(relativeName.c_str(), nullptr);
- if (!absPath)
- return relativeName; //ERROR! Don't do anything
- ZEN_ON_SCOPE_EXIT(::free(absPath));
-
- return Zstring(absPath);
- */
}
#endif
@@ -288,33 +275,10 @@ Zstring zen::expandMacros(const Zstring& text) { return ::expandMacros(text, std
namespace
{
-#ifdef FFS_LINUX
-class TraverseMedia : public zen::TraverseCallback
-{
-public:
- typedef std::map<Zstring, Zstring> DeviceList; //device name -> device path mapping
-
- TraverseMedia(DeviceList& devices) : devices_(devices) {}
-
- virtual void onFile(const Zchar* shortName, const Zstring& fullName, const FileInfo& details) {}
- virtual HandleLink onSymlink(const Zchar* shortName, const Zstring& fullName, const SymlinkInfo& details) { return LINK_SKIP; }
- virtual std::shared_ptr<TraverseCallback> onDir(const Zchar* shortName, const Zstring& fullName)
- {
- devices_.insert(std::make_pair(shortName, fullName));
- return nullptr; //DON'T traverse into subdirs
- }
- virtual HandleError onError(const std::wstring& msg) { assert(false); return ON_ERROR_IGNORE; }
-
-private:
- DeviceList& devices_;
-};
-#endif
-
-
+#ifdef FFS_WIN
//networks and cdrom excluded - this should not block
Zstring getPathByVolumenName(const Zstring& volumeName) //return empty string on error
{
-#ifdef FFS_WIN
//FindFirstVolume(): traverses volumes on local hard disks only!
//GetLogicalDriveStrings(): traverses all *logical* volumes, including CD-ROM, FreeOTFE virtual volumes
@@ -335,8 +299,7 @@ Zstring getPathByVolumenName(const Zstring& volumeName) //return empty string on
findFirstMatch.addJob([path, volumeName]() -> std::unique_ptr<Zstring>
{
UINT type = ::GetDriveType(path.c_str()); //non-blocking call!
- if (type == DRIVE_REMOTE ||
- type == DRIVE_CDROM)
+ if (type == DRIVE_REMOTE || type == DRIVE_CDROM)
return nullptr;
//next call seriously blocks for non-existing network drives!
@@ -359,29 +322,15 @@ Zstring getPathByVolumenName(const Zstring& volumeName) //return empty string on
return *result;
}
-#elif defined FFS_LINUX
- //due to the naming convention on Linux /media/<volume name> this function is not that useful, but...
-
- TraverseMedia::DeviceList deviceList;
-
- TraverseMedia traverser(deviceList);
- traverseFolder("/media", traverser); //traverse one level
-
- TraverseMedia::DeviceList::const_iterator it = deviceList.find(volumeName);
- if (it != deviceList.end())
- return it->second;
-#endif
return Zstring();
}
-#ifdef FFS_WIN
//networks and cdrom excluded - this should not block
Zstring getVolumeName(const Zstring& volumePath) //return empty string on error
{
UINT rv = ::GetDriveType(volumePath.c_str()); //non-blocking call!
- if (rv != DRIVE_REMOTE &&
- rv != DRIVE_CDROM)
+ if (rv != DRIVE_REMOTE && rv != DRIVE_CDROM)
{
std::vector<wchar_t> buffer(MAX_PATH + 1);
if (::GetVolumeInformation(volumePath.c_str(), //__in_opt LPCTSTR lpRootPathName,
@@ -420,7 +369,7 @@ Zstring expandVolumeName(const Zstring& text) // [volname]:\folder [volna
rest = afterFirst(rest, Zstr(':'));
if (startsWith(rest, FILE_NAME_SEPARATOR))
rest = afterFirst(rest, FILE_NAME_SEPARATOR);
-
+#ifdef FFS_WIN
//[.*] pattern was found...
if (!volname.empty())
{
@@ -435,11 +384,10 @@ Zstring expandVolumeName(const Zstring& text) // [volname]:\folder [volna
?:\[FFS USB]\FreeFileSync\ - Windows
/.../[FFS USB]/FreeFileSync/ - Linux
instead of:
- C:\Program Files\FreeFileSync\[FFS USB]\FreeFileSync\
- */
-#ifdef FFS_WIN
+ C:\Program Files\FreeFileSync\[FFS USB]\FreeFileSync\ */
return L"?:\\[" + volname + L"]\\" + rest;
-#elif defined FFS_LINUX
+
+#elif defined FFS_LINUX || defined FFS_MAC //neither supported nor needed
return "/.../[" + volname + "]/" + rest;
#endif
}
@@ -500,13 +448,13 @@ void getDirectoryAliasesRecursive(const Zstring& dirname, std::set<Zstring, Less
const auto& csidlMap = CsidlConstants::get();
envToDir.insert(csidlMap.begin(), csidlMap.end());
-#elif defined FFS_LINUX
- addEnvVar("HOME"); // /home/zenju
+#elif defined FFS_LINUX || defined FFS_MAC
+ addEnvVar("HOME"); //Linux: /home/zenju Mac: /Users/zenju
#endif
//substitute paths by symbolic names
auto pathStartsWith = [](const Zstring& path, const Zstring& prefix) -> bool
{
-#ifdef FFS_WIN
+#if defined FFS_WIN || defined FFS_MAC
Zstring tmp = path;
Zstring tmp2 = prefix;
::makeUpper(tmp);
diff --git a/lib/resources.cpp b/lib/resources.cpp
index 2f7daeaf..8a021475 100644
--- a/lib/resources.cpp
+++ b/lib/resources.cpp
@@ -10,6 +10,7 @@
#include <wx/zipstrm.h>
#include <wx/image.h>
#include <wx/mstream.h>
+#include <zen/utf.h>
#include "ffs_paths.h"
using namespace zen;
@@ -45,7 +46,7 @@ void loadAnimFromZip(wxZipInputStream& zipInput, wxAnimation& anim)
GlobalResources::GlobalResources()
{
- wxFFileInputStream input(toWx(zen::getResourceDir()) + L"Resources.zip");
+ wxFFileInputStream input(utfCvrtTo<wxString>(zen::getResourceDir()) + L"Resources.zip");
if (input.IsOk()) //if not... we don't want to react too harsh here
{
//activate support for .png files
@@ -57,7 +58,7 @@ GlobalResources::GlobalResources()
while (true)
{
std::unique_ptr<wxZipEntry> entry(resourceFile.GetNextEntry()); //take ownership!
- if (entry.get() == nullptr)
+ if (!entry)
break;
const wxString name = entry->GetName();
@@ -75,9 +76,10 @@ GlobalResources::GlobalResources()
#ifdef FFS_WIN
//for compatibility it seems we need to stick with a "real" icon
programIcon = wxIcon(L"A_PROGRAM_ICON");
-#else
+
+#elif defined FFS_LINUX || defined FFS_MAC
//use big logo bitmap for better quality
- programIcon.CopyFromBitmap(getImageInt(L"FreeFileSync.png"));
+ programIcon.CopyFromBitmap(getImageInt(L"FreeFileSync"));
//attention: this is the reason we need a member getImage -> it must not implicitly create static object instance!!!
//erroneously calling static object constructor twice will deadlock on Linux!!
#endif
diff --git a/lib/shadow.cpp b/lib/shadow.cpp
index 6dae97b1..52b40a9e 100644
--- a/lib/shadow.cpp
+++ b/lib/shadow.cpp
@@ -38,7 +38,7 @@ bool runningWOW64() //test if process is running under WOW64 (reference http://m
class ShadowCopy::ShadowVolume
{
public:
- ShadowVolume(const Zstring& volumeNamePf) : //throw(FileError)
+ ShadowVolume(const Zstring& volumeNamePf) : //throw FileError
createShadowCopy (getDllName(), funName_createShadowCopy),
releaseShadowCopy(getDllName(), funName_releaseShadowCopy),
getShadowVolume (getDllName(), funName_getShadowVolume),
@@ -111,7 +111,7 @@ Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile)
VolNameShadowMap::const_iterator it = shadowVol.find(volumeNamePf);
if (it == shadowVol.end())
{
- auto newEntry = std::make_shared<ShadowVolume>(volumeNamePf);
+ auto newEntry = std::make_shared<ShadowVolume>(volumeNamePf); //throw FileError
it = shadowVol.insert(std::make_pair(volumeNamePf, newEntry)).first;
}
diff --git a/lib/status_handler.cpp b/lib/status_handler.cpp
index fd3b2d96..c24c6f50 100644
--- a/lib/status_handler.cpp
+++ b/lib/status_handler.cpp
@@ -22,7 +22,7 @@ void zen::updateUiNow()
namespace
{
-const std::int64_t TICKS_UPDATE_INTERVAL = UI_UPDATE_INTERVAL * ticksPerSec() / 1000;
+const std::int64_t TICKS_UPDATE_INTERVAL = UI_UPDATE_INTERVAL* ticksPerSec() / 1000;
TickVal lastExec = getTicks();
};
diff --git a/lib/xml_base.cpp b/lib/xml_base.cpp
index 814b9bdb..e26f73c2 100644
--- a/lib/xml_base.cpp
+++ b/lib/xml_base.cpp
@@ -71,7 +71,7 @@ const std::wstring xmlAccess::getErrorMessageFormatted(const XmlIn& in)
{
msg = _("Cannot read the following XML elements:") + L"\n";
std::for_each(failedElements.begin(), failedElements.end(),
- [&](const std::wstring& str) { msg += str + L'\n'; });
+ [&](const std::wstring& elem) { msg += L"\n" + elem; });
}
return msg;
diff --git a/resource.rc b/resource.rc
deleted file mode 100644
index bf62d7b2..00000000
--- a/resource.rc
+++ /dev/null
@@ -1,51 +0,0 @@
-#define IDR_VERSION1 1
-
-#include <Winver.h>
-#include "version/version.rc"
-
-#define wxUSE_NO_MANIFEST 1 //lame resource compiler requires us to define an integer here
-#include <wx/msw/wx.rc>
-/*
-Reasons to NOT use the wxWidgets manifest file:
- 1. beginning with VC11 we get linking error "CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409"
- due to "#define wxMANIFEST_ID 1" in wx.rc. Using another number doesn't integrate the manifest correctly for VC2010 compilers.
- 2. it is missing the "requestedExecutionLevel" element. Consequently UAC virtualization will be active for a 32 bit executable started in user mode
-*/
-
-//MSDN on manifests: http://msdn.microsoft.com/en-us/library/bb756929.aspx
-#define MANIFEST_RESOURCE_ID 1
-#if defined(WX_CPU_AMD64) //check for 64 bit *first*
-MANIFEST_RESOURCE_ID RT_MANIFEST "amd64.manifest"
-#elif defined(WX_CPU_X86)
-MANIFEST_RESOURCE_ID RT_MANIFEST "win32.manifest"
-#else
-#error What is going on?
-#endif
-
-
-A_PROGRAM_ICON ICON DISCARDABLE "lib/FreeFileSync.ico"
-B_BATCH_ICON ICON DISCARDABLE "lib/Batch.ico"
-C_SYNC_DB_ICON ICON DISCARDABLE "lib/SyncDB.ico"
-
-IDR_VERSION1 VERSIONINFO
-FILEVERSION FREEFILESYNC_VER
-PRODUCTVERSION FREEFILESYNC_VER
-FILEOS VOS__WINDOWS32
-FILETYPE VFT_APP
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "FFFF04B0"
- BEGIN
- VALUE "FileDescription", "Folder Comparison and Synchronization\0"
- VALUE "FileVersion", FREEFILESYNC_VER_STR
- VALUE "ProductName", "FreeFileSync\0"
- VALUE "ProductVersion", FREEFILESYNC_VER_STR
- VALUE "LegalCopyright", "Zenju - All Rights Reserved\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0xFFFF, 0x04B0
- END
-END
diff --git a/structures.cpp b/structures.cpp
index 54db613c..76dec74e 100644
--- a/structures.cpp
+++ b/structures.cpp
@@ -280,7 +280,8 @@ Int64 resolve(size_t value, UnitTime unit, Int64 defaultVal)
UInt64 resolve(size_t value, UnitSize unit, UInt64 defaultVal)
{
- double out = 0;
+ const UInt64 maxVal =std::numeric_limits<zen::UInt64>::max();
+
switch (unit)
{
case USIZE_NONE:
@@ -288,15 +289,14 @@ UInt64 resolve(size_t value, UnitSize unit, UInt64 defaultVal)
case USIZE_BYTE:
return value;
case USIZE_KB:
- out = 1024.0 * value;
- break;
+ return value > maxVal / 1024U ? maxVal : //prevent overflow!!!
+ 1024U * value;
case USIZE_MB:
- out = 1024 * 1024.0 * value;
- break;
+ return value > maxVal / (1024 * 1024U) ? maxVal : //prevent overflow!!!
+ 1024 * 1024U * value;
}
- return out >= to<double>(std::numeric_limits<zen::UInt64>::max()) ? //prevent overflow!!!
- std::numeric_limits<zen::UInt64>::max() :
- zen::UInt64(out);
+ assert(false);
+ return defaultVal;
}
}
diff --git a/structures.h b/structures.h
index 91b54942..021a2675 100644
--- a/structures.h
+++ b/structures.h
@@ -349,16 +349,17 @@ bool operator==(const FolderPairEnh& lhs, const FolderPairEnh& rhs)
struct MainConfiguration
{
MainConfiguration() :
-#ifdef FFS_WIN
globalFilter(Zstr("*"),
+#ifdef FFS_WIN
Zstr("\\System Volume Information\\\n")
Zstr("\\$Recycle.Bin\\\n")
Zstr("\\RECYCLER\\\n")
Zstr("\\RECYCLED\\\n")) {}
#elif defined FFS_LINUX
- globalFilter(Zstr("*"),
Zstr("/.Trash-*/\n")
Zstr("/.recycle/\n")) {}
+#elif defined FFS_MAC
+ Zstr("/.Trashes/\n")) {}
#endif
CompConfig cmpConfig; //global compare settings: may be overwritten by folder pair settings
diff --git a/synchronization.cpp b/synchronization.cpp
index b3eaf4e4..227a48a8 100644
--- a/synchronization.cpp
+++ b/synchronization.cpp
@@ -683,7 +683,7 @@ void DeletionHandling::removeDirUpdating(const Zstring& relativeName, Int64 byte
throw;
}
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
const bool deleted = recycleOrDelete(fullName); //throw FileError
#endif
if (deleted)
@@ -755,7 +755,7 @@ void DeletionHandling::removeFileUpdating(const Zstring& relativeName, Int64 byt
}
}
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
deleted = recycleOrDelete(fullName); //throw FileError
#endif
break;
@@ -1649,7 +1649,7 @@ void SynchronizeFolderPair::synchronizeLinkInt(SymLinkMapping& linkObj, SyncOper
int objectsReported = 0;
auto guardStatistics = makeGuard([&] { procCallback_.updateTotalData(objectsReported, 0); }); //error = unexpected increase of total workload
const int objectsExpected = 1;
- const Int64 bytesExpected = 0;
+ const Int64 bytesExpected = 0;
getDelHandling<sideTrg>().removeLinkUpdating(linkObj.getObjRelativeName(), bytesExpected, [&] //throw FileError
{
@@ -1672,7 +1672,7 @@ void SynchronizeFolderPair::synchronizeLinkInt(SymLinkMapping& linkObj, SyncOper
reportInfo(txtOverwritingLink, target);
reportStatus(getDelHandling<sideTrg>().getTxtRemovingSymLink(), linkObj.getFullName<sideTrg>());
- getDelHandling<sideTrg>().removeLinkUpdating(linkObj.getObjRelativeName(), 0, []{}, linkObj.getLinkType<sideTrg>()); //throw FileError
+ getDelHandling<sideTrg>().removeLinkUpdating(linkObj.getObjRelativeName(), 0, [] {}, linkObj.getLinkType<sideTrg>()); //throw FileError
linkObj.removeObject<sideTrg>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!)
reportStatus(txtOverwritingLink, target); //restore status text
@@ -1773,8 +1773,8 @@ void SynchronizeFolderPair::synchronizeFolderInt(DirMapping& dirObj, SyncOperati
auto guardStatistics = makeGuard([&] { procCallback_.updateTotalData(objectsReported, 0); }); //error = unexpected increase of total workload
const SyncStatistics subStats(dirObj); //counts sub-objects only!
const int objectsExpected = 1 + getCUD(subStats);
- const Int64 bytesExpected = subStats.getDataToProcess();
- assert(bytesExpected == 0);
+ const Int64 bytesExpected = subStats.getDataToProcess();
+ assert(bytesExpected == 0);
getDelHandling<sideTrg>().removeDirUpdating(dirObj.getObjRelativeName(), bytesExpected, [&] //throw FileError
{
@@ -1848,7 +1848,7 @@ struct LessDependentDirectory : public std::binary_function<Zstring, Zstring, bo
template <SelectedSide side> //create base directories first (if not yet existing) -> no symlink or attribute copying!
bool createBaseDirectory(BaseDirMapping& baseMap, ProcessCallback& callback) //nothrow; return false if fatal error occurred
{
- const Zstring dirname = beforeLast(baseMap.getBaseDirPf<side>(), FILE_NAME_SEPARATOR);
+ const Zstring dirname = beforeLast(baseMap.getBaseDirPf<side>(), FILE_NAME_SEPARATOR); //what about C:\ ???
if (!dirname.empty())
{
if (baseMap.isExisting<side>()) //atomicity: do NOT check directory existence again!
@@ -1857,7 +1857,7 @@ bool createBaseDirectory(BaseDirMapping& baseMap, ProcessCallback& callback) //n
return tryReportingError([&]
{
if (!dirExistsUpdating(dirname, false, callback))
- throw FileError(replaceCpy(_("Cannot find folder %x."), L"%x", fmtFileName(dirname))); //this should really be a "fatal error" if not recoverable
+ throw FileError(replaceCpy(_("Cannot find %x."), L"%x", fmtFileName(dirname))); //this should really be a "fatal error" if not recoverable
}, callback); //may throw in error-callback!
}
else //create target directory: user presumably ignored error "dir existing" in order to have it created automatically
@@ -1906,11 +1906,27 @@ void zen::synchronize(const TimeComp& timeStamp,
//specify process and resource handling priorities
std::unique_ptr<ScheduleForBackgroundProcessing> backgroundPrio;
if (runWithBackgroundPriority)
- backgroundPrio = make_unique<ScheduleForBackgroundProcessing>();
+ try
+ {
+ backgroundPrio = make_unique<ScheduleForBackgroundProcessing>(); //throw FileError
+ }
+ catch (const FileError& e)
+ {
+ //not an error in this context
+ callback.reportInfo(e.toString()); //may throw!
+ }
//prevent operating system going into sleep state
- PreventStandby dummy;
- (void)dummy;
+ std::unique_ptr<PreventStandby> noStandby;
+ try
+ {
+ noStandby = make_unique<PreventStandby>(); //throw FileError
+ }
+ catch (const FileError& e)
+ {
+ //not an error in this context
+ callback.reportInfo(e.toString()); //may throw!
+ }
//PERF_START;
@@ -2146,58 +2162,55 @@ void zen::synchronize(const TimeComp& timeStamp,
if (statisticsTotal.getConflict() > 0)
{
//show the first few conflicts in warning message also:
- std::wstring warningMessage = _("The following items have unresolved conflicts and will not be synchronized:") + L"\n\n";
+ std::wstring msg = _("The following items have unresolved conflicts and will not be synchronized:");
const auto& conflictMsgs = statisticsTotal.getConflictMessages(); //get *all* sync conflicts
for (auto it = conflictMsgs.begin(); it != conflictMsgs.end(); ++it)
- warningMessage += fmtFileName(it->first) + L": " + it->second + L"\n\n";
+ msg += L"\n\n" + fmtFileName(it->first) + L": " + it->second;
- callback.reportWarning(warningMessage, warnings.warningUnresolvedConflicts);
+ callback.reportWarning(msg, warnings.warningUnresolvedConflicts);
}
//check if user accidentally selected wrong directories for sync
if (!significantDiff.empty())
{
- std::wstring warningMessage = _("Significant difference detected:");
+ std::wstring msg = _("Significant difference detected:");
for (auto it = significantDiff.begin(); it != significantDiff.end(); ++it)
- warningMessage += std::wstring(L"\n\n") +
- it->first + L" <-> " + L"\n" +
- it->second;
- warningMessage += L"\n\n";
- warningMessage += _("More than 50% of the total number of files will be copied or deleted!");
+ msg += std::wstring(L"\n\n") +
+ it->first + L" <-> " + L"\n" +
+ it->second;
+ msg += L"\n\n";
+ msg += _("More than 50% of the total number of files will be copied or deleted!");
- callback.reportWarning(warningMessage, warnings.warningSignificantDifference);
+ callback.reportWarning(msg, warnings.warningSignificantDifference);
}
//check for sufficient free diskspace
if (!diskSpaceMissing.empty())
{
- std::wstring warningMessage = _("Not enough free disk space available in:");
+ std::wstring msg = _("Not enough free disk space available in:");
for (auto it = diskSpaceMissing.begin(); it != diskSpaceMissing.end(); ++it)
- warningMessage += std::wstring(L"\n\n") +
- fmtFileName(it->first) + L"\n" +
- _("Required:") + L" " + filesizeToShortString(it->second.first) + L"\n" +
- _("Available:") + L" " + filesizeToShortString(it->second.second);
+ msg += std::wstring(L"\n\n") +
+ it->first + L"\n" +
+ _("Required:") + L" " + filesizeToShortString(it->second.first) + L"\n" +
+ _("Available:") + L" " + filesizeToShortString(it->second.second);
- callback.reportWarning(warningMessage, warnings.warningNotEnoughDiskSpace);
+ callback.reportWarning(msg, warnings.warningNotEnoughDiskSpace);
}
-
- //windows: check if recycle bin really exists; if not, Windows will silently delete, which is wrong
#ifdef FFS_WIN
+ //windows: check if recycle bin really exists; if not, Windows will silently delete, which is wrong
if (!recyclMissing.empty())
{
- std::wstring warningMessage = _("Recycle Bin is not available for the following paths! Files will be deleted permanently instead:");
- warningMessage += L"\n";
-
+ std::wstring msg = _("Recycle Bin is not available for the following paths! Files will be deleted permanently instead:") + L"\n";
std::for_each(recyclMissing.begin(), recyclMissing.end(),
- [&](const Zstring& path) { warningMessage += L"\n" + utfCvrtTo<std::wstring>(path); });
+ [&](const Zstring& path) { msg += std::wstring(L"\n") + path; });
- callback.reportWarning(warningMessage, warnings.warningRecyclerMissing);
+ callback.reportWarning(msg, warnings.warningRecyclerMissing);
}
#endif
@@ -2213,10 +2226,11 @@ void zen::synchronize(const TimeComp& timeStamp,
if (!conflictDirs.empty())
{
- std::wstring warningMessage = _("A folder will be modified which is part of multiple folder pairs. Please review synchronization settings.") + L"\n";
- for (auto it = conflictDirs.begin(); it != conflictDirs.end(); ++it)
- warningMessage += L"\n" + fmtFileName(*it);
- callback.reportWarning(warningMessage, warnings.warningFolderPairRaceCondition);
+ std::wstring msg = _("A folder will be modified which is part of multiple folder pairs. Please review synchronization settings.") + L"\n";
+ std::for_each(conflictDirs.begin(), conflictDirs.end(),
+ [&](const Zstring& dirname) { msg += std::wstring(L"\n") + dirname; });
+
+ callback.reportWarning(msg, warnings.warningFolderPairRaceCondition);
}
//-------------------end of basic checks------------------------------------------
@@ -2244,8 +2258,8 @@ void zen::synchronize(const TimeComp& timeStamp,
makeSameLength(left, right);
callback.reportInfo(_("Synchronizing folder pair:") + L"\n" +
- L" " + left + fmtFileName(j->getBaseDirPf<LEFT_SIDE >()) + L"\n" +
- L" " + right + fmtFileName(j->getBaseDirPf<RIGHT_SIDE>()));
+ L" " + left + j->getBaseDirPf<LEFT_SIDE >() + L"\n" +
+ L" " + right + j->getBaseDirPf<RIGHT_SIDE>());
//------------------------------------------------------------------------------------------
const size_t folderIndex = j - begin(folderCmp);
@@ -2433,7 +2447,7 @@ void verifyFiles(const Zstring& source, const Zstring& target, VerifyCallback& c
#ifdef FFS_WIN
wxFile file1(applyLongPathPrefix(source).c_str(), wxFile::read); //don't use buffered file input for verification!
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
wxFile file1(::open(source.c_str(), O_RDONLY)); //utilize UTF-8 filename
#endif
if (!file1.IsOpened())
@@ -2441,7 +2455,7 @@ void verifyFiles(const Zstring& source, const Zstring& target, VerifyCallback& c
#ifdef FFS_WIN
wxFile file2(applyLongPathPrefix(target).c_str(), wxFile::read); //don't use buffered file input for verification!
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
wxFile file2(::open(target.c_str(), O_RDONLY)); //utilize UTF-8 filename
#endif
if (!file2.IsOpened()) //NO cleanup necessary for (wxFile) file1
diff --git a/ui/batch_config.cpp b/ui/batch_config.cpp
index 6b9092c9..c3bf797d 100644
--- a/ui/batch_config.cpp
+++ b/ui/batch_config.cpp
@@ -7,6 +7,7 @@
#include "batch_config.h"
#include <wx/wupdlock.h>
#include <wx+/mouse_move_dlg.h>
+#include <wx+/font_size.h>
#include "gui_generated.h"
#include "dir_name.h"
#include "../ui/exec_finished_box.h"
@@ -35,7 +36,7 @@ public:
size_t onCompletionHistoryMax);
private:
- virtual void OnHelp (wxCommandEvent& event) { displayHelpEntry(L"html/Schedule a Batch Job.html"); }
+ virtual void OnHelp (wxCommandEvent& event) { displayHelpEntry(L"html/Schedule a Batch Job.html", this); }
virtual void OnClose (wxCloseEvent& event) { EndModal(BUTTON_CANCEL); }
virtual void OnCancel (wxCommandEvent& event) { EndModal(BUTTON_CANCEL); }
virtual void OnSaveBatchJob(wxCommandEvent& event);
@@ -66,12 +67,13 @@ BatchDialog::BatchDialog(wxWindow* parent,
BatchDlgGenerated(parent),
batchCfgOutRef(batchCfg)
{
- m_comboBoxExecFinished->initHistory(onCompletionHistory, onCompletionHistoryMax);
-
#ifdef FFS_WIN
new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
wxWindowUpdateLocker dummy(this); //avoid display distortion
+ setRelativeFontSize(*m_staticTextHeader, 1.25);
+
+ m_comboBoxExecFinished->initHistory(onCompletionHistory, onCompletionHistoryMax);
m_bpButtonHelp ->SetBitmapLabel(GlobalResources::getImage(L"help"));
m_bitmapBatchJob->SetBitmap (GlobalResources::getImage(L"batch"));
diff --git a/ui/batch_status_handler.cpp b/ui/batch_status_handler.cpp
index 9e8b1489..d26b9bf6 100644
--- a/ui/batch_status_handler.cpp
+++ b/ui/batch_status_handler.cpp
@@ -48,7 +48,7 @@ private:
void limitLogfileCount(const Zstring& logdir, const std::wstring& jobname, size_t maxCount) //throw()
{
std::vector<Zstring> logFiles;
- FindLogfiles traverseCallback(toZ(jobname), logFiles); //throw()!
+ FindLogfiles traverseCallback(utfCvrtTo<Zstring>(jobname), logFiles); //throw()!
traverseFolder(logdir,
traverseCallback);
@@ -76,7 +76,7 @@ std::unique_ptr<FileOutput> prepareNewLogfile(const Zstring& logfileDirectory, /
makeDirectory(logfileDir); //throw FileError
//assemble logfile name
- const Zstring body = appendSeparator(logfileDir) + toZ(jobName) + Zstr(" ") + formatTime<Zstring>(Zstr("%Y-%m-%d %H%M%S"), timeStamp);
+ const Zstring body = appendSeparator(logfileDir) + utfCvrtTo<Zstring>(jobName) + Zstr(" ") + formatTime<Zstring>(Zstr("%Y-%m-%d %H%M%S"), timeStamp);
//ensure uniqueness
for (int i = 0;; ++i)
@@ -237,13 +237,13 @@ BatchStatusHandler::~BatchStatusHandler()
//notify to syncStatusFrame that current process has ended
if (abortIsRequested())
- syncStatusFrame.processHasFinished(SyncStatus::RESULT_ABORTED, errorLog); //enable okay and close events
+ syncStatusFrame.processHasFinished(SyncProgressDialog::RESULT_ABORTED, errorLog); //enable okay and close events
else if (totalErrors > 0)
- syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_ERROR, errorLog);
+ syncStatusFrame.processHasFinished(SyncProgressDialog::RESULT_FINISHED_WITH_ERROR, errorLog);
else if (totalWarnings > 0)
- syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_WARNINGS, errorLog);
+ syncStatusFrame.processHasFinished(SyncProgressDialog::RESULT_FINISHED_WITH_WARNINGS, errorLog);
else
- syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_SUCCESS, errorLog);
+ syncStatusFrame.processHasFinished(SyncProgressDialog::RESULT_FINISHED_WITH_SUCCESS, errorLog);
}
else
syncStatusFrame.closeWindowDirectly(); //syncStatusFrame is main window => program will quit directly
@@ -262,7 +262,7 @@ void BatchStatusHandler::updateProcessedData(int objectsDelta, Int64 dataDelta)
{
StatusHandler::updateProcessedData(objectsDelta, dataDelta);
- syncStatusFrame.notifyProgressChange(); //noexcept
+ syncStatusFrame.notifyProgressChange(); //noexcept
//note: this method should NOT throw in order to properly allow undoing setting of statistics!
}
diff --git a/ui/batch_status_handler.h b/ui/batch_status_handler.h
index 884f22e5..dff2f7b3 100644
--- a/ui/batch_status_handler.h
+++ b/ui/batch_status_handler.h
@@ -57,7 +57,7 @@ private:
zen::ErrorLog errorLog; //list of non-resolved errors and warnings
zen::FfsReturnCode& returnCode_;
- SyncStatus syncStatusFrame; //the window managed by SyncStatus has longer lifetime than this handler!
+ SyncProgressDialog syncStatusFrame; //the window managed by SyncStatus has longer lifetime than this handler!
std::unique_ptr<zen::FileOutput> logFile; //optional!
const std::wstring jobName_;
diff --git a/ui/check_version.cpp b/ui/check_version.cpp
index 922708c7..e3ed042d 100644
--- a/ui/check_version.cpp
+++ b/ui/check_version.cpp
@@ -8,6 +8,7 @@
#include <memory>
#include <zen/string_tools.h>
#include <zen/i18n.h>
+#include <zen/utf.h>
#include <wx/msgdlg.h>
#include <wx/protocol/http.h>
#include <wx/sstream.h>
@@ -15,7 +16,7 @@
#include <wx/timer.h>
#include "msg_popup.h"
#include "../version/version.h"
-#include "../lib/ffs_paths.h"
+//#include "../lib/ffs_paths.h"
#include <zen/scope_guard.h>
#ifdef FFS_WIN
@@ -150,7 +151,7 @@ GetVerResult getOnlineVersion(wxString& version) //empty string on error;
version = utfCvrtTo<wxString>(&output[0]);
return GET_VER_SUCCESS;
-#else
+#elif defined FFS_LINUX || defined FFS_MAC
wxWindowDisabler dummy;
auto getStringFromUrl = [](const wxString& server, const wxString& page, int timeout, wxString* output) -> bool //true on successful connection
@@ -246,11 +247,6 @@ void zen::checkForUpdateNow(wxWindow* parent)
void zen::checkForUpdatePeriodically(wxWindow* parent, long& lastUpdateCheck)
{
-#ifdef FFS_LINUX
- if (!zen::isPortableVersion()) //don't check for updates in locally installed version -> handled by system updater
- return;
-#endif
-
if (lastUpdateCheck != -1)
{
if (lastUpdateCheck == 0)
diff --git a/ui/column_attr.h b/ui/column_attr.h
index 8152c01c..ab196cb1 100644
--- a/ui/column_attr.h
+++ b/ui/column_attr.h
@@ -35,8 +35,7 @@ struct ColumnAttributeRim
};
-namespace
-{
+inline
std::vector<ColumnAttributeRim> getDefaultColumnAttributesLeft()
{
std::vector<ColumnAttributeRim> attr;
@@ -50,6 +49,7 @@ std::vector<ColumnAttributeRim> getDefaultColumnAttributesLeft()
return attr;
}
+inline
std::vector<ColumnAttributeRim> getDefaultColumnAttributesRight()
{
std::vector<ColumnAttributeRim> attr;
@@ -62,7 +62,6 @@ std::vector<ColumnAttributeRim> getDefaultColumnAttributesRight()
attr.push_back(ColumnAttributeRim(COL_TYPE_EXTENSION, 60, 0, false));
return attr;
}
-}
//------------------------------------------------------------------
@@ -93,15 +92,15 @@ struct ColumnAttributeNavi
};
-static const bool defaultValueShowPercentage = true;
-static const ColumnTypeNavi defaultValueLastSortColumn = COL_TYPE_NAVI_DIRECTORY; //remember sort on navigation panel
-static const bool defaultValueLastSortAscending = true; //
+const bool defaultValueShowPercentage = true;
+const ColumnTypeNavi defaultValueLastSortColumn = COL_TYPE_NAVI_DIRECTORY; //remember sort on navigation panel
+const bool defaultValueLastSortAscending = true; //
inline
std::vector<ColumnAttributeNavi> getDefaultColumnAttributesNavi()
{
std::vector<ColumnAttributeNavi> attr;
- attr.push_back(ColumnAttributeNavi(COL_TYPE_NAVI_DIRECTORY, -60, 1, true)); //stretch to full width and substract sum of fixed size widths!
+ attr.push_back(ColumnAttributeNavi(COL_TYPE_NAVI_DIRECTORY, -60, 1, true)); //stretch to full width and substract sum of fixed size widths
attr.push_back(ColumnAttributeNavi(COL_TYPE_NAVI_BYTES, 60, 0, true)); //GTK needs a few pixels width more
return attr;
}
diff --git a/ui/custom_grid.cpp b/ui/custom_grid.cpp
index e1e2b5a2..a600a214 100644
--- a/ui/custom_grid.cpp
+++ b/ui/custom_grid.cpp
@@ -48,7 +48,7 @@ const size_t ROW_COUNT_NO_DATA = 10;
/*
class hierarchy:
- GridDataBase
+ GridDataBase
/|\
________________|________________
| |
@@ -56,7 +56,7 @@ class hierarchy:
/|\ |
__________|__________ |
| | |
- GridDataLeftRim GridDataRight GridDataMiddle
+ GridDataLeft GridDataRight GridDataMiddle
*/
@@ -103,12 +103,17 @@ Zstring getExtension(const Zstring& shortName)
class IconUpdater;
class GridEventManager;
-
+class GridDataLeft;
+class GridDataRight;
struct IconManager
{
- IconManager(IconBuffer::IconSize sz) : iconBuffer(sz) {}
+ IconManager(GridDataLeft& provLeft, GridDataRight& provRight, IconBuffer::IconSize sz) : iconBuffer(sz),
+ iconUpdater(make_unique<IconUpdater>(provLeft, provRight, iconBuffer)) {}
+ void startIconUpdater();
+ IconBuffer& refIconBuffer() { return iconBuffer; }
+private:
IconBuffer iconBuffer;
std::unique_ptr<IconUpdater> iconUpdater; //bind ownership to GridDataRim<>!
};
@@ -165,7 +170,7 @@ public:
void setIconManager(const std::shared_ptr<IconManager>& iconMgr) { iconMgr_ = iconMgr; }
- void addIconsToBeLoaded(std::vector<Zstring>& newLoad) //loads all (not yet) drawn icons
+ void updateNewAndGetMissingIcons(std::vector<Zstring>& newLoad) //loads all (not yet) drawn icons
{
//don't check too often! give worker thread some time to fetch data
if (iconMgr_)
@@ -189,7 +194,7 @@ public:
if (!fileName.empty())
{
//test if they are already loaded in buffer:
- if (iconMgr_->iconBuffer.requestFileIcon(fileName))
+ if (iconMgr_->refIconBuffer().requestFileIcon(fileName))
{
//do a *full* refresh for *every* failed load to update partial DC updates while scrolling
refreshCell(refGrid(), currentRow, static_cast<ColumnType>(COL_TYPE_FILENAME));
@@ -203,8 +208,15 @@ public:
}
}
+private:
+ bool isFailedLoad(size_t row) const { return row < failedLoads.size() ? failedLoads[row] != 0 : false; }
+
void setFailedLoad(size_t row, bool failed)
{
+ if (failed) //let's only pay for iconupdater when needed
+ if (iconMgr_)
+ iconMgr_->startIconUpdater();
+
if (failedLoads.size() != refGrid().getRowCount())
failedLoads.resize(refGrid().getRowCount());
@@ -212,8 +224,6 @@ public:
failedLoads[row] = failed;
}
- bool isFailedLoad(size_t row) const { return row < failedLoads.size() ? failedLoads[row] != 0 : false; }
-
protected:
virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, size_t row, bool enabled, bool selected, bool hasFocus)
{
@@ -447,7 +457,7 @@ private:
return wxEmptyString;
}
- static const int CELL_BORDER = 2;
+ static const int GAP_SIZE = 2;
virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, size_t row, ColumnType colType)
{
@@ -475,16 +485,16 @@ private:
if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_FILENAME &&
iconMgr_)
{
- rectTmp.x += CELL_BORDER;
- rectTmp.width -= CELL_BORDER;
+ rectTmp.x += GAP_SIZE;
+ rectTmp.width -= GAP_SIZE;
- const int iconSize = iconMgr_->iconBuffer.getSize();
+ const int iconSize = iconMgr_->refIconBuffer().getSize();
if (rectTmp.GetWidth() >= iconSize)
{
// Partitioning:
- // _______________________________
- // | border | icon | border | text |
- // -------------------------------
+ // __________________________
+ // | gap | icon | gap | text |
+ // --------------------------
const Zstring fileName = getIconFile(row);
if (!fileName.empty())
@@ -493,12 +503,12 @@ private:
//first check if it is a directory icon:
if (fileName == ICON_FILE_FOLDER)
- icon = iconMgr_->iconBuffer.genericDirIcon();
+ icon = iconMgr_->refIconBuffer().genericDirIcon();
else //retrieve file icon
{
- if (!iconMgr_->iconBuffer.requestFileIcon(fileName, &icon)) //returns false if icon is not in buffer
+ if (!iconMgr_->refIconBuffer().requestFileIcon(fileName, &icon)) //returns false if icon is not in buffer
{
- icon = iconMgr_->iconBuffer.genericFileIcon(); //better than nothing
+ icon = iconMgr_->refIconBuffer().genericFileIcon(); //better than nothing
setFailedLoad(row, true); //save status of failed icon load -> used for async. icon loading
//falsify only! we want to avoid writing incorrect success values when only partially updating the DC, e.g. when scrolling,
//see repaint behavior of ::ScrollWindow() function!
@@ -520,7 +530,7 @@ private:
wxMemoryDC memDc(bmp);
memDc.Blit(0, 0, icon.GetWidth(), icon.GetHeight(), &dc, posX, posY); //blit in
- bmp = wxBitmap(bmp.ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3)); //treat all channels equally!
+ bmp = wxBitmap(bmp.ConvertToImage().ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3)); //treat all channels equally!
memDc.SelectObject(bmp);
dc.Blit(posX, posY, icon.GetWidth(), icon.GetHeight(), &memDc, 0, 0); //blit out
@@ -540,13 +550,13 @@ private:
if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_SIZE && grid.GetLayoutDirection() != wxLayout_RightToLeft)
{
//have file size right-justified (but don't change for RTL languages)
- rectTmp.width -= CELL_BORDER;
+ rectTmp.width -= GAP_SIZE;
drawCellText(dc, rectTmp, getValue(row, colType), isActive, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
}
else
{
- rectTmp.x += CELL_BORDER;
- rectTmp.width -= CELL_BORDER;
+ rectTmp.x += GAP_SIZE;
+ rectTmp.width -= GAP_SIZE;
drawCellText(dc, rectTmp, getValue(row, colType), isActive, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
}
}
@@ -554,15 +564,15 @@ private:
virtual size_t getBestSize(wxDC& dc, size_t row, ColumnType colType)
{
// Partitioning:
- // ________________________________________
- // | border | icon | border | text | border |
- // ----------------------------------------
+ // ________________________________
+ // | gap | icon | gap | text | gap |
+ // --------------------------------
int bestSize = 0;
if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_FILENAME && iconMgr_)
- bestSize += CELL_BORDER + iconMgr_->iconBuffer.getSize();
+ bestSize += GAP_SIZE + iconMgr_->refIconBuffer().getSize();
- bestSize += CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth() + CELL_BORDER;
+ bestSize += GAP_SIZE + dc.GetTextExtent(getValue(row, colType)).GetWidth() + GAP_SIZE;
return bestSize; // + 1 pix for cell border line -> not used anymore!
}
@@ -594,10 +604,10 @@ private:
wxRect rectInside = drawColumnLabelBorder(dc, rect);
drawColumnLabelBackground(dc, rectInside, highlighted);
- const int COLUMN_BORDER_LEFT = 4;
+ const int COLUMN_GAP_LEFT = 4;
- rectInside.x += COLUMN_BORDER_LEFT;
- rectInside.width -= COLUMN_BORDER_LEFT;
+ rectInside.x += COLUMN_GAP_LEFT;
+ rectInside.width -= COLUMN_GAP_LEFT;
drawColumnLabelText(dc, rectInside, getColumnLabel(colType));
//draw sort marker
@@ -610,7 +620,7 @@ private:
{
const wxBitmap& marker = GlobalResources::getImage(sortInfo->ascending_ ? L"sortAscending" : L"sortDescending");
wxPoint markerBegin = rectInside.GetTopLeft() + wxPoint((rectInside.width - marker.GetWidth()) / 2, 0);
- dc.DrawBitmap(marker, markerBegin, true); //respect 2-pixel border
+ dc.DrawBitmap(marker, markerBegin, true); //respect 2-pixel gap
}
}
}
@@ -769,7 +779,6 @@ public:
GridDataRight(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid) : GridDataRim<RIGHT_SIDE>(gridDataView, grid) {}
};
-
//########################################################################################################
class GridDataMiddle : public GridDataBase
@@ -786,6 +795,7 @@ public:
{
refGrid().clearSelection(false); //don't emit event, prevent recursion!
dragSelection = make_unique<std::pair<size_t, BlockPosition>>(row, mousePosToBlock(clientPos, row));
+ toolTip.hide(); //handle custom tooltip
}
}
@@ -833,25 +843,28 @@ public:
}
dragSelection.reset();
}
+
+ //update highlight and tooltip: on OS X no mouse movement event is generated after a mouse button click (unlike on Windows)
+ onMouseMovement(refGrid().getMainWin().ScreenToClient(wxGetMousePosition()));
}
- void onMouseMovement(const wxPoint& clientPos, size_t row, ColumnType colType)
+ void onMouseMovement(const wxPoint& clientPos)
{
//manage block highlighting and custom tooltip
- if (dragSelection)
- {
- toolTip.hide(); //handle custom tooltip
- }
- else
+ if (!dragSelection)
{
- if (static_cast<ColumnTypeMiddle>(colType) == COL_TYPE_MIDDLE_VALUE &&
- row < refGrid().getRowCount())
+ const wxPoint& topLeftAbs = refGrid().CalcUnscrolledPosition(clientPos);
+ const size_t row = refGrid().getRowAtPos(topLeftAbs.y); //return -1 for invalid position, rowCount if one past the end
+ auto colInfo = refGrid().getColumnAtPos(topLeftAbs.x); //(column type, component position)
+
+ if (row < refGrid().getRowCount() &&
+ colInfo && static_cast<ColumnTypeMiddle>(colInfo->first) == COL_TYPE_MIDDLE_VALUE)
{
if (highlight) //refresh old highlight
- refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE));
+ refreshCell(refGrid(), highlight->row_, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE));
- highlight = make_unique<std::pair<size_t, BlockPosition>>(row, mousePosToBlock(clientPos, row));
- refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE));
+ highlight = make_unique<MouseHighlight>(row, mousePosToBlock(clientPos, row));
+ refreshCell(refGrid(), highlight->row_, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE));
//show custom tooltip
showToolTip(row, refGrid().getMainWin().ClientToScreen(clientPos));
@@ -861,15 +874,17 @@ public:
}
}
- void onMouseLeave()
+ void onMouseLeave() //wxEVT_LEAVE_WINDOW does not respect mouse capture!
{
- if (highlight)
+ if (!dragSelection)
{
- refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE));
- highlight.reset();
+ if (highlight)
+ {
+ refreshCell(refGrid(), highlight->row_, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE));
+ highlight.reset();
+ }
+ toolTip.hide(); //handle custom tooltip
}
-
- toolTip.hide(); //handle custom tooltip
}
void showSyncAction(bool value) { showSyncAction_ = value; }
@@ -909,8 +924,8 @@ private:
wxRect checkBoxArea = rectInside;
checkBoxArea.SetWidth(CHECK_BOX_IMAGE);
- const bool rowHighlighted = dragSelection ? row == dragSelection->first : highlight ? row == highlight->first : false;
- const BlockPosition highlightBlock = dragSelection ? dragSelection->second : highlight ? highlight->second : BLOCKPOS_CHECK_BOX;
+ const bool rowHighlighted = dragSelection ? row == dragSelection->first : highlight ? row == highlight->row_ : false;
+ const BlockPosition highlightBlock = dragSelection ? dragSelection->second : highlight ? highlight->blockPos_ : BLOCKPOS_CHECK_BOX;
if (rowHighlighted && highlightBlock == BLOCKPOS_CHECK_BOX)
drawBitmapRtlMirror(dc, GlobalResources::getImage(fsObj->isActive() ? L"checkboxTrueFocus" : L"checkboxFalseFocus"), checkBoxArea, wxALIGN_CENTER, buffer);
@@ -1174,7 +1189,14 @@ private:
virtual wxString getToolTip(ColumnType colType) const { return showSyncAction_ ? _("Action") + L" (F8)" : _("Category") + L" (F8)"; }
bool showSyncAction_;
- std::unique_ptr<std::pair<size_t, BlockPosition>> highlight; //(row, block) current mouse highlight
+
+ struct MouseHighlight
+ {
+ MouseHighlight(size_t row, BlockPosition blockPos) : row_(row), blockPos_(blockPos) {}
+ const size_t row_;
+ const BlockPosition blockPos_;
+ };
+ std::unique_ptr<MouseHighlight> highlight; //current mouse highlight
std::unique_ptr<std::pair<size_t, BlockPosition>> dragSelection; //(row, block)
std::unique_ptr<wxBitmap> buffer; //avoid costs of recreating this temporal variable
zen::Tooltip toolTip;
@@ -1190,11 +1212,9 @@ public:
GridEventManager(Grid& gridL,
Grid& gridC,
Grid& gridR,
- GridDataLeft& provLeft,
- GridDataMiddle& provMiddle,
- GridDataRight& provRight) :
+ GridDataMiddle& provMiddle) :
gridL_(gridL), gridC_(gridC), gridR_(gridR), scrollMaster(nullptr),
- provLeft_(provLeft), provMiddle_(provMiddle), provRight_(provRight),
+ provMiddle_(provMiddle),
scrollbarUpdatePending(false)
{
gridL_.Connect(EVENT_GRID_COL_RESIZE, GridColumnResizeEventHandler(GridEventManager::onResizeColumnL), nullptr, this);
@@ -1258,13 +1278,7 @@ private:
void onCenterMouseMovement(wxMouseEvent& event)
{
- const wxPoint& topLeftAbs = gridC_.CalcUnscrolledPosition(event.GetPosition());
- const ptrdiff_t row = gridC_.getRowAtPos(topLeftAbs.y); //return -1 for invalid position, rowCount if one past the end
- if (auto colInfo = gridC_.getColumnAtPos(topLeftAbs.x)) //(column type, component position)
- {
- //redirect mouse movement to middle grid component
- provMiddle_.onMouseMovement(event.GetPosition(), row, colInfo->first);
- }
+ provMiddle_.onMouseMovement(event.GetPosition());
event.Skip();
}
@@ -1442,10 +1456,7 @@ private:
const Grid* scrollMaster; //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
- GridDataLeft& provLeft_;
GridDataMiddle& provMiddle_;
- GridDataRight& provRight_;
-
bool scrollbarUpdatePending;
};
}
@@ -1462,7 +1473,7 @@ void gridview::init(Grid& gridLeft, Grid& gridCenter, Grid& gridRight, const std
gridCenter.setDataProvider(provMiddle_); //ownership must belong *exclusively* to grid!
gridRight .setDataProvider(provRight_);
- auto evtMgr = std::make_shared<GridEventManager>(gridLeft, gridCenter, gridRight, *provLeft_, *provMiddle_, *provRight_);
+ auto evtMgr = std::make_shared<GridEventManager>(gridLeft, gridCenter, gridRight, *provMiddle_);
provLeft_ ->holdOwnership(evtMgr);
provMiddle_->holdOwnership(evtMgr);
provRight_ ->holdOwnership(evtMgr);
@@ -1536,16 +1547,22 @@ public:
IconUpdater(GridDataLeft& provLeft, GridDataRight& provRight, IconBuffer& iconBuffer) : provLeft_(provLeft), provRight_(provRight), iconBuffer_(iconBuffer)
{
timer.Connect(wxEVT_TIMER, wxEventHandler(IconUpdater::loadIconsAsynchronously), nullptr, this);
- timer.Start(50); //timer interval in ms
}
+ void start() { if (!timer.IsRunning()) timer.Start(50); } //timer interval in [ms]
+
private:
+ void stop() { if ( timer.IsRunning()) timer.Stop(); }
+
void loadIconsAsynchronously(wxEvent& event) //loads all (not yet) drawn icons
{
std::vector<Zstring> newLoad;
- provLeft_ .addIconsToBeLoaded(newLoad); //loads all (not yet) drawn icons
- provRight_.addIconsToBeLoaded(newLoad); //
+ provLeft_ .updateNewAndGetMissingIcons(newLoad);
+ provRight_.updateNewAndGetMissingIcons(newLoad);
iconBuffer_.setWorkload(newLoad);
+
+ if (newLoad.empty()) //let's only pay for iconupdater when needed
+ stop();
}
GridDataLeft& provLeft_;
@@ -1553,6 +1570,11 @@ private:
IconBuffer& iconBuffer_;
wxTimer timer;
};
+
+
+//resolve circular linker dependencies
+inline
+void IconManager::startIconUpdater() { if (iconUpdater) iconUpdater->start(); }
}
@@ -1566,18 +1588,16 @@ void gridview::setupIcons(Grid& gridLeft, Grid& gridCenter, Grid& gridRight, boo
int iconHeight = 0;
if (show)
{
- auto iconMgr = std::make_shared<IconManager>(sz);
- iconMgr->iconUpdater.reset(new IconUpdater(*provLeft, *provRight, iconMgr->iconBuffer));
-
+ auto iconMgr = std::make_shared<IconManager>(*provLeft, *provRight, sz);
provLeft ->setIconManager(iconMgr);
provRight->setIconManager(iconMgr);
- iconHeight = iconMgr->iconBuffer.getSize();
+ iconHeight = iconMgr->refIconBuffer().getSize();
}
else
{
provLeft ->setIconManager(nullptr);
provRight->setIconManager(nullptr);
- iconHeight = IconBuffer(IconBuffer::SIZE_SMALL).getSize();
+ iconHeight = IconBuffer::getSize(IconBuffer::SIZE_SMALL);
}
const int newRowHeight = std::max(iconHeight, gridLeft.getMainWin().GetCharHeight()) + 1; //add some space
diff --git a/ui/dir_name.cpp b/ui/dir_name.cpp
index a1a00d74..6d0da14b 100644
--- a/ui/dir_name.cpp
+++ b/ui/dir_name.cpp
@@ -243,5 +243,8 @@ void DirectoryName<NameControl>::setName(const wxString& dirname)
//explicit template instantiations
+namespace zen
+{
template class DirectoryName<wxTextCtrl>;
template class DirectoryName<FolderHistoryBox>;
+}
diff --git a/ui/exec_finished_box.cpp b/ui/exec_finished_box.cpp
index bbd37301..74c10493 100644
--- a/ui/exec_finished_box.cpp
+++ b/ui/exec_finished_box.cpp
@@ -52,6 +52,10 @@ std::vector<std::pair<std::wstring, std::wstring>> getDefaultCommands() //(gui n
//addEntry(_("Hibernate"), L"sudo pm-hibernate");
//alternative: "pmi action suspend" and "pmi action hibernate", require "sudo apt-get install powermanagement-interaface"
+#elif defined FFS_MAC
+ addEntry(_("Standby" ), L"osascript -e \'tell application \"System Events\" to sleep\'");
+ addEntry(_("Log off" ), L"osascript -e \'tell application \"System Events\" to log out\'");
+ addEntry(_("Shut down"), L"osascript -e \'tell application \"System Events\" to shut down\'");
#endif
return output;
}
diff --git a/ui/folder_history_box.cpp b/ui/folder_history_box.cpp
index 41e0a1fe..466fbba1 100644
--- a/ui/folder_history_box.cpp
+++ b/ui/folder_history_box.cpp
@@ -6,12 +6,14 @@
#include "folder_history_box.h"
#include <list>
+#include <zen/scope_guard.h>
#include <wx/scrolwin.h>
-#include "../lib/resolve_path.h"
#include <wx+/string_conv.h>
+#include "../lib/resolve_path.h"
using namespace zen;
+
namespace
{
const wxEventType wxEVT_VALIDATE_USER_SELECTION = wxNewEventType();
@@ -29,27 +31,37 @@ FolderHistoryBox::FolderHistoryBox(wxWindow* parent,
const wxString& name) :
wxComboBox(parent, id, value, pos, size, n, choices, style, validator, name)
#if wxCHECK_VERSION(2, 9, 1)
- , dropDownShown(false)
+ ,dropDownShown(false)
#endif
{
//#####################################
/*##*/ SetMinSize(wxSize(150, -1)); //## workaround yet another wxWidgets bug: default minimum size is much too large for a wxComboBox
//#####################################
- Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(FolderHistoryBox::OnKeyEvent ), nullptr, this);
+ Connect(wxEVT_KEY_DOWN, wxKeyEventHandler (FolderHistoryBox::OnKeyEvent ), nullptr, this);
Connect(wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler(FolderHistoryBox::OnSelection ), nullptr, this);
- Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(FolderHistoryBox::OnMouseWheel), nullptr, this);
-#ifdef FFS_WIN //on Win, this event only fires, when clicking on the small down arrow, NOT when clicking on the text field
+ Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler (FolderHistoryBox::OnMouseWheel), nullptr, this);
+
+ warn_static("mac")
+
+#if defined FFS_WIN
+ //on Win, this mouse click event only fires, when clicking on the small down arrow, NOT when clicking on the text field
//thanks to wxWidgets' non-portability it's exactly the converse on Linux!
- Connect(wxEVT_LEFT_DOWN, wxEventHandler(FolderHistoryBox::OnUpdateList), nullptr, this);
-#elif defined FFS_LINUX //update on each text change: maybe a little too often, but we have no choice as long as we don't have an event right before showing the drop-down list
- Connect(wxEVT_COMMAND_TEXT_UPDATED, wxEventHandler(FolderHistoryBox::OnUpdateList), nullptr, this);
+ Connect(wxEVT_LEFT_DOWN, wxEventHandler(FolderHistoryBox::OnMouseClick), nullptr, this);
+#elif defined FFS_LINUX //update on each text change: maybe a little too often, but we have no choice as long as we don't have an event right before showing the drop-down list
+ Connect(wxEVT_COMMAND_TEXT_UPDATED, wxEventHandler(FolderHistoryBox::OnMouseClick), nullptr, this);
+#elif defined FFS_MAC
+ /*
+ calling setValueAndUpdateList()...
+ - on wxEVT_COMMAND_TEXT_UPDATED leads to endless loop (SetValue() seems to emit another wxEVT_COMMAND_TEXT_UPDATED asychronously)
+ - on wxEVT_LEFT_DOWN leads to occasional crashes, especially when double-clicking
+
+ */
#endif
-
#if wxCHECK_VERSION(2, 9, 1)
- Connect(wxEVT_COMMAND_COMBOBOX_DROPDOWN, wxCommandEventHandler(FolderHistoryBox::OnShowDropDown), nullptr, this);
- Connect(wxEVT_COMMAND_COMBOBOX_CLOSEUP, wxCommandEventHandler(FolderHistoryBox::OnHideDropDown), nullptr, this);
+ Connect(wxEVT_COMMAND_COMBOBOX_DROPDOWN, wxCommandEventHandler(FolderHistoryBox::OnShowDropDown), nullptr, this); //only supported on Win/GTK
+ Connect(wxEVT_COMMAND_COMBOBOX_CLOSEUP, wxCommandEventHandler(FolderHistoryBox::OnHideDropDown), nullptr, this); //
#endif
Connect(wxEVT_VALIDATE_USER_SELECTION, wxCommandEventHandler(FolderHistoryBox::OnValidateSelection), nullptr, this);
@@ -110,7 +122,7 @@ void FolderHistoryBox::setValueAndUpdateList(const wxString& dirname)
void FolderHistoryBox::OnSelection(wxCommandEvent& event)
{
wxCommandEvent dummy2(wxEVT_VALIDATE_USER_SELECTION); //we cannot replace built-in commands at this position in call stack, so defer to a later time!
- if (auto handler = GetEventHandler())
+ if (wxEvtHandler* handler = GetEventHandler())
handler->AddPendingEvent(dummy2);
event.Skip();
diff --git a/ui/folder_history_box.h b/ui/folder_history_box.h
index f5a4f0dc..695ee930 100644
--- a/ui/folder_history_box.h
+++ b/ui/folder_history_box.h
@@ -90,7 +90,7 @@ private:
void OnMouseWheel(wxMouseEvent& event);
void OnSelection(wxCommandEvent& event);
void OnValidateSelection(wxCommandEvent& event);
- void OnUpdateList(wxEvent& event) { setValueAndUpdateList(GetValue()); event.Skip(); }
+ void OnMouseClick(wxEvent& event) { setValueAndUpdateList(GetValue()); event.Skip(); }
void setValueAndUpdateList(const wxString& dirname);
diff --git a/ui/folder_pair.h b/ui/folder_pair.h
index 4337efc6..421aadba 100644
--- a/ui/folder_pair.h
+++ b/ui/folder_pair.h
@@ -47,8 +47,7 @@ public:
if (altCompConfig.get())
{
setImage(*basicPanel_.m_bpButtonAltCompCfg, GlobalResources::getImage(L"cmpConfigSmall"));
- basicPanel_.m_bpButtonAltCompCfg->SetToolTip(_("Select alternate comparison settings") + L" \n" +
- L"(" + getVariantName(altCompConfig->compareVar) + L")");
+ basicPanel_.m_bpButtonAltCompCfg->SetToolTip(_("Selected variant:") + L" " + getVariantName(altCompConfig->compareVar));
}
else
{
@@ -59,8 +58,7 @@ public:
if (altSyncConfig.get())
{
setImage(*basicPanel_.m_bpButtonAltSyncCfg, GlobalResources::getImage(L"syncConfigSmall"));
- basicPanel_.m_bpButtonAltSyncCfg->SetToolTip(_("Select alternate synchronization settings") + L" \n" +
- L"(" + getVariantName(altSyncConfig->directionCfg.var) + L")");
+ basicPanel_.m_bpButtonAltSyncCfg->SetToolTip(_("Selected variant:") + L" " + getVariantName(altSyncConfig->directionCfg.var));
}
else
{
diff --git a/ui/gui_generated.cpp b/ui/gui_generated.cpp
index 84d86ceb..37d768cf 100644
--- a/ui/gui_generated.cpp
+++ b/ui/gui_generated.cpp
@@ -20,3505 +20,3484 @@
MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 640,400 ), wxDefaultSize );
-
- m_menubar1 = new wxMenuBar( 0 );
- m_menuFile = new wxMenu();
- m_menuItemNew = new wxMenuItem( m_menuFile, wxID_NEW, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL );
-#ifdef __WXMSW__
- m_menuItemNew->SetBitmaps( wxNullBitmap );
-#elif defined( __WXGTK__ )
- m_menuItemNew->SetBitmap( wxNullBitmap );
-#endif
- m_menuFile->Append( m_menuItemNew );
-
- m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( _("&Open...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemLoad );
-
- 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_menuItem7 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("Save as &batch job...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem7 );
-
- m_menuFile->AppendSeparator();
-
- m_menuItem10 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("1. &Compare") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
-#ifdef __WXMSW__
- m_menuItem10->SetBitmaps( wxNullBitmap );
-#elif defined( __WXGTK__ )
- m_menuItem10->SetBitmap( wxNullBitmap );
-#endif
- m_menuFile->Append( m_menuItem10 );
-
- m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL );
-#ifdef __WXMSW__
- m_menuItem11->SetBitmaps( wxNullBitmap );
-#elif defined( __WXGTK__ )
- m_menuItem11->SetBitmap( wxNullBitmap );
-#endif
- m_menuFile->Append( m_menuItem11 );
-
- m_menuFile->AppendSeparator();
-
- wxMenuItem* m_menuItem4;
- m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem4 );
-
- m_menubar1->Append( m_menuFile, _("&Program") );
-
- m_menuAdvanced = new wxMenu();
- m_menuLanguages = new wxMenu();
- m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages );
-
- m_menuAdvanced->AppendSeparator();
-
- m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_PREFERENCES, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuAdvanced->Append( m_menuItemGlobSett );
-
- wxMenuItem* m_menuItem5;
- m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuAdvanced->Append( m_menuItem5 );
-
- m_menubar1->Append( m_menuAdvanced, _("&Advanced") );
-
- m_menuHelp = new wxMenu();
- m_menuItemManual = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemManual );
-
- m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemCheckVer );
-
- m_menuHelp->AppendSeparator();
-
- m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemAbout );
-
- m_menubar1->Append( m_menuHelp, _("&Help") );
-
- this->SetMenuBar( m_menubar1 );
-
- bSizerPanelHolder = new wxBoxSizer( wxVERTICAL );
-
- m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
- bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer155;
- bSizer155 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer155->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxFlexGridSizer* fgSizer121;
- fgSizer121 = new wxFlexGridSizer( 2, 2, 0, 0 );
- fgSizer121->SetFlexibleDirection( wxBOTH );
- fgSizer121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_staticTextCmpVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCmpVariant->Wrap( -1 );
- m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
- m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- fgSizer121->Add( m_staticTextCmpVariant, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP, 1 );
-
-
- fgSizer121->Add( 0, 0, 1, 0, 5 );
-
- wxBoxSizer* bSizer30;
- bSizer30 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonCompare = new zen::BitmapButton( m_panelTopButtons, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,46 ), 0 );
- m_buttonCompare->SetDefault();
- m_buttonCompare->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
- m_buttonCompare->SetToolTip( _("dummy") );
-
- bSizer30->Add( m_buttonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonAbort = new wxButton( m_panelTopButtons, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 180,42 ), 0 );
- m_buttonAbort->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
- m_buttonAbort->Enable( false );
- m_buttonAbort->Hide();
-
- bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- fgSizer121->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,46 ), wxBU_AUTODRAW );
- m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
-
- fgSizer121->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
-
-
- bSizer155->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
-
-
- bSizerTopButtons->Add( bSizer155, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerTopButtons->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer1551;
- bSizer1551 = new wxBoxSizer( wxHORIZONTAL );
-
- wxFlexGridSizer* fgSizer12;
- fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 );
- fgSizer12->SetFlexibleDirection( wxBOTH );
- fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
-
- fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_staticTextSyncVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSyncVariant->Wrap( -1 );
- m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
- m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- fgSizer12->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP, 1 );
-
- m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,46 ), wxBU_AUTODRAW );
- m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
-
- fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
-
- m_buttonSync = new zen::BitmapButton( m_panelTopButtons, wxID_ANY, _("Synchronize"), wxDefaultPosition, wxSize( 180,46 ), 0 );
- m_buttonSync->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
- m_buttonSync->SetToolTip( _("dummy") );
-
- fgSizer12->Add( m_buttonSync, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer1551->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
-
-
- bSizer1551->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerTopButtons->Add( bSizer1551, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelTopButtons->SetSizer( bSizerTopButtons );
- m_panelTopButtons->Layout();
- bSizerTopButtons->Fit( m_panelTopButtons );
- bSizerPanelHolder->Add( m_panelTopButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1601;
- bSizer1601 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer91;
- bSizer91 = new wxBoxSizer( wxHORIZONTAL );
-
- m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelTopLeft->SetMinSize( wxSize( 1,-1 ) );
-
- 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 );
-
- 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 );
-
- m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
-
- bSizer159->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
-
- bSizer159->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- fgSizer8->Add( bSizer159, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer182;
- bSizer182 = new wxBoxSizer( wxHORIZONTAL );
-
- m_directoryLeft = new FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer182->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonSelectDirLeft = new wxButton( m_panelTopLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectDirLeft->SetToolTip( _("Select a folder") );
-
- bSizer182->Add( m_buttonSelectDirLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- fgSizer8->Add( bSizer182, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- m_panelTopLeft->SetSizer( fgSizer8 );
- m_panelTopLeft->Layout();
- fgSizer8->Fit( m_panelTopLeft );
- bSizer91->Add( m_panelTopLeft, 1, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelTopMiddle = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1771;
- bSizer1771 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer1771->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonSwapSides = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
- m_bpButtonSwapSides->SetToolTip( _("Swap sides") );
-
- bSizer1771->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer160;
- bSizer160 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonAltCompCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- bSizer160->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
-
- m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- bSizer160->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer1771->Add( bSizer160, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer1771->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- m_panelTopMiddle->SetSizer( bSizer1771 );
- m_panelTopMiddle->Layout();
- bSizer1771->Fit( m_panelTopMiddle );
- bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelTopRight->SetMinSize( wxSize( 1,-1 ) );
-
- wxBoxSizer* bSizer183;
- bSizer183 = new wxBoxSizer( wxVERTICAL );
-
- m_staticTextResolvedPathR = new wxStaticText( m_panelTopRight, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextResolvedPathR->Wrap( -1 );
- bSizer183->Add( m_staticTextResolvedPathR, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
-
- wxBoxSizer* bSizer179;
- bSizer179 = new wxBoxSizer( wxHORIZONTAL );
-
- m_directoryRight = new FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer179->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonSelectDirRight = new wxButton( m_panelTopRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectDirRight->SetToolTip( _("Select a folder") );
-
- bSizer179->Add( m_buttonSelectDirRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer183->Add( bSizer179, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- m_panelTopRight->SetSizer( bSizer183 );
- m_panelTopRight->Layout();
- bSizer183->Fit( m_panelTopRight );
- bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
-
- bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 );
-
- m_scrolledWindowFolderPairs = new wxScrolledWindow( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
- m_scrolledWindowFolderPairs->SetScrollRate( 10, 10 );
- m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) );
-
- bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL );
-
-
- m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs );
- m_scrolledWindowFolderPairs->Layout();
- bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs );
- bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- m_panelDirectoryPairs->SetSizer( bSizer1601 );
- m_panelDirectoryPairs->Layout();
- bSizer1601->Fit( m_panelDirectoryPairs );
- bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_gridNavi = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_gridNavi->SetScrollRate( 5, 5 );
- bSizerPanelHolder->Add( m_gridNavi, 1, wxEXPAND, 5 );
-
- m_panelCenter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1711;
- bSizer1711 = new wxBoxSizer( wxVERTICAL );
-
- m_splitterMain = new zen::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_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_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, wxSTATIC_BORDER|wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer451;
- bSizer451 = new wxBoxSizer( wxHORIZONTAL );
-
- bSizer451->SetMinSize( wxSize( -1,22 ) );
- bSizerFileStatus = new wxBoxSizer( wxHORIZONTAL );
-
- bSizerStatusLeft = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer53;
- bSizer53 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 );
-
- m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusLeftDirs->Wrap( -1 );
- bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
-
- m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 );
-
- m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusLeftFiles->Wrap( -1 );
- bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
-
- m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusLeftBytes->Wrap( -1 );
- bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusLeft->Add( bSizer53, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizerStatusLeft->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP, 2 );
-
-
- bSizerFileStatus->Add( bSizerStatusLeft, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusMiddle->Wrap( -1 );
- m_staticTextStatusMiddle->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- bSizerFileStatus->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusRight = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizerStatusRight->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 );
-
- wxBoxSizer* bSizer52;
- bSizer52 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 );
-
- m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusRightDirs->Wrap( -1 );
- bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
-
- m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 );
-
- m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusRightFiles->Wrap( -1 );
- bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
-
- m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusRightBytes->Wrap( -1 );
- bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusRight->Add( bSizer52, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerFileStatus->Add( bSizerStatusRight, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer451->Add( bSizerFileStatus, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticTextFullStatus = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextFullStatus->Wrap( -1 );
- m_staticTextFullStatus->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
-
- bSizer451->Add( m_staticTextFullStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- m_panelStatusBar->SetSizer( bSizer451 );
- m_panelStatusBar->Layout();
- bSizer451->Fit( m_panelStatusBar );
- bSizer1711->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
-
- m_panelCenter->SetSizer( bSizer1711 );
- m_panelCenter->Layout();
- bSizer1711->Fit( m_panelCenter );
- bSizerPanelHolder->Add( m_panelCenter, 1, wxEXPAND, 5 );
-
- m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizerConfig = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer151;
- bSizer151 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonOpen = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- m_bpButtonOpen->SetToolTip( _("dummy") );
-
- bSizer151->Add( m_bpButtonOpen, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- m_bpButtonSave->SetToolTip( _("dummy") );
-
- bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonBatchJob = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- m_bpButtonBatchJob->SetToolTip( _("Save as batch job") );
-
- bSizer151->Add( m_bpButtonBatchJob, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerConfig->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_listBoxHistory = new wxListBox( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_SORT );
- m_listBoxHistory->SetMinSize( wxSize( -1,40 ) );
-
- bSizerConfig->Add( m_listBoxHistory, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelConfig->SetSizer( bSizerConfig );
- m_panelConfig->Layout();
- bSizerConfig->Fit( m_panelConfig );
- bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 );
-
- m_panelFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer171;
- bSizer171 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
- bSizer171->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_checkBoxHideExcluded = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxHideExcluded->SetToolTip( _("Show filtered or temporarily excluded files") );
-
- bSizer171->Add( m_checkBoxHideExcluded, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- m_panelFilter->SetSizer( bSizer171 );
- m_panelFilter->Layout();
- bSizer171->Fit( m_panelFilter );
- bSizerPanelHolder->Add( m_panelFilter, 0, 0, 5 );
-
- m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizer1801 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer1801->Add( 0, 0, 1, wxEXPAND, 5 );
-
- bSizerStatistics = new wxBoxSizer( wxHORIZONTAL );
-
- 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") );
-
- bSizer1712->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer1712->Add( 5, 2, 0, 0, 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") );
-
- bSizer1712->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizerStatistics->Add( bSizer1712, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizerStatistics->Add( 5, 5, 0, 0, 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 overwritten") );
-
- bSizer172->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer172->Add( 5, 2, 0, 0, 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 overwritten") );
-
- bSizer172->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizerStatistics->Add( bSizer172, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizerStatistics->Add( 5, 5, 0, 0, 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") );
-
- bSizer173->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer173->Add( 5, 2, 0, 0, 5 );
-
-
- bSizer173->Add( 0, 0, 1, wxEXPAND, 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 );
-
-
- bSizerStatistics->Add( bSizer173, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizerStatistics->Add( 5, 5, 0, 0, 5 );
-
- bSizerData = new wxBoxSizer( wxVERTICAL );
-
- m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapData->SetToolTip( _("Total bytes to copy") );
-
- bSizerData->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizerData->Add( 5, 2, 0, 0, 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") );
-
- bSizerData->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatistics->Add( bSizerData, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizerStatistics->Add( 5, 5, 0, 0, 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") );
-
- bSizer176->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer176->Add( 5, 2, 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") );
-
- bSizer176->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatistics->Add( bSizer176, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizerStatistics->Add( 5, 5, 0, 0, 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 overwritten") );
-
- bSizer177->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer177->Add( 5, 2, 0, 0, 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 overwritten") );
-
- bSizer177->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatistics->Add( bSizer177, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizerStatistics->Add( 5, 5, 0, 0, 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") );
-
- bSizer178->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer178->Add( 5, 2, 0, 0, 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") );
-
- bSizer178->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatistics->Add( bSizer178, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer1801->Add( bSizerStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer1801->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- m_panelStatistics->SetSizer( bSizer1801 );
- m_panelStatistics->Layout();
- bSizer1801->Fit( m_panelStatistics );
- bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonShowCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowUpdateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowDoNothing = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowDoNothing, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowUpdateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonShowConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonShowConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- m_panelViewFilter->SetSizer( bSizerViewFilter );
- m_panelViewFilter->Layout();
- bSizerViewFilter->Fit( m_panelViewFilter );
- bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- this->SetSizer( bSizerPanelHolder );
- this->Layout();
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
- this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigNew ) );
- this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ) );
- this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ) );
- this->Connect( m_menuItemSaveAs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSaveAs ) );
- this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ) );
- this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) );
- this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) );
- this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
- this->Connect( m_menuItemGlobSett->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) );
- this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) );
- this->Connect( m_menuItemManual->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) );
- this->Connect( m_menuItemCheckVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) );
- this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) );
- m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
- m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this );
- m_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCompSettingsContext ), NULL, this );
- m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this );
- m_bpButtonSyncConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnSyncSettingsContext ), NULL, this );
- m_buttonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this );
- m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
- m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
- m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), 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_bpButtonBatchJob->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ), NULL, this );
- m_listBoxHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
- m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
- m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistoryDoubleClick ), NULL, this );
- m_listBoxHistory->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCfgHistoryRightClick ), NULL, this );
- m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
- m_bpButtonFilter->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnGlobalFilterContext ), NULL, this );
- m_checkBoxHideExcluded->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnShowExcluded ), NULL, this );
- m_bpButtonShowCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowCreateLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowUpdateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowUpdateLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDeleteLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowLeftOnly->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowLeftNewer->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowEqual->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDifferent->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowDoNothing->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDoNothing->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowRightNewer->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowRightOnly->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDeleteRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowUpdateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowUpdateRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowCreateRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowConflict->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ this->SetSizeHints( wxSize( 640,400 ), wxDefaultSize );
+
+ m_menubar1 = 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 );
+ #ifdef __WXMSW__
+ m_menuItemNew->SetBitmaps( wxNullBitmap );
+ #elif defined( __WXGTK__ )
+ m_menuItemNew->SetBitmap( wxNullBitmap );
+ #endif
+ 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_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_menuItem7 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("Save as &batch job...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem7 );
+
+ m_menuFile->AppendSeparator();
+
+ m_menuItem10 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("1. &Compare") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
+ #ifdef __WXMSW__
+ m_menuItem10->SetBitmaps( wxNullBitmap );
+ #elif defined( __WXGTK__ )
+ m_menuItem10->SetBitmap( wxNullBitmap );
+ #endif
+ m_menuFile->Append( m_menuItem10 );
+
+ m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL );
+ #ifdef __WXMSW__
+ m_menuItem11->SetBitmaps( wxNullBitmap );
+ #elif defined( __WXGTK__ )
+ m_menuItem11->SetBitmap( wxNullBitmap );
+ #endif
+ m_menuFile->Append( m_menuItem11 );
+
+ m_menuFile->AppendSeparator();
+
+ wxMenuItem* m_menuItem4;
+ m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem4 );
+
+ m_menubar1->Append( m_menuFile, _("&Program") );
+
+ m_menuAdvanced = new wxMenu();
+ m_menuLanguages = new wxMenu();
+ m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages );
+
+ m_menuAdvanced->AppendSeparator();
+
+ m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_PREFERENCES, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuAdvanced->Append( m_menuItemGlobSett );
+
+ wxMenuItem* m_menuItem5;
+ m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuAdvanced->Append( m_menuItem5 );
+
+ m_menubar1->Append( m_menuAdvanced, _("&Advanced") );
+
+ m_menuHelp = new wxMenu();
+ m_menuItemManual = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemManual );
+
+ m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemCheckVer );
+
+ m_menuHelp->AppendSeparator();
+
+ m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemAbout );
+
+ m_menubar1->Append( m_menuHelp, _("&Help") );
+
+ this->SetMenuBar( m_menubar1 );
+
+ bSizerPanelHolder = new wxBoxSizer( wxVERTICAL );
+
+ m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
+ bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerTopButtons->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxFlexGridSizer* fgSizer121;
+ fgSizer121 = new wxFlexGridSizer( 2, 2, 0, 0 );
+ fgSizer121->SetFlexibleDirection( wxBOTH );
+ fgSizer121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticTextCmpVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCmpVariant->Wrap( -1 );
+ m_staticTextCmpVariant->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ fgSizer121->Add( m_staticTextCmpVariant, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP, 1 );
+
+
+ fgSizer121->Add( 0, 0, 1, 0, 5 );
+
+ wxBoxSizer* bSizer30;
+ bSizer30 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonCompare = new zen::BitmapButton( m_panelTopButtons, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,-1 ), 0 );
+ m_buttonCompare->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_buttonCompare->SetToolTip( _("dummy") );
+
+ bSizer30->Add( m_buttonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonAbort = new zen::BitmapButton( m_panelTopButtons, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 180,-1 ), 0 );
+ m_buttonAbort->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_buttonAbort->Enable( false );
+ m_buttonAbort->Hide();
+
+ bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ fgSizer121->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
+ m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
+
+ fgSizer121->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
+
+
+ bSizerTopButtons->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+
+
+ bSizerTopButtons->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxFlexGridSizer* fgSizer12;
+ fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 );
+ fgSizer12->SetFlexibleDirection( wxBOTH );
+ fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+
+ fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_staticTextSyncVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSyncVariant->Wrap( -1 );
+ m_staticTextSyncVariant->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ fgSizer12->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP, 1 );
+
+ m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
+ m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
+
+ fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
+
+ m_buttonSync = new zen::BitmapButton( m_panelTopButtons, wxID_ANY, _("Synchronize"), wxDefaultPosition, wxSize( 180,-1 ), 0 );
+ m_buttonSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_buttonSync->SetToolTip( _("dummy") );
+
+ fgSizer12->Add( m_buttonSync, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizerTopButtons->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+
+
+ bSizerTopButtons->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panelTopButtons->SetSizer( bSizerTopButtons );
+ m_panelTopButtons->Layout();
+ bSizerTopButtons->Fit( m_panelTopButtons );
+ bSizerPanelHolder->Add( m_panelTopButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1601;
+ bSizer1601 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer91;
+ bSizer91 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopLeft->SetMinSize( wxSize( 1,-1 ) );
+
+ 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 );
+
+ 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 );
+
+ m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
+
+ bSizer159->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
+
+ bSizer159->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizer8->Add( bSizer159, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer182;
+ bSizer182 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryLeft = new FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer182->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonSelectDirLeft = new wxButton( m_panelTopLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectDirLeft->SetToolTip( _("Select a folder") );
+
+ bSizer182->Add( m_buttonSelectDirLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizer8->Add( bSizer182, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ m_panelTopLeft->SetSizer( fgSizer8 );
+ m_panelTopLeft->Layout();
+ fgSizer8->Fit( m_panelTopLeft );
+ bSizer91->Add( m_panelTopLeft, 1, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelTopMiddle = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1771;
+ bSizer1771 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer1771->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonSwapSides = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
+ m_bpButtonSwapSides->SetToolTip( _("Swap sides") );
+
+ bSizer1771->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer160;
+ bSizer160 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonAltCompCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ bSizer160->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
+
+ m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ bSizer160->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer1771->Add( bSizer160, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer1771->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panelTopMiddle->SetSizer( bSizer1771 );
+ m_panelTopMiddle->Layout();
+ bSizer1771->Fit( m_panelTopMiddle );
+ bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopRight->SetMinSize( wxSize( 1,-1 ) );
+
+ wxBoxSizer* bSizer183;
+ bSizer183 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextResolvedPathR = new wxStaticText( m_panelTopRight, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextResolvedPathR->Wrap( -1 );
+ bSizer183->Add( m_staticTextResolvedPathR, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+ wxBoxSizer* bSizer179;
+ bSizer179 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryRight = new FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer179->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonSelectDirRight = new wxButton( m_panelTopRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectDirRight->SetToolTip( _("Select a folder") );
+
+ bSizer179->Add( m_buttonSelectDirRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer183->Add( bSizer179, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ m_panelTopRight->SetSizer( bSizer183 );
+ m_panelTopRight->Layout();
+ bSizer183->Fit( m_panelTopRight );
+ bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+
+ bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 );
+
+ m_scrolledWindowFolderPairs = new wxScrolledWindow( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
+ m_scrolledWindowFolderPairs->SetScrollRate( 10, 10 );
+ m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) );
+
+ bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL );
+
+
+ m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs );
+ m_scrolledWindowFolderPairs->Layout();
+ bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs );
+ bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ m_panelDirectoryPairs->SetSizer( bSizer1601 );
+ m_panelDirectoryPairs->Layout();
+ bSizer1601->Fit( m_panelDirectoryPairs );
+ bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_gridNavi = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridNavi->SetScrollRate( 5, 5 );
+ bSizerPanelHolder->Add( m_gridNavi, 1, wxEXPAND, 5 );
+
+ m_panelCenter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1711;
+ bSizer1711 = new wxBoxSizer( wxVERTICAL );
+
+ m_splitterMain = new zen::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_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_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, wxSTATIC_BORDER|wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer451;
+ bSizer451 = new wxBoxSizer( wxHORIZONTAL );
+
+ bSizer451->SetMinSize( wxSize( -1,22 ) );
+ bSizerFileStatus = new wxBoxSizer( wxHORIZONTAL );
+
+ bSizerStatusLeft = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer53;
+ bSizer53 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 );
+
+ m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusLeftDirs->Wrap( -1 );
+ bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
+
+ m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 );
+
+ m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusLeftFiles->Wrap( -1 );
+ bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
+
+ m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusLeftBytes->Wrap( -1 );
+ bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusLeft->Add( bSizer53, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizerStatusLeft->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP, 2 );
+
+
+ bSizerFileStatus->Add( bSizerStatusLeft, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusMiddle->Wrap( -1 );
+ m_staticTextStatusMiddle->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerFileStatus->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusRight = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizerStatusRight->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 );
+
+ wxBoxSizer* bSizer52;
+ bSizer52 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 );
+
+ m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusRightDirs->Wrap( -1 );
+ bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
+
+ m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 );
+
+ m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusRightFiles->Wrap( -1 );
+ bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
+
+ m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusRightBytes->Wrap( -1 );
+ bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusRight->Add( bSizer52, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerFileStatus->Add( bSizerStatusRight, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer451->Add( bSizerFileStatus, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextFullStatus = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFullStatus->Wrap( -1 );
+ m_staticTextFullStatus->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer451->Add( m_staticTextFullStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ m_panelStatusBar->SetSizer( bSizer451 );
+ m_panelStatusBar->Layout();
+ bSizer451->Fit( m_panelStatusBar );
+ bSizer1711->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+
+ m_panelCenter->SetSizer( bSizer1711 );
+ m_panelCenter->Layout();
+ bSizer1711->Fit( m_panelCenter );
+ bSizerPanelHolder->Add( m_panelCenter, 1, wxEXPAND, 5 );
+
+ m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerConfig = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer151;
+ bSizer151 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonOpen = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ m_bpButtonOpen->SetToolTip( _("dummy") );
+
+ bSizer151->Add( m_bpButtonOpen, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ m_bpButtonSave->SetToolTip( _("dummy") );
+
+ bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonBatchJob = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ m_bpButtonBatchJob->SetToolTip( _("Save as batch job") );
+
+ bSizer151->Add( m_bpButtonBatchJob, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerConfig->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_listBoxHistory = new wxListBox( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_SORT );
+ m_listBoxHistory->SetMinSize( wxSize( -1,40 ) );
+
+ bSizerConfig->Add( m_listBoxHistory, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panelConfig->SetSizer( bSizerConfig );
+ m_panelConfig->Layout();
+ bSizerConfig->Fit( m_panelConfig );
+ bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 );
+
+ m_panelFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer171;
+ bSizer171 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
+ bSizer171->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_checkBoxHideExcluded = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxHideExcluded->SetToolTip( _("Show filtered or temporarily excluded files") );
+
+ bSizer171->Add( m_checkBoxHideExcluded, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ m_panelFilter->SetSizer( bSizer171 );
+ m_panelFilter->Layout();
+ bSizer171->Fit( m_panelFilter );
+ bSizerPanelHolder->Add( m_panelFilter, 0, 0, 5 );
+
+ m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizer1801 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer1801->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizerStatistics = new wxBoxSizer( wxHORIZONTAL );
+
+ 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") );
+
+ bSizer1712->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer1712->Add( 5, 2, 0, 0, 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") );
+
+ bSizer1712->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerStatistics->Add( bSizer1712, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizerStatistics->Add( 5, 5, 0, 0, 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 overwritten") );
+
+ bSizer172->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer172->Add( 5, 2, 0, 0, 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 overwritten") );
+
+ bSizer172->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerStatistics->Add( bSizer172, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizerStatistics->Add( 5, 5, 0, 0, 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") );
+
+ bSizer173->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer173->Add( 5, 2, 0, 0, 5 );
+
+
+ bSizer173->Add( 0, 0, 1, wxEXPAND, 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 );
+
+
+ bSizerStatistics->Add( bSizer173, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizerStatistics->Add( 5, 5, 0, 0, 5 );
+
+ bSizerData = new wxBoxSizer( wxVERTICAL );
+
+ m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapData->SetToolTip( _("Total bytes to copy") );
+
+ bSizerData->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerData->Add( 5, 2, 0, 0, 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") );
+
+ bSizerData->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatistics->Add( bSizerData, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizerStatistics->Add( 5, 5, 0, 0, 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") );
+
+ bSizer176->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer176->Add( 5, 2, 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") );
+
+ bSizer176->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatistics->Add( bSizer176, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizerStatistics->Add( 5, 5, 0, 0, 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 overwritten") );
+
+ bSizer177->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer177->Add( 5, 2, 0, 0, 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 overwritten") );
+
+ bSizer177->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatistics->Add( bSizer177, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizerStatistics->Add( 5, 5, 0, 0, 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") );
+
+ bSizer178->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer178->Add( 5, 2, 0, 0, 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") );
+
+ bSizer178->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatistics->Add( bSizer178, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer1801->Add( bSizerStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer1801->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panelStatistics->SetSizer( bSizer1801 );
+ m_panelStatistics->Layout();
+ bSizer1801->Fit( m_panelStatistics );
+ bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonShowCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowUpdateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowDoNothing = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowDoNothing, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowUpdateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonShowConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonShowConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panelViewFilter->SetSizer( bSizerViewFilter );
+ m_panelViewFilter->Layout();
+ bSizerViewFilter->Fit( m_panelViewFilter );
+ bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ this->SetSizer( bSizerPanelHolder );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
+ this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigNew ) );
+ this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ) );
+ this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ) );
+ this->Connect( m_menuItemSaveAs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSaveAs ) );
+ this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ) );
+ this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) );
+ this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) );
+ this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
+ this->Connect( m_menuItemGlobSett->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) );
+ this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) );
+ this->Connect( m_menuItemManual->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) );
+ this->Connect( m_menuItemCheckVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) );
+ this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) );
+ m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
+ m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this );
+ m_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCompSettingsContext ), NULL, this );
+ m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this );
+ m_bpButtonSyncConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnSyncSettingsContext ), NULL, this );
+ m_buttonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this );
+ m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
+ m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
+ m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), 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_bpButtonBatchJob->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ), NULL, this );
+ m_listBoxHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
+ m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
+ m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistoryDoubleClick ), NULL, this );
+ m_listBoxHistory->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCfgHistoryRightClick ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnGlobalFilterContext ), NULL, this );
+ m_checkBoxHideExcluded->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnShowExcluded ), NULL, this );
+ m_bpButtonShowCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowCreateLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowUpdateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowUpdateLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDeleteLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowLeftOnly->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowLeftNewer->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowEqual->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDifferent->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowDoNothing->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDoNothing->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowRightNewer->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowRightOnly->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDeleteRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowUpdateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowUpdateRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowCreateRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowConflict->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
}
MainDialogGenerated::~MainDialogGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
- this->Disconnect( wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigNew ) );
- this->Disconnect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ) );
- this->Disconnect( wxID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ) );
- this->Disconnect( wxID_SAVEAS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSaveAs ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) );
- this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
- this->Disconnect( wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) );
- this->Disconnect( wxID_HELP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) );
- this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) );
- m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
- m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this );
- m_bpButtonCmpConfig->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCompSettingsContext ), NULL, this );
- m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this );
- m_bpButtonSyncConfig->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnSyncSettingsContext ), NULL, this );
- m_buttonSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this );
- m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
- m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
- m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this );
- m_bpButtonOpen->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ), NULL, this );
- m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ), NULL, this );
- m_bpButtonBatchJob->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ), NULL, this );
- m_listBoxHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
- m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
- m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistoryDoubleClick ), NULL, this );
- m_listBoxHistory->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCfgHistoryRightClick ), NULL, this );
- m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
- m_bpButtonFilter->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnGlobalFilterContext ), NULL, this );
- m_checkBoxHideExcluded->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnShowExcluded ), NULL, this );
- m_bpButtonShowCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowCreateLeft->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowUpdateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowUpdateLeft->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowDeleteLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDeleteLeft->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowLeftOnly->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowLeftNewer->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowEqual->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDifferent->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowDoNothing->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDoNothing->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowRightNewer->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowRightOnly->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowDeleteRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDeleteRight->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowUpdateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowUpdateRight->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowCreateRight->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
- m_bpButtonShowConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowConflict->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
+ this->Disconnect( wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigNew ) );
+ this->Disconnect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ) );
+ this->Disconnect( wxID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ) );
+ this->Disconnect( wxID_SAVEAS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSaveAs ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) );
+ this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
+ this->Disconnect( wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) );
+ this->Disconnect( wxID_HELP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) );
+ this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) );
+ m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
+ m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this );
+ m_bpButtonCmpConfig->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCompSettingsContext ), NULL, this );
+ m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this );
+ m_bpButtonSyncConfig->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnSyncSettingsContext ), NULL, this );
+ m_buttonSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this );
+ m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
+ m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
+ m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this );
+ m_bpButtonOpen->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ), NULL, this );
+ m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ), NULL, this );
+ m_bpButtonBatchJob->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ), NULL, this );
+ m_listBoxHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
+ m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
+ m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistoryDoubleClick ), NULL, this );
+ m_listBoxHistory->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCfgHistoryRightClick ), NULL, this );
+ m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
+ m_bpButtonFilter->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnGlobalFilterContext ), NULL, this );
+ m_checkBoxHideExcluded->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnShowExcluded ), NULL, this );
+ m_bpButtonShowCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowCreateLeft->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowUpdateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowUpdateLeft->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowDeleteLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDeleteLeft->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowLeftOnly->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowLeftNewer->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowEqual->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDifferent->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowDoNothing->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDoNothing->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowRightNewer->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowRightOnly->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowDeleteRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDeleteRight->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowUpdateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowUpdateRight->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowCreateRight->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+ m_bpButtonShowConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowConflict->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewButtonRightClick ), NULL, this );
+
}
FolderPairGenerated::FolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
- wxBoxSizer* bSizer74;
- bSizer74 = new wxBoxSizer( wxHORIZONTAL );
-
- m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelLeft->SetMinSize( wxSize( 1,-1 ) );
-
- wxBoxSizer* bSizer134;
- bSizer134 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
-
- bSizer134->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonSelectDirLeft = new wxButton( m_panelLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectDirLeft->SetToolTip( _("Select a folder") );
-
- bSizer134->Add( m_buttonSelectDirLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelLeft->SetSizer( bSizer134 );
- m_panelLeft->Layout();
- bSizer134->Fit( m_panelLeft );
- bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
-
- m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer95;
- bSizer95 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonAltCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- bSizer95->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
-
- m_bpButtonAltSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- bSizer95->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- m_panel20->SetSizer( bSizer95 );
- m_panel20->Layout();
- bSizer95->Fit( m_panel20 );
- bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelRight->SetMinSize( wxSize( 1,-1 ) );
-
- wxBoxSizer* bSizer135;
- bSizer135 = new wxBoxSizer( wxHORIZONTAL );
-
- m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonSelectDirRight = new wxButton( m_panelRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectDirRight->SetToolTip( _("Select a folder") );
-
- bSizer135->Add( m_buttonSelectDirRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelRight->SetSizer( bSizer135 );
- m_panelRight->Layout();
- bSizer135->Fit( m_panelRight );
- bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
-
-
- this->SetSizer( bSizer74 );
- this->Layout();
- bSizer74->Fit( this );
+ wxBoxSizer* bSizer74;
+ bSizer74 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelLeft->SetMinSize( wxSize( 1,-1 ) );
+
+ wxBoxSizer* bSizer134;
+ bSizer134 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
+
+ bSizer134->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonSelectDirLeft = new wxButton( m_panelLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectDirLeft->SetToolTip( _("Select a folder") );
+
+ bSizer134->Add( m_buttonSelectDirLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panelLeft->SetSizer( bSizer134 );
+ m_panelLeft->Layout();
+ bSizer134->Fit( m_panelLeft );
+ bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
+
+ m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer95;
+ bSizer95 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonAltCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ bSizer95->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
+
+ m_bpButtonAltSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ bSizer95->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panel20->SetSizer( bSizer95 );
+ m_panel20->Layout();
+ bSizer95->Fit( m_panel20 );
+ bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelRight->SetMinSize( wxSize( 1,-1 ) );
+
+ wxBoxSizer* bSizer135;
+ bSizer135 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonSelectDirRight = new wxButton( m_panelRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectDirRight->SetToolTip( _("Select a folder") );
+
+ bSizer135->Add( m_buttonSelectDirRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panelRight->SetSizer( bSizer135 );
+ m_panelRight->Layout();
+ bSizer135->Fit( m_panelRight );
+ bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer74 );
+ this->Layout();
+ bSizer74->Fit( this );
}
FolderPairGenerated::~FolderPairGenerated()
{
}
-CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+CompareProgressDlgGenerated::CompareProgressDlgGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer40;
- bSizer40 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer182;
- bSizer182 = new wxBoxSizer( wxVERTICAL );
-
- m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
- m_textCtrlStatus->SetMaxLength( 0 );
- m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer182->Add( m_textCtrlStatus, 0, wxEXPAND, 5 );
-
-
- bSizer40->Add( bSizer182, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH );
- bSizer40->Add( m_gauge2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- bSizer42 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer157;
- bSizer157 = new wxBoxSizer( wxVERTICAL );
-
- bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText321 = new wxStaticText( this, wxID_ANY, _("Items found:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText321->Wrap( -1 );
- m_staticText321->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextScanned->Wrap( -1 );
- m_staticTextScanned->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
-
- bSizer157->Add( bSizerFilesFound, 0, 0, 5 );
-
- bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText46 = new wxStaticText( this, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText46->Wrap( -1 );
- m_staticText46->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 );
-
- wxBoxSizer* bSizer154;
- bSizer154 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextFilesRemaining->Wrap( -1 );
- m_staticTextFilesRemaining->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDataRemaining->Wrap( -1 );
- m_staticTextDataRemaining->SetFont( wxFont( 9, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
-
- bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
-
- bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 );
-
-
- bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
-
- sSizerSpeed = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText104->Wrap( -1 );
- m_staticText104->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSpeed->Wrap( -1 );
- m_staticTextSpeed->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
-
- bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeRemFixed->Wrap( -1 );
- m_staticTextTimeRemFixed->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextRemTime = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRemTime->Wrap( -1 );
- m_staticTextRemTime->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- sSizerTimeRemaining->Add( m_staticTextRemTime, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
-
- bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
-
- sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticText* m_staticText37;
- m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText37->Wrap( -1 );
- m_staticText37->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeElapsed->Wrap( -1 );
- m_staticTextTimeElapsed->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
-
- bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer40;
+ bSizer40 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer182;
+ bSizer182 = new wxBoxSizer( wxVERTICAL );
+
+ m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+ m_textCtrlStatus->SetMaxLength( 0 );
+ m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer182->Add( m_textCtrlStatus, 0, wxEXPAND, 5 );
+
+
+ bSizer40->Add( bSizer182, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH );
+ bSizer40->Add( m_gauge2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ bSizer42 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer157;
+ bSizer157 = new wxBoxSizer( wxVERTICAL );
+
+ bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText321 = new wxStaticText( this, wxID_ANY, _("Items found:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText321->Wrap( -1 );
+ m_staticText321->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextScanned->Wrap( -1 );
+ m_staticTextScanned->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
+
+
+ bSizer157->Add( bSizerFilesFound, 0, 0, 5 );
+
+ bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText46 = new wxStaticText( this, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText46->Wrap( -1 );
+ m_staticText46->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 );
+
+ wxBoxSizer* bSizer154;
+ bSizer154 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFilesRemaining->Wrap( -1 );
+ m_staticTextFilesRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDataRemaining->Wrap( -1 );
+ m_staticTextDataRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
+
+
+ bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
+
+
+ bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 );
+
+
+ bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ sSizerSpeed = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText104->Wrap( -1 );
+ m_staticText104->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSpeed->Wrap( -1 );
+ m_staticTextSpeed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+
+ bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeRemFixed->Wrap( -1 );
+ m_staticTextTimeRemFixed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextRemTime = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRemTime->Wrap( -1 );
+ m_staticTextRemTime->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ sSizerTimeRemaining->Add( m_staticTextRemTime, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+
+ bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticText* m_staticText37;
+ m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText37->Wrap( -1 );
+ m_staticText37->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeElapsed->Wrap( -1 );
+ m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+
+ bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer40 );
+ this->Layout();
+ bSizer40->Fit( this );
+}
+CompareProgressDlgGenerated::~CompareProgressDlgGenerated()
+{
+}
- this->SetSizer( bSizer40 );
- this->Layout();
- bSizer40->Fit( this );
+SyncProgressDlgGenerated::SyncProgressDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxSize( 470,260 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizerTop = new wxBoxSizer( wxVERTICAL );
+
+ m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer181;
+ bSizer181 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer42;
+ bSizer42 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapStatus = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 );
+ bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticTextPhase = new wxStaticText( m_panelHeader, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPhase->Wrap( -1 );
+ m_staticTextPhase->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer42->Add( m_staticTextPhase, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+
+ m_animationControl1 = new wxAnimationCtrl( m_panelHeader, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE );
+ m_animationControl1->SetMinSize( wxSize( 45,45 ) );
+
+ bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+
+ bSizer181->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
+
+
+ m_panelHeader->SetSizer( bSizer181 );
+ m_panelHeader->Layout();
+ bSizer181->Fit( m_panelHeader );
+ bSizerTop->Add( m_panelHeader, 0, wxEXPAND, 5 );
+
+ m_staticlineHeader = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerTop->Add( m_staticlineHeader, 0, wxEXPAND, 5 );
+
+ m_panelProgress = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer173;
+ bSizer173 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextStatus = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatus->Wrap( -1 );
+ bSizer173->Add( m_staticTextStatus, 0, wxALL|wxEXPAND, 5 );
+
+ m_gauge1 = new wxGauge( m_panelProgress, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL );
+ bSizer173->Add( m_gauge1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer173->Add( 0, 10, 0, 0, 5 );
+
+ bSizer171 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer171->Add( 10, 0, 0, 0, 5 );
+
+ wxFlexGridSizer* fgSizer10;
+ fgSizer10 = new wxFlexGridSizer( 0, 2, 2, 5 );
+ fgSizer10->SetFlexibleDirection( wxBOTH );
+ fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticTextLabelItemsProc = new wxStaticText( m_panelProgress, wxID_ANY, _("Items processed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextLabelItemsProc->Wrap( -1 );
+ m_staticTextLabelItemsProc->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextLabelItemsProc, 0, wxALIGN_BOTTOM, 5 );
+
+ bSizerItemsProc = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextProcessedObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_staticTextProcessedObj->Wrap( -1 );
+ m_staticTextProcessedObj->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerItemsProc->Add( m_staticTextProcessedObj, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextDataProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDataProcessed->Wrap( -1 );
+ m_staticTextDataProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizerItemsProc->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
+
+
+ fgSizer10->Add( bSizerItemsProc, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextLabelItemsRem = new wxStaticText( m_panelProgress, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextLabelItemsRem->Wrap( -1 );
+ m_staticTextLabelItemsRem->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextLabelItemsRem, 0, wxALIGN_BOTTOM, 5 );
+
+ bSizerItemsRem = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextRemainingObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_staticTextRemainingObj->Wrap( -1 );
+ m_staticTextRemainingObj->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerItemsRem->Add( m_staticTextRemainingObj, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextDataRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDataRemaining->Wrap( -1 );
+ m_staticTextDataRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizerItemsRem->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
+
+
+ fgSizer10->Add( bSizerItemsRem, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText84 = new wxStaticText( m_panelProgress, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText84->Wrap( -1 );
+ m_staticText84->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticText84, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextSpeed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSpeed->Wrap( -1 );
+ m_staticTextSpeed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextSpeed, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextLabelRemTime = new wxStaticText( m_panelProgress, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextLabelRemTime->Wrap( -1 );
+ m_staticTextLabelRemTime->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextLabelRemTime, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextRemTime = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRemTime->Wrap( -1 );
+ m_staticTextRemTime->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextRemTime, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextLabelElapsedTime = new wxStaticText( m_panelProgress, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextLabelElapsedTime->Wrap( -1 );
+ m_staticTextLabelElapsedTime->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextLabelElapsedTime, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextTimeElapsed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeElapsed->Wrap( -1 );
+ m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 );
+
+
+ bSizer171->Add( fgSizer10, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer171->Add( 10, 0, 0, 0, 5 );
+
+ m_panelGraph = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( 340,150 ), wxTAB_TRAVERSAL );
+ m_panelGraph->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer171->Add( m_panelGraph, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer173->Add( bSizer171, 1, wxEXPAND, 5 );
+
+
+ m_panelProgress->SetSizer( bSizer173 );
+ m_panelProgress->Layout();
+ bSizer173->Fit( m_panelProgress );
+ bSizerTop->Add( m_panelProgress, 1, wxEXPAND, 5 );
+
+ bSizerFinalStat = new wxBoxSizer( wxVERTICAL );
+
+ m_listbookResult = new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP );
+ wxSize m_listbookResultImageSize = wxSize( 180,1 );
+ int m_listbookResultIndex = 0;
+ wxImageList* m_listbookResultImages = new wxImageList( m_listbookResultImageSize.GetWidth(), m_listbookResultImageSize.GetHeight() );
+ m_listbookResult->AssignImageList( m_listbookResultImages );
+ wxBitmap m_listbookResultBitmap;
+ wxImage m_listbookResultImage;
+
+ bSizerFinalStat->Add( m_listbookResult, 1, wxEXPAND, 5 );
+
+
+ bSizerTop->Add( bSizerFinalStat, 1, wxEXPAND, 5 );
+
+ m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerTop->Add( m_staticline12, 0, wxEXPAND, 5 );
+
+ m_panelFooter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelFooter->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer182;
+ bSizer182 = new wxBoxSizer( wxVERTICAL );
+
+ bSizerExecFinished = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText87 = new wxStaticText( m_panelFooter, wxID_ANY, _("On completion"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText87->Wrap( -1 );
+ m_staticText87->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizerExecFinished->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_comboBoxExecFinished = new ExecFinishedBox( m_panelFooter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer182->Add( bSizerExecFinished, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ bSizer28 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer28->Add( 0, 0, 1, 0, 5 );
+
+ m_buttonOK = new wxButton( m_panelFooter, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+ m_buttonOK->Enable( false );
+
+ bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonPause = new wxButton( m_panelFooter, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonPause->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonAbort = new wxButton( m_panelFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonAbort->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer28->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ bSizer182->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ m_panelFooter->SetSizer( bSizer182 );
+ m_panelFooter->Layout();
+ bSizer182->Fit( m_panelFooter );
+ bSizerTop->Add( m_panelFooter, 0, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizerTop );
+ this->Layout();
+ bSizerTop->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncProgressDlgGenerated::OnClose ) );
+ this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncProgressDlgGenerated::OnIconize ) );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncProgressDlgGenerated::OnOkay ), NULL, this );
+ m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncProgressDlgGenerated::OnPause ), NULL, this );
+ m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncProgressDlgGenerated::OnAbort ), NULL, this );
}
-CompareStatusGenerated::~CompareStatusGenerated()
+SyncProgressDlgGenerated::~SyncProgressDlgGenerated()
{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncProgressDlgGenerated::OnClose ) );
+ this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncProgressDlgGenerated::OnIconize ) );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncProgressDlgGenerated::OnOkay ), NULL, this );
+ m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncProgressDlgGenerated::OnPause ), NULL, this );
+ m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncProgressDlgGenerated::OnAbort ), NULL, this );
+
}
BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 400,260 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer54;
- bSizer54 = new wxBoxSizer( wxVERTICAL );
-
- m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapBatchJob = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer72->Add( m_bitmapBatchJob, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_staticText56 = new wxStaticText( m_panelHeader, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText56->Wrap( -1 );
- m_staticText56->SetFont( wxFont( 12, 70, 90, 92, false, wxEmptyString ) );
- m_staticText56->SetForegroundColour( wxColour( 0, 0, 0 ) );
-
- bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_staticText44 = new wxStaticText( m_panelHeader, wxID_ANY, _("Create a batch file to automate synchronization. Double-click this file or schedule in your system's task planner: FreeFileSync.exe <job name>.ffs_batch"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText44->Wrap( 480 );
- bSizer72->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer72->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonHelp = new wxBitmapButton( m_panelHeader, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- m_bpButtonHelp->SetToolTip( _("Help") );
-
- bSizer72->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelHeader->SetSizer( bSizer72 );
- m_panelHeader->Layout();
- bSizer72->Fit( m_panelHeader );
- bSizer54->Add( m_panelHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticline18 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline18, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer180;
- bSizer180 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer171;
- bSizer171 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText82 = new wxStaticText( this, wxID_ANY, _("Error handling"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText82->Wrap( -1 );
- bSizer171->Add( m_staticText82, 0, wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer169;
- bSizer169 = new wxBoxSizer( wxHORIZONTAL );
-
- m_toggleBtnErrorIgnore = new wxToggleButton( this, wxID_ANY, _("Ignore"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnErrorIgnore->SetToolTip( _("Hide all error and warning messages") );
-
- bSizer169->Add( m_toggleBtnErrorIgnore, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_toggleBtnErrorPopup = new wxToggleButton( this, wxID_ANY, _("Pop-up"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnErrorPopup->SetToolTip( _("Show pop-up on errors or warnings") );
-
- bSizer169->Add( m_toggleBtnErrorPopup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_toggleBtnErrorExit = new wxToggleButton( this, wxID_ANY, _("Exit"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnErrorExit->SetToolTip( _("Abort synchronization on first error") );
-
- bSizer169->Add( m_toggleBtnErrorExit, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer171->Add( bSizer169, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer180->Add( bSizer171, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_staticline26 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer180->Add( m_staticline26, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer170;
- bSizer170 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText81 = new wxStaticText( this, wxID_ANY, _("On completion"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText81->Wrap( -1 );
- bSizer170->Add( m_staticText81, 0, wxBOTTOM, 5 );
-
- m_comboBoxExecFinished = new ExecFinishedBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer170->Add( m_comboBoxExecFinished, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer180->Add( bSizer170, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer172->Add( bSizer180, 0, wxEXPAND, 5 );
-
- m_staticline25 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer172->Add( m_staticline25, 0, wxEXPAND, 5 );
-
- m_checkBoxShowProgress = new wxCheckBox( this, wxID_ANY, _("Show progress dialog"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer172->Add( m_checkBoxShowProgress, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
-
- m_checkBoxGenerateLogfile = new wxCheckBox( this, wxID_ANY, _("Save log"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer172->Add( m_checkBoxGenerateLogfile, 0, wxEXPAND|wxALL, 5 );
-
- m_panelLogfile = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1721;
- bSizer1721 = new wxBoxSizer( wxHORIZONTAL );
-
- m_comboBoxLogfileDir = new FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer1721->Add( m_comboBoxLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonSelectLogfileDir = new wxButton( m_panelLogfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectLogfileDir->SetToolTip( _("Select folder to save log files") );
-
- bSizer1721->Add( m_buttonSelectLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_checkBoxLogfilesLimit = new wxCheckBox( m_panelLogfile, wxID_ANY, _("Limit"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxLogfilesLimit->SetToolTip( _("Limit maximum number of log files") );
-
- bSizer1721->Add( m_checkBoxLogfilesLimit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_spinCtrlLogfileLimit = new wxSpinCtrl( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 55,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- m_spinCtrlLogfileLimit->SetToolTip( _("Limit maximum number of log files") );
-
- bSizer1721->Add( m_spinCtrlLogfileLimit, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelLogfile->SetSizer( bSizer1721 );
- m_panelLogfile->Layout();
- bSizer1721->Fit( m_panelLogfile );
- bSizer172->Add( m_panelLogfile, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer54->Add( bSizer172, 1, wxEXPAND, 10 );
-
- m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 );
-
- m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer68;
- bSizer68 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer68->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_buttonSave = new wxButton( m_panel35, wxID_SAVE, _("Save &as..."), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonSave->SetDefault();
- m_buttonSave->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer68->Add( m_buttonSave, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button6 = new wxButton( m_panel35, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer68->Add( m_button6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer68->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- m_panel35->SetSizer( bSizer68 );
- m_panel35->Layout();
- bSizer68->Fit( m_panel35 );
- bSizer54->Add( m_panel35, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
-
- this->SetSizer( bSizer54 );
- this->Layout();
- bSizer54->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
- m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
- m_toggleBtnErrorIgnore->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorIgnore ), NULL, this );
- m_toggleBtnErrorPopup->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorPopup ), NULL, this );
- m_toggleBtnErrorExit->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorExit ), NULL, this );
- m_checkBoxGenerateLogfile->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleGenerateLogfile ), NULL, this );
- m_checkBoxLogfilesLimit->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleLogfilesLimit ), NULL, this );
- m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
- m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxSize( 400,260 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer54;
+ bSizer54 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapBatchJob = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer72->Add( m_bitmapBatchJob, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticTextHeader = new wxStaticText( m_panelHeader, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ m_staticTextHeader->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_staticText44 = new wxStaticText( m_panelHeader, wxID_ANY, _("Create a batch file to automate synchronization. Double-click this file or schedule in your system's task planner: FreeFileSync.exe <job name>.ffs_batch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText44->Wrap( 480 );
+ bSizer72->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer72->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonHelp = new wxBitmapButton( m_panelHeader, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ m_bpButtonHelp->SetToolTip( _("Help") );
+
+ bSizer72->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panelHeader->SetSizer( bSizer72 );
+ m_panelHeader->Layout();
+ bSizer72->Fit( m_panelHeader );
+ bSizer54->Add( m_panelHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticline18 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline18, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer180;
+ bSizer180 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer171;
+ bSizer171 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText82 = new wxStaticText( this, wxID_ANY, _("Error handling"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText82->Wrap( -1 );
+ bSizer171->Add( m_staticText82, 0, wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer169;
+ bSizer169 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_toggleBtnErrorIgnore = new wxToggleButton( this, wxID_ANY, _("Ignore"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnErrorIgnore->SetToolTip( _("Hide all error and warning messages") );
+
+ bSizer169->Add( m_toggleBtnErrorIgnore, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_toggleBtnErrorPopup = new wxToggleButton( this, wxID_ANY, _("Pop-up"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnErrorPopup->SetToolTip( _("Show pop-up on errors or warnings") );
+
+ bSizer169->Add( m_toggleBtnErrorPopup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_toggleBtnErrorExit = new wxToggleButton( this, wxID_ANY, _("Exit"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnErrorExit->SetToolTip( _("Abort synchronization on first error") );
+
+ bSizer169->Add( m_toggleBtnErrorExit, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer171->Add( bSizer169, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer180->Add( bSizer171, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticline26 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer180->Add( m_staticline26, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer170;
+ bSizer170 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText81 = new wxStaticText( this, wxID_ANY, _("On completion"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText81->Wrap( -1 );
+ bSizer170->Add( m_staticText81, 0, wxBOTTOM, 5 );
+
+ m_comboBoxExecFinished = new ExecFinishedBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer170->Add( m_comboBoxExecFinished, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer180->Add( bSizer170, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer172->Add( bSizer180, 0, wxEXPAND, 5 );
+
+ m_staticline25 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer172->Add( m_staticline25, 0, wxEXPAND, 5 );
+
+ m_checkBoxShowProgress = new wxCheckBox( this, wxID_ANY, _("Show progress dialog"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer172->Add( m_checkBoxShowProgress, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
+
+ m_checkBoxGenerateLogfile = new wxCheckBox( this, wxID_ANY, _("Save log"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer172->Add( m_checkBoxGenerateLogfile, 0, wxEXPAND|wxALL, 5 );
+
+ m_panelLogfile = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1721;
+ bSizer1721 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_comboBoxLogfileDir = new FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer1721->Add( m_comboBoxLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonSelectLogfileDir = new wxButton( m_panelLogfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectLogfileDir->SetToolTip( _("Select folder to save log files") );
+
+ bSizer1721->Add( m_buttonSelectLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxLogfilesLimit = new wxCheckBox( m_panelLogfile, wxID_ANY, _("Limit"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxLogfilesLimit->SetToolTip( _("Limit maximum number of log files") );
+
+ bSizer1721->Add( m_checkBoxLogfilesLimit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_spinCtrlLogfileLimit = new wxSpinCtrl( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ m_spinCtrlLogfileLimit->SetToolTip( _("Limit maximum number of log files") );
+
+ bSizer1721->Add( m_spinCtrlLogfileLimit, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panelLogfile->SetSizer( bSizer1721 );
+ m_panelLogfile->Layout();
+ bSizer1721->Fit( m_panelLogfile );
+ bSizer172->Add( m_panelLogfile, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer54->Add( bSizer172, 1, wxEXPAND, 10 );
+
+ m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 );
+
+ m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer68;
+ bSizer68 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer68->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonSave = new wxButton( m_panel35, wxID_SAVE, _("Save &as..."), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonSave->SetDefault();
+ m_buttonSave->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer68->Add( m_buttonSave, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button6 = new wxButton( m_panel35, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer68->Add( m_button6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer68->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panel35->SetSizer( bSizer68 );
+ m_panel35->Layout();
+ bSizer68->Fit( m_panel35 );
+ bSizer54->Add( m_panel35, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer54 );
+ this->Layout();
+ bSizer54->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
+ m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
+ m_toggleBtnErrorIgnore->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorIgnore ), NULL, this );
+ m_toggleBtnErrorPopup->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorPopup ), NULL, this );
+ m_toggleBtnErrorExit->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorExit ), NULL, this );
+ m_checkBoxGenerateLogfile->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleGenerateLogfile ), NULL, this );
+ m_checkBoxLogfilesLimit->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleLogfilesLimit ), NULL, this );
+ m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
+ m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
}
BatchDlgGenerated::~BatchDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
- m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
- m_toggleBtnErrorIgnore->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorIgnore ), NULL, this );
- m_toggleBtnErrorPopup->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorPopup ), NULL, this );
- m_toggleBtnErrorExit->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorExit ), NULL, this );
- m_checkBoxGenerateLogfile->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleGenerateLogfile ), NULL, this );
- m_checkBoxLogfilesLimit->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleLogfilesLimit ), NULL, this );
- m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
- m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
+ m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
+ m_toggleBtnErrorIgnore->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorIgnore ), NULL, this );
+ m_toggleBtnErrorPopup->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorPopup ), NULL, this );
+ m_toggleBtnErrorExit->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnErrorExit ), NULL, this );
+ m_checkBoxGenerateLogfile->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleGenerateLogfile ), NULL, this );
+ m_checkBoxLogfilesLimit->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleLogfilesLimit ), NULL, this );
+ m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
+ m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
+
}
CmpCfgDlgGenerated::CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer136;
- bSizer136 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText91 = new wxStaticText( this, wxID_ANY, _("Select variant"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText91->Wrap( -1 );
- bSizer136->Add( m_staticText91, 0, wxALL, 5 );
-
- wxFlexGridSizer* fgSizer16;
- fgSizer16 = new wxFlexGridSizer( 2, 2, 8, 5 );
- fgSizer16->SetFlexibleDirection( wxBOTH );
- fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_bitmapByTime = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapByTime->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
-
- fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_toggleBtnTimeSize = new wxToggleButton( this, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1,40 ), 0 );
- m_toggleBtnTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
- m_toggleBtnTimeSize->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
-
- fgSizer16->Add( m_toggleBtnTimeSize, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapByContent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapByContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
-
- fgSizer16->Add( m_bitmapByContent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_toggleBtnContent = new wxToggleButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,40 ), 0 );
- m_toggleBtnContent->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
- m_toggleBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
-
- fgSizer16->Add( m_toggleBtnContent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer136->Add( fgSizer16, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- m_staticline33 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer136->Add( m_staticline33, 0, wxEXPAND, 5 );
-
- m_staticText92 = new wxStaticText( this, wxID_ANY, _("Symbolic Link handling"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText92->Wrap( -1 );
- bSizer136->Add( m_staticText92, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
-
- wxBoxSizer* bSizer177;
- bSizer177 = new wxBoxSizer( wxHORIZONTAL );
-
- wxArrayString m_choiceHandleSymlinksChoices;
- m_choiceHandleSymlinks = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleSymlinksChoices, 0 );
- m_choiceHandleSymlinks->SetSelection( -1 );
- bSizer177->Add( m_choiceHandleSymlinks, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- m_bpButtonHelp->SetToolTip( _("Help") );
-
- bSizer177->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer136->Add( bSizer177, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer136->Add( m_staticline14, 0, wxEXPAND, 5 );
-
- m_panel36 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel36->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer22;
- bSizer22 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer22->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_button10 = new wxButton( m_panel36, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button10->SetDefault();
- m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button6 = new wxButton( m_panel36, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer22->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- m_panel36->SetSizer( bSizer22 );
- m_panel36->Layout();
- bSizer22->Fit( m_panel36 );
- bSizer136->Add( m_panel36, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- this->SetSizer( bSizer136 );
- this->Layout();
- bSizer136->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) );
- m_toggleBtnTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this );
- m_toggleBtnTimeSize->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
- m_toggleBtnContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this );
- m_toggleBtnContent->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
- m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
- m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
- m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer136;
+ bSizer136 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText91 = new wxStaticText( this, wxID_ANY, _("Select variant"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText91->Wrap( -1 );
+ bSizer136->Add( m_staticText91, 0, wxALL, 5 );
+
+ wxFlexGridSizer* fgSizer16;
+ fgSizer16 = new wxFlexGridSizer( 2, 2, 8, 5 );
+ fgSizer16->SetFlexibleDirection( wxBOTH );
+ fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_bitmapByTime = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapByTime->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
+
+ fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_toggleBtnTimeSize = new wxToggleButton( this, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_toggleBtnTimeSize->SetValue( true );
+ m_toggleBtnTimeSize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_toggleBtnTimeSize->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
+
+ fgSizer16->Add( m_toggleBtnTimeSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_bitmapByContent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapByContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
+
+ fgSizer16->Add( m_bitmapByContent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_toggleBtnContent = new wxToggleButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_toggleBtnContent->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_toggleBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
+
+ fgSizer16->Add( m_toggleBtnContent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer136->Add( fgSizer16, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_staticline33 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer136->Add( m_staticline33, 0, wxEXPAND, 5 );
+
+ m_staticText92 = new wxStaticText( this, wxID_ANY, _("Symbolic Link handling"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText92->Wrap( -1 );
+ bSizer136->Add( m_staticText92, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer177;
+ bSizer177 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxArrayString m_choiceHandleSymlinksChoices;
+ m_choiceHandleSymlinks = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleSymlinksChoices, 0 );
+ m_choiceHandleSymlinks->SetSelection( -1 );
+ bSizer177->Add( m_choiceHandleSymlinks, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ m_bpButtonHelp->SetToolTip( _("Help") );
+
+ bSizer177->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer136->Add( bSizer177, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer136->Add( m_staticline14, 0, wxEXPAND, 5 );
+
+ m_panel36 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel36->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer22;
+ bSizer22 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer22->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_button10 = new wxButton( m_panel36, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button10->SetDefault();
+ m_button10->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button6 = new wxButton( m_panel36, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer22->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panel36->SetSizer( bSizer22 );
+ m_panel36->Layout();
+ bSizer22->Fit( m_panel36 );
+ bSizer136->Add( m_panel36, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ this->SetSizer( bSizer136 );
+ this->Layout();
+ bSizer136->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) );
+ m_toggleBtnTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this );
+ m_toggleBtnTimeSize->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
+ m_toggleBtnContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this );
+ m_toggleBtnContent->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
+ m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
+ m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
+ m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
+ m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
}
CmpCfgDlgGenerated::~CmpCfgDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) );
- m_toggleBtnTimeSize->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this );
- m_toggleBtnTimeSize->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
- m_toggleBtnContent->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this );
- m_toggleBtnContent->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
- m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
- m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
- m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) );
+ m_toggleBtnTimeSize->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this );
+ m_toggleBtnTimeSize->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
+ m_toggleBtnContent->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this );
+ m_toggleBtnContent->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
+ m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
+ m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
+ m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
+ m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
+
}
SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer7;
- bSizer7 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer181;
- bSizer181 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer29;
- bSizer29 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText86 = new wxStaticText( this, wxID_ANY, _("Select variant"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText86->Wrap( -1 );
- bSizer29->Add( m_staticText86, 0, wxALL, 5 );
-
- wxFlexGridSizer* fgSizer1;
- fgSizer1 = new wxFlexGridSizer( 4, 2, 6, 8 );
- fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
- fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_toggleBtnAutomatic = new wxToggleButton( this, wxID_ANY, _("<- Two way ->"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_toggleBtnAutomatic, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextAutomatic = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextAutomatic->Wrap( 450 );
- fgSizer1->Add( m_staticTextAutomatic, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_toggleBtnMirror = new wxToggleButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_toggleBtnMirror, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticTextMirror = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMirror->Wrap( 450 );
- fgSizer1->Add( m_staticTextMirror, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_toggleBtnUpdate = new wxToggleButton( this, wxID_ANY, _("Update ->"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_toggleBtnUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticTextUpdate = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextUpdate->Wrap( 450 );
- fgSizer1->Add( m_staticTextUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_toggleBtnCustom = new wxToggleButton( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_toggleBtnCustom, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticTextCustom = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCustom->Wrap( 450 );
- fgSizer1->Add( m_staticTextCustom, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer29->Add( fgSizer1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- bSizerExtraConfig = new wxBoxSizer( wxVERTICAL );
-
- m_staticline321 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerExtraConfig->Add( m_staticline321, 0, wxEXPAND, 5 );
-
- bSizer179 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer174;
- bSizer174 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText88 = new wxStaticText( this, wxID_ANY, _("Error handling"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText88->Wrap( -1 );
- bSizer174->Add( m_staticText88, 0, wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer175;
- bSizer175 = new wxBoxSizer( wxHORIZONTAL );
-
- m_toggleBtnErrorIgnore = new wxToggleButton( this, wxID_ANY, _("Ignore"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnErrorIgnore->SetToolTip( _("Hide all error and warning messages") );
-
- bSizer175->Add( m_toggleBtnErrorIgnore, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_toggleBtnErrorPopup = new wxToggleButton( this, wxID_ANY, _("Pop-up"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnErrorPopup->SetToolTip( _("Show pop-up on errors or warnings") );
-
- bSizer175->Add( m_toggleBtnErrorPopup, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer174->Add( bSizer175, 0, 0, 5 );
-
-
- bSizer179->Add( bSizer174, 0, wxALL, 5 );
-
- m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer179->Add( m_staticline36, 0, wxEXPAND, 5 );
-
- bSizerOnCompletion = new wxBoxSizer( wxVERTICAL );
-
- m_staticText89 = new wxStaticText( this, wxID_ANY, _("On completion"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText89->Wrap( -1 );
- bSizerOnCompletion->Add( m_staticText89, 0, wxBOTTOM, 5 );
-
- m_comboBoxExecFinished = new ExecFinishedBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizerOnCompletion->Add( m_comboBoxExecFinished, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer179->Add( bSizerOnCompletion, 1, wxALL, 5 );
-
-
- bSizerExtraConfig->Add( bSizer179, 0, wxEXPAND, 5 );
-
-
- bSizer29->Add( bSizerExtraConfig, 0, wxEXPAND, 5 );
-
- m_staticline32 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer29->Add( m_staticline32, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText87 = new wxStaticText( this, wxID_ANY, _("Deletion handling"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText87->Wrap( -1 );
- bSizer158->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
-
- bSizer158->Add( 0, 0, 1, wxEXPAND, 5 );
-
- bSizerVersioningNamingConvention = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextNamingCvtPart1 = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextNamingCvtPart1->Wrap( -1 );
- m_staticTextNamingCvtPart1->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- bSizerVersioningNamingConvention->Add( m_staticTextNamingCvtPart1, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextNamingCvtPart2Bold = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextNamingCvtPart2Bold->Wrap( -1 );
- m_staticTextNamingCvtPart2Bold->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
- m_staticTextNamingCvtPart2Bold->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- bSizerVersioningNamingConvention->Add( m_staticTextNamingCvtPart2Bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextNamingCvtPart3 = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextNamingCvtPart3->Wrap( -1 );
- m_staticTextNamingCvtPart3->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- bSizerVersioningNamingConvention->Add( m_staticTextNamingCvtPart3, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer158->Add( bSizerVersioningNamingConvention, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer29->Add( bSizer158, 0, wxEXPAND|wxTOP, 5 );
-
- wxBoxSizer* bSizer180;
- bSizer180 = new wxBoxSizer( wxHORIZONTAL );
-
- m_toggleBtnPermanent = new wxToggleButton( this, wxID_ANY, _("Permanent"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnPermanent->SetToolTip( _("Delete or overwrite files permanently") );
-
- bSizer180->Add( m_toggleBtnPermanent, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_toggleBtnRecycler = new wxToggleButton( this, wxID_ANY, _("Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnRecycler->SetToolTip( _("Use Recycle Bin for deleted and overwritten files") );
-
- bSizer180->Add( m_toggleBtnRecycler, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_toggleBtnVersioning = new wxToggleButton( this, wxID_ANY, _("Versioning"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnVersioning->SetToolTip( _("Move time-stamped files into specified folder") );
-
- bSizer180->Add( m_toggleBtnVersioning, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer180->Add( 0, 0, 1, wxEXPAND, 5 );
-
- bSizerVersioningStyle = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText93 = new wxStaticText( this, wxID_ANY, _("Naming convention:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText93->Wrap( -1 );
- bSizerVersioningStyle->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- wxArrayString m_choiceVersioningStyleChoices;
- m_choiceVersioningStyle = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVersioningStyleChoices, 0 );
- m_choiceVersioningStyle->SetSelection( 0 );
- bSizerVersioningStyle->Add( m_choiceVersioningStyle, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer180->Add( bSizerVersioningStyle, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer29->Add( bSizer180, 0, wxEXPAND|wxALL, 5 );
-
- m_panelVersioning = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer156;
- bSizer156 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer1151;
- bSizer1151 = new wxBoxSizer( wxHORIZONTAL );
-
- m_versioningFolder = new FolderHistoryBox( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer1151->Add( m_versioningFolder, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonSelectDirVersioning = new wxButton( m_panelVersioning, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectDirVersioning->SetToolTip( _("Select a folder") );
-
- bSizer1151->Add( m_buttonSelectDirVersioning, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer156->Add( bSizer1151, 0, wxEXPAND, 5 );
-
-
- m_panelVersioning->SetSizer( bSizer156 );
- m_panelVersioning->Layout();
- bSizer156->Fit( m_panelVersioning );
- bSizer29->Add( m_panelVersioning, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer181->Add( bSizer29, 0, wxEXPAND, 5 );
-
- m_staticline31 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer181->Add( m_staticline31, 0, wxEXPAND, 5 );
-
- bSizerConfig = new wxBoxSizer( wxVERTICAL );
-
- m_staticText90 = new wxStaticText( this, wxID_ANY, _("Configuration"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText90->Wrap( -1 );
- bSizerConfig->Add( m_staticText90, 0, wxBOTTOM, 5 );
-
-
- bSizerConfig->Add( 0, 5, 0, 0, 5 );
-
- m_bitmapDatabase = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerConfig->Add( m_bitmapDatabase, 0, wxALIGN_CENTER_HORIZONTAL, 10 );
-
- sbSizerSyncDirections = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer1801;
- bSizer1801 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText21 = new wxStaticText( this, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
- m_staticText21->Wrap( -1 );
- m_staticText21->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer1801->Add( m_staticText21, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
- m_staticText31->Wrap( -1 );
- m_staticText31->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer1801->Add( m_staticText31, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- sbSizerSyncDirections->Add( bSizer1801, 0, wxEXPAND, 5 );
-
- bSizerLeftOnly = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapLeftOnly->SetToolTip( _("Item exists on left side only") );
-
- bSizerLeftOnly->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerLeftOnly->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
- bSizerLeftOnly->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- sbSizerSyncDirections->Add( bSizerLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerRightOnly = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapRightOnly->SetToolTip( _("Item exists on right side only") );
-
- bSizerRightOnly->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerRightOnly->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
- bSizerRightOnly->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- sbSizerSyncDirections->Add( bSizerRightOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerLeftNewer = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapLeftNewer->SetToolTip( _("Left side is newer") );
-
- bSizerLeftNewer->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerLeftNewer->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
- bSizerLeftNewer->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- sbSizerSyncDirections->Add( bSizerLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerRightNewer = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapRightNewer->SetToolTip( _("Right side is newer") );
-
- bSizerRightNewer->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerRightNewer->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
- bSizerRightNewer->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- sbSizerSyncDirections->Add( bSizerRightNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerDifferent = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapDifferent->SetToolTip( _("Items have different content") );
-
- bSizerDifferent->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerDifferent->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
- bSizerDifferent->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- sbSizerSyncDirections->Add( bSizerDifferent, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerConflict = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapConflict->SetToolTip( _("Conflict/item cannot be categorized") );
-
- bSizerConflict->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerConflict->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
- bSizerConflict->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- sbSizerSyncDirections->Add( bSizerConflict, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizerConfig->Add( sbSizerSyncDirections, 0, wxEXPAND, 5 );
-
-
- bSizerConfig->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- bSizer181->Add( bSizerConfig, 0, wxALL|wxEXPAND, 5 );
-
-
- bSizer7->Add( bSizer181, 1, 0, 5 );
-
- m_staticline15 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer7->Add( m_staticline15, 0, wxEXPAND, 5 );
-
- m_panel37 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel37->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer291;
- bSizer291 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer291->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_buttonOK = new wxButton( m_panel37, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOK->SetDefault();
- m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer291->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button16 = new wxButton( m_panel37, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer291->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer291->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- m_panel37->SetSizer( bSizer291 );
- m_panel37->Layout();
- bSizer291->Fit( m_panel37 );
- bSizer7->Add( m_panel37, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
-
- this->SetSizer( bSizer7 );
- this->Layout();
- bSizer7->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) );
- m_toggleBtnAutomatic->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this );
- m_toggleBtnAutomatic->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
- m_toggleBtnMirror->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this );
- m_toggleBtnMirror->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
- m_toggleBtnUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this );
- m_toggleBtnUpdate->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
- m_toggleBtnCustom->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this );
- m_toggleBtnCustom->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
- m_toggleBtnErrorIgnore->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnErrorIgnore ), NULL, this );
- m_toggleBtnErrorPopup->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnErrorPopup ), NULL, this );
- m_toggleBtnPermanent->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionPermanent ), NULL, this );
- m_toggleBtnRecycler->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionRecycler ), NULL, this );
- m_toggleBtnVersioning->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionVersioning ), NULL, this );
- m_choiceVersioningStyle->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnParameterChange ), NULL, this );
- m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this );
- m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this );
- m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this );
- m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this );
- m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this );
- m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this );
- m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this );
- m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer7;
+ bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer181;
+ bSizer181 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer29;
+ bSizer29 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText86 = new wxStaticText( this, wxID_ANY, _("Select variant"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText86->Wrap( -1 );
+ bSizer29->Add( m_staticText86, 0, wxALL, 5 );
+
+ wxFlexGridSizer* fgSizer1;
+ fgSizer1 = new wxFlexGridSizer( 4, 2, 6, 8 );
+ fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
+ fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_toggleBtnAutomatic = new wxToggleButton( this, wxID_ANY, _("<- Two way ->"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnAutomatic->SetValue( true );
+ m_toggleBtnAutomatic->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_toggleBtnAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextAutomatic = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAutomatic->Wrap( 450 );
+ fgSizer1->Add( m_staticTextAutomatic, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_toggleBtnMirror = new wxToggleButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnMirror->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_toggleBtnMirror, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextMirror = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMirror->Wrap( 450 );
+ fgSizer1->Add( m_staticTextMirror, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_toggleBtnUpdate = new wxToggleButton( this, wxID_ANY, _("Update ->"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnUpdate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_toggleBtnUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextUpdate = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextUpdate->Wrap( 450 );
+ fgSizer1->Add( m_staticTextUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_toggleBtnCustom = new wxToggleButton( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnCustom->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_toggleBtnCustom, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextCustom = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCustom->Wrap( 450 );
+ fgSizer1->Add( m_staticTextCustom, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer29->Add( fgSizer1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ bSizerExtraConfig = new wxBoxSizer( wxVERTICAL );
+
+ m_staticline321 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerExtraConfig->Add( m_staticline321, 0, wxEXPAND, 5 );
+
+ bSizer179 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer174;
+ bSizer174 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText88 = new wxStaticText( this, wxID_ANY, _("Error handling"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText88->Wrap( -1 );
+ bSizer174->Add( m_staticText88, 0, wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer175;
+ bSizer175 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_toggleBtnErrorIgnore = new wxToggleButton( this, wxID_ANY, _("Ignore"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnErrorIgnore->SetToolTip( _("Hide all error and warning messages") );
+
+ bSizer175->Add( m_toggleBtnErrorIgnore, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_toggleBtnErrorPopup = new wxToggleButton( this, wxID_ANY, _("Pop-up"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnErrorPopup->SetToolTip( _("Show pop-up on errors or warnings") );
+
+ bSizer175->Add( m_toggleBtnErrorPopup, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer174->Add( bSizer175, 0, 0, 5 );
+
+
+ bSizer179->Add( bSizer174, 0, wxALL, 5 );
+
+ m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer179->Add( m_staticline36, 0, wxEXPAND, 5 );
+
+ bSizerOnCompletion = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText89 = new wxStaticText( this, wxID_ANY, _("On completion"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText89->Wrap( -1 );
+ bSizerOnCompletion->Add( m_staticText89, 0, wxBOTTOM, 5 );
+
+ m_comboBoxExecFinished = new ExecFinishedBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizerOnCompletion->Add( m_comboBoxExecFinished, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer179->Add( bSizerOnCompletion, 1, wxALL, 5 );
+
+
+ bSizerExtraConfig->Add( bSizer179, 0, wxEXPAND, 5 );
+
+
+ bSizer29->Add( bSizerExtraConfig, 0, wxEXPAND, 5 );
+
+ m_staticline32 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer29->Add( m_staticline32, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText87 = new wxStaticText( this, wxID_ANY, _("Deletion handling"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText87->Wrap( -1 );
+ bSizer158->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+
+ bSizer158->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizerVersioningNamingConvention = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextNamingCvtPart1 = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextNamingCvtPart1->Wrap( -1 );
+ m_staticTextNamingCvtPart1->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ bSizerVersioningNamingConvention->Add( m_staticTextNamingCvtPart1, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextNamingCvtPart2Bold = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextNamingCvtPart2Bold->Wrap( -1 );
+ m_staticTextNamingCvtPart2Bold->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_staticTextNamingCvtPart2Bold->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ bSizerVersioningNamingConvention->Add( m_staticTextNamingCvtPart2Bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextNamingCvtPart3 = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextNamingCvtPart3->Wrap( -1 );
+ m_staticTextNamingCvtPart3->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ bSizerVersioningNamingConvention->Add( m_staticTextNamingCvtPart3, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer158->Add( bSizerVersioningNamingConvention, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer29->Add( bSizer158, 0, wxEXPAND|wxTOP, 5 );
+
+ wxBoxSizer* bSizer180;
+ bSizer180 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_toggleBtnPermanent = new wxToggleButton( this, wxID_ANY, _("Permanent"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnPermanent->SetToolTip( _("Delete or overwrite files permanently") );
+
+ bSizer180->Add( m_toggleBtnPermanent, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_toggleBtnRecycler = new wxToggleButton( this, wxID_ANY, _("Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnRecycler->SetToolTip( _("Use Recycle Bin for deleted and overwritten files") );
+
+ bSizer180->Add( m_toggleBtnRecycler, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_toggleBtnVersioning = new wxToggleButton( this, wxID_ANY, _("Versioning"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnVersioning->SetToolTip( _("Move time-stamped files into specified folder") );
+
+ bSizer180->Add( m_toggleBtnVersioning, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer180->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizerVersioningStyle = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText93 = new wxStaticText( this, wxID_ANY, _("Naming convention:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText93->Wrap( -1 );
+ bSizerVersioningStyle->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ wxArrayString m_choiceVersioningStyleChoices;
+ m_choiceVersioningStyle = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVersioningStyleChoices, 0 );
+ m_choiceVersioningStyle->SetSelection( 0 );
+ bSizerVersioningStyle->Add( m_choiceVersioningStyle, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer180->Add( bSizerVersioningStyle, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer29->Add( bSizer180, 0, wxEXPAND|wxALL, 5 );
+
+ m_panelVersioning = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer156;
+ bSizer156 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer1151;
+ bSizer1151 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_versioningFolder = new FolderHistoryBox( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer1151->Add( m_versioningFolder, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonSelectDirVersioning = new wxButton( m_panelVersioning, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectDirVersioning->SetToolTip( _("Select a folder") );
+
+ bSizer1151->Add( m_buttonSelectDirVersioning, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer156->Add( bSizer1151, 0, wxEXPAND, 5 );
+
+
+ m_panelVersioning->SetSizer( bSizer156 );
+ m_panelVersioning->Layout();
+ bSizer156->Fit( m_panelVersioning );
+ bSizer29->Add( m_panelVersioning, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer181->Add( bSizer29, 0, wxEXPAND, 5 );
+
+ m_staticline31 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer181->Add( m_staticline31, 0, wxEXPAND, 5 );
+
+ bSizerConfig = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText90 = new wxStaticText( this, wxID_ANY, _("Configuration"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText90->Wrap( -1 );
+ bSizerConfig->Add( m_staticText90, 0, wxBOTTOM, 5 );
+
+
+ bSizerConfig->Add( 0, 5, 0, 0, 5 );
+
+ m_bitmapDatabase = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizerConfig->Add( m_bitmapDatabase, 0, wxALIGN_CENTER_HORIZONTAL, 10 );
+
+ sbSizerSyncDirections = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer1801;
+ bSizer1801 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextHeaderCategory = new wxStaticText( this, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
+ m_staticTextHeaderCategory->Wrap( -1 );
+ m_staticTextHeaderCategory->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer1801->Add( m_staticTextHeaderCategory, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer1801->Add( 5, 0, 0, 0, 5 );
+
+ m_staticTextHeaderAction = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
+ m_staticTextHeaderAction->Wrap( -1 );
+ m_staticTextHeaderAction->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer1801->Add( m_staticTextHeaderAction, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ sbSizerSyncDirections->Add( bSizer1801, 0, wxEXPAND, 5 );
+
+ bSizerLeftOnly = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapLeftOnly->SetToolTip( _("Item exists on left side only") );
+
+ bSizerLeftOnly->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerLeftOnly->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
+ bSizerLeftOnly->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizerSyncDirections->Add( bSizerLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerRightOnly = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapRightOnly->SetToolTip( _("Item exists on right side only") );
+
+ bSizerRightOnly->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerRightOnly->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
+ bSizerRightOnly->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizerSyncDirections->Add( bSizerRightOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerLeftNewer = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapLeftNewer->SetToolTip( _("Left side is newer") );
+
+ bSizerLeftNewer->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerLeftNewer->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
+ bSizerLeftNewer->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizerSyncDirections->Add( bSizerLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerRightNewer = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapRightNewer->SetToolTip( _("Right side is newer") );
+
+ bSizerRightNewer->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerRightNewer->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
+ bSizerRightNewer->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizerSyncDirections->Add( bSizerRightNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerDifferent = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapDifferent->SetToolTip( _("Items have different content") );
+
+ bSizerDifferent->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerDifferent->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
+ bSizerDifferent->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizerSyncDirections->Add( bSizerDifferent, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerConflict = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapConflict->SetToolTip( _("Conflict/item cannot be categorized") );
+
+ bSizerConflict->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerConflict->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 46,46 ), wxBU_AUTODRAW );
+ bSizerConflict->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizerSyncDirections->Add( bSizerConflict, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerConfig->Add( sbSizerSyncDirections, 0, wxEXPAND, 5 );
+
+
+ bSizerConfig->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ bSizer181->Add( bSizerConfig, 0, wxALL|wxEXPAND, 5 );
+
+
+ bSizer7->Add( bSizer181, 1, 0, 5 );
+
+ m_staticline15 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer7->Add( m_staticline15, 0, wxEXPAND, 5 );
+
+ m_panel37 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel37->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer291;
+ bSizer291 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer291->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonOK = new wxButton( m_panel37, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOK->SetDefault();
+ m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer291->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button16 = new wxButton( m_panel37, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button16->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer291->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer291->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panel37->SetSizer( bSizer291 );
+ m_panel37->Layout();
+ bSizer291->Fit( m_panel37 );
+ bSizer7->Add( m_panel37, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer7 );
+ this->Layout();
+ bSizer7->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) );
+ m_toggleBtnAutomatic->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this );
+ m_toggleBtnAutomatic->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
+ m_toggleBtnMirror->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this );
+ m_toggleBtnMirror->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
+ m_toggleBtnUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this );
+ m_toggleBtnUpdate->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
+ m_toggleBtnCustom->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this );
+ m_toggleBtnCustom->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
+ m_toggleBtnErrorIgnore->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnErrorIgnore ), NULL, this );
+ m_toggleBtnErrorPopup->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnErrorPopup ), NULL, this );
+ m_toggleBtnPermanent->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionPermanent ), NULL, this );
+ m_toggleBtnRecycler->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionRecycler ), NULL, this );
+ m_toggleBtnVersioning->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionVersioning ), NULL, this );
+ m_choiceVersioningStyle->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnParameterChange ), NULL, this );
+ m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this );
+ m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this );
+ m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this );
+ m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this );
+ m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this );
+ m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this );
+ m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this );
}
SyncCfgDlgGenerated::~SyncCfgDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) );
- m_toggleBtnAutomatic->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this );
- m_toggleBtnAutomatic->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
- m_toggleBtnMirror->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this );
- m_toggleBtnMirror->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
- m_toggleBtnUpdate->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this );
- m_toggleBtnUpdate->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
- m_toggleBtnCustom->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this );
- m_toggleBtnCustom->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
- m_toggleBtnErrorIgnore->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnErrorIgnore ), NULL, this );
- m_toggleBtnErrorPopup->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnErrorPopup ), NULL, this );
- m_toggleBtnPermanent->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionPermanent ), NULL, this );
- m_toggleBtnRecycler->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionRecycler ), NULL, this );
- m_toggleBtnVersioning->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionVersioning ), NULL, this );
- m_choiceVersioningStyle->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnParameterChange ), NULL, this );
- m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this );
- m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this );
- m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this );
- m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this );
- m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this );
- m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this );
- m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this );
- m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this );
-
-}
-
-SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
-{
- this->SetSizeHints( wxSize( 470,260 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizerTop = new wxBoxSizer( wxVERTICAL );
-
- m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer181;
- bSizer181 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer42;
- bSizer42 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapStatus = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 );
- bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_staticTextStatus = new wxStaticText( m_panelHeader, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatus->Wrap( -1 );
- m_staticTextStatus->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
-
- m_animationControl1 = new wxAnimationCtrl( m_panelHeader, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE );
- m_animationControl1->SetMinSize( wxSize( 45,45 ) );
-
- bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
-
- bSizer181->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
-
-
- m_panelHeader->SetSizer( bSizer181 );
- m_panelHeader->Layout();
- bSizer181->Fit( m_panelHeader );
- bSizerTop->Add( m_panelHeader, 0, wxEXPAND, 5 );
-
- m_staticlineHeader = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerTop->Add( m_staticlineHeader, 0, wxEXPAND, 5 );
-
- m_panelProgress = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer173;
- bSizer173 = new wxBoxSizer( wxVERTICAL );
-
- m_textCtrlStatus = new wxTextCtrl( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), wxTE_READONLY|wxNO_BORDER );
- m_textCtrlStatus->SetMaxLength( 0 );
- m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer173->Add( m_textCtrlStatus, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- m_gauge1 = new wxGauge( m_panelProgress, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL );
- bSizer173->Add( m_gauge1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- bSizer171 = new wxBoxSizer( wxHORIZONTAL );
-
- wxFlexGridSizer* fgSizer10;
- fgSizer10 = new wxFlexGridSizer( 0, 2, 0, 5 );
- fgSizer10->SetFlexibleDirection( wxBOTH );
- fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_staticTextLabelItemsProc = new wxStaticText( m_panelProgress, wxID_ANY, _("Items processed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextLabelItemsProc->Wrap( -1 );
- m_staticTextLabelItemsProc->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextLabelItemsProc, 0, wxALIGN_BOTTOM, 5 );
-
- bSizerItemsProc = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextProcessedObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextProcessedObj->Wrap( -1 );
- m_staticTextProcessedObj->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- bSizerItemsProc->Add( m_staticTextProcessedObj, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextDataProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDataProcessed->Wrap( -1 );
- m_staticTextDataProcessed->SetFont( wxFont( 9, 70, 90, 90, false, wxEmptyString ) );
-
- bSizerItemsProc->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
-
- fgSizer10->Add( bSizerItemsProc, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextLabelItemsRem = new wxStaticText( m_panelProgress, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextLabelItemsRem->Wrap( -1 );
- m_staticTextLabelItemsRem->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextLabelItemsRem, 0, wxALIGN_BOTTOM, 5 );
-
- bSizerItemsRem = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextRemainingObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextRemainingObj->Wrap( -1 );
- m_staticTextRemainingObj->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- bSizerItemsRem->Add( m_staticTextRemainingObj, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextDataRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDataRemaining->Wrap( -1 );
- m_staticTextDataRemaining->SetFont( wxFont( 9, 70, 90, 90, false, wxEmptyString ) );
-
- bSizerItemsRem->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
-
- fgSizer10->Add( bSizerItemsRem, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticText84 = new wxStaticText( m_panelProgress, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText84->Wrap( -1 );
- m_staticText84->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticText84, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextSpeed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSpeed->Wrap( -1 );
- m_staticTextSpeed->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextSpeed, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextLabelRemTime = new wxStaticText( m_panelProgress, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextLabelRemTime->Wrap( -1 );
- m_staticTextLabelRemTime->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextLabelRemTime, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextRemTime = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRemTime->Wrap( -1 );
- m_staticTextRemTime->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextRemTime, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextLabelElapsedTime = new wxStaticText( m_panelProgress, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextLabelElapsedTime->Wrap( -1 );
- m_staticTextLabelElapsedTime->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextLabelElapsedTime, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextTimeElapsed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeElapsed->Wrap( -1 );
- m_staticTextTimeElapsed->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 );
-
-
- bSizer171->Add( fgSizer10, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
-
-
- bSizer171->Add( 10, 0, 0, 0, 5 );
-
- m_panelGraph = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( 340,130 ), wxTAB_TRAVERSAL );
- m_panelGraph->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer171->Add( m_panelGraph, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer173->Add( bSizer171, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
-
-
- m_panelProgress->SetSizer( bSizer173 );
- m_panelProgress->Layout();
- bSizer173->Fit( m_panelProgress );
- bSizerTop->Add( m_panelProgress, 1, wxEXPAND, 5 );
-
- bSizerFinalStat = new wxBoxSizer( wxVERTICAL );
-
- m_listbookResult = new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP );
- wxSize m_listbookResultImageSize = wxSize( 180,1 );
- int m_listbookResultIndex = 0;
- wxImageList* m_listbookResultImages = new wxImageList( m_listbookResultImageSize.GetWidth(), m_listbookResultImageSize.GetHeight() );
- m_listbookResult->AssignImageList( m_listbookResultImages );
- wxBitmap m_listbookResultBitmap;
- wxImage m_listbookResultImage;
-
- bSizerFinalStat->Add( m_listbookResult, 1, wxEXPAND, 5 );
-
-
- bSizerTop->Add( bSizerFinalStat, 1, wxEXPAND, 5 );
-
- m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerTop->Add( m_staticline12, 0, wxEXPAND, 5 );
-
- m_panelFooter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelFooter->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer182;
- bSizer182 = new wxBoxSizer( wxVERTICAL );
-
- bSizerExecFinished = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText87 = new wxStaticText( m_panelFooter, wxID_ANY, _("On completion"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText87->Wrap( -1 );
- m_staticText87->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
-
- bSizerExecFinished->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_comboBoxExecFinished = new ExecFinishedBox( m_panelFooter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer182->Add( bSizerExecFinished, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- bSizer28 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer28->Add( 0, 0, 1, 0, 5 );
-
- m_buttonOK = new wxButton( m_panelFooter, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
- m_buttonOK->Enable( false );
-
- bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonPause = new wxButton( m_panelFooter, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonAbort = new wxButton( m_panelFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer28->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- bSizer182->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- m_panelFooter->SetSizer( bSizer182 );
- m_panelFooter->Layout();
- bSizer182->Fit( m_panelFooter );
- bSizerTop->Add( m_panelFooter, 0, wxEXPAND, 5 );
-
-
- this->SetSizer( bSizerTop );
- this->Layout();
- bSizerTop->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) );
- this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) );
- m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this );
- m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this );
- m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this );
-}
-
-SyncStatusDlgGenerated::~SyncStatusDlgGenerated()
-{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) );
- this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) );
- m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this );
- m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this );
- m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) );
+ m_toggleBtnAutomatic->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this );
+ m_toggleBtnAutomatic->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
+ m_toggleBtnMirror->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this );
+ m_toggleBtnMirror->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
+ m_toggleBtnUpdate->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this );
+ m_toggleBtnUpdate->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
+ m_toggleBtnCustom->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this );
+ m_toggleBtnCustom->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
+ m_toggleBtnErrorIgnore->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnErrorIgnore ), NULL, this );
+ m_toggleBtnErrorPopup->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnErrorPopup ), NULL, this );
+ m_toggleBtnPermanent->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionPermanent ), NULL, this );
+ m_toggleBtnRecycler->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionRecycler ), NULL, this );
+ m_toggleBtnVersioning->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDeletionVersioning ), NULL, this );
+ m_choiceVersioningStyle->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnParameterChange ), NULL, this );
+ m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this );
+ m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this );
+ m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this );
+ m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this );
+ m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this );
+ m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this );
+ m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this );
+
}
LogControlGenerated::LogControlGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer179;
- bSizer179 = new wxBoxSizer( wxVERTICAL );
-
- m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer179->Add( m_staticline12, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer153;
- bSizer153 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer154;
- bSizer154 = new wxBoxSizer( wxVERTICAL );
-
- m_bpButtonErrors = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
- bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonWarnings = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
- bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonInfo = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
- bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 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|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer179->Add( bSizer153, 1, wxEXPAND, 5 );
-
-
- this->SetSizer( bSizer179 );
- this->Layout();
- bSizer179->Fit( this );
-
- // Connect Events
- m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this );
- m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this );
- m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer179;
+ bSizer179 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer179->Add( m_staticline12, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer153;
+ bSizer153 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer154;
+ bSizer154 = new wxBoxSizer( wxVERTICAL );
+
+ m_bpButtonErrors = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
+ bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonWarnings = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
+ bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonInfo = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
+ bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 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|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer179->Add( bSizer153, 1, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer179 );
+ this->Layout();
+ bSizer179->Fit( this );
+
+ // Connect Events
+ m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this );
+ m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this );
+ m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this );
}
LogControlGenerated::~LogControlGenerated()
{
- // Disconnect Events
- m_bpButtonErrors->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this );
- m_bpButtonWarnings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this );
- m_bpButtonInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this );
-
+ // Disconnect Events
+ m_bpButtonErrors->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this );
+ m_bpButtonWarnings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this );
+ m_bpButtonInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this );
+
}
AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer31;
- bSizer31 = new wxBoxSizer( wxVERTICAL );
-
- m_panelLogo = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
- m_panelLogo->SetBackgroundColour( wxColour( 255, 255, 255 ) );
-
- wxBoxSizer* bSizer36;
- bSizer36 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap11 = new wxStaticBitmap( m_panelLogo, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelLogo->SetSizer( bSizer36 );
- m_panelLogo->Layout();
- bSizer36->Fit( m_panelLogo );
- bSizer31->Add( m_panelLogo, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_staticline341 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline341, 0, wxEXPAND, 5 );
-
- m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_build->Wrap( -1 );
- bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_staticline3411 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline3411, 0, wxEXPAND, 5 );
-
- m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel33->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizerCodeInfo = new wxBoxSizer( wxVERTICAL );
-
- m_staticText72 = new wxStaticText( m_panel33, wxID_ANY, _("Source code written in C++ using:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText72->Wrap( -1 );
- m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
-
- bSizerCodeInfo->Add( m_staticText72, 0, wxALL, 5 );
-
- wxBoxSizer* bSizer167;
- bSizer167 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer171;
- bSizer171 = new wxBoxSizer( wxHORIZONTAL );
-
- m_hyperlink11 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MS Visual C++"), wxT("http://msdn.microsoft.com/library/60k1461a.aspx"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink11->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer171->Add( m_hyperlink11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink9 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MinGW"), wxT("http://www.mingw.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink9->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer171->Add( m_hyperlink9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink10 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Code::Blocks"), wxT("http://www.codeblocks.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink10->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer171->Add( m_hyperlink10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink7 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxWidgets"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink7->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer171->Add( m_hyperlink7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink14 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxFormBuilder"), wxT("http://wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink14->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer171->Add( m_hyperlink14, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer167->Add( bSizer171, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxHORIZONTAL );
-
- m_hyperlink15 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("zenXML"), wxT("http://zenxml.sourceforge.net/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink15->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer172->Add( m_hyperlink15, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink13 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Boost"), wxT("http://www.boost.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink13->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer172->Add( m_hyperlink13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink16 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Artistic Style"), wxT("http://astyle.sourceforge.net"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink16->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer172->Add( m_hyperlink16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink12 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Google Test"), wxT("http://code.google.com/p/googletest"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink12->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer172->Add( m_hyperlink12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink18 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Unicode NSIS"), wxT("http://www.scratchpaper.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink18->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer172->Add( m_hyperlink18, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer167->Add( bSizer172, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizerCodeInfo->Add( bSizer167, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
-
- m_hyperlink21 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("- Zenju -"), wxT("mailto:zenju@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink21->SetFont( wxFont( 10, 74, 93, 92, false, wxT("Segoe Print") ) );
- m_hyperlink21->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_hyperlink21->SetToolTip( _("zenju@gmx.de") );
-
- bSizerCodeInfo->Add( m_hyperlink21, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- m_panel33->SetSizer( bSizerCodeInfo );
- m_panel33->Layout();
- bSizerCodeInfo->Fit( m_panel33 );
- bSizer31->Add( m_panel33, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_panel40 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel40->SetBackgroundColour( wxColour( 153, 170, 187 ) );
-
- wxBoxSizer* bSizer183;
- bSizer183 = new wxBoxSizer( wxVERTICAL );
-
- m_panel39 = new wxPanel( m_panel40, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel39->SetBackgroundColour( wxColour( 221, 221, 255 ) );
-
- wxBoxSizer* bSizer184;
- bSizer184 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer178;
- bSizer178 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText83 = new wxStaticText( m_panel39, wxID_ANY, _("If you like FreeFileSync"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText83->Wrap( -1 );
- m_staticText83->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 92, false, wxEmptyString ) );
- m_staticText83->SetForegroundColour( wxColour( 0, 0, 0 ) );
-
- bSizer178->Add( m_staticText83, 0, wxALL, 5 );
-
- m_hyperlink3 = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("Donate with PayPal"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zenju@gmx.de&no_shipping=1&lc=US&currency_code=EUR"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink3->SetFont( wxFont( 11, 70, 90, 92, true, wxEmptyString ) );
- m_hyperlink3->SetBackgroundColour( wxColour( 221, 221, 255 ) );
- m_hyperlink3->SetToolTip( _("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zenju@gmx.de&no_shipping=1&lc=US&currency_code=EUR") );
-
- bSizer178->Add( m_hyperlink3, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer184->Add( bSizer178, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_animCtrlWink = new wxAnimationCtrl( m_panel39, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( -1,-1 ), wxAC_DEFAULT_STYLE );
- bSizer184->Add( m_animCtrlWink, 0, 0, 5 );
-
-
- m_panel39->SetSizer( bSizer184 );
- m_panel39->Layout();
- bSizer184->Fit( m_panel39 );
- bSizer183->Add( m_panel39, 0, wxEXPAND|wxALL, 5 );
-
-
- m_panel40->SetSizer( bSizer183 );
- m_panel40->Layout();
- bSizer183->Fit( m_panel40 );
- bSizer31->Add( m_panel40, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
- m_scrolledWindowTranslators->SetScrollRate( 10, 10 );
- m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_scrolledWindowTranslators->SetMinSize( wxSize( -1,180 ) );
-
- bSizerTranslators = new wxBoxSizer( wxVERTICAL );
-
- m_staticText54 = new wxStaticText( m_scrolledWindowTranslators, wxID_ANY, _("Many thanks for localization:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText54->Wrap( -1 );
- m_staticText54->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
-
- bSizerTranslators->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 );
-
-
- bSizerTranslators->Add( 0, 5, 0, 0, 5 );
-
- fgSizerTranslators = new wxFlexGridSizer( 50, 3, 2, 20 );
- fgSizerTranslators->SetFlexibleDirection( wxBOTH );
- fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
-
- bSizerTranslators->Add( fgSizerTranslators, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- m_scrolledWindowTranslators->SetSizer( bSizerTranslators );
- m_scrolledWindowTranslators->Layout();
- bSizerTranslators->Fit( m_scrolledWindowTranslators );
- bSizer31->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_staticline43 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline43, 0, wxEXPAND, 5 );
-
- m_staticText94 = new wxStaticText( this, wxID_ANY, _("Feedback and suggestions are welcome"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText94->Wrap( -1 );
- bSizer31->Add( m_staticText94, 0, wxALL, 5 );
-
- wxBoxSizer* bSizer166;
- bSizer166 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer170;
- bSizer170 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer170->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Homepage"), wxT("http://freefilesync.sourceforge.net/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink1->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
- m_hyperlink1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") );
-
- bSizer170->Add( m_hyperlink1, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_bitmap9->SetToolTip( _("FreeFileSync at Sourceforge") );
-
- bSizer170->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer170->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- bSizer166->Add( bSizer170, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer1711;
- bSizer1711 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer1711->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, _("Email"), wxT("mailto:zenju@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink2->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
- m_hyperlink2->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_hyperlink2->SetToolTip( _("zenju@gmx.de") );
-
- bSizer1711->Add( m_hyperlink2, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_bitmap10->SetToolTip( _("Email") );
-
- bSizer1711->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer1711->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- bSizer166->Add( bSizer1711, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer31->Add( bSizer166, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- m_staticline34 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline34, 0, wxEXPAND, 5 );
-
- m_staticText93 = new wxStaticText( this, wxID_ANY, _("Published under the GNU General Public License"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText93->Wrap( -1 );
- bSizer31->Add( m_staticText93, 0, wxALL, 5 );
-
- wxBoxSizer* bSizer1671;
- bSizer1671 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer1671->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer1671->Add( m_bitmap13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink5->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- bSizer1671->Add( m_hyperlink5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer1671->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer31->Add( bSizer1671, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline36, 0, wxEXPAND, 5 );
-
- m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer168;
- bSizer168 = new wxBoxSizer( wxVERTICAL );
-
- m_buttonOkay = new wxButton( m_panel41, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer168->Add( m_buttonOkay, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
-
- m_panel41->SetSizer( bSizer168 );
- m_panel41->Layout();
- bSizer168->Fit( m_panel41 );
- bSizer31->Add( m_panel41, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- this->SetSizer( bSizer31 );
- this->Layout();
- bSizer31->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer31;
+ bSizer31 = new wxBoxSizer( wxVERTICAL );
+
+ m_bitmapLogo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer31->Add( m_bitmapLogo, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticline341 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer31->Add( m_staticline341, 0, wxEXPAND, 5 );
+
+ m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_build->Wrap( -1 );
+ bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticline3411 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer31->Add( m_staticline3411, 0, wxEXPAND, 5 );
+
+ m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel33->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizerCodeInfo = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText72 = new wxStaticText( m_panel33, wxID_ANY, _("Source code written in C++ using:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText72->Wrap( -1 );
+ m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerCodeInfo->Add( m_staticText72, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizer167;
+ bSizer167 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer171;
+ bSizer171 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_hyperlink11 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MS Visual C++"), wxT("http://msdn.microsoft.com/library/60k1461a.aspx"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink11->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer171->Add( m_hyperlink11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink9 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MinGW"), wxT("http://www.mingw.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink9->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer171->Add( m_hyperlink9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink10 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Code::Blocks"), wxT("http://www.codeblocks.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink10->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer171->Add( m_hyperlink10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink7 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxWidgets"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink7->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer171->Add( m_hyperlink7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink14 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxFormBuilder"), wxT("http://wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink14->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer171->Add( m_hyperlink14, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer167->Add( bSizer171, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_hyperlink15 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("zenXML"), wxT("http://zenxml.sourceforge.net/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink15->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer172->Add( m_hyperlink15, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink13 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Boost"), wxT("http://www.boost.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink13->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer172->Add( m_hyperlink13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink16 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Artistic Style"), wxT("http://astyle.sourceforge.net"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink16->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer172->Add( m_hyperlink16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink12 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Google Test"), wxT("http://code.google.com/p/googletest"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink12->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer172->Add( m_hyperlink12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink18 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Unicode NSIS"), wxT("http://www.scratchpaper.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink18->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer172->Add( m_hyperlink18, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer167->Add( bSizer172, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerCodeInfo->Add( bSizer167, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ m_panel33->SetSizer( bSizerCodeInfo );
+ m_panel33->Layout();
+ bSizerCodeInfo->Fit( m_panel33 );
+ bSizer31->Add( m_panel33, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_panel40 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel40->SetBackgroundColour( wxColour( 153, 170, 187 ) );
+
+ wxBoxSizer* bSizer183;
+ bSizer183 = new wxBoxSizer( wxVERTICAL );
+
+ m_panel39 = new wxPanel( m_panel40, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel39->SetBackgroundColour( wxColour( 221, 221, 255 ) );
+
+ wxBoxSizer* bSizer184;
+ bSizer184 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer178;
+ bSizer178 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText83 = new wxStaticText( m_panel39, wxID_ANY, _("If you like FreeFileSync"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText83->Wrap( -1 );
+ m_staticText83->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 92, false, wxEmptyString ) );
+ m_staticText83->SetForegroundColour( wxColour( 0, 0, 0 ) );
+
+ bSizer178->Add( m_staticText83, 0, wxALL, 5 );
+
+ m_hyperlinkDonate = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("Donate with PayPal"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zenju@gmx.de&no_shipping=1&lc=US&currency_code=EUR"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlinkDonate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, true, wxEmptyString ) );
+ m_hyperlinkDonate->SetBackgroundColour( wxColour( 221, 221, 255 ) );
+ m_hyperlinkDonate->SetToolTip( _("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zenju@gmx.de&no_shipping=1&lc=US&currency_code=EUR") );
+
+ bSizer178->Add( m_hyperlinkDonate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer184->Add( bSizer178, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_animCtrlWink = new wxAnimationCtrl( m_panel39, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( -1,-1 ), wxAC_DEFAULT_STYLE );
+ bSizer184->Add( m_animCtrlWink, 0, 0, 5 );
+
+
+ m_panel39->SetSizer( bSizer184 );
+ m_panel39->Layout();
+ bSizer184->Fit( m_panel39 );
+ bSizer183->Add( m_panel39, 0, wxEXPAND|wxALL, 5 );
+
+
+ m_panel40->SetSizer( bSizer183 );
+ m_panel40->Layout();
+ bSizer183->Fit( m_panel40 );
+ bSizer31->Add( m_panel40, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
+ m_scrolledWindowTranslators->SetScrollRate( 10, 10 );
+ m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_scrolledWindowTranslators->SetMinSize( wxSize( -1,180 ) );
+
+ bSizerTranslators = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText54 = new wxStaticText( m_scrolledWindowTranslators, wxID_ANY, _("Many thanks for localization:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText54->Wrap( -1 );
+ m_staticText54->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerTranslators->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 );
+
+
+ bSizerTranslators->Add( 0, 5, 0, 0, 5 );
+
+ fgSizerTranslators = new wxFlexGridSizer( 50, 3, 2, 20 );
+ fgSizerTranslators->SetFlexibleDirection( wxBOTH );
+ fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+
+ bSizerTranslators->Add( fgSizerTranslators, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ m_scrolledWindowTranslators->SetSizer( bSizerTranslators );
+ m_scrolledWindowTranslators->Layout();
+ bSizerTranslators->Fit( m_scrolledWindowTranslators );
+ bSizer31->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_staticline43 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer31->Add( m_staticline43, 0, wxEXPAND, 5 );
+
+ m_staticText94 = new wxStaticText( this, wxID_ANY, _("Feedback and suggestions are welcome"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText94->Wrap( -1 );
+ bSizer31->Add( m_staticText94, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizer166;
+ bSizer166 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer170;
+ bSizer170 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer170->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Homepage"), wxT("http://freefilesync.sourceforge.net/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, true, wxEmptyString ) );
+ m_hyperlink1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") );
+
+ bSizer170->Add( m_hyperlink1, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_bitmap9->SetToolTip( _("FreeFileSync at Sourceforge") );
+
+ bSizer170->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer170->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ bSizer166->Add( bSizer170, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer1711;
+ bSizer1711 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer1711->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, _("Email"), wxT("mailto:zenju@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, true, wxEmptyString ) );
+ m_hyperlink2->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_hyperlink2->SetToolTip( _("zenju@gmx.de") );
+
+ bSizer1711->Add( m_hyperlink2, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_bitmap10->SetToolTip( _("Email") );
+
+ bSizer1711->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer1711->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ bSizer166->Add( bSizer1711, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer31->Add( bSizer166, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_staticline34 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer31->Add( m_staticline34, 0, wxEXPAND, 5 );
+
+ m_staticText93 = new wxStaticText( this, wxID_ANY, _("Published under the GNU General Public License"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText93->Wrap( -1 );
+ bSizer31->Add( m_staticText93, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizer1671;
+ bSizer1671 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer1671->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer1671->Add( m_bitmap13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink5->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ bSizer1671->Add( m_hyperlink5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer1671->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer31->Add( bSizer1671, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer31->Add( m_staticline36, 0, wxEXPAND, 5 );
+
+ m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer168;
+ bSizer168 = new wxBoxSizer( wxVERTICAL );
+
+ m_buttonOkay = new wxButton( m_panel41, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer168->Add( m_buttonOkay, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+
+ m_panel41->SetSizer( bSizer168 );
+ m_panel41->Layout();
+ bSizer168->Fit( m_panel41 );
+ bSizer31->Add( m_panel41, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ this->SetSizer( bSizer31 );
+ this->Layout();
+ bSizer31->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
}
AboutDlgGenerated::~AboutDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
- m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
+ m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
+
}
MessageDlgGenerated::MessageDlgGenerated( 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( 300,160 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer26;
- bSizer26 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapMsgType = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer26->Add( m_bitmapMsgType, 0, wxRIGHT|wxLEFT, 5 );
-
- m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 400,130 ), wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER );
- m_textCtrlMessage->SetMaxLength( 0 );
- bSizer26->Add( m_textCtrlMessage, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline6, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel33->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer177;
- bSizer177 = new wxBoxSizer( wxVERTICAL );
-
- m_checkBoxCustom = new wxCheckBox( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer177->Add( m_checkBoxCustom, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonCustom1 = new wxButton( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonCustom1->SetDefault();
- m_buttonCustom1->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonCustom1, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonCustom2 = new wxButton( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonCustom2->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonCustom2, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonCancel = new wxButton( m_panel33, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer177->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- m_panel33->SetSizer( bSizer177 );
- m_panel33->Layout();
- bSizer177->Fit( m_panel33 );
- bSizer24->Add( m_panel33, 0, wxEXPAND, 5 );
-
-
- this->SetSizer( bSizer24 );
- this->Layout();
- bSizer24->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MessageDlgGenerated::OnClose ) );
- m_buttonCustom1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnButton1 ), NULL, this );
- m_buttonCustom2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnButton2 ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxSize( 300,160 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer26;
+ bSizer26 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapMsgType = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer26->Add( m_bitmapMsgType, 0, wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 420,150 ), wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER );
+ m_textCtrlMessage->SetMaxLength( 0 );
+ bSizer26->Add( m_textCtrlMessage, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline6, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel33->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer177;
+ bSizer177 = new wxBoxSizer( wxVERTICAL );
+
+ m_checkBoxCustom = new wxCheckBox( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer177->Add( m_checkBoxCustom, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonCustom1 = new wxButton( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonCustom1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonCustom1, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonCustom2 = new wxButton( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonCustom2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonCustom2, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonCancel = new wxButton( m_panel33, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonCancel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer177->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ m_panel33->SetSizer( bSizer177 );
+ m_panel33->Layout();
+ bSizer177->Fit( m_panel33 );
+ bSizer24->Add( m_panel33, 0, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer24 );
+ this->Layout();
+ bSizer24->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MessageDlgGenerated::OnClose ) );
+ m_buttonCustom1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnButton1 ), NULL, this );
+ m_buttonCustom2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnButton2 ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnCancel ), NULL, this );
}
MessageDlgGenerated::~MessageDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MessageDlgGenerated::OnClose ) );
- m_buttonCustom1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnButton1 ), NULL, this );
- m_buttonCustom2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnButton2 ), NULL, this );
- m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MessageDlgGenerated::OnClose ) );
+ m_buttonCustom1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnButton1 ), NULL, this );
+ m_buttonCustom2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnButton2 ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MessageDlgGenerated::OnCancel ), NULL, this );
+
}
DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 300,180 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
-
- m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer181;
- bSizer181 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer41;
- bSizer41 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap12 = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer41->Add( m_bitmap12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_staticTextHeader = new wxStaticText( m_panelHeader, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextHeader->Wrap( -1 );
- m_staticTextHeader->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer181->Add( bSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
-
- m_panelHeader->SetSizer( bSizer181 );
- m_panelHeader->Layout();
- bSizer181->Fit( m_panelHeader );
- bSizer24->Add( m_panelHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 );
-
- m_textCtrlFileList = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 550,200 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER );
- m_textCtrlFileList->SetMaxLength( 0 );
- bSizer24->Add( m_textCtrlFileList, 1, wxEXPAND, 5 );
-
- m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 );
-
- m_panel36 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel36->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer180;
- bSizer180 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer99;
- bSizer99 = new wxBoxSizer( wxVERTICAL );
-
- m_checkBoxUseRecycler = new wxCheckBox( m_panel36, wxID_ANY, _("Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer99->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
-
- m_checkBoxDeleteBothSides = new wxCheckBox( m_panel36, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") );
-
- bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer180->Add( bSizer99, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonOK = new wxButton( m_panel36, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOK->SetDefault();
- m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonCancel = new wxButton( m_panel36, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonCancel, 0, wxALL, 5 );
-
-
- bSizer180->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panel36->SetSizer( bSizer180 );
- m_panel36->Layout();
- bSizer180->Fit( m_panel36 );
- bSizer24->Add( m_panel36, 0, wxEXPAND, 5 );
-
-
- this->SetSizer( bSizer24 );
- this->Layout();
- bSizer24->Fit( this );
-
- 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_checkBoxDeleteBothSides->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this );
- m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxSize( 300,180 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer181;
+ bSizer181 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer41;
+ bSizer41 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapDeleteType = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer41->Add( m_bitmapDeleteType, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_staticTextHeader = new wxStaticText( m_panelHeader, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ m_staticTextHeader->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer181->Add( bSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+
+ m_panelHeader->SetSizer( bSizer181 );
+ m_panelHeader->Layout();
+ bSizer181->Fit( m_panelHeader );
+ bSizer24->Add( m_panelHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 );
+
+ m_textCtrlFileList = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 550,200 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER );
+ m_textCtrlFileList->SetMaxLength( 0 );
+ bSizer24->Add( m_textCtrlFileList, 1, wxEXPAND, 5 );
+
+ m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 );
+
+ m_panel36 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel36->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer180;
+ bSizer180 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer99;
+ bSizer99 = new wxBoxSizer( wxVERTICAL );
+
+ m_checkBoxUseRecycler = new wxCheckBox( m_panel36, wxID_ANY, _("Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer99->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
+
+ m_checkBoxDeleteBothSides = new wxCheckBox( m_panel36, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") );
+
+ bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer180->Add( bSizer99, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonOK = new wxButton( m_panel36, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOK->SetDefault();
+ m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonCancel = new wxButton( m_panel36, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonCancel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonCancel, 0, wxALL, 5 );
+
+
+ bSizer180->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panel36->SetSizer( bSizer180 );
+ m_panel36->Layout();
+ bSizer180->Fit( m_panel36 );
+ bSizer24->Add( m_panel36, 0, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer24 );
+ this->Layout();
+ bSizer24->Fit( this );
+
+ 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_checkBoxDeleteBothSides->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
}
DeleteDlgGenerated::~DeleteDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) );
- m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this );
- m_checkBoxDeleteBothSides->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this );
- m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
- m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) );
+ m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this );
+ m_checkBoxDeleteBothSides->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
+
}
FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 500,300 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer21;
- bSizer21 = new wxBoxSizer( wxVERTICAL );
-
- m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap26 = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer72->Add( m_bitmap26, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_staticTexHeader = new wxStaticText( m_panelHeader, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTexHeader->Wrap( -1 );
- m_staticTexHeader->SetFont( wxFont( 12, 70, 90, 92, false, wxEmptyString ) );
- m_staticTexHeader->SetForegroundColour( wxColour( 0, 0, 0 ) );
-
- bSizer72->Add( m_staticTexHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_staticText44 = new wxStaticText( m_panelHeader, wxID_ANY, _("Only files that match all filter settings will be synchronized.\nNote: File names must be relative to base directories!"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticText44->Wrap( 480 );
- bSizer72->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer72->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonHelp = new wxBitmapButton( m_panelHeader, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- m_bpButtonHelp->SetToolTip( _("Help") );
-
- bSizer72->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelHeader->SetSizer( bSizer72 );
- m_panelHeader->Layout();
- bSizer72->Fit( m_panelHeader );
- bSizer21->Add( m_panelHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticline17 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer21->Add( m_staticline17, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer159;
- bSizer159 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer166;
- bSizer166 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText78 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText78->Wrap( -1 );
- bSizer166->Add( m_staticText78, 0, wxALL, 5 );
-
- wxBoxSizer* bSizer1661;
- bSizer1661 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapInclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
- bSizer1661->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
-
- m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
- m_textCtrlInclude->SetMaxLength( 0 );
- bSizer1661->Add( m_textCtrlInclude, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
-
- bSizer166->Add( bSizer1661, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxLEFT, 5 );
-
- m_staticline22 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer166->Add( m_staticline22, 0, wxEXPAND, 5 );
-
- m_staticText77 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText77->Wrap( -1 );
- bSizer166->Add( m_staticText77, 0, wxALL, 5 );
-
- wxBoxSizer* bSizer1651;
- bSizer1651 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapExclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
- bSizer1651->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
- m_textCtrlExclude->SetMaxLength( 0 );
- bSizer1651->Add( m_textCtrlExclude, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer166->Add( bSizer1651, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxLEFT, 5 );
-
-
- bSizer159->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticline24 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer159->Add( m_staticline24, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer160;
- bSizer160 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText79 = new wxStaticText( this, wxID_ANY, _("Time span"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText79->Wrap( -1 );
- bSizer160->Add( m_staticText79, 0, wxALL, 5 );
-
- wxBoxSizer* bSizer167;
- bSizer167 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapFilterDate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 34,34 ), 0 );
- bSizer167->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
-
- wxBoxSizer* bSizer165;
- bSizer165 = new wxBoxSizer( wxVERTICAL );
-
- m_spinCtrlTimespan = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer165->Add( m_spinCtrlTimespan, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxArrayString m_choiceUnitTimespanChoices;
- m_choiceUnitTimespan = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 );
- m_choiceUnitTimespan->SetSelection( 0 );
- bSizer165->Add( m_choiceUnitTimespan, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer167->Add( bSizer165, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
-
-
- bSizer160->Add( bSizer167, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- m_staticline23 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer160->Add( m_staticline23, 0, wxEXPAND, 5 );
-
- m_staticText80 = new wxStaticText( this, wxID_ANY, _("File size"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText80->Wrap( -1 );
- bSizer160->Add( m_staticText80, 0, wxALL, 5 );
-
- wxBoxSizer* bSizer168;
- bSizer168 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapFilterSize = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 );
- bSizer168->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer162;
- bSizer162 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText101 = new wxStaticText( this, wxID_ANY, _("Minimum"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText101->Wrap( -1 );
- bSizer162->Add( m_staticText101, 0, wxBOTTOM, 2 );
-
- m_spinCtrlMinSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer162->Add( m_spinCtrlMinSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxArrayString m_choiceUnitMinSizeChoices;
- m_choiceUnitMinSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 );
- m_choiceUnitMinSize->SetSelection( 0 );
- bSizer162->Add( m_choiceUnitMinSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer158->Add( bSizer162, 0, wxBOTTOM|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer163;
- bSizer163 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText102 = new wxStaticText( this, wxID_ANY, _("Maximum"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText102->Wrap( -1 );
- bSizer163->Add( m_staticText102, 0, wxBOTTOM, 2 );
-
- m_spinCtrlMaxSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer163->Add( m_spinCtrlMaxSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxArrayString m_choiceUnitMaxSizeChoices;
- m_choiceUnitMaxSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 );
- m_choiceUnitMaxSize->SetSelection( 0 );
- bSizer163->Add( m_choiceUnitMaxSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer158->Add( bSizer163, 0, wxEXPAND, 5 );
-
-
- bSizer168->Add( bSizer158, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer160->Add( bSizer168, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer159->Add( bSizer160, 0, wxEXPAND, 5 );
-
-
- bSizer21->Add( bSizer159, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_staticline16 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer21->Add( m_staticline16, 0, wxEXPAND, 5 );
-
- m_panel38 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel38->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_panel38->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer22;
- bSizer22 = new wxBoxSizer( wxHORIZONTAL );
-
- m_button9 = new wxButton( m_panel38, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer22->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonOk = new wxButton( m_panel38, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOk->SetDefault();
- m_buttonOk->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer22->Add( m_buttonOk, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button17 = new wxButton( m_panel38, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button17->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer22->Add( m_button17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- m_panel38->SetSizer( bSizer22 );
- m_panel38->Layout();
- bSizer22->Fit( m_panel38 );
- bSizer21->Add( m_panel38, 0, wxEXPAND, 5 );
-
-
- this->SetSizer( bSizer21 );
- this->Layout();
- bSizer21->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
- m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this );
- m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
- m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
- m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
- m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this );
- m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxSize( 500,300 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer21;
+ bSizer21 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap26 = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer72->Add( m_bitmap26, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticTextHeader = new wxStaticText( m_panelHeader, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ m_staticTextHeader->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_staticText44 = new wxStaticText( m_panelHeader, wxID_ANY, _("Only files that match all filter settings will be synchronized.\nNote: File names must be relative to base directories!"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_staticText44->Wrap( 480 );
+ bSizer72->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer72->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonHelp = new wxBitmapButton( m_panelHeader, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ m_bpButtonHelp->SetToolTip( _("Help") );
+
+ bSizer72->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panelHeader->SetSizer( bSizer72 );
+ m_panelHeader->Layout();
+ bSizer72->Fit( m_panelHeader );
+ bSizer21->Add( m_panelHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticline17 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer21->Add( m_staticline17, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer159;
+ bSizer159 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer166;
+ bSizer166 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText78 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText78->Wrap( -1 );
+ bSizer166->Add( m_staticText78, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizer1661;
+ bSizer1661 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapInclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
+ bSizer1661->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+ m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
+ m_textCtrlInclude->SetMaxLength( 0 );
+ bSizer1661->Add( m_textCtrlInclude, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+
+ bSizer166->Add( bSizer1661, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxLEFT, 5 );
+
+ m_staticline22 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer166->Add( m_staticline22, 0, wxEXPAND, 5 );
+
+ m_staticText77 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText77->Wrap( -1 );
+ bSizer166->Add( m_staticText77, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizer1651;
+ bSizer1651 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapExclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
+ bSizer1651->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
+ m_textCtrlExclude->SetMaxLength( 0 );
+ bSizer1651->Add( m_textCtrlExclude, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer166->Add( bSizer1651, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxLEFT, 5 );
+
+
+ bSizer159->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticline24 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer159->Add( m_staticline24, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer160;
+ bSizer160 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText79 = new wxStaticText( this, wxID_ANY, _("Time span"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText79->Wrap( -1 );
+ bSizer160->Add( m_staticText79, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizer167;
+ bSizer167 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapFilterDate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 34,34 ), 0 );
+ bSizer167->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+
+ wxBoxSizer* bSizer165;
+ bSizer165 = new wxBoxSizer( wxVERTICAL );
+
+ m_spinCtrlTimespan = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer165->Add( m_spinCtrlTimespan, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxArrayString m_choiceUnitTimespanChoices;
+ m_choiceUnitTimespan = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 );
+ m_choiceUnitTimespan->SetSelection( 0 );
+ bSizer165->Add( m_choiceUnitTimespan, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer167->Add( bSizer165, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+
+
+ bSizer160->Add( bSizer167, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_staticline23 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer160->Add( m_staticline23, 0, wxEXPAND, 5 );
+
+ m_staticText80 = new wxStaticText( this, wxID_ANY, _("File size"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText80->Wrap( -1 );
+ bSizer160->Add( m_staticText80, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizer168;
+ bSizer168 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapFilterSize = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 );
+ bSizer168->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer162;
+ bSizer162 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText101 = new wxStaticText( this, wxID_ANY, _("Minimum"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText101->Wrap( -1 );
+ bSizer162->Add( m_staticText101, 0, wxBOTTOM, 2 );
+
+ m_spinCtrlMinSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer162->Add( m_spinCtrlMinSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxArrayString m_choiceUnitMinSizeChoices;
+ m_choiceUnitMinSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 );
+ m_choiceUnitMinSize->SetSelection( 0 );
+ bSizer162->Add( m_choiceUnitMinSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer158->Add( bSizer162, 0, wxBOTTOM|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer163;
+ bSizer163 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText102 = new wxStaticText( this, wxID_ANY, _("Maximum"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText102->Wrap( -1 );
+ bSizer163->Add( m_staticText102, 0, wxBOTTOM, 2 );
+
+ m_spinCtrlMaxSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer163->Add( m_spinCtrlMaxSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxArrayString m_choiceUnitMaxSizeChoices;
+ m_choiceUnitMaxSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 );
+ m_choiceUnitMaxSize->SetSelection( 0 );
+ bSizer163->Add( m_choiceUnitMaxSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer158->Add( bSizer163, 0, wxEXPAND, 5 );
+
+
+ bSizer168->Add( bSizer158, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer160->Add( bSizer168, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer159->Add( bSizer160, 0, wxEXPAND, 5 );
+
+
+ bSizer21->Add( bSizer159, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_staticline16 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer21->Add( m_staticline16, 0, wxEXPAND, 5 );
+
+ m_panel38 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel38->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel38->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer22;
+ bSizer22 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_button9 = new wxButton( m_panel38, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button9->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonOk = new wxButton( m_panel38, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOk->SetDefault();
+ m_buttonOk->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer22->Add( m_buttonOk, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button17 = new wxButton( m_panel38, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button17->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ m_panel38->SetSizer( bSizer22 );
+ m_panel38->Layout();
+ bSizer22->Fit( m_panel38 );
+ bSizer21->Add( m_panel38, 0, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer21 );
+ this->Layout();
+ bSizer21->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
+ m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this );
+ m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
+ m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
+ m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
+ m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this );
+ m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
}
FilterDlgGenerated::~FilterDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
- m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this );
- m_textCtrlInclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
- m_textCtrlExclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
- m_choiceUnitTimespan->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_choiceUnitMinSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_choiceUnitMaxSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
- m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this );
- m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
+ m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this );
+ m_textCtrlInclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
+ m_textCtrlExclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
+ m_choiceUnitTimespan->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_choiceUnitMinSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_choiceUnitMaxSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
+ m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this );
+ m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
+
}
GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 320,360 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer95;
- bSizer95 = new wxBoxSizer( wxVERTICAL );
-
- m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapSettings = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer72->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_staticText56 = new wxStaticText( m_panelHeader, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText56->Wrap( -1 );
- m_staticText56->SetFont( wxFont( 12, 70, 90, 92, false, wxEmptyString ) );
- m_staticText56->SetForegroundColour( wxColour( 0, 0, 0 ) );
-
- bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panelHeader->SetSizer( bSizer72 );
- m_panelHeader->Layout();
- bSizer72->Fit( m_panelHeader );
- bSizer95->Add( m_panelHeader, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticline19 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer95->Add( m_staticline19, 0, wxEXPAND, 5 );
-
- m_checkBoxTransCopy = new wxCheckBox( this, wxID_ANY, _("Fail-safe file copy"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer95->Add( m_checkBoxTransCopy, 0, wxALL|wxEXPAND, 5 );
-
- m_staticText82 = new wxStaticText( this, wxID_ANY, _("Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText82->Wrap( 420 );
- m_staticText82->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- bSizer95->Add( m_staticText82, 0, wxRIGHT|wxLEFT|wxEXPAND, 20 );
-
- m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer95->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 );
-
- m_staticTextCopyLocked = new wxStaticText( this, wxID_ANY, _("Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCopyLocked->Wrap( 420 );
- m_staticTextCopyLocked->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- bSizer95->Add( m_staticTextCopyLocked, 0, wxEXPAND|wxRIGHT|wxLEFT, 20 );
-
- m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer95->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 );
-
- m_staticText8211 = new wxStaticText( this, wxID_ANY, _("Transfer file and folder permissions (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText8211->Wrap( 420 );
- m_staticText8211->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- bSizer95->Add( m_staticText8211, 0, wxEXPAND|wxRIGHT|wxLEFT, 20 );
-
- m_staticline191 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer95->Add( m_staticline191, 0, wxEXPAND|wxTOP, 5 );
-
- m_buttonResetDialogs = new zen::BitmapButton( this, wxID_ANY, _("Restore hidden dialogs"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonResetDialogs->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer95->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
- m_staticline192 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer95->Add( m_staticline192, 0, wxEXPAND, 5 );
-
- m_staticText85 = new wxStaticText( this, wxID_ANY, _("External applications"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText85->Wrap( -1 );
- bSizer95->Add( m_staticText85, 0, wxALL, 5 );
-
- wxBoxSizer* bSizer173;
- bSizer173 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer157;
- bSizer157 = new wxBoxSizer( wxVERTICAL );
-
- m_bpButtonAddRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- bSizer157->Add( m_bpButtonAddRow, 0, 0, 5 );
-
- m_bpButtonRemoveRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 24,24 ), wxBU_AUTODRAW );
- bSizer157->Add( m_bpButtonRemoveRow, 0, 0, 5 );
-
-
- bSizer173->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
-
- m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-
- // Grid
- m_gridCustomCommand->CreateGrid( 5, 2 );
- m_gridCustomCommand->EnableEditing( true );
- m_gridCustomCommand->EnableGridLines( true );
- m_gridCustomCommand->EnableDragGridSize( false );
- m_gridCustomCommand->SetMargins( 0, 0 );
-
- // Columns
- m_gridCustomCommand->SetColSize( 0, 165 );
- m_gridCustomCommand->SetColSize( 1, 196 );
- m_gridCustomCommand->EnableDragColMove( false );
- m_gridCustomCommand->EnableDragColSize( true );
- m_gridCustomCommand->SetColLabelSize( 20 );
- m_gridCustomCommand->SetColLabelValue( 0, _("Description") );
- m_gridCustomCommand->SetColLabelValue( 1, _("Command line") );
- m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
-
- // Rows
- m_gridCustomCommand->EnableDragRowSize( false );
- m_gridCustomCommand->SetRowLabelSize( 1 );
- m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
-
- // Label Appearance
-
- // Cell Defaults
- m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
- bSizer173->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
-
- bSizer95->Add( bSizer173, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 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_BTNFACE ) );
-
- wxBoxSizer* bSizer97;
- bSizer97 = new wxBoxSizer( wxHORIZONTAL );
-
- m_button9 = new wxButton( m_panel39, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer97->Add( 0, 0, 1, 0, 5 );
-
- m_buttonOkay = new wxButton( m_panel39, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_button29 = new wxButton( m_panel39, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button29, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- m_panel39->SetSizer( bSizer97 );
- m_panel39->Layout();
- bSizer97->Fit( m_panel39 );
- bSizer95->Add( m_panel39, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- this->SetSizer( bSizer95 );
- this->Layout();
- bSizer95->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) );
- m_buttonResetDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this );
- m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this );
- m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this );
- m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this );
- m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxSize( 320,360 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer95;
+ bSizer95 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapSettings = new wxStaticBitmap( m_panelHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer72->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticTextHeader = new wxStaticText( m_panelHeader, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ m_staticTextHeader->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panelHeader->SetSizer( bSizer72 );
+ m_panelHeader->Layout();
+ bSizer72->Fit( m_panelHeader );
+ bSizer95->Add( m_panelHeader, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticline19 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer95->Add( m_staticline19, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer160;
+ bSizer160 = new wxBoxSizer( wxVERTICAL );
+
+ m_checkBoxTransCopy = new wxCheckBox( this, wxID_ANY, _("Fail-safe file copy"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer160->Add( m_checkBoxTransCopy, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticText82 = new wxStaticText( this, wxID_ANY, _("Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText82->Wrap( 420 );
+ m_staticText82->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ bSizer160->Add( m_staticText82, 0, wxRIGHT|wxLEFT|wxEXPAND, 20 );
+
+ m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer160->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticTextCopyLocked = new wxStaticText( this, wxID_ANY, _("Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCopyLocked->Wrap( 420 );
+ m_staticTextCopyLocked->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ bSizer160->Add( m_staticTextCopyLocked, 0, wxEXPAND|wxRIGHT|wxLEFT, 20 );
+
+ m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer160->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticText8211 = new wxStaticText( this, wxID_ANY, _("Transfer file and folder permissions (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText8211->Wrap( 420 );
+ m_staticText8211->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ bSizer160->Add( m_staticText8211, 0, wxEXPAND|wxRIGHT|wxLEFT, 20 );
+
+
+ bSizer95->Add( bSizer160, 0, wxEXPAND|wxALL, 5 );
+
+ m_staticline191 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer95->Add( m_staticline191, 0, wxEXPAND|wxTOP, 5 );
+
+ m_buttonResetDialogs = new zen::BitmapButton( this, wxID_ANY, _("Restore hidden dialogs"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonResetDialogs->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer95->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ m_staticline192 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer95->Add( m_staticline192, 0, wxEXPAND, 5 );
+
+ m_staticText85 = new wxStaticText( this, wxID_ANY, _("External applications"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText85->Wrap( -1 );
+ bSizer95->Add( m_staticText85, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizer173;
+ bSizer173 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer157;
+ bSizer157 = new wxBoxSizer( wxVERTICAL );
+
+ m_bpButtonAddRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ bSizer157->Add( m_bpButtonAddRow, 0, 0, 5 );
+
+ m_bpButtonRemoveRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 25,25 ), wxBU_AUTODRAW );
+ bSizer157->Add( m_bpButtonRemoveRow, 0, 0, 5 );
+
+
+ bSizer173->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
+
+ m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+
+ // Grid
+ m_gridCustomCommand->CreateGrid( 5, 2 );
+ m_gridCustomCommand->EnableEditing( true );
+ m_gridCustomCommand->EnableGridLines( true );
+ m_gridCustomCommand->EnableDragGridSize( false );
+ m_gridCustomCommand->SetMargins( 0, 0 );
+
+ // Columns
+ m_gridCustomCommand->SetColSize( 0, 165 );
+ m_gridCustomCommand->SetColSize( 1, 196 );
+ m_gridCustomCommand->EnableDragColMove( false );
+ m_gridCustomCommand->EnableDragColSize( true );
+ m_gridCustomCommand->SetColLabelSize( 20 );
+ m_gridCustomCommand->SetColLabelValue( 0, _("Description") );
+ m_gridCustomCommand->SetColLabelValue( 1, _("Command line") );
+ m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Rows
+ m_gridCustomCommand->EnableDragRowSize( false );
+ m_gridCustomCommand->SetRowLabelSize( 1 );
+ m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
+
+ // Label Appearance
+
+ // Cell Defaults
+ m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+ bSizer173->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+
+ bSizer95->Add( bSizer173, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 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_BTNFACE ) );
+
+ wxBoxSizer* bSizer97;
+ bSizer97 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_button9 = new wxButton( m_panel39, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button9->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer97->Add( 0, 0, 1, 0, 5 );
+
+ m_buttonOkay = new wxButton( m_panel39, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_button29 = new wxButton( m_panel39, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button29->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button29, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_panel39->SetSizer( bSizer97 );
+ m_panel39->Layout();
+ bSizer97->Fit( m_panel39 );
+ bSizer95->Add( m_panel39, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ this->SetSizer( bSizer95 );
+ this->Layout();
+ bSizer95->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) );
+ m_buttonResetDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this );
+ m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this );
+ m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this );
+ m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this );
+ m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this );
}
GlobalSettingsDlgGenerated::~GlobalSettingsDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) );
- m_buttonResetDialogs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this );
- m_bpButtonAddRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this );
- m_bpButtonRemoveRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this );
- m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
- m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this );
- m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) );
+ m_buttonResetDialogs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this );
+ m_bpButtonAddRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this );
+ m_bpButtonRemoveRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this );
+ m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
+ m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this );
+ m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this );
+
}
SyncPreviewDlgGenerated::SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer134;
- bSizer134 = new wxBoxSizer( wxVERTICAL );
-
- m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonStartSync = new zen::BitmapButton( m_panelHeader, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1,48 ), 0 );
- m_buttonStartSync->SetDefault();
- m_buttonStartSync->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) );
- m_buttonStartSync->SetToolTip( _("Start synchronization") );
-
- bSizer158->Add( m_buttonStartSync, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_staticline16 = new wxStaticLine( m_panelHeader, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer158->Add( m_staticline16, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText84 = new wxStaticText( m_panelHeader, wxID_ANY, _("Variant"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText84->Wrap( -1 );
- bSizer172->Add( m_staticText84, 0, wxALL, 5 );
-
- m_staticTextVariant = new wxStaticText( m_panelHeader, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextVariant->Wrap( -1 );
- m_staticTextVariant->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer172->Add( m_staticTextVariant, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer158->Add( bSizer172, 1, 0, 5 );
-
-
- m_panelHeader->SetSizer( bSizer158 );
- m_panelHeader->Layout();
- bSizer158->Fit( m_panelHeader );
- bSizer134->Add( m_panelHeader, 0, wxEXPAND, 5 );
-
- m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline14, 0, wxEXPAND, 5 );
-
- m_staticText83 = new wxStaticText( this, wxID_ANY, _("Statistics"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText83->Wrap( -1 );
- bSizer134->Add( m_staticText83, 0, wxALL, 5 );
-
- wxFlexGridSizer* fgSizer11;
- fgSizer11 = new wxFlexGridSizer( 2, 7, 2, 5 );
- fgSizer11->SetFlexibleDirection( wxBOTH );
- fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_bitmapCreateLeft = new wxStaticBitmap( this, 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 );
-
- m_bitmapUpdateLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be overwritten") );
-
- fgSizer11->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapDeleteLeft = new wxStaticBitmap( this, 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 );
-
- m_bitmapData = new wxStaticBitmap( this, 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 );
-
- m_bitmapDeleteRight = new wxStaticBitmap( this, 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 );
-
- m_bitmapUpdateRight = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapUpdateRight->SetToolTip( _("Number of files that will be overwritten") );
-
- fgSizer11->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bitmapCreateRight = new wxStaticBitmap( this, 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 );
-
- m_staticTextCreateLeft = new wxStaticText( this, 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 );
-
- m_staticTextUpdateLeft = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextUpdateLeft->Wrap( -1 );
- m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be overwritten") );
-
- fgSizer11->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_staticTextDeleteLeft = new wxStaticText( this, 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 );
-
- m_staticTextData = new wxStaticText( this, 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 );
-
- m_staticTextDeleteRight = new wxStaticText( this, 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 );
-
- m_staticTextUpdateRight = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextUpdateRight->Wrap( -1 );
- m_staticTextUpdateRight->SetToolTip( _("Number of files that will be overwritten") );
-
- fgSizer11->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextCreateRight = new wxStaticText( this, 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 );
-
-
- bSizer134->Add( fgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 );
-
- m_panel42 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel42->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer142;
- bSizer142 = new wxBoxSizer( wxHORIZONTAL );
-
- m_checkBoxDontShowAgain = new wxCheckBox( m_panel42, wxID_ANY, _("Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer142->Add( m_checkBoxDontShowAgain, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_button16 = new wxButton( m_panel42, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer142->Add( m_button16, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
-
- m_panel42->SetSizer( bSizer142 );
- m_panel42->Layout();
- bSizer142->Fit( m_panel42 );
- bSizer134->Add( m_panel42, 0, wxEXPAND, 5 );
-
-
- this->SetSizer( bSizer134 );
- this->Layout();
- bSizer134->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) );
- m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this );
- m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer134;
+ bSizer134 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelHeader = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonStartSync = new zen::BitmapButton( m_panelHeader, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonStartSync->SetDefault();
+ m_buttonStartSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+ m_buttonStartSync->SetToolTip( _("Start synchronization") );
+
+ bSizer158->Add( m_buttonStartSync, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticline16 = new wxStaticLine( m_panelHeader, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer158->Add( m_staticline16, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText84 = new wxStaticText( m_panelHeader, wxID_ANY, _("Variant"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText84->Wrap( -1 );
+ bSizer172->Add( m_staticText84, 0, wxALL, 5 );
+
+ m_staticTextVariant = new wxStaticText( m_panelHeader, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextVariant->Wrap( -1 );
+ m_staticTextVariant->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer172->Add( m_staticTextVariant, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer158->Add( bSizer172, 1, 0, 5 );
+
+
+ m_panelHeader->SetSizer( bSizer158 );
+ m_panelHeader->Layout();
+ bSizer158->Fit( m_panelHeader );
+ bSizer134->Add( m_panelHeader, 0, wxEXPAND, 5 );
+
+ m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline14, 0, wxEXPAND, 5 );
+
+ m_staticText83 = new wxStaticText( this, wxID_ANY, _("Statistics"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText83->Wrap( -1 );
+ bSizer134->Add( m_staticText83, 0, wxALL, 5 );
+
+ wxFlexGridSizer* fgSizer11;
+ fgSizer11 = new wxFlexGridSizer( 2, 7, 2, 5 );
+ fgSizer11->SetFlexibleDirection( wxBOTH );
+ fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_bitmapCreateLeft = new wxStaticBitmap( this, 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 );
+
+ m_bitmapUpdateLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be overwritten") );
+
+ fgSizer11->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmapDeleteLeft = new wxStaticBitmap( this, 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 );
+
+ m_bitmapData = new wxStaticBitmap( this, 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 );
+
+ m_bitmapDeleteRight = new wxStaticBitmap( this, 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 );
+
+ m_bitmapUpdateRight = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapUpdateRight->SetToolTip( _("Number of files that will be overwritten") );
+
+ fgSizer11->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bitmapCreateRight = new wxStaticBitmap( this, 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 );
+
+ m_staticTextCreateLeft = new wxStaticText( this, 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 );
+
+ m_staticTextUpdateLeft = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextUpdateLeft->Wrap( -1 );
+ m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be overwritten") );
+
+ fgSizer11->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticTextDeleteLeft = new wxStaticText( this, 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 );
+
+ m_staticTextData = new wxStaticText( this, 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 );
+
+ m_staticTextDeleteRight = new wxStaticText( this, 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 );
+
+ m_staticTextUpdateRight = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextUpdateRight->Wrap( -1 );
+ m_staticTextUpdateRight->SetToolTip( _("Number of files that will be overwritten") );
+
+ fgSizer11->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextCreateRight = new wxStaticText( this, 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 );
+
+
+ bSizer134->Add( fgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 );
+
+ m_panel42 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel42->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer142;
+ bSizer142 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_checkBoxDontShowAgain = new wxCheckBox( m_panel42, wxID_ANY, _("Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer142->Add( m_checkBoxDontShowAgain, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_button16 = new wxButton( m_panel42, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button16->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer142->Add( m_button16, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+
+ m_panel42->SetSizer( bSizer142 );
+ m_panel42->Layout();
+ bSizer142->Fit( m_panel42 );
+ bSizer134->Add( m_panel42, 0, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer134 );
+ this->Layout();
+ bSizer134->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) );
+ m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this );
+ m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this );
}
SyncPreviewDlgGenerated::~SyncPreviewDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) );
- m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this );
- m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) );
+ m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this );
+ m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this );
+
}
PopupFrameGenerated1::PopupFrameGenerated1( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer158->Add( m_bitmapLeft, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextMain = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMain->Wrap( 600 );
- bSizer158->Add( m_staticTextMain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- this->SetSizer( bSizer158 );
- this->Layout();
- bSizer158->Fit( this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer158->Add( m_bitmapLeft, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextMain = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMain->Wrap( 600 );
+ bSizer158->Add( m_staticTextMain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ this->SetSizer( bSizer158 );
+ this->Layout();
+ bSizer158->Fit( this );
}
PopupFrameGenerated1::~PopupFrameGenerated1()
@@ -3527,153 +3506,153 @@ PopupFrameGenerated1::~PopupFrameGenerated1()
SearchDialogGenerated::SearchDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer161;
- bSizer161 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer166;
- bSizer166 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer162;
- bSizer162 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText101 = new wxStaticText( this, wxID_ANY, _("Find what:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText101->Wrap( -1 );
- bSizer162->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlSearchTxt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 220,-1 ), 0 );
- m_textCtrlSearchTxt->SetMaxLength( 0 );
- bSizer162->Add( m_textCtrlSearchTxt, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer166->Add( bSizer162, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer166->Add( 0, 5, 0, 0, 5 );
-
- m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer166->Add( m_checkBoxMatchCase, 0, wxALL|wxEXPAND, 5 );
-
-
- bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer97;
- bSizer97 = new wxBoxSizer( wxVERTICAL );
-
- m_buttonFindNext = new wxButton( this, wxID_OK, _("&Find next"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonFindNext->SetDefault();
- m_buttonFindNext->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer97->Add( m_buttonFindNext, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
-
- m_button29 = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button29, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
-
-
- bSizer161->Add( bSizer97, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- this->SetSizer( bSizer161 );
- this->Layout();
- bSizer161->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) );
- m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this );
- m_buttonFindNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this );
- m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer161;
+ bSizer161 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer166;
+ bSizer166 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer162;
+ bSizer162 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText101 = new wxStaticText( this, wxID_ANY, _("Find what:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText101->Wrap( -1 );
+ bSizer162->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlSearchTxt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 220,-1 ), 0 );
+ m_textCtrlSearchTxt->SetMaxLength( 0 );
+ bSizer162->Add( m_textCtrlSearchTxt, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer166->Add( bSizer162, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer166->Add( 0, 5, 0, 0, 5 );
+
+ m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer166->Add( m_checkBoxMatchCase, 0, wxALL|wxEXPAND, 5 );
+
+
+ bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer97;
+ bSizer97 = new wxBoxSizer( wxVERTICAL );
+
+ m_buttonFindNext = new wxButton( this, wxID_OK, _("&Find next"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonFindNext->SetDefault();
+ m_buttonFindNext->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer97->Add( m_buttonFindNext, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
+
+ m_button29 = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button29->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button29, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+
+ bSizer161->Add( bSizer97, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ this->SetSizer( bSizer161 );
+ this->Layout();
+ bSizer161->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) );
+ m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this );
+ m_buttonFindNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this );
+ m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this );
}
SearchDialogGenerated::~SearchDialogGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) );
- m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this );
- m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this );
- m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) );
+ m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this );
+ m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this );
+ m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this );
+
}
SelectTimespanDlgGenerated::SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
-
- wxBoxSizer* bSizer96;
- bSizer96 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer98;
- bSizer98 = new wxBoxSizer( wxHORIZONTAL );
-
- m_calendarFrom = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
- bSizer98->Add( m_calendarFrom, 0, wxALL, 5 );
-
- m_calendarTo = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
- bSizer98->Add( m_calendarTo, 0, wxALL, 5 );
-
-
- bSizer96->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 );
-
- m_panel40 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel40->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_panel40->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer97;
- bSizer97 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer97->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_buttonOkay = new wxButton( m_panel40, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_button29 = new wxButton( m_panel40, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer97->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- m_panel40->SetSizer( bSizer97 );
- m_panel40->Layout();
- bSizer97->Fit( m_panel40 );
- bSizer96->Add( m_panel40, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- this->SetSizer( bSizer96 );
- this->Layout();
- bSizer96->Fit( this );
-
- 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_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+ wxBoxSizer* bSizer96;
+ bSizer96 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer98;
+ bSizer98 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_calendarFrom = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
+ bSizer98->Add( m_calendarFrom, 0, wxALL, 5 );
+
+ m_calendarTo = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
+ bSizer98->Add( m_calendarTo, 0, wxALL, 5 );
+
+
+ bSizer96->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 );
+
+ m_panel40 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel40->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel40->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer97;
+ bSizer97 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer97->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonOkay = new wxButton( m_panel40, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_button29 = new wxButton( m_panel40, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button29->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer97->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panel40->SetSizer( bSizer97 );
+ m_panel40->Layout();
+ bSizer97->Fit( m_panel40 );
+ bSizer96->Add( m_panel40, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ this->SetSizer( bSizer96 );
+ this->Layout();
+ bSizer96->Fit( this );
+
+ 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_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
}
SelectTimespanDlgGenerated::~SelectTimespanDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) );
- m_calendarFrom->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this );
- m_calendarTo->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this );
- m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this );
- m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) );
+ m_calendarFrom->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this );
+ m_calendarTo->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this );
+ m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this );
+ m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
+
}
diff --git a/ui/gui_generated.h b/ui/gui_generated.h
index f772f567..92262efc 100644
--- a/ui/gui_generated.h
+++ b/ui/gui_generated.h
@@ -15,10 +15,10 @@ class ExecFinishedBox;
class FolderHistoryBox;
class ToggleButton;
class wxStaticText;
-namespace zen { class BitmapButton; }
-namespace zen { class Graph2D; }
-namespace zen { class Grid; }
-namespace zen { class TripleSplitter; }
+namespace zen{ class BitmapButton; }
+namespace zen{ class Graph2D; }
+namespace zen{ class Grid; }
+namespace zen{ class TripleSplitter; }
#include <wx/string.h>
#include <wx/bitmap.h>
@@ -43,14 +43,14 @@ namespace zen { class TripleSplitter; }
#include <wx/frame.h>
#include <wx/textctrl.h>
#include <wx/gauge.h>
-#include <wx/tglbtn.h>
-#include <wx/spinctrl.h>
-#include <wx/dialog.h>
-#include <wx/choice.h>
#include <wx/animate.h>
#include <wx/listbook.h>
#include <wx/listctrl.h>
#include <wx/imaglist.h>
+#include <wx/tglbtn.h>
+#include <wx/spinctrl.h>
+#include <wx/dialog.h>
+#include <wx/choice.h>
#include <wx/hyperlink.h>
#include <wx/grid.h>
#include <wx/calctrl.h>
@@ -63,873 +63,871 @@ namespace zen { class TripleSplitter; }
///////////////////////////////////////////////////////////////////////////////
/// Class MainDialogGenerated
///////////////////////////////////////////////////////////////////////////////
-class MainDialogGenerated : public wxFrame
+class MainDialogGenerated : public wxFrame
{
-private:
-
-protected:
- wxMenuBar* m_menubar1;
- wxMenu* m_menuFile;
- wxMenuItem* m_menuItemNew;
- wxMenuItem* m_menuItemLoad;
- wxMenuItem* m_menuItemSave;
- wxMenuItem* m_menuItemSaveAs;
- wxMenuItem* m_menuItem7;
- wxMenuItem* m_menuItem10;
- wxMenuItem* m_menuItem11;
- wxMenu* m_menuAdvanced;
- wxMenu* m_menuLanguages;
- wxMenuItem* m_menuItemGlobSett;
- wxMenu* m_menuHelp;
- wxMenuItem* m_menuItemManual;
- wxMenuItem* m_menuItemCheckVer;
- wxMenuItem* m_menuItemAbout;
- wxBoxSizer* bSizerPanelHolder;
- wxPanel* m_panelTopButtons;
- wxBoxSizer* bSizerTopButtons;
- wxStaticText* m_staticTextCmpVariant;
- zen::BitmapButton* m_buttonCompare;
- wxButton* m_buttonAbort;
- wxBitmapButton* m_bpButtonCmpConfig;
- wxStaticText* m_staticTextSyncVariant;
- wxBitmapButton* m_bpButtonSyncConfig;
- zen::BitmapButton* m_buttonSync;
- wxPanel* m_panelDirectoryPairs;
- wxStaticText* m_staticTextResolvedPathL;
- wxBitmapButton* m_bpButtonAddPair;
- wxButton* m_buttonSelectDirLeft;
- wxPanel* m_panelTopMiddle;
- wxBitmapButton* m_bpButtonSwapSides;
- wxStaticText* m_staticTextResolvedPathR;
- wxButton* m_buttonSelectDirRight;
- wxScrolledWindow* m_scrolledWindowFolderPairs;
- wxBoxSizer* bSizerAddFolderPairs;
- zen::Grid* m_gridNavi;
- wxPanel* m_panelCenter;
- zen::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_staticTextStatusMiddle;
- 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_panelConfig;
- wxBoxSizer* bSizerConfig;
- wxBitmapButton* m_bpButtonOpen;
- wxBitmapButton* m_bpButtonSave;
- wxBitmapButton* m_bpButtonBatchJob;
- wxListBox* m_listBoxHistory;
- wxPanel* m_panelFilter;
- wxBitmapButton* m_bpButtonFilter;
- wxCheckBox* m_checkBoxHideExcluded;
- wxPanel* m_panelStatistics;
- wxBoxSizer* bSizer1801;
- wxStaticBitmap* m_bitmapCreateLeft;
- wxStaticText* m_staticTextCreateLeft;
- wxStaticBitmap* m_bitmapUpdateLeft;
- wxStaticText* m_staticTextUpdateLeft;
- wxStaticBitmap* m_bitmapDeleteLeft;
- wxStaticText* m_staticTextDeleteLeft;
- wxStaticBitmap* m_bitmapData;
- wxStaticText* m_staticTextData;
- wxStaticBitmap* m_bitmapDeleteRight;
- wxStaticText* m_staticTextDeleteRight;
- wxStaticBitmap* m_bitmapUpdateRight;
- wxStaticText* m_staticTextUpdateRight;
- wxStaticBitmap* m_bitmapCreateRight;
- wxStaticText* m_staticTextCreateRight;
- wxPanel* m_panelViewFilter;
- wxBoxSizer* bSizerViewFilter;
- ToggleButton* m_bpButtonShowCreateLeft;
- ToggleButton* m_bpButtonShowUpdateLeft;
- ToggleButton* m_bpButtonShowDeleteLeft;
- ToggleButton* m_bpButtonShowLeftOnly;
- ToggleButton* m_bpButtonShowLeftNewer;
- ToggleButton* m_bpButtonShowEqual;
- ToggleButton* m_bpButtonShowDifferent;
- ToggleButton* m_bpButtonShowDoNothing;
- ToggleButton* m_bpButtonShowRightNewer;
- ToggleButton* m_bpButtonShowRightOnly;
- ToggleButton* m_bpButtonShowDeleteRight;
- ToggleButton* m_bpButtonShowUpdateRight;
- ToggleButton* m_bpButtonShowCreateRight;
- ToggleButton* m_bpButtonShowConflict;
-
- // Virtual event handlers, overide 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 OnCompare( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuQuit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuGlobalSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuExportFileList( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCompSettingsContext( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncSettingsContext( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ) { event.Skip(); }
- virtual void OnLoadFromHistory( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLoadFromHistoryDoubleClick( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCfgHistoryRightClick( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnGlobalFilterContext( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnShowExcluded( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleViewButton( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnViewButtonRightClick( wxMouseEvent& event ) { event.Skip(); }
-
-
-public:
- wxPanel* m_panelTopLeft;
- wxBitmapButton* m_bpButtonRemovePair;
- FolderHistoryBox* m_directoryLeft;
- wxBitmapButton* m_bpButtonAltCompCfg;
- wxBitmapButton* m_bpButtonLocalFilter;
- wxBitmapButton* m_bpButtonAltSyncCfg;
- wxPanel* m_panelTopRight;
- FolderHistoryBox* m_directoryRight;
- wxBoxSizer* bSizerStatistics;
- wxBoxSizer* bSizerData;
-
- MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 702,522 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-
- ~MainDialogGenerated();
-
+ private:
+
+ protected:
+ wxMenuBar* m_menubar1;
+ wxMenu* m_menuFile;
+ wxMenuItem* m_menuItemNew;
+ wxMenuItem* m_menuItemLoad;
+ wxMenuItem* m_menuItemSave;
+ wxMenuItem* m_menuItemSaveAs;
+ wxMenuItem* m_menuItem7;
+ wxMenuItem* m_menuItem10;
+ wxMenuItem* m_menuItem11;
+ wxMenu* m_menuAdvanced;
+ wxMenu* m_menuLanguages;
+ wxMenuItem* m_menuItemGlobSett;
+ wxMenu* m_menuHelp;
+ wxMenuItem* m_menuItemManual;
+ wxMenuItem* m_menuItemCheckVer;
+ wxMenuItem* m_menuItemAbout;
+ wxBoxSizer* bSizerPanelHolder;
+ wxPanel* m_panelTopButtons;
+ wxBoxSizer* bSizerTopButtons;
+ wxStaticText* m_staticTextCmpVariant;
+ zen::BitmapButton* m_buttonCompare;
+ zen::BitmapButton* m_buttonAbort;
+ wxBitmapButton* m_bpButtonCmpConfig;
+ wxStaticText* m_staticTextSyncVariant;
+ wxBitmapButton* m_bpButtonSyncConfig;
+ zen::BitmapButton* m_buttonSync;
+ wxPanel* m_panelDirectoryPairs;
+ wxStaticText* m_staticTextResolvedPathL;
+ wxBitmapButton* m_bpButtonAddPair;
+ wxButton* m_buttonSelectDirLeft;
+ wxPanel* m_panelTopMiddle;
+ wxBitmapButton* m_bpButtonSwapSides;
+ wxStaticText* m_staticTextResolvedPathR;
+ wxButton* m_buttonSelectDirRight;
+ wxScrolledWindow* m_scrolledWindowFolderPairs;
+ wxBoxSizer* bSizerAddFolderPairs;
+ zen::Grid* m_gridNavi;
+ wxPanel* m_panelCenter;
+ zen::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_staticTextStatusMiddle;
+ 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_panelConfig;
+ wxBoxSizer* bSizerConfig;
+ wxBitmapButton* m_bpButtonOpen;
+ wxBitmapButton* m_bpButtonSave;
+ wxBitmapButton* m_bpButtonBatchJob;
+ wxListBox* m_listBoxHistory;
+ wxPanel* m_panelFilter;
+ wxBitmapButton* m_bpButtonFilter;
+ wxCheckBox* m_checkBoxHideExcluded;
+ wxPanel* m_panelStatistics;
+ wxBoxSizer* bSizer1801;
+ wxStaticBitmap* m_bitmapCreateLeft;
+ wxStaticText* m_staticTextCreateLeft;
+ wxStaticBitmap* m_bitmapUpdateLeft;
+ wxStaticText* m_staticTextUpdateLeft;
+ wxStaticBitmap* m_bitmapDeleteLeft;
+ wxStaticText* m_staticTextDeleteLeft;
+ wxStaticBitmap* m_bitmapData;
+ wxStaticText* m_staticTextData;
+ wxStaticBitmap* m_bitmapDeleteRight;
+ wxStaticText* m_staticTextDeleteRight;
+ wxStaticBitmap* m_bitmapUpdateRight;
+ wxStaticText* m_staticTextUpdateRight;
+ wxStaticBitmap* m_bitmapCreateRight;
+ wxStaticText* m_staticTextCreateRight;
+ wxPanel* m_panelViewFilter;
+ wxBoxSizer* bSizerViewFilter;
+ ToggleButton* m_bpButtonShowCreateLeft;
+ ToggleButton* m_bpButtonShowUpdateLeft;
+ ToggleButton* m_bpButtonShowDeleteLeft;
+ ToggleButton* m_bpButtonShowLeftOnly;
+ ToggleButton* m_bpButtonShowLeftNewer;
+ ToggleButton* m_bpButtonShowEqual;
+ ToggleButton* m_bpButtonShowDifferent;
+ ToggleButton* m_bpButtonShowDoNothing;
+ ToggleButton* m_bpButtonShowRightNewer;
+ ToggleButton* m_bpButtonShowRightOnly;
+ ToggleButton* m_bpButtonShowDeleteRight;
+ ToggleButton* m_bpButtonShowUpdateRight;
+ ToggleButton* m_bpButtonShowCreateRight;
+ ToggleButton* m_bpButtonShowConflict;
+
+ // Virtual event handlers, overide 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 OnCompare( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuQuit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuGlobalSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuExportFileList( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCompSettingsContext( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncSettingsContext( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ) { event.Skip(); }
+ virtual void OnLoadFromHistory( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLoadFromHistoryDoubleClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCfgHistoryRightClick( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnGlobalFilterContext( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnShowExcluded( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleViewButton( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnViewButtonRightClick( wxMouseEvent& event ) { event.Skip(); }
+
+
+ public:
+ wxPanel* m_panelTopLeft;
+ wxBitmapButton* m_bpButtonRemovePair;
+ FolderHistoryBox* m_directoryLeft;
+ wxBitmapButton* m_bpButtonAltCompCfg;
+ wxBitmapButton* m_bpButtonLocalFilter;
+ wxBitmapButton* m_bpButtonAltSyncCfg;
+ wxPanel* m_panelTopRight;
+ FolderHistoryBox* m_directoryRight;
+ wxBoxSizer* bSizerStatistics;
+ wxBoxSizer* bSizerData;
+
+ MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 702,522 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+
+ ~MainDialogGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class FolderPairGenerated
///////////////////////////////////////////////////////////////////////////////
-class FolderPairGenerated : public wxPanel
+class FolderPairGenerated : public wxPanel
{
-private:
-
-protected:
- wxButton* m_buttonSelectDirLeft;
- wxButton* m_buttonSelectDirRight;
-
-public:
- wxPanel* m_panelLeft;
- wxBitmapButton* m_bpButtonRemovePair;
- FolderHistoryBox* m_directoryLeft;
- wxPanel* m_panel20;
- wxBitmapButton* m_bpButtonAltCompCfg;
- wxBitmapButton* m_bpButtonLocalFilter;
- wxBitmapButton* m_bpButtonAltSyncCfg;
- wxPanel* m_panelRight;
- FolderHistoryBox* m_directoryRight;
-
- FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
- ~FolderPairGenerated();
-
+ private:
+
+ protected:
+ wxButton* m_buttonSelectDirLeft;
+ wxButton* m_buttonSelectDirRight;
+
+ public:
+ wxPanel* m_panelLeft;
+ wxBitmapButton* m_bpButtonRemovePair;
+ FolderHistoryBox* m_directoryLeft;
+ wxPanel* m_panel20;
+ wxBitmapButton* m_bpButtonAltCompCfg;
+ wxBitmapButton* m_bpButtonLocalFilter;
+ wxBitmapButton* m_bpButtonAltSyncCfg;
+ wxPanel* m_panelRight;
+ FolderHistoryBox* m_directoryRight;
+
+ FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
+ ~FolderPairGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
-/// Class CompareStatusGenerated
+/// Class CompareProgressDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class CompareStatusGenerated : public wxPanel
+class CompareProgressDlgGenerated : public wxPanel
{
-private:
-
-protected:
- wxTextCtrl* m_textCtrlStatus;
- wxGauge* m_gauge2;
- wxBoxSizer* bSizer42;
- wxBoxSizer* bSizerFilesFound;
- wxStaticText* m_staticText321;
- wxStaticText* m_staticTextScanned;
- wxBoxSizer* bSizerFilesRemaining;
- wxStaticText* m_staticText46;
- wxStaticText* m_staticTextFilesRemaining;
- wxStaticText* m_staticTextDataRemaining;
- wxBoxSizer* sSizerSpeed;
- wxStaticText* m_staticText104;
- wxStaticText* m_staticTextSpeed;
- wxBoxSizer* sSizerTimeRemaining;
- wxStaticText* m_staticTextTimeRemFixed;
- wxStaticText* m_staticTextRemTime;
- wxBoxSizer* sSizerTimeElapsed;
- wxStaticText* m_staticTextTimeElapsed;
-
-public:
-
- CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxRAISED_BORDER|wxTAB_TRAVERSAL );
- ~CompareStatusGenerated();
-
+ private:
+
+ protected:
+ wxTextCtrl* m_textCtrlStatus;
+ wxGauge* m_gauge2;
+ wxBoxSizer* bSizer42;
+ wxBoxSizer* bSizerFilesFound;
+ wxStaticText* m_staticText321;
+ wxStaticText* m_staticTextScanned;
+ wxBoxSizer* bSizerFilesRemaining;
+ wxStaticText* m_staticText46;
+ wxStaticText* m_staticTextFilesRemaining;
+ wxStaticText* m_staticTextDataRemaining;
+ wxBoxSizer* sSizerSpeed;
+ wxStaticText* m_staticText104;
+ wxStaticText* m_staticTextSpeed;
+ wxBoxSizer* sSizerTimeRemaining;
+ wxStaticText* m_staticTextTimeRemFixed;
+ wxStaticText* m_staticTextRemTime;
+ wxBoxSizer* sSizerTimeElapsed;
+ wxStaticText* m_staticTextTimeElapsed;
+
+ public:
+
+ CompareProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxRAISED_BORDER|wxTAB_TRAVERSAL );
+ ~CompareProgressDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
-/// Class BatchDlgGenerated
+/// Class SyncProgressDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class BatchDlgGenerated : public wxDialog
+class SyncProgressDlgGenerated : public wxFrame
{
-private:
-
-protected:
- wxPanel* m_panelHeader;
- wxStaticBitmap* m_bitmapBatchJob;
- wxStaticText* m_staticText56;
- wxStaticText* m_staticText44;
- wxBitmapButton* m_bpButtonHelp;
- wxStaticLine* m_staticline18;
- wxStaticText* m_staticText82;
- wxToggleButton* m_toggleBtnErrorIgnore;
- wxToggleButton* m_toggleBtnErrorPopup;
- wxToggleButton* m_toggleBtnErrorExit;
- wxStaticLine* m_staticline26;
- wxStaticText* m_staticText81;
- ExecFinishedBox* m_comboBoxExecFinished;
- wxStaticLine* m_staticline25;
- wxCheckBox* m_checkBoxShowProgress;
- wxCheckBox* m_checkBoxGenerateLogfile;
- wxPanel* m_panelLogfile;
- wxButton* m_buttonSelectLogfileDir;
- wxCheckBox* m_checkBoxLogfilesLimit;
- wxSpinCtrl* m_spinCtrlLogfileLimit;
- wxStaticLine* m_staticline13;
- wxPanel* m_panel35;
- wxButton* m_buttonSave;
- wxButton* m_button6;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnErrorIgnore( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnErrorPopup( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnErrorExit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleGenerateLogfile( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleLogfilesLimit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
- FolderHistoryBox* m_comboBoxLogfileDir;
-
- BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Save as batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
- ~BatchDlgGenerated();
-
+ private:
+
+ protected:
+ wxBoxSizer* bSizerTop;
+ wxPanel* m_panelHeader;
+ wxStaticBitmap* m_bitmapStatus;
+ wxStaticText* m_staticTextPhase;
+ wxAnimationCtrl* m_animationControl1;
+ wxStaticLine* m_staticlineHeader;
+ wxPanel* m_panelProgress;
+ wxStaticText* m_staticTextStatus;
+ wxBoxSizer* bSizer171;
+ wxStaticText* m_staticTextLabelItemsProc;
+ wxBoxSizer* bSizerItemsProc;
+ wxStaticText* m_staticTextProcessedObj;
+ wxStaticText* m_staticTextDataProcessed;
+ wxStaticText* m_staticTextLabelItemsRem;
+ wxBoxSizer* bSizerItemsRem;
+ wxStaticText* m_staticTextRemainingObj;
+ wxStaticText* m_staticTextDataRemaining;
+ wxStaticText* m_staticText84;
+ wxStaticText* m_staticTextSpeed;
+ wxStaticText* m_staticTextLabelRemTime;
+ wxStaticText* m_staticTextRemTime;
+ wxStaticText* m_staticTextLabelElapsedTime;
+ wxStaticText* m_staticTextTimeElapsed;
+ zen::Graph2D* m_panelGraph;
+ wxBoxSizer* bSizerFinalStat;
+ wxListbook* m_listbookResult;
+ wxStaticLine* m_staticline12;
+ wxPanel* m_panelFooter;
+ wxBoxSizer* bSizerExecFinished;
+ wxStaticText* m_staticText87;
+ ExecFinishedBox* m_comboBoxExecFinished;
+ wxBoxSizer* bSizer28;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonPause;
+ wxButton* m_buttonAbort;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPause( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+ wxGauge* m_gauge1;
+
+ SyncProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+
+ ~SyncProgressDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
-/// Class CmpCfgDlgGenerated
+/// Class BatchDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class CmpCfgDlgGenerated : public wxDialog
+class BatchDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxStaticText* m_staticText91;
- wxStaticBitmap* m_bitmapByTime;
- wxToggleButton* m_toggleBtnTimeSize;
- wxStaticBitmap* m_bitmapByContent;
- wxToggleButton* m_toggleBtnContent;
- wxStaticLine* m_staticline33;
- wxStaticText* m_staticText92;
- wxChoice* m_choiceHandleSymlinks;
- wxBitmapButton* m_bpButtonHelp;
- wxStaticLine* m_staticline14;
- wxPanel* m_panel36;
- wxButton* m_button10;
- wxButton* m_button6;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnTimeSize( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnContentDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnContent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~CmpCfgDlgGenerated();
-
+ private:
+
+ protected:
+ wxPanel* m_panelHeader;
+ wxStaticBitmap* m_bitmapBatchJob;
+ wxStaticText* m_staticTextHeader;
+ wxStaticText* m_staticText44;
+ wxBitmapButton* m_bpButtonHelp;
+ wxStaticLine* m_staticline18;
+ wxStaticText* m_staticText82;
+ wxToggleButton* m_toggleBtnErrorIgnore;
+ wxToggleButton* m_toggleBtnErrorPopup;
+ wxToggleButton* m_toggleBtnErrorExit;
+ wxStaticLine* m_staticline26;
+ wxStaticText* m_staticText81;
+ ExecFinishedBox* m_comboBoxExecFinished;
+ wxStaticLine* m_staticline25;
+ wxCheckBox* m_checkBoxShowProgress;
+ wxCheckBox* m_checkBoxGenerateLogfile;
+ wxPanel* m_panelLogfile;
+ wxButton* m_buttonSelectLogfileDir;
+ wxCheckBox* m_checkBoxLogfilesLimit;
+ wxSpinCtrl* m_spinCtrlLogfileLimit;
+ wxStaticLine* m_staticline13;
+ wxPanel* m_panel35;
+ wxButton* m_buttonSave;
+ wxButton* m_button6;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnErrorIgnore( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnErrorPopup( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnErrorExit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleGenerateLogfile( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleLogfilesLimit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+ FolderHistoryBox* m_comboBoxLogfileDir;
+
+ BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Save as batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
+ ~BatchDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
-/// Class SyncCfgDlgGenerated
+/// Class CmpCfgDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class SyncCfgDlgGenerated : public wxDialog
+class CmpCfgDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxStaticText* m_staticText86;
- wxToggleButton* m_toggleBtnAutomatic;
- wxStaticText* m_staticTextAutomatic;
- wxToggleButton* m_toggleBtnMirror;
- wxStaticText* m_staticTextMirror;
- wxToggleButton* m_toggleBtnUpdate;
- wxStaticText* m_staticTextUpdate;
- wxToggleButton* m_toggleBtnCustom;
- wxStaticText* m_staticTextCustom;
- wxBoxSizer* bSizerExtraConfig;
- wxStaticLine* m_staticline321;
- wxBoxSizer* bSizer179;
- wxStaticText* m_staticText88;
- wxToggleButton* m_toggleBtnErrorIgnore;
- wxToggleButton* m_toggleBtnErrorPopup;
- wxStaticLine* m_staticline36;
- wxBoxSizer* bSizerOnCompletion;
- wxStaticText* m_staticText89;
- ExecFinishedBox* m_comboBoxExecFinished;
- wxStaticLine* m_staticline32;
- wxStaticText* m_staticText87;
- wxBoxSizer* bSizerVersioningNamingConvention;
- wxStaticText* m_staticTextNamingCvtPart1;
- wxStaticText* m_staticTextNamingCvtPart2Bold;
- wxStaticText* m_staticTextNamingCvtPart3;
- wxToggleButton* m_toggleBtnPermanent;
- wxToggleButton* m_toggleBtnRecycler;
- wxToggleButton* m_toggleBtnVersioning;
- wxBoxSizer* bSizerVersioningStyle;
- wxStaticText* m_staticText93;
- wxChoice* m_choiceVersioningStyle;
- wxPanel* m_panelVersioning;
- FolderHistoryBox* m_versioningFolder;
- wxButton* m_buttonSelectDirVersioning;
- wxStaticLine* m_staticline31;
- wxBoxSizer* bSizerConfig;
- wxStaticText* m_staticText90;
- wxStaticBitmap* m_bitmapDatabase;
- wxBoxSizer* sbSizerSyncDirections;
- wxStaticText* m_staticText21;
- wxStaticText* m_staticText31;
- wxBoxSizer* bSizerLeftOnly;
- wxStaticBitmap* m_bitmapLeftOnly;
- wxBitmapButton* m_bpButtonLeftOnly;
- wxBoxSizer* bSizerRightOnly;
- wxStaticBitmap* m_bitmapRightOnly;
- wxBitmapButton* m_bpButtonRightOnly;
- wxBoxSizer* bSizerLeftNewer;
- wxStaticBitmap* m_bitmapLeftNewer;
- wxBitmapButton* m_bpButtonLeftNewer;
- wxBoxSizer* bSizerRightNewer;
- wxStaticBitmap* m_bitmapRightNewer;
- wxBitmapButton* m_bpButtonRightNewer;
- wxBoxSizer* bSizerDifferent;
- wxStaticBitmap* m_bitmapDifferent;
- wxBitmapButton* m_bpButtonDifferent;
- wxBoxSizer* bSizerConflict;
- wxStaticBitmap* m_bitmapConflict;
- wxBitmapButton* m_bpButtonConflict;
- wxStaticLine* m_staticline15;
- wxPanel* m_panel37;
- wxButton* m_buttonOK;
- wxButton* m_button16;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnSyncAutomaticDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncAutomatic( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncMirror( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnErrorIgnore( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnErrorPopup( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDeletionPermanent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDeletionRecycler( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDeletionVersioning( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnParameterChange( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~SyncCfgDlgGenerated();
-
+ private:
+
+ protected:
+ wxStaticText* m_staticText91;
+ wxStaticBitmap* m_bitmapByTime;
+ wxToggleButton* m_toggleBtnTimeSize;
+ wxStaticBitmap* m_bitmapByContent;
+ wxToggleButton* m_toggleBtnContent;
+ wxStaticLine* m_staticline33;
+ wxStaticText* m_staticText92;
+ wxChoice* m_choiceHandleSymlinks;
+ wxBitmapButton* m_bpButtonHelp;
+ wxStaticLine* m_staticline14;
+ wxPanel* m_panel36;
+ wxButton* m_button10;
+ wxButton* m_button6;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnTimeSize( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnContentDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnContent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~CmpCfgDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
-/// Class SyncStatusDlgGenerated
+/// Class SyncCfgDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class SyncStatusDlgGenerated : public wxFrame
+class SyncCfgDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxBoxSizer* bSizerTop;
- wxPanel* m_panelHeader;
- wxStaticBitmap* m_bitmapStatus;
- wxStaticText* m_staticTextStatus;
- wxAnimationCtrl* m_animationControl1;
- wxStaticLine* m_staticlineHeader;
- wxPanel* m_panelProgress;
- wxTextCtrl* m_textCtrlStatus;
- wxBoxSizer* bSizer171;
- wxStaticText* m_staticTextLabelItemsProc;
- wxBoxSizer* bSizerItemsProc;
- wxStaticText* m_staticTextProcessedObj;
- wxStaticText* m_staticTextDataProcessed;
- wxStaticText* m_staticTextLabelItemsRem;
- wxBoxSizer* bSizerItemsRem;
- wxStaticText* m_staticTextRemainingObj;
- wxStaticText* m_staticTextDataRemaining;
- wxStaticText* m_staticText84;
- wxStaticText* m_staticTextSpeed;
- wxStaticText* m_staticTextLabelRemTime;
- wxStaticText* m_staticTextRemTime;
- wxStaticText* m_staticTextLabelElapsedTime;
- wxStaticText* m_staticTextTimeElapsed;
- zen::Graph2D* m_panelGraph;
- wxBoxSizer* bSizerFinalStat;
- wxListbook* m_listbookResult;
- wxStaticLine* m_staticline12;
- wxPanel* m_panelFooter;
- wxBoxSizer* bSizerExecFinished;
- wxStaticText* m_staticText87;
- ExecFinishedBox* m_comboBoxExecFinished;
- wxBoxSizer* bSizer28;
- wxButton* m_buttonOK;
- wxButton* m_buttonPause;
- wxButton* m_buttonAbort;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnPause( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
- wxGauge* m_gauge1;
-
- SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-
- ~SyncStatusDlgGenerated();
-
+ private:
+
+ protected:
+ wxStaticText* m_staticText86;
+ wxToggleButton* m_toggleBtnAutomatic;
+ wxStaticText* m_staticTextAutomatic;
+ wxToggleButton* m_toggleBtnMirror;
+ wxStaticText* m_staticTextMirror;
+ wxToggleButton* m_toggleBtnUpdate;
+ wxStaticText* m_staticTextUpdate;
+ wxToggleButton* m_toggleBtnCustom;
+ wxStaticText* m_staticTextCustom;
+ wxBoxSizer* bSizerExtraConfig;
+ wxStaticLine* m_staticline321;
+ wxBoxSizer* bSizer179;
+ wxStaticText* m_staticText88;
+ wxToggleButton* m_toggleBtnErrorIgnore;
+ wxToggleButton* m_toggleBtnErrorPopup;
+ wxStaticLine* m_staticline36;
+ wxBoxSizer* bSizerOnCompletion;
+ wxStaticText* m_staticText89;
+ ExecFinishedBox* m_comboBoxExecFinished;
+ wxStaticLine* m_staticline32;
+ wxStaticText* m_staticText87;
+ wxBoxSizer* bSizerVersioningNamingConvention;
+ wxStaticText* m_staticTextNamingCvtPart1;
+ wxStaticText* m_staticTextNamingCvtPart2Bold;
+ wxStaticText* m_staticTextNamingCvtPart3;
+ wxToggleButton* m_toggleBtnPermanent;
+ wxToggleButton* m_toggleBtnRecycler;
+ wxToggleButton* m_toggleBtnVersioning;
+ wxBoxSizer* bSizerVersioningStyle;
+ wxStaticText* m_staticText93;
+ wxChoice* m_choiceVersioningStyle;
+ wxPanel* m_panelVersioning;
+ FolderHistoryBox* m_versioningFolder;
+ wxButton* m_buttonSelectDirVersioning;
+ wxStaticLine* m_staticline31;
+ wxBoxSizer* bSizerConfig;
+ wxStaticText* m_staticText90;
+ wxStaticBitmap* m_bitmapDatabase;
+ wxBoxSizer* sbSizerSyncDirections;
+ wxStaticText* m_staticTextHeaderCategory;
+ wxStaticText* m_staticTextHeaderAction;
+ wxBoxSizer* bSizerLeftOnly;
+ wxStaticBitmap* m_bitmapLeftOnly;
+ wxBitmapButton* m_bpButtonLeftOnly;
+ wxBoxSizer* bSizerRightOnly;
+ wxStaticBitmap* m_bitmapRightOnly;
+ wxBitmapButton* m_bpButtonRightOnly;
+ wxBoxSizer* bSizerLeftNewer;
+ wxStaticBitmap* m_bitmapLeftNewer;
+ wxBitmapButton* m_bpButtonLeftNewer;
+ wxBoxSizer* bSizerRightNewer;
+ wxStaticBitmap* m_bitmapRightNewer;
+ wxBitmapButton* m_bpButtonRightNewer;
+ wxBoxSizer* bSizerDifferent;
+ wxStaticBitmap* m_bitmapDifferent;
+ wxBitmapButton* m_bpButtonDifferent;
+ wxBoxSizer* bSizerConflict;
+ wxStaticBitmap* m_bitmapConflict;
+ wxBitmapButton* m_bpButtonConflict;
+ wxStaticLine* m_staticline15;
+ wxPanel* m_panel37;
+ wxButton* m_buttonOK;
+ wxButton* m_button16;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnSyncAutomaticDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncAutomatic( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncMirror( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnErrorIgnore( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnErrorPopup( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDeletionPermanent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDeletionRecycler( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDeletionVersioning( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnParameterChange( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~SyncCfgDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class LogControlGenerated
///////////////////////////////////////////////////////////////////////////////
-class LogControlGenerated : public wxPanel
+class LogControlGenerated : public wxPanel
{
-private:
-
-protected:
- wxStaticLine* m_staticline12;
- ToggleButton* m_bpButtonErrors;
- ToggleButton* m_bpButtonWarnings;
- ToggleButton* m_bpButtonInfo;
- wxStaticLine* m_staticline13;
- zen::Grid* m_gridMessages;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnErrors( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnWarnings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- LogControlGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
- ~LogControlGenerated();
-
+ private:
+
+ protected:
+ wxStaticLine* m_staticline12;
+ ToggleButton* m_bpButtonErrors;
+ ToggleButton* m_bpButtonWarnings;
+ ToggleButton* m_bpButtonInfo;
+ wxStaticLine* m_staticline13;
+ zen::Grid* m_gridMessages;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnErrors( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnWarnings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ LogControlGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
+ ~LogControlGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class AboutDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class AboutDlgGenerated : public wxDialog
+class AboutDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxPanel* m_panelLogo;
- wxStaticBitmap* m_bitmap11;
- wxStaticLine* m_staticline341;
- wxStaticText* m_build;
- wxStaticLine* m_staticline3411;
- wxPanel* m_panel33;
- wxBoxSizer* bSizerCodeInfo;
- wxStaticText* m_staticText72;
- wxHyperlinkCtrl* m_hyperlink11;
- wxHyperlinkCtrl* m_hyperlink9;
- wxHyperlinkCtrl* m_hyperlink10;
- wxHyperlinkCtrl* m_hyperlink7;
- wxHyperlinkCtrl* m_hyperlink14;
- wxHyperlinkCtrl* m_hyperlink15;
- wxHyperlinkCtrl* m_hyperlink13;
- wxHyperlinkCtrl* m_hyperlink16;
- wxHyperlinkCtrl* m_hyperlink12;
- wxHyperlinkCtrl* m_hyperlink18;
- wxHyperlinkCtrl* m_hyperlink21;
- wxPanel* m_panel40;
- wxPanel* m_panel39;
- wxStaticText* m_staticText83;
- wxHyperlinkCtrl* m_hyperlink3;
- wxAnimationCtrl* m_animCtrlWink;
- wxScrolledWindow* m_scrolledWindowTranslators;
- wxBoxSizer* bSizerTranslators;
- wxStaticText* m_staticText54;
- wxFlexGridSizer* fgSizerTranslators;
- wxStaticLine* m_staticline43;
- wxStaticText* m_staticText94;
- wxHyperlinkCtrl* m_hyperlink1;
- wxStaticBitmap* m_bitmap9;
- wxHyperlinkCtrl* m_hyperlink2;
- wxStaticBitmap* m_bitmap10;
- wxStaticLine* m_staticline34;
- wxStaticText* m_staticText93;
- wxStaticBitmap* m_bitmap13;
- wxHyperlinkCtrl* m_hyperlink5;
- wxStaticLine* m_staticline36;
- wxPanel* m_panel41;
- wxButton* m_buttonOkay;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~AboutDlgGenerated();
-
+ private:
+
+ protected:
+ wxStaticBitmap* m_bitmapLogo;
+ wxStaticLine* m_staticline341;
+ wxStaticText* m_build;
+ wxStaticLine* m_staticline3411;
+ wxPanel* m_panel33;
+ wxBoxSizer* bSizerCodeInfo;
+ wxStaticText* m_staticText72;
+ wxHyperlinkCtrl* m_hyperlink11;
+ wxHyperlinkCtrl* m_hyperlink9;
+ wxHyperlinkCtrl* m_hyperlink10;
+ wxHyperlinkCtrl* m_hyperlink7;
+ wxHyperlinkCtrl* m_hyperlink14;
+ wxHyperlinkCtrl* m_hyperlink15;
+ wxHyperlinkCtrl* m_hyperlink13;
+ wxHyperlinkCtrl* m_hyperlink16;
+ wxHyperlinkCtrl* m_hyperlink12;
+ wxHyperlinkCtrl* m_hyperlink18;
+ wxPanel* m_panel40;
+ wxPanel* m_panel39;
+ wxStaticText* m_staticText83;
+ wxHyperlinkCtrl* m_hyperlinkDonate;
+ wxAnimationCtrl* m_animCtrlWink;
+ wxScrolledWindow* m_scrolledWindowTranslators;
+ wxBoxSizer* bSizerTranslators;
+ wxStaticText* m_staticText54;
+ wxFlexGridSizer* fgSizerTranslators;
+ wxStaticLine* m_staticline43;
+ wxStaticText* m_staticText94;
+ wxHyperlinkCtrl* m_hyperlink1;
+ wxStaticBitmap* m_bitmap9;
+ wxHyperlinkCtrl* m_hyperlink2;
+ wxStaticBitmap* m_bitmap10;
+ wxStaticLine* m_staticline34;
+ wxStaticText* m_staticText93;
+ wxStaticBitmap* m_bitmap13;
+ wxHyperlinkCtrl* m_hyperlink5;
+ wxStaticLine* m_staticline36;
+ wxPanel* m_panel41;
+ wxButton* m_buttonOkay;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~AboutDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class MessageDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class MessageDlgGenerated : public wxDialog
+class MessageDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxStaticBitmap* m_bitmapMsgType;
- wxTextCtrl* m_textCtrlMessage;
- wxStaticLine* m_staticline6;
- wxPanel* m_panel33;
- wxCheckBox* m_checkBoxCustom;
- wxButton* m_buttonCustom1;
- wxButton* m_buttonCustom2;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnButton1( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnButton2( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- MessageDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
- ~MessageDlgGenerated();
-
+ private:
+
+ protected:
+ wxStaticBitmap* m_bitmapMsgType;
+ wxTextCtrl* m_textCtrlMessage;
+ wxStaticLine* m_staticline6;
+ wxPanel* m_panel33;
+ wxCheckBox* m_checkBoxCustom;
+ wxButton* m_buttonCustom1;
+ wxButton* m_buttonCustom2;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnButton1( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButton2( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ MessageDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
+ ~MessageDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class DeleteDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class DeleteDlgGenerated : public wxDialog
+class DeleteDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxPanel* m_panelHeader;
- wxStaticBitmap* m_bitmap12;
- wxStaticText* m_staticTextHeader;
- wxStaticLine* m_staticline91;
- wxTextCtrl* m_textCtrlFileList;
- wxStaticLine* m_staticline9;
- wxPanel* m_panel36;
- wxCheckBox* m_checkBoxUseRecycler;
- wxCheckBox* m_checkBoxDeleteBothSides;
- wxButton* m_buttonOK;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnUseRecycler( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDelOnBothSides( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
- ~DeleteDlgGenerated();
-
+ private:
+
+ protected:
+ wxPanel* m_panelHeader;
+ wxStaticBitmap* m_bitmapDeleteType;
+ wxStaticText* m_staticTextHeader;
+ wxStaticLine* m_staticline91;
+ wxTextCtrl* m_textCtrlFileList;
+ wxStaticLine* m_staticline9;
+ wxPanel* m_panel36;
+ wxCheckBox* m_checkBoxUseRecycler;
+ wxCheckBox* m_checkBoxDeleteBothSides;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnUseRecycler( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDelOnBothSides( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
+ ~DeleteDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class FilterDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class FilterDlgGenerated : public wxDialog
+class FilterDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxPanel* m_panelHeader;
- wxStaticBitmap* m_bitmap26;
- wxStaticText* m_staticTexHeader;
- wxStaticText* m_staticText44;
- wxBitmapButton* m_bpButtonHelp;
- wxStaticLine* m_staticline17;
- wxStaticText* m_staticText78;
- wxStaticBitmap* m_bitmapInclude;
- wxTextCtrl* m_textCtrlInclude;
- wxStaticLine* m_staticline22;
- wxStaticText* m_staticText77;
- wxStaticBitmap* m_bitmapExclude;
- wxTextCtrl* m_textCtrlExclude;
- wxStaticLine* m_staticline24;
- wxStaticText* m_staticText79;
- wxStaticBitmap* m_bitmapFilterDate;
- wxSpinCtrl* m_spinCtrlTimespan;
- wxChoice* m_choiceUnitTimespan;
- wxStaticLine* m_staticline23;
- wxStaticText* m_staticText80;
- wxStaticBitmap* m_bitmapFilterSize;
- wxStaticText* m_staticText101;
- wxSpinCtrl* m_spinCtrlMinSize;
- wxChoice* m_choiceUnitMinSize;
- wxStaticText* m_staticText102;
- wxSpinCtrl* m_spinCtrlMaxSize;
- wxChoice* m_choiceUnitMaxSize;
- wxStaticLine* m_staticline16;
- wxPanel* m_panel38;
- wxButton* m_button9;
- wxButton* m_buttonOk;
- wxButton* m_button17;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnUpdateNameFilter( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnUpdateChoice( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~FilterDlgGenerated();
-
+ private:
+
+ protected:
+ wxPanel* m_panelHeader;
+ wxStaticBitmap* m_bitmap26;
+ wxStaticText* m_staticTextHeader;
+ wxStaticText* m_staticText44;
+ wxBitmapButton* m_bpButtonHelp;
+ wxStaticLine* m_staticline17;
+ wxStaticText* m_staticText78;
+ wxStaticBitmap* m_bitmapInclude;
+ wxTextCtrl* m_textCtrlInclude;
+ wxStaticLine* m_staticline22;
+ wxStaticText* m_staticText77;
+ wxStaticBitmap* m_bitmapExclude;
+ wxTextCtrl* m_textCtrlExclude;
+ wxStaticLine* m_staticline24;
+ wxStaticText* m_staticText79;
+ wxStaticBitmap* m_bitmapFilterDate;
+ wxSpinCtrl* m_spinCtrlTimespan;
+ wxChoice* m_choiceUnitTimespan;
+ wxStaticLine* m_staticline23;
+ wxStaticText* m_staticText80;
+ wxStaticBitmap* m_bitmapFilterSize;
+ wxStaticText* m_staticText101;
+ wxSpinCtrl* m_spinCtrlMinSize;
+ wxChoice* m_choiceUnitMinSize;
+ wxStaticText* m_staticText102;
+ wxSpinCtrl* m_spinCtrlMaxSize;
+ wxChoice* m_choiceUnitMaxSize;
+ wxStaticLine* m_staticline16;
+ wxPanel* m_panel38;
+ wxButton* m_button9;
+ wxButton* m_buttonOk;
+ wxButton* m_button17;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnUpdateNameFilter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnUpdateChoice( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~FilterDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class GlobalSettingsDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class GlobalSettingsDlgGenerated : public wxDialog
+class GlobalSettingsDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxPanel* m_panelHeader;
- wxStaticBitmap* m_bitmapSettings;
- wxStaticText* m_staticText56;
- wxStaticLine* m_staticline19;
- wxCheckBox* m_checkBoxTransCopy;
- wxStaticText* m_staticText82;
- wxCheckBox* m_checkBoxCopyLocked;
- wxStaticText* m_staticTextCopyLocked;
- wxCheckBox* m_checkBoxCopyPermissions;
- wxStaticText* m_staticText8211;
- wxStaticLine* m_staticline191;
- zen::BitmapButton* m_buttonResetDialogs;
- wxStaticLine* m_staticline192;
- wxStaticText* m_staticText85;
- wxBitmapButton* m_bpButtonAddRow;
- wxBitmapButton* m_bpButtonRemoveRow;
- wxGrid* m_gridCustomCommand;
- wxStaticLine* m_staticline20;
- wxPanel* m_panel39;
- wxButton* m_button9;
- wxButton* m_buttonOkay;
- wxButton* m_button29;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnResetDialogs( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~GlobalSettingsDlgGenerated();
-
+ private:
+
+ protected:
+ wxPanel* m_panelHeader;
+ wxStaticBitmap* m_bitmapSettings;
+ wxStaticText* m_staticTextHeader;
+ wxStaticLine* m_staticline19;
+ wxCheckBox* m_checkBoxTransCopy;
+ wxStaticText* m_staticText82;
+ wxCheckBox* m_checkBoxCopyLocked;
+ wxStaticText* m_staticTextCopyLocked;
+ wxCheckBox* m_checkBoxCopyPermissions;
+ wxStaticText* m_staticText8211;
+ wxStaticLine* m_staticline191;
+ zen::BitmapButton* m_buttonResetDialogs;
+ wxStaticLine* m_staticline192;
+ wxStaticText* m_staticText85;
+ wxBitmapButton* m_bpButtonAddRow;
+ wxBitmapButton* m_bpButtonRemoveRow;
+ wxGrid* m_gridCustomCommand;
+ wxStaticLine* m_staticline20;
+ wxPanel* m_panel39;
+ wxButton* m_button9;
+ wxButton* m_buttonOkay;
+ wxButton* m_button29;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnResetDialogs( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~GlobalSettingsDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class SyncPreviewDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class SyncPreviewDlgGenerated : public wxDialog
+class SyncPreviewDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxPanel* m_panelHeader;
- zen::BitmapButton* m_buttonStartSync;
- wxStaticLine* m_staticline16;
- wxStaticText* m_staticText84;
- wxStaticText* m_staticTextVariant;
- wxStaticLine* m_staticline14;
- wxStaticText* m_staticText83;
- wxStaticBitmap* m_bitmapCreateLeft;
- wxStaticBitmap* m_bitmapUpdateLeft;
- wxStaticBitmap* m_bitmapDeleteLeft;
- wxStaticBitmap* m_bitmapData;
- wxStaticBitmap* m_bitmapDeleteRight;
- wxStaticBitmap* m_bitmapUpdateRight;
- wxStaticBitmap* m_bitmapCreateRight;
- wxStaticText* m_staticTextCreateLeft;
- wxStaticText* m_staticTextUpdateLeft;
- wxStaticText* m_staticTextDeleteLeft;
- wxStaticText* m_staticTextData;
- wxStaticText* m_staticTextDeleteRight;
- wxStaticText* m_staticTextUpdateRight;
- wxStaticText* m_staticTextCreateRight;
- wxStaticLine* m_staticline12;
- wxPanel* m_panel42;
- wxCheckBox* m_checkBoxDontShowAgain;
- wxButton* m_button16;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~SyncPreviewDlgGenerated();
-
+ private:
+
+ protected:
+ wxPanel* m_panelHeader;
+ zen::BitmapButton* m_buttonStartSync;
+ wxStaticLine* m_staticline16;
+ wxStaticText* m_staticText84;
+ wxStaticText* m_staticTextVariant;
+ wxStaticLine* m_staticline14;
+ wxStaticText* m_staticText83;
+ wxStaticBitmap* m_bitmapCreateLeft;
+ wxStaticBitmap* m_bitmapUpdateLeft;
+ wxStaticBitmap* m_bitmapDeleteLeft;
+ wxStaticBitmap* m_bitmapData;
+ wxStaticBitmap* m_bitmapDeleteRight;
+ wxStaticBitmap* m_bitmapUpdateRight;
+ wxStaticBitmap* m_bitmapCreateRight;
+ wxStaticText* m_staticTextCreateLeft;
+ wxStaticText* m_staticTextUpdateLeft;
+ wxStaticText* m_staticTextDeleteLeft;
+ wxStaticText* m_staticTextData;
+ wxStaticText* m_staticTextDeleteRight;
+ wxStaticText* m_staticTextUpdateRight;
+ wxStaticText* m_staticTextCreateRight;
+ wxStaticLine* m_staticline12;
+ wxPanel* m_panel42;
+ wxCheckBox* m_checkBoxDontShowAgain;
+ wxButton* m_button16;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~SyncPreviewDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class PopupFrameGenerated1
///////////////////////////////////////////////////////////////////////////////
-class PopupFrameGenerated1 : public wxFrame
+class PopupFrameGenerated1 : public wxFrame
{
-private:
-
-protected:
-
-public:
- wxStaticBitmap* m_bitmapLeft;
- wxStaticText* m_staticTextMain;
-
- PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER );
-
- ~PopupFrameGenerated1();
-
+ private:
+
+ protected:
+
+ public:
+ wxStaticBitmap* m_bitmapLeft;
+ wxStaticText* m_staticTextMain;
+
+ PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER );
+
+ ~PopupFrameGenerated1();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class SearchDialogGenerated
///////////////////////////////////////////////////////////////////////////////
-class SearchDialogGenerated : public wxDialog
+class SearchDialogGenerated : public wxDialog
{
-private:
-
-protected:
- wxStaticText* m_staticText101;
- wxTextCtrl* m_textCtrlSearchTxt;
- wxCheckBox* m_checkBoxMatchCase;
- wxButton* m_buttonFindNext;
- wxButton* m_button29;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnText( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnFindNext( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~SearchDialogGenerated();
-
+ private:
+
+ protected:
+ wxStaticText* m_staticText101;
+ wxTextCtrl* m_textCtrlSearchTxt;
+ wxCheckBox* m_checkBoxMatchCase;
+ wxButton* m_buttonFindNext;
+ wxButton* m_button29;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnText( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnFindNext( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~SearchDialogGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class SelectTimespanDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class SelectTimespanDlgGenerated : public wxDialog
+class SelectTimespanDlgGenerated : public wxDialog
{
-private:
-
-protected:
- wxCalendarCtrl* m_calendarFrom;
- wxCalendarCtrl* m_calendarTo;
- wxStaticLine* m_staticline21;
- wxPanel* m_panel40;
- wxButton* m_buttonOkay;
- wxButton* m_button29;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnChangeSelectionFrom( wxCalendarEvent& event ) { event.Skip(); }
- virtual void OnChangeSelectionTo( wxCalendarEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
-public:
-
- SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select time span"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~SelectTimespanDlgGenerated();
-
+ private:
+
+ protected:
+ wxCalendarCtrl* m_calendarFrom;
+ wxCalendarCtrl* m_calendarTo;
+ wxStaticLine* m_staticline21;
+ wxPanel* m_panel40;
+ wxButton* m_buttonOkay;
+ wxButton* m_button29;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnChangeSelectionFrom( wxCalendarEvent& event ) { event.Skip(); }
+ virtual void OnChangeSelectionTo( wxCalendarEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select time span"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~SelectTimespanDlgGenerated();
+
};
#endif //__GUI_GENERATED_H__
diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp
index 5d3a1f36..4ef4fa96 100644
--- a/ui/gui_status_handler.cpp
+++ b/ui/gui_status_handler.cpp
@@ -7,6 +7,7 @@
#include "gui_status_handler.h"
#include <wx/wupdlock.h>
#include <wx+/shell_execute.h>
+#include <wx+/button.h>
#include "msg_popup.h"
#include "main_dlg.h"
#include "exec_finished_box.h"
@@ -259,13 +260,13 @@ SyncStatusHandler::~SyncStatusHandler()
if (showFinalResults)
{
if (abortIsRequested())
- syncStatusFrame.processHasFinished(SyncStatus::RESULT_ABORTED, errorLog); //enable okay and close events
+ syncStatusFrame.processHasFinished(SyncProgressDialog::RESULT_ABORTED, errorLog); //enable okay and close events
else if (totalErrors > 0)
- syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_ERROR, errorLog);
+ syncStatusFrame.processHasFinished(SyncProgressDialog::RESULT_FINISHED_WITH_ERROR, errorLog);
else if (totalWarnings > 0)
- syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_WARNINGS, errorLog);
+ syncStatusFrame.processHasFinished(SyncProgressDialog::RESULT_FINISHED_WITH_WARNINGS, errorLog);
else
- syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_SUCCESS, errorLog);
+ syncStatusFrame.processHasFinished(SyncProgressDialog::RESULT_FINISHED_WITH_SUCCESS, errorLog);
}
else
syncStatusFrame.closeWindowDirectly(); //syncStatusFrame is main window => program will quit directly
diff --git a/ui/gui_status_handler.h b/ui/gui_status_handler.h
index fb0dbf51..312206b6 100644
--- a/ui/gui_status_handler.h
+++ b/ui/gui_status_handler.h
@@ -15,8 +15,6 @@
#include "../lib/process_xml.h"
#include "main_dlg.h"
-class SyncStatus;
-class wxCommandEvent;
//Exception class used to abort the "compare" and "sync" process
class GuiAbortProcess {};
@@ -69,7 +67,7 @@ private:
virtual void abortThisProcess(); //throw GuiAbortProcess
MainDialog* parentDlg_;
- SyncStatus syncStatusFrame; //the window managed by SyncStatus has longer lifetime than this handler!
+ SyncProgressDialog syncStatusFrame; //the window managed by SyncStatus has longer lifetime than this handler!
const size_t lastSyncsLogFileSizeMax_;
xmlAccess::OnGuiError handleError_;
zen::ErrorLog errorLog;
diff --git a/ui/main_dlg.cpp b/ui/main_dlg.cpp
index cae45cd1..bc53f488 100644
--- a/ui/main_dlg.cpp
+++ b/ui/main_dlg.cpp
@@ -16,6 +16,7 @@
#include <zen/file_id.h>
#include <zen/thread.h>
#include <wx+/context_menu.h>
+#include <wx+/string_conv.h>
#include <wx+/button.h>
#include <wx+/shell_execute.h>
#include <wx+/app_main.h>
@@ -23,6 +24,7 @@
#include <wx+/mouse_move_dlg.h>
#include <wx+/no_flicker.h>
#include <wx+/rtl.h>
+#include <wx+/font_size.h>
#include "check_version.h"
#include "gui_status_handler.h"
#include "sync_cfg.h"
@@ -348,7 +350,7 @@ void MainDialog::create(const std::vector<wxString>& cfgFileNames)
std::vector<wxString> filenames;
if (!cfgFileNames.empty()) //1. this one has priority
filenames = cfgFileNames;
- else //next: use last used selection
+ else //FFS default startup: use last used selection
{
filenames = globalSettings.gui.lastUsedConfigFiles; //2. now try last used files
@@ -367,7 +369,7 @@ void MainDialog::create(const std::vector<wxString>& cfgFileNames)
const bool allFilesExist = findFirstMissing.timedWait(boost::posix_time::milliseconds(500)) && //false: time elapsed
!findFirstMissing.get(); //no missing
if (!allFilesExist)
- filenames.clear();
+ filenames.clear(); //we do NOT want to show an error due to last config file missing on application start!
//------------------------------------------------------------------------------------------
if (filenames.empty())
@@ -457,6 +459,11 @@ MainDialog::MainDialog(const xmlAccess::XmlGuiConfig& guiCfg,
wxWindowUpdateLocker dummy(this); //avoid display distortion
+ setRelativeFontSize(*m_buttonCompare, 1.5);
+ setRelativeFontSize(*m_buttonSync, 1.5);
+ setRelativeFontSize(*m_buttonAbort, 1.5);
+ m_buttonAbort->refreshButtonLabel(); //required after font change!
+
//---------------- support for dockable gui style --------------------------------
bSizerPanelHolder->Detach(m_panelTopButtons);
bSizerPanelHolder->Detach(m_panelDirectoryPairs);
@@ -472,10 +479,11 @@ MainDialog::MainDialog(const xmlAccess::XmlGuiConfig& guiCfg,
//caption required for all panes that can be manipulated by the users => used by context menu
auiMgr.AddPane(m_panelTopButtons,
- wxAuiPaneInfo().Name(wxT("Panel1")).Layer(4).Top().Caption(_("Main bar")).CaptionVisible(false).PaneBorder(false).Gripper().MinSize(-1, m_panelTopButtons->GetSize().GetHeight() - 5));
+ wxAuiPaneInfo().Name(wxT("Panel1")).Layer(4).Top().Caption(_("Main bar")).CaptionVisible(false).PaneBorder(false).Gripper().MinSize(-1, m_panelTopButtons->GetSize().GetHeight()));
//note: min height is calculated incorrectly by wxAuiManager if panes with and without caption are in the same row => use smaller min-size
- compareStatus.reset(new CompareStatus(*this)); //integrate the compare status panel (in hidden state)
+ compareStatus = make_unique<CompareProgressDialog>(*this); //integrate the compare status panel (in hidden state)
+
auiMgr.AddPane(compareStatus->getAsWindow(),
wxAuiPaneInfo().Name(wxT("Panel9")).Layer(4).Top().Row(1).CaptionVisible(false).PaneBorder(false).Hide()); //name "CmpStatus" used by context menu
@@ -507,7 +515,11 @@ MainDialog::MainDialog(const xmlAccess::XmlGuiConfig& guiCfg,
{
wxFont font = artProvider->GetFont(wxAUI_DOCKART_CAPTION_FONT);
font.SetWeight(wxFONTWEIGHT_BOLD);
+ font.SetPointSize(wxNORMAL_FONT->GetPointSize()); //= larger than the wxAuiDockArt default; looks better on OS X
artProvider->SetFont(wxAUI_DOCKART_CAPTION_FONT, font);
+
+ //accessibility: fix wxAUI drawing black text on black background on high-contrast color schemes:
+ artProvider->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
}
auiMgr.GetPane(m_gridNavi).MinSize(-1, -1); //we successfully tricked wxAuiManager into setting an initial Window size :> incomplete API anyone??
@@ -620,9 +632,8 @@ MainDialog::MainDialog(const xmlAccess::XmlGuiConfig& guiCfg,
setMenuItemImage(m_menuItemManual, GlobalResources::getImage(L"helpSmall"));
setMenuItemImage(m_menuItemAbout, GlobalResources::getImage(L"aboutSmall"));
-#ifdef FFS_LINUX
- m_menuItemCheckVer->Enable(zen::isPortableVersion()); //disable update check for Linux installer-based version -> handled by .deb
-#endif
+ if (!manualProgramUpdateRequired())
+ m_menuItemCheckVer->Enable(false);
//create language selection menu
std::for_each(zen::ExistingTranslations::get().begin(), ExistingTranslations::get().end(),
@@ -866,16 +877,14 @@ xmlAccess::XmlGlobalSettings MainDialog::getGlobalCfgBeforeExit()
//--------------------------------------------------------------------------------
//write list of last used configuration files
- typedef std::pair<wxString, int> HistItem; //(cfg-file/last use index)
- std::vector<HistItem> historyDetail;
+ std::map<int, wxString> historyDetail; //(cfg-file/last use index)
for (unsigned int i = 0; i < m_listBoxHistory->GetCount(); ++i)
if (auto clientString = dynamic_cast<const wxClientHistoryData*>(m_listBoxHistory->GetClientObject(i)))
- historyDetail.push_back(std::make_pair(clientString->cfgFile_, clientString->lastUseIndex_));
- //sort by last use, most recent items *first* (looks better in xml than the reverse)
- std::sort(historyDetail.begin(), historyDetail.end(), [](const HistItem& lhs, const HistItem& rhs) { return lhs.second > rhs.second; });
+ historyDetail.insert(std::make_pair(clientString->lastUseIndex_, clientString->cfgFile_));
+ //sort by last use; put most recent items *first* (looks better in xml than the reverse)
std::vector<wxString> history;
- std::transform(historyDetail.begin(), historyDetail.end(), std::back_inserter(history), [](const HistItem& item) { return item.first; });
+ std::transform(historyDetail.rbegin(), historyDetail.rend(), std::back_inserter(history), [](const std::pair<int, wxString>& item) { return item.second; });
if (history.size() > globalSettings.gui.cfgFileHistMax) //erase oldest elements
history.resize(globalSettings.gui.cfgFileHistMax);
@@ -1269,6 +1278,8 @@ void MainDialog::openExternalApplication(const wxString& commandline, const std:
zen::shellExecute(L"\"" + fallbackDir + L"\"");
#elif defined FFS_LINUX
zen::shellExecute("xdg-open \"" + fallbackDir + "\"");
+#elif defined FFS_MAC
+ zen::shellExecute("open \"" + fallbackDir + "\"");
#endif
return;
}
@@ -1353,6 +1364,7 @@ void MainDialog::setStatusBarFileStatistics(size_t filesOnLeftView,
void MainDialog::setStatusBarFullText(const wxString& msg)
{
+ const bool needLayoutUpdate = !m_staticTextFullStatus->IsShown();
//select state
bSizerFileStatus->Show(false);
m_staticTextFullStatus->Show();
@@ -1360,6 +1372,9 @@ void MainDialog::setStatusBarFullText(const wxString& msg)
//update status information
setText(*m_staticTextFullStatus, msg);
m_panelStatusBar->Layout();
+
+ if (needLayoutUpdate)
+ auiMgr.Update(); //fix status bar height (needed on OS X)
}
@@ -1372,6 +1387,8 @@ void MainDialog::flashStatusInformation(const wxString& text)
m_staticTextStatusMiddle->SetLabel(text);
m_staticTextStatusMiddle->SetForegroundColour(wxColour(31, 57, 226)); //highlight color: blue
m_panelStatusBar->Layout();
+
+ //if (needLayoutUpdate) auiMgr.Update(); -> not needed here, this is called anyway in updateGui()
}
@@ -1381,7 +1398,7 @@ void MainDialog::OnIdleEvent(wxEvent& event)
if (oldStatusMsg) //check if there is some work to do
{
wxMilliClock_t currentTime = wxGetLocalTimeMillis();
- if (numeric::dist(currentTime, lastStatusChange) > 2500) //restore stackObject after two seconds
+ if (numeric::dist(currentTime, lastStatusChange) > 2500) //restore after two seconds
{
lastStatusChange = currentTime;
@@ -2322,7 +2339,7 @@ void MainDialog::onDirManualCorrection(wxCommandEvent& event)
wxString getFormattedHistoryElement(const wxString& filename)
{
wxString output = afterLast(filename, utfCvrtTo<wxString>(FILE_NAME_SEPARATOR));
- if (endsWith(output, ".ffs_gui"))
+ if (endsWith(output, L".ffs_gui"))
output = beforeLast(output, L'.');
return output;
}
@@ -2355,37 +2372,37 @@ void MainDialog::addFileToCfgHistory(const std::vector<wxString>& filenames)
auto futIter = fileEx.begin();
for (auto it = filenames.begin(); it != filenames.end(); ++it, ++futIter)
- {
- //only (still) existing files should be included in the list
- if (futIter->is_ready() && !futIter->get())
- continue;
-
- const wxString& filename = *it;
-
- auto findItem = [&]() -> int
+ if (!futIter->is_ready() || futIter->get()) //only existing files should be included in the list (and also those with no result yet)
{
- for (int i = 0; i < static_cast<int>(m_listBoxHistory->GetCount()); ++i)
- if (auto histData = dynamic_cast<const wxClientHistoryData*>(m_listBoxHistory->GetClientObject(i)))
- if (samePhysicalFile(toZ(filename), toZ(histData->cfgFile_)))
- return i;
- return -1;
- };
+ const wxString& filename = *it;
- const int itemPos = findItem();
- if (itemPos >= 0) //update
- {
- if (auto histData = dynamic_cast<wxClientHistoryData*>(m_listBoxHistory->GetClientObject(itemPos)))
- histData->lastUseIndex_ = ++lastUseIndexMax;
- selections[itemPos] = true;
- }
- else //insert
- {
- const wxString label = samePhysicalFile(toZ(lastRunConfigName()), toZ(filename)) ? //give default config file a different name
- _("<Last session>") : getFormattedHistoryElement(filename);
- const int newPos = m_listBoxHistory->Append(label, new wxClientHistoryData(filename, ++lastUseIndexMax)); //*insert* into sorted list
- selections.insert(selections.begin() + newPos, true);
+ warn_static("perf!!!!? samePhysicalFile : andere setllen?")
+
+ auto findItem = [&]() -> int
+ {
+ const int itemCount = static_cast<int>(m_listBoxHistory->GetCount());
+ for (int i = 0; i < itemCount; ++i)
+ if (auto histData = dynamic_cast<const wxClientHistoryData*>(m_listBoxHistory->GetClientObject(i)))
+ if (samePhysicalFile(toZ(filename), toZ(histData->cfgFile_)))
+ return i;
+ return -1;
+ };
+
+ const int itemPos = findItem();
+ if (itemPos >= 0) //update
+ {
+ if (auto histData = dynamic_cast<wxClientHistoryData*>(m_listBoxHistory->GetClientObject(itemPos)))
+ histData->lastUseIndex_ = ++lastUseIndexMax;
+ selections[itemPos] = true;
+ }
+ else //insert
+ {
+ const wxString label = samePhysicalFile(toZ(lastRunConfigName()), toZ(filename)) ? //give default config file a different name
+ _("<Last session>") : getFormattedHistoryElement(filename);
+ const int newPos = m_listBoxHistory->Append(label, new wxClientHistoryData(filename, ++lastUseIndexMax)); //*insert* into sorted list
+ selections.insert(selections.begin() + newPos, true);
+ }
}
- }
assert(selections.size() == m_listBoxHistory->GetCount());
@@ -4179,7 +4196,8 @@ void MainDialog::OnRegularUpdateCheck(wxIdleEvent& event)
//execute just once per startup!
Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), nullptr, this);
- zen::checkForUpdatePeriodically(this, globalCfg.gui.lastUpdateCheck);
+ if (manualProgramUpdateRequired())
+ zen::checkForUpdatePeriodically(this, globalCfg.gui.lastUpdateCheck);
}
@@ -4208,7 +4226,7 @@ void MainDialog::OnMenuAbout(wxCommandEvent& event)
void MainDialog::OnShowHelp(wxCommandEvent& event)
{
- zen::displayHelpEntry();
+ zen::displayHelpEntry(this);
}
diff --git a/ui/main_dlg.h b/ui/main_dlg.h
index b5492101..d4b06a08 100644
--- a/ui/main_dlg.h
+++ b/ui/main_dlg.h
@@ -22,7 +22,7 @@
//class FolderHistory;
class DirectoryPair;
-class CompareStatus;
+class CompareProgressDialog;
class DirectoryPairFirst;
@@ -42,7 +42,7 @@ public:
bool startComparison);
void disableAllElements(bool enableAbort); //dis-/enables all elements (except abort button) that might receive user input
- void enableAllElements(); //during long-running processes: comparison, deletion
+ void enableAllElements(); //during long-running processes: comparison, deletion
void onQueryEndSession(); //last chance to do something useful before killing the application!
@@ -266,7 +266,7 @@ private:
std::unique_ptr<wxString> oldStatusMsg;
//compare status panel (hidden on start, shown when comparing)
- std::unique_ptr<CompareStatus> compareStatus; //always bound
+ std::unique_ptr<CompareProgressDialog> compareStatus; //always bound
bool cleanedUp;
diff --git a/ui/msg_popup.cpp b/ui/msg_popup.cpp
index e200be1f..59579541 100644
--- a/ui/msg_popup.cpp
+++ b/ui/msg_popup.cpp
@@ -44,7 +44,6 @@ ErrorDlg::ErrorDlg(wxWindow* parent, int activeButtons, const wxString& messageT
#ifdef FFS_WIN
new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
-
SetTitle(!caption.empty() ? caption : _("Error"));
m_bitmapMsgType->SetBitmap(GlobalResources::getImage(L"msg_error"));
m_textCtrlMessage->SetValue(messageText);
@@ -141,12 +140,10 @@ WarningDlg::WarningDlg(wxWindow* parent, int activeButtons, const wxString& mes
buttonIgnore(*m_buttonCustom1),
buttonSwitch(*m_buttonCustom2),
checkBoxDontShowAgain(*m_checkBoxCustom)
-
{
#ifdef FFS_WIN
new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
-
SetTitle(_("Warning"));
m_bitmapMsgType->SetBitmap(GlobalResources::getImage(L"msg_warning"));
m_textCtrlMessage->SetValue(messageText);
@@ -235,7 +232,6 @@ QuestionDlg::QuestionDlg(wxWindow* parent,
#ifdef FFS_WIN
new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
-
SetTitle(!caption.empty()? caption : _("Question"));
m_bitmapMsgType->SetBitmap(GlobalResources::getImage(L"msg_question"));
m_textCtrlMessage->SetValue(messageText);
diff --git a/ui/osx_dock.h b/ui/osx_dock.h
new file mode 100644
index 00000000..a3ffa0c5
--- /dev/null
+++ b/ui/osx_dock.h
@@ -0,0 +1,30 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef OSX_DOCK_837210847312534
+#define OSX_DOCK_837210847312534
+
+#include <string>
+
+namespace osx
+{
+class OsxError //Exception base class used to notify file/directory copy/delete errors
+{
+public:
+ explicit OsxError(const std::string& message) : msg(message) {}
+ virtual ~OsxError() {}
+
+ const std::string& toString() const { return msg; }
+
+private:
+ std::string msg;
+};
+
+
+void dockIconSetText(const char* str); //throw OsxError
+}
+
+#endif //OSX_DOCK_837210847312534
diff --git a/ui/osx_dock.mm b/ui/osx_dock.mm
new file mode 100644
index 00000000..5ac6d154
--- /dev/null
+++ b/ui/osx_dock.mm
@@ -0,0 +1,35 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#include "osx_dock.h"
+#import <Cocoa/Cocoa.h>
+
+
+void osx::dockIconSetText(const char* str)
+{
+ @try
+ {
+ NSString* label = [NSString stringWithCString:str encoding:NSUTF8StringEncoding];
+ [[NSApp dockTile] setBadgeLabel:label];
+ }
+ @catch (NSException* e)
+ {
+ std::string msg;
+ if (const char* name = [[e name ] cStringUsingEncoding:NSUTF8StringEncoding])
+ msg += name;
+ if (const char* descr = [[e reason] cStringUsingEncoding:NSUTF8StringEncoding])
+ {
+ msg += "\n";
+ msg += descr;
+ }
+ throw OsxError(msg);
+ /*
+ e.g.
+ NSInvalidArgumentException
+ *** +[NSString stringWithCString:encoding:]: NULL cString
+ */
+ }
+}
diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp
index 13751541..1e5285be 100644
--- a/ui/progress_indicator.cpp
+++ b/ui/progress_indicator.cpp
@@ -20,6 +20,7 @@
#include <wx+/graph.h>
#include <wx+/context_menu.h>
#include <wx+/no_flicker.h>
+#include <wx+/font_size.h>
#include <zen/file_handling.h>
#include "gui_generated.h"
#include "../lib/ffs_paths.h"
@@ -37,15 +38,15 @@ namespace
const int GAUGE_FULL_RANGE = 50000;
//window size used for statistics in milliseconds
-const int WINDOW_REMAINING_TIME = 60000; //some usecases have dropouts of 40 seconds -> 60 sec. window size handles them well
+const int WINDOW_REMAINING_TIME = 60000; //some use cases have dropouts of 40 seconds -> 60 sec. window size handles them well
const int WINDOW_BYTES_PER_SEC = 5000; //
}
-class CompareStatus::CompareStatusImpl : public CompareStatusGenerated
+class CompareProgressDialog::Pimpl : public CompareProgressDlgGenerated
{
public:
- CompareStatusImpl(wxTopLevelWindow& parentWindow);
+ Pimpl(wxTopLevelWindow& parentWindow);
void init(const Statistics& syncStat); //constructor/destructor semantics, but underlying Window is reused
void finalize(); //
@@ -65,29 +66,27 @@ private:
std::unique_ptr<PerfCheck> perf; //estimate remaining time
long lastStatCallSpeed; //used for calculating intervals between showing and collecting perf samples
- long lastStatCallRemTime; //
};
-CompareStatus::CompareStatusImpl::CompareStatusImpl(wxTopLevelWindow& parentWindow) :
- CompareStatusGenerated(&parentWindow),
+CompareProgressDialog::Pimpl::Pimpl(wxTopLevelWindow& parentWindow) :
+ CompareProgressDlgGenerated(&parentWindow),
parentWindow_(parentWindow),
syncStat_(nullptr),
- lastStatCallSpeed (-1000000), //some big number
- lastStatCallRemTime(-1000000)
+ lastStatCallSpeed (-1000000) //some big number
{
//init(); -> needed?
}
-void CompareStatus::CompareStatusImpl::init(const Statistics& syncStat)
+void CompareProgressDialog::Pimpl::init(const Statistics& syncStat)
{
syncStat_ = &syncStat;
titleTextBackup = parentWindow_.GetTitle();
try //try to get access to Windows 7/Ubuntu taskbar
{
- taskbar_.reset(new Taskbar(parentWindow_));
+ taskbar_ = make_unique<Taskbar>(parentWindow_);
}
catch (const TaskbarNotAvailable&) {}
@@ -112,7 +111,7 @@ void CompareStatus::CompareStatusImpl::init(const Statistics& syncStat)
}
-void CompareStatus::CompareStatusImpl::finalize()
+void CompareProgressDialog::Pimpl::finalize()
{
syncStat_ = nullptr;
parentWindow_.SetTitle(titleTextBackup);
@@ -120,12 +119,11 @@ void CompareStatus::CompareStatusImpl::finalize()
}
-void CompareStatus::CompareStatusImpl::switchToCompareBytewise()
+void CompareProgressDialog::Pimpl::switchToCompareBytewise()
{
//start to measure perf
perf = make_unique<PerfCheck>(WINDOW_REMAINING_TIME, WINDOW_BYTES_PER_SEC);
lastStatCallSpeed = -1000000; //some big number
- lastStatCallRemTime = -1000000;
//show status for comparing bytewise
bSizerFilesFound ->Show(false);
@@ -139,7 +137,7 @@ void CompareStatus::CompareStatusImpl::switchToCompareBytewise()
}
-void CompareStatus::CompareStatusImpl::updateStatusPanelNow()
+void CompareProgressDialog::Pimpl::updateStatusPanelNow()
{
if (!syncStat_) //no comparison running!!
return;
@@ -181,7 +179,7 @@ void CompareStatus::CompareStatusImpl::updateStatusPanelNow()
const double fraction = dataTotal + objectsTotal == 0 ? 0 : std::max(0.0, to<double>(dataCurrent + objectsCurrent) / to<double>(dataTotal + objectsTotal));
//dialog caption, taskbar
- setTitle(fractionToShortString(fraction) + wxT(" - ") + _("Comparing content..."));
+ setTitle(fractionToString(fraction) + wxT(" - ") + _("Comparing content..."));
if (taskbar_.get())
{
taskbar_->setProgress(fraction);
@@ -197,23 +195,19 @@ void CompareStatus::CompareStatusImpl::updateStatusPanelNow()
//remaining time and speed: only visible during binary comparison
if (perf)
- if (timeElapsed.Time() - lastStatCallSpeed >= 500) //-> Win 7 copy uses 1 sec update interval
+ {
+ if (numeric::dist(lastStatCallSpeed, timeElapsed.Time()) >= 500)
{
lastStatCallSpeed = timeElapsed.Time();
perf->addSample(objectsCurrent, to<double>(dataCurrent), timeElapsed.Time());
- //current speed
+ //current speed -> Win 7 copy uses 1 sec update interval
setText(*m_staticTextSpeed, perf->getBytesPerSecond(), &layoutChanged);
-
- if (timeElapsed.Time() - lastStatCallRemTime >= 2000) //update GUI every 2 sec
- {
- lastStatCallRemTime = timeElapsed.Time();
-
- //remaining time
- setText(*m_staticTextRemTime, perf->getRemainingTime(to<double>(dataTotal - dataCurrent)), &layoutChanged);
- }
}
+ //remaining time
+ setText(*m_staticTextRemTime, perf->getRemainingTime(to<double>(dataTotal - dataCurrent)), &layoutChanged);
+ }
}
break;
@@ -238,33 +232,34 @@ void CompareStatus::CompareStatusImpl::updateStatusPanelNow()
updateUiNow();
}
+
//########################################################################################
//redirect to implementation
-CompareStatus::CompareStatus(wxTopLevelWindow& parentWindow) :
- pimpl(new CompareStatusImpl(parentWindow)) {} //owned by parentWindow
+CompareProgressDialog::CompareProgressDialog(wxTopLevelWindow& parentWindow) :
+ pimpl(new Pimpl(parentWindow)) {} //owned by parentWindow
-wxWindow* CompareStatus::getAsWindow()
+wxWindow* CompareProgressDialog::getAsWindow()
{
return pimpl;
}
-void CompareStatus::init(const Statistics& syncStat)
+void CompareProgressDialog::init(const Statistics& syncStat)
{
pimpl->init(syncStat);
}
-void CompareStatus::finalize()
+void CompareProgressDialog::finalize()
{
pimpl->finalize();
}
-void CompareStatus::switchToCompareBytewise()
+void CompareProgressDialog::switchToCompareBytewise()
{
pimpl->switchToCompareBytewise();
}
-void CompareStatus::updateStatusPanelNow()
+void CompareProgressDialog::updateStatusPanelNow()
{
pimpl->updateStatusPanelNow();
}
@@ -786,7 +781,7 @@ struct LabelFormatterBytes : public LabelFormatter
if (numeric::isNull(e))
return 0;
const double a = bytesProposed / e; //bytesProposed = a * 2^k with a in (1, 2)
-
+ assert(1 < a && a < 2);
return bestFit(a, 1, 2) * e;
}
@@ -798,34 +793,13 @@ struct LabelFormatterTimeElapsed : public LabelFormatter
{
virtual double getOptimalBlockSize(double secProposed) const
{
- if (secProposed <= 10)
- return 10; //minimum block size
- if (secProposed <= 20) //avoid flicker between 10<->15<->20 sec blocks
- return bestFit(secProposed, 10, 20);
- if (secProposed <= 30)
- return bestFit(secProposed, 20, 30);
+ const double stepsSec[] = { 10, 20, 30, 60 }; //10 sec: minimum block size; no 15: avoid flicker between 10<->15<->20 sec blocks
if (secProposed <= 60)
- return bestFit(secProposed, 30, 60);
+ return numeric::nearMatch(secProposed, std::begin(stepsSec), std::end(stepsSec));
- //for minutes: nice numbers are 1, 2, 5, 10, 15, 20, 30
- auto calcBlock = [](double val) -> double
- {
- if (val <= 2)
- return bestFit(val, 1, 2); //
- if (val <= 5)
- return bestFit(val, 2, 5); //
- if (val <= 10)
- return bestFit(val, 5, 10); // a good candidate for a variadic template!
- if (val <= 15)
- return bestFit(val, 10, 15); //
- if (val <= 20)
- return bestFit(val, 15, 20);
- if (val <= 30)
- return bestFit(val, 20, 30);
- return bestFit(val, 30, 60);
- };
+ const double stepsMin[] = { 1, 2, 5, 10, 15, 20, 30, 60 }; //nice numbers for minutes
if (secProposed <= 3600)
- return calcBlock(secProposed / 60) * 60;
+ return 60.0 * numeric::nearMatch(secProposed / 60, std::begin(stepsMin), std::end(stepsMin));
if (secProposed <= 3600 * 24)
return nextNiceNumber(secProposed / 3600) * 3600;
@@ -836,7 +810,7 @@ struct LabelFormatterTimeElapsed : public LabelFormatter
virtual wxString formatText(double timeElapsed, double optimalBlockSize) const
{
return timeElapsed < 60 ?
- remainingTimeToShortString(timeElapsed) :
+ replaceCpy(_P("1 sec", "%x sec", numeric::round(timeElapsed)), L"%x", zen::numberTo<std::wstring>(numeric::round(timeElapsed))) :
timeElapsed < 3600 ?
wxTimeSpan::Seconds(timeElapsed).Format( L"%M:%S") :
wxTimeSpan::Seconds(timeElapsed).Format(L"%H:%M:%S");
@@ -856,16 +830,16 @@ struct LabelFormatterTimeElapsed : public LabelFormatter
}
-class SyncStatus::SyncStatusImpl : public SyncStatusDlgGenerated
+class SyncProgressDialog::Pimpl : public SyncProgressDlgGenerated
{
public:
- SyncStatusImpl(AbortCallback& abortCb,
- const Statistics& syncStat,
- MainDialog* parentWindow,
- const wxString& jobName,
- const std::wstring& execWhenFinished,
- std::vector<std::wstring>& execFinishedHistory);
- ~SyncStatusImpl();
+ Pimpl(AbortCallback& abortCb,
+ const Statistics& syncStat,
+ MainDialog* parentWindow,
+ const wxString& jobName,
+ const std::wstring& execWhenFinished,
+ std::vector<std::wstring>& execFinishedHistory);
+ ~Pimpl();
void initNewPhase();
void notifyProgressChange();
@@ -921,7 +895,6 @@ private:
//remaining time
std::unique_ptr<PerfCheck> perf;
long lastStatCallSpeed; //used for calculating intervals between collecting perf samples
- long lastStatCallRemTime; //
//help calculate total speed
long phaseStartMs; //begin of current phase in [ms]
@@ -934,19 +907,19 @@ private:
};
-SyncStatus::SyncStatusImpl::SyncStatusImpl(AbortCallback& abortCb,
- const Statistics& syncStat,
- MainDialog* parentWindow,
- const wxString& jobName,
- const std::wstring& execWhenFinished,
- std::vector<std::wstring>& execFinishedHistory) :
- SyncStatusDlgGenerated(parentWindow,
- wxID_ANY,
- parentWindow ? wxString() : (wxString(L"FreeFileSync - ") + _("Folder Comparison and Synchronization")),
- wxDefaultPosition, wxSize(640, 350),
- parentWindow ?
- wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT : //wxTAB_TRAVERSAL is needed for standard button handling: wxID_OK/wxID_CANCEL
- wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL),
+SyncProgressDialog::Pimpl::Pimpl(AbortCallback& abortCb,
+ const Statistics& syncStat,
+ MainDialog* parentWindow,
+ const wxString& jobName,
+ const std::wstring& execWhenFinished,
+ std::vector<std::wstring>& execFinishedHistory) :
+ SyncProgressDlgGenerated(parentWindow,
+ wxID_ANY,
+ parentWindow ? wxString() : (wxString(L"FreeFileSync - ") + _("Folder Comparison and Synchronization")),
+ wxDefaultPosition, wxDefaultSize,
+ parentWindow ?
+ wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT : //wxTAB_TRAVERSAL is needed for standard button handling: wxID_OK/wxID_CANCEL
+ wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL),
jobName_ (jobName),
mainDialog(parentWindow),
abortCb_ (&abortCb),
@@ -955,13 +928,14 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(AbortCallback& abortCb,
finalResult(RESULT_ABORTED), //dummy value
isZombie(false),
lastStatCallSpeed (-1000000), //some big number
- lastStatCallRemTime(-1000000),
phaseStartMs(0)
{
#ifdef FFS_WIN
new MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
+ setRelativeFontSize(*m_staticTextPhase, 1.5);
+
if (mainDialog)
{
titelTextBackup = mainDialog->GetTitle(); //save old title (will be used as progress indicator)
@@ -998,20 +972,20 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(AbortCallback& abortCb,
m_panelFooter->Layout();
//register key event
- Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(SyncStatusImpl::OnKeyPressed), nullptr, this);
+ Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(Pimpl::OnKeyPressed), nullptr, this);
//init graph
graphDataBytes = std::make_shared<GraphDataBytes>();
graphDataBytesTotal = std::make_shared<GraphDataConstLine>();
m_panelGraph->setAttributes(Graph2D::MainAttributes().
- setLabelX(Graph2D::X_LABEL_BOTTOM, 20, std::make_shared<LabelFormatterTimeElapsed>()).
- setLabelY(Graph2D::Y_LABEL_RIGHT, 70, std::make_shared<LabelFormatterBytes>()));
+ setLabelX(Graph2D::X_LABEL_BOTTOM, 20, std::make_shared<LabelFormatterTimeElapsed>()).
+ setLabelY(Graph2D::Y_LABEL_RIGHT, 70, std::make_shared<LabelFormatterBytes>()));
m_panelGraph->setData(graphDataBytes,
- Graph2D::CurveAttributes().setLineWidth(2)
- .setColor (wxColor( 0, 192, 0)) //medium green
- .fillCurveArea(wxColor(192, 255, 192))); //faint green
+ Graph2D::CurveAttributes().setLineWidth(2)
+ .setColor (wxColor( 0, 192, 0)) //medium green
+ .fillCurveArea(wxColor(192, 255, 192))); //faint green
m_panelGraph->addData(graphDataBytesTotal, Graph2D::CurveAttributes().setLineWidth(2).setColor(wxColor(0, 64, 0))); //dark green
@@ -1025,7 +999,7 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(AbortCallback& abortCb,
}
-SyncStatus::SyncStatusImpl::~SyncStatusImpl()
+SyncProgressDialog::Pimpl::~Pimpl()
{
if (mainDialog)
{
@@ -1037,7 +1011,7 @@ SyncStatus::SyncStatusImpl::~SyncStatusImpl()
}
-void SyncStatus::SyncStatusImpl::OnKeyPressed(wxKeyEvent& event)
+void SyncProgressDialog::Pimpl::OnKeyPressed(wxKeyEvent& event)
{
const int keyCode = event.GetKeyCode();
if (keyCode == WXK_ESCAPE)
@@ -1063,7 +1037,7 @@ void SyncStatus::SyncStatusImpl::OnKeyPressed(wxKeyEvent& event)
}
-void SyncStatus::SyncStatusImpl::initNewPhase()
+void SyncProgressDialog::Pimpl::initNewPhase()
{
updateDialogStatus(); //evaluates "syncStat_->currentPhase()"
@@ -1074,7 +1048,6 @@ void SyncStatus::SyncStatusImpl::initNewPhase()
//start new measurement
perf = make_unique<PerfCheck>(WINDOW_REMAINING_TIME, WINDOW_BYTES_PER_SEC);
lastStatCallSpeed = -1000000; //some big number
- lastStatCallRemTime = -1000000;
phaseStartMs = timeElapsed.Time();
@@ -1086,7 +1059,7 @@ void SyncStatus::SyncStatusImpl::initNewPhase()
}
-void SyncStatus::SyncStatusImpl::notifyProgressChange() //noexcept!
+void SyncProgressDialog::Pimpl::notifyProgressChange() //noexcept!
{
if (syncStat_)
{
@@ -1139,7 +1112,7 @@ Zorder evaluateZorder(const wxWindow& top, const wxWindow& bottom)
#endif
-std::wstring getDialogStatusText(const Statistics* syncStat, bool paused, SyncStatus::SyncResult finalResult)
+std::wstring getDialogPhaseText(const Statistics* syncStat, bool paused, SyncProgressDialog::SyncResult finalResult)
{
if (syncStat) //sync running
{
@@ -1161,11 +1134,11 @@ std::wstring getDialogStatusText(const Statistics* syncStat, bool paused, SyncSt
else //sync finished
switch (finalResult)
{
- case SyncStatus::RESULT_ABORTED:
+ case SyncProgressDialog::RESULT_ABORTED:
return _("Aborted");
- case SyncStatus::RESULT_FINISHED_WITH_ERROR:
- case SyncStatus::RESULT_FINISHED_WITH_WARNINGS:
- case SyncStatus::RESULT_FINISHED_WITH_SUCCESS:
+ case SyncProgressDialog::RESULT_FINISHED_WITH_ERROR:
+ case SyncProgressDialog::RESULT_FINISHED_WITH_WARNINGS:
+ case SyncProgressDialog::RESULT_FINISHED_WITH_SUCCESS:
return _("Completed");
}
return std::wstring();
@@ -1173,7 +1146,7 @@ std::wstring getDialogStatusText(const Statistics* syncStat, bool paused, SyncSt
}
-void SyncStatus::SyncStatusImpl::setExternalStatus(const wxString& status, const wxString& progress) //progress may be empty!
+void SyncProgressDialog::Pimpl::setExternalStatus(const wxString& status, const wxString& progress) //progress may be empty!
{
//sys tray: order "top-down": jobname, status, progress
wxString newTrayInfo = jobName_.empty() ? status : L"\"" + jobName_ + L"\"\n" + status;
@@ -1202,7 +1175,7 @@ void SyncStatus::SyncStatusImpl::setExternalStatus(const wxString& status, const
}
-void SyncStatus::SyncStatusImpl::updateGui(bool allowYield)
+void SyncProgressDialog::Pimpl::updateGui(bool allowYield)
{
assert(syncStat_);
if (!syncStat_) //no sync running!!
@@ -1213,14 +1186,14 @@ void SyncStatus::SyncStatusImpl::updateGui(bool allowYield)
bool layoutChanged = false; //avoid screen flicker by calling layout() only if necessary
//sync status text
- setText(*m_textCtrlStatus, replaceCpy(syncStat_->currentStatusText(), L'\n', L' ')); //no layout update for status texts!
+ setText(*m_staticTextStatus, replaceCpy(syncStat_->currentStatusText(), L'\n', L' ')); //no layout update for status texts!
switch (syncStat_->currentPhase()) //no matter if paused or not
{
case ProcessCallback::PHASE_NONE:
case ProcessCallback::PHASE_SCANNING:
//dialog caption, taskbar, systray tooltip
- setExternalStatus(getDialogStatusText(syncStat_, paused_, finalResult), toGuiString(syncStat_->getObjectsCurrent(ProcessCallback::PHASE_SCANNING))); //status text may be "paused"!
+ setExternalStatus(getDialogPhaseText(syncStat_, paused_, finalResult), toGuiString(syncStat_->getObjectsCurrent(ProcessCallback::PHASE_SCANNING))); //status text may be "paused"!
//progress indicators
m_gauge1->Pulse();
@@ -1254,7 +1227,7 @@ void SyncStatus::SyncStatusImpl::updateGui(bool allowYield)
//----------------------------------------------------------------------------------------------------
//dialog caption, taskbar, systray tooltip
- setExternalStatus(getDialogStatusText(syncStat_, paused_, finalResult), fractionToShortString(fraction)); //status text may be "paused"!
+ setExternalStatus(getDialogPhaseText(syncStat_, paused_, finalResult), fractionToString(fraction)); //status text may be "paused"!
//progress indicators
m_gauge1->SetValue(numeric::round(fraction * GAUGE_FULL_RANGE));
@@ -1272,23 +1245,19 @@ void SyncStatus::SyncStatusImpl::updateGui(bool allowYield)
//remaining time and speed
assert(perf);
if (perf)
- if (timeElapsed.Time() - lastStatCallSpeed >= 500) //-> Win 7 copy uses 1 sec update interval
+ {
+ if (numeric::dist(lastStatCallSpeed, timeElapsed.Time()) >= 500)
{
lastStatCallSpeed = timeElapsed.Time();
perf->addSample(objectsCurrent, to<double>(dataCurrent), timeElapsed.Time());
- //current speed
+ //current speed -> Win 7 copy uses 1 sec update interval
setText(*m_staticTextSpeed, perf->getBytesPerSecond(), &layoutChanged);
-
- if (timeElapsed.Time() - lastStatCallRemTime >= 2000) //update GUI every 2 sec
- {
- lastStatCallRemTime = timeElapsed.Time();
-
- //remaining time
- setText(*m_staticTextRemTime, perf->getRemainingTime(to<double>(dataTotal - dataCurrent)), &layoutChanged);
- }
}
+ //remaining time: display with relative error of 10% - based on samples taken every 0.5 sec only - accuracy of prediction grows with time
+ setText(*m_staticTextRemTime, perf->getRemainingTime(to<double>(dataTotal - dataCurrent)), &layoutChanged);
+ }
}
break;
}
@@ -1355,17 +1324,17 @@ void SyncStatus::SyncStatusImpl::updateGui(bool allowYield)
}
-std::wstring SyncStatus::SyncStatusImpl::getExecWhenFinishedCommand() const
+std::wstring SyncProgressDialog::Pimpl::getExecWhenFinishedCommand() const
{
return m_comboBoxExecFinished->getValue();
}
-void SyncStatus::SyncStatusImpl::updateDialogStatus() //depends on "syncStat_, paused_, finalResult"
+void SyncProgressDialog::Pimpl::updateDialogStatus() //depends on "syncStat_, paused_, finalResult"
{
- const wxString dlgStatusTxt = getDialogStatusText(syncStat_, paused_, finalResult);
+ const wxString dlgStatusTxt = getDialogPhaseText(syncStat_, paused_, finalResult);
- m_staticTextStatus->SetLabel(dlgStatusTxt);
+ m_staticTextPhase->SetLabel(dlgStatusTxt);
//status bitmap
if (syncStat_) //sync running
@@ -1466,8 +1435,10 @@ void SyncStatus::SyncStatusImpl::updateDialogStatus() //depends on "syncStat_, p
Layout();
}
+warn_static("osx: minimize to systray?")
-void SyncStatus::SyncStatusImpl::closeWindowDirectly() //this should really be called: do not call back + schedule deletion
+
+void SyncProgressDialog::Pimpl::closeWindowDirectly() //this should really be called: do not call back + schedule deletion
{
paused_ = false; //you never know?
@@ -1483,7 +1454,7 @@ void SyncStatus::SyncStatusImpl::closeWindowDirectly() //this should really be c
}
-void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const ErrorLog& log) //essential to call this in StatusHandler derived class destructor
+void SyncProgressDialog::Pimpl::processHasFinished(SyncResult resultId, const ErrorLog& log) //essential to call this in StatusHandler derived class destructor
{
//at the LATEST(!) to prevent access to currentStatusHandler
//enable okay and close events; may be set in this method ONLY
@@ -1522,7 +1493,7 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E
return L"-"; //fallback
};
- m_staticTextSpeed->SetLabel(getOverallBytesPerSecond());
+ m_staticTextSpeed->SetLabel(getOverallBytesPerSecond());
//show new element "items processed"
m_staticTextLabelItemsProc->Show(true);
@@ -1548,10 +1519,12 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E
//----------------------------------
updateDialogStatus();
- setExternalStatus(getDialogStatusText(syncStat_, paused_, finalResult), wxString());
+ setExternalStatus(getDialogPhaseText(syncStat_, paused_, finalResult), wxString());
resumeFromSystray(); //if in tray mode...
+ warn_static("not honored on osx")
+
EnableCloseButton(true);
m_buttonAbort->Disable();
@@ -1568,8 +1541,8 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E
m_animationControl1->Hide();
//hide current operation status
- m_staticlineHeader ->Hide();
- m_textCtrlStatus ->Hide();
+ m_staticlineHeader->Hide();
+ m_staticTextStatus->Hide();
bSizerExecFinished->Show(false);
@@ -1592,7 +1565,7 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E
//1. re-arrange graph into results listbook
bSizerTop->Detach(m_panelProgress);
m_panelProgress->Reparent(m_listbookResult);
-#ifdef FFS_LINUX
+#ifdef FFS_LINUX //does not seem to be required on Win or OS X
wxYield(); //wxGTK 2.9.3 fails miserably at "reparent" whithout this
#endif
m_listbookResult->AddPage(m_panelProgress, _("Statistics"), true); //AddPage() takes ownership!
@@ -1613,11 +1586,11 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E
//play (optional) sound notification after sync has completed -> only play when waiting on results dialog, seems to be pointless otherwise!
switch (finalResult)
{
- case SyncStatus::RESULT_ABORTED:
+ case SyncProgressDialog::RESULT_ABORTED:
break;
- case SyncStatus::RESULT_FINISHED_WITH_ERROR:
- case SyncStatus::RESULT_FINISHED_WITH_WARNINGS:
- case SyncStatus::RESULT_FINISHED_WITH_SUCCESS:
+ case SyncProgressDialog::RESULT_FINISHED_WITH_ERROR:
+ case SyncProgressDialog::RESULT_FINISHED_WITH_WARNINGS:
+ case SyncProgressDialog::RESULT_FINISHED_WITH_SUCCESS:
{
const Zstring soundFile = getResourceDir() + Zstr("Sync_Complete.wav");
if (fileExists(soundFile))
@@ -1630,13 +1603,13 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncResult resultId, const E
}
-void SyncStatus::SyncStatusImpl::OnOkay(wxCommandEvent& event)
+void SyncProgressDialog::Pimpl::OnOkay(wxCommandEvent& event)
{
Close(); //generate close event: do NOT destroy window unconditionally!
}
-void SyncStatus::SyncStatusImpl::OnAbort(wxCommandEvent& event)
+void SyncProgressDialog::Pimpl::OnAbort(wxCommandEvent& event)
{
paused_ = false;
updateDialogStatus(); //update status + pause button
@@ -1647,14 +1620,14 @@ void SyncStatus::SyncStatusImpl::OnAbort(wxCommandEvent& event)
}
-void SyncStatus::SyncStatusImpl::OnPause(wxCommandEvent& event)
+void SyncProgressDialog::Pimpl::OnPause(wxCommandEvent& event)
{
paused_ = !paused_;
updateDialogStatus(); //update status + pause button
}
-void SyncStatus::SyncStatusImpl::OnClose(wxCloseEvent& event)
+void SyncProgressDialog::Pimpl::OnClose(wxCloseEvent& event)
{
//this event handler may be called due to a system shutdown DURING synchronization!
//try to stop sync gracefully and cross fingers:
@@ -1667,7 +1640,7 @@ void SyncStatus::SyncStatusImpl::OnClose(wxCloseEvent& event)
}
-void SyncStatus::SyncStatusImpl::OnIconize(wxIconizeEvent& event)
+void SyncProgressDialog::Pimpl::OnIconize(wxIconizeEvent& event)
{
if (isZombie) return; //wxGTK sends iconize event *after* wxWindow::Destroy, sigh...
@@ -1678,18 +1651,18 @@ void SyncStatus::SyncStatusImpl::OnIconize(wxIconizeEvent& event)
}
-void SyncStatus::SyncStatusImpl::OnResumeFromTray(wxCommandEvent& event)
+void SyncProgressDialog::Pimpl::OnResumeFromTray(wxCommandEvent& event)
{
resumeFromSystray();
}
-void SyncStatus::SyncStatusImpl::minimizeToTray()
+void SyncProgressDialog::Pimpl::minimizeToTray()
{
if (!trayIcon.get())
{
trayIcon.reset(new FfsTrayIcon);
- trayIcon->Connect(FFS_REQUEST_RESUME_TRAY_EVENT, wxCommandEventHandler(SyncStatus::SyncStatusImpl::OnResumeFromTray), nullptr, this);
+ trayIcon->Connect(FFS_REQUEST_RESUME_TRAY_EVENT, wxCommandEventHandler(SyncProgressDialog::Pimpl::OnResumeFromTray), nullptr, this);
//tray icon has shorter lifetime than this => no need to disconnect event later
}
@@ -1702,7 +1675,7 @@ void SyncStatus::SyncStatusImpl::minimizeToTray()
}
-void SyncStatus::SyncStatusImpl::resumeFromSystray()
+void SyncProgressDialog::Pimpl::resumeFromSystray()
{
trayIcon.reset();
@@ -1730,14 +1703,14 @@ void SyncStatus::SyncStatusImpl::resumeFromSystray()
//redirect to implementation
-SyncStatus::SyncStatus(AbortCallback& abortCb,
- const Statistics& syncStat,
- MainDialog* parentWindow,
- bool showProgress,
- const wxString& jobName,
- const std::wstring& execWhenFinished,
- std::vector<std::wstring>& execFinishedHistory) :
- pimpl(new SyncStatusImpl(abortCb, syncStat, parentWindow, jobName, execWhenFinished, execFinishedHistory))
+SyncProgressDialog::SyncProgressDialog(AbortCallback& abortCb,
+ const Statistics& syncStat,
+ MainDialog* parentWindow,
+ bool showProgress,
+ const wxString& jobName,
+ const std::wstring& execWhenFinished,
+ std::vector<std::wstring>& execFinishedHistory) :
+ pimpl(new Pimpl(abortCb, syncStat, parentWindow, jobName, execWhenFinished, execFinishedHistory))
{
if (showProgress)
{
@@ -1748,52 +1721,52 @@ SyncStatus::SyncStatus(AbortCallback& abortCb,
pimpl->minimizeToTray();
}
-SyncStatus::~SyncStatus()
+SyncProgressDialog::~SyncProgressDialog()
{
//DON'T delete pimpl! it will be deleted by the user clicking "OK/Cancel" -> (wxWindow::Destroy())
}
-wxWindow* SyncStatus::getAsWindow()
+wxWindow* SyncProgressDialog::getAsWindow()
{
return pimpl;
}
-void SyncStatus::initNewPhase()
+void SyncProgressDialog::initNewPhase()
{
pimpl->initNewPhase();
}
-void SyncStatus::notifyProgressChange()
+void SyncProgressDialog::notifyProgressChange()
{
pimpl->notifyProgressChange();
}
-void SyncStatus::updateGui()
+void SyncProgressDialog::updateGui()
{
pimpl->updateGui();
}
-std::wstring SyncStatus::getExecWhenFinishedCommand() const
+std::wstring SyncProgressDialog::getExecWhenFinishedCommand() const
{
return pimpl->getExecWhenFinishedCommand();
}
-void SyncStatus::stopTimer()
+void SyncProgressDialog::stopTimer()
{
return pimpl->stopTimer();
}
-void SyncStatus::resumeTimer()
+void SyncProgressDialog::resumeTimer()
{
return pimpl->resumeTimer();
}
-void SyncStatus::processHasFinished(SyncResult resultId, const ErrorLog& log)
+void SyncProgressDialog::processHasFinished(SyncResult resultId, const ErrorLog& log)
{
pimpl->processHasFinished(resultId, log);
}
-void SyncStatus::closeWindowDirectly() //don't wait for user (silent mode)
+void SyncProgressDialog::closeWindowDirectly() //don't wait for user (silent mode)
{
pimpl->closeWindowDirectly();
}
diff --git a/ui/progress_indicator.h b/ui/progress_indicator.h
index e4995824..d659af6e 100644
--- a/ui/progress_indicator.h
+++ b/ui/progress_indicator.h
@@ -14,10 +14,10 @@
#include "main_dlg.h"
-class CompareStatus
+class CompareProgressDialog
{
public:
- CompareStatus(wxTopLevelWindow& parentWindow); //CompareStatus will be owned by parentWindow!
+ CompareProgressDialog(wxTopLevelWindow& parentWindow); //CompareProgressDialog will be owned by parentWindow!
wxWindow* getAsWindow(); //convenience! don't abuse!
@@ -28,22 +28,22 @@ public:
void updateStatusPanelNow();
private:
- class CompareStatusImpl;
- CompareStatusImpl* const pimpl;
+ class Pimpl;
+ Pimpl* const pimpl;
};
-class SyncStatus
+class SyncProgressDialog
{
public:
- SyncStatus(zen::AbortCallback& abortCb,
- const zen::Statistics& syncStat,
- MainDialog* parentWindow, //may be nullptr
- bool showProgress,
- const wxString& jobName,
- const std::wstring& execWhenFinished,
- std::vector<std::wstring>& execFinishedHistory); //changing parameter!
- ~SyncStatus();
+ SyncProgressDialog(zen::AbortCallback& abortCb,
+ const zen::Statistics& syncStat,
+ MainDialog* parentWindow, //may be nullptr
+ bool showProgress,
+ const wxString& jobName,
+ const std::wstring& execWhenFinished,
+ std::vector<std::wstring>& execFinishedHistory); //changing parameter!
+ ~SyncProgressDialog();
wxWindow* getAsWindow(); //convenience! don't abuse!
@@ -70,18 +70,18 @@ public:
void closeWindowDirectly(); //don't wait for user
private:
- class SyncStatusImpl;
- SyncStatusImpl* const pimpl;
+ class Pimpl;
+ Pimpl* const pimpl;
};
class PauseTimers
{
public:
- PauseTimers(SyncStatus& ss) : ss_(ss) { ss_.stopTimer(); }
+ PauseTimers(SyncProgressDialog& ss) : ss_(ss) { ss_.stopTimer(); }
~PauseTimers() { ss_.resumeTimer(); }
private:
- SyncStatus& ss_;
+ SyncProgressDialog& ss_;
};
diff --git a/ui/search.cpp b/ui/search.cpp
index be384f74..444356d1 100644
--- a/ui/search.cpp
+++ b/ui/search.cpp
@@ -105,7 +105,6 @@ private:
//###########################################################################################
-
template <bool respectCase>
ptrdiff_t findRow(const Grid& grid, //return -1 if no matching row found
const wxString& searchString,
diff --git a/ui/small_dlgs.cpp b/ui/small_dlgs.cpp
index 0193f1e9..7ecb8013 100644
--- a/ui/small_dlgs.cpp
+++ b/ui/small_dlgs.cpp
@@ -6,7 +6,6 @@
#include "small_dlgs.h"
#include <wx/wupdlock.h>
-//#include <wx/msgdlg.h>
#include <zen/format_unit.h>
#include <zen/build_info.h>
#include <zen/stl_tools.h>
@@ -16,6 +15,7 @@
#include <wx+/no_flicker.h>
#include <wx+/mouse_move_dlg.h>
#include <wx+/image_tools.h>
+#include <wx+/font_size.h>
#include "gui_generated.h"
#include "msg_popup.h"
#include "custom_grid.h"
@@ -42,6 +42,8 @@ private:
AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
{
+ setRelativeFontSize(*m_hyperlinkDonate, 1.25);
+
m_bitmap9 ->SetBitmap(GlobalResources::getImage(L"website"));
m_bitmap10->SetBitmap(GlobalResources::getImage(L"email"));
m_bitmap13->SetBitmap(GlobalResources::getImage(L"gpl"));
@@ -60,13 +62,11 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
//language name
wxStaticText* staticTextLanguage = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, it->languageName, wxDefaultPosition, wxDefaultSize, 0 );
staticTextLanguage->Wrap(-1);
- staticTextLanguage->SetForegroundColour(*wxBLACK); //accessibility: always set both foreground AND background colors!
fgSizerTranslators->Add(staticTextLanguage, 0, wxALIGN_CENTER_VERTICAL);
//translator name
wxStaticText* staticTextTranslator = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, it->translatorName, wxDefaultPosition, wxDefaultSize, 0 );
staticTextTranslator->Wrap(-1);
- staticTextTranslator->SetForegroundColour(*wxBLACK); //accessibility: always set both foreground AND background colors!
fgSizerTranslators->Add(staticTextTranslator, 0, wxALIGN_CENTER_VERTICAL);
}
@@ -105,16 +105,17 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
wxBitmap bmpLogo;
{
wxImage tmp = GlobalResources::getImage(L"logo").ConvertToImage();
- tmp.Resize(wxSize(m_panelLogo->GetClientSize().GetWidth(), tmp.GetHeight()), wxPoint(0, 0), 255, 255, 255); //enlarge to fit full width
+ tmp.Resize(wxSize(GetClientSize().GetWidth(), tmp.GetHeight()), wxPoint(0, 0), 255, 255, 255); //enlarge to fit full width
bmpLogo = wxBitmap(tmp);
}
+
{
wxMemoryDC dc(bmpLogo);
- dc.SetTextForeground(*wxBLACK);
- dc.SetFont(wxFont(18, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, L"Tahoma"));
+ dc.SetTextForeground(wxColor(2, 2, 2)); //for some unknown reason SetBitmap below seems to replace wxBLACK with white on accessibility high contrast schemes!!
+ dc.SetFont(wxFont(wxNORMAL_FONT->GetPointSize() * 1.8, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, L"Tahoma"));
dc.DrawLabel(wxString(L"FreeFileSync ") + zen::currentVersion, wxNullBitmap, wxRect(0, 0, bmpLogo.GetWidth(), bmpLogo.GetHeight()), wxALIGN_CENTER);
}
- m_bitmap11->SetBitmap(bmpLogo);
+ m_bitmapLogo->SetBitmap(bmpLogo);
Fit(); //child-element widths have changed: image was set
@@ -127,8 +128,8 @@ void zen::showAboutDialog(wxWindow* parent)
AboutDlg aboutDlg(parent);
aboutDlg.ShowModal();
}
-//########################################################################################
+//########################################################################################
class FilterDlg : public FilterDlgGenerated
{
@@ -141,7 +142,7 @@ public:
private:
void OnClose ( wxCloseEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); }
void OnCancel (wxCommandEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); }
- void OnHelp (wxCommandEvent& event) { displayHelpEntry(L"html/Exclude Items.html"); }
+ void OnHelp (wxCommandEvent& event) { displayHelpEntry(L"html/Exclude Items.html", this); }
void OnDefault (wxCommandEvent& event);
void OnApply (wxCommandEvent& event);
void OnUpdateChoice(wxCommandEvent& event) { updateGui(); }
@@ -171,6 +172,8 @@ FilterDlg::FilterDlg(wxWindow* parent,
new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
+ setRelativeFontSize(*m_staticTextHeader, 1.25);
+
m_textCtrlInclude->SetMaxLength(0); //allow large filter entries!
m_textCtrlExclude->SetMaxLength(0); //
@@ -204,7 +207,7 @@ FilterDlg::FilterDlg(wxWindow* parent,
// else
// m_staticTexHeader->SetLabel("Filter single folder pair"));
//
- m_staticTexHeader->SetLabel(_("Filter"));
+ m_staticTextHeader->SetLabel(_("Filter"));
Fit(); //child-element widths have changed: image was set
m_panelHeader->Layout();
@@ -262,8 +265,8 @@ void FilterDlg::updateGui()
void FilterDlg::setFilter(const FilterConfig& filter)
{
- m_textCtrlInclude->ChangeValue(toWx(filter.includeFilter));
- m_textCtrlExclude->ChangeValue(toWx(filter.excludeFilter));
+ m_textCtrlInclude->ChangeValue(utfCvrtTo<wxString>(filter.includeFilter));
+ m_textCtrlExclude->ChangeValue(utfCvrtTo<wxString>(filter.excludeFilter));
setEnumVal(enumTimeDescr, *m_choiceUnitTimespan, filter.unitTimeSpan);
setEnumVal(enumSizeDescr, *m_choiceUnitMinSize, filter.unitSizeMin);
@@ -279,8 +282,8 @@ void FilterDlg::setFilter(const FilterConfig& filter)
FilterConfig FilterDlg::getFilter() const
{
- return FilterConfig(toZ(m_textCtrlInclude->GetValue()),
- toZ(m_textCtrlExclude->GetValue()),
+ return FilterConfig(utfCvrtTo<Zstring>(m_textCtrlInclude->GetValue()),
+ utfCvrtTo<Zstring>(m_textCtrlExclude->GetValue()),
m_spinCtrlTimespan->GetValue(),
getEnumVal(enumTimeDescr, *m_choiceUnitTimespan),
m_spinCtrlMinSize->GetValue(),
@@ -396,13 +399,13 @@ void DeleteDialog::updateGui()
{
header = _P("Do you really want to move the following object to the Recycle Bin?",
"Do you really want to move the following %x objects to the Recycle Bin?", delInfo.second);
- m_bitmap12->SetBitmap(GlobalResources::getImage(L"recycler"));
+ m_bitmapDeleteType->SetBitmap(GlobalResources::getImage(L"recycler"));
}
else
{
header = _P("Do you really want to delete the following object?",
"Do you really want to delete the following %x objects?", delInfo.second);
- m_bitmap12->SetBitmap(GlobalResources::getImage(L"deleteFile"));
+ m_bitmapDeleteType->SetBitmap(GlobalResources::getImage(L"deleteFile"));
}
replace(header, L"%x", toGuiString(delInfo.second));
m_staticTextHeader->SetLabel(header);
@@ -478,7 +481,10 @@ SyncPreviewDlg::SyncPreviewDlg(wxWindow* parent,
new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
+ setRelativeFontSize(*m_buttonStartSync, 1.5);
+ m_buttonStartSync->setInnerBorderSize(8);
m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"sync"), 5);
+
m_staticTextVariant->SetLabel(variantName);
m_checkBoxDontShowAgain->SetValue(dontShowAgain);
@@ -543,7 +549,7 @@ private:
void OnOkay(wxCommandEvent& event);
void OnClose (wxCloseEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); }
void OnCancel(wxCommandEvent& event) { EndModal(ReturnSmallDlg::BUTTON_CANCEL); }
- void OnShowHelp(wxCommandEvent& event) { displayHelpEntry(L"html/Comparison Settings.html"); }
+ void OnShowHelp(wxCommandEvent& event) { displayHelpEntry(L"html/Comparison Settings.html", this); }
void OnTimeSize(wxCommandEvent& event) { compareVar = CMP_BY_TIME_SIZE; updateGui(); }
void OnContent (wxCommandEvent& event) { compareVar = CMP_BY_CONTENT; updateGui(); }
@@ -569,6 +575,9 @@ CompareCfgDialog::CompareCfgDialog(wxWindow* parent,
#ifdef FFS_WIN
new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
+ setRelativeFontSize(*m_toggleBtnTimeSize, 1.25);
+ setRelativeFontSize(*m_toggleBtnContent, 1.25);
+
m_bpButtonHelp->SetBitmapLabel(GlobalResources::getImage(L"help"));
enumDescrHandleSyml.
@@ -677,6 +686,8 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* parent, xmlAccess::XmlGlobalSetti
new zen::MouseMoveWindow(*this); //allow moving dialog by clicking (nearly) anywhere...; ownership passed to "this"
#endif
+ setRelativeFontSize(*m_staticTextHeader, 1.25);
+
m_bitmapSettings ->SetBitmap (GlobalResources::getImage(L"settings"));
m_buttonResetDialogs->setBitmapFront(GlobalResources::getImage(L"warningSmall"), 5);
m_bpButtonAddRow ->SetBitmapLabel(GlobalResources::getImage(L"item_add"));
@@ -688,7 +699,7 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* parent, xmlAccess::XmlGlobalSetti
#ifdef FFS_WIN
m_checkBoxCopyPermissions->SetLabel(_("Copy NTFS permissions"));
-#else
+#elif defined FFS_LINUX || defined FFS_MAC
m_checkBoxCopyLocked->Hide();
m_staticTextCopyLocked->Hide();
#endif
@@ -891,10 +902,10 @@ SelectTimespanDlg::SelectTimespanDlg(wxWindow* parent, Int64& timeFrom, Int64& t
#ifdef FFS_WIN
DWORD firstDayOfWeek = 0;
- if (::GetLocaleInfo(LOCALE_USER_DEFAULT, //__in LCID Locale,
- LOCALE_IFIRSTDAYOFWEEK | // first day of week specifier, 0-6, 0=Monday, 6=Sunday
- LOCALE_RETURN_NUMBER, //__in LCTYPE LCType,
- reinterpret_cast<LPTSTR>(&firstDayOfWeek), //__out LPTSTR lpLCData,
+ if (::GetLocaleInfo(LOCALE_USER_DEFAULT, //__in LCID Locale,
+ LOCALE_IFIRSTDAYOFWEEK | // first day of week specifier, 0-6, 0=Monday, 6=Sunday
+ LOCALE_RETURN_NUMBER, //__in LCTYPE LCType,
+ reinterpret_cast<LPTSTR>(&firstDayOfWeek), //__out LPTSTR lpLCData,
sizeof(firstDayOfWeek) / sizeof(TCHAR)) > 0 && //__in int cchData
firstDayOfWeek == 6)
style |= wxCAL_SUNDAY_FIRST;
diff --git a/ui/sync_cfg.cpp b/ui/sync_cfg.cpp
index 3894eb24..83743e0d 100644
--- a/ui/sync_cfg.cpp
+++ b/ui/sync_cfg.cpp
@@ -13,6 +13,7 @@
#include <wx+/no_flicker.h>
#include <wx+/choice_enum.h>
#include <wx+/image_tools.h>
+#include <wx+/font_size.h>
#include "gui_generated.h"
#include "exec_finished_box.h"
#include "dir_name.h"
@@ -228,6 +229,13 @@ SyncCfgDialog::SyncCfgDialog(wxWindow* parent,
m_bitmapConflict ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"conflict" ))));
m_bitmapDatabase ->SetBitmap(GlobalResources::getImage(L"database"));
+ setRelativeFontSize(*m_toggleBtnAutomatic, 1.25);
+ setRelativeFontSize(*m_toggleBtnMirror, 1.25);
+ setRelativeFontSize(*m_toggleBtnUpdate, 1.25);
+ setRelativeFontSize(*m_toggleBtnCustom, 1.25);
+ setRelativeFontSize(*m_staticTextHeaderCategory, 0.90);
+ setRelativeFontSize(*m_staticTextHeaderAction, 0.90);
+
enumVersioningStyle.
add(VER_STYLE_ADD_TIMESTAMP, _("Versioning"), _("Append a timestamp to each file name")).
add(VER_STYLE_REPLACE, _("Replace"), _("Move files and replace if existing"));
diff --git a/ui/taskbar.cpp b/ui/taskbar.cpp
index 311a7bee..8613643e 100644
--- a/ui/taskbar.cpp
+++ b/ui/taskbar.cpp
@@ -3,18 +3,21 @@
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
-//
+
#include "taskbar.h"
#ifdef FFS_WIN
-#include <zen/win.h> //includes "windows.h"
#include <zen/dll.h>
-#include <zen/assert_static.h>
#include <zen/win_ver.h>
#include "Taskbar_Seven/taskbar.h"
#elif defined HAVE_UBUNTU_UNITY
#include <unity/unity/unity.h>
+
+#elif defined FFS_MAC
+#include <zen/basic_math.h>
+#include <zen/string_tools.h>
+#include "osx_dock.h"
#endif
using namespace zen;
@@ -39,16 +42,13 @@ public:
throw TaskbarNotAvailable();
}
- ~Pimpl() { setStatus(STATUS_NOPROGRESS); }
+ ~Pimpl() { setStatus_(assocWindow, tbseven::STATUS_NOPROGRESS); }
void setStatus(Status status)
{
TaskBarStatus tbSevenStatus = tbseven::STATUS_NORMAL;
switch (status)
{
- case Taskbar::STATUS_NOPROGRESS:
- tbSevenStatus = tbseven::STATUS_NOPROGRESS;
- break;
case Taskbar::STATUS_INDETERMINATE:
tbSevenStatus = tbseven::STATUS_INDETERMINATE;
break;
@@ -94,7 +94,7 @@ public:
throw TaskbarNotAvailable();
}
- ~Pimpl() { setStatus(STATUS_NOPROGRESS); } //it seems UnityLauncherEntry* does not need destruction
+ ~Pimpl() { setStatus(STATUS_INDETERMINATE); } //it seems UnityLauncherEntry* does not need destruction
void setStatus(Status status)
{
@@ -104,7 +104,6 @@ public:
unity_launcher_entry_set_urgent(tbEntry, true);
break;
- case Taskbar::STATUS_NOPROGRESS:
case Taskbar::STATUS_INDETERMINATE:
unity_launcher_entry_set_urgent(tbEntry, false);
unity_launcher_entry_set_progress_visible(tbEntry, false);
@@ -116,7 +115,7 @@ public:
break;
case Taskbar::STATUS_PAUSED:
- unity_launcher_entry_set_urgent (tbEntry, false);
+ unity_launcher_entry_set_urgent(tbEntry, false);
break;
}
}
@@ -130,20 +129,46 @@ private:
UnityLauncherEntry* tbEntry;
};
+#elif defined FFS_MAC
+class Taskbar::Pimpl
+{
+public:
+ Pimpl(const wxTopLevelWindow& window) {}
-#else //no taskbar support yet
+ ~Pimpl() { setDockText(""); }
+
+ void setStatus(Status status) {}
+
+ void setProgress(double fraction)
+ {
+ //no decimal places to make output less noisy
+ setDockText((numberTo<std::string>(numeric::round(fraction * 100.0)) + '%').c_str()); //no need to internationalize fraction!?
+ }
+
+private:
+ void setDockText(const char* str)
+ {
+ try
+ {
+ osx::dockIconSetText(str); //throw OsxError
+ }
+ catch (const osx::OsxError& e) { assert(false); }
+ }
+};
+
+
+#else //no taskbar support
class Taskbar::Pimpl
{
public:
Pimpl(const wxTopLevelWindow& window) { throw TaskbarNotAvailable(); }
void setStatus(Status status) {}
void setProgress(double fraction) {}
-
};
#endif
-
//########################################################################################################
+
Taskbar::Taskbar(const wxTopLevelWindow& window) : pimpl_(new Pimpl(window)) {} //throw TaskbarNotAvailable
Taskbar::~Taskbar() {}
diff --git a/ui/taskbar.h b/ui/taskbar.h
index 8fa48392..ad708794 100644
--- a/ui/taskbar.h
+++ b/ui/taskbar.h
@@ -32,7 +32,6 @@ public:
enum Status
{
- STATUS_NOPROGRESS,
STATUS_INDETERMINATE,
STATUS_NORMAL,
STATUS_ERROR,
diff --git a/ui/tray_icon.cpp b/ui/tray_icon.cpp
index e466a15b..fa7c810d 100644
--- a/ui/tray_icon.cpp
+++ b/ui/tray_icon.cpp
@@ -5,27 +5,19 @@
// **************************************************************************
#include "tray_icon.h"
-#include "../lib/resources.h"
-#include "small_dlgs.h"
+#include <zen/basic_math.h>
#include <wx/taskbar.h>
-#include <cmath>
-#include <wx/image.h>
#include <wx/menu.h>
#include <wx/icon.h> //req. by Linux
#include <wx+/image_tools.h>
+#include "small_dlgs.h"
+#include "../lib/resources.h"
const wxEventType FFS_REQUEST_RESUME_TRAY_EVENT = wxNewEventType();
-
namespace
{
-inline
-int roundNum(double d) //little rounding function
-{
- return static_cast<int>(d < 0 ? d - .5 : d + .5);
-}
-
void fillRange(wxImage& img, int pixelFirst, int pixelLast, const wxColor& col)
{
const int pixelCount = img.GetWidth() >= 0 ? img.GetWidth() * img.GetHeight() : -1;
@@ -47,26 +39,20 @@ void fillRange(wxImage& img, int pixelFirst, int pixelLast, const wxColor& col)
}
}
-wxIcon generateIcon(double fraction) //generate icon with progress indicator
+wxIcon generateProgressIcon(const wxImage& logo, double fraction) //generate icon with progress indicator
{
-#ifdef FFS_WIN
- static const wxBitmap trayIcon = GlobalResources::getImage(wxT("FFS_tray_win.png"));
-#elif defined FFS_LINUX
- static const wxBitmap trayIcon = GlobalResources::getImage(wxT("FFS_tray_linux.png"));
-#endif
-
- const int pixelCount = trayIcon.GetWidth() * trayIcon.GetHeight();
- const int startFillPixel = std::min(roundNum(fraction * pixelCount), pixelCount);
+ const int pixelCount = logo.GetWidth() * logo.GetHeight();
+ const int startFillPixel = std::min(numeric::round(fraction * pixelCount), pixelCount);
//minor optimization
static std::pair<int, wxIcon> buffer = std::make_pair(-1, wxNullIcon);
if (buffer.first == startFillPixel)
return buffer.second;
- wxIcon genIcon;
+ wxIcon progIcon;
{
- wxImage genImage(trayIcon.ConvertToImage());
+ wxImage genImage(logo);
//gradually make FFS icon brighter while nearing completion
zen::brighten(genImage, -200 * (1 - fraction));
@@ -135,26 +121,24 @@ wxIcon generateIcon(double fraction) //generate icon with progress indicator
::memset(alpha + row * genImage.GetWidth() + indicatorXBegin, wxIMAGE_ALPHA_OPAQUE, indicatorWidth);
}
*/
- genIcon.CopyFromBitmap(wxBitmap(genImage));
+ progIcon.CopyFromBitmap(wxBitmap(genImage));
}
- else //fallback
- genIcon.CopyFromBitmap(trayIcon);
}
//fill buffer
buffer.first = startFillPixel;
- buffer.second = genIcon;
- return genIcon;
+ buffer.second = progIcon;
+ return progIcon;
}
-}
-
//------------------------------------------------------------------------------------------------
+
enum Selection
{
CONTEXT_RESTORE,
CONTEXT_ABOUT
};
+}
class FfsTrayIcon::TaskBarImpl : public wxTaskBarIcon
@@ -186,9 +170,14 @@ private:
FfsTrayIcon::FfsTrayIcon() :
trayIcon(new TaskBarImpl(*this)),
- fractionLast(1) //show FFS logo by default
+ fractionLast(1), //show FFS logo by default
+#if defined FFS_WIN || defined FFS_MAC //16x16 seems to be the only size that is shown correctly on OS X
+ logo(GlobalResources::getImage(L"FFS_tray_16x16").ConvertToImage())
+#elif defined FFS_LINUX
+ logo(GlobalResources::getImage(L"FFS_tray_24x24").ConvertToImage())
+#endif
{
- trayIcon->SetIcon(generateIcon(fractionLast), L"FreeFileSync");
+ trayIcon->SetIcon(generateProgressIcon(logo, fractionLast), L"FreeFileSync");
trayIcon->Connect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(FfsTrayIcon::OnDoubleClick), nullptr, this); //register double-click
}
@@ -208,14 +197,14 @@ FfsTrayIcon::~FfsTrayIcon()
void FfsTrayIcon::setToolTip(const wxString& toolTip)
{
toolTipLast = toolTip;
- trayIcon->SetIcon(generateIcon(fractionLast), toolTip); //another wxWidgets design bug: non-orthogonal method!
+ trayIcon->SetIcon(generateProgressIcon(logo, fractionLast), toolTip); //another wxWidgets design bug: non-orthogonal method!
}
void FfsTrayIcon::setProgress(double fraction)
{
fractionLast = fraction;
- trayIcon->SetIcon(generateIcon(fraction), toolTipLast);
+ trayIcon->SetIcon(generateProgressIcon(logo, fraction), toolTipLast);
}
diff --git a/ui/tray_icon.h b/ui/tray_icon.h
index 5ca94903..866d79d5 100644
--- a/ui/tray_icon.h
+++ b/ui/tray_icon.h
@@ -8,6 +8,7 @@
#define TRAYICON_H_INCLUDED
#include <wx/event.h>
+#include <wx/image.h>
//show tray icon with progress during lifetime of this instance
//emits the following wxCommandEvent in case user double-clicks on tray icon or selects corresponding context menu item:
@@ -34,6 +35,7 @@ private:
wxString toolTipLast;
double fractionLast;
+ wxImage logo;
};
#endif // TRAYICON_H_INCLUDED
diff --git a/ui/tree_view.cpp b/ui/tree_view.cpp
index 3025dbac..271fa90a 100644
--- a/ui/tree_view.cpp
+++ b/ui/tree_view.cpp
@@ -615,7 +615,7 @@ const wxColour COLOR_LEVEL9 (0xff, 0xff, 0xcc);
const wxColour COLOR_LEVEL10(0xcc, 0xcc, 0xcc);
const wxColour COLOR_LEVEL11(0xff, 0xcc, 0x99);
-const wxColour COLOR_PERCENTAGE_BORDER(198, 198, 198);
+const wxColour COLOR_PERCENTAGE_BORDER (198, 198, 198);
const wxColour COLOR_PERCENTAGE_BACKGROUND(0xf8, 0xf8, 0xf8);
//const wxColor COLOR_TREE_SELECTION_GRADIENT_FROM = wxColor( 89, 255, 99); //green: HSV: 88, 255, 172
@@ -623,6 +623,7 @@ const wxColour COLOR_PERCENTAGE_BACKGROUND(0xf8, 0xf8, 0xf8);
const wxColor COLOR_TREE_SELECTION_GRADIENT_FROM = getColorSelectionGradientFrom();
const wxColor COLOR_TREE_SELECTION_GRADIENT_TO = getColorSelectionGradientTo ();
+const int iconSizeSmall = IconBuffer::getSize(IconBuffer::SIZE_SMALL);
class GridDataNavi : private wxEvtHandler, public GridData
{
@@ -630,8 +631,8 @@ public:
GridDataNavi(Grid& grid, const std::shared_ptr<TreeView>& treeDataView) : treeDataView_(treeDataView),
fileIcon(IconBuffer(IconBuffer::SIZE_SMALL).genericFileIcon()),
dirIcon (IconBuffer(IconBuffer::SIZE_SMALL).genericDirIcon ()),
- rootBmp(GlobalResources::getImage(L"rootFolder").ConvertToImage().Scale(fileIcon.GetWidth(), fileIcon.GetHeight(), wxIMAGE_QUALITY_HIGH)),
- widthNodeIcon(dirIcon.GetWidth()),
+ rootBmp(GlobalResources::getImage(L"rootFolder").ConvertToImage().Scale(iconSizeSmall, iconSizeSmall, wxIMAGE_QUALITY_HIGH)),
+ widthNodeIcon(iconSizeSmall),
widthLevelStep(widthNodeIcon),
widthNodeStatus(GlobalResources::getImage(L"nodeExpanded").GetWidth()),
grid_(grid),
@@ -688,10 +689,10 @@ private:
wxRect rectInside = drawColumnLabelBorder(dc, rect);
drawColumnLabelBackground(dc, rectInside, highlighted);
- const int COLUMN_BORDER_LEFT = 4;
+ const int COLUMN_GAP_LEFT = 4;
- rectInside.x += COLUMN_BORDER_LEFT;
- rectInside.width -= COLUMN_BORDER_LEFT;
+ rectInside.x += COLUMN_GAP_LEFT;
+ rectInside.width -= COLUMN_GAP_LEFT;
drawColumnLabelText(dc, rectInside, getColumnLabel(colType));
if (treeDataView_) //draw sort marker
@@ -701,12 +702,12 @@ private:
{
const wxBitmap& marker = GlobalResources::getImage(sortInfo.second ? L"sortAscending" : L"sortDescending");
wxPoint markerBegin = rectInside.GetTopLeft() + wxPoint((rectInside.width - marker.GetWidth()) / 2, 0);
- dc.DrawBitmap(marker, markerBegin, true); //respect 2-pixel border
+ dc.DrawBitmap(marker, markerBegin, true); //respect 2-pixel gap
}
}
}
- static const int CELL_BORDER = 2;
+ static const int GAP_SIZE = 2;
virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, size_t row, bool enabled, bool selected, bool hasFocus)
{
@@ -728,9 +729,9 @@ private:
wxRect rectTmp = rect;
// Partitioning:
- // ___________________________________________________________________________________________
- // | space | border | percentage bar | 2 x border | node status | border |icon | border | rest |
- // --------------------------------------------------------------------------------------------
+ // ________________________________________________________________________________
+ // | space | gap | percentage bar | 2 x gap | node status | gap |icon | gap | rest |
+ // --------------------------------------------------------------------------------
// -> synchronize renderCell() <-> getBestSize() <-> onMouseLeft()
if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_DIRECTORY && treeDataView_)
@@ -739,17 +740,17 @@ private:
{
////clear first secion:
//clearArea(dc, wxRect(rect.GetTopLeft(), wxSize(
- // node->level_ * widthLevelStep + CELL_BORDER + //width
- // (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0) + //
- // widthNodeStatus + CELL_BORDER + widthNodeIcon + CELL_BORDER, //
+ // node->level_ * widthLevelStep + GAP_SIZE + //width
+ // (showPercentBar ? widthPercentBar + 2 * GAP_SIZE : 0) + //
+ // widthNodeStatus + GAP_SIZE + widthNodeIcon + GAP_SIZE, //
// rect.height)), wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
//consume space
rectTmp.x += static_cast<int>(node->level_) * widthLevelStep;
rectTmp.width -= static_cast<int>(node->level_) * widthLevelStep;
- rectTmp.x += CELL_BORDER;
- rectTmp.width -= CELL_BORDER;
+ rectTmp.x += GAP_SIZE;
+ rectTmp.width -= GAP_SIZE;
if (rectTmp.width > 0)
{
@@ -789,31 +790,26 @@ private:
const wxRect areaPerc(rectTmp.x, rectTmp.y + 2, widthPercentBar, rectTmp.height - 4);
{
- //background
- wxDCPenChanger dummy(dc, *wxTRANSPARENT_PEN);
+ //clear background
+ wxDCPenChanger dummy (dc, COLOR_PERCENTAGE_BORDER);
wxDCBrushChanger dummy2(dc, COLOR_PERCENTAGE_BACKGROUND);
dc.DrawRectangle(areaPerc);
//inner area
+ dc.SetPen (brushCol);
dc.SetBrush(brushCol);
wxRect areaPercTmp = areaPerc;
- areaPercTmp.width -= 2; //do not include left/right border
- areaPercTmp.x += 1; //
- areaPercTmp.width *= node->percent_ / 100.0;
+ areaPercTmp.Deflate(1); //do not include border
+ areaPercTmp.width = numeric::round(areaPercTmp.width * node->percent_ / 100.0);
dc.DrawRectangle(areaPercTmp);
-
- //outer border
- dc.SetPen(COLOR_PERCENTAGE_BORDER);
- dc.SetBrush(*wxTRANSPARENT_BRUSH);
- dc.DrawRectangle(areaPerc);
}
wxDCTextColourChanger dummy3(dc, *wxBLACK); //accessibility: always set both foreground AND background colors!
dc.DrawLabel(numberTo<wxString>(node->percent_) + L"%", areaPerc, wxALIGN_CENTER);
- rectTmp.x += widthPercentBar + 2 * CELL_BORDER;
- rectTmp.width -= widthPercentBar + 2 * CELL_BORDER;
+ rectTmp.x += widthPercentBar + 2 * GAP_SIZE;
+ rectTmp.width -= widthPercentBar + 2 * GAP_SIZE;
}
if (rectTmp.width > 0)
{
@@ -842,8 +838,8 @@ private:
break;
}
- rectTmp.x += widthNodeStatus + CELL_BORDER;
- rectTmp.width -= widthNodeStatus + CELL_BORDER;
+ rectTmp.x += widthNodeStatus + GAP_SIZE;
+ rectTmp.width -= widthNodeStatus + GAP_SIZE;
if (rectTmp.width > 0)
{
bool isActive = true;
@@ -871,8 +867,8 @@ private:
dc.Blit(rectTmp.x, rectTmp.y, widthNodeIcon, rectTmp.height, &memDc, 0, 0); //blit out
}
- rectTmp.x += widthNodeIcon + CELL_BORDER;
- rectTmp.width -= widthNodeIcon + CELL_BORDER;
+ rectTmp.x += widthNodeIcon + GAP_SIZE;
+ rectTmp.width -= widthNodeIcon + GAP_SIZE;
if (rectTmp.width > 0)
drawCellText(dc, rectTmp, getValue(row, colType), grid.IsEnabled(), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
@@ -888,13 +884,13 @@ private:
//have file size right-justified (but don't change for RTL languages)
if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_BYTES && grid.GetLayoutDirection() != wxLayout_RightToLeft)
{
- rectTmp.width -= 2 * CELL_BORDER;
+ rectTmp.width -= 2 * GAP_SIZE;
alignment = wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL;
}
else //left-justified
{
- rectTmp.x += 2 * CELL_BORDER;
- rectTmp.width -= 2 * CELL_BORDER;
+ rectTmp.x += 2 * GAP_SIZE;
+ rectTmp.width -= 2 * GAP_SIZE;
}
drawCellText(dc, rectTmp, getValue(row, colType), grid.IsEnabled(), alignment);
@@ -908,15 +904,15 @@ private:
if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_DIRECTORY && treeDataView_)
{
if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(row))
- return node->level_ * widthLevelStep + CELL_BORDER + (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0) + widthNodeStatus + CELL_BORDER
- + widthNodeIcon + CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth() +
- CELL_BORDER; //additional border from right
+ return node->level_ * widthLevelStep + GAP_SIZE + (showPercentBar ? widthPercentBar + 2 * GAP_SIZE : 0) + widthNodeStatus + GAP_SIZE
+ + widthNodeIcon + GAP_SIZE + dc.GetTextExtent(getValue(row, colType)).GetWidth() +
+ GAP_SIZE; //additional gap from right
else
return 0;
}
else
- return 2 * CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth() +
- 2 * CELL_BORDER; //include border from right!
+ return 2 * GAP_SIZE + dc.GetTextExtent(getValue(row, colType)).GetWidth() +
+ 2 * GAP_SIZE; //include gap from right!
}
virtual wxString getColumnLabel(ColumnType colType) const
@@ -944,7 +940,7 @@ private:
if (cellArea.width > 0 && cellArea.height > 0)
{
const int tolerance = 1;
- const int xNodeStatusFirst = -tolerance + cellArea.x + static_cast<int>(node->level_) * widthLevelStep + CELL_BORDER + (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0);
+ const int xNodeStatusFirst = -tolerance + cellArea.x + static_cast<int>(node->level_) * widthLevelStep + GAP_SIZE + (showPercentBar ? widthPercentBar + 2 * GAP_SIZE : 0);
const int xNodeStatusLast = (xNodeStatusFirst + tolerance) + widthNodeStatus + tolerance;
// -> synchronize renderCell() <-> getBestSize() <-> onMouseLeft()
@@ -1142,7 +1138,7 @@ void treeview::init(Grid& grid, const std::shared_ptr<TreeView>& treeDataView)
grid.setDataProvider(std::make_shared<GridDataNavi>(grid, treeDataView));
grid.showRowLabel(false);
- const int rowHeight = std::max(IconBuffer(IconBuffer::SIZE_SMALL).getSize(), grid.getMainWin().GetCharHeight()) + 1; //add some space
+ const int rowHeight = std::max(IconBuffer::getSize(IconBuffer::SIZE_SMALL), grid.getMainWin().GetCharHeight()) + 1; //add some space
grid.setRowHeight(rowHeight);
}
diff --git a/ui/triple_splitter.cpp b/ui/triple_splitter.cpp
index f6ef006d..65c39337 100644
--- a/ui/triple_splitter.cpp
+++ b/ui/triple_splitter.cpp
@@ -49,6 +49,8 @@ TripleSplitter::TripleSplitter(wxWindow* parent,
Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(TripleSplitter::onMouseLeftDouble), nullptr, this);
}
+TripleSplitter::~TripleSplitter() {} //make sure correct destructor gets created for std::unique_ptr<SashMove>
+
void TripleSplitter::updateWindowSizes()
{
diff --git a/ui/triple_splitter.h b/ui/triple_splitter.h
index 5b389e5b..0577dabf 100644
--- a/ui/triple_splitter.h
+++ b/ui/triple_splitter.h
@@ -36,6 +36,8 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0);
+ ~TripleSplitter();
+
void setupWindows(wxWindow* winL, wxWindow* winC, wxWindow* winR)
{
assert(winL->GetParent() == this && winC->GetParent() == this && winR->GetParent() == this && !GetSizer());
diff --git a/ui/wx_form_build_hide_warnings.h b/ui/wx_form_build_hide_warnings.h
index 1edd5e4b..71f28340 100644
--- a/ui/wx_form_build_hide_warnings.h
+++ b/ui/wx_form_build_hide_warnings.h
@@ -10,8 +10,10 @@
//pamper over wxFormBuilder "sub-optimal" code
#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-variable"
+#ifndef __clang__ //clang seems to define __GNUC__, but doesn't support this warning
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#endif
#elif defined _MSC_VER
#pragma warning(disable: 4189)
diff --git a/version/version.h b/version/version.h
index f5718e9d..87a9f882 100644
--- a/version/version.h
+++ b/version/version.h
@@ -3,7 +3,7 @@
namespace zen
{
-const wchar_t currentVersion[] = L"5.12"; //internal linkage!
+const wchar_t currentVersion[] = L"5.13"; //internal linkage!
}
#endif
diff --git a/version/version.rc b/version/version.rc
deleted file mode 100644
index c5196a6f..00000000
--- a/version/version.rc
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FREEFILESYNC_VER 5,12,0,0
-#define FREEFILESYNC_VER_STR "5.12\0"
diff --git a/wx+/button.cpp b/wx+/button.cpp
index a67624b8..75e4bfe1 100644
--- a/wx+/button.cpp
+++ b/wx+/button.cpp
@@ -32,41 +32,40 @@ BitmapButton::BitmapButton(wxWindow* parent,
const wxValidator& validator,
const wxString& name) :
wxBitmapButton(parent, id, wxNullBitmap, pos, size, style | wxBU_AUTODRAW, validator, name),
- m_spaceAfter(0),
- m_spaceBefore(0)
+ spaceAfter_(0),
+ spaceBefore_(0),
+ innerBorderSize(5)
{
- setTextLabel(label);
+ SetLabel(label);
}
-void BitmapButton::setBitmapFront(const wxBitmap& bitmap, size_t spaceAfter)
+void BitmapButton::setBitmapFront(const wxBitmap& bitmap, int spaceAfter)
{
- if (!isEqual(bitmap, bitmapFront) || spaceAfter != m_spaceAfter) //avoid flicker
+ if (!isEqual(bitmap, bitmapFront) || spaceAfter_ != spaceAfter) //avoid flicker
{
bitmapFront = bitmap;
- m_spaceAfter = static_cast<unsigned int>(spaceAfter);
+ spaceAfter_ = spaceAfter;
refreshButtonLabel();
}
}
-void BitmapButton::setTextLabel(const wxString& text)
+void BitmapButton::SetLabel(const wxString& label)
{
- if (text != textLabel) //avoid flicker
+ if (wxBitmapButton::GetLabel() != label) //avoid flicker
{
- textLabel = text;
- wxBitmapButton::SetLabel(text);
+ wxBitmapButton::SetLabel(label);
refreshButtonLabel();
}
}
-
-void BitmapButton::setBitmapBack(const wxBitmap& bitmap, size_t spaceBefore)
+void BitmapButton::setBitmapBack(const wxBitmap& bitmap, int spaceBefore)
{
- if (!isEqual(bitmap, bitmapBack) || spaceBefore != m_spaceBefore) //avoid flicker
+ if (!isEqual(bitmap, bitmapBack) || spaceBefore_ != spaceBefore) //avoid flicker
{
bitmapBack = bitmap;
- m_spaceBefore = static_cast<unsigned int>(spaceBefore);
+ spaceBefore_ = spaceBefore;
refreshButtonLabel();
}
}
@@ -136,9 +135,9 @@ wxBitmap BitmapButton::createBitmapFromText(const wxString& text)
//find position of accelerator
int indexAccel = -1;
- size_t accelPos;
wxString textLabelFormatted = text;
- if ((accelPos = text.find(wxT("&"))) != wxString::npos)
+ size_t accelPos = text.find(L"&");
+ if (accelPos != wxString::npos)
{
replace(textLabelFormatted, L"&", L"", false); //remove accelerator
indexAccel = static_cast<int>(accelPos);
@@ -232,8 +231,7 @@ void writeToImage(const wxImage& source, const wxPoint& pos, wxImage& target)
if (!target.HasAlpha())
{
target.SetAlpha();
- unsigned char* alpha = target.GetAlpha();
- memset(alpha, wxIMAGE_ALPHA_OPAQUE, target.GetWidth() * target.GetHeight());
+ memset(target.GetAlpha(), wxIMAGE_ALPHA_OPAQUE, target.GetWidth() * target.GetHeight());
}
//copy alpha channel
@@ -275,7 +273,7 @@ wxSize getSize(const wxBitmap& bmp)
void BitmapButton::refreshButtonLabel()
{
- wxBitmap bitmapText = createBitmapFromText(textLabel);
+ wxBitmap bitmapText = createBitmapFromText(GetLabel());
wxSize szFront = getSize(bitmapFront); //
wxSize szText = getSize(bitmapText); //make sure to NOT access null-bitmaps!
@@ -283,7 +281,7 @@ void BitmapButton::refreshButtonLabel()
//calculate dimensions of new button
const int height = std::max(std::max(szFront.GetHeight(), szText.GetHeight()), szBack.GetHeight());
- const int width = szFront.GetWidth() + m_spaceAfter + szText.GetWidth() + m_spaceBefore + szBack.GetWidth();
+ const int width = szFront.GetWidth() + spaceAfter_ + szText.GetWidth() + spaceBefore_ + szBack.GetWidth();
//create a transparent image
wxImage transparentImage(width, height, false);
@@ -299,19 +297,19 @@ void BitmapButton::refreshButtonLabel()
if (bitmapText.IsOk())
writeToImage(bitmapText.ConvertToImage(),
- wxPoint(szFront.GetWidth() + m_spaceAfter, (transparentImage.GetHeight() - bitmapText.GetHeight()) / 2),
+ wxPoint(szFront.GetWidth() + spaceAfter_, (transparentImage.GetHeight() - bitmapText.GetHeight()) / 2),
transparentImage);
if (bitmapBack.IsOk())
writeToImage(bitmapBack.ConvertToImage(),
- wxPoint(szFront.GetWidth() + m_spaceAfter + szText.GetWidth() + m_spaceBefore, (transparentImage.GetHeight() - bitmapBack.GetHeight()) / 2),
+ wxPoint(szFront.GetWidth() + spaceAfter_ + szText.GetWidth() + spaceBefore_, (transparentImage.GetHeight() - bitmapBack.GetHeight()) / 2),
transparentImage);
//adjust button size
wxSize minSize = GetMinSize();
//SetMinSize() instead of SetSize() is needed here for wxWindows layout determination to work corretly
- wxBitmapButton::SetMinSize(wxSize(std::max(width + 10, minSize.GetWidth()), std::max(height + 5, minSize.GetHeight())));
+ wxBitmapButton::SetMinSize(wxSize(std::max(width + 2 * innerBorderSize, minSize.GetWidth()), std::max(height + 2 * innerBorderSize, minSize.GetHeight())));
//finally set bitmap
wxBitmapButton::SetBitmapLabel(wxBitmap(transparentImage));
diff --git a/wx+/button.h b/wx+/button.h
index 5a704840..42174a44 100644
--- a/wx+/button.h
+++ b/wx+/button.h
@@ -24,19 +24,25 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
- void setBitmapFront(const wxBitmap& bitmap, size_t spaceAfter = 0); //...and enlarge button if required!
- void setTextLabel( const wxString& text);
- void setBitmapBack( const wxBitmap& bitmap, size_t spaceBefore = 0); //
+ void setBitmapFront(const wxBitmap& bitmap, int spaceAfter = 0); //...and enlarge button if required!
+ void setBitmapBack (const wxBitmap& bitmap, int spaceBefore = 0); //
+
+ void setInnerBorderSize(int sz) { innerBorderSize = sz; refreshButtonLabel(); }
+
+ virtual void SetLabel(const wxString& label);
+
+ void refreshButtonLabel(); //e.g. after font change
private:
wxBitmap createBitmapFromText(const wxString& text);
- void refreshButtonLabel();
wxBitmap bitmapFront;
- unsigned int m_spaceAfter;
- wxString textLabel;
- unsigned int m_spaceBefore;
+ int spaceAfter_;
+ ///wxString textLabel;
+ int spaceBefore_;
wxBitmap bitmapBack;
+
+ int innerBorderSize;
};
//set bitmap label flicker free!
diff --git a/wx+/font_size.h b/wx+/font_size.h
new file mode 100644
index 00000000..773be928
--- /dev/null
+++ b/wx+/font_size.h
@@ -0,0 +1,25 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef FONT_SIZE_HEADER_23849632846734343234532
+#define FONT_SIZE_HEADER_23849632846734343234532
+
+#include <zen/basic_math.h>
+#include <wx/window.h>
+
+namespace zen
+{
+//set portable font size in multiples of the operating system's default font size
+inline
+void setRelativeFontSize(wxWindow& control, double factor)
+{
+ wxFont fnt = control.GetFont();
+ fnt.SetPointSize(numeric::round(wxNORMAL_FONT->GetPointSize() * factor));
+ control.SetFont(fnt);
+};
+}
+
+#endif //FONT_SIZE_HEADER_23849632846734343234532
diff --git a/wx+/graph.cpp b/wx+/graph.cpp
index a32c8e22..540f86a5 100644
--- a/wx+/graph.cpp
+++ b/wx+/graph.cpp
@@ -13,7 +13,6 @@
#include "rtl.h"
using namespace zen;
-using namespace numeric;
//todo: support zoom via mouse wheel
@@ -22,12 +21,6 @@ const wxEventType zen::wxEVT_GRAPH_SELECTION = wxNewEventType();
const std::shared_ptr<LabelFormatter> Graph2D::MainAttributes::defaultFormat = std::make_shared<DecimalNumberFormatter>(); //for some buggy reason MSVC isn't able to use a temporary as a default argument
-namespace
-{
-inline
-double bestFit(double val, double low, double high) { return val < (high + low) / 2 ? low : high; }
-}
-
double zen::nextNiceNumber(double blockSize) //round to next number which is a convenient to read block size
{
@@ -36,24 +29,14 @@ double zen::nextNiceNumber(double blockSize) //round to next number which is a c
const double k = std::floor(std::log10(blockSize));
const double e = std::pow(10, k);
- if (isNull(e))
+ if (numeric::isNull(e))
return 0;
const double a = blockSize / e; //blockSize = a * 10^k with a in (1, 10)
+ assert(1 < a && a < 10);
//have a look at leading two digits: "nice" numbers start with 1, 2, 2.5 and 5
- if (a <= 2)
- return bestFit(a, 1, 2) * e;
- else if (a <= 2.5)
- return bestFit(a, 2, 2.5) * e;
- else if (a <= 5)
- return bestFit(a, 2.5, 5) * e;
- else if (a < 10)
- return bestFit(a, 5, 10) * e;
- else
- {
- assert(false);
- return 10 * e;
- }
+ const double steps[] = { 1, 2, 2.5, 5, 10 };
+ return e * numeric::nearMatch(a, std::begin(steps), std::end(steps));
}
@@ -95,7 +78,7 @@ public:
ConvertCoord(double valMin, double valMax, size_t screenSize) :
min_(valMin),
scaleToReal(screenSize == 0 ? 0 : (valMax - valMin) / screenSize),
- scaleToScr(isNull((valMax - valMin)) ? 0 : screenSize / (valMax - valMin)) {}
+ scaleToScr(numeric::isNull((valMax - valMin)) ? 0 : screenSize / (valMax - valMin)) {}
double screenToReal(double screenPos) const //input value: [0, screenSize - 1]
{
@@ -128,7 +111,7 @@ void widenRange(double& valMin, double& valMax, //in/out
{
double valRangePerBlock = (valMax - valMin) * optimalBlockSize / graphAreaSize; //proposal
valRangePerBlock = labelFmt.getOptimalBlockSize(valRangePerBlock);
- if (!isNull(valRangePerBlock))
+ if (!numeric::isNull(valRangePerBlock))
{
valMin = std::floor(valMin / valRangePerBlock) * valRangePerBlock;
valMax = std::ceil (valMax / valRangePerBlock) * valRangePerBlock;
@@ -319,6 +302,8 @@ struct CurveSamples
void Graph2D::render(wxDC& dc) const
{
+ using namespace numeric;
+
const wxRect clientRect = GetClientRect(); //DON'T use wxDC::GetSize()! DC may be larger than visible area!
{
//clear complete client area; set label background color
diff --git a/wx+/grid.cpp b/wx+/grid.cpp
index f6d0e6b8..4eb3b00e 100644
--- a/wx+/grid.cpp
+++ b/wx+/grid.cpp
@@ -291,7 +291,6 @@ void GridData::drawColumnLabelText(wxDC& dc, const wxRect& rect, const wxString&
CornerWin RowLabelWin ColLabelWin MainWin
*/
-
class Grid::SubWindow : public wxWindow
{
public:
@@ -323,6 +322,7 @@ public:
Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(SubWindow::onMouseRightUp ), nullptr, this);
Connect(wxEVT_MOTION, wxMouseEventHandler(SubWindow::onMouseMovement ), nullptr, this);
Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(SubWindow::onLeaveWindow ), nullptr, this);
+ Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(SubWindow::onMouseWheel ), nullptr, this);
Connect(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(SubWindow::onMouseCaptureLost), nullptr, this);
Connect(wxEVT_CHAR, wxKeyEventHandler(SubWindow::onChar ), nullptr, this);
@@ -331,7 +331,6 @@ public:
assert(GetClientAreaOrigin() == wxPoint()); //generally assumed when dealing with coordinates below
}
-
Grid& refParent() { return parent_; }
const Grid& refParent() const { return parent_; }
@@ -380,11 +379,26 @@ private:
virtual void onMouseMovement (wxMouseEvent& event) { event.Skip(); }
virtual void onLeaveWindow (wxMouseEvent& event) { event.Skip(); }
virtual void onMouseCaptureLost(wxMouseCaptureLostEvent& event) { event.Skip(); }
-
virtual void onChar (wxKeyEvent& event) { event.Skip(); }
virtual void onKeyUp (wxKeyEvent& event) { event.Skip(); }
virtual void onKeyDown(wxKeyEvent& event) { event.Skip(); }
+ void onMouseWheel(wxMouseEvent& event)
+ {
+ /*
+ MSDN, WM_MOUSEWHEEL: "Sent to the focus window when the mouse wheel is rotated.
+ The DefWindowProc function propagates the message to the window's parent.
+ There should be no internal forwarding of the message, since DefWindowProc propagates
+ it up the parent chain until it finds a window that processes it."
+
+ On OS X there is no such propagation! => we need a redirection (the same wxGrid implements)
+ */
+ if (wxEvtHandler* evtHandler = parent_.GetEventHandler())
+ if (evtHandler->ProcessEvent(event))
+ return;
+ event.Skip();
+ }
+
void onPaintEvent(wxPaintEvent& event)
{
//wxAutoBufferedPaintDC dc(this); -> this one happily fucks up for RTL layout by not drawing the first column (x = 0)!
@@ -515,8 +529,6 @@ private:
labelFont.SetWeight(wxFONTWEIGHT_BOLD);
dc.SetFont(labelFont);
- wxDCTextColourChanger dummy(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); //use user setting for labels
-
auto rowRange = getRowsOnClient(rect); //returns range [begin, end)
for (auto row = rowRange.first; row < rowRange.second; ++row)
{
@@ -838,7 +850,7 @@ private:
virtual void onLeaveWindow(wxMouseEvent& event)
{
- highlight.reset(); //onLeaveWindow() does not respect mouse capture! -> however highlight is drawn unconditionally during move/resize!
+ highlight.reset(); //wxEVT_LEAVE_WINDOW does not respect mouse capture! -> however highlight is drawn unconditionally during move/resize!
Refresh();
event.Skip();
}
@@ -1414,8 +1426,8 @@ private:
void onRequestWindowUpdate(wxEvent& event)
{
- ZEN_ON_SCOPE_EXIT(gridUpdatePending = false);
assert(gridUpdatePending);
+ ZEN_ON_SCOPE_EXIT(gridUpdatePending = false);
refParent().updateWindowSizes(false); //row label width has changed -> do *not* update scrollbars: recursion on wxGTK! -> still a problem, now that we're called async??
rowLabelWin_.Update(); //update while dragging scroll thumb
@@ -1732,16 +1744,30 @@ std::vector<Grid::ColumnAttribute> Grid::getColumnConfig(size_t compPos) const
void Grid::showScrollBars(Grid::ScrollBarStatus horizontal, Grid::ScrollBarStatus vertical)
{
-#if wxCHECK_VERSION(2, 9, 1)
- int weShouldMigrateToWxWidgetsShowScrollBarsInstead; //lousy compile-time warning, I know ;)
-#endif
-
if (showScrollbarX == horizontal &&
showScrollbarY == vertical) return; //support polling!
showScrollbarX = horizontal;
showScrollbarY = vertical;
+#if wxCHECK_VERSION(2, 9, 0)
+ auto mapStatus = [](ScrollBarStatus sbStatus) -> wxScrollbarVisibility
+ {
+ switch (sbStatus)
+ {
+ case SB_SHOW_AUTOMATIC:
+ return wxSHOW_SB_DEFAULT;
+ case SB_SHOW_ALWAYS:
+ return wxSHOW_SB_ALWAYS;
+ case SB_SHOW_NEVER:
+ return wxSHOW_SB_NEVER;
+ }
+ assert(false);
+ return wxSHOW_SB_DEFAULT;
+ };
+ ShowScrollbars(mapStatus(horizontal), mapStatus(vertical));
+#else //support older wxWidgets API
+
#ifdef FFS_LINUX //get rid of scrollbars, but preserve scrolling behavior!
//the following wxGTK approach is pretty much identical to wxWidgets 2.9 ShowScrollbars() code!
@@ -1765,12 +1791,15 @@ void Grid::showScrollBars(Grid::ScrollBarStatus horizontal, Grid::ScrollBarStatu
gtk_scrolled_window_set_policy(scrolledWindow,
mapStatus(horizontal),
mapStatus(vertical));
+#elif defined FFS_MAC
+#error function not implemented! Upgrade to wxWidgets 2.9 or newer
+#endif
#endif
+
updateWindowSizes();
}
-
-#ifdef FFS_WIN //get rid of scrollbars, but preserve scrolling behavior!
+#if defined FFS_WIN && !wxCHECK_VERSION(2, 9, 0) //support older wxWidgets API
void Grid::SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh)
{
ScrollBarStatus sbStatus = SB_SHOW_AUTOMATIC;
@@ -1799,8 +1828,9 @@ void Grid::SetScrollbar(int orientation, int position, int thumbSize, int range,
break;
}
}
+#endif
-
+#ifdef FFS_WIN //get rid of scrollbars, but preserve scrolling behavior!
#ifndef WM_MOUSEHWHEEL //MinGW is clueless...
#define WM_MOUSEHWHEEL 0x020E
#endif
diff --git a/wx+/grid.h b/wx+/grid.h
index 11317fd8..918b4a4f 100644
--- a/wx+/grid.h
+++ b/wx+/grid.h
@@ -202,9 +202,12 @@ private:
void redirectRowLabelEvent(wxMouseEvent& event);
+#if defined FFS_WIN && !wxCHECK_VERSION(2, 9, 0)
+ virtual void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh); //get rid of scrollbars, but preserve scrolling behavior!
+#endif
+
#ifdef FFS_WIN
virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); //support horizontal mouse wheel
- void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh); //get rid of scrollbars, but preserve scrolling behavior!
#endif
ptrdiff_t getBestColumnSize(size_t col, size_t compPos) const; //return -1 on error
diff --git a/wx+/shell_execute.h b/wx+/shell_execute.h
index 2531c91f..a07f40cb 100644
--- a/wx+/shell_execute.h
+++ b/wx+/shell_execute.h
@@ -7,6 +7,7 @@
#ifndef EXECUTE_HEADER_23482134578134134
#define EXECUTE_HEADER_23482134578134134
+#include <zen/zstring.h>
#include <wx/msgdlg.h>
#ifdef FFS_WIN
@@ -16,7 +17,7 @@
#include <zen/win.h> //includes "windows.h"
//#include <zen/scope_guard.h>
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <stdlib.h>
#include <wx/utils.h>
#include <wx/log.h>
@@ -82,7 +83,7 @@ void shellExecute(const Zstring& command, ExecutionType type = EXEC_TYPE_ASYNC)
::CloseHandle(execInfo.hProcess);
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
if (type == EXEC_TYPE_SYNC)
{
//Posix::system - execute a shell command
diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp
index 447cbb1f..3431e339 100644
--- a/wx+/tooltip.cpp
+++ b/wx+/tooltip.cpp
@@ -50,8 +50,8 @@ public:
Tooltip::Tooltip() : tipWindow(new PopupFrameGenerated(nullptr))
{
-#ifdef FFS_WIN //neither looks good nor works at all on Linux
- tipWindow->Disable(); //prevent window stealing focus!
+#if defined FFS_WIN //prevent window stealing focus!
+ tipWindow->Disable(); //neither looks good nor works at all on Linux; no visible difference on OS X
#endif
hide();
}
@@ -68,7 +68,10 @@ void Tooltip::show(const wxString& text, wxPoint mousePos, const wxBitmap* bmp)
const wxBitmap& newBmp = bmp ? *bmp : wxNullBitmap;
if (!isEqual(tipWindow->m_bitmapLeft->GetBitmap(), newBmp))
+ {
tipWindow->m_bitmapLeft->SetBitmap(newBmp);
+ tipWindow->Refresh(); //needed if bitmap size changed!
+ }
if (text != tipWindow->m_staticTextMain->GetLabel())
{
diff --git a/wx+/zlib_wrap.cpp b/wx+/zlib_wrap.cpp
index 6fad0383..cfa0f615 100644
--- a/wx+/zlib_wrap.cpp
+++ b/wx+/zlib_wrap.cpp
@@ -7,7 +7,7 @@
#include "zlib_wrap.h"
#ifdef FFS_WIN
#include <wx/../../src/zlib/zlib.h> //not really a "nice" place to look for a stable solution
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <zlib.h> //let's pray this is the same version wxWidgets is linking against!
#endif
diff --git a/zen/basic_math.h b/zen/basic_math.h
index d83a7f77..89d9d6c0 100644
--- a/zen/basic_math.h
+++ b/zen/basic_math.h
@@ -10,6 +10,7 @@
#include <algorithm>
#include <iterator>
#include <limits>
+#include <cmath>
#include <functional>
#include <cassert>
@@ -40,6 +41,9 @@ std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, Input
template <class InputIterator, class Compare>
std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, InputIterator last, Compare comp);
+template <class T, class InputIterator> //precondition: range must be sorted!
+auto nearMatch(const T& val, InputIterator first, InputIterator last) -> typename std::iterator_traits<InputIterator>::value_type;
+
template <class T>
bool isNull(T value);
@@ -198,6 +202,25 @@ std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, Input
}
+template <class T, class InputIterator> inline
+auto nearMatch(const T& val, InputIterator first, InputIterator last) -> typename std::iterator_traits<InputIterator>::value_type
+{
+ if (first == last)
+ return 0;
+
+ assert(std::is_sorted(first, last));
+ InputIterator it = std::lower_bound(first, last, val);
+ if (it == last)
+ return *--last;
+ if (it == first)
+ return *first;
+
+ const auto nextVal = *it;
+ const auto prevVal = *--it;
+ return val - prevVal < nextVal - val ? prevVal : nextVal;
+}
+
+
template <class T> inline
bool isNull(T value)
{
diff --git a/zen/build_info.h b/zen/build_info.h
index d69a8c1c..406fef70 100644
--- a/zen/build_info.h
+++ b/zen/build_info.h
@@ -13,6 +13,8 @@ namespace zen
//safer than checking for _WIN64 (defined on windows for 64-bit compilations only) while _WIN32 is always defined (even for x64 compiler!)
static const bool is32BitBuild = sizeof(void*) == 4;
static const bool is64BitBuild = sizeof(void*) == 8;
+
+static_assert(is32BitBuild || is64BitBuild, "");
}
#endif //BUILDINFO_H_INCLUDED
diff --git a/zen/com_error.h b/zen/com_error.h
index cd643b49..e6f5b492 100644
--- a/zen/com_error.h
+++ b/zen/com_error.h
@@ -51,14 +51,6 @@ Equivalent to:
-
-
-
-
-
-
-
-
//################# implementation #####################
std::wstring formatWin32Msg(DWORD dwMessageId) //return empty string on error
{
diff --git a/zen/debug_log.h b/zen/debug_log.h
index 45283da5..6ee44ff5 100644
--- a/zen/debug_log.h
+++ b/zen/debug_log.h
@@ -25,15 +25,10 @@ namespace zen
{
#ifdef FFS_WIN
const char ZEN_FILE_NAME_SEPARATOR = '\\';
-
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
const char ZEN_FILE_NAME_SEPARATOR = '/';
-
-#else
-#error specify platform!
#endif
-
class DebugLog
{
public:
diff --git a/zen/debug_minidump.cpp b/zen/debug_minidump.cpp
index 011e1bf2..c229b4aa 100644
--- a/zen/debug_minidump.cpp
+++ b/zen/debug_minidump.cpp
@@ -90,7 +90,7 @@ public:
private:
template <class T>
- static std::string numberToString(const T& number) //convert number to string the C++ way
+ static std::string numberToString(const T& number) //convert number to string the (slow) C++ way
{
std::ostringstream ss;
ss << number;
diff --git a/zen/dir_watcher.cpp b/zen/dir_watcher.cpp
index 7d5e4697..0b34f890 100644
--- a/zen/dir_watcher.cpp
+++ b/zen/dir_watcher.cpp
@@ -19,6 +19,9 @@
#include <sys/inotify.h>
#include <fcntl.h>
#include "file_traverser.h"
+
+#elif defined FFS_MAC
+//#include <CoreFoundation/FSEvents.h>
#endif
using namespace zen;
@@ -133,7 +136,7 @@ class ReadChangesAsync
{
public:
//constructed in main thread!
- ReadChangesAsync(const Zstring& directory, //make sure to not leak in thread-unsafe types!
+ ReadChangesAsync(const Zstring& directory, //make sure to not leak-in thread-unsafe types!
const std::shared_ptr<SharedData>& shared) :
shared_(shared),
dirnamePf(appendSeparator(directory)),
@@ -510,11 +513,35 @@ std::vector<DirWatcher::Entry> DirWatcher::getChanges(const std::function<void()
output.push_back(Entry(ACTION_DELETE, fullname));
}
}
-
bytePos += sizeof(struct ::inotify_event) + evt.len;
}
return output;
}
+#elif defined FFS_MAC
+
+warn_static("finish")
+struct DirWatcher::Pimpl
+{
+
+};
+
+
+DirWatcher::DirWatcher(const Zstring& directory) //throw FileError
+{
+
+}
+
+
+DirWatcher::~DirWatcher()
+{
+}
+
+
+std::vector<DirWatcher::Entry> DirWatcher::getChanges(const std::function<void()>&) //throw FileError
+{
+ std::vector<Entry> output;
+ return output;
+}
#endif
diff --git a/zen/dll.h b/zen/dll.h
index 3e7a0655..2c39ac44 100644
--- a/zen/dll.h
+++ b/zen/dll.h
@@ -8,10 +8,15 @@
#define DLLLOADER_H_INCLUDED
#include <memory>
+#ifdef FFS_WIN
#include <string>
#include "scope_guard.h"
#include "win.h" //includes "windows.h"
+#elif defined FFS_LINUX || defined FFS_MAC
+#include <dlfcn.h>
+#endif
+
namespace zen
{
/*
@@ -35,10 +40,15 @@ class DllFun
public:
DllFun() : fun(nullptr) {}
+#ifdef FFS_WIN
DllFun(const wchar_t* libraryName, const char* functionName) :
hLibRef(::LoadLibrary(libraryName), ::FreeLibrary),
fun(hLibRef ? reinterpret_cast<Func>(::GetProcAddress(static_cast<HMODULE>(hLibRef.get()), functionName)) : nullptr) {}
-
+#elif defined FFS_LINUX || defined FFS_MAC
+ DllFun(const char* libraryName, const char* functionName) :
+ hLibRef(::dlopen(libraryName, RTLD_LAZY), ::dlclose),
+ fun(hLibRef ? reinterpret_cast<Func>(::dlsym(hLibRef.get(), functionName)) : nullptr) {}
+#endif
operator Func() const { return fun; }
private:
@@ -46,6 +56,8 @@ private:
Func fun;
};
+
+#ifdef FFS_WIN
//if the dll is already part of the process space, e.g. "kernel32.dll" or "shell32.dll", we can use a faster variant:
//NOTE: since the lifetime of the referenced library is *not* controlled, this is safe to use only for permanently loaded libraries like these!
template <class Func>
@@ -66,7 +78,6 @@ private:
Func fun;
};
-
/*
extract binary resources from .exe/.dll:
@@ -77,12 +88,7 @@ extract binary resources from .exe/.dll:
MY_BINARY_RESOURCE RCDATA "filename.dat"
*/
std::string getResourceStream(const std::wstring& libraryName, size_t resourceId);
-
-
-
-
-
-
+#endif
@@ -94,6 +100,7 @@ std::string getResourceStream(const std::wstring& libraryName, size_t resourceId
//--------------- implementation---------------------------------------------------
+#ifdef FFS_WIN
inline
std::string getResourceStream(const wchar_t* libraryName, size_t resourceId)
{
@@ -102,16 +109,13 @@ std::string getResourceStream(const wchar_t* libraryName, size_t resourceId)
ZEN_ON_SCOPE_EXIT(::FreeLibrary(module));
if (HRSRC res = ::FindResource(module, MAKEINTRESOURCE(resourceId), RT_RCDATA))
- {
if (HGLOBAL resHandle = ::LoadResource(module, res))
- {
if (const char* stream = static_cast<const char*>(::LockResource(resHandle)))
return std::string(stream, static_cast<size_t>(::SizeofResource(module, res))); //size is 0 on error
- }
- }
}
return std::string();
}
+#endif
}
#endif // DLLLOADER_H_INCLUDED
diff --git a/zen/file_handling.cpp b/zen/file_handling.cpp
index 4f34814f..bf829010 100644
--- a/zen/file_handling.cpp
+++ b/zen/file_handling.cpp
@@ -27,14 +27,20 @@
#include "IFileOperation/file_op.h"
#elif defined FFS_LINUX
-#include <sys/stat.h>
-#include <utime.h>
-#include <sys/time.h> //futimes
-#include <sys/vfs.h>
-
+#include <sys/vfs.h> //statfs
+#include <fcntl.h> //AT_SYMLINK_NOFOLLOW, UTIME_OMIT
#ifdef HAVE_SELINUX
#include <selinux/selinux.h>
#endif
+
+#elif defined FFS_MAC
+#include <sys/mount.h> //statfs
+#include <utime.h>
+#endif
+
+#if defined FFS_LINUX || defined FFS_MAC
+#include <sys/stat.h>
+//#include <sys/time.h>
#endif
using namespace zen;
@@ -47,7 +53,7 @@ bool zen::fileExists(const Zstring& filename)
const DWORD ret = ::GetFileAttributes(applyLongPathPrefix(filename).c_str());
return ret != INVALID_FILE_ATTRIBUTES && (ret & FILE_ATTRIBUTE_DIRECTORY) == 0; //returns true for (file-)symlinks also
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
struct stat fileInfo = {};
return ::lstat(filename.c_str(), &fileInfo) == 0 &&
(S_ISLNK(fileInfo.st_mode) || S_ISREG(fileInfo.st_mode)); //in Linux a symbolic link is neither file nor directory
@@ -62,7 +68,7 @@ bool zen::dirExists(const Zstring& dirname)
const DWORD ret = ::GetFileAttributes(applyLongPathPrefix(dirname).c_str());
return ret != INVALID_FILE_ATTRIBUTES && (ret & FILE_ATTRIBUTE_DIRECTORY) != 0; //returns true for (dir-)symlinks also
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
struct stat dirInfo = {};
return ::lstat(dirname.c_str(), &dirInfo) == 0 &&
(S_ISLNK(dirInfo.st_mode) || S_ISDIR(dirInfo.st_mode)); //in Linux a symbolic link is neither file nor directory
@@ -82,7 +88,7 @@ bool zen::symlinkExists(const Zstring& linkname)
}
return isSymlink(fileInfo);
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
struct stat fileInfo = {};
return ::lstat(linkname.c_str(), &fileInfo) == 0 &&
S_ISLNK(fileInfo.st_mode); //symbolic link
@@ -96,7 +102,7 @@ bool zen::somethingExists(const Zstring& objname)
const DWORD rv = ::GetFileAttributes(applyLongPathPrefix(objname).c_str());
return rv != INVALID_FILE_ATTRIBUTES || ::GetLastError() == ERROR_SHARING_VIOLATION; //"C:\pagefile.sys"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
struct stat fileInfo = {};
return ::lstat(objname.c_str(), &fileInfo) == 0;
#endif
@@ -160,7 +166,7 @@ void getFileAttrib(const Zstring& filename, FileAttrib& attr, ProcSymlink procSl
attr.modificationTime = toTimeT(fileInfoHnd.ftLastWriteTime);
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
struct stat fileInfo = {};
const int rv = procSl == SYMLINK_FOLLOW ?
@@ -204,7 +210,7 @@ UInt64 zen::getFreeDiskSpace(const Zstring& path) //throw FileError
return UInt64(bytesFree.LowPart, bytesFree.HighPart);
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
struct statfs info = {};
if (::statfs(path.c_str(), &info) != 0)
throw FileError(replaceCpy(_("Cannot read file attributes of %x."), L"%x", fmtFileName(path)) + L"\n\n" + getLastErrorFormatted());
@@ -269,7 +275,7 @@ DWORD retrieveVolumeSerial(const Zstring& pathName) //return 0 on error!
return volumeSerial;
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
dev_t retrieveVolumeSerial(const Zstring& pathName) //return 0 on error!
{
Zstring volumePathName = pathName;
@@ -308,7 +314,7 @@ bool zen::removeFile(const Zstring& filename) //throw FileError
#ifdef FFS_WIN
const Zstring& filenameFmt = applyLongPathPrefix(filename);
if (!::DeleteFile(filenameFmt.c_str()))
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
if (::unlink(filename.c_str()) != 0)
#endif
{
@@ -419,7 +425,7 @@ void renameFile_sub(const Zstring& oldName, const Zstring& newName) //throw File
throw FileError(errorMessage);
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
if (::rename(oldName.c_str(), newName.c_str()) != 0)
{
const int lastError = errno;
@@ -619,7 +625,7 @@ void removeDirectoryImpl(const Zstring& directory, CallbackRemoveDir* callback)
if (callback) callback->onBeforeDirDeletion(directory); //once per symlink
#ifdef FFS_WIN
if (!::RemoveDirectory(directoryFmt.c_str()))
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
if (::unlink(directory.c_str()) != 0)
#endif
throw FileError(replaceCpy(_("Cannot delete directory %x."), L"%x", fmtFileName(directory)) + L"\n\n" + getLastErrorFormatted());
@@ -653,7 +659,7 @@ void removeDirectoryImpl(const Zstring& directory, CallbackRemoveDir* callback)
if (callback) callback->onBeforeDirDeletion(directory); //and once per folder
#ifdef FFS_WIN
if (!::RemoveDirectory(directoryFmt.c_str()))
-#else
+#elif defined FFS_LINUX || defined FFS_MAC
if (::rmdir(directory.c_str()) != 0)
#endif
throw FileError(replaceCpy(_("Cannot delete directory %x."), L"%x", fmtFileName(directory)) + L"\n\n" + getLastErrorFormatted());
@@ -676,11 +682,11 @@ void zen::removeDirectory(const Zstring& directory, CallbackRemoveDir* callback)
-void zen::setFileTime(const Zstring& filename, const Int64& modificationTime, ProcSymlink procSl) //throw FileError
+void zen::setFileTime(const Zstring& filename, const Int64& modTime, ProcSymlink procSl) //throw FileError
{
#ifdef FFS_WIN
FILETIME creationTime = {};
- FILETIME lastWriteTime = tofiletime(modificationTime);
+ FILETIME lastWriteTime = tofiletime(modTime);
//####################################### DST hack ###########################################
if (dst::isFatDrive(filename)) //throw()
@@ -930,25 +936,23 @@ void zen::setFileTime(const Zstring& filename, const Int64& modificationTime, Pr
#endif
#elif defined FFS_LINUX
- if (procSl == SYMLINK_FOLLOW)
- {
- struct ::utimbuf newTimes = {};
- newTimes.actime = ::time(nullptr);
- newTimes.modtime = to<time_t>(modificationTime);
+ struct ::timespec newTimes[2] = {};
+ newTimes[0].tv_nsec = UTIME_OMIT; //omit access time
+ newTimes[1].tv_sec = to<time_t>(modTime); //modification time (seconds)
- // set new "last write time"
- if (::utime(filename.c_str(), &newTimes) != 0)
- throw FileError(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtFileName(filename)) + L"\n\n" + getLastErrorFormatted());
- }
- else
- {
- struct ::timeval newTimes[2] = {};
- newTimes[0].tv_sec = ::time(nullptr); //access time (seconds)
- newTimes[1].tv_sec = to<time_t>(modificationTime); //modification time (seconds)
+ if (::utimensat(AT_FDCWD, filename.c_str(), newTimes, procSl == SYMLINK_DIRECT ? AT_SYMLINK_NOFOLLOW : 0) != 0)
+ throw FileError(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtFileName(filename)) + L"\n\n" + getLastErrorFormatted());
- if (::lutimes(filename.c_str(), newTimes) != 0)
- throw FileError(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtFileName(filename)) + L"\n\n" + getLastErrorFormatted());
- }
+#elif defined FFS_MAC
+ struct ::timeval newTimes[2] = {};
+ newTimes[0].tv_sec = ::time(nullptr); //access time (seconds)
+ newTimes[1].tv_sec = to<time_t>(modTime); //modification time (seconds)
+
+ const int rv = procSl == SYMLINK_FOLLOW ?
+ :: utimes(filename.c_str(), newTimes) : //utimensat() not yet implemented on OS X
+ ::lutimes(filename.c_str(), newTimes);
+ if (rv != 0)
+ throw FileError(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtFileName(filename)) + L"\n\n" + getLastErrorFormatted());
#endif
}
@@ -976,7 +980,7 @@ bool zen::supportsPermissions(const Zstring& dirname) //throw FileError
return (fsFlags & FILE_PERSISTENT_ACLS) != 0;
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
return true;
#endif
}
@@ -1226,7 +1230,7 @@ void copyObjectPermissions(const Zstring& source, const Zstring& target, ProcSym
throw FileError
*/
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#ifdef HAVE_SELINUX //copy SELinux security context
copySecurityContext(source, target, procSl); //throw FileError
@@ -1277,7 +1281,7 @@ void createDirectoryStraight(const Zstring& directory, //throw FileError, ErrorT
throw FileError(msg);
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
if (::mkdir(directory.c_str(), 0755) != 0) //mode: drwxr-xr-x
{
const std::wstring msg = replaceCpy(_("Cannot create directory %x."), L"%x", fmtFileName(directory)) + L"\n\n" + getLastErrorFormatted();
@@ -1474,7 +1478,7 @@ void zen::copySymlink(const Zstring& sourceLink, const Zstring& targetLink, bool
if (!createSymbolicLink(targetLink.c_str(), //__in LPTSTR lpSymlinkFileName, - seems no long path prefix is required...
linkPath.c_str(), //__in LPTSTR lpTargetFileName,
(isDirLink ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0))) //__in DWORD dwFlags
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
if (::symlink(linkPath.c_str(), targetLink.c_str()) != 0)
#endif
throw FileError(replaceCpy(replaceCpy(_("Cannot copy symbolic link %x to %y."), L"%x", fmtFileName(sourceLink)), L"%y", fmtFileName(targetLink)) +
@@ -2166,14 +2170,13 @@ void copyFileWindows(const Zstring& sourceFile, const Zstring& targetFile, Callb
}
}
-#elif defined FFS_LINUX
-void copyFileLinux(const Zstring& sourceFile,
- const Zstring& targetFile,
- CallbackCopyFile* callback,
- FileAttrib* newAttrib) //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting
-{
- zen::ScopeGuard guardTarget = zen::makeGuard([&] { try { removeFile(targetFile); } catch (...) {} }); //transactional behavior: place guard before lifetime of FileOutput
+#elif defined FFS_LINUX || defined FFS_MAC
+void copyFileLinuxMac(const Zstring& sourceFile,
+ const Zstring& targetFile,
+ CallbackCopyFile* callback,
+ FileAttrib* newAttrib) //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting
+{
//open sourceFile for reading
FileInputUnbuffered fileIn(sourceFile); //throw FileError, ErrorNotExisting
@@ -2181,6 +2184,7 @@ void copyFileLinux(const Zstring& sourceFile,
if (::fstat(fileIn.getDescriptor(), &sourceInfo) != 0) //read file attributes from source
throw FileError(replaceCpy(_("Cannot read file attributes of %x."), L"%x", fmtFileName(sourceFile)) + L"\n\n" + getLastErrorFormatted());
+ zen::ScopeGuard guardTarget = zen::makeGuard([&] { try { removeFile(targetFile); } catch (...) {} }); //transactional behavior: place guard before lifetime of FileOutput
try
{
//create targetFile and open it for writing
@@ -2202,12 +2206,6 @@ void copyFileLinux(const Zstring& sourceFile,
//adapt target file modification time:
{
- struct ::timeval newTimes[2] = {};
- newTimes[0].tv_sec = sourceInfo.st_atime;
- newTimes[1].tv_sec = sourceInfo.st_mtime;
- if (::futimes(fileOut.getDescriptor(), newTimes) != 0) //by using the already open file handle, we avoid issues like: https://sourceforge.net/p/freefilesync/bugs/230/
- throw FileError(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtFileName(targetFile)) + L"\n\n" + getLastErrorFormatted());
-
//read and return file statistics
struct ::stat targetInfo = {};
if (::fstat(fileOut.getDescriptor(), &targetInfo) != 0)
@@ -2222,12 +2220,19 @@ void copyFileLinux(const Zstring& sourceFile,
}
}
}
- catch (ErrorTargetExisting&)
+ catch (const ErrorTargetExisting&)
{
guardTarget.dismiss(); //don't delete file that existed previously!
throw;
}
+ //we cannot set the target file times while the file descriptor is open and being written:
+ //this triggers bugs on samba shares where the modification time is set to current time instead.
+ //http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340236
+ //http://comments.gmane.org/gmane.linux.file-systems.cifs/2854
+ //on the other hand we thereby have to reopen https://sourceforge.net/p/freefilesync/bugs/230/
+ setFileTime(targetFile, sourceInfo.st_mtime, SYMLINK_FOLLOW); //throw FileError
+
guardTarget.dismiss(); //target has been created successfully!
}
#endif
@@ -2246,14 +2251,14 @@ Zstring findUnusedTempName(const Zstring& filename)
/*
- File Copy Layers
- ================
-
- copyFile (setup transactional behavior)
- |
- copyFileSelectOs
- / \
-copyFileLinux copyFileWindows (solve 8.3 issue)
+ ------------------
+ |File Copy Layers|
+ ------------------
+ copyFile (setup transactional behavior)
+ |
+ copyFileSelectOs
+ / \
+copyFileLinuxMac copyFileWindows (solve 8.3 issue)
|
copyFileWindowsSelectRoutine
/ \
@@ -2266,8 +2271,8 @@ void copyFileSelectOs(const Zstring& sourceFile, const Zstring& targetFile, Call
#ifdef FFS_WIN
copyFileWindows(sourceFile, targetFile, callback, sourceAttr); //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting, ErrorFileLocked
-#elif defined FFS_LINUX
- copyFileLinux(sourceFile, targetFile, callback, sourceAttr); //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting
+#elif defined FFS_LINUX || defined FFS_MAC
+ copyFileLinuxMac(sourceFile, targetFile, callback, sourceAttr); //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting
#endif
}
}
diff --git a/zen/file_id.cpp b/zen/file_id.cpp
index 3d04ce34..7e0fa81b 100644
--- a/zen/file_id.cpp
+++ b/zen/file_id.cpp
@@ -11,7 +11,7 @@
#include "long_path_prefix.h"
#include "scope_guard.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <sys/stat.h>
#endif
@@ -40,9 +40,9 @@ zen::FileId zen::getFileID(const Zstring& filename)
return extractFileID(fileInfo);
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
struct ::stat fileInfo = {};
- if (::stat(filename.c_str(), &fileInfo) == 0) //stat() follows symlinks
+ if (::lstat(filename.c_str(), &fileInfo) == 0)
return extractFileID(fileInfo);
#endif
diff --git a/zen/file_id_def.h b/zen/file_id_def.h
index 5f485c68..54012b4f 100644
--- a/zen/file_id_def.h
+++ b/zen/file_id_def.h
@@ -13,7 +13,7 @@
#ifdef FFS_WIN
#include "win.h" //includes "windows.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <sys/stat.h>
#endif
@@ -49,7 +49,7 @@ assert_static(sizeof(FileId().second) == sizeof(BY_HANDLE_FILE_INFORMATION().nFi
assert_static(sizeof(FileId().second) == sizeof(ULARGE_INTEGER));
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
namespace impl { typedef struct ::stat StatDummy; } //sigh...
typedef decltype(impl::StatDummy::st_dev) DeviceId;
diff --git a/zen/file_io.cpp b/zen/file_io.cpp
index 788288ce..6581dfbe 100644
--- a/zen/file_io.cpp
+++ b/zen/file_io.cpp
@@ -12,7 +12,7 @@
#include "win_ver.h"
#include "dll.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <fcntl.h> //open, close
#include <unistd.h> //read, write
#endif
@@ -45,7 +45,7 @@ Zstring getLockingProcessNames(const Zstring& filename) //throw(), empty string
return Zstring();
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
//"filename" could be a named pipe which *blocks* forever during "open()"! https://sourceforge.net/p/freefilesync/bugs/221/
void checkForUnsupportedType(const Zstring& filename) //throw FileError
{
@@ -64,7 +64,7 @@ void checkForUnsupportedType(const Zstring& filename) //throw FileError
S_ISBLK (m) ? L"block device" :
S_ISFIFO(m) ? L"FIFO, named pipe" :
S_ISSOCK(m) ? L"socket" : nullptr;
- const std::wstring numFmt = printNumber<std::wstring>(L"0%06o", m & __S_IFMT);
+ const std::wstring numFmt = printNumber<std::wstring>(L"0%06o", m & S_IFMT);
return name ? numFmt + L", " + name : numFmt;
};
throw FileError(replaceCpy(_("Type of item %x is not supported:"), L"%x", fmtFileName(filename)) + L" " + getTypeName(fileInfo.st_mode));
@@ -113,7 +113,7 @@ FileInput::FileInput(const Zstring& filename) : //throw FileError, ErrorNotExis
*/
nullptr);
if (fileHandle == INVALID_HANDLE_VALUE)
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
checkForUnsupportedType(filename); //throw FileError; reading a named pipe would block forever!
fileHandle = ::fopen(filename.c_str(), "r,type=record,noseek"); //utilize UTF-8 filename
if (!fileHandle)
@@ -147,7 +147,7 @@ FileInput::~FileInput()
{
#ifdef FFS_WIN
::CloseHandle(fileHandle);
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
::fclose(fileHandle); //NEVER allow passing nullptr to fclose! -> crash!; fileHandle != nullptr in this context!
#endif
}
@@ -164,7 +164,7 @@ size_t FileInput::read(void* buffer, size_t bytesToRead) //returns actual number
static_cast<DWORD>(bytesToRead), //__in DWORD nNumberOfBytesToRead,
&bytesRead, //__out_opt LPDWORD lpNumberOfBytesRead,
nullptr)) //__inout_opt LPOVERLAPPED lpOverlapped
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
const size_t bytesRead = ::fread(buffer, 1, bytesToRead, fileHandle);
if (::ferror(fileHandle) != 0) //checks status of stream, not fread()!
#endif
@@ -174,7 +174,7 @@ size_t FileInput::read(void* buffer, size_t bytesToRead) //returns actual number
if (bytesRead < bytesToRead) //verify only!
setEof();
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
if (::feof(fileHandle) != 0)
setEof();
@@ -257,7 +257,7 @@ FileOutput::FileOutput(const Zstring& filename, AccessFlag access) : //throw Fil
}
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
checkForUnsupportedType(filename); //throw FileError; writing a named pipe would block forever!
fileHandle = ::fopen(filename.c_str(),
//GNU extension: https://www.securecoding.cert.org/confluence/display/cplusplus/FIO03-CPP.+Do+not+make+assumptions+about+fopen()+and+file+creation
@@ -282,7 +282,7 @@ FileOutput::~FileOutput()
{
#ifdef FFS_WIN
::CloseHandle(fileHandle);
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
::fclose(fileHandle); //NEVER allow passing nullptr to fclose! -> crash!
#endif
}
@@ -297,7 +297,7 @@ void FileOutput::write(const void* buffer, size_t bytesToWrite) //throw FileErro
static_cast<DWORD>(bytesToWrite), //__in DWORD nNumberOfBytesToWrite,
&bytesWritten, //__out_opt LPDWORD lpNumberOfBytesWritten,
nullptr)) //__inout_opt LPOVERLAPPED lpOverlapped
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
const size_t bytesWritten = ::fwrite(buffer, 1, bytesToWrite, fileHandle);
if (::ferror(fileHandle) != 0) //checks status of stream, not fwrite()!
#endif
@@ -308,7 +308,7 @@ void FileOutput::write(const void* buffer, size_t bytesToWrite) //throw FileErro
}
-#ifdef FFS_LINUX
+#if defined FFS_LINUX || defined FFS_MAC
//Compare copy_reg() in copy.c: ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.gz
FileInputUnbuffered::FileInputUnbuffered(const Zstring& filename) : FileInputBase(filename) //throw FileError, ErrorNotExisting
diff --git a/zen/file_io.h b/zen/file_io.h
index 31373857..8e501172 100644
--- a/zen/file_io.h
+++ b/zen/file_io.h
@@ -12,7 +12,7 @@
#ifdef FFS_WIN
#include "win.h" //includes "windows.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <cstdio>
#include <sys/stat.h>
#endif
@@ -24,13 +24,15 @@ namespace zen
static const char LINE_BREAK[] = "\r\n";
#elif defined FFS_LINUX
static const char LINE_BREAK[] = "\n";
+#elif defined FFS_MAC
+static const char LINE_BREAK[] = "\r";
#endif
//buffered file IO optimized for sequential read/write accesses + better error reporting + long path support (following symlinks)
#ifdef FFS_WIN
typedef HANDLE FileHandle;
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
typedef FILE* FileHandle;
#endif
@@ -62,8 +64,7 @@ private:
FileHandle fileHandle;
};
-
-#ifdef FFS_LINUX
+#if defined FFS_LINUX || defined FFS_MAC
class FileInputUnbuffered : public FileInputBase
{
public:
diff --git a/zen/file_traverser.cpp b/zen/file_traverser.cpp
index 9a02eb1e..b39f8416 100644
--- a/zen/file_traverser.cpp
+++ b/zen/file_traverser.cpp
@@ -17,7 +17,7 @@
#include "dll.h"
#include "FindFilePlus/find_file_plus.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <sys/stat.h>
#include <dirent.h>
#endif
@@ -498,8 +498,7 @@ private:
const DWORD volumeSerial; //may be 0!
};
-
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
class DirTraverser
{
public:
@@ -515,7 +514,7 @@ public:
the buffer whose address is passed in entry as follows:
len = offsetof(struct dirent, d_name) + pathconf(dirpath, _PC_NAME_MAX) + 1
entryp = malloc(len); */
- const long maxPath = std::max<long>(::pathconf(directoryFormatted.c_str(), _PC_NAME_MAX), 10000); //::pathconf may return -1
+ const size_t maxPath = std::max<long>(::pathconf(directoryFormatted.c_str(), _PC_NAME_MAX), 10000); //::pathconf may return long(-1)
buffer.resize(offsetof(struct ::dirent, d_name) + maxPath + 1);
traverse(directoryFormatted, sink, 0);
diff --git a/zen/file_traverser.h b/zen/file_traverser.h
index c8ef6550..7e566075 100644
--- a/zen/file_traverser.h
+++ b/zen/file_traverser.h
@@ -61,7 +61,7 @@ struct DstHackCallback
virtual ~DstHackCallback() {}
virtual void requestUiRefresh(const Zstring& filename) = 0; //applying DST hack imposes significant one-time performance drawback => callback to inform user
};
-#else
+#elif defined FFS_LINUX || defined FFS_MAC
struct DstHackCallback; //DST hack not required on Linux
#endif
diff --git a/zen/format_unit.cpp b/zen/format_unit.cpp
index 6455029f..7cc43e6b 100644
--- a/zen/format_unit.cpp
+++ b/zen/format_unit.cpp
@@ -16,7 +16,7 @@
#include <zen/win.h> //includes "windows.h"
#include <zen/win_ver.h>
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <clocale> //thousands separator
#include <zen/utf.h> //
#endif
@@ -26,53 +26,50 @@ using namespace zen;
std::wstring zen::filesizeToShortString(Int64 size)
{
- //if (size < 0) return _("Error"); -> really? there's at least one exceptional case: a failed rename operation falls-back to copy + delete, reducing "bytes transferred" to potentially < 0!
+ //if (size < 0) return _("Error"); -> really?
if (numeric::abs(size) <= 999)
- return replaceCpy(_P("1 Byte", "%x Bytes", to<int>(size)),
- L"%x",
- numberTo<std::wstring>(size));
- else
- {
- double filesize = to<double>(size);
+ return replaceCpy(_P("1 Byte", "%x Bytes", to<int>(size)), L"%x", numberTo<std::wstring>(size));
- filesize /= 1024;
- std::wstring output = _("%x KB");
- if (numeric::abs(filesize) > 999)
- {
- filesize /= 1024;
- output = _("%x MB");
- if (numeric::abs(filesize) > 999)
- {
- filesize /= 1024;
- output = _("%x GB");
- if (numeric::abs(filesize) > 999)
- {
- filesize /= 1024;
- output = _("%x TB");
- if (numeric::abs(filesize) > 999)
- {
- filesize /= 1024;
- output = _("%x PB");
- }
- }
- }
- }
+ auto formatUnitSize = [](double sizeInUnit, const std::wstring& unitTxt) -> std::wstring
+ {
//print just three significant digits: 0,01 | 0,11 | 1,11 | 11,1 | 111
- const size_t fullunits = static_cast<size_t>(numeric::abs(filesize));
+ const size_t fullunits = static_cast<size_t>(numeric::abs(sizeInUnit));
const int precisionDigits = fullunits < 10 ? 2 : fullunits < 100 ? 1 : 0; //sprintf requires "int"
wchar_t buffer[50];
#ifdef __MINGW32__
- int charsWritten = ::snwprintf(buffer, 50, L"%.*f", precisionDigits, filesize); //MinGW does not comply to the C standard here
+ int charsWritten = ::_snwprintf(buffer, 50, L"%.*f", precisionDigits, sizeInUnit); //MinGW does not comply to the C standard here
#else
- int charsWritten = std::swprintf(buffer, 50, L"%.*f", precisionDigits, filesize);
+ int charsWritten = std::swprintf(buffer, 50, L"%.*f", precisionDigits, sizeInUnit);
#endif
- return charsWritten > 0 ? replaceCpy(output, L"%x", std::wstring(buffer, charsWritten)) : _("Error");
- }
+ return charsWritten > 0 ? replaceCpy(unitTxt, L"%x", std::wstring(buffer, charsWritten)) : _("Error");
+ };
+
+ double sizeInUnit = to<double>(size);
+ sizeInUnit /= 1024;
+ if (numeric::abs(sizeInUnit) <= 999)
+ return formatUnitSize(sizeInUnit, _("%x KB"));
+
+ sizeInUnit /= 1024;
+ if (numeric::abs(sizeInUnit) <= 999)
+ return formatUnitSize(sizeInUnit, _("%x MB"));
+
+ sizeInUnit /= 1024;
+ if (numeric::abs(sizeInUnit) <= 999)
+ return formatUnitSize(sizeInUnit, _("%x GB"));
+
+ sizeInUnit /= 1024;
+ if (numeric::abs(sizeInUnit) <= 999)
+ return formatUnitSize(sizeInUnit, _("%x TB"));
+
+ sizeInUnit /= 1024;
+ return formatUnitSize(sizeInUnit, _("%x PB"));
}
+namespace
+{
enum UnitRemTime
{
URT_SEC,
@@ -81,56 +78,75 @@ enum UnitRemTime
URT_DAY
};
-std::wstring zen::remainingTimeToShortString(double timeInSec)
-{
- double remainingTime = timeInSec;
-
- //determine preferred unit
- UnitRemTime unit = URT_SEC;
- if (remainingTime > 59)
- {
- unit = URT_MIN;
- remainingTime /= 60;
- if (remainingTime > 59)
- {
- unit = URT_HOUR;
- remainingTime /= 60;
- if (remainingTime > 23)
- {
- unit = URT_DAY;
- remainingTime /= 24;
- }
- }
- }
-
- int formattedTime = numeric::round(remainingTime);
-
- //reduce precision to 5 seconds
- if (unit == URT_SEC)
- formattedTime = static_cast<int>(std::ceil(formattedTime / 5.0) * 5);
- //generate output message
- std::wstring output;
+std::wstring formatUnitTime(int val, UnitRemTime unit)
+{
+ auto subst = [&](const std::wstring& output) { return replaceCpy(output, L"%x", zen::numberTo<std::wstring>(val)); };
switch (unit)
{
case URT_SEC:
- output = _P("1 sec", "%x sec", formattedTime);
- break;
+ return subst(_P("1 sec", "%x sec", val));
case URT_MIN:
- output = _P("1 min", "%x min", formattedTime);
- break;
+ return subst(_P("1 min", "%x min", val));
case URT_HOUR:
- output = _P("1 hour", "%x hours", formattedTime);
- break;
+ return subst(_P("1 hour", "%x hours", val));
case URT_DAY:
- output = _P("1 day", "%x days", formattedTime);
- break;
+ return subst(_P("1 day", "%x days", val));
}
- return replaceCpy(output, L"%x", zen::numberTo<std::wstring>(formattedTime));
+ assert(false);
+ return _("Error");
+}
+
+
+template <int M, int N>
+std::wstring roundToBlock(double timeHigh,
+ UnitRemTime unitHigh, const int (&stepsHigh)[M],
+ int unitLowPerHigh,
+ UnitRemTime unitLow, const int (&stepsLow)[N])
+{
+ assert(unitLowPerHigh > 0);
+ const double granularity = 0.1;
+ const double timeLow = timeHigh * unitLowPerHigh;
+ const int blockSizeLow = granularity * timeHigh < 1 ?
+ numeric::nearMatch(granularity * timeLow, std::begin(stepsLow), std::end(stepsLow)):
+ numeric::nearMatch(granularity * timeHigh, std::begin(stepsHigh), std::end(stepsHigh)) * unitLowPerHigh;
+ const int roundedTimeLow = numeric::round(timeLow / blockSizeLow) * blockSizeLow;
+
+ std::wstring output = formatUnitTime(roundedTimeLow / unitLowPerHigh, unitHigh);
+ if (unitLowPerHigh > blockSizeLow)
+ output += L" " + formatUnitTime(roundedTimeLow % unitLowPerHigh, unitLow);
+ return output;
+};
}
-std::wstring zen::fractionToShortString(double fraction)
+std::wstring zen::remainingTimeToString(double timeInSec)
+{
+ const int steps10[] = { 1, 2, 5, 10 };
+ const int steps24[] = { 1, 2, 3, 4, 6, 8, 12, 24 };
+ const int steps60[] = { 1, 2, 5, 10, 15, 20, 30, 60 };
+
+ //determine preferred unit
+ double timeInUnit = timeInSec;
+ if (timeInUnit <= 60)
+ return roundToBlock(timeInUnit, URT_SEC, steps60, 1, URT_SEC, steps60);
+
+ timeInUnit /= 60;
+ if (timeInUnit <= 60)
+ return roundToBlock(timeInUnit, URT_MIN, steps60, 60, URT_SEC, steps60);
+
+ timeInUnit /= 60;
+ if (timeInUnit <= 24)
+ return roundToBlock(timeInUnit, URT_HOUR, steps24, 60, URT_MIN, steps60);
+
+ timeInUnit /= 24;
+ return roundToBlock(timeInUnit, URT_DAY, steps10, 24, URT_HOUR, steps24);
+ //note: for 10% granularity steps10 yields a valid blocksize only up to timeInUnit == 100!
+ //for larger time sizes this results in a finer granularity than expected: 10 days -> should not be a problem considering "usual" remaining time for synchronization
+}
+
+
+std::wstring zen::fractionToString(double fraction)
{
//return replaceCpy(_("%x%"), L"%x", printNumber<std::wstring>(L"%3.2f", fraction * 100.0), false);
return printNumber<std::wstring>(L"%3.2f", fraction * 100.0) + L'%'; //no need to internationalize fraction!?
@@ -236,7 +252,7 @@ std::wstring zen::ffs_Impl::includeNumberSeparator(const std::wstring& number)
}
return number;
-#else
+#elif defined FFS_LINUX || defined FFS_MAC
//we have to include thousands separator ourselves; this doesn't work for all countries (e.g india), but is better than nothing
//::setlocale (LC_ALL, ""); -> implicitly called by wxLocale
@@ -261,28 +277,6 @@ std::wstring zen::ffs_Impl::includeNumberSeparator(const std::wstring& number)
#endif
}
-/*
-#include <wx/scrolwin.h>
-
-void zen::scrollToBottom(wxScrolledWindow* scrWindow)
-{
- int height = 0;
- scrWindow->GetClientSize(nullptr, &height);
-
- int pixelPerLine = 0;
- scrWindow->GetScrollPixelsPerUnit(nullptr, &pixelPerLine);
-
- if (height > 0 && pixelPerLine > 0)
- {
- const int scrollLinesTotal = scrWindow->GetScrollLines(wxVERTICAL);
- const int scrollLinesOnScreen = height / pixelPerLine;
- const int scrollPosBottom = scrollLinesTotal - scrollLinesOnScreen;
-
- if (0 <= scrollPosBottom)
- scrWindow->Scroll(0, scrollPosBottom);
- }
-}
-*/
#ifdef FFS_WIN
namespace
@@ -333,7 +327,7 @@ std::wstring zen::utcToLocalTimeString(Int64 utcTime)
loc.minute = systemTimeLocal.wMinute;
loc.second = systemTimeLocal.wSecond;
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
zen::TimeComp loc = zen::localTime(to<time_t>(utcTime));
#endif
diff --git a/zen/format_unit.h b/zen/format_unit.h
index f634e5e5..86477999 100644
--- a/zen/format_unit.h
+++ b/zen/format_unit.h
@@ -8,14 +8,14 @@
#define FMT_UNIT_8702184019487324
#include <string>
-#include <zen/string_tools.h>
#include <zen/int64.h>
+#include <zen/string_tools.h>
namespace zen
{
std::wstring filesizeToShortString(Int64 filesize);
-std::wstring remainingTimeToShortString(double timeInSec);
-std::wstring fractionToShortString(double fraction); //within [0, 1]
+std::wstring remainingTimeToString(double timeInSec);
+std::wstring fractionToString(double fraction); //within [0, 1]
template <class NumberType>
std::wstring toGuiString(NumberType number); //format integer number including thousands separator
diff --git a/zen/guid.h b/zen/guid.h
index 0c03bd9f..b2dd90aa 100644
--- a/zen/guid.h
+++ b/zen/guid.h
@@ -10,7 +10,7 @@
#include <string>
#include <boost/uuid/uuid.hpp>
-#ifdef __MINGW32__ //boost should start cleaning this mess up
+#ifdef __GNUC__ //boost should start cleaning this mess up
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wuninitialized"
@@ -18,7 +18,7 @@
#include <boost/uuid/uuid_generators.hpp>
-#ifdef __MINGW32__
+#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
diff --git a/zen/int64.h b/zen/int64.h
index 238efb14..3e967df8 100644
--- a/zen/int64.h
+++ b/zen/int64.h
@@ -182,7 +182,7 @@ public:
inline friend bool operator>=(const UInt64& lhs, const UInt64& rhs) { return lhs.value >= rhs.value; }
//checked conversion to arbitrary target integer type
- template <class T> inline friend T to(UInt64 number) { checkRange<T>(number.value); return static_cast<T>(number.value); }
+ template <class T> friend T to(UInt64 number);
template <class T> inline friend std::basic_istream<T>& operator>>(std::basic_istream<T>& lhs, UInt64& rhs) { lhs >> rhs.value; return lhs; }
template <class T> inline friend std::basic_ostream<T>& operator<<(std::basic_ostream<T>& lhs, const UInt64& rhs) { lhs << rhs.value; return lhs; }
@@ -191,6 +191,8 @@ private:
std::uint64_t value;
};
+template <class T> inline T to(UInt64 number) { checkRange<T>(number.value); return static_cast<T>(number.value); } //Clang 3.2 doesn't properly handle inline-friends defined in class definition
+
inline UInt64 operator+ (const UInt64& lhs, const UInt64& rhs) { return UInt64(lhs) += rhs; }
inline UInt64 operator- (const UInt64& lhs, const UInt64& rhs) { return UInt64(lhs) -= rhs; }
inline UInt64 operator* (const UInt64& lhs, const UInt64& rhs) { return UInt64(lhs) *= rhs; }
diff --git a/zen/last_error.h b/zen/last_error.h
index 72d54d48..ddee552f 100644
--- a/zen/last_error.h
+++ b/zen/last_error.h
@@ -14,7 +14,7 @@
#ifdef FFS_WIN
#include "win.h" //includes "windows.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <cstring>
#include <cerrno>
#endif
@@ -25,7 +25,7 @@ namespace zen
//evaluate GetLastError()/errno and assemble specific error message
#ifdef FFS_WIN
typedef DWORD ErrorCode;
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
typedef int ErrorCode;
#endif
@@ -42,40 +42,13 @@ bool errorCodeForNotExisting(ErrorCode lastError); //check for "not existing" al
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
//######################## implementation ########################
inline
ErrorCode getLastError()
{
#ifdef FFS_WIN
return ::GetLastError();
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
return errno; //don't use "::", errno is a macro!
#endif
}
@@ -87,17 +60,16 @@ std::wstring getLastErrorFormatted(ErrorCode lastError)
if (lastError == 0)
lastError = getLastError();
-#ifdef FFS_WIN
- std::wstring output = _("Windows Error Code %x:");
+ std::wstring output = _("Error Code %x:");
replace(output, L"%x", numberTo<std::wstring>(lastError));
-
+#ifdef FFS_WIN
LPWSTR buffer = nullptr;
if (::FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_MAX_WIDTH_MASK |
FORMAT_MESSAGE_IGNORE_INSERTS | //important: without this flag ::FormatMessage() will fail if message contains placeholders
FORMAT_MESSAGE_ALLOCATE_BUFFER, nullptr, lastError, 0, reinterpret_cast<LPWSTR>(&buffer), 0, nullptr) != 0)
{
- if (buffer) //just to be sure
+ if (buffer) //"don't trust nobody"
{
output += L" ";
output += buffer;
@@ -105,18 +77,14 @@ std::wstring getLastErrorFormatted(ErrorCode lastError)
}
}
::SetLastError(lastError); //restore last error
- return output;
-
-#elif defined FFS_LINUX
- std::wstring output = _("Linux Error Code %x:");
- replace(output, L"%x", numberTo<std::wstring>(lastError));
+#elif defined FFS_LINUX || defined FFS_MAC
output += L" ";
output += utfCvrtTo<std::wstring>(::strerror(lastError));
errno = lastError; //restore errno
- return output;
#endif
+ return output;
}
@@ -128,8 +96,7 @@ bool errorCodeForNotExisting(ErrorCode lastError)
lastError == ERROR_PATH_NOT_FOUND ||
lastError == ERROR_BAD_NETPATH ||
lastError == ERROR_NETNAME_DELETED;
-
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
return lastError == ENOENT;
#endif
}
diff --git a/zen/process_priority.cpp b/zen/process_priority.cpp
new file mode 100644
index 00000000..96a6c2de
--- /dev/null
+++ b/zen/process_priority.cpp
@@ -0,0 +1,149 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#include "process_priority.h"
+#include <zen/last_error.h>
+#include <zen/i18n.h>
+
+#ifdef FFS_WIN
+#include "win.h" //includes "windows.h"
+
+#elif defined FFS_LINUX
+//#include <sys/syscall.h>
+
+#elif defined FFS_MAC
+#include <sys/resource.h> //getiopolicy_np
+#include <IOKit/pwr_mgt/IOPMLib.h> //keep in .cpp file to not pollute global namespace! e.g. with UInt64
+#endif
+
+using namespace zen;
+
+
+#ifdef FFS_WIN
+struct PreventStandby::Pimpl {};
+
+PreventStandby::PreventStandby()
+{
+ if (::SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED) == 0)
+ throw FileError(_("Failed to suspend system sleep mode.")); //no GetLastError() support?
+}
+
+
+PreventStandby::~PreventStandby()
+{
+ ::SetThreadExecutionState(ES_CONTINUOUS);
+}
+
+
+#ifndef PROCESS_MODE_BACKGROUND_BEGIN
+#define PROCESS_MODE_BACKGROUND_BEGIN 0x00100000 // Windows Server 2003 and Windows XP/2000: This value is not supported!
+#define PROCESS_MODE_BACKGROUND_END 0x00200000 //
+#endif
+
+struct ScheduleForBackgroundProcessing::Pimpl {};
+
+
+ScheduleForBackgroundProcessing::ScheduleForBackgroundProcessing()
+{
+ if (!::SetPriorityClass(::GetCurrentProcess(), PROCESS_MODE_BACKGROUND_BEGIN)) //this call lowers CPU priority, too!!
+ throw FileError(_("Cannot change process I/O priorities.") + L"\n\n" + getLastErrorFormatted());
+}
+
+
+ScheduleForBackgroundProcessing::~ScheduleForBackgroundProcessing()
+{
+ ::SetPriorityClass(::GetCurrentProcess(), PROCESS_MODE_BACKGROUND_END);
+}
+
+#elif defined FFS_LINUX
+struct PreventStandby::Pimpl {};
+PreventStandby::PreventStandby() {}
+PreventStandby::~PreventStandby() {}
+
+//solution for GNOME?: http://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Inhibit
+
+struct ScheduleForBackgroundProcessing::Pimpl {};
+ScheduleForBackgroundProcessing::ScheduleForBackgroundProcessing() {};
+ScheduleForBackgroundProcessing::~ScheduleForBackgroundProcessing() {};
+
+/*
+struct ScheduleForBackgroundProcessing
+{
+ - required functions ioprio_get/ioprio_set are not part of glibc: http://linux.die.net/man/2/ioprio_set
+ - and probably never will: http://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;
+};
+*/
+
+#elif defined FFS_MAC
+//https://developer.apple.com/library/mac/#qa/qa1340
+struct PreventStandby::Pimpl
+{
+ Pimpl() : assertionID() {}
+ IOPMAssertionID assertionID;
+};
+
+PreventStandby::PreventStandby() : pimpl(make_unique<Pimpl>())
+{
+ if (::IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep,
+ kIOPMAssertionLevelOn,
+ CFSTR("FreeFileSync"),
+ &pimpl->assertionID) != kIOReturnSuccess)
+ throw FileError(_("Failed to suspend system sleep mode."));
+}
+
+PreventStandby::~PreventStandby()
+{
+ ::IOPMAssertionRelease(pimpl->assertionID);
+}
+
+
+struct ScheduleForBackgroundProcessing::Pimpl
+{
+ Pimpl() : oldIoPrio() {}
+ int oldIoPrio;
+};
+
+
+ScheduleForBackgroundProcessing::ScheduleForBackgroundProcessing() : pimpl(make_unique<Pimpl>())
+{
+ pimpl->oldIoPrio = ::getiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS);
+ if (pimpl->oldIoPrio == -1)
+ throw FileError(_("Cannot change process I/O priorities.") + L" (r)" + L"\n\n" + getLastErrorFormatted());
+
+ if (::setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS, IOPOL_THROTTLE) != 0)
+ throw FileError(_("Cannot change process I/O priorities.") + L" (w)" + L"\n\n" + getLastErrorFormatted());
+}
+
+
+ScheduleForBackgroundProcessing::~ScheduleForBackgroundProcessing()
+{
+ ::setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS, pimpl->oldIoPrio);
+}
+#endif \ No newline at end of file
diff --git a/zen/process_priority.h b/zen/process_priority.h
index c0bae667..78e49cd0 100644
--- a/zen/process_priority.h
+++ b/zen/process_priority.h
@@ -1,58 +1,36 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
#ifndef PREVENTSTANDBY_H_INCLUDED
#define PREVENTSTANDBY_H_INCLUDED
-#ifdef FFS_WIN
-#include "win.h" //includes "windows.h"
-
-#elif defined FFS_LINUX
-#endif
+#include <memory>
+#include <zen/file_error.h>
namespace zen
{
-struct PreventStandby //signal a "busy" state to the operating system
+//signal a "busy" state to the operating system
+class PreventStandby
{
-#ifdef FFS_WIN
- PreventStandby () { ::SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED /* | ES_AWAYMODE_REQUIRED*/ ); }
- ~PreventStandby() { ::SetThreadExecutionState(ES_CONTINUOUS); }
-#endif
+public:
+ PreventStandby(); //throw FileError
+ ~PreventStandby();
+private:
+ struct Pimpl;
+ std::unique_ptr<Pimpl> pimpl;
};
-
-struct ScheduleForBackgroundProcessing //lower CPU and file I/O priorities
+//lower CPU and file I/O priorities
+class ScheduleForBackgroundProcessing
{
-#ifdef FFS_WIN
-#ifndef PROCESS_MODE_BACKGROUND_BEGIN
-#define PROCESS_MODE_BACKGROUND_BEGIN 0x00100000 // Windows Server 2003 and Windows XP/2000: This value is not supported!
-#define PROCESS_MODE_BACKGROUND_END 0x00200000 //
-#endif
-
- ScheduleForBackgroundProcessing () { ::SetPriorityClass(::GetCurrentProcess(), PROCESS_MODE_BACKGROUND_BEGIN); } //this call lowers CPU priority, too!!
- ~ScheduleForBackgroundProcessing() { ::SetPriorityClass(::GetCurrentProcess(), PROCESS_MODE_BACKGROUND_END ); }
-
-#elif defined FFS_LINUX
- /*
- CPU prio:
- int getpriority(PRIO_PROCESS, 0); - errno caveat!
- int ::setpriority(PRIO_PROCESS, 0, int prio); //a zero value for "who" denotes the calling process
-
- priority can be decreased, but NOT increased :(
-
- file I/O prio:
- ScheduleForBackgroundProcessing() : oldIoPrio(::ioprio_get(IOPRIO_WHO_PROCESS, ::getpid()))
- {
- if (oldIoPrio != -1)
- ::ioprio_set(IOPRIO_WHO_PROCESS, ::getpid(), IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0));
- }
- ~ScheduleForBackgroundProcessing()
- {
- if (oldIoPrio != -1)
- ::ioprio_set(IOPRIO_WHO_PROCESS, ::getpid(), oldIoPrio);
- }
-
- private:
- const int oldIoPrio;
- */
-#endif
+public:
+ ScheduleForBackgroundProcessing(); //throw FileError
+ ~ScheduleForBackgroundProcessing();
+private:
+ struct Pimpl;
+ std::unique_ptr<Pimpl> pimpl;
};
}
diff --git a/zen/read_txt.cpp b/zen/read_txt.cpp
index 0fd310c2..7566ff14 100644
--- a/zen/read_txt.cpp
+++ b/zen/read_txt.cpp
@@ -5,6 +5,7 @@ using namespace zen;
namespace
{
+warn_static("superfluous method")
std::string detectLineBreak(const Zstring& filename) //throw FileError
{
//read a (hopefully) significant portion of data
@@ -51,6 +52,7 @@ ExtractLines::ExtractLines(const Zstring& filename, const std::string& lineBreak
bool ExtractLines::getLine(std::string& output) //throw FileError
{
+ warn_static("don't use lineBreak, but support any of r, n, rn!!!")
for (;;)
{
//check if full line is in buffer
diff --git a/zen/recycler.cpp b/zen/recycler.cpp
index 07803e50..2a82cd24 100644
--- a/zen/recycler.cpp
+++ b/zen/recycler.cpp
@@ -5,14 +5,13 @@
// **************************************************************************
#include "recycler.h"
-#include <stdexcept>
-#include <iterator>
+//#include <stdexcept>
+//#include <iterator>
#include <zen/file_handling.h>
#ifdef FFS_WIN
-#include <algorithm>
-#include <functional>
-#include <vector>
+//#include <algorithm>
+//#include <functional>
#include <zen/dll.h>
#include <zen/win.h> //includes "windows.h"
#include <zen/assert_static.h>
@@ -24,6 +23,9 @@
#include <zen/scope_guard.h>
#include <sys/stat.h>
#include <gio/gio.h>
+
+#elif defined FFS_MAC
+#include <CoreServices/CoreServices.h>
#endif
using namespace zen;
@@ -142,7 +144,7 @@ void zen::recycleOrDelete(const std::vector<Zstring>& filenames, CallbackRecycli
bool zen::recycleOrDelete(const Zstring& filename) //throw FileError
{
- if (!somethingExists(filename))
+ if (!somethingExists(filename)) //[!] do not optimize away, OS X needs this for reliable detection of "recycle bin missing"
return false; //neither file nor any other object with that name existing: no error situation, manual deletion relies on it!
#ifdef FFS_WIN
@@ -151,13 +153,13 @@ bool zen::recycleOrDelete(const Zstring& filename) //throw FileError
recycleOrDelete(filenames, nullptr); //throw FileError
#elif defined FFS_LINUX
- GFile* file = g_file_new_for_path(filename.c_str()); //never fails according to docu
+ GFile* file = ::g_file_new_for_path(filename.c_str()); //never fails according to docu
ZEN_ON_SCOPE_EXIT(g_object_unref(file);)
GError* error = nullptr;
- ZEN_ON_SCOPE_EXIT(if (error) g_error_free(error););
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error););
- if (!g_file_trash(file, nullptr, &error))
+ if (!::g_file_trash(file, nullptr, &error))
{
const std::wstring shortMsg = replaceCpy(_("Unable to move %x to the Recycle Bin!"), L"%x", fmtFileName(filename));
@@ -181,6 +183,53 @@ bool zen::recycleOrDelete(const Zstring& filename) //throw FileError
throw FileError(shortMsg + L"\n\n" + L"Glib Error Code " + numberTo<std::wstring>(error->code) + /* L", " +
g_quark_to_string(error->domain) + */ L": " + utfCvrtTo<std::wstring>(error->message));
}
+
+#elif defined FFS_MAC
+ //we cannot use FSPathMoveObjectToTrashSync directly since it follows symlinks!
+
+ assert_static(sizeof(Zchar) == sizeof(char));
+ const UInt8* filenameUtf8 = reinterpret_cast<const UInt8*>(filename.c_str());
+
+ auto throwFileError = [&](OSStatus oss)
+ {
+ std::wstring msg = replaceCpy(_("Unable to move %x to the Recycle Bin!"), L"%x", fmtFileName(filename)) + L"\n\n"
+ + L"Result Code " + numberTo<std::wstring>(oss);
+ const char* description = GetMacOSStatusCommentString(oss);
+ if (description) //found no documentation for proper use of GetMacOSStatusCommentString
+ msg += L": " + utfCvrtTo<std::wstring>(description);
+ throw FileError(msg);
+ };
+
+ FSRef objectRef;
+ OSStatus rv = ::FSPathMakeRefWithOptions(filenameUtf8, //const UInt8 *path,
+ kFSPathMakeRefDoNotFollowLeafSymlink, //OptionBits options,
+ &objectRef, //FSRef *ref,
+ nullptr); //Boolean *isDirectory
+ if (rv != noErr)
+ throwFileError(rv);
+
+ //deprecated since OS X 10.8!!! "trashItemAtURL" should be used instead
+ OSStatus rv2 = ::FSMoveObjectToTrashSync(&objectRef, //const FSRef *source,
+ nullptr, //FSRef *target,
+ kFSFileOperationDefaultOptions); //OptionBits options
+ if (rv2 != noErr)
+ {
+ //implement same behavior as in Windows: if recycler is not existing, delete permanently
+ if (rv2 == -120) //=="Directory not found or incomplete pathname." but should really be "recycle bin directory not found"!
+ {
+ struct stat fileInfo = {};
+ if (::lstat(filename.c_str(), &fileInfo) != 0)
+ return false;
+
+ if (S_ISLNK(fileInfo.st_mode) || S_ISREG(fileInfo.st_mode))
+ removeFile(filename); //throw FileError
+ else if (S_ISDIR(fileInfo.st_mode))
+ removeDirectory(filename); //throw FileError
+ return true;
+ }
+
+ throwFileError(rv2);
+ }
#endif
return true;
}
@@ -275,7 +324,7 @@ StatusRecycler zen::recycleBinStatus(const Zstring& pathName)
*/
}
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
/*
We really need access to a similar function to check whether a directory supports trashing and emit a warning if it does not!
diff --git a/zen/symlink_target.h b/zen/symlink_target.h
index 1a616559..95aa84fb 100644
--- a/zen/symlink_target.h
+++ b/zen/symlink_target.h
@@ -16,7 +16,7 @@
#include "privilege.h"
#include "long_path_prefix.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <unistd.h>
#endif
@@ -39,14 +39,6 @@ Zstring getSymlinkRawTargetString(const Zstring& linkPath); //throw FileError
-
-
-
-
-
-
-
-
//################################ implementation ################################
#ifdef _MSC_VER //I don't have Windows Driver Kit at hands right now, so unfortunately we need to redefine this structures and cross fingers...
typedef struct _REPARSE_DATA_BUFFER //from ntifs.h
@@ -145,7 +137,7 @@ Zstring getSymlinkRawTargetString_impl(const Zstring& linkPath) //throw FileErro
return output;
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
const int BUFFER_SIZE = 10000;
std::vector<char> buffer(BUFFER_SIZE);
diff --git a/zen/thread.h b/zen/thread.h
index 43917d13..ae865cc8 100644
--- a/zen/thread.h
+++ b/zen/thread.h
@@ -11,7 +11,7 @@
#include <memory>
//fix this pathetic boost thread warning mess
-#ifdef __MINGW32__
+#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
@@ -24,7 +24,7 @@
#include <boost/thread.hpp>
-#ifdef __MINGW32__
+#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
#ifdef _MSC_VER
@@ -34,8 +34,8 @@
namespace zen
{
/*
-std::async replacement without crappy semantics:
- 1. guaranteed to run asynchronous
+std::async replacement without crappy semantics:
+ 1. guaranteed to run asynchronous
2. does not follow C++11 [futures.async], Paragraph 5, where std::future waits for thread in destructor
Example:
@@ -79,15 +79,6 @@ private:
-
-
-
-
-
-
-
-
-
//###################### implementation ######################
#ifndef BOOST_HAS_THREADS
#error just some paranoia check...
@@ -99,7 +90,7 @@ auto async2(Function fun) -> boost::unique_future<T> //support for workaround of
#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK //mirror "boost/thread/future.hpp", hopefully they know what they're doing
boost::packaged_task<T()> pt(std::move(fun)); //packaged task seems to even require r-value reference: https://sourceforge.net/p/freefilesync/bugs/234/
#else
- boost::packaged_task<T> pt(std::move(fun));
+ boost::packaged_task<T> pt(std::move(fun));
#endif
auto fut = pt.get_future();
boost::thread(std::move(pt)).detach(); //we have to explicitly detach since C++11: [thread.thread.destr] ~thread() calls std::terminate() if joinable()!!!
diff --git a/zen/tick_count.h b/zen/tick_count.h
index 04ac0902..be4839ca 100644
--- a/zen/tick_count.h
+++ b/zen/tick_count.h
@@ -8,9 +8,18 @@
#define ZEN_TICK_COUNT_HEADER_3807326
#include <cstdint>
-//#include <algorithm>
#include "type_traits.h"
#include "basic_math.h"
+#ifdef FFS_WIN
+#include "win.h" //includes "windows.h"
+
+#elif defined FFS_LINUX
+#include <time.h> //Posix ::clock_gettime()
+
+#elif defined FFS_MAC
+#include <mach/mach_time.h>
+#endif
+//#include <algorithm>
//#include "assert_static.h"
//#include <cmath>
//template <class T> inline
@@ -20,11 +29,6 @@
//}
-#ifdef FFS_WIN
-#include "win.h" //includes "windows.h"
-#elif defined FFS_LINUX
-#include <time.h> //Posix ::clock_gettime()
-#endif
namespace zen
{
@@ -57,6 +61,8 @@ public:
typedef LARGE_INTEGER NativeVal;
#elif defined FFS_LINUX
typedef timespec NativeVal;
+#elif defined FFS_MAC
+ typedef uint64_t NativeVal;
#endif
TickVal() : val_() {}
@@ -67,7 +73,6 @@ public:
{
#ifdef FFS_WIN
return numeric::dist(lhs.val_.QuadPart, rhs.val_.QuadPart); //std::abs(a - b) can lead to overflow!
-
#elif defined FFS_LINUX
const auto distSec = numeric::dist(lhs.val_.tv_sec, rhs.val_.tv_sec);
const auto distNsec = numeric::dist(lhs.val_.tv_nsec, rhs.val_.tv_nsec);
@@ -75,11 +80,13 @@ public:
if (distSec > (std::numeric_limits<std::int64_t>::max() - distNsec) / 1000000000) //truncate instead of overflow!
return std::numeric_limits<std::int64_t>::max();
return distSec * 1000000000 + distNsec;
+#elif defined FFS_MAC
+ return numeric::dist(lhs.val_, rhs.val_);
#endif
}
inline friend
- bool operator<(const TickVal& lhs, const TickVal& rhs) //evaluate directly rather than reuse operator-
+ bool operator<(const TickVal& lhs, const TickVal& rhs)
{
#ifdef FFS_WIN
return lhs.val_.QuadPart < rhs.val_.QuadPart;
@@ -87,6 +94,8 @@ public:
if (lhs.val_.tv_sec != rhs.val_.tv_sec)
return lhs.val_.tv_sec < rhs.val_.tv_sec;
return lhs.val_.tv_nsec < rhs.val_.tv_nsec;
+#elif defined FFS_MAC
+ return lhs.val_ < rhs.val_;
#endif
}
@@ -109,6 +118,12 @@ std::int64_t ticksPerSec() //return 0 on error
#elif defined FFS_LINUX
return 1000000000; //precision: nanoseconds
+
+#elif defined FFS_MAC
+ mach_timebase_info_data_t tbi = {};
+ if (::mach_timebase_info(&tbi) != KERN_SUCCESS)
+ return 0;
+ return 1000000000 * tbi.denom / tbi.numer;
#endif
}
@@ -126,6 +141,9 @@ TickVal getTicks() //return 0 on error
timespec now = {};
if (::clock_gettime(CLOCK_MONOTONIC_RAW, &now) != 0) //CLOCK_MONOTONIC measures time reliably across processors!
return TickVal();
+
+#elif defined FFS_MAC
+ uint64_t now = ::mach_absolute_time(); //can this call fail???
#endif
return TickVal(now);
}
diff --git a/zen/warn_static.h b/zen/warn_static.h
index 70679a12..737a56fb 100644
--- a/zen/warn_static.h
+++ b/zen/warn_static.h
@@ -26,9 +26,8 @@ Usage:
#define ZEN_CONCAT(X, Y) ZEN_CONCAT_SUB(X, Y)
#define warn_static(TXT) \
- typedef int STATIC_WARNING __attribute__ ((deprecated)); \
- enum { ZEN_CONCAT(warn_static_dummy_value, __LINE__) = sizeof(STATIC_WARNING) };
+ typedef int STATIC_WARNING_87903124 __attribute__ ((deprecated)); \
+ enum { ZEN_CONCAT(warn_static_dummy_value, __LINE__) = sizeof(STATIC_WARNING_87903124) };
#endif
-
-#endif //WARN_STATIC_HEADER_08724567834560832745 \ No newline at end of file
+#endif //WARN_STATIC_HEADER_08724567834560832745
diff --git a/zen/zstring.cpp b/zen/zstring.cpp
index 7f4e79db..b371e598 100644
--- a/zen/zstring.cpp
+++ b/zen/zstring.cpp
@@ -6,93 +6,141 @@
#include "zstring.h"
#include <stdexcept>
-#include <zen/stl_tools.h>
#ifdef FFS_WIN
#include "dll.h"
#include "win_ver.h"
+
+#elif defined FFS_MAC
+#include <ctype.h> //toupper()
#endif
#ifndef NDEBUG
+#include "thread.h" //includes <boost/thread.hpp>
#include <iostream>
-#include <cstdlib>
#endif
using namespace zen;
#ifndef NDEBUG
-LeakChecker::~LeakChecker()
+namespace
{
- if (!activeStrings.empty())
+class LeakChecker //small test for memory leaks
+{
+public:
+ void insert(const void* ptr, size_t size)
{
- std::string leakingStrings;
+ boost::lock_guard<boost::mutex> dummy(lockActStrings);
+ if (activeStrings.find(ptr) != activeStrings.end())
+ reportProblem("Fatal Error: New memory points into occupied space: " + rawMemToString(ptr, size));
- int items = 0;
- for (auto it = activeStrings.begin(); it != activeStrings.end() && items < 20; ++it, ++items)
- leakingStrings += "\"" + rawMemToString(it->first, it->second) + "\"\n";
+ activeStrings[ptr] = size;
+ }
- const std::string message = std::string("Memory leak detected!") + "\n\n"
- + "Candidates:\n" + leakingStrings;
-#ifdef FFS_WIN
- MessageBoxA(nullptr, message.c_str(), "Error", 0);
-#else
- std::cerr << message;
- std::abort();
-#endif
+ void remove(const void* ptr)
+ {
+ boost::lock_guard<boost::mutex> dummy(lockActStrings);
+ if (activeStrings.find(ptr) == activeStrings.end())
+ reportProblem("Fatal Error: No memory available for deallocation at this location!");
+
+ activeStrings.erase(ptr);
}
-}
+ static LeakChecker& instance() { static LeakChecker inst; return inst; }
-LeakChecker& LeakChecker::instance()
-{
- static LeakChecker inst;
- return inst;
-}
+private:
+ LeakChecker() {}
+ ~LeakChecker()
+ {
+ if (!activeStrings.empty())
+ {
+ std::string leakingStrings;
-//caveat: function scope static initialization is not thread-safe in VS 2010! => make sure to call at app start!
-namespace
-{
-const LeakChecker& dummy = LeakChecker::instance();
-}
+ int items = 0;
+ for (auto it = activeStrings.begin(); it != activeStrings.end() && items < 20; ++it, ++items)
+ leakingStrings += "\"" + rawMemToString(it->first, it->second) + "\"\n";
+ const std::string message = std::string("Memory leak detected!") + "\n\n"
+ + "Candidates:\n" + leakingStrings;
+#ifdef FFS_WIN
+ MessageBoxA(nullptr, message.c_str(), "Error", 0);
+#else
+ std::cerr << message;
+ std::abort();
+#endif
+ }
+ }
-std::string LeakChecker::rawMemToString(const void* ptr, size_t size)
-{
- std::string output = std::string(reinterpret_cast<const char*>(ptr), size);
- vector_remove_if(output, [](char& c) { return c == 0; }); //remove intermediate 0-termination
- if (output.size() > 100)
- output.resize(100);
- return output;
-}
+ LeakChecker(const LeakChecker&);
+ LeakChecker& operator=(const LeakChecker&);
+ static std::string rawMemToString(const void* ptr, size_t size)
+ {
+ std::string output(reinterpret_cast<const char*>(ptr), size);
+ vector_remove_if(output, [](char& c) { return c == 0; }); //remove intermediate 0-termination
+ if (output.size() > 100)
+ output.resize(100);
+ return output;
+ }
-void LeakChecker::reportProblem(const std::string& message) //throw std::logic_error
-{
+ void reportProblem(const std::string& message) //throw std::logic_error
+ {
#ifdef FFS_WIN
- ::MessageBoxA(nullptr, message.c_str(), "Error", 0);
+ ::MessageBoxA(nullptr, message.c_str(), "Error", 0);
#else
- std::cerr << message;
+ std::cerr << message;
#endif
- throw std::logic_error("Memory leak! " + message);
+ throw std::logic_error("Memory leak! " + message);
+ }
+
+ boost::mutex lockActStrings;
+ zen::hash_map<const void*, size_t> activeStrings;
+};
+
+//caveat: function scope static initialization is not thread-safe in VS 2010! => make sure to call at app start!
+const LeakChecker& dummy = LeakChecker::instance();
}
+
+void z_impl::leakCheckerInsert(const void* ptr, size_t size) { LeakChecker::instance().insert(ptr, size); }
+void z_impl::leakCheckerRemove(const void* ptr ) { LeakChecker::instance().remove(ptr); }
#endif //NDEBUG
+/*
+Perf test: compare strings 10 mio times; 64 bit build
+-----------------------------------------------------
+ string a = "Fjk84$%kgfj$%T\\\\Gffg\\gsdgf\\fgsx----------d-"
+ string b = "fjK84$%kgfj$%T\\\\gfFg\\gsdgf\\fgSy----------dfdf"
+
+Windows (UTF16 wchar_t)
+ 4 ns | wcscmp
+ 67 ns | CompareStringOrdinalFunc+ + bIgnoreCase
+314 ns | LCMapString + wmemcmp
+
+OS X (UTF8 char)
+ 6 ns | strcmp
+ 98 ns | strcasecmp
+ 120 ns | strncasecmp + std::min(sizeLhs, sizeRhs);
+ 856 ns | CFStringCreateWithCString + CFStringCompare(kCFCompareCaseInsensitive)
+1110 ns | CFStringCreateWithCStringNoCopy + CFStringCompare(kCFCompareCaseInsensitive)
+________________________
+time per call | function
+*/
+
+
#ifdef FFS_WIN
namespace
{
-#ifndef LOCALE_INVARIANT //invariant locale has been introduced with XP
-#define LOCALE_INVARIANT 0x007f
+#ifndef LOCALE_INVARIANT //not known to MinGW
+#define LOCALE_INVARIANT 0x007f
#endif
-
//warning: LOCALE_INVARIANT is NOT available with Windows 2000, so we have to make yet another distinction...
const LCID ZSTRING_INVARIANT_LOCALE = zen::winXpOrLater() ?
LOCALE_INVARIANT :
MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); //see: http://msdn.microsoft.com/en-us/goglobal/bb688122.aspx
-
//try to call "CompareStringOrdinal" for low-level string comparison: unfortunately available not before Windows Vista!
//by a factor ~3 faster than old string comparison using "LCMapString"
typedef int (WINAPI* CompareStringOrdinalFunc)(LPCWSTR lpString1,
@@ -104,7 +152,7 @@ const SysDllFun<CompareStringOrdinalFunc> compareStringOrdinal = SysDllFun<Compa
}
-int z_impl::compareFilenamesWin(const wchar_t* lhs, const wchar_t* rhs, size_t sizeLhs, size_t sizeRhs)
+int z_impl::compareFilenamesNoCase(const wchar_t* lhs, const wchar_t* rhs, size_t sizeLhs, size_t sizeRhs)
{
//caveat: function scope static initialization is not thread-safe in VS 2010!
if (compareStringOrdinal) //this additional test has no noticeable performance impact
@@ -165,26 +213,12 @@ int z_impl::compareFilenamesWin(const wchar_t* lhs, const wchar_t* rhs, size_t s
return rv;
}
}
-
return static_cast<int>(sizeLhs) - static_cast<int>(sizeRhs);
}
-
- // const int rv = CompareString(
- // invariantLocale, //locale independent
- // NORM_IGNORECASE | SORT_STRINGSORT, //comparison-style options
- // a, //pointer to first string
- // aCount, //size, in bytes or characters, of first string
- // b, //pointer to second string
- // bCount); //size, in bytes or characters, of second string
- //
- // if (rv == 0)
- // throw std::runtime_error("Error comparing strings!");
- // else
- // return rv - 2; //convert to C-style string compare result
}
-void z_impl::makeUpperCaseWin(wchar_t* str, size_t size)
+void z_impl::makeFilenameUpperCase(wchar_t* str, size_t size)
{
if (size == 0) //LCMapString does not allow input sizes of 0!
return;
@@ -194,38 +228,10 @@ void z_impl::makeUpperCaseWin(wchar_t* str, size_t size)
throw std::runtime_error("Error converting to upper case! (LCMapString)");
}
-
-/*
-#include <fstream>
- extern std::wofstream statShared;
-extern std::wofstream statLowCapacity;
-extern std::wofstream statOverwrite;
-
-std::wstring p(ptr);
-p.erase(std::remove(p.begin(), p.end(), L'\n'), p.end());
-p.erase(std::remove(p.begin(), p.end(), L','), p.end());
-
- if (descr(ptr)->refCount > 1)
- statShared <<
- minCapacity << L"," <<
- descr(ptr)->refCount << L"," <<
- descr(ptr)->length << L"," <<
- descr(ptr)->capacity << L"," <<
- p << L"\n";
-else if (minCapacity > descr(ptr)->capacity)
- statLowCapacity <<
- minCapacity << L"," <<
- descr(ptr)->refCount << L"," <<
- descr(ptr)->length << L"," <<
- descr(ptr)->capacity << L"," <<
- p << L"\n";
-else
- statOverwrite <<
- minCapacity << L"," <<
- descr(ptr)->refCount << L"," <<
- descr(ptr)->length << L"," <<
- descr(ptr)->capacity << L"," <<
- p << L"\n";
-*/
-
-#endif //FFS_WIN
+#elif defined FFS_MAC
+void z_impl::makeFilenameUpperCase(char* str, size_t size)
+{
+ std::for_each(str, str + size, [](char& c) { c = static_cast<char>(::toupper(static_cast<unsigned char>(c))); }); //locale-dependent!
+ //result of toupper() is an unsigned char mapped to int range, so the char representation is in the last 8 bits and we need not care about signedness!
+}
+#endif
diff --git a/zen/zstring.h b/zen/zstring.h
index df96df7b..f4a79181 100644
--- a/zen/zstring.h
+++ b/zen/zstring.h
@@ -7,72 +7,38 @@
#ifndef ZSTRING_H_INCLUDED
#define ZSTRING_H_INCLUDED
-#include <cstring> //strcmp()
#include "string_base.h"
-
-#ifndef NDEBUG
-#include "thread.h" //includes <boost/thread.hpp>
-#include <map>
+#ifdef FFS_LINUX
+#include <cstring> //strcmp
+#elif defined FFS_MAC
+#include <strings.h> //strcasecmp
#endif
#ifndef NDEBUG
-class LeakChecker //small test for memory leaks
+namespace z_impl
{
-public:
- void insert(const void* ptr, size_t size)
- {
- boost::lock_guard<boost::mutex> dummy(lockActStrings);
- if (activeStrings.find(ptr) != activeStrings.end())
- reportProblem("Fatal Error: New memory points into occupied space: " + rawMemToString(ptr, size));
-
- activeStrings[ptr] = size;
- }
-
- void remove(const void* ptr)
- {
- boost::lock_guard<boost::mutex> dummy(lockActStrings);
- if (activeStrings.find(ptr) == activeStrings.end())
- reportProblem("Fatal Error: No memory available for deallocation at this location!");
-
- activeStrings.erase(ptr);
- }
-
- static LeakChecker& instance();
-
-private:
- LeakChecker() {}
- LeakChecker(const LeakChecker&);
- LeakChecker& operator=(const LeakChecker&);
- ~LeakChecker();
-
- static std::string rawMemToString(const void* ptr, size_t size);
- void reportProblem(const std::string& message); //throw std::logic_error
-
- boost::mutex lockActStrings;
- zen::hash_map<const void*, size_t> activeStrings;
-};
+void leakCheckerInsert(const void* ptr, size_t size);
+void leakCheckerRemove(const void* ptr);
+}
#endif //NDEBUG
-
class AllocatorFreeStoreChecked
{
public:
static void* allocate(size_t size) //throw std::bad_alloc
{
-#ifndef NDEBUG
void* newMem = ::operator new(size);
- LeakChecker::instance().insert(newMem, size); //test Zbase for memory leaks
- return newMem;
-#else
- return ::operator new(size);
+#ifndef NDEBUG
+ z_impl::leakCheckerInsert(newMem, size); //test Zbase for memory leaks
#endif
+ return newMem;
}
static void deallocate(void* ptr)
{
#ifndef NDEBUG
- LeakChecker::instance().remove(ptr); //check for memory leaks
+ z_impl::leakCheckerRemove(ptr); //check for memory leaks
#endif
::operator delete(ptr);
}
@@ -82,66 +48,50 @@ public:
//############################## helper functions #############################################
-#if defined(FFS_WIN) || defined(FFS_LINUX)
-//Compare filenames: Windows does NOT distinguish between upper/lower-case, while Linux DOES
-template <class T, template <class, class> class SP, class AP> int cmpFileName(const zen::Zbase<T, SP, AP>& lhs, const zen::Zbase<T, SP, AP>& rhs);
-
-struct LessFilename //case-insensitive on Windows, case-sensitive on Linux
-{
- template <class T, template <class, class> class SP, class AP>
- bool operator()(const zen::Zbase<T, SP, AP>& lhs, const zen::Zbase<T, SP, AP>& rhs) const;
-};
-
-struct EqualFilename //case-insensitive on Windows, case-sensitive on Linux
-{
- template <class T, template <class, class> class SP, class AP>
- bool operator()(const zen::Zbase<T, SP, AP>& lhs, const zen::Zbase<T, SP, AP>& rhs) const;
-};
-#endif
-
-#ifdef FFS_WIN
-template <template <class, class> class SP, class AP>
-void makeUpper(zen::Zbase<wchar_t, SP, AP>& str);
-#endif
#ifdef FFS_WIN //Windows encodes Unicode as UTF-16 wchar_t
typedef wchar_t Zchar;
#define Zstr(x) L ## x
const Zchar FILE_NAME_SEPARATOR = L'\\';
-#elif defined FFS_LINUX //Linux uses UTF-8
+#elif defined FFS_LINUX || defined FFS_MAC //Linux uses UTF-8
typedef char Zchar;
#define Zstr(x) x
const Zchar FILE_NAME_SEPARATOR = '/';
-
-#else
-#error define your platform: FFS_WIN or FFS_LINUX
#endif
//"The reason for all the fuss above" - Loki/SmartPtr
-//a high-performance string for use as file name in multithreaded contexts
+//a high-performance string for interfacing with native OS APIs and multithreaded contexts
typedef zen::Zbase<Zchar, zen::StorageRefCountThreadSafe, AllocatorFreeStoreChecked> Zstring;
-inline
-Zstring appendSeparator(Zstring path) //support rvalue references!
-{
- return endsWith(path, FILE_NAME_SEPARATOR) ? path : (path += FILE_NAME_SEPARATOR);
-}
-
-
-
-
-
-
-
-
-
+//Compare filenames: Windows does NOT distinguish between upper/lower-case, while Linux DOES
+template <template <class, class> class SP, class AP>
+int cmpFileName(const zen::Zbase<Zchar, SP, AP>& lhs, const zen::Zbase<Zchar, SP, AP>& rhs);
+struct LessFilename //case-insensitive on Windows, case-sensitive on Linux
+{
+ template <template <class, class> class SP, class AP>
+ bool operator()(const zen::Zbase<Zchar, SP, AP>& lhs, const zen::Zbase<Zchar, SP, AP>& rhs) const { return cmpFileName(lhs, rhs) < 0; }
+};
+struct EqualFilename //case-insensitive on Windows, case-sensitive on Linux
+{
+ template <template <class, class> class SP, class AP>
+ bool operator()(const zen::Zbase<Zchar, SP, AP>& lhs, const zen::Zbase<Zchar, SP, AP>& rhs) const { return cmpFileName(lhs, rhs) == 0; }
+};
+#if defined FFS_WIN || defined FFS_MAC
+template <template <class, class> class SP, class AP>
+void makeUpper(zen::Zbase<Zchar, SP, AP>& str);
+#endif
+inline
+Zstring appendSeparator(Zstring path) //support rvalue references!
+{
+ return endsWith(path, FILE_NAME_SEPARATOR) ? path : (path += FILE_NAME_SEPARATOR);
+}
@@ -149,53 +99,35 @@ Zstring appendSeparator(Zstring path) //support rvalue references!
//################################# inline implementation ########################################
-#if defined(FFS_WIN) || defined(FFS_LINUX)
namespace z_impl
{
-int compareFilenamesWin(const wchar_t* lhs, const wchar_t* rhs, size_t sizeLhs, size_t sizeRhs);
-void makeUpperCaseWin(wchar_t* str, size_t size);
-}
-
-
-template <class T, template <class, class> class SP, class AP> inline
-int cmpFileName(const zen::Zbase<T, SP, AP>& lhs, const zen::Zbase<T, SP, AP>& rhs)
-{
-#ifdef FFS_WIN
- return z_impl::compareFilenamesWin(lhs.data(), rhs.data(), lhs.length(), rhs.length());
-#elif defined FFS_LINUX
- return ::strcmp(lhs.c_str(), rhs.c_str()); //POSIX filenames don't have embedded 0
+#if defined FFS_WIN
+int compareFilenamesNoCase(const Zchar* lhs, const Zchar* rhs, size_t sizeLhs, size_t sizeRhs);
#endif
-}
-
-
-template <class T, template <class, class> class SP, class AP> inline
-bool LessFilename::operator()(const zen::Zbase<T, SP, AP>& lhs, const zen::Zbase<T, SP, AP>& rhs) const
-{
-#ifdef FFS_WIN
- return z_impl::compareFilenamesWin(lhs.data(), rhs.data(), lhs.length(), rhs.length()) < 0;
-#elif defined FFS_LINUX
- return ::strcmp(lhs.c_str(), rhs.c_str()) < 0; //POSIX filenames don't have embedded 0
+#if defined FFS_WIN || defined FFS_MAC
+void makeFilenameUpperCase(Zchar* str, size_t size);
#endif
}
-template <class T, template <class, class> class SP, class AP> inline
-bool EqualFilename::operator()(const zen::Zbase<T, SP, AP>& lhs, const zen::Zbase<T, SP, AP>& rhs) const
+template <template <class, class> class SP, class AP> inline
+int cmpFileName(const zen::Zbase<Zchar, SP, AP>& lhs, const zen::Zbase<Zchar, SP, AP>& rhs)
{
-#ifdef FFS_WIN
- return z_impl::compareFilenamesWin(lhs.data(), rhs.data(), lhs.length(), rhs.length()) == 0;
+#if defined FFS_WIN
+ return z_impl::compareFilenamesNoCase(lhs.data(), rhs.data(), lhs.length(), rhs.length());
#elif defined FFS_LINUX
- return ::strcmp(lhs.c_str(), rhs.c_str()) == 0; //POSIX filenames don't have embedded 0
+ return std::strcmp(lhs.c_str(), rhs.c_str()); //POSIX filenames don't have embedded 0
+#elif defined FFS_MAC
+ return ::strcasecmp(lhs.c_str(), rhs.c_str()); //locale-dependent!
#endif
}
-#endif //defined(FFS_WIN) || defined(FFS_LINUX)
-#ifdef FFS_WIN
+#if defined FFS_WIN || defined FFS_MAC
template <template <class, class> class SP, class AP> inline
-void makeUpper(zen::Zbase<wchar_t, SP, AP>& str)
+void makeUpper(zen::Zbase<Zchar, SP, AP>& str)
{
- z_impl::makeUpperCaseWin(str.begin(), str.length());
+ z_impl::makeFilenameUpperCase(str.begin(), str.length());
}
#endif
diff --git a/zenxml/bind.h b/zenxml/bind.h
new file mode 100644
index 00000000..b297b607
--- /dev/null
+++ b/zenxml/bind.h
@@ -0,0 +1,389 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef ZEN_XML_BIND_HEADER_9081740816593478258435
+#define ZEN_XML_BIND_HEADER_9081740816593478258435
+
+#include <set>
+#include "cvrt_struc.h"
+#include "parser.h"
+#include "io.h"
+
+namespace zen
+{
+/**
+\file
+\brief Map user data types to XML
+*/
+
+///Load XML document from a file
+/**
+Convenience function that does nothing more than calling loadStream() and parse().
+
+\tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+\param filename Input file name
+\param doc The XML document to load
+\throw XmlFileError
+\throw XmlParsingError
+*/
+template <class String> inline
+void load(const String& filename, XmlDoc& doc) //throw XmlFileError, XmlParsingError
+{
+ std::string stream = loadStream(filename); //throw XmlFileError
+ parse(stream, doc); //throw XmlParsingError
+}
+
+
+///Save XML document to a file
+/**
+Convenience function that does nothing more than calling serialize() and saveStream().
+
+\tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+\param doc The XML document to save
+\param filename Output file name
+\param lineBreak Line break, default: carriage return + new line
+\param indent Indentation, default: four space characters
+\throw XmlFileError
+*/
+template <class String> inline
+void save(const XmlDoc& doc,
+ const String& filename,
+ const std::string& lineBreak = "\r\n",
+ const std::string& indent = " ") //throw XmlFileError
+{
+ std::string stream = serialize(doc, lineBreak, indent); //throw ()
+ saveStream(stream, filename); //throw XmlFileError
+}
+
+
+///Proxy class to conveniently convert user data into XML structure
+class XmlOut
+{
+public:
+ ///Construct an output proxy for an XML document
+ /**
+ \code
+ zen::XmlDoc doc;
+
+ zen::XmlOut out(doc);
+ out["elem1"](value1); //
+ out["elem2"](value2); //write data of variables "value1", "value2", "value3" into XML elements
+ out["elem3"](value3); //
+
+ save(doc, "out.xml"); //throw XmlFileError
+ \endcode
+ Output:
+ \verbatim
+ <?xml version="1.0" encoding="UTF-8"?>
+ <Root>
+ <elem1>1</elem1>
+ <elem2>2.000000</elem2>
+ <elem3>-3</elem3>
+ </Root>
+ \endverbatim
+ */
+ XmlOut(XmlDoc& doc) : ref_(&doc.root()) {}
+ ///Construct an output proxy for a single XML element
+ /**
+ \sa XmlOut(XmlDoc& doc)
+ */
+ XmlOut(XmlElement& element) : ref_(&element) {}
+
+ ///Retrieve a handle to an XML child element for writing
+ /**
+ The child element will be created if it is not yet existing.
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \param name The name of the child element
+ */
+ template <class String>
+ XmlOut operator[](const String& name) const
+ {
+ const std::string utf8name = utfCvrtTo<std::string>(name);
+ XmlElement* child = ref_->getChild(utf8name);
+ return child ? *child : ref_->addChild(utf8name);
+ }
+
+ ///Write user data to the underlying XML element
+ /**
+ This conversion requires a specialization of zen::writeText() or zen::writeStruc() for type T.
+ \tparam T User type that is converted into an XML element value.
+ */
+ template <class T>
+ void operator()(const T& value) { writeStruc(value, *ref_); }
+
+ ///Write user data to an XML attribute
+ /**
+ This conversion requires a specialization of zen::writeText() for type T.
+ \code
+ zen::XmlDoc doc;
+
+ zen::XmlOut out(doc);
+ out["elem"].attribute("attr1", value1); //
+ out["elem"].attribute("attr2", value2); //write data of variables "value1", "value2", "value3" into XML attributes
+ out["elem"].attribute("attr3", value3); //
+
+ save(doc, "out.xml"); //throw XmlFileError
+ \endcode
+ Output:
+ \verbatim
+ <?xml version="1.0" encoding="UTF-8"?>
+ <Root>
+ <elem attr1="1" attr2="2.000000" attr3="-3"/>
+ </Root>
+ \endverbatim
+
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \tparam T User type that is converted into an XML attribute value.
+ \sa XmlElement::setAttribute()
+ */
+ template <class String, class T>
+ void attribute(const String& name, const T& value) { ref_->setAttribute(name, value); }
+
+ ///Return a reference to the underlying Xml element
+ XmlElement& ref() { return *ref_; }
+
+private:
+ XmlElement* ref_; //always bound!
+};
+
+
+///Proxy class to conveniently convert XML structure to user data
+class XmlIn
+{
+ class ErrorLog;
+ struct ConversionToBool { int dummy; };
+
+public:
+ ///Construct an input proxy for an XML document
+ /**
+ \code
+ zen::XmlDoc doc;
+ ... //load document
+ zen::XmlIn in(doc);
+ in["elem1"](value1); //
+ in["elem2"](value2); //write data of XML elements into variables "value1", "value2", "value3"
+ in["elem3"](value3); //
+ \endcode
+ */
+ XmlIn(const XmlDoc& doc) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(&doc.root()); }
+ ///Construct an input proxy for a single XML element, may be nullptr
+ /**
+ \sa XmlIn(const XmlDoc& doc)
+ */
+ XmlIn(const XmlElement* element) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(element); }
+ ///Construct an input proxy for a single XML element
+ /**
+ \sa XmlIn(const XmlDoc& doc)
+ */
+ XmlIn(const XmlElement& element) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(&element); }
+
+ ///Retrieve a handle to an XML child element for reading
+ /**
+ It is \b not an error if the child element does not exist, but a subsequent conversion to user data will fail.
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \param name The name of the child element
+ */
+ template <class String>
+ XmlIn operator[](const String& name) const
+ {
+ std::vector<const XmlElement*> childList;
+
+ if (refIndex < refList.size())
+ {
+ auto iterPair = refList[refIndex]->getChildren(name);
+ std::for_each(iterPair.first, iterPair.second,
+ [&](const XmlElement & child) { childList.push_back(&child); });
+ }
+
+ return XmlIn(childList, childList.empty() ? getChildNameFormatted(name) : std::string(), log);
+ }
+
+ ///Refer to next sibling element with the same name
+ /**
+ <b>Example:</b> Loop over all XML child elements named "Item"
+ \verbatim
+ <?xml version="1.0" encoding="UTF-8"?>
+ <Root>
+ <Item>1</Item>
+ <Item>3</Item>
+ <Item>5</Item>
+ </Root>
+ \endverbatim
+
+ \code
+ zen::XmlIn in(doc);
+ ...
+ for (zen::XmlIn child = in["Item"]; child; child.next())
+ {
+ ...
+ }
+ \endcode
+ */
+ void next() { ++refIndex; }
+
+ ///Read user data from the underlying XML element
+ /**
+ This conversion requires a specialization of zen::readText() or zen::readStruc() for type T.
+ \tparam T User type that receives the data
+ \return "true" if data was read successfully
+ */
+ template <class T>
+ bool operator()(T& value) const
+ {
+ if (refIndex < refList.size())
+ {
+ bool success = readStruc(*refList[refIndex], value);
+ if (!success)
+ log->notifyConversionError(getNameFormatted());
+ return success;
+ }
+ else
+ {
+ log->notifyMissingElement(getNameFormatted());
+ return false;
+ }
+ }
+
+ ///Read user data from an XML attribute
+ /**
+ This conversion requires a specialization of zen::readText() for type T.
+
+ \code
+ zen::XmlDoc doc;
+ ... //load document
+ zen::XmlIn in(doc);
+ in["elem"].attribute("attr1", value1); //
+ in["elem"].attribute("attr2", value2); //write data of XML attributes into variables "value1", "value2", "value3"
+ in["elem"].attribute("attr3", value3); //
+ \endcode
+
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \tparam T User type that is converted into an XML attribute value.
+ \sa XmlElement::getAttribute()
+ */
+ template <class String, class T>
+ bool attribute(const String& name, T& value) const
+ {
+ if (refIndex < refList.size())
+ {
+ bool success = refList[refIndex]->getAttribute(name, value);
+ if (!success)
+ log->notifyMissingAttribute(getNameFormatted(), utfCvrtTo<std::string>(name));
+ return success;
+ }
+ else
+ {
+ log->notifyMissingElement(getNameFormatted());
+ return false;
+ }
+ }
+
+ ///Return a pointer to the underlying Xml element, may be nullptr
+ const XmlElement* get() const { return refIndex < refList.size() ? refList[refIndex] : nullptr; }
+
+ ///Test whether underlying XML element exists
+ /**
+ \code
+ XmlIn in(doc);
+ XmlIn child = in["elem1"];
+ if (child)
+ ...
+ \endcode
+ Use member pointer as implicit conversion to bool (C++ Templates - Vandevoorde/Josuttis; chapter 20)
+ */
+ operator int ConversionToBool::* () const { return get() ? &ConversionToBool::dummy : nullptr; }
+
+ ///Notifies errors while mapping the XML to user data
+ /**
+ Error logging is shared by each hiearchy of XmlIn proxy instances that are created from each other. Consequently it doesn't matter which instance you query for errors:
+ \code
+ XmlIn in(doc);
+ XmlIn inItem = in["item1"];
+
+ int value = 0;
+ inItem(value); //assume this conversion failed
+
+ assert(in.errorsOccured() == inItem.errorsOccured());
+ assert(in.getErrorsAs<std::string>() == inItem.getErrorsAs<std::string>());
+ \endcode
+
+ Note that error logging is \b NOT global, but owned by all instances of a hierarchy of XmlIn proxies.
+ Therefore it's safe to use unrelated XmlIn proxies in multiple threads.
+ \n\n
+ However be aware that the chain of connected proxy instances will be broken once you call XmlIn::get() to retrieve the underlying pointer.
+ Errors that occur when working with this pointer are not logged by the original set of related instances.
+ */
+ bool errorsOccured() const { return !log->elementList().empty(); }
+
+ ///Get a list of XML element and attribute names which failed to convert to user data.
+ /**
+ \tparam String Arbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
+ \returns A list of XML element and attribute names, empty list if no errors occured.
+ */
+ template <class String>
+ std::vector<String> getErrorsAs() const
+ {
+ std::vector<String> output;
+ const auto& elements = log->elementList();
+ std::transform(elements.begin(), elements.end(), std::back_inserter(output), [](const std::string& str) { return utfCvrtTo<String>(str); });
+ return output;
+ }
+
+private:
+ XmlIn(const std::vector<const XmlElement*>& siblingList, const std::string& elementNameFmt, const std::shared_ptr<ErrorLog>& sharedlog) :
+ refList(siblingList), refIndex(0), formattedName(elementNameFmt), log(sharedlog)
+ { assert((!siblingList.empty() && elementNameFmt.empty()) || (siblingList.empty() && !elementNameFmt.empty())); }
+
+ static std::string getNameFormatted(const XmlElement& elem) //"<Root> <Level1> <Level2>"
+ {
+ return (elem.parent() ? getNameFormatted(*elem.parent()) + " " : std::string()) + "<" + elem.getNameAs<std::string>() + ">";
+ }
+
+ std::string getNameFormatted() const
+ {
+ if (refIndex < refList.size())
+ {
+ assert(formattedName.empty());
+ return getNameFormatted(*refList[refIndex]);
+ }
+ else
+ return formattedName;
+ }
+
+ std::string getChildNameFormatted(const std::string& childName) const
+ {
+ std::string parentName = getNameFormatted();
+ return (parentName.empty() ? std::string() : (parentName + " ")) + "<" + childName + ">";
+ }
+
+ class ErrorLog
+ {
+ public:
+ void notifyConversionError (const std::string& formattedName) { insert(formattedName); }
+ void notifyMissingElement (const std::string& formattedName) { insert(formattedName); }
+ void notifyMissingAttribute(const std::string& formattedName, const std::string& attribName) { insert(formattedName + " @" + attribName); }
+
+ const std::vector<std::string>& elementList() const { return failedElements; }
+
+ private:
+ void insert(const std::string& newVal)
+ {
+ if (usedElements.insert(newVal).second)
+ failedElements.push_back(newVal);
+ }
+
+ std::vector<std::string> failedElements; //unique list of failed elements
+ std::set<std::string> usedElements;
+ };
+
+ std::vector<const XmlElement*> refList; //all sibling elements with same name (all pointers bound!)
+ size_t refIndex; //this sibling's index in refList
+ std::string formattedName; //contains full and formatted element name if (and only if) refList is empty
+ std::shared_ptr<ErrorLog> log; //always bound
+};
+}
+
+#endif //ZEN_XML_BIND_HEADER_9081740816593478258435
diff --git a/zenxml/cvrt_struc.h b/zenxml/cvrt_struc.h
new file mode 100644
index 00000000..5f7f4ad1
--- /dev/null
+++ b/zenxml/cvrt_struc.h
@@ -0,0 +1,218 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
+#define ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
+
+#include "dom.h"
+
+namespace zen
+{
+/**
+\file
+\brief Handle conversion of arbitrary types to and from XML elements.
+See comments in cvrt_text.h
+*/
+
+///Convert XML element to structured user data
+/**
+ \param input The input XML element.
+ \param value Conversion target value.
+ \return "true" if value was read successfully.
+*/
+template <class T> bool readStruc(const XmlElement& input, T& value);
+///Convert structured user data into an XML element
+/**
+ \param value The value to be converted.
+ \param output The output XML element.
+*/
+template <class T> void writeStruc(const T& value, XmlElement& output);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//------------------------------ implementation -------------------------------------
+namespace impl_2384343
+{
+ZEN_INIT_DETECT_MEMBER_TYPE(value_type);
+ZEN_INIT_DETECT_MEMBER_TYPE(iterator);
+ZEN_INIT_DETECT_MEMBER_TYPE(const_iterator);
+
+ZEN_INIT_DETECT_MEMBER(begin) //
+ZEN_INIT_DETECT_MEMBER(end) //we don't know the exact declaration of the member attribute: may be in a base class!
+ZEN_INIT_DETECT_MEMBER(insert) //
+}
+
+template <typename T>
+struct IsStlContainer :
+ StaticBool<
+ impl_2384343::HasMemberType_value_type <T>::value &&
+ impl_2384343::HasMemberType_iterator <T>::value &&
+ impl_2384343::HasMemberType_const_iterator<T>::value &&
+ impl_2384343::HasMember_begin <T>::value &&
+ impl_2384343::HasMember_end <T>::value &&
+ impl_2384343::HasMember_insert <T>::value> {};
+
+
+namespace impl_2384343
+{
+ZEN_INIT_DETECT_MEMBER_TYPE(first_type);
+ZEN_INIT_DETECT_MEMBER_TYPE(second_type);
+
+ZEN_INIT_DETECT_MEMBER(first) //we don't know the exact declaration of the member attribute: may be in a base class!
+ZEN_INIT_DETECT_MEMBER(second) //
+}
+
+template <typename T>
+struct IsStlPair :
+ StaticBool<
+ impl_2384343::HasMemberType_first_type <T>::value &&
+ impl_2384343::HasMemberType_second_type<T>::value &&
+ impl_2384343::HasMember_first <T>::value &&
+ impl_2384343::HasMember_second <T>::value> {};
+
+//######################################################################################
+
+//Conversion from arbitrary types to an XML element
+enum ValueType
+{
+ VALUE_TYPE_STL_CONTAINER,
+ VALUE_TYPE_STL_PAIR,
+ VALUE_TYPE_OTHER,
+};
+
+template <class T>
+struct GetValueType : StaticEnum<ValueType,
+ GetTextType<T>::value != TEXT_TYPE_OTHER ? VALUE_TYPE_OTHER : //some string classes are also STL containers, so check this first
+ IsStlContainer<T>::value ? VALUE_TYPE_STL_CONTAINER :
+ IsStlPair<T>::value ? VALUE_TYPE_STL_PAIR :
+ VALUE_TYPE_OTHER> {};
+
+
+template <class T, ValueType type>
+struct ConvertElement;
+/* -> expected interface
+{
+ void writeStruc(const T& value, XmlElement& output) const;
+ bool readStruc(const XmlElement& input, T& value) const;
+};
+*/
+
+
+//partial specialization: handle conversion for all STL-container types!
+template <class T>
+struct ConvertElement<T, VALUE_TYPE_STL_CONTAINER>
+{
+ void writeStruc(const T& value, XmlElement& output) const
+ {
+ std::for_each(value.begin(), value.end(),
+ [&](const typename T::value_type & childVal)
+ {
+ XmlElement& newChild = output.addChild("Item");
+ zen::writeStruc(childVal, newChild);
+ });
+ }
+ bool readStruc(const XmlElement& input, T& value) const
+ {
+ bool success = true;
+ value.clear();
+
+ auto iterPair = input.getChildren("Item");
+ for (auto iter = iterPair.first; iter != iterPair.second; ++iter)
+ {
+ typename T::value_type childVal; //MSVC 2010 bug: cannot put this into a lambda body
+ if (zen::readStruc(*iter, childVal))
+ value.insert(value.end(), childVal);
+ else
+ success = false;
+ }
+ return success;
+ }
+};
+
+
+//partial specialization: handle conversion for std::pair
+template <class T>
+struct ConvertElement<T, VALUE_TYPE_STL_PAIR>
+{
+ void writeStruc(const T& value, XmlElement& output) const
+ {
+ XmlElement& child1 = output.addChild("one"); //don't use "1st/2nd", this will confuse a few pedantic XML parsers
+ zen::writeStruc(value.first, child1);
+
+ XmlElement& child2 = output.addChild("two");
+ zen::writeStruc(value.second, child2);
+ }
+ bool readStruc(const XmlElement& input, T& value) const
+ {
+ bool success = true;
+ const XmlElement* child1 = input.getChild("one");
+ if (!child1 || !zen::readStruc(*child1, value.first))
+ success = false;
+
+ const XmlElement* child2 = input.getChild("two");
+ if (!child2 || !zen::readStruc(*child2, value.second))
+ success = false;
+
+ return success;
+ }
+};
+
+
+//partial specialization: not a pure structured type, try text conversion (thereby respect user specializations of writeText()/readText())
+template <class T>
+struct ConvertElement<T, VALUE_TYPE_OTHER>
+{
+ void writeStruc(const T& value, XmlElement& output) const
+ {
+ std::string tmp;
+ writeText(value, tmp);
+ output.setValue(tmp);
+ }
+ bool readStruc(const XmlElement& input, T& value) const
+ {
+ std::string rawStr;
+ input.getValue(rawStr);
+ return readText(rawStr, value);
+ }
+};
+
+
+template <class T> inline
+void writeStruc(const T& value, XmlElement& output)
+{
+ ConvertElement<T, GetValueType<T>::value>().writeStruc(value, output);
+}
+
+
+template <class T> inline
+bool readStruc(const XmlElement& input, T& value)
+{
+ return ConvertElement<T, GetValueType<T>::value>().readStruc(input, value);
+}
+}
+
+#endif //ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
diff --git a/zenxml/cvrt_text.h b/zenxml/cvrt_text.h
new file mode 100644
index 00000000..a70c0813
--- /dev/null
+++ b/zenxml/cvrt_text.h
@@ -0,0 +1,229 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
+#define ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
+
+#include <zen/utf.h>
+#include <zen/string_tools.h>
+
+namespace zen
+{
+/**
+\file
+\brief Handle conversion of string-convertible types to and from std::string.
+
+It is \b not required to call these functions directly. They are implicitly used by zen::XmlElement::getValue(),
+zen::XmlElement::setValue(), zen::XmlElement::getAttribute() and zen::XmlElement::setAttribute().
+\n\n
+Conversions for the following user types are supported by default:
+ - strings - std::string, std::wstring, char*, wchar_t*, char, wchar_t, ect..., all STL-compatible-string-classes
+ - numbers - int, double, float, bool, long, ect..., all built-in numbers
+ - STL containers - std::map, std::set, std::vector, std::list, ect..., all STL-compatible-containers
+ - std::pair
+
+You can add support for additional types via template specialization. \n\n
+Specialize zen::readStruc() and zen::writeStruc() to enable conversion from structured user types to XML elements.
+Specialize zen::readText() and zen::writeText() to enable conversion from string-convertible user types to std::string.
+Prefer latter if possible since it does not only enable conversions from XML elements to user data, but also from and to XML attributes.
+\n\n
+<b> Example: </b> type "bool"
+\code
+namespace zen
+{
+template <> inline
+void writeText(const bool& value, std::string& output)
+{
+ output = value ? "true" : "false";
+}
+
+template <> inline
+bool readText(const std::string& input, bool& value)
+{
+ std::string tmp = input;
+ zen::trim(tmp);
+ if (tmp == "true")
+ value = true;
+ else if (tmp == "false")
+ value = false;
+ else
+ return false;
+ return true;
+}
+}
+\endcode
+*/
+
+
+///Convert text to user data - used by XML elements and attributes
+/**
+ \param input Input text.
+ \param value Conversion target value.
+ \return "true" if value was read successfully.
+*/
+template <class T> bool readText(const std::string& input, T& value);
+///Convert user data into text - used by XML elements and attributes
+/**
+ \param value The value to be converted.
+ \param output Output text.
+*/
+template <class T> void writeText(const T& value, std::string& output);
+
+
+/* Different classes of data types:
+
+---------------------------
+| structured | readStruc/writeStruc - e.g. string-convertible types, STL containers, std::pair, structured user types
+| ---------------------- |
+| | string-convertible | | readText/writeText - e.g. string-like types, all built-in arithmetic numbers, bool
+| | --------------- | |
+| | | string-like | | | utfCvrtTo - e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+| | --------------- | |
+| ---------------------- |
+---------------------------
+*/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//------------------------------ implementation -------------------------------------
+
+//Conversion from arbitrary types to text (for use with XML elements and attributes)
+enum TextType
+{
+ TEXT_TYPE_BOOL,
+ TEXT_TYPE_NUMBER,
+ TEXT_TYPE_STRING,
+ TEXT_TYPE_OTHER,
+};
+
+template <class T>
+struct GetTextType : StaticEnum<TextType,
+ IsSameType<T, bool>::value ? TEXT_TYPE_BOOL :
+ IsStringLike<T>::value ? TEXT_TYPE_STRING : //string before number to correctly handle char/wchar_t -> this was an issue with Loki only!
+ IsArithmetic<T>::value ? TEXT_TYPE_NUMBER : //
+ TEXT_TYPE_OTHER> {};
+
+//######################################################################################
+
+template <class T, TextType type>
+struct ConvertText;
+/* -> expected interface
+{
+ void writeText(const T& value, std::string& output) const;
+ bool readText(const std::string& input, T& value) const;
+};
+*/
+
+//partial specialization: type bool
+template <class T>
+struct ConvertText<T, TEXT_TYPE_BOOL>
+{
+ void writeText(bool value, std::string& output) const
+ {
+ output = value ? "true" : "false";
+ }
+ bool readText(const std::string& input, bool& value) const
+ {
+ std::string tmp = input;
+ zen::trim(tmp);
+ if (tmp == "true")
+ value = true;
+ else if (tmp == "false")
+ value = false;
+ else
+ return false;
+ return true;
+ }
+};
+
+//partial specialization: handle conversion for all built-in arithmetic types!
+template <class T>
+struct ConvertText<T, TEXT_TYPE_NUMBER>
+{
+ void writeText(const T& value, std::string& output) const
+ {
+ output = numberTo<std::string>(value);
+ }
+ bool readText(const std::string& input, T& value) const
+ {
+ value = stringTo<T>(input);
+ return true;
+ }
+};
+
+//partial specialization: handle conversion for all string-like types!
+template <class T>
+struct ConvertText<T, TEXT_TYPE_STRING>
+{
+ void writeText(const T& value, std::string& output) const
+ {
+ output = utfCvrtTo<std::string>(value);
+ }
+ bool readText(const std::string& input, T& value) const
+ {
+ value = utfCvrtTo<T>(input);
+ return true;
+ }
+};
+
+
+//partial specialization: unknown type
+template <class T>
+struct ConvertText<T, TEXT_TYPE_OTHER>
+{
+ //###########################################################################################################################################
+ assert_static(sizeof(T) == -1);
+ /*
+ ATTENTION: The data type T is yet unknown to the zenXML framework!
+
+ Please provide a specialization for T of the following two functions in order to handle conversions to XML elements and attributes
+
+ template <> void zen::writeText(const T& value, std::string& output)
+ template <> bool zen::readText(const std::string& input, T& value)
+
+ If T is structured and cannot be converted to a text representation specialize these two functions to allow at least for conversions to XML elements:
+
+ template <> void zen::writeStruc(const T& value, XmlElement& output)
+ template <> bool zen::readStruc(const XmlElement& input, T& value)
+ */
+ //###########################################################################################################################################
+};
+
+
+template <class T> inline
+void writeText(const T& value, std::string& output)
+{
+ ConvertText<T, GetTextType<T>::value>().writeText(value, output);
+}
+
+
+template <class T> inline
+bool readText(const std::string& input, T& value)
+{
+ return ConvertText<T, GetTextType<T>::value>().readText(input, value);
+}
+}
+
+#endif //ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
diff --git a/zenxml/dom.h b/zenxml/dom.h
new file mode 100644
index 00000000..fbbd6fb0
--- /dev/null
+++ b/zenxml/dom.h
@@ -0,0 +1,324 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef ZEN_XML_DOM_HEADER_82085720723894567204564256
+#define ZEN_XML_DOM_HEADER_82085720723894567204564256
+
+#include <string>
+#include <vector>
+#include <memory>
+#include <map>
+#include "cvrt_text.h" //"readText/writeText"
+
+namespace zen
+{
+class XmlDoc;
+
+/// An XML element
+class XmlElement
+{
+ struct PrivateConstruction {};
+public:
+ //Construct an empty XML element
+ //This constructor should be private, however std::make_shared() requires public access
+ //Therefore at least prevent users from calling it via private dummy type PrivateConstruction
+ template <class String>
+ XmlElement(const String& name, XmlElement* parentElement, PrivateConstruction) : name_(utfCvrtTo<std::string>(name)), parent_(parentElement) {}
+
+ ///Retrieve the name of this XML element.
+ /**
+ \tparam String Arbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
+ \returns Name of the XML element
+ */
+ template <class String>
+ String getNameAs() const { return utfCvrtTo<String>(name_); }
+
+ ///Get the value of this element as a user type.
+ /**
+ \tparam T Arbitrary user data type: e.g. any string class, all built-in arithmetic numbers, STL container, ...
+ \returns "true" if Xml element was successfully converted to value, cannot fail for string-like types
+ */
+ template <class T>
+ bool getValue(T& value) const { return readStruc(*this, value); }
+
+ ///Set the value of this element.
+ /**
+ \tparam T Arbitrary user data type: e.g. any string-like type, all built-in arithmetic numbers, STL container, ...
+ */
+ template <class T>
+ void setValue(const T& value) { writeStruc(value, *this); }
+
+ ///Retrieve an attribute by name.
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \tparam T String-convertible user data type: e.g. any string class, all built-in arithmetic numbers
+ \param name The name of the attribute to retrieve.
+ \param value The value of the attribute converted to T.
+ \return "true" if value was retrieved successfully.
+ */
+ template <class String, class T>
+ bool getAttribute(const String& name, T& value) const
+ {
+ auto it = attributes.find(utfCvrtTo<std::string>(name));
+ return it == attributes.end() ? false : readText(it->second, value);
+ }
+
+ ///Create or update an XML attribute.
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \tparam T String-convertible user data type: e.g. any string-like type, all built-in arithmetic numbers
+ \param name The name of the attribute to create or update.
+ \param value The value to set.
+ */
+ template <class String, class T>
+ void setAttribute(const String& name, const T& value)
+ {
+ std::string attrValue;
+ writeText(value, attrValue);
+ attributes[utfCvrtTo<std::string>(name)] = attrValue;
+ } //create or update
+
+ ///Remove the attribute with the given name.
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ */
+ template <class String>
+ void removeAttribute(const String& name) { attributes.erase(utfCvrtTo<std::string>(name)); }
+
+ ///Create a new child element and return a reference to it.
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \param name The name of the child element to be created.
+ */
+ template <class String>
+ XmlElement& addChild(const String& name)
+ {
+ std::string utf8Name = utfCvrtTo<std::string>(name);
+ auto newElement = std::make_shared<XmlElement>(utf8Name, this, PrivateConstruction());
+ //std::shared_ptr<XmlElement> newElement(new XmlElement(utf8Name, this));
+ childElements.push_back(newElement);
+ childElementsSorted.insert(std::make_pair(utf8Name, newElement));
+ return *newElement;
+ }
+
+ ///Retrieve a child element with the given name.
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \param name The name of the child element to be retrieved.
+ \return A pointer to the child element or nullptr if none was found
+ */
+ template <class String>
+ const XmlElement* getChild(const String& name) const
+ {
+ auto it = childElementsSorted.find(utfCvrtTo<std::string>(name));
+ return it == childElementsSorted.end() ? nullptr : &*(it->second);
+ }
+
+ ///\sa getChild
+ template <class String>
+ XmlElement* getChild(const String& name)
+ {
+ return const_cast<XmlElement*>(static_cast<const XmlElement*>(this)->getChild(name));
+ }
+
+ template < class IterTy, //underlying iterator type
+ class T, //target object type
+ class AccessPolicy > //access policy: see AccessPtrMap
+ class PtrIter : public std::iterator<std::input_iterator_tag, T>, private AccessPolicy //get rid of shared_ptr indirection
+ {
+ public:
+ PtrIter(IterTy it) : it_(it) {}
+ PtrIter(const PtrIter& other) : it_(other.it_) {}
+ PtrIter& operator++() { ++it_; return *this; }
+ PtrIter operator++(int) { PtrIter tmp(*this); operator++(); return tmp; }
+ inline friend bool operator==(const PtrIter& lhs, const PtrIter& rhs) { return lhs.it_ == rhs.it_; }
+ inline friend bool operator!=(const PtrIter& lhs, const PtrIter& rhs) { return !(lhs == rhs); }
+ T& operator* () { return AccessPolicy::template objectRef<T>(it_); }
+ T* operator->() { return &AccessPolicy::template objectRef<T>(it_); }
+ private:
+ IterTy it_;
+ };
+
+ struct AccessPtrMap
+ {
+ template <class T, class IterTy>
+ T& objectRef(const IterTy& it) { return *(it->second); }
+ };
+
+ typedef PtrIter<std::multimap<std::string, std::shared_ptr<XmlElement>>::iterator, XmlElement, AccessPtrMap> ChildIter2;
+ typedef PtrIter<std::multimap<std::string, std::shared_ptr<XmlElement>>::const_iterator, const XmlElement, AccessPtrMap> ChildIterConst2;
+
+ ///Access all child elements with the given name via STL iterators.
+ /**
+ \code
+ auto iterPair = elem.getChildren("Item");
+ std::for_each(iterPair.first, iterPair.second,
+ [](const XmlElement& child) { ... });
+ \endcode
+ \param name The name of the child elements to be retrieved.
+ \return A pair of STL begin/end iterators to access all child elements sequentially.
+ */
+ template <class String>
+ std::pair<ChildIterConst2, ChildIterConst2> getChildren(const String& name) const { return childElementsSorted.equal_range(utfCvrtTo<std::string>(name)); }
+
+ ///\sa getChildren
+ template <class String>
+ std::pair<ChildIter2, ChildIter2> getChildren(const String& name) { return childElementsSorted.equal_range(utfCvrtTo<std::string>(name)); }
+
+ struct AccessPtrVec
+ {
+ template <class T, class IterTy>
+ T& objectRef(const IterTy& it) { return **it; }
+ };
+
+ typedef PtrIter<std::vector<std::shared_ptr<XmlElement>>::iterator, XmlElement, AccessPtrVec> ChildIter;
+ typedef PtrIter<std::vector<std::shared_ptr<XmlElement>>::const_iterator, const XmlElement, AccessPtrVec> ChildIterConst;
+
+ ///Access all child elements sequentially via STL iterators.
+ /**
+ \code
+ auto iterPair = elem.getChildren();
+ std::for_each(iterPair.first, iterPair.second,
+ [](const XmlElement& child) { ... });
+ \endcode
+ \return A pair of STL begin/end iterators to access all child elements sequentially.
+ */
+ std::pair<ChildIterConst, ChildIterConst> getChildren() const { return std::make_pair(childElements.begin(), childElements.end()); }
+
+ ///\sa getChildren
+ std::pair<ChildIter, ChildIter> getChildren() { return std::make_pair(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
+ const XmlElement* parent() const { return parent_; };
+
+
+ typedef std::map<std::string, std::string>::const_iterator AttrIter;
+
+ /* -> disabled documentation extraction
+ \brief Get all attributes associated with the element.
+ \code
+ auto iterPair = elem.getAttributes();
+ for (auto it = iterPair.first; it != iterPair.second; ++it)
+ std::cout << "name: " << it->first << " value: " << it->second << "\n";
+ \endcode
+ \return A pair of STL begin/end iterators to access all attributes sequentially as a list of name/value pairs of std::string.
+ */
+ std::pair<AttrIter, AttrIter> getAttributes() const { return std::make_pair(attributes.begin(), attributes.end()); }
+
+ //Transactionally swap two elements. -> disabled documentation extraction
+ void swap(XmlElement& other)
+ {
+ name_ .swap(other.name_);
+ value_ .swap(other.value_);
+ attributes.swap(other.attributes);
+ childElements.swap(other.childElements);
+ childElementsSorted.swap(other.childElementsSorted);
+ //std::swap(parent_, other.parent_); -> parent is physical location; update children's parent reference instead:
+ std::for_each( childElements.begin(), childElements.end(), [&](const std::shared_ptr<XmlElement>& child) { child->parent_ = this; });
+ std::for_each(other.childElements.begin(), other.childElements.end(), [&](const std::shared_ptr<XmlElement>& child) { child->parent_ = &other; });
+ }
+
+private:
+ friend class XmlDoc;
+
+ XmlElement(const XmlElement&); //not implemented
+ XmlElement& operator=(const XmlElement&); //
+
+ std::string name_;
+ std::string value_;
+ std::map<std::string, std::string> attributes;
+ std::vector<std::shared_ptr<XmlElement>> childElements; //all child elements in order of creation
+ std::multimap<std::string, std::shared_ptr<XmlElement>> childElementsSorted; //alternate key: sorted by element name
+ XmlElement* parent_;
+};
+
+
+//XmlElement::setValue<T>() calls zen::writeStruc() which calls XmlElement::setValue() ... => these two specializations end the circle
+template <> inline
+void XmlElement::setValue(const std::string& value) { value_ = value; }
+
+template <> inline
+bool XmlElement::getValue(std::string& value) const { value = value_; return true; }
+
+
+///The complete XML document
+class XmlDoc
+{
+public:
+ ///Default constructor setting up an empty XML document with a standard declaration: <?xml version="1.0" encoding="UTF-8" ?>
+ XmlDoc() : version_("1.0"), encoding_("UTF-8"), rootElement("Root", nullptr, XmlElement::PrivateConstruction()) {}
+
+ //Setup an empty XML document
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ \param rootName The name of the XML document's root element
+ */
+ template <class String>
+ XmlDoc(String rootName) : version_("1.0"), encoding_("UTF-8"), rootElement(rootName, nullptr, XmlElement::PrivateConstruction()) {}
+
+ ///Get a const reference to the document's root element.
+ const XmlElement& root() const { return rootElement; }
+ ///Get a reference to the document's root element.
+ XmlElement& root() { return rootElement; }
+
+ ///Get the version used in the XML declaration.
+ /**
+ \tparam String Arbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
+ */
+ template <class String>
+ String getVersionAs() const { return utfCvrtTo<String>(version_); }
+
+ ///Set the version used in the XML declaration.
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ */
+ template <class String>
+ void setVersion(const String& version) { version_ = utfCvrtTo<std::string>(version); }
+
+ ///Get the encoding used in the XML declaration.
+ /**
+ \tparam String Arbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
+ */
+ template <class String>
+ String getEncodingAs() const { return utfCvrtTo<String>(encoding_); }
+
+ ///Set the encoding used in the XML declaration.
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ */
+ template <class String>
+ void setEncoding(const String& encoding) { encoding_ = utfCvrtTo<std::string>(encoding); }
+
+ ///Get the standalone string used in the XML declaration.
+ /**
+ \tparam String Arbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
+ */
+ template <class String>
+ String getStandaloneAs() const { return utfCvrtTo<String>(standalone_); }
+
+ ///Set the standalone string used in the XML declaration.
+ /**
+ \tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+ */
+ template <class String>
+ void setStandalone(const String& standalone) { standalone_ = utfCvrtTo<std::string>(standalone); }
+
+private:
+ XmlDoc(const XmlDoc&); //not implemented, thanks to XmlElement::parent_
+ XmlDoc& operator=(const XmlDoc&); //
+
+ std::string version_;
+ std::string encoding_;
+ std::string standalone_;
+
+ XmlElement rootElement;
+};
+
+}
+
+#endif //ZEN_XML_DOM_HEADER_82085720723894567204564256
diff --git a/zenxml/error.h b/zenxml/error.h
new file mode 100644
index 00000000..a90dd35a
--- /dev/null
+++ b/zenxml/error.h
@@ -0,0 +1,19 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef ZEN_XML_ERROR_HEADER_018734618433021489473214873214
+#define ZEN_XML_ERROR_HEADER_018734618433021489473214873214
+
+namespace zen
+{
+///Exception base class for zenXML
+struct XmlError
+{
+ virtual ~XmlError() {}
+};
+}
+
+#endif //ZEN_XML_ERROR_HEADER_018734618433021489473214873214
diff --git a/zenxml/io.h b/zenxml/io.h
new file mode 100644
index 00000000..4286ae6c
--- /dev/null
+++ b/zenxml/io.h
@@ -0,0 +1,124 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef ZEN_XML_IO_HEADER_8917640501480763248343343
+#define ZEN_XML_IO_HEADER_8917640501480763248343343
+
+#include <cstdio>
+#include <cerrno>
+#include <zen/scope_guard.h>
+#include <zen/utf.h>
+#include "error.h"
+
+namespace zen
+{
+/**
+\file
+\brief Save and load byte streams from files
+*/
+
+#if !defined(ZEN_PLATFORM_WINDOWS) && !defined(ZEN_PLATFORM_OTHER)
+#error Please specify your platform: #define ZEN_PLATFORM_WINDOWS or ZEN_PLATFORM_OTHER
+#endif
+
+///Exception thrown due to failed file I/O
+struct XmlFileError : public XmlError
+{
+ typedef int ErrorCode;
+
+ explicit XmlFileError(ErrorCode ec) : lastError(ec) {}
+ ///Native error code: errno
+ ErrorCode lastError;
+};
+
+
+#ifdef ZEN_PLATFORM_WINDOWS
+namespace implemenation //sad but true
+{
+template <class String> inline
+FILE* fopen(const String& filename, const wchar_t* mode)
+{
+#ifdef _MSC_VER
+ FILE* handle = nullptr;
+ errno_t rv = ::_wfopen_s(&handle, utfCvrtTo<std::wstring>(filename).c_str(), mode); //more secure?
+ (void)rv;
+ return handle;
+#else
+ return ::_wfopen(utfCvrtTo<std::wstring>(filename).c_str(), mode);
+#endif
+}
+}
+#endif
+
+
+///Save byte stream to a file
+/**
+\tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+\param stream Input byte stream
+\param filename Output file name
+\throw XmlFileError
+*/
+template <class String>
+void saveStream(const std::string& stream, const String& filename) //throw XmlFileError
+{
+#ifdef ZEN_PLATFORM_WINDOWS
+ FILE* handle = implemenation::fopen(utfCvrtTo<std::wstring>(filename).c_str(), L"wb");
+#else
+ FILE* handle = ::fopen(utfCvrtTo<std::string>(filename).c_str(), "w");
+#endif
+ if (handle == nullptr)
+ throw XmlFileError(errno);
+ ZEN_ON_SCOPE_EXIT(::fclose(handle));
+
+ const size_t bytesWritten = ::fwrite(stream.c_str(), 1, stream.size(), handle);
+ if (::ferror(handle) != 0)
+ throw XmlFileError(errno);
+
+ (void)bytesWritten;
+ assert(bytesWritten == stream.size());
+}
+
+
+///Load byte stream from a file
+/**
+\tparam String Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
+\param filename Input file name
+\return Output byte stream
+\throw XmlFileError
+*/
+template <class String>
+std::string loadStream(const String& filename) //throw XmlFileError
+{
+#ifdef ZEN_PLATFORM_WINDOWS
+ FILE* handle = implemenation::fopen(utfCvrtTo<std::wstring>(filename).c_str(), L"rb");
+#else
+ FILE* handle = ::fopen(utfCvrtTo<std::string>(filename).c_str(), "r");
+#endif
+ if (handle == nullptr)
+ throw XmlFileError(errno);
+ ZEN_ON_SCOPE_EXIT(::fclose(handle));
+
+ std::string stream;
+ const size_t blockSize = 64 * 1024;
+ do
+ {
+ stream.resize(stream.size() + blockSize); //let's pray std::string implements exponential growth!
+
+ const size_t bytesRead = ::fread(&*(stream.begin() + stream.size() - blockSize), 1, blockSize, handle);
+ if (::ferror(handle))
+ throw XmlFileError(errno);
+ if (bytesRead > blockSize)
+ throw XmlFileError(0);
+ if (bytesRead < blockSize)
+ stream.resize(stream.size() - (blockSize - bytesRead)); //caveat: unsigned arithmetics
+ }
+ while (!::feof(handle));
+
+ return stream;
+}
+}
+
+#endif //ZEN_XML_IO_HEADER_8917640501480763248343343
diff --git a/zenxml/parser.h b/zenxml/parser.h
new file mode 100644
index 00000000..823cd793
--- /dev/null
+++ b/zenxml/parser.h
@@ -0,0 +1,609 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef ZEN_XML_PARSER_HEADER_81248670213764583021432
+#define ZEN_XML_PARSER_HEADER_81248670213764583021432
+
+#include <cstdio>
+#include <cstddef> //ptrdiff_t; req. on Linux
+#include <zen/string_traits.h>
+#include "dom.h"
+#include "error.h"
+
+namespace zen
+{
+/**
+\file
+\brief Convert an XML document object model (class XmlDoc) to and from a byte stream representation.
+*/
+
+///Save XML document as a byte stream
+/**
+\param doc Input XML document
+\param lineBreak Line break, default: carriage return + new line
+\param indent Indentation, default: four space characters
+\return Output byte stream
+*/
+std::string serialize(const XmlDoc& doc,
+ const std::string& lineBreak = "\r\n",
+ const std::string& indent = " "); //throw ()
+
+///Exception thrown due to an XML parsing error
+struct XmlParsingError : public XmlError
+{
+ XmlParsingError(size_t rowNo, size_t colNo) : row(rowNo), col(colNo) {}
+ ///Input file row where the parsing error occured
+ size_t row; //beginning with 0
+ ///Input file column where the parsing error occured
+ size_t col; //
+};
+
+
+///Load XML document from a byte stream
+/**
+\param stream Input byte stream
+\param doc Output XML document
+\throw XmlParsingError
+*/
+void parse(const std::string& stream, XmlDoc& doc); //throw XmlParsingError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//---------------------------- implementation ----------------------------
+//see: http://www.w3.org/TR/xml/
+
+namespace implementation
+{
+inline
+std::pair<char, char> hexify(unsigned char c)
+{
+ auto hexifyDigit = [](int num) -> char //input [0, 15], output 0-9, A-F
+ {
+ assert(0 <= num && num <= 15); //guaranteed by design below!
+ return static_cast<char>(num <= 9 ? //no signed/unsigned char problem here!
+ '0' + num :
+ 'A' + (num - 10));
+ };
+ return std::make_pair(hexifyDigit(c / 16), hexifyDigit(c % 16));
+}
+
+
+inline
+char unhexify(char high, char low)
+{
+ auto unhexifyDigit = [](char hex) -> int //input 0-9, a-f, A-F; output range: [0, 15]
+ {
+ if ('0' <= hex && hex <= '9') //no signed/unsigned char problem here!
+ return hex - '0';
+ else if ('A' <= hex && hex <= 'F')
+ return (hex - 'A') + 10;
+ else if ('a' <= hex && hex <= 'f')
+ return (hex - 'a') + 10;
+ assert(false);
+ return 0;
+ };
+ return static_cast<unsigned char>(16 * unhexifyDigit(high) + unhexifyDigit(low)); //[!] convert to unsigned char first, then to char (which may be signed)
+};
+
+
+template <class Predicate> inline
+std::string normalize(const std::string& str, Predicate pred) //pred: unary function taking a char, return true if value shall be encoded as hex
+{
+ std::string output;
+ std::for_each(str.begin(), str.end(),
+ [&](char c)
+ {
+ if (c == '&') //
+ output += "&amp;";
+ else if (c == '<') //normalization mandatory: http://www.w3.org/TR/xml/#syntax
+ output += "&lt;";
+ else if (c == '>') //
+ output += "&gt;";
+ else if (pred(c))
+ {
+ if (c == '\'')
+ output += "&apos;";
+ else if (c == '\"')
+ output += "&quot;";
+ else
+ {
+ output += "&#x";
+ const auto hexDigits = hexify(c); //hexify beats "printNumber<std::string>("&#x%02X;", c)" by a nice factor of 3!
+ output += hexDigits.first;
+ output += hexDigits.second;
+ output += ';';
+ }
+ }
+ else
+ output += c;
+ });
+ return output;
+}
+
+inline
+std::string normalizeName(const std::string& str)
+{
+ return normalize(str, [](char c) { return isWhiteSpace(c) || c == '=' || c == '/' || c == '\'' || c == '\"'; });
+}
+
+inline
+std::string normalizeElementValue(const std::string& str)
+{
+ return normalize(str, [](char c) { return static_cast<unsigned char>(c) < 32; });
+}
+
+inline
+std::string normalizeAttribValue(const std::string& str)
+{
+ return normalize(str, [](char c) { return static_cast<unsigned char>(c) < 32 || c == '\'' || c == '\"'; });
+}
+
+
+namespace
+{
+std::string denormalize(const std::string& str)
+{
+ std::string output;
+ for (auto it = str.begin(); it != str.end(); ++it)
+ {
+ const char c = *it;
+
+ if (c == '&')
+ {
+ auto checkEntity = [&](const char* placeholder, char realVal) -> bool
+ {
+ size_t strLen = strLength(placeholder);
+
+ if (str.end() - it >= static_cast<int>(strLen) && std::equal(it, it + strLen, placeholder))
+ {
+ output += realVal;
+ it += strLen - 1;
+ return true;
+ }
+ return false;
+ };
+
+ if (checkEntity("&amp;", '&'))
+ continue;
+ if (checkEntity("&lt;", '<'))
+ continue;
+ if (checkEntity("&gt;", '>'))
+ continue;
+ if (checkEntity("&apos;", '\''))
+ continue;
+ if (checkEntity("&quot;", '\"'))
+ continue;
+
+ if (str.end() - it >= 6 &&
+ it[1] == '#' &&
+ it[2] == 'x' &&
+ it[5] == ';')
+ {
+ output += unhexify(it[3], it[4]);
+ it += 5;
+ continue;
+ //unhexify beats "::sscanf(&it[3], "%02X", &tmp)" by a factor of 3000 for ~250000 calls!!!
+ }
+
+ output += c; //unexpected char!
+ }
+ else if (c == '\r') //map all end-of-line characters to \n http://www.w3.org/TR/xml/#sec-line-ends
+ {
+ auto itNext = it + 1;
+ if (itNext != str.end() && *itNext == '\n')
+ ++it;
+ output += '\n';
+ }
+ else
+ output += c;
+ };
+ return output;
+}
+
+
+void serialize(const XmlElement& element, std::string& stream,
+ const std::string& lineBreak,
+ const std::string& indent,
+ size_t indentLevel)
+{
+ const std::string& nameFmt = normalizeName(element.getNameAs<std::string>());
+
+ for (size_t i = 0; i < indentLevel; ++i)
+ stream += indent;
+
+ stream += '<' + nameFmt;
+
+ auto attr = element.getAttributes();
+ for (auto it = attr.first; it != attr.second; ++it)
+ stream += ' ' + normalizeName(it->first) + "=\"" + normalizeAttribValue(it->second) + "\"";
+
+ //no support for mixed-mode content
+ auto iterPair = element.getChildren();
+ if (iterPair.first != iterPair.second) //structured element
+ {
+ stream += '>' + lineBreak;
+
+ std::for_each(iterPair.first, iterPair.second,
+ [&](const XmlElement & el) { serialize(el, stream, lineBreak, indent, indentLevel + 1); });
+
+ for (size_t i = 0; i < indentLevel; ++i)
+ stream += indent;
+ stream += "</" + nameFmt + '>' + lineBreak;
+ }
+ else
+ {
+ std::string value;
+ element.getValue(value);
+
+ if (!value.empty()) //value element
+ stream += '>' + normalizeElementValue(value) + "</" + nameFmt + '>' + lineBreak;
+ else //empty element
+ stream += "/>" + lineBreak;
+ }
+}
+
+std::string serialize(const XmlDoc& doc,
+ const std::string& lineBreak,
+ const std::string& indent)
+{
+ std::string version = doc.getVersionAs<std::string>();
+ if (!version.empty())
+ version = " version=\"" + normalizeAttribValue(version) + "\"";
+
+ std::string encoding = doc.getEncodingAs<std::string>();
+ if (!encoding.empty())
+ encoding = " encoding=\"" + normalizeAttribValue(encoding) + "\"";
+
+ std::string standalone = doc.getStandaloneAs<std::string>();
+ if (!standalone.empty())
+ standalone = " standalone=\"" + normalizeAttribValue(standalone) + "\"";
+
+ std::string output = "<?xml" + version + encoding + standalone + "?>" + lineBreak;
+ serialize(doc.root(), output, lineBreak, indent, 0);
+ return output;
+}
+}
+}
+
+inline
+std::string serialize(const XmlDoc& doc,
+ const std::string& lineBreak,
+ const std::string& indent) { return implementation::serialize(doc, lineBreak, indent); }
+
+/*
+Grammar for XML parser
+-------------------------------
+document-expression:
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+ element-expression:
+
+element-expression:
+ <string attributes-expression/>
+ <string attributes-expression> pm-expression </string>
+
+element-list-expression:
+ <empty>
+ element-expression element-list-expression
+
+attributes-expression:
+ <empty>
+ string="string" attributes-expression
+
+pm-expression:
+ string
+ element-list-expression
+*/
+
+namespace implementation
+{
+struct Token
+{
+ enum Type
+ {
+ TK_LESS,
+ TK_GREATER,
+ TK_LESS_SLASH,
+ TK_SLASH_GREATER,
+ TK_EQUAL,
+ TK_QUOTE,
+ TK_DECL_BEGIN,
+ TK_DECL_END,
+ TK_NAME,
+ TK_END
+ };
+
+ Token(Type t) : type(t) {}
+ Token(const std::string& txt) : type(TK_NAME), name(txt) {}
+
+ Type type;
+ std::string name; //filled if type == TK_NAME
+};
+
+class Scanner
+{
+public:
+ Scanner(const std::string& stream) : stream_(stream), pos(stream_.begin())
+ {
+ if (zen::startsWith(stream_, BYTE_ORDER_MARK_UTF8))
+ pos += strLength(BYTE_ORDER_MARK_UTF8);
+
+ tokens.push_back(std::make_pair("<?xml", Token::TK_DECL_BEGIN));
+ tokens.push_back(std::make_pair("?>", Token::TK_DECL_END));
+ tokens.push_back(std::make_pair("</", Token::TK_LESS_SLASH));
+ tokens.push_back(std::make_pair("/>", Token::TK_SLASH_GREATER));
+ tokens.push_back(std::make_pair("<" , Token::TK_LESS)); //evaluate after TK_DECL_BEGIN!
+ tokens.push_back(std::make_pair(">" , Token::TK_GREATER));
+ tokens.push_back(std::make_pair("=" , Token::TK_EQUAL));
+ tokens.push_back(std::make_pair("\"", Token::TK_QUOTE));
+ tokens.push_back(std::make_pair("\'", Token::TK_QUOTE));
+ }
+
+ Token nextToken() //throw XmlParsingError
+ {
+ //skip whitespace
+ pos = std::find_if(pos, stream_.end(), [](char c) { return !zen::isWhiteSpace(c); });
+
+ if (pos == stream_.end())
+ return Token::TK_END;
+
+ for (auto it = tokens.begin(); it != tokens.end(); ++it)
+ if (startsWith(pos, it->first))
+ {
+ pos += it->first.size();
+ return it->second;
+ }
+
+ auto nameEnd = std::find_if(pos, stream_.end(), [](char c)
+ {
+ return c == '<' ||
+ c == '>' ||
+ c == '=' ||
+ c == '/' ||
+ c == '\'' ||
+ c == '\"' ||
+ zen::isWhiteSpace(c);
+ });
+
+ if (nameEnd != pos)
+ {
+ std::string name(&*pos, nameEnd - pos);
+ pos = nameEnd;
+ return implementation::denormalize(name);
+ }
+
+ //unknown token
+ throw XmlParsingError(posRow(), posCol());
+ }
+
+ std::string extractElementValue()
+ {
+ auto it = std::find_if(pos, stream_.end(), [](char c)
+ {
+ return c == '<' ||
+ c == '>';
+ });
+ std::string output(pos, it);
+ pos = it;
+ return implementation::denormalize(output);
+ }
+
+ std::string extractAttributeValue()
+ {
+ auto it = std::find_if(pos, stream_.end(), [](char c)
+ {
+ return c == '<' ||
+ c == '>' ||
+ c == '\'' ||
+ c == '\"';
+ });
+ std::string output(pos, it);
+ pos = it;
+ return implementation::denormalize(output);
+ }
+
+ size_t posRow() const //current row beginning with 0
+ {
+ const size_t crSum = std::count(stream_.begin(), pos, '\r'); //carriage returns
+ const size_t nlSum = std::count(stream_.begin(), pos, '\n'); //new lines
+ assert(crSum == 0 || nlSum == 0 || crSum == nlSum);
+ return std::max(crSum, nlSum); //be compatible with Linux/Mac/Win
+ }
+
+ size_t posCol() const //current col beginning with 0
+ {
+ //seek beginning of line
+ for (auto it = pos; it != stream_.begin(); )
+ {
+ --it;
+ if (*it == '\r' || *it == '\n')
+ return pos - it - 1;
+ }
+ return pos - stream_.begin();
+ }
+
+private:
+ Scanner(const Scanner&);
+ Scanner& operator=(const Scanner&);
+
+ bool startsWith(std::string::const_iterator it, const std::string& prefix) const
+ {
+ if (stream_.end() - it < static_cast<ptrdiff_t>(prefix.size()))
+ return false;
+ return std::equal(prefix.begin(), prefix.end(), it);
+ }
+
+ typedef std::vector<std::pair<std::string, Token::Type> > TokenList;
+ TokenList tokens;
+
+ const std::string stream_;
+ std::string::const_iterator pos;
+};
+
+
+class XmlParser
+{
+public:
+ XmlParser(const std::string& stream) :
+ scn(stream),
+ tk(scn.nextToken()) {}
+
+ void parse(XmlDoc& doc) //throw XmlParsingError
+ {
+ //declaration (optional)
+ if (token().type == Token::TK_DECL_BEGIN)
+ {
+ nextToken();
+
+ while (token().type == Token::TK_NAME)
+ {
+ std::string attribName = token().name;
+ nextToken();
+
+ consumeToken(Token::TK_EQUAL);
+ expectToken(Token::TK_QUOTE);
+ std::string attribValue = scn.extractAttributeValue();
+ nextToken();
+
+ consumeToken(Token::TK_QUOTE);
+
+ if (attribName == "version")
+ doc.setVersion(attribValue);
+ else if (attribName == "encoding")
+ doc.setEncoding(attribValue);
+ else if (attribName == "standalone")
+ doc.setStandalone(attribValue);
+ }
+ consumeToken(Token::TK_DECL_END);
+ }
+
+ XmlDoc dummy;
+ XmlElement& elemTmp = dummy.root();
+ parseChildElements(elemTmp);
+
+ auto iterPair = elemTmp.getChildren();
+ if (iterPair.first != iterPair.second)
+ doc.root().swap(*iterPair.first);
+
+ expectToken(Token::TK_END);
+ };
+
+private:
+ XmlParser(const XmlParser&);
+ XmlParser& operator=(const XmlParser&);
+
+ void parseChildElements(XmlElement& parent)
+ {
+ while (token().type == Token::TK_LESS)
+ {
+ nextToken();
+
+ expectToken(Token::TK_NAME);
+ std::string elementName = token().name;
+ nextToken();
+
+ XmlElement& newElement = parent.addChild(elementName);
+
+ parseAttributes(newElement);
+
+ if (token().type == Token::TK_SLASH_GREATER) //empty element
+ {
+ nextToken();
+ continue;
+ }
+
+ expectToken(Token::TK_GREATER);
+ std::string elementValue = scn.extractElementValue();
+ nextToken();
+
+ //no support for mixed-mode content
+ if (token().type == Token::TK_LESS) //structured element
+ parseChildElements(newElement);
+ else //value element
+ newElement.setValue(elementValue);
+
+ consumeToken(Token::TK_LESS_SLASH);
+
+ if (token().type != Token::TK_NAME ||
+ elementName != token().name)
+ throw XmlParsingError(scn.posRow(), scn.posCol());
+ nextToken();
+
+ consumeToken(Token::TK_GREATER);
+ }
+ };
+
+ void parseAttributes(XmlElement& element)
+ {
+ while (token().type == Token::TK_NAME)
+ {
+ std::string attribName = token().name;
+ nextToken();
+
+ consumeToken(Token::TK_EQUAL);
+ expectToken(Token::TK_QUOTE);
+ std::string attribValue = scn.extractAttributeValue();
+ nextToken();
+
+ consumeToken(Token::TK_QUOTE);
+ element.setAttribute(attribName, attribValue);
+ }
+ }
+
+ const Token& token() const { return tk; }
+ void nextToken() { tk = scn.nextToken(); }
+
+ void consumeToken(Token::Type t) //throw XmlParsingError
+ {
+ expectToken(t); //throw XmlParsingError
+ nextToken();
+ }
+
+ void expectToken(Token::Type t) //throw XmlParsingError
+ {
+ if (token().type != t)
+ throw XmlParsingError(scn.posRow(), scn.posCol());
+ }
+
+ Scanner scn;
+ Token tk;
+};
+}
+
+inline
+void parse(const std::string& stream, XmlDoc& doc) //throw XmlParsingError
+{
+ implementation::XmlParser(stream).parse(doc); //throw XmlParsingError
+}
+}
+
+#endif //ZEN_XML_PARSER_HEADER_81248670213764583021432
diff --git a/zenxml/summary.dox b/zenxml/summary.dox
new file mode 100644
index 00000000..73a09bcd
--- /dev/null
+++ b/zenxml/summary.dox
@@ -0,0 +1,680 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+/**
+\mainpage Overview
+
+\li \ref sec_Rationale
+\li \ref sec_Quick_Start
+\li \ref sec_Supported_Platforms
+\li \ref sec_Flexible_Programming_Model
+\li \ref sec_Structured_XML_element_access
+\li \ref sec_Access_XML_attributes
+\li \ref sec_Automatic_conversion_built_in
+\li \ref sec_Automatic_conversion_string
+\li \ref sec_Automatic_conversion_STL
+\li \ref sec_Support_user_defined
+\li \ref sec_Structured_user_types
+\li \ref sec_Type_Safety
+
+\section sec_Rationale Rationale
+
+zenXML is an XML library that enables serialization of structured user data in a convenient way.
+Using compile-time information gathered by techniques of template metaprogramming it minimizes the manual overhead required and frees the user from applying fundamental type conversions
+by himself. Basic data types such as \b all built-in arithmetic numbers, \b all kinds of string classes and "string-like" types, \b all types defined as STL containers are processed automatically.
+Thereby a large number of recurring problems is finally solved by the library:
+- generic number to string conversions
+- generic char to wchar_t conversions for custom string classes in a platform independent manner
+- serialization of STL container types
+- simple integration: header-only, no extra dependencies, fully portable
+- support (but not enforce) wide characters everywhere: for file names, XML element names, attribute names, values, ...
+- integrate XML library with focus on elegance, minimal code size, flexibility and performance
+- nonintrusive API: allow for internationalization, fine-granular error handling, and custom file I/O
+- it's a toolkit, not a framework: different layers of software architecture offer, but do not enforce, specific programming models
+
+The design follows the philosophy of the Loki library: \n
+http://loki-lib.sourceforge.net/index.php?n=Main.Philosophy
+
+\section sec_Quick_Start Quick Start
+
+1. Download zenXML: http://sourceforge.net/projects/zenxml
+
+2. Setup a preprocessor macro for your project to identify the platform (this is required for C-stream file IO only)
+\code
+ ZEN_PLATFORM_WINDOWS
+ or
+ ZEN_PLATFORM_OTHER
+\endcode
+
+3. For optimal performance define this global macro in release build: (following convention of the <tt>assert</tt> macro)
+\code
+ NDEBUG
+\endcode
+
+4. Include the main header:
+\code
+#include <zenxml/xml.h>
+\endcode
+
+5. Start serializing user data:
+
+\code
+size_t a = 10;
+double b = 2.0;
+int c = -1;
+\endcode
+
+\code
+zen::XmlDoc doc; //empty XML document
+
+zen::XmlOut out(doc); //fill the document via a data output proxy
+out["elem1"](a); //
+out["elem2"](b); //map data types to XML elements
+out["elem3"](c); //
+
+try
+{
+ save(doc, "file.xml"); //throw zen::XmlFileError
+}
+catch (const zen::XmlFileError& e) { /* handle error */ }
+\endcode
+
+The following XML file will be created:
+\verbatim
+<?xml version="1.0" encoding="UTF-8"?>
+<Root>
+ <elem1>10</elem1>
+ <elem2>2.000000</elem2>
+ <elem3>-1</elem3>
+</Root>
+\endverbatim
+
+Load an XML file and map its content to user data:
+\code
+zen::XmlDoc doc; //empty XML document
+
+try
+{
+ load("file.xml", doc); //throw XmlFileError, XmlParsingError
+}
+catch (const zen::XmlError& e) { /* handle error */ }
+
+zen::XmlIn in(doc); //read document into user data via an input proxy
+in["elem1"](a); //
+in["elem2"](b); //map XML elements into user data
+in["elem3"](c); //
+
+//check for mapping errors, i.e. missing elements or conversion errors: these MAY be considered warnings only
+if (in.errorsOccured())
+{
+ std::vector<std::wstring> failedElements = in.getErrorsAs<std::wstring>();
+ /* show mapping errors */
+}
+\endcode
+
+
+\section sec_Supported_Platforms Supported Platforms
+
+zenXML is written in a platform independent manner and runs on any rudimentary C++11 compliant compiler.
+It has been tested successfully under:
+
+- Windows:
+ -# Visual C++ 2010 - 32 bit
+ -# Visual C++ 2010 - 64 bit
+ -# MinGW: GCC 4.5.2 - 32 bit
+
+- Linux (Ubuntu):
+ -# GCC 4.5.2 - 32 bit
+ -# GCC 4.5.2 - 64 bit
+
+<b>Note:</b> In order to enable C++11 features in GCC it is required to specify either of the following compiler options:
+\verbatim
+-std=c++0x
+-std=gnu++0x
+\endverbatim
+
+
+\section sec_Flexible_Programming_Model Flexible Programming Model
+
+Depending on what granularity of control is required in a particular application, zenXML allows the user to choose between full control or simplicity.
+\n\n
+The library is structured into the following parts, each of which can be used in isolation:
+\n\n
+\b \<File\> \n
+|\n
+| io.h\n
+|\n
+<b>\<Byte Stream\></b>\n
+|\n
+| parser.h\n
+|\n
+<b>\<Document Object Model\></b>\n
+|\n
+| bind.h\n
+|\n
+<b>\<C++ user data\></b>
+\n\n
+
+- Save an XML document to memory
+\code
+zen::XmlDoc doc;
+ ...
+std::string stream = serialize(doc); //throw ()
+
+/* have fun with stream */
+
+//default behavior - already available via zen::save()
+saveStream(stream, "file.xml"); //throw XmlFileError
+\endcode
+
+- Load XML document from memory
+\code
+/* get XML byte stream */
+//e.g. from a file - already available via zen::load()
+std::string stream = loadStream("file.xml"); //throw XmlFileError
+
+zen::XmlDoc doc;
+//parse byte stream into an XML document
+parse(stream, doc); //throw XmlParsingError
+
+/* process XML document */
+\endcode
+
+- Fine-granular error checking
+\code
+zen::XmlIn in(doc);
+//map XML elements into user data
+if (!in["elem1"](a))
+ throw MyCustomException();
+if (!in["elem2"](b))
+ throw MyCustomException();
+if (!in["elem3"](c))
+ throw MyCustomException();
+
+//if (in.errorsOccured()) ... <- not required anymore since each conversion was already checked
+\endcode
+
+- Document Object Model centered programming model
+\n\n
+The full power of type conversions which is available via the input/output proxy classes zen::XmlIn and zen::XmlOut is also available for the document object model!
+\code
+using namespace zen;
+XmlDoc doc;
+
+XmlElement& child = doc.root().addChild("elem1");
+child.setValue(1234);
+
+zen::save(doc, "file.xml"); //throw XmlFileError
+\endcode
+\n
+\code
+using namespace zen;
+
+XmlDoc doc;
+load("file.xml", doc); //throw XmlFileError, XmlParsingError
+
+XmlElement* child = doc.root().getChild("elem1");
+if (child)
+{
+ int value = -1;
+ if (!child->getValue(value))
+ /* handle error */
+}
+else
+ ...
+\endcode
+
+
+\section sec_Structured_XML_element_access Structured XML element access
+
+\code
+//write value into one deeply nested XML element - note the different types used seamlessly: char[], wchar_t[], char, wchar_t, int
+zen::XmlOut out(doc);
+out["elemento1"][L"элемент2"][L"要素3"][L"στοιχείο4"]["elem5"][L"元素6"][L'元']['z'](-1234);
+\endcode
+
+The resulting XML:
+\verbatim
+<?xml version="1.0" encoding="UTF-8"?>
+<Root>
+ <elemento1>
+ <элемент2>
+ <要素3>
+ <στοιχείο4>
+ <elem5>
+ <元素6>
+ <元>
+ <z>-1234</z>
+ </元>
+ </元素6>
+ </elem5>
+ </στοιχείο4>
+ </要素3>
+ </элемент2>
+ </elemento1>
+</Root>
+\endverbatim
+
+
+\section sec_Access_XML_attributes Access XML attributes
+
+\code
+zen::XmlDoc doc;
+
+zen::XmlOut out(doc);
+out["elem"].attribute("attr1", -1); //
+out["elem"].attribute("attr2", 2.1); //write data into XML attributes
+out["elem"].attribute("attr3", true); //
+
+save(doc, "file.xml"); //throw XmlFileError
+\endcode
+
+The resulting XML:
+\verbatim
+<?xml version="1.0" encoding="UTF-8"?>
+<Root>
+ <elem attr1="-1" attr2="2.1" attr3="true"/>
+</Root>
+\endverbatim
+
+
+\section sec_Automatic_conversion_built_in Automatic conversion for built-in arithmetic types
+
+All built-in arithmetic types and <tt>bool</tt> are detected at compile time and a proper conversion is applied.
+Common conversions for integer-like types such as <tt>long</tt>, <tt>long long</tt>, <tt>__int64</tt> or <tt>size_t</tt> as well as floating point types are optimized for maximum performance.
+
+\code
+zen::XmlOut out(doc);
+
+out["int"] (-1234);
+out["double"] (1.23);
+out["float"] (4.56f);
+out["usignlong"](1234UL);
+out["bool"] (false);
+\endcode
+
+The resulting XML:
+\verbatim
+<?xml version="1.0" encoding="UTF-8"?>
+<Root>
+ <int>-1234</int>
+ <double>1.230000</double>
+ <float>4.560000</float>
+ <usignlong>1234</usignlong>
+ <bool>false</bool>
+</Root>
+\endverbatim
+
+
+\section sec_Automatic_conversion_string Automatic conversion for string-like types
+
+The document object model of zenXML internally stores all names and values as a std::string. Consequently everything that is not a std::string but is "string-like" is converted automatically
+into a std::string representation. By default zenXML accepts all character arrays like <tt>char[]</tt>, <tt>wchar_t[]</tt>, <tt>char*</tt>, <tt>wchar_t*</tt>, single characters like
+<tt>char</tt>, <tt>wchar_t</tt>, standard string classes like <tt>std::string</tt>, <tt>std::wstring</tt> and user defined string classes.
+If the input string is based on <tt>char</tt>, it will simply be copied and thereby preserves any local encodings. If the input string is based on <tt>wchar_t</tt> it will
+be converted to an UTF-8 encoded <tt>std::string</tt>. The correct <tt>wchar_t</tt> encoding of the system will be detected at compile time, for example UTF-16 on Windows,
+UTF-32 on certain Linux variants.
+
+<b>Note:</b> User defined string classes are implicitly supported if they fulfill the following string concept by defining:
+ -# A typedef named <tt>value_type</tt> for the underlying character type: must be \p char or \p wchar_t
+ -# A member function <tt>c_str()</tt> returning something that can be converted into a <tt>const value_type*</tt>
+ -# A member function <tt>length()</tt> returning the number of characters returned by <tt>c_str()</tt>
+
+\code
+std::string elem1 = "elemento1";
+std::wstring elem2 = L"элемент2";
+wxString elem3 = L"要素3";
+MyString elem4 = L"στοιχείο4";
+
+zen::XmlOut out(doc);
+
+out["string"] (elem1);
+out["wstring"] (elem2);
+out["wxString"] (elem3);
+out["MyString"] (elem4);
+out["char[6]"] ("elem5");
+out["wchar_t[4]"](L"元素6");
+out["wchar_t"] (L'元');
+out["char"] ('z');
+\endcode
+
+The resulting XML:
+\verbatim
+<?xml version="1.0" encoding="UTF-8"?>
+<Root>
+ <string>elemento1</string>
+ <wstring>элемент2</wstring>
+ <wxString>要素3</wxString>
+ <MyString>στοιχείο4</MyString>
+ <char[6]>elem5</char[6]>
+ <wchar_t[4]>元素6</wchar_t[4]>
+ <wchar_t>元</wchar_t>
+ <char>z</char>
+</Root>
+\endverbatim
+
+
+\section sec_Automatic_conversion_STL Automatic conversion for STL container types
+
+- User defined STL compatible types are implicitly supported if they fulfill the following container concept by defining:
+ -# A typedef named <tt>value_type</tt> for the underlying element type of the container
+ -# A typedef named <tt>iterator</tt> for a non-const iterator into the container
+ -# A typedef named <tt>const_iterator</tt> for a const iterator into the container
+\n\n
+ -# A member function <tt>begin()</tt> returning an iterator pointing to the first element in the container
+ -# A member function <tt>end()</tt> returning an iterator pointing just after the last element in the container
+ -# A member function <tt>insert()</tt> with the signature <tt>iterator insert(iterator position, const value_type& x)</tt>
+
+- In order to support combinations of user types and STL containers such as <tt>std::vector<MyType></tt> or <tt>std::vector<std::list<MyType>></tt> it is sufficient to
+integrate <tt>MyType</tt> into zenXML. \n
+See \ref sec_Support_user_defined
+
+\code
+std::deque <float> testDeque;
+std::list <size_t> testList;
+std::map <double, char> testMap;
+std::multimap<short, double> testMultiMap;
+std::set <int> testSet;
+std::multiset<std::string> testMultiSet;
+std::vector <wchar_t> testVector;
+std::vector <std::list<wchar_t>> testVectorList;
+std::pair <char, wchar_t> testPair;
+
+/* fill container */
+
+zen::XmlOut out(doc);
+
+out["deque"] (testDeque);
+out["list"] (testList);
+out["map"] (testMap);
+out["multimap"] (testMultiMap);
+out["set"] (testSet);
+out["multiset"] (testMultiSet);
+out["vector"] (testVector);
+out["vect_list"](testVectorList);
+out["pair" ] (testPair);
+\endcode
+
+The resulting XML:
+\verbatim
+<?xml version="1.0" encoding="UTF-8"?>
+<Root>
+ <deque>
+ <Item>1.234000</Item>
+ <Item>5.678000</Item>
+ </deque>
+ <list>
+ <Item>1</Item>
+ <Item>2</Item>
+ </list>
+ <map>
+ <Item>
+ <one>1.100000</one>
+ <two>a</two>
+ </Item>
+ <Item>
+ <one>2.200000</one>
+ <two>b</two>
+ </Item>
+ </map>
+ <multimap>
+ <Item>
+ <one>3</one>
+ <two>99.000000</two>
+ </Item>
+ <Item>
+ <one>3</one>
+ <two>100.000000</two>
+ </Item>
+ <Item>
+ <one>4</one>
+ <two>101.000000</two>
+ </Item>
+ </multimap>
+ <set>
+ <Item>1</Item>
+ <Item>2</Item>
+ </set>
+ <multiset>
+ <Item>1</Item>
+ <Item>1</Item>
+ <Item>2</Item>
+ </multiset>
+ <vector>
+ <Item>Ä</Item>
+ <Item>Ö</Item>
+ </vector>
+ <vect_list>
+ <Item>
+ <Item>ä</Item>
+ <Item>ö</Item>
+ <Item>ü</Item>
+ </Item>
+ <Item>
+ <Item>ä</Item>
+ <Item>ö</Item>
+ <Item>ü</Item>
+ </Item>
+ </vect_list>
+ <pair>
+ <one>a</one>
+ <two>â</two>
+ </pair>
+</Root>
+\endverbatim
+
+
+\section sec_Support_user_defined Support for user defined types
+
+User types can be integrated into zenXML by providing specializations of zen::readText() and zen::writeText() or zen::readStruc() and zen::writeStruc().
+The first pair should be used for all non-structured types that can be represented as a simple text string. This specialization is then used to convert the type to XML elements
+and XML attributes. The second pair should be specialized for structured types that require an XML representation as a hierarchy of elements. This specialization is used when converting
+the type to XML elements only.
+\n\n
+See section \ref sec_Type_Safety for a discussion of type categories.
+\n\n
+<b>Example: Specialization for an enum type</b>
+\code
+enum UnitTime
+{
+ UNIT_SECOND,
+ UNIT_MINUTE,
+ UNIT_HOUR
+};
+
+namespace zen
+{
+template <> inline
+void writeText(const UnitTime& value, std::string& output)
+{
+ switch (value)
+ {
+ case UNIT_SECOND: output = "second"; break;
+ case UNIT_MINUTE: output = "minute"; break;
+ case UNIT_HOUR: output = "hour" ; break;
+ }
+}
+
+template <> inline
+bool readText(const std::string& input, UnitTime& value)
+{
+ std::string tmp = input;
+ zen::trim(tmp);
+ if (tmp == "second")
+ value = UNIT_SECOND;
+ else if (tmp == "minute")
+ value = UNIT_MINUTE;
+ else if (tmp == "hour")
+ value = UNIT_HOUR;
+ else
+ return false;
+ return true;
+}
+}
+\endcode
+
+<b>Example: Brute-force specialization for an enum type</b>
+\code
+namespace zen
+{
+template <> inline
+void writeText(const EnumType& value, std::string& output)
+{
+ output = zen::toString<std::string>(value); //treat enum as an integer
+}
+
+template <> inline
+bool readText(const std::string& input, EnumType& value)
+{
+ value = static_cast<EnumType>(zen::toNumber<int>(input)); //treat enum as an integer
+ return true;
+}
+}
+\endcode
+
+<b>Example: Specialization for a structured user type</b>
+\code
+struct Config
+{
+ int a;
+ std::wstring b;
+};
+
+namespace zen
+{
+template <> inline
+void writeStruc(const Config& value, XmlElement& output)
+{
+ XmlOut out(output);
+ out["number" ](value.a);
+ out["address"](value.b);
+}
+
+template <> inline
+bool readStruc(const XmlElement& input, Config& value)
+{
+ XmlIn in(input);
+ bool rv1 = in["number" ](value.a);
+ bool rv2 = in["address"](value.b);
+ return rv1 && rv2;
+}
+}
+
+int main()
+{
+ Config cfg;
+ cfg.a = 2;
+ ...
+ std::vector<Config> cfgList;
+ cfgList.push_back(cfg);
+
+ zen::XmlDoc doc;
+ zen::XmlOut out(doc);
+ out["config"](cfgList);
+ save(doc, "file.xml"); //throw XmlFileError
+}
+\endcode
+
+The resulting XML:
+\verbatim
+<?xml version="1.0" encoding="UTF-8"?>
+<Root>
+ <config>
+ <Item>
+ <number>2</number>
+ <address>Abc 3</address>
+ </Item>
+ </config>
+</Root>
+\endverbatim
+
+
+\section sec_Structured_user_types Structured user types
+
+Although it is possible to enable conversion of structured user types by specializing zen::readStruc() and zen::writeStruc() (see \ref sec_Support_user_defined),
+this approach has one drawback: If a mapping error occurs when converting an XML element to structured user data, like one child-element is missing,
+the input proxy class zen::XmlIn is only able to detect that the whole conversion failed. It cannot say which child-elements in particular failed to convert.
+\n\n
+Therefore it may be appropriate to convert structured types by calling subroutines in order to enable fine-granular logging:
+
+\code
+void readConfig(const zen::XmlIn& in, Config& cfg)
+{
+ in["number" ](value.a); //failed conversion will now be logged for each single item by XmlIn
+ in["address"](value.b); //instead of once for the complete Config type!
+}
+\endcode
+\n
+\code
+void readConfig(const wxString& filename, Config& cfg)
+{
+ zen::XmlDoc doc; //empty XML document
+
+ try
+ {
+ load(filename, doc); //throw XmlFileError, XmlParsingError
+ }
+ catch (const zen::XmlError& e) { /* handle error */ }
+
+ zen::XmlIn in(doc);
+
+ zen::XmlIn inConfig = in["config"]; //get input proxy for child element "config"
+
+ readConfig(inConfig, cfg); //map child element to user data by calling subroutine
+
+ //check for mapping errors: errors occuring in subroutines are considered, too!
+ if (in.errorsOccured())
+ /* show mapping errors */
+}
+\endcode
+
+
+\section sec_Type_Safety Type Safety
+
+zenXML heavily utilizes methods of compile-time introspection in order to free the user from managing basic type conversions by himself.
+Thereby it is important to find the right balance between automatic conversions and type safety so that program correctness is not compromized.
+In the context of XML processing three fundamental type categories can be recognized:
+
+- <b>string-like types</b>: <tt>std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...</tt>
+- <b>to-string-convertible types</b>: any string-like type, all built-in arithmetic numbers, <tt>bool</tt>
+- <b>structured types</b>: any to-string-convertible type, STL containers, <tt>std::pair</tt>, structured user types
+
+These categories can be seen as a sequence of inclusive sets:
+\verbatim
+-----------------------------
+| structured | Used as: XML element value
+| ------------------------- | Conversion via: readStruc(), writeStruc() - may be specialized for user-defined types!
+| | to-string-convertible | | Used as: XML element/attribute value
+| | --------------- | | Conversion via: readText(), writeText() - may be specialized for user-defined types!
+| | | string-like | | | Used as: XML element/attribute value or element name
+| | --------------- | | Conversion via: utfCvrtTo<>()
+| ------------------------- |
+-----------------------------
+\endverbatim
+
+A practical implication of this design is that conversions that do not make sense in a particular context simply lead to compile-time errors:
+\code
+zen::XmlOut out(doc);
+out[L'Z'](someValue); //fine: a wchar_t is acceptable as an element name
+out[1234](someValue); //compiler error: an integer is NOT "string-like"!
+\endcode
+\n
+\code
+int valInt = 0;
+std::vector<int> valVec;
+
+zen::XmlOut out(doc);
+out["elem1"](valInt); //fine: both valInt and valVec can be converted to an XML element
+out["elem2"](valVec); //
+
+out["elem"].attribute("attr1", valInt); //fine: an integer can be converted to an XML attribute
+out["elem"].attribute("attr2", valVec); //compiler error: a std::vector<int> is NOT "to-string-convertible"!
+\endcode
+
+ \author \b Zenju
+ \n\n
+ <b>Email:</b> zenju AT gmx DOT de
+*/ \ No newline at end of file
diff --git a/zenxml/unit_test.cpp b/zenxml/unit_test.cpp
new file mode 100644
index 00000000..a671c9ee
--- /dev/null
+++ b/zenxml/unit_test.cpp
@@ -0,0 +1,95 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#include <set>
+#include <map>
+#include <deque>
+#include <vector>
+#include <list>
+#include <utility>
+#include "xml.h"
+
+using namespace zen;
+
+namespace
+{
+void unit_test()
+{
+ class Dummy {};
+
+ //compile time checks only
+
+ assert_static(!IsStlContainer<wchar_t> ::value);
+ assert_static(!IsStlContainer<char> ::value);
+ assert_static(!IsStlContainer<Dummy> ::value);
+ assert_static(!IsStlContainer<NullType> ::value);
+ assert_static(IsStlContainer<std::set <int>> ::value);
+ assert_static(IsStlContainer<std::deque <float>> ::value);
+ assert_static(IsStlContainer<std::list <size_t>> ::value);
+ assert_static((IsStlContainer<std::map <double, char>> ::value));
+ assert_static((IsStlContainer<std::multimap<short, double>>::value));
+ assert_static(IsStlContainer <std::vector <wchar_t>> ::value);
+ assert_static((IsStlPair <std::pair<int, double>> ::value));
+ assert_static(!IsStlPair<Dummy> ::value);
+
+ assert_static(!IsStringLike<Dummy>::value);
+ assert_static(!IsStringLike<int>::value);
+ assert_static(!IsStringLike<double>::value);
+ assert_static(!IsStringLike<short>::value);
+ assert_static(IsStringLike<char>::value);
+ assert_static(IsStringLike<const wchar_t>::value);
+ assert_static(IsStringLike<const char>::value);
+ assert_static(IsStringLike<wchar_t>::value);
+ assert_static(IsStringLike<char*>::value);
+ assert_static(IsStringLike<wchar_t*>::value);
+ assert_static(IsStringLike<char* const>::value);
+ assert_static(IsStringLike<wchar_t* const>::value);
+ assert_static(IsStringLike<const char*>::value);
+ assert_static(IsStringLike<const char* const>::value);
+ assert_static(IsStringLike<const wchar_t*>::value);
+ assert_static(IsStringLike<const wchar_t* const>::value);
+ assert_static(IsStringLike<const char[4]>::value);
+ assert_static(IsStringLike<const wchar_t[4]>::value);
+ assert_static(IsStringLike<char[4]>::value);
+ assert_static(IsStringLike<wchar_t[4]>::value);
+ assert_static(IsStringLike<std::string>::value);
+ assert_static(IsStringLike<std::wstring>::value);
+ assert_static(IsStringLike<const std::string>::value);
+ assert_static(IsStringLike<const std::wstring>::value);
+ assert_static(IsStringLike<const std::string&>::value);
+ assert_static(IsStringLike<const std::wstring&>::value);
+ assert_static(IsStringLike<std::string&>::value);
+ assert_static(IsStringLike<std::wstring&>::value);
+
+ assert_static(!(IsSameType<GetCharType<int>::Type, char>::value));
+ assert_static(!(IsSameType<GetCharType<double>::Type, char>::value));
+ assert_static(!(IsSameType<GetCharType<short>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<char>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<wchar_t>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<const char>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<const wchar_t>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<char*>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<wchar_t*>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<char* const>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<wchar_t* const>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<const char*>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<const char* const>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<const wchar_t*>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<const wchar_t* const>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<const char[4]>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<const wchar_t[4]>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<char[4]>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<wchar_t[4]>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<std::string>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<std::wstring>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<const std::string>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<const std::wstring>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<const std::string&>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<const std::wstring&>::Type, wchar_t>::value));
+ assert_static((IsSameType<GetCharType<std::string&>::Type, char>::value));
+ assert_static((IsSameType<GetCharType<std::wstring&>::Type, wchar_t>::value));
+}
+}
diff --git a/zenxml/xml.h b/zenxml/xml.h
new file mode 100644
index 00000000..0fd954ae
--- /dev/null
+++ b/zenxml/xml.h
@@ -0,0 +1,15 @@
+// **************************************************************************
+// * This file is part of the zenXML project. It is distributed under the *
+// * Boost Software License: http://www.boost.org/LICENSE_1_0.txt *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef ZEN_XML_HEADER_349578228034572457454554
+#define ZEN_XML_HEADER_349578228034572457454554
+
+#include "bind.h"
+
+/// The zenXML namespace
+namespace zen {}
+
+#endif //ZEN_XML_HEADER_349578228034572457454554 \ No newline at end of file
bgstack15