summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-07-22 16:56:03 +0000
committerB Stack <bgstack15@gmail.com>2020-07-22 16:56:03 +0000
commite5633fb1c0db91f01ab967330b76baf4ecdb0512 (patch)
tree10260e25ae905564f7978b83fc4e316670f987c6
parentMerge branch '10.25' into 'master' (diff)
parentadd upstream 11.0 (diff)
downloadFreeFileSync-11.0.tar.gz
FreeFileSync-11.0.tar.bz2
FreeFileSync-11.0.zip
Merge branch '11.0' into 'master'11.0
add upstream 11.0 See merge request opensource-tracking/FreeFileSync!24
-rwxr-xr-xChangelog.txt32
-rwxr-xr-xFreeFileSync/Build/Resources/Gtk3Styles.css20
-rwxr-xr-xFreeFileSync/Build/Resources/Gtk3Styles.old.css21
-rw-r--r--FreeFileSync/Build/Resources/Icons.zipbin398861 -> 391686 bytes
-rw-r--r--FreeFileSync/Build/Resources/Languages.zipbin522253 -> 522224 bytes
-rwxr-xr-xFreeFileSync/Source/Makefile2
-rwxr-xr-xFreeFileSync/Source/RealTimeSync/Makefile2
-rw-r--r--FreeFileSync/Source/RealTimeSync/app_icon.h6
-rw-r--r--FreeFileSync/Source/RealTimeSync/application.cpp28
-rw-r--r--FreeFileSync/Source/RealTimeSync/gui_generated.cpp404
-rw-r--r--FreeFileSync/Source/RealTimeSync/gui_generated.h144
-rw-r--r--FreeFileSync/Source/RealTimeSync/main_dlg.cpp12
-rw-r--r--FreeFileSync/Source/RealTimeSync/monitor.cpp1
-rw-r--r--FreeFileSync/Source/RealTimeSync/tray_menu.cpp12
-rw-r--r--FreeFileSync/Source/afs/abstract.cpp59
-rw-r--r--FreeFileSync/Source/afs/abstract.h56
-rw-r--r--FreeFileSync/Source/afs/abstract_impl.h87
-rw-r--r--FreeFileSync/Source/afs/concrete.cpp2
-rw-r--r--FreeFileSync/Source/afs/ftp.cpp53
-rw-r--r--FreeFileSync/Source/afs/gdrive.cpp601
-rw-r--r--FreeFileSync/Source/afs/native.cpp66
-rw-r--r--FreeFileSync/Source/afs/sftp.cpp30
-rw-r--r--FreeFileSync/Source/application.cpp34
-rw-r--r--FreeFileSync/Source/base/algorithm.cpp135
-rw-r--r--FreeFileSync/Source/base/algorithm.h6
-rw-r--r--FreeFileSync/Source/base/comparison.cpp24
-rw-r--r--FreeFileSync/Source/base/comparison.h4
-rw-r--r--FreeFileSync/Source/base/db_file.cpp253
-rw-r--r--FreeFileSync/Source/base/dir_lock.cpp48
-rw-r--r--FreeFileSync/Source/base/file_hierarchy.cpp38
-rw-r--r--FreeFileSync/Source/base/file_hierarchy.h12
-rw-r--r--FreeFileSync/Source/base/icon_loader.cpp364
-rw-r--r--FreeFileSync/Source/base/icon_loader.h16
-rw-r--r--FreeFileSync/Source/base/parallel_scan.cpp6
-rw-r--r--FreeFileSync/Source/base/parallel_scan.h2
-rw-r--r--FreeFileSync/Source/base/path_filter.cpp6
-rw-r--r--FreeFileSync/Source/base/process_callback.h3
-rw-r--r--FreeFileSync/Source/base/soft_filter.h6
-rw-r--r--FreeFileSync/Source/base/structures.cpp174
-rw-r--r--FreeFileSync/Source/base/structures.h111
-rw-r--r--FreeFileSync/Source/base/synchronization.cpp84
-rw-r--r--FreeFileSync/Source/base/synchronization.h3
-rw-r--r--FreeFileSync/Source/base/versioning.cpp12
-rw-r--r--FreeFileSync/Source/base_tools.cpp85
-rw-r--r--FreeFileSync/Source/base_tools.h5
-rw-r--r--FreeFileSync/Source/config.cpp196
-rw-r--r--FreeFileSync/Source/config.h14
-rw-r--r--FreeFileSync/Source/icon_buffer.cpp157
-rw-r--r--FreeFileSync/Source/icon_buffer.h16
-rw-r--r--FreeFileSync/Source/log_file.cpp24
-rw-r--r--FreeFileSync/Source/ui/abstract_folder_picker.cpp8
-rw-r--r--FreeFileSync/Source/ui/app_icon.h6
-rw-r--r--FreeFileSync/Source/ui/batch_config.cpp6
-rw-r--r--FreeFileSync/Source/ui/batch_status_handler.cpp16
-rw-r--r--FreeFileSync/Source/ui/cfg_grid.cpp42
-rw-r--r--FreeFileSync/Source/ui/file_grid.cpp1181
-rw-r--r--FreeFileSync/Source/ui/file_grid.h8
-rw-r--r--FreeFileSync/Source/ui/file_grid_attr.h52
-rw-r--r--FreeFileSync/Source/ui/file_view.cpp125
-rw-r--r--FreeFileSync/Source/ui/file_view.h32
-rw-r--r--FreeFileSync/Source/ui/folder_pair.h18
-rw-r--r--FreeFileSync/Source/ui/folder_selector.cpp2
-rw-r--r--FreeFileSync/Source/ui/gui_generated.cpp6709
-rw-r--r--FreeFileSync/Source/ui/gui_generated.h2219
-rw-r--r--FreeFileSync/Source/ui/gui_status_handler.cpp24
-rw-r--r--FreeFileSync/Source/ui/log_panel.cpp49
-rw-r--r--FreeFileSync/Source/ui/main_dlg.cpp437
-rw-r--r--FreeFileSync/Source/ui/main_dlg.h18
-rw-r--r--FreeFileSync/Source/ui/progress_indicator.cpp92
-rw-r--r--FreeFileSync/Source/ui/search_grid.cpp63
-rw-r--r--FreeFileSync/Source/ui/small_dlgs.cpp115
-rw-r--r--FreeFileSync/Source/ui/small_dlgs.h2
-rw-r--r--FreeFileSync/Source/ui/sync_cfg.cpp392
-rw-r--r--FreeFileSync/Source/ui/sync_cfg.h2
-rw-r--r--FreeFileSync/Source/ui/tray_icon.cpp4
-rw-r--r--FreeFileSync/Source/ui/tree_grid.cpp78
-rw-r--r--FreeFileSync/Source/ui/tree_grid_attr.h24
-rw-r--r--FreeFileSync/Source/ui/version_check.cpp37
-rw-r--r--FreeFileSync/Source/ui/version_check.h6
-rw-r--r--FreeFileSync/Source/version/version.h2
-rw-r--r--libcurl/rest.cpp2
-rw-r--r--wx+/app_main.h12
-rw-r--r--wx+/async_task.h21
-rw-r--r--wx+/bitmap_button.h86
-rw-r--r--wx+/context_menu.h8
-rw-r--r--wx+/dc.h35
-rw-r--r--wx+/graph.cpp10
-rw-r--r--wx+/grid.cpp32
-rw-r--r--wx+/image_holder.h22
-rw-r--r--wx+/image_resources.cpp223
-rw-r--r--wx+/image_resources.h9
-rw-r--r--wx+/image_tools.cpp284
-rw-r--r--wx+/image_tools.h59
-rw-r--r--wx+/popup_dlg.cpp6
-rw-r--r--wx+/popup_dlg_generated.cpp106
-rw-r--r--wx+/popup_dlg_generated.h47
-rw-r--r--wx+/rtl.h54
-rw-r--r--wx+/toggle_button.h37
-rw-r--r--wx+/tooltip.cpp9
-rw-r--r--wx+/tooltip.h4
-rw-r--r--xBRZ/src/xbrz.cpp57
-rw-r--r--xBRZ/src/xbrz_tools.h247
-rw-r--r--zen/base64.h2
-rw-r--r--zen/error_log.h17
-rw-r--r--zen/file_access.cpp80
-rw-r--r--zen/file_access.h16
-rw-r--r--zen/file_io.cpp14
-rw-r--r--zen/http.cpp4
-rw-r--r--zen/legacy_compiler.cpp6
-rw-r--r--zen/legacy_compiler.h3
-rw-r--r--zen/open_ssl.cpp2
-rw-r--r--zen/perf.h15
-rw-r--r--zen/recycler.cpp10
-rw-r--r--zen/scope_guard.h10
-rw-r--r--zen/serialize.h38
-rw-r--r--zen/shell_execute.cpp1
-rw-r--r--zen/stl_tools.h2
-rw-r--r--zen/string_tools.h12
-rw-r--r--zen/string_traits.h4
-rw-r--r--zen/symlink_target.h16
-rw-r--r--zen/system.cpp4
-rw-r--r--zen/zstring.cpp11
-rw-r--r--zen/zstring.h6
123 files changed, 8765 insertions, 8123 deletions
diff --git a/Changelog.txt b/Changelog.txt
index e7539426..6591c551 100755
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,3 +1,31 @@
+FreeFileSync 11.1
+-----------------
+
+
+FreeFileSync 11.0 [2020-07-21]
+------------------------------
+Revised file layout on main grid
+Skip download/upload when copying Google Drive files inside account
+Support moving Google Drive files between shared drives and My Drive
+Support copying Google Drive shortcuts between accounts
+Support copying Google Docs, Sheets, Slides, etc. within account
+Fixed parsing uninitialized Google Drive modification time
+Fixed Google Drive file already existing check running too late
+Ignore slash/backslash differences during manual search
+Avoid creating orphan database entry if one DB file fails to load
+Limit modification time error count for log file warning message
+Support copying WSL symlinks
+Avoid duplicate MTP/Google Drive item creation from multiple threads
+Fixed TMPDIR not found during startup (macOS)
+Added sync variant icons
+Avoid redundant icon format conversions
+Buffer high-DPI image scaling results
+Improved MTP thumbnail scaling performance
+Avoid race condition during parallel file icon rendering (Linux)
+Allow creating folder name with leading/trailing spaces
+Start supporting GTK3 (Linux)
+
+
FreeFileSync 10.25 [2020-06-18]
-------------------------------
New file tree layout for main grid
@@ -17,7 +45,7 @@ Sort by path component names instead of relative path
Support access to MEGAcmd FTP server
Fixed Google Drive error when removing last parent of shared item
Fixed Google Drive owned+shared files being unlinked instead of deleted
-Fixed Google Drive change notificaton evaluation for item without parents
+Fixed Google Drive change notification evaluation for item without parents
Support double-click/"Browse directory" for (S)FTP/Google Drive (Linux)
@@ -75,7 +103,7 @@ Select log file format (HTML or plain text)
Aggregate email notifications when hitting sending limits
Show code literals in system error messages
Limit conflict item count for log file warning message
-Show log icon error indicator even if error occured after sync
+Show log icon error indicator even if error occurred after sync
Disable background drag & drop when showing modal dialog
Hide dummy model, vendor names in log files
Fixed ANSI encoding used for log file time formatting
diff --git a/FreeFileSync/Build/Resources/Gtk3Styles.css b/FreeFileSync/Build/Resources/Gtk3Styles.css
index 4cac90ea..6ebcf4c3 100755
--- a/FreeFileSync/Build/Resources/Gtk3Styles.css
+++ b/FreeFileSync/Build/Resources/Gtk3Styles.css
@@ -1,14 +1,20 @@
-button
-{
- /*remove excessive inner border from bitmap buttons*/
- padding: 2px;
- min-width: 0;
- min-height: 0;
-}
+/* CSS format as required by CentOS (GTK 3.22.30)
+ https://developer.gnome.org/gtk3/stable/chap-css-properties.html
+ https://developer.gnome.org/gtk3/stable/gtk-migrating-GtkStyleContext-css.html
+ pkg-config --modversion gtk+-3.0
+*/
*
{
/* see wx+/grid.cpp: spacing wouldn't hurt, but let's be consistent */
-GtkScrolledWindow-scrollbar-spacing: 0;
}
+
+button
+{
+ padding: 2px; /*remove excessive inner border from bitmap buttons*/
+ min-width: 0;
+ min-height: 0;
+ /*border-radius: 5px;*/
+}
diff --git a/FreeFileSync/Build/Resources/Gtk3Styles.old.css b/FreeFileSync/Build/Resources/Gtk3Styles.old.css
new file mode 100755
index 00000000..24c559a6
--- /dev/null
+++ b/FreeFileSync/Build/Resources/Gtk3Styles.old.css
@@ -0,0 +1,21 @@
+/* CSS format as required by Debian (GTK 3.14.5)
+
+ https://developer.gnome.org/gtk3/stable/chap-css-properties.html
+ https://developer.gnome.org/gtk3/stable/gtk-migrating-GtkStyleContext-css.html
+ pkg-config --modversion gtk+-3.0
+*/
+
+*
+{
+ /* see wx+/grid.cpp: spacing wouldn't hurt, but let's be consistent */
+ -GtkScrolledWindow-scrollbar-spacing: 0;
+}
+
+GtkButton
+{
+ padding: 2px; /*remove excessive inner border from bitmap buttons*/
+ /*
+ min-width: 0; => Debian: Error code 3: Gtk3Styles.css:13:10'min-width' is not a valid property name [gtk_css_provider_load_from_path]
+ min-height: 0;
+ */
+}
diff --git a/FreeFileSync/Build/Resources/Icons.zip b/FreeFileSync/Build/Resources/Icons.zip
index 2da8cf06..9f81e6ec 100644
--- a/FreeFileSync/Build/Resources/Icons.zip
+++ b/FreeFileSync/Build/Resources/Icons.zip
Binary files differ
diff --git a/FreeFileSync/Build/Resources/Languages.zip b/FreeFileSync/Build/Resources/Languages.zip
index f56421ed..a84ddb83 100644
--- a/FreeFileSync/Build/Resources/Languages.zip
+++ b/FreeFileSync/Build/Resources/Languages.zip
Binary files differ
diff --git a/FreeFileSync/Source/Makefile b/FreeFileSync/Source/Makefile
index eedfa711..d76274bc 100755
--- a/FreeFileSync/Source/Makefile
+++ b/FreeFileSync/Source/Makefile
@@ -106,7 +106,7 @@ cppFiles+=../../wx+/popup_dlg.cpp
cppFiles+=../../wx+/popup_dlg_generated.cpp
cppFiles+=../../xBRZ/src/xbrz.cpp
-tmpPath = /tmp/$(exeName)_Make
+tmpPath = $(TMPDIR)/$(exeName)_Make
objFiles = $(cppFiles:%=$(tmpPath)/ffs/src/%.o)
diff --git a/FreeFileSync/Source/RealTimeSync/Makefile b/FreeFileSync/Source/RealTimeSync/Makefile
index 6d2961ce..f2ea409d 100755
--- a/FreeFileSync/Source/RealTimeSync/Makefile
+++ b/FreeFileSync/Source/RealTimeSync/Makefile
@@ -44,7 +44,7 @@ cppFiles+=../../../wx+/popup_dlg_generated.cpp
cppFiles+=../../../wx+/taskbar.cpp
cppFiles+=../../../xBRZ/src/xbrz.cpp
-tmpPath = /tmp/$(exeName)_Make
+tmpPath = $(TMPDIR)/$(exeName)_Make
objFiles = $(cppFiles:%=$(tmpPath)/ffs/src/rts/%.o)
diff --git a/FreeFileSync/Source/RealTimeSync/app_icon.h b/FreeFileSync/Source/RealTimeSync/app_icon.h
index e0392e34..6352cc7a 100644
--- a/FreeFileSync/Source/RealTimeSync/app_icon.h
+++ b/FreeFileSync/Source/RealTimeSync/app_icon.h
@@ -15,10 +15,10 @@ namespace zen
inline
wxIcon getRtsIcon() //see FFS/app_icon.h
{
- assert(getResourceImage("RealTimeSync").GetWidth () == getResourceImage("RealTimeSync").GetHeight() &&
- getResourceImage("RealTimeSync").GetWidth() == 128);
+ assert(loadImage("RealTimeSync").GetWidth () == loadImage("RealTimeSync").GetHeight() &&
+ loadImage("RealTimeSync").GetWidth() == 128);
wxIcon icon;
- icon.CopyFromBitmap(getResourceImage("RealTimeSync").ConvertToImage().Scale(fastFromDIP(64), fastFromDIP(64), wxIMAGE_QUALITY_HIGH));
+ icon.CopyFromBitmap(loadImage("RealTimeSync", fastFromDIP(64)));
return icon;
}
diff --git a/FreeFileSync/Source/RealTimeSync/application.cpp b/FreeFileSync/Source/RealTimeSync/application.cpp
index f69488dd..2804838c 100644
--- a/FreeFileSync/Source/RealTimeSync/application.cpp
+++ b/FreeFileSync/Source/RealTimeSync/application.cpp
@@ -41,7 +41,7 @@ bool Application::OnInit()
{
//do not call wxApp::OnInit() to avoid using wxWidgets command line parser
- try { initResourceImages(fff::getResourceDirPf() + Zstr("Icons.zip")); }
+ try { imageResourcesInit(fff::getResourceDirPf() + Zstr("Icons.zip")); }
catch (FileError&) { assert(false); }
//errors are not really critical in this context
@@ -53,27 +53,39 @@ bool Application::OnInit()
g_vfs_get_default(); //returns unowned GVfs*
#elif GTK_MAJOR_VERSION == 3
- try
+ auto loadCSS = [&](const char* fileName)
{
- GtkCssProvider* provider = ::gtk_css_provider_new ();
+ GtkCssProvider* provider = ::gtk_css_provider_new();
ZEN_ON_SCOPE_EXIT(::g_object_unref(provider));
GError* error = nullptr;
- ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error););
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider,
- (fff::getResourceDirPf() + "Gtk3Styles.css").c_str(), //const gchar* path,
+ (fff::getResourceDirPf() + fileName).c_str(), //const gchar* path,
&error); //GError** error
if (error)
- throw SysError(formatSystemError("gtk_css_provider_load_from_data",
+ throw SysError(formatSystemError("gtk_css_provider_load_from_path",
replaceCpy(_("Error code %x"), L"%x", numberTo<std::wstring>(error->code)),
utfTo<std::wstring>(error->message)));
::gtk_style_context_add_provider_for_screen(::gdk_screen_get_default(), //GdkScreen* screen,
GTK_STYLE_PROVIDER(provider), //GtkStyleProvider* provider,
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); //guint priority
+ };
+ try
+ {
+ loadCSS("Gtk3Styles.css"); //throw SysError
+ }
+ catch (const SysError& e)
+ {
+ std::cerr << utfTo<std::string>(e.toString()) << "\n" "Loading GTK3\'s old CSS format instead...\n";
+ try
+ {
+ loadCSS("Gtk3Styles.old.css"); //throw SysError
+ }
+ catch (const SysError& e2) { std::cerr << utfTo<std::string>(e2.toString()) << '\n'; }
}
- catch (const SysError& e) { std::cerr << utfTo<std::string>(e.toString()) << '\n'; }
#else
#error unknown GTK version!
#endif
@@ -111,7 +123,7 @@ bool Application::OnInit()
int Application::OnExit()
{
fff::releaseWxLocale();
- cleanupResourceImages();
+ ImageResourcesCleanup();
return wxApp::OnExit();
}
diff --git a/FreeFileSync/Source/RealTimeSync/gui_generated.cpp b/FreeFileSync/Source/RealTimeSync/gui_generated.cpp
index 7b60ec16..ee458580 100644
--- a/FreeFileSync/Source/RealTimeSync/gui_generated.cpp
+++ b/FreeFileSync/Source/RealTimeSync/gui_generated.cpp
@@ -13,297 +13,297 @@
MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxSize( -1, -1 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- m_menubar1 = new wxMenuBar( 0 );
- m_menuFile = new wxMenu();
- wxMenuItem* m_menuItem6;
- m_menuItem6 = new wxMenuItem( m_menuFile, wxID_NEW, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem6 );
+ m_menubar1 = new wxMenuBar( 0 );
+ m_menuFile = new wxMenu();
+ wxMenuItem* m_menuItem6;
+ m_menuItem6 = new wxMenuItem( m_menuFile, wxID_NEW, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem6 );
- wxMenuItem* m_menuItem13;
- m_menuItem13 = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( _("&Open...") ) + wxT('\t') + wxT("CTRL+O"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem13 );
+ wxMenuItem* m_menuItem13;
+ m_menuItem13 = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( _("&Open...") ) + wxT('\t') + wxT("CTRL+O"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem13 );
- wxMenuItem* m_menuItem14;
- m_menuItem14 = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( _("Save &as...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem14 );
+ wxMenuItem* m_menuItem14;
+ m_menuItem14 = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( _("Save &as...") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem14 );
- m_menuFile->AppendSeparator();
+ m_menuFile->AppendSeparator();
- m_menuItemQuit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemQuit );
+ m_menuItemQuit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemQuit );
- m_menubar1->Append( m_menuFile, _("&File") );
+ m_menubar1->Append( m_menuFile, _("&File") );
- m_menuHelp = new wxMenu();
- wxMenuItem* m_menuItemContent;
- m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&View help") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemContent );
+ m_menuHelp = new wxMenu();
+ wxMenuItem* m_menuItemContent;
+ m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&View help") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemContent );
- m_menuHelp->AppendSeparator();
+ m_menuHelp->AppendSeparator();
- m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("SHIFT+F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemAbout );
+ m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("SHIFT+F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemAbout );
- m_menubar1->Append( m_menuHelp, _("&Help") );
+ m_menubar1->Append( m_menuHelp, _("&Help") );
- this->SetMenuBar( m_menubar1 );
+ this->SetMenuBar( m_menubar1 );
- bSizerMain = new wxBoxSizer( wxVERTICAL );
+ bSizerMain = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer161;
- bSizer161 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer161;
+ bSizer161 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer16;
- bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer16;
+ bSizer16 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText9 = new wxStaticText( this, wxID_ANY, _("Usage:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText9->Wrap( -1 );
- m_staticText9->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticText9 = new wxStaticText( this, wxID_ANY, _("Usage:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText9->Wrap( -1 );
+ m_staticText9->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer16->Add( m_staticText9, 0, wxALL, 5 );
+ bSizer16->Add( m_staticText9, 0, wxALL, 5 );
- ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 );
- ffgSizer111->SetFlexibleDirection( wxBOTH );
- ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 );
+ ffgSizer111->SetFlexibleDirection( wxBOTH );
+ ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticText16 = new wxStaticText( this, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText16->Wrap( -1 );
- ffgSizer111->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticText16 = new wxStaticText( this, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText16->Wrap( -1 );
+ ffgSizer111->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_staticText3 = new wxStaticText( this, wxID_ANY, _("Select folders to watch."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText3->Wrap( -1 );
- ffgSizer111->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText3 = new wxStaticText( this, wxID_ANY, _("Select folders to watch."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText3->Wrap( -1 );
+ ffgSizer111->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText17 = new wxStaticText( this, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText17->Wrap( -1 );
- ffgSizer111->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticText17 = new wxStaticText( this, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText17->Wrap( -1 );
+ ffgSizer111->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_staticText4 = new wxStaticText( this, wxID_ANY, _("Enter a command line."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText4->Wrap( -1 );
- ffgSizer111->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText4 = new wxStaticText( this, wxID_ANY, _("Enter a command line."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText4->Wrap( -1 );
+ ffgSizer111->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText18 = new wxStaticText( this, wxID_ANY, _("3."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText18->Wrap( -1 );
- ffgSizer111->Add( m_staticText18, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticText18 = new wxStaticText( this, wxID_ANY, _("3."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText18->Wrap( -1 );
+ ffgSizer111->Add( m_staticText18, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_staticText5 = new wxStaticText( this, wxID_ANY, _("Press 'Start'."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText5->Wrap( -1 );
- ffgSizer111->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText5 = new wxStaticText( this, wxID_ANY, _("Press 'Start'."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText5->Wrap( -1 );
+ ffgSizer111->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer16->Add( ffgSizer111, 0, wxALL, 5 );
+ bSizer16->Add( ffgSizer111, 0, wxALL, 5 );
- bSizer161->Add( bSizer16, 0, 0, 5 );
+ bSizer161->Add( bSizer16, 0, 0, 5 );
- wxBoxSizer* bSizer152;
- bSizer152 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer152;
+ bSizer152 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText811 = new wxStaticText( this, wxID_ANY, _("To get started just import a \"ffs_batch\" file."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText811->Wrap( -1 );
- m_staticText811->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText811 = new wxStaticText( this, wxID_ANY, _("To get started just import a \"ffs_batch\" file."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText811->Wrap( -1 );
+ m_staticText811->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer152->Add( m_staticText811, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ bSizer152->Add( m_staticText811, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- m_staticText10 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText10->Wrap( -1 );
- m_staticText10->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText10 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText10->Wrap( -1 );
+ m_staticText10->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer152->Add( m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 );
+ bSizer152->Add( m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 );
- m_bitmapBatch = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer152->Add( m_bitmapBatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapBatch = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer152->Add( m_bitmapBatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText11 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText11->Wrap( -1 );
- m_staticText11->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText11 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText11->Wrap( -1 );
+ m_staticText11->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer152->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
+ bSizer152->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
- m_hyperlink243 = new wxHyperlinkCtrl( this, wxID_ANY, _("Show examples"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer152->Add( m_hyperlink243, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ m_hyperlink243 = new wxHyperlinkCtrl( this, wxID_ANY, _("Show examples"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer152->Add( m_hyperlink243, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- bSizer161->Add( bSizer152, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer161->Add( bSizer152, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerMain->Add( bSizer161, 0, wxALL|wxEXPAND, 5 );
+ bSizerMain->Add( bSizer161, 0, wxALL|wxEXPAND, 5 );
- m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMain->Add( m_staticline2, 0, wxEXPAND, 5 );
+ m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticline2, 0, wxEXPAND, 5 );
- m_panelMain = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelMain->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelMain = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelMain->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer1;
- bSizer1 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer1;
+ bSizer1 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer151;
- bSizer151 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer151;
+ bSizer151 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer142;
- bSizer142 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer142;
+ bSizer142 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapFolders = new wxStaticBitmap( m_panelMain, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer142->Add( m_bitmapFolders, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_bitmapFolders = new wxStaticBitmap( m_panelMain, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer142->Add( m_bitmapFolders, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_staticText7 = new wxStaticText( m_panelMain, wxID_ANY, _("Folders to watch:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText7->Wrap( -1 );
- bSizer142->Add( m_staticText7, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText7 = new wxStaticText( m_panelMain, wxID_ANY, _("Folders to watch:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText7->Wrap( -1 );
+ bSizer142->Add( m_staticText7, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer151->Add( bSizer142, 0, 0, 5 );
+ bSizer151->Add( bSizer142, 0, 0, 5 );
- m_panelMainFolder = new wxPanel( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelMainFolder->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelMainFolder = new wxPanel( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelMainFolder->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxFlexGridSizer* fgSizer1;
- fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
- fgSizer1->AddGrowableCol( 1 );
- fgSizer1->SetFlexibleDirection( wxBOTH );
- fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
+ wxFlexGridSizer* fgSizer1;
+ fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer1->AddGrowableCol( 1 );
+ fgSizer1->SetFlexibleDirection( wxBOTH );
+ fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
- fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
+ fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticTextFinalPath = new wxStaticText( m_panelMainFolder, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextFinalPath->Wrap( -1 );
- fgSizer1->Add( m_staticTextFinalPath, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+ m_staticTextFinalPath = new wxStaticText( m_panelMainFolder, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFinalPath->Wrap( -1 );
+ fgSizer1->Add( m_staticTextFinalPath, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
- wxBoxSizer* bSizer20;
- bSizer20 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer20;
+ bSizer20 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonAddFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonAddFolder->SetToolTip( _("Add folder") );
+ m_bpButtonAddFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonAddFolder->SetToolTip( _("Add folder") );
- bSizer20->Add( m_bpButtonAddFolder, 0, wxEXPAND, 5 );
+ bSizer20->Add( m_bpButtonAddFolder, 0, wxEXPAND, 5 );
- m_bpButtonRemoveTopFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") );
+ m_bpButtonRemoveTopFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") );
- bSizer20->Add( m_bpButtonRemoveTopFolder, 0, wxEXPAND, 5 );
+ bSizer20->Add( m_bpButtonRemoveTopFolder, 0, wxEXPAND, 5 );
- fgSizer1->Add( bSizer20, 0, wxEXPAND, 5 );
+ fgSizer1->Add( bSizer20, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer19;
- bSizer19 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer19;
+ bSizer19 = new wxBoxSizer( wxHORIZONTAL );
- m_txtCtrlDirectoryMain = new wxTextCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer19->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_txtCtrlDirectoryMain = new wxTextCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer19->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectFolderMain = new wxButton( m_panelMainFolder, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectFolderMain->SetToolTip( _("Select a folder") );
+ m_buttonSelectFolderMain = new wxButton( m_panelMainFolder, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectFolderMain->SetToolTip( _("Select a folder") );
- bSizer19->Add( m_buttonSelectFolderMain, 0, wxEXPAND, 5 );
+ bSizer19->Add( m_buttonSelectFolderMain, 0, wxEXPAND, 5 );
- fgSizer1->Add( bSizer19, 0, wxEXPAND, 5 );
+ fgSizer1->Add( bSizer19, 0, wxEXPAND, 5 );
- m_panelMainFolder->SetSizer( fgSizer1 );
- m_panelMainFolder->Layout();
- fgSizer1->Fit( m_panelMainFolder );
- bSizer151->Add( m_panelMainFolder, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ m_panelMainFolder->SetSizer( fgSizer1 );
+ m_panelMainFolder->Layout();
+ fgSizer1->Fit( m_panelMainFolder );
+ bSizer151->Add( m_panelMainFolder, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
- m_scrolledWinFolders = new wxScrolledWindow( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_scrolledWinFolders->SetScrollRate( 10, 10 );
- m_scrolledWinFolders->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_scrolledWinFolders = new wxScrolledWindow( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_scrolledWinFolders->SetScrollRate( 10, 10 );
+ m_scrolledWinFolders->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizerFolders = new wxBoxSizer( wxVERTICAL );
+ bSizerFolders = new wxBoxSizer( wxVERTICAL );
- m_scrolledWinFolders->SetSizer( bSizerFolders );
- m_scrolledWinFolders->Layout();
- bSizerFolders->Fit( m_scrolledWinFolders );
- bSizer151->Add( m_scrolledWinFolders, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_scrolledWinFolders->SetSizer( bSizerFolders );
+ m_scrolledWinFolders->Layout();
+ bSizerFolders->Fit( m_scrolledWinFolders );
+ bSizer151->Add( m_scrolledWinFolders, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer1->Add( bSizer151, 1, wxALL|wxEXPAND, 5 );
+ bSizer1->Add( bSizer151, 1, wxALL|wxEXPAND, 5 );
- m_staticline212 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer1->Add( m_staticline212, 0, wxEXPAND, 5 );
+ m_staticline212 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer1->Add( m_staticline212, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer14;
- bSizer14 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer14;
+ bSizer14 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText8 = new wxStaticText( m_panelMain, wxID_ANY, _("Minimum idle time (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText8->Wrap( -1 );
- bSizer14->Add( m_staticText8, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_staticText8 = new wxStaticText( m_panelMain, wxID_ANY, _("Minimum idle time (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText8->Wrap( -1 );
+ bSizer14->Add( m_staticText8, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_spinCtrlDelay = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- m_spinCtrlDelay->SetToolTip( _("Idle time between last detected change and execution of command") );
+ m_spinCtrlDelay = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ m_spinCtrlDelay->SetToolTip( _("Idle time between last detected change and execution of command") );
- bSizer14->Add( m_spinCtrlDelay, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizer14->Add( m_spinCtrlDelay, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizer1->Add( bSizer14, 0, wxALL|wxEXPAND, 5 );
+ bSizer1->Add( bSizer14, 0, wxALL|wxEXPAND, 5 );
- m_staticline211 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer1->Add( m_staticline211, 0, wxEXPAND, 5 );
+ m_staticline211 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer1->Add( m_staticline211, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer141;
- bSizer141 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer141;
+ bSizer141 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer13;
- bSizer13 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer13;
+ bSizer13 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapConsole = new wxStaticBitmap( m_panelMain, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer13->Add( m_bitmapConsole, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapConsole = new wxStaticBitmap( m_panelMain, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer13->Add( m_bitmapConsole, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText6 = new wxStaticText( m_panelMain, wxID_ANY, _("Command line:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText6->Wrap( -1 );
- bSizer13->Add( m_staticText6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText6 = new wxStaticText( m_panelMain, wxID_ANY, _("Command line:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText6->Wrap( -1 );
+ bSizer13->Add( m_staticText6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer141->Add( bSizer13, 0, 0, 5 );
+ bSizer141->Add( bSizer13, 0, 0, 5 );
- m_textCtrlCommand = new wxTextCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_textCtrlCommand->SetToolTip( _("The command is triggered if:\n- files or subfolders change\n- new folders arrive (e.g. USB stick insert)") );
+ m_textCtrlCommand = new wxTextCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_textCtrlCommand->SetToolTip( _("The command is triggered if:\n- files or subfolders change\n- new folders arrive (e.g. USB stick insert)") );
- bSizer141->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bSizer141->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer1->Add( bSizer141, 0, wxALL|wxEXPAND, 5 );
+ bSizer1->Add( bSizer141, 0, wxALL|wxEXPAND, 5 );
- m_panelMain->SetSizer( bSizer1 );
- m_panelMain->Layout();
- bSizer1->Fit( m_panelMain );
- bSizerMain->Add( m_panelMain, 1, wxEXPAND, 5 );
+ m_panelMain->SetSizer( bSizer1 );
+ m_panelMain->Layout();
+ bSizer1->Fit( m_panelMain );
+ bSizerMain->Add( m_panelMain, 1, wxEXPAND, 5 );
- m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMain->Add( m_staticline5, 0, wxEXPAND, 5 );
+ m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticline5, 0, wxEXPAND, 5 );
- m_buttonStart = new zen::BitmapTextButton( this, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonStart = new zen::BitmapTextButton( this, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonStart->SetDefault();
- m_buttonStart->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonStart->SetDefault();
+ m_buttonStart->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerMain->Add( m_buttonStart, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ bSizerMain->Add( m_buttonStart, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- this->SetSizer( bSizerMain );
- this->Layout();
- bSizerMain->Fit( this );
+ this->SetSizer( bSizerMain );
+ this->Layout();
+ bSizerMain->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) );
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnConfigNew ), this, m_menuItem6->GetId());
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnConfigLoad ), this, m_menuItem13->GetId());
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnConfigSave ), this, m_menuItem14->GetId());
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuQuit ), this, m_menuItemQuit->GetId());
- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ), this, m_menuItemContent->GetId());
- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ), this, m_menuItemAbout->GetId());
- m_hyperlink243->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( MainDlgGenerated::OnHelpRealTimeSync ), NULL, this );
- m_bpButtonAddFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this );
- m_bpButtonRemoveTopFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this );
- m_buttonStart->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) );
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnConfigNew ), this, m_menuItem6->GetId());
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnConfigLoad ), this, m_menuItem13->GetId());
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnConfigSave ), this, m_menuItem14->GetId());
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuQuit ), this, m_menuItemQuit->GetId());
+ m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ), this, m_menuItemContent->GetId());
+ m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ), this, m_menuItemAbout->GetId());
+ m_hyperlink243->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( MainDlgGenerated::OnHelpRealTimeSync ), NULL, this );
+ m_bpButtonAddFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this );
+ m_bpButtonRemoveTopFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this );
+ m_buttonStart->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this );
}
MainDlgGenerated::~MainDlgGenerated()
@@ -312,28 +312,28 @@ MainDlgGenerated::~MainDlgGenerated()
FolderGenerated::FolderGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer114;
- bSizer114 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer114;
+ bSizer114 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonRemoveFolder = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") );
+ m_bpButtonRemoveFolder = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") );
- bSizer114->Add( m_bpButtonRemoveFolder, 0, wxEXPAND, 5 );
+ bSizer114->Add( m_bpButtonRemoveFolder, 0, wxEXPAND, 5 );
- m_txtCtrlDirectory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer114->Add( m_txtCtrlDirectory, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_txtCtrlDirectory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer114->Add( m_txtCtrlDirectory, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectFolder = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectFolder->SetToolTip( _("Select a folder") );
+ m_buttonSelectFolder = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectFolder->SetToolTip( _("Select a folder") );
- bSizer114->Add( m_buttonSelectFolder, 0, wxEXPAND, 5 );
+ bSizer114->Add( m_buttonSelectFolder, 0, wxEXPAND, 5 );
- this->SetSizer( bSizer114 );
- this->Layout();
- bSizer114->Fit( this );
+ this->SetSizer( bSizer114 );
+ this->Layout();
+ bSizer114->Fit( this );
}
FolderGenerated::~FolderGenerated()
diff --git a/FreeFileSync/Source/RealTimeSync/gui_generated.h b/FreeFileSync/Source/RealTimeSync/gui_generated.h
index bc8568e4..5ecd49d3 100644
--- a/FreeFileSync/Source/RealTimeSync/gui_generated.h
+++ b/FreeFileSync/Source/RealTimeSync/gui_generated.h
@@ -10,7 +10,7 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
-namespace zen{ class BitmapTextButton; }
+namespace zen { class BitmapTextButton; }
#include <wx/string.h>
#include <wx/bitmap.h>
@@ -43,69 +43,69 @@ namespace zen{ class BitmapTextButton; }
///////////////////////////////////////////////////////////////////////////////
class MainDlgGenerated : public wxFrame
{
- private:
-
- protected:
- wxMenuBar* m_menubar1;
- wxMenu* m_menuFile;
- wxMenuItem* m_menuItemQuit;
- wxMenu* m_menuHelp;
- wxMenuItem* m_menuItemAbout;
- wxBoxSizer* bSizerMain;
- wxStaticText* m_staticText9;
- wxFlexGridSizer* ffgSizer111;
- wxStaticText* m_staticText16;
- wxStaticText* m_staticText3;
- wxStaticText* m_staticText17;
- wxStaticText* m_staticText4;
- wxStaticText* m_staticText18;
- wxStaticText* m_staticText5;
- wxStaticText* m_staticText811;
- wxStaticText* m_staticText10;
- wxStaticBitmap* m_bitmapBatch;
- wxStaticText* m_staticText11;
- wxHyperlinkCtrl* m_hyperlink243;
- wxStaticLine* m_staticline2;
- wxPanel* m_panelMain;
- wxStaticBitmap* m_bitmapFolders;
- wxStaticText* m_staticText7;
- wxPanel* m_panelMainFolder;
- wxStaticText* m_staticTextFinalPath;
- wxBitmapButton* m_bpButtonAddFolder;
- wxBitmapButton* m_bpButtonRemoveTopFolder;
- wxTextCtrl* m_txtCtrlDirectoryMain;
- wxButton* m_buttonSelectFolderMain;
- wxScrolledWindow* m_scrolledWinFolders;
- wxBoxSizer* bSizerFolders;
- wxStaticLine* m_staticline212;
- wxStaticText* m_staticText8;
- wxSpinCtrl* m_spinCtrlDelay;
- wxStaticLine* m_staticline211;
- wxStaticBitmap* m_bitmapConsole;
- wxStaticText* m_staticText6;
- wxTextCtrl* m_textCtrlCommand;
- wxStaticLine* m_staticline5;
- zen::BitmapTextButton* m_buttonStart;
-
- // 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 OnMenuQuit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpRealTimeSync( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnAddFolder( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRemoveTopFolder( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnStart( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- MainDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-
- ~MainDlgGenerated();
+private:
+
+protected:
+ wxMenuBar* m_menubar1;
+ wxMenu* m_menuFile;
+ wxMenuItem* m_menuItemQuit;
+ wxMenu* m_menuHelp;
+ wxMenuItem* m_menuItemAbout;
+ wxBoxSizer* bSizerMain;
+ wxStaticText* m_staticText9;
+ wxFlexGridSizer* ffgSizer111;
+ wxStaticText* m_staticText16;
+ wxStaticText* m_staticText3;
+ wxStaticText* m_staticText17;
+ wxStaticText* m_staticText4;
+ wxStaticText* m_staticText18;
+ wxStaticText* m_staticText5;
+ wxStaticText* m_staticText811;
+ wxStaticText* m_staticText10;
+ wxStaticBitmap* m_bitmapBatch;
+ wxStaticText* m_staticText11;
+ wxHyperlinkCtrl* m_hyperlink243;
+ wxStaticLine* m_staticline2;
+ wxPanel* m_panelMain;
+ wxStaticBitmap* m_bitmapFolders;
+ wxStaticText* m_staticText7;
+ wxPanel* m_panelMainFolder;
+ wxStaticText* m_staticTextFinalPath;
+ wxBitmapButton* m_bpButtonAddFolder;
+ wxBitmapButton* m_bpButtonRemoveTopFolder;
+ wxTextCtrl* m_txtCtrlDirectoryMain;
+ wxButton* m_buttonSelectFolderMain;
+ wxScrolledWindow* m_scrolledWinFolders;
+ wxBoxSizer* bSizerFolders;
+ wxStaticLine* m_staticline212;
+ wxStaticText* m_staticText8;
+ wxSpinCtrl* m_spinCtrlDelay;
+ wxStaticLine* m_staticline211;
+ wxStaticBitmap* m_bitmapConsole;
+ wxStaticText* m_staticText6;
+ wxTextCtrl* m_textCtrlCommand;
+ wxStaticLine* m_staticline5;
+ zen::BitmapTextButton* m_buttonStart;
+
+ // 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 OnMenuQuit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpRealTimeSync( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnAddFolder( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveTopFolder( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnStart( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ MainDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+
+ ~MainDlgGenerated();
};
@@ -114,17 +114,17 @@ class MainDlgGenerated : public wxFrame
///////////////////////////////////////////////////////////////////////////////
class FolderGenerated : public wxPanel
{
- private:
+private:
- protected:
- wxButton* m_buttonSelectFolder;
+protected:
+ wxButton* m_buttonSelectFolder;
- public:
- wxBitmapButton* m_bpButtonRemoveFolder;
- wxTextCtrl* m_txtCtrlDirectory;
+public:
+ wxBitmapButton* m_bpButtonRemoveFolder;
+ wxTextCtrl* m_txtCtrlDirectory;
- FolderGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = 0, const wxString& name = wxEmptyString );
- ~FolderGenerated();
+ FolderGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = 0, const wxString& name = wxEmptyString );
+ ~FolderGenerated();
};
diff --git a/FreeFileSync/Source/RealTimeSync/main_dlg.cpp b/FreeFileSync/Source/RealTimeSync/main_dlg.cpp
index 82898a4e..4101adc6 100644
--- a/FreeFileSync/Source/RealTimeSync/main_dlg.cpp
+++ b/FreeFileSync/Source/RealTimeSync/main_dlg.cpp
@@ -51,7 +51,7 @@ public:
FolderGenerated(parent),
folderSelector_(parent, *this, *m_buttonSelectFolder, *m_txtCtrlDirectory, nullptr /*staticText*/)
{
- m_bpButtonRemoveFolder->SetBitmapLabel(getResourceImage("item_remove"));
+ m_bpButtonRemoveFolder->SetBitmapLabel(loadImage("item_remove"));
}
void setPath(const Zstring& dirpath) { folderSelector_.setPath(dirpath); }
@@ -83,13 +83,13 @@ MainDialog::MainDialog(const Zstring& cfgFileName) :
m_bpButtonRemoveTopFolder->Hide();
m_panelMainFolder->Layout();
- m_bitmapBatch ->SetBitmap(getResourceImage("file_batch_sicon"));
+ m_bitmapBatch ->SetBitmap(loadImage("file_batch_sicon"));
m_bitmapFolders->SetBitmap(fff::IconBuffer::genericDirIcon(fff::IconBuffer::SIZE_SMALL));
- m_bitmapConsole->SetBitmap(shrinkImage(getResourceImage("command_line").ConvertToImage(), fastFromDIP(20)));
+ m_bitmapConsole->SetBitmap(loadImage("command_line", fastFromDIP(20)));
- m_bpButtonAddFolder ->SetBitmapLabel(getResourceImage("item_add"));
- m_bpButtonRemoveTopFolder->SetBitmapLabel(getResourceImage("item_remove"));
- setBitmapTextLabel(*m_buttonStart, getResourceImage("startRts").ConvertToImage(), m_buttonStart->GetLabel(), fastFromDIP(5), fastFromDIP(8));
+ m_bpButtonAddFolder ->SetBitmapLabel(loadImage("item_add"));
+ m_bpButtonRemoveTopFolder->SetBitmapLabel(loadImage("item_remove"));
+ setBitmapTextLabel(*m_buttonStart, loadImage("startRts"), m_buttonStart->GetLabel(), fastFromDIP(5), fastFromDIP(8));
//register key event
Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnKeyPressed), nullptr, this);
diff --git a/FreeFileSync/Source/RealTimeSync/monitor.cpp b/FreeFileSync/Source/RealTimeSync/monitor.cpp
index f6bc99a8..b8d7650e 100644
--- a/FreeFileSync/Source/RealTimeSync/monitor.cpp
+++ b/FreeFileSync/Source/RealTimeSync/monitor.cpp
@@ -246,7 +246,6 @@ void rts::monitorDirectories(const std::vector<Zstring>& folderPathPhrases, std:
executeExternalCommand(lastChangeDetected.itemPath, getChangeTypeName(lastChangeDetected.type)); //throw FileError
}
catch (const FileError& e) { reportError(e.toString()); }
- warn_static("bug: losing change notifications while reportError is notifying!")
nextExecTime = std::chrono::steady_clock::time_point::max();
}
diff --git a/FreeFileSync/Source/RealTimeSync/tray_menu.cpp b/FreeFileSync/Source/RealTimeSync/tray_menu.cpp
index be28e452..2e6feb38 100644
--- a/FreeFileSync/Source/RealTimeSync/tray_menu.cpp
+++ b/FreeFileSync/Source/RealTimeSync/tray_menu.cpp
@@ -86,12 +86,12 @@ public:
switch (m)
{
case TRAY_MODE_ACTIVE:
- setTrayIcon(trayBmp_, _("Directory monitoring active"));
+ setTrayIcon(trayImg_, _("Directory monitoring active"));
break;
case TRAY_MODE_WAITING:
assert(!missingFolderPath.empty());
- setTrayIcon(greyScale(trayBmp_), _("Waiting until directory is available:") + L' ' + fmtPath(missingFolderPath));
+ setTrayIcon(greyScale(trayImg_), _("Waiting until directory is available:") + L' ' + fmtPath(missingFolderPath));
break;
case TRAY_MODE_ERROR:
@@ -105,13 +105,13 @@ private:
void OnErrorFlashIcon(wxEvent& event)
{
iconFlashStatusLast_ = !iconFlashStatusLast_;
- setTrayIcon(greyScaleIfDisabled(trayBmp_, iconFlashStatusLast_), _("Error"));
+ setTrayIcon(greyScaleIfDisabled(trayImg_, iconFlashStatusLast_), _("Error"));
}
- void setTrayIcon(const wxBitmap& bmp, const wxString& statusTxt)
+ void setTrayIcon(const wxImage& img, const wxString& statusTxt)
{
wxIcon realtimeIcon;
- realtimeIcon.CopyFromBitmap(bmp);
+ realtimeIcon.CopyFromBitmap(img);
wxString tooltip = L"RealTimeSync\n" + statusTxt;
if (!jobName_.empty())
tooltip += L"\n\"" + jobName_ + L'"';
@@ -193,7 +193,7 @@ private:
const wxString jobName_; //RTS job name, may be empty
- const wxBitmap trayBmp_ = getResourceImage("RTS_tray_24"); //use a 24x24 bitmap for perfect fit
+ const wxImage trayImg_ = loadImage("RTS_tray_24"); //use 24x24 bitmap for perfect fit
};
diff --git a/FreeFileSync/Source/afs/abstract.cpp b/FreeFileSync/Source/afs/abstract.cpp
index f78433d8..d41996be 100644
--- a/FreeFileSync/Source/afs/abstract.cpp
+++ b/FreeFileSync/Source/afs/abstract.cpp
@@ -112,7 +112,7 @@ void AFS::traverseFolderFlat(const AfsPath& afsPath, //throw FileError
}
-//target existing: undefined behavior! (fail/overwrite/auto-rename)
+//already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
AFS::FileCopyResult AFS::copyFileAsStream(const AfsPath& afsSource, const StreamAttributes& attrSource, //throw FileError, ErrorFileLocked, X
const AbstractPath& apTarget, const IOCallback& notifyUnbufferedIO /*throw X*/) const
{
@@ -135,7 +135,7 @@ AFS::FileCopyResult AFS::copyFileAsStream(const AfsPath& afsSource, const Stream
attrSourceNew = attrSource; //SFTP/FTP
//TODO: evaluate: consequences of stale attributes
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
auto streamOut = getOutputStream(apTarget, attrSourceNew.fileSize, attrSourceNew.modTime, notifyUnbufferedWrite); //throw FileError
bufferedStreamCopy(*streamIn, *streamOut); //throw FileError, ErrorFileLocked, X
@@ -147,7 +147,7 @@ AFS::FileCopyResult AFS::copyFileAsStream(const AfsPath& afsSource, const Stream
L"%x", numberTo<std::wstring>(attrSourceNew.fileSize)),
L"%y", numberTo<std::wstring>(totalBytesRead)) + L" [notifyUnbufferedRead]");
- const AFS::FinalizeResult finResult = streamOut->finalize(); //throw FileError, X
+ const FinalizeResult finResult = streamOut->finalize(); //throw FileError, X
//catch file I/O bugs + read/write conflicts: (note: different check than inside AbstractFileSystem::OutputStream::finalize() => checks notifyUnbufferedIO()!)
ZEN_ON_SCOPE_FAIL(try { removeFilePlain(apTarget); /*throw FileError*/ }
@@ -159,7 +159,7 @@ AFS::FileCopyResult AFS::copyFileAsStream(const AfsPath& afsSource, const Stream
L"%x", numberTo<std::wstring>(totalBytesRead)),
L"%y", numberTo<std::wstring>(totalBytesWritten)) + L" [notifyUnbufferedWrite]");
- AFS::FileCopyResult cpResult;
+ FileCopyResult cpResult;
cpResult.fileSize = attrSourceNew.fileSize;
cpResult.modTime = attrSourceNew.modTime;
cpResult.sourceFileId = attrSourceNew.fileId;
@@ -175,7 +175,7 @@ AFS::FileCopyResult AFS::copyFileAsStream(const AfsPath& afsSource, const Stream
}
-//target existing: undefined behavior! (fail/overwrite/auto-rename)
+//already existing + no onDeleteTargetFile: undefined behavior! (e.g. fail/overwrite/auto-rename)
AFS::FileCopyResult AFS::copyFileTransactional(const AbstractPath& apSource, const StreamAttributes& attrSource, //throw FileError, ErrorFileLocked, X
const AbstractPath& apTarget,
bool copyFilePermissions,
@@ -189,23 +189,23 @@ AFS::FileCopyResult AFS::copyFileTransactional(const AbstractPath& apSource, con
if (typeid(apSource.afsDevice.ref()) == typeid(apTargetTmp.afsDevice.ref()))
return apSource.afsDevice.ref().copyFileForSameAfsType(apSource.afsPath, attrSource,
apTargetTmp, copyFilePermissions, notifyUnbufferedIO); //throw FileError, ErrorFileLocked, X
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
//fall back to stream-based file copy:
if (copyFilePermissions)
- throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(AFS::getDisplayPath(apTargetTmp))),
+ throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(getDisplayPath(apTargetTmp))),
_("Operation not supported between different devices."));
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
return apSource.afsDevice.ref().copyFileAsStream(apSource.afsPath, attrSource, apTargetTmp, notifyUnbufferedIO); //throw FileError, ErrorFileLocked, X
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
};
if (transactionalCopy && !hasNativeTransactionalCopy(apTarget))
{
- const std::optional<AbstractPath> parentPath = AFS::getParentPath(apTarget);
+ const std::optional<AbstractPath> parentPath = getParentPath(apTarget);
if (!parentPath)
- throw FileError(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(AFS::getDisplayPath(apTarget))), L"Path is device root.");
- const Zstring fileName = AFS::getItemName(apTarget);
+ throw FileError(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(getDisplayPath(apTarget))), L"Path is device root.");
+ const Zstring fileName = getItemName(apTarget);
//- generate (hopefully) unique file name to avoid clashing with some remnant ffs_tmp file
//- do not loop: avoid pathological cases, e.g. https://freefilesync.org/forum/viewtopic.php?t=1592
@@ -217,28 +217,28 @@ AFS::FileCopyResult AFS::copyFileTransactional(const AbstractPath& apSource, con
const Zstring& shortGuid = printNumber<Zstring>(Zstr("%04x"), static_cast<unsigned int>(getCrc16(generateGUID())));
- const AbstractPath apTargetTmp = AFS::appendRelPath(*parentPath, tmpName + Zstr('~') + shortGuid + TEMP_FILE_ENDING);
+ const AbstractPath apTargetTmp = appendRelPath(*parentPath, tmpName + Zstr('~') + shortGuid + TEMP_FILE_ENDING);
//-------------------------------------------------------------------------------------------
- const AFS::FileCopyResult result = copyFilePlain(apTargetTmp); //throw FileError, ErrorFileLocked
+ const FileCopyResult result = copyFilePlain(apTargetTmp); //throw FileError, ErrorFileLocked
//transactional behavior: ensure cleanup; not needed before copyFilePlain() which is already transactional
- ZEN_ON_SCOPE_FAIL( try { AFS::removeFilePlain(apTargetTmp); }
+ ZEN_ON_SCOPE_FAIL( try { removeFilePlain(apTargetTmp); }
catch (FileError&) {});
//have target file deleted (after read access on source and target has been confirmed) => allow for almost transactional overwrite
if (onDeleteTargetFile)
onDeleteTargetFile(); //throw X
- //perf: this call is REALLY expensive on unbuffered volumes! ~40% performance decrease on FAT USB stick!
+ //already existing: undefined behavior! (e.g. fail/overwrite)
moveAndRenameItem(apTargetTmp, apTarget); //throw FileError, (ErrorMoveUnsupported)
+ //perf: this call is REALLY expensive on unbuffered volumes! ~40% performance decrease on FAT USB stick!
/* CAVEAT on FAT/FAT32: the sequence of deleting the target file and renaming "file.txt.ffs_tmp" to "file.txt" does
NOT PRESERVE the creation time of the .ffs_tmp file, but SILENTLY "reuses" whatever creation time the old "file.txt" had!
This "feature" is called "File System Tunneling":
https://devblogs.microsoft.com/oldnewthing/?p=34923
https://support.microsoft.com/kb/172190/en-us */
-
return result;
}
else
@@ -256,16 +256,16 @@ AFS::FileCopyResult AFS::copyFileTransactional(const AbstractPath& apSource, con
}
-void AFS::createFolderIfMissingRecursion(const AbstractPath& ap) //throw FileError
+bool AFS::createFolderIfMissingRecursion(const AbstractPath& ap) //throw FileError
{
const std::optional<AbstractPath> parentPath = getParentPath(ap);
if (!parentPath) //device root
- return;
+ return false;
try //generally we expect that path already exists (see: versioning, base folder, log file path) => check first
{
if (getItemType(ap) != ItemType::file) //throw FileError
- return;
+ return false;
}
catch (FileError&) {} //not yet existing or access error? let's find out...
@@ -273,15 +273,16 @@ void AFS::createFolderIfMissingRecursion(const AbstractPath& ap) //throw FileErr
try
{
- //target existing: fail/ignore
+ //already existing: fail
createFolderPlain(ap); //throw FileError
+ return true;
}
catch (FileError&)
{
try
{
if (getItemType(ap) != ItemType::file) //throw FileError
- return; //already existing => possible, if createFolderIfMissingRecursion() is run in parallel
+ return true; //already existing => possible, if createFolderIfMissingRecursion() is run in parallel
}
catch (FileError&) {} //not yet existing or access error
@@ -310,7 +311,7 @@ std::optional<AFS::ItemType> AFS::itemStillExists(const AfsPath& afsPath) const
const Zstring itemName = getItemName(afsPath);
assert(!itemName.empty());
- const std::optional<ItemType> parentType = AFS::itemStillExists(*parentAfsPath); //throw FileError
+ const std::optional<ItemType> parentType = itemStillExists(*parentAfsPath); //throw FileError
if (parentType && *parentType != ItemType::file /*obscure, but possible (and not an error)*/)
try
@@ -378,7 +379,7 @@ void AFS::removeFolderIfExistsRecursion(const AfsPath& afsPath, //throw FileErro
//no error situation if directory is not existing! manual deletion relies on it!
if (std::optional<ItemType> type = itemStillExists(afsPath)) //throw FileError
{
- if (*type == AFS::ItemType::symlink)
+ if (*type == ItemType::symlink)
{
if (onBeforeFileDeletion)
onBeforeFileDeletion(getDisplayPath(afsPath)); //throw X
@@ -397,13 +398,13 @@ void AFS::removeFileIfExists(const AbstractPath& ap) //throw FileError
{
try
{
- AFS::removeFilePlain(ap); //throw FileError
+ removeFilePlain(ap); //throw FileError
}
catch (const FileError& e)
{
try
{
- if (!AFS::itemStillExists(ap)) //throw FileError
+ if (!itemStillExists(ap)) //throw FileError
return;
}
//abstract context => unclear which exception is more relevant/useless:
@@ -418,13 +419,13 @@ void AFS::removeSymlinkIfExists(const AbstractPath& ap) //throw FileError
{
try
{
- AFS::removeSymlinkPlain(ap); //throw FileError
+ removeSymlinkPlain(ap); //throw FileError
}
catch (const FileError& e)
{
try
{
- if (!AFS::itemStillExists(ap)) //throw FileError
+ if (!itemStillExists(ap)) //throw FileError
return;
}
//abstract context => unclear which exception is more relevant/useless:
@@ -439,13 +440,13 @@ void AFS::removeEmptyFolderIfExists(const AbstractPath& ap) //throw FileError
{
try
{
- AFS::removeFolderPlain(ap); //throw FileError
+ removeFolderPlain(ap); //throw FileError
}
catch (const FileError& e)
{
try
{
- if (!AFS::itemStillExists(ap)) //throw FileError
+ if (!itemStillExists(ap)) //throw FileError
return;
}
//abstract context => unclear which exception is more relevant/useless:
diff --git a/FreeFileSync/Source/afs/abstract.h b/FreeFileSync/Source/afs/abstract.h
index de7a5993..ff0a882e 100644
--- a/FreeFileSync/Source/afs/abstract.h
+++ b/FreeFileSync/Source/afs/abstract.h
@@ -100,13 +100,13 @@ struct AbstractFileSystem //THREAD-SAFETY: "const" member functions must model t
static std::optional<ItemType> itemStillExists(const AbstractPath& ap) { return ap.afsDevice.ref().itemStillExists(ap.afsPath); } //throw FileError
//----------------------------------------------------------------------------------------------------------------
- //already existing: fail/ignore
+ //already existing: fail
//does NOT create parent directories recursively if not existing
static void createFolderPlain(const AbstractPath& ap) { ap.afsDevice.ref().createFolderPlain(ap.afsPath); } //throw FileError
- //already existing: ignore
- //creates parent directories recursively if not existing
- static void createFolderIfMissingRecursion(const AbstractPath& ap); //throw FileError
+ //creates directories recursively if not existing
+ //returns false if folder already exists
+ static bool createFolderIfMissingRecursion(const AbstractPath& ap); //throw FileError
static void removeFolderIfExistsRecursion(const AbstractPath& ap, //throw FileError
const std::function<void (const std::wstring& displayPath)>& onBeforeFileDeletion /*throw X*/, //optional
@@ -126,9 +126,8 @@ struct AbstractFileSystem //THREAD-SAFETY: "const" member functions must model t
static AbstractPath getSymlinkResolvedPath(const AbstractPath& ap) { return ap.afsDevice.ref().getSymlinkResolvedPath (ap.afsPath); } //throw FileError
static bool equalSymlinkContent(const AbstractPath& apLhs, const AbstractPath& apRhs); //throw FileError
//----------------------------------------------------------------------------------------------------------------
- //noexcept; optional return value:
- static zen::ImageHolder getFileIcon (const AbstractPath& ap, int pixelSize) { return ap.afsDevice.ref().getFileIcon (ap.afsPath, pixelSize); }
- static zen::ImageHolder getThumbnailImage(const AbstractPath& ap, int pixelSize) { return ap.afsDevice.ref().getThumbnailImage(ap.afsPath, pixelSize); }
+ static zen::FileIconHolder getFileIcon (const AbstractPath& ap, int pixelSize) { return ap.afsDevice.ref().getFileIcon (ap.afsPath, pixelSize); } //throw SysError; optional return value
+ static zen::ImageHolder getThumbnailImage(const AbstractPath& ap, int pixelSize) { return ap.afsDevice.ref().getThumbnailImage(ap.afsPath, pixelSize); } //throw SysError; optional return value
//----------------------------------------------------------------------------------------------------------------
struct StreamAttributes
@@ -181,7 +180,7 @@ struct AbstractFileSystem //THREAD-SAFETY: "const" member functions must model t
const std::optional<uint64_t> bytesExpected_;
uint64_t bytesWrittenTotal_ = 0;
};
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
static std::unique_ptr<OutputStream> getOutputStream(const AbstractPath& ap, //throw FileError
std::optional<uint64_t> streamSize,
std::optional<time_t> modTime,
@@ -247,7 +246,7 @@ struct AbstractFileSystem //THREAD-SAFETY: "const" member functions must model t
{ ap.afsDevice.ref().traverseFolderFlat(ap.afsPath, onFile, onFolder, onSymlink); }
//----------------------------------------------------------------------------------------------------------------
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite)
static void moveAndRenameItem(const AbstractPath& pathFrom, const AbstractPath& pathTo); //throw FileError, ErrorMoveUnsupported
//Note: it MAY happen that copyFileTransactional() leaves temp files behind, e.g. temporary network drop.
@@ -264,7 +263,7 @@ struct AbstractFileSystem //THREAD-SAFETY: "const" member functions must model t
};
//symlink handling: follow
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing + no onDeleteTargetFile: undefined behavior! (e.g. fail/overwrite/auto-rename)
//returns current attributes at the time of copy
static FileCopyResult copyFileTransactional(const AbstractPath& apSource, const StreamAttributes& attrSource, //throw FileError, ErrorFileLocked, X
const AbstractPath& apTarget,
@@ -276,11 +275,12 @@ struct AbstractFileSystem //THREAD-SAFETY: "const" member functions must model t
//accummulated delta != file size! consider ADS, sparse, compressed files
const zen::IOCallback& notifyUnbufferedIO /*throw X*/);
- //already existing: fail/ignore
- //symlink handling: follow link!
+ //already existing: fail
+ //symlink handling: follow
static void copyNewFolder(const AbstractPath& apSource, const AbstractPath& apTarget, bool copyFilePermissions); //throw FileError
- static void copySymlink (const AbstractPath& apSource, const AbstractPath& apTarget, bool copyFilePermissions); //throw FileError
+ //already existing: fail
+ static void copySymlink(const AbstractPath& apSource, const AbstractPath& apTarget, bool copyFilePermissions); //throw FileError
//----------------------------------------------------------------------------------------------------------------
@@ -322,7 +322,7 @@ protected:
const std::function<void (const FolderInfo& fi)>& onFolder, //optional
const std::function<void (const SymlinkInfo& si)>& onSymlink) const; //
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
FileCopyResult copyFileAsStream(const AfsPath& afsSource, const StreamAttributes& attrSource, //throw FileError, ErrorFileLocked, X
const AbstractPath& apTarget, const zen::IOCallback& notifyUnbufferedIO /*throw X*/) const;
@@ -341,7 +341,7 @@ private:
virtual ItemType getItemType(const AfsPath& afsPath) const = 0; //throw FileError
//----------------------------------------------------------------------------------------------------------------
- //already existing: fail/ignore
+ //already existing: fail
virtual void createFolderPlain(const AfsPath& afsPath) const = 0; //throw FileError
//non-recursive folder deletion:
@@ -358,7 +358,7 @@ private:
//----------------------------------------------------------------------------------------------------------------
virtual std::unique_ptr<InputStream> getInputStream(const AfsPath& afsPath, const zen::IOCallback& notifyUnbufferedIO /*throw X*/) const = 0; //throw FileError, ErrorFileLocked
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
virtual std::unique_ptr<OutputStreamImpl> getOutputStream(const AfsPath& afsPath, //throw FileError
std::optional<uint64_t> streamSize,
std::optional<time_t> modTime,
@@ -368,26 +368,27 @@ private:
//----------------------------------------------------------------------------------------------------------------
virtual bool supportsPermissions(const AfsPath& afsPath) const = 0; //throw FileError
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite)
virtual void moveAndRenameItemForSameAfsType(const AfsPath& pathFrom, const AbstractPath& pathTo) const = 0; //throw FileError, ErrorMoveUnsupported
- //symlink handling: follow link!
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //symlink handling: follow
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
virtual FileCopyResult copyFileForSameAfsType(const AfsPath& afsSource, const StreamAttributes& attrSource, //throw FileError, ErrorFileLocked, X
const AbstractPath& apTarget, bool copyFilePermissions,
//accummulated delta != file size! consider ADS, sparse, compressed files
const zen::IOCallback& notifyUnbufferedIO /*throw X*/) const = 0;
- //target existing: fail/ignore
- //symlink handling: follow link!
+ //symlink handling: follow
+ //already existing: fail
virtual void copyNewFolderForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const = 0; //throw FileError
+ //already existing: fail
virtual void copySymlinkForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const = 0; //throw FileError
//----------------------------------------------------------------------------------------------------------------
- virtual zen::ImageHolder getFileIcon (const AfsPath& afsPath, int pixelSize) const = 0; //noexcept; optional return value
- virtual zen::ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const = 0; //
+ virtual zen::FileIconHolder getFileIcon (const AfsPath& afsPath, int pixelSize) const = 0; //throw SysError; optional return value
+ virtual zen::ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const = 0; //throw SysError; optional return value
virtual void authenticateAccess(bool allowUserInteraction) const = 0; //throw FileError
@@ -439,15 +440,13 @@ AbstractFileSystem::OutputStream::OutputStream(std::unique_ptr<OutputStreamImpl>
inline
AbstractFileSystem::OutputStream::~OutputStream()
{
- using namespace zen;
-
//we delete the file on errors: => file should not have existed prior to creating OutputStream instance!!
outStream_.reset(); //close file handle *before* remove!
if (!finalizeSucceeded_) //transactional output stream! => clean up!
//even needed for Google Drive: e.g. user might cancel during OutputStreamImpl::finalize(), just after file was written transactionally
try { AbstractFileSystem::removeFilePlain(filePath_); /*throw FileError*/ }
- catch (FileError&) {}
+ catch (zen::FileError&) {}
}
@@ -509,6 +508,7 @@ void AbstractFileSystem::moveAndRenameItem(const AbstractPath& pathFrom, const A
L"%x", L'\n' + fmtPath(getDisplayPath(pathFrom))),
L"%y", L'\n' + fmtPath(getDisplayPath(pathTo))), _("Operation not supported between different devices."));
+ //already existing: undefined behavior! (e.g. fail/overwrite)
pathFrom.afsDevice.ref().moveAndRenameItemForSameAfsType(pathFrom.afsPath, pathTo); //throw FileError, ErrorMoveUnsupported
}
@@ -526,7 +526,7 @@ void AbstractFileSystem::copyNewFolder(const AbstractPath& apSource, const Abstr
throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(getDisplayPath(apTarget))),
_("Operation not supported between different devices."));
- //already existing: fail/ignore
+ //already existing: fail
createFolderPlain(apTarget); //throw FileError
}
else
@@ -534,6 +534,7 @@ void AbstractFileSystem::copyNewFolder(const AbstractPath& apSource, const Abstr
}
+//already existing: fail
inline
void AbstractFileSystem::copySymlink(const AbstractPath& apSource, const AbstractPath& apTarget, bool copyFilePermissions) //throw FileError
{
@@ -544,6 +545,7 @@ void AbstractFileSystem::copySymlink(const AbstractPath& apSource, const Abstrac
L"%x", L'\n' + fmtPath(getDisplayPath(apSource))),
L"%y", L'\n' + fmtPath(getDisplayPath(apTarget))), _("Operation not supported between different devices."));
+ //already existing: fail
apSource.afsDevice.ref().copySymlinkForSameAfsType(apSource.afsPath, apTarget, copyFilePermissions); //throw FileError
}
}
diff --git a/FreeFileSync/Source/afs/abstract_impl.h b/FreeFileSync/Source/afs/abstract_impl.h
index 34ec4bdc..a05843a8 100644
--- a/FreeFileSync/Source/afs/abstract_impl.h
+++ b/FreeFileSync/Source/afs/abstract_impl.h
@@ -204,33 +204,82 @@ private:
//Google Drive/MTP happily create duplicate files/folders with the same names, without failing
//=> however, FFS's "check if already exists after failure" idiom *requires* failure
-//=> serialize access (at path level) so that GdriveFileState access and file/folder creation act as a single operation
+//=> best effort: serialize access (at path level) so that GdriveFileState existence check and file/folder creation act as a single operation
template <class NativePath>
class PathAccessLocker
{
+ struct BlockInfo
+ {
+ std::mutex m;
+ bool itemInUse = false; //protected by mutex!
+ /* can we get rid of BlockType::fail and save "bool itemInUse" "somewhere else"?
+ Google Drive => put dummy entry in GdriveFileState? problem: there is no fail-free removal: accessGlobalFileState() can throw!
+ MTP => no (buffered) state */
+ };
public:
PathAccessLocker() {}
+ //how to handle *other* access attempts while holding the lock:
+ enum class BlockType
+ {
+ otherWait,
+ otherFail
+ };
+
class Lock
{
public:
- Lock(const NativePath& nativePath) //throw SysError
+ Lock(const NativePath& nativePath, BlockType blockType) : blockType_(blockType) //throw SysError
{
+ using namespace zen;
+
+ if (const std::shared_ptr<PathAccessLocker> pal = getGlobalInstance())
+ pal->pathLocks_.access([&](std::map<NativePath, std::weak_ptr<BlockInfo>>& pathLocks)
{
- const std::shared_ptr<PathAccessLocker> gpalh = getGlobalInstance(); //throw SysError
- if (!gpalh)
- throw zen::SysError(L"PathAccessLocker::Lock() function call not allowed during init/shutdown.");
- m_ = gpalh->getOrCreateMutex(nativePath);
+ //clean up obsolete entries
+ std::erase_if(pathLocks, [](const auto& v) { return !v.second.lock(); });
+
+ //get or create:
+ std::weak_ptr<BlockInfo>& weakPtr = pathLocks[nativePath];
+ blockInfo_ = weakPtr.lock();
+ if (!blockInfo_)
+ weakPtr = blockInfo_ = std::make_shared<BlockInfo>();
+ });
+ else
+ throw SysError(L"PathAccessLocker::Lock() function call not allowed during init/shutdown.");
+
+ blockInfo_->m.lock();
+
+ if (blockInfo_->itemInUse)
+ {
+ blockInfo_->m.unlock();
+ throw SysError(replaceCpy(_("The item %x is currently in use."), L"%x", fmtPath(getItemName(nativePath))));
+ }
+
+ if (blockType == BlockType::otherFail)
+ {
+ blockInfo_->itemInUse = true;
+ blockInfo_->m.unlock();
}
- m_->lock();
}
- ~Lock() { m_->unlock(); }
+
+ ~Lock()
+ {
+ if (blockType_ == BlockType::otherFail)
+ {
+ blockInfo_->m.lock();
+ blockInfo_->itemInUse = false;
+ }
+
+ blockInfo_->m.unlock();
+ }
private:
Lock (const Lock&) = delete;
Lock& operator=(const Lock&) = delete;
- std::shared_ptr<std::mutex> m_;
+ const BlockType blockType_; //[!] needed: we can't instead check "itemInUse" (without locking first)
+ std::shared_ptr<BlockInfo> blockInfo_;
};
private:
@@ -238,25 +287,9 @@ private:
PathAccessLocker& operator=(const PathAccessLocker&) = delete;
static std::shared_ptr<PathAccessLocker> getGlobalInstance();
+ static Zstring getItemName(const NativePath& nativePath);
- std::shared_ptr<std::mutex> getOrCreateMutex(const NativePath& nativePath)
- {
- std::shared_ptr<std::mutex> m;
- pathLocks_.access([&](std::map<NativePath, std::weak_ptr<std::mutex>>& pathLocks)
- {
- //remove obsolete entries
- std::erase_if(pathLocks, [](const auto& v) { return !v.second.lock(); });
-
- //get or create mutex
- std::weak_ptr<std::mutex>& weakPtr = pathLocks[nativePath];
- m = weakPtr.lock();
- if (!m)
- weakPtr = m = std::make_shared<std::mutex>();
- });
- return m;
- }
-
- zen::Protected<std::map<NativePath, std::weak_ptr<std::mutex>>> pathLocks_;
+ zen::Protected<std::map<NativePath, std::weak_ptr<BlockInfo>>> pathLocks_;
};
}
diff --git a/FreeFileSync/Source/afs/concrete.cpp b/FreeFileSync/Source/afs/concrete.cpp
index 1495a872..faa7dd01 100644
--- a/FreeFileSync/Source/afs/concrete.cpp
+++ b/FreeFileSync/Source/afs/concrete.cpp
@@ -18,7 +18,7 @@ void fff::initAfs(const AfsConfig& cfg)
ftpInit();
sftpInit();
gdriveInit(appendSeparator(cfg.configDirPathPf) + Zstr("GoogleDrive"),
- appendSeparator(cfg.resourceDirPathPf) + Zstr("cacert.pem"));
+ appendSeparator(cfg.resourceDirPathPf) + Zstr("cacert.pem"));
}
diff --git a/FreeFileSync/Source/afs/ftp.cpp b/FreeFileSync/Source/afs/ftp.cpp
index d4a37332..ad2e5f29 100644
--- a/FreeFileSync/Source/afs/ftp.cpp
+++ b/FreeFileSync/Source/afs/ftp.cpp
@@ -89,7 +89,7 @@ Zstring ansiToUtfEncoding(const std::string& str) //throw SysError
gsize bytesWritten = 0; //not including the terminating null
GError* error = nullptr;
- ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error););
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
//https://developer.gnome.org/glib/stable/glib-Character-Set-Conversion.html#g-convert
gchar* utfStr = ::g_convert(str.c_str(), //const gchar* str,
@@ -116,7 +116,7 @@ std::string utfToAnsiEncoding(const Zstring& str) //throw SysError
gsize bytesWritten = 0; //not including the terminating null
GError* error = nullptr;
- ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error););
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
gchar* ansiStr = ::g_convert(str.c_str(), //const gchar* str,
str.size(), //gssize len,
@@ -1149,8 +1149,7 @@ private:
try
{
FtpLineParser parser(rawLine);
- /*
- total 4953 <- optional first line
+ /* total 4953 <- optional first line
drwxr-xr-x 1 root root 4096 Jan 10 11:58 version
-rwxr-xr-x 1 root root 1084 Sep 2 01:17 Unit Test.vcxproj.user
-rwxr-xr-x 1 1000 300 2217 Feb 28 2016 win32.manifest
@@ -1173,8 +1172,8 @@ private:
NetPresenz for the Mac:
-------r-- 326 1391972 1392298 Nov 22 1995 MegaPhone.sit
- drwxrwxr-x folder 2 May 10 1996 network
- */
+ drwxrwxr-x folder 2 May 10 1996 network */
+
const std::string typeTag = parser.readRange(1, [](char c) //throw SysError
{
return c == '-' || c == 'b' || c == 'c' || c == 'd' || c == 'l' || c == 'p' || c == 's';
@@ -1552,12 +1551,10 @@ void ftpFileDownload(const FtpLogin& login, const AfsPath& afsFilePath, //throw
}
-/*
-File already existing:
+/* File already existing:
freefilesync.org: overwrites
FileZilla Server: overwrites
- Windows IIS: overwrites
-*/
+ Windows IIS: overwrites */
void ftpFileUpload(const FtpLogin& login, const AfsPath& afsFilePath, //throw FileError, X
const std::function<size_t(void* buffer, size_t bytesToRead)>& readBlock /*throw X*/) //returning 0 signals EOF: Posix read() semantics
{
@@ -1688,6 +1685,8 @@ private:
//===========================================================================================================================
+//CAVEAT: if upload fails due to already existing, OutputStreamFtp constructor does not fail, but OutputStreamFtp::write() does!
+// => ~OutputStreamImpl() will delete the already existing file!
struct OutputStreamFtp : public AbstractFileSystem::OutputStreamImpl
{
OutputStreamFtp(const FtpLogin& login,
@@ -1891,7 +1890,7 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- //already existing: fail/ignore
+ //already existing: fail
//=> FTP will (most likely) fail and give a clear error message:
// freefilesync.org: "550 Can't create directory: File exists"
// FileZilla Server: "550 Directory already exists"
@@ -1996,15 +1995,18 @@ private:
return std::make_unique<InputStreamFtp>(login_, afsPath, notifyUnbufferedIO);
}
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
- //=> most FTP servers overwrite, but some (e.g. IIS) can be configured to fail, others (pureFTP) can be configured to auto-rename:
- // https://download.pureftpd.org/pub/pure-ftpd/doc/README
- // '-r': Never overwrite existing files. Uploading a file whose name already exists cause an automatic rename. Files are called xyz, xyz.1, xyz.2, xyz.3, etc.
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
+ //=> actual behavior: fail(+delete!)/overwrite/auto-rename
std::unique_ptr<OutputStreamImpl> getOutputStream(const AfsPath& afsPath, //throw FileError
std::optional<uint64_t> streamSize,
std::optional<time_t> modTime,
const IOCallback& notifyUnbufferedIO /*throw X*/) const override
{
+ /* most FTP servers overwrite, but some (e.g. IIS) can be configured to fail, others (pureFTP) can be configured to auto-rename:
+ https://download.pureftpd.org/pub/pure-ftpd/doc/README
+ '-r': Never overwrite existing files. Uploading a file whose name already exists causes an automatic rename. Files are called xyz, xyz.1, xyz.2, xyz.3, etc. */
+
+ //already existing: fail (+ delete!!!)
return std::make_unique<OutputStreamFtp>(login_, afsPath, modTime, notifyUnbufferedIO);
}
@@ -2015,8 +2017,8 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- //symlink handling: follow link!
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //symlink handling: follow
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
FileCopyResult copyFileForSameAfsType(const AfsPath& afsSource, const StreamAttributes& attrSource, //throw FileError, (ErrorFileLocked), X
const AbstractPath& apTarget, bool copyFilePermissions, const IOCallback& notifyUnbufferedIO /*throw X*/) const override
{
@@ -2024,21 +2026,22 @@ private:
if (copyFilePermissions)
throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(AFS::getDisplayPath(apTarget))), _("Operation not supported by device."));
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
return copyFileAsStream(afsSource, attrSource, apTarget, notifyUnbufferedIO); //throw FileError, (ErrorFileLocked), X
}
- //target existing: fail/ignore
- //symlink handling: follow link!
+ //symlink handling: follow
+ //already existing: fail
void copyNewFolderForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const override //throw FileError
{
if (copyFilePermissions)
throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(AFS::getDisplayPath(apTarget))), _("Operation not supported by device."));
- //already existing: fail/ignore
+ //already existing: fail
AFS::createFolderPlain(apTarget); //throw FileError
}
+ //already existing: fail
void copySymlinkForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const override
{
throw FileError(replaceCpy(replaceCpy(_("Cannot copy symbolic link %x to %y."),
@@ -2046,8 +2049,8 @@ private:
L"%y", L'\n' + fmtPath(AFS::getDisplayPath(apTarget))), _("Operation not supported by device."));
}
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
- //=> most linux-based FTP servers overwrite, Windows-based servers fail (but most can be configured to behave differently)
+ //already existing: undefined behavior! (e.g. fail/overwrite)
+ //=> actual behavior: most linux-based FTP servers overwrite, Windows-based servers fail (but most can be configured to behave differently)
// freefilesync.org: silent overwrite
// Windows IIS: CURLE_QUOTE_ERROR: QUOT command failed with 550 Cannot create a file when that file already exists.
// FileZilla Server: CURLE_QUOTE_ERROR: QUOT command failed with 553 file exists
@@ -2087,8 +2090,8 @@ private:
//wait until there is real demand for copying from and to FTP with permissions => use stream-based file copy:
//----------------------------------------------------------------------------------------------------------------
- ImageHolder getFileIcon (const AfsPath& afsPath, int pixelSize) const override { return ImageHolder(); } //noexcept; optional return value
- ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const override { return ImageHolder(); } //
+ FileIconHolder getFileIcon (const AfsPath& afsPath, int pixelSize) const override { return {}; } //throw SysError; optional return value
+ ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const override { return {}; } //throw SysError; optional return value
void authenticateAccess(bool allowUserInteraction) const override {} //throw FileError
diff --git a/FreeFileSync/Source/afs/gdrive.cpp b/FreeFileSync/Source/afs/gdrive.cpp
index 753c7d66..d2c45381 100644
--- a/FreeFileSync/Source/afs/gdrive.cpp
+++ b/FreeFileSync/Source/afs/gdrive.cpp
@@ -39,24 +39,27 @@ struct GdrivePath
GdriveLogin gdriveLogin;
AfsPath itemPath; //path relative to drive root
};
-bool operator<(const GdrivePath& lhs, const GdrivePath& rhs)
-{
- if (const int rv = compareAsciiNoCase(lhs.gdriveLogin.email, rhs.gdriveLogin.email);
- rv != 0)
- return rv < 0;
- //mirror GdriveFileState file path matching
- if (const int rv = compareNativePath(lhs.gdriveLogin.sharedDriveName, rhs.gdriveLogin.sharedDriveName);
+struct GdriveRawPath
+{
+ std::string parentId; //Google Drive item IDs are *globally* unique!
+ Zstring itemName;
+};
+bool operator<(const GdriveRawPath& lhs, const GdriveRawPath& rhs)
+{
+ if (const int rv = compareString(lhs.parentId, rhs.parentId);
rv != 0)
return rv < 0;
- return compareNativePath(lhs.itemPath.value, rhs.itemPath.value) < 0;
+ return compareNativePath(lhs.itemName, rhs.itemName) < 0;
}
+Global<PathAccessLocker<GdriveRawPath>> globalGdrivePathAccessLocker(std::make_unique<PathAccessLocker<GdriveRawPath>>());
+template <> std::shared_ptr<PathAccessLocker<GdriveRawPath>> PathAccessLocker<GdriveRawPath>::getGlobalInstance() { return globalGdrivePathAccessLocker.get(); }
+template <> Zstring PathAccessLocker<GdriveRawPath>::getItemName(const GdriveRawPath& nativePath) { return nativePath.itemName; }
-Global<PathAccessLocker<GdrivePath>> globalGdrivePathAccessLocker(std::make_unique<PathAccessLocker<GdrivePath>>());
-template <> std::shared_ptr<PathAccessLocker<GdrivePath>> PathAccessLocker<GdrivePath>::getGlobalInstance() { return globalGdrivePathAccessLocker.get(); }
-using PathAccessLock = PathAccessLocker<GdrivePath>::Lock; //throw SysError
+using PathAccessLock = PathAccessLocker<GdriveRawPath>::Lock; //throw SysError
+using PathBlockType = PathAccessLocker<GdriveRawPath>::BlockType;
}
@@ -69,7 +72,7 @@ const Zchar* GOOGLE_REST_API_SERVER = Zstr("www.googleapis.com");
const std::chrono::seconds HTTP_SESSION_ACCESS_TIME_OUT(15);
const std::chrono::seconds HTTP_SESSION_MAX_IDLE_TIME (20);
const std::chrono::seconds HTTP_SESSION_CLEANUP_INTERVAL(4);
-const std::chrono::seconds GDRIVE_SYNC_INTERVAL (5);
+const std::chrono::seconds GDRIVE_SYNC_INTERVAL (5);
const int GDRIVE_STREAM_BUFFER_SIZE = 512 * 1024; //unit: [byte]
@@ -77,8 +80,8 @@ const Zchar gdrivePrefix[] = Zstr("gdrive:");
const char gdriveFolderMimeType [] = "application/vnd.google-apps.folder";
const char gdriveShortcutMimeType[] = "application/vnd.google-apps.shortcut"; //= symbolic link!
-const char DB_FILE_DESCR[] = "FreeFileSync: Google Drive Database";
-const int DB_FILE_VERSION = 3; //2020-06-11
+const char DB_FILE_DESCR[] = "FreeFileSync";
+const int DB_FILE_VERSION = 4; //2020-07-03
std::string getGdriveClientId () { return ""; } // => replace with live credentials
std::string getGdriveClientSecret() { return ""; } //
@@ -528,7 +531,7 @@ try
{
openWithDefaultApp(utfTo<Zstring>(oauthUrl)); //throw FileError
}
-catch (const FileError& e) { throw SysError(e.toString()); } //errors should be further enriched by context info => SysError
+catch (const FileError& e) { throw SysError(replaceCpy(e.toString(), L"\n\n", L'\n')); } //errors should be further enriched by context info => SysError
//process incoming HTTP requests
for (;;)
@@ -841,7 +844,8 @@ assert(jvalue.type == JsonValue::Type::object);
if (modTime == -1)
{
if (tc.year == 1600 || //zero-initialized FILETIME equals "December 31, 1600" or "January 1, 1601"
- tc.year == 1601) // => yes, possible even on Google Drive: https://freefilesync.org/forum/viewtopic.php?t=6602
+ tc.year == 1601 || // => yes, possible even on Google Drive: https://freefilesync.org/forum/viewtopic.php?t=6602
+ tc.year == 1) //WTF: 0001-01-01T00:00:00.000Z https://freefilesync.org/forum/viewtopic.php?t=7403
modTime = 0;
else
throw SysError(L"Modification time could not be parsed. (" + utfTo<std::wstring>(*modifiedTime) + L')');
@@ -1120,12 +1124,12 @@ void gdriveDeleteItem(const std::string& itemId, const std::string& accessToken)
//item is NOT deleted when last parent is removed: it is just not accessible via the "My Drive" hierarchy but still adds to quota! => use for hard links only!
-void gdriveUnlinkParent(const std::string& itemId, const std::string& parentFolderId, const std::string& accessToken) //throw SysError
+void gdriveUnlinkParent(const std::string& itemId, const std::string& parentId, const std::string& accessToken) //throw SysError
{
//https://developers.google.com/drive/api/v3/reference/files/update
const std::string& queryParams = xWwwFormUrlEncode(
{
- { "removeParents", parentFolderId },
+ { "removeParents", parentId },
{ "supportsAllDrives", "true" },
{ "fields", "id,parents" }, //for test if operation was successful
});
@@ -1150,7 +1154,7 @@ void gdriveUnlinkParent(const std::string& itemId, const std::string& parentFold
if (parents) //when last parent is removed, Google does NOT return the parents array (not even an empty one!)
if (parents->type != JsonValue::Type::array ||
std::any_of(parents->arrayVal.begin(), parents->arrayVal.end(),
- [&](const JsonValue& jval) { return jval.type == JsonValue::Type::string && jval.primVal == parentFolderId; }))
+ [&](const JsonValue& jval) { return jval.type == JsonValue::Type::string && jval.primVal == parentId; }))
throw SysError(L"gdriveUnlinkParent: Google Drive internal failure"); //user should never see this...
}
@@ -1183,7 +1187,7 @@ void gdriveMoveToTrash(const std::string& itemId, const std::string& accessToken
//folder name already existing? will (happily) create duplicate => caller must check!
-std::string /*folderId*/ gdriveCreateFolderPlain(const Zstring& folderName, const std::string& parentFolderId, const std::string& accessToken) //throw SysError
+std::string /*folderId*/ gdriveCreateFolderPlain(const Zstring& folderName, const std::string& parentId, const std::string& accessToken) //throw SysError
{
//https://developers.google.com/drive/api/v3/folder#creating_a_folder
const std::string& queryParams = xWwwFormUrlEncode(
@@ -1194,7 +1198,7 @@ std::string /*folderId*/ gdriveCreateFolderPlain(const Zstring& folderName, cons
const std::string& postBuf = std::string("{\n") +
"\"mimeType\": \"" + gdriveFolderMimeType + "\",\n"
"\"name\": \"" + utfTo<std::string>(folderName) + "\",\n"
- "\"parents\": [\"" + parentFolderId + "\"]\n" //[!] no trailing comma!
+ "\"parents\": [\"" + parentId + "\"]\n" //[!] no trailing comma!
"}";
std::string response;
gdriveHttpsRequest("/drive/v3/files?" + queryParams, { "Authorization: Bearer " + accessToken, "Content-Type: application/json; charset=UTF-8" },
@@ -1213,7 +1217,7 @@ std::string /*folderId*/ gdriveCreateFolderPlain(const Zstring& folderName, cons
//shortcut name already existing? will (happily) create duplicate => caller must check!
-std::string /*shortcutId*/ gdriveCreateShortcutPlain(const Zstring& shortcutName, const std::string& parentFolderId, const std::string& targetId, const std::string& accessToken) //throw SysError
+std::string /*shortcutId*/ gdriveCreateShortcutPlain(const Zstring& shortcutName, const std::string& parentId, const std::string& targetId, const std::string& accessToken) //throw SysError
{
/* https://developers.google.com/drive/api/v3/shortcuts
- targetMimeType is determined automatically (ignored if passed)
@@ -1227,7 +1231,7 @@ std::string /*shortcutId*/ gdriveCreateShortcutPlain(const Zstring& shortcutName
"\"mimeType\": \"" + gdriveShortcutMimeType + "\",\n"
"\"name\": \"" + utfTo<std::string>(shortcutName) + "\",\n"
"\"shortcutDetails\": { \"targetId\": \"" + targetId + "\" },\n"
- "\"parents\": [\"" + parentFolderId + "\"]\n" //[!] no trailing comma!
+ "\"parents\": [\"" + parentId + "\"]\n" //[!] no trailing comma!
"}";
std::string response;
gdriveHttpsRequest("/drive/v3/files?" + queryParams, { "Authorization: Bearer " + accessToken, "Content-Type: application/json; charset=UTF-8" },
@@ -1246,6 +1250,47 @@ std::string /*shortcutId*/ gdriveCreateShortcutPlain(const Zstring& shortcutName
//target name already existing? will (happily) create duplicate items => caller must check!
+//can copy files + shortcuts (but fails for folders) + Google-specific file types (.gdoc, .gsheet, .gslides)
+std::string /*fileId*/ gdriveCopyFile(const std::string& fileId, const std::string& parentIdTo, const Zstring& newName, time_t newModTime, const std::string& accessToken) //throw SysError
+{
+ //https://developers.google.com/drive/api/v3/reference/files/copy
+ const std::string queryParams = xWwwFormUrlEncode(
+ {
+ { "supportsAllDrives", "true" },
+ { "fields", "id" },
+ });
+
+ //more Google Drive peculiarities: changing the file name changes modifiedTime!!! => workaround:
+
+ //RFC 3339 date-time: e.g. "2018-09-29T08:39:12.053Z"
+ const std::string modTimeRfc = utfTo<std::string>(formatTime(Zstr("%Y-%m-%dT%H:%M:%S.000Z"), getUtcTime(newModTime))); //returns empty string on failure
+ if (modTimeRfc.empty())
+ throw SysError(L"Invalid modification time (time_t: " + numberTo<std::wstring>(newModTime) + L')');
+
+ const std::string& postBuf = std::string("{\n") +
+ "\"name\": \"" + utfTo<std::string>(newName) + "\",\n" +
+ "\"parents\": [\"" + parentIdTo + "\"],\n" +
+ "\"modifiedTime\": \"" + modTimeRfc + "\"\n" + //[!] no trailing comma!
+ "}";
+ std::string response;
+ gdriveHttpsRequest("/drive/v3/files/" + fileId + "/copy?" + queryParams, //throw SysError
+ { "Authorization: Bearer " + accessToken, "Content-Type: application/json; charset=UTF-8" }, { { CURLOPT_POSTFIELDS, postBuf.c_str() } },
+ [&](const void* buffer, size_t bytesToWrite) { response.append(static_cast<const char*>(buffer), bytesToWrite); }, nullptr /*readRequest*/);
+
+ JsonValue jresponse;
+ try { jresponse = parseJson(response); /*throw JsonParsingError*/ }
+ catch (const JsonParsingError&) {}
+
+ const std::optional<std::string> itemId = getPrimitiveFromJsonObject(jresponse, "id");
+ if (!itemId)
+ throw SysError(formatGdriveErrorRaw(response));
+
+ return *itemId;
+
+}
+
+
+//target name already existing? will (happily) create duplicate items => caller must check!
void gdriveMoveAndRenameItem(const std::string& itemId, const std::string& parentIdFrom, const std::string& parentIdTo,
const Zstring& newName, time_t newModTime, const std::string& accessToken) //throw SysError
{
@@ -1328,17 +1373,24 @@ void setModTime(const std::string& itemId, time_t modTime, const std::string& ac
#endif
-void gdriveDownloadFile(const std::string& itemId, const std::function<void(const void* buffer, size_t bytesToWrite)>& writeBlock /*throw X*/, //throw SysError, X
+void gdriveDownloadFile(const std::string& fileId, const std::function<void(const void* buffer, size_t bytesToWrite)>& writeBlock /*throw X*/, //throw SysError, X
const std::string& accessToken)
{
//https://developers.google.com/drive/api/v3/manage-downloads
+ //doesn't work for Google-specific file types (.gdoc, .gsheet, .gslides)
+ // => interesting: Google Backup & Sync still "downloads" them but in some URL-file format:
+ // {"url": "https://docs.google.com/open?id=FILE_ID", "doc_id": "FILE_ID", "email": "ACCOUNT_EMAIL"}
+
+ warn_static("acknowledgeAbuse: => fix https://freefilesync.org/forum/viewtopic.php?t=7520")
+
const std::string& queryParams = xWwwFormUrlEncode(
{
{ "supportsAllDrives", "true" },
+// { "acknowledgeAbuse", "true" },
{ "alt", "media" },
});
std::string response;
- const HttpSession::Result httpResult = gdriveHttpsRequest("/drive/v3/files/" + itemId + '?' + queryParams, //throw SysError, X
+ const HttpSession::Result httpResult = gdriveHttpsRequest("/drive/v3/files/" + fileId + '?' + queryParams, //throw SysError, X
{ "Authorization: Bearer " + accessToken }, {} /*extraOptions*/,
[&](const void* buffer, size_t bytesToWrite)
{
@@ -1356,24 +1408,24 @@ void gdriveDownloadFile(const std::string& itemId, const std::function<void(cons
//file name already existing? => duplicate file created!
//note: Google Drive upload is already transactional!
//upload "small files" (5 MB or less; enforced by Google?) in a single round-trip
-std::string /*itemId*/ gdriveUploadSmallFile(const Zstring& fileName, const std::string& parentFolderId, uint64_t streamSize, std::optional<time_t> modTime, //throw SysError, X
+std::string /*itemId*/ gdriveUploadSmallFile(const Zstring& fileName, const std::string& parentId, uint64_t streamSize, std::optional<time_t> modTime, //throw SysError, X
const std::function<size_t(void* buffer, size_t bytesToRead)>& readBlock /*throw X*/, //returning 0 signals EOF: Posix read() semantics
const std::string& accessToken)
{
//https://developers.google.com/drive/api/v3/folder#inserting_a_file_in_a_folder
- //https://developers.google.com/drive/api/v3/multipart-upload
+ //https://developers.google.com/drive/api/v3/manage-uploads#http_1
std::string metaDataBuf = "{\n";
if (modTime) //convert to RFC 3339 date-time: e.g. "2018-09-29T08:39:12.053Z"
{
- const std::string& modTimeRfc = formatTime<std::string>("%Y-%m-%dT%H:%M:%S.000Z", getUtcTime(*modTime)); //returns empty string on failure
+ const std::string& modTimeRfc = utfTo<std::string>(formatTime(Zstr("%Y-%m-%dT%H:%M:%S.000Z"), getUtcTime(*modTime))); //returns empty string on failure
if (modTimeRfc.empty())
throw SysError(L"Invalid modification time (time_t: " + numberTo<std::wstring>(*modTime) + L')');
metaDataBuf += "\"modifiedTime\": \"" + modTimeRfc + "\",\n";
}
metaDataBuf += "\"name\": \"" + utfTo<std::string>(fileName) + "\",\n";
- metaDataBuf += "\"parents\": [\"" + parentFolderId + "\"]\n"; //[!] no trailing comma!
+ metaDataBuf += "\"parents\": [\"" + parentId + "\"]\n"; //[!] no trailing comma!
metaDataBuf += "}";
//allowed chars for border: DIGIT ALPHA ' ( ) + _ , - . / : = ?
@@ -1458,12 +1510,12 @@ TODO:
//file name already existing? => duplicate file created!
//note: Google Drive upload is already transactional!
-std::string /*itemId*/ gdriveUploadFile(const Zstring& fileName, const std::string& parentFolderId, std::optional<time_t> modTime, //throw SysError, X
+std::string /*itemId*/ gdriveUploadFile(const Zstring& fileName, const std::string& parentId, std::optional<time_t> modTime, //throw SysError, X
const std::function<size_t(void* buffer, size_t bytesToRead)>& readBlock /*throw X*/, //returning 0 signals EOF: Posix read() semantics
const std::string& accessToken)
{
//https://developers.google.com/drive/api/v3/folder#inserting_a_file_in_a_folder
- //https://developers.google.com/drive/api/v3/resumable-upload
+ //https://developers.google.com/drive/api/v3/manage-uploads#resumable
//step 1: initiate resumable upload session
std::string uploadUrlRelative;
@@ -1478,7 +1530,7 @@ std::string /*itemId*/ gdriveUploadFile(const Zstring& fileName, const std::stri
postBuf += "\"modifiedTime\": \"" + modTimeRfc + "\",\n";
}
postBuf += "\"name\": \"" + utfTo<std::string>(fileName) + "\",\n";
- postBuf += "\"parents\": [\"" + parentFolderId + "\"]\n"; //[!] no trailing comma!
+ postBuf += "\"parents\": [\"" + parentId + "\"]\n"; //[!] no trailing comma!
postBuf += "}";
std::string uploadUrl;
@@ -1576,11 +1628,11 @@ class GdriveAccessBuffer //per-user-session! => serialize access (perf: amortize
public:
GdriveAccessBuffer(const GdriveAccessInfo& accessInfo) : accessInfo_(accessInfo) {}
- GdriveAccessBuffer(MemoryStreamIn<std::string>& stream) //throw UnexpectedEndOfStreamError
+ GdriveAccessBuffer(MemoryStreamIn<std::string>& stream) //throw SysError
{
accessInfo_.accessToken.validUntil = readNumber<int64_t>(stream); //
accessInfo_.accessToken.value = readContainer<std::string>(stream); //
- accessInfo_.refreshToken = readContainer<std::string>(stream); //UnexpectedEndOfStreamError
+ accessInfo_.refreshToken = readContainer<std::string>(stream); //SysErrorUnexpectedEos
accessInfo_.userInfo.displayName = utfTo<std::wstring>(readContainer<std::string>(stream)); //
accessInfo_.userInfo.email = readContainer<std::string>(stream); //
}
@@ -1638,23 +1690,23 @@ class GdrivePersistentSessions;
sharedDrives_.emplace(drive.driveId, drive.driveName);
}
- GdriveFileState(MemoryStreamIn<std::string>& stream, GdriveAccessBuffer& accessBuf) : //throw UnexpectedEndOfStreamError
+ GdriveFileState(MemoryStreamIn<std::string>& stream, GdriveAccessBuffer& accessBuf) : //throw SysError
accessBuf_(accessBuf)
{
- lastSyncToken_ = readContainer<std::string>(stream); //UnexpectedEndOfStreamError
+ lastSyncToken_ = readContainer<std::string>(stream); //SysErrorUnexpectedEos
myDriveId_ = readContainer<std::string>(stream); //
- size_t sharedDrivesCount = readNumber<uint32_t>(stream); //UnexpectedEndOfStreamError
+ size_t sharedDrivesCount = readNumber<uint32_t>(stream); //SysErrorUnexpectedEos
while (sharedDrivesCount-- != 0)
{
- std::string driveId = readContainer<std::string>(stream); //UnexpectedEndOfStreamError
+ std::string driveId = readContainer<std::string>(stream); //SysErrorUnexpectedEos
std::string driveName = readContainer<std::string>(stream); //
sharedDrives_.emplace(driveId, utfTo<Zstring>(driveName));
}
for (;;)
{
- const std::string folderId = readContainer<std::string>(stream); //UnexpectedEndOfStreamError
+ const std::string folderId = readContainer<std::string>(stream); //SysErrorUnexpectedEos
if (folderId.empty())
break;
folderContents_[folderId].isKnownFolder = true;
@@ -1662,7 +1714,7 @@ class GdrivePersistentSessions;
for (;;)
{
- const std::string itemId = readContainer<std::string>(stream); //UnexpectedEndOfStreamError
+ const std::string itemId = readContainer<std::string>(stream); //SysErrorUnexpectedEos
if (itemId.empty())
break;
@@ -1670,13 +1722,13 @@ class GdrivePersistentSessions;
details.itemName = utfTo<Zstring>(readContainer<std::string>(stream)); //
details.type = readNumber<GdriveItemType>(stream); //
details.owner = readNumber <FileOwner>(stream); //
- details.fileSize = readNumber <uint64_t>(stream); //UnexpectedEndOfStreamError
+ details.fileSize = readNumber <uint64_t>(stream); //SysErrorUnexpectedEos
details.modTime = readNumber <int64_t>(stream); //
details.targetId = readContainer<std::string>(stream); //
- size_t parentsCount = readNumber<uint32_t>(stream); //UnexpectedEndOfStreamError
+ size_t parentsCount = readNumber<uint32_t>(stream); //SysErrorUnexpectedEos
while (parentsCount-- != 0)
- details.parentIds.push_back(readContainer<std::string>(stream)); //UnexpectedEndOfStreamError
+ details.parentIds.push_back(readContainer<std::string>(stream)); //SysErrorUnexpectedEos
updateItemState(itemId, &details);
}
@@ -2295,7 +2347,7 @@ public:
throw;
}
}
- catch (const FileError& e) { throw SysError(e.toString()); } //file access errors should be further enriched by context info => SysError
+ catch (const FileError& e) { throw SysError(replaceCpy(e.toString(), L"\n\n", L'\n')); } //file access errors should be further enriched by context info => SysError
accessUserSession(accountEmail, [&](std::optional<UserSession>& userSession) //throw SysError
@@ -2335,7 +2387,7 @@ public:
if (itemStillExists(configDirPath_)) //throw FileError
throw FileError(errorMsg);
}
- catch (const FileError& e) { throw SysError(e.toString()); } //file access errors should be further enriched by context info => SysError
+ catch (const FileError& e) { throw SysError(replaceCpy(e.toString(), L"\n\n", L'\n')); } //file access errors should be further enriched by context info => SysError
});
removeDuplicates(emails, LessAsciiNoCase());
@@ -2392,7 +2444,11 @@ private:
protectedSession->access([&](SessionHolder& holder)
{
if (!holder.dbWasLoaded) //let's NOT load the DB files under the globalSessions_ lock, but the session-specific one!
- holder.session = loadSession(getDbFilePath(accountEmail)); //throw SysError
+ try
+ {
+ holder.session = loadSession(getDbFilePath(accountEmail)); //throw SysError
+ }
+ catch (const FileError& e) { throw SysError(replaceCpy(e.toString(), L"\n\n", L'\n')); } //GdrivePersistentSessions errors should be further enriched with context info => SysError
holder.dbWasLoaded = true;
useSession(holder.session); //throw X
});
@@ -2401,76 +2457,92 @@ private:
static void saveSession(const Zstring& dbFilePath, const UserSession& userSession) //throw FileError
{
MemoryStreamOut<std::string> streamOut;
-
writeArray(streamOut, DB_FILE_DESCR, sizeof(DB_FILE_DESCR));
writeNumber<int32_t>(streamOut, DB_FILE_VERSION);
- userSession.accessBuf.ref().serialize(streamOut);
- userSession.fileState.ref().serialize(streamOut);
+ MemoryStreamOut<std::string> streamOutBody;
+ userSession.accessBuf.ref().serialize(streamOutBody);
+ userSession.fileState.ref().serialize(streamOutBody);
- std::string zstreamOut;
try
{
- zstreamOut = compress(streamOut.ref(), 3 /*compression level: see db_file.cpp*/); //throw SysError
+ streamOut.ref() += compress(streamOutBody.ref(), 3 /*best compression level: see db_file.cpp*/); //throw SysError
}
catch (const SysError& e) { throw FileError(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(dbFilePath)), e.toString()); }
- saveBinContainer(dbFilePath, zstreamOut, nullptr /*notifyUnbufferedIO*/); //throw FileError
+ saveBinContainer(dbFilePath, streamOut.ref(), nullptr /*notifyUnbufferedIO*/); //throw FileError
}
- static std::optional<UserSession> loadSession(const Zstring& dbFilePath) //throw SysError
+ static std::optional<UserSession> loadSession(const Zstring& dbFilePath) //throw FileError
{
- std::string zstream;
+ std::string byteStream;
try
{
- zstream = loadBinContainer<std::string>(dbFilePath, nullptr /*notifyUnbufferedIO*/); //throw FileError
+ byteStream = loadBinContainer<std::string>(dbFilePath, nullptr /*notifyUnbufferedIO*/); //throw FileError
}
catch (FileError&)
{
- try
- {
- if (itemStillExists(dbFilePath)) //throw FileError
- throw;
- }
- catch (const FileError& e) { throw SysError(e.toString()); } //GdrivePersistentSessions errors should be further enriched with context info => SysError
+ if (itemStillExists(dbFilePath)) //throw FileError
+ throw;
return std::nullopt;
}
- std::string rawStream;
- try
- {
- rawStream = decompress(zstream); //throw SysError
- }
- catch (const SysError& e) { throw SysError(_("Database file is corrupted:") + L' ' + fmtPath(dbFilePath) + L'\n' + e.toString()); }
-
try
{
- MemoryStreamIn streamIn(rawStream);
+ MemoryStreamIn streamIn(byteStream);
//-------- file format header --------
char tmp[sizeof(DB_FILE_DESCR)] = {};
- readArray(streamIn, &tmp, sizeof(tmp)); //throw UnexpectedEndOfStreamError
+ readArray(streamIn, &tmp, sizeof(tmp)); //throw SysErrorUnexpectedEos
+ //TODO: remove migration code at some time! 2020-07-03
if (!std::equal(std::begin(tmp), std::end(tmp), std::begin(DB_FILE_DESCR)))
- throw SysError(_("Database file is corrupted:") + L' ' + fmtPath(dbFilePath) + L'\n' + L"Invalid header.");
+ {
+ MemoryStreamIn streamIn2(decompress(byteStream)); //throw SysError
+ //-------- file format header --------
+ const char DB_FILE_DESCR_OLD[] = "FreeFileSync: Google Drive Database";
+ char tmp2[sizeof(DB_FILE_DESCR_OLD)] = {};
+ readArray(streamIn2, &tmp2, sizeof(tmp2)); //throw SysErrorUnexpectedEos
+
+ if (!std::equal(std::begin(tmp2), std::end(tmp2), std::begin(DB_FILE_DESCR_OLD)))
+ throw SysError(_("File content is corrupted.") + L" (invalid header)");
+
+ const int version = readNumber<int32_t>(streamIn2);
+ if (version != 1 && //TODO: remove migration code at some time! 2019-12-05
+ version != 2 && //TODO: remove migration code at some time! 2020-06-11
+ version != 3) //TODO: remove migration code at some time! 2020-07-03
+ throw SysError(_("Unsupported data format.") + L' ' + replaceCpy(_("Version: %x"), L"%x", numberTo<std::wstring>(version)));
+
+ auto accessBuf = makeSharedRef<GdriveAccessBuffer>(streamIn2); //throw SysError
+ auto fileState =
+ //TODO: remove migration code at some time! 2020-06-11
+ version <= 2 ? //fully discard old state due to missing "ownedByMe" attribute + shortcut support
+ makeSharedRef<GdriveFileState>( accessBuf.ref()) : //throw SysError
+ makeSharedRef<GdriveFileState>(streamIn2, accessBuf.ref()); //
+
+ return UserSession{ accessBuf, fileState };
+ }
+ else
+ {
+ if (!std::equal(std::begin(tmp), std::end(tmp), std::begin(DB_FILE_DESCR)))
+ throw SysError(_("File content is corrupted.") + L" (invalid header)");
- const int version = readNumber<int32_t>(streamIn);
- if (version != 1 && //TODO: remove migration code at some time! 2019-12-05
- version != 2 && //TODO: remove migration code at some time! 2020-06-11
- version != DB_FILE_VERSION)
- throw SysError(replaceCpy(_("Database file %x is incompatible."), L"%x", fmtPath(dbFilePath)) + L'\n' +
- replaceCpy(_("Version: %x"), L"%x", numberTo<std::wstring>(version)));
+ const int version = readNumber<int32_t>(streamIn);
+ if (version != DB_FILE_VERSION)
+ throw SysError(_("Unsupported data format.") + L' ' + replaceCpy(_("Version: %x"), L"%x", numberTo<std::wstring>(version)));
- auto accessBuf = makeSharedRef<GdriveAccessBuffer>(streamIn); //throw UnexpectedEndOfStreamError
- auto fileState =
- //TODO: remove migration code at some time! 2020-06-11
- version <= 2 ? //fully discard old state due to missing "ownedByMe" attribute + shortcut support
- makeSharedRef<GdriveFileState>(accessBuf.ref()) : //throw SysError
- makeSharedRef<GdriveFileState>(streamIn, accessBuf.ref()); //throw UnexpectedEndOfStreamError
+ MemoryStreamIn streamInBody(decompress(std::string(byteStream.begin() + streamIn.pos(), byteStream.end()))); //throw SysError
- return UserSession{ accessBuf, fileState };
+ auto accessBuf = makeSharedRef<GdriveAccessBuffer>(streamInBody); //throw SysError
+ auto fileState = makeSharedRef<GdriveFileState >(streamInBody, accessBuf.ref()); //throw SysError
+
+ return UserSession{ accessBuf, fileState };
+ }
+ }
+ catch (const SysError& e)
+ {
+ throw FileError(replaceCpy(_("Cannot read database file %x."), L"%x", fmtPath(dbFilePath)), e.toString());
}
- catch (UnexpectedEndOfStreamError&) { throw SysError(_("Database file is corrupted:") + L' ' + fmtPath(dbFilePath) + L'\n' + L"Unexpected end of stream."); }
}
struct UserSession
@@ -2777,77 +2849,82 @@ private:
//==========================================================================================
-//target existing: 1. fails with "already existing or 2. creates duplicate file!
+//already existing: 1. fails or 2. creates duplicate
struct OutputStreamGdrive : public AbstractFileSystem::OutputStreamImpl
{
- OutputStreamGdrive(const GdrivePath& gdrivePath,
+ OutputStreamGdrive(const GdrivePath& gdrivePath, //throw SysError
std::optional<uint64_t> /*streamSize*/,
std::optional<time_t> modTime,
- const IOCallback& notifyUnbufferedIO /*throw X*/) :
- gdrivePath_(gdrivePath),
+ const IOCallback& notifyUnbufferedIO /*throw X*/,
+ std::unique_ptr<PathAccessLock>&& pal) :
notifyUnbufferedIO_(notifyUnbufferedIO)
{
std::promise<AFS::FileId> pFileId;
futFileId_ = pFileId.get_future();
- //PathAccessLock? Not needed, because the AFS abstraction allows for "undefined behavior"
+ //CAVEAT: if file is already existing, OutputStreamGdrive *constructor* must fail, not OutputStreamGdrive::write(),
+ // otherwise ~OutputStreamImpl() will delete the already existing file! => don't check asynchronously!
+ const Zstring fileName = AFS::getItemName(gdrivePath.itemPath);
+ std::string parentId;
+ /*const*/ GdrivePersistentSessions::AsyncAccessInfo aai = accessGlobalFileState(gdrivePath.gdriveLogin.email, [&](GdriveFileState& fileState) //throw SysError
+ {
+ const GdriveFileState::PathStatus& ps = fileState.getPathStatus(gdrivePath.gdriveLogin.sharedDriveName, gdrivePath.itemPath, false /*followLeafShortcut*/); //throw SysError
+ if (ps.relPath.empty())
+ throw SysError(replaceCpy(_("The name %x is already used by another item."), L"%x", fmtPath(fileName)));
+
+ if (ps.relPath.size() > 1) //parent folder missing
+ throw SysError(replaceCpy(_("Cannot find %x."), L"%x",
+ fmtPath(getGdriveDisplayPath({ gdrivePath.gdriveLogin, AfsPath(nativeAppendPaths(ps.existingPath.value, ps.relPath.front()))}))));
+ parentId = ps.existingItemId;
+ });
- worker_ = InterruptibleThread([asyncStreamIn = this->asyncStreamOut_, gdrivePath, modTime, pFileId = std::move(pFileId)]() mutable
+ worker_ = InterruptibleThread([gdrivePath, modTime, fileName, asyncStreamIn = this->asyncStreamOut_,
+ pFileId = std::move(pFileId),
+ parentId = std::move(parentId),
+ aai = std::move(aai),
+ pal = std::move(pal)]() mutable
{
+ assert(pal); //bind life time to worker thread!
setCurrentThreadName(("Ostream[Gdrive] " + utfTo<std::string>(getGdriveDisplayPath(gdrivePath))). c_str());
try
{
- try
+ auto readBlock = [&](void* buffer, size_t bytesToRead)
{
- const Zstring fileName = AFS::getItemName(gdrivePath.itemPath);
-
- std::string parentFolderId;
- GdrivePersistentSessions::AsyncAccessInfo aai = accessGlobalFileState(gdrivePath.gdriveLogin.email, [&](GdriveFileState& fileState) //throw SysError
- {
- const GdriveFileState::PathStatus& ps = fileState.getPathStatus(gdrivePath.gdriveLogin.sharedDriveName, gdrivePath.itemPath, false /*followLeafShortcut*/); //throw SysError
- if (ps.relPath.empty())
- throw SysError(replaceCpy(_("The name %x is already used by another item."), L"%x", fmtPath(fileName)));
-
- if (ps.relPath.size() > 1) //parent folder missing
- throw SysError(replaceCpy(_("Cannot find %x."), L"%x",
- fmtPath(getGdriveDisplayPath({ gdrivePath.gdriveLogin, AfsPath(nativeAppendPaths(ps.existingPath.value, ps.relPath.front()))}))));
- parentFolderId = ps.existingItemId;
- });
-
- auto readBlock = [&](void* buffer, size_t bytesToRead)
- {
- //returns "bytesToRead" bytes unless end of stream! => maps nicely into Posix read() semantics expected by gdriveUploadFile()
- return asyncStreamIn->read(buffer, bytesToRead); //throw ThreadInterruption
- };
-
- //for whatever reason, gdriveUploadFile() is equally-fast or faster than gdriveUploadSmallFile(), despite its two roundtrips, even when the file sizes are 0!!
- //=> issue likely on Google's side
- const std::string fileIdNew = //streamSize && *streamSize < 5 * 1024 * 1024 ?
- //gdriveUploadSmallFile(fileName, parentFolderId, *streamSize, modTime, readBlock, aai.accessToken) : //throw SysError, ThreadInterruption
- gdriveUploadFile (fileName, parentFolderId, modTime, readBlock, aai.accessToken); //throw SysError, ThreadInterruption
- assert(asyncStreamIn->getTotalBytesRead() == asyncStreamIn->getTotalBytesWritten());
-
- //buffer new file state ASAP (don't wait GDRIVE_SYNC_INTERVAL)
- GdriveItem newFileItem = {};
- newFileItem.itemId = fileIdNew;
- newFileItem.details.itemName = fileName;
- newFileItem.details.type = GdriveItemType::file;
- newFileItem.details.owner = FileOwner::me;
- newFileItem.details.fileSize = asyncStreamIn->getTotalBytesRead();
- if (modTime) //else: whatever modTime Google Drive selects will be notified after GDRIVE_SYNC_INTERVAL
- newFileItem.details.modTime = *modTime;
- newFileItem.details.parentIds.push_back(parentFolderId);
-
- accessGlobalFileState(gdrivePath.gdriveLogin.email, [&](GdriveFileState& fileState) //throw SysError
- {
- fileState.notifyItemCreated(aai.stateDelta, newFileItem);
- });
+ //returns "bytesToRead" bytes unless end of stream! => maps nicely into Posix read() semantics expected by gdriveUploadFile()
+ return asyncStreamIn->read(buffer, bytesToRead); //throw ThreadInterruption
+ };
+ //for whatever reason, gdriveUploadFile() is slightly faster than gdriveUploadSmallFile()! despite its two roundtrips! even when file sizes are 0!
+ //=> 1. issue likely on Google's side => 2. persists even after having fixed "Expect: 100-continue"
+ const std::string fileIdNew = //streamSize && *streamSize < 5 * 1024 * 1024 ?
+ //gdriveUploadSmallFile(fileName, parentId, *streamSize, modTime, readBlock, aai.accessToken) : //throw SysError, ThreadInterruption
+ gdriveUploadFile (fileName, parentId, modTime, readBlock, aai.accessToken); //throw SysError, ThreadInterruption
+ assert(asyncStreamIn->getTotalBytesRead() == asyncStreamIn->getTotalBytesWritten());
+ //already existing: creates duplicate
+
+ //buffer new file state ASAP (don't wait GDRIVE_SYNC_INTERVAL)
+ GdriveItem newFileItem = {};
+ newFileItem.itemId = fileIdNew;
+ newFileItem.details.itemName = fileName;
+ newFileItem.details.type = GdriveItemType::file;
+ newFileItem.details.owner = FileOwner::me;
+ newFileItem.details.fileSize = asyncStreamIn->getTotalBytesRead();
+ if (modTime) //else: whatever modTime Google Drive selects will be notified after GDRIVE_SYNC_INTERVAL
+ newFileItem.details.modTime = *modTime;
+ newFileItem.details.parentIds.push_back(parentId);
+
+ accessGlobalFileState(gdrivePath.gdriveLogin.email, [&](GdriveFileState& fileState) //throw SysError
+ {
+ fileState.notifyItemCreated(aai.stateDelta, newFileItem);
+ });
- pFileId.set_value(fileIdNew);
- }
- catch (const SysError& e) { throw FileError(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(getGdriveDisplayPath(gdrivePath))), e.toString()); }
+ pFileId.set_value(fileIdNew);
+ }
+ catch (const SysError& e)
+ {
+ FileError fe(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(getGdriveDisplayPath(gdrivePath))), e.toString());
+ asyncStreamIn->setReadError(std::make_exception_ptr(std::move(fe)));
}
- catch (FileError&) { asyncStreamIn->setReadError(std::current_exception()); } //let ThreadInterruption pass through!
+ //let ThreadInterruption pass through!
});
}
@@ -2891,7 +2968,6 @@ private:
totalBytesReported_ = totalBytesUploaded;
}
- const GdrivePath gdrivePath_;
const IOCallback notifyUnbufferedIO_; //throw X
int64_t totalBytesReported_ = 0;
std::shared_ptr<AsyncStreamBuffer> asyncStreamOut_ = std::make_shared<AsyncStreamBuffer>(GDRIVE_STREAM_BUFFER_SIZE);
@@ -2911,6 +2987,20 @@ public:
private:
GdrivePath getGdrivePath(const AfsPath& afsPath) const { return { gdriveLogin_, afsPath }; }
+ GdriveRawPath getGdriveRawPath(const AfsPath& afsPath) const //throw SysError
+ {
+ const std::optional<AfsPath> parentPath = getParentPath(afsPath);
+ if (!parentPath)
+ throw SysError(L"Item is device root");
+
+ std::string parentId;
+ accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
+ {
+ parentId = fileState.getItemId(gdriveLogin_.sharedDriveName, *parentPath, true /*followLeafShortcut*/); //throw SysError
+ });
+ return { std::move(parentId), getItemName(afsPath)};
+ }
+
Zstring getInitPathPhrase(const AfsPath& afsPath) const override { return concatenateGdriveFolderPathPhrase(getGdrivePath(afsPath)); }
std::wstring getDisplayPath(const AfsPath& afsPath) const override { return getGdriveDisplayPath(getGdrivePath(afsPath)); }
@@ -2961,18 +3051,16 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- //already existing: fail/ignore
- //=> we choose to let Google Drive fail and give a clear error message
+ //already existing: 1. fails or 2. creates duplicate (unlikely)
void createFolderPlain(const AfsPath& afsPath) const override //throw FileError
{
try
{
//avoid duplicate Google Drive item creation by multiple threads
- PathAccessLock pal(getGdrivePath(afsPath)); //throw SysError
+ PathAccessLock pal(getGdriveRawPath(afsPath), PathBlockType::otherWait); //throw SysError
const Zstring folderName = getItemName(afsPath);
-
- std::string parentFolderId;
+ std::string parentId;
const GdrivePersistentSessions::AsyncAccessInfo aai = accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
{
const GdriveFileState::PathStatus& ps = fileState.getPathStatus(gdriveLogin_.sharedDriveName, afsPath, false /*followLeafShortcut*/); //throw SysError
@@ -2981,15 +3069,16 @@ private:
if (ps.relPath.size() > 1) //parent folder missing
throw SysError(replaceCpy(_("Cannot find %x."), L"%x", fmtPath(getDisplayPath(AfsPath(nativeAppendPaths(ps.existingPath.value, ps.relPath.front()))))));
- parentFolderId = ps.existingItemId;
+ parentId = ps.existingItemId;
});
- const std::string folderIdNew = gdriveCreateFolderPlain(folderName, parentFolderId, aai.accessToken); //throw SysError
+ //already existing: creates duplicate
+ const std::string folderIdNew = gdriveCreateFolderPlain(folderName, parentId, aai.accessToken); //throw SysError
//buffer new file state ASAP (don't wait GDRIVE_SYNC_INTERVAL)
accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
{
- fileState.notifyFolderCreated(aai.stateDelta, folderIdNew, folderName, parentFolderId);
+ fileState.notifyFolderCreated(aai.stateDelta, folderIdNew, folderName, parentId);
});
}
catch (const SysError& e) { throw FileError(replaceCpy(_("Cannot create directory %x."), L"%x", fmtPath(getDisplayPath(afsPath))), e.toString()); }
@@ -3076,7 +3165,8 @@ private:
//----------------------------------------------------------------------------------------------------------------
AbstractPath getSymlinkResolvedPath(const AfsPath& afsPath) const override //throw FileError
{
- warn_static("implement")
+ //this function doesn't make sense for Google Drive: Shortcuts do not refer by path, but ID!
+ //even if it were possible to determine a path, doing anything with the target file (e.g. delete + recreate) would break other Shortcuts!
throw FileError(replaceCpy(_("Cannot determine final path for %x."), L"%x", fmtPath(getDisplayPath(afsPath))), _("Operation not supported by device."));
}
@@ -3111,16 +3201,26 @@ private:
return std::make_unique<InputStreamGdrive>(getGdrivePath(afsPath), notifyUnbufferedIO);
}
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
- //=> actual behavior: 1. fails with "already existing or 2. creates duplicate file!
- //=> we choose to let Google Drive create a duplicate file, because setting PathAccessLock for a potentially long-running write operation is excessive!
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
+ //=> actual behavior: 1. fails or 2. creates duplicate (unlikely)
std::unique_ptr<OutputStreamImpl> getOutputStream(const AfsPath& afsPath, //throw FileError
std::optional<uint64_t> streamSize,
std::optional<time_t> modTime,
const IOCallback& notifyUnbufferedIO /*throw X*/) const override
{
- //target existing: 1. fails with "already existing or 2. creates duplicate file!
- return std::make_unique<OutputStreamGdrive>(getGdrivePath(afsPath), streamSize, modTime, notifyUnbufferedIO);
+ try
+ {
+ //avoid duplicate item creation by multiple threads
+ auto pal = std::make_unique<PathAccessLock>(getGdriveRawPath(afsPath), PathBlockType::otherFail); //throw SysError
+ //don't block during a potentially long-running file upload!
+
+ //already existing: 1. fails or 2. creates duplicate
+ return std::make_unique<OutputStreamGdrive>(getGdrivePath(afsPath), streamSize, modTime, notifyUnbufferedIO, std::move(pal)); //throw SysError
+ }
+ catch (const SysError& e)
+ {
+ throw FileError(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(getDisplayPath(afsPath))), e.toString());
+ }
}
//----------------------------------------------------------------------------------------------------------------
@@ -3130,82 +3230,151 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- //symlink handling: follow link!
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
- FileCopyResult copyFileForSameAfsType(const AfsPath& afsSource, const StreamAttributes& attrSource, //throw FileError, (ErrorFileLocked), X
+ //symlink handling: follow
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
+ //=> actual behavior: 1. fails or 2. creates duplicate (unlikely)
+ FileCopyResult copyFileForSameAfsType(const AfsPath& afsSource, const StreamAttributes& attrSource, //throw FileError, (ErrorFileLocked), (X)
const AbstractPath& apTarget, bool copyFilePermissions, const IOCallback& notifyUnbufferedIO /*throw X*/) const override
{
//no native Google Drive file copy => use stream-based file copy:
if (copyFilePermissions)
throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(AFS::getDisplayPath(apTarget))), _("Operation not supported by device."));
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
- return copyFileAsStream(afsSource, attrSource, apTarget, notifyUnbufferedIO); //throw FileError, (ErrorFileLocked), X
+ const GdriveFileSystem& fsTarget = static_cast<const GdriveFileSystem&>(apTarget.afsDevice.ref());
+
+ if (!equalAsciiNoCase(gdriveLogin_.email, fsTarget.gdriveLogin_.email))
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
+ //=> actual behavior: 1. fails or 2. creates duplicate (unlikely)
+ return copyFileAsStream(afsSource, attrSource, apTarget, notifyUnbufferedIO); //throw FileError, (ErrorFileLocked), X
+ //else: copying files within account works, e.g. between My Drive <-> shared drives
+
+ try
+ {
+ //avoid duplicate Google Drive item creation by multiple threads (blocking is okay: gdriveCopyFile() should complete instantly!)
+ PathAccessLock pal(fsTarget.getGdriveRawPath(apTarget.afsPath), PathBlockType::otherWait); //throw SysError
+
+ const Zstring itemNameNew = getItemName(apTarget);
+ std::string itemIdSrc;
+ time_t modTime = 0;
+ uint64_t fileSize = 0;
+ std::string parentIdTrg;
+ const GdrivePersistentSessions::AsyncAccessInfo aai = accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
+ {
+ GdriveItemDetails itemDetails;
+ std::tie(itemIdSrc, itemDetails) = fileState.getFileAttributes(gdriveLogin_.sharedDriveName, afsSource, true /*followLeafShortcut*/); //throw SysError
+ modTime = itemDetails.modTime;
+ fileSize = itemDetails.fileSize;
+
+ assert(itemDetails.type == GdriveItemType::file); //Google Drive *should* fail trying to copy folder: "This file cannot be copied by the user."
+ if (itemDetails.type != GdriveItemType::file) //=> don't trust + improve error message
+ throw SysError(replaceCpy<std::wstring>(L"%x is not a file.", L"%x", fmtPath(getItemName(afsSource))));
+
+ const GdriveFileState::PathStatus psTo = fileState.getPathStatus(fsTarget.gdriveLogin_.sharedDriveName, apTarget.afsPath, false /*followLeafShortcut*/); //throw SysError
+ if (psTo.relPath.empty())
+ throw SysError(replaceCpy(_("The name %x is already used by another item."), L"%x", fmtPath(itemNameNew)));
+
+ if (psTo.relPath.size() > 1) //parent folder missing
+ throw SysError(replaceCpy(_("Cannot find %x."), L"%x",
+ fmtPath(fsTarget.getDisplayPath(AfsPath(nativeAppendPaths(psTo.existingPath.value, psTo.relPath.front()))))));
+ parentIdTrg = psTo.existingItemId;
+ });
+
+ //already existing: creates duplicate
+ const std::string fileIdTrg = gdriveCopyFile(itemIdSrc, parentIdTrg, itemNameNew, modTime, aai.accessToken); //throw SysError
+
+ //buffer new file state ASAP (don't wait GDRIVE_SYNC_INTERVAL)
+ accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
+ {
+ GdriveItem newFileItem = {};
+ newFileItem.itemId = fileIdTrg;
+ newFileItem.details.itemName = itemNameNew;
+ newFileItem.details.type = GdriveItemType::file;
+ newFileItem.details.owner = FileOwner::me;
+ newFileItem.details.fileSize = fileSize;
+ newFileItem.details.modTime = modTime;
+ newFileItem.details.parentIds.push_back(parentIdTrg);
+ fileState.notifyItemCreated(aai.stateDelta, newFileItem);
+ });
+
+ FileCopyResult result;
+ result.fileSize = fileSize;
+ result.modTime = modTime;
+ result.sourceFileId = itemIdSrc;
+ result.targetFileId = fileIdTrg;
+ /*result.errorModTime = */
+ return result;
+ }
+ catch (const SysError& e)
+ {
+ throw FileError(replaceCpy(replaceCpy(_("Cannot copy file %x to %y."),
+ L"%x", L'\n' + fmtPath(getDisplayPath(afsSource))),
+ L"%y", L'\n' + fmtPath(AFS::getDisplayPath(apTarget))), e.toString());
+ }
}
- //already existing: fail/ignore
- //symlink handling: follow link!
+ //symlink handling: follow
+ //already existing: fail
void copyNewFolderForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const override //throw FileError
{
if (copyFilePermissions)
throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(AFS::getDisplayPath(apTarget))), _("Operation not supported by device."));
- //already existing: fail/ignore
+ //already existing: 1. fails or 2. creates duplicate (unlikely)
AFS::createFolderPlain(apTarget); //throw FileError
}
+ //already existing: fail
void copySymlinkForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const override //throw FileError
{
- auto generateErrorMsg = [&]
+ try
{
- return replaceCpy(replaceCpy(_("Cannot copy symbolic link %x to %y."),
- L"%x", L'\n' + fmtPath(getDisplayPath(afsSource))),
- L"%y", L'\n' + fmtPath(AFS::getDisplayPath(apTarget)));
- };
+ std::string targetId;
+ accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
+ {
+ const GdriveItemDetails& itemDetails = fileState.getFileAttributes(gdriveLogin_.sharedDriveName, afsSource, false /*followLeafShortcut*/).second; //throw SysError
+ if (itemDetails.type != GdriveItemType::shortcut)
+ throw SysError(L"Not a Google Drive Shortcut.");
- if (compareDeviceSameAfsType(apTarget.afsDevice.ref()) != 0)
- throw ErrorMoveUnsupported(generateErrorMsg(), _("Operation not supported between different devices."));
- warn_static("is this really true!??? => check for other cases of -Operation not supported-")
+ targetId = itemDetails.targetId;
+ });
+
+ const GdriveFileSystem& fsTarget = static_cast<const GdriveFileSystem&>(apTarget.afsDevice.ref());
- try
- {
//avoid duplicate Google Drive item creation by multiple threads
- PathAccessLock pal(getGdrivePath(apTarget.afsPath)); //throw SysError
+ PathAccessLock pal(fsTarget.getGdriveRawPath(apTarget.afsPath), PathBlockType::otherWait); //throw SysError
const Zstring shortcutName = getItemName(apTarget.afsPath);
-
- std::string parentFolderId;
- std::string targetId;
- const GdrivePersistentSessions::AsyncAccessInfo aai = accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
+ std::string parentId;
+ const GdrivePersistentSessions::AsyncAccessInfo aaiTrg = accessGlobalFileState(fsTarget.gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
{
- const GdriveFileState::PathStatus& ps = fileState.getPathStatus(gdriveLogin_.sharedDriveName, apTarget.afsPath, false /*followLeafShortcut*/); //throw SysError
+ const GdriveFileState::PathStatus& ps = fileState.getPathStatus(fsTarget.gdriveLogin_.sharedDriveName, apTarget.afsPath, false /*followLeafShortcut*/); //throw SysError
if (ps.relPath.empty())
throw SysError(replaceCpy(_("The name %x is already used by another item."), L"%x", fmtPath(shortcutName)));
if (ps.relPath.size() > 1) //parent folder missing
- throw SysError(replaceCpy(_("Cannot find %x."), L"%x", fmtPath(getDisplayPath(AfsPath(nativeAppendPaths(ps.existingPath.value, ps.relPath.front()))))));
- parentFolderId = ps.existingItemId;
-
- const GdriveItemDetails& itemDetails = fileState.getFileAttributes(gdriveLogin_.sharedDriveName, afsSource, false /*followLeafShortcut*/).second; //throw SysError
- if (itemDetails.type != GdriveItemType::shortcut)
- throw SysError(L"Not a Google Drive Shortcut.");
-
- targetId = itemDetails.targetId;
+ throw SysError(replaceCpy(_("Cannot find %x."), L"%x", fmtPath(fsTarget.getDisplayPath(AfsPath(nativeAppendPaths(ps.existingPath.value, ps.relPath.front()))))));
+ parentId = ps.existingItemId;
});
- const std::string shortcutIdNew = gdriveCreateShortcutPlain(shortcutName, parentFolderId, targetId, aai.accessToken); //throw SysError
+ //already existing: creates duplicate
+ const std::string shortcutIdNew = gdriveCreateShortcutPlain(shortcutName, parentId, targetId, aaiTrg.accessToken); //throw SysError
//buffer new file state ASAP (don't wait GDRIVE_SYNC_INTERVAL)
- accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
+ accessGlobalFileState(fsTarget.gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
{
- fileState.notifyShortcutCreated(aai.stateDelta, shortcutIdNew, shortcutName, parentFolderId, targetId);
+ fileState.notifyShortcutCreated(aaiTrg.stateDelta, shortcutIdNew, shortcutName, parentId, targetId);
});
}
- catch (const SysError& e) { throw FileError(generateErrorMsg(), e.toString()); }
+ catch (const SysError& e)
+ {
+ throw FileError(replaceCpy(replaceCpy(_("Cannot copy symbolic link %x to %y."),
+ L"%x", L'\n' + fmtPath(getDisplayPath(afsSource))),
+ L"%y", L'\n' + fmtPath(AFS::getDisplayPath(apTarget))), e.toString());
+ }
}
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
- //=> actual behavior: fails with "already existing
+ //already existing: undefined behavior! (e.g. fail/overwrite)
+ //=> actual behavior: 1. fails or 2. creates duplicate (unlikely)
void moveAndRenameItemForSameAfsType(const AfsPath& pathFrom, const AbstractPath& pathTo) const override //throw FileError, ErrorMoveUnsupported
{
auto generateErrorMsg = [&] { return replaceCpy(replaceCpy(_("Cannot move file %x to %y."),
@@ -3213,40 +3382,42 @@ private:
L"%y", L'\n' + fmtPath(AFS::getDisplayPath(pathTo)));
};
- if (compareDeviceSameAfsType(pathTo.afsDevice.ref()) != 0)
+ const GdriveFileSystem& fsTarget = static_cast<const GdriveFileSystem&>(pathTo.afsDevice.ref());
+
+ if (!equalAsciiNoCase(gdriveLogin_.email, fsTarget.gdriveLogin_.email))
throw ErrorMoveUnsupported(generateErrorMsg(), _("Operation not supported between different devices."));
- warn_static("check if true")
+ //else: moving files within account works, e.g. between My Drive <-> shared drives
try
{
//avoid duplicate Google Drive item creation by multiple threads
- PathAccessLock pal(getGdrivePath(pathTo.afsPath)); //throw SysError
+ PathAccessLock pal(fsTarget.getGdriveRawPath(pathTo.afsPath), PathBlockType::otherWait); //throw SysError
const Zstring itemNameOld = getItemName(pathFrom);
- const Zstring itemNameNew = AFS::getItemName(pathTo);
-
+ const Zstring itemNameNew = getItemName(pathTo);
const std::optional<AfsPath> parentPathFrom = getParentPath(pathFrom);
const std::optional<AfsPath> parentPathTo = getParentPath(pathTo.afsPath);
if (!parentPathFrom) throw SysError(L"Source is device root");
if (!parentPathTo ) throw SysError(L"Target is device root");
- std::string itemIdFrom;
- time_t modTimeFrom = 0;
+ std::string itemId;
+ time_t modTime = 0;
std::string parentIdFrom;
std::string parentIdTo;
const GdrivePersistentSessions::AsyncAccessInfo aai = accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
{
GdriveItemDetails itemDetails;
- std::tie(itemIdFrom, itemDetails) = fileState.getFileAttributes(gdriveLogin_.sharedDriveName, pathFrom, false /*followLeafShortcut*/); //throw SysError
+ std::tie(itemId, itemDetails) = fileState.getFileAttributes(gdriveLogin_.sharedDriveName, pathFrom, false /*followLeafShortcut*/); //throw SysError
+
+ modTime = itemDetails.modTime;
+ parentIdFrom = fileState.getItemId(gdriveLogin_.sharedDriveName, *parentPathFrom, true /*followLeafShortcut*/); //throw SysError
- modTimeFrom = itemDetails.modTime;
- parentIdFrom = fileState.getItemId(gdriveLogin_.sharedDriveName, *parentPathFrom, true /*followLeafShortcut*/); //throw SysError
- GdriveFileState::PathStatus psTo = fileState.getPathStatus(gdriveLogin_.sharedDriveName, pathTo.afsPath, false /*followLeafShortcut*/); //throw SysError
+ const GdriveFileState::PathStatus psTo = fileState.getPathStatus(fsTarget.gdriveLogin_.sharedDriveName, pathTo.afsPath, false /*followLeafShortcut*/); //throw SysError
//e.g. changing file name case only => this is not an "already exists" situation!
//also: hardlink referenced by two different paths, the source one will be unlinked
- if (psTo.relPath.empty() && psTo.existingItemId == itemIdFrom)
- parentIdTo = fileState.getItemId(gdriveLogin_.sharedDriveName, *parentPathTo, true /*followLeafShortcut*/); //throw SysError
+ if (psTo.relPath.empty() && psTo.existingItemId == itemId)
+ parentIdTo = fileState.getItemId(fsTarget.gdriveLogin_.sharedDriveName, *parentPathTo, true /*followLeafShortcut*/); //throw SysError
else
{
if (psTo.relPath.empty())
@@ -3254,7 +3425,7 @@ private:
if (psTo.relPath.size() > 1) //parent folder missing
throw SysError(replaceCpy(_("Cannot find %x."), L"%x",
- fmtPath(getDisplayPath(AfsPath(nativeAppendPaths(psTo.existingPath.value, psTo.relPath.front()))))));
+ fmtPath(fsTarget.getDisplayPath(AfsPath(nativeAppendPaths(psTo.existingPath.value, psTo.relPath.front()))))));
parentIdTo = psTo.existingItemId;
}
});
@@ -3262,13 +3433,13 @@ private:
if (parentIdFrom == parentIdTo && itemNameOld == itemNameNew)
return; //nothing to do
- //target name already existing? will (happily) create duplicate items
- gdriveMoveAndRenameItem(itemIdFrom, parentIdFrom, parentIdTo, itemNameNew, modTimeFrom, aai.accessToken); //throw SysError
+ //already existing: creates duplicate
+ gdriveMoveAndRenameItem(itemId, parentIdFrom, parentIdTo, itemNameNew, modTime, aai.accessToken); //throw SysError
//buffer new file state ASAP (don't wait GDRIVE_SYNC_INTERVAL)
accessGlobalFileState(gdriveLogin_.email, [&](GdriveFileState& fileState) //throw SysError
{
- fileState.notifyMoveAndRename(aai.stateDelta, itemIdFrom, parentIdFrom, parentIdTo, itemNameNew);
+ fileState.notifyMoveAndRename(aai.stateDelta, itemId, parentIdFrom, parentIdTo, itemNameNew);
});
}
catch (const SysError& e) { throw FileError(generateErrorMsg(), e.toString()); }
@@ -3277,8 +3448,8 @@ private:
bool supportsPermissions(const AfsPath& afsPath) const override { return false; } //throw FileError
//----------------------------------------------------------------------------------------------------------------
- ImageHolder getFileIcon (const AfsPath& afsPath, int pixelSize) const override { return ImageHolder(); } //noexcept; optional return value
- ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const override { return ImageHolder(); } //noexcept; optional return value
+ FileIconHolder getFileIcon (const AfsPath& afsPath, int pixelSize) const override { return {}; } //throw SysError; optional return value
+ ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const override { return {}; } //throw SysError; optional return value
void authenticateAccess(bool allowUserInteraction) const override //throw FileError
{
@@ -3307,9 +3478,9 @@ private:
int64_t getFreeDiskSpace(const AfsPath& afsPath) const override //throw FileError, returns < 0 if not available
{
if (!gdriveLogin_.sharedDriveName.empty())
- return -1;
-
- try
+ return -1;
+
+ try
{
const std::string& accessToken = accessGlobalFileState(gdriveLogin_.email, [](GdriveFileState& fileState) {}).accessToken; //throw SysError
return gdriveGetMyDriveFreeSpace(accessToken); //throw SysError; returns < 0 if not available
@@ -3432,7 +3603,7 @@ std::vector<Zstring /*sharedDriveName*/> fff::gdriveListSharedDrives(const std::
AfsDevice fff::condenseToGdriveDevice(const GdriveLogin& login) //noexcept
{
- //clean up input:
+ //clean up input:
GdriveLogin loginTmp = login;
trim(loginTmp.email);
diff --git a/FreeFileSync/Source/afs/native.cpp b/FreeFileSync/Source/afs/native.cpp
index f5986604..4ca18710 100644
--- a/FreeFileSync/Source/afs/native.cpp
+++ b/FreeFileSync/Source/afs/native.cpp
@@ -414,8 +414,7 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- //already existing: fail/ignore
- //=> Native will fail and give a clear error message
+ //already existing: fail
void createFolderPlain(const AfsPath& afsPath) const override //throw FileError
{
initComForThread(); //throw FileError
@@ -467,15 +466,15 @@ private:
{
initComForThread(); //throw FileError
- auto getTargetBlob = [](const NativeFileSystem& nativeFs, const AfsPath& afsPath)
- {
- const Zstring nativePath = nativeFs.getNativePath(afsPath);
+ const NativeFileSystem& nativeFsR = static_cast<const NativeFileSystem&>(apRhs.afsDevice.ref());
+
+ const SymlinkRawContent linkContentL = getSymlinkRawContent(getNativePath(afsLhs)); //throw FileError
+ const SymlinkRawContent linkContentR = getSymlinkRawContent(nativeFsR.getNativePath(apRhs.afsPath)); //throw FileError
- std::string contentBlob = utfTo<std::string>(getSymlinkTargetRaw(nativePath)); //throw FileError
- return contentBlob;
- };
+ if (linkContentL.targetPath != linkContentR.targetPath)
+ return false;
- return getTargetBlob(*this, afsLhs) == getTargetBlob(static_cast<const NativeFileSystem&>(apRhs.afsDevice.ref()), apRhs.afsPath);
+ return true;
}
//----------------------------------------------------------------------------------------------------------------
@@ -486,7 +485,8 @@ private:
return std::make_unique<InputStreamNative>(getNativePath(afsPath), notifyUnbufferedIO); //throw FileError, ErrorFileLocked
}
- //target existing: undefined behavior! (fail/overwrite/auto-rename) => Native will fail and give a clear error message
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
+ //=> actual behavior: fail with clear error message
std::unique_ptr<OutputStreamImpl> getOutputStream(const AfsPath& afsPath, //throw FileError
std::optional<uint64_t> streamSize,
std::optional<time_t> modTime,
@@ -509,8 +509,9 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- //symlink handling: follow link!
- //target existing: undefined behavior! (fail/overwrite/auto-rename) => Native will fail and give a clear error message
+ //symlink handling: follow
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
+ //=> actual behavior: fail with clear error message
FileCopyResult copyFileForSameAfsType(const AfsPath& afsSource, const StreamAttributes& attrSource, //throw FileError, ErrorFileLocked, X
const AbstractPath& apTarget, bool copyFilePermissions, const IOCallback& notifyUnbufferedIO /*throw X*/) const override
{
@@ -518,8 +519,15 @@ private:
initComForThread(); //throw FileError
- const zen::FileCopyResult nativeResult = copyNewFile(getNativePath(afsSource), nativePathTarget, //throw FileError, ErrorTargetExisting, ErrorFileLocked, X
- copyFilePermissions, notifyUnbufferedIO);
+ const zen::FileCopyResult nativeResult = copyNewFile(getNativePath(afsSource), nativePathTarget, notifyUnbufferedIO); //throw FileError, ErrorTargetExisting, ErrorFileLocked, X
+
+ //at this point we know we created a new file, so it's fine to delete it for cleanup!
+ ZEN_ON_SCOPE_FAIL(try { zen::removeFilePlain(nativePathTarget); }
+ catch (FileError&) {});
+
+ if (copyFilePermissions)
+ copyItemPermissions(getNativePath(afsSource), nativePathTarget, ProcSymlink::FOLLOW); //throw FileError
+
FileCopyResult result;
result.fileSize = nativeResult.fileSize;
result.modTime = nativeResult.modTime;
@@ -529,8 +537,8 @@ private:
return result;
}
- //target existing: fail/ignore => Native will fail and give a clear error message
- //symlink handling: follow link!
+ //symlink handling: follow
+ //already existing: fail
void copyNewFolderForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const override //throw FileError
{
initComForThread(); //throw FileError
@@ -552,15 +560,23 @@ private:
copyItemPermissions(sourcePath, targetPath, ProcSymlink::FOLLOW); //throw FileError
}
+ //already existing: fail
void copySymlinkForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const override //throw FileError
{
const Zstring nativePathTarget = static_cast<const NativeFileSystem&>(apTarget.afsDevice.ref()).getNativePath(apTarget.afsPath);
initComForThread(); //throw FileError
- zen::copySymlink(getNativePath(afsSource), nativePathTarget, copyFilePermissions); //throw FileError
+ zen::copySymlink(getNativePath(afsSource), nativePathTarget); //throw FileError
+
+ ZEN_ON_SCOPE_FAIL(try { zen::removeSymlinkPlain(nativePathTarget); /*throw FileError*/ }
+ catch (FileError&) {});
+
+ if (copyFilePermissions)
+ copyItemPermissions(getNativePath(afsSource), nativePathTarget, ProcSymlink::DIRECT); //throw FileError
}
- //target existing: undefined behavior! (fail/overwrite/auto-rename) => Native will fail and give a clear error message
+ //already existing: undefined behavior! (e.g. fail/overwrite)
+ //=> actual behavior: fail with clear error message
void moveAndRenameItemForSameAfsType(const AfsPath& pathFrom, const AbstractPath& pathTo) const override //throw FileError, ErrorMoveUnsupported
{
//perf test: detecting different volumes by path is ~30 times faster than having ::MoveFileEx() fail with ERROR_NOT_SAME_DEVICE (6µs vs 190µs)
@@ -582,24 +598,26 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- ImageHolder getFileIcon(const AfsPath& afsPath, int pixelSize) const override //noexcept; optional return value
+ FileIconHolder getFileIcon(const AfsPath& afsPath, int pixelSize) const override //throw SysError; (optional return value)
{
try
{
initComForThread(); //throw FileError
- return fff::getFileIcon(getNativePath(afsPath), pixelSize);
}
- catch (FileError&) { assert(false); return ImageHolder(); }
+ catch (const FileError& e) { throw SysError(e.toString()); }
+
+ return fff::getFileIcon(getNativePath(afsPath), pixelSize); //throw SysError
}
- ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const override //noexcept; optional return value
+ ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const override //throw SysError; (optional return value)
{
try
{
initComForThread(); //throw FileError
- return fff::getThumbnailImage(getNativePath(afsPath), pixelSize);
}
- catch (FileError&) { assert(false); return ImageHolder(); }
+ catch (const FileError& e) { throw SysError(e.toString()); }
+
+ return fff::getThumbnailImage(getNativePath(afsPath), pixelSize); //throw SysError
}
void authenticateAccess(bool allowUserInteraction) const override //throw FileError
diff --git a/FreeFileSync/Source/afs/sftp.cpp b/FreeFileSync/Source/afs/sftp.cpp
index b9c97ac7..7921d89b 100644
--- a/FreeFileSync/Source/afs/sftp.cpp
+++ b/FreeFileSync/Source/afs/sftp.cpp
@@ -328,7 +328,7 @@ public:
pkStream = loadBinContainer<std::string>(sessionId_.privateKeyFilePath, nullptr /*notifyUnbufferedIO*/); //throw FileError
trim(pkStream);
}
- catch (const FileError& e) { throw SysError(e.toString()); } //errors should be further enriched by context info => SysError
+ catch (const FileError& e) { throw SysError(replaceCpy(e.toString(), L"\n\n", L'\n')); } //errors should be further enriched by context info => SysError
//libssh2 doesn't support the PuTTY key file format, but we do!
if (isPuttyKeyStream(pkStream))
@@ -1589,13 +1589,12 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- //already existing: fail/ignore
- //=> SFTP will fail with obscure LIBSSH2_FX_FAILURE error message
+ //already existing: fail
void createFolderPlain(const AfsPath& afsPath) const override //throw FileError
{
try
{
- //fails if folder is already existing:
+ //fails with obscure LIBSSH2_FX_FAILURE if already existing
runSftpCommand(login_, "libssh2_sftp_mkdir", //throw SysError
[&](const SshSession::Details& sd) //noexcept!
{
@@ -1712,7 +1711,8 @@ private:
return std::make_unique<InputStreamSftp>(login_, afsPath, notifyUnbufferedIO); //throw FileError
}
- //target existing: undefined behavior! (fail/overwrite/auto-rename) => SFTP will fail with obscure LIBSSH2_FX_FAILURE error message
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
+ //=> actual behavior: fail with obscure LIBSSH2_FX_FAILURE error
std::unique_ptr<OutputStreamImpl> getOutputStream(const AfsPath& afsPath, //throw FileError
std::optional<uint64_t> streamSize,
std::optional<time_t> modTime,
@@ -1728,8 +1728,8 @@ private:
}
//----------------------------------------------------------------------------------------------------------------
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
- //symlink handling: follow link!
+ //symlink handling: follow
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
FileCopyResult copyFileForSameAfsType(const AfsPath& afsSource, const StreamAttributes& attrSource, //throw FileError, (ErrorFileLocked), X
const AbstractPath& apTarget, bool copyFilePermissions, const IOCallback& notifyUnbufferedIO /*throw X*/) const override
{
@@ -1737,21 +1737,22 @@ private:
if (copyFilePermissions)
throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(AFS::getDisplayPath(apTarget))), _("Operation not supported by device."));
- //target existing: undefined behavior! (fail/overwrite/auto-rename)
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
return copyFileAsStream(afsSource, attrSource, apTarget, notifyUnbufferedIO); //throw FileError, (ErrorFileLocked), X
}
- //already existing: fail/ignore
- //symlink handling: follow link!
+ //symlink handling: follow
+ //already existing: fail
void copyNewFolderForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const override //throw FileError
{
if (copyFilePermissions)
throw FileError(replaceCpy(_("Cannot write permissions of %x."), L"%x", fmtPath(AFS::getDisplayPath(apTarget))), _("Operation not supported by device."));
- //already existing: fail/ignore
+ //already existing: fail
AFS::createFolderPlain(apTarget); //throw FileError
}
+ //already existing: fail
void copySymlinkForSameAfsType(const AfsPath& afsSource, const AbstractPath& apTarget, bool copyFilePermissions) const override
{
throw FileError(replaceCpy(replaceCpy(_("Cannot copy symbolic link %x to %y."),
@@ -1759,7 +1760,8 @@ private:
L"%y", L'\n' + fmtPath(AFS::getDisplayPath(apTarget))), _("Operation not supported by device."));
}
- //target existing: undefined behavior! (fail/overwrite/auto-rename) => SFTP will fail with obscure LIBSSH2_FX_FAILURE error message
+ //already existing: undefined behavior! (e.g. fail/overwrite)
+ //=> actual behavior: fail with obscure LIBSSH2_FX_FAILURE error
void moveAndRenameItemForSameAfsType(const AfsPath& pathFrom, const AbstractPath& pathTo) const override //throw FileError, ErrorMoveUnsupported
{
auto generateErrorMsg = [&] { return replaceCpy(replaceCpy(_("Cannot move file %x to %y."),
@@ -1799,8 +1801,8 @@ private:
//wait until there is real demand for copying from and to SFTP with permissions => use stream-based file copy:
//----------------------------------------------------------------------------------------------------------------
- ImageHolder getFileIcon (const AfsPath& afsPath, int pixelSize) const override { return ImageHolder(); } //noexcept; optional return value
- ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const override { return ImageHolder(); } //
+ FileIconHolder getFileIcon (const AfsPath& afsPath, int pixelSize) const override { return {}; } //throw SysError; optional return value
+ ImageHolder getThumbnailImage(const AfsPath& afsPath, int pixelSize) const override { return {}; } //throw SysError; optional return value
void authenticateAccess(bool allowUserInteraction) const override {} //throw FileError
diff --git a/FreeFileSync/Source/application.cpp b/FreeFileSync/Source/application.cpp
index 03bc779b..f0bdaa6d 100644
--- a/FreeFileSync/Source/application.cpp
+++ b/FreeFileSync/Source/application.cpp
@@ -60,7 +60,7 @@ bool Application::OnInit()
//do not call wxApp::OnInit() to avoid using wxWidgets command line parser
//parallel xBRZ-scaling! => run as early as possible
- try { initResourceImages(getResourceDirPf() + Zstr("Icons.zip")); }
+ try { imageResourcesInit(getResourceDirPf() + Zstr("Icons.zip")); }
catch (FileError&) { assert(false); }
//errors are not really critical in this context
@@ -79,27 +79,39 @@ bool Application::OnInit()
//no such issue on GTK3!
#elif GTK_MAJOR_VERSION == 3
- try
+ auto loadCSS = [&](const char* fileName)
{
- GtkCssProvider* provider = ::gtk_css_provider_new ();
+ GtkCssProvider* provider = ::gtk_css_provider_new();
ZEN_ON_SCOPE_EXIT(::g_object_unref(provider));
GError* error = nullptr;
- ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error););
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider,
- (getResourceDirPf() + "Gtk3Styles.css").c_str(), //const gchar* path,
+ (getResourceDirPf() + fileName).c_str(), //const gchar* path,
&error); //GError** error
if (error)
- throw SysError(formatSystemError("gtk_css_provider_load_from_data",
+ throw SysError(formatSystemError("gtk_css_provider_load_from_path",
replaceCpy(_("Error code %x"), L"%x", numberTo<std::wstring>(error->code)),
utfTo<std::wstring>(error->message)));
::gtk_style_context_add_provider_for_screen(::gdk_screen_get_default(), //GdkScreen* screen,
GTK_STYLE_PROVIDER(provider), //GtkStyleProvider* provider,
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); //guint priority
+ };
+ try
+ {
+ loadCSS("Gtk3Styles.css"); //throw SysError
+ }
+ catch (const SysError& e)
+ {
+ std::cerr << utfTo<std::string>(e.toString()) << "\n" "Loading GTK3\'s old CSS format instead...\n";
+ try
+ {
+ loadCSS("Gtk3Styles.old.css"); //throw SysError
+ }
+ catch (const SysError& e2) { std::cerr << utfTo<std::string>(e2.toString()) << '\n'; }
}
- catch (const SysError& e) { std::cerr << utfTo<std::string>(e.toString()) << '\n'; }
#else
#error unknown GTK version!
#endif
@@ -134,7 +146,7 @@ bool Application::OnInit()
int Application::OnExit()
{
releaseWxLocale();
- cleanupResourceImages();
+ ImageResourcesCleanup();
teardownAfs();
return wxApp::OnExit();
}
@@ -198,7 +210,7 @@ void Application::launch(const std::vector<Zstring>& commandArgs)
{
//wxWidgets app exit handling is weird... we want to exit only if the logical main window is closed, not just *any* window!
wxTheApp->SetExitOnFrameDelete(false); //prevent popup-windows from becoming temporary top windows leading to program exit after closure
- ZEN_ON_SCOPE_EXIT(if (!mainWindowWasSet()) wxTheApp->ExitMainLoop();); //quit application, if no main window was set (batch silent mode)
+ ZEN_ON_SCOPE_EXIT(if (!globalWindowWasSet()) wxTheApp->ExitMainLoop()); //quit application, if no main window was set (batch silent mode)
auto notifyFatalError = [&](const std::wstring& msg, const std::wstring& title)
{
@@ -380,7 +392,7 @@ void Application::launch(const std::vector<Zstring>& commandArgs)
else
{
XmlGuiConfig guiCfg;
- guiCfg.mainCfg.syncCfg.directionCfg.var = DirectionConfig::MIRROR;
+ guiCfg.mainCfg.syncCfg.directionCfg.var = SyncVariant::mirror;
if (!replaceDirectories(guiCfg.mainCfg))
return;
@@ -618,7 +630,7 @@ void runBatchMode(const Zstring& globalConfigFilePath, const XmlBatchConfig& bat
}
//email sending, or saving log file failed? at the very least this should affect the exit code:
- if (r.logStats.fatal > 0 || r.logStats.error > 0)
+ if (r.logStats.error > 0)
raiseExitCode(exitCode, FFS_EXIT_ERROR);
else if (r.logStats.warning > 0)
raiseExitCode(exitCode, FFS_EXIT_WARNING);
diff --git a/FreeFileSync/Source/base/algorithm.cpp b/FreeFileSync/Source/base/algorithm.cpp
index d1dac7e7..72f7e0d8 100644
--- a/FreeFileSync/Source/base/algorithm.cpp
+++ b/FreeFileSync/Source/base/algorithm.cpp
@@ -122,9 +122,9 @@ private:
//##################### schedule old temporary files for deletion ####################
if (cat == FILE_LEFT_SIDE_ONLY && endsWith(file.getItemName<LEFT_SIDE>(), AFS::TEMP_FILE_ENDING))
- return file.setSyncDir(SyncDirection::LEFT);
+ return file.setSyncDir(SyncDirection::left);
else if (cat == FILE_RIGHT_SIDE_ONLY && endsWith(file.getItemName<RIGHT_SIDE>(), AFS::TEMP_FILE_ENDING))
- return file.setSyncDir(SyncDirection::RIGHT);
+ return file.setSyncDir(SyncDirection::right);
//####################################################################################
switch (cat)
@@ -146,13 +146,13 @@ private:
break;
case FILE_CONFLICT:
case FILE_DIFFERENT_METADATA: //use setting from "conflict/cannot categorize"
- if (dirCfg_.conflict == SyncDirection::NONE)
+ if (dirCfg_.conflict == SyncDirection::none)
file.setSyncDirConflict(file.getCatExtraDescription()); //take over category conflict
else
file.setSyncDir(dirCfg_.conflict);
break;
case FILE_EQUAL:
- file.setSyncDir(SyncDirection::NONE);
+ file.setSyncDir(SyncDirection::none);
break;
}
}
@@ -175,7 +175,7 @@ private:
break;
case SYMLINK_CONFLICT:
case SYMLINK_DIFFERENT_METADATA: //use setting from "conflict/cannot categorize"
- if (dirCfg_.conflict == SyncDirection::NONE)
+ if (dirCfg_.conflict == SyncDirection::none)
symlink.setSyncDirConflict(symlink.getCatExtraDescription()); //take over category conflict
else
symlink.setSyncDir(dirCfg_.conflict);
@@ -184,7 +184,7 @@ private:
symlink.setSyncDir(dirCfg_.different);
break;
case SYMLINK_EQUAL:
- symlink.setSyncDir(SyncDirection::NONE);
+ symlink.setSyncDir(SyncDirection::none);
break;
}
}
@@ -195,9 +195,9 @@ private:
//########### schedule abandoned temporary recycle bin directory for deletion ##########
if (cat == DIR_LEFT_SIDE_ONLY && endsWith(folder.getItemName<LEFT_SIDE>(), AFS::TEMP_FILE_ENDING))
- return setSyncDirectionRec(SyncDirection::LEFT, folder); //
+ return setSyncDirectionRec(SyncDirection::left, folder); //
else if (cat == DIR_RIGHT_SIDE_ONLY && endsWith(folder.getItemName<RIGHT_SIDE>(), AFS::TEMP_FILE_ENDING))
- return setSyncDirectionRec(SyncDirection::RIGHT, folder); //don't recurse below!
+ return setSyncDirectionRec(SyncDirection::right, folder); //don't recurse below!
//#######################################################################################
switch (cat)
@@ -209,11 +209,11 @@ private:
folder.setSyncDir(dirCfg_.exRightSideOnly);
break;
case DIR_EQUAL:
- folder.setSyncDir(SyncDirection::NONE);
+ folder.setSyncDir(SyncDirection::none);
break;
case DIR_CONFLICT:
case DIR_DIFFERENT_METADATA: //use setting from "conflict/cannot categorize"
- if (dirCfg_.conflict == SyncDirection::NONE)
+ if (dirCfg_.conflict == SyncDirection::none)
folder.setSyncDirConflict(folder.getCatExtraDescription()); //take over category conflict
else
folder.setSyncDir(dirCfg_.conflict);
@@ -571,9 +571,9 @@ private:
//##################### schedule old temporary files for deletion ####################
if (cat == FILE_LEFT_SIDE_ONLY && endsWith(file.getItemName<LEFT_SIDE>(), AFS::TEMP_FILE_ENDING))
- return file.setSyncDir(SyncDirection::LEFT);
+ return file.setSyncDir(SyncDirection::left);
else if (cat == FILE_RIGHT_SIDE_ONLY && endsWith(file.getItemName<RIGHT_SIDE>(), AFS::TEMP_FILE_ENDING))
- return file.setSyncDir(SyncDirection::RIGHT);
+ return file.setSyncDir(SyncDirection::right);
//####################################################################################
//try to find corresponding database entry
@@ -603,7 +603,7 @@ private:
(dbEntryR && !stillInSync(*dbEntryR, cmpVar_, fileTimeTolerance_, ignoreTimeShiftMinutes_)))
file.setSyncDirConflict(txtDbNotInSync_);
else
- file.setSyncDir(changeOnLeft ? SyncDirection::RIGHT : SyncDirection::LEFT);
+ file.setSyncDir(changeOnLeft ? SyncDirection::right : SyncDirection::left);
}
else
{
@@ -647,7 +647,7 @@ private:
(dbEntryR && !stillInSync(*dbEntryR, cmpVar_, fileTimeTolerance_, ignoreTimeShiftMinutes_)))
symlink.setSyncDirConflict(txtDbNotInSync_);
else
- symlink.setSyncDir(changeOnLeft ? SyncDirection::RIGHT : SyncDirection::LEFT);
+ symlink.setSyncDir(changeOnLeft ? SyncDirection::right : SyncDirection::left);
}
else
{
@@ -664,9 +664,9 @@ private:
//########### schedule abandoned temporary recycle bin directory for deletion ##########
if (cat == DIR_LEFT_SIDE_ONLY && endsWith(folder.getItemName<LEFT_SIDE>(), AFS::TEMP_FILE_ENDING))
- return setSyncDirectionRec(SyncDirection::LEFT, folder); //
+ return setSyncDirectionRec(SyncDirection::left, folder); //
else if (cat == DIR_RIGHT_SIDE_ONLY && endsWith(folder.getItemName<RIGHT_SIDE>(), AFS::TEMP_FILE_ENDING))
- return setSyncDirectionRec(SyncDirection::RIGHT, folder); //don't recurse below!
+ return setSyncDirectionRec(SyncDirection::right, folder); //don't recurse below!
//#######################################################################################
//try to find corresponding database entry
@@ -698,7 +698,7 @@ private:
(dbEntryR && !stillInSync(*dbEntryR)))
folder.setSyncDirConflict(txtDbNotInSync_);
else
- folder.setSyncDir(changeOnLeft ? SyncDirection::RIGHT : SyncDirection::LEFT);
+ folder.setSyncDir(changeOnLeft ? SyncDirection::right : SyncDirection::left);
}
else
{
@@ -723,7 +723,7 @@ private:
}
-std::vector<std::pair<BaseFolderPair*, DirectionConfig>> fff::extractDirectionCfg(FolderComparison& folderCmp, const MainConfiguration& mainCfg)
+std::vector<std::pair<BaseFolderPair*, SyncDirectionConfig>> fff::extractDirectionCfg(FolderComparison& folderCmp, const MainConfiguration& mainCfg)
{
if (folderCmp.empty())
return {};
@@ -738,7 +738,7 @@ std::vector<std::pair<BaseFolderPair*, DirectionConfig>> fff::extractDirectionCf
if (folderCmp.size() != allPairs.size())
throw std::logic_error("Contract violation! " + std::string(__FILE__) + ':' + numberTo<std::string>(__LINE__));
- std::vector<std::pair<BaseFolderPair*, DirectionConfig>> output;
+ std::vector<std::pair<BaseFolderPair*, SyncDirectionConfig>> output;
for (auto it = folderCmp.begin(); it != folderCmp.end(); ++it)
{
@@ -751,7 +751,7 @@ std::vector<std::pair<BaseFolderPair*, DirectionConfig>> fff::extractDirectionCf
}
-void fff::redetermineSyncDirection(const std::vector<std::pair<BaseFolderPair*, DirectionConfig>>& directCfgs,
+void fff::redetermineSyncDirection(const std::vector<std::pair<BaseFolderPair*, SyncDirectionConfig>>& directCfgs,
PhaseCallback& callback /*throw X*/) //throw X
{
if (directCfgs.empty())
@@ -763,43 +763,43 @@ void fff::redetermineSyncDirection(const std::vector<std::pair<BaseFolderPair*,
//best effort: always set sync directions (even on DB load error and when user cancels during file loading)
ZEN_ON_SCOPE_EXIT
(
- //*INDENT-OFF*
- for (const auto& [baseFolder, dirCfg] : directCfgs)
- if (!contains(allEqualPairs, baseFolder))
- {
- auto it = lastSyncStates.find(baseFolder);
- const InSyncFolder* lastSyncState = it != lastSyncStates.end() ? &it->second.ref() : nullptr;
-
- //set sync directions
- if (dirCfg.var == DirectionConfig::TWO_WAY)
- {
- if (lastSyncState)
- RedetermineTwoWay::execute(*baseFolder, *lastSyncState);
- else //default fallback
- {
- std::wstring msg = _("Setting default synchronization directions: Old files will be overwritten with newer files.");
- if (directCfgs.size() > 1)
- msg += L'\n' + AFS::getDisplayPath(baseFolder->getAbstractPath< LEFT_SIDE>()) + L' ' + getVariantNameForLog(dirCfg.var) + L' ' +
- AFS::getDisplayPath(baseFolder->getAbstractPath<RIGHT_SIDE>());
-
- try { callback.reportInfo(msg); /*throw X*/} catch (...) {};
-
- Redetermine::execute(getTwoWayUpdateSet(), *baseFolder);
- }
- }
- else
- Redetermine::execute(extractDirections(dirCfg), *baseFolder);
-
- //detect renamed files
- if (lastSyncState)
- DetectMovedFiles::execute(*baseFolder, *lastSyncState);
- }
- //*INDENT-ON*
+ //*INDENT-OFF*
+ for (const auto& [baseFolder, dirCfg] : directCfgs)
+ if (!contains(allEqualPairs, baseFolder))
+ {
+ auto it = lastSyncStates.find(baseFolder);
+ const InSyncFolder* lastSyncState = it != lastSyncStates.end() ? &it->second.ref() : nullptr;
+
+ //set sync directions
+ if (dirCfg.var == SyncVariant::twoWay)
+ {
+ if (lastSyncState)
+ RedetermineTwoWay::execute(*baseFolder, *lastSyncState);
+ else //default fallback
+ {
+ std::wstring msg = _("Setting default synchronization directions: Old files will be overwritten with newer files.");
+ if (directCfgs.size() > 1)
+ msg += L'\n' + AFS::getDisplayPath(baseFolder->getAbstractPath< LEFT_SIDE>()) + L' ' + getVariantNameWithSymbol(dirCfg.var) + L' ' +
+ AFS::getDisplayPath(baseFolder->getAbstractPath<RIGHT_SIDE>());
+
+ try { callback.reportInfo(msg); /*throw X*/} catch (...) {};
+
+ Redetermine::execute(getTwoWayUpdateSet(), *baseFolder);
+ }
+ }
+ else
+ Redetermine::execute(extractDirections(dirCfg), *baseFolder);
+
+ //detect renamed files
+ if (lastSyncState)
+ DetectMovedFiles::execute(*baseFolder, *lastSyncState);
+ }
+ //*INDENT-ON*
);
std::vector<const BaseFolderPair*> baseFoldersForDbLoad;
for (const auto& [baseFolder, dirCfg] : directCfgs)
- if (dirCfg.var == DirectionConfig::TWO_WAY || detectMovedFilesEnabled(dirCfg))
+ if (dirCfg.var == SyncVariant::twoWay || detectMovedFilesEnabled(dirCfg))
{
if (allItemsCategoryEqual(*baseFolder)) //nothing to do: don't even try to open DB files
allEqualPairs.insert(baseFolder);
@@ -1268,14 +1268,14 @@ void copyToAlternateFolderFrom(const std::vector<const FileSystemObject*>& rowsT
const std::function<void(const std::function<void()>& deleteTargetItem)>& copyItemPlain) //throw FileError
{
//start deleting existing target as required by copyFileTransactional():
- //best amortized performance if "target existing" is the most common case
+ //best amortized performance if "already existing" is the most common case
std::exception_ptr deletionError;
auto tryDeleteTargetItem = [&]
{
if (overwriteIfExists)
try { AFS::removeFilePlain(targetPath); /*throw FileError*/ }
catch (FileError&) { deletionError = std::current_exception(); } //probably "not existing" error, defer evaluation
- //else: copyFileTransactional() undefined behavior (fail/overwrite/auto-rename)
+ //else: copyFileTransactional() => undefined behavior! (e.g. fail/overwrite/auto-rename)
};
try
@@ -1301,12 +1301,13 @@ void copyToAlternateFolderFrom(const std::vector<const FileSystemObject*>& rowsT
throw;
}
- if (const std::optional<AbstractPath> targetParentPath = AFS::getParentPath(targetPath))
+ //parent folder missing => create + retry
+ //parent folder existing (maybe externally created shortly after copy attempt) => retry
+ if (const std::optional<AbstractPath>& targetParentPath = AFS::getParentPath(targetPath))
AFS::createFolderIfMissingRecursion(*targetParentPath); //throw FileError
//retry:
copyItemPlain(nullptr /*deleteTargetItem*/); //throw FileError
- return;
}
};
@@ -1343,6 +1344,7 @@ void copyToAlternateFolderFrom(const std::vector<const FileSystemObject*>& rowsT
statReporter.reportDelta(0, bytesDelta);
callback.requestUiUpdate(); //throw X
};
+ //already existing + !overwriteIfExists: undefined behavior! (e.g. fail/overwrite/auto-rename)
/*const AFS::FileCopyResult result =*/ AFS::copyFileTransactional(sourcePath, sourceAttr, targetPath, //throw FileError, ErrorFileLocked, X
false /*copyFilePermissions*/, true /*transactionalCopy*/, deleteTargetItem, notifyUnbufferedIO);
//result.errorModTime? => probably irrelevant (behave like Windows Explorer)
@@ -1539,7 +1541,7 @@ void categorize(const std::vector<FileSystemObject*>& rows,
void fff::deleteFromGridAndHD(const std::vector<FileSystemObject*>& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows
const std::vector<FileSystemObject*>& rowsToDeleteOnRight, //all pointers need to be bound!
- const std::vector<std::pair<BaseFolderPair*, DirectionConfig>>& directCfgs, //attention: rows will be physically deleted!
+ const std::vector<std::pair<BaseFolderPair*, SyncDirectionConfig>>& directCfgs, //attention: rows will be physically deleted!
bool useRecycleBin,
bool& warnRecyclerMissing,
ProcessCallback& callback)
@@ -1548,7 +1550,7 @@ void fff::deleteFromGridAndHD(const std::vector<FileSystemObject*>& rowsToDelete
return;
//build up mapping from base directory to corresponding direction config
- std::unordered_map<const BaseFolderPair*, DirectionConfig> baseFolderCfgs;
+ std::unordered_map<const BaseFolderPair*, SyncDirectionConfig> baseFolderCfgs;
for (const auto& [baseFolder, dirCfg] : directCfgs)
baseFolderCfgs[baseFolder] = dirCfg;
@@ -1582,10 +1584,10 @@ void fff::deleteFromGridAndHD(const std::vector<FileSystemObject*>& rowsToDelete
assert(cfgIter != baseFolderCfgs.end());
if (cfgIter != baseFolderCfgs.end())
{
- SyncDirection newDir = SyncDirection::NONE;
+ SyncDirection newDir = SyncDirection::none;
- if (cfgIter->second.var == DirectionConfig::TWO_WAY)
- newDir = fsObj.isEmpty<LEFT_SIDE>() ? SyncDirection::RIGHT : SyncDirection::LEFT;
+ if (cfgIter->second.var == SyncVariant::twoWay)
+ newDir = fsObj.isEmpty<LEFT_SIDE>() ? SyncDirection::right : SyncDirection::left;
else
{
const DirectionSet& dirCfg = extractDirections(cfgIter->second);
@@ -1649,10 +1651,10 @@ bool fff::operator<(const FileDescriptor& lhs, const FileDescriptor& rhs)
if (lhs.attr.fileId != rhs.attr.fileId)
return lhs.attr.fileId < rhs.attr.fileId;
- if (!lhs.attr.fileId.empty())
- return false; //when (non-empty) file IDs match we don't have to check the path => pre-mature optimization?
- else
- return lhs.path < rhs.path;
+ //if (!lhs.attr.fileId.empty())
+ // return false; //when (non-empty) file IDs match we don't have to check the path => pre-mature optimization?
+ //else
+ return lhs.path < rhs.path;
}
@@ -1740,6 +1742,7 @@ void TempFileBuffer::createTempFiles(const std::set<FileDescriptor>& workLoad, P
statReporter.reportDelta(0, bytesDelta);
callback.requestUiUpdate(); //throw X
};
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
/*const AFS::FileCopyResult result =*/ AFS::copyFileTransactional(descr.path, sourceAttr, //throw FileError, ErrorFileLocked, X
createItemPathNative(tempFilePath),
false /*copyFilePermissions*/, true /*transactionalCopy*/, nullptr /*onDeleteTargetFile*/, notifyUnbufferedIO);
diff --git a/FreeFileSync/Source/base/algorithm.h b/FreeFileSync/Source/base/algorithm.h
index 8be25f7e..938ac955 100644
--- a/FreeFileSync/Source/base/algorithm.h
+++ b/FreeFileSync/Source/base/algorithm.h
@@ -25,9 +25,9 @@ void recursiveObjectVisitor(FileSystemObject& fsObj,
void swapGrids(const MainConfiguration& mainCfg, FolderComparison& folderCmp,
PhaseCallback& callback /*throw X*/); //throw X
-std::vector<std::pair<BaseFolderPair*, DirectionConfig>> extractDirectionCfg(FolderComparison& folderCmp, const MainConfiguration& mainCfg);
+std::vector<std::pair<BaseFolderPair*, SyncDirectionConfig>> extractDirectionCfg(FolderComparison& folderCmp, const MainConfiguration& mainCfg);
-void redetermineSyncDirection(const std::vector<std::pair<BaseFolderPair*, DirectionConfig>>& directCfgs,
+void redetermineSyncDirection(const std::vector<std::pair<BaseFolderPair*, SyncDirectionConfig>>& directCfgs,
PhaseCallback& callback /*throw X*/); //throw X
void setSyncDirectionRec(SyncDirection newDirection, FileSystemObject& fsObj); //set new direction (recursively)
@@ -69,7 +69,7 @@ void copyToAlternateFolder(std::span<const FileSystemObject* const> rowsToCopyOn
//manual deletion of files on main grid
void deleteFromGridAndHD(const std::vector<FileSystemObject*>& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows
const std::vector<FileSystemObject*>& rowsToDeleteOnRight, //all pointers need to be bound!
- const std::vector<std::pair<BaseFolderPair*, DirectionConfig>>& directCfgs, //attention: rows will be physically deleted!
+ const std::vector<std::pair<BaseFolderPair*, SyncDirectionConfig>>& directCfgs, //attention: rows will be physically deleted!
bool useRecycleBin,
//global warnings:
bool& warnRecyclerMissing,
diff --git a/FreeFileSync/Source/base/comparison.cpp b/FreeFileSync/Source/base/comparison.cpp
index e730343e..784cc12a 100644
--- a/FreeFileSync/Source/base/comparison.cpp
+++ b/FreeFileSync/Source/base/comparison.cpp
@@ -622,7 +622,7 @@ std::list<std::shared_ptr<BaseFolderPair>> ComparisonBuffer::compareByContent(co
//---------------------------------------------------------------------------------------------------
ZEN_ON_SCOPE_SUCCESS(if (&posL != &posR) --posL.current;
/**/ --posR.current;
- scheduleMoreTasks(););
+ scheduleMoreTasks());
categorizeFileByContent(file, txtComparingContentOfFiles, acb, singleThread); //throw ThreadInterruption
});
@@ -731,15 +731,15 @@ void matchFolders(const MapType& mapLeft, const MapType& mapRight, ProcessLeftOn
{
struct FileRef
{
- Zstring upperCaseName; //buffer expensive makeUpperCopy() calls!!
+ Zstring upperCaseName; //buffer expensive getUpperCase() calls!!
const typename MapType::value_type* ref;
bool leftSide;
};
std::vector<FileRef> fileList;
fileList.reserve(mapLeft.size() + mapRight.size()); //perf: ~5% shorter runtime
- for (const auto& item : mapLeft ) fileList.push_back({ makeUpperCopy(item.first), &item, true });
- for (const auto& item : mapRight) fileList.push_back({ makeUpperCopy(item.first), &item, false });
+ for (const auto& item : mapLeft ) fileList.push_back({ getUpperCase(item.first), &item, true });
+ for (const auto& item : mapRight) fileList.push_back({ getUpperCase(item.first), &item, false });
//primary sort: ignore unicode normal form and case
//bonus: natural default sequence on file guid UI
@@ -1005,14 +1005,10 @@ FolderComparison fff::compare(WarningDialogs& warnings,
//specify process and resource handling priorities
std::unique_ptr<ScheduleForBackgroundProcessing> backgroundPrio;
if (runWithBackgroundPriority)
- try
- {
- backgroundPrio = std::make_unique<ScheduleForBackgroundProcessing>(); //throw FileError
- }
- catch (const FileError& e) //not an error in this context
- {
- callback.reportInfo(e.toString()); //throw X
- }
+ tryReportingError([&]
+ {
+ backgroundPrio = std::make_unique<ScheduleForBackgroundProcessing>(); //throw FileError
+ }, callback); //throw X
//prevent operating system going into sleep state
std::unique_ptr<PreventStandby> noStandby;
@@ -1020,7 +1016,7 @@ FolderComparison fff::compare(WarningDialogs& warnings,
{
noStandby = std::make_unique<PreventStandby>(); //throw FileError
}
- catch (const FileError& e) //not an error in this context
+ catch (const FileError& e) //failure is not critical => log only
{
callback.reportInfo(e.toString()); //throw X
}
@@ -1143,7 +1139,7 @@ FolderComparison fff::compare(WarningDialogs& warnings,
assert(output.size() == fpCfgList.size());
//--------- set initial sync-direction --------------------------------------------------
- std::vector<std::pair<BaseFolderPair*, DirectionConfig>> directCfgs;
+ std::vector<std::pair<BaseFolderPair*, SyncDirectionConfig>> directCfgs;
for (auto it = output.begin(); it != output.end(); ++it)
directCfgs.emplace_back(&** it, fpCfgList[it - output.begin()].directionCfg);
diff --git a/FreeFileSync/Source/base/comparison.h b/FreeFileSync/Source/base/comparison.h
index d547ee05..5a33f5b4 100644
--- a/FreeFileSync/Source/base/comparison.h
+++ b/FreeFileSync/Source/base/comparison.h
@@ -24,7 +24,7 @@ struct FolderPairCfg
SymLinkHandling handleSymlinksIn,
const std::vector<unsigned int>& ignoreTimeShiftMinutesIn,
const NormalizedFilter& filterIn,
- const DirectionConfig& directCfg) :
+ const SyncDirectionConfig& directCfg) :
folderPathPhraseLeft_ (folderPathPhraseLeft),
folderPathPhraseRight_(folderPathPhraseRight),
compareVar(cmpVar),
@@ -42,7 +42,7 @@ struct FolderPairCfg
NormalizedFilter filter;
- DirectionConfig directionCfg;
+ SyncDirectionConfig directionCfg;
};
std::vector<FolderPairCfg> extractCompareCfg(const MainConfiguration& mainCfg); //fill FolderPairCfg and resolve folder pairs
diff --git a/FreeFileSync/Source/base/db_file.cpp b/FreeFileSync/Source/base/db_file.cpp
index 7062a250..7fcb0287 100644
--- a/FreeFileSync/Source/base/db_file.cpp
+++ b/FreeFileSync/Source/base/db_file.cpp
@@ -32,10 +32,11 @@ struct SessionData
bool isLeadStream = false;
std::string rawStream;
};
+inline
bool operator==(const SessionData& lhs, const SessionData& rhs) { return lhs.isLeadStream == rhs.isLeadStream && lhs.rawStream == rhs.rawStream; }
using UniqueId = std::string;
-using DbStreams = std::map<UniqueId, SessionData>; //list of streams ordered by session UUID
+using DbStreams = std::unordered_map<UniqueId, SessionData>; //list of streams by session GUID
/*------------------------------------------------------------------------------
| ensure 32/64 bit portability: use fixed size data types only e.g. uint32_t |
@@ -84,6 +85,7 @@ void saveStreams(const DbStreams& streamList, const AbstractPath& dbPath, const
writeNumber<uint32_t>(memStreamOut, getCrc32(memStreamOut.ref()));
//------------------------------------------------------------------------------------------------------------------------
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
const std::unique_ptr<AFS::OutputStream> fileStreamOut = AFS::getOutputStream(dbPath, //throw FileError
memStreamOut.ref().size(),
std::nullopt /*modTime*/,
@@ -110,8 +112,7 @@ DbStreams loadStreams(const AbstractPath& dbPath, const IOCallback& notifyUnbuff
catch (const FileError& e2) { throw FileError(replaceCpy(e.toString(), L"\n\n", L'\n'), replaceCpy(e2.toString(), L"\n\n", L'\n')); }
if (dbNotYetExisting) //throw FileError
- throw FileErrorDatabaseNotExisting(_("Initial synchronization:") + L" \n" +
- replaceCpy(_("Database file %x does not yet exist."), L"%x", fmtPath(AFS::getDisplayPath(dbPath))));
+ throw FileErrorDatabaseNotExisting(replaceCpy(_("Database file %x does not yet exist."), L"%x", fmtPath(AFS::getDisplayPath(dbPath))));
else
throw;
}
@@ -121,12 +122,12 @@ DbStreams loadStreams(const AbstractPath& dbPath, const IOCallback& notifyUnbuff
MemoryStreamIn memStreamIn(byteStream);
char formatDescr[sizeof(DB_FILE_DESCR)] = {};
- readArray(memStreamIn, formatDescr, sizeof(formatDescr)); //throw UnexpectedEndOfStreamError
+ readArray(memStreamIn, formatDescr, sizeof(formatDescr)); //throw SysErrorUnexpectedEos
if (!std::equal(DB_FILE_DESCR, DB_FILE_DESCR + sizeof(DB_FILE_DESCR), formatDescr))
- throw FileError(_("Database file is corrupted:") + L' ' + fmtPath(AFS::getDisplayPath(dbPath)), L"Invalid header.");
+ throw SysError(_("File content is corrupted.") + L" (invalid header)");
- const int version = readNumber<int32_t>(memStreamIn); //throw UnexpectedEndOfStreamError
+ const int version = readNumber<int32_t>(memStreamIn); //throw SysErrorUnexpectedEos
if (version == 9 || //TODO: remove migration code at some time! v9 used until 2017-02-01
version == 10) //TODO: remove migration code at some time! v10 used until 2020-02-07
;
@@ -138,35 +139,34 @@ DbStreams loadStreams(const AbstractPath& dbPath, const IOCallback& notifyUnbuff
writeNumber<uint32_t>(crcStreamOut, getCrc32(byteStream.begin(), byteStream.end() - sizeof(uint32_t)));
if (!endsWith(byteStream, crcStreamOut.ref()))
- throw FileError(_("Database file is corrupted:") + L' ' + fmtPath(AFS::getDisplayPath(dbPath)), L"Invalid checksum.");
+ throw SysError(_("File content is corrupted.") + L" (invalid checksum)");
}
else
- throw FileError(replaceCpy(_("Database file %x is incompatible."), L"%x", fmtPath(AFS::getDisplayPath(dbPath))),
- replaceCpy(_("Version: %x"), L"%x", numberTo<std::wstring>(version)));
+ throw SysError(_("Unsupported data format.") + L' ' + replaceCpy(_("Version: %x"), L"%x", numberTo<std::wstring>(version)));
DbStreams output;
//read stream list
- size_t streamCount = readNumber<uint32_t>(memStreamIn); //throw UnexpectedEndOfStreamError
+ size_t streamCount = readNumber<uint32_t>(memStreamIn); //throw SysErrorUnexpectedEos
while (streamCount-- != 0)
{
- std::string sessionID = readContainer<std::string>(memStreamIn); //throw UnexpectedEndOfStreamError
+ std::string sessionID = readContainer<std::string>(memStreamIn); //throw SysErrorUnexpectedEos
SessionData sessionData = {};
if (version == 9) //TODO: remove migration code at some time! v9 used until 2017-02-01
{
- sessionData.rawStream = readContainer<std::string>(memStreamIn); //throw UnexpectedEndOfStreamError
+ sessionData.rawStream = readContainer<std::string>(memStreamIn); //throw SysErrorUnexpectedEos
MemoryStreamIn streamIn(sessionData.rawStream);
- const int streamVersion = readNumber<int32_t>(streamIn); //throw UnexpectedEndOfStreamError
+ const int streamVersion = readNumber<int32_t>(streamIn); //throw SysErrorUnexpectedEos
if (streamVersion != 2) //don't throw here due to old stream formats
continue;
- sessionData.isLeadStream = readNumber<int8_t>(streamIn) != 0; //throw UnexpectedEndOfStreamError
+ sessionData.isLeadStream = readNumber<int8_t>(streamIn) != 0; //throw SysErrorUnexpectedEos
}
else
{
- sessionData.isLeadStream = readNumber <int8_t >(memStreamIn) != 0; //throw UnexpectedEndOfStreamError
+ sessionData.isLeadStream = readNumber <int8_t >(memStreamIn) != 0; //throw SysErrorUnexpectedEos
sessionData.rawStream = readContainer<std::string>(memStreamIn); //
}
@@ -174,9 +174,9 @@ DbStreams loadStreams(const AbstractPath& dbPath, const IOCallback& notifyUnbuff
}
return output;
}
- catch (UnexpectedEndOfStreamError&)
+ catch (const SysError& e)
{
- throw FileError(_("Database file is corrupted:") + L' ' + fmtPath(AFS::getDisplayPath(dbPath)), L"Unexpected end of stream.");
+ throw FileError(replaceCpy(_("Cannot read database file %x."), L"%x", fmtPath(AFS::getDisplayPath(dbPath))), e.toString());
}
}
@@ -213,7 +213,7 @@ public:
7 12.54 3633
8 12.51 9032
9 12.50 19698 (maximal compression) */
- return compress(stream, 3); //throw SysError
+ return compress(stream, 3 /*level*/); //throw SysError
}
catch (const SysError& e)
{
@@ -257,50 +257,54 @@ private:
writeNumber<uint32_t>(streamOutSmallNum_, static_cast<uint32_t>(container.files.size()));
for (const auto& [itemName, inSyncData] : container.files)
{
- writeUtf8(streamOutText_, itemName);
+ writeItemName(itemName);
writeNumber(streamOutSmallNum_, static_cast<int32_t>(inSyncData.cmpVar));
writeNumber<uint64_t>(streamOutSmallNum_, inSyncData.fileSize);
- writeFileDescr(streamOutBigNum_, inSyncData.left);
- writeFileDescr(streamOutBigNum_, inSyncData.right);
+ writeFileDescr(inSyncData.left);
+ writeFileDescr(inSyncData.right);
}
writeNumber<uint32_t>(streamOutSmallNum_, static_cast<uint32_t>(container.symlinks.size()));
for (const auto& [itemName, inSyncData] : container.symlinks)
{
- writeUtf8(streamOutText_, itemName);
+ writeItemName(itemName);
writeNumber(streamOutSmallNum_, static_cast<int32_t>(inSyncData.cmpVar));
- writeLinkDescr(streamOutBigNum_, inSyncData.left);
- writeLinkDescr(streamOutBigNum_, inSyncData.right);
+ writeLinkDescr(inSyncData.left);
+ writeLinkDescr(inSyncData.right);
}
writeNumber<uint32_t>(streamOutSmallNum_, static_cast<uint32_t>(container.folders.size()));
for (const auto& [itemName, inSyncData] : container.folders)
{
- writeUtf8(streamOutText_, itemName);
+ writeItemName(itemName);
writeNumber<int32_t>(streamOutSmallNum_, inSyncData.status);
recurse(inSyncData);
}
}
- static void writeUtf8(MemoryStreamOut<std::string>& streamOut, const Zstring& str) { writeContainer(streamOut, utfTo<std::string>(str)); }
+ void writeItemName(const Zstring& str) { writeContainer(streamOutText_, utfTo<std::string>(str)); }
- static void writeFileDescr(MemoryStreamOut<std::string>& streamOut, const InSyncDescrFile& descr)
+ void writeFileDescr(const InSyncDescrFile& descr)
{
- writeNumber<int64_t>(streamOut, descr.modTime);
- writeContainer(streamOut, descr.fileId);
- static_assert(std::is_same_v<decltype(descr.fileId), std::string>);
+ writeNumber<int64_t>(streamOutBigNum_, descr.modTime);
+ writeContainer<std::string>(streamOutBigNum_, descr.fileId);
+ static_assert(sizeof(descr.modTime) <= sizeof(int64_t)); //ensure cross-platform compatibility!
}
- static void writeLinkDescr(MemoryStreamOut<std::string>& streamOut, const InSyncDescrLink& descr)
- {
- writeNumber<int64_t>(streamOut, descr.modTime);
- }
+ void writeLinkDescr(const InSyncDescrLink& descr) { writeNumber<int64_t>(streamOutBigNum_, descr.modTime); }
+
+ /* maximize zlib compression by grouping similar data (=> 20% size reduction!)
+ -> further ~5% reduction possible by having one container per data type
- //maximize zlib compression by grouping similar data (=> 20% size reduction!)
- // -> further ~5% reduction possible by having one container per data type
+ other ideas: - avoid left/right side interleaving in writeFileDescr() => pessimization!
+ - convert CompareVariant/InSyncStatus to "enum : unsigned char" => only 0,4% size reduction!
+ - split up writeItemName() to use streamOutSmallNum_ + streamOutText_ => pessimization!
+ - use null-termination in writeItemName() => 5% size reduction (embedded zeros impossible?)
+ - use empty item name as sentinel => only 0,17% size reduction!
+ - save fileSize using instreamOutBigNum_ => pessimization! */
MemoryStreamOut<std::string> streamOutText_; //
MemoryStreamOut<std::string> streamOutSmallNum_; //data with bias to lead side (= always left in this context)
MemoryStreamOut<std::string> streamOutBigNum_; //
@@ -316,39 +320,27 @@ public:
const std::wstring& displayFilePathL, //for diagnostics only
const std::wstring& displayFilePathR)
{
- auto decompStream = [&](const std::string& stream) //throw FileError
- {
- try
- {
- return decompress(stream); //throw SysError
- }
- catch (const SysError& e)
- {
- throw FileError(replaceCpy(_("Cannot read file %x."), L"%x", fmtPath(displayFilePathL + L"/" + displayFilePathR)), e.toString());
- }
- };
-
try
{
MemoryStreamIn streamInL(streamL);
MemoryStreamIn streamInR(streamR);
- const int streamVersion = readNumber<int32_t>(streamInL); //throw UnexpectedEndOfStreamError
+ const int streamVersion = readNumber<int32_t>(streamInL); //throw SysErrorUnexpectedEos
const int streamVersionR = readNumber<int32_t>(streamInR); //
if (streamVersion != streamVersionR)
- throw FileError(_("Database file is corrupted:") + L'\n' + fmtPath(displayFilePathL) + L'\n' + fmtPath(displayFilePathR), L"Different stream formats");
+ throw SysError(_("File content is corrupted.") + L" (different stream formats)");
//TODO: remove migration code at some time! 2017-02-01
if (streamVersion == 2)
{
- const bool has1stPartL = readNumber<int8_t>(streamInL) != 0; //throw UnexpectedEndOfStreamError
+ const bool has1stPartL = readNumber<int8_t>(streamInL) != 0; //throw SysErrorUnexpectedEos
const bool has1stPartR = readNumber<int8_t>(streamInR) != 0; //
if (has1stPartL == has1stPartR)
- throw FileError(_("Database file is corrupted:") + L'\n' + fmtPath(displayFilePathL) + L'\n' + fmtPath(displayFilePathR), L"Second stream part missing");
+ throw SysError(_("File content is corrupted.") + L" (second stream part missing)");
if (has1stPartL != leadStreamLeft)
- throw FileError(_("Database file is corrupted:") + L'\n' + fmtPath(displayFilePathL) + L'\n' + fmtPath(displayFilePathR), L"has1stPartL != leadStreamLeft");
+ throw SysError(_("File content is corrupted.") + L" (has1stPartL != leadStreamLeft)");
MemoryStreamIn<std::string>& in1stPart = leadStreamLeft ? streamInL : streamInR;
MemoryStreamIn<std::string>& in2ndPart = leadStreamLeft ? streamInR : streamInL;
@@ -358,16 +350,16 @@ public:
std::string tmpB(size1stPart + size2ndPart, '\0'); //throw std::bad_alloc
readArray(in1stPart, &tmpB[0], size1stPart); //stream always non-empty
- readArray(in2ndPart, &tmpB[0] + size1stPart, size2ndPart); //throw UnexpectedEndOfStreamError
+ readArray(in2ndPart, &tmpB[0] + size1stPart, size2ndPart); //throw SysErrorUnexpectedEos
const std::string tmpL = readContainer<std::string>(streamInL);
const std::string tmpR = readContainer<std::string>(streamInR);
auto output = makeSharedRef<InSyncFolder>(InSyncFolder::DIR_STATUS_IN_SYNC);
- StreamParserV2 parser(decompStream(tmpL),
- decompStream(tmpR),
- decompStream(tmpB));
- parser.recurse(output.ref()); //throw UnexpectedEndOfStreamError
+ StreamParserV2 parser(decompress(tmpL), //
+ decompress(tmpR), //throw SysError
+ decompress(tmpB)); //
+ parser.recurse(output.ref()); //throw SysError
return output;
}
else if (streamVersion == DB_STREAM_VERSION)
@@ -379,32 +371,31 @@ public:
const size_t sizePart2 = static_cast<size_t>(readNumber<uint64_t>(streamInPart2));
std::string buf(sizePart1 + sizePart2, '\0');
- if (sizePart1 > 0) readArray(streamInPart1, &buf[0], sizePart1); //throw UnexpectedEndOfStreamError
+ if (sizePart1 > 0) readArray(streamInPart1, &buf[0], sizePart1); //throw SysErrorUnexpectedEos
if (sizePart2 > 0) readArray(streamInPart2, &buf[0] + sizePart1, sizePart2); //
MemoryStreamIn streamIn(buf);
const std::string bufText = readContainer<std::string>(streamIn); //
- const std::string bufSmallNum = readContainer<std::string>(streamIn); //throw UnexpectedEndOfStreamError
+ const std::string bufSmallNum = readContainer<std::string>(streamIn); //throw SysErrorUnexpectedEos
const std::string bufBigNum = readContainer<std::string>(streamIn); //
auto output = makeSharedRef<InSyncFolder>(InSyncFolder::DIR_STATUS_IN_SYNC);
StreamParser parser(streamVersion,
- decompStream(bufText),
- decompStream(bufSmallNum),
- decompStream(bufBigNum)); //throw FileError
+ decompress(bufText), //
+ decompress(bufSmallNum), //throw SysError
+ decompress(bufBigNum)); //
if (leadStreamLeft)
- parser.recurse<LEFT_SIDE>(output.ref()); //throw UnexpectedEndOfStreamError
+ parser.recurse<LEFT_SIDE>(output.ref()); //throw SysError
else
- parser.recurse<RIGHT_SIDE>(output.ref()); //throw UnexpectedEndOfStreamError
+ parser.recurse<RIGHT_SIDE>(output.ref()); //throw SysError
return output;
}
else
- throw FileError(replaceCpy(_("Database file %x is incompatible."), L"%x", fmtPath(displayFilePathL)),
- L"Unsupported stream format: " + numberTo<std::wstring>(streamVersion));
+ throw SysError(_("Unsupported data format.") + L' ' + replaceCpy(_("Version: %x"), L"%x", numberTo<std::wstring>(streamVersion)));
}
- catch (UnexpectedEndOfStreamError&)
+ catch (const SysError& e)
{
- throw FileError(_("Database file is corrupted:") + L'\n' + fmtPath(displayFilePathL) + L'\n' + fmtPath(displayFilePathR), L"Unexpected end of stream.");
+ throw FileError(replaceCpy(_("Cannot read database file %x."), L"%x", fmtPath(displayFilePathL) + L", " + fmtPath(displayFilePathR)), e.toString());
}
}
@@ -419,17 +410,17 @@ private:
}
template <SelectedSide leadSide>
- void recurse(InSyncFolder& container) //throw UnexpectedEndOfStreamError
+ void recurse(InSyncFolder& container) //throw SysError
{
size_t fileCount = readNumber<uint32_t>(streamInSmallNum_);
while (fileCount-- != 0)
{
- const Zstring itemName = readUtf8(streamInText_);
+ const Zstring itemName = readItemName();
const auto cmpVar = static_cast<CompareVariant>(readNumber<int32_t>(streamInSmallNum_));
const uint64_t fileSize = readNumber<uint64_t>(streamInSmallNum_);
- const InSyncDescrFile dataL = readFileDescr(streamInBigNum_);
- const InSyncDescrFile dataT = readFileDescr(streamInBigNum_);
+ const InSyncDescrFile dataL = readFileDescr();
+ const InSyncDescrFile dataT = readFileDescr();
container.addFile(itemName,
SelectParam<leadSide>::ref(dataL, dataT),
@@ -439,11 +430,11 @@ private:
size_t linkCount = readNumber<uint32_t>(streamInSmallNum_);
while (linkCount-- != 0)
{
- const Zstring itemName = readUtf8(streamInText_);
+ const Zstring itemName = readItemName();
const auto cmpVar = static_cast<CompareVariant>(readNumber<int32_t>(streamInSmallNum_));
- const InSyncDescrLink dataL = readLinkDescr(streamInBigNum_);
- const InSyncDescrLink dataT = readLinkDescr(streamInBigNum_);
+ const InSyncDescrLink dataL = readLinkDescr();
+ const InSyncDescrLink dataT = readLinkDescr();
container.addSymlink(itemName,
SelectParam<leadSide>::ref(dataL, dataT),
@@ -453,7 +444,7 @@ private:
size_t dirCount = readNumber<uint32_t>(streamInSmallNum_);
while (dirCount-- != 0)
{
- const Zstring itemName = readUtf8(streamInText_);
+ const Zstring itemName = readItemName();
const auto status = static_cast<InSyncFolder::InSyncStatus>(readNumber<int32_t>(streamInSmallNum_));
InSyncFolder& dbFolder = container.addFolder(itemName, status);
@@ -461,22 +452,20 @@ private:
}
}
- static Zstring readUtf8(MemoryStreamIn<std::string>& streamIn) { return utfTo<Zstring>(readContainer<std::string>(streamIn)); } //throw UnexpectedEndOfStreamError
- //optional: use null-termination: 5% overall size reduction
- //optional: split into streamInText_/streamInSmallNum_: overall size increase! (why?)
+ Zstring readItemName() { return utfTo<Zstring>(readContainer<std::string>(streamInText_)); } //throw SysErrorUnexpectedEos
- static InSyncDescrFile readFileDescr(MemoryStreamIn<std::string>& streamIn) //throw UnexpectedEndOfStreamError
+ InSyncDescrFile readFileDescr() //throw SysErrorUnexpectedEos
{
//attention: order of function argument evaluation is undefined! So do it one after the other...
- const auto modTime = readNumber<int64_t>(streamIn); //throw UnexpectedEndOfStreamError
- const auto fileId = readContainer<AFS::FileId>(streamIn);
+ const auto modTime = readNumber<int64_t>(streamInBigNum_); //throw SysErrorUnexpectedEos
+ const auto fileId = readContainer<std::string>(streamInBigNum_); //
return InSyncDescrFile(modTime, fileId);
}
- static InSyncDescrLink readLinkDescr(MemoryStreamIn<std::string>& streamIn) //throw UnexpectedEndOfStreamError
+ InSyncDescrLink readLinkDescr() //throw SysErrorUnexpectedEos
{
- const auto modTime = readNumber<int64_t>(streamIn);
+ const auto modTime = readNumber<int64_t>(streamInBigNum_); //throw SysErrorUnexpectedEos
return InSyncDescrLink(modTime);
}
@@ -491,33 +480,35 @@ private:
inputRight_(bufferR),
inputBoth_ (bufferB) {}
- void recurse(InSyncFolder& container) //throw UnexpectedEndOfStreamError
+ void recurse(InSyncFolder& container) //throw SysError
{
size_t fileCount = readNumber<uint32_t>(inputBoth_);
while (fileCount-- != 0)
{
- const Zstring itemName = readUtf8(inputBoth_);
+ const Zstring itemName = utfTo<Zstring>(readContainer<std::string>(inputBoth_));
const auto cmpVar = static_cast<CompareVariant>(readNumber<int32_t>(inputBoth_));
const uint64_t fileSize = readNumber<uint64_t>(inputBoth_);
- const InSyncDescrFile dataL = readFileDescr(inputLeft_);
- const InSyncDescrFile dataR = readFileDescr(inputRight_);
- container.addFile(itemName, dataL, dataR, cmpVar, fileSize);
+ const auto modTimeL = readNumber<int64_t>(inputLeft_);
+ const auto fileIdL = readContainer<std::string>(inputLeft_);
+ const auto modTimeR = readNumber<int64_t>(inputRight_);
+ const auto fileIdR = readContainer<std::string>(inputRight_);
+ container.addFile(itemName, InSyncDescrFile(modTimeL, fileIdL), InSyncDescrFile(modTimeR, fileIdR), cmpVar, fileSize);
}
size_t linkCount = readNumber<uint32_t>(inputBoth_);
while (linkCount-- != 0)
{
- const Zstring itemName = readUtf8(inputBoth_);
+ const Zstring itemName = utfTo<Zstring>(readContainer<std::string>(inputBoth_));
const auto cmpVar = static_cast<CompareVariant>(readNumber<int32_t>(inputBoth_));
- InSyncDescrLink dataL = readLinkDescr(inputLeft_);
- InSyncDescrLink dataR = readLinkDescr(inputRight_);
- container.addSymlink(itemName, dataL, dataR, cmpVar);
+ const auto modTimeL = readNumber<int64_t>(inputLeft_);
+ const auto modTimeR = readNumber<int64_t>(inputRight_);
+ container.addSymlink(itemName, InSyncDescrLink(modTimeL), InSyncDescrLink(modTimeR), cmpVar);
}
size_t dirCount = readNumber<uint32_t>(inputBoth_);
while (dirCount-- != 0)
{
- const Zstring itemName = readUtf8(inputBoth_);
+ const Zstring itemName = utfTo<Zstring>(readContainer<std::string>(inputBoth_));
const auto status = static_cast<InSyncFolder::InSyncStatus>(readNumber<int32_t>(inputBoth_));
InSyncFolder& dbFolder = container.addFolder(itemName, status);
@@ -541,12 +532,10 @@ private:
class LastSynchronousStateUpdater
{
- /*
- 1. filter by file name does *not* create a new hierarchy, but merely gives a different *view* on the existing file hierarchy
- => only update database entries matching this view!
- 2. Symlink handling *does* create a new (asymmetric) hierarchy during comparison
- => update all database entries!
- */
+ /* 1. filter by file name does *not* create a new hierarchy, but merely gives a different *view* on the existing file hierarchy
+ => only update database entries matching this view!
+ 2. Symlink handling *does* create a new (asymmetric) hierarchy during comparison
+ => update all database entries! */
public:
static void execute(const BaseFolderPair& baseFolder, InSyncFolder& dbFolder)
{
@@ -751,8 +740,8 @@ std::pair<DbStreams::const_iterator,
if (itL->second.isLeadStream != itR->second.isLeadStream)
{
if (itCommonL != streamsLeft.end()) //should not be possible!
- throw FileError(_("Database file is corrupted:") + L'\n' + fmtPath(displayFilePathL) + L'\n' + fmtPath(displayFilePathR),
- L"Multiple common sessions found.");
+ throw FileError(replaceCpy(_("Cannot read database file %x."), L"%x", fmtPath(displayFilePathL) + L", " + fmtPath(displayFilePathR)),
+ _("File content is corrupted.") + L" (multiple common sessions found)");
itCommonL = itL;
itCommonR = itR;
}
@@ -798,12 +787,12 @@ std::unordered_map<const BaseFolderPair*, SharedRef<const InSyncFolder>> fff::lo
dbStreamsByPathShared.access([&](auto& dbStreamsByPath2) { dbStreamsByPath2.emplace(ctx.itemPath, std::move(dbStreams)); });
}
- catch (FileErrorDatabaseNotExisting&) {}
+ catch (const FileErrorDatabaseNotExisting&) {} //redundant info => no reportInfo()
}, ctx.acb);
});
massParallelExecute(parallelWorkload,
- "Load sync.ffs_db:", callback /*throw X*/); //throw X
+ "Load sync.ffs_db", callback /*throw X*/); //throw X
}
//----------------------------------------------------------------
@@ -821,12 +810,11 @@ std::unordered_map<const BaseFolderPair*, SharedRef<const InSyncFolder>> fff::lo
if (itL != dbStreamsByPath.end() &&
itR != dbStreamsByPath.end())
- {
- const DbStreams& streamsL = itL->second;
- const DbStreams& streamsR = itR->second;
-
- tryReportingError([&] //throw X
+ try
{
+ const DbStreams& streamsL = itL->second;
+ const DbStreams& streamsR = itR->second;
+
//find associated session: there can be at most one session within intersection of left and right IDs
const auto [itStreamL, itStreamR] = findCommonSession(streamsL, streamsR,
AFS::getDisplayPath(dbPathL),
@@ -841,8 +829,8 @@ std::unordered_map<const BaseFolderPair*, SharedRef<const InSyncFolder>> fff::lo
AFS::getDisplayPath(dbPathR)); //throw FileError
output.emplace(baseFolder, lastSyncState);
}
- }, callback /*throw X*/);
- }
+ }
+ catch (const FileError& e) { callback.reportFatalError(e.toString()); } //throw X
}
return output;
@@ -859,26 +847,35 @@ void fff::saveLastSynchronousState(const BaseFolderPair& baseFolder, bool transa
DbStreams streamsL; //list of session ID + DirInfo-stream
DbStreams streamsR; //
{
+ bool loadSuccessL = false;
+ bool loadSuccessR = false;
std::vector<std::pair<AbstractPath, ParallelWorkItem>> parallelWorkload;
- for (const auto& [dbPath, streamsOut] :
+ for (const auto& [dbPath, streamsOut, loadSuccess] :
{
- std::pair(dbPathL, &streamsL),
- std::pair(dbPathR, &streamsR)
+ std::tuple(dbPathL, &streamsL, &loadSuccessL),
+ std::tuple(dbPathR, &streamsR, &loadSuccessR)
})
- parallelWorkload.emplace_back(dbPath, [streamsOut /*clang bug*/= streamsOut](ParallelContext& ctx) //throw ThreadInterruption
+ parallelWorkload.emplace_back(dbPath, [&streamsOut = *streamsOut, &loadSuccess = *loadSuccess](ParallelContext& ctx) //throw ThreadInterruption
{
StreamStatusNotifier notifyLoad(replaceCpy(_("Loading file %x..."), L"%x", fmtPath(AFS::getDisplayPath(ctx.itemPath))), ctx.acb);
- tryReportingError([&] //throw ThreadInterruption
+ const std::wstring errMsg = tryReportingError([&] //throw ThreadInterruption
{
- try { *streamsOut = ::loadStreams(ctx.itemPath, notifyLoad); } //throw FileError, FileErrorDatabaseNotExisting, ThreadInterruption
+ try { streamsOut = ::loadStreams(ctx.itemPath, notifyLoad); } //throw FileError, FileErrorDatabaseNotExisting, ThreadInterruption
catch (FileErrorDatabaseNotExisting&) {}
}, ctx.acb);
+ loadSuccess = errMsg.empty();
});
massParallelExecute(parallelWorkload,
- "Load sync.ffs_db:", callback /*throw X*/); //throw X
+ "Load sync.ffs_db", callback /*throw X*/); //throw X
+
+ if (!loadSuccessL || !loadSuccessR)
+ return; /* don't continue when one of the two files failed to load (e.g. network drop):
+ no common session would be found, (although it may exist!) =>
+ a) if file also fails to save: new orphan session in the other file created
+ b) if file saves successfully: previous stream sessions lost + old session in other file not cleaned up (orphan) */
}
//----------------------------------------------------------------
@@ -889,9 +886,9 @@ void fff::saveLastSynchronousState(const BaseFolderPair& baseFolder, bool transa
try
{
//find associated session: there can be at most one session within intersection of left and right IDs
- std::tie(itStreamOldL, itStreamOldR) = findCommonSession(streamsL, streamsR, //throw FileError
+ std::tie(itStreamOldL, itStreamOldR) = findCommonSession(streamsL, streamsR,
AFS::getDisplayPath(dbPathL),
- AFS::getDisplayPath(dbPathR));
+ AFS::getDisplayPath(dbPathR)); //throw FileError
if (itStreamOldL != streamsL.end())
lastSyncState = std::move(StreamParser::execute(itStreamOldL->second.isLeadStream /*leadStreamLeft*/,
itStreamOldL->second.rawStream,
@@ -899,8 +896,8 @@ void fff::saveLastSynchronousState(const BaseFolderPair& baseFolder, bool transa
AFS::getDisplayPath(dbPathL),
AFS::getDisplayPath(dbPathR)).ref()); //throw FileError
}
- catch (const FileError& e) { callback.reportInfo(e.toString()); } //throw X
- //if error occurs: just overwrite old file! User is already informed about errors right after comparing!
+ catch (const FileError& e) { callback.reportFatalError(e.toString()); } //throw X
+ //if database files are corrupted: just overwrite! User is already informed about errors right after comparing!
//update last synchrounous state
LastSynchronousStateUpdater::execute(baseFolder, lastSyncState);
@@ -947,7 +944,7 @@ void fff::saveLastSynchronousState(const BaseFolderPair& baseFolder, bool transa
std::pair(dbPathL, &streamsL),
std::pair(dbPathR, &streamsR)
})
- parallelWorkload.emplace_back(dbPath, [streams /*clang bug*/= streams, transactionalCopy](ParallelContext& ctx) //throw ThreadInterruption
+ parallelWorkload.emplace_back(dbPath, [&streams = *streams, transactionalCopy](ParallelContext& ctx) //throw ThreadInterruption
{
tryReportingError([&] //throw ThreadInterruption
{
@@ -959,7 +956,7 @@ void fff::saveLastSynchronousState(const BaseFolderPair& baseFolder, bool transa
const Zstring shortGuid = printNumber<Zstring>(Zstr("%04x"), static_cast<unsigned int>(getCrc16(generateGUID())));
const AbstractPath dbPathTmp = AFS::appendRelPath(*AFS::getParentPath(ctx.itemPath), AFS::getItemName(ctx.itemPath) + Zstr('.') + shortGuid + AFS::TEMP_FILE_ENDING);
- saveStreams(*streams, dbPathTmp, notifySave); //throw FileError, ThreadInterruption
+ saveStreams(streams, dbPathTmp, notifySave); //throw FileError, ThreadInterruption
ZEN_ON_SCOPE_FAIL(try { AFS::removeFilePlain(dbPathTmp); }
catch (FileError&) {});
@@ -970,14 +967,14 @@ void fff::saveLastSynchronousState(const BaseFolderPair& baseFolder, bool transa
}
else //some MTP devices don't even allow renaming files: https://freefilesync.org/forum/viewtopic.php?t=6531
{
- AFS::removeFileIfExists(ctx.itemPath); //throw FileError
- saveStreams(*streams, ctx.itemPath, notifySave); //throw FileError, ThreadInterruption
+ AFS::removeFileIfExists(ctx.itemPath); //throw FileError
+ saveStreams(streams, ctx.itemPath, notifySave); //throw FileError, ThreadInterruption
}
}, ctx.acb);
});
massParallelExecute(parallelWorkload,
- "Save sync.ffs_db:", callback /*throw X*/); //throw X
+ "Save sync.ffs_db", callback /*throw X*/); //throw X
}
//----------------------------------------------------------------
}
diff --git a/FreeFileSync/Source/base/dir_lock.cpp b/FreeFileSync/Source/base/dir_lock.cpp
index 1d087955..4a53c2de 100644
--- a/FreeFileSync/Source/base/dir_lock.cpp
+++ b/FreeFileSync/Source/base/dir_lock.cpp
@@ -15,8 +15,7 @@
#include <zen/file_io.h>
#include <zen/system.h>
- #include <fcntl.h> //open()
- //#include <sys/stat.h> //
+ #include <fcntl.h> //open()
#include <unistd.h> //close()
#include <signal.h> //kill()
@@ -187,41 +186,38 @@ std::string serialize(const LockInformation& lockInfo)
}
-LockInformation unserialize(const std::string& byteStream) //throw UnexpectedEndOfStreamError
+LockInformation unserialize(const std::string& byteStream) //throw SysError
{
MemoryStreamIn streamIn(byteStream);
char formatDescr[sizeof(LOCK_FILE_DESCR)] = {};
- readArray(streamIn, &formatDescr, sizeof(formatDescr)); //throw UnexpectedEndOfStreamError
+ readArray(streamIn, &formatDescr, sizeof(formatDescr)); //throw SysErrorUnexpectedEos
if (!std::equal(std::begin(formatDescr), std::end(formatDescr), std::begin(LOCK_FILE_DESCR)))
- throw UnexpectedEndOfStreamError(); //well, not really...!?
+ throw SysError(_("File content is corrupted.") + L" (invalid header)");
- const int version = readNumber<int32_t>(streamIn); //throw UnexpectedEndOfStreamError
- if (version != 2 && //TODO: remove migration code at some time! v2 used until 2020-02-07
- version != LOCK_FILE_VERSION)
- throw UnexpectedEndOfStreamError(); //well, not really...!?
+ const int version = readNumber<int32_t>(streamIn); //throw SysErrorUnexpectedEos
+ if (version != LOCK_FILE_VERSION)
+ throw SysError(_("Unsupported data format.") + L' ' + replaceCpy(_("Version: %x"), L"%x", numberTo<std::wstring>(version)));
- if (version == 2) //TODO: remove migration code at some time! v2 used until 2020-02-07
- ;
- else //catch data corruption ASAP + don't rely on std::bad_alloc for consistency checking
- {
- const size_t posEnd = byteStream.rfind('x'); //skip blanks (+ unrelated corrupted data e.g. nulls!)
- if (posEnd == std::string::npos)
- throw UnexpectedEndOfStreamError(); //well, not really...!?
+ //--------------------------------------------------------------------
+ //catch data corruption ASAP + don't rely on std::bad_alloc for consistency checking
+ const size_t posEnd = byteStream.rfind('x'); //skip blanks (+ unrelated corrupted data e.g. nulls!)
+ if (posEnd == std::string::npos)
+ throw SysErrorUnexpectedEos();
- const std::string_view byteStreamTrm = makeStringView(byteStream.begin(), posEnd);
+ const std::string_view byteStreamTrm = makeStringView(byteStream.begin(), posEnd);
- MemoryStreamOut<std::string> crcStreamOut;
- writeNumber<uint32_t>(crcStreamOut, getCrc32(byteStreamTrm.begin(), byteStreamTrm.end() - sizeof(uint32_t)));
+ MemoryStreamOut<std::string> crcStreamOut;
+ writeNumber<uint32_t>(crcStreamOut, getCrc32(byteStreamTrm.begin(), byteStreamTrm.end() - sizeof(uint32_t)));
- if (!endsWith(byteStreamTrm, crcStreamOut.ref()))
- throw UnexpectedEndOfStreamError(); //well, not really...!?
- }
+ if (!endsWith(byteStreamTrm, crcStreamOut.ref()))
+ throw SysError(_("File content is corrupted.") + L" (invalid checksum)");
+ //--------------------------------------------------------------------
LockInformation lockInfo = {};
lockInfo.lockId = readContainer<std::string>(streamIn); //
- lockInfo.computerName = readContainer<std::string>(streamIn); //UnexpectedEndOfStreamError
+ lockInfo.computerName = readContainer<std::string>(streamIn); //SysErrorUnexpectedEos
lockInfo.userId = readContainer<std::string>(streamIn); //
lockInfo.sessionId = static_cast<SessionId>(readNumber<uint64_t>(streamIn)); //[!] conversion
lockInfo.processId = static_cast<ProcessId>(readNumber<uint64_t>(streamIn)); //[!] conversion
@@ -234,11 +230,11 @@ LockInformation retrieveLockInfo(const Zstring& lockFilePath) //throw FileError
const std::string byteStream = loadBinContainer<std::string>(lockFilePath, nullptr /*notifyUnbufferedIO*/); //throw FileError
try
{
- return unserialize(byteStream); //throw UnexpectedEndOfStreamError
+ return unserialize(byteStream); //throw SysError
}
- catch (UnexpectedEndOfStreamError&)
+ catch (const SysError& e)
{
- throw FileError(replaceCpy(_("Consistency check failed for %x."), L"%x", fmtPath(lockFilePath)), L"Unexpected end of stream.");
+ throw FileError(replaceCpy(_("Cannot read file %x."), L"%x", fmtPath(lockFilePath)), e.toString());
}
}
diff --git a/FreeFileSync/Source/base/file_hierarchy.cpp b/FreeFileSync/Source/base/file_hierarchy.cpp
index debaa031..651d0651 100644
--- a/FreeFileSync/Source/base/file_hierarchy.cpp
+++ b/FreeFileSync/Source/base/file_hierarchy.cpp
@@ -27,7 +27,7 @@ std::wstring fff::getShortDisplayNameForFolderPair(const AbstractPath& itemPathL
const Zstring itemNameL = AFS::getItemName(tmpPathL);
const Zstring itemNameR = AFS::getItemName(tmpPathR);
- if (!equalNoCase(itemNameL, itemNameR)) //let's compare case-insensitively even on Linux!
+ if (!equalNoCase(itemNameL, itemNameR)) //let's compare case-insensitively (even on Linux!)
break;
tmpPathL = *parentPathL;
@@ -90,10 +90,10 @@ SyncOperation getIsolatedSyncOperation(bool itemExistsLeft,
assert(( itemExistsLeft && itemExistsRight && cmpResult != FILE_LEFT_SIDE_ONLY && cmpResult != FILE_RIGHT_SIDE_ONLY) ||
( itemExistsLeft && !itemExistsRight && cmpResult == FILE_LEFT_SIDE_ONLY ) ||
(!itemExistsLeft && itemExistsRight && cmpResult == FILE_RIGHT_SIDE_ONLY) ||
- (!itemExistsLeft && !itemExistsRight && cmpResult == FILE_EQUAL && syncDir == SyncDirection::NONE && !hasDirectionConflict) ||
+ (!itemExistsLeft && !itemExistsRight && cmpResult == FILE_EQUAL && syncDir == SyncDirection::none && !hasDirectionConflict) ||
cmpResult == FILE_CONFLICT);
- assert(!hasDirectionConflict || syncDir == SyncDirection::NONE);
+ assert(!hasDirectionConflict || syncDir == SyncDirection::none);
if (!selectedForSync)
return cmpResult == FILE_EQUAL ?
@@ -103,17 +103,17 @@ SyncOperation getIsolatedSyncOperation(bool itemExistsLeft,
switch (cmpResult)
{
case FILE_EQUAL:
- assert(syncDir == SyncDirection::NONE);
+ assert(syncDir == SyncDirection::none);
return SO_EQUAL;
case FILE_LEFT_SIDE_ONLY:
switch (syncDir)
{
- case SyncDirection::LEFT:
+ case SyncDirection::left:
return SO_DELETE_LEFT; //delete files on left
- case SyncDirection::RIGHT:
+ case SyncDirection::right:
return SO_CREATE_NEW_RIGHT; //copy files to right
- case SyncDirection::NONE:
+ case SyncDirection::none:
return hasDirectionConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING;
}
break;
@@ -121,11 +121,11 @@ SyncOperation getIsolatedSyncOperation(bool itemExistsLeft,
case FILE_RIGHT_SIDE_ONLY:
switch (syncDir)
{
- case SyncDirection::LEFT:
+ case SyncDirection::left:
return SO_CREATE_NEW_LEFT; //copy files to left
- case SyncDirection::RIGHT:
+ case SyncDirection::right:
return SO_DELETE_RIGHT; //delete files on right
- case SyncDirection::NONE:
+ case SyncDirection::none:
return hasDirectionConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING;
}
break;
@@ -135,11 +135,11 @@ SyncOperation getIsolatedSyncOperation(bool itemExistsLeft,
case FILE_DIFFERENT_CONTENT:
switch (syncDir)
{
- case SyncDirection::LEFT:
+ case SyncDirection::left:
return SO_OVERWRITE_LEFT; //copy from right to left
- case SyncDirection::RIGHT:
+ case SyncDirection::right:
return SO_OVERWRITE_RIGHT; //copy from left to right
- case SyncDirection::NONE:
+ case SyncDirection::none:
return hasDirectionConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING;
}
break;
@@ -147,11 +147,11 @@ SyncOperation getIsolatedSyncOperation(bool itemExistsLeft,
case FILE_DIFFERENT_METADATA:
switch (syncDir)
{
- case SyncDirection::LEFT:
+ case SyncDirection::left:
return SO_COPY_METADATA_TO_LEFT;
- case SyncDirection::RIGHT:
+ case SyncDirection::right:
return SO_COPY_METADATA_TO_RIGHT;
- case SyncDirection::NONE:
+ case SyncDirection::none:
return hasDirectionConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING;
}
break;
@@ -159,11 +159,11 @@ SyncOperation getIsolatedSyncOperation(bool itemExistsLeft,
case FILE_CONFLICT:
switch (syncDir)
{
- case SyncDirection::LEFT:
+ case SyncDirection::left:
return itemExistsLeft && itemExistsRight ? SO_OVERWRITE_LEFT : itemExistsLeft ? SO_DELETE_LEFT: SO_CREATE_NEW_LEFT;
- case SyncDirection::RIGHT:
+ case SyncDirection::right:
return itemExistsLeft && itemExistsRight ? SO_OVERWRITE_RIGHT : itemExistsLeft ? SO_CREATE_NEW_RIGHT : SO_DELETE_RIGHT;
- case SyncDirection::NONE:
+ case SyncDirection::none:
return hasDirectionConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING;
}
break;
diff --git a/FreeFileSync/Source/base/file_hierarchy.h b/FreeFileSync/Source/base/file_hierarchy.h
index 5032aa75..2cd9bd78 100644
--- a/FreeFileSync/Source/base/file_hierarchy.h
+++ b/FreeFileSync/Source/base/file_hierarchy.h
@@ -430,7 +430,7 @@ public:
//sync settings
SyncDirection getSyncDir() const { return syncDir_; }
void setSyncDir(SyncDirection newDir);
- void setSyncDirConflict(const Zstringc& description); //set syncDir = SyncDirection::NONE + fill conflict description
+ void setSyncDirConflict(const Zstringc& description); //set syncDir = SyncDirection::none + fill conflict description
bool isActive() const { return selectedForSync_; }
void setActive(bool active);
@@ -495,7 +495,7 @@ private:
bool selectedForSync_ = true;
//Note: we model *four* states with following two variables => "syncDirectionConflict is empty or syncDir == NONE" is a class invariant!!!
- SyncDirection syncDir_ = SyncDirection::NONE; //1 byte: optimize memory layout!
+ SyncDirection syncDir_ = SyncDirection::none; //1 byte: optimize memory layout!
Zstringc syncDirectionConflict_; //non-empty if we have a conflict setting sync-direction
//conserve memory (avoid std::string SSO overhead + allow ref-counting!)
@@ -745,7 +745,7 @@ inline
void FileSystemObject::setSyncDirConflict(const Zstringc& description)
{
assert(!description.empty());
- syncDir_ = SyncDirection::NONE;
+ syncDir_ = SyncDirection::none;
syncDirectionConflict_ = description;
notifySyncCfgChanged();
@@ -810,7 +810,7 @@ void FileSystemObject::removeObject<LEFT_SIDE>()
itemNameL_.clear();
removeObjectL();
- setSyncDir(SyncDirection::NONE); //calls notifySyncCfgChanged()
+ setSyncDir(SyncDirection::none); //calls notifySyncCfgChanged()
propagateChangedItemName<LEFT_SIDE>(itemNameOld);
}
@@ -824,7 +824,7 @@ void FileSystemObject::removeObject<RIGHT_SIDE>()
itemNameR_.clear();
removeObjectR();
- setSyncDir(SyncDirection::NONE); //calls notifySyncCfgChanged()
+ setSyncDir(SyncDirection::none); //calls notifySyncCfgChanged()
propagateChangedItemName<RIGHT_SIDE>(itemNameOld);
}
@@ -838,7 +838,7 @@ void FileSystemObject::setSynced(const Zstring& itemName)
assert(!isPairEmpty());
itemNameR_ = itemNameL_ = itemName;
cmpResult_ = FILE_EQUAL;
- setSyncDir(SyncDirection::NONE);
+ setSyncDir(SyncDirection::none);
propagateChangedItemName< LEFT_SIDE>(itemNameOldL);
propagateChangedItemName<RIGHT_SIDE>(itemNameOldR);
diff --git a/FreeFileSync/Source/base/icon_loader.cpp b/FreeFileSync/Source/base/icon_loader.cpp
index bd8dcc14..41b5aa0b 100644
--- a/FreeFileSync/Source/base/icon_loader.cpp
+++ b/FreeFileSync/Source/base/icon_loader.cpp
@@ -6,10 +6,12 @@
#include "icon_loader.h"
#include <zen/scope_guard.h>
+#include <zen/thread.h> //includes <std/thread.hpp>
#include <gtk/gtk.h>
#include <sys/stat.h>
#include <zen/sys_error.h>
+ #include <xBRZ/src/xbrz_tools.h>
using namespace zen;
@@ -18,215 +20,243 @@ using namespace fff;
namespace
{
-static_assert(GTK_MAJOR_VERSION == 2, "FreeFileSync does NOT (currently) support GTK3! The GTK calls below will lead to crashes due to not being thread-safe on GTK3.");
-//gdk_threads_enter(); + ZEN_ON_SCOPE_EXIT(::gdk_threads_leave); is NOT enough; e.g. GTK3 + openSuse still crashes with:
-// Gtk:ERROR:gtkicontheme.c:4026:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
-//GTK icon theme internals: https://github.com/GNOME/gtk/blob/master/gtk/gtkicontheme.c
-//Alternative: https://developer.gnome.org/gtk3/stable/GtkIconTheme.html#gtk-icon-info-load-icon-async
-//GTK2 OTOH crashes only extremely rarely, still this must be fixed
-
-
-ImageHolder copyToImageHolder(const GdkPixbuf* pixBuf)
+ImageHolder copyToImageHolder(const GdkPixbuf& pixBuf, int maxSize) //throw SysError
{
//see: https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-The-GdkPixbuf-Structure.html
- if (pixBuf &&
- ::gdk_pixbuf_get_colorspace(pixBuf) == GDK_COLORSPACE_RGB &&
- ::gdk_pixbuf_get_bits_per_sample(pixBuf) == 8)
+ if (const GdkColorspace cs = ::gdk_pixbuf_get_colorspace(&pixBuf);
+ cs != GDK_COLORSPACE_RGB)
+ throw SysError(formatSystemError("gdk_pixbuf_get_colorspace", L"", L"Unexpected color space: " + numberTo<std::wstring>(static_cast<int>(cs))));
+
+ if (const int bitCount = ::gdk_pixbuf_get_bits_per_sample(&pixBuf);
+ bitCount != 8)
+ throw SysError(formatSystemError("gdk_pixbuf_get_bits_per_sample", L"", L"Unexpected bits per sample: " + numberTo<std::wstring>(bitCount)));
+
+ const int channels = ::gdk_pixbuf_get_n_channels(&pixBuf);
+ if (channels != 3 && channels != 4)
+ throw SysError(formatSystemError("gdk_pixbuf_get_n_channels", L"", L"Unexpected number of channels: " + numberTo<std::wstring>(channels)));
+
+ const bool withAlpha = channels == 4;
+ assert(::gdk_pixbuf_get_has_alpha(&pixBuf) == withAlpha);
+
+ const unsigned char* srcBytes = ::gdk_pixbuf_read_pixels(&pixBuf);
+ const int srcWidth = ::gdk_pixbuf_get_width (&pixBuf);
+ const int srcHeight = ::gdk_pixbuf_get_height(&pixBuf);
+ const int srcStride = ::gdk_pixbuf_get_rowstride(&pixBuf);
+
+ //don't stretch small images, shrink large ones only!
+ int targetWidth = srcWidth;
+ int targetHeight = srcHeight;
+
+ const int maxExtent = std::max(targetWidth, targetHeight);
+ if (maxSize < maxExtent)
{
- const int channels = ::gdk_pixbuf_get_n_channels(pixBuf);
- if (channels == 3 || channels == 4)
- {
- const int stride = ::gdk_pixbuf_get_rowstride(pixBuf);
- const unsigned char* rgbaSrc = ::gdk_pixbuf_get_pixels(pixBuf);
-
- if (channels == 3)
- {
- assert(!::gdk_pixbuf_get_has_alpha(pixBuf));
-
- ImageHolder out(::gdk_pixbuf_get_width(pixBuf), ::gdk_pixbuf_get_height(pixBuf), false /*withAlpha*/);
- unsigned char* rgbTrg = out.getRgb();
-
- for (int y = 0; y < out.getHeight(); ++y)
- {
- const unsigned char* srcLine = rgbaSrc + y * stride;
- for (int x = 0; x < out.getWidth(); ++x)
- {
- *rgbTrg++ = *srcLine++;
- *rgbTrg++ = *srcLine++;
- *rgbTrg++ = *srcLine++;
- }
- }
- return out;
- }
- else if (channels == 4)
- {
- assert(::gdk_pixbuf_get_has_alpha(pixBuf));
-
- ImageHolder out(::gdk_pixbuf_get_width(pixBuf), ::gdk_pixbuf_get_height(pixBuf), true /*withAlpha*/);
- unsigned char* rgbTrg = out.getRgb();
- unsigned char* alphaTrg = out.getAlpha();
-
- for (int y = 0; y < out.getHeight(); ++y)
- {
- const unsigned char* srcLine = rgbaSrc + y * stride;
- for (int x = 0; x < out.getWidth(); ++x)
- {
- *rgbTrg++ = *srcLine++;
- *rgbTrg++ = *srcLine++;
- *rgbTrg++ = *srcLine++;
- *alphaTrg++ = *srcLine++;
- }
- }
- return out;
- }
- }
+ targetWidth = targetWidth * maxSize / maxExtent;
+ targetHeight = targetHeight * maxSize / maxExtent;
+
+#if 0 //alternative to xbrz::bilinearScale()
+ GdkPixbuf* pixBufShrinked = ::gdk_pixbuf_scale_simple(pixBuf, //const GdkPixbuf* src,
+ targetWidth, //int dest_width,
+ targetHeight, //int dest_height,
+ GDK_INTERP_BILINEAR); //GdkInterpType interp_type
+ if (!pixBufShrinked)
+ throw SysError(formatSystemError("gdk_pixbuf_scale_simple", L"", L"Not enough memory."));
+ ZEN_ON_SCOPE_EXIT(::g_object_unref(pixBufShrinked));
+#endif
}
- return ImageHolder();
+
+ const auto imgReader = [srcBytes, srcStride, channels](int x, int y, xbrz::BytePixel& pix)
+ {
+ std::memcpy(pix, srcBytes + y * srcStride + channels * x, channels);
+ };
+
+ ImageHolder imgOut(targetWidth, targetHeight, withAlpha);
+
+ const auto imgWriter = [rgbPtr = imgOut.getRgb(), alphaPtr = imgOut.getAlpha()](const xbrz::BytePixel& pix) mutable
+ {
+ *rgbPtr++ = pix[0]; //r
+ *rgbPtr++ = pix[1]; //g
+ *rgbPtr++ = pix[2]; //b
+ if (alphaPtr)
+ * alphaPtr++ = pix[3]; //a
+ };
+
+ if (srcWidth == targetWidth &&
+ srcHeight == targetHeight)
+ xbrz::unscaledCopy(imgReader, imgWriter, srcWidth, srcHeight); //perf: going overboard?
+ else
+ xbrz::bilinearScale(imgReader, //PixReader srcReader,
+ srcWidth, //int srcWidth,
+ srcHeight, //int srcHeight,
+ imgWriter, //PixWriter trgWriter
+ targetWidth, //int trgWidth,
+ targetHeight, //int trgHeight,
+ 0, //int yFirst,
+ targetHeight); //int yLast,
+ return imgOut;
}
-ImageHolder imageHolderFromGicon(GIcon* gicon, int pixelSize)
+ImageHolder imageHolderFromGicon(GIcon& gicon, int maxSize) //throw SysError
{
- if (gicon)
- if (GtkIconTheme* defaultTheme = ::gtk_icon_theme_get_default()) //not owned!
- if (GtkIconInfo* iconInfo = ::gtk_icon_theme_lookup_by_gicon(defaultTheme, gicon, pixelSize, GTK_ICON_LOOKUP_USE_BUILTIN)) //this may fail if icon is not installed on system
- {
+ assert(runningMainThread()); //GTK is NOT thread safe!!!
+ assert(!G_IS_FILE_ICON(&gicon) && !G_IS_LOADABLE_ICON(&gicon)); //see comment in image_holder.h => icon loading must not block main thread
+
+ GtkIconTheme* const defaultTheme = ::gtk_icon_theme_get_default(); //not owned!
+ if (!defaultTheme)
+ throw SysError(formatSystemError("gtk_icon_theme_get_default", L"", L"Unknown error."));
+
+ GtkIconInfo* const iconInfo = ::gtk_icon_theme_lookup_by_gicon(defaultTheme, &gicon, maxSize, GTK_ICON_LOOKUP_USE_BUILTIN);
+ if (!iconInfo)
+ throw SysError(formatSystemError("gtk_icon_theme_lookup_by_gicon", L"", L"Icon not available."));
#if GTK_MAJOR_VERSION == 2
- ZEN_ON_SCOPE_EXIT(::gtk_icon_info_free(iconInfo));
+ ZEN_ON_SCOPE_EXIT(::gtk_icon_info_free(iconInfo));
#elif GTK_MAJOR_VERSION == 3
- ZEN_ON_SCOPE_EXIT(::g_object_unref(iconInfo));
+ ZEN_ON_SCOPE_EXIT(::g_object_unref(iconInfo));
#else
#error unknown GTK version!
#endif
- if (GdkPixbuf* pixBuf = ::gtk_icon_info_load_icon(iconInfo, nullptr /*error*/))
- {
- ZEN_ON_SCOPE_EXIT(::g_object_unref(pixBuf));
-
- //we might have to shrink the image (e.g. GTK3, openSUSE): "an icon theme may have icons that differ slightly from their nominal sizes"
- const int width = ::gdk_pixbuf_get_width (pixBuf);
- const int height = ::gdk_pixbuf_get_height(pixBuf);
-
- const int maxExtent = std::max(width, height);
- if (pixelSize < maxExtent)
- {
- GdkPixbuf* pixBufShrinked = ::gdk_pixbuf_scale_simple(pixBuf, //const GdkPixbuf* src,
- width * pixelSize / maxExtent, //int dest_width,
- height * pixelSize / maxExtent, //int dest_height,
- GDK_INTERP_BILINEAR); //GdkInterpType interp_type
- if (!pixBufShrinked)
- return ImageHolder();
- ZEN_ON_SCOPE_EXIT(::g_object_unref(pixBufShrinked));
-
- return copyToImageHolder(pixBufShrinked);
- }
- else
- return copyToImageHolder(pixBuf);
- }
- }
- return ImageHolder();
+ GError* error = nullptr;
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
+
+ GdkPixbuf* const pixBuf = ::gtk_icon_info_load_icon(iconInfo, &error);
+ if (!pixBuf)
+ throw SysError(formatSystemError("gtk_icon_info_load_icon",
+ error ? replaceCpy(_("Error code %x"), L"%x", numberTo<std::wstring>(error->code)) : L"",
+ error ? utfTo<std::wstring>(error->message) : L"Icon not available.."));
+ ZEN_ON_SCOPE_EXIT(::g_object_unref(pixBuf));
+
+ //we may have to shrink (e.g. GTK3, openSUSE): "an icon theme may have icons that differ slightly from their nominal sizes"
+ return copyToImageHolder(*pixBuf, maxSize); //throw SysError
}
}
-ImageHolder fff::getIconByTemplatePath(const Zstring& templatePath, int pixelSize)
+FileIconHolder fff::getIconByTemplatePath(const Zstring& templatePath, int maxSize) //throw SysError
{
//uses full file name, e.g. "AUTHORS" has own mime type on Linux:
- if (gchar* contentType = ::g_content_type_guess(templatePath.c_str(), //const gchar* filename,
- nullptr, //const guchar* data,
- 0, //gsize data_size,
- nullptr)) //gboolean* result_uncertain
- {
- ZEN_ON_SCOPE_EXIT(::g_free(contentType));
- if (GIcon* dirIcon = ::g_content_type_get_icon(contentType))
- {
- ZEN_ON_SCOPE_EXIT(::g_object_unref(dirIcon));
- return imageHolderFromGicon(dirIcon, pixelSize);
- }
- }
- return ImageHolder();
+ gchar* const contentType = ::g_content_type_guess(templatePath.c_str(), //const gchar* filename,
+ nullptr, //const guchar* data,
+ 0, //gsize data_size,
+ nullptr); //gboolean* result_uncertain
+ if (!contentType)
+ throw SysError(formatSystemError("g_content_type_guess", L"", L"Unknown error."));
+ ZEN_ON_SCOPE_EXIT(::g_free(contentType));
+
+ GIcon* const fileIcon = ::g_content_type_get_icon(contentType);
+ if (!fileIcon)
+ throw SysError(formatSystemError("g_content_type_get_icon", L"", L"Unknown error."));
+
+ return FileIconHolder(fileIcon /*pass ownership*/, maxSize);
}
-ImageHolder fff::genericFileIcon(int pixelSize)
+FileIconHolder fff::genericFileIcon(int maxSize) //throw SysError
{
//we're called by getDisplayIcon()! -> avoid endless recursion!
- if (GIcon* fileIcon = ::g_content_type_get_icon("text/plain"))
- {
- ZEN_ON_SCOPE_EXIT(::g_object_unref(fileIcon));
- return imageHolderFromGicon(fileIcon, pixelSize);
- }
- return ImageHolder();
+ GIcon* const fileIcon = ::g_content_type_get_icon("text/plain");
+ if (!fileIcon)
+ throw SysError(formatSystemError("g_content_type_get_icon", L"", L"Unknown error."));
+
+ return FileIconHolder(fileIcon /*pass ownership*/, maxSize);
}
-ImageHolder fff::genericDirIcon(int pixelSize)
+FileIconHolder fff::genericDirIcon(int maxSize) //throw SysError
{
- if (GIcon* dirIcon = ::g_content_type_get_icon("inode/directory")) //should contain fallback to GTK_STOCK_DIRECTORY ("gtk-directory")
- {
- ZEN_ON_SCOPE_EXIT(::g_object_unref(dirIcon));
- return imageHolderFromGicon(dirIcon, pixelSize);
- }
- return ImageHolder();
+ GIcon* const dirIcon = ::g_content_type_get_icon("inode/directory"); //should contain fallback to GTK_STOCK_DIRECTORY ("gtk-directory")
+ if (!dirIcon)
+ throw SysError(formatSystemError("g_content_type_get_icon", L"", L"Unknown error."));
+
+ return FileIconHolder(dirIcon /*pass ownership*/, maxSize);
}
-ImageHolder fff::getFileIcon(const Zstring& filePath, int pixelSize)
+FileIconHolder fff::getFileIcon(const Zstring& filePath, int maxSize) //throw SysError
{
- try
- {
- GFile* file = ::g_file_new_for_path(filePath.c_str()); //documented to "never fail"
- ZEN_ON_SCOPE_EXIT(::g_object_unref(file));
+ GFile* file = ::g_file_new_for_path(filePath.c_str()); //documented to "never fail"
+ ZEN_ON_SCOPE_EXIT(::g_object_unref(file));
- if (GFileInfo* fileInfo = ::g_file_query_info(file, G_FILE_ATTRIBUTE_STANDARD_ICON, G_FILE_QUERY_INFO_NONE, nullptr, nullptr))
- {
- ZEN_ON_SCOPE_EXIT(::g_object_unref(fileInfo));
- if (GIcon* gicon = ::g_file_info_get_icon(fileInfo)) //not owned!
- return imageHolderFromGicon(gicon, pixelSize);
- }
- //need fallback: icon lookup may fail because some icons are currently not present on system
+ GError* error = nullptr;
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
- }
- catch (SysError&) { assert(false); }
+ GFileInfo* const fileInfo = ::g_file_query_info(file, G_FILE_ATTRIBUTE_STANDARD_ICON, G_FILE_QUERY_INFO_NONE, nullptr /*cancellable*/, &error);
+ if (!fileInfo)
+ throw SysError(formatSystemError("g_file_query_info",
+ error ? replaceCpy(_("Error code %x"), L"%x", numberTo<std::wstring>(error->code)) : L"",
+ error ? utfTo<std::wstring>(error->message) : L"Unknown error."));
+ ZEN_ON_SCOPE_EXIT(::g_object_unref(fileInfo));
+
+ GIcon* const gicon = ::g_file_info_get_icon(fileInfo); //not owned!
+ if (!gicon)
+ throw SysError(formatSystemError("g_file_info_get_icon", L"", L"Icon not available."));
+
+ //https://github.com/GNOME/gtk/blob/master/gtk/gtkicontheme.c#L4082
+ if (G_IS_FILE_ICON(gicon) || G_IS_LOADABLE_ICON(gicon)) //see comment in image_holder.h
+ throw SysError(L"Icon loading might block main thread.");
+ //shouldn't be a problem for native file systems -> G_IS_THEMED_ICON(gicon)
+
+ //the remaining icon types won't block!
+ assert(GDK_IS_PIXBUF(gicon) || G_IS_THEMED_ICON(gicon) || G_IS_EMBLEMED_ICON(gicon));
+
+ return FileIconHolder(static_cast<GIcon*>(::g_object_ref(gicon)) /*pass ownership*/, maxSize);
- return ImageHolder();
}
-ImageHolder fff::getThumbnailImage(const Zstring& filePath, int pixelSize) //return null icon on failure
+ImageHolder fff::getThumbnailImage(const Zstring& filePath, int maxSize) //throw SysError
{
- try
- {
- struct ::stat fileInfo = {};
- if (::stat(filePath.c_str(), &fileInfo) == 0)
- if (!S_ISFIFO(fileInfo.st_mode)) //skip named pipes: else gdk_pixbuf_get_file_info() would hang forever!
- {
- gint width = 0;
- gint height = 0;
- if (/*GdkPixbufFormat* fmt =*/ ::gdk_pixbuf_get_file_info(filePath.c_str(), &width, &height))
- if (width > 0 && height > 0 && pixelSize > 0)
- {
- int trgWidth = width;
- int trgHeight = height;
-
- const int maxExtent = std::max(width, height); //don't stretch small images, shrink large ones only!
- if (pixelSize < maxExtent)
- {
- trgWidth = width * pixelSize / maxExtent;
- trgHeight = height * pixelSize / maxExtent;
- }
- if (GdkPixbuf* pixBuf = ::gdk_pixbuf_new_from_file_at_size(filePath.c_str(), trgWidth, trgHeight, nullptr))
- {
- ZEN_ON_SCOPE_EXIT(::g_object_unref(pixBuf));
- return copyToImageHolder(pixBuf);
- }
- }
- }
+ struct ::stat fileInfo = {};
+ if (::stat(filePath.c_str(), &fileInfo) != 0)
+ THROW_LAST_SYS_ERROR("stat");
- }
- catch (SysError&) {}
+ if (!S_ISREG(fileInfo.st_mode)) //skip blocking file types, e.g. named pipes, see file_io.cpp
+ throw SysError(_("Unsupported item type.") + L" [" + printNumber<std::wstring>(L"0%06o", fileInfo.st_mode & S_IFMT) + L']');
+
+ GError* error = nullptr;
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
+
+ GdkPixbuf* const pixBuf = ::gdk_pixbuf_new_from_file(filePath.c_str(), &error);
+ if (!pixBuf)
+ throw SysError(formatSystemError("gdk_pixbuf_new_from_file",
+ error ? replaceCpy(_("Error code %x"), L"%x", numberTo<std::wstring>(error->code)) : L"",
+ error ? utfTo<std::wstring>(error->message) : L"Unknown error."));
+ ZEN_ON_SCOPE_EXIT(::g_object_unref(pixBuf));
+
+ return copyToImageHolder(*pixBuf, maxSize); //throw SysError
+
+}
+
+
+wxImage fff::extractWxImage(ImageHolder&& ih)
+{
+ assert(runningMainThread());
+
+ if (!ih.getRgb())
+ return wxNullImage;
+
+ wxImage img(ih.getWidth(), ih.getHeight(), ih.releaseRgb(), false /*static_data*/); //pass ownership
+ if (ih.getAlpha())
+ img.SetAlpha(ih.releaseAlpha(), false /*static_data*/);
+ return img;
+}
+
+
+wxImage fff::extractWxImage(zen::FileIconHolder&& fih)
+{
+ assert(runningMainThread());
+
+ wxImage img;
+ if (GIcon* gicon = fih.gicon.get())
+ try
+ {
+ img = extractWxImage(imageHolderFromGicon(*gicon, fih.maxSize)); //throw SysError
+ }
+ catch (SysError&) {} //might fail if icon theme is missing a MIME type!
+
+ fih.gicon.reset();
+ return img;
- return ImageHolder();
}
diff --git a/FreeFileSync/Source/base/icon_loader.h b/FreeFileSync/Source/base/icon_loader.h
index 0f4e49ec..cd76a8cb 100644
--- a/FreeFileSync/Source/base/icon_loader.h
+++ b/FreeFileSync/Source/base/icon_loader.h
@@ -9,6 +9,7 @@
#include <zen/zstring.h>
#include <wx+/image_holder.h>
+#include <wx/image.h>
namespace fff
@@ -17,12 +18,15 @@ namespace fff
//COM needs to be initialized before calling any of these functions! CoInitializeEx/CoUninitialize
//=> don't call from WM_PAINT handler! https://blogs.msdn.microsoft.com/yvesdolc/2009/08/06/do-you-receive-wm_paint-when-waiting-for-a-com-call-to-return/
-//return null icon on failure:
-zen::ImageHolder getIconByTemplatePath(const Zstring& templatePath, int pixelSize);
-zen::ImageHolder genericFileIcon(int pixelSize);
-zen::ImageHolder genericDirIcon (int pixelSize);
-zen::ImageHolder getFileIcon (const Zstring& filePath, int pixelSize);
-zen::ImageHolder getThumbnailImage(const Zstring& filePath, int pixelSize);
+zen::FileIconHolder getIconByTemplatePath(const Zstring& templatePath, int maxSize); //throw SysError
+zen::FileIconHolder genericFileIcon(int maxSize); //throw SysError
+zen::FileIconHolder genericDirIcon (int maxSize); //throw SysError
+zen::FileIconHolder getFileIcon(const Zstring& filePath, int maxSize); //throw SysError
+zen::ImageHolder getThumbnailImage(const Zstring& filePath, int maxSize); //throw SysError
+
+//invalidates image holder! call from GUI thread only!
+wxImage extractWxImage(zen::ImageHolder&& ih);
+wxImage extractWxImage(zen::FileIconHolder&& fih); //might fail if icon theme is missing a MIME type!
}
#endif //ICON_LOADER_H_1348701985713445
diff --git a/FreeFileSync/Source/base/parallel_scan.cpp b/FreeFileSync/Source/base/parallel_scan.cpp
index 13ff16e2..6c2cf046 100644
--- a/FreeFileSync/Source/base/parallel_scan.cpp
+++ b/FreeFileSync/Source/base/parallel_scan.cpp
@@ -351,10 +351,10 @@ DirCallback::HandleLink DirCallback::onSymlink(const AFS::SymlinkInfo& si) //thr
switch (cfg_.handleSymlinks)
{
- case SymLinkHandling::EXCLUDE:
+ case SymLinkHandling::exclude:
return LINK_SKIP;
- case SymLinkHandling::DIRECT:
+ case SymLinkHandling::direct:
if (cfg_.filter.ref().passFileFilter(relPath)) //always use file filter: Link type may not be "stable" on Linux!
{
output_.addSubLink(si.itemName, LinkAttributes(si.modTime));
@@ -362,7 +362,7 @@ DirCallback::HandleLink DirCallback::onSymlink(const AFS::SymlinkInfo& si) //thr
}
return LINK_SKIP;
- case SymLinkHandling::FOLLOW:
+ case SymLinkHandling::follow:
//filter symlinks before trying to follow them: handle user-excluded broken symlinks!
//since we don't know yet what type the symlink will resolve to, only do this when both filter variants agree:
if (!cfg_.filter.ref().passFileFilter(relPath))
diff --git a/FreeFileSync/Source/base/parallel_scan.h b/FreeFileSync/Source/base/parallel_scan.h
index 1852d3fd..5610e5d3 100644
--- a/FreeFileSync/Source/base/parallel_scan.h
+++ b/FreeFileSync/Source/base/parallel_scan.h
@@ -21,7 +21,7 @@ struct DirectoryKey
{
AbstractPath folderPath;
FilterRef filter;
- SymLinkHandling handleSymlinks = SymLinkHandling::EXCLUDE;
+ SymLinkHandling handleSymlinks = SymLinkHandling::exclude;
};
diff --git a/FreeFileSync/Source/base/path_filter.cpp b/FreeFileSync/Source/base/path_filter.cpp
index f1fa1580..d7e555a5 100644
--- a/FreeFileSync/Source/base/path_filter.cpp
+++ b/FreeFileSync/Source/base/path_filter.cpp
@@ -36,7 +36,7 @@ static_assert(FILE_NAME_SEPARATOR == '/');
void addFilterEntry(const Zstring& filterPhrase, std::vector<Zstring>& masksFileFolder, std::vector<Zstring>& masksFolder)
{
//normalize filter input: 1. ignore Unicode normalization form 2. ignore case 3. ignore path separator
- Zstring filterFmt = makeUpperCopy(filterPhrase);
+ Zstring filterFmt = getUpperCase(filterPhrase);
if constexpr (FILE_NAME_SEPARATOR != Zstr('/' )) replace(filterFmt, Zstr('/'), FILE_NAME_SEPARATOR);
if constexpr (FILE_NAME_SEPARATOR != Zstr('\\')) replace(filterFmt, Zstr('\\'), FILE_NAME_SEPARATOR);
/* phrase | action
@@ -264,7 +264,7 @@ bool NameFilter::passFileFilter(const Zstring& relFilePath) const
assert(!startsWith(relFilePath, FILE_NAME_SEPARATOR));
//normalize input: 1. ignore Unicode normalization form 2. ignore case
- const Zstring& pathFmt = makeUpperCopy(relFilePath);
+ const Zstring& pathFmt = getUpperCase(relFilePath);
if (matchesMask<AnyMatch >(pathFmt, excludeMasksFileFolder) || //either full match on file or partial match on any parent folder
matchesMask<ParentFolderMatch>(pathFmt, excludeMasksFolder)) //partial match on any parent folder only
@@ -281,7 +281,7 @@ bool NameFilter::passDirFilter(const Zstring& relDirPath, bool* childItemMightMa
assert(!childItemMightMatch || *childItemMightMatch); //check correct usage
//normalize input: 1. ignore Unicode normalization form 2. ignore case
- const Zstring& pathFmt = makeUpperCopy(relDirPath);
+ const Zstring& pathFmt = getUpperCase(relDirPath);
if (matchesMask<AnyMatch>(pathFmt, excludeMasksFileFolder) ||
matchesMask<AnyMatch>(pathFmt, excludeMasksFolder))
diff --git a/FreeFileSync/Source/base/process_callback.h b/FreeFileSync/Source/base/process_callback.h
index 8b46b8d4..7a690587 100644
--- a/FreeFileSync/Source/base/process_callback.h
+++ b/FreeFileSync/Source/base/process_callback.h
@@ -38,8 +38,7 @@ struct PhaseCallback
7. delete directory to recycler: no matter how many child-elements exist, this is only 1 item to process!
8. user-defined deletion directory on different volume: full file copy required (instead of move)
9. Binary file comparison: short-circuit behavior after first difference is found
- 10. Error during file copy, retry: bytes were copied => increases total workload!
- */
+ 10. Error during file copy, retry: bytes were copied => increases total workload! */
//opportunity to abort must be implemented in a frequently-executed method like requestUiUpdate()
virtual void requestUiUpdate(bool force = false) = 0; //throw X
diff --git a/FreeFileSync/Source/base/soft_filter.h b/FreeFileSync/Source/base/soft_filter.h
index d0552c2d..c3cd8d0f 100644
--- a/FreeFileSync/Source/base/soft_filter.h
+++ b/FreeFileSync/Source/base/soft_filter.h
@@ -66,9 +66,9 @@ inline
SoftFilter::SoftFilter(size_t timeSpan, UnitTime unitTimeSpan,
size_t sizeMin, UnitSize unitSizeMin,
size_t sizeMax, UnitSize unitSizeMax) :
- matchesFolder_(unitTimeSpan == UnitTime::NONE &&
- unitSizeMin == UnitSize::NONE &&
- unitSizeMax == UnitSize::NONE) //exclude folders if size or date filter is active: avoids creating empty folders if not needed!
+ matchesFolder_(unitTimeSpan == UnitTime::none &&
+ unitSizeMin == UnitSize::none &&
+ unitSizeMax == UnitSize::none) //exclude folders if size or date filter is active: avoids creating empty folders if not needed!
{
resolveUnits(timeSpan, unitTimeSpan,
sizeMin, unitSizeMin,
diff --git a/FreeFileSync/Source/base/structures.cpp b/FreeFileSync/Source/base/structures.cpp
index 8452f3f2..5ce995d9 100644
--- a/FreeFileSync/Source/base/structures.cpp
+++ b/FreeFileSync/Source/base/structures.cpp
@@ -10,59 +10,93 @@
#include <ctime>
#include <zen/i18n.h>
#include <zen/time.h>
-//#include "path_filter.h"
#include "../afs/concrete.h"
using namespace zen;
using namespace fff;
+std::wstring fff::getVariantName(std::optional<CompareVariant> var)
+{
+ if (!var)
+ return _("Multiple...");
+
+ switch (*var)
+ {
+ //*INDENT-OFF*
+ case CompareVariant::timeSize: return _("File time and size");
+ case CompareVariant::content: return _("File content");
+ case CompareVariant::size: return _("File size");
+ //*INDENT-ON*
+ }
+ assert(false);
+ return _("Error");
+}
+
+
+std::wstring fff::getVariantName(std::optional<SyncVariant> var)
+{
+ if (!var)
+ return _("Multiple...");
+
+ switch (*var)
+ {
+ //*INDENT-OFF*
+ case SyncVariant::twoWay: return _("Two way");
+ case SyncVariant::mirror: return _("Mirror");
+ case SyncVariant::update: return _("Update");
+ case SyncVariant::custom: return _("Custom");
+ //*INDENT-ON*
+ }
+ assert(false);
+ return _("Error");
+}
+
+
//use in sync log files where users expect ANSI: https://freefilesync.org/forum/viewtopic.php?t=4647
-std::wstring fff::getVariantNameForLog(DirectionConfig::Variant var)
+std::wstring fff::getVariantNameWithSymbol(SyncVariant var)
{
switch (var)
{
- case DirectionConfig::TWO_WAY:
- return _("Two way") + L" <->";
- case DirectionConfig::MIRROR:
- return _("Mirror") + L" ->";
- case DirectionConfig::UPDATE:
- return _("Update") + L" >";
- case DirectionConfig::CUSTOM:
- return _("Custom");
+ //*INDENT-OFF*
+ case SyncVariant::twoWay: return _("Two way") + L" <->";
+ case SyncVariant::mirror: return _("Mirror") + L" ->";
+ case SyncVariant::update: return _("Update") + L" >";
+ case SyncVariant::custom: return _("Custom") + L" ?>";
+ //*INDENT-ON*
}
assert(false);
return _("Error");
}
-DirectionSet fff::extractDirections(const DirectionConfig& cfg)
+DirectionSet fff::extractDirections(const SyncDirectionConfig& cfg)
{
DirectionSet output;
switch (cfg.var)
{
- case DirectionConfig::TWO_WAY:
+ case SyncVariant::twoWay:
throw std::logic_error("there are no predefined directions for automatic mode! " + std::string(__FILE__) + ':' + numberTo<std::string>(__LINE__));
- case DirectionConfig::MIRROR:
- output.exLeftSideOnly = SyncDirection::RIGHT;
- output.exRightSideOnly = SyncDirection::RIGHT;
- output.leftNewer = SyncDirection::RIGHT;
- output.rightNewer = SyncDirection::RIGHT;
- output.different = SyncDirection::RIGHT;
- output.conflict = SyncDirection::RIGHT;
+ case SyncVariant::mirror:
+ output.exLeftSideOnly = SyncDirection::right;
+ output.exRightSideOnly = SyncDirection::right;
+ output.leftNewer = SyncDirection::right;
+ output.rightNewer = SyncDirection::right;
+ output.different = SyncDirection::right;
+ output.conflict = SyncDirection::right;
break;
- case DirectionConfig::UPDATE:
- output.exLeftSideOnly = SyncDirection::RIGHT;
- output.exRightSideOnly = SyncDirection::NONE;
- output.leftNewer = SyncDirection::RIGHT;
- output.rightNewer = SyncDirection::NONE;
- output.different = SyncDirection::RIGHT;
- output.conflict = SyncDirection::NONE;
+ case SyncVariant::update:
+ output.exLeftSideOnly = SyncDirection::right;
+ output.exRightSideOnly = SyncDirection::none;
+ output.leftNewer = SyncDirection::right;
+ output.rightNewer = SyncDirection::none;
+ output.different = SyncDirection::right;
+ output.conflict = SyncDirection::none;
break;
- case DirectionConfig::CUSTOM:
+ case SyncVariant::custom:
output = cfg.custom;
break;
}
@@ -70,34 +104,34 @@ DirectionSet fff::extractDirections(const DirectionConfig& cfg)
}
-bool fff::detectMovedFilesSelectable(const DirectionConfig& cfg)
+bool fff::detectMovedFilesSelectable(const SyncDirectionConfig& cfg)
{
- if (cfg.var == DirectionConfig::TWO_WAY)
+ if (cfg.var == SyncVariant::twoWay)
return false; //moved files are always detected since we have the database file anyway
const DirectionSet tmp = fff::extractDirections(cfg);
- return (tmp.exLeftSideOnly == SyncDirection::RIGHT &&
- tmp.exRightSideOnly == SyncDirection::RIGHT) ||
- (tmp.exLeftSideOnly == SyncDirection::LEFT &&
- tmp.exRightSideOnly == SyncDirection::LEFT);
+ return (tmp.exLeftSideOnly == SyncDirection::right &&
+ tmp.exRightSideOnly == SyncDirection::right) ||
+ (tmp.exLeftSideOnly == SyncDirection::left &&
+ tmp.exRightSideOnly == SyncDirection::left);
}
-bool fff::detectMovedFilesEnabled(const DirectionConfig& cfg)
+bool fff::detectMovedFilesEnabled(const SyncDirectionConfig& cfg)
{
- return detectMovedFilesSelectable(cfg) ? cfg.detectMovedFiles : cfg.var == DirectionConfig::TWO_WAY;
+ return detectMovedFilesSelectable(cfg) ? cfg.detectMovedFiles : cfg.var == SyncVariant::twoWay;
}
DirectionSet fff::getTwoWayUpdateSet()
{
DirectionSet output;
- output.exLeftSideOnly = SyncDirection::RIGHT;
- output.exRightSideOnly = SyncDirection::LEFT;
- output.leftNewer = SyncDirection::RIGHT;
- output.rightNewer = SyncDirection::LEFT;
- output.different = SyncDirection::NONE;
- output.conflict = SyncDirection::NONE;
+ output.exLeftSideOnly = SyncDirection::right;
+ output.exRightSideOnly = SyncDirection::left;
+ output.leftNewer = SyncDirection::right;
+ output.rightNewer = SyncDirection::left;
+ output.different = SyncDirection::none;
+ output.conflict = SyncDirection::none;
return output;
}
@@ -205,23 +239,23 @@ time_t resolve(size_t value, UnitTime unit, time_t defaultVal)
if (tcLocal != TimeComp())
switch (unit)
{
- case UnitTime::NONE:
+ case UnitTime::none:
return defaultVal;
- case UnitTime::TODAY:
+ case UnitTime::today:
tcLocal.second = 0; //0-61
tcLocal.minute = 0; //0-59
tcLocal.hour = 0; //0-23
return localToTimeT(tcLocal); //convert local time back to UTC
- case UnitTime::THIS_MONTH:
+ case UnitTime::thisMonth:
tcLocal.second = 0; //0-61
tcLocal.minute = 0; //0-59
tcLocal.hour = 0; //0-23
tcLocal.day = 1; //1-31
return localToTimeT(tcLocal);
- case UnitTime::THIS_YEAR:
+ case UnitTime::thisYear:
tcLocal.second = 0; //0-61
tcLocal.minute = 0; //0-59
tcLocal.hour = 0; //0-23
@@ -229,7 +263,7 @@ time_t resolve(size_t value, UnitTime unit, time_t defaultVal)
tcLocal.month = 1; //1-12
return localToTimeT(tcLocal);
- case UnitTime::LAST_X_DAYS:
+ case UnitTime::lastDays:
tcLocal.second = 0; //0-61
tcLocal.minute = 0; //0-59
tcLocal.hour = 0; //0-23
@@ -242,18 +276,18 @@ time_t resolve(size_t value, UnitTime unit, time_t defaultVal)
uint64_t resolve(size_t value, UnitSize unit, uint64_t defaultVal)
{
- const uint64_t maxVal = std::numeric_limits<uint64_t>::max();
+ constexpr uint64_t maxVal = std::numeric_limits<uint64_t>::max();
switch (unit)
{
- case UnitSize::NONE:
+ case UnitSize::none:
return defaultVal;
- case UnitSize::BYTE:
+ case UnitSize::byte:
return value;
- case UnitSize::KB:
+ case UnitSize::kb:
return value > maxVal / 1024U ? maxVal : //prevent overflow!!!
1024U * value;
- case UnitSize::MB:
+ case UnitSize::mb:
return value > maxVal / (1024 * 1024U) ? maxVal : //prevent overflow!!!
1024 * 1024U * value;
}
@@ -273,3 +307,41 @@ void fff::resolveUnits(size_t timeSpan, UnitTime unitTimeSpan,
sizeMinBy = resolve(sizeMin, unitSizeMin, 0U);
sizeMaxBy = resolve(sizeMax, unitSizeMax, std::numeric_limits<uint64_t>::max());
}
+
+
+std::optional<CompareVariant> fff::getCompVariant(const MainConfiguration& mainCfg)
+{
+ const CompareVariant firstVar = mainCfg.firstPair.localCmpCfg ?
+ mainCfg.firstPair.localCmpCfg->compareVar :
+ mainCfg.cmpCfg.compareVar; //fallback to main sync cfg
+
+ //test if there's a deviating variant within the additional folder pairs
+ for (const LocalPairConfig& lpc : mainCfg.additionalPairs)
+ {
+ const CompareVariant localVariant = lpc.localCmpCfg ?
+ lpc.localCmpCfg->compareVar :
+ mainCfg.cmpCfg.compareVar; //fallback to main sync cfg
+ if (localVariant != firstVar)
+ return std::nullopt;
+ }
+ return firstVar; //seems to be all in sync...
+}
+
+
+std::optional<SyncVariant> fff::getSyncVariant(const MainConfiguration& mainCfg)
+{
+ const SyncVariant firstVar = mainCfg.firstPair.localSyncCfg ?
+ mainCfg.firstPair.localSyncCfg->directionCfg.var :
+ mainCfg.syncCfg.directionCfg.var; //fallback to main sync cfg
+
+ //test if there's a deviating variant within the additional folder pairs
+ for (const LocalPairConfig& lpc : mainCfg.additionalPairs)
+ {
+ const SyncVariant localVariant = lpc.localSyncCfg ?
+ lpc.localSyncCfg->directionCfg.var :
+ mainCfg.syncCfg.directionCfg.var;
+ if (localVariant != firstVar)
+ return std::nullopt;
+ }
+ return firstVar; //seems to be all in sync...
+}
diff --git a/FreeFileSync/Source/base/structures.h b/FreeFileSync/Source/base/structures.h
index 88d7eb54..c1b43071 100644
--- a/FreeFileSync/Source/base/structures.h
+++ b/FreeFileSync/Source/base/structures.h
@@ -28,17 +28,17 @@ enum class CompareVariant
enum class SymLinkHandling
{
- EXCLUDE,
- DIRECT,
- FOLLOW
+ exclude,
+ direct,
+ follow
};
enum class SyncDirection : unsigned char //save space for use in FileSystemObject!
{
- NONE,
- LEFT,
- RIGHT
+ none,
+ left,
+ right
};
@@ -107,12 +107,12 @@ std::wstring getSymbol(SyncOperation op); //method used for exporting .csv file
struct DirectionSet
{
- SyncDirection exLeftSideOnly = SyncDirection::RIGHT;
- SyncDirection exRightSideOnly = SyncDirection::LEFT;
- SyncDirection leftNewer = SyncDirection::RIGHT; //CompareVariant::timeSize only!
- SyncDirection rightNewer = SyncDirection::LEFT; //
- SyncDirection different = SyncDirection::NONE; //CompareVariant::content, CompareVariant::size only!
- SyncDirection conflict = SyncDirection::NONE;
+ SyncDirection exLeftSideOnly = SyncDirection::right;
+ SyncDirection exRightSideOnly = SyncDirection::left;
+ SyncDirection leftNewer = SyncDirection::right; //CompareVariant::timeSize only!
+ SyncDirection rightNewer = SyncDirection::left; //
+ SyncDirection different = SyncDirection::none; //CompareVariant::content, CompareVariant::size only!
+ SyncDirection conflict = SyncDirection::none;
};
DirectionSet getTwoWayUpdateSet();
@@ -128,43 +128,45 @@ bool operator==(const DirectionSet& lhs, const DirectionSet& rhs)
lhs.conflict == rhs.conflict;
}
-struct DirectionConfig //technical representation of sync-config
+enum class SyncVariant
{
- enum Variant
- {
- TWO_WAY, //use sync-database to determine directions
- MIRROR, //predefined
- UPDATE, //
- CUSTOM //use custom directions
- };
-
- Variant var = TWO_WAY;
- DirectionSet custom; //sync directions for variant CUSTOM
- bool detectMovedFiles = false; //dependent from Variant: e.g. always active for DirectionConfig::TWO_WAY! => use functions below for evaluation!
+ twoWay, //use sync-database to determine directions
+ mirror, //predefined
+ update, //
+ custom, //use custom directions
+};
+struct SyncDirectionConfig
+{
+ SyncVariant var = SyncVariant::twoWay;
+ DirectionSet custom; //sync directions for SyncVariant::custom
+ bool detectMovedFiles = false; //variant-dependent: e.g. always active for SyncVariant::twoWay! => use functions below for evaluation!
};
-bool detectMovedFilesSelectable(const DirectionConfig& cfg);
-bool detectMovedFilesEnabled (const DirectionConfig& cfg);
+bool detectMovedFilesSelectable(const SyncDirectionConfig& cfg);
+bool detectMovedFilesEnabled (const SyncDirectionConfig& cfg);
-DirectionSet extractDirections(const DirectionConfig& cfg); //get sync directions: DON'T call for DirectionConfig::TWO_WAY!
+DirectionSet extractDirections(const SyncDirectionConfig& cfg); //get sync directions: DON'T call for SyncVariant::twoWay!
-std::wstring getVariantNameForLog(DirectionConfig::Variant var);
+std::wstring getVariantName(std::optional<CompareVariant> var);
+std::wstring getVariantName(std::optional<SyncVariant> var);
+
+std::wstring getVariantNameWithSymbol(SyncVariant var);
inline
-bool operator==(const DirectionConfig& lhs, const DirectionConfig& rhs)
+bool operator==(const SyncDirectionConfig& lhs, const SyncDirectionConfig& rhs)
{
return lhs.var == rhs.var &&
- (lhs.var != DirectionConfig::CUSTOM || lhs.custom == rhs.custom) && //no need to consider custom directions if var != CUSTOM
+ (lhs.var != SyncVariant::custom || lhs.custom == rhs.custom) && //no need to consider custom directions if var != CUSTOM
lhs.detectMovedFiles == rhs.detectMovedFiles; //useful to remember this setting even if the current sync variant does not need it
//adapt effectivelyEqual() on changes, too!
}
-inline bool operator!=(const DirectionConfig& lhs, const DirectionConfig& rhs) { return !(lhs == rhs); }
+inline bool operator!=(const SyncDirectionConfig& lhs, const SyncDirectionConfig& rhs) { return !(lhs == rhs); }
inline
-bool effectivelyEqual(const DirectionConfig& lhs, const DirectionConfig& rhs)
+bool effectivelyEqual(const SyncDirectionConfig& lhs, const SyncDirectionConfig& rhs)
{
- return (lhs.var == DirectionConfig::TWO_WAY) == (rhs.var == DirectionConfig::TWO_WAY) && //either both two-way or none
- (lhs.var == DirectionConfig::TWO_WAY || extractDirections(lhs) == extractDirections(rhs)) &&
+ return (lhs.var == SyncVariant::twoWay) == (rhs.var == SyncVariant::twoWay) && //either both two-way or none
+ (lhs.var == SyncVariant::twoWay || extractDirections(lhs) == extractDirections(rhs)) &&
detectMovedFilesEnabled(lhs) == detectMovedFilesEnabled(rhs);
}
@@ -172,7 +174,7 @@ bool effectivelyEqual(const DirectionConfig& lhs, const DirectionConfig& rhs)
struct CompConfig
{
CompareVariant compareVar = CompareVariant::timeSize;
- SymLinkHandling handleSymlinks = SymLinkHandling::EXCLUDE;
+ SymLinkHandling handleSymlinks = SymLinkHandling::exclude;
std::vector<unsigned int> ignoreTimeShiftMinutes; //treat modification times with these offsets as equal
};
@@ -206,7 +208,7 @@ enum class VersioningStyle
struct SyncConfig
{
//sync direction settings
- DirectionConfig directionCfg;
+ SyncDirectionConfig directionCfg;
DeletionPolicy handleDeletion = DeletionPolicy::recycler; //use Recycle Bin, delete permanently or move to user-defined location
@@ -262,20 +264,19 @@ bool effectivelyEqual(const SyncConfig& lhs, const SyncConfig& rhs)
enum class UnitSize
{
- NONE,
- BYTE,
- KB,
- MB
+ none,
+ byte,
+ kb,
+ mb
};
enum class UnitTime
{
- NONE,
- TODAY,
- //THIS_WEEK,
- THIS_MONTH,
- THIS_YEAR,
- LAST_X_DAYS
+ none,
+ today,
+ thisMonth,
+ thisYear,
+ lastDays
};
struct FilterConfig
@@ -313,13 +314,13 @@ struct FilterConfig
3. => equivalent to a user temporarily (de-)selecting rows -> not relevant for <Two way> variant! ;)
*/
size_t timeSpan = 0;
- UnitTime unitTimeSpan = UnitTime::NONE;
+ UnitTime unitTimeSpan = UnitTime::none;
size_t sizeMin = 0;
- UnitSize unitSizeMin = UnitSize::NONE;
+ UnitSize unitSizeMin = UnitSize::none;
size_t sizeMax = 0;
- UnitSize unitSizeMax = UnitSize::NONE;
+ UnitSize unitSizeMax = UnitSize::none;
};
inline
@@ -390,9 +391,9 @@ enum class ResultsNotification
enum class PostSyncCondition
{
- COMPLETION,
- ERRORS,
- SUCCESS
+ completion,
+ errors,
+ success
};
@@ -412,7 +413,7 @@ struct MainConfiguration
std::chrono::seconds automaticRetryDelay{5};
Zstring postSyncCommand; //user-defined command line
- PostSyncCondition postSyncCondition = PostSyncCondition::COMPLETION;
+ PostSyncCondition postSyncCondition = PostSyncCondition::completion;
Zstring altLogFolderPathPhrase; //fill to use different log file folder (other than the default %appdata%\FreeFileSync\Logs)
@@ -446,6 +447,10 @@ bool operator==(const MainConfiguration& lhs, const MainConfiguration& rhs)
}
+std::optional<CompareVariant> getCompVariant(const MainConfiguration& mainCfg);
+std::optional<SyncVariant> getSyncVariant(const MainConfiguration& mainCfg);
+
+
struct WarningDialogs
{
bool warnFolderNotExisting = true;
diff --git a/FreeFileSync/Source/base/synchronization.cpp b/FreeFileSync/Source/base/synchronization.cpp
index e3083158..08a517c5 100644
--- a/FreeFileSync/Source/base/synchronization.cpp
+++ b/FreeFileSync/Source/base/synchronization.cpp
@@ -28,6 +28,10 @@ using namespace fff;
namespace
{
+const size_t CONFLICTS_PREVIEW_MAX = 25; //=> consider memory consumption, log file size, email size!
+const size_t MODTIME_ERRORS_PREVIEW_MAX = 25;
+
+
inline
int getCUD(const SyncStatistics& stat)
{
@@ -125,7 +129,7 @@ void SyncStatistics::processFile(const FilePair& file)
case SO_UNRESOLVED_CONFLICT:
++conflictCount_;
- if (conflictsPreview_.size() < SYNC_STATS_CONFLICTS_MAX)
+ if (conflictsPreview_.size() < CONFLICTS_PREVIEW_MAX)
conflictsPreview_.push_back({ file.getRelativePathAny(), file.getSyncOpConflict() });
break;
@@ -181,7 +185,7 @@ void SyncStatistics::processLink(const SymlinkPair& link)
case SO_UNRESOLVED_CONFLICT:
++conflictCount_;
- if (conflictsPreview_.size() < SYNC_STATS_CONFLICTS_MAX)
+ if (conflictsPreview_.size() < CONFLICTS_PREVIEW_MAX)
conflictsPreview_.push_back({ link.getRelativePathAny(), link.getSyncOpConflict() });
break;
@@ -223,7 +227,7 @@ void SyncStatistics::processFolder(const FolderPair& folder)
case SO_UNRESOLVED_CONFLICT:
++conflictCount_;
- if (conflictsPreview_.size() < SYNC_STATS_CONFLICTS_MAX)
+ if (conflictsPreview_.size() < CONFLICTS_PREVIEW_MAX)
conflictsPreview_.push_back({ folder.getRelativePathAny(), folder.getSyncOpConflict() });
break;
@@ -378,7 +382,7 @@ std::vector<FolderPairSyncCfg> fff::extractSyncCfg(const MainConfiguration& main
output.push_back(
{
syncCfg.directionCfg.var,
- syncCfg.directionCfg.var == DirectionConfig::TWO_WAY || detectMovedFilesEnabled(syncCfg.directionCfg),
+ syncCfg.directionCfg.var == SyncVariant::twoWay || detectMovedFilesEnabled(syncCfg.directionCfg),
syncCfg.handleDeletion,
syncCfg.versioningFolderPhrase,
@@ -991,7 +995,7 @@ private:
acb_.reportInfo(replaceCpy(replaceCpy(rawText, L"%x", L'\n' + fmtPath(displayPath1)), L"%y", L'\n' + fmtPath(displayPath2))); //throw ThreadInterruption
}
- //target existing after onDeleteTargetFile(): undefined behavior! (fail/overwrite/auto-rename)
+ //already existing after onDeleteTargetFile(): undefined behavior! (e.g. fail/overwrite/auto-rename)
AFS::FileCopyResult copyFileWithCallback(const FileDescriptor& sourceDescr, //throw FileError, ThreadInterruption, X
const AbstractPath& targetPath,
const std::function<void()>& onDeleteTargetFile /*throw X*/, //optional!
@@ -1505,7 +1509,8 @@ void FolderPairSyncer::synchronizeFileInt(FilePair& file, SyncOperation syncOp)
{
const AFS::FileCopyResult result = copyFileWithCallback({ file.getAbstractPath<sideSrc>(), file.getAttributes<sideSrc>() },
targetPath,
- nullptr, //onDeleteTargetFile: nothing to delete; if existing: undefined behavior! (fail/overwrite/auto-rename)
+ nullptr, //onDeleteTargetFile: nothing to delete
+ //if existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
statReporter); //throw FileError, ThreadInterruption
if (result.errorModTime)
errorsModTime_.push_back(*result.errorModTime); //show all warnings later as a single message
@@ -1571,6 +1576,7 @@ void FolderPairSyncer::synchronizeFileInt(FilePair& file, SyncOperation syncOp)
AsyncItemStatReporter statReporter(1, 0, acb_);
+ //already existing: undefined behavior! (e.g. fail/overwrite)
parallel::moveAndRenameItem(pathFrom, pathTo, singleThread_); //throw FileError, ErrorMoveUnsupported
statReporter.reportDelta(1, 0);
@@ -1608,6 +1614,7 @@ void FolderPairSyncer::synchronizeFileInt(FilePair& file, SyncOperation syncOp)
if (file.isFollowedSymlink<sideTrg>()) //since we follow the link, we need to sync case sensitivity of the link manually!
if (getUnicodeNormalForm(file.getItemName<sideTrg>()) !=
getUnicodeNormalForm(file.getItemName<sideSrc>())) //have difference in case?
+ //already existing: undefined behavior! (e.g. fail/overwrite)
parallel::moveAndRenameItem(file.getAbstractPath<sideTrg>(), targetPathLogical, singleThread_); //throw FileError, (ErrorMoveUnsupported)
auto onDeleteTargetFile = [&] //delete target at appropriate time
@@ -1657,6 +1664,7 @@ void FolderPairSyncer::synchronizeFileInt(FilePair& file, SyncOperation syncOp)
if (getUnicodeNormalForm(file.getItemName<sideTrg>()) !=
getUnicodeNormalForm(file.getItemName<sideSrc>())) //have difference in case?
+ //already existing: undefined behavior! (e.g. fail/overwrite)
parallel::moveAndRenameItem(file.getAbstractPath<sideTrg>(), //throw FileError, (ErrorMoveUnsupported)
AFS::appendRelPath(file.parent().getAbstractPath<sideTrg>(), file.getItemName<sideSrc>()), singleThread_);
else
@@ -1810,6 +1818,7 @@ void FolderPairSyncer::synchronizeLinkInt(SymlinkPair& symlink, SyncOperation sy
if (getUnicodeNormalForm(symlink.getItemName<sideTrg>()) !=
getUnicodeNormalForm(symlink.getItemName<sideSrc>())) //have difference in case?
+ //already existing: undefined behavior! (e.g. fail/overwrite)
parallel::moveAndRenameItem(symlink.getAbstractPath<sideTrg>(), //throw FileError, (ErrorMoveUnsupported)
AFS::appendRelPath(symlink.parent().getAbstractPath<sideTrg>(), symlink.getItemName<sideSrc>()), singleThread_);
else
@@ -1881,7 +1890,7 @@ void FolderPairSyncer::synchronizeFolderInt(FolderPair& folder, SyncOperation sy
AsyncItemStatReporter statReporter(1, 0, acb_);
try
{
- //target existing: fail/ignore
+ //already existing: fail
parallel::copyNewFolder(folder.getAbstractPath<sideSrc>(), targetPath, copyFilePermissions_, singleThread_); //throw FileError
}
catch (FileError&)
@@ -1947,6 +1956,7 @@ void FolderPairSyncer::synchronizeFolderInt(FolderPair& folder, SyncOperation sy
if (getUnicodeNormalForm(folder.getItemName<sideTrg>()) !=
getUnicodeNormalForm(folder.getItemName<sideSrc>())) //have difference in case?
+ //already existing: undefined behavior! (e.g. fail/overwrite)
parallel::moveAndRenameItem(folder.getAbstractPath<sideTrg>(), //throw FileError, (ErrorMoveUnsupported)
AFS::appendRelPath(folder.parent().getAbstractPath<sideTrg>(), folder.getItemName<sideSrc>()), singleThread_);
else
@@ -1987,7 +1997,7 @@ AFS::FileCopyResult FolderPairSyncer::copyFileWithCallback(const FileDescriptor&
auto copyOperation = [this, &sourceAttr, &targetPath, &onDeleteTargetFile, &statReporter](const AbstractPath& sourcePathTmp)
{
- //target existing after onDeleteTargetFile(): undefined behavior! (fail/overwrite/auto-rename)
+ //already existing + no onDeleteTargetFile: undefined behavior! (e.g. fail/overwrite/auto-rename)
const AFS::FileCopyResult result = parallel::copyFileTransactional(sourcePathTmp, sourceAttr, //throw FileError, ErrorFileLocked, ThreadInterruption, X
targetPath,
copyFilePermissions_,
@@ -2164,14 +2174,10 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime
//specify process and resource handling priorities
std::unique_ptr<ScheduleForBackgroundProcessing> backgroundPrio;
if (runWithBackgroundPriority)
- try
- {
- backgroundPrio = std::make_unique<ScheduleForBackgroundProcessing>(); //throw FileError
- }
- catch (const FileError& e) //not an error in this context
- {
- callback.reportInfo(e.toString()); //throw X
- }
+ tryReportingError([&]
+ {
+ backgroundPrio = std::make_unique<ScheduleForBackgroundProcessing>(); //throw FileError
+ }, callback); //throw X
//prevent operating system going into sleep state
std::unique_ptr<PreventStandby> noStandby;
@@ -2179,7 +2185,7 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime
{
noStandby = std::make_unique<PreventStandby>(); //throw FileError
}
- catch (const FileError& e) //not an error in this context
+ catch (const FileError& e) //failure is not critical => log only
{
callback.reportInfo(e.toString()); //throw X
}
@@ -2335,7 +2341,7 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime
freeSpace < minSpaceNeeded)
checkDiskSpaceMissing.push_back({ baseFolderPath, { minSpaceNeeded, freeSpace } });
}
- catch (const FileError& e) //for warning only => no need for tryReportingError(), but at least log it!
+ catch (const FileError& e) //failure is not critical => log only
{
callback.reportInfo(e.toString()); //throw X
}
@@ -2443,15 +2449,23 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime
//race condition := multiple accesses of which at least one is a write
for (auto it = checkReadWriteBaseFolders.begin(); it != checkReadWriteBaseFolders.end(); ++it)
- if (std::get<bool>(*it)) //write access
+ {
+ const auto& [basePath1, filter1, writeAccess1] = *it;
+ if (writeAccess1)
for (auto it2 = checkReadWriteBaseFolders.begin(); it2 != checkReadWriteBaseFolders.end(); ++it2)
- if (!std::get<bool>(*it2) || it < it2) //avoid duplicate comparisons
- if (std::optional<PathDependency> pd = getPathDependency(std::get<AbstractPath>(*it), *std::get<const PathFilter*>(*it),
- std::get<AbstractPath>(*it2), *std::get<const PathFilter*>(*it2)))
+ {
+ const auto& [basePath2, filter2, writeAccess2] = *it2;
+
+ if (!writeAccess2 ||
+ it < it2) //avoid duplicate comparisons
+ if (std::optional<PathDependency> pd = getPathDependency(basePath1, *filter1,
+ basePath2, *filter2))
{
dependentFolders.insert(pd->basePathParent);
dependentFolders.insert(pd->basePathChild);
}
+ }
+ }
if (!dependentFolders.empty())
{
@@ -2524,14 +2538,22 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime
//*INDENT-OFF*
if (!errorsModTime.empty())
{
+ size_t previewCount = 0;
std::wstring msg;
- for (const FileError& e : errorsModTime)
+ for (const FileError& e : errorsModTime)
{
- std::wstring singleMsg = replaceCpy(e.toString(), L"\n\n", L'\n');
+ const std::wstring& singleMsg = replaceCpy(e.toString(), L"\n\n", L'\n');
msg += singleMsg + L"\n\n";
+
+ if (++previewCount >= MODTIME_ERRORS_PREVIEW_MAX)
+ break;
}
msg.resize(msg.size() - 2);
+ if (errorsModTime.size() > previewCount)
+ msg += L"\n [...] " + replaceCpy(_P("Showing %y of 1 item", "Showing %y of %x items", errorsModTime.size()), //%x used as plural form placeholder!
+ L"%y", formatNumber(previewCount));
+
const bool scopeFail = std::uncaught_exceptions() > exeptionCount;
if (!scopeFail)
callback.reportWarning(msg, warnings.warnModificationTimeError); //throw X
@@ -2544,22 +2566,22 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime
class PcbNoThrow : public PhaseCallback
{
public:
- PcbNoThrow(ProcessCallback& callback) : callback_(callback) {}
+ PcbNoThrow(ProcessCallback& cb) : cb_(cb) {}
- void updateDataProcessed(int itemsDelta, int64_t bytesDelta) override {} //logically not part of sync data, so let's ignore
+ void updateDataProcessed(int itemsDelta, int64_t bytesDelta) override {} //sync DB/del-handler: logically not part of sync data, so let's ignore
void updateDataTotal (int itemsDelta, int64_t bytesDelta) override {} //
- void requestUiUpdate(bool force) override { try { callback_.requestUiUpdate(force); /*throw X*/} catch (...) {}; }
+ void requestUiUpdate(bool force) override { try { cb_.requestUiUpdate(force); /*throw X*/} catch (...) {}; }
- void updateStatus(const std::wstring& msg) override { try { callback_.updateStatus(msg); /*throw X*/} catch (...) {}; }
- void reportInfo (const std::wstring& msg) override { try { callback_.reportInfo (msg); /*throw X*/} catch (...) {}; }
+ void updateStatus(const std::wstring& msg) override { try { cb_.updateStatus(msg); /*throw X*/} catch (...) {}; }
+ void reportInfo (const std::wstring& msg) override { try { cb_.reportInfo (msg); /*throw X*/} catch (...) {}; }
void reportWarning (const std::wstring& msg, bool& warningActive) override { reportInfo(msg); /*ignore*/ }
Response reportError (const std::wstring& msg, size_t retryNumber) override { reportInfo(msg); return Response::ignore; }
void reportFatalError(const std::wstring& msg) override { reportInfo(msg); /*ignore*/ }
private:
- ProcessCallback& callback_;
+ ProcessCallback& cb_;
} callbackNoThrow(callback);
try
@@ -2577,7 +2599,7 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime
//------------------------------------------------------------------------------------------
if (folderCmp.size() > 1)
- callback.reportInfo(_("Synchronizing folder pair:") + L' ' + getVariantNameForLog(folderPairCfg.syncVariant) + L'\n' + //throw X
+ callback.reportInfo(_("Synchronizing folder pair:") + L' ' + getVariantNameWithSymbol(folderPairCfg.syncVariant) + L'\n' + //throw X
L" " + AFS::getDisplayPath(baseFolder.getAbstractPath< LEFT_SIDE>()) + L'\n' +
L" " + AFS::getDisplayPath(baseFolder.getAbstractPath<RIGHT_SIDE>()));
//------------------------------------------------------------------------------------------
diff --git a/FreeFileSync/Source/base/synchronization.h b/FreeFileSync/Source/base/synchronization.h
index 275918b4..c9991a70 100644
--- a/FreeFileSync/Source/base/synchronization.h
+++ b/FreeFileSync/Source/base/synchronization.h
@@ -71,14 +71,13 @@ private:
int conflictCount_ = 0;
std::vector<ConflictInfo> conflictsPreview_; //conflict texts to display as a warning message
- static const size_t SYNC_STATS_CONFLICTS_MAX = 25; //=> consider memory consumption, log file size, email size!
//limit conflict count! e.g. there may be hundred thousands of "same date but a different size"
};
struct FolderPairSyncCfg
{
- DirectionConfig::Variant syncVariant;
+ SyncVariant syncVariant;
bool saveSyncDB; //save database if in automatic mode or dection of moved files is active
DeletionPolicy handleDeletion;
Zstring versioningFolderPhrase; //unresolved directory names as entered by user!
diff --git a/FreeFileSync/Source/base/versioning.cpp b/FreeFileSync/Source/base/versioning.cpp
index 3f7a6176..6aa241af 100644
--- a/FreeFileSync/Source/base/versioning.cpp
+++ b/FreeFileSync/Source/base/versioning.cpp
@@ -109,7 +109,7 @@ void moveExistingItemToVersioning(const AbstractPath& sourcePath, const Abstract
Function copyNewItemPlain /*throw FileError*/)
{
//start deleting existing target as required by copyFileTransactional()/moveAndRenameItem():
- //best amortized performance if "target existing" is the most common case
+ //best amortized performance if "already existing" is the most common case
std::exception_ptr deletionError;
try { AFS::removeFilePlain(targetPath); /*throw FileError*/ }
catch (FileError&) { deletionError = std::current_exception(); } //probably "not existing" error, defer evaluation
@@ -142,6 +142,7 @@ void moveExistingItemToVersioning(const AbstractPath& sourcePath, const Abstract
try //first try to move directly without copying
{
+ //already existing: undefined behavior! (e.g. fail/overwrite)
AFS::moveAndRenameItem(sourcePath, targetPath); //throw FileError, ErrorMoveUnsupported
//great, we get away cheaply!
}
@@ -155,7 +156,7 @@ void moveExistingItemToVersioning(const AbstractPath& sourcePath, const Abstract
{
fixTargetPathIssues(e); //throw FileError
- //retry
+ //retry:
copyNewItemPlain(); //throw FileError
}
//[!] remove source file AFTER handling target path errors!
@@ -167,6 +168,7 @@ void moveExistingItemToVersioning(const AbstractPath& sourcePath, const Abstract
try //retry
{
+ //already existing: undefined behavior! (e.g. fail/overwrite)
AFS::moveAndRenameItem(sourcePath, targetPath); //throw FileError, ErrorMoveUnsupported
}
catch (ErrorMoveUnsupported&)
@@ -206,7 +208,9 @@ void FileVersioner::revisionFileImpl(const FileDescriptor& fileDescr, const Zstr
moveExistingItemToVersioning(filePath, targetPath, [&] //throw FileError
{
- //target existing: copyFileTransactional() undefined behavior! (fail/overwrite/auto-rename) => not expected, but possible if target deletion failed
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
+ //=> not expected, but possible if target deletion failed
+ //already existing + no onDeleteTargetFile: undefined behavior! (e.g. fail/overwrite/auto-rename)
/*const AFS::FileCopyResult result =*/ AFS::copyFileTransactional(filePath, fileAttr, targetPath, //throw FileError, ErrorFileLocked, X
false, //copyFilePermissions
false, //transactionalCopy: not needed for versioning! partial copy will be overwritten next time
@@ -425,7 +429,7 @@ void fff::applyVersioningLimit(const std::set<VersioningLimitFolder>& folderLimi
false /*allowUserInteraction*/, callback); //throw X
foldersToRead.clear();
for (const AbstractPath& folderPath : status.existing)
- foldersToRead.insert(DirectoryKey({ folderPath, makeSharedRef<NullFilter>(), SymLinkHandling::DIRECT }));
+ foldersToRead.insert(DirectoryKey({ folderPath, makeSharedRef<NullFilter>(), SymLinkHandling::direct }));
if (!status.failedChecks.empty())
{
diff --git a/FreeFileSync/Source/base_tools.cpp b/FreeFileSync/Source/base_tools.cpp
index 97f6cc65..01ebc563 100644
--- a/FreeFileSync/Source/base_tools.cpp
+++ b/FreeFileSync/Source/base_tools.cpp
@@ -12,91 +12,6 @@ using namespace zen;
using namespace fff;
-std::wstring fff::getVariantName(CompareVariant var)
-{
- switch (var)
- {
- case CompareVariant::timeSize:
- return _("File time and size");
- case CompareVariant::content:
- return _("File content");
- case CompareVariant::size:
- return _("File size");
- }
- assert(false);
- return _("Error");
-}
-
-
-std::wstring fff::getVariantName(DirectionConfig::Variant var)
-{
- //https://www.key-shortcut.com/en/writing-systems/35-symbols/arrows/
- //*INDENT-OFF*
- const wchar_t* arrowLeft = L"\u25C4 "; //◄
- const wchar_t* arrowRight = L" \u25BA"; //►
- const wchar_t* angleRight = L" \uFF1E"; //>
- //alternatives: ←, → (too small) ⬅, ⮕ (right one not generally available)
-
- if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft)
- {
- arrowLeft = L"\u25BA "; //not mirrored automatically: Windows/Linux Unicode bug!?
- arrowRight = L" \u25C4"; //
- }
- switch (var)
- {
- case DirectionConfig::TWO_WAY: return arrowLeft + _("Two way") + arrowRight;
- case DirectionConfig::MIRROR: return _("Mirror") + arrowRight;
- case DirectionConfig::UPDATE: return _("Update") + angleRight;
- case DirectionConfig::CUSTOM: return _("Custom");
- }
- //*INDENT-ON*
- assert(false);
- return _("Error");
-}
-
-
-std::wstring fff::getCompVariantName(const MainConfiguration& mainCfg)
-{
- const CompareVariant firstVariant = mainCfg.firstPair.localCmpCfg ?
- mainCfg.firstPair.localCmpCfg->compareVar :
- mainCfg.cmpCfg.compareVar; //fallback to main sync cfg
-
- //test if there's a deviating variant within the additional folder pairs
- for (const LocalPairConfig& lpc : mainCfg.additionalPairs)
- {
- const CompareVariant thisVariant = lpc.localCmpCfg ?
- lpc.localCmpCfg->compareVar :
- mainCfg.cmpCfg.compareVar; //fallback to main sync cfg
- if (thisVariant != firstVariant)
- return _("Multiple...");
- }
-
- //seems to be all in sync...
- return getVariantName(firstVariant);
-}
-
-
-std::wstring fff::getSyncVariantName(const MainConfiguration& mainCfg)
-{
- const DirectionConfig::Variant firstVariant = mainCfg.firstPair.localSyncCfg ?
- mainCfg.firstPair.localSyncCfg->directionCfg.var :
- mainCfg.syncCfg.directionCfg.var; //fallback to main sync cfg
-
- //test if there's a deviating variant within the additional folder pairs
- for (const LocalPairConfig& lpc : mainCfg.additionalPairs)
- {
- const DirectionConfig::Variant thisVariant = lpc.localSyncCfg ?
- lpc.localSyncCfg->directionCfg.var :
- mainCfg.syncCfg.directionCfg.var;
- if (thisVariant != firstVariant)
- return _("Multiple...");
- }
-
- //seems to be all in sync...
- return getVariantName(firstVariant);
-}
-
-
std::vector<unsigned int> fff::fromTimeShiftPhrase(const std::wstring& timeShiftPhrase)
{
std::wstring tmp = replaceCpy(timeShiftPhrase, L';', L','); //harmonize , ; and ' '
diff --git a/FreeFileSync/Source/base_tools.h b/FreeFileSync/Source/base_tools.h
index e5ad9a2f..f67a1940 100644
--- a/FreeFileSync/Source/base_tools.h
+++ b/FreeFileSync/Source/base_tools.h
@@ -14,11 +14,6 @@
namespace fff
{
-std::wstring getVariantName(CompareVariant var);
-std::wstring getVariantName(DirectionConfig::Variant var);
-std::wstring getCompVariantName(const MainConfiguration& mainCfg);
-std::wstring getSyncVariantName(const MainConfiguration& mainCfg);
-
//convert "ignoreTimeShiftMinutes" into compact format:
std::vector<unsigned int> fromTimeShiftPhrase(const std::wstring& timeShiftPhrase);
std::wstring toTimeShiftPhrase (const std::vector<unsigned int>& ignoreTimeShiftMinutes);
diff --git a/FreeFileSync/Source/config.cpp b/FreeFileSync/Source/config.cpp
index 222bd82a..f74c178e 100644
--- a/FreeFileSync/Source/config.cpp
+++ b/FreeFileSync/Source/config.cpp
@@ -192,13 +192,13 @@ void writeText(const SyncDirection& value, std::string& output)
{
switch (value)
{
- case SyncDirection::LEFT:
+ case SyncDirection::left:
output = "left";
break;
- case SyncDirection::RIGHT:
+ case SyncDirection::right:
output = "right";
break;
- case SyncDirection::NONE:
+ case SyncDirection::none:
output = "none";
break;
}
@@ -209,11 +209,11 @@ bool readText(const std::string& input, SyncDirection& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "left")
- value = SyncDirection::LEFT;
+ value = SyncDirection::left;
else if (tmp == "right")
- value = SyncDirection::RIGHT;
+ value = SyncDirection::right;
else if (tmp == "none")
- value = SyncDirection::NONE;
+ value = SyncDirection::none;
else
return false;
return true;
@@ -287,13 +287,13 @@ void writeText(const PostSyncCondition& value, std::string& output)
{
switch (value)
{
- case PostSyncCondition::COMPLETION:
+ case PostSyncCondition::completion:
output = "Completion";
break;
- case PostSyncCondition::ERRORS:
+ case PostSyncCondition::errors:
output = "Errors";
break;
- case PostSyncCondition::SUCCESS:
+ case PostSyncCondition::success:
output = "Success";
break;
}
@@ -304,11 +304,11 @@ bool readText(const std::string& input, PostSyncCondition& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "Completion")
- value = PostSyncCondition::COMPLETION;
+ value = PostSyncCondition::completion;
else if (tmp == "Errors")
- value = PostSyncCondition::ERRORS;
+ value = PostSyncCondition::errors;
else if (tmp == "Success")
- value = PostSyncCondition::SUCCESS;
+ value = PostSyncCondition::success;
else
return false;
return true;
@@ -353,13 +353,13 @@ void writeText(const FileIconSize& value, std::string& output)
{
switch (value)
{
- case FileIconSize::SMALL:
+ case FileIconSize::small:
output = "Small";
break;
- case FileIconSize::MEDIUM:
+ case FileIconSize::medium:
output = "Medium";
break;
- case FileIconSize::LARGE:
+ case FileIconSize::large:
output = "Large";
break;
}
@@ -370,11 +370,11 @@ bool readText(const std::string& input, FileIconSize& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "Small")
- value = FileIconSize::SMALL;
+ value = FileIconSize::small;
else if (tmp == "Medium")
- value = FileIconSize::MEDIUM;
+ value = FileIconSize::medium;
else if (tmp == "Large")
- value = FileIconSize::LARGE;
+ value = FileIconSize::large;
else
return false;
return true;
@@ -419,13 +419,13 @@ void writeText(const SymLinkHandling& value, std::string& output)
{
switch (value)
{
- case SymLinkHandling::EXCLUDE:
+ case SymLinkHandling::exclude:
output = "Exclude";
break;
- case SymLinkHandling::DIRECT:
+ case SymLinkHandling::direct:
output = "Direct";
break;
- case SymLinkHandling::FOLLOW:
+ case SymLinkHandling::follow:
output = "Follow";
break;
}
@@ -436,11 +436,11 @@ bool readText(const std::string& input, SymLinkHandling& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "Exclude")
- value = SymLinkHandling::EXCLUDE;
+ value = SymLinkHandling::exclude;
else if (tmp == "Direct")
- value = SymLinkHandling::DIRECT;
+ value = SymLinkHandling::direct;
else if (tmp == "Follow")
- value = SymLinkHandling::FOLLOW;
+ value = SymLinkHandling::follow;
else
return false;
return true;
@@ -448,20 +448,49 @@ bool readText(const std::string& input, SymLinkHandling& value)
template <> inline
+void writeText(const GridViewType& value, std::string& output)
+{
+ switch (value)
+ {
+ case GridViewType::category:
+ output = "Category";
+ break;
+ case GridViewType::action:
+ output = "Action";
+ break;
+ }
+}
+
+template <> inline
+bool readText(const std::string& input, GridViewType& value)
+{
+ const std::string tmp = trimCpy(input);
+ if (tmp == "Category")
+ value = GridViewType::category;
+ else if (tmp == "Action")
+ value = GridViewType::action;
+ else
+ return false;
+ return true;
+}
+
+
+
+template <> inline
void writeText(const ColumnTypeRim& value, std::string& output)
{
switch (value)
{
- case ColumnTypeRim::ITEM_PATH:
+ case ColumnTypeRim::path:
output = "Path";
break;
- case ColumnTypeRim::SIZE:
+ case ColumnTypeRim::size:
output = "Size";
break;
- case ColumnTypeRim::DATE:
+ case ColumnTypeRim::date:
output = "Date";
break;
- case ColumnTypeRim::EXTENSION:
+ case ColumnTypeRim::extension:
output = "Ext";
break;
}
@@ -472,13 +501,13 @@ bool readText(const std::string& input, ColumnTypeRim& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "Path")
- value = ColumnTypeRim::ITEM_PATH;
+ value = ColumnTypeRim::path;
else if (tmp == "Size")
- value = ColumnTypeRim::SIZE;
+ value = ColumnTypeRim::size;
else if (tmp == "Date")
- value = ColumnTypeRim::DATE;
+ value = ColumnTypeRim::date;
else if (tmp == "Ext")
- value = ColumnTypeRim::EXTENSION;
+ value = ColumnTypeRim::extension;
else
return false;
return true;
@@ -490,14 +519,14 @@ void writeText(const ItemPathFormat& value, std::string& output)
{
switch (value)
{
- case ItemPathFormat::FULL_PATH:
- output = "Full";
+ case ItemPathFormat::name:
+ output = "Item";
break;
- case ItemPathFormat::RELATIVE_PATH:
+ case ItemPathFormat::relative:
output = "Relative";
break;
- case ItemPathFormat::ITEM_NAME:
- output = "Item";
+ case ItemPathFormat::full:
+ output = "Full";
break;
}
}
@@ -506,12 +535,12 @@ template <> inline
bool readText(const std::string& input, ItemPathFormat& value)
{
const std::string tmp = trimCpy(input);
- if (tmp == "Full")
- value = ItemPathFormat::FULL_PATH;
+ if (tmp == "Item")
+ value = ItemPathFormat::name;
else if (tmp == "Relative")
- value = ItemPathFormat::RELATIVE_PATH;
- else if (tmp == "Item")
- value = ItemPathFormat::ITEM_NAME;
+ value = ItemPathFormat::relative;
+ else if (tmp == "Full")
+ value = ItemPathFormat::full;
else
return false;
return true;
@@ -555,13 +584,13 @@ void writeText(const ColumnTypeTree& value, std::string& output)
{
switch (value)
{
- case ColumnTypeTree::FOLDER_NAME:
+ case ColumnTypeTree::folder:
output = "Tree";
break;
- case ColumnTypeTree::ITEM_COUNT:
+ case ColumnTypeTree::itemCount:
output = "Count";
break;
- case ColumnTypeTree::BYTES:
+ case ColumnTypeTree::bytes:
output = "Bytes";
break;
}
@@ -572,11 +601,11 @@ bool readText(const std::string& input, ColumnTypeTree& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "Tree")
- value = ColumnTypeTree::FOLDER_NAME;
+ value = ColumnTypeTree::folder;
else if (tmp == "Count")
- value = ColumnTypeTree::ITEM_COUNT;
+ value = ColumnTypeTree::itemCount;
else if (tmp == "Bytes")
- value = ColumnTypeTree::BYTES;
+ value = ColumnTypeTree::bytes;
else
return false;
return true;
@@ -588,16 +617,16 @@ void writeText(const UnitSize& value, std::string& output)
{
switch (value)
{
- case UnitSize::NONE:
+ case UnitSize::none:
output = "None";
break;
- case UnitSize::BYTE:
+ case UnitSize::byte:
output = "Byte";
break;
- case UnitSize::KB:
+ case UnitSize::kb:
output = "KB";
break;
- case UnitSize::MB:
+ case UnitSize::mb:
output = "MB";
break;
}
@@ -608,13 +637,13 @@ bool readText(const std::string& input, UnitSize& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "None")
- value = UnitSize::NONE;
+ value = UnitSize::none;
else if (tmp == "Byte")
- value = UnitSize::BYTE;
+ value = UnitSize::byte;
else if (tmp == "KB")
- value = UnitSize::KB;
+ value = UnitSize::kb;
else if (tmp == "MB")
- value = UnitSize::MB;
+ value = UnitSize::mb;
else
return false;
return true;
@@ -625,19 +654,19 @@ void writeText(const UnitTime& value, std::string& output)
{
switch (value)
{
- case UnitTime::NONE:
+ case UnitTime::none:
output = "None";
break;
- case UnitTime::TODAY:
+ case UnitTime::today:
output = "Today";
break;
- case UnitTime::THIS_MONTH:
+ case UnitTime::thisMonth:
output = "Month";
break;
- case UnitTime::THIS_YEAR:
+ case UnitTime::thisYear:
output = "Year";
break;
- case UnitTime::LAST_X_DAYS:
+ case UnitTime::lastDays:
output = "x-days";
break;
}
@@ -648,15 +677,15 @@ bool readText(const std::string& input, UnitTime& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "None")
- value = UnitTime::NONE;
+ value = UnitTime::none;
else if (tmp == "Today")
- value = UnitTime::TODAY;
+ value = UnitTime::today;
else if (tmp == "Month")
- value = UnitTime::THIS_MONTH;
+ value = UnitTime::thisMonth;
else if (tmp == "Year")
- value = UnitTime::THIS_YEAR;
+ value = UnitTime::thisYear;
else if (tmp == "x-days")
- value = UnitTime::LAST_X_DAYS;
+ value = UnitTime::lastDays;
else
return false;
return true;
@@ -725,37 +754,37 @@ bool readText(const std::string& input, VersioningStyle& value)
template <> inline
-void writeText(const DirectionConfig::Variant& value, std::string& output)
+void writeText(const SyncVariant& value, std::string& output)
{
switch (value)
{
- case DirectionConfig::TWO_WAY:
+ case SyncVariant::twoWay:
output = "TwoWay";
break;
- case DirectionConfig::MIRROR:
+ case SyncVariant::mirror:
output = "Mirror";
break;
- case DirectionConfig::UPDATE:
+ case SyncVariant::update:
output = "Update";
break;
- case DirectionConfig::CUSTOM:
+ case SyncVariant::custom:
output = "Custom";
break;
}
}
template <> inline
-bool readText(const std::string& input, DirectionConfig::Variant& value)
+bool readText(const std::string& input, SyncVariant& value)
{
const std::string tmp = trimCpy(input);
if (tmp == "TwoWay")
- value = DirectionConfig::TWO_WAY;
+ value = SyncVariant::twoWay;
else if (tmp == "Mirror")
- value = DirectionConfig::MIRROR;
+ value = SyncVariant::mirror;
else if (tmp == "Update")
- value = DirectionConfig::UPDATE;
+ value = SyncVariant::update;
else if (tmp == "Custom")
- value = DirectionConfig::CUSTOM;
+ value = SyncVariant::custom;
else
return false;
return true;
@@ -1070,11 +1099,11 @@ void readConfig(const XmlIn& in, CompConfig& cmpCfg)
}
-void readConfig(const XmlIn& in, DirectionConfig& dirCfg)
+void readConfig(const XmlIn& in, SyncDirectionConfig& dirCfg)
{
in["Variant"](dirCfg.var);
- if (dirCfg.var == DirectionConfig::CUSTOM)
+ if (dirCfg.var == SyncVariant::custom)
{
XmlIn inCustDir = in["CustomDirections"];
inCustDir["LeftOnly" ](dirCfg.custom.exLeftSideOnly);
@@ -1377,9 +1406,8 @@ void readConfig(const XmlIn& in, XmlGuiConfig& cfg, int formatVer)
//read GUI specific config data
XmlIn inGuiCfg = in[formatVer < 10 ? "GuiConfig" : "Gui"]; //TODO: remove if parameter migration after some time! 2018-02-25
- std::string val;
- if (inGuiCfg["MiddleGridView"](val)) //refactor into enum!?
- cfg.highlightSyncAction = val == "Action";
+ inGuiCfg["MiddleGridView"](cfg.gridViewType);
+
//TODO: remove if clause after migration! 2017-10-24
if (formatVer < 8)
@@ -2019,11 +2047,11 @@ void writeConfig(const CompConfig& cmpCfg, XmlOut& out)
}
-void writeConfig(const DirectionConfig& dirCfg, XmlOut& out)
+void writeConfig(const SyncDirectionConfig& dirCfg, XmlOut& out)
{
out["Variant"](dirCfg.var);
- if (dirCfg.var == DirectionConfig::CUSTOM)
+ if (dirCfg.var == SyncVariant::custom)
{
XmlOut outCustDir = out["CustomDirections"];
outCustDir["LeftOnly" ](dirCfg.custom.exLeftSideOnly);
@@ -2164,7 +2192,7 @@ void writeConfig(const XmlGuiConfig& cfg, XmlOut& out)
//write GUI specific config data
XmlOut outGuiCfg = out["Gui"];
- outGuiCfg["MiddleGridView"](cfg.highlightSyncAction ? "Action" : "Category"); //refactor into enum!?
+ outGuiCfg["MiddleGridView"](cfg.gridViewType);
}
diff --git a/FreeFileSync/Source/config.h b/FreeFileSync/Source/config.h
index 58f26d99..76cd40ee 100644
--- a/FreeFileSync/Source/config.h
+++ b/FreeFileSync/Source/config.h
@@ -52,15 +52,15 @@ struct ExternalApp
struct XmlGuiConfig
{
MainConfiguration mainCfg;
- bool highlightSyncAction = true;
+ GridViewType gridViewType = GridViewType::action;
};
inline
bool operator==(const XmlGuiConfig& lhs, const XmlGuiConfig& rhs)
{
- return lhs.mainCfg == rhs.mainCfg &&
- lhs.highlightSyncAction == rhs.highlightSyncAction;
+ return lhs.mainCfg == rhs.mainCfg &&
+ lhs.gridViewType == rhs.gridViewType;
}
inline bool operator!=(const XmlGuiConfig& lhs, const XmlGuiConfig& rhs) { return !(lhs == rhs); }
@@ -98,9 +98,9 @@ inline bool operator!=(const ConfirmationDialogs& lhs, const ConfirmationDialogs
enum class FileIconSize
{
- SMALL,
- MEDIUM,
- LARGE
+ small,
+ medium,
+ large
};
@@ -193,7 +193,7 @@ struct XmlGlobalSettings
std::vector<Zstring> folderHistoryLeft;
std::vector<Zstring> folderHistoryRight;
bool showIcons = true;
- FileIconSize iconSize = FileIconSize::SMALL;
+ FileIconSize iconSize = FileIconSize::small;
int sashOffset = 0;
ItemPathFormat itemPathFormatLeftGrid = defaultItemPathFormatLeftGrid;
diff --git a/FreeFileSync/Source/icon_buffer.cpp b/FreeFileSync/Source/icon_buffer.cpp
index 9ae3ce83..a93b173d 100644
--- a/FreeFileSync/Source/icon_buffer.cpp
+++ b/FreeFileSync/Source/icon_buffer.cpp
@@ -7,10 +7,12 @@
#include "icon_buffer.h"
#include <map>
#include <set>
+#include <variant>
#include <zen/thread.h> //includes <std/thread.hpp>
#include <zen/scope_guard.h>
-#include <wx+/image_resources.h>
#include <wx+/dc.h>
+#include <wx+/image_resources.h>
+#include <wx+/image_tools.h>
#include "base/icon_loader.h"
@@ -21,29 +23,14 @@ using AFS = AbstractFileSystem;
namespace
{
-const size_t BUFFER_SIZE_MAX = 800; //maximum number of icons to hold in buffer: must be big enough to hold visible icons + preload buffer! Consider OS limit on GDI resources (wxBitmap)!!!
-
-
-//invalidates image holder! call from GUI thread only!
-wxBitmap extractWxBitmap(ImageHolder&& ih)
-{
- assert(runningMainThread());
-
- if (!ih.getRgb())
- return wxNullBitmap;
-
- wxImage img(ih.getWidth(), ih.getHeight(), ih.releaseRgb(), false /*static_data*/); //pass ownership
- if (ih.getAlpha())
- img.SetAlpha(ih.releaseAlpha(), false /*static_data*/);
- return wxBitmap(img);
-}
+const size_t BUFFER_SIZE_MAX = 1000; //maximum number of icons to hold in buffer: must be big enough to hold visible icons + preload buffer!
}
//################################################################################################################################################
-ImageHolder getDisplayIcon(const AbstractPath& itemPath, IconBuffer::IconSize sz)
+std::variant<ImageHolder, FileIconHolder> getDisplayIcon(const AbstractPath& itemPath, IconBuffer::IconSize sz)
{
//1. try to load thumbnails
switch (sz)
@@ -52,23 +39,27 @@ ImageHolder getDisplayIcon(const AbstractPath& itemPath, IconBuffer::IconSize sz
break;
case IconBuffer::SIZE_MEDIUM:
case IconBuffer::SIZE_LARGE:
- if (ImageHolder img = AFS::getThumbnailImage(itemPath, IconBuffer::getSize(sz)))
- return img;
+ try
+ {
+ if (ImageHolder ih = AFS::getThumbnailImage(itemPath, IconBuffer::getSize(sz))) //throw SysError; optional return value
+ return ih;
+ }
+ catch (SysError&) {}
//else: fallback to non-thumbnail icon
break;
}
- const Zstring& templateName = AFS::getItemName(itemPath);
-
//2. retrieve file icons
- if (ImageHolder ih = AFS::getFileIcon(itemPath, IconBuffer::getSize(sz)))
- return ih;
-
- //3. fallbacks
- if (ImageHolder ih = getIconByTemplatePath(templateName, IconBuffer::getSize(sz)))
- return ih;
+ try
+ {
+ if (FileIconHolder fih = AFS::getFileIcon(itemPath, IconBuffer::getSize(sz))) //throw SysError; optional return value
+ return fih;
+ }
+ catch (SysError&) {}
- return genericFileIcon(IconBuffer::getSize(sz));
+ //run getIconByTemplatePath()/genericFileIcon() fallbacks on main thread:
+ //extractWxImage() might fail if icon theme is missing a MIME type!
+ return ImageHolder();
}
//################################################################################################################################################
@@ -133,8 +124,9 @@ public:
return contains(iconList, filePath);
}
- //must be called by main thread only! => wxBitmap is NOT thread-safe like an int (non-atomic ref-count!!!)
- std::optional<wxBitmap> retrieve(const AbstractPath& filePath)
+ //- must be called by main thread only! => wxImage is NOT thread-safe like an int (non-atomic ref-count!!!)
+ //- check wxImage::IsOk() + implement fallback if needed
+ std::optional<wxImage> retrieve(const AbstractPath& filePath)
{
assert(runningMainThread());
std::lock_guard dummy(lockIconList_);
@@ -146,30 +138,44 @@ public:
markAsHot(it);
IconData& idata = refData(it);
- if (idata.iconRaw) //if not yet converted...
+
+ if (ImageHolder* ih = std::get_if<ImageHolder>(&idata.iconHolder))
{
- idata.iconFmt = std::make_unique<wxBitmap>(extractWxBitmap(std::move(idata.iconRaw))); //convert in main thread!
- assert(!idata.iconRaw);
+ if (*ih) //if not yet converted...
+ {
+ idata.iconFmt = std::make_unique<wxImage>(extractWxImage(std::move(*ih))); //convert in main thread!
+ assert(!*ih);
+ }
+ }
+ else
+ {
+ if (FileIconHolder& fih = std::get<FileIconHolder>(idata.iconHolder)) //if not yet converted...
+ {
+ idata.iconFmt = std::make_unique<wxImage>(extractWxImage(std::move(fih))); //convert in main thread!
+ assert(!fih);
+ //!idata.iconFmt->IsOk(): extractWxImage() might fail if icon theme is missing a MIME type!
+ }
}
- return idata.iconFmt ? *idata.iconFmt : wxNullBitmap; //idata.iconRaw may be inserted as empty from worker thread!
+
+ return idata.iconFmt ? *idata.iconFmt : wxNullImage; //idata.iconHolder may be inserted as empty from worker thread!
}
//called by main and worker thread:
- void insert(const AbstractPath& filePath, ImageHolder&& icon)
+ void insert(const AbstractPath& filePath, std::variant<ImageHolder, FileIconHolder>&& ih)
{
std::lock_guard dummy(lockIconList_);
- //thread safety: moving ImageHolder is free from side effects, but ~wxBitmap() is NOT! => do NOT delete items from iconList here!
+ //thread safety: moving ImageHolder is free from side effects, but ~wxImage() is NOT! => do NOT delete items from iconList here!
auto rc = iconList.emplace(filePath, IconData());
assert(rc.second); //insertion took place
if (rc.second)
{
- refData(rc.first).iconRaw = std::move(icon);
+ refData(rc.first).iconHolder = std::move(ih);
priorityListPushBack(rc.first);
}
}
- //must be called by main thread only! => ~wxBitmap() is NOT thread-safe!
+ //must be called by main thread only! => ~wxImage() is NOT thread-safe!
//call at an appropriate time, e.g. after Workload::set()
void limitSize()
{
@@ -249,15 +255,15 @@ private:
struct IconData
{
IconData() {}
- IconData(IconData&& tmp) noexcept : iconRaw(std::move(tmp.iconRaw)), iconFmt(std::move(tmp.iconFmt)), prev(tmp.prev), next(tmp.next) {}
+ IconData(IconData&& tmp) noexcept : iconHolder(std::move(tmp.iconHolder)), iconFmt(std::move(tmp.iconFmt)), prev(tmp.prev), next(tmp.next) {}
- ImageHolder iconRaw; //native icon representation: may be used by any thread
+ std::variant<ImageHolder, FileIconHolder> iconHolder; //native icon representation: may be used by any thread
- std::unique_ptr<wxBitmap> iconFmt; //use ONLY from main thread!
- //wxBitmap is NOT thread-safe: non-atomic ref-count just to begin with...
- //- prohibit implicit calls to wxBitmap(const wxBitmap&)
- //- prohibit calls to ~wxBitmap() and transitively ~IconData()
- //- prohibit even wxBitmap() default constructor - better be safe than sorry!
+ std::unique_ptr<wxImage> iconFmt; //use ONLY from main thread!
+ //wxImage is NOT thread-safe: non-atomic ref-count just to begin with...
+ //- prohibit implicit calls to wxImage()
+ //- prohibit calls to ~wxImage() and transitively ~IconData()
+ //- prohibit even wxImage() default constructor - better be safe than sorry!
FileIconMap::iterator prev; //store list sorted by time of insertion into buffer
FileIconMap::iterator next; //
@@ -283,7 +289,7 @@ struct IconBuffer::Impl
InterruptibleThread worker;
//-------------------------
//-------------------------
- std::map<Zstring, wxBitmap, LessAsciiNoCase> extensionIcons; //no item count limit!? Test case C:\ ~ 3800 unique file extensions
+ std::map<Zstring, wxImage, LessAsciiNoCase> extensionIcons; //no item count limit!? Test case C:\ ~ 3800 unique file extensions
};
@@ -319,7 +325,7 @@ int IconBuffer::getSize(IconSize sz)
switch (sz)
{
case IconBuffer::SIZE_SMALL:
- return fastFromDIP(24);
+ return getDefaultMenuIconSize();
case IconBuffer::SIZE_MEDIUM:
return fastFromDIP(48);
@@ -337,10 +343,16 @@ bool IconBuffer::readyForRetrieval(const AbstractPath& filePath)
}
-std::optional<wxBitmap> IconBuffer::retrieveFileIcon(const AbstractPath& filePath)
+std::optional<wxImage> IconBuffer::retrieveFileIcon(const AbstractPath& filePath)
{
- if (std::optional<wxBitmap> ico = pimpl_->buffer.retrieve(filePath))
- return ico;
+ const Zstring fileName = AFS::getItemName(filePath);
+ if (std::optional<wxImage> ico = pimpl_->buffer.retrieve(filePath))
+ {
+ if (ico->IsOk())
+ return ico;
+ else //fallback
+ return this->getIconByExtension(fileName); //buffered!
+ }
//since this icon seems important right now, we don't want to wait until next setWorkload() to start retrieving
pimpl_->workload.add(filePath);
@@ -358,7 +370,7 @@ void IconBuffer::setWorkload(const std::vector<AbstractPath>& load)
}
-wxBitmap IconBuffer::getIconByExtension(const Zstring& filePath)
+wxImage IconBuffer::getIconByExtension(const Zstring& filePath)
{
const Zstring& ext = getFileExtension(filePath);
@@ -369,37 +381,54 @@ wxBitmap IconBuffer::getIconByExtension(const Zstring& filePath)
{
const Zstring& templateName(ext.empty() ? Zstr("file") : Zstr("file.") + ext);
//don't pass actual file name to getIconByTemplatePath(), e.g. "AUTHORS" has own mime type on Linux!!!
- //=> we want to buffer by extension only to minimize buffer-misses!
+ //=> buffer by extension to minimize buffer-misses!
+
+ wxImage img;
+ try
+ {
+ img = extractWxImage(getIconByTemplatePath(templateName, getSize(iconSizeType_))); //throw SysError
+ }
+ catch (SysError&) {}
+ if (!img.IsOk()) //Linux: not all MIME types have icons!
+ img = IconBuffer::genericFileIcon(iconSizeType_);
- it = pimpl_->extensionIcons.emplace(ext, extractWxBitmap(getIconByTemplatePath(templateName, getSize(iconSizeType_)))).first;
+ it = pimpl_->extensionIcons.emplace(ext, img).first;
}
//need buffer size limit???
return it->second;
}
-wxBitmap IconBuffer::genericFileIcon(IconSize sz)
+wxImage IconBuffer::genericFileIcon(IconSize sz)
{
- return extractWxBitmap(fff::genericFileIcon(IconBuffer::getSize(sz)));
+ try
+ {
+ return extractWxImage(fff::genericFileIcon(IconBuffer::getSize(sz))); //throw SysError
+ }
+ catch (SysError&) { assert(false); return wxNullImage; }
}
-wxBitmap IconBuffer::genericDirIcon(IconSize sz)
+wxImage IconBuffer::genericDirIcon(IconSize sz)
{
- return extractWxBitmap(fff::genericDirIcon(IconBuffer::getSize(sz)));
+ try
+ {
+ return extractWxImage(fff::genericDirIcon(IconBuffer::getSize(sz))); //throw SysError
+ }
+ catch (SysError&) { assert(false); return wxNullImage; }
}
-wxBitmap IconBuffer::linkOverlayIcon(IconSize sz)
+wxImage IconBuffer::linkOverlayIcon(IconSize sz)
{
//coordinate with IconBuffer::getSize()!
- return getResourceImage([sz]
+ return loadImage([sz]
{
- const int pixelSize = IconBuffer::getSize(sz);
+ const int iconSize = IconBuffer::getSize(sz);
- if (pixelSize >= fastFromDIP(128)) return "link_128";
- if (pixelSize >= fastFromDIP(48)) return "link_48";
- if (pixelSize >= fastFromDIP(24)) return "link_24";
+ if (iconSize >= fastFromDIP(128)) return "link_128";
+ if (iconSize >= fastFromDIP( 48)) return "link_48";
+ if (iconSize >= fastFromDIP( 24)) return "link_24";
return "link_16";
}());
}
diff --git a/FreeFileSync/Source/icon_buffer.h b/FreeFileSync/Source/icon_buffer.h
index b5ce9eae..4220facf 100644
--- a/FreeFileSync/Source/icon_buffer.h
+++ b/FreeFileSync/Source/icon_buffer.h
@@ -10,7 +10,7 @@
#include <vector>
#include <memory>
#include <zen/zstring.h>
-#include <wx/bitmap.h>
+#include <wx/image.h>
#include "afs/abstract.h"
@@ -32,15 +32,15 @@ public:
static int getSize(IconSize sz); //expected and *maximum* icon size in pixel
int getSize() const { return getSize(iconSizeType_); } //
- void setWorkload (const std::vector<AbstractPath>& load); //(re-)set new workload of icons to be retrieved;
- bool readyForRetrieval(const AbstractPath& filePath);
- std::optional<wxBitmap> retrieveFileIcon (const AbstractPath& filePath); //... and mark as hot
- wxBitmap getIconByExtension(const Zstring& filePath); //...and add to buffer
+ void setWorkload (const std::vector<AbstractPath>& load); //(re-)set new workload of icons to be retrieved;
+ bool readyForRetrieval(const AbstractPath& filePath);
+ std::optional<wxImage> retrieveFileIcon (const AbstractPath& filePath); //... and mark as hot
+ wxImage getIconByExtension(const Zstring& filePath); //...and add to buffer
//retrieveFileIcon() + getIconByExtension() are safe to call from within WM_PAINT handler! no COM calls (...on calling thread)
- static wxBitmap genericFileIcon(IconSize sz);
- static wxBitmap genericDirIcon (IconSize sz);
- static wxBitmap linkOverlayIcon(IconSize sz);
+ static wxImage genericFileIcon(IconSize sz);
+ static wxImage genericDirIcon (IconSize sz);
+ static wxImage linkOverlayIcon(IconSize sz);
private:
struct Impl;
diff --git a/FreeFileSync/Source/log_file.cpp b/FreeFileSync/Source/log_file.cpp
index 0b6e25c2..067f48b1 100644
--- a/FreeFileSync/Source/log_file.cpp
+++ b/FreeFileSync/Source/log_file.cpp
@@ -44,8 +44,8 @@ std::string generateLogHeaderTxt(const ProcessSummary& s, const ErrorLog& log, i
const ErrorLog::Stats logCount = log.getStats();
- if (logCount.error + logCount.fatal > 0) summary.push_back(tabSpace + utfTo<std::string>(_("Errors:") + L' ' + formatNumber(logCount.error + logCount.fatal)));
- if (logCount.warning > 0) summary.push_back(tabSpace + utfTo<std::string>(_("Warnings:") + L' ' + formatNumber(logCount.warning)));
+ if (logCount.error > 0) summary.push_back(tabSpace + utfTo<std::string>(_("Errors:") + L' ' + formatNumber(logCount.error)));
+ if (logCount.warning > 0) summary.push_back(tabSpace + utfTo<std::string>(_("Warnings:") + L' ' + formatNumber(logCount.warning)));
summary.push_back(tabSpace + utfTo<std::string>(_("Items processed:") + L' ' + formatNumber(s.statsProcessed.items) + //show always, even if 0!
L" (" + formatFilesizeShort(s.statsProcessed.bytes) + L')'));
@@ -73,7 +73,7 @@ std::string generateLogHeaderTxt(const ProcessSummary& s, const ErrorLog& log, i
output += '|' + std::string(sepLineLen, '_') + "\n\n";
//------------ warnings/errors preview ----------------
- const int logFailTotal = logCount.warning + logCount.error + logCount.fatal;
+ const int logFailTotal = logCount.warning + logCount.error;
if (logFailTotal > 0)
{
output += '\n' + utfTo<std::string>(_("Errors and warnings:")) + '\n';
@@ -82,7 +82,7 @@ std::string generateLogHeaderTxt(const ProcessSummary& s, const ErrorLog& log, i
int previewCount = 0;
if (logFailsPreviewMax > 0)
for (const LogEntry& entry : log)
- if (entry.type & (MSG_TYPE_WARNING | MSG_TYPE_ERROR | MSG_TYPE_FATAL_ERROR))
+ if (entry.type & (MSG_TYPE_WARNING | MSG_TYPE_ERROR))
{
output += utfTo<std::string>(formatMessage(entry));
if (++previewCount >= logFailsPreviewMax)
@@ -158,10 +158,9 @@ std::string formatMessageHtml(const LogEntry& entry)
const char* typeImage = nullptr;
switch (entry.type)
{
- case MSG_TYPE_INFO: typeImage = "msg-info.png"; break;
- case MSG_TYPE_WARNING: typeImage = "msg-warning.png"; break;
- case MSG_TYPE_ERROR:
- case MSG_TYPE_FATAL_ERROR: typeImage = "msg-error.png"; break;
+ case MSG_TYPE_INFO: typeImage = "msg-info.png"; break;
+ case MSG_TYPE_WARNING: typeImage = "msg-warning.png"; break;
+ case MSG_TYPE_ERROR: typeImage = "msg-error.png"; break;
}
return R"( <tr>
@@ -244,12 +243,12 @@ std::string generateLogHeaderHtml(const ProcessSummary& s, const ErrorLog& log,
const ErrorLog::Stats logCount = log.getStats();
- if (logCount.error + logCount.fatal > 0)
+ if (logCount.error > 0)
output += R"(
<tr>
<td>)" + htmlTxt(_("Errors:")) + R"(</td>
<td><img src="https://freefilesync.org/images/log/msg-error.png" width="24" height="24" alt=""></td>
- <td><span style="font-weight:600;">)" + htmlTxt(formatNumber(logCount.error + logCount.fatal)) + R"(</span></td>
+ <td><span style="font-weight:600;">)" + htmlTxt(formatNumber(logCount.error)) + R"(</span></td>
</tr>)";
if (logCount.warning > 0)
@@ -292,7 +291,7 @@ std::string generateLogHeaderHtml(const ProcessSummary& s, const ErrorLog& log,
)";
//------------ warnings/errors preview ----------------
- const int logFailTotal = logCount.warning + logCount.error + logCount.fatal;
+ const int logFailTotal = logCount.warning + logCount.error;
if (logFailTotal > 0)
{
output += R"(
@@ -303,7 +302,7 @@ std::string generateLogHeaderHtml(const ProcessSummary& s, const ErrorLog& log,
int previewCount = 0;
if (logFailsPreviewMax > 0)
for (const LogEntry& entry : log)
- if (entry.type & (MSG_TYPE_WARNING | MSG_TYPE_ERROR | MSG_TYPE_FATAL_ERROR))
+ if (entry.type & (MSG_TYPE_WARNING | MSG_TYPE_ERROR))
{
output += formatMessageHtml(entry);
if (++previewCount >= logFailsPreviewMax)
@@ -421,6 +420,7 @@ void saveNewLogFile(const AbstractPath& logFilePath, //throw FileError, X
notifyStatus(msg_ + L" (" + formatFilesizeShort(bytesWritten_ += bytesDelta) + L')'); //throw X
};
+ //already existing: undefined behavior! (e.g. fail/overwrite/auto-rename)
std::unique_ptr<AFS::OutputStream> logFileStream = AFS::getOutputStream(logFilePath, std::nullopt /*streamSize*/, std::nullopt /*modTime*/, notifyUnbufferedIO); //throw FileError
streamToLogFile(summary, log, *logFileStream, logFilePath, logFormat); //throw FileError, X
logFileStream->finalize(); //throw FileError, X
diff --git a/FreeFileSync/Source/ui/abstract_folder_picker.cpp b/FreeFileSync/Source/ui/abstract_folder_picker.cpp
index c18c51fc..9108e5f4 100644
--- a/FreeFileSync/Source/ui/abstract_folder_picker.cpp
+++ b/FreeFileSync/Source/ui/abstract_folder_picker.cpp
@@ -94,11 +94,11 @@ AbstractFolderPickerDlg::AbstractFolderPickerDlg(wxWindow* parent, AbstractPath&
auto imgList = std::make_unique<wxImageList>(iconSize, iconSize);
//add images in same sequence like TreeNodeImage enum!!!
- imgList->Add(shrinkImage(getResourceImage("server").ConvertToImage(), iconSize));
+ imgList->Add(loadImage("server", iconSize));
imgList->Add( IconBuffer::genericDirIcon(IconBuffer::SIZE_SMALL));
- imgList->Add(layOver(IconBuffer::genericDirIcon(IconBuffer::SIZE_SMALL).ConvertToImage(),
- IconBuffer::linkOverlayIcon(IconBuffer::SIZE_SMALL).ConvertToImage()));
- imgList->Add(shrinkImage(getResourceImage("msg_error").ConvertToImage(), iconSize));
+ imgList->Add(layOver(IconBuffer::genericDirIcon(IconBuffer::SIZE_SMALL),
+ IconBuffer::linkOverlayIcon(IconBuffer::SIZE_SMALL)));
+ imgList->Add(loadImage("msg_error", iconSize));
assert(imgList->GetImageCount() == static_cast<int>(TreeNodeImage::error) + 1);
m_treeCtrlFileSystem->AssignImageList(imgList.release()); //pass ownership
diff --git a/FreeFileSync/Source/ui/app_icon.h b/FreeFileSync/Source/ui/app_icon.h
index 81ada20c..7eff5a03 100644
--- a/FreeFileSync/Source/ui/app_icon.h
+++ b/FreeFileSync/Source/ui/app_icon.h
@@ -18,10 +18,10 @@ wxIcon getFfsIcon()
{
using namespace zen;
//wxWidgets' bitmap to icon conversion on macOS can only deal with very specific sizes => check on all platforms!
- assert(getResourceImage("FreeFileSync").GetWidth () == getResourceImage("FreeFileSync").GetHeight() &&
- getResourceImage("FreeFileSync").GetWidth() == fastFromDIP(128));
+ assert(loadImage("FreeFileSync").GetWidth () == loadImage("FreeFileSync").GetHeight() &&
+ loadImage("FreeFileSync").GetWidth() == fastFromDIP(128));
wxIcon icon; //Ubuntu-Linux does a bad job at down-scaling in Unity dash (blocky icons!) => prepare:
- icon.CopyFromBitmap(getResourceImage("FreeFileSync").ConvertToImage().Scale(fastFromDIP(64), fastFromDIP(64), wxIMAGE_QUALITY_HIGH));
+ icon.CopyFromBitmap(loadImage("FreeFileSync", fastFromDIP(64)));
//no discernable difference bewteen wxIMAGE_QUALITY_HIGH/wxIMAGE_QUALITY_BILINEAR in this case
return icon;
diff --git a/FreeFileSync/Source/ui/batch_config.cpp b/FreeFileSync/Source/ui/batch_config.cpp
index 572d6143..9b604bd4 100644
--- a/FreeFileSync/Source/ui/batch_config.cpp
+++ b/FreeFileSync/Source/ui/batch_config.cpp
@@ -73,7 +73,7 @@ BatchDialog::BatchDialog(wxWindow* parent, BatchDialogConfig& dlgCfg) :
m_staticTextHeader->SetLabel(replaceCpy(m_staticTextHeader->GetLabel(), L"%x", L"FreeFileSync.exe <" + _("configuration file") + L">.ffs_batch"));
m_staticTextHeader->Wrap(fastFromDIP(520));
- m_bitmapBatchJob->SetBitmap(getResourceImage("file_batch"));
+ m_bitmapBatchJob->SetBitmap(loadImage("file_batch"));
enumPostSyncAction_.
add(PostSyncAction::none, L"").
@@ -97,12 +97,12 @@ void BatchDialog::updateGui() //re-evaluate gui after config changes
{
const BatchDialogConfig dlgCfg = getConfig(); //resolve parameter ownership: some on GUI controls, others member variables
- m_bitmapIgnoreErrors->SetBitmap(greyScaleIfDisabled(getResourceImage("error_ignore_active"), dlgCfg.ignoreErrors));
+ m_bitmapIgnoreErrors->SetBitmap(greyScaleIfDisabled(loadImage("error_ignore_active"), dlgCfg.ignoreErrors));
m_radioBtnErrorDialogShow ->Enable(!dlgCfg.ignoreErrors);
m_radioBtnErrorDialogCancel->Enable(!dlgCfg.ignoreErrors);
- m_bitmapMinimizeToTray->SetBitmap(greyScaleIfDisabled(getResourceImage("minimize_to_tray"), dlgCfg.batchExCfg.runMinimized));
+ m_bitmapMinimizeToTray->SetBitmap(greyScaleIfDisabled(loadImage("minimize_to_tray"), dlgCfg.batchExCfg.runMinimized));
}
diff --git a/FreeFileSync/Source/ui/batch_status_handler.cpp b/FreeFileSync/Source/ui/batch_status_handler.cpp
index 034946c4..e7ea1686 100644
--- a/FreeFileSync/Source/ui/batch_status_handler.cpp
+++ b/FreeFileSync/Source/ui/batch_status_handler.cpp
@@ -77,11 +77,11 @@ BatchStatusHandler::Result BatchStatusHandler::reportResults(const Zstring& post
{
if (getAbortStatus())
{
- errorLog_.logMsg(_("Stopped"), MSG_TYPE_ERROR); //= user cancel; *not* a MSG_TYPE_FATAL_ERROR!
+ errorLog_.logMsg(_("Stopped"), MSG_TYPE_ERROR); //= user cancel
return SyncResult::aborted;
}
const ErrorLog::Stats logCount = errorLog_.getStats();
- if (logCount.error + logCount.fatal > 0)
+ if (logCount.error > 0)
return SyncResult::finishedError;
else if (logCount.warning > 0)
return SyncResult::finishedWarning;
@@ -120,8 +120,8 @@ BatchStatusHandler::Result BatchStatusHandler::reportResults(const Zstring& post
//--------------------- post sync command ----------------------
if (const Zstring cmdLine = trimCpy(postSyncCommand);
!cmdLine.empty())
- if (postSyncCondition == PostSyncCondition::COMPLETION ||
- (postSyncCondition == PostSyncCondition::ERRORS) == (syncResult == SyncResult::aborted ||
+ if (postSyncCondition == PostSyncCondition::completion ||
+ (postSyncCondition == PostSyncCondition::errors) == (syncResult == SyncResult::aborted ||
syncResult == SyncResult::finishedError))
////----------------------------------------------------------------------
//::wxSetEnv(L"logfile_path", AFS::getDisplayPath(logFilePath));
@@ -372,7 +372,7 @@ void BatchStatusHandler::reportFatalError(const std::wstring& msg)
{
PauseTimers dummy(*progressDlg_);
- errorLog_.logMsg(msg, MSG_TYPE_FATAL_ERROR);
+ errorLog_.logMsg(msg, MSG_TYPE_ERROR);
if (!progressDlg_->getOptionIgnoreErrors())
switch (batchErrorHandling_)
@@ -382,14 +382,14 @@ void BatchStatusHandler::reportFatalError(const std::wstring& msg)
forceUiUpdateNoThrow(); //noexcept! => don't throw here when error occurs during clean up!
switch (showConfirmationDialog(progressDlg_->getWindowIfVisible(), DialogInfoType::error,
- PopupDialogCfg().setTitle(_("Serious Error")).
+ PopupDialogCfg().setTitle(_("Error")).
setDetailInstructions(msg),
_("&Ignore"), _("Ignore &all")))
{
- case ConfirmationButton2::accept:
+ case ConfirmationButton2::accept: //ignore
break;
- case ConfirmationButton2::acceptAll:
+ case ConfirmationButton2::acceptAll: //ignore all
progressDlg_->setOptionIgnoreErrors(true);
break;
diff --git a/FreeFileSync/Source/ui/cfg_grid.cpp b/FreeFileSync/Source/ui/cfg_grid.cpp
index 0e225f7a..e3385a37 100644
--- a/FreeFileSync/Source/ui/cfg_grid.cpp
+++ b/FreeFileSync/Source/ui/cfg_grid.cpp
@@ -12,6 +12,7 @@
#include <wx+/rtl.h>
#include <wx+/image_resources.h>
#include <wx+/popup_dlg.h>
+#include <wx+/image_tools.h>
#include <wx/settings.h>
#include "../icon_buffer.h"
#include "../ffs_paths.h"
@@ -276,7 +277,7 @@ public:
static int getRowDefaultHeight(const Grid& grid)
{
- return std::max(getResourceImage("msg_error_sicon").GetHeight(), grid.getMainWin().GetCharHeight()) + fastFromDIP(1); //+ some space
+ return std::max(getDefaultMenuIconSize(), grid.getMainWin().GetCharHeight()) + fastFromDIP(1); //+ some space
}
int getSyncOverdueDays() const { return syncOverdueDays_; }
@@ -376,7 +377,7 @@ private:
}
else //always show a glimpse of the background color
{
- rectTmp2.width = getColumnGapLeft() + fileIconSize_;
+ rectTmp2.width = getColumnGapLeft() + getDefaultMenuIconSize();
clearArea(dc, rectTmp2, item->cfgItem.backColor);
rectTmp2.x += rectTmp2.width;
@@ -389,25 +390,25 @@ private:
rectTmp.x += getColumnGapLeft();
rectTmp.width -= getColumnGapLeft();
- const wxBitmap cfgIcon = [&]
+ const wxImage cfgIcon = [&]
{
switch (item->cfgType)
{
case ConfigView::Details::CFG_TYPE_NONE:
- return wxNullBitmap;
+ return wxNullImage;
case ConfigView::Details::CFG_TYPE_GUI:
- return getResourceImage("file_sync_sicon");
+ return loadImage("file_sync_sicon");
case ConfigView::Details::CFG_TYPE_BATCH:
- return getResourceImage("file_batch_sicon");
+ return loadImage("file_batch_sicon");
}
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}();
if (cfgIcon.IsOk())
drawBitmapRtlNoMirror(dc, enabled ? cfgIcon : cfgIcon.ConvertToDisabled(), rectTmp, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
- rectTmp.x += fileIconSize_ + getColumnGapLeft();
- rectTmp.width -= fileIconSize_ + getColumnGapLeft();
+ rectTmp.x += getDefaultMenuIconSize() + getColumnGapLeft();
+ rectTmp.width -= getDefaultMenuIconSize() + getColumnGapLeft();
drawCellText(dc, rectTmp, getValue(row, colType));
}
@@ -428,25 +429,25 @@ private:
if (!item->isLastRunCfg &&
!AFS::isNullPath(item->cfgItem.logFilePath))
{
- const wxBitmap statusIcon = [&]
+ const wxImage statusIcon = [&]
{
switch (item->cfgItem.logResult)
{
case SyncResult::finishedSuccess:
- return getResourceImage("msg_success_sicon");
+ return loadImage("msg_success", getDefaultMenuIconSize());
case SyncResult::finishedWarning:
- return getResourceImage("msg_warning_sicon");
+ return loadImage("msg_warning", getDefaultMenuIconSize());
case SyncResult::finishedError:
case SyncResult::aborted:
- return getResourceImage("msg_error_sicon");
+ return loadImage("msg_error", getDefaultMenuIconSize());
}
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}();
drawBitmapRtlNoMirror(dc, enabled ? statusIcon : statusIcon.ConvertToDisabled(), rectTmp, wxALIGN_CENTER);
}
if (static_cast<HoverAreaLog>(rowHover) == HoverAreaLog::LINK)
- drawBitmapRtlNoMirror(dc, getResourceImage("link_16"), rectTmp, wxALIGN_CENTER);
+ drawBitmapRtlNoMirror(dc, loadImage("link_16"), rectTmp, wxALIGN_CENTER);
break;
}
}
@@ -458,13 +459,13 @@ private:
switch (static_cast<ColumnTypeCfg>(colType))
{
case ColumnTypeCfg::name:
- return getColumnGapLeft() + fileIconSize_ + getColumnGapLeft() + dc.GetTextExtent(getValue(row, colType)).GetWidth() + getColumnGapLeft();
+ return getColumnGapLeft() + getDefaultMenuIconSize() + getColumnGapLeft() + dc.GetTextExtent(getValue(row, colType)).GetWidth() + getColumnGapLeft();
case ColumnTypeCfg::lastSync:
return getColumnGapLeft() + dc.GetTextExtent(getValue(row, colType)).GetWidth() + getColumnGapLeft();
case ColumnTypeCfg::lastLog:
- return fileIconSize_;
+ return getDefaultMenuIconSize();
}
assert(false);
return 0;
@@ -496,11 +497,11 @@ private:
const wxRect rectInner = drawColumnLabelBackground(dc, rect, highlighted);
wxRect rectRemain = rectInner;
- wxBitmap sortMarker;
+ wxImage sortMarker;
if (const auto [sortCol, ascending] = cfgView_.getSortDirection();
colTypeCfg == sortCol)
{
- sortMarker = getResourceImage(ascending ? "sort_ascending" : "sort_descending");
+ sortMarker = loadImage(ascending ? "sort_ascending" : "sort_descending");
if (!enabled)
sortMarker = sortMarker.ConvertToDisabled();
}
@@ -519,7 +520,7 @@ private:
case ColumnTypeCfg::lastLog:
{
- const wxBitmap logIcon = getResourceImage("log_file_sicon");
+ const wxImage logIcon = loadImage("log_file_sicon");
drawBitmapRtlNoMirror(dc, enabled ? logIcon : logIcon.ConvertToDisabled(), rectInner, wxALIGN_CENTER);
if (sortMarker.IsOk())
@@ -614,7 +615,6 @@ private:
Grid& grid_;
ConfigView cfgView_;
int syncOverdueDays_ = 0;
- const int fileIconSize_ = getResourceImage("msg_error_sicon").GetHeight();
};
}
diff --git a/FreeFileSync/Source/ui/file_grid.cpp b/FreeFileSync/Source/ui/file_grid.cpp
index 01e4a037..85451e3d 100644
--- a/FreeFileSync/Source/ui/file_grid.cpp
+++ b/FreeFileSync/Source/ui/file_grid.cpp
@@ -31,22 +31,23 @@ const wxEventType fff::EVENT_GRID_SYNC_DIRECTION = wxNewEventType();
namespace
{
//let's NOT create wxWidgets objects statically:
-inline wxColor getColorOrange () { return { 238, 201, 0 }; }
-inline wxColor getColorGrey () { return { 212, 208, 200 }; }
-inline wxColor getColorYellow () { return { 247, 252, 62 }; }
-//inline wxColor getColorYellowLight() { return { 253, 252, 169 }; }
-inline wxColor getColorCmpRed () { return { 255, 185, 187 }; }
-inline wxColor getColorSyncBlue () { return { 185, 188, 255 }; }
-inline wxColor getColorSyncGreen() { return { 196, 255, 185 }; }
-inline wxColor getColorNotActive() { return { 228, 228, 228 }; } //light grey
-inline wxColor getColorGridLine () { return { 192, 192, 192 }; } //light grey
-
-const size_t ROW_COUNT_IF_NO_DATA = 0;
+inline wxColor getColorSyncBlue (bool faint) { if (faint) return { 0xed, 0xee, 0xff }; return { 185, 188, 255 }; }
+inline wxColor getColorSyncGreen(bool faint) { if (faint) return { 0xf1, 0xff, 0xed }; return { 196, 255, 185 }; }
+
+inline wxColor getColorConflictBackground (bool faint) { if (faint) return { 0xfe, 0xfe, 0xda }; return { 247, 252, 62 }; } //yellow
+inline wxColor getColorDifferentBackground(bool faint) { if (faint) return { 0xff, 0xed, 0xee }; return { 255, 185, 187 }; } //red
+
+inline wxColor getColorSymlinkBackground() { return { 238, 201, 0 }; } //orange
+inline wxColor getColorFolderBackground () { return { 212, 208, 200 }; } //grey
+
+inline wxColor getColorInactiveBack(bool faint) { if (faint) return { 0xf6, 0xf6, 0xf6}; return { 0xe4, 0xe4, 0xe4 }; } //light grey
+inline wxColor getColorInactiveText() { return { 0x40, 0x40, 0x40 }; } //dark grey
+
+inline wxColor getColorGridLine() { return { 192, 192, 192 }; } //light grey
+
const int FILE_GRID_GAP_SIZE_DIP = 2;
-/*
-class hierarchy:
- GridDataBase
+/* class hierarchy: GridDataBase
/|\
________________|________________
| |
@@ -54,8 +55,7 @@ class hierarchy:
/|\ |
__________|_________ |
| | |
- GridDataLeft GridDataRight GridDataCenter
-*/
+ GridDataLeft GridDataRight GridDataCenter */
std::pair<ptrdiff_t, ptrdiff_t> getVisibleRows(const Grid& grid) //returns range [from, to)
{
@@ -120,6 +120,64 @@ void fillBackgroundDefaultColorAlternating(wxDC& dc, const wxRect& rect, bool ev
}
+wxColor getBackGroundColorSyncAction(SyncOperation so, bool faint)
+{
+ switch (so)
+ {
+ case SO_DO_NOTHING:
+ return getColorInactiveBack(faint);
+ case SO_EQUAL:
+ break; //usually white
+
+ case SO_CREATE_NEW_LEFT:
+ case SO_OVERWRITE_LEFT:
+ case SO_DELETE_LEFT:
+ case SO_MOVE_LEFT_FROM:
+ case SO_MOVE_LEFT_TO:
+ case SO_COPY_METADATA_TO_LEFT:
+ return getColorSyncBlue(faint);
+
+ case SO_CREATE_NEW_RIGHT:
+ case SO_OVERWRITE_RIGHT:
+ case SO_DELETE_RIGHT:
+ case SO_MOVE_RIGHT_FROM:
+ case SO_MOVE_RIGHT_TO:
+ case SO_COPY_METADATA_TO_RIGHT:
+ return getColorSyncGreen(faint);
+
+ case SO_UNRESOLVED_CONFLICT:
+ return getColorConflictBackground(faint);
+ }
+ return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
+}
+
+
+wxColor getBackGroundColorCmpCategory(CompareFileResult cmpResult, bool faint)
+{
+ switch (cmpResult)
+ {
+ case FILE_LEFT_SIDE_ONLY:
+ case FILE_LEFT_NEWER:
+ return getColorSyncBlue(faint);
+
+ case FILE_RIGHT_SIDE_ONLY:
+ case FILE_RIGHT_NEWER:
+ return getColorSyncGreen(faint);
+
+ case FILE_DIFFERENT_CONTENT:
+ return getColorDifferentBackground(faint);
+
+ case FILE_EQUAL:
+ break; //usually white
+
+ case FILE_CONFLICT:
+ case FILE_DIFFERENT_METADATA: //= sub-category of equal, but hint via background that sync direction follows conflict-setting
+ return getColorConflictBackground(faint);
+ }
+ return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
+}
+
+
class IconUpdater;
class GridEventManager;
class GridDataLeft;
@@ -136,51 +194,108 @@ struct IconManager
void startIconUpdater();
IconBuffer& refIconBuffer() { return iconBuffer_; }
- const wxBitmap& getGenericDirIcon () const { return dirIcon_; }
- const wxBitmap& getLinkOverlayIcon() const { return linkOverlayIcon_; }
+ const wxImage& getGenericDirIcon () const { return dirIcon_; }
+ const wxImage& getLinkOverlayIcon() const { return linkOverlayIcon_; }
private:
IconBuffer iconBuffer_;
- const wxBitmap dirIcon_;
- const wxBitmap linkOverlayIcon_;
+ const wxImage dirIcon_;
+ const wxImage linkOverlayIcon_;
std::unique_ptr<IconUpdater> iconUpdater_; //bind ownership to GridDataRim<>!
};
+
+//mark rows selected on overview panel
+class NavigationMarker
+{
+public:
+ NavigationMarker() {}
+
+ void set(std::unordered_set<const FileSystemObject*>&& markedFilesAndLinks,
+ std::unordered_set<const ContainerObject*>&& markedContainer)
+ {
+ markedFilesAndLinks_.swap(markedFilesAndLinks);
+ markedContainer_ .swap(markedContainer);
+ }
+
+ bool isMarked(const FileSystemObject& fsObj) const
+ {
+ if (contains(markedFilesAndLinks_, &fsObj)) //mark files/links directly
+ return true;
+
+ if (auto folder = dynamic_cast<const FolderPair*>(&fsObj))
+ if (contains(markedContainer_, folder)) //mark folders which *are* the given ContainerObject*
+ return true;
+
+ //also mark all items with any matching ancestors
+ for (const FileSystemObject* fsObj2 = &fsObj;;)
+ {
+ const ContainerObject& parent = fsObj2->parent();
+ if (contains(markedContainer_, &parent))
+ return true;
+
+ fsObj2 = dynamic_cast<const FolderPair*>(&parent);
+ if (!fsObj2)
+ break;
+ }
+ return false;
+ }
+
+private:
+ std::unordered_set<const FileSystemObject*> markedFilesAndLinks_; //mark files/symlinks directly within a container
+ std::unordered_set<const ContainerObject*> markedContainer_; //mark full container including all child-objects
+ //DO NOT DEREFERENCE!!!! NOT GUARANTEED TO BE VALID!!!
+};
+
+
+struct SharedComponents //...between left, center, and right grids
+{
+ FileView gridDataView;
+ std::unique_ptr<IconManager> iconMgr;
+ NavigationMarker navMarker;
+ std::unique_ptr<GridEventManager> evtMgr;
+ GridViewType gridViewType = GridViewType::action;
+};
+
//########################################################################################################
class GridDataBase : public GridData
{
public:
- GridDataBase(Grid& grid, const SharedRef<FileView>& gridDataView) : grid_(grid), gridDataView_(gridDataView) {}
+ GridDataBase(Grid& grid, const SharedRef<SharedComponents>& sharedComp) :
+ grid_(grid), sharedComp_(sharedComp) {}
- void holdOwnership(const std::shared_ptr<GridEventManager>& evtMgr) { evtMgr_ = evtMgr; }
+ GridEventManager* getEventManager() { return sharedComp_.ref().evtMgr.get(); }
- GridEventManager* getEventManager() { return evtMgr_.get(); }
+ /**/ FileView& getDataView() { return sharedComp_.ref().gridDataView; }
+ const FileView& getDataView() const { return sharedComp_.ref().gridDataView; }
- /**/ FileView& getDataView() { return gridDataView_.ref(); }
- const FileView& getDataView() const { return gridDataView_.ref(); }
+ void setIconManager(std::unique_ptr<IconManager> iconMgr) { sharedComp_.ref().iconMgr = std::move(iconMgr); }
-protected:
- /**/
- Grid& refGrid() { return grid_; }
+ IconManager* getIconManager() { return sharedComp_.ref().iconMgr.get(); }
+
+ GridViewType getViewType() const { return sharedComp_.ref().gridViewType; }
+ void setViewType(GridViewType vt) { sharedComp_.ref().gridViewType = vt; }
+
+ bool isNavMarked(const FileSystemObject& fsObj) const { return sharedComp_.ref().navMarker.isMarked(fsObj); }
+
+ void setNavigationMarker(std::unordered_set<const FileSystemObject*>&& markedFilesAndLinks,
+ std::unordered_set<const ContainerObject*>&& markedContainer)
+ {
+ sharedComp_.ref().navMarker.set(std::move(markedFilesAndLinks), std::move(markedContainer));
+ }
+
+ Grid& refGrid() { return grid_; }
const Grid& refGrid() const { return grid_; }
const FileSystemObject* getFsObject(size_t row) const { return getDataView().getFsObject(row); }
private:
- size_t getRowCount() const override
- {
- if (gridDataView_.ref().rowsTotal() == 0)
- return ROW_COUNT_IF_NO_DATA;
-
- return gridDataView_.ref().rowsOnView();
- //return std::max(MIN_ROW_COUNT, gridDataView_ ? gridDataView_->rowsOnView() : 0);
- }
+ size_t getRowCount() const override { return getDataView().rowsOnView(); }
- std::shared_ptr<GridEventManager> evtMgr_;
Grid& grid_;
- SharedRef<FileView> gridDataView_;
+ SharedRef<SharedComponents> sharedComp_;
};
//########################################################################################################
@@ -189,15 +304,13 @@ template <SelectedSide side>
class GridDataRim : public GridDataBase
{
public:
- GridDataRim(const SharedRef<FileView>& gridDataView, Grid& grid) : GridDataBase(grid, gridDataView) {}
-
- void setIconManager(const std::shared_ptr<IconManager>& iconMgr) { iconMgr_ = iconMgr; }
+ GridDataRim(Grid& grid, const SharedRef<SharedComponents>& sharedComp) : GridDataBase(grid, sharedComp) {}
void setItemPathForm(ItemPathFormat fmt) { itemPathFormat_ = fmt; }
void getUnbufferedIconsForPreload(std::vector<std::pair<ptrdiff_t, AbstractPath>>& newLoad) //return (priority, filepath) list
{
- if (iconMgr_)
+ if (IconManager* iconMgr = getIconManager())
{
const auto& rowsOnScreen = getVisibleRows(refGrid());
const ptrdiff_t visibleRowCount = rowsOnScreen.second - rowsOnScreen.first;
@@ -211,8 +324,8 @@ public:
const ptrdiff_t currentRow = rowsOnScreen.first - (preloadSize + 1) / 2 + getAlternatingPos(i, visibleRowCount + preloadSize); //for odd preloadSize start one row earlier
const IconInfo ii = getIconInfo(currentRow);
- if (ii.type == IconInfo::ICON_PATH)
- if (!iconMgr_->refIconBuffer().readyForRetrieval(ii.fsObj->template getAbstractPath<side>()))
+ if (ii.type == IconType::standard)
+ if (!iconMgr->refIconBuffer().readyForRetrieval(ii.fsObj->template getAbstractPath<side>()))
newLoad.emplace_back(i, ii.fsObj->template getAbstractPath<side>()); //insert least-important items on outer rim first
}
}
@@ -220,7 +333,7 @@ public:
void updateNewAndGetUnbufferedIcons(std::vector<AbstractPath>& newLoad) //loads all not yet drawn icons
{
- if (iconMgr_)
+ if (IconManager* iconMgr = getIconManager())
{
const auto& rowsOnScreen = getVisibleRows(refGrid());
const ptrdiff_t visibleRowCount = rowsOnScreen.second - rowsOnScreen.first;
@@ -233,13 +346,13 @@ public:
if (isFailedLoad(currentRow)) //find failed attempts to load icon
if (const IconInfo ii = getIconInfo(currentRow);
- ii.type == IconInfo::ICON_PATH)
+ ii.type == IconType::standard)
{
//test if they are already loaded in buffer:
- if (iconMgr_->refIconBuffer().readyForRetrieval(ii.fsObj->template getAbstractPath<side>()))
+ if (iconMgr->refIconBuffer().readyForRetrieval(ii.fsObj->template getAbstractPath<side>()))
{
//do a *full* refresh for *every* failed load to update partial DC updates while scrolling
- refGrid().refreshCell(currentRow, static_cast<ColumnType>(ColumnTypeRim::ITEM_PATH));
+ refGrid().refreshCell(currentRow, static_cast<ColumnType>(ColumnTypeRim::path));
setFailedLoad(currentRow, false);
}
else //not yet in buffer: mark for async. loading
@@ -271,74 +384,86 @@ private:
protected:
void renderRowBackgound(wxDC& dc, const wxRect& rect, size_t row, bool enabled, bool selected) override
{
+ const FileView::PathDrawInfo pdi = getDataView().getDrawInfo(row);
+ bool drawBottomLine = pdi.isLastGroupItem;
+
if (enabled && !selected)
{
- if (const DisplayType dispTp = getRowDisplayType(row);
- dispTp == DisplayType::NORMAL)
- //alternate background color to improve readability (while lacking cell borders)
- fillBackgroundDefaultColorAlternating(dc, rect, row % 2 == 0);
- else
+ const wxColor backCol = [&]
{
- clearArea(dc, rect, getBackGroundColor(row));
+ const DisplayType dispTp = getObjectDisplayType(pdi.fsObj);
+
+ //highlight empty status by repeating middle grid colors
+ if (pdi.fsObj && pdi.fsObj->isEmpty<side>())
+ {
+ if (dispTp == DisplayType::inactive)
+ return getColorInactiveBack(true /*faint*/);
+
+ switch (getViewType())
+ {
+ case GridViewType::category:
+ return getBackGroundColorCmpCategory(pdi.fsObj->getCategory(), true /*faint*/);
+ case GridViewType::action:
+ return getBackGroundColorSyncAction(pdi.fsObj->getSyncOperation(), true /*faint*/);
+ }
+ }
+
+ if (dispTp == DisplayType::normal)
+ {
+ //alternate background color to improve readability (without using cell borders)
+ fillBackgroundDefaultColorAlternating(dc, rect, row % 2 == 0);
+ return wxNullColour;
+ }
//draw horizontal border if required
- if (dispTp == getRowDisplayType(row + 1))
+ if (const DisplayType dispTpNext = getObjectDisplayType(getFsObject(row + 1));
+ dispTp == dispTpNext)
+ drawBottomLine = true;
+
+ switch (dispTp)
{
- wxDCPenChanger dummy2(dc, getColorGridLine());
- dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0));
+ //*INDENT-OFF*
+ case DisplayType::normal: break;
+ case DisplayType::folder: return getColorFolderBackground();
+ case DisplayType::symlink: return getColorSymlinkBackground();
+ case DisplayType::inactive: return getColorInactiveBack(false /*faint*/);
+ //*INDENT-ON*
}
- }
+ assert(false);
+ return wxNullColour;
+ }();
+ if (backCol.IsOk())
+ clearArea(dc, rect, backCol);
}
else
GridData::renderRowBackgound(dc, rect, row, enabled, enabled && selected);
- }
- wxColor getBackGroundColor(size_t row) const
- {
- //accessibility: always set both foreground AND background colors!
- // => harmonize with renderCell()!
-
- switch (getRowDisplayType(row))
+ //----------------------------------------------------------------------------------
+ if (drawBottomLine)
{
- case DisplayType::NORMAL:
- break;
- case DisplayType::FOLDER:
- return getColorGrey();
- case DisplayType::SYMLINK:
- return getColorOrange();
- case DisplayType::INACTIVE:
- return getColorNotActive();
+ wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), fastFromDIP(1)));
+ dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0));
}
- return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
}
private:
enum class DisplayType
{
- NORMAL,
- FOLDER,
- SYMLINK,
- INACTIVE,
+ inactive,
+ normal,
+ folder,
+ symlink,
};
-
- DisplayType getRowDisplayType(size_t row) const
+ DisplayType getObjectDisplayType(const FileSystemObject* fsObj) const
{
- const FileSystemObject* fsObj = getFsObject(row);
- if (!fsObj )
- return DisplayType::NORMAL;
+ if (!fsObj || !fsObj->isActive())
+ return DisplayType::inactive;
- //mark filtered rows
- if (!fsObj->isActive())
- return DisplayType::INACTIVE;
+ DisplayType output = DisplayType::normal;
- if (fsObj->isEmpty<side>()) //always show not existing files/dirs/symlinks as empty
- return DisplayType::NORMAL;
-
- DisplayType output = DisplayType::NORMAL;
- //mark directories and symlinks
- visitFSObject(*fsObj, [&](const FolderPair& folder) { output = DisplayType::FOLDER; },
+ visitFSObject(*fsObj, [&](const FolderPair& folder) { output = DisplayType::folder; },
[](const FilePair& file) {},
- [&](const SymlinkPair& symlink) { output = DisplayType::SYMLINK; });
+ [&](const SymlinkPair& symlink) { output = DisplayType::symlink; });
return output;
}
@@ -350,33 +475,33 @@ private:
if (!fsObj->isEmpty<side>())
switch (static_cast<ColumnTypeRim>(colType))
{
- case ColumnTypeRim::ITEM_PATH:
+ case ColumnTypeRim::path:
switch (itemPathFormat_)
{
- case ItemPathFormat::FULL_PATH:
- return AFS::getDisplayPath(fsObj->getAbstractPath<side>());
- case ItemPathFormat::RELATIVE_PATH:
- return utfTo<std::wstring>(fsObj->getRelativePath<side>());
- case ItemPathFormat::ITEM_NAME:
+ case ItemPathFormat::name:
return utfTo<std::wstring>(fsObj->getItemName<side>());
+ case ItemPathFormat::relative:
+ return utfTo<std::wstring>(fsObj->getRelativePath<side>());
+ case ItemPathFormat::full:
+ return AFS::getDisplayPath(fsObj->getAbstractPath<side>());
}
assert(false);
break;
- case ColumnTypeRim::SIZE:
+ case ColumnTypeRim::size:
visitFSObject(*fsObj, [&](const FolderPair& folder) { value = L"<" + _("Folder") + L">"; },
[&](const FilePair& file) { value = formatNumber(file.getFileSize<side>()); },
- //[&](const FilePair& file) { value = utfTo<std::wstring>(file.getFileId<side>()); }, // -> test file id
+ //[&](const FilePair& file) { value = utfTo<std::wstring>(formatAsHexString(file.getFileId<side>())); }, // -> test file id
[&](const SymlinkPair& symlink) { value = L"<" + _("Symlink") + L">"; });
break;
- case ColumnTypeRim::DATE:
+ case ColumnTypeRim::date:
visitFSObject(*fsObj, [](const FolderPair& folder) {},
[&](const FilePair& file) { value = formatUtcToLocalTime(file .getLastWriteTime<side>()); },
[&](const SymlinkPair& symlink) { value = formatUtcToLocalTime(symlink.getLastWriteTime<side>()); });
break;
- case ColumnTypeRim::EXTENSION:
+ case ColumnTypeRim::extension:
visitFSObject(*fsObj, [](const FolderPair& folder) {},
[&](const FilePair& file) { value = utfTo<std::wstring>(getFileExtension(file .getItemName<side>())); },
[&](const SymlinkPair& symlink) { value = utfTo<std::wstring>(getFileExtension(symlink.getItemName<side>())); });
@@ -394,234 +519,256 @@ private:
if (const FileView::PathDrawInfo pdi = getDataView().getDrawInfo(row);
pdi.fsObj)
{
+ const DisplayType dispTp = getObjectDisplayType(pdi.fsObj);
+
wxDCTextColourChanger textColor(dc);
- if (!pdi.fsObj->isActive())
- textColor.Set(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
- else if (getRowDisplayType(row) != DisplayType::NORMAL)
- textColor.Set(*wxBLACK); //accessibility: always set both foreground AND background colors!
+ //accessibility: always set both foreground AND background colors!
+ if (enabled && !selected) //=> coordinate with renderRowBackgound()
+ {
+ if (dispTp == DisplayType::inactive)
+ textColor.Set(getColorInactiveText());
+ else if (dispTp != DisplayType::normal)
+ textColor.Set(*wxBLACK);
+ }
wxRect rectTmp = rect;
switch (static_cast<ColumnTypeRim>(colType))
{
- case ColumnTypeRim::ITEM_PATH:
+ case ColumnTypeRim::path:
{
- const bool isTopRow = row == refGrid().getTopRow();
+ const size_t topRow = refGrid().getTopRow();
+ //exception for readability: top row is always group start!
+ const size_t groupStartRow = pdi.groupStartRow >= topRow ? pdi.groupStartRow : topRow;
+
+ const FileView::PathDrawInfo pdiGroupStart = row == groupStartRow ? pdi : getDataView().getDrawInfo(groupStartRow);
+
+ //caveat: pdiGroupStart.fsObj may be nullptr!
+ const bool singleItemGroup = pdiGroupStart.isLastGroupItem;
+ const bool groupStartIsFolder = dynamic_cast<const FolderPair*>(pdiGroupStart.fsObj);
+
+ const auto groupObj = [&]() -> const FileSystemObject*
+ {
+ if (singleItemGroup)
+ return pdi.fsObj;
+
+ if (groupStartIsFolder)
+ return pdiGroupStart.fsObj;
+
+ assert(!pdiGroupStart.fsObj || &pdiGroupStart.fsObj->parent() == &pdi.fsObj->parent());
+ return dynamic_cast<const FolderPair*>(&pdi.fsObj->parent());
+ }();
+
+ IconManager* const iconMgr = getIconManager();
+ const int childIndent = iconMgr ? iconMgr->refIconBuffer().getSize() : IconBuffer::getSize(IconBuffer::SIZE_SMALL);
+ const int iconSize = iconMgr ? iconMgr->refIconBuffer().getSize() : 0;
+
+ auto drawIcon = [&](const wxImage& icon, wxRect rectIcon)
+ {
+ rectIcon.width = iconSize; //support small thumbnail centering
+
+ if (pdi.fsObj->isActive())
+ drawBitmapRtlNoMirror(dc, icon, rectIcon, wxALIGN_CENTER);
+ else
+ drawBitmapRtlNoMirror(dc, icon.ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3), //treat all channels equally!
+ rectIcon, wxALIGN_CENTER);
+ };
std::wstring itemName;
if (!pdi.fsObj->isEmpty<side>())
itemName = utfTo<std::wstring>(pdi.fsObj->getItemName<side>());
- std::vector<const ContainerObject*> parentComponents; //excluding leaf component
- std::span<const unsigned char> pathDrawInfo; //including leaf component
-
+ std::wstring groupName;
+ std::wstring groupParentFolder;
switch (itemPathFormat_)
{
- case ItemPathFormat::FULL_PATH:
- for (const FileSystemObject* fsObj2 = pdi.fsObj;;)
- {
- const ContainerObject& parent = fsObj2->parent();
- parentComponents.push_back(&parent);
-
- fsObj2 = dynamic_cast<const FolderPair*>(&parent);
- if (!fsObj2)
- break;
- }
- std::reverse(parentComponents.begin(), parentComponents.end());
-
- assert(pdi.pathDrawInfo.size() == parentComponents.size() + 1);
- pathDrawInfo = pdi.pathDrawInfo;
+ case ItemPathFormat::name:
break;
- case ItemPathFormat::RELATIVE_PATH:
- for (const FileSystemObject* fsObj2 = pdi.fsObj;;)
+ case ItemPathFormat::relative:
+ if (groupObj)
{
- const ContainerObject& parent = fsObj2->parent();
-
- fsObj2 = dynamic_cast<const FolderPair*>(&parent);
- if (!fsObj2)
- break;
- parentComponents.push_back(&parent);
+ groupName = utfTo<std::wstring>(groupObj->template getItemName<side>());
+ groupParentFolder = utfTo<std::wstring>(groupObj->parent().template getRelativePath<side>());
}
- std::reverse(parentComponents.begin(), parentComponents.end());
-
- assert(pdi.pathDrawInfo.size() == parentComponents.size() + 2);
- if (!pdi.pathDrawInfo.empty())
- pathDrawInfo = pdi.pathDrawInfo.subspan(1);
break;
- case ItemPathFormat::ITEM_NAME:
- assert(!pdi.pathDrawInfo.empty());
- if (!pdi.pathDrawInfo.empty())
- pathDrawInfo = pdi.pathDrawInfo.subspan(pdi.pathDrawInfo.size() - 1);
+ case ItemPathFormat::full:
+ if (groupObj)
+ {
+ groupName = utfTo<std::wstring>(groupObj->template getItemName<side>());
+ groupParentFolder = AFS::getDisplayPath(groupObj->parent().template getAbstractPath<side>());
+ }
+ else //=> BaseFolderPair
+ groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath<side>());
break;
}
-
- /* Partitioning:
- _________________________________________________________________
- | (gap | component name | gap | dash)* | icon | gap | item name |
- ----------------------------------------------------------------- */
-
- //calculate parent component render details
- std::vector<std::pair<std::wstring, wxSize>> parentNameExtents;
- parentNameExtents.reserve(parentComponents.size());
- int parentsRenderWidth = 0; //total width of rendering parent components
- for (const ContainerObject* parent : parentComponents)
+ if (!iconMgr) //add slashes for better readability
{
- const FolderPair* folder = dynamic_cast<const FolderPair*>(parent);
- std::wstring compName = folder ? utfTo<std::wstring>(folder->getItemName<side>()) :
- AFS::getDisplayPath(parent->getAbstractPath<side>());
- const wxSize compExt = getTextExtentBuffered(dc, compName);
-
- parentNameExtents.emplace_back(std::move(compName), compExt);
- parentsRenderWidth += gridGap_ + compExt.GetWidth() + gridGap_ + compLineExtent_.GetWidth();
+ if (!endsWith(groupParentFolder, L'/' ) &&
+ !endsWith(groupParentFolder, L'\\') &&
+ !groupParentFolder.empty()) groupParentFolder += FILE_NAME_SEPARATOR;
+ if (!groupName .empty()) groupName += FILE_NAME_SEPARATOR;
}
-
- //limit space for parent components: prioritize item name rendering!
- int itemRenderWidth = 0;
- if (!itemName.empty())
+ //path components should follow the app layout direction and are NOT a single piece of text!
+ //caveat: add Bidi support only during rendering and not in getValue() or AFS::getDisplayPath(): e.g. support "open file in Explorer"
+ assert(!contains(groupParentFolder, slashBidi_) && !contains(groupParentFolder, bslashBidi_));
+ replace(groupParentFolder, L'/', slashBidi_);
+ replace(groupParentFolder, L'\\', bslashBidi_);
+
+ const wxSize groupNameExt = getTextExtentBuffered(dc, groupName);
+ const wxSize groupParentExt = getTextExtentBuffered(dc, groupParentFolder);
+
+ /* Partitioning: single-item group
+ _____________________________ ____________________________
+ | gap | (parent path | gap) | | (icon | gap) | item name |
+ ----------------------------- ----------------------------
+
+ multi-item group (with folder-head):
+ ______________________________ _____________________________
+ | gap | (group parent | gap) | | (icon | gap) | group name |
+ ----------------------------------------------------------------------------
+ | <indent> -> | (childIndent) | | (icon | gap) | item name |
+ ---------------------------------------------- ----------------------------
+
+ multi-item group (files only)
+ _____________________________________________________________ ____________________________
+ | gap | (group parent | gap | (childIndent)) | | (icon | gap) | item name |
+ ------------------------------------------------------------- ----------------------------
+ | gap | <right-aligned> ((icon | gap) | group name | gap) | | (icon | gap) | item name | <- group name only on second row
+ ------------------------------------------------------------- ---------------------------- */
+ int parentsRenderWidth = 0;
+ if (singleItemGroup || groupStartIsFolder)
{
- if (iconMgr_)
- itemRenderWidth += iconMgr_->refIconBuffer().getSize();
- itemRenderWidth += gridGap_ + getTextExtentBuffered(dc, itemName).GetWidth();
+ parentsRenderWidth = gridGap_ + (groupParentFolder.empty() ? 0 : groupParentExt.GetWidth() + gridGap_);
+ //indent child items slightly after parent folder icon
+ if (row != groupStartRow && !groupName.empty() /*for ItemPathFormat::name*/)
+ parentsRenderWidth += childIndent;
}
+ else
+ parentsRenderWidth = std::max(gridGap_ + (groupParentFolder.empty() ? 0 : groupParentExt.GetWidth() + gridGap_ + (groupName.empty() ? 0 : childIndent)),
+ gridGap_ + (groupName.empty() ? 0 : (iconSize > 0 ? iconSize + gridGap_ : 0) + groupNameExt.GetWidth() + gridGap_));
- wxRect rectParents = rectTmp;
- rectParents.width = std::min(rectTmp.width - itemRenderWidth, parentsRenderWidth);
+ //reserve space for leaf component rendering (at the expense of parent path)
+ //=> don't reserve more: e.g. showing file name conflicts with horizontal position indicating hierarchy!
+ const int leafReservedWidth = itemName.empty() ? 0 : childIndent;
- wxRect rectItem = rectTmp;
- rectItem.x += std::max(0, rectParents.width);
- rectItem.width -= std::max(0, rectParents.width);
+ wxRect rectParents = rectTmp;
+ rectParents.width = std::min(parentsRenderWidth, rectTmp.width - leafReservedWidth);
+ wxRect rectLeaf = rectTmp;
+ rectLeaf.x += std::max(0, rectParents.width);
+ rectLeaf.width -= std::max(0, rectParents.width);
+ //-------------------------------------------------------------------------
- assert(pathDrawInfo.size() == parentComponents.size() + 1);
- if (pathDrawInfo.size() == parentComponents.size() + 1 && rectParents.width > 0)
{
- //clear background below components => harmonize with renderRowBackgound()
- if (enabled && !selected) //clearArea() is surprisingly expensive => call just once!
+ //clear background below parent path => harmonize with renderRowBackgound()
+ wxDCTextColourChanger textColorParents(dc);
+ if (enabled && !selected &&
+ //!pdi.fsObj->isEmpty<side>() &&
+ rectParents.width > gridGap_ &&
+ dispTp != DisplayType::inactive)
+ {
clearArea(dc, rectParents, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+ //clearArea() is surprisingly expensive => call just once!
+ textColorParents.Set(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+ //accessibility: always set *both* foreground AND background colors!
- wxDCPenChanger dummy(dc, wxPen(dc.GetTextForeground() /*treat component lines like text*/, compLineExtent_.GetHeight()));
+ if (pdi.isLastGroupItem) //restore the group separation line we just cleared
+ {
+ wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), fastFromDIP(1)));
+ dc.DrawLine(rectParents.GetBottomLeft(), rectParents.GetBottomRight() + wxPoint(1, 0));
+ }
+ }
- auto itPdi = pathDrawInfo.begin();
- for (const auto& [compName, compExt] : parentNameExtents)
+ if (isNavMarked(*pdi.fsObj)) //draw *after* clearing area for parent components
{
- rectParents.x += gridGap_;
- rectParents.width -= gridGap_;
-
- if (rectParents.width <= 0)
- break;
-
- if (*itPdi & FileView::PathDrawInfo::DRAW_COMPONENT || isTopRow)
- drawCellText(dc, rectParents, compName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &compExt); //GridData::drawCellText()
+ wxRect rectNav = rect;
+ rectNav.width = fastFromDIP(20);
- rectParents.x += compExt.GetWidth() + gridGap_;
- rectParents.width -= compExt.GetWidth() + gridGap_;
+ wxColor backCol = *wxWHITE;
+ dc.GetPixel(rectNav.GetTopRight(), &backCol); //e.g. selected row!
- if (rectParents.width <= 0)
- break;
-
- ++itPdi; //start drawing connections of *next* component
+ dc.GradientFillLinear(rectNav, getColorSelectionGradientFrom(), backCol, wxEAST);
+ }
- const wxPoint mid = rectParents.GetTopLeft() + wxPoint(0, rectParents.height / 2);
+ rectParents.x += gridGap_;
+ rectParents.width -= gridGap_;
- if (*itPdi & FileView::PathDrawInfo::CONNECT_PREV)
- dc.DrawLine(rectParents.GetTopLeft(), mid);
+ if (row == groupStartRow)
+ drawCellText(dc, rectParents, groupParentFolder, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &groupParentExt);
- if (*itPdi & FileView::PathDrawInfo::CONNECT_NEXT) //for some (fucking) reason, drawing from bottom to top flips
- dc.DrawLine(mid, rectParents.GetBottomLeft() + wxPoint(0, 1)); //our input points, so always draw top -> down
+ if (!singleItemGroup && !groupStartIsFolder && !groupName.empty() &&
+ ((!groupParentFolder.empty() && row == groupStartRow + 1) ||
+ (groupParentFolder.empty() && row == groupStartRow))) //exception: show groupName in first row if free
+ {
- if (*itPdi & FileView::PathDrawInfo::DRAW_COMPONENT || isTopRow)
- dc.DrawLine(mid, mid + wxPoint(compLineExtent_.GetWidth() +
- //extend line to icon center in case icon is smaller than default
- (itPdi == pathDrawInfo.end() - 1 && iconMgr_ && !itemName.empty() ?
- iconMgr_->refIconBuffer().getSize() / 2 : 0), 0));
+ wxRect rectGroupName = rectParents;
+ rectGroupName.width = std::min(rectParents.width, (iconSize > 0 ? iconSize + gridGap_ : 0) + groupNameExt.GetWidth() + gridGap_);
+ rectGroupName.x += rectParents.width - rectGroupName.width;
- rectParents.x += compLineExtent_.GetWidth();
- rectParents.width -= compLineExtent_.GetWidth();
+ if (iconMgr) //draw file icon
+ {
+ drawIcon(iconMgr->getGenericDirIcon(), rectGroupName);
+ rectGroupName.x += iconSize + gridGap_;
+ rectGroupName.width -= iconSize + gridGap_;
+ }
+ drawCellText(dc, rectGroupName, groupName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &groupNameExt);
}
}
- if (!itemName.empty())
+ if (!itemName.empty() && rectLeaf.width > 0)
{
- if (iconMgr_) //draw file icon
+ if (iconMgr) //draw file icon
{
- if (parentComponents.empty())
- {
- rectItem.x += gridGap_;
- rectItem.width -= gridGap_;
- }
- if (rectItem.width > 0)
+ //whenever there's something new to render on screen, start up watching for failed icon drawing:
+ //=> ideally it would suffice to start watching only when scrolling grid or showing new grid content, but this solution is more robust
+ //and the icon updater will stop automatically when finished anyway
+ //Note: it's not sufficient to start up on failed icon loads only, since we support prefetching of not yet visible rows!!!
+ iconMgr->startIconUpdater();
+
+ wxImage fileIcon;
+
+ const IconInfo ii = getIconInfo(row);
+ switch (ii.type)
{
- //whenever there's something new to render on screen, start up watching for failed icon drawing:
- //=> ideally it would suffice to start watching only when scrolling grid or showing new grid content, but this solution is more robust
- //and the icon updater will stop automatically when finished anyway
- //Note: it's not sufficient to start up on failed icon loads only, since we support prefetching of not yet visible rows!!!
- iconMgr_->startIconUpdater();
-
- wxBitmap fileIcon;
-
- const IconInfo ii = getIconInfo(row);
- switch (ii.type)
- {
- case IconInfo::FOLDER:
- fileIcon = iconMgr_->getGenericDirIcon();
- break;
-
- case IconInfo::ICON_PATH:
- if (std::optional<wxBitmap> tmpIco = iconMgr_->refIconBuffer().retrieveFileIcon(ii.fsObj->template getAbstractPath<side>()))
- fileIcon = *tmpIco;
- else
- {
- setFailedLoad(row); //save status of failed icon load -> used for async. icon loading
- //falsify only! we want to avoid writing incorrect success values when only partially updating the DC, e.g. when scrolling,
- //see repaint behavior of ::ScrollWindow() function!
- fileIcon = iconMgr_->refIconBuffer().getIconByExtension(ii.fsObj->template getItemName<side>()); //better than nothing
- }
- break;
-
- case IconInfo::EMPTY:
- break;
- }
-
- const int iconSize = iconMgr_->refIconBuffer().getSize();
- if (fileIcon.IsOk())
- {
- wxRect rectIcon = rectItem;
- rectIcon.width = iconSize; //support small thumbnail centering
-
- auto drawIcon = [&](const wxBitmap& icon)
+ case IconType::folder:
+ fileIcon = iconMgr->getGenericDirIcon();
+ break;
+
+ case IconType::standard:
+ if (std::optional<wxImage> tmpIco = iconMgr->refIconBuffer().retrieveFileIcon(ii.fsObj->template getAbstractPath<side>()))
+ fileIcon = *tmpIco;
+ else
{
- if (pdi.fsObj->isActive())
- drawBitmapRtlNoMirror(dc, icon, rectIcon, wxALIGN_CENTER);
- else
- drawBitmapRtlNoMirror(dc, wxBitmap(icon.ConvertToImage().ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3)), //treat all channels equally!
- rectIcon, wxALIGN_CENTER);
- };
-
- drawIcon(fileIcon);
-
- if (ii.drawAsLink)
- drawIcon(iconMgr_->getLinkOverlayIcon());
- }
- rectItem.x += iconSize;
- rectItem.width -= iconSize;
+ setFailedLoad(row); //save status of failed icon load -> used for async. icon loading
+ //falsify only! we want to avoid writing incorrect success values when only partially updating the DC, e.g. when scrolling,
+ //see repaint behavior of ::ScrollWindow() function!
+ fileIcon = iconMgr->refIconBuffer().getIconByExtension(ii.fsObj->template getItemName<side>()); //better than nothing
+ }
+ break;
+
+ case IconType::none:
+ break;
}
- }
- rectItem.x += gridGap_;
- rectItem.width -= gridGap_;
+ if (fileIcon.IsOk())
+ {
+ drawIcon(fileIcon, rectLeaf);
- if (rectItem.width > 0)
- {
- const wxSize& itemExtent = getTextExtentBuffered(dc, itemName);
- drawCellText(dc, rectItem, itemName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &itemExtent);
+ if (ii.drawAsLink)
+ drawIcon(iconMgr->getLinkOverlayIcon(), rectLeaf);
+ }
+ rectLeaf.x += iconSize + gridGap_;
+ rectLeaf.width -= iconSize + gridGap_;
}
+
+ drawCellText(dc, rectLeaf, itemName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, itemName));
}
}
break;
- case ColumnTypeRim::SIZE:
+ case ColumnTypeRim::size:
if (refGrid().GetLayoutDirection() != wxLayout_RightToLeft)
{
rectTmp.width -= gridGap_; //have file size right-justified (but don't change for RTL languages)
@@ -635,8 +782,8 @@ private:
}
break;
- case ColumnTypeRim::DATE:
- case ColumnTypeRim::EXTENSION:
+ case ColumnTypeRim::date:
+ case ColumnTypeRim::extension:
rectTmp.x += gridGap_;
rectTmp.width -= gridGap_;
drawCellText(dc, rectTmp, getValue(row, colType), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
@@ -647,67 +794,95 @@ private:
int getBestSize(wxDC& dc, size_t row, ColumnType colType) override
{
- if (static_cast<ColumnTypeRim>(colType) == ColumnTypeRim::ITEM_PATH)
+ if (static_cast<ColumnTypeRim>(colType) == ColumnTypeRim::path)
{
int bestSize = 0;
+ //*almost* a copy and paste from renderCell():
if (const FileView::PathDrawInfo pdi = getDataView().getDrawInfo(row);
pdi.fsObj)
{
- const std::wstring& itemName = utfTo<std::wstring>(pdi.fsObj->getItemName<side>()); //don't care if FileSystemObject::isEmpty()
- std::vector<const ContainerObject*> parentComponents;
+ const size_t topRow = refGrid().getTopRow();
+ const size_t groupStartRow = pdi.groupStartRow >= topRow ? pdi.groupStartRow : topRow;
- switch (itemPathFormat_)
+ const FileView::PathDrawInfo pdiGroupStart = row == groupStartRow ? pdi : getDataView().getDrawInfo(groupStartRow);
+
+ const bool singleItemGroup = pdiGroupStart.isLastGroupItem;
+ const bool groupStartIsFolder = dynamic_cast<const FolderPair*>(pdiGroupStart.fsObj);
+
+ const auto groupObj = [&]() -> const FileSystemObject*
{
- case ItemPathFormat::FULL_PATH:
- for (const FileSystemObject* fsObj2 = pdi.fsObj;;)
- {
- const ContainerObject& parent = fsObj2->parent();
- parentComponents.push_back(&parent);
+ if (singleItemGroup)
+ return pdi.fsObj;
- fsObj2 = dynamic_cast<const FolderPair*>(&parent);
- if (!fsObj2)
- break;
- }
+ if (groupStartIsFolder)
+ return pdiGroupStart.fsObj;
+
+ assert(!pdiGroupStart.fsObj || &pdiGroupStart.fsObj->parent() == &pdi.fsObj->parent());
+ return dynamic_cast<const FolderPair*>(&pdi.fsObj->parent());
+ }();
+
+ IconManager* const iconMgr = getIconManager();
+ const int childIndent = iconMgr ? iconMgr->refIconBuffer().getSize() : IconBuffer::getSize(IconBuffer::SIZE_SMALL);
+ const int iconSize = iconMgr ? iconMgr->refIconBuffer().getSize() : 0;
+
+ //getBestSize() => don't care if FileSystemObject::isEmpty()
+ const std::wstring itemName = utfTo<std::wstring>(pdi.fsObj->getItemName<side>());
+
+ std::wstring groupName;
+ std::wstring groupParentFolder;
+ switch (itemPathFormat_)
+ {
+ case ItemPathFormat::name:
break;
- case ItemPathFormat::RELATIVE_PATH:
- for (const FileSystemObject* fsObj2 = pdi.fsObj;;)
+ case ItemPathFormat::relative:
+ if (groupObj)
{
- const ContainerObject& parent = fsObj2->parent();
-
- fsObj2 = dynamic_cast<const FolderPair*>(&parent);
- if (!fsObj2)
- break;
- parentComponents.push_back(&parent);
+ groupName = utfTo<std::wstring>(groupObj->template getItemName<side>());
+ groupParentFolder = utfTo<std::wstring>(groupObj->parent().template getRelativePath<side>());
}
break;
- case ItemPathFormat::ITEM_NAME:
+ case ItemPathFormat::full:
+ if (groupObj)
+ {
+ groupName = utfTo<std::wstring>(groupObj->template getItemName<side>());
+ groupParentFolder = AFS::getDisplayPath(groupObj->parent().template getAbstractPath<side>());
+ }
+ else //=> BaseFolderPair
+ groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath<side>());
break;
}
-
- /* Partitioning:
- _______________________________________________________________________
- | (gap | component name | gap | dash)* | icon | gap | item name | gap |
- ----------------------------------------------------------------------- */
- for (const ContainerObject* parent : parentComponents)
+ if (!iconMgr) //add slashes for better readability
{
- const FolderPair* folder = dynamic_cast<const FolderPair*>(parent);
- const std::wstring& compName = folder ? utfTo<std::wstring>(folder->getItemName<side>()) :
- AFS::getDisplayPath(parent->getAbstractPath<side>());
-
- bestSize += gridGap_ + getTextExtentBuffered(dc, compName).GetWidth() + gridGap_ + compLineExtent_.GetWidth();
+ if (!endsWith(groupParentFolder, L'/' ) &&
+ !endsWith(groupParentFolder, L'\\') &&
+ !groupParentFolder.empty()) groupParentFolder += FILE_NAME_SEPARATOR;
+ if (!groupName .empty()) groupName += FILE_NAME_SEPARATOR;
}
- if (iconMgr_)
+ const wxSize groupNameExt = getTextExtentBuffered(dc, groupName);
+ const wxSize groupParentExt = getTextExtentBuffered(dc, groupParentFolder);
+
+ int parentsRenderWidth = 0;
+ if (singleItemGroup || groupStartIsFolder)
{
- if (parentComponents.empty())
- bestSize += gridGap_;
- bestSize += iconMgr_->refIconBuffer().getSize();
+ parentsRenderWidth = gridGap_ + (groupParentFolder.empty() ? 0 : groupParentExt.GetWidth() + gridGap_);
+ //indent child items slightly after parent folder icon
+ if (row != groupStartRow && !groupName.empty() /*for ItemPathFormat::name*/)
+ parentsRenderWidth += childIndent;
}
+ else
+ parentsRenderWidth = std::max(gridGap_ + (groupParentFolder.empty() ? 0 : groupParentExt.GetWidth() + gridGap_ + (groupName.empty() ? 0 : childIndent)),
+ gridGap_ + (groupName.empty() ? 0 : (iconSize > 0 ? iconSize + gridGap_ : 0) + groupNameExt.GetWidth() + gridGap_));
+
+ bestSize += parentsRenderWidth;
- bestSize += gridGap_ + getTextExtentBuffered(dc, itemName).GetWidth() + gridGap_ /*for best size*/;
+ if (iconMgr)
+ bestSize += iconSize + gridGap_;
+
+ bestSize += getTextExtentBuffered(dc, itemName).GetWidth() + gridGap_ /*[!]*/;
}
return bestSize;
}
@@ -716,30 +891,29 @@ private:
const std::wstring cellValue = getValue(row, colType);
return gridGap_ + dc.GetTextExtent(cellValue).GetWidth() + gridGap_;
}
- // + 1 pix for cell border line ? -> not used anymore!
}
std::wstring getColumnLabel(ColumnType colType) const override
{
switch (static_cast<ColumnTypeRim>(colType))
{
- case ColumnTypeRim::ITEM_PATH:
+ case ColumnTypeRim::path:
switch (itemPathFormat_)
{
- case ItemPathFormat::FULL_PATH:
- return _("Full path");
- case ItemPathFormat::RELATIVE_PATH:
- return _("Relative path");
- case ItemPathFormat::ITEM_NAME:
+ case ItemPathFormat::name:
return _("Item name");
+ case ItemPathFormat::relative:
+ return _("Relative path");
+ case ItemPathFormat::full:
+ return _("Full path");
}
assert(false);
break;
- case ColumnTypeRim::SIZE:
+ case ColumnTypeRim::size:
return _("Size");
- case ColumnTypeRim::DATE:
+ case ColumnTypeRim::date:
return _("Date");
- case ColumnTypeRim::EXTENSION:
+ case ColumnTypeRim::extension:
return _("Extension");
}
//assert(false); may be ColumnType::NONE
@@ -760,7 +934,7 @@ private:
if (const ColumnTypeRim* sortType = std::get_if<ColumnTypeRim>(&sortInfo->sortCol))
if (*sortType == static_cast<ColumnTypeRim>(colType) && sortInfo->onLeft == (side == LEFT_SIDE))
{
- const wxBitmap sortMarker = getResourceImage(sortInfo->ascending ? "sort_ascending" : "sort_descending");
+ const wxImage sortMarker = loadImage(sortInfo->ascending ? "sort_ascending" : "sort_descending");
drawBitmapRtlNoMirror(dc, enabled ? sortMarker : sortMarker.ConvertToDisabled(), rectInner, wxALIGN_CENTER_HORIZONTAL);
}
}
@@ -779,8 +953,8 @@ private:
//path components should follow the app layout direction and are NOT a single piece of text!
//caveat: add Bidi support only during rendering and not in getValue() or AFS::getDisplayPath(): e.g. support "open file in Explorer"
assert(!contains(toolTip, slashBidi_) && !contains(toolTip, bslashBidi_));
- replace(toolTip, L"/", slashBidi_);
- replace(toolTip, L"\\", bslashBidi_);
+ replace(toolTip, L'/', slashBidi_);
+ replace(toolTip, L'\\', bslashBidi_);
visitFSObject(*fsObj, [](const FolderPair& folder) {},
[&](const FilePair& file)
@@ -799,16 +973,16 @@ private:
return toolTip;
}
+ enum class IconType
+ {
+ none,
+ folder,
+ standard,
+ };
struct IconInfo
{
- enum IconType
- {
- EMPTY,
- FOLDER,
- ICON_PATH,
- };
- IconType type = EMPTY;
- const FileSystemObject* fsObj = nullptr; //only set if type != EMPTY
+ IconType type = IconType::none;
+ const FileSystemObject* fsObj = nullptr; //only set if type != IconType::none
bool drawAsLink = false;
};
@@ -823,30 +997,30 @@ private:
visitFSObject(*fsObj, [&](const FolderPair& folder)
{
- out.type = IconInfo::FOLDER;
+ out.type = IconType::folder;
out.drawAsLink = folder.isFollowedSymlink<side>();
},
[&](const FilePair& file)
{
- out.type = IconInfo::ICON_PATH;
+ out.type = IconType::standard;
out.drawAsLink = file.isFollowedSymlink<side>() || hasLinkExtension(file.getItemName<side>());
},
[&](const SymlinkPair& symlink)
{
- out.type = IconInfo::ICON_PATH;
+ out.type = IconType::standard;
out.drawAsLink = true;
});
}
return out;
}
- wxSize getTextExtentBuffered(wxDC& dc, const std::wstring& text)
+ const wxSize& getTextExtentBuffered(wxDC& dc, const std::wstring& text)
{
auto& compExtentsBuf = getDataView().refCompExtentsBuf();
//- shared between GridDataLeft/GridDataRight
- //- only used for parent component names and file names on view => should not grow "too big"
+ //- only used for parent path names and file names on view => should not grow "too big"
//- cleaned up during FileView::setData()
auto it = compExtentsBuf.find(text);
@@ -856,10 +1030,8 @@ private:
}
const int gridGap_ = fastFromDIP(FILE_GRID_GAP_SIZE_DIP);
- const wxSize compLineExtent_{ fastFromDIP(5), fastFromDIP(1) };
- std::shared_ptr<IconManager> iconMgr_; //optional
- ItemPathFormat itemPathFormat_ = ItemPathFormat::FULL_PATH;
+ ItemPathFormat itemPathFormat_ = ItemPathFormat::full;
std::vector<unsigned char> failedLoads_; //effectively a vector<bool> of size "number of rows"
@@ -872,69 +1044,13 @@ private:
class GridDataLeft : public GridDataRim<LEFT_SIDE>
{
public:
- GridDataLeft(const SharedRef<FileView>& gridDataView, Grid& grid) : GridDataRim<LEFT_SIDE>(gridDataView, grid) {}
-
- void setNavigationMarker(std::unordered_set<const FileSystemObject*>&& markedFilesAndLinks,
- std::unordered_set<const ContainerObject*>&& markedContainer)
- {
- markedFilesAndLinks_.swap(markedFilesAndLinks);
- markedContainer_ .swap(markedContainer);
- }
-
-private:
- void renderRowBackgound(wxDC& dc, const wxRect& rect, size_t row, bool enabled, bool selected) override
- {
- GridDataRim<LEFT_SIDE>::renderRowBackgound(dc, rect, row, enabled, selected);
-
- //mark rows selected on overview panel:
- if (enabled && !selected)
- {
- const bool markRow = [&]
- {
- if (const FileSystemObject* fsObj = getFsObject(row))
- {
- if (contains(markedFilesAndLinks_, fsObj)) //mark files/links directly
- return true;
-
- if (auto folder = dynamic_cast<const FolderPair*>(fsObj))
- if (contains(markedContainer_, folder)) //mark folders which *are* the given ContainerObject*
- return true;
-
- //also mark all items with any matching ancestors
- for (const FileSystemObject* fsObj2 = fsObj;;)
- {
- const ContainerObject& parent = fsObj2->parent();
- if (contains(markedContainer_, &parent))
- return true;
-
- fsObj2 = dynamic_cast<const FolderPair*>(&parent);
- if (!fsObj2)
- break;
- }
- }
- return false;
- }();
-
- if (markRow)
- {
- wxRect rectTmp = rect;
- rectTmp.width = fastFromDIP(15);
- rectTmp.x += rect.width - rectTmp.width;
- dc.GradientFillLinear(rectTmp, getColorSelectionGradientFrom(), getBackGroundColor(row), wxWEST);
- }
- }
- }
-
- std::unordered_set<const FileSystemObject*> markedFilesAndLinks_; //mark files/symlinks directly within a container
- std::unordered_set<const ContainerObject*> markedContainer_; //mark full container including all child-objects
- //DO NOT DEREFERENCE!!!! NOT GUARANTEED TO BE VALID!!!
+ GridDataLeft(Grid& grid, const SharedRef<SharedComponents>& sharedComp) : GridDataRim<LEFT_SIDE>(grid, sharedComp) {}
};
-
class GridDataRight : public GridDataRim<RIGHT_SIDE>
{
public:
- GridDataRight(const SharedRef<FileView>& gridDataView, Grid& grid) : GridDataRim<RIGHT_SIDE>(gridDataView, grid) {}
+ GridDataRight(Grid& grid, const SharedRef<SharedComponents>& sharedComp) : GridDataRim<RIGHT_SIDE>(grid, sharedComp) {}
};
//########################################################################################################
@@ -942,8 +1058,7 @@ public:
class GridDataCenter : public GridDataBase
{
public:
- GridDataCenter(const SharedRef<FileView>& gridDataView, Grid& grid) :
- GridDataBase(grid, gridDataView),
+ GridDataCenter(Grid& grid, const SharedRef<SharedComponents>& sharedComp) : GridDataBase(grid, sharedComp),
toolTip_(grid) {} //tool tip must not live longer than grid!
void onSelectBegin()
@@ -973,19 +1088,19 @@ public:
break;
case HoverAreaCenter::DIR_LEFT:
{
- SyncDirectionEvent evt(rowFirst, rowLast, SyncDirection::LEFT);
+ SyncDirectionEvent evt(rowFirst, rowLast, SyncDirection::left);
evtHandler->ProcessEvent(evt);
}
break;
case HoverAreaCenter::DIR_NONE:
{
- SyncDirectionEvent evt(rowFirst, rowLast, SyncDirection::NONE);
+ SyncDirectionEvent evt(rowFirst, rowLast, SyncDirection::none);
evtHandler->ProcessEvent(evt);
}
break;
case HoverAreaCenter::DIR_RIGHT:
{
- SyncDirectionEvent evt(rowFirst, rowLast, SyncDirection::RIGHT);
+ SyncDirectionEvent evt(rowFirst, rowLast, SyncDirection::right);
evtHandler->ProcessEvent(evt);
}
break;
@@ -1019,19 +1134,17 @@ public:
toolTip_.hide(); //handle custom tooltip
}
- void highlightSyncAction(bool value) { highlightSyncAction_ = value; }
-
private:
std::wstring getValue(size_t row, ColumnType colType) const override
{
if (const FileSystemObject* fsObj = getFsObject(row))
switch (static_cast<ColumnTypeCenter>(colType))
{
- case ColumnTypeCenter::CHECKBOX:
+ case ColumnTypeCenter::checkbox:
break;
- case ColumnTypeCenter::CMP_CATEGORY:
+ case ColumnTypeCenter::category:
return getSymbol(fsObj->getCategory());
- case ColumnTypeCenter::SYNC_ACTION:
+ case ColumnTypeCenter::action:
return getSymbol(fsObj->getSyncOperation());
}
return std::wstring();
@@ -1046,7 +1159,7 @@ private:
if (fsObj->isActive())
fillBackgroundDefaultColorAlternating(dc, rect, row % 2 == 0);
else
- clearArea(dc, rect, getColorNotActive());
+ clearArea(dc, rect, getColorInactiveBack(false /*faint*/));
}
else
clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
@@ -1073,23 +1186,23 @@ private:
switch (static_cast<ColumnTypeCenter>(colType))
{
- case ColumnTypeCenter::CHECKBOX:
+ case ColumnTypeCenter::checkbox:
if (const FileSystemObject* fsObj = getFsObject(row))
{
const bool drawMouseHover = static_cast<HoverAreaCenter>(rowHover) == HoverAreaCenter::CHECK_BOX;
if (fsObj->isActive())
- drawBitmapRtlNoMirror(dc, getResourceImage(drawMouseHover ? "checkbox_true_hover" : "checkbox_true"), rect, wxALIGN_CENTER);
+ drawBitmapRtlNoMirror(dc, loadImage(drawMouseHover ? "checkbox_true_hover" : "checkbox_true"), rect, wxALIGN_CENTER);
else //default
- drawBitmapRtlNoMirror(dc, getResourceImage(drawMouseHover ? "checkbox_false_hover" : "checkbox_false"), rect, wxALIGN_CENTER);
+ drawBitmapRtlNoMirror(dc, loadImage(drawMouseHover ? "checkbox_false_hover" : "checkbox_false"), rect, wxALIGN_CENTER);
}
break;
- case ColumnTypeCenter::CMP_CATEGORY:
+ case ColumnTypeCenter::category:
if (const FileSystemObject* fsObj = getFsObject(row))
{
- if (!highlightSyncAction_)
- drawHighlightBackground(*fsObj, getBackGroundColorCmpCategory(fsObj));
+ if (getViewType() == GridViewType::category)
+ drawHighlightBackground(*fsObj, getBackGroundColorCmpCategory(fsObj->getCategory(), false /*faint*/));
wxRect rectTmp = rect;
{
@@ -1103,34 +1216,34 @@ private:
rectTmp.width -= notch_.GetWidth();
}
- if (!highlightSyncAction_)
+ if (getViewType() == GridViewType::category)
drawBitmapRtlMirror(dc, getCmpResultImage(fsObj->getCategory()), rectTmp, wxALIGN_CENTER, renderBufCmp_);
else if (fsObj->getCategory() != FILE_EQUAL) //don't show = in both middle columns
drawBitmapRtlMirror(dc, greyScale(getCmpResultImage(fsObj->getCategory())), rectTmp, wxALIGN_CENTER, renderBufCmp_);
}
break;
- case ColumnTypeCenter::SYNC_ACTION:
+ case ColumnTypeCenter::action:
if (const FileSystemObject* fsObj = getFsObject(row))
{
- if (highlightSyncAction_)
- drawHighlightBackground(*fsObj, getBackGroundColorSyncAction(fsObj));
+ if (getViewType() == GridViewType::action)
+ drawHighlightBackground(*fsObj, getBackGroundColorSyncAction(fsObj->getSyncOperation(), false /*faint*/));
//synchronization preview
const auto rowHoverCenter = rowHover == HoverArea::NONE ? HoverAreaCenter::CHECK_BOX : static_cast<HoverAreaCenter>(rowHover);
switch (rowHoverCenter)
{
case HoverAreaCenter::DIR_LEFT:
- drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SyncDirection::LEFT)), rect, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, renderBufSync_);
+ drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SyncDirection::left)), rect, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, renderBufSync_);
break;
case HoverAreaCenter::DIR_NONE:
- drawBitmapRtlNoMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SyncDirection::NONE)), rect, wxALIGN_CENTER);
+ drawBitmapRtlNoMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SyncDirection::none)), rect, wxALIGN_CENTER);
break;
case HoverAreaCenter::DIR_RIGHT:
- drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SyncDirection::RIGHT)), rect, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, renderBufSync_);
+ drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SyncDirection::right)), rect, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, renderBufSync_);
break;
case HoverAreaCenter::CHECK_BOX:
- if (highlightSyncAction_)
+ if (getViewType() == GridViewType::action)
drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->getSyncOperation()), rect, wxALIGN_CENTER, renderBufSync_);
else if (fsObj->getSyncOperation() != SO_EQUAL) //don't show = in both middle columns
drawBitmapRtlMirror(dc, greyScale(getSyncOpImage(fsObj->getSyncOperation())), rect, wxALIGN_CENTER, renderBufSync_);
@@ -1146,17 +1259,16 @@ private:
if (const FileSystemObject* const fsObj = getFsObject(row))
switch (static_cast<ColumnTypeCenter>(colType))
{
- case ColumnTypeCenter::CHECKBOX:
- case ColumnTypeCenter::CMP_CATEGORY:
+ case ColumnTypeCenter::checkbox:
+ case ColumnTypeCenter::category:
return static_cast<HoverArea>(HoverAreaCenter::CHECK_BOX);
- case ColumnTypeCenter::SYNC_ACTION:
+ case ColumnTypeCenter::action:
if (fsObj->getSyncOperation() == SO_EQUAL) //in sync-preview equal files shall be treated like a checkbox
return static_cast<HoverArea>(HoverAreaCenter::CHECK_BOX);
- // cell:
- // -----------------------
- // | left | middle | right|
- // -----------------------
+ /* cell: ------------------------
+ | left | middle | right|
+ ------------------------ */
if (0 <= cellRelativePosX)
{
if (cellRelativePosX < cellWidth / 3)
@@ -1175,11 +1287,11 @@ private:
{
switch (static_cast<ColumnTypeCenter>(colType))
{
- case ColumnTypeCenter::CHECKBOX:
+ case ColumnTypeCenter::checkbox:
break;
- case ColumnTypeCenter::CMP_CATEGORY:
+ case ColumnTypeCenter::category:
return _("Category") + L" (F11)";
- case ColumnTypeCenter::SYNC_ACTION:
+ case ColumnTypeCenter::action:
return _("Action") + L" (F11)";
}
return std::wstring();
@@ -1191,20 +1303,20 @@ private:
{
const auto colTypeCenter = static_cast<ColumnTypeCenter>(colType);
- const wxRect rectInner = drawColumnLabelBackground(dc, rect, highlighted && colTypeCenter != ColumnTypeCenter::CHECKBOX);
+ const wxRect rectInner = drawColumnLabelBackground(dc, rect, highlighted && colTypeCenter != ColumnTypeCenter::checkbox);
- wxBitmap colIcon;
+ wxImage colIcon;
switch (colTypeCenter)
{
- case ColumnTypeCenter::CHECKBOX:
+ case ColumnTypeCenter::checkbox:
break;
- case ColumnTypeCenter::CMP_CATEGORY:
- colIcon = greyScaleIfDisabled(getResourceImage("compare_sicon"), !highlightSyncAction_);
+ case ColumnTypeCenter::category:
+ colIcon = greyScaleIfDisabled(loadImage("compare_sicon"), getViewType() == GridViewType::category);
break;
- case ColumnTypeCenter::SYNC_ACTION:
- colIcon = greyScaleIfDisabled(getResourceImage("file_sync_sicon"), highlightSyncAction_);
+ case ColumnTypeCenter::action:
+ colIcon = greyScaleIfDisabled(loadImage("file_sync_sicon"), getViewType() == GridViewType::action);
break;
}
@@ -1221,86 +1333,19 @@ private:
rectRemain.x += gapLeft;
rectRemain.width -= gapLeft;
- const wxBitmap sortMarker = getResourceImage(sortInfo->ascending ? "sort_ascending" : "sort_descending");
+ const wxImage sortMarker = loadImage(sortInfo->ascending ? "sort_ascending" : "sort_descending");
drawBitmapRtlNoMirror(dc, enabled ? sortMarker : sortMarker.ConvertToDisabled(), rectRemain, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
}
}
- static wxColor getBackGroundColorSyncAction(const FileSystemObject* fsObj)
- {
- if (fsObj)
- {
- if (!fsObj->isActive())
- return getColorNotActive();
-
- switch (fsObj->getSyncOperation()) //evaluate comparison result and sync direction
- {
- case SO_DO_NOTHING:
- return getColorNotActive();
- case SO_EQUAL:
- break; //usually white
-
- case SO_CREATE_NEW_LEFT:
- case SO_OVERWRITE_LEFT:
- case SO_DELETE_LEFT:
- case SO_MOVE_LEFT_FROM:
- case SO_MOVE_LEFT_TO:
- case SO_COPY_METADATA_TO_LEFT:
- return getColorSyncBlue();
-
- case SO_CREATE_NEW_RIGHT:
- case SO_OVERWRITE_RIGHT:
- case SO_DELETE_RIGHT:
- case SO_MOVE_RIGHT_FROM:
- case SO_MOVE_RIGHT_TO:
- case SO_COPY_METADATA_TO_RIGHT:
- return getColorSyncGreen();
-
- case SO_UNRESOLVED_CONFLICT:
- return getColorYellow();
- }
- }
- return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
- }
-
- static wxColor getBackGroundColorCmpCategory(const FileSystemObject* fsObj)
- {
- if (fsObj)
- {
- if (!fsObj->isActive())
- return getColorNotActive();
-
- switch (fsObj->getCategory())
- {
- case FILE_LEFT_SIDE_ONLY:
- case FILE_LEFT_NEWER:
- return getColorSyncBlue(); //COLOR_CMP_BLUE;
-
- case FILE_RIGHT_SIDE_ONLY:
- case FILE_RIGHT_NEWER:
- return getColorSyncGreen(); //COLOR_CMP_GREEN;
-
- case FILE_DIFFERENT_CONTENT:
- return getColorCmpRed();
- case FILE_EQUAL:
- break; //usually white
- case FILE_CONFLICT:
- case FILE_DIFFERENT_METADATA: //= sub-category of equal, but hint via background that sync direction follows conflict-setting
- return getColorYellow();
- //return getColorYellowLight();
- }
- }
- return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
- }
-
void showToolTip(size_t row, ColumnTypeCenter colType, wxPoint posScreen)
{
if (const FileSystemObject* fsObj = getFsObject(row))
{
switch (colType)
{
- case ColumnTypeCenter::CHECKBOX:
- case ColumnTypeCenter::CMP_CATEGORY:
+ case ColumnTypeCenter::checkbox:
+ case ColumnTypeCenter::category:
{
const char* imageName = [&]
{
@@ -1321,12 +1366,12 @@ case FILE_CONFLICT: return "cat_conflict";
assert(false);
return "";
}();
- const auto& img = mirrorIfRtl(getResourceImage(imageName));
+ const auto& img = mirrorIfRtl(loadImage(imageName));
toolTip_.show(getCategoryDescription(*fsObj), posScreen, &img);
}
break;
- case ColumnTypeCenter::SYNC_ACTION:
+ case ColumnTypeCenter::action:
{
const char* imageName = [&]
{
@@ -1354,7 +1399,7 @@ case FILE_CONFLICT: return "cat_conflict";
assert(false);
return "";
}();
- const auto& img = mirrorIfRtl(getResourceImage(imageName));
+ const auto& img = mirrorIfRtl(loadImage(imageName));
toolTip_.show(getSyncOpDescription(*fsObj), posScreen, &img);
}
break;
@@ -1364,13 +1409,12 @@ else
toolTip_.hide(); //if invalid row...
}
- bool highlightSyncAction_ = false;
bool selectionInProgress_ = false;
std::optional<wxBitmap> renderBufCmp_; //avoid costs of recreating this temporary variable
std::optional<wxBitmap> renderBufSync_;
Tooltip toolTip_;
- wxImage notch_ = getResourceImage("notch").ConvertToImage();
+ wxImage notch_ = loadImage("notch");
};
//########################################################################################################
@@ -1650,21 +1694,18 @@ gridR_.showScrollBars(sbStatusX, Grid::SB_SHOW_AUTOMATIC);
void filegrid::init(Grid& gridLeft, Grid& gridCenter, Grid& gridRight)
{
- const auto gridDataView = makeSharedRef<FileView>();
+ auto sharedComp = makeSharedRef<SharedComponents>();
+
+ auto provLeft_ = std::make_shared<GridDataLeft >(gridLeft, sharedComp);
+ auto provCenter_ = std::make_shared<GridDataCenter>(gridCenter, sharedComp);
+ auto provRight_ = std::make_shared<GridDataRight >(gridRight, sharedComp);
- auto provLeft_ = std::make_shared<GridDataLeft >(gridDataView, gridLeft);
- auto provCenter_ = std::make_shared<GridDataCenter>(gridDataView, gridCenter);
- auto provRight_ = std::make_shared<GridDataRight >(gridDataView, gridRight);
+ sharedComp.ref().evtMgr = std::make_unique<GridEventManager>(gridLeft, gridCenter, gridRight, *provCenter_);
gridLeft .setDataProvider(provLeft_); //data providers reference grid =>
gridCenter.setDataProvider(provCenter_); //ownership must belong *exclusively* to grid!
gridRight .setDataProvider(provRight_);
- auto evtMgr = std::make_shared<GridEventManager>(gridLeft, gridCenter, gridRight, *provCenter_);
- provLeft_ ->holdOwnership(evtMgr);
- provCenter_->holdOwnership(evtMgr);
- provRight_ ->holdOwnership(evtMgr);
-
gridCenter.enableColumnMove (false);
gridCenter.enableColumnResize(false);
@@ -1674,16 +1715,16 @@ void filegrid::init(Grid& gridLeft, Grid& gridCenter, Grid& gridRight)
//gridLeft .showScrollBars(Grid::SB_SHOW_AUTOMATIC, Grid::SB_SHOW_NEVER); -> redundant: configuration happens in GridEventManager::onAlignScrollBars()
//gridCenter.showScrollBars(Grid::SB_SHOW_NEVER, Grid::SB_SHOW_NEVER);
- const int widthCheckbox = getResourceImage("checkbox_true").GetWidth() + fastFromDIP(3);
- const int widthCategory = 2 * getResourceImage("sort_ascending").GetWidth() + getResourceImage("cat_left_only_sicon").GetWidth() + getResourceImage("notch").GetWidth();
- const int widthAction = 3 * getResourceImage("so_create_left_sicon").GetWidth();
+ const int widthCheckbox = loadImage("checkbox_true").GetWidth() + fastFromDIP(3);
+ const int widthCategory = 2 * loadImage("sort_ascending").GetWidth() + loadImage("cat_left_only_sicon").GetWidth() + loadImage("notch").GetWidth();
+ const int widthAction = 3 * loadImage("so_create_left_sicon").GetWidth();
gridCenter.SetSize(widthCategory + widthCheckbox + widthAction, -1);
gridCenter.setColumnConfig(
{
-{ static_cast<ColumnType>(ColumnTypeCenter::CHECKBOX ), widthCheckbox, 0, true },
-{ static_cast<ColumnType>(ColumnTypeCenter::CMP_CATEGORY), widthCategory, 0, true },
-{ static_cast<ColumnType>(ColumnTypeCenter::SYNC_ACTION ), widthAction, 0, true },
+{ static_cast<ColumnType>(ColumnTypeCenter::checkbox ), widthCheckbox, 0, true },
+{ static_cast<ColumnType>(ColumnTypeCenter::category), widthCategory, 0, true },
+{ static_cast<ColumnType>(ColumnTypeCenter::action ), widthAction, 0, true },
});
}
@@ -1760,16 +1801,14 @@ void filegrid::setupIcons(Grid& gridLeft, Grid& gridCenter, Grid& gridRight, boo
int iconHeight = 0;
if (show)
{
- auto iconMgr = std::make_shared<IconManager>(*provLeft, *provRight, sz);
- provLeft ->setIconManager(iconMgr);
- provRight->setIconManager(iconMgr);
+ auto iconMgr = std::make_unique<IconManager>(*provLeft, *provRight, sz);
iconHeight = iconMgr->refIconBuffer().getSize();
+ provLeft ->setIconManager(std::move(iconMgr));
}
else
{
- provLeft ->setIconManager(nullptr);
- provRight->setIconManager(nullptr);
iconHeight = IconBuffer::getSize(IconBuffer::SIZE_SMALL);
+ provLeft ->setIconManager(nullptr);
}
const int newRowHeight = std::max(iconHeight, gridLeft.getMainWin().GetCharHeight()) + fastFromDIP(1); //add some space
@@ -1816,69 +1855,71 @@ if (auto evtMgr = prov->getEventManager())
void filegrid::setNavigationMarker(Grid& gridLeft,
+ zen::Grid& gridRight,
std::unordered_set<const FileSystemObject*>&& markedFilesAndLinks,
std::unordered_set<const ContainerObject*>&& markedContainer)
{
- if (auto provLeft = dynamic_cast<GridDataLeft*>(gridLeft.getDataProvider()))
-provLeft->setNavigationMarker(std::move(markedFilesAndLinks), std::move(markedContainer));
+ if (auto grid = dynamic_cast<GridDataBase*>(gridLeft.getDataProvider()))
+grid->setNavigationMarker(std::move(markedFilesAndLinks), std::move(markedContainer));
else
assert(false);
- gridLeft.Refresh();
+ gridLeft .Refresh();
+ gridRight.Refresh();
}
-void filegrid::highlightSyncAction(Grid& gridCenter, bool value)
+void filegrid::setViewType(Grid& gridCenter, GridViewType vt)
{
- if (auto provCenter = dynamic_cast<GridDataCenter*>(gridCenter.getDataProvider()))
-provCenter->highlightSyncAction(value);
+ if (auto prov = dynamic_cast<GridDataBase*>(gridCenter.getDataProvider()))
+prov->setViewType(vt);
else
assert(false);
gridCenter.Refresh();
}
-wxBitmap fff::getSyncOpImage(SyncOperation syncOp)
+wxImage fff::getSyncOpImage(SyncOperation syncOp)
{
switch (syncOp) //evaluate comparison result and sync direction
{
//*INDENT-OFF*
- case SO_CREATE_NEW_LEFT: return getResourceImage("so_create_left_sicon");
- case SO_CREATE_NEW_RIGHT: return getResourceImage("so_create_right_sicon");
- case SO_DELETE_LEFT: return getResourceImage("so_delete_left_sicon");
- case SO_DELETE_RIGHT: return getResourceImage("so_delete_right_sicon");
- case SO_MOVE_LEFT_FROM: return getResourceImage("so_move_left_source_sicon");
- case SO_MOVE_LEFT_TO: return getResourceImage("so_move_left_target_sicon");
- case SO_MOVE_RIGHT_FROM: return getResourceImage("so_move_right_source_sicon");
- case SO_MOVE_RIGHT_TO: return getResourceImage("so_move_right_target_sicon");
- case SO_OVERWRITE_LEFT: return getResourceImage("so_update_left_sicon");
- case SO_OVERWRITE_RIGHT: return getResourceImage("so_update_right_sicon");
- case SO_COPY_METADATA_TO_LEFT: return getResourceImage("so_move_left_sicon");
- case SO_COPY_METADATA_TO_RIGHT: return getResourceImage("so_move_right_sicon");
- case SO_DO_NOTHING: return getResourceImage("so_none_sicon");
- case SO_EQUAL: return getResourceImage("cat_equal_sicon");
-case SO_UNRESOLVED_CONFLICT: return getResourceImage("cat_conflict_small");
+ case SO_CREATE_NEW_LEFT: return loadImage("so_create_left_sicon");
+ case SO_CREATE_NEW_RIGHT: return loadImage("so_create_right_sicon");
+ case SO_DELETE_LEFT: return loadImage("so_delete_left_sicon");
+ case SO_DELETE_RIGHT: return loadImage("so_delete_right_sicon");
+ case SO_MOVE_LEFT_FROM: return loadImage("so_move_left_source_sicon");
+ case SO_MOVE_LEFT_TO: return loadImage("so_move_left_target_sicon");
+ case SO_MOVE_RIGHT_FROM: return loadImage("so_move_right_source_sicon");
+ case SO_MOVE_RIGHT_TO: return loadImage("so_move_right_target_sicon");
+ case SO_OVERWRITE_LEFT: return loadImage("so_update_left_sicon");
+ case SO_OVERWRITE_RIGHT: return loadImage("so_update_right_sicon");
+ case SO_COPY_METADATA_TO_LEFT: return loadImage("so_move_left_sicon");
+ case SO_COPY_METADATA_TO_RIGHT: return loadImage("so_move_right_sicon");
+ case SO_DO_NOTHING: return loadImage("so_none_sicon");
+ case SO_EQUAL: return loadImage("cat_equal_sicon");
+case SO_UNRESOLVED_CONFLICT: return loadImage("cat_conflict_small");
//*INDENT-ON*
}
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}
-wxBitmap fff::getCmpResultImage(CompareFileResult cmpResult)
+wxImage fff::getCmpResultImage(CompareFileResult cmpResult)
{
switch (cmpResult)
{
//*INDENT-OFF*
- case FILE_LEFT_SIDE_ONLY: return getResourceImage("cat_left_only_sicon");
- case FILE_RIGHT_SIDE_ONLY: return getResourceImage("cat_right_only_sicon");
- case FILE_LEFT_NEWER: return getResourceImage("cat_left_newer_sicon");
- case FILE_RIGHT_NEWER: return getResourceImage("cat_right_newer_sicon");
- case FILE_DIFFERENT_CONTENT: return getResourceImage("cat_different_sicon");
+ case FILE_LEFT_SIDE_ONLY: return loadImage("cat_left_only_sicon");
+ case FILE_RIGHT_SIDE_ONLY: return loadImage("cat_right_only_sicon");
+ case FILE_LEFT_NEWER: return loadImage("cat_left_newer_sicon");
+ case FILE_RIGHT_NEWER: return loadImage("cat_right_newer_sicon");
+ case FILE_DIFFERENT_CONTENT: return loadImage("cat_different_sicon");
case FILE_EQUAL:
- case FILE_DIFFERENT_METADATA: return getResourceImage("cat_equal_sicon"); //= sub-category of equal
-case FILE_CONFLICT: return getResourceImage("cat_conflict_small");
+ case FILE_DIFFERENT_METADATA: return loadImage("cat_equal_sicon"); //= sub-category of equal
+case FILE_CONFLICT: return loadImage("cat_conflict_small");
//*INDENT-ON*
}
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}
diff --git a/FreeFileSync/Source/ui/file_grid.h b/FreeFileSync/Source/ui/file_grid.h
index 8b948d55..2de0dee3 100644
--- a/FreeFileSync/Source/ui/file_grid.h
+++ b/FreeFileSync/Source/ui/file_grid.h
@@ -21,7 +21,7 @@ namespace filegrid
void init(zen::Grid& gridLeft, zen::Grid& gridCenter, zen::Grid& gridRight);
FileView& getDataView(zen::Grid& grid);
-void highlightSyncAction(zen::Grid& gridCenter, bool value);
+void setViewType(zen::Grid& gridCenter, GridViewType vt);
void setupIcons(zen::Grid& gridLeft, zen::Grid& gridCenter, zen::Grid& gridRight, bool show, IconBuffer::IconSize sz);
@@ -32,13 +32,13 @@ void refresh(zen::Grid& gridLeft, zen::Grid& gridCenter, zen::Grid& gridRight);
void setScrollMaster(zen::Grid& grid);
//mark rows selected in overview panel and navigate to leading object
-void setNavigationMarker(zen::Grid& gridLeft,
+void setNavigationMarker(zen::Grid& gridLeft, zen::Grid& gridRight,
std::unordered_set<const FileSystemObject*>&& markedFilesAndLinks,//mark files/symlinks directly within a container
std::unordered_set<const ContainerObject*>&& markedContainer); //mark full container including child-objects
}
-wxBitmap getSyncOpImage(SyncOperation syncOp);
-wxBitmap getCmpResultImage(CompareFileResult cmpResult);
+wxImage getSyncOpImage(SyncOperation syncOp);
+wxImage getCmpResultImage(CompareFileResult cmpResult);
//---------- custom events for middle grid ----------
diff --git a/FreeFileSync/Source/ui/file_grid_attr.h b/FreeFileSync/Source/ui/file_grid_attr.h
index 0746fc8c..3b7c60c4 100644
--- a/FreeFileSync/Source/ui/file_grid_attr.h
+++ b/FreeFileSync/Source/ui/file_grid_attr.h
@@ -14,17 +14,23 @@
namespace fff
{
+enum class GridViewType
+{
+ category,
+ action,
+};
+
enum class ColumnTypeRim
{
- ITEM_PATH,
- SIZE,
- DATE,
- EXTENSION,
+ path,
+ size,
+ date,
+ extension,
};
struct ColAttributesRim
{
- ColumnTypeRim type = ColumnTypeRim::ITEM_PATH;
+ ColumnTypeRim type = ColumnTypeRim::path;
int offset = 0;
int stretch = 0;
bool visible = false;
@@ -34,12 +40,12 @@ inline
std::vector<ColAttributesRim> getFileGridDefaultColAttribsLeft()
{
using namespace zen;
- return //harmonize with main_dlg.cpp::onGridLabelContextRim() => expects stretched ITEM_PATH and non-stretched other columns!
+ return //harmonize with main_dlg.cpp::onGridLabelContextRim() => expects stretched path and non-stretched other columns!
{
- { ColumnTypeRim::ITEM_PATH, fastFromDIP(-100), 1, true },
- { ColumnTypeRim::EXTENSION, fastFromDIP( 60), 0, false },
- { ColumnTypeRim::DATE, fastFromDIP( 140), 0, false },
- { ColumnTypeRim::SIZE, fastFromDIP( 100), 0, true },
+ { ColumnTypeRim::path, fastFromDIP(-100), 1, true },
+ { ColumnTypeRim::extension, fastFromDIP( 60), 0, false },
+ { ColumnTypeRim::date, fastFromDIP( 140), 0, false },
+ { ColumnTypeRim::size, fastFromDIP( 100), 0, true },
};
}
@@ -55,12 +61,12 @@ bool getDefaultSortDirection(ColumnTypeRim type) //true: ascending; false: desce
{
switch (type)
{
- case ColumnTypeRim::SIZE:
- case ColumnTypeRim::DATE:
+ case ColumnTypeRim::size:
+ case ColumnTypeRim::date:
return false;
- case ColumnTypeRim::ITEM_PATH:
- case ColumnTypeRim::EXTENSION:
+ case ColumnTypeRim::path:
+ case ColumnTypeRim::extension:
return true;
}
assert(false);
@@ -70,27 +76,27 @@ bool getDefaultSortDirection(ColumnTypeRim type) //true: ascending; false: desce
enum class ItemPathFormat
{
- FULL_PATH,
- RELATIVE_PATH,
- ITEM_NAME,
+ name,
+ relative,
+ full,
};
-const ItemPathFormat defaultItemPathFormatLeftGrid = ItemPathFormat::RELATIVE_PATH;
-const ItemPathFormat defaultItemPathFormatRightGrid = ItemPathFormat::RELATIVE_PATH;
+const ItemPathFormat defaultItemPathFormatLeftGrid = ItemPathFormat::relative;
+const ItemPathFormat defaultItemPathFormatRightGrid = ItemPathFormat::relative;
//------------------------------------------------------------------
enum class ColumnTypeCenter
{
- CHECKBOX,
- CMP_CATEGORY,
- SYNC_ACTION,
+ checkbox,
+ category,
+ action,
};
inline
bool getDefaultSortDirection(ColumnTypeCenter type) //true: ascending; false: descending
{
- assert(type != ColumnTypeCenter::CHECKBOX);
+ assert(type != ColumnTypeCenter::checkbox);
return true;
}
//------------------------------------------------------------------
diff --git a/FreeFileSync/Source/ui/file_view.cpp b/FreeFileSync/Source/ui/file_view.cpp
index ef24e3f1..960870a1 100644
--- a/FreeFileSync/Source/ui/file_view.cpp
+++ b/FreeFileSync/Source/ui/file_view.cpp
@@ -59,17 +59,19 @@ void FileView::updateView(Predicate pred)
viewRef_ .clear();
rowPositions_ .clear();
rowPositionsFirstChild_.clear();
- pathDrawBlob_ .clear();
- std::vector<const PathInformation*> componentsBlob;
std::vector<const ContainerObject*> parentsBuf; //from bottom to top of hierarchy
+ const ContainerObject* groupStartObj = nullptr;
+ size_t groupStartRow = 0;
for (const FileSystemObject::ObjectId& objId : sortedRef_)
if (const FileSystemObject* const fsObj = FileSystemObject::retrieve(objId))
if (pred(*fsObj))
{
+ const size_t row = viewRef_.size();
+
//save row position for direct random access to FilePair or FolderPair
- rowPositions_.emplace(objId, viewRef_.size()); //costs: 0.28 µs per call - MSVC based on std::set
+ rowPositions_.emplace(objId, row); //costs: 0.28 µs per call - MSVC based on std::set
//"this->" required by two-pass lookup as enforced by GCC 4.7
parentsBuf.clear();
@@ -85,77 +87,24 @@ void FileView::updateView(Predicate pred)
//save row position to identify first child *on sorted subview* of FolderPair or BaseFolderPair in case latter are filtered out
for (const ContainerObject* parent : parentsBuf)
- if (const auto [it, inserted] = this->rowPositionsFirstChild_.emplace(parent, viewRef_.size());
+ if (const auto [it, inserted] = this->rowPositionsFirstChild_.emplace(parent, row);
!inserted) //=> parents further up in hierarchy already inserted!
break;
- //------ prepare generation of tree render info ------
- componentsBlob.insert(componentsBlob.end(), parentsBuf.rbegin(), parentsBuf.rend());
- componentsBlob.push_back(fsObj);
- //----------------------------------------------------
-
- //save filtered view
- viewRef_.push_back({ objId, componentsBlob.size() });
- }
-
- //--------------- generate tree render info ------------------
- size_t startPosPrev = 0;
- size_t endPosPrev = 0;
-
- for (auto itV = viewRef_.begin(); itV != viewRef_.end(); ++itV)
- {
- const size_t startPos = endPosPrev;
- const size_t endPos = itV->pathDrawEndPos;
-
- const std::span<const PathInformation*> componentsPrev(&componentsBlob[startPosPrev], endPosPrev - startPosPrev);
- const std::span<const PathInformation*> components (&componentsBlob[startPos ], endPos - startPos);
-
- //find first mismatching component to draw
- assert(!components.empty());
- const auto& [it, itPrev] = std::mismatch(components .begin(), components .end() - 1 /*no need to check leaf component!*/,
- componentsPrev.begin(), componentsPrev.end()); //but DO check previous row's leaf: might be a folder!
- const size_t iDraw = it - components.begin();
-
- pathDrawBlob_.resize(pathDrawBlob_.size() + iDraw);
- pathDrawBlob_.resize(pathDrawBlob_.size() + (components.size() - iDraw), PathDrawInfo::DRAW_COMPONENT);
-
- //connect with first of previous rows' component that is drawn
- if (iDraw != 0) //... not needed for base folder component
- {
- (pathDrawBlob_.end() - components.size())[iDraw] |= PathDrawInfo::CONNECT_PREV;
-
- assert(itV != viewRef_.begin()); //because iDraw != 0
- for (auto itV2 = itV - 1;; ) //iterate backwards
- {
- const size_t endPos2 = itV2->pathDrawEndPos;
-
- size_t startPos2 = 0;
- if (itV2 != viewRef_.begin())
+ //------ save info to aggregate rows by parent folders ------
+ if (const auto folder = dynamic_cast<const FolderPair*>(fsObj))
{
- --itV2;
- startPos2 = itV2->pathDrawEndPos;
+ groupStartRow = row;
+ groupStartObj = folder;
}
- const std::span<unsigned char> components2(&pathDrawBlob_[startPos2], endPos2 - startPos2);
- assert(iDraw <= components2.size());
-
- if (iDraw >= components2.size())
- break; //parent folder!
-
- components2[iDraw] |= PathDrawInfo::CONNECT_NEXT;
-
- if (components2[iDraw] & PathDrawInfo::DRAW_COMPONENT)
- break;
-
- components2[iDraw] |= PathDrawInfo::CONNECT_PREV;
-
- assert(startPos2 != 0); //all components of first raw are drawn => expect break!
+ else if (&fsObj->parent() != groupStartObj)
+ {
+ groupStartRow = row;
+ groupStartObj = &fsObj->parent();
+ }
+ //-----------------------------------------------------------
+ viewRef_.push_back({ objId, groupStartRow });
}
- }
-
- startPosPrev = startPos;
- endPosPrev = endPos;
- }
- //------------------------------------------------------------
}
@@ -326,7 +275,6 @@ void FileView::removeInvalidRows()
viewRef_ .clear();
rowPositions_ .clear();
rowPositionsFirstChild_.clear();
- pathDrawBlob_ .clear();
}
@@ -373,7 +321,6 @@ void FileView::setData(FolderComparison& folderCmp)
//clear everything
std::unordered_map<FileSystemObject::ObjectIdConst, size_t>().swap(rowPositions_);
std::unordered_map<const void* /*ContainerObject*/, size_t>().swap(rowPositionsFirstChild_);
- std::vector<unsigned char>().swap(pathDrawBlob_);
std::vector<ViewRow >().swap(viewRef_); //+ free mem
std::vector<FileSystemObject::ObjectId>().swap(sortedRef_); //
folderPairs_.clear();
@@ -804,48 +751,47 @@ void FileView::sortView(ColumnTypeRim type, ItemPathFormat pathFmt, bool onLeft,
viewRef_ .clear();
rowPositions_ .clear();
rowPositionsFirstChild_.clear();
- pathDrawBlob_ .clear();
currentSort_ = SortInfo({ type, onLeft, ascending });
switch (type)
{
- case ColumnTypeRim::ITEM_PATH:
+ case ColumnTypeRim::path:
switch (pathFmt)
{
- case ItemPathFormat::FULL_PATH:
- if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<true, LEFT_SIDE>(folderPairs_));
- else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<true, RIGHT_SIDE>(folderPairs_));
- else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<false, LEFT_SIDE>(folderPairs_));
- else if (!ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<false, RIGHT_SIDE>(folderPairs_));
+ case ItemPathFormat::name:
+ if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFileName<true, LEFT_SIDE>());
+ else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFileName<true, RIGHT_SIDE>());
+ else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFileName<false, LEFT_SIDE>());
+ else if (!ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFileName<false, RIGHT_SIDE>());
break;
- case ItemPathFormat::RELATIVE_PATH:
+ case ItemPathFormat::relative:
if ( ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder<true >(folderPairs_));
else if (!ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder<false>(folderPairs_));
break;
- case ItemPathFormat::ITEM_NAME:
- if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFileName<true, LEFT_SIDE>());
- else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFileName<true, RIGHT_SIDE>());
- else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFileName<false, LEFT_SIDE>());
- else if (!ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFileName<false, RIGHT_SIDE>());
+ case ItemPathFormat::full:
+ if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<true, LEFT_SIDE>(folderPairs_));
+ else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<true, RIGHT_SIDE>(folderPairs_));
+ else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<false, LEFT_SIDE>(folderPairs_));
+ else if (!ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<false, RIGHT_SIDE>(folderPairs_));
break;
}
break;
- case ColumnTypeRim::SIZE:
+ case ColumnTypeRim::size:
if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFilesize<true, LEFT_SIDE>());
else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFilesize<true, RIGHT_SIDE>());
else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFilesize<false, LEFT_SIDE>());
else if (!ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFilesize<false, RIGHT_SIDE>());
break;
- case ColumnTypeRim::DATE:
+ case ColumnTypeRim::date:
if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFiletime<true, LEFT_SIDE>());
else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFiletime<true, RIGHT_SIDE>());
else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFiletime<false, LEFT_SIDE>());
else if (!ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFiletime<false, RIGHT_SIDE>());
break;
- case ColumnTypeRim::EXTENSION:
+ case ColumnTypeRim::extension:
if ( ascending && onLeft) std::stable_sort(sortedRef_.begin(), sortedRef_.end(), LessExtension<true, LEFT_SIDE>());
else if ( ascending && !onLeft) std::stable_sort(sortedRef_.begin(), sortedRef_.end(), LessExtension<true, RIGHT_SIDE>());
else if (!ascending && onLeft) std::stable_sort(sortedRef_.begin(), sortedRef_.end(), LessExtension<false, LEFT_SIDE>());
@@ -860,19 +806,18 @@ void FileView::sortView(ColumnTypeCenter type, bool ascending)
viewRef_ .clear();
rowPositions_ .clear();
rowPositionsFirstChild_.clear();
- pathDrawBlob_ .clear();
currentSort_ = SortInfo({ type, false, ascending });
switch (type)
{
- case ColumnTypeCenter::CHECKBOX:
+ case ColumnTypeCenter::checkbox:
assert(false);
break;
- case ColumnTypeCenter::CMP_CATEGORY:
+ case ColumnTypeCenter::category:
if ( ascending) std::stable_sort(sortedRef_.begin(), sortedRef_.end(), LessCmpResult<true >());
else if (!ascending) std::stable_sort(sortedRef_.begin(), sortedRef_.end(), LessCmpResult<false>());
break;
- case ColumnTypeCenter::SYNC_ACTION:
+ case ColumnTypeCenter::action:
if ( ascending) std::stable_sort(sortedRef_.begin(), sortedRef_.end(), LessSyncDirection<true >());
else if (!ascending) std::stable_sort(sortedRef_.begin(), sortedRef_.end(), LessSyncDirection<false>());
break;
diff --git a/FreeFileSync/Source/ui/file_view.h b/FreeFileSync/Source/ui/file_view.h
index df70b53b..897a104e 100644
--- a/FreeFileSync/Source/ui/file_view.h
+++ b/FreeFileSync/Source/ui/file_view.h
@@ -32,14 +32,8 @@ public:
struct PathDrawInfo
{
- enum
- {
- CONNECT_PREV = 0x1,
- CONNECT_NEXT = 0x2,
- DRAW_COMPONENT = 0x4,
- };
- std::span<const unsigned char> pathDrawInfo; //... of path components (including base folder which counts as *single* component)
-
+ size_t groupStartRow = 0;
+ bool isLastGroupItem = false;
const FileSystemObject* fsObj; //nullptr if object is not found
};
PathDrawInfo getDrawInfo(size_t row) const; //complexity: constant!
@@ -146,11 +140,8 @@ private:
struct ViewRow
{
FileSystemObject::ObjectId objId = nullptr;
- size_t pathDrawEndPos; //index into pathDrawBlob_; start position defined by previous row's end position
+ size_t groupStartRow = 0;
};
- std::vector<unsigned char> pathDrawBlob_; //draw info for components of all rows (including base folder which counts as *single* component)
-
-
std::vector<ViewRow> viewRef_; //partial view on sortedRef_
/* /|\
| (applyFilterBy...) */
@@ -221,12 +212,17 @@ inline
FileView::PathDrawInfo FileView::getDrawInfo(size_t row) const
{
if (row < viewRef_.size())
- if (const FileSystemObject* fsObj = FileSystemObject::retrieve(viewRef_[row].objId))
- {
- const std::span<const unsigned char> pathDrawInfo(&pathDrawBlob_[row == 0 ? 0 : viewRef_[row - 1].pathDrawEndPos],
- &pathDrawBlob_[0] + viewRef_[row].pathDrawEndPos); //WTF: can't use iterators with std::span on clang!?
- return { pathDrawInfo, fsObj };
- }
+ {
+ const FileSystemObject* fsObj = FileSystemObject::retrieve(viewRef_[row].objId);
+
+ const size_t groupStartRow = viewRef_[row].groupStartRow;
+ assert(groupStartRow < viewRef_.size() && viewRef_[groupStartRow].groupStartRow == groupStartRow);
+
+ const bool isLastGroupItem = row + 1 >= viewRef_.size() || viewRef_[row + 1].groupStartRow != groupStartRow;
+
+ return { groupStartRow, isLastGroupItem, fsObj };
+ }
+ assert(false); //unexpected: check rowsOnView()!
return {};
}
}
diff --git a/FreeFileSync/Source/ui/folder_pair.h b/FreeFileSync/Source/ui/folder_pair.h
index aa990eb1..aa399671 100644
--- a/FreeFileSync/Source/ui/folder_pair.h
+++ b/FreeFileSync/Source/ui/folder_pair.h
@@ -49,7 +49,7 @@ public:
basicPanel_.m_bpButtonLocalSyncCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnLocalSyncCfgContext ), nullptr, this);
basicPanel_.m_bpButtonLocalFilter ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfgContext), nullptr, this);
- basicPanel_.m_bpButtonRemovePair->SetBitmapLabel(zen::getResourceImage("item_remove"));
+ basicPanel_.m_bpButtonRemovePair->SetBitmapLabel(zen::loadImage("item_remove"));
}
private:
@@ -83,7 +83,7 @@ private:
};
zen::ContextMenu menu;
- menu.addItem(_("Remove local settings"), removeLocalCompCfg, nullptr, static_cast<bool>(localCmpCfg_));
+ menu.addItem(_("Remove local settings"), removeLocalCompCfg, wxNullImage, static_cast<bool>(localCmpCfg_));
menu.popup(basicPanel_);
}
@@ -97,7 +97,7 @@ private:
};
zen::ContextMenu menu;
- menu.addItem(_("Remove local settings"), removeLocalSyncCfg, nullptr, static_cast<bool>(localSyncCfg_));
+ menu.addItem(_("Remove local settings"), removeLocalSyncCfg, wxNullImage, static_cast<bool>(localSyncCfg_));
menu.popup(basicPanel_);
}
@@ -124,10 +124,10 @@ private:
};
zen::ContextMenu menu;
- menu.addItem(_("Clear local filter"), removeLocalFilterCfg, nullptr, !isNullFilter(localFilter_));
+ menu.addItem(_("Clear local filter"), removeLocalFilterCfg, wxNullImage, !isNullFilter(localFilter_));
menu.addSeparator();
- menu.addItem( _("Copy"), copyFilter, nullptr, !isNullFilter(localFilter_));
- menu.addItem( _("Paste"), pasteFilter, nullptr, filterCfgOnClipboard.get() != nullptr);
+ menu.addItem( _("Copy"), copyFilter, wxNullImage, !isNullFilter(localFilter_));
+ menu.addItem( _("Paste"), pasteFilter, wxNullImage, filterCfgOnClipboard.get() != nullptr);
menu.popup(basicPanel_);
}
@@ -147,9 +147,9 @@ private:
std::optional<SyncConfig> localSyncCfg_;
FilterConfig localFilter_;
- const wxImage imgCmp_ = zen::shrinkImage(zen::getResourceImage("cfg_compare").ConvertToImage(), zen::fastFromDIP(20));
- const wxImage imgSync_ = zen::shrinkImage(zen::getResourceImage("cfg_sync" ).ConvertToImage(), zen::fastFromDIP(20));
- const wxImage imgFilter_ = zen::shrinkImage(zen::getResourceImage("cfg_filter" ).ConvertToImage(), zen::fastFromDIP(20));
+ const wxImage imgCmp_ = zen::loadImage("cfg_compare", zen::fastFromDIP(20));
+ const wxImage imgSync_ = zen::loadImage("cfg_sync", zen::fastFromDIP(20));
+ const wxImage imgFilter_ = zen::loadImage("cfg_filter", zen::fastFromDIP(20));
};
}
diff --git a/FreeFileSync/Source/ui/folder_selector.cpp b/FreeFileSync/Source/ui/folder_selector.cpp
index ec114b3b..198c3de5 100644
--- a/FreeFileSync/Source/ui/folder_selector.cpp
+++ b/FreeFileSync/Source/ui/folder_selector.cpp
@@ -90,7 +90,7 @@ FolderSelector::FolderSelector(wxWindow* parent,
setupDragDrop(dropWindow_);
if (dropWindow2_) setupDragDrop(*dropWindow2_);
- selectAltFolderButton_.SetBitmapLabel(getResourceImage("cloud_small"));
+ selectAltFolderButton_.SetBitmapLabel(loadImage("cloud_small"));
//keep dirPicker and dirpath synchronous
folderComboBox_ .Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler (FolderSelector::onMouseWheel ), nullptr, this);
diff --git a/FreeFileSync/Source/ui/gui_generated.cpp b/FreeFileSync/Source/ui/gui_generated.cpp
index 2bc3518c..7a125b81 100644
--- a/FreeFileSync/Source/ui/gui_generated.cpp
+++ b/FreeFileSync/Source/ui/gui_generated.cpp
@@ -11,1176 +11,1177 @@
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 );
+ this->SetSizeHints( wxSize( 640, 400 ), wxDefaultSize );
- m_menubar = new wxMenuBar( 0 );
- m_menuFile = new wxMenu();
- m_menuItemNew = new wxMenuItem( m_menuFile, wxID_NEW, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemNew );
+ m_menubar = new wxMenuBar( 0 );
+ m_menuFile = new wxMenu();
+ m_menuItemNew = new wxMenuItem( m_menuFile, wxID_NEW, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemNew );
- m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( _("&Open...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemLoad );
+ m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( _("&Open...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemLoad );
- m_menuFile->AppendSeparator();
+ m_menuFile->AppendSeparator();
- m_menuItemSave = new wxMenuItem( m_menuFile, wxID_SAVE, wxString( _("&Save") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemSave );
+ m_menuItemSave = new wxMenuItem( m_menuFile, wxID_SAVE, wxString( _("&Save") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemSave );
- m_menuItemSaveAs = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( _("Save &as...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemSaveAs );
+ m_menuItemSaveAs = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( _("Save &as...") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemSaveAs );
- m_menuItemSaveAsBatch = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("Save as &batch job...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemSaveAsBatch );
+ m_menuItemSaveAsBatch = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("Save as &batch job...") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemSaveAsBatch );
- m_menuFile->AppendSeparator();
+ m_menuFile->AppendSeparator();
- m_menuItemQuit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemQuit );
+ m_menuItemQuit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemQuit );
- m_menubar->Append( m_menuFile, _("&File") );
+ m_menubar->Append( m_menuFile, _("&File") );
- m_menu4 = new wxMenu();
- m_menuItemShowLog = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("Show &log") ) + wxT('\t') + wxT("F4"), wxEmptyString, wxITEM_NORMAL );
- m_menu4->Append( m_menuItemShowLog );
+ m_menu4 = new wxMenu();
+ m_menuItemShowLog = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("Show &log") ) + wxT('\t') + wxT("F4"), wxEmptyString, wxITEM_NORMAL );
+ m_menu4->Append( m_menuItemShowLog );
- m_menu4->AppendSeparator();
+ m_menu4->AppendSeparator();
- m_menuItemCompare = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("Start &comparison") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
- m_menu4->Append( m_menuItemCompare );
+ m_menuItemCompare = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("Start &comparison") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
+ m_menu4->Append( m_menuItemCompare );
- m_menu4->AppendSeparator();
+ m_menu4->AppendSeparator();
- m_menuItemCompSettings = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("C&omparison settings") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL );
- m_menu4->Append( m_menuItemCompSettings );
+ m_menuItemCompSettings = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("C&omparison settings") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL );
+ m_menu4->Append( m_menuItemCompSettings );
- m_menuItemFilter = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("&Filter settings") ) + wxT('\t') + wxT("F7"), wxEmptyString, wxITEM_NORMAL );
- m_menu4->Append( m_menuItemFilter );
+ m_menuItemFilter = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("&Filter settings") ) + wxT('\t') + wxT("F7"), wxEmptyString, wxITEM_NORMAL );
+ m_menu4->Append( m_menuItemFilter );
- m_menuItemSyncSettings = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("S&ynchronization settings") ) + wxT('\t') + wxT("F8"), wxEmptyString, wxITEM_NORMAL );
- m_menu4->Append( m_menuItemSyncSettings );
+ m_menuItemSyncSettings = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("S&ynchronization settings") ) + wxT('\t') + wxT("F8"), wxEmptyString, wxITEM_NORMAL );
+ m_menu4->Append( m_menuItemSyncSettings );
- m_menu4->AppendSeparator();
+ m_menu4->AppendSeparator();
- m_menuItemSynchronize = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("Start &synchronization") ) + wxT('\t') + wxT("F9"), wxEmptyString, wxITEM_NORMAL );
- m_menu4->Append( m_menuItemSynchronize );
+ m_menuItemSynchronize = new wxMenuItem( m_menu4, wxID_ANY, wxString( _("Start &synchronization") ) + wxT('\t') + wxT("F9"), wxEmptyString, wxITEM_NORMAL );
+ m_menu4->Append( m_menuItemSynchronize );
- m_menubar->Append( m_menu4, _("&Actions") );
+ m_menubar->Append( m_menu4, _("&Actions") );
- m_menuTools = new wxMenu();
- m_menuItemOptions = new wxMenuItem( m_menuTools, wxID_PREFERENCES, wxString( _("&Preferences") ) + wxT('\t') + wxT("Ctrl+,"), wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItemOptions );
+ m_menuTools = new wxMenu();
+ m_menuItemOptions = new wxMenuItem( m_menuTools, wxID_PREFERENCES, wxString( _("&Preferences") ) + wxT('\t') + wxT("Ctrl+,"), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItemOptions );
- m_menuLanguages = new wxMenu();
- wxMenuItem* m_menuLanguagesItem = new wxMenuItem( m_menuTools, wxID_ANY, _("&Language"), wxEmptyString, wxITEM_NORMAL, m_menuLanguages );
- m_menuTools->Append( m_menuLanguagesItem );
+ m_menuLanguages = new wxMenu();
+ wxMenuItem* m_menuLanguagesItem = new wxMenuItem( m_menuTools, wxID_ANY, _("&Language"), wxEmptyString, wxITEM_NORMAL, m_menuLanguages );
+ m_menuTools->Append( m_menuLanguagesItem );
- m_menuTools->AppendSeparator();
+ m_menuTools->AppendSeparator();
- m_menuItemFind = new wxMenuItem( m_menuTools, wxID_FIND, wxString( _("&Find...") ) + wxT('\t') + wxT("Ctrl+F"), wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItemFind );
+ m_menuItemFind = new wxMenuItem( m_menuTools, wxID_FIND, wxString( _("&Find...") ) + wxT('\t') + wxT("Ctrl+F"), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItemFind );
- m_menuItemExportList = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItemExportList );
+ m_menuItemExportList = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("&Export file list...") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItemExportList );
- m_menuTools->AppendSeparator();
+ m_menuTools->AppendSeparator();
- wxMenuItem* m_menuItem51;
- m_menuItem51 = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("&Reset layout") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItem51 );
+ wxMenuItem* m_menuItem51;
+ m_menuItem51 = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("&Reset layout") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItem51 );
- m_menuItemShowMain = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItemShowMain );
+ m_menuItemShowMain = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItemShowMain );
- m_menuItemShowFolders = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItemShowFolders );
+ m_menuItemShowFolders = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItemShowFolders );
- m_menuItemShowViewFilter = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItemShowViewFilter );
+ m_menuItemShowViewFilter = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItemShowViewFilter );
- m_menuItemShowConfig = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItemShowConfig );
+ m_menuItemShowConfig = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItemShowConfig );
- m_menuItemShowOverview = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuTools->Append( m_menuItemShowOverview );
+ m_menuItemShowOverview = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuTools->Append( m_menuItemShowOverview );
- m_menubar->Append( m_menuTools, _("&Tools") );
+ m_menubar->Append( m_menuTools, _("&Tools") );
- m_menuHelp = new wxMenu();
- m_menuItemHelp = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&View help") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemHelp );
+ m_menuHelp = new wxMenu();
+ m_menuItemHelp = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&View help") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemHelp );
- m_menuHelp->AppendSeparator();
+ m_menuHelp->AppendSeparator();
- m_menuItemCheckVersionNow = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for updates now") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemCheckVersionNow );
+ m_menuItemCheckVersionNow = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for updates now") ), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemCheckVersionNow );
- m_menuItemCheckVersionAuto = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("Check &automatically once a week") ) , wxEmptyString, wxITEM_CHECK );
- m_menuHelp->Append( m_menuItemCheckVersionAuto );
- m_menuItemCheckVersionAuto->Check( true );
+ m_menuItemCheckVersionAuto = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("Check &automatically once a week") ), wxEmptyString, wxITEM_CHECK );
+ m_menuHelp->Append( m_menuItemCheckVersionAuto );
+ m_menuItemCheckVersionAuto->Check( true );
- m_menuHelp->AppendSeparator();
+ m_menuHelp->AppendSeparator();
- m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemAbout );
+ m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemAbout );
- m_menubar->Append( m_menuHelp, _("&Help") );
+ m_menubar->Append( m_menuHelp, _("&Help") );
- this->SetMenuBar( m_menubar );
+ this->SetMenuBar( m_menubar );
- bSizerPanelHolder = new wxBoxSizer( wxVERTICAL );
+ bSizerPanelHolder = new wxBoxSizer( wxVERTICAL );
- m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1791;
- bSizer1791 = new wxBoxSizer( wxVERTICAL );
+ m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1791;
+ bSizer1791 = new wxBoxSizer( wxVERTICAL );
- bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer261;
- bSizer261 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer261;
+ bSizer261 = new wxBoxSizer( wxHORIZONTAL );
- bSizer261->Add( 0, 0, 1, 0, 5 );
+ bSizer261->Add( 0, 0, 1, 0, 5 );
- m_buttonCancel = new wxButton( m_panelTopButtons, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonCancel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- m_buttonCancel->Enable( false );
- m_buttonCancel->Hide();
+ m_buttonCancel = new wxButton( m_panelTopButtons, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_buttonCancel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonCancel->Enable( false );
+ m_buttonCancel->Hide();
- bSizer261->Add( m_buttonCancel, 0, wxEXPAND, 5 );
+ bSizer261->Add( m_buttonCancel, 0, wxEXPAND, 5 );
- m_buttonCompare = new zen::BitmapTextButton( m_panelTopButtons, wxID_ANY, _("Compare"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonCompare = new zen::BitmapTextButton( m_panelTopButtons, wxID_ANY, _("Compare"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonCompare->SetDefault();
- m_buttonCompare->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- m_buttonCompare->SetToolTip( _("dummy") );
+ m_buttonCompare->SetDefault();
+ m_buttonCompare->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonCompare->SetToolTip( _("dummy") );
- bSizer261->Add( m_buttonCompare, 0, wxEXPAND, 5 );
+ bSizer261->Add( m_buttonCompare, 0, wxEXPAND, 5 );
+ m_bpButtonCmpContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonCmpContext->SetToolTip( _("dummy") );
- bSizer261->Add( 4, 0, 0, 0, 5 );
+ bSizer261->Add( m_bpButtonCmpContext, 0, wxEXPAND, 5 );
- m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonCmpConfig->SetToolTip( _("dummy") );
- bSizer261->Add( m_bpButtonCmpConfig, 0, wxEXPAND, 5 );
+ bSizer261->Add( 4, 0, 0, 0, 5 );
- m_bpButtonCmpContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonCmpContext->SetToolTip( _("dummy") );
+ m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonCmpConfig->SetToolTip( _("dummy") );
- bSizer261->Add( m_bpButtonCmpContext, 0, wxEXPAND, 5 );
+ bSizer261->Add( m_bpButtonCmpConfig, 0, wxEXPAND, 5 );
- bSizer261->Add( 0, 0, 1, 0, 5 );
+ bSizer261->Add( 0, 0, 1, 0, 5 );
- bSizerTopButtons->Add( bSizer261, 1, wxEXPAND, 5 );
+ bSizerTopButtons->Add( bSizer261, 1, wxEXPAND, 5 );
- bSizerTopButtons->Add( 5, 2, 0, 0, 5 );
+ bSizerTopButtons->Add( 5, 2, 0, 0, 5 );
- wxBoxSizer* bSizer199;
- bSizer199 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer199;
+ bSizer199 = new wxBoxSizer( wxHORIZONTAL );
- bSizer199->Add( 0, 0, 1, 0, 5 );
+ bSizer199->Add( 0, 0, 1, 0, 5 );
- m_bpButtonFilter = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0|wxFULL_REPAINT_ON_RESIZE );
- m_bpButtonFilter->SetToolTip( _("dummy") );
+ m_bpButtonFilter = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0|wxFULL_REPAINT_ON_RESIZE );
+ m_bpButtonFilter->SetToolTip( _("dummy") );
- bSizer199->Add( m_bpButtonFilter, 0, wxEXPAND, 5 );
+ bSizer199->Add( m_bpButtonFilter, 0, wxEXPAND, 5 );
- m_bpButtonFilterContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonFilterContext->SetToolTip( _("dummy") );
+ m_bpButtonFilterContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonFilterContext->SetToolTip( _("dummy") );
- bSizer199->Add( m_bpButtonFilterContext, 0, wxEXPAND, 5 );
+ bSizer199->Add( m_bpButtonFilterContext, 0, wxEXPAND, 5 );
- bSizer199->Add( 0, 0, 1, 0, 5 );
+ bSizer199->Add( 0, 0, 1, 0, 5 );
- bSizerTopButtons->Add( bSizer199, 0, wxEXPAND, 5 );
+ bSizerTopButtons->Add( bSizer199, 0, wxEXPAND, 5 );
- bSizerTopButtons->Add( 5, 2, 0, 0, 5 );
+ bSizerTopButtons->Add( 5, 2, 0, 0, 5 );
- wxBoxSizer* bSizer262;
- bSizer262 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer262;
+ bSizer262 = new wxBoxSizer( wxHORIZONTAL );
- bSizer262->Add( 0, 0, 1, 0, 5 );
+ bSizer262->Add( 0, 0, 1, 0, 5 );
- m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSyncConfig->SetToolTip( _("dummy") );
+ m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSyncConfig->SetToolTip( _("dummy") );
- bSizer262->Add( m_bpButtonSyncConfig, 0, wxEXPAND, 5 );
+ bSizer262->Add( m_bpButtonSyncConfig, 0, wxEXPAND, 5 );
- m_bpButtonSyncContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSyncContext->SetToolTip( _("dummy") );
- bSizer262->Add( m_bpButtonSyncContext, 0, wxEXPAND, 5 );
+ bSizer262->Add( 4, 0, 0, 0, 5 );
+ m_buttonSync = new zen::BitmapTextButton( m_panelTopButtons, wxID_ANY, _("Synchronize"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_buttonSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonSync->SetToolTip( _("dummy") );
- bSizer262->Add( 4, 0, 0, 0, 5 );
+ bSizer262->Add( m_buttonSync, 0, wxEXPAND, 5 );
- m_buttonSync = new zen::BitmapTextButton( m_panelTopButtons, wxID_ANY, _("Synchronize"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- m_buttonSync->SetToolTip( _("dummy") );
+ m_bpButtonSyncContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSyncContext->SetToolTip( _("dummy") );
- bSizer262->Add( m_buttonSync, 0, wxEXPAND, 5 );
+ bSizer262->Add( m_bpButtonSyncContext, 0, wxEXPAND, 5 );
- bSizer262->Add( 0, 0, 1, 0, 5 );
+ bSizer262->Add( 0, 0, 1, 0, 5 );
- bSizerTopButtons->Add( bSizer262, 1, wxEXPAND, 5 );
+ bSizerTopButtons->Add( bSizer262, 1, wxEXPAND, 5 );
- bSizer1791->Add( bSizerTopButtons, 1, wxEXPAND, 5 );
+ bSizer1791->Add( bSizerTopButtons, 1, wxEXPAND, 5 );
- m_panelTopButtons->SetSizer( bSizer1791 );
- m_panelTopButtons->Layout();
- bSizer1791->Fit( m_panelTopButtons );
- bSizerPanelHolder->Add( m_panelTopButtons, 0, wxEXPAND, 5 );
+ m_panelTopButtons->SetSizer( bSizer1791 );
+ m_panelTopButtons->Layout();
+ bSizer1791->Fit( m_panelTopButtons );
+ bSizerPanelHolder->Add( m_panelTopButtons, 0, wxEXPAND, 5 );
- m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_STATIC );
- wxBoxSizer* bSizer1601;
- bSizer1601 = new wxBoxSizer( wxVERTICAL );
+ m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_STATIC );
+ wxBoxSizer* bSizer1601;
+ bSizer1601 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer91;
- bSizer91 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer91;
+ bSizer91 = new wxBoxSizer( wxHORIZONTAL );
- m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelTopLeft->SetMinSize( wxSize( 1,-1 ) );
+ m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopLeft->SetMinSize( wxSize( 1, -1 ) );
- wxFlexGridSizer* fgSizer8;
- fgSizer8 = new wxFlexGridSizer( 0, 2, 0, 0 );
- fgSizer8->AddGrowableCol( 1 );
- fgSizer8->SetFlexibleDirection( wxBOTH );
- fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
+ wxFlexGridSizer* fgSizer8;
+ fgSizer8 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer8->AddGrowableCol( 1 );
+ fgSizer8->SetFlexibleDirection( wxBOTH );
+ fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
- fgSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
+ fgSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticTextResolvedPathL = new wxStaticText( m_panelTopLeft, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextResolvedPathL->Wrap( -1 );
- fgSizer8->Add( m_staticTextResolvedPathL, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+ m_staticTextResolvedPathL = new wxStaticText( m_panelTopLeft, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextResolvedPathL->Wrap( -1 );
+ fgSizer8->Add( m_staticTextResolvedPathL, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
- wxBoxSizer* bSizer159;
- bSizer159 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer159;
+ bSizer159 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
+ m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
- bSizer159->Add( m_bpButtonAddPair, 0, wxEXPAND, 5 );
+ bSizer159->Add( m_bpButtonAddPair, 0, wxEXPAND, 5 );
- m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
+ m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
- bSizer159->Add( m_bpButtonRemovePair, 0, wxEXPAND, 5 );
+ bSizer159->Add( m_bpButtonRemovePair, 0, wxEXPAND, 5 );
- fgSizer8->Add( bSizer159, 0, wxEXPAND, 5 );
+ fgSizer8->Add( bSizer159, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer182;
- bSizer182 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer182;
+ bSizer182 = new wxBoxSizer( wxHORIZONTAL );
- m_folderPathLeft = new fff::FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer182->Add( m_folderPathLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_folderPathLeft = new fff::FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer182->Add( m_folderPathLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectFolderLeft = new wxButton( m_panelTopLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectFolderLeft->SetToolTip( _("Select a folder") );
+ m_buttonSelectFolderLeft = new wxButton( m_panelTopLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectFolderLeft->SetToolTip( _("Select a folder") );
- bSizer182->Add( m_buttonSelectFolderLeft, 0, wxEXPAND, 5 );
+ bSizer182->Add( m_buttonSelectFolderLeft, 0, wxEXPAND, 5 );
- m_bpButtonSelectAltFolderLeft = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSelectAltFolderLeft->SetToolTip( _("Access online storage") );
+ m_bpButtonSelectAltFolderLeft = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSelectAltFolderLeft->SetToolTip( _("Access online storage") );
- bSizer182->Add( m_bpButtonSelectAltFolderLeft, 0, wxEXPAND, 5 );
+ bSizer182->Add( m_bpButtonSelectAltFolderLeft, 0, wxEXPAND, 5 );
- fgSizer8->Add( bSizer182, 0, wxEXPAND, 5 );
+ fgSizer8->Add( bSizer182, 0, wxEXPAND, 5 );
- m_panelTopLeft->SetSizer( fgSizer8 );
- m_panelTopLeft->Layout();
- fgSizer8->Fit( m_panelTopLeft );
- bSizer91->Add( m_panelTopLeft, 1, wxLEFT|wxALIGN_BOTTOM, 5 );
+ m_panelTopLeft->SetSizer( fgSizer8 );
+ m_panelTopLeft->Layout();
+ fgSizer8->Fit( m_panelTopLeft );
+ bSizer91->Add( m_panelTopLeft, 1, wxLEFT|wxALIGN_BOTTOM, 5 );
- m_panelTopCenter = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1771;
- bSizer1771 = new wxBoxSizer( wxVERTICAL );
+ m_panelTopCenter = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1771;
+ bSizer1771 = new wxBoxSizer( wxVERTICAL );
- m_bpButtonSwapSides = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSwapSides->SetToolTip( _("dummy") );
+ m_bpButtonSwapSides = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSwapSides->SetToolTip( _("dummy") );
- bSizer1771->Add( m_bpButtonSwapSides, 0, wxEXPAND, 5 );
+ bSizer1771->Add( m_bpButtonSwapSides, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer160;
- bSizer160 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer160;
+ bSizer160 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonLocalCompCfg = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonLocalCompCfg->SetToolTip( _("dummy") );
+ m_bpButtonLocalCompCfg = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonLocalCompCfg->SetToolTip( _("dummy") );
- bSizer160->Add( m_bpButtonLocalCompCfg, 0, wxEXPAND, 5 );
+ bSizer160->Add( m_bpButtonLocalCompCfg, 0, wxEXPAND, 5 );
- m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonLocalFilter->SetToolTip( _("dummy") );
+ m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonLocalFilter->SetToolTip( _("dummy") );
- bSizer160->Add( m_bpButtonLocalFilter, 0, wxEXPAND, 5 );
+ bSizer160->Add( m_bpButtonLocalFilter, 0, wxEXPAND, 5 );
- m_bpButtonLocalSyncCfg = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonLocalSyncCfg->SetToolTip( _("dummy") );
+ m_bpButtonLocalSyncCfg = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonLocalSyncCfg->SetToolTip( _("dummy") );
- bSizer160->Add( m_bpButtonLocalSyncCfg, 0, wxEXPAND, 5 );
+ bSizer160->Add( m_bpButtonLocalSyncCfg, 0, wxEXPAND, 5 );
- bSizer1771->Add( bSizer160, 1, wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer1771->Add( bSizer160, 1, wxALIGN_CENTER_HORIZONTAL, 5 );
- m_panelTopCenter->SetSizer( bSizer1771 );
- m_panelTopCenter->Layout();
- bSizer1771->Fit( m_panelTopCenter );
- bSizer91->Add( m_panelTopCenter, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_panelTopCenter->SetSizer( bSizer1771 );
+ m_panelTopCenter->Layout();
+ bSizer1771->Fit( m_panelTopCenter );
+ bSizer91->Add( m_panelTopCenter, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelTopRight->SetMinSize( wxSize( 1,-1 ) );
+ m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopRight->SetMinSize( wxSize( 1, -1 ) );
- wxBoxSizer* bSizer183;
- bSizer183 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer183;
+ bSizer183 = new wxBoxSizer( wxVERTICAL );
- m_staticTextResolvedPathR = new wxStaticText( m_panelTopRight, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextResolvedPathR->Wrap( -1 );
- bSizer183->Add( m_staticTextResolvedPathR, 0, wxALL, 2 );
+ m_staticTextResolvedPathR = new wxStaticText( m_panelTopRight, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextResolvedPathR->Wrap( -1 );
+ bSizer183->Add( m_staticTextResolvedPathR, 0, wxALL, 2 );
- wxBoxSizer* bSizer179;
- bSizer179 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer179;
+ bSizer179 = new wxBoxSizer( wxHORIZONTAL );
- m_folderPathRight = new fff::FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer179->Add( m_folderPathRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_folderPathRight = new fff::FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer179->Add( m_folderPathRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectFolderRight = new wxButton( m_panelTopRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectFolderRight->SetToolTip( _("Select a folder") );
+ m_buttonSelectFolderRight = new wxButton( m_panelTopRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectFolderRight->SetToolTip( _("Select a folder") );
- bSizer179->Add( m_buttonSelectFolderRight, 0, wxEXPAND, 5 );
+ bSizer179->Add( m_buttonSelectFolderRight, 0, wxEXPAND, 5 );
- m_bpButtonSelectAltFolderRight = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSelectAltFolderRight->SetToolTip( _("Access online storage") );
+ m_bpButtonSelectAltFolderRight = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSelectAltFolderRight->SetToolTip( _("Access online storage") );
- bSizer179->Add( m_bpButtonSelectAltFolderRight, 0, wxEXPAND, 5 );
+ bSizer179->Add( m_bpButtonSelectAltFolderRight, 0, wxEXPAND, 5 );
- bSizer183->Add( bSizer179, 0, wxEXPAND, 5 );
+ bSizer183->Add( bSizer179, 0, wxEXPAND, 5 );
- m_panelTopRight->SetSizer( bSizer183 );
- m_panelTopRight->Layout();
- bSizer183->Fit( m_panelTopRight );
- bSizer91->Add( m_panelTopRight, 1, wxRIGHT|wxALIGN_BOTTOM, 5 );
+ m_panelTopRight->SetSizer( bSizer183 );
+ m_panelTopRight->Layout();
+ bSizer183->Fit( m_panelTopRight );
+ bSizer91->Add( m_panelTopRight, 1, wxRIGHT|wxALIGN_BOTTOM, 5 );
- bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 );
+ bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 );
- m_scrolledWindowFolderPairs = new wxScrolledWindow( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
- m_scrolledWindowFolderPairs->SetScrollRate( 10, 10 );
- m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) );
+ 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 );
+ bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL );
- m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs );
- m_scrolledWindowFolderPairs->Layout();
- bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs );
- bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxEXPAND, 5 );
+ m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs );
+ m_scrolledWindowFolderPairs->Layout();
+ bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs );
+ bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxEXPAND, 5 );
- m_panelDirectoryPairs->SetSizer( bSizer1601 );
- m_panelDirectoryPairs->Layout();
- bSizer1601->Fit( m_panelDirectoryPairs );
- bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxEXPAND, 5 );
+ m_panelDirectoryPairs->SetSizer( bSizer1601 );
+ m_panelDirectoryPairs->Layout();
+ bSizer1601->Fit( m_panelDirectoryPairs );
+ bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxEXPAND, 5 );
- m_gridOverview = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_gridOverview->SetScrollRate( 5, 5 );
- bSizerPanelHolder->Add( m_gridOverview, 0, 0, 5 );
+ m_gridOverview = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridOverview->SetScrollRate( 5, 5 );
+ bSizerPanelHolder->Add( m_gridOverview, 0, 0, 5 );
- m_panelCenter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1711;
- bSizer1711 = new wxBoxSizer( wxVERTICAL );
+ m_panelCenter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1711;
+ bSizer1711 = new wxBoxSizer( wxVERTICAL );
- m_splitterMain = new fff::TripleSplitter( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1781;
- bSizer1781 = new wxBoxSizer( wxHORIZONTAL );
+ m_splitterMain = new fff::TripleSplitter( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1781;
+ bSizer1781 = new wxBoxSizer( wxHORIZONTAL );
- m_gridMainL = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_gridMainL->SetScrollRate( 5, 5 );
- bSizer1781->Add( m_gridMainL, 1, wxEXPAND, 5 );
+ m_gridMainL = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridMainL->SetScrollRate( 5, 5 );
+ bSizer1781->Add( m_gridMainL, 1, wxEXPAND, 5 );
- m_gridMainC = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_gridMainC->SetScrollRate( 5, 5 );
- bSizer1781->Add( m_gridMainC, 0, wxEXPAND, 5 );
+ m_gridMainC = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridMainC->SetScrollRate( 5, 5 );
+ bSizer1781->Add( m_gridMainC, 0, wxEXPAND, 5 );
- m_gridMainR = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_gridMainR->SetScrollRate( 5, 5 );
- bSizer1781->Add( m_gridMainR, 1, wxEXPAND, 5 );
+ m_gridMainR = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridMainR->SetScrollRate( 5, 5 );
+ bSizer1781->Add( m_gridMainR, 1, wxEXPAND, 5 );
- m_splitterMain->SetSizer( bSizer1781 );
- m_splitterMain->Layout();
- bSizer1781->Fit( m_splitterMain );
- bSizer1711->Add( m_splitterMain, 1, wxEXPAND, 5 );
+ m_splitterMain->SetSizer( bSizer1781 );
+ m_splitterMain->Layout();
+ bSizer1781->Fit( m_splitterMain );
+ bSizer1711->Add( m_splitterMain, 1, wxEXPAND, 5 );
- m_panelStatusBar = new wxPanel( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_STATIC );
- wxBoxSizer* bSizer451;
- bSizer451 = new wxBoxSizer( wxHORIZONTAL );
+ m_panelStatusBar = new wxPanel( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_STATIC );
+ wxBoxSizer* bSizer451;
+ bSizer451 = new wxBoxSizer( wxHORIZONTAL );
- bSizer451->SetMinSize( wxSize( -1,22 ) );
- bSizerFileStatus = new wxBoxSizer( wxHORIZONTAL );
+ bSizer451->SetMinSize( wxSize( -1, 22 ) );
+ bSizerFileStatus = new wxBoxSizer( wxHORIZONTAL );
- bSizerStatusLeft = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStatusLeft = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer53;
- bSizer53 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer53;
+ bSizer53 = new wxBoxSizer( wxHORIZONTAL );
- bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL );
+ 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 );
+ 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 );
+ 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 );
+ 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 );
+ bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL );
- bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
+ bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
- m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ 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 );
+ 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 );
+ m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusLeftFiles->Wrap( -1 );
+ bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatusLeftFiles->Add( 4, 0, 0, 0, 5 );
+ bSizerStatusLeftFiles->Add( 4, 0, 0, 0, 5 );
- m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusLeftBytes->Wrap( -1 );
- bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ 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( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatusLeft->Add( bSizer53, 1, wxEXPAND, 5 );
+ bSizerStatusLeft->Add( bSizer53, 1, wxEXPAND, 5 );
- m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizerStatusLeft->Add( m_staticline9, 0, wxEXPAND|wxTOP, 2 );
+ m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizerStatusLeft->Add( m_staticline9, 0, wxEXPAND|wxTOP, 2 );
- bSizerFileStatus->Add( bSizerStatusLeft, 1, wxEXPAND, 5 );
+ bSizerFileStatus->Add( bSizerStatusLeft, 1, wxEXPAND, 5 );
- bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextStatusCenter = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusCenter->Wrap( -1 );
- bSizerFileStatus->Add( m_staticTextStatusCenter, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextStatusCenter = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusCenter->Wrap( -1 );
+ bSizerFileStatus->Add( m_staticTextStatusCenter, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatusRight = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStatusRight = new wxBoxSizer( wxHORIZONTAL );
- m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizerStatusRight->Add( m_staticline10, 0, wxEXPAND|wxTOP, 2 );
+ m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizerStatusRight->Add( m_staticline10, 0, wxEXPAND|wxTOP, 2 );
- wxBoxSizer* bSizer52;
- bSizer52 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer52;
+ bSizer52 = new wxBoxSizer( wxHORIZONTAL );
- bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL );
+ 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 );
+ 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 );
+ 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 );
+ 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 );
+ bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL );
- bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
+ bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
- m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ 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 );
+ 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 );
+ 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( 4, 0, 0, 0, 5 );
+ bSizerStatusRightFiles->Add( 4, 0, 0, 0, 5 );
- m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusRightBytes->Wrap( -1 );
- bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ 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( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatusRight->Add( bSizer52, 1, wxEXPAND, 5 );
+ bSizerStatusRight->Add( bSizer52, 1, wxEXPAND, 5 );
- bSizerFileStatus->Add( bSizerStatusRight, 1, wxEXPAND, 5 );
+ bSizerFileStatus->Add( bSizerStatusRight, 1, wxEXPAND, 5 );
- bSizer451->Add( bSizerFileStatus, 1, wxEXPAND, 5 );
+ bSizer451->Add( bSizerFileStatus, 1, 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(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextFullStatus = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFullStatus->Wrap( -1 );
+ m_staticTextFullStatus->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer451->Add( m_staticTextFullStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ 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, wxEXPAND, 5 );
+ m_panelStatusBar->SetSizer( bSizer451 );
+ m_panelStatusBar->Layout();
+ bSizer451->Fit( m_panelStatusBar );
+ bSizer1711->Add( m_panelStatusBar, 0, wxEXPAND, 5 );
- m_panelCenter->SetSizer( bSizer1711 );
- m_panelCenter->Layout();
- bSizer1711->Fit( m_panelCenter );
- bSizerPanelHolder->Add( m_panelCenter, 1, wxEXPAND, 5 );
+ m_panelCenter->SetSizer( bSizer1711 );
+ m_panelCenter->Layout();
+ bSizer1711->Fit( m_panelCenter );
+ bSizerPanelHolder->Add( m_panelCenter, 1, wxEXPAND, 5 );
- m_panelSearch = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1713;
- bSizer1713 = new wxBoxSizer( wxHORIZONTAL );
+ m_panelSearch = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1713;
+ bSizer1713 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonHideSearch = new wxBitmapButton( m_panelSearch, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonHideSearch->SetToolTip( _("Close search bar") );
+ m_bpButtonHideSearch = new wxBitmapButton( m_panelSearch, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonHideSearch->SetToolTip( _("Close search bar") );
- bSizer1713->Add( m_bpButtonHideSearch, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer1713->Add( m_bpButtonHideSearch, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText101 = new wxStaticText( m_panelSearch, wxID_ANY, _("Find:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText101->Wrap( -1 );
- bSizer1713->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText101 = new wxStaticText( m_panelSearch, wxID_ANY, _("Find:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText101->Wrap( -1 );
+ bSizer1713->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_textCtrlSearchTxt = new wxTextCtrl( m_panelSearch, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_PROCESS_ENTER|wxWANTS_CHARS );
- bSizer1713->Add( m_textCtrlSearchTxt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ m_textCtrlSearchTxt = new wxTextCtrl( m_panelSearch, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_PROCESS_ENTER|wxWANTS_CHARS );
+ bSizer1713->Add( m_textCtrlSearchTxt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
- m_checkBoxMatchCase = new wxCheckBox( m_panelSearch, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer1713->Add( m_checkBoxMatchCase, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_checkBoxMatchCase = new wxCheckBox( m_panelSearch, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer1713->Add( m_checkBoxMatchCase, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_panelSearch->SetSizer( bSizer1713 );
- m_panelSearch->Layout();
- bSizer1713->Fit( m_panelSearch );
- bSizerPanelHolder->Add( m_panelSearch, 0, 0, 5 );
+ m_panelSearch->SetSizer( bSizer1713 );
+ m_panelSearch->Layout();
+ bSizer1713->Fit( m_panelSearch );
+ bSizerPanelHolder->Add( m_panelSearch, 0, 0, 5 );
- m_panelLog = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelLog->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelLog = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelLog->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizerLog = new wxBoxSizer( wxVERTICAL );
+ bSizerLog = new wxBoxSizer( wxVERTICAL );
- bSizer42 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer42 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapSyncResult = new wxStaticBitmap( m_panelLog, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer42->Add( m_bitmapSyncResult, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_bitmapSyncResult = new wxStaticBitmap( m_panelLog, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer42->Add( m_bitmapSyncResult, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_staticTextSyncResult = new wxStaticText( m_panelLog, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSyncResult->Wrap( -1 );
- m_staticTextSyncResult->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextSyncResult = new wxStaticText( m_panelLog, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSyncResult->Wrap( -1 );
+ m_staticTextSyncResult->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer42->Add( m_staticTextSyncResult, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ bSizer42->Add( m_staticTextSyncResult, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizer42->Add( 10, 0, 0, 0, 5 );
+ bSizer42->Add( 10, 0, 0, 0, 5 );
- ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 );
- ffgSizer11->SetFlexibleDirection( wxBOTH );
- ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 );
+ ffgSizer11->SetFlexibleDirection( wxBOTH );
+ ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticTextProcessed = new wxStaticText( m_panelLog, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextProcessed->Wrap( -1 );
- ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
+ m_staticTextProcessed = new wxStaticText( m_panelLog, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextProcessed->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
- m_staticTextRemaining = new wxStaticText( m_panelLog, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRemaining->Wrap( -1 );
- ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_staticTextRemaining = new wxStaticText( m_panelLog, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRemaining->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer42->Add( ffgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 );
+ bSizer42->Add( ffgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 );
- m_panelItemStats = new wxPanel( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ m_panelItemStats = new wxPanel( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer291;
- bSizer291 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer291;
+ bSizer291 = new wxBoxSizer( wxVERTICAL );
- ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 );
- ffgSizer111->SetFlexibleDirection( wxBOTH );
- ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 );
+ ffgSizer111->SetFlexibleDirection( wxBOTH );
+ ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- wxBoxSizer* bSizer293;
- bSizer293 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer293;
+ bSizer293 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer293->Add( 0, 0, 1, 0, 5 );
+ bSizer293->Add( 0, 0, 1, 0, 5 );
- m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextItemsProcessed->Wrap( -1 );
- m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextItemsProcessed->Wrap( -1 );
+ m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer111->Add( bSizer293, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ ffgSizer111->Add( bSizer293, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextBytesProcessed->Wrap( -1 );
- ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+ m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBytesProcessed->Wrap( -1 );
+ ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
- m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextItemsRemaining->Wrap( -1 );
- m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextItemsRemaining->Wrap( -1 );
+ m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextBytesRemaining->Wrap( -1 );
- ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBytesRemaining->Wrap( -1 );
+ ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer291->Add( ffgSizer111, 0, wxALL, 5 );
+ bSizer291->Add( ffgSizer111, 0, wxALL, 5 );
- m_panelItemStats->SetSizer( bSizer291 );
- m_panelItemStats->Layout();
- bSizer291->Fit( m_panelItemStats );
- bSizer42->Add( m_panelItemStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ m_panelItemStats->SetSizer( bSizer291 );
+ m_panelItemStats->Layout();
+ bSizer291->Fit( m_panelItemStats );
+ bSizer42->Add( m_panelItemStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- m_panelTimeStats = new wxPanel( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ m_panelTimeStats = new wxPanel( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer292;
- bSizer292 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer292;
+ bSizer292 = new wxBoxSizer( wxVERTICAL );
- ffgSizer112 = new wxFlexGridSizer( 0, 1, 5, 5 );
- ffgSizer112->SetFlexibleDirection( wxBOTH );
- ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer112 = new wxFlexGridSizer( 0, 1, 5, 5 );
+ ffgSizer112->SetFlexibleDirection( wxBOTH );
+ ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- wxBoxSizer* bSizer294;
- bSizer294 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer294;
+ bSizer294 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer294->Add( 0, 0, 1, 0, 5 );
+ bSizer294->Add( 0, 0, 1, 0, 5 );
- m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeElapsed->Wrap( -1 );
- m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeElapsed->Wrap( -1 );
+ m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer112->Add( bSizer294, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ ffgSizer112->Add( bSizer294, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- bSizer292->Add( ffgSizer112, 0, wxALL, 5 );
+ bSizer292->Add( ffgSizer112, 0, wxALL, 5 );
- m_panelTimeStats->SetSizer( bSizer292 );
- m_panelTimeStats->Layout();
- bSizer292->Fit( m_panelTimeStats );
- bSizer42->Add( m_panelTimeStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ m_panelTimeStats->SetSizer( bSizer292 );
+ m_panelTimeStats->Layout();
+ bSizer292->Fit( m_panelTimeStats );
+ bSizer42->Add( m_panelTimeStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizerLog->Add( bSizer42, 0, wxLEFT, 5 );
+ bSizerLog->Add( bSizer42, 0, wxLEFT, 5 );
- m_staticline70 = new wxStaticLine( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerLog->Add( m_staticline70, 0, wxEXPAND, 5 );
+ m_staticline70 = new wxStaticLine( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerLog->Add( m_staticline70, 0, wxEXPAND, 5 );
- m_panelLog->SetSizer( bSizerLog );
- m_panelLog->Layout();
- bSizerLog->Fit( m_panelLog );
- bSizerPanelHolder->Add( m_panelLog, 0, 0, 5 );
+ m_panelLog->SetSizer( bSizerLog );
+ m_panelLog->Layout();
+ bSizerLog->Fit( m_panelLog );
+ bSizerPanelHolder->Add( m_panelLog, 0, 0, 5 );
- m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizerConfig = new wxBoxSizer( wxHORIZONTAL );
+ m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerConfig = new wxBoxSizer( wxHORIZONTAL );
- bSizerCfgHistoryButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerCfgHistoryButtons = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer17611;
- bSizer17611 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer17611;
+ bSizer17611 = new wxBoxSizer( wxVERTICAL );
- m_bpButtonNew = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonNew->SetToolTip( _("dummy") );
+ m_bpButtonNew = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonNew->SetToolTip( _("dummy") );
- bSizer17611->Add( m_bpButtonNew, 0, wxEXPAND, 5 );
+ bSizer17611->Add( m_bpButtonNew, 0, wxEXPAND, 5 );
- m_staticText951 = new wxStaticText( m_panelConfig, wxID_ANY, _("New"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText951->Wrap( -1 );
- bSizer17611->Add( m_staticText951, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 );
+ m_staticText951 = new wxStaticText( m_panelConfig, wxID_ANY, _("New"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText951->Wrap( -1 );
+ bSizer17611->Add( m_staticText951, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 );
- bSizerCfgHistoryButtons->Add( bSizer17611, 0, 0, 5 );
+ bSizerCfgHistoryButtons->Add( bSizer17611, 0, 0, 5 );
- wxBoxSizer* bSizer1761;
- bSizer1761 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer1761;
+ bSizer1761 = new wxBoxSizer( wxVERTICAL );
- m_bpButtonOpen = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonOpen->SetToolTip( _("dummy") );
+ m_bpButtonOpen = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonOpen->SetToolTip( _("dummy") );
- bSizer1761->Add( m_bpButtonOpen, 0, wxEXPAND, 5 );
+ bSizer1761->Add( m_bpButtonOpen, 0, wxEXPAND, 5 );
- m_staticText95 = new wxStaticText( m_panelConfig, wxID_ANY, _("Open..."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText95->Wrap( -1 );
- bSizer1761->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 );
+ m_staticText95 = new wxStaticText( m_panelConfig, wxID_ANY, _("Open..."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText95->Wrap( -1 );
+ bSizer1761->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 );
- bSizerCfgHistoryButtons->Add( bSizer1761, 0, 0, 5 );
+ bSizerCfgHistoryButtons->Add( bSizer1761, 0, 0, 5 );
- wxBoxSizer* bSizer175;
- bSizer175 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer175;
+ bSizer175 = new wxBoxSizer( wxVERTICAL );
- m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSave->SetToolTip( _("dummy") );
+ m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSave->SetToolTip( _("dummy") );
- bSizer175->Add( m_bpButtonSave, 0, wxEXPAND, 5 );
+ bSizer175->Add( m_bpButtonSave, 0, wxEXPAND, 5 );
- m_staticText961 = new wxStaticText( m_panelConfig, wxID_ANY, _("Save"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText961->Wrap( -1 );
- bSizer175->Add( m_staticText961, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 );
+ m_staticText961 = new wxStaticText( m_panelConfig, wxID_ANY, _("Save"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText961->Wrap( -1 );
+ bSizer175->Add( m_staticText961, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 );
- bSizerCfgHistoryButtons->Add( bSizer175, 0, 0, 5 );
+ bSizerCfgHistoryButtons->Add( bSizer175, 0, 0, 5 );
- wxBoxSizer* bSizer174;
- bSizer174 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer174;
+ bSizer174 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer1772;
- bSizer1772 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer1772;
+ bSizer1772 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonSaveAs = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSaveAs->SetToolTip( _("dummy") );
+ m_bpButtonSaveAs = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSaveAs->SetToolTip( _("dummy") );
- bSizer1772->Add( m_bpButtonSaveAs, 1, 0, 5 );
+ bSizer1772->Add( m_bpButtonSaveAs, 1, 0, 5 );
- m_bpButtonSaveAsBatch = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSaveAsBatch->SetToolTip( _("dummy") );
+ m_bpButtonSaveAsBatch = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSaveAsBatch->SetToolTip( _("dummy") );
- bSizer1772->Add( m_bpButtonSaveAsBatch, 1, 0, 5 );
+ bSizer1772->Add( m_bpButtonSaveAsBatch, 1, 0, 5 );
- bSizer174->Add( bSizer1772, 0, wxEXPAND, 5 );
+ bSizer174->Add( bSizer1772, 0, wxEXPAND, 5 );
- m_staticText97 = new wxStaticText( m_panelConfig, wxID_ANY, _("Save as..."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText97->Wrap( -1 );
- bSizer174->Add( m_staticText97, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 );
+ m_staticText97 = new wxStaticText( m_panelConfig, wxID_ANY, _("Save as..."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText97->Wrap( -1 );
+ bSizer174->Add( m_staticText97, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 );
- bSizerCfgHistoryButtons->Add( bSizer174, 0, 0, 5 );
+ bSizerCfgHistoryButtons->Add( bSizer174, 0, 0, 5 );
- bSizerConfig->Add( bSizerCfgHistoryButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerConfig->Add( bSizerCfgHistoryButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_gridCfgHistory = new zen::Grid( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_gridCfgHistory->SetScrollRate( 5, 5 );
- bSizerConfig->Add( m_gridCfgHistory, 1, wxEXPAND, 5 );
+ m_gridCfgHistory = new zen::Grid( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridCfgHistory->SetScrollRate( 5, 5 );
+ bSizerConfig->Add( m_gridCfgHistory, 1, wxEXPAND, 5 );
- m_panelConfig->SetSizer( bSizerConfig );
- m_panelConfig->Layout();
- bSizerConfig->Fit( m_panelConfig );
- bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 );
+ m_panelConfig->SetSizer( bSizerConfig );
+ m_panelConfig->Layout();
+ bSizerConfig->Fit( m_panelConfig );
+ bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 );
- m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL );
+ m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonShowLog = new wxBitmapButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowLog, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowLog = new wxBitmapButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowLog, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
- wxBoxSizer* bSizer287;
- bSizer287 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer287;
+ bSizer287 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonViewTypeSyncAction = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizer287->Add( m_bpButtonViewTypeSyncAction, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bpButtonViewTypeSyncAction = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizer287->Add( m_bpButtonViewTypeSyncAction, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonViewContext = new wxBitmapButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizer287->Add( m_bpButtonViewContext, 0, wxRIGHT|wxEXPAND, 5 );
+ m_bpButtonViewContext = new wxBitmapButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizer287->Add( m_bpButtonViewContext, 0, wxRIGHT|wxEXPAND, 5 );
- bSizerViewFilter->Add( bSizer287, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerViewFilter->Add( bSizer287, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonShowExcluded = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowExcluded, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );
+ m_bpButtonShowExcluded = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowExcluded, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );
- m_bpButtonShowDeleteLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowDeleteLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowUpdateLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowUpdateLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowCreateLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowCreateLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowLeftOnly = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowLeftOnly = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowLeftNewer = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowLeftNewer = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowEqual = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowEqual = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowDoNothing = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowDoNothing, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowDoNothing = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowDoNothing, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowDifferent = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowDifferent = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowRightNewer = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowRightNewer = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowRightOnly = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowRightOnly = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowCreateRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowCreateRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowUpdateRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowUpdateRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowDeleteRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowDeleteRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonShowConflict = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizerViewFilter->Add( m_bpButtonShowConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonShowConflict = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizerViewFilter->Add( m_bpButtonShowConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticText96 = new wxStaticText( m_panelViewFilter, wxID_ANY, _("Statistics:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText96->Wrap( -1 );
- bSizerViewFilter->Add( m_staticText96, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticText96 = new wxStaticText( m_panelViewFilter, wxID_ANY, _("Statistics:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText96->Wrap( -1 );
+ bSizerViewFilter->Add( m_staticText96, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_panelStatistics = new wxPanel( m_panelViewFilter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_SUNKEN );
- m_panelStatistics->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelStatistics = new wxPanel( m_panelViewFilter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_SUNKEN );
+ m_panelStatistics->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizer1801 = new wxBoxSizer( wxVERTICAL );
+ bSizer1801 = new wxBoxSizer( wxVERTICAL );
- bSizerStatistics = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStatistics = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer173;
- bSizer173 = new wxBoxSizer( wxVERTICAL );
+ 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") );
+ 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( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer173->Add( 5, 2, 0, 0, 5 );
+ bSizer173->Add( 5, 2, 0, 0, 5 );
- bSizer173->Add( 0, 0, 1, wxEXPAND, 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") );
+ 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 );
+ bSizer173->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatistics->Add( bSizer173, 0, wxEXPAND, 5 );
+ bSizerStatistics->Add( bSizer173, 0, wxEXPAND, 5 );
- bSizerStatistics->Add( 5, 5, 0, 0, 5 );
+ bSizerStatistics->Add( 5, 5, 0, 0, 5 );
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxVERTICAL );
- m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be updated") );
+ m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be updated") );
- bSizer172->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer172->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer172->Add( 5, 2, 0, 0, 5 );
+ bSizer172->Add( 5, 2, 0, 0, 5 );
- bSizer172->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer172->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextUpdateLeft->Wrap( -1 );
- m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be updated") );
+ m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextUpdateLeft->Wrap( -1 );
+ m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be updated") );
- bSizer172->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer172->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerStatistics->Add( bSizer172, 0, wxEXPAND, 5 );
+ bSizerStatistics->Add( bSizer172, 0, wxEXPAND, 5 );
- bSizerStatistics->Add( 5, 5, 0, 0, 5 );
+ bSizerStatistics->Add( 5, 5, 0, 0, 5 );
- wxBoxSizer* bSizer1712;
- bSizer1712 = new wxBoxSizer( wxVERTICAL );
+ 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") );
+ 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( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer1712->Add( 5, 2, 0, 0, 5 );
+ bSizer1712->Add( 5, 2, 0, 0, 5 );
- bSizer1712->Add( 0, 0, 1, wxEXPAND, 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") );
+ 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 );
+ bSizer1712->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerStatistics->Add( bSizer1712, 0, wxEXPAND, 5 );
+ bSizerStatistics->Add( bSizer1712, 0, wxEXPAND, 5 );
- bSizerStatistics->Add( 5, 5, 0, 0, 5 );
+ bSizerStatistics->Add( 5, 5, 0, 0, 5 );
- bSizerData = new wxBoxSizer( wxVERTICAL );
+ bSizerData = new wxBoxSizer( wxVERTICAL );
- m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapData->SetToolTip( _("Total bytes to copy") );
+ m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapData->SetToolTip( _("Total bytes to copy") );
- bSizerData->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizerData->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerData->Add( 5, 2, 0, 0, 5 );
+ bSizerData->Add( 5, 2, 0, 0, 5 );
- bSizerData->Add( 0, 0, 1, wxEXPAND, 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") );
+ 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 );
+ bSizerData->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatistics->Add( bSizerData, 0, wxEXPAND, 5 );
+ bSizerStatistics->Add( bSizerData, 0, wxEXPAND, 5 );
- bSizerStatistics->Add( 5, 5, 0, 0, 5 );
+ bSizerStatistics->Add( 5, 5, 0, 0, 5 );
- wxBoxSizer* bSizer178;
- bSizer178 = new wxBoxSizer( wxVERTICAL );
+ 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") );
+ 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( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer178->Add( 5, 2, 0, 0, 5 );
+ bSizer178->Add( 5, 2, 0, 0, 5 );
- bSizer178->Add( 0, 0, 1, wxEXPAND, 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") );
+ 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 );
+ bSizer178->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatistics->Add( bSizer178, 0, wxEXPAND, 5 );
+ bSizerStatistics->Add( bSizer178, 0, wxEXPAND, 5 );
- bSizerStatistics->Add( 5, 5, 0, 0, 5 );
+ bSizerStatistics->Add( 5, 5, 0, 0, 5 );
- wxBoxSizer* bSizer177;
- bSizer177 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer177;
+ bSizer177 = new wxBoxSizer( wxVERTICAL );
- m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapUpdateRight->SetToolTip( _("Number of files that will be updated") );
+ m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapUpdateRight->SetToolTip( _("Number of files that will be updated") );
- bSizer177->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer177->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer177->Add( 5, 2, 0, 0, 5 );
+ bSizer177->Add( 5, 2, 0, 0, 5 );
- bSizer177->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer177->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextUpdateRight->Wrap( -1 );
- m_staticTextUpdateRight->SetToolTip( _("Number of files that will be updated") );
+ m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextUpdateRight->Wrap( -1 );
+ m_staticTextUpdateRight->SetToolTip( _("Number of files that will be updated") );
- bSizer177->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer177->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatistics->Add( bSizer177, 0, wxEXPAND, 5 );
+ bSizerStatistics->Add( bSizer177, 0, wxEXPAND, 5 );
- bSizerStatistics->Add( 5, 5, 0, 0, 5 );
+ bSizerStatistics->Add( 5, 5, 0, 0, 5 );
- wxBoxSizer* bSizer176;
- bSizer176 = new wxBoxSizer( wxVERTICAL );
+ 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") );
+ 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( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer176->Add( 5, 2, 0, 0, 5 );
+ bSizer176->Add( 5, 2, 0, 0, 5 );
- bSizer176->Add( 0, 0, 1, wxEXPAND, 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") );
+ 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 );
+ bSizer176->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStatistics->Add( bSizer176, 0, wxEXPAND, 5 );
+ bSizerStatistics->Add( bSizer176, 0, wxEXPAND, 5 );
- bSizer1801->Add( bSizerStatistics, 0, wxALL, 4 );
+ bSizer1801->Add( bSizerStatistics, 0, wxALL, 4 );
- m_panelStatistics->SetSizer( bSizer1801 );
- m_panelStatistics->Layout();
- bSizer1801->Fit( m_panelStatistics );
- bSizerViewFilter->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_panelStatistics->SetSizer( bSizer1801 );
+ m_panelStatistics->Layout();
+ bSizer1801->Fit( m_panelStatistics );
+ bSizerViewFilter->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_panelViewFilter->SetSizer( bSizerViewFilter );
- m_panelViewFilter->Layout();
- bSizerViewFilter->Fit( m_panelViewFilter );
- bSizerPanelHolder->Add( m_panelViewFilter, 0, 0, 5 );
+ m_panelViewFilter->SetSizer( bSizerViewFilter );
+ m_panelViewFilter->Layout();
+ bSizerViewFilter->Fit( m_panelViewFilter );
+ bSizerPanelHolder->Add( m_panelViewFilter, 0, 0, 5 );
- this->SetSizer( bSizerPanelHolder );
- this->Layout();
- bSizerPanelHolder->Fit( this );
+ this->SetSizer( bSizerPanelHolder );
+ this->Layout();
+ bSizerPanelHolder->Fit( this );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigNew ), this, m_menuItemNew->GetId());
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ), this, m_menuItemLoad->GetId());
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ), this, m_menuItemSave->GetId());
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSaveAs ), this, m_menuItemSaveAs->GetId());
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ), this, m_menuItemSaveAsBatch->GetId());
- m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ), this, m_menuItemQuit->GetId());
- m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowLog ), this, m_menuItemShowLog->GetId());
- m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), this, m_menuItemCompare->GetId());
- m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), this, m_menuItemCompSettings->GetId());
- m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), this, m_menuItemFilter->GetId());
- m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), this, m_menuItemSyncSettings->GetId());
- m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), this, m_menuItemSynchronize->GetId());
- m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuOptions ), this, m_menuItemOptions->GetId());
- m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuFindItem ), this, m_menuItemFind->GetId());
- m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ), this, m_menuItemExportList->GetId());
- m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuResetLayout ), this, m_menuItem51->GetId());
- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ), this, m_menuItemHelp->GetId());
- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ), this, m_menuItemCheckVersionNow->GetId());
- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersionAutomatically ), this, m_menuItemCheckVersionAuto->GetId());
- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ), this, m_menuItemAbout->GetId());
- m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
- m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this );
- m_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCompSettingsContext ), NULL, this );
- m_bpButtonCmpContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompSettingsContext ), NULL, this );
- m_bpButtonCmpContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCompSettingsContext ), 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_bpButtonFilterContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnGlobalFilterContext ), NULL, this );
- m_bpButtonFilterContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnGlobalFilterContext ), 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_bpButtonSyncContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettingsContext ), NULL, this );
- m_bpButtonSyncContext->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::OnTopFolderPairAdd ), NULL, this );
- m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopFolderPairRemove ), NULL, this );
- m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this );
- m_bpButtonLocalCompCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopLocalCompCfg ), NULL, this );
- m_bpButtonLocalFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopLocalFilterCfg ), NULL, this );
- m_bpButtonLocalSyncCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopLocalSyncCfg ), NULL, this );
- m_bpButtonHideSearch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideSearchPanel ), NULL, this );
- m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogGenerated::OnSearchGridEnter ), NULL, this );
- m_bpButtonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigNew ), NULL, this );
- m_bpButtonOpen->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ), NULL, this );
- m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ), NULL, this );
- m_bpButtonSaveAs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigSaveAs ), NULL, this );
- m_bpButtonSaveAsBatch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ), NULL, this );
- m_bpButtonShowLog->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnShowLog ), NULL, this );
- m_bpButtonViewTypeSyncAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewType ), NULL, this );
- m_bpButtonViewContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnViewTypeContext ), NULL, this );
- m_bpButtonViewContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewTypeContext ), NULL, this );
- m_bpButtonShowExcluded->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowUpdateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDoNothing->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowUpdateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
- m_bpButtonShowConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigNew ), this, m_menuItemNew->GetId());
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ), this, m_menuItemLoad->GetId());
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ), this, m_menuItemSave->GetId());
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigSaveAs ), this, m_menuItemSaveAs->GetId());
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ), this, m_menuItemSaveAsBatch->GetId());
+ m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ), this, m_menuItemQuit->GetId());
+ m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowLog ), this, m_menuItemShowLog->GetId());
+ m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), this, m_menuItemCompare->GetId());
+ m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), this, m_menuItemCompSettings->GetId());
+ m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), this, m_menuItemFilter->GetId());
+ m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), this, m_menuItemSyncSettings->GetId());
+ m_menu4->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), this, m_menuItemSynchronize->GetId());
+ m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuOptions ), this, m_menuItemOptions->GetId());
+ m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuFindItem ), this, m_menuItemFind->GetId());
+ m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ), this, m_menuItemExportList->GetId());
+ m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuResetLayout ), this, m_menuItem51->GetId());
+ m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ), this, m_menuItemHelp->GetId());
+ m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ), this, m_menuItemCheckVersionNow->GetId());
+ m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersionAutomatically ), this, m_menuItemCheckVersionAuto->GetId());
+ m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ), this, m_menuItemAbout->GetId());
+ m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
+ m_buttonCompare->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCompSettingsContextMouse ), NULL, this );
+ m_bpButtonCmpContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompSettingsContext ), NULL, this );
+ m_bpButtonCmpContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnCompSettingsContextMouse ), NULL, this );
+ m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnGlobalFilterContextMouse ), NULL, this );
+ m_bpButtonFilterContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnGlobalFilterContext ), NULL, this );
+ m_bpButtonFilterContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnGlobalFilterContextMouse ), NULL, this );
+ m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this );
+ m_buttonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this );
+ m_buttonSync->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnSyncSettingsContextMouse ), NULL, this );
+ m_bpButtonSyncContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettingsContext ), NULL, this );
+ m_bpButtonSyncContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnSyncSettingsContextMouse ), NULL, this );
+ m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopFolderPairAdd ), NULL, this );
+ m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopFolderPairRemove ), NULL, this );
+ m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this );
+ m_bpButtonLocalCompCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopLocalCompCfg ), NULL, this );
+ m_bpButtonLocalFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopLocalFilterCfg ), NULL, this );
+ m_bpButtonLocalSyncCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnTopLocalSyncCfg ), NULL, this );
+ m_bpButtonHideSearch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideSearchPanel ), NULL, this );
+ m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogGenerated::OnSearchGridEnter ), NULL, this );
+ m_bpButtonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigNew ), NULL, this );
+ m_bpButtonOpen->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigLoad ), NULL, this );
+ m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigSave ), NULL, this );
+ m_bpButtonSaveAs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigSaveAs ), NULL, this );
+ m_bpButtonSaveAsBatch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveAsBatchJob ), NULL, this );
+ m_bpButtonShowLog->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnShowLog ), NULL, this );
+ m_bpButtonViewTypeSyncAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewType ), NULL, this );
+ m_bpButtonViewTypeSyncAction->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewTypeContextMouse ), NULL, this );
+ m_bpButtonViewContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnViewTypeContext ), NULL, this );
+ m_bpButtonViewContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::OnViewTypeContextMouse ), NULL, this );
+ m_bpButtonShowExcluded->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowUpdateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDoNothing->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowUpdateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
+ m_bpButtonShowConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnToggleViewButton ), NULL, this );
}
MainDialogGenerated::~MainDialogGenerated()
@@ -1189,98 +1190,98 @@ MainDialogGenerated::~MainDialogGenerated()
FolderPairPanelGenerated::FolderPairPanelGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
- wxBoxSizer* bSizer74;
- bSizer74 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer74;
+ bSizer74 = new wxBoxSizer( wxHORIZONTAL );
- m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelLeft->SetMinSize( wxSize( 1,-1 ) );
+ m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelLeft->SetMinSize( wxSize( 1, -1 ) );
- wxBoxSizer* bSizer134;
- bSizer134 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer134;
+ bSizer134 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonFolderPairOptions = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonFolderPairOptions->SetToolTip( _("Arrange folder pair") );
+ m_bpButtonFolderPairOptions = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonFolderPairOptions->SetToolTip( _("Arrange folder pair") );
- bSizer134->Add( m_bpButtonFolderPairOptions, 0, wxEXPAND, 5 );
+ bSizer134->Add( m_bpButtonFolderPairOptions, 0, wxEXPAND, 5 );
- m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
+ m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
- bSizer134->Add( m_bpButtonRemovePair, 0, wxEXPAND, 5 );
+ bSizer134->Add( m_bpButtonRemovePair, 0, wxEXPAND, 5 );
- m_folderPathLeft = new fff::FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer134->Add( m_folderPathLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_folderPathLeft = new fff::FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer134->Add( m_folderPathLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectFolderLeft = new wxButton( m_panelLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonSelectFolderLeft->SetToolTip( _("Select a folder") );
+ m_buttonSelectFolderLeft = new wxButton( m_panelLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_buttonSelectFolderLeft->SetToolTip( _("Select a folder") );
- bSizer134->Add( m_buttonSelectFolderLeft, 0, wxEXPAND, 5 );
+ bSizer134->Add( m_buttonSelectFolderLeft, 0, wxEXPAND, 5 );
- m_bpButtonSelectAltFolderLeft = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSelectAltFolderLeft->SetToolTip( _("Access online storage") );
+ m_bpButtonSelectAltFolderLeft = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSelectAltFolderLeft->SetToolTip( _("Access online storage") );
- bSizer134->Add( m_bpButtonSelectAltFolderLeft, 0, wxEXPAND, 5 );
+ bSizer134->Add( m_bpButtonSelectAltFolderLeft, 0, wxEXPAND, 5 );
- m_panelLeft->SetSizer( bSizer134 );
- m_panelLeft->Layout();
- bSizer134->Fit( m_panelLeft );
- bSizer74->Add( m_panelLeft, 0, wxLEFT|wxEXPAND, 5 );
+ m_panelLeft->SetSizer( bSizer134 );
+ m_panelLeft->Layout();
+ bSizer134->Fit( m_panelLeft );
+ bSizer74->Add( m_panelLeft, 0, wxLEFT|wxEXPAND, 5 );
- m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer95;
- bSizer95 = new wxBoxSizer( wxHORIZONTAL );
+ m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer95;
+ bSizer95 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonLocalCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonLocalCompCfg->SetToolTip( _("dummy") );
+ m_bpButtonLocalCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonLocalCompCfg->SetToolTip( _("dummy") );
- bSizer95->Add( m_bpButtonLocalCompCfg, 0, wxEXPAND, 5 );
+ bSizer95->Add( m_bpButtonLocalCompCfg, 0, wxEXPAND, 5 );
- m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonLocalFilter->SetToolTip( _("dummy") );
+ m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonLocalFilter->SetToolTip( _("dummy") );
- bSizer95->Add( m_bpButtonLocalFilter, 0, wxEXPAND, 5 );
+ bSizer95->Add( m_bpButtonLocalFilter, 0, wxEXPAND, 5 );
- m_bpButtonLocalSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonLocalSyncCfg->SetToolTip( _("dummy") );
+ m_bpButtonLocalSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonLocalSyncCfg->SetToolTip( _("dummy") );
- bSizer95->Add( m_bpButtonLocalSyncCfg, 0, wxEXPAND, 5 );
+ bSizer95->Add( m_bpButtonLocalSyncCfg, 0, wxEXPAND, 5 );
- m_panel20->SetSizer( bSizer95 );
- m_panel20->Layout();
- bSizer95->Fit( m_panel20 );
- bSizer74->Add( m_panel20, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ m_panel20->SetSizer( bSizer95 );
+ m_panel20->Layout();
+ bSizer95->Fit( m_panel20 );
+ bSizer74->Add( m_panel20, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
- m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelRight->SetMinSize( wxSize( 1,-1 ) );
+ m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelRight->SetMinSize( wxSize( 1, -1 ) );
- wxBoxSizer* bSizer135;
- bSizer135 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer135;
+ bSizer135 = new wxBoxSizer( wxHORIZONTAL );
- m_folderPathRight = new fff::FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer135->Add( m_folderPathRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_folderPathRight = new fff::FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer135->Add( m_folderPathRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectFolderRight = new wxButton( m_panelRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectFolderRight->SetToolTip( _("Select a folder") );
+ m_buttonSelectFolderRight = new wxButton( m_panelRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectFolderRight->SetToolTip( _("Select a folder") );
- bSizer135->Add( m_buttonSelectFolderRight, 0, wxEXPAND, 5 );
+ bSizer135->Add( m_buttonSelectFolderRight, 0, wxEXPAND, 5 );
- m_bpButtonSelectAltFolderRight = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSelectAltFolderRight->SetToolTip( _("Access online storage") );
+ m_bpButtonSelectAltFolderRight = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSelectAltFolderRight->SetToolTip( _("Access online storage") );
- bSizer135->Add( m_bpButtonSelectAltFolderRight, 0, wxEXPAND, 5 );
+ bSizer135->Add( m_bpButtonSelectAltFolderRight, 0, wxEXPAND, 5 );
- m_panelRight->SetSizer( bSizer135 );
- m_panelRight->Layout();
- bSizer135->Fit( m_panelRight );
- bSizer74->Add( m_panelRight, 1, wxRIGHT|wxEXPAND, 5 );
+ m_panelRight->SetSizer( bSizer135 );
+ m_panelRight->Layout();
+ bSizer135->Fit( m_panelRight );
+ bSizer74->Add( m_panelRight, 1, wxRIGHT|wxEXPAND, 5 );
- this->SetSizer( bSizer74 );
- this->Layout();
- bSizer74->Fit( this );
+ this->SetSizer( bSizer74 );
+ this->Layout();
+ bSizer74->Fit( this );
}
FolderPairPanelGenerated::~FolderPairPanelGenerated()
@@ -1289,1196 +1290,1229 @@ FolderPairPanelGenerated::~FolderPairPanelGenerated()
ConfigDlgGenerated::ConfigDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer7;
- bSizer7 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer7;
+ bSizer7 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer190;
- bSizer190 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer190;
+ bSizer190 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer1911;
- bSizer1911 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer1911;
+ bSizer1911 = new wxBoxSizer( wxVERTICAL );
- m_staticTextFolderPairLabel = new wxStaticText( this, wxID_ANY, _("Folder pair:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextFolderPairLabel->Wrap( -1 );
- bSizer1911->Add( m_staticTextFolderPairLabel, 0, wxALL, 5 );
+ m_staticTextFolderPairLabel = new wxStaticText( this, wxID_ANY, _("Folder pair:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFolderPairLabel->Wrap( -1 );
+ bSizer1911->Add( m_staticTextFolderPairLabel, 0, wxALL, 5 );
- m_listBoxFolderPair = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB );
- bSizer1911->Add( m_listBoxFolderPair, 1, 0, 5 );
+ m_listBoxFolderPair = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB );
+ bSizer1911->Add( m_listBoxFolderPair, 1, 0, 5 );
- bSizer190->Add( bSizer1911, 0, wxEXPAND|wxLEFT, 5 );
+ bSizer190->Add( bSizer1911, 0, wxEXPAND|wxLEFT, 5 );
- m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panelCompSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelCompSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelCompSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelCompSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer275;
- bSizer275 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer275;
+ bSizer275 = new wxBoxSizer( wxVERTICAL );
- bSizerHeaderCompSettings = new wxBoxSizer( wxVERTICAL );
+ bSizerHeaderCompSettings = new wxBoxSizer( wxVERTICAL );
- m_staticTextMainCompSettings = new wxStaticText( m_panelCompSettingsTab, wxID_ANY, _("Main settings:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMainCompSettings->Wrap( -1 );
- bSizerHeaderCompSettings->Add( m_staticTextMainCompSettings, 0, wxALL, 10 );
+ m_staticTextMainCompSettings = new wxStaticText( m_panelCompSettingsTab, wxID_ANY, _("Main settings:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMainCompSettings->Wrap( -1 );
+ bSizerHeaderCompSettings->Add( m_staticTextMainCompSettings, 0, wxALL, 10 );
- m_checkBoxUseLocalCmpOptions = new wxCheckBox( m_panelCompSettingsTab, wxID_ANY, _("Use local settings:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxUseLocalCmpOptions->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_checkBoxUseLocalCmpOptions = new wxCheckBox( m_panelCompSettingsTab, wxID_ANY, _("Use local settings:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxUseLocalCmpOptions->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizerHeaderCompSettings->Add( m_checkBoxUseLocalCmpOptions, 0, wxALL|wxEXPAND, 10 );
+ bSizerHeaderCompSettings->Add( m_checkBoxUseLocalCmpOptions, 0, wxALL|wxEXPAND, 10 );
- m_staticlineCompHeader = new wxStaticLine( m_panelCompSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerHeaderCompSettings->Add( m_staticlineCompHeader, 0, wxEXPAND, 5 );
+ m_staticlineCompHeader = new wxStaticLine( m_panelCompSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerHeaderCompSettings->Add( m_staticlineCompHeader, 0, wxEXPAND, 5 );
- bSizer275->Add( bSizerHeaderCompSettings, 0, wxEXPAND, 5 );
+ bSizer275->Add( bSizerHeaderCompSettings, 0, wxEXPAND, 5 );
- m_panelComparisonSettings = new wxPanel( m_panelCompSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelComparisonSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelComparisonSettings = new wxPanel( m_panelCompSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelComparisonSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer2561;
- bSizer2561 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer2561;
+ bSizer2561 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer159;
- bSizer159 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer159;
+ bSizer159 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer178;
- bSizer178 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer178;
+ bSizer178 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer182;
- bSizer182 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer182;
+ bSizer182 = new wxBoxSizer( wxVERTICAL );
- m_staticText91 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Select a variant:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText91->Wrap( -1 );
- bSizer182->Add( m_staticText91, 0, wxALL, 5 );
+ m_staticText91 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Select a variant:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText91->Wrap( -1 );
+ bSizer182->Add( m_staticText91, 0, wxALL, 5 );
- wxGridSizer* gSizer2;
- gSizer2 = new wxGridSizer( 0, 1, 5, 0 );
+ wxGridSizer* gSizer2;
+ gSizer2 = new wxGridSizer( 0, 1, 0, 0 );
- m_toggleBtnByTimeSize = new wxToggleButton( m_panelComparisonSettings, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnByTimeSize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonByTimeSize = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- gSizer2->Add( m_toggleBtnByTimeSize, 0, wxEXPAND, 5 );
+ m_buttonByTimeSize->SetDefault();
+ m_buttonByTimeSize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonByTimeSize->SetToolTip( _("dummy") );
- m_toggleBtnByContent = new wxToggleButton( m_panelComparisonSettings, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnByContent->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ gSizer2->Add( m_buttonByTimeSize, 0, wxEXPAND, 5 );
- gSizer2->Add( m_toggleBtnByContent, 0, wxEXPAND, 5 );
+ m_buttonByContent = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_toggleBtnBySize = new wxToggleButton( m_panelComparisonSettings, wxID_ANY, _("File size"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnBySize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonByContent->SetDefault();
+ m_buttonByContent->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonByContent->SetToolTip( _("dummy") );
- gSizer2->Add( m_toggleBtnBySize, 0, wxEXPAND, 5 );
+ gSizer2->Add( m_buttonByContent, 0, wxEXPAND, 5 );
+ m_buttonBySize = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File size"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- bSizer182->Add( gSizer2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_buttonBySize->SetDefault();
+ m_buttonBySize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonBySize->SetToolTip( _("dummy") );
+ gSizer2->Add( m_buttonBySize, 0, wxEXPAND, 5 );
- bSizer178->Add( bSizer182, 0, wxALL, 5 );
- wxBoxSizer* bSizer2371;
- bSizer2371 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer182->Add( gSizer2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- m_bitmapCompVariant = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer2371->Add( m_bitmapCompVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextCompVarDescription = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCompVarDescription->Wrap( -1 );
- m_staticTextCompVarDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer178->Add( bSizer182, 0, wxALL, 5 );
- bSizer2371->Add( m_staticTextCompVarDescription, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ wxBoxSizer* bSizer2371;
+ bSizer2371 = new wxBoxSizer( wxHORIZONTAL );
+ m_bitmapCompVariant = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer2371->Add( m_bitmapCompVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer178->Add( bSizer2371, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_staticTextCompVarDescription = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCompVarDescription->Wrap( -1 );
+ m_staticTextCompVarDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer2371->Add( m_staticTextCompVarDescription, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer159->Add( bSizer178, 0, wxEXPAND, 5 );
- m_staticline33 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer159->Add( m_staticline33, 0, wxEXPAND, 5 );
+ bSizer178->Add( bSizer2371, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- wxBoxSizer* bSizer1734;
- bSizer1734 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer1721;
- bSizer1721 = new wxBoxSizer( wxVERTICAL );
+ bSizer159->Add( bSizer178, 0, wxEXPAND, 5 );
- m_checkBoxSymlinksInclude = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Include &symbolic links:"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer1721->Add( m_checkBoxSymlinksInclude, 0, wxALL, 5 );
+ m_staticline33 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer159->Add( m_staticline33, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer176;
- bSizer176 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer1734;
+ bSizer1734 = new wxBoxSizer( wxHORIZONTAL );
- m_radioBtnSymlinksFollow = new wxRadioButton( m_panelComparisonSettings, wxID_ANY, _("&Follow"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
- m_radioBtnSymlinksFollow->SetValue( true );
- bSizer176->Add( m_radioBtnSymlinksFollow, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ wxBoxSizer* bSizer1721;
+ bSizer1721 = new wxBoxSizer( wxVERTICAL );
- m_radioBtnSymlinksDirect = new wxRadioButton( m_panelComparisonSettings, wxID_ANY, _("&Direct"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer176->Add( m_radioBtnSymlinksDirect, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_checkBoxSymlinksInclude = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Include &symbolic links:"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer1721->Add( m_checkBoxSymlinksInclude, 0, wxALL, 5 );
+ wxBoxSizer* bSizer176;
+ bSizer176 = new wxBoxSizer( wxVERTICAL );
- bSizer1721->Add( bSizer176, 0, wxLEFT|wxEXPAND, 15 );
+ m_radioBtnSymlinksFollow = new wxRadioButton( m_panelComparisonSettings, wxID_ANY, _("&Follow"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_radioBtnSymlinksFollow->SetValue( true );
+ bSizer176->Add( m_radioBtnSymlinksFollow, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_radioBtnSymlinksDirect = new wxRadioButton( m_panelComparisonSettings, wxID_ANY, _("&Direct"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer176->Add( m_radioBtnSymlinksDirect, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer1721->Add( 0, 0, 1, wxEXPAND, 5 );
- m_hyperlink24 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("More information"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer1721->Add( m_hyperlink24, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bSizer1721->Add( bSizer176, 0, wxLEFT|wxEXPAND, 15 );
- bSizer1734->Add( bSizer1721, 0, wxALL|wxEXPAND, 5 );
+ bSizer1721->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticline44 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer1734->Add( m_staticline44, 0, wxEXPAND, 5 );
+ m_hyperlink24 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("More information"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer1721->Add( m_hyperlink24, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- wxBoxSizer* bSizer1733;
- bSizer1733 = new wxBoxSizer( wxVERTICAL );
- m_staticText112 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("&Ignore time shift [hh:mm]"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText112->Wrap( -1 );
- bSizer1733->Add( m_staticText112, 0, wxALL, 5 );
+ bSizer1734->Add( bSizer1721, 0, wxALL|wxEXPAND, 5 );
- m_textCtrlTimeShift = new wxTextCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_textCtrlTimeShift->SetToolTip( _("List of file time offsets to ignore") );
+ m_staticline44 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer1734->Add( m_staticline44, 0, wxEXPAND, 5 );
- bSizer1733->Add( m_textCtrlTimeShift, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ wxBoxSizer* bSizer1733;
+ bSizer1733 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer197;
- bSizer197 = new wxBoxSizer( wxHORIZONTAL );
+ m_staticText112 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("&Ignore time shift [hh:mm]"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText112->Wrap( -1 );
+ bSizer1733->Add( m_staticText112, 0, wxALL, 5 );
- m_staticText1381 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Example:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1381->Wrap( -1 );
- m_staticText1381->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_textCtrlTimeShift = new wxTextCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_textCtrlTimeShift->SetToolTip( _("List of file time offsets to ignore") );
- bSizer197->Add( m_staticText1381, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bSizer1733->Add( m_textCtrlTimeShift, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- m_staticText13811 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("1, 2, 4:30"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText13811->Wrap( -1 );
- m_staticText13811->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ wxBoxSizer* bSizer197;
+ bSizer197 = new wxBoxSizer( wxHORIZONTAL );
- bSizer197->Add( m_staticText13811, 0, wxBOTTOM|wxRIGHT, 5 );
+ m_staticText1381 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Example:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1381->Wrap( -1 );
+ m_staticText1381->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer197->Add( m_staticText1381, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer1733->Add( bSizer197, 0, 0, 5 );
+ m_staticText13811 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("1, 2, 4:30"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText13811->Wrap( -1 );
+ m_staticText13811->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer197->Add( m_staticText13811, 0, wxBOTTOM|wxRIGHT, 5 );
- bSizer1733->Add( 0, 0, 1, wxEXPAND, 5 );
- m_hyperlink241 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("Handle daylight saving time"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer1733->Add( m_hyperlink241, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bSizer1733->Add( bSizer197, 0, 0, 5 );
- bSizer1734->Add( bSizer1733, 0, wxALL|wxEXPAND, 5 );
+ bSizer1733->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticline441 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer1734->Add( m_staticline441, 0, wxEXPAND, 5 );
+ m_hyperlink241 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("Handle daylight saving time"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer1733->Add( m_hyperlink241, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer159->Add( bSizer1734, 0, 0, 5 );
+ bSizer1734->Add( bSizer1733, 0, wxALL|wxEXPAND, 5 );
- m_staticline331 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer159->Add( m_staticline331, 0, wxEXPAND, 5 );
+ m_staticline441 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer1734->Add( m_staticline441, 0, wxEXPAND, 5 );
- bSizerCompMisc = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer2781;
- bSizer2781 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer159->Add( bSizer1734, 0, 0, 5 );
- wxFlexGridSizer* fgSizer61;
- fgSizer61 = new wxFlexGridSizer( 0, 2, 5, 5 );
- fgSizer61->SetFlexibleDirection( wxBOTH );
- fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ m_staticline331 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer159->Add( m_staticline331, 0, wxEXPAND, 5 );
- m_bitmapIgnoreErrors = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer61->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerCompMisc = new wxBoxSizer( wxVERTICAL );
- m_checkBoxIgnoreErrors = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- fgSizer61->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ wxBoxSizer* bSizer2781;
+ bSizer2781 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapRetryErrors = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer61->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ wxFlexGridSizer* fgSizer61;
+ fgSizer61 = new wxFlexGridSizer( 0, 2, 5, 5 );
+ fgSizer61->SetFlexibleDirection( wxBOTH );
+ fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_checkBoxAutoRetry = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer61->Add( m_checkBoxAutoRetry, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ m_bitmapIgnoreErrors = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer61->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_checkBoxIgnoreErrors = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ fgSizer61->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- bSizer2781->Add( fgSizer61, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+ m_bitmapRetryErrors = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer61->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- fgSizerAutoRetry = new wxFlexGridSizer( 0, 2, 5, 10 );
- fgSizerAutoRetry->SetFlexibleDirection( wxBOTH );
- fgSizerAutoRetry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ m_checkBoxAutoRetry = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer61->Add( m_checkBoxAutoRetry, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_staticText96 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Retry count:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText96->Wrap( -1 );
- fgSizerAutoRetry->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextAutoRetryDelay = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Delay (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextAutoRetryDelay->Wrap( -1 );
- fgSizerAutoRetry->Add( m_staticTextAutoRetryDelay, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer2781->Add( fgSizer61, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
- m_spinCtrlAutoRetryCount = new wxSpinCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- fgSizerAutoRetry->Add( m_spinCtrlAutoRetryCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerAutoRetry = new wxFlexGridSizer( 0, 2, 5, 10 );
+ fgSizerAutoRetry->SetFlexibleDirection( wxBOTH );
+ fgSizerAutoRetry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_spinCtrlAutoRetryDelay = new wxSpinCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- fgSizerAutoRetry->Add( m_spinCtrlAutoRetryDelay, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText96 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Retry count:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText96->Wrap( -1 );
+ fgSizerAutoRetry->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextAutoRetryDelay = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Delay (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAutoRetryDelay->Wrap( -1 );
+ fgSizerAutoRetry->Add( m_staticTextAutoRetryDelay, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer2781->Add( fgSizerAutoRetry, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
+ m_spinCtrlAutoRetryCount = new wxSpinCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ fgSizerAutoRetry->Add( m_spinCtrlAutoRetryCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_spinCtrlAutoRetryDelay = new wxSpinCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ fgSizerAutoRetry->Add( m_spinCtrlAutoRetryDelay, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerCompMisc->Add( bSizer2781, 0, wxEXPAND, 5 );
- m_staticline3311 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerCompMisc->Add( m_staticline3311, 0, wxEXPAND, 5 );
+ bSizer2781->Add( fgSizerAutoRetry, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
- bSizer159->Add( bSizerCompMisc, 0, wxEXPAND, 5 );
+ bSizerCompMisc->Add( bSizer2781, 0, wxEXPAND, 5 );
+ m_staticline3311 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerCompMisc->Add( m_staticline3311, 0, wxEXPAND, 5 );
- bSizer2561->Add( bSizer159, 0, wxEXPAND, 5 );
- m_staticline751 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer2561->Add( m_staticline751, 0, wxEXPAND, 5 );
+ bSizer159->Add( bSizerCompMisc, 0, wxEXPAND, 5 );
- bSizerPerformance = new wxBoxSizer( wxVERTICAL );
- m_staticTextPerfDeRequired = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextPerfDeRequired->Wrap( -1 );
- bSizerPerformance->Add( m_staticTextPerfDeRequired, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer2561->Add( bSizer159, 0, wxEXPAND, 5 );
- m_staticlinePerfDeRequired = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerPerformance->Add( m_staticlinePerfDeRequired, 0, wxEXPAND, 5 );
+ m_staticline751 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer2561->Add( m_staticline751, 0, wxEXPAND, 5 );
- m_panelPerfHeader = new wxPanel( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelPerfHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ bSizerPerformance = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer2191;
- bSizer2191 = new wxBoxSizer( wxHORIZONTAL );
+ m_staticTextPerfDeRequired = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPerfDeRequired->Wrap( -1 );
+ bSizerPerformance->Add( m_staticTextPerfDeRequired, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bitmapPerf = new wxStaticBitmap( m_panelPerfHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer2191->Add( m_bitmapPerf, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_staticlinePerfDeRequired = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerPerformance->Add( m_staticlinePerfDeRequired, 0, wxEXPAND, 5 );
- m_staticText13611 = new wxStaticText( m_panelPerfHeader, wxID_ANY, _("Performance improvements:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText13611->Wrap( -1 );
- bSizer2191->Add( m_staticText13611, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ m_panelPerfHeader = new wxPanel( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelPerfHeader->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ wxBoxSizer* bSizer2191;
+ bSizer2191 = new wxBoxSizer( wxHORIZONTAL );
- m_panelPerfHeader->SetSizer( bSizer2191 );
- m_panelPerfHeader->Layout();
- bSizer2191->Fit( m_panelPerfHeader );
- bSizerPerformance->Add( m_panelPerfHeader, 0, wxEXPAND, 5 );
+ m_bitmapPerf = new wxStaticBitmap( m_panelPerfHeader, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer2191->Add( m_bitmapPerf, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- wxStaticLine* m_staticline75;
- m_staticline75 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerPerformance->Add( m_staticline75, 0, wxEXPAND, 5 );
+ m_staticText13611 = new wxStaticText( m_panelPerfHeader, wxID_ANY, _("Performance improvements:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText13611->Wrap( -1 );
+ bSizer2191->Add( m_staticText13611, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizer260 = new wxBoxSizer( wxVERTICAL );
- m_staticTextPerfParallelOps = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Parallel file operations:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextPerfParallelOps->Wrap( -1 );
- bSizer260->Add( m_staticTextPerfParallelOps, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_panelPerfHeader->SetSizer( bSizer2191 );
+ m_panelPerfHeader->Layout();
+ bSizer2191->Fit( m_panelPerfHeader );
+ bSizerPerformance->Add( m_panelPerfHeader, 0, wxEXPAND, 5 );
- m_scrolledWindowPerf = new wxScrolledWindow( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_scrolledWindowPerf->SetScrollRate( 5, 5 );
- m_scrolledWindowPerf->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ wxStaticLine* m_staticline75;
+ m_staticline75 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerPerformance->Add( m_staticline75, 0, wxEXPAND, 5 );
- fgSizerPerf = new wxFlexGridSizer( 0, 2, 5, 5 );
- fgSizerPerf->SetFlexibleDirection( wxBOTH );
- fgSizerPerf->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ bSizer260 = new wxBoxSizer( wxVERTICAL );
+ m_staticTextPerfParallelOps = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Parallel file operations:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPerfParallelOps->Wrap( -1 );
+ bSizer260->Add( m_staticTextPerfParallelOps, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_scrolledWindowPerf->SetSizer( fgSizerPerf );
- m_scrolledWindowPerf->Layout();
- fgSizerPerf->Fit( m_scrolledWindowPerf );
- bSizer260->Add( m_scrolledWindowPerf, 1, wxALL|wxEXPAND, 5 );
+ m_scrolledWindowPerf = new wxScrolledWindow( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_scrolledWindowPerf->SetScrollRate( 5, 5 );
+ m_scrolledWindowPerf->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_hyperlink1711 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("How to get best performance?"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer260->Add( m_hyperlink1711, 0, wxALL, 5 );
+ fgSizerPerf = new wxFlexGridSizer( 0, 2, 5, 5 );
+ fgSizerPerf->SetFlexibleDirection( wxBOTH );
+ fgSizerPerf->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- bSizerPerformance->Add( bSizer260, 1, wxALL|wxEXPAND, 5 );
+ m_scrolledWindowPerf->SetSizer( fgSizerPerf );
+ m_scrolledWindowPerf->Layout();
+ fgSizerPerf->Fit( m_scrolledWindowPerf );
+ bSizer260->Add( m_scrolledWindowPerf, 1, wxALL|wxEXPAND, 5 );
+ m_hyperlink1711 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("How to get best performance?"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer260->Add( m_hyperlink1711, 0, wxALL, 5 );
- bSizer2561->Add( bSizerPerformance, 1, wxEXPAND, 5 );
+ bSizerPerformance->Add( bSizer260, 1, wxALL|wxEXPAND, 5 );
- m_panelComparisonSettings->SetSizer( bSizer2561 );
- m_panelComparisonSettings->Layout();
- bSizer2561->Fit( m_panelComparisonSettings );
- bSizer275->Add( m_panelComparisonSettings, 1, wxEXPAND, 5 );
+ bSizer2561->Add( bSizerPerformance, 1, wxEXPAND, 5 );
- m_panelCompSettingsTab->SetSizer( bSizer275 );
- m_panelCompSettingsTab->Layout();
- bSizer275->Fit( m_panelCompSettingsTab );
- m_notebook->AddPage( m_panelCompSettingsTab, _("dummy"), false );
- m_panelFilterSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelFilterSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer278;
- bSizer278 = new wxBoxSizer( wxVERTICAL );
+ m_panelComparisonSettings->SetSizer( bSizer2561 );
+ m_panelComparisonSettings->Layout();
+ bSizer2561->Fit( m_panelComparisonSettings );
+ bSizer275->Add( m_panelComparisonSettings, 1, wxEXPAND, 5 );
- bSizerHeaderFilterSettings = new wxBoxSizer( wxVERTICAL );
- m_staticTextMainFilterSettings = new wxStaticText( m_panelFilterSettingsTab, wxID_ANY, _("Main settings:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMainFilterSettings->Wrap( -1 );
- bSizerHeaderFilterSettings->Add( m_staticTextMainFilterSettings, 0, wxALL, 10 );
+ m_panelCompSettingsTab->SetSizer( bSizer275 );
+ m_panelCompSettingsTab->Layout();
+ bSizer275->Fit( m_panelCompSettingsTab );
+ m_notebook->AddPage( m_panelCompSettingsTab, _("dummy"), false );
+ m_panelFilterSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelFilterSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_staticTextLocalFilterSettings = new wxStaticText( m_panelFilterSettingsTab, wxID_ANY, _("Local settings:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextLocalFilterSettings->Wrap( -1 );
- bSizerHeaderFilterSettings->Add( m_staticTextLocalFilterSettings, 0, wxALL, 10 );
+ wxBoxSizer* bSizer278;
+ bSizer278 = new wxBoxSizer( wxVERTICAL );
- m_staticlineFilterHeader = new wxStaticLine( m_panelFilterSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerHeaderFilterSettings->Add( m_staticlineFilterHeader, 0, wxEXPAND, 5 );
+ bSizerHeaderFilterSettings = new wxBoxSizer( wxVERTICAL );
+ m_staticTextMainFilterSettings = new wxStaticText( m_panelFilterSettingsTab, wxID_ANY, _("Main settings:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMainFilterSettings->Wrap( -1 );
+ bSizerHeaderFilterSettings->Add( m_staticTextMainFilterSettings, 0, wxALL, 10 );
- bSizer278->Add( bSizerHeaderFilterSettings, 0, wxEXPAND, 5 );
+ m_staticTextLocalFilterSettings = new wxStaticText( m_panelFilterSettingsTab, wxID_ANY, _("Local settings:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextLocalFilterSettings->Wrap( -1 );
+ bSizerHeaderFilterSettings->Add( m_staticTextLocalFilterSettings, 0, wxALL, 10 );
- m_panelFilterSettings = new wxPanel( m_panelFilterSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelFilterSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_staticlineFilterHeader = new wxStaticLine( m_panelFilterSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerHeaderFilterSettings->Add( m_staticlineFilterHeader, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer1591;
- bSizer1591 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer166;
- bSizer166 = new wxBoxSizer( wxVERTICAL );
+ bSizer278->Add( bSizerHeaderFilterSettings, 0, wxEXPAND, 5 );
+ m_panelFilterSettings = new wxPanel( m_panelFilterSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelFilterSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizer166->Add( 0, 10, 0, 0, 5 );
+ wxBoxSizer* bSizer1591;
+ bSizer1591 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer1661;
- bSizer1661 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer166;
+ bSizer166 = new wxBoxSizer( wxVERTICAL );
- m_bitmapInclude = new wxStaticBitmap( m_panelFilterSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer1661->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- wxBoxSizer* bSizer1731;
- bSizer1731 = new wxBoxSizer( wxVERTICAL );
+ bSizer166->Add( 0, 10, 0, 0, 5 );
- m_staticText78 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Include:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText78->Wrap( -1 );
- bSizer1731->Add( m_staticText78, 0, 0, 5 );
+ wxBoxSizer* bSizer1661;
+ bSizer1661 = new wxBoxSizer( wxHORIZONTAL );
- m_textCtrlInclude = new wxTextCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
- bSizer1731->Add( m_textCtrlInclude, 1, wxEXPAND|wxTOP, 5 );
+ m_bitmapInclude = new wxStaticBitmap( m_panelFilterSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer1661->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ wxBoxSizer* bSizer1731;
+ bSizer1731 = new wxBoxSizer( wxVERTICAL );
- bSizer1661->Add( bSizer1731, 1, wxEXPAND, 5 );
+ m_staticText78 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Include:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText78->Wrap( -1 );
+ bSizer1731->Add( m_staticText78, 0, 0, 5 );
+ m_textCtrlInclude = new wxTextCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_MULTILINE );
+ bSizer1731->Add( m_textCtrlInclude, 1, wxEXPAND|wxTOP, 5 );
- bSizer166->Add( bSizer1661, 3, wxEXPAND|wxLEFT, 5 );
+ bSizer1661->Add( bSizer1731, 1, wxEXPAND, 5 );
- bSizer166->Add( 0, 10, 0, 0, 5 );
- wxBoxSizer* bSizer1651;
- bSizer1651 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer166->Add( bSizer1661, 3, wxEXPAND|wxLEFT, 5 );
- m_bitmapExclude = new wxStaticBitmap( m_panelFilterSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer1651->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- wxBoxSizer* bSizer1742;
- bSizer1742 = new wxBoxSizer( wxVERTICAL );
+ bSizer166->Add( 0, 10, 0, 0, 5 );
- wxBoxSizer* bSizer189;
- bSizer189 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer1651;
+ bSizer1651 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText77 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Exclude:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText77->Wrap( -1 );
- bSizer189->Add( m_staticText77, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapExclude = new wxStaticBitmap( m_panelFilterSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer1651->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ wxBoxSizer* bSizer1742;
+ bSizer1742 = new wxBoxSizer( wxVERTICAL );
- bSizer189->Add( 0, 0, 1, wxEXPAND, 5 );
+ wxBoxSizer* bSizer189;
+ bSizer189 = new wxBoxSizer( wxHORIZONTAL );
- m_hyperlink171 = new wxHyperlinkCtrl( m_panelFilterSettings, wxID_ANY, _("Show examples"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer189->Add( m_hyperlink171, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ m_staticText77 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Exclude:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText77->Wrap( -1 );
+ bSizer189->Add( m_staticText77, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer1742->Add( bSizer189, 0, wxEXPAND, 5 );
+ bSizer189->Add( 0, 0, 1, wxEXPAND, 5 );
- m_textCtrlExclude = new wxTextCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
- bSizer1742->Add( m_textCtrlExclude, 1, wxEXPAND|wxTOP, 5 );
+ m_hyperlink171 = new wxHyperlinkCtrl( m_panelFilterSettings, wxID_ANY, _("Show examples"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer189->Add( m_hyperlink171, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
- bSizer1651->Add( bSizer1742, 1, wxEXPAND, 5 );
+ bSizer1742->Add( bSizer189, 0, wxEXPAND, 5 );
+ m_textCtrlExclude = new wxTextCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_MULTILINE );
+ bSizer1742->Add( m_textCtrlExclude, 1, wxEXPAND|wxTOP, 5 );
- bSizer166->Add( bSizer1651, 5, wxEXPAND|wxLEFT, 5 );
- m_staticTextFilterDescr = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Select filter rules to exclude certain files from synchronization. Enter file paths relative to their corresponding folder pair."), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextFilterDescr->Wrap( -1 );
- m_staticTextFilterDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer1651->Add( bSizer1742, 1, wxEXPAND, 5 );
- bSizer166->Add( m_staticTextFilterDescr, 0, wxALL, 10 );
+ bSizer166->Add( bSizer1651, 5, wxEXPAND|wxLEFT, 5 );
- bSizer1591->Add( bSizer166, 1, wxEXPAND, 5 );
+ m_staticTextFilterDescr = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Select filter rules to exclude certain files from synchronization. Enter file paths relative to their corresponding folder pair."), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextFilterDescr->Wrap( -1 );
+ m_staticTextFilterDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- m_staticline24 = new wxStaticLine( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer1591->Add( m_staticline24, 0, wxEXPAND, 5 );
+ bSizer166->Add( m_staticTextFilterDescr, 0, wxALL, 10 );
- wxBoxSizer* bSizer160;
- bSizer160 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer168;
- bSizer168 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer1591->Add( bSizer166, 1, wxEXPAND, 5 );
- m_bitmapFilterSize = new wxStaticBitmap( m_panelFilterSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer168->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ m_staticline24 = new wxStaticLine( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer1591->Add( m_staticline24, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer160;
+ bSizer160 = new wxBoxSizer( wxVERTICAL );
- m_staticText80 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("File size:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText80->Wrap( -1 );
- bSizer158->Add( m_staticText80, 0, wxBOTTOM, 5 );
+ wxBoxSizer* bSizer168;
+ bSizer168 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer162;
- bSizer162 = new wxBoxSizer( wxVERTICAL );
+ m_bitmapFilterSize = new wxStaticBitmap( m_panelFilterSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer168->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- m_staticText101 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Minimum:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText101->Wrap( -1 );
- bSizer162->Add( m_staticText101, 0, wxBOTTOM, 2 );
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxVERTICAL );
- m_spinCtrlMinSize = new wxSpinCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer162->Add( m_spinCtrlMinSize, 0, wxEXPAND, 5 );
+ m_staticText80 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("File size:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText80->Wrap( -1 );
+ bSizer158->Add( m_staticText80, 0, wxBOTTOM, 5 );
- wxArrayString m_choiceUnitMinSizeChoices;
- m_choiceUnitMinSize = new wxChoice( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 );
- m_choiceUnitMinSize->SetSelection( 0 );
- bSizer162->Add( m_choiceUnitMinSize, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer162;
+ bSizer162 = new wxBoxSizer( wxVERTICAL );
+ m_staticText101 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Minimum:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText101->Wrap( -1 );
+ bSizer162->Add( m_staticText101, 0, wxBOTTOM, 2 );
- bSizer158->Add( bSizer162, 0, wxBOTTOM|wxEXPAND, 5 );
+ m_spinCtrlMinSize = new wxSpinCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer162->Add( m_spinCtrlMinSize, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer163;
- bSizer163 = new wxBoxSizer( wxVERTICAL );
+ wxArrayString m_choiceUnitMinSizeChoices;
+ m_choiceUnitMinSize = new wxChoice( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 );
+ m_choiceUnitMinSize->SetSelection( 0 );
+ bSizer162->Add( m_choiceUnitMinSize, 0, wxEXPAND, 5 );
- m_staticText102 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Maximum:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText102->Wrap( -1 );
- bSizer163->Add( m_staticText102, 0, wxBOTTOM, 2 );
- m_spinCtrlMaxSize = new wxSpinCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer163->Add( m_spinCtrlMaxSize, 0, wxEXPAND, 5 );
+ bSizer158->Add( bSizer162, 0, wxBOTTOM|wxEXPAND, 5 );
- wxArrayString m_choiceUnitMaxSizeChoices;
- m_choiceUnitMaxSize = new wxChoice( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 );
- m_choiceUnitMaxSize->SetSelection( 0 );
- bSizer163->Add( m_choiceUnitMaxSize, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer163;
+ bSizer163 = new wxBoxSizer( wxVERTICAL );
+ m_staticText102 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Maximum:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText102->Wrap( -1 );
+ bSizer163->Add( m_staticText102, 0, wxBOTTOM, 2 );
- bSizer158->Add( bSizer163, 0, wxEXPAND, 5 );
+ m_spinCtrlMaxSize = new wxSpinCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer163->Add( m_spinCtrlMaxSize, 0, wxEXPAND, 5 );
+ wxArrayString m_choiceUnitMaxSizeChoices;
+ m_choiceUnitMaxSize = new wxChoice( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 );
+ m_choiceUnitMaxSize->SetSelection( 0 );
+ bSizer163->Add( m_choiceUnitMaxSize, 0, wxEXPAND, 5 );
- bSizer168->Add( bSizer158, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer158->Add( bSizer163, 0, wxEXPAND, 5 );
- bSizer160->Add( bSizer168, 2, wxEXPAND|wxALL, 5 );
- m_staticline23 = new wxStaticLine( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer160->Add( m_staticline23, 0, wxEXPAND, 5 );
+ bSizer168->Add( bSizer158, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- wxBoxSizer* bSizer167;
- bSizer167 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapFilterDate = new wxStaticBitmap( m_panelFilterSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer167->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizer160->Add( bSizer168, 2, wxEXPAND|wxALL, 5 );
- wxBoxSizer* bSizer165;
- bSizer165 = new wxBoxSizer( wxVERTICAL );
+ m_staticline23 = new wxStaticLine( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer160->Add( m_staticline23, 0, wxEXPAND, 5 );
- m_staticText79 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Time span:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText79->Wrap( -1 );
- bSizer165->Add( m_staticText79, 0, wxBOTTOM, 5 );
+ wxBoxSizer* bSizer167;
+ bSizer167 = new wxBoxSizer( wxHORIZONTAL );
- wxArrayString m_choiceUnitTimespanChoices;
- m_choiceUnitTimespan = new wxChoice( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 );
- m_choiceUnitTimespan->SetSelection( 0 );
- bSizer165->Add( m_choiceUnitTimespan, 0, wxEXPAND, 5 );
+ m_bitmapFilterDate = new wxStaticBitmap( m_panelFilterSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer167->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_spinCtrlTimespan = new wxSpinCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer165->Add( m_spinCtrlTimespan, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer165;
+ bSizer165 = new wxBoxSizer( wxVERTICAL );
+ m_staticText79 = new wxStaticText( m_panelFilterSettings, wxID_ANY, _("Time span:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText79->Wrap( -1 );
+ bSizer165->Add( m_staticText79, 0, wxBOTTOM, 5 );
- bSizer167->Add( bSizer165, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ wxArrayString m_choiceUnitTimespanChoices;
+ m_choiceUnitTimespan = new wxChoice( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 );
+ m_choiceUnitTimespan->SetSelection( 0 );
+ bSizer165->Add( m_choiceUnitTimespan, 0, wxEXPAND, 5 );
+ m_spinCtrlTimespan = new wxSpinCtrl( m_panelFilterSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer165->Add( m_spinCtrlTimespan, 0, wxEXPAND, 5 );
- bSizer160->Add( bSizer167, 1, wxEXPAND|wxALL, 5 );
- m_staticline231 = new wxStaticLine( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer160->Add( m_staticline231, 0, wxEXPAND, 5 );
+ bSizer167->Add( bSizer165, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- m_buttonClear = new wxButton( m_panelFilterSettings, wxID_ANY, _("C&lear"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer160->Add( m_buttonClear, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 10 );
+ bSizer160->Add( bSizer167, 1, wxEXPAND|wxALL, 5 );
- bSizer1591->Add( bSizer160, 0, wxEXPAND, 5 );
+ m_staticline231 = new wxStaticLine( m_panelFilterSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer160->Add( m_staticline231, 0, wxEXPAND, 5 );
+ m_buttonClear = new wxButton( m_panelFilterSettings, wxID_ANY, _("C&lear"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer160->Add( m_buttonClear, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 10 );
- m_panelFilterSettings->SetSizer( bSizer1591 );
- m_panelFilterSettings->Layout();
- bSizer1591->Fit( m_panelFilterSettings );
- bSizer278->Add( m_panelFilterSettings, 1, wxEXPAND, 5 );
+ bSizer1591->Add( bSizer160, 0, wxEXPAND, 5 );
- m_panelFilterSettingsTab->SetSizer( bSizer278 );
- m_panelFilterSettingsTab->Layout();
- bSizer278->Fit( m_panelFilterSettingsTab );
- m_notebook->AddPage( m_panelFilterSettingsTab, _("dummy"), false );
- m_panelSyncSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelSyncSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer276;
- bSizer276 = new wxBoxSizer( wxVERTICAL );
+ m_panelFilterSettings->SetSizer( bSizer1591 );
+ m_panelFilterSettings->Layout();
+ bSizer1591->Fit( m_panelFilterSettings );
+ bSizer278->Add( m_panelFilterSettings, 1, wxEXPAND, 5 );
- bSizerHeaderSyncSettings = new wxBoxSizer( wxVERTICAL );
- m_staticTextMainSyncSettings = new wxStaticText( m_panelSyncSettingsTab, wxID_ANY, _("Main settings:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMainSyncSettings->Wrap( -1 );
- bSizerHeaderSyncSettings->Add( m_staticTextMainSyncSettings, 0, wxALL, 10 );
+ m_panelFilterSettingsTab->SetSizer( bSizer278 );
+ m_panelFilterSettingsTab->Layout();
+ bSizer278->Fit( m_panelFilterSettingsTab );
+ m_notebook->AddPage( m_panelFilterSettingsTab, _("dummy"), false );
+ m_panelSyncSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelSyncSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_checkBoxUseLocalSyncOptions = new wxCheckBox( m_panelSyncSettingsTab, wxID_ANY, _("Use local settings:"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerHeaderSyncSettings->Add( m_checkBoxUseLocalSyncOptions, 0, wxALL|wxEXPAND, 10 );
+ wxBoxSizer* bSizer276;
+ bSizer276 = new wxBoxSizer( wxVERTICAL );
- m_staticlineSyncHeader = new wxStaticLine( m_panelSyncSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerHeaderSyncSettings->Add( m_staticlineSyncHeader, 0, wxEXPAND, 5 );
+ bSizerHeaderSyncSettings = new wxBoxSizer( wxVERTICAL );
+ m_staticTextMainSyncSettings = new wxStaticText( m_panelSyncSettingsTab, wxID_ANY, _("Main settings:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMainSyncSettings->Wrap( -1 );
+ bSizerHeaderSyncSettings->Add( m_staticTextMainSyncSettings, 0, wxALL, 10 );
- bSizer276->Add( bSizerHeaderSyncSettings, 0, wxEXPAND, 5 );
+ m_checkBoxUseLocalSyncOptions = new wxCheckBox( m_panelSyncSettingsTab, wxID_ANY, _("Use local settings:"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerHeaderSyncSettings->Add( m_checkBoxUseLocalSyncOptions, 0, wxALL|wxEXPAND, 10 );
- m_panelSyncSettings = new wxPanel( m_panelSyncSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelSyncSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_staticlineSyncHeader = new wxStaticLine( m_panelSyncSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerHeaderSyncSettings->Add( m_staticlineSyncHeader, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer232;
- bSizer232 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer237;
- bSizer237 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer276->Add( bSizerHeaderSyncSettings, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer235;
- bSizer235 = new wxBoxSizer( wxVERTICAL );
+ m_panelSyncSettings = new wxPanel( m_panelSyncSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelSyncSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_staticText86 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Select a variant:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText86->Wrap( -1 );
- bSizer235->Add( m_staticText86, 0, wxALL, 5 );
+ wxBoxSizer* bSizer232;
+ bSizer232 = new wxBoxSizer( wxVERTICAL );
- wxGridSizer* gSizer1;
- gSizer1 = new wxGridSizer( 0, 1, 5, 0 );
+ wxBoxSizer* bSizer237;
+ bSizer237 = new wxBoxSizer( wxHORIZONTAL );
- m_toggleBtnTwoWay = new wxToggleButton( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnTwoWay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ wxBoxSizer* bSizer235;
+ bSizer235 = new wxBoxSizer( wxVERTICAL );
- gSizer1->Add( m_toggleBtnTwoWay, 0, wxEXPAND, 5 );
+ m_staticText86 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Select a variant:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText86->Wrap( -1 );
+ bSizer235->Add( m_staticText86, 0, wxALL, 5 );
- m_toggleBtnMirror = new wxToggleButton( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnMirror->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ wxGridSizer* gSizer1;
+ gSizer1 = new wxGridSizer( 0, 1, 0, 0 );
- gSizer1->Add( m_toggleBtnMirror, 0, wxEXPAND, 5 );
+ m_buttonTwoWay = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Two way"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_toggleBtnUpdate = new wxToggleButton( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnUpdate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonTwoWay->SetDefault();
+ m_buttonTwoWay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonTwoWay->SetToolTip( _("dummy") );
- gSizer1->Add( m_toggleBtnUpdate, 0, wxEXPAND, 5 );
+ gSizer1->Add( m_buttonTwoWay, 0, wxEXPAND, 5 );
- m_toggleBtnCustom = new wxToggleButton( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnCustom->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonMirror = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Mirror"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- gSizer1->Add( m_toggleBtnCustom, 0, wxEXPAND, 5 );
+ m_buttonMirror->SetDefault();
+ m_buttonMirror->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonMirror->SetToolTip( _("dummy") );
+ gSizer1->Add( m_buttonMirror, 0, wxEXPAND, 5 );
- bSizer235->Add( gSizer1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_buttonUpdate = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Update"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_buttonUpdate->SetDefault();
+ m_buttonUpdate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonUpdate->SetToolTip( _("dummy") );
- bSizer237->Add( bSizer235, 0, wxALL, 5 );
+ gSizer1->Add( m_buttonUpdate, 0, wxEXPAND, 5 );
+ m_buttonCustom = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- bSizer237->Add( 10, 0, 0, 0, 5 );
+ m_buttonCustom->SetDefault();
+ m_buttonCustom->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonCustom->SetToolTip( _("dummy") );
- wxBoxSizer* bSizer238;
- bSizer238 = new wxBoxSizer( wxVERTICAL );
+ gSizer1->Add( m_buttonCustom, 0, wxEXPAND, 5 );
- bSizer238->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer235->Add( gSizer1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizerSyncDirHolder = new wxBoxSizer( wxHORIZONTAL );
- bSizerSyncDirections = new wxBoxSizer( wxVERTICAL );
+ bSizer237->Add( bSizer235, 0, wxALL, 5 );
- m_staticTextCategory = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCategory->Wrap( -1 );
- bSizerSyncDirections->Add( m_staticTextCategory, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 );
- ffgSizer11->SetFlexibleDirection( wxBOTH );
- ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ bSizer237->Add( 10, 0, 0, 0, 5 );
- m_bitmapLeftOnly = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_bitmapLeftOnly->SetToolTip( _("Item exists on left side only") );
+ wxBoxSizer* bSizer238;
+ bSizer238 = new wxBoxSizer( wxVERTICAL );
- ffgSizer11->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bitmapLeftNewer = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_bitmapLeftNewer->SetToolTip( _("Left side is newer") );
+ bSizer238->Add( 0, 0, 1, wxEXPAND, 5 );
- ffgSizer11->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerSyncDirHolder = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapDifferent = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_bitmapDifferent->SetToolTip( _("Items have different content") );
+ bSizerSyncDirections = new wxBoxSizer( wxVERTICAL );
- ffgSizer11->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextCategory = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCategory->Wrap( -1 );
+ bSizerSyncDirections->Add( m_staticTextCategory, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bitmapConflict = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_bitmapConflict->SetToolTip( _("Conflict/item cannot be categorized") );
+ ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 );
+ ffgSizer11->SetFlexibleDirection( wxBOTH );
+ ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- ffgSizer11->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapLeftOnly = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_bitmapLeftOnly->SetToolTip( _("Item exists on left side only") );
- m_bitmapRightNewer = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_bitmapRightNewer->SetToolTip( _("Right side is newer") );
+ ffgSizer11->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer11->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapLeftNewer = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_bitmapLeftNewer->SetToolTip( _("Left side is newer") );
- m_bitmapRightOnly = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_bitmapRightOnly->SetToolTip( _("Item exists on right side only") );
+ ffgSizer11->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer11->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapDifferent = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_bitmapDifferent->SetToolTip( _("Items have different content") );
- m_bpButtonLeftOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- ffgSizer11->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ ffgSizer11->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonLeftNewer = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- ffgSizer11->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapConflict = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_bitmapConflict->SetToolTip( _("Conflict/item cannot be categorized") );
- m_bpButtonDifferent = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- ffgSizer11->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ ffgSizer11->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonConflict = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- ffgSizer11->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapRightNewer = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_bitmapRightNewer->SetToolTip( _("Right side is newer") );
- m_bpButtonRightNewer = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- ffgSizer11->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ ffgSizer11->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonRightOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- ffgSizer11->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapRightOnly = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_bitmapRightOnly->SetToolTip( _("Item exists on right side only") );
+ ffgSizer11->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerSyncDirections->Add( ffgSizer11, 0, 0, 5 );
+ m_bpButtonLeftOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ ffgSizer11->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText120 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText120->Wrap( -1 );
- bSizerSyncDirections->Add( m_staticText120, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
+ m_bpButtonLeftNewer = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ ffgSizer11->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bpButtonDifferent = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ ffgSizer11->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerSyncDirHolder->Add( bSizerSyncDirections, 0, 0, 5 );
+ m_bpButtonConflict = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ ffgSizer11->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerDatabase = new wxBoxSizer( wxVERTICAL );
+ m_bpButtonRightNewer = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ ffgSizer11->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bitmapDatabase = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerDatabase->Add( m_bitmapDatabase, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonRightOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ ffgSizer11->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerDatabase->Add( 0, 3, 0, 0, 5 );
+ bSizerSyncDirections->Add( ffgSizer11, 0, 0, 5 );
- m_staticText145 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("sync.ffs_db"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText145->Wrap( -1 );
- m_staticText145->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_SWISS, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxT("Arial") ) );
- m_staticText145->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText120 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText120->Wrap( -1 );
+ bSizerSyncDirections->Add( m_staticText120, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
- bSizerDatabase->Add( m_staticText145, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizerSyncDirHolder->Add( bSizerSyncDirections, 0, 0, 5 );
- bSizerSyncDirHolder->Add( bSizerDatabase, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerDatabase = new wxBoxSizer( wxVERTICAL );
- m_staticTextSyncVarDescription = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextSyncVarDescription->Wrap( -1 );
- m_staticTextSyncVarDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_bitmapDatabase = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerDatabase->Add( m_bitmapDatabase, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerSyncDirHolder->Add( m_staticTextSyncVarDescription, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10 );
+ bSizerDatabase->Add( 0, 3, 0, 0, 5 );
- bSizer238->Add( bSizerSyncDirHolder, 0, wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ m_staticText145 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("sync.ffs_db"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText145->Wrap( -1 );
+ m_staticText145->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_SWISS, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxT("Arial") ) );
+ m_staticText145->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizerDatabase->Add( m_staticText145, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer238->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticline431 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer238->Add( m_staticline431, 0, wxEXPAND, 5 );
+ bSizerSyncDirHolder->Add( bSizerDatabase, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- wxBoxSizer* bSizer201;
- bSizer201 = new wxBoxSizer( wxHORIZONTAL );
+ m_staticTextSyncVarDescription = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextSyncVarDescription->Wrap( -1 );
+ m_staticTextSyncVarDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- m_staticline72 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer201->Add( m_staticline72, 0, wxEXPAND, 5 );
+ bSizerSyncDirHolder->Add( m_staticTextSyncVarDescription, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10 );
- wxBoxSizer* bSizer249;
- bSizer249 = new wxBoxSizer( wxHORIZONTAL );
- m_checkBoxDetectMove = new wxCheckBox( m_panelSyncSettings, wxID_ANY, _("Detect moved files"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxDetectMove->SetToolTip( _("- Not supported by all file systems\n- Requires and creates database files\n- Detection not available for first sync") );
+ bSizer238->Add( bSizerSyncDirHolder, 0, wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizer249->Add( m_checkBoxDetectMove, 0, wxALL|wxEXPAND, 5 );
- m_hyperlink242 = new wxHyperlinkCtrl( m_panelSyncSettings, wxID_ANY, _("More information"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer249->Add( m_hyperlink242, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer238->Add( 0, 0, 1, wxEXPAND, 5 );
+ m_staticline431 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer238->Add( m_staticline431, 0, wxEXPAND, 5 );
- bSizer201->Add( bSizer249, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ wxBoxSizer* bSizer201;
+ bSizer201 = new wxBoxSizer( wxHORIZONTAL );
+ m_staticline72 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer201->Add( m_staticline72, 0, wxEXPAND, 5 );
- bSizer238->Add( bSizer201, 0, 0, 5 );
+ wxBoxSizer* bSizer249;
+ bSizer249 = new wxBoxSizer( wxHORIZONTAL );
+ m_checkBoxDetectMove = new wxCheckBox( m_panelSyncSettings, wxID_ANY, _("Detect moved files"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxDetectMove->SetToolTip( _("- Not supported by all file systems\n- Requires and creates database files\n- Detection not available for first sync") );
- bSizer237->Add( bSizer238, 1, wxEXPAND, 5 );
+ bSizer249->Add( m_checkBoxDetectMove, 0, wxALL|wxEXPAND, 5 );
+ m_hyperlink242 = new wxHyperlinkCtrl( m_panelSyncSettings, wxID_ANY, _("More information"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer249->Add( m_hyperlink242, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer232->Add( bSizer237, 0, wxEXPAND, 5 );
- m_staticline54 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer232->Add( m_staticline54, 0, wxEXPAND, 5 );
+ bSizer201->Add( bSizer249, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer2361 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer202;
- bSizer202 = new wxBoxSizer( wxVERTICAL );
+ bSizer238->Add( bSizer201, 0, 0, 5 );
- m_staticText87 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Delete files:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText87->Wrap( -1 );
- bSizer202->Add( m_staticText87, 0, wxALL, 5 );
- wxBoxSizer* bSizer234;
- bSizer234 = new wxBoxSizer( wxVERTICAL );
+ bSizer237->Add( bSizer238, 1, wxEXPAND, 5 );
- m_toggleBtnRecycler = new wxToggleButton( m_panelSyncSettings, wxID_ANY, _("&Recycle bin"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer234->Add( m_toggleBtnRecycler, 0, wxEXPAND, 5 );
- m_toggleBtnPermanent = new wxToggleButton( m_panelSyncSettings, wxID_ANY, _("&Permanent"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer234->Add( m_toggleBtnPermanent, 0, wxEXPAND, 5 );
+ bSizer232->Add( bSizer237, 0, wxEXPAND, 5 );
- m_toggleBtnVersioning = new wxToggleButton( m_panelSyncSettings, wxID_ANY, _("&Versioning"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer234->Add( m_toggleBtnVersioning, 0, wxEXPAND, 5 );
+ m_staticline54 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer232->Add( m_staticline54, 0, wxEXPAND, 5 );
+ bSizer2361 = new wxBoxSizer( wxHORIZONTAL );
- bSizer202->Add( bSizer234, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ wxBoxSizer* bSizer202;
+ bSizer202 = new wxBoxSizer( wxVERTICAL );
+ m_staticText87 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Delete files:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText87->Wrap( -1 );
+ bSizer202->Add( m_staticText87, 0, wxALL, 5 );
- bSizer2361->Add( bSizer202, 0, wxALL, 5 );
+ wxBoxSizer* bSizer234;
+ bSizer234 = new wxBoxSizer( wxVERTICAL );
- bSizerVersioningHolder = new wxBoxSizer( wxVERTICAL );
+ m_buttonRecycler = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Recycle bin"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_buttonRecycler->SetDefault();
+ m_buttonRecycler->SetToolTip( _("dummy") );
- bSizerVersioningHolder->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer234->Add( m_buttonRecycler, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer2331;
- bSizer2331 = new wxBoxSizer( wxHORIZONTAL );
+ m_buttonPermanent = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Permanent"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_bitmapDeletionType = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer2331->Add( m_bitmapDeletionType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_buttonPermanent->SetDefault();
+ m_buttonPermanent->SetToolTip( _("dummy") );
- m_staticTextDeletionTypeDescription = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDeletionTypeDescription->Wrap( -1 );
- m_staticTextDeletionTypeDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer234->Add( m_buttonPermanent, 0, wxEXPAND, 5 );
- bSizer2331->Add( m_staticTextDeletionTypeDescription, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_buttonVersioning = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Versioning"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_buttonVersioning->SetDefault();
+ m_buttonVersioning->SetToolTip( _("dummy") );
- bSizerVersioningHolder->Add( bSizer2331, 0, wxALL|wxEXPAND, 5 );
+ bSizer234->Add( m_buttonVersioning, 0, wxEXPAND, 5 );
- m_panelVersioning = new wxPanel( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelVersioning->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer191;
- bSizer191 = new wxBoxSizer( wxVERTICAL );
+ bSizer202->Add( bSizer234, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer191->Add( 0, 5, 0, 0, 5 );
+ bSizer2361->Add( bSizer202, 0, wxALL, 5 );
- wxBoxSizer* bSizer252;
- bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+ bSizerVersioningHolder = new wxBoxSizer( wxVERTICAL );
- m_bitmapVersioning = new wxStaticBitmap( m_panelVersioning, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer252->Add( m_bitmapVersioning, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- wxBoxSizer* bSizer253;
- bSizer253 = new wxBoxSizer( wxVERTICAL );
+ bSizerVersioningHolder->Add( 0, 0, 1, wxEXPAND, 5 );
- wxBoxSizer* bSizer254;
- bSizer254 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer2331;
+ bSizer2331 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText155 = new wxStaticText( m_panelVersioning, wxID_ANY, _("Move files to a user-defined folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText155->Wrap( -1 );
- m_staticText155->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_bitmapDeletionType = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer2331->Add( m_bitmapDeletionType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizer254->Add( m_staticText155, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_staticTextDeletionTypeDescription = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDeletionTypeDescription->Wrap( -1 );
+ m_staticTextDeletionTypeDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer2331->Add( m_staticTextDeletionTypeDescription, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizer254->Add( 0, 0, 1, wxEXPAND, 5 );
- m_hyperlink243 = new wxHyperlinkCtrl( m_panelVersioning, wxID_ANY, _("Show examples"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer254->Add( m_hyperlink243, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+ bSizerVersioningHolder->Add( bSizer2331, 0, wxALL|wxEXPAND, 5 );
+ m_panelVersioning = new wxPanel( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelVersioning->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizer253->Add( bSizer254, 0, wxEXPAND|wxBOTTOM, 5 );
+ wxBoxSizer* bSizer191;
+ bSizer191 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer156;
- bSizer156 = new wxBoxSizer( wxHORIZONTAL );
- m_versioningFolderPath = new fff::FolderHistoryBox( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer156->Add( m_versioningFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer191->Add( 0, 5, 0, 0, 5 );
- m_buttonSelectVersioningFolder = new wxButton( m_panelVersioning, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectVersioningFolder->SetToolTip( _("Select a folder") );
+ wxBoxSizer* bSizer252;
+ bSizer252 = new wxBoxSizer( wxHORIZONTAL );
- bSizer156->Add( m_buttonSelectVersioningFolder, 0, wxEXPAND, 5 );
+ m_bitmapVersioning = new wxStaticBitmap( m_panelVersioning, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer252->Add( m_bitmapVersioning, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- m_bpButtonSelectVersioningAltFolder = new wxBitmapButton( m_panelVersioning, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSelectVersioningAltFolder->SetToolTip( _("Access online storage") );
+ wxBoxSizer* bSizer253;
+ bSizer253 = new wxBoxSizer( wxVERTICAL );
- bSizer156->Add( m_bpButtonSelectVersioningAltFolder, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer254;
+ bSizer254 = new wxBoxSizer( wxHORIZONTAL );
+ m_staticText155 = new wxStaticText( m_panelVersioning, wxID_ANY, _("Move files to a user-defined folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText155->Wrap( -1 );
+ m_staticText155->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer253->Add( bSizer156, 0, wxEXPAND, 5 );
+ bSizer254->Add( m_staticText155, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer252->Add( bSizer253, 1, wxRIGHT, 5 );
+ bSizer254->Add( 0, 0, 1, wxEXPAND, 5 );
+ m_hyperlink243 = new wxHyperlinkCtrl( m_panelVersioning, wxID_ANY, _("Show examples"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer254->Add( m_hyperlink243, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
- bSizer191->Add( bSizer252, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
- wxBoxSizer* bSizer198;
- bSizer198 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer253->Add( bSizer254, 0, wxEXPAND|wxBOTTOM, 5 );
- wxBoxSizer* bSizer255;
- bSizer255 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer156;
+ bSizer156 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer256;
- bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+ m_versioningFolderPath = new fff::FolderHistoryBox( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer156->Add( m_versioningFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText93 = new wxStaticText( m_panelVersioning, wxID_ANY, _("Naming convention:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText93->Wrap( -1 );
- bSizer256->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_buttonSelectVersioningFolder = new wxButton( m_panelVersioning, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectVersioningFolder->SetToolTip( _("Select a folder") );
- wxArrayString m_choiceVersioningStyleChoices;
- m_choiceVersioningStyle = new wxChoice( m_panelVersioning, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVersioningStyleChoices, 0 );
- m_choiceVersioningStyle->SetSelection( 0 );
- bSizer256->Add( m_choiceVersioningStyle, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer156->Add( m_buttonSelectVersioningFolder, 0, wxEXPAND, 5 );
+ m_bpButtonSelectVersioningAltFolder = new wxBitmapButton( m_panelVersioning, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSelectVersioningAltFolder->SetToolTip( _("Access online storage") );
- bSizer255->Add( bSizer256, 0, wxALL, 5 );
+ bSizer156->Add( m_bpButtonSelectVersioningAltFolder, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer257;
- bSizer257 = new wxBoxSizer( wxHORIZONTAL );
- m_staticTextNamingCvtPart1 = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextNamingCvtPart1->Wrap( -1 );
- m_staticTextNamingCvtPart1->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer253->Add( bSizer156, 0, wxEXPAND, 5 );
- bSizer257->Add( m_staticTextNamingCvtPart1, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextNamingCvtPart2Bold = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextNamingCvtPart2Bold->Wrap( -1 );
- m_staticTextNamingCvtPart2Bold->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- m_staticTextNamingCvtPart2Bold->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer252->Add( bSizer253, 1, wxRIGHT, 5 );
- bSizer257->Add( m_staticTextNamingCvtPart2Bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextNamingCvtPart3 = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextNamingCvtPart3->Wrap( -1 );
- m_staticTextNamingCvtPart3->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ bSizer191->Add( bSizer252, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
- bSizer257->Add( m_staticTextNamingCvtPart3, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ wxBoxSizer* bSizer198;
+ bSizer198 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer255;
+ bSizer255 = new wxBoxSizer( wxVERTICAL );
- bSizer255->Add( bSizer257, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ wxBoxSizer* bSizer256;
+ bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+ m_staticText93 = new wxStaticText( m_panelVersioning, wxID_ANY, _("Naming convention:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText93->Wrap( -1 );
+ bSizer256->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer198->Add( bSizer255, 0, wxALL, 5 );
+ wxArrayString m_choiceVersioningStyleChoices;
+ m_choiceVersioningStyle = new wxChoice( m_panelVersioning, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVersioningStyleChoices, 0 );
+ m_choiceVersioningStyle->SetSelection( 0 );
+ bSizer256->Add( m_choiceVersioningStyle, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticline69 = new wxStaticLine( m_panelVersioning, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer198->Add( m_staticline69, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer258;
- bSizer258 = new wxBoxSizer( wxVERTICAL );
+ bSizer255->Add( bSizer256, 0, wxALL, 5 );
- m_staticTextLimitVersions = new wxStaticText( m_panelVersioning, wxID_ANY, _("Limit file versions:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextLimitVersions->Wrap( -1 );
- bSizer258->Add( m_staticTextLimitVersions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ wxBoxSizer* bSizer257;
+ bSizer257 = new wxBoxSizer( wxHORIZONTAL );
- fgSizer15 = new wxFlexGridSizer( 0, 3, 5, 10 );
- fgSizer15->SetFlexibleDirection( wxBOTH );
- fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ m_staticTextNamingCvtPart1 = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextNamingCvtPart1->Wrap( -1 );
+ m_staticTextNamingCvtPart1->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- m_checkBoxVersionMaxDays = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Last x days:"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer15->Add( m_checkBoxVersionMaxDays, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer257->Add( m_staticTextNamingCvtPart1, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_checkBoxVersionCountMin = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Minimum:"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer15->Add( m_checkBoxVersionCountMin, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextNamingCvtPart2Bold = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextNamingCvtPart2Bold->Wrap( -1 );
+ m_staticTextNamingCvtPart2Bold->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextNamingCvtPart2Bold->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- m_checkBoxVersionCountMax = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Maximum:"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer15->Add( m_checkBoxVersionCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer257->Add( m_staticTextNamingCvtPart2Bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_spinCtrlVersionMaxDays = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- fgSizer15->Add( m_spinCtrlVersionMaxDays, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextNamingCvtPart3 = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextNamingCvtPart3->Wrap( -1 );
+ m_staticTextNamingCvtPart3->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- m_spinCtrlVersionCountMin = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- fgSizer15->Add( m_spinCtrlVersionCountMin, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer257->Add( m_staticTextNamingCvtPart3, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_spinCtrlVersionCountMax = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- fgSizer15->Add( m_spinCtrlVersionCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer255->Add( bSizer257, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer258->Add( fgSizer15, 0, wxALL, 5 );
+ bSizer198->Add( bSizer255, 0, wxALL, 5 );
- bSizer198->Add( bSizer258, 0, wxALL, 5 );
+ m_staticline69 = new wxStaticLine( m_panelVersioning, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer198->Add( m_staticline69, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer258;
+ bSizer258 = new wxBoxSizer( wxVERTICAL );
- bSizer191->Add( bSizer198, 0, wxEXPAND, 5 );
+ m_staticTextLimitVersions = new wxStaticText( m_panelVersioning, wxID_ANY, _("Limit file versions:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextLimitVersions->Wrap( -1 );
+ bSizer258->Add( m_staticTextLimitVersions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ fgSizer15 = new wxFlexGridSizer( 0, 3, 5, 10 );
+ fgSizer15->SetFlexibleDirection( wxBOTH );
+ fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_panelVersioning->SetSizer( bSizer191 );
- m_panelVersioning->Layout();
- bSizer191->Fit( m_panelVersioning );
- bSizerVersioningHolder->Add( m_panelVersioning, 0, wxEXPAND, 5 );
+ m_checkBoxVersionMaxDays = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Last x days:"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer15->Add( m_checkBoxVersionMaxDays, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_checkBoxVersionCountMin = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Minimum:"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer15->Add( m_checkBoxVersionCountMin, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerVersioningHolder->Add( 0, 0, 1, wxEXPAND, 5 );
+ m_checkBoxVersionCountMax = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Maximum:"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer15->Add( m_checkBoxVersionCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_spinCtrlVersionMaxDays = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ fgSizer15->Add( m_spinCtrlVersionMaxDays, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer2361->Add( bSizerVersioningHolder, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_spinCtrlVersionCountMin = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ fgSizer15->Add( m_spinCtrlVersionCountMin, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_spinCtrlVersionCountMax = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ fgSizer15->Add( m_spinCtrlVersionCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer232->Add( bSizer2361, 0, wxEXPAND, 5 );
- m_staticline582 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer232->Add( m_staticline582, 0, wxEXPAND, 5 );
+ bSizer258->Add( fgSizer15, 0, wxALL, 5 );
- bSizerSyncMisc = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer292;
- bSizer292 = new wxBoxSizer( wxVERTICAL );
+ bSizer198->Add( bSizer258, 0, wxALL, 5 );
- wxBoxSizer* bSizer287;
- bSizer287 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer290;
- bSizer290 = new wxBoxSizer( wxVERTICAL );
+ bSizer191->Add( bSizer198, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer291;
- bSizer291 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapEmail = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer291->Add( m_bitmapEmail, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_panelVersioning->SetSizer( bSizer191 );
+ m_panelVersioning->Layout();
+ bSizer191->Fit( m_panelVersioning );
+ bSizerVersioningHolder->Add( m_panelVersioning, 0, wxEXPAND, 5 );
- m_checkBoxSendEmail = new wxCheckBox( m_panelSyncSettings, wxID_ANY, _("Send email notification:"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer291->Add( m_checkBoxSendEmail, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ bSizerVersioningHolder->Add( 0, 0, 1, wxEXPAND, 5 );
- bSizer290->Add( bSizer291, 0, 0, 5 );
- m_comboBoxEmail = new fff::CommandBox( m_panelSyncSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer290->Add( m_comboBoxEmail, 0, wxEXPAND|wxTOP, 5 );
+ bSizer2361->Add( bSizerVersioningHolder, 1, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer287->Add( bSizer290, 1, wxRIGHT, 5 );
+ bSizer232->Add( bSizer2361, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer289;
- bSizer289 = new wxBoxSizer( wxVERTICAL );
+ m_staticline582 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer232->Add( m_staticline582, 0, wxEXPAND, 5 );
- m_bpButtonEmailAlways = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- bSizer289->Add( m_bpButtonEmailAlways, 0, 0, 5 );
+ bSizerSyncMisc = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonEmailErrorWarning = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- bSizer289->Add( m_bpButtonEmailErrorWarning, 0, 0, 5 );
+ wxBoxSizer* bSizer292;
+ bSizer292 = new wxBoxSizer( wxVERTICAL );
- m_bpButtonEmailErrorOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- bSizer289->Add( m_bpButtonEmailErrorOnly, 0, 0, 5 );
+ wxBoxSizer* bSizer287;
+ bSizer287 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer290;
+ bSizer290 = new wxBoxSizer( wxVERTICAL );
- bSizer287->Add( bSizer289, 0, wxLEFT, 5 );
+ wxBoxSizer* bSizer291;
+ bSizer291 = new wxBoxSizer( wxHORIZONTAL );
+ m_bitmapEmail = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer291->Add( m_bitmapEmail, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer292->Add( bSizer287, 0, wxEXPAND, 5 );
+ m_checkBoxSendEmail = new wxCheckBox( m_panelSyncSettings, wxID_ANY, _("Send email notification:"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer291->Add( m_checkBoxSendEmail, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- m_staticTextPerfDeRequired2 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextPerfDeRequired2->Wrap( -1 );
- bSizer292->Add( m_staticTextPerfDeRequired2, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 );
+ bSizer290->Add( bSizer291, 0, 0, 5 );
- bSizerSyncMisc->Add( bSizer292, 0, wxEXPAND|wxALL, 10 );
+ m_comboBoxEmail = new fff::CommandBox( m_panelSyncSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer290->Add( m_comboBoxEmail, 0, wxEXPAND|wxTOP, 5 );
- m_staticline57 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizerSyncMisc->Add( m_staticline57, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer293;
- bSizer293 = new wxBoxSizer( wxVERTICAL );
+ bSizer287->Add( bSizer290, 1, wxRIGHT, 5 );
- wxBoxSizer* bSizer2372;
- bSizer2372 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer289;
+ bSizer289 = new wxBoxSizer( wxVERTICAL );
- m_panelLogfile = new wxPanel( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelLogfile->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_bpButtonEmailAlways = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ bSizer289->Add( m_bpButtonEmailAlways, 0, 0, 5 );
- wxBoxSizer* bSizer1912;
- bSizer1912 = new wxBoxSizer( wxVERTICAL );
+ m_bpButtonEmailErrorWarning = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ bSizer289->Add( m_bpButtonEmailErrorWarning, 0, 0, 5 );
- wxBoxSizer* bSizer279;
- bSizer279 = new wxBoxSizer( wxHORIZONTAL );
+ m_bpButtonEmailErrorOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ bSizer289->Add( m_bpButtonEmailErrorOnly, 0, 0, 5 );
- m_bitmapLogFile = new wxStaticBitmap( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer279->Add( m_bitmapLogFile, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_checkBoxOverrideLogPath = new wxCheckBox( m_panelLogfile, wxID_ANY, _("&Override default log path:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxOverrideLogPath->SetValue(true);
- bSizer279->Add( m_checkBoxOverrideLogPath, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ bSizer287->Add( bSizer289, 0, wxLEFT, 5 );
- m_buttonSelectLogFolder = new wxButton( m_panelLogfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectLogFolder->SetToolTip( _("Select a folder") );
- bSizer279->Add( m_buttonSelectLogFolder, 0, wxEXPAND, 5 );
+ bSizer292->Add( bSizer287, 0, wxEXPAND, 5 );
- m_bpButtonSelectAltLogFolder = new wxBitmapButton( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSelectAltLogFolder->SetToolTip( _("Access online storage") );
+ m_staticTextPerfDeRequired2 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPerfDeRequired2->Wrap( -1 );
+ bSizer292->Add( m_staticTextPerfDeRequired2, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 );
- bSizer279->Add( m_bpButtonSelectAltLogFolder, 0, wxEXPAND, 5 );
+ bSizerSyncMisc->Add( bSizer292, 0, wxEXPAND|wxALL, 10 );
- bSizer1912->Add( bSizer279, 0, wxEXPAND, 5 );
+ m_staticline57 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizerSyncMisc->Add( m_staticline57, 0, wxEXPAND, 5 );
- m_logFolderPath = new fff::FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer1912->Add( m_logFolderPath, 0, wxEXPAND|wxTOP, 5 );
+ wxBoxSizer* bSizer293;
+ bSizer293 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer2372;
+ bSizer2372 = new wxBoxSizer( wxHORIZONTAL );
- m_panelLogfile->SetSizer( bSizer1912 );
- m_panelLogfile->Layout();
- bSizer1912->Fit( m_panelLogfile );
- bSizer2372->Add( m_panelLogfile, 1, 0, 5 );
+ m_panelLogfile = new wxPanel( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelLogfile->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ wxBoxSizer* bSizer1912;
+ bSizer1912 = new wxBoxSizer( wxVERTICAL );
- bSizer293->Add( bSizer2372, 0, wxALL|wxEXPAND, 10 );
+ wxBoxSizer* bSizer279;
+ bSizer279 = new wxBoxSizer( wxHORIZONTAL );
- m_staticline80 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer293->Add( m_staticline80, 0, wxEXPAND, 5 );
+ m_bitmapLogFile = new wxStaticBitmap( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer279->Add( m_bitmapLogFile, 0, wxALIGN_CENTER_VERTICAL, 5 );
- wxBoxSizer* bSizer247;
- bSizer247 = new wxBoxSizer( wxHORIZONTAL );
+ m_checkBoxOverrideLogPath = new wxCheckBox( m_panelLogfile, wxID_ANY, _("&Override default log path:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxOverrideLogPath->SetValue(true);
+ bSizer279->Add( m_checkBoxOverrideLogPath, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
- m_staticTextPostSync = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Run a command:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextPostSync->Wrap( -1 );
- bSizer247->Add( m_staticTextPostSync, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_buttonSelectLogFolder = new wxButton( m_panelLogfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectLogFolder->SetToolTip( _("Select a folder") );
- wxArrayString m_choicePostSyncConditionChoices;
- m_choicePostSyncCondition = new wxChoice( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncConditionChoices, 0 );
- m_choicePostSyncCondition->SetSelection( 0 );
- bSizer247->Add( m_choicePostSyncCondition, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer279->Add( m_buttonSelectLogFolder, 0, wxEXPAND, 5 );
- m_comboBoxPostSyncCommand = new fff::CommandBox( m_panelSyncSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer247->Add( m_comboBoxPostSyncCommand, 1, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bpButtonSelectAltLogFolder = new wxBitmapButton( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSelectAltLogFolder->SetToolTip( _("Access online storage") );
+ bSizer279->Add( m_bpButtonSelectAltLogFolder, 0, wxEXPAND, 5 );
- bSizer293->Add( bSizer247, 0, wxALL|wxEXPAND, 10 );
+ bSizer1912->Add( bSizer279, 0, wxEXPAND, 5 );
- bSizerSyncMisc->Add( bSizer293, 1, 0, 5 );
+ m_logFolderPath = new fff::FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer1912->Add( m_logFolderPath, 0, wxEXPAND|wxTOP, 5 );
- bSizer232->Add( bSizerSyncMisc, 1, wxEXPAND, 5 );
+ m_panelLogfile->SetSizer( bSizer1912 );
+ m_panelLogfile->Layout();
+ bSizer1912->Fit( m_panelLogfile );
+ bSizer2372->Add( m_panelLogfile, 1, 0, 5 );
- m_panelSyncSettings->SetSizer( bSizer232 );
- m_panelSyncSettings->Layout();
- bSizer232->Fit( m_panelSyncSettings );
- bSizer276->Add( m_panelSyncSettings, 1, wxEXPAND, 5 );
+ bSizer293->Add( bSizer2372, 0, wxALL|wxEXPAND, 10 );
+ m_staticline80 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer293->Add( m_staticline80, 0, wxEXPAND, 5 );
- m_panelSyncSettingsTab->SetSizer( bSizer276 );
- m_panelSyncSettingsTab->Layout();
- bSizer276->Fit( m_panelSyncSettingsTab );
- m_notebook->AddPage( m_panelSyncSettingsTab, _("dummy"), true );
+ wxBoxSizer* bSizer247;
+ bSizer247 = new wxBoxSizer( wxHORIZONTAL );
- bSizer190->Add( m_notebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_staticTextPostSync = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Run a command:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPostSync->Wrap( -1 );
+ bSizer247->Add( m_staticTextPostSync, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ wxArrayString m_choicePostSyncConditionChoices;
+ m_choicePostSyncCondition = new wxChoice( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncConditionChoices, 0 );
+ m_choicePostSyncCondition->SetSelection( 0 );
+ bSizer247->Add( m_choicePostSyncCondition, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer7->Add( bSizer190, 1, wxEXPAND, 5 );
+ m_comboBoxPostSyncCommand = new fff::CommandBox( m_panelSyncSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer247->Add( m_comboBoxPostSyncCommand, 1, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer293->Add( bSizer247, 0, wxALL|wxEXPAND, 10 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizerSyncMisc->Add( bSizer293, 1, 0, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer232->Add( bSizerSyncMisc, 1, wxEXPAND, 5 );
- bSizer7->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ m_panelSyncSettings->SetSizer( bSizer232 );
+ m_panelSyncSettings->Layout();
+ bSizer232->Fit( m_panelSyncSettings );
+ bSizer276->Add( m_panelSyncSettings, 1, wxEXPAND, 5 );
- this->SetSizer( bSizer7 );
- this->Layout();
- bSizer7->Fit( this );
- this->Centre( wxBOTH );
+ m_panelSyncSettingsTab->SetSizer( bSizer276 );
+ m_panelSyncSettingsTab->Layout();
+ bSizer276->Fit( m_panelSyncSettingsTab );
+ m_notebook->AddPage( m_panelSyncSettingsTab, _("dummy"), true );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ConfigDlgGenerated::OnClose ) );
- m_listBoxFolderPair->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( ConfigDlgGenerated::onListBoxKeyEvent ), NULL, this );
- m_listBoxFolderPair->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnSelectFolderPair ), NULL, this );
- m_checkBoxUseLocalCmpOptions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleLocalCompSettings ), NULL, this );
- m_toggleBtnByTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnCompByTimeSizeDouble ), NULL, this );
- m_toggleBtnByTimeSize->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnCompByTimeSize ), NULL, this );
- m_toggleBtnByContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnCompByContentDouble ), NULL, this );
- m_toggleBtnByContent->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnCompByContent ), NULL, this );
- m_toggleBtnBySize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnCompBySizeDouble ), NULL, this );
- m_toggleBtnBySize->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnCompBySize ), NULL, this );
- m_checkBoxSymlinksInclude->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeCompOption ), NULL, this );
- m_hyperlink24->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpComparisonSettings ), NULL, this );
- m_hyperlink241->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpTimeShift ), NULL, this );
- m_checkBoxIgnoreErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleIgnoreErrors ), NULL, this );
- m_checkBoxAutoRetry->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleAutoRetry ), NULL, this );
- m_hyperlink1711->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpPerformance ), NULL, this );
- m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
- m_hyperlink171->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpFilterSettings ), NULL, this );
- m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
- m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
- m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
- m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
- m_buttonClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnFilterReset ), NULL, this );
- m_checkBoxUseLocalSyncOptions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleLocalSyncSettings ), NULL, this );
- m_toggleBtnTwoWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnSyncTwoWayDouble ), NULL, this );
- m_toggleBtnTwoWay->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnSyncTwoWay ), NULL, this );
- m_toggleBtnMirror->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnSyncMirrorDouble ), NULL, this );
- m_toggleBtnMirror->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnSyncMirror ), NULL, this );
- m_toggleBtnUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnSyncUpdateDouble ), NULL, this );
- m_toggleBtnUpdate->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnSyncUpdate ), NULL, this );
- m_toggleBtnCustom->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnSyncCustomDouble ), NULL, this );
- m_toggleBtnCustom->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnSyncCustom ), NULL, this );
- m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnExLeftSideOnly ), NULL, this );
- m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnLeftNewer ), NULL, this );
- m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnDifferent ), NULL, this );
- m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnConflict ), NULL, this );
- m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnRightNewer ), NULL, this );
- m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnExRightSideOnly ), NULL, this );
- m_checkBoxDetectMove->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleDetectMovedFiles ), NULL, this );
- m_hyperlink242->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpDetectMovedFiles ), NULL, this );
- m_toggleBtnRecycler->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnDeletionRecycler ), NULL, this );
- m_toggleBtnPermanent->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnDeletionPermanent ), NULL, this );
- m_toggleBtnVersioning->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnDeletionVersioning ), NULL, this );
- m_hyperlink243->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpVersioning ), NULL, this );
- m_choiceVersioningStyle->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnChanegVersioningStyle ), NULL, this );
- m_checkBoxVersionMaxDays->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleVersioningLimit ), NULL, this );
- m_checkBoxVersionCountMin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleVersioningLimit ), NULL, this );
- m_checkBoxVersionCountMax->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleVersioningLimit ), NULL, this );
- m_checkBoxSendEmail->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleMiscEmail ), NULL, this );
- m_bpButtonEmailAlways->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnEmailAlways ), NULL, this );
- m_bpButtonEmailErrorWarning->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnEmailErrorWarning ), NULL, this );
- m_bpButtonEmailErrorOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnEmailErrorOnly ), NULL, this );
- m_checkBoxOverrideLogPath->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleMiscOption ), NULL, this );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnOkay ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnCancel ), NULL, this );
+ bSizer190->Add( m_notebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer7->Add( bSizer190, 1, wxEXPAND, 5 );
+
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+
+ bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+
+ bSizer7->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+
+
+ this->SetSizer( bSizer7 );
+ this->Layout();
+ bSizer7->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ConfigDlgGenerated::OnClose ) );
+ m_listBoxFolderPair->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( ConfigDlgGenerated::onListBoxKeyEvent ), NULL, this );
+ m_listBoxFolderPair->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnSelectFolderPair ), NULL, this );
+ m_checkBoxUseLocalCmpOptions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleLocalCompSettings ), NULL, this );
+ m_buttonByTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnCompByTimeSize ), NULL, this );
+ m_buttonByTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnCompByTimeSizeDouble ), NULL, this );
+ m_buttonByContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnCompByContent ), NULL, this );
+ m_buttonByContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnCompByContentDouble ), NULL, this );
+ m_buttonBySize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnCompBySize ), NULL, this );
+ m_buttonBySize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnCompBySizeDouble ), NULL, this );
+ m_checkBoxSymlinksInclude->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeCompOption ), NULL, this );
+ m_hyperlink24->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpComparisonSettings ), NULL, this );
+ m_hyperlink241->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpTimeShift ), NULL, this );
+ m_checkBoxIgnoreErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleIgnoreErrors ), NULL, this );
+ m_checkBoxAutoRetry->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleAutoRetry ), NULL, this );
+ m_hyperlink1711->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpPerformance ), NULL, this );
+ m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
+ m_hyperlink171->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpFilterSettings ), NULL, this );
+ m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
+ m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
+ m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
+ m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnChangeFilterOption ), NULL, this );
+ m_buttonClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnFilterReset ), NULL, this );
+ m_checkBoxUseLocalSyncOptions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleLocalSyncSettings ), NULL, this );
+ m_buttonTwoWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnSyncTwoWay ), NULL, this );
+ m_buttonTwoWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnSyncTwoWayDouble ), NULL, this );
+ m_buttonMirror->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnSyncMirror ), NULL, this );
+ m_buttonMirror->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnSyncMirrorDouble ), NULL, this );
+ m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnSyncUpdate ), NULL, this );
+ m_buttonUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnSyncUpdateDouble ), NULL, this );
+ m_buttonCustom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnSyncCustom ), NULL, this );
+ m_buttonCustom->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::OnSyncCustomDouble ), NULL, this );
+ m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnExLeftSideOnly ), NULL, this );
+ m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnLeftNewer ), NULL, this );
+ m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnDifferent ), NULL, this );
+ m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnConflict ), NULL, this );
+ m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnRightNewer ), NULL, this );
+ m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnExRightSideOnly ), NULL, this );
+ m_checkBoxDetectMove->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleDetectMovedFiles ), NULL, this );
+ m_hyperlink242->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpDetectMovedFiles ), NULL, this );
+ m_buttonRecycler->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnDeletionRecycler ), NULL, this );
+ m_buttonPermanent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnDeletionPermanent ), NULL, this );
+ m_buttonVersioning->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnDeletionVersioning ), NULL, this );
+ m_hyperlink243->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( ConfigDlgGenerated::OnHelpVersioning ), NULL, this );
+ m_choiceVersioningStyle->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::OnChanegVersioningStyle ), NULL, this );
+ m_checkBoxVersionMaxDays->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleVersioningLimit ), NULL, this );
+ m_checkBoxVersionCountMin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleVersioningLimit ), NULL, this );
+ m_checkBoxVersionCountMax->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleVersioningLimit ), NULL, this );
+ m_checkBoxSendEmail->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleMiscEmail ), NULL, this );
+ m_bpButtonEmailAlways->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnEmailAlways ), NULL, this );
+ m_bpButtonEmailErrorWarning->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnEmailErrorWarning ), NULL, this );
+ m_bpButtonEmailErrorOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnEmailErrorOnly ), NULL, this );
+ m_checkBoxOverrideLogPath->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnToggleMiscOption ), NULL, this );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnOkay ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::OnCancel ), NULL, this );
}
ConfigDlgGenerated::~ConfigDlgGenerated()
@@ -2487,509 +2521,509 @@ ConfigDlgGenerated::~ConfigDlgGenerated()
CloudSetupDlgGenerated::CloudSetupDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer134;
- bSizer134 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer134;
+ bSizer134 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapCloud = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer72->Add( m_bitmapCloud, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_bitmapCloud = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer72->Add( m_bitmapCloud, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
- wxBoxSizer* bSizer272;
- bSizer272 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer272;
+ bSizer272 = new wxBoxSizer( wxVERTICAL );
- m_staticText136 = new wxStaticText( this, wxID_ANY, _("Connection type:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText136->Wrap( -1 );
- bSizer272->Add( m_staticText136, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_staticText136 = new wxStaticText( this, wxID_ANY, _("Connection type:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText136->Wrap( -1 );
+ bSizer272->Add( m_staticText136, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- wxBoxSizer* bSizer231;
- bSizer231 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer231;
+ bSizer231 = new wxBoxSizer( wxHORIZONTAL );
- m_toggleBtnGdrive = new wxToggleButton( this, wxID_ANY, _("Google Drive"), wxDefaultPosition, wxDefaultSize, 0 );
- m_toggleBtnGdrive->SetValue( true );
- m_toggleBtnGdrive->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_toggleBtnGdrive = new wxToggleButton( this, wxID_ANY, _("Google Drive"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_toggleBtnGdrive->SetValue( true );
+ m_toggleBtnGdrive->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer231->Add( m_toggleBtnGdrive, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+ bSizer231->Add( m_toggleBtnGdrive, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
- m_toggleBtnSftp = new wxToggleButton( this, wxID_ANY, _("SFTP"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnSftp->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_toggleBtnSftp = new wxToggleButton( this, wxID_ANY, _("SFTP"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_toggleBtnSftp->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer231->Add( m_toggleBtnSftp, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+ bSizer231->Add( m_toggleBtnSftp, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
- m_toggleBtnFtp = new wxToggleButton( this, wxID_ANY, _("FTP"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_toggleBtnFtp->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_toggleBtnFtp = new wxToggleButton( this, wxID_ANY, _("FTP"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_toggleBtnFtp->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer231->Add( m_toggleBtnFtp, 0, wxALL|wxEXPAND, 5 );
+ bSizer231->Add( m_toggleBtnFtp, 0, wxALL|wxEXPAND, 5 );
- bSizer272->Add( bSizer231, 0, 0, 5 );
+ bSizer272->Add( bSizer231, 0, 0, 5 );
- bSizer72->Add( bSizer272, 0, wxALL, 5 );
+ bSizer72->Add( bSizer272, 0, wxALL, 5 );
- bSizer134->Add( bSizer72, 0, wxEXPAND, 5 );
+ bSizer134->Add( bSizer72, 0, wxEXPAND, 5 );
- m_staticline371 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline371, 0, wxEXPAND, 5 );
+ m_staticline371 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline371, 0, wxEXPAND, 5 );
- m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer185;
- bSizer185 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer185;
+ bSizer185 = new wxBoxSizer( wxVERTICAL );
- bSizerGdrive = new wxBoxSizer( wxVERTICAL );
+ bSizerGdrive = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer284;
- bSizer284 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer284;
+ bSizer284 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer307;
- bSizer307 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer307;
+ bSizer307 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer306;
- bSizer306 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer306;
+ bSizer306 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapGdriveUser = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer306->Add( m_bitmapGdriveUser, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapGdriveUser = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer306->Add( m_bitmapGdriveUser, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- m_staticText166 = new wxStaticText( m_panel41, wxID_ANY, _("Connected user accounts:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText166->Wrap( -1 );
- bSizer306->Add( m_staticText166, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText166 = new wxStaticText( m_panel41, wxID_ANY, _("Connected user accounts:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText166->Wrap( -1 );
+ bSizer306->Add( m_staticText166, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer307->Add( bSizer306, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer307->Add( bSizer306, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_listBoxGdriveUsers = new wxListBox( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE|wxLB_SORT );
- bSizer307->Add( m_listBoxGdriveUsers, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ m_listBoxGdriveUsers = new wxListBox( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE|wxLB_SORT );
+ bSizer307->Add( m_listBoxGdriveUsers, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
- wxBoxSizer* bSizer3002;
- bSizer3002 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer3002;
+ bSizer3002 = new wxBoxSizer( wxHORIZONTAL );
- m_buttonGdriveAddUser = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("&Add connection"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer3002->Add( m_buttonGdriveAddUser, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_buttonGdriveAddUser = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("&Add connection"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer3002->Add( m_buttonGdriveAddUser, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonGdriveRemoveUser = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("&Disconnect"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer3002->Add( m_buttonGdriveRemoveUser, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ m_buttonGdriveRemoveUser = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("&Disconnect"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer3002->Add( m_buttonGdriveRemoveUser, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- bSizer307->Add( bSizer3002, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer307->Add( bSizer3002, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer284->Add( bSizer307, 0, wxALL|wxEXPAND, 5 );
+ bSizer284->Add( bSizer307, 0, wxALL|wxEXPAND, 5 );
- m_staticline841 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer284->Add( m_staticline841, 0, wxEXPAND, 5 );
+ m_staticline841 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer284->Add( m_staticline841, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer3041;
- bSizer3041 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer3041;
+ bSizer3041 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer305;
- bSizer305 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer305;
+ bSizer305 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapGdriveDrive = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer305->Add( m_bitmapGdriveDrive, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapGdriveDrive = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer305->Add( m_bitmapGdriveDrive, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText186 = new wxStaticText( m_panel41, wxID_ANY, _("Select drive:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText186->Wrap( -1 );
- bSizer305->Add( m_staticText186, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText186 = new wxStaticText( m_panel41, wxID_ANY, _("Select drive:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText186->Wrap( -1 );
+ bSizer305->Add( m_staticText186, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer3041->Add( bSizer305, 0, wxALL, 5 );
+ bSizer3041->Add( bSizer305, 0, wxALL, 5 );
- m_listBoxGdriveDrives = new wxListBox( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE|wxLB_SORT );
- bSizer3041->Add( m_listBoxGdriveDrives, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_listBoxGdriveDrives = new wxListBox( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE|wxLB_SORT );
+ bSizer3041->Add( m_listBoxGdriveDrives, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer284->Add( bSizer3041, 1, wxALL|wxEXPAND, 5 );
+ bSizer284->Add( bSizer3041, 1, wxALL|wxEXPAND, 5 );
- bSizerGdrive->Add( bSizer284, 1, wxEXPAND, 5 );
+ bSizerGdrive->Add( bSizer284, 1, wxEXPAND, 5 );
- m_staticline73 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerGdrive->Add( m_staticline73, 0, wxEXPAND, 5 );
+ m_staticline73 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerGdrive->Add( m_staticline73, 0, wxEXPAND, 5 );
- bSizer185->Add( bSizerGdrive, 1, wxEXPAND, 5 );
+ bSizer185->Add( bSizerGdrive, 1, wxEXPAND, 5 );
- bSizerServer = new wxBoxSizer( wxVERTICAL );
+ bSizerServer = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer276;
- bSizer276 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer276;
+ bSizer276 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapServer = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer276->Add( m_bitmapServer, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapServer = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer276->Add( m_bitmapServer, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText12311 = new wxStaticText( m_panel41, wxID_ANY, _("Server name or IP address:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText12311->Wrap( -1 );
- bSizer276->Add( m_staticText12311, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_staticText12311 = new wxStaticText( m_panel41, wxID_ANY, _("Server name or IP address:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText12311->Wrap( -1 );
+ bSizer276->Add( m_staticText12311, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_textCtrlServer = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer276->Add( m_textCtrlServer, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_textCtrlServer = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer276->Add( m_textCtrlServer, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText1233 = new wxStaticText( m_panel41, wxID_ANY, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1233->Wrap( -1 );
- bSizer276->Add( m_staticText1233, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_staticText1233 = new wxStaticText( m_panel41, wxID_ANY, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1233->Wrap( -1 );
+ bSizer276->Add( m_staticText1233, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_textCtrlPort = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer276->Add( m_textCtrlPort, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_textCtrlPort = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer276->Add( m_textCtrlPort, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerServer->Add( bSizer276, 0, wxALL|wxEXPAND, 5 );
+ bSizerServer->Add( bSizer276, 0, wxALL|wxEXPAND, 5 );
- m_staticline58 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerServer->Add( m_staticline58, 0, wxEXPAND, 5 );
+ m_staticline58 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerServer->Add( m_staticline58, 0, wxEXPAND, 5 );
- bSizer185->Add( bSizerServer, 0, wxEXPAND, 5 );
+ bSizer185->Add( bSizerServer, 0, wxEXPAND, 5 );
- bSizerAuth = new wxBoxSizer( wxVERTICAL );
+ bSizerAuth = new wxBoxSizer( wxVERTICAL );
- bSizerAuthInner = new wxBoxSizer( wxHORIZONTAL );
+ bSizerAuthInner = new wxBoxSizer( wxHORIZONTAL );
- bSizerFtpEncrypt = new wxBoxSizer( wxHORIZONTAL );
+ bSizerFtpEncrypt = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer2181;
- bSizer2181 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer2181;
+ bSizer2181 = new wxBoxSizer( wxVERTICAL );
- m_staticText1251 = new wxStaticText( m_panel41, wxID_ANY, _("Encryption:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1251->Wrap( -1 );
- bSizer2181->Add( m_staticText1251, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_staticText1251 = new wxStaticText( m_panel41, wxID_ANY, _("Encryption:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1251->Wrap( -1 );
+ bSizer2181->Add( m_staticText1251, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_radioBtnEncryptNone = new wxRadioButton( m_panel41, wxID_ANY, _("&Disabled"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
- m_radioBtnEncryptNone->SetValue( true );
- bSizer2181->Add( m_radioBtnEncryptNone, 0, wxEXPAND|wxALL, 5 );
+ m_radioBtnEncryptNone = new wxRadioButton( m_panel41, wxID_ANY, _("&Disabled"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_radioBtnEncryptNone->SetValue( true );
+ bSizer2181->Add( m_radioBtnEncryptNone, 0, wxEXPAND|wxALL, 5 );
- m_radioBtnEncryptSsl = new wxRadioButton( m_panel41, wxID_ANY, _("&Explicit SSL/TLS"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer2181->Add( m_radioBtnEncryptSsl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ m_radioBtnEncryptSsl = new wxRadioButton( m_panel41, wxID_ANY, _("&Explicit SSL/TLS"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer2181->Add( m_radioBtnEncryptSsl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
- bSizerFtpEncrypt->Add( bSizer2181, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerFtpEncrypt->Add( bSizer2181, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticline5721 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizerFtpEncrypt->Add( m_staticline5721, 0, wxEXPAND, 5 );
+ m_staticline5721 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizerFtpEncrypt->Add( m_staticline5721, 0, wxEXPAND, 5 );
- bSizerAuthInner->Add( bSizerFtpEncrypt, 0, wxEXPAND, 5 );
+ bSizerAuthInner->Add( bSizerFtpEncrypt, 0, wxEXPAND, 5 );
- bSizerSftpAuth = new wxBoxSizer( wxHORIZONTAL );
+ bSizerSftpAuth = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer218;
- bSizer218 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer218;
+ bSizer218 = new wxBoxSizer( wxVERTICAL );
- m_staticText125 = new wxStaticText( m_panel41, wxID_ANY, _("Authentication:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText125->Wrap( -1 );
- bSizer218->Add( m_staticText125, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_staticText125 = new wxStaticText( m_panel41, wxID_ANY, _("Authentication:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText125->Wrap( -1 );
+ bSizer218->Add( m_staticText125, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_radioBtnPassword = new wxRadioButton( m_panel41, wxID_ANY, _("&Password"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
- m_radioBtnPassword->SetValue( true );
- bSizer218->Add( m_radioBtnPassword, 0, wxEXPAND|wxALL, 5 );
+ m_radioBtnPassword = new wxRadioButton( m_panel41, wxID_ANY, _("&Password"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_radioBtnPassword->SetValue( true );
+ bSizer218->Add( m_radioBtnPassword, 0, wxEXPAND|wxALL, 5 );
- m_radioBtnKeyfile = new wxRadioButton( m_panel41, wxID_ANY, _("&Key file"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer218->Add( m_radioBtnKeyfile, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ m_radioBtnKeyfile = new wxRadioButton( m_panel41, wxID_ANY, _("&Key file"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer218->Add( m_radioBtnKeyfile, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
- m_radioBtnAgent = new wxRadioButton( m_panel41, wxID_ANY, _("&SSH agent"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer218->Add( m_radioBtnAgent, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_radioBtnAgent = new wxRadioButton( m_panel41, wxID_ANY, _("&SSH agent"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer218->Add( m_radioBtnAgent, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizerSftpAuth->Add( bSizer218, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerSftpAuth->Add( bSizer218, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticline572 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizerSftpAuth->Add( m_staticline572, 0, wxEXPAND, 5 );
+ m_staticline572 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizerSftpAuth->Add( m_staticline572, 0, wxEXPAND, 5 );
- bSizerAuthInner->Add( bSizerSftpAuth, 0, wxEXPAND, 5 );
+ bSizerAuthInner->Add( bSizerSftpAuth, 0, wxEXPAND, 5 );
- m_panelAuth = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelAuth->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelAuth = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelAuth->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer221;
- bSizer221 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer221;
+ bSizer221 = new wxBoxSizer( wxVERTICAL );
- wxFlexGridSizer* fgSizer161;
- fgSizer161 = new wxFlexGridSizer( 0, 2, 0, 0 );
- fgSizer161->AddGrowableCol( 1 );
- fgSizer161->SetFlexibleDirection( wxBOTH );
- fgSizer161->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ wxFlexGridSizer* fgSizer161;
+ fgSizer161 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer161->AddGrowableCol( 1 );
+ fgSizer161->SetFlexibleDirection( wxBOTH );
+ fgSizer161->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticText123 = new wxStaticText( m_panelAuth, wxID_ANY, _("User name:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText123->Wrap( -1 );
- fgSizer161->Add( m_staticText123, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText123 = new wxStaticText( m_panelAuth, wxID_ANY, _("User name:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText123->Wrap( -1 );
+ fgSizer161->Add( m_staticText123, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- m_textCtrlUserName = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer161->Add( m_textCtrlUserName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+ m_textCtrlUserName = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer161->Add( m_textCtrlUserName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextKeyfile = new wxStaticText( m_panelAuth, wxID_ANY, _("Private key file:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextKeyfile->Wrap( -1 );
- fgSizer161->Add( m_staticTextKeyfile, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+ m_staticTextKeyfile = new wxStaticText( m_panelAuth, wxID_ANY, _("Private key file:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextKeyfile->Wrap( -1 );
+ fgSizer161->Add( m_staticTextKeyfile, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
- bSizerKeyFile = new wxBoxSizer( wxHORIZONTAL );
+ bSizerKeyFile = new wxBoxSizer( wxHORIZONTAL );
- m_textCtrlKeyfilePath = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerKeyFile->Add( m_textCtrlKeyfilePath, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_textCtrlKeyfilePath = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerKeyFile->Add( m_textCtrlKeyfilePath, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectKeyfile = new wxButton( m_panelAuth, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectKeyfile->SetToolTip( _("Select a folder") );
+ m_buttonSelectKeyfile = new wxButton( m_panelAuth, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectKeyfile->SetToolTip( _("Select a folder") );
- bSizerKeyFile->Add( m_buttonSelectKeyfile, 0, wxEXPAND, 5 );
+ bSizerKeyFile->Add( m_buttonSelectKeyfile, 0, wxEXPAND, 5 );
- fgSizer161->Add( bSizerKeyFile, 0, wxALL|wxEXPAND, 5 );
+ fgSizer161->Add( bSizerKeyFile, 0, wxALL|wxEXPAND, 5 );
- m_staticTextPassword = new wxStaticText( m_panelAuth, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextPassword->Wrap( -1 );
- fgSizer161->Add( m_staticTextPassword, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_staticTextPassword = new wxStaticText( m_panelAuth, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPassword->Wrap( -1 );
+ fgSizer161->Add( m_staticTextPassword, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- bSizerPassword = new wxBoxSizer( wxHORIZONTAL );
+ bSizerPassword = new wxBoxSizer( wxHORIZONTAL );
- m_textCtrlPasswordVisible = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerPassword->Add( m_textCtrlPasswordVisible, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_textCtrlPasswordVisible = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerPassword->Add( m_textCtrlPasswordVisible, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_textCtrlPasswordHidden = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
- bSizerPassword->Add( m_textCtrlPasswordHidden, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_textCtrlPasswordHidden = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
+ bSizerPassword->Add( m_textCtrlPasswordHidden, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_checkBoxShowPassword = new wxCheckBox( m_panelAuth, wxID_ANY, _("&Show password"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerPassword->Add( m_checkBoxShowPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_checkBoxShowPassword = new wxCheckBox( m_panelAuth, wxID_ANY, _("&Show password"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerPassword->Add( m_checkBoxShowPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- fgSizer161->Add( bSizerPassword, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ fgSizer161->Add( bSizerPassword, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- bSizer221->Add( fgSizer161, 0, wxALL|wxEXPAND, 5 );
+ bSizer221->Add( fgSizer161, 0, wxALL|wxEXPAND, 5 );
- m_panelAuth->SetSizer( bSizer221 );
- m_panelAuth->Layout();
- bSizer221->Fit( m_panelAuth );
- bSizerAuthInner->Add( m_panelAuth, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_panelAuth->SetSizer( bSizer221 );
+ m_panelAuth->Layout();
+ bSizer221->Fit( m_panelAuth );
+ bSizerAuthInner->Add( m_panelAuth, 1, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerAuth->Add( bSizerAuthInner, 0, wxEXPAND, 5 );
+ bSizerAuth->Add( bSizerAuthInner, 0, wxEXPAND, 5 );
- m_staticline581 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerAuth->Add( m_staticline581, 0, wxEXPAND, 5 );
+ m_staticline581 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerAuth->Add( m_staticline581, 0, wxEXPAND, 5 );
- bSizer185->Add( bSizerAuth, 0, wxEXPAND, 5 );
+ bSizer185->Add( bSizerAuth, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer269;
- bSizer269 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer269;
+ bSizer269 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer270;
- bSizer270 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer270;
+ bSizer270 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapServerDir = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer270->Add( m_bitmapServerDir, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapServerDir = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer270->Add( m_bitmapServerDir, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText1232 = new wxStaticText( m_panel41, wxID_ANY, _("Directory on server:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1232->Wrap( -1 );
- bSizer270->Add( m_staticText1232, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticText1232 = new wxStaticText( m_panel41, wxID_ANY, _("Directory on server:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1232->Wrap( -1 );
+ bSizer270->Add( m_staticText1232, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer269->Add( bSizer270, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ bSizer269->Add( bSizer270, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- wxBoxSizer* bSizer217;
- bSizer217 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer217;
+ bSizer217 = new wxBoxSizer( wxHORIZONTAL );
- m_textCtrlServerPath = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer217->Add( m_textCtrlServerPath, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ m_textCtrlServerPath = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer217->Add( m_textCtrlServerPath, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- m_buttonSelectFolder = new wxButton( m_panel41, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectFolder->SetToolTip( _("Select a folder") );
+ m_buttonSelectFolder = new wxButton( m_panel41, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectFolder->SetToolTip( _("Select a folder") );
- bSizer217->Add( m_buttonSelectFolder, 0, wxRIGHT|wxEXPAND, 5 );
+ bSizer217->Add( m_buttonSelectFolder, 0, wxRIGHT|wxEXPAND, 5 );
- bSizer269->Add( bSizer217, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ bSizer269->Add( bSizer217, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
- wxBoxSizer* bSizer298;
- bSizer298 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer298;
+ bSizer298 = new wxBoxSizer( wxHORIZONTAL );
- bSizer298->Add( 0, 10, 0, 0, 5 );
+ bSizer298->Add( 0, 10, 0, 0, 5 );
- bSizerAccessTimeout = new wxBoxSizer( wxHORIZONTAL );
+ bSizerAccessTimeout = new wxBoxSizer( wxHORIZONTAL );
- m_staticTextTimeout = new wxStaticText( m_panel41, wxID_ANY, _("Access timeout (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeout->Wrap( -1 );
- bSizerAccessTimeout->Add( m_staticTextTimeout, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_staticTextTimeout = new wxStaticText( m_panel41, wxID_ANY, _("Access timeout (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeout->Wrap( -1 );
+ bSizerAccessTimeout->Add( m_staticTextTimeout, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_spinCtrlTimeout = new wxSpinCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- bSizerAccessTimeout->Add( m_spinCtrlTimeout, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_spinCtrlTimeout = new wxSpinCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ bSizerAccessTimeout->Add( m_spinCtrlTimeout, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer298->Add( bSizerAccessTimeout, 0, wxALL, 5 );
+ bSizer298->Add( bSizerAccessTimeout, 0, wxALL, 5 );
- bSizer269->Add( bSizer298, 0, 0, 5 );
+ bSizer269->Add( bSizer298, 0, 0, 5 );
- bSizer185->Add( bSizer269, 0, wxEXPAND, 5 );
+ bSizer185->Add( bSizer269, 0, wxEXPAND, 5 );
- m_panel41->SetSizer( bSizer185 );
- m_panel41->Layout();
- bSizer185->Fit( m_panel41 );
- bSizer134->Add( m_panel41, 1, wxEXPAND, 5 );
+ m_panel41->SetSizer( bSizer185 );
+ m_panel41->Layout();
+ bSizer185->Fit( m_panel41 );
+ bSizer134->Add( m_panel41, 1, wxEXPAND, 5 );
- m_staticline571 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline571, 0, wxEXPAND, 5 );
+ m_staticline571 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline571, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer219;
- bSizer219 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer219;
+ bSizer219 = new wxBoxSizer( wxHORIZONTAL );
- bSizer219->Add( 5, 0, 0, 0, 5 );
+ bSizer219->Add( 5, 0, 0, 0, 5 );
- m_bitmapPerf = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer219->Add( m_bitmapPerf, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_bitmapPerf = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer219->Add( m_bitmapPerf, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_staticText1361 = new wxStaticText( this, wxID_ANY, _("Performance improvements:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1361->Wrap( -1 );
- bSizer219->Add( m_staticText1361, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ m_staticText1361 = new wxStaticText( this, wxID_ANY, _("Performance improvements:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1361->Wrap( -1 );
+ bSizer219->Add( m_staticText1361, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizer219->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer219->Add( 0, 0, 1, wxEXPAND, 5 );
- m_hyperlink171 = new wxHyperlinkCtrl( this, wxID_ANY, _("How to get best performance?"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer219->Add( m_hyperlink171, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10 );
+ m_hyperlink171 = new wxHyperlinkCtrl( this, wxID_ANY, _("How to get best performance?"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer219->Add( m_hyperlink171, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10 );
- bSizer134->Add( bSizer219, 0, wxEXPAND, 5 );
+ bSizer134->Add( bSizer219, 0, wxEXPAND, 5 );
- m_staticline57 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline57, 0, wxEXPAND, 5 );
+ m_staticline57 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline57, 0, wxEXPAND, 5 );
- m_panel411 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel411->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel411 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel411->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer1851;
- bSizer1851 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer1851;
+ bSizer1851 = new wxBoxSizer( wxVERTICAL );
- wxFlexGridSizer* fgSizer1611;
- fgSizer1611 = new wxFlexGridSizer( 0, 2, 0, 0 );
- fgSizer1611->AddGrowableCol( 1 );
- fgSizer1611->SetFlexibleDirection( wxBOTH );
- fgSizer1611->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ wxFlexGridSizer* fgSizer1611;
+ fgSizer1611 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer1611->AddGrowableCol( 1 );
+ fgSizer1611->SetFlexibleDirection( wxBOTH );
+ fgSizer1611->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- bSizerConnectionsLabel = new wxBoxSizer( wxVERTICAL );
+ bSizerConnectionsLabel = new wxBoxSizer( wxVERTICAL );
- m_staticTextConnectionsLabel = new wxStaticText( m_panel411, wxID_ANY, _("Parallel file operations:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextConnectionsLabel->Wrap( -1 );
- bSizerConnectionsLabel->Add( m_staticTextConnectionsLabel, 0, 0, 5 );
+ m_staticTextConnectionsLabel = new wxStaticText( m_panel411, wxID_ANY, _("Parallel file operations:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextConnectionsLabel->Wrap( -1 );
+ bSizerConnectionsLabel->Add( m_staticTextConnectionsLabel, 0, 0, 5 );
- m_staticTextConnectionsLabelSub = new wxStaticText( m_panel411, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextConnectionsLabelSub->Wrap( -1 );
- bSizerConnectionsLabel->Add( m_staticTextConnectionsLabelSub, 0, wxALIGN_RIGHT, 5 );
+ m_staticTextConnectionsLabelSub = new wxStaticText( m_panel411, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextConnectionsLabelSub->Wrap( -1 );
+ bSizerConnectionsLabel->Add( m_staticTextConnectionsLabelSub, 0, wxALIGN_RIGHT, 5 );
- fgSizer1611->Add( bSizerConnectionsLabel, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer1611->Add( bSizerConnectionsLabel, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- wxBoxSizer* bSizer300;
- bSizer300 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer300;
+ bSizer300 = new wxBoxSizer( wxHORIZONTAL );
- m_spinCtrlConnectionCount = new wxSpinCtrl( m_panel411, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- bSizer300->Add( m_spinCtrlConnectionCount, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_spinCtrlConnectionCount = new wxSpinCtrl( m_panel411, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ bSizer300->Add( m_spinCtrlConnectionCount, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextConnectionCountDescr = new wxStaticText( m_panel411, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextConnectionCountDescr->Wrap( -1 );
- m_staticTextConnectionCountDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticTextConnectionCountDescr = new wxStaticText( m_panel411, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextConnectionCountDescr->Wrap( -1 );
+ m_staticTextConnectionCountDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer300->Add( m_staticTextConnectionCountDescr, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizer300->Add( m_staticTextConnectionCountDescr, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- fgSizer1611->Add( bSizer300, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer1611->Add( bSizer300, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextChannelCountSftp = new wxStaticText( m_panel411, wxID_ANY, _("SFTP channels per connection:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextChannelCountSftp->Wrap( -1 );
- fgSizer1611->Add( m_staticTextChannelCountSftp, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_staticTextChannelCountSftp = new wxStaticText( m_panel411, wxID_ANY, _("SFTP channels per connection:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextChannelCountSftp->Wrap( -1 );
+ fgSizer1611->Add( m_staticTextChannelCountSftp, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
- wxBoxSizer* bSizer3001;
- bSizer3001 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer3001;
+ bSizer3001 = new wxBoxSizer( wxHORIZONTAL );
- m_spinCtrlChannelCountSftp = new wxSpinCtrl( m_panel411, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- bSizer3001->Add( m_spinCtrlChannelCountSftp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_spinCtrlChannelCountSftp = new wxSpinCtrl( m_panel411, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ bSizer3001->Add( m_spinCtrlChannelCountSftp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonChannelCountSftp = new wxButton( m_panel411, wxID_ANY, _("Detect server limit"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer3001->Add( m_buttonChannelCountSftp, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_buttonChannelCountSftp = new wxButton( m_panel411, wxID_ANY, _("Detect server limit"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer3001->Add( m_buttonChannelCountSftp, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- fgSizer1611->Add( bSizer3001, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer1611->Add( bSizer3001, 0, wxALIGN_CENTER_VERTICAL, 5 );
- fgSizer1611->Add( 0, 0, 0, 0, 5 );
+ fgSizer1611->Add( 0, 0, 0, 0, 5 );
- wxBoxSizer* bSizer304;
- bSizer304 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer304;
+ bSizer304 = new wxBoxSizer( wxHORIZONTAL );
- m_checkBoxAllowZlib = new wxCheckBox( m_panel411, wxID_ANY, _("Enable &compression"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer304->Add( m_checkBoxAllowZlib, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_checkBoxAllowZlib = new wxCheckBox( m_panel411, wxID_ANY, _("Enable &compression"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer304->Add( m_checkBoxAllowZlib, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_staticTextZlibDescr = new wxStaticText( m_panel411, wxID_ANY, _("(zlib)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextZlibDescr->Wrap( -1 );
- m_staticTextZlibDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticTextZlibDescr = new wxStaticText( m_panel411, wxID_ANY, _("(zlib)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextZlibDescr->Wrap( -1 );
+ m_staticTextZlibDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer304->Add( m_staticTextZlibDescr, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer304->Add( m_staticTextZlibDescr, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- fgSizer1611->Add( bSizer304, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer1611->Add( bSizer304, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer1851->Add( fgSizer1611, 0, wxALL, 5 );
+ bSizer1851->Add( fgSizer1611, 0, wxALL, 5 );
- m_panel411->SetSizer( bSizer1851 );
- m_panel411->Layout();
- bSizer1851->Fit( m_panel411 );
- bSizer134->Add( m_panel411, 0, wxEXPAND, 5 );
+ m_panel411->SetSizer( bSizer1851 );
+ m_panel411->Layout();
+ bSizer1851->Fit( m_panel411 );
+ bSizer134->Add( m_panel411, 0, wxEXPAND, 5 );
- m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 );
+ m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonOkay, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerStdButtons->Add( m_buttonOkay, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer134->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer134->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- this->SetSizer( bSizer134 );
- this->Layout();
- bSizer134->Fit( this );
+ this->SetSizer( bSizer134 );
+ this->Layout();
+ bSizer134->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CloudSetupDlgGenerated::OnClose ) );
- m_toggleBtnGdrive->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnConnectionGdrive ), NULL, this );
- m_toggleBtnSftp->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnConnectionSftp ), NULL, this );
- m_toggleBtnFtp->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnConnectionFtp ), NULL, this );
- m_listBoxGdriveUsers->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::OnGdriveUserSelect ), NULL, this );
- m_buttonGdriveAddUser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnGdriveUserAdd ), NULL, this );
- m_buttonGdriveRemoveUser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnGdriveUserRemove ), NULL, this );
- m_radioBtnPassword->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::OnAuthPassword ), NULL, this );
- m_radioBtnKeyfile->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::OnAuthKeyfile ), NULL, this );
- m_radioBtnAgent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::OnAuthAgent ), NULL, this );
- m_buttonSelectKeyfile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnSelectKeyfile ), NULL, this );
- m_checkBoxShowPassword->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnToggleShowPassword ), NULL, this );
- m_buttonSelectFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnBrowseCloudFolder ), NULL, this );
- m_hyperlink171->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( CloudSetupDlgGenerated::OnHelpFtpPerformance ), NULL, this );
- m_buttonChannelCountSftp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnDetectServerChannelLimit ), NULL, this );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnOkay ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CloudSetupDlgGenerated::OnClose ) );
+ m_toggleBtnGdrive->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnConnectionGdrive ), NULL, this );
+ m_toggleBtnSftp->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnConnectionSftp ), NULL, this );
+ m_toggleBtnFtp->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnConnectionFtp ), NULL, this );
+ m_listBoxGdriveUsers->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::OnGdriveUserSelect ), NULL, this );
+ m_buttonGdriveAddUser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnGdriveUserAdd ), NULL, this );
+ m_buttonGdriveRemoveUser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnGdriveUserRemove ), NULL, this );
+ m_radioBtnPassword->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::OnAuthPassword ), NULL, this );
+ m_radioBtnKeyfile->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::OnAuthKeyfile ), NULL, this );
+ m_radioBtnAgent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::OnAuthAgent ), NULL, this );
+ m_buttonSelectKeyfile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnSelectKeyfile ), NULL, this );
+ m_checkBoxShowPassword->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnToggleShowPassword ), NULL, this );
+ m_buttonSelectFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnBrowseCloudFolder ), NULL, this );
+ m_hyperlink171->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( CloudSetupDlgGenerated::OnHelpFtpPerformance ), NULL, this );
+ m_buttonChannelCountSftp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnDetectServerChannelLimit ), NULL, this );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnOkay ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::OnCancel ), NULL, this );
}
CloudSetupDlgGenerated::~CloudSetupDlgGenerated()
@@ -2998,61 +3032,61 @@ CloudSetupDlgGenerated::~CloudSetupDlgGenerated()
AbstractFolderPickerGenerated::AbstractFolderPickerGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer134;
- bSizer134 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer134;
+ bSizer134 = new wxBoxSizer( wxVERTICAL );
- m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer185;
- bSizer185 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer185;
+ bSizer185 = new wxBoxSizer( wxVERTICAL );
- m_staticTextStatus = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatus->Wrap( -1 );
- bSizer185->Add( m_staticTextStatus, 0, wxALL, 5 );
+ m_staticTextStatus = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatus->Wrap( -1 );
+ bSizer185->Add( m_staticTextStatus, 0, wxALL, 5 );
- m_treeCtrlFileSystem = new wxTreeCtrl( m_panel41, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTR_FULL_ROW_HIGHLIGHT|wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxTR_NO_LINES|wxBORDER_NONE );
- bSizer185->Add( m_treeCtrlFileSystem, 1, wxEXPAND, 5 );
+ m_treeCtrlFileSystem = new wxTreeCtrl( m_panel41, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), wxTR_FULL_ROW_HIGHLIGHT|wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxTR_NO_LINES|wxBORDER_NONE );
+ bSizer185->Add( m_treeCtrlFileSystem, 1, wxEXPAND, 5 );
- m_panel41->SetSizer( bSizer185 );
- m_panel41->Layout();
- bSizer185->Fit( m_panel41 );
- bSizer134->Add( m_panel41, 1, wxEXPAND, 5 );
+ m_panel41->SetSizer( bSizer185 );
+ m_panel41->Layout();
+ bSizer185->Fit( m_panel41 );
+ bSizer134->Add( m_panel41, 1, wxEXPAND, 5 );
- m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 );
+ m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonOkay = new wxButton( this, wxID_OK, _("Select Folder"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonOkay = new wxButton( this, wxID_OK, _("Select Folder"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonOkay, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerStdButtons->Add( m_buttonOkay, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer134->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer134->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- this->SetSizer( bSizer134 );
- this->Layout();
- bSizer134->Fit( this );
+ this->SetSizer( bSizer134 );
+ this->Layout();
+ bSizer134->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AbstractFolderPickerGenerated::OnClose ) );
- m_treeCtrlFileSystem->Connect( wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEventHandler( AbstractFolderPickerGenerated::OnExpandNode ), NULL, this );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AbstractFolderPickerGenerated::OnOkay ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AbstractFolderPickerGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AbstractFolderPickerGenerated::OnClose ) );
+ m_treeCtrlFileSystem->Connect( wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEventHandler( AbstractFolderPickerGenerated::OnExpandNode ), NULL, this );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AbstractFolderPickerGenerated::OnOkay ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AbstractFolderPickerGenerated::OnCancel ), NULL, this );
}
AbstractFolderPickerGenerated::~AbstractFolderPickerGenerated()
@@ -3061,222 +3095,225 @@ AbstractFolderPickerGenerated::~AbstractFolderPickerGenerated()
SyncConfirmationDlgGenerated::SyncConfirmationDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ wxBoxSizer* bSizer134;
+ bSizer134 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer134;
- bSizer134 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+ m_bitmapSync = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer72->Add( m_bitmapSync, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
- m_bitmapSync = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer72->Add( m_bitmapSync, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_staticTextCaption = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCaption->Wrap( -1 );
+ bSizer72->Add( m_staticTextCaption, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
- m_staticTextCaption = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCaption->Wrap( -1 );
- bSizer72->Add( m_staticTextCaption, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+ bSizer134->Add( bSizer72, 0, 0, 5 );
- bSizer134->Add( bSizer72, 0, 0, 5 );
+ m_staticline371 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline371, 0, wxEXPAND, 5 );
- m_staticline371 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline371, 0, wxEXPAND, 5 );
+ m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelStatistics->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panelStatistics->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ wxBoxSizer* bSizer185;
+ bSizer185 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer185;
- bSizer185 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer185->Add( 40, 0, 0, 0, 5 );
- bSizer185->Add( 40, 0, 0, 0, 5 );
+ bSizer185->Add( 0, 0, 1, 0, 5 );
- bSizer185->Add( 0, 0, 1, 0, 5 );
+ m_staticline38 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer185->Add( m_staticline38, 0, wxEXPAND, 5 );
- m_staticline38 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer185->Add( m_staticline38, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer162;
+ bSizer162 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer162;
- bSizer162 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer182;
+ bSizer182 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer182;
- bSizer182 = new wxBoxSizer( wxHORIZONTAL );
+ m_staticText84 = new wxStaticText( m_panelStatistics, wxID_ANY, _("Variant:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText84->Wrap( -1 );
+ bSizer182->Add( m_staticText84, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_staticText84 = new wxStaticText( m_panelStatistics, wxID_ANY, _("Variant:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText84->Wrap( -1 );
- bSizer182->Add( m_staticText84, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ bSizer182->Add( 0, 0, 1, wxEXPAND, 5 );
- bSizer182->Add( 0, 0, 1, wxEXPAND, 5 );
+ m_staticTextSyncVar = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSyncVar->Wrap( -1 );
+ m_staticTextSyncVar->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- m_staticTextVariant = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextVariant->Wrap( -1 );
- m_staticTextVariant->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ bSizer182->Add( m_staticTextSyncVar, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizer182->Add( m_staticTextVariant, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_bitmapSyncVar = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer182->Add( m_bitmapSyncVar, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer182->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer182->Add( 0, 0, 1, wxEXPAND, 5 );
- bSizer162->Add( bSizer182, 0, wxALL|wxEXPAND, 5 );
+ bSizer162->Add( bSizer182, 0, wxALL|wxEXPAND, 5 );
- m_staticline14 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer162->Add( m_staticline14, 0, wxEXPAND, 5 );
+ m_staticline14 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer162->Add( m_staticline14, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer181;
- bSizer181 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer181;
+ bSizer181 = new wxBoxSizer( wxVERTICAL );
- m_staticText83 = new wxStaticText( m_panelStatistics, wxID_ANY, _("Statistics:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText83->Wrap( -1 );
- bSizer181->Add( m_staticText83, 0, wxALL, 5 );
+ m_staticText83 = new wxStaticText( m_panelStatistics, wxID_ANY, _("Statistics:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText83->Wrap( -1 );
+ bSizer181->Add( m_staticText83, 0, wxALL, 5 );
- wxFlexGridSizer* fgSizer11;
- fgSizer11 = new wxFlexGridSizer( 2, 7, 2, 5 );
- fgSizer11->SetFlexibleDirection( wxBOTH );
- fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ wxFlexGridSizer* fgSizer11;
+ fgSizer11 = new wxFlexGridSizer( 2, 7, 2, 5 );
+ fgSizer11->SetFlexibleDirection( wxBOTH );
+ fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_bitmapDeleteLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") );
+ m_bitmapDeleteLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") );
- fgSizer11->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer11->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be updated") );
+ m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be updated") );
- fgSizer11->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer11->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bitmapCreateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapCreateLeft->SetToolTip( _("Number of files and folders that will be created") );
+ m_bitmapCreateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapCreateLeft->SetToolTip( _("Number of files and folders that will be created") );
- fgSizer11->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ fgSizer11->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapData->SetToolTip( _("Total bytes to copy") );
+ m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapData->SetToolTip( _("Total bytes to copy") );
- fgSizer11->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ fgSizer11->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bitmapCreateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapCreateRight->SetToolTip( _("Number of files and folders that will be created") );
+ m_bitmapCreateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapCreateRight->SetToolTip( _("Number of files and folders that will be created") );
- fgSizer11->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ fgSizer11->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapUpdateRight->SetToolTip( _("Number of files that will be updated") );
+ m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapUpdateRight->SetToolTip( _("Number of files that will be updated") );
- fgSizer11->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ fgSizer11->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bitmapDeleteRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") );
+ m_bitmapDeleteRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") );
- fgSizer11->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer11->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextDeleteLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDeleteLeft->Wrap( -1 );
- m_staticTextDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") );
+ m_staticTextDeleteLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDeleteLeft->Wrap( -1 );
+ m_staticTextDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") );
- fgSizer11->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer11->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextUpdateLeft->Wrap( -1 );
- m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be updated") );
+ m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextUpdateLeft->Wrap( -1 );
+ m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be updated") );
- fgSizer11->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ fgSizer11->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_staticTextCreateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCreateLeft->Wrap( -1 );
- m_staticTextCreateLeft->SetToolTip( _("Number of files and folders that will be created") );
+ m_staticTextCreateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCreateLeft->Wrap( -1 );
+ m_staticTextCreateLeft->SetToolTip( _("Number of files and folders that will be created") );
- fgSizer11->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ fgSizer11->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_staticTextData = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextData->Wrap( -1 );
- m_staticTextData->SetToolTip( _("Total bytes to copy") );
+ m_staticTextData = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextData->Wrap( -1 );
+ m_staticTextData->SetToolTip( _("Total bytes to copy") );
- fgSizer11->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer11->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextCreateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCreateRight->Wrap( -1 );
- m_staticTextCreateRight->SetToolTip( _("Number of files and folders that will be created") );
+ m_staticTextCreateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCreateRight->Wrap( -1 );
+ m_staticTextCreateRight->SetToolTip( _("Number of files and folders that will be created") );
- fgSizer11->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer11->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextUpdateRight->Wrap( -1 );
- m_staticTextUpdateRight->SetToolTip( _("Number of files that will be updated") );
+ m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextUpdateRight->Wrap( -1 );
+ m_staticTextUpdateRight->SetToolTip( _("Number of files that will be updated") );
- fgSizer11->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer11->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextDeleteRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDeleteRight->Wrap( -1 );
- m_staticTextDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") );
+ m_staticTextDeleteRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDeleteRight->Wrap( -1 );
+ m_staticTextDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") );
- fgSizer11->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer11->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer181->Add( fgSizer11, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ bSizer181->Add( fgSizer11, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
- bSizer162->Add( bSizer181, 0, wxEXPAND|wxALL, 5 );
+ bSizer162->Add( bSizer181, 0, wxEXPAND|wxALL, 5 );
- bSizer185->Add( bSizer162, 0, 0, 5 );
+ bSizer185->Add( bSizer162, 0, 0, 5 );
- m_staticline381 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer185->Add( m_staticline381, 0, wxEXPAND, 5 );
+ m_staticline381 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer185->Add( m_staticline381, 0, wxEXPAND, 5 );
- bSizer185->Add( 0, 0, 1, 0, 5 );
+ bSizer185->Add( 0, 0, 1, 0, 5 );
- bSizer185->Add( 40, 0, 0, 0, 5 );
+ bSizer185->Add( 40, 0, 0, 0, 5 );
- m_panelStatistics->SetSizer( bSizer185 );
- m_panelStatistics->Layout();
- bSizer185->Fit( m_panelStatistics );
- bSizer134->Add( m_panelStatistics, 0, wxEXPAND, 5 );
+ m_panelStatistics->SetSizer( bSizer185 );
+ m_panelStatistics->Layout();
+ bSizer185->Fit( m_panelStatistics );
+ bSizer134->Add( m_panelStatistics, 0, wxEXPAND, 5 );
- m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 );
+ m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer164;
- bSizer164 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer164;
+ bSizer164 = new wxBoxSizer( wxVERTICAL );
- m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("&Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer164->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("&Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer164->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonStartSync = new wxButton( this, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonStartSync = new wxButton( this, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonStartSync->SetDefault();
- m_buttonStartSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonStartSync->SetDefault();
+ m_buttonStartSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bSizerStdButtons->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
- bSizer164->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer164->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- bSizer134->Add( bSizer164, 1, wxEXPAND, 5 );
+ bSizer134->Add( bSizer164, 1, wxEXPAND, 5 );
- this->SetSizer( bSizer134 );
- this->Layout();
- bSizer134->Fit( this );
+ this->SetSizer( bSizer134 );
+ this->Layout();
+ bSizer134->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncConfirmationDlgGenerated::OnClose ) );
- m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncConfirmationDlgGenerated::OnStartSync ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncConfirmationDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncConfirmationDlgGenerated::OnClose ) );
+ m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncConfirmationDlgGenerated::OnStartSync ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncConfirmationDlgGenerated::OnCancel ), NULL, this );
}
SyncConfirmationDlgGenerated::~SyncConfirmationDlgGenerated()
@@ -3285,198 +3322,198 @@ SyncConfirmationDlgGenerated::~SyncConfirmationDlgGenerated()
CompareProgressDlgGenerated::CompareProgressDlgGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer1811;
- bSizer1811 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer1811;
+ bSizer1811 = new wxBoxSizer( wxVERTICAL );
- bSizer1811->Add( 0, 0, 1, 0, 5 );
+ bSizer1811->Add( 0, 0, 1, 0, 5 );
- m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatus->Wrap( -1 );
- bSizer1811->Add( m_staticTextStatus, 0, wxTOP|wxRIGHT|wxLEFT, 10 );
+ m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatus->Wrap( -1 );
+ bSizer1811->Add( m_staticTextStatus, 0, wxTOP|wxRIGHT|wxLEFT, 10 );
- wxBoxSizer* bSizer199;
- bSizer199 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer199;
+ bSizer199 = new wxBoxSizer( wxHORIZONTAL );
- bSizer199->Add( 10, 0, 0, 0, 5 );
+ bSizer199->Add( 10, 0, 0, 0, 5 );
- ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 );
- ffgSizer11->SetFlexibleDirection( wxBOTH );
- ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 );
+ ffgSizer11->SetFlexibleDirection( wxBOTH );
+ ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticTextProcessed = new wxStaticText( this, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextProcessed->Wrap( -1 );
- ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
+ m_staticTextProcessed = new wxStaticText( this, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextProcessed->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
- m_staticTextRemaining = new wxStaticText( this, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRemaining->Wrap( -1 );
- ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_staticTextRemaining = new wxStaticText( this, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRemaining->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer199->Add( ffgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 );
+ bSizer199->Add( ffgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 );
- m_panelItemStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ m_panelItemStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer291;
- bSizer291 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer291;
+ bSizer291 = new wxBoxSizer( wxVERTICAL );
- ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 );
- ffgSizer111->SetFlexibleDirection( wxBOTH );
- ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 );
+ ffgSizer111->SetFlexibleDirection( wxBOTH );
+ ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- wxBoxSizer* bSizer293;
- bSizer293 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer293;
+ bSizer293 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer293->Add( 0, 0, 1, 0, 5 );
+ bSizer293->Add( 0, 0, 1, 0, 5 );
- m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextItemsProcessed->Wrap( -1 );
- m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextItemsProcessed->Wrap( -1 );
+ m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer111->Add( bSizer293, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ ffgSizer111->Add( bSizer293, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextBytesProcessed->Wrap( -1 );
- ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+ m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBytesProcessed->Wrap( -1 );
+ ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
- m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextItemsRemaining->Wrap( -1 );
- m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextItemsRemaining->Wrap( -1 );
+ m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextBytesRemaining->Wrap( -1 );
- ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBytesRemaining->Wrap( -1 );
+ ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer291->Add( ffgSizer111, 0, wxALL, 5 );
+ bSizer291->Add( ffgSizer111, 0, wxALL, 5 );
- m_panelItemStats->SetSizer( bSizer291 );
- m_panelItemStats->Layout();
- bSizer291->Fit( m_panelItemStats );
- bSizer199->Add( m_panelItemStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ m_panelItemStats->SetSizer( bSizer291 );
+ m_panelItemStats->Layout();
+ bSizer291->Fit( m_panelItemStats );
+ bSizer199->Add( m_panelItemStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- m_panelTimeStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ m_panelTimeStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer292;
- bSizer292 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer292;
+ bSizer292 = new wxBoxSizer( wxVERTICAL );
- ffgSizer112 = new wxFlexGridSizer( 0, 1, 5, 5 );
- ffgSizer112->SetFlexibleDirection( wxBOTH );
- ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer112 = new wxFlexGridSizer( 0, 1, 5, 5 );
+ ffgSizer112->SetFlexibleDirection( wxBOTH );
+ ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- wxBoxSizer* bSizer294;
- bSizer294 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer294;
+ bSizer294 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer294->Add( 0, 0, 1, 0, 5 );
+ bSizer294->Add( 0, 0, 1, 0, 5 );
- m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeElapsed->Wrap( -1 );
- m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeElapsed->Wrap( -1 );
+ m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer112->Add( bSizer294, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ ffgSizer112->Add( bSizer294, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_staticTextTimeRemaining = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeRemaining->Wrap( -1 );
- m_staticTextTimeRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextTimeRemaining = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeRemaining->Wrap( -1 );
+ m_staticTextTimeRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- ffgSizer112->Add( m_staticTextTimeRemaining, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+ ffgSizer112->Add( m_staticTextTimeRemaining, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
- bSizer292->Add( ffgSizer112, 0, wxALL, 5 );
+ bSizer292->Add( ffgSizer112, 0, wxALL, 5 );
- m_panelTimeStats->SetSizer( bSizer292 );
- m_panelTimeStats->Layout();
- bSizer292->Fit( m_panelTimeStats );
- bSizer199->Add( m_panelTimeStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ m_panelTimeStats->SetSizer( bSizer292 );
+ m_panelTimeStats->Layout();
+ bSizer292->Fit( m_panelTimeStats );
+ bSizer199->Add( m_panelTimeStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizerErrorsRetry = new wxBoxSizer( wxHORIZONTAL );
+ bSizerErrorsRetry = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapRetryErrors = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerErrorsRetry->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapRetryErrors = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerErrorsRetry->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText1461 = new wxStaticText( this, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1461->Wrap( -1 );
- bSizerErrorsRetry->Add( m_staticText1461, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ m_staticText1461 = new wxStaticText( this, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1461->Wrap( -1 );
+ bSizerErrorsRetry->Add( m_staticText1461, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
- m_staticTextRetryCount = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRetryCount->Wrap( -1 );
- bSizerErrorsRetry->Add( m_staticTextRetryCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextRetryCount = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRetryCount->Wrap( -1 );
+ bSizerErrorsRetry->Add( m_staticTextRetryCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer199->Add( bSizerErrorsRetry, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ bSizer199->Add( bSizerErrorsRetry, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizerErrorsIgnore = new wxBoxSizer( wxHORIZONTAL );
+ bSizerErrorsIgnore = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapIgnoreErrors = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerErrorsIgnore->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapIgnoreErrors = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerErrorsIgnore->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText146 = new wxStaticText( this, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText146->Wrap( -1 );
- bSizerErrorsIgnore->Add( m_staticText146, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ m_staticText146 = new wxStaticText( this, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText146->Wrap( -1 );
+ bSizerErrorsIgnore->Add( m_staticText146, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- bSizer199->Add( bSizerErrorsIgnore, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ bSizer199->Add( bSizerErrorsIgnore, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizerProgressGraph = new wxBoxSizer( wxHORIZONTAL );
+ bSizerProgressGraph = new wxBoxSizer( wxHORIZONTAL );
- ffgSizer113 = new wxFlexGridSizer( 2, 0, 5, 5 );
- ffgSizer113->SetFlexibleDirection( wxBOTH );
- ffgSizer113->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer113 = new wxFlexGridSizer( 2, 0, 5, 5 );
+ ffgSizer113->SetFlexibleDirection( wxBOTH );
+ ffgSizer113->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- wxStaticText* m_staticText99;
- m_staticText99 = new wxStaticText( this, wxID_ANY, _("Bytes:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText99->Wrap( -1 );
- ffgSizer113->Add( m_staticText99, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ wxStaticText* m_staticText99;
+ m_staticText99 = new wxStaticText( this, wxID_ANY, _("Bytes:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText99->Wrap( -1 );
+ ffgSizer113->Add( m_staticText99, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- wxStaticText* m_staticText100;
- m_staticText100 = new wxStaticText( this, wxID_ANY, _("Items:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText100->Wrap( -1 );
- ffgSizer113->Add( m_staticText100, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ wxStaticText* m_staticText100;
+ m_staticText100 = new wxStaticText( this, wxID_ANY, _("Items:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText100->Wrap( -1 );
+ ffgSizer113->Add( m_staticText100, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerProgressGraph->Add( ffgSizer113, 0, wxALL, 5 );
+ bSizerProgressGraph->Add( ffgSizer113, 0, wxALL, 5 );
- m_panelProgressGraph = new zen::Graph2D( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_panelProgressGraph->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ m_panelProgressGraph = new zen::Graph2D( this, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_panelProgressGraph->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- bSizerProgressGraph->Add( m_panelProgressGraph, 1, wxEXPAND, 5 );
+ bSizerProgressGraph->Add( m_panelProgressGraph, 1, wxEXPAND, 5 );
- bSizer199->Add( bSizerProgressGraph, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
+ bSizer199->Add( bSizerProgressGraph, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 );
- bSizer1811->Add( bSizer199, 0, wxEXPAND, 5 );
+ bSizer1811->Add( bSizer199, 0, wxEXPAND, 5 );
- bSizer1811->Add( 0, 0, 1, 0, 5 );
+ bSizer1811->Add( 0, 0, 1, 0, 5 );
- this->SetSizer( bSizer1811 );
- this->Layout();
- bSizer1811->Fit( this );
+ this->SetSizer( bSizer1811 );
+ this->Layout();
+ bSizer1811->Fit( this );
}
CompareProgressDlgGenerated::~CompareProgressDlgGenerated()
@@ -3485,333 +3522,333 @@ CompareProgressDlgGenerated::~CompareProgressDlgGenerated()
SyncProgressPanelGenerated::SyncProgressPanelGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
- bSizerRoot = new wxBoxSizer( wxVERTICAL );
+ bSizerRoot = new wxBoxSizer( wxVERTICAL );
- m_panel53 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel53->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel53 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel53->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizer42 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer42 = new wxBoxSizer( wxHORIZONTAL );
- bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
- m_bitmapStatus = new wxStaticBitmap( m_panel53, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+ m_bitmapStatus = new wxStaticBitmap( m_panel53, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
- m_staticTextPhase = new wxStaticText( m_panel53, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextPhase->Wrap( -1 );
- m_staticTextPhase->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextPhase = new wxStaticText( m_panel53, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPhase->Wrap( -1 );
+ m_staticTextPhase->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer42->Add( m_staticTextPhase, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer42->Add( m_staticTextPhase, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- wxBoxSizer* bSizer247;
- bSizer247 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer247;
+ bSizer247 = new wxBoxSizer( wxHORIZONTAL );
- bSizer247->Add( 0, 0, 1, 0, 5 );
+ bSizer247->Add( 0, 0, 1, 0, 5 );
- m_bpButtonMinimizeToTray = new wxBitmapButton( m_panel53, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonMinimizeToTray->SetToolTip( _("Minimize to notification area") );
+ m_bpButtonMinimizeToTray = new wxBitmapButton( m_panel53, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonMinimizeToTray->SetToolTip( _("Minimize to notification area") );
- bSizer247->Add( m_bpButtonMinimizeToTray, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+ bSizer247->Add( m_bpButtonMinimizeToTray, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
- bSizer42->Add( bSizer247, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer42->Add( bSizer247, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_panel53->SetSizer( bSizer42 );
- m_panel53->Layout();
- bSizer42->Fit( m_panel53 );
- bSizerRoot->Add( m_panel53, 0, wxEXPAND, 5 );
+ m_panel53->SetSizer( bSizer42 );
+ m_panel53->Layout();
+ bSizer42->Fit( m_panel53 );
+ bSizerRoot->Add( m_panel53, 0, wxEXPAND, 5 );
- bSizerStatusText = new wxBoxSizer( wxVERTICAL );
+ bSizerStatusText = new wxBoxSizer( wxVERTICAL );
- bSizerStatusText->Add( 0, 5, 0, 0, 5 );
+ bSizerStatusText->Add( 0, 5, 0, 0, 5 );
- m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatus->Wrap( -1 );
- bSizerStatusText->Add( m_staticTextStatus, 0, wxEXPAND|wxLEFT, 10 );
+ m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatus->Wrap( -1 );
+ bSizerStatusText->Add( m_staticTextStatus, 0, wxEXPAND|wxLEFT, 10 );
- bSizerStatusText->Add( 0, 5, 0, 0, 5 );
+ bSizerStatusText->Add( 0, 5, 0, 0, 5 );
- bSizerRoot->Add( bSizerStatusText, 0, wxEXPAND, 5 );
+ bSizerRoot->Add( bSizerStatusText, 0, wxEXPAND, 5 );
- m_panelProgress = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelProgress->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelProgress = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelProgress->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer173;
- bSizer173 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer173;
+ bSizer173 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer161;
- bSizer161 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer161;
+ bSizer161 = new wxBoxSizer( wxVERTICAL );
- m_panelGraphBytes = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_panelGraphBytes->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelGraphBytes = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_panelGraphBytes->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizer161->Add( m_panelGraphBytes, 1, wxEXPAND|wxLEFT, 10 );
+ bSizer161->Add( m_panelGraphBytes, 1, wxEXPAND|wxLEFT, 10 );
- wxBoxSizer* bSizer232;
- bSizer232 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer232;
+ bSizer232 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer233;
- bSizer233 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer233;
+ bSizer233 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer175;
- bSizer175 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer175;
+ bSizer175 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapGraphKeyBytes = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer175->Add( m_bitmapGraphKeyBytes, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapGraphKeyBytes = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer175->Add( m_bitmapGraphKeyBytes, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- wxStaticText* m_staticText99;
- m_staticText99 = new wxStaticText( m_panelProgress, wxID_ANY, _("Bytes"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText99->Wrap( -1 );
- bSizer175->Add( m_staticText99, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ wxStaticText* m_staticText99;
+ m_staticText99 = new wxStaticText( m_panelProgress, wxID_ANY, _("Bytes"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText99->Wrap( -1 );
+ bSizer175->Add( m_staticText99, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer233->Add( bSizer175, 0, wxALL, 5 );
+ bSizer233->Add( bSizer175, 0, wxALL, 5 );
- bSizer233->Add( 0, 0, 1, 0, 5 );
+ bSizer233->Add( 0, 0, 1, 0, 5 );
- wxBoxSizer* bSizer174;
- bSizer174 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer174;
+ bSizer174 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapGraphKeyItems = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer174->Add( m_bitmapGraphKeyItems, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapGraphKeyItems = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer174->Add( m_bitmapGraphKeyItems, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- wxStaticText* m_staticText100;
- m_staticText100 = new wxStaticText( m_panelProgress, wxID_ANY, _("Items"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText100->Wrap( -1 );
- bSizer174->Add( m_staticText100, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ wxStaticText* m_staticText100;
+ m_staticText100 = new wxStaticText( m_panelProgress, wxID_ANY, _("Items"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText100->Wrap( -1 );
+ bSizer174->Add( m_staticText100, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer233->Add( bSizer174, 0, wxALL, 5 );
+ bSizer233->Add( bSizer174, 0, wxALL, 5 );
- bSizer232->Add( bSizer233, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+ bSizer232->Add( bSizer233, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
- ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 );
- ffgSizer11->SetFlexibleDirection( wxBOTH );
- ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 );
+ ffgSizer11->SetFlexibleDirection( wxBOTH );
+ ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticTextProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextProcessed->Wrap( -1 );
- ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
+ m_staticTextProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextProcessed->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
- m_staticTextRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRemaining->Wrap( -1 );
- ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_staticTextRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRemaining->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer232->Add( ffgSizer11, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 10 );
+ bSizer232->Add( ffgSizer11, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 10 );
- m_panelItemStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ m_panelItemStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer291;
- bSizer291 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer291;
+ bSizer291 = new wxBoxSizer( wxVERTICAL );
- ffgSizer111 = new wxFlexGridSizer( 2, 0, 5, 5 );
- ffgSizer111->SetFlexibleDirection( wxBOTH );
- ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer111 = new wxFlexGridSizer( 2, 0, 5, 5 );
+ ffgSizer111->SetFlexibleDirection( wxBOTH );
+ ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- wxBoxSizer* bSizer293;
- bSizer293 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer293;
+ bSizer293 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer293->Add( 0, 0, 1, 0, 5 );
+ bSizer293->Add( 0, 0, 1, 0, 5 );
- m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextItemsProcessed->Wrap( -1 );
- m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextItemsProcessed->Wrap( -1 );
+ m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer111->Add( bSizer293, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ ffgSizer111->Add( bSizer293, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextBytesProcessed->Wrap( -1 );
- ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+ m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBytesProcessed->Wrap( -1 );
+ ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
- m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextItemsRemaining->Wrap( -1 );
- m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextItemsRemaining->Wrap( -1 );
+ m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextBytesRemaining->Wrap( -1 );
- ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBytesRemaining->Wrap( -1 );
+ ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer291->Add( ffgSizer111, 0, wxALL, 5 );
+ bSizer291->Add( ffgSizer111, 0, wxALL, 5 );
- m_panelItemStats->SetSizer( bSizer291 );
- m_panelItemStats->Layout();
- bSizer291->Fit( m_panelItemStats );
- bSizer232->Add( m_panelItemStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
+ m_panelItemStats->SetSizer( bSizer291 );
+ m_panelItemStats->Layout();
+ bSizer291->Fit( m_panelItemStats );
+ bSizer232->Add( m_panelItemStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
- m_panelTimeStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ m_panelTimeStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer292;
- bSizer292 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer292;
+ bSizer292 = new wxBoxSizer( wxVERTICAL );
- ffgSizer112 = new wxFlexGridSizer( 2, 0, 5, 5 );
- ffgSizer112->SetFlexibleDirection( wxBOTH );
- ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer112 = new wxFlexGridSizer( 2, 0, 5, 5 );
+ ffgSizer112->SetFlexibleDirection( wxBOTH );
+ ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- wxBoxSizer* bSizer294;
- bSizer294 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer294;
+ bSizer294 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer294->Add( 0, 0, 1, 0, 5 );
+ bSizer294->Add( 0, 0, 1, 0, 5 );
- m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeElapsed->Wrap( -1 );
- m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeElapsed->Wrap( -1 );
+ m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer112->Add( bSizer294, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ ffgSizer112->Add( bSizer294, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_staticTextTimeRemaining = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeRemaining->Wrap( -1 );
- m_staticTextTimeRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_staticTextTimeRemaining = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeRemaining->Wrap( -1 );
+ m_staticTextTimeRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- ffgSizer112->Add( m_staticTextTimeRemaining, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+ ffgSizer112->Add( m_staticTextTimeRemaining, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
- bSizer292->Add( ffgSizer112, 0, wxALL, 5 );
+ bSizer292->Add( ffgSizer112, 0, wxALL, 5 );
- m_panelTimeStats->SetSizer( bSizer292 );
- m_panelTimeStats->Layout();
- bSizer292->Fit( m_panelTimeStats );
- bSizer232->Add( m_panelTimeStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
+ m_panelTimeStats->SetSizer( bSizer292 );
+ m_panelTimeStats->Layout();
+ bSizer292->Fit( m_panelTimeStats );
+ bSizer232->Add( m_panelTimeStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
- bSizer232->Add( 0, 0, 1, 0, 5 );
+ bSizer232->Add( 0, 0, 1, 0, 5 );
- bSizerDynSpace = new wxBoxSizer( wxVERTICAL );
+ bSizerDynSpace = new wxBoxSizer( wxVERTICAL );
- bSizerDynSpace->Add( 0, 0, 0, 0, 5 );
+ bSizerDynSpace->Add( 0, 0, 0, 0, 5 );
- bSizer232->Add( bSizerDynSpace, 0, 0, 5 );
+ bSizer232->Add( bSizerDynSpace, 0, 0, 5 );
- bSizer161->Add( bSizer232, 0, wxEXPAND, 5 );
+ bSizer161->Add( bSizer232, 0, wxEXPAND, 5 );
- m_panelGraphItems = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_panelGraphItems->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panelGraphItems = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_panelGraphItems->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizer161->Add( m_panelGraphItems, 1, wxEXPAND|wxLEFT, 10 );
+ bSizer161->Add( m_panelGraphItems, 1, wxEXPAND|wxLEFT, 10 );
- bSizerProgressFooter = new wxBoxSizer( wxHORIZONTAL );
+ bSizerProgressFooter = new wxBoxSizer( wxHORIZONTAL );
- bSizerErrorsRetry = new wxBoxSizer( wxHORIZONTAL );
+ bSizerErrorsRetry = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapRetryErrors = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerErrorsRetry->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapRetryErrors = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerErrorsRetry->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText1461 = new wxStaticText( m_panelProgress, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1461->Wrap( -1 );
- bSizerErrorsRetry->Add( m_staticText1461, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ m_staticText1461 = new wxStaticText( m_panelProgress, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1461->Wrap( -1 );
+ bSizerErrorsRetry->Add( m_staticText1461, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
- m_staticTextRetryCount = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRetryCount->Wrap( -1 );
- bSizerErrorsRetry->Add( m_staticTextRetryCount, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_staticTextRetryCount = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRetryCount->Wrap( -1 );
+ bSizerErrorsRetry->Add( m_staticTextRetryCount, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizerProgressFooter->Add( bSizerErrorsRetry, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ bSizerProgressFooter->Add( bSizerErrorsRetry, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizerErrorsIgnore = new wxBoxSizer( wxHORIZONTAL );
+ bSizerErrorsIgnore = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapIgnoreErrors = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerErrorsIgnore->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapIgnoreErrors = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerErrorsIgnore->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText146 = new wxStaticText( m_panelProgress, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText146->Wrap( -1 );
- bSizerErrorsIgnore->Add( m_staticText146, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ m_staticText146 = new wxStaticText( m_panelProgress, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText146->Wrap( -1 );
+ bSizerErrorsIgnore->Add( m_staticText146, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
- bSizerProgressFooter->Add( bSizerErrorsIgnore, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ bSizerProgressFooter->Add( bSizerErrorsIgnore, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizerProgressFooter->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizerProgressFooter->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticText137 = new wxStaticText( m_panelProgress, wxID_ANY, _("When finished:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText137->Wrap( -1 );
- bSizerProgressFooter->Add( m_staticText137, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_staticText137 = new wxStaticText( m_panelProgress, wxID_ANY, _("When finished:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText137->Wrap( -1 );
+ bSizerProgressFooter->Add( m_staticText137, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- wxArrayString m_choicePostSyncActionChoices;
- m_choicePostSyncAction = new wxChoice( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncActionChoices, 0 );
- m_choicePostSyncAction->SetSelection( 0 );
- bSizerProgressFooter->Add( m_choicePostSyncAction, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ wxArrayString m_choicePostSyncActionChoices;
+ m_choicePostSyncAction = new wxChoice( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncActionChoices, 0 );
+ m_choicePostSyncAction->SetSelection( 0 );
+ bSizerProgressFooter->Add( m_choicePostSyncAction, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer161->Add( bSizerProgressFooter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
+ bSizer161->Add( bSizerProgressFooter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
- bSizer173->Add( bSizer161, 1, wxEXPAND|wxLEFT, 10 );
+ bSizer173->Add( bSizer161, 1, wxEXPAND|wxLEFT, 10 );
- m_panelProgress->SetSizer( bSizer173 );
- m_panelProgress->Layout();
- bSizer173->Fit( m_panelProgress );
- bSizerRoot->Add( m_panelProgress, 1, wxEXPAND, 5 );
+ m_panelProgress->SetSizer( bSizer173 );
+ m_panelProgress->Layout();
+ bSizer173->Fit( m_panelProgress );
+ bSizerRoot->Add( m_panelProgress, 1, wxEXPAND, 5 );
- m_notebookResult = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_FIXEDWIDTH );
- m_notebookResult->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_notebookResult = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_FIXEDWIDTH );
+ m_notebookResult->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- bSizerRoot->Add( m_notebookResult, 1, wxEXPAND, 5 );
+ bSizerRoot->Add( m_notebookResult, 1, wxEXPAND, 5 );
- m_staticlineFooter = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerRoot->Add( m_staticlineFooter, 0, wxEXPAND, 5 );
+ m_staticlineFooter = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerRoot->Add( m_staticlineFooter, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_checkBoxAutoClose = new wxCheckBox( this, wxID_ANY, _("Auto-close"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStdButtons->Add( m_checkBoxAutoClose, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_checkBoxAutoClose = new wxCheckBox( this, wxID_ANY, _("Auto-close"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStdButtons->Add( m_checkBoxAutoClose, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 );
- m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonClose->SetDefault();
- m_buttonClose->Enable( false );
+ m_buttonClose->SetDefault();
+ m_buttonClose->Enable( false );
- bSizerStdButtons->Add( m_buttonClose, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizerStdButtons->Add( m_buttonClose, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- m_buttonStop = new wxButton( this, wxID_CANCEL, _("Stop"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonStop, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonStop = new wxButton( this, wxID_CANCEL, _("Stop"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonStop, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizerRoot->Add( bSizerStdButtons, 0, wxEXPAND, 5 );
+ bSizerRoot->Add( bSizerStdButtons, 0, wxEXPAND, 5 );
- this->SetSizer( bSizerRoot );
- this->Layout();
- bSizerRoot->Fit( this );
+ this->SetSizer( bSizerRoot );
+ this->Layout();
+ bSizerRoot->Fit( this );
}
SyncProgressPanelGenerated::~SyncProgressPanelGenerated()
@@ -3820,42 +3857,42 @@ SyncProgressPanelGenerated::~SyncProgressPanelGenerated()
LogPanelGenerated::LogPanelGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer153;
- bSizer153 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer153;
+ bSizer153 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer154;
- bSizer154 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer154;
+ bSizer154 = new wxBoxSizer( wxVERTICAL );
- m_bpButtonErrors = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonErrors = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonWarnings = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonWarnings = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonInfo = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_bpButtonInfo = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
- m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer153->Add( m_staticline13, 0, wxEXPAND, 5 );
+ m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer153->Add( m_staticline13, 0, wxEXPAND, 5 );
- m_gridMessages = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_gridMessages->SetScrollRate( 5, 5 );
- bSizer153->Add( m_gridMessages, 1, wxEXPAND, 5 );
+ m_gridMessages = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridMessages->SetScrollRate( 5, 5 );
+ bSizer153->Add( m_gridMessages, 1, wxEXPAND, 5 );
- this->SetSizer( bSizer153 );
- this->Layout();
- bSizer153->Fit( this );
+ this->SetSizer( bSizer153 );
+ this->Layout();
+ bSizer153->Fit( this );
- // Connect Events
- m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::OnErrors ), NULL, this );
- m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::OnWarnings ), NULL, this );
- m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::OnInfo ), NULL, this );
+ // Connect Events
+ m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::OnErrors ), NULL, this );
+ m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::OnWarnings ), NULL, this );
+ m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::OnInfo ), NULL, this );
}
LogPanelGenerated::~LogPanelGenerated()
@@ -3864,174 +3901,174 @@ LogPanelGenerated::~LogPanelGenerated()
BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxSize( -1, -1 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer54;
- bSizer54 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer54;
+ bSizer54 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapBatchJob = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer72->Add( m_bitmapBatchJob, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_bitmapBatchJob = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer72->Add( m_bitmapBatchJob, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
- m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("Create a batch file for unattended synchronization. To start, double-click this file or schedule in a task planner: %x"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextHeader->Wrap( -1 );
- bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+ m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("Create a batch file for unattended synchronization. To start, double-click this file or schedule in a task planner: %x"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
- bSizer54->Add( bSizer72, 0, 0, 5 );
+ bSizer54->Add( bSizer72, 0, 0, 5 );
- m_staticline18 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline18, 0, wxEXPAND, 5 );
+ m_staticline18 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline18, 0, wxEXPAND, 5 );
- m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer180;
- bSizer180 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer180;
+ bSizer180 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer2361;
- bSizer2361 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer2361;
+ bSizer2361 = new wxBoxSizer( wxVERTICAL );
- m_staticText146 = new wxStaticText( m_panel35, wxID_ANY, _("Progress dialog:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText146->Wrap( -1 );
- bSizer2361->Add( m_staticText146, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_staticText146 = new wxStaticText( m_panel35, wxID_ANY, _("Progress dialog:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText146->Wrap( -1 );
+ bSizer2361->Add( m_staticText146, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- ffgSizer11 = new wxFlexGridSizer( 0, 2, 5, 5 );
- ffgSizer11->SetFlexibleDirection( wxBOTH );
- ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer11 = new wxFlexGridSizer( 0, 2, 5, 5 );
+ ffgSizer11->SetFlexibleDirection( wxBOTH );
+ ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_bitmapMinimizeToTray = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- ffgSizer11->Add( m_bitmapMinimizeToTray, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapMinimizeToTray = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ ffgSizer11->Add( m_bitmapMinimizeToTray, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_checkBoxRunMinimized = new wxCheckBox( m_panel35, wxID_ANY, _("Run minimized"), wxDefaultPosition, wxDefaultSize, 0 );
- ffgSizer11->Add( m_checkBoxRunMinimized, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+ m_checkBoxRunMinimized = new wxCheckBox( m_panel35, wxID_ANY, _("Run minimized"), wxDefaultPosition, wxDefaultSize, 0 );
+ ffgSizer11->Add( m_checkBoxRunMinimized, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
- ffgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
+ ffgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
- m_checkBoxAutoClose = new wxCheckBox( m_panel35, wxID_ANY, _("Auto-close"), wxDefaultPosition, wxDefaultSize, 0 );
- ffgSizer11->Add( m_checkBoxAutoClose, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ m_checkBoxAutoClose = new wxCheckBox( m_panel35, wxID_ANY, _("Auto-close"), wxDefaultPosition, wxDefaultSize, 0 );
+ ffgSizer11->Add( m_checkBoxAutoClose, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- bSizer2361->Add( ffgSizer11, 0, wxEXPAND|wxALL, 5 );
+ bSizer2361->Add( ffgSizer11, 0, wxEXPAND|wxALL, 5 );
- bSizer180->Add( bSizer2361, 0, wxALL, 5 );
+ bSizer180->Add( bSizer2361, 0, wxALL, 5 );
- m_staticline26 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer180->Add( m_staticline26, 0, wxEXPAND, 5 );
+ m_staticline26 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer180->Add( m_staticline26, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer242;
- bSizer242 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer242;
+ bSizer242 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer243;
- bSizer243 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer243;
+ bSizer243 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapIgnoreErrors = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer243->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapIgnoreErrors = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer243->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_checkBoxIgnoreErrors = new wxCheckBox( m_panel35, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer243->Add( m_checkBoxIgnoreErrors, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ m_checkBoxIgnoreErrors = new wxCheckBox( m_panel35, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer243->Add( m_checkBoxIgnoreErrors, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- bSizer242->Add( bSizer243, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ bSizer242->Add( bSizer243, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- wxBoxSizer* bSizer246;
- bSizer246 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer246;
+ bSizer246 = new wxBoxSizer( wxVERTICAL );
- m_radioBtnErrorDialogShow = new wxRadioButton( m_panel35, wxID_ANY, _("&Show error message"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
- m_radioBtnErrorDialogShow->SetValue( true );
- m_radioBtnErrorDialogShow->SetToolTip( _("Show pop-up on errors or warnings") );
+ m_radioBtnErrorDialogShow = new wxRadioButton( m_panel35, wxID_ANY, _("&Show error message"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_radioBtnErrorDialogShow->SetValue( true );
+ m_radioBtnErrorDialogShow->SetToolTip( _("Show pop-up on errors or warnings") );
- bSizer246->Add( m_radioBtnErrorDialogShow, 0, wxALL|wxEXPAND, 5 );
+ bSizer246->Add( m_radioBtnErrorDialogShow, 0, wxALL|wxEXPAND, 5 );
- m_radioBtnErrorDialogCancel = new wxRadioButton( m_panel35, wxID_ANY, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- m_radioBtnErrorDialogCancel->SetToolTip( _("Stop synchronization at first error") );
+ m_radioBtnErrorDialogCancel = new wxRadioButton( m_panel35, wxID_ANY, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_radioBtnErrorDialogCancel->SetToolTip( _("Stop synchronization at first error") );
- bSizer246->Add( m_radioBtnErrorDialogCancel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ bSizer246->Add( m_radioBtnErrorDialogCancel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
- bSizer242->Add( bSizer246, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT, 15 );
+ bSizer242->Add( bSizer246, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT, 15 );
- bSizer180->Add( bSizer242, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer180->Add( bSizer242, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticline261 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer180->Add( m_staticline261, 0, wxEXPAND, 5 );
+ m_staticline261 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer180->Add( m_staticline261, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer247;
- bSizer247 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer247;
+ bSizer247 = new wxBoxSizer( wxVERTICAL );
- m_staticText137 = new wxStaticText( m_panel35, wxID_ANY, _("When finished:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText137->Wrap( -1 );
- bSizer247->Add( m_staticText137, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_staticText137 = new wxStaticText( m_panel35, wxID_ANY, _("When finished:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText137->Wrap( -1 );
+ bSizer247->Add( m_staticText137, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- wxArrayString m_choicePostSyncActionChoices;
- m_choicePostSyncAction = new wxChoice( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncActionChoices, 0 );
- m_choicePostSyncAction->SetSelection( 0 );
- bSizer247->Add( m_choicePostSyncAction, 0, wxALL, 5 );
+ wxArrayString m_choicePostSyncActionChoices;
+ m_choicePostSyncAction = new wxChoice( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncActionChoices, 0 );
+ m_choicePostSyncAction->SetSelection( 0 );
+ bSizer247->Add( m_choicePostSyncAction, 0, wxALL, 5 );
- bSizer180->Add( bSizer247, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer180->Add( bSizer247, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticline262 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer180->Add( m_staticline262, 0, wxEXPAND, 5 );
+ m_staticline262 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer180->Add( m_staticline262, 0, wxEXPAND, 5 );
- bSizer172->Add( bSizer180, 0, 0, 5 );
+ bSizer172->Add( bSizer180, 0, 0, 5 );
- m_staticline25 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer172->Add( m_staticline25, 0, wxEXPAND, 5 );
+ m_staticline25 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer172->Add( m_staticline25, 0, wxEXPAND, 5 );
- m_hyperlink17 = new wxHyperlinkCtrl( m_panel35, wxID_ANY, _("How can I schedule a batch job?"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer172->Add( m_hyperlink17, 0, wxALL, 10 );
+ m_hyperlink17 = new wxHyperlinkCtrl( m_panel35, wxID_ANY, _("How can I schedule a batch job?"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer172->Add( m_hyperlink17, 0, wxALL, 10 );
- m_panel35->SetSizer( bSizer172 );
- m_panel35->Layout();
- bSizer172->Fit( m_panel35 );
- bSizer54->Add( m_panel35, 1, wxEXPAND, 5 );
+ m_panel35->SetSizer( bSizer172 );
+ m_panel35->Layout();
+ bSizer172->Fit( m_panel35 );
+ bSizer54->Add( m_panel35, 1, wxEXPAND, 5 );
- m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 );
+ m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonSaveAs = new wxButton( this, wxID_SAVE, _("Save &as..."), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonSaveAs = new wxButton( this, wxID_SAVE, _("Save &as..."), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonSaveAs->SetDefault();
- m_buttonSaveAs->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonSaveAs->SetDefault();
+ m_buttonSaveAs->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonSaveAs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizerStdButtons->Add( m_buttonSaveAs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer54->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer54->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- this->SetSizer( bSizer54 );
- this->Layout();
- bSizer54->Fit( this );
+ this->SetSizer( bSizer54 );
+ this->Layout();
+ bSizer54->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
- m_checkBoxRunMinimized->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleRunMinimized ), NULL, this );
- m_checkBoxIgnoreErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleIgnoreErrors ), NULL, this );
- m_radioBtnErrorDialogShow->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnErrorDialogShow ), NULL, this );
- m_radioBtnErrorDialogCancel->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnErrorDialogCancel ), NULL, this );
- m_hyperlink17->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( BatchDlgGenerated::OnHelpScheduleBatch ), NULL, this );
- m_buttonSaveAs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
+ m_checkBoxRunMinimized->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleRunMinimized ), NULL, this );
+ m_checkBoxIgnoreErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnToggleIgnoreErrors ), NULL, this );
+ m_radioBtnErrorDialogShow->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnErrorDialogShow ), NULL, this );
+ m_radioBtnErrorDialogCancel->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnErrorDialogCancel ), NULL, this );
+ m_hyperlink17->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( BatchDlgGenerated::OnHelpScheduleBatch ), NULL, this );
+ m_buttonSaveAs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
}
BatchDlgGenerated::~BatchDlgGenerated()
@@ -4040,85 +4077,85 @@ BatchDlgGenerated::~BatchDlgGenerated()
DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxSize( -1, -1 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapDeleteType = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer72->Add( m_bitmapDeleteType, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_bitmapDeleteType = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer72->Add( m_bitmapDeleteType, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
- m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextHeader->Wrap( -1 );
- bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+ m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
- bSizer24->Add( bSizer72, 0, 0, 5 );
+ bSizer24->Add( bSizer72, 0, 0, 5 );
- m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 );
+ m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 );
- m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer185;
- bSizer185 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer185;
+ bSizer185 = new wxBoxSizer( wxHORIZONTAL );
- bSizer185->Add( 60, 0, 0, 0, 5 );
+ bSizer185->Add( 60, 0, 0, 0, 5 );
- m_staticline42 = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer185->Add( m_staticline42, 0, wxEXPAND, 5 );
+ m_staticline42 = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer185->Add( m_staticline42, 0, wxEXPAND, 5 );
- m_textCtrlFileList = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE );
- bSizer185->Add( m_textCtrlFileList, 1, wxEXPAND, 5 );
+ m_textCtrlFileList = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE );
+ bSizer185->Add( m_textCtrlFileList, 1, wxEXPAND, 5 );
- m_panel31->SetSizer( bSizer185 );
- m_panel31->Layout();
- bSizer185->Fit( m_panel31 );
- bSizer24->Add( m_panel31, 1, wxEXPAND, 5 );
+ m_panel31->SetSizer( bSizer185 );
+ m_panel31->Layout();
+ bSizer185->Fit( m_panel31 );
+ bSizer24->Add( m_panel31, 1, wxEXPAND, 5 );
- m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 );
+ m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("&Recycle bin"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStdButtons->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("&Recycle bin"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStdButtons->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 );
- m_buttonOK = new wxButton( this, wxID_OK, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonOK = new wxButton( this, wxID_OK, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonOK->SetDefault();
- m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonOK->SetDefault();
+ m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer24->Add( bSizerStdButtons, 0, wxEXPAND, 5 );
+ bSizer24->Add( bSizerStdButtons, 0, wxEXPAND, 5 );
- this->SetSizer( bSizer24 );
- this->Layout();
- bSizer24->Fit( this );
+ this->SetSizer( bSizer24 );
+ this->Layout();
+ bSizer24->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) );
- m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this );
- m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) );
+ m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
}
DeleteDlgGenerated::~DeleteDlgGenerated()
@@ -4127,122 +4164,122 @@ DeleteDlgGenerated::~DeleteDlgGenerated()
CopyToDlgGenerated::CopyToDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxSize( -1, -1 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapCopyTo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer72->Add( m_bitmapCopyTo, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_bitmapCopyTo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer72->Add( m_bitmapCopyTo, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
- m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextHeader->Wrap( -1 );
- bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+ m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
- bSizer24->Add( bSizer72, 0, 0, 5 );
+ bSizer24->Add( bSizer72, 0, 0, 5 );
- m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 );
+ m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 );
- m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer242;
- bSizer242 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer242;
+ bSizer242 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer185;
- bSizer185 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer185;
+ bSizer185 = new wxBoxSizer( wxHORIZONTAL );
- bSizer185->Add( 60, 0, 0, 0, 5 );
+ bSizer185->Add( 60, 0, 0, 0, 5 );
- m_staticline42 = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer185->Add( m_staticline42, 0, wxEXPAND, 5 );
+ m_staticline42 = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer185->Add( m_staticline42, 0, wxEXPAND, 5 );
- m_textCtrlFileList = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE );
- bSizer185->Add( m_textCtrlFileList, 1, wxEXPAND, 5 );
+ m_textCtrlFileList = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE );
+ bSizer185->Add( m_textCtrlFileList, 1, wxEXPAND, 5 );
- bSizer242->Add( bSizer185, 1, wxEXPAND, 5 );
+ bSizer242->Add( bSizer185, 1, wxEXPAND, 5 );
- wxBoxSizer* bSizer182;
- bSizer182 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer182;
+ bSizer182 = new wxBoxSizer( wxHORIZONTAL );
- m_targetFolderPath = new fff::FolderHistoryBox( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer182->Add( m_targetFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_targetFolderPath = new fff::FolderHistoryBox( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer182->Add( m_targetFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectTargetFolder = new wxButton( m_panel31, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectTargetFolder->SetToolTip( _("Select a folder") );
+ m_buttonSelectTargetFolder = new wxButton( m_panel31, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectTargetFolder->SetToolTip( _("Select a folder") );
- bSizer182->Add( m_buttonSelectTargetFolder, 0, wxEXPAND, 5 );
+ bSizer182->Add( m_buttonSelectTargetFolder, 0, wxEXPAND, 5 );
- m_bpButtonSelectAltTargetFolder = new wxBitmapButton( m_panel31, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- m_bpButtonSelectAltTargetFolder->SetToolTip( _("Access online storage") );
+ m_bpButtonSelectAltTargetFolder = new wxBitmapButton( m_panel31, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ m_bpButtonSelectAltTargetFolder->SetToolTip( _("Access online storage") );
- bSizer182->Add( m_bpButtonSelectAltTargetFolder, 0, wxEXPAND, 5 );
+ bSizer182->Add( m_bpButtonSelectAltTargetFolder, 0, wxEXPAND, 5 );
- bSizer242->Add( bSizer182, 0, wxALL|wxEXPAND, 10 );
+ bSizer242->Add( bSizer182, 0, wxALL|wxEXPAND, 10 );
- m_panel31->SetSizer( bSizer242 );
- m_panel31->Layout();
- bSizer242->Fit( m_panel31 );
- bSizer24->Add( m_panel31, 1, wxEXPAND, 5 );
+ m_panel31->SetSizer( bSizer242 );
+ m_panel31->Layout();
+ bSizer242->Fit( m_panel31 );
+ bSizer24->Add( m_panel31, 1, wxEXPAND, 5 );
- m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 );
+ m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer189;
- bSizer189 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer189;
+ bSizer189 = new wxBoxSizer( wxVERTICAL );
- m_checkBoxKeepRelPath = new wxCheckBox( this, wxID_ANY, _("&Keep relative paths"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxKeepRelPath->SetValue(true);
- bSizer189->Add( m_checkBoxKeepRelPath, 0, wxALL|wxEXPAND, 5 );
+ m_checkBoxKeepRelPath = new wxCheckBox( this, wxID_ANY, _("&Keep relative paths"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxKeepRelPath->SetValue(true);
+ bSizer189->Add( m_checkBoxKeepRelPath, 0, wxALL|wxEXPAND, 5 );
- m_checkBoxOverwriteIfExists = new wxCheckBox( this, wxID_ANY, _("&Overwrite existing files"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxOverwriteIfExists->SetValue(true);
- bSizer189->Add( m_checkBoxOverwriteIfExists, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ m_checkBoxOverwriteIfExists = new wxCheckBox( this, wxID_ANY, _("&Overwrite existing files"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxOverwriteIfExists->SetValue(true);
+ bSizer189->Add( m_checkBoxOverwriteIfExists, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
- bSizerStdButtons->Add( bSizer189, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerStdButtons->Add( bSizer189, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 );
- m_buttonOK = new wxButton( this, wxID_OK, _("Copy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonOK = new wxButton( this, wxID_OK, _("Copy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonOK->SetDefault();
- m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonOK->SetDefault();
+ m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer24->Add( bSizerStdButtons, 0, wxEXPAND, 5 );
+ bSizer24->Add( bSizerStdButtons, 0, wxEXPAND, 5 );
- this->SetSizer( bSizer24 );
- this->Layout();
- bSizer24->Fit( this );
+ this->SetSizer( bSizer24 );
+ this->Layout();
+ bSizer24->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CopyToDlgGenerated::OnClose ) );
- m_checkBoxKeepRelPath->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::OnUseRecycler ), NULL, this );
- m_checkBoxOverwriteIfExists->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::OnUseRecycler ), NULL, this );
- m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::OnOK ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CopyToDlgGenerated::OnClose ) );
+ m_checkBoxKeepRelPath->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::OnUseRecycler ), NULL, this );
+ m_checkBoxOverwriteIfExists->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::OnUseRecycler ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::OnOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::OnCancel ), NULL, this );
}
CopyToDlgGenerated::~CopyToDlgGenerated()
@@ -4251,555 +4288,555 @@ CopyToDlgGenerated::~CopyToDlgGenerated()
OptionsDlgGenerated::OptionsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxSize( -1, -1 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer95;
- bSizer95 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer95;
+ bSizer95 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer72->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer72->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
- m_staticText44 = new wxStaticText( this, wxID_ANY, _("The following settings are used for all synchronization jobs."), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticText44->Wrap( -1 );
- bSizer72->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+ m_staticText44 = new wxStaticText( this, wxID_ANY, _("The following settings are used for all synchronization jobs."), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticText44->Wrap( -1 );
+ bSizer72->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
- bSizer95->Add( bSizer72, 0, 0, 5 );
+ bSizer95->Add( bSizer72, 0, 0, 5 );
- m_staticline20 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer95->Add( m_staticline20, 0, wxEXPAND, 5 );
+ m_staticline20 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer95->Add( m_staticline20, 0, wxEXPAND, 5 );
- m_panel39 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel39->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel39 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel39->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer166;
- bSizer166 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer166;
+ bSizer166 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer186;
- bSizer186 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer186;
+ bSizer186 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer160;
- bSizer160 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer160;
+ bSizer160 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer176;
- bSizer176 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer176;
+ bSizer176 = new wxBoxSizer( wxHORIZONTAL );
- m_checkBoxFailSafe = new wxCheckBox( m_panel39, wxID_ANY, _("Fail-safe file copy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxFailSafe->SetValue(true);
- m_checkBoxFailSafe->SetToolTip( _("Copy to a temporary file (*.ffs_tmp) before overwriting target.\nThis guarantees a consistent state even in case of a serious error.") );
+ m_checkBoxFailSafe = new wxCheckBox( m_panel39, wxID_ANY, _("Fail-safe file copy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxFailSafe->SetValue(true);
+ m_checkBoxFailSafe->SetToolTip( _("Copy to a temporary file (*.ffs_tmp) before overwriting target.\nThis guarantees a consistent state even in case of a serious error.") );
- bSizer176->Add( m_checkBoxFailSafe, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer176->Add( m_checkBoxFailSafe, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText911 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText911->Wrap( -1 );
- m_staticText911->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText911 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText911->Wrap( -1 );
+ m_staticText911->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer176->Add( m_staticText911, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+ bSizer176->Add( m_staticText911, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
- m_staticText91 = new wxStaticText( m_panel39, wxID_ANY, _("recommended"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText91->Wrap( -1 );
- m_staticText91->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText91 = new wxStaticText( m_panel39, wxID_ANY, _("recommended"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText91->Wrap( -1 );
+ m_staticText91->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer176->Add( m_staticText91, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+ bSizer176->Add( m_staticText91, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
- m_staticText9111 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText9111->Wrap( -1 );
- m_staticText9111->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText9111 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText9111->Wrap( -1 );
+ m_staticText9111->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer176->Add( m_staticText9111, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer176->Add( m_staticText9111, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer160->Add( bSizer176, 0, wxEXPAND, 5 );
+ bSizer160->Add( bSizer176, 0, wxEXPAND, 5 );
- bSizerLockedFiles = new wxBoxSizer( wxHORIZONTAL );
+ bSizerLockedFiles = new wxBoxSizer( wxHORIZONTAL );
- m_checkBoxCopyLocked = new wxCheckBox( m_panel39, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxCopyLocked->SetValue(true);
- m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using the Volume Shadow Copy Service.") );
+ m_checkBoxCopyLocked = new wxCheckBox( m_panel39, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxCopyLocked->SetValue(true);
+ m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using the Volume Shadow Copy Service.") );
- bSizerLockedFiles->Add( m_checkBoxCopyLocked, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerLockedFiles->Add( m_checkBoxCopyLocked, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText921 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText921->Wrap( -1 );
- m_staticText921->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText921 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText921->Wrap( -1 );
+ m_staticText921->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizerLockedFiles->Add( m_staticText921, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+ bSizerLockedFiles->Add( m_staticText921, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
- m_staticText92 = new wxStaticText( m_panel39, wxID_ANY, _("requires administrator rights"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText92->Wrap( -1 );
- m_staticText92->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText92 = new wxStaticText( m_panel39, wxID_ANY, _("requires administrator rights"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText92->Wrap( -1 );
+ m_staticText92->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizerLockedFiles->Add( m_staticText92, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+ bSizerLockedFiles->Add( m_staticText92, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
- m_staticText922 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText922->Wrap( -1 );
- m_staticText922->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText922 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText922->Wrap( -1 );
+ m_staticText922->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizerLockedFiles->Add( m_staticText922, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerLockedFiles->Add( m_staticText922, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer160->Add( bSizerLockedFiles, 0, wxEXPAND, 5 );
+ bSizer160->Add( bSizerLockedFiles, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer178;
- bSizer178 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer178;
+ bSizer178 = new wxBoxSizer( wxHORIZONTAL );
- m_checkBoxCopyPermissions = new wxCheckBox( m_panel39, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxCopyPermissions->SetValue(true);
- m_checkBoxCopyPermissions->SetToolTip( _("Transfer file and folder permissions.") );
+ m_checkBoxCopyPermissions = new wxCheckBox( m_panel39, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxCopyPermissions->SetValue(true);
+ m_checkBoxCopyPermissions->SetToolTip( _("Transfer file and folder permissions.") );
- bSizer178->Add( m_checkBoxCopyPermissions, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizer178->Add( m_checkBoxCopyPermissions, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_staticText931 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText931->Wrap( -1 );
- m_staticText931->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText931 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText931->Wrap( -1 );
+ m_staticText931->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer178->Add( m_staticText931, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+ bSizer178->Add( m_staticText931, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
- m_staticText93 = new wxStaticText( m_panel39, wxID_ANY, _("requires administrator rights"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText93->Wrap( -1 );
- m_staticText93->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText93 = new wxStaticText( m_panel39, wxID_ANY, _("requires administrator rights"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText93->Wrap( -1 );
+ m_staticText93->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer178->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+ bSizer178->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
- m_staticText932 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText932->Wrap( -1 );
- m_staticText932->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText932 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText932->Wrap( -1 );
+ m_staticText932->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer178->Add( m_staticText932, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer178->Add( m_staticText932, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer160->Add( bSizer178, 0, wxEXPAND, 5 );
+ bSizer160->Add( bSizer178, 0, wxEXPAND, 5 );
- bSizer186->Add( bSizer160, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizer186->Add( bSizer160, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_staticline39 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer186->Add( m_staticline39, 0, wxEXPAND, 5 );
+ m_staticline39 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer186->Add( m_staticline39, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer293;
- bSizer293 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer293;
+ bSizer293 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapWarnings = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer293->Add( m_bitmapWarnings, 0, wxALL, 5 );
+ m_bitmapWarnings = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer293->Add( m_bitmapWarnings, 0, wxALL, 5 );
- wxBoxSizer* bSizer1881;
- bSizer1881 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer1881;
+ bSizer1881 = new wxBoxSizer( wxVERTICAL );
- m_staticTextResetDialogs = new wxStaticText( m_panel39, wxID_ANY, _("Show all permanently hidden dialogs and warning messages again"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextResetDialogs->Wrap( -1 );
- m_staticTextResetDialogs->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticTextResetDialogs = new wxStaticText( m_panel39, wxID_ANY, _("Show all permanently hidden dialogs and warning messages again"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextResetDialogs->Wrap( -1 );
+ m_staticTextResetDialogs->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer1881->Add( m_staticTextResetDialogs, 0, 0, 5 );
+ bSizer1881->Add( m_staticTextResetDialogs, 0, 0, 5 );
- wxBoxSizer* bSizer292;
- bSizer292 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer292;
+ bSizer292 = new wxBoxSizer( wxHORIZONTAL );
- m_buttonRestoreDialogs = new wxButton( m_panel39, wxID_ANY, _("&Restore"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer292->Add( m_buttonRestoreDialogs, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_buttonRestoreDialogs = new wxButton( m_panel39, wxID_ANY, _("&Restore"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer292->Add( m_buttonRestoreDialogs, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextAllDialogsShown = new wxStaticText( m_panel39, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextAllDialogsShown->Wrap( -1 );
- bSizer292->Add( m_staticTextAllDialogsShown, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ m_staticTextAllDialogsShown = new wxStaticText( m_panel39, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAllDialogsShown->Wrap( -1 );
+ bSizer292->Add( m_staticTextAllDialogsShown, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- bSizer1881->Add( bSizer292, 0, wxTOP, 5 );
+ bSizer1881->Add( bSizer292, 0, wxTOP, 5 );
- bSizer293->Add( bSizer1881, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer293->Add( bSizer1881, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer186->Add( bSizer293, 0, wxALL, 5 );
+ bSizer186->Add( bSizer293, 0, wxALL, 5 );
- bSizer166->Add( bSizer186, 0, wxEXPAND, 5 );
+ bSizer166->Add( bSizer186, 0, wxEXPAND, 5 );
- m_staticline191 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer166->Add( m_staticline191, 0, wxEXPAND, 5 );
+ m_staticline191 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer166->Add( m_staticline191, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer259;
- bSizer259 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer259;
+ bSizer259 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer258;
- bSizer258 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer258;
+ bSizer258 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapLogFile = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer258->Add( m_bitmapLogFile, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_bitmapLogFile = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer258->Add( m_bitmapLogFile, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_staticText163 = new wxStaticText( m_panel39, wxID_ANY, _("Default log path:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText163->Wrap( -1 );
- bSizer258->Add( m_staticText163, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_staticText163 = new wxStaticText( m_panel39, wxID_ANY, _("Default log path:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText163->Wrap( -1 );
+ bSizer258->Add( m_staticText163, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- m_hyperlinkLogFolder = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("dummy"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer258->Add( m_hyperlinkLogFolder, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_hyperlinkLogFolder = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("dummy"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer258->Add( m_hyperlinkLogFolder, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer259->Add( bSizer258, 0, wxALL, 5 );
+ bSizer259->Add( bSizer258, 0, wxALL, 5 );
- wxBoxSizer* bSizer299;
- bSizer299 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer299;
+ bSizer299 = new wxBoxSizer( wxVERTICAL );
- m_staticline83 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer299->Add( m_staticline83, 0, wxEXPAND, 5 );
+ m_staticline83 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer299->Add( m_staticline83, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer297;
- bSizer297 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer297;
+ bSizer297 = new wxBoxSizer( wxHORIZONTAL );
- m_staticline82 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer297->Add( m_staticline82, 0, wxEXPAND, 5 );
+ m_staticline82 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer297->Add( m_staticline82, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer282;
- bSizer282 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer282;
+ bSizer282 = new wxBoxSizer( wxHORIZONTAL );
- m_checkBoxLogFilesMaxAge = new wxCheckBox( m_panel39, wxID_ANY, _("&Delete logs after x days:"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer282->Add( m_checkBoxLogFilesMaxAge, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_checkBoxLogFilesMaxAge = new wxCheckBox( m_panel39, wxID_ANY, _("&Delete logs after x days:"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer282->Add( m_checkBoxLogFilesMaxAge, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_spinCtrlLogFilesMaxAge = new wxSpinCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
- bSizer282->Add( m_spinCtrlLogFilesMaxAge, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_spinCtrlLogFilesMaxAge = new wxSpinCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 );
+ bSizer282->Add( m_spinCtrlLogFilesMaxAge, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer297->Add( bSizer282, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizer297->Add( bSizer282, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_staticline81 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer297->Add( m_staticline81, 0, wxEXPAND, 5 );
+ m_staticline81 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer297->Add( m_staticline81, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer296;
- bSizer296 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer296;
+ bSizer296 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText184 = new wxStaticText( m_panel39, wxID_ANY, _("Log file format:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText184->Wrap( -1 );
- bSizer296->Add( m_staticText184, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_staticText184 = new wxStaticText( m_panel39, wxID_ANY, _("Log file format:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText184->Wrap( -1 );
+ bSizer296->Add( m_staticText184, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- wxFlexGridSizer* fgSizer251;
- fgSizer251 = new wxFlexGridSizer( 0, 1, 5, 0 );
- fgSizer251->SetFlexibleDirection( wxBOTH );
- fgSizer251->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ wxFlexGridSizer* fgSizer251;
+ fgSizer251 = new wxFlexGridSizer( 0, 1, 5, 0 );
+ fgSizer251->SetFlexibleDirection( wxBOTH );
+ fgSizer251->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_radioBtnLogHtml = new wxRadioButton( m_panel39, wxID_ANY, _("&HTML"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
- m_radioBtnLogHtml->SetValue( true );
- fgSizer251->Add( m_radioBtnLogHtml, 0, wxEXPAND, 5 );
+ m_radioBtnLogHtml = new wxRadioButton( m_panel39, wxID_ANY, _("&HTML"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_radioBtnLogHtml->SetValue( true );
+ fgSizer251->Add( m_radioBtnLogHtml, 0, wxEXPAND, 5 );
- m_radioBtnLogText = new wxRadioButton( m_panel39, wxID_ANY, _("&Plain text"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer251->Add( m_radioBtnLogText, 0, wxEXPAND, 5 );
+ m_radioBtnLogText = new wxRadioButton( m_panel39, wxID_ANY, _("&Plain text"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer251->Add( m_radioBtnLogText, 0, wxEXPAND, 5 );
- bSizer296->Add( fgSizer251, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizer296->Add( fgSizer251, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer297->Add( bSizer296, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizer297->Add( bSizer296, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizer299->Add( bSizer297, 0, 0, 5 );
+ bSizer299->Add( bSizer297, 0, 0, 5 );
- bSizer259->Add( bSizer299, 0, wxALIGN_RIGHT|wxLEFT, 15 );
+ bSizer259->Add( bSizer299, 0, wxALIGN_RIGHT|wxLEFT, 15 );
- bSizer166->Add( bSizer259, 0, wxEXPAND, 5 );
+ bSizer166->Add( bSizer259, 0, wxEXPAND, 5 );
- m_staticline361 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer166->Add( m_staticline361, 0, wxEXPAND, 5 );
+ m_staticline361 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer166->Add( m_staticline361, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer288;
- bSizer288 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer288;
+ bSizer288 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer300;
- bSizer300 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer300;
+ bSizer300 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapNotificationSounds = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer300->Add( m_bitmapNotificationSounds, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapNotificationSounds = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer300->Add( m_bitmapNotificationSounds, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText851 = new wxStaticText( m_panel39, wxID_ANY, _("Notification sounds:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText851->Wrap( -1 );
- bSizer300->Add( m_staticText851, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ m_staticText851 = new wxStaticText( m_panel39, wxID_ANY, _("Notification sounds:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText851->Wrap( -1 );
+ bSizer300->Add( m_staticText851, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- bSizer288->Add( bSizer300, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ bSizer288->Add( bSizer300, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- wxBoxSizer* bSizer301;
- bSizer301 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer301;
+ bSizer301 = new wxBoxSizer( wxHORIZONTAL );
- bSizer301->Add( 15, 0, 0, 0, 5 );
+ bSizer301->Add( 15, 0, 0, 0, 5 );
- ffgSizer11 = new wxFlexGridSizer( 0, 3, 0, 5 );
- ffgSizer11->AddGrowableCol( 2 );
- ffgSizer11->SetFlexibleDirection( wxBOTH );
- ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer11 = new wxFlexGridSizer( 0, 3, 0, 5 );
+ ffgSizer11->AddGrowableCol( 2 );
+ ffgSizer11->SetFlexibleDirection( wxBOTH );
+ ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_bitmapCompareDone = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- ffgSizer11->Add( m_bitmapCompareDone, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapCompareDone = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ ffgSizer11->Add( m_bitmapCompareDone, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText171 = new wxStaticText( m_panel39, wxID_ANY, _("Comparison finished:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText171->Wrap( -1 );
- m_staticText171->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText171 = new wxStaticText( m_panel39, wxID_ANY, _("Comparison finished:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText171->Wrap( -1 );
+ m_staticText171->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- ffgSizer11->Add( m_staticText171, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ ffgSizer11->Add( m_staticText171, 0, wxALIGN_CENTER_VERTICAL, 5 );
- wxBoxSizer* bSizer290;
- bSizer290 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer290;
+ bSizer290 = new wxBoxSizer( wxHORIZONTAL );
- m_textCtrlSoundPathCompareDone = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer290->Add( m_textCtrlSoundPathCompareDone, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_textCtrlSoundPathCompareDone = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer290->Add( m_textCtrlSoundPathCompareDone, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectSoundCompareDone = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectSoundCompareDone->SetToolTip( _("Select a folder") );
+ m_buttonSelectSoundCompareDone = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectSoundCompareDone->SetToolTip( _("Select a folder") );
- bSizer290->Add( m_buttonSelectSoundCompareDone, 0, wxEXPAND, 5 );
+ bSizer290->Add( m_buttonSelectSoundCompareDone, 0, wxEXPAND, 5 );
- m_bpButtonPlayCompareDone = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- bSizer290->Add( m_bpButtonPlayCompareDone, 0, wxEXPAND, 5 );
+ m_bpButtonPlayCompareDone = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ bSizer290->Add( m_bpButtonPlayCompareDone, 0, wxEXPAND, 5 );
- ffgSizer11->Add( bSizer290, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ ffgSizer11->Add( bSizer290, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_bitmapSyncDone = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- ffgSizer11->Add( m_bitmapSyncDone, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapSyncDone = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ ffgSizer11->Add( m_bitmapSyncDone, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText1711 = new wxStaticText( m_panel39, wxID_ANY, _("Synchronization finished:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1711->Wrap( -1 );
- m_staticText1711->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText1711 = new wxStaticText( m_panel39, wxID_ANY, _("Synchronization finished:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1711->Wrap( -1 );
+ m_staticText1711->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- ffgSizer11->Add( m_staticText1711, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ ffgSizer11->Add( m_staticText1711, 0, wxALIGN_CENTER_VERTICAL, 5 );
- wxBoxSizer* bSizer2901;
- bSizer2901 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer2901;
+ bSizer2901 = new wxBoxSizer( wxHORIZONTAL );
- m_textCtrlSoundPathSyncDone = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer2901->Add( m_textCtrlSoundPathSyncDone, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ m_textCtrlSoundPathSyncDone = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer2901->Add( m_textCtrlSoundPathSyncDone, 1, wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonSelectSoundSyncDone = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonSelectSoundSyncDone->SetToolTip( _("Select a folder") );
+ m_buttonSelectSoundSyncDone = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonSelectSoundSyncDone->SetToolTip( _("Select a folder") );
- bSizer2901->Add( m_buttonSelectSoundSyncDone, 0, wxEXPAND, 5 );
+ bSizer2901->Add( m_buttonSelectSoundSyncDone, 0, wxEXPAND, 5 );
- m_bpButtonPlaySyncDone = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- bSizer2901->Add( m_bpButtonPlaySyncDone, 0, wxEXPAND, 5 );
+ m_bpButtonPlaySyncDone = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ bSizer2901->Add( m_bpButtonPlaySyncDone, 0, wxEXPAND, 5 );
- ffgSizer11->Add( bSizer2901, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ ffgSizer11->Add( bSizer2901, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- bSizer301->Add( ffgSizer11, 1, wxALL, 5 );
+ bSizer301->Add( ffgSizer11, 1, wxALL, 5 );
- bSizer288->Add( bSizer301, 0, wxEXPAND, 5 );
+ bSizer288->Add( bSizer301, 0, wxEXPAND, 5 );
- bSizer166->Add( bSizer288, 0, wxEXPAND|wxALL, 5 );
+ bSizer166->Add( bSizer288, 0, wxEXPAND|wxALL, 5 );
- m_staticline3611 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer166->Add( m_staticline3611, 0, wxEXPAND, 5 );
+ m_staticline3611 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer166->Add( m_staticline3611, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer181;
- bSizer181 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer181;
+ bSizer181 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer289;
- bSizer289 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer289;
+ bSizer289 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer2991;
- bSizer2991 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer2991;
+ bSizer2991 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer2971;
- bSizer2971 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer2971;
+ bSizer2971 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapConsole = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer2971->Add( m_bitmapConsole, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bitmapConsole = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer2971->Add( m_bitmapConsole, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText85 = new wxStaticText( m_panel39, wxID_ANY, _("Customize context menu:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText85->Wrap( -1 );
- bSizer2971->Add( m_staticText85, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+ m_staticText85 = new wxStaticText( m_panel39, wxID_ANY, _("Customize context menu:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText85->Wrap( -1 );
+ bSizer2971->Add( m_staticText85, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
- bSizer2991->Add( bSizer2971, 0, 0, 5 );
+ bSizer2991->Add( bSizer2971, 0, 0, 5 );
- bSizer2991->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer2991->Add( 0, 0, 1, wxEXPAND, 5 );
- wxBoxSizer* bSizer193;
- bSizer193 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer193;
+ bSizer193 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonAddRow = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizer193->Add( m_bpButtonAddRow, 0, wxALIGN_BOTTOM, 5 );
+ m_bpButtonAddRow = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizer193->Add( m_bpButtonAddRow, 0, wxALIGN_BOTTOM, 5 );
- m_bpButtonRemoveRow = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
- bSizer193->Add( m_bpButtonRemoveRow, 0, wxALIGN_BOTTOM, 5 );
+ m_bpButtonRemoveRow = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 );
+ bSizer193->Add( m_bpButtonRemoveRow, 0, wxALIGN_BOTTOM, 5 );
- bSizer2991->Add( bSizer193, 0, 0, 5 );
+ bSizer2991->Add( bSizer193, 0, 0, 5 );
- bSizer289->Add( bSizer2991, 1, wxEXPAND, 5 );
+ bSizer289->Add( bSizer2991, 1, wxEXPAND, 5 );
- wxFlexGridSizer* fgSizer25;
- fgSizer25 = new wxFlexGridSizer( 0, 2, 0, 10 );
- fgSizer25->SetFlexibleDirection( wxBOTH );
- fgSizer25->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ wxFlexGridSizer* fgSizer25;
+ fgSizer25 = new wxFlexGridSizer( 0, 2, 0, 10 );
+ fgSizer25->SetFlexibleDirection( wxBOTH );
+ fgSizer25->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticText174 = new wxStaticText( m_panel39, wxID_ANY, _("%item_path%"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText174->Wrap( -1 );
- m_staticText174->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
- m_staticText174->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText174 = new wxStaticText( m_panel39, wxID_ANY, _("%item_path%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText174->Wrap( -1 );
+ m_staticText174->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
+ m_staticText174->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- fgSizer25->Add( m_staticText174, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer25->Add( m_staticText174, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText175 = new wxStaticText( m_panel39, wxID_ANY, _("Full file or folder path"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText175->Wrap( -1 );
- m_staticText175->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText175 = new wxStaticText( m_panel39, wxID_ANY, _("Full file or folder path"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText175->Wrap( -1 );
+ m_staticText175->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- fgSizer25->Add( m_staticText175, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer25->Add( m_staticText175, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText178 = new wxStaticText( m_panel39, wxID_ANY, _("%local_path%"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText178->Wrap( -1 );
- m_staticText178->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
- m_staticText178->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText178 = new wxStaticText( m_panel39, wxID_ANY, _("%local_path%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText178->Wrap( -1 );
+ m_staticText178->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
+ m_staticText178->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- fgSizer25->Add( m_staticText178, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer25->Add( m_staticText178, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText179 = new wxStaticText( m_panel39, wxID_ANY, _("Temporary local copy for SFTP and MTP storage"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText179->Wrap( -1 );
- m_staticText179->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText179 = new wxStaticText( m_panel39, wxID_ANY, _("Temporary local copy for SFTP and MTP storage"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText179->Wrap( -1 );
+ m_staticText179->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- fgSizer25->Add( m_staticText179, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer25->Add( m_staticText179, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText189 = new wxStaticText( m_panel39, wxID_ANY, _("%item_name%"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText189->Wrap( -1 );
- m_staticText189->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
- m_staticText189->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText189 = new wxStaticText( m_panel39, wxID_ANY, _("%item_name%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText189->Wrap( -1 );
+ m_staticText189->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
+ m_staticText189->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- fgSizer25->Add( m_staticText189, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer25->Add( m_staticText189, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText190 = new wxStaticText( m_panel39, wxID_ANY, _("File or folder name"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText190->Wrap( -1 );
- m_staticText190->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText190 = new wxStaticText( m_panel39, wxID_ANY, _("File or folder name"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText190->Wrap( -1 );
+ m_staticText190->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- fgSizer25->Add( m_staticText190, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer25->Add( m_staticText190, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText176 = new wxStaticText( m_panel39, wxID_ANY, _("%parent_path%"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText176->Wrap( -1 );
- m_staticText176->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
- m_staticText176->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText176 = new wxStaticText( m_panel39, wxID_ANY, _("%parent_path%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText176->Wrap( -1 );
+ m_staticText176->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
+ m_staticText176->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- fgSizer25->Add( m_staticText176, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer25->Add( m_staticText176, 0, wxALIGN_CENTER_VERTICAL, 5 );
- wxBoxSizer* bSizer298;
- bSizer298 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer298;
+ bSizer298 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText177 = new wxStaticText( m_panel39, wxID_ANY, _("Parent folder path"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText177->Wrap( -1 );
- m_staticText177->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+ m_staticText177 = new wxStaticText( m_panel39, wxID_ANY, _("Parent folder path"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText177->Wrap( -1 );
+ m_staticText177->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer298->Add( m_staticText177, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer298->Add( m_staticText177, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer298->Add( 0, 0, 1, 0, 5 );
+ bSizer298->Add( 0, 0, 1, 0, 5 );
- m_hyperlink17 = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("Show examples"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- bSizer298->Add( m_hyperlink17, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+ m_hyperlink17 = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("Show examples"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ bSizer298->Add( m_hyperlink17, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
- fgSizer25->Add( bSizer298, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ fgSizer25->Add( bSizer298, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- fgSizer25->Add( 0, 10, 0, 0, 5 );
+ fgSizer25->Add( 0, 10, 0, 0, 5 );
- fgSizer25->Add( 0, 0, 0, 0, 5 );
+ fgSizer25->Add( 0, 0, 0, 0, 5 );
- bSizer289->Add( fgSizer25, 0, wxLEFT, 5 );
+ bSizer289->Add( fgSizer25, 0, wxLEFT, 5 );
- bSizer181->Add( bSizer289, 0, wxEXPAND, 5 );
+ bSizer181->Add( bSizer289, 0, wxEXPAND, 5 );
- m_gridCustomCommand = new wxGrid( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_gridCustomCommand = new wxGrid( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- // Grid
- m_gridCustomCommand->CreateGrid( 3, 2 );
- m_gridCustomCommand->EnableEditing( true );
- m_gridCustomCommand->EnableGridLines( true );
- m_gridCustomCommand->EnableDragGridSize( false );
- m_gridCustomCommand->SetMargins( 0, 0 );
+ // Grid
+ m_gridCustomCommand->CreateGrid( 3, 2 );
+ m_gridCustomCommand->EnableEditing( true );
+ m_gridCustomCommand->EnableGridLines( true );
+ m_gridCustomCommand->EnableDragGridSize( false );
+ m_gridCustomCommand->SetMargins( 0, 0 );
- // Columns
- m_gridCustomCommand->EnableDragColMove( false );
- m_gridCustomCommand->EnableDragColSize( true );
- m_gridCustomCommand->SetColLabelSize( -1 );
- m_gridCustomCommand->SetColLabelValue( 0, _("Description") );
- m_gridCustomCommand->SetColLabelValue( 1, _("Command line") );
- m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
+ // Columns
+ m_gridCustomCommand->EnableDragColMove( false );
+ m_gridCustomCommand->EnableDragColSize( true );
+ m_gridCustomCommand->SetColLabelSize( -1 );
+ m_gridCustomCommand->SetColLabelValue( 0, _("Description") );
+ m_gridCustomCommand->SetColLabelValue( 1, _("Command line") );
+ m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
- // Rows
- m_gridCustomCommand->EnableDragRowSize( false );
- m_gridCustomCommand->SetRowLabelSize( 1 );
- m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
+ // Rows
+ m_gridCustomCommand->EnableDragRowSize( false );
+ m_gridCustomCommand->SetRowLabelSize( 1 );
+ m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
- // Label Appearance
+ // Label Appearance
- // Cell Defaults
- m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
- bSizer181->Add( m_gridCustomCommand, 1, wxEXPAND, 5 );
+ // Cell Defaults
+ m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+ bSizer181->Add( m_gridCustomCommand, 1, wxEXPAND, 5 );
- bSizer166->Add( bSizer181, 1, wxEXPAND|wxALL, 10 );
+ bSizer166->Add( bSizer181, 1, wxEXPAND|wxALL, 10 );
- m_panel39->SetSizer( bSizer166 );
- m_panel39->Layout();
- bSizer166->Fit( m_panel39 );
- bSizer95->Add( m_panel39, 1, wxEXPAND, 5 );
+ m_panel39->SetSizer( bSizer166 );
+ m_panel39->Layout();
+ bSizer166->Fit( m_panel39 );
+ bSizer95->Add( m_panel39, 1, wxEXPAND, 5 );
- m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer95->Add( m_staticline36, 0, wxEXPAND, 5 );
+ m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer95->Add( m_staticline36, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonDefault = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonDefault, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_buttonDefault = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonDefault, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizerStdButtons->Add( 0, 0, 1, 0, 5 );
+ bSizerStdButtons->Add( 0, 0, 1, 0, 5 );
- m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer95->Add( bSizerStdButtons, 0, wxEXPAND, 5 );
+ bSizer95->Add( bSizerStdButtons, 0, wxEXPAND, 5 );
- this->SetSizer( bSizer95 );
- this->Layout();
- bSizer95->Fit( this );
+ this->SetSizer( bSizer95 );
+ this->Layout();
+ bSizer95->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( OptionsDlgGenerated::OnClose ) );
- m_buttonRestoreDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnRestoreDialogs ), NULL, this );
- m_hyperlinkLogFolder->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( OptionsDlgGenerated::OnShowLogFolder ), NULL, this );
- m_checkBoxLogFilesMaxAge->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnToggleLogfilesLimit ), NULL, this );
- m_textCtrlSoundPathCompareDone->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::OnChangeSoundFilePath ), NULL, this );
- m_buttonSelectSoundCompareDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnSelectSoundCompareDone ), NULL, this );
- m_bpButtonPlayCompareDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnPlayCompareDone ), NULL, this );
- m_textCtrlSoundPathSyncDone->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::OnChangeSoundFilePath ), NULL, this );
- m_buttonSelectSoundSyncDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnSelectSoundSyncDone ), NULL, this );
- m_bpButtonPlaySyncDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnPlaySyncDone ), NULL, this );
- m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnAddRow ), NULL, this );
- m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnRemoveRow ), NULL, this );
- m_hyperlink17->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( OptionsDlgGenerated::OnHelpExternalApps ), NULL, this );
- m_buttonDefault->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnDefault ), NULL, this );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnOkay ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( OptionsDlgGenerated::OnClose ) );
+ m_buttonRestoreDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnRestoreDialogs ), NULL, this );
+ m_hyperlinkLogFolder->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( OptionsDlgGenerated::OnShowLogFolder ), NULL, this );
+ m_checkBoxLogFilesMaxAge->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnToggleLogfilesLimit ), NULL, this );
+ m_textCtrlSoundPathCompareDone->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::OnChangeSoundFilePath ), NULL, this );
+ m_buttonSelectSoundCompareDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnSelectSoundCompareDone ), NULL, this );
+ m_bpButtonPlayCompareDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnPlayCompareDone ), NULL, this );
+ m_textCtrlSoundPathSyncDone->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::OnChangeSoundFilePath ), NULL, this );
+ m_buttonSelectSoundSyncDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnSelectSoundSyncDone ), NULL, this );
+ m_bpButtonPlaySyncDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnPlaySyncDone ), NULL, this );
+ m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnAddRow ), NULL, this );
+ m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnRemoveRow ), NULL, this );
+ m_hyperlink17->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( OptionsDlgGenerated::OnHelpExternalApps ), NULL, this );
+ m_buttonDefault->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnDefault ), NULL, this );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnOkay ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::OnCancel ), NULL, this );
}
OptionsDlgGenerated::~OptionsDlgGenerated()
@@ -4808,22 +4845,22 @@ OptionsDlgGenerated::~OptionsDlgGenerated()
TooltipDlgGenerated::TooltipDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxHORIZONTAL );
+ 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_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 );
+ 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->SetSizer( bSizer158 );
+ this->Layout();
+ bSizer158->Fit( this );
}
TooltipDlgGenerated::~TooltipDlgGenerated()
@@ -4832,61 +4869,61 @@ TooltipDlgGenerated::~TooltipDlgGenerated()
SelectTimespanDlgGenerated::SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer96;
- bSizer96 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer96;
+ bSizer96 = new wxBoxSizer( wxVERTICAL );
- m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer98;
- bSizer98 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer98;
+ bSizer98 = new wxBoxSizer( wxHORIZONTAL );
- m_calendarFrom = new wxCalendarCtrl( m_panel35, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS|wxBORDER_NONE );
- bSizer98->Add( m_calendarFrom, 0, wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_calendarFrom = new wxCalendarCtrl( m_panel35, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS|wxBORDER_NONE );
+ bSizer98->Add( m_calendarFrom, 0, wxTOP|wxBOTTOM|wxLEFT, 10 );
- m_calendarTo = new wxCalendarCtrl( m_panel35, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS|wxBORDER_NONE );
- bSizer98->Add( m_calendarTo, 0, wxALL, 10 );
+ m_calendarTo = new wxCalendarCtrl( m_panel35, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS|wxBORDER_NONE );
+ bSizer98->Add( m_calendarTo, 0, wxALL, 10 );
- m_panel35->SetSizer( bSizer98 );
- m_panel35->Layout();
- bSizer98->Fit( m_panel35 );
- bSizer96->Add( m_panel35, 0, wxEXPAND, 5 );
+ m_panel35->SetSizer( bSizer98 );
+ m_panel35->Layout();
+ bSizer98->Fit( m_panel35 );
+ bSizer96->Add( m_panel35, 0, wxEXPAND, 5 );
- m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 );
+ m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- this->SetSizer( bSizer96 );
- this->Layout();
- bSizer96->Fit( this );
+ this->SetSizer( bSizer96 );
+ this->Layout();
+ bSizer96->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) );
- m_calendarFrom->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this );
- m_calendarTo->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) );
+ m_calendarFrom->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this );
+ m_calendarTo->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
}
SelectTimespanDlgGenerated::~SelectTimespanDlgGenerated()
@@ -4895,269 +4932,265 @@ SelectTimespanDlgGenerated::~SelectTimespanDlgGenerated()
AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer31;
- bSizer31 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer31;
+ bSizer31 = new wxBoxSizer( wxVERTICAL );
- m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer174;
- bSizer174 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer174;
+ bSizer174 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapLogoLeft = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer174->Add( m_bitmapLogoLeft, 0, wxBOTTOM, 5 );
+ m_bitmapLogoLeft = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer174->Add( m_bitmapLogoLeft, 0, wxBOTTOM, 5 );
- m_staticline81 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer174->Add( m_staticline81, 0, wxEXPAND, 5 );
+ m_staticline81 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer174->Add( m_staticline81, 0, wxEXPAND, 5 );
- bSizerMainSection = new wxBoxSizer( wxVERTICAL );
+ bSizerMainSection = new wxBoxSizer( wxVERTICAL );
- m_staticline82 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMainSection->Add( m_staticline82, 0, wxEXPAND, 5 );
+ m_staticline82 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMainSection->Add( m_staticline82, 0, wxEXPAND, 5 );
- m_bitmapLogo = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerMainSection->Add( m_bitmapLogo, 0, 0, 5 );
+ m_bitmapLogo = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerMainSection->Add( m_bitmapLogo, 0, 0, 5 );
- m_staticline341 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMainSection->Add( m_staticline341, 0, wxEXPAND, 5 );
+ m_staticline341 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMainSection->Add( m_staticline341, 0, wxEXPAND, 5 );
- m_staticTextVersion = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextVersion->Wrap( -1 );
- bSizerMainSection->Add( m_staticTextVersion, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ m_staticTextVersion = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextVersion->Wrap( -1 );
+ bSizerMainSection->Add( m_staticTextVersion, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- m_staticline3411 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMainSection->Add( m_staticline3411, 0, wxEXPAND, 5 );
+ m_staticline3411 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMainSection->Add( m_staticline3411, 0, wxEXPAND, 5 );
- m_panelDonate = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelDonate->SetBackgroundColour( wxColour( 153, 170, 187 ) );
+ m_panelDonate = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelDonate->SetBackgroundColour( wxColour( 153, 170, 187 ) );
- wxBoxSizer* bSizer183;
- bSizer183 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer183;
+ bSizer183 = new wxBoxSizer( wxVERTICAL );
- m_panel39 = new wxPanel( m_panelDonate, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel39->SetBackgroundColour( wxColour( 248, 248, 248 ) );
+ m_panel39 = new wxPanel( m_panelDonate, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel39->SetBackgroundColour( wxColour( 248, 248, 248 ) );
- wxBoxSizer* bSizer184;
- bSizer184 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer184;
+ bSizer184 = new wxBoxSizer( wxHORIZONTAL );
- bSizer184->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer184->Add( 0, 0, 1, wxEXPAND, 5 );
- m_bitmapDonate = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer184->Add( m_bitmapDonate, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_bitmapDonate = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer184->Add( m_bitmapDonate, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- wxBoxSizer* bSizer178;
- bSizer178 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer178;
+ bSizer178 = new wxBoxSizer( wxVERTICAL );
- m_staticTextDonate = new wxStaticText( m_panel39, wxID_ANY, _("If you like FreeFileSync:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDonate->Wrap( -1 );
- m_staticTextDonate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
- m_staticTextDonate->SetForegroundColour( wxColour( 0, 0, 0 ) );
+ m_staticTextDonate = new wxStaticText( m_panel39, wxID_ANY, _("If you like FreeFileSync:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDonate->Wrap( -1 );
+ m_staticTextDonate->SetForegroundColour( wxColour( 0, 0, 0 ) );
- bSizer178->Add( m_staticTextDonate, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer178->Add( m_staticTextDonate, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_buttonDonate = new wxButton( m_panel39, wxID_ANY, _("Support with a donation"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonDonate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- m_buttonDonate->SetToolTip( _("https://freefilesync.org/donate.php") );
+ m_buttonDonate = new wxButton( m_panel39, wxID_ANY, _("Support with a donation"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonDonate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonDonate->SetToolTip( _("https://freefilesync.org/donate.php") );
- bSizer178->Add( m_buttonDonate, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer178->Add( m_buttonDonate, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer184->Add( bSizer178, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ bSizer184->Add( bSizer178, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- bSizer184->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizer184->Add( 0, 0, 1, wxEXPAND, 5 );
- m_panel39->SetSizer( bSizer184 );
- m_panel39->Layout();
- bSizer184->Fit( m_panel39 );
- bSizer183->Add( m_panel39, 0, wxALL|wxEXPAND, 5 );
+ m_panel39->SetSizer( bSizer184 );
+ m_panel39->Layout();
+ bSizer184->Fit( m_panel39 );
+ bSizer183->Add( m_panel39, 0, wxALL|wxEXPAND, 5 );
- m_panelDonate->SetSizer( bSizer183 );
- m_panelDonate->Layout();
- bSizer183->Fit( m_panelDonate );
- bSizerMainSection->Add( m_panelDonate, 0, wxEXPAND|wxALL, 10 );
+ m_panelDonate->SetSizer( bSizer183 );
+ m_panelDonate->Layout();
+ bSizer183->Fit( m_panelDonate );
+ bSizerMainSection->Add( m_panelDonate, 0, wxEXPAND|wxALL, 10 );
- m_panelThankYou = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelThankYou->SetBackgroundColour( wxColour( 153, 170, 187 ) );
+ m_panelThankYou = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelThankYou->SetBackgroundColour( wxColour( 153, 170, 187 ) );
- wxBoxSizer* bSizer1831;
- bSizer1831 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer1831;
+ bSizer1831 = new wxBoxSizer( wxVERTICAL );
- m_panel391 = new wxPanel( m_panelThankYou, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel391->SetBackgroundColour( wxColour( 248, 248, 248 ) );
+ m_panel391 = new wxPanel( m_panelThankYou, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel391->SetBackgroundColour( wxColour( 248, 248, 248 ) );
- wxBoxSizer* bSizer243;
- bSizer243 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer243;
+ bSizer243 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer1841;
- bSizer1841 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer1841;
+ bSizer1841 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapThanks = new wxStaticBitmap( m_panel391, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer1841->Add( m_bitmapThanks, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_bitmapThanks = new wxStaticBitmap( m_panel391, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer1841->Add( m_bitmapThanks, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
- m_staticTextThanks = new wxStaticText( m_panel391, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextThanks->Wrap( -1 );
- m_staticTextThanks->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
- m_staticTextThanks->SetForegroundColour( wxColour( 0, 0, 0 ) );
+ m_staticTextThanks = new wxStaticText( m_panel391, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextThanks->Wrap( -1 );
+ m_staticTextThanks->SetForegroundColour( wxColour( 0, 0, 0 ) );
- bSizer1841->Add( m_staticTextThanks, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer1841->Add( m_staticTextThanks, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer243->Add( bSizer1841, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
+ bSizer243->Add( bSizer1841, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
- m_staticTextNoAutoUpdate = new wxStaticText( m_panel391, wxID_ANY, _("The auto updater was disabled by the administrator."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextNoAutoUpdate->Wrap( -1 );
- m_staticTextNoAutoUpdate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
+ m_staticTextNoAutoUpdate = new wxStaticText( m_panel391, wxID_ANY, _("The auto updater was disabled by the administrator."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextNoAutoUpdate->Wrap( -1 );
+ m_staticTextNoAutoUpdate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
- bSizer243->Add( m_staticTextNoAutoUpdate, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bSizer243->Add( m_staticTextNoAutoUpdate, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- m_buttonShowDonationDetails = new wxButton( m_panel391, wxID_ANY, _("Donation details"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonShowDonationDetails->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
+ m_buttonShowDonationDetails = new wxButton( m_panel391, wxID_ANY, _("Donation details"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer243->Add( m_buttonShowDonationDetails, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
- bSizer243->Add( m_buttonShowDonationDetails, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ m_panel391->SetSizer( bSizer243 );
+ m_panel391->Layout();
+ bSizer243->Fit( m_panel391 );
+ bSizer1831->Add( m_panel391, 0, wxEXPAND|wxALL, 5 );
- m_panel391->SetSizer( bSizer243 );
- m_panel391->Layout();
- bSizer243->Fit( m_panel391 );
- bSizer1831->Add( m_panel391, 0, wxEXPAND|wxALL, 5 );
+ m_panelThankYou->SetSizer( bSizer1831 );
+ m_panelThankYou->Layout();
+ bSizer1831->Fit( m_panelThankYou );
+ bSizerMainSection->Add( m_panelThankYou, 0, wxEXPAND|wxALL, 10 );
- m_panelThankYou->SetSizer( bSizer1831 );
- m_panelThankYou->Layout();
- bSizer1831->Fit( m_panelThankYou );
- bSizerMainSection->Add( m_panelThankYou, 0, wxEXPAND|wxALL, 10 );
+ m_staticline3412 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMainSection->Add( m_staticline3412, 0, wxEXPAND, 5 );
- m_staticline3412 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMainSection->Add( m_staticline3412, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer186;
+ bSizer186 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer186;
- bSizer186 = new wxBoxSizer( wxVERTICAL );
+ m_staticText94 = new wxStaticText( m_panel41, wxID_ANY, _("Feedback and suggestions are welcome:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText94->Wrap( -1 );
+ bSizer186->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
- m_staticText94 = new wxStaticText( m_panel41, wxID_ANY, _("Feedback and suggestions are welcome:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText94->Wrap( -1 );
- bSizer186->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
+ wxBoxSizer* bSizer289;
+ bSizer289 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer289;
- bSizer289 = new wxBoxSizer( wxHORIZONTAL );
+ m_bpButtonForum = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ m_bpButtonForum->SetToolTip( _("https://freefilesync.org/forum/") );
- m_bpButtonForum = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- m_bpButtonForum->SetToolTip( _("https://freefilesync.org/forum/") );
+ bSizer289->Add( m_bpButtonForum, 0, wxALL|wxEXPAND, 5 );
- bSizer289->Add( m_bpButtonForum, 0, wxALL|wxEXPAND, 5 );
+ wxBoxSizer* bSizer290;
+ bSizer290 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer290;
- bSizer290 = new wxBoxSizer( wxVERTICAL );
+ m_bpButtonHomepage = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ m_bpButtonHomepage->SetToolTip( _("https://freefilesync.org") );
- m_bpButtonHomepage = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- m_bpButtonHomepage->SetToolTip( _("https://freefilesync.org") );
+ bSizer290->Add( m_bpButtonHomepage, 1, wxTOP|wxRIGHT|wxEXPAND, 5 );
- bSizer290->Add( m_bpButtonHomepage, 1, wxTOP|wxRIGHT|wxEXPAND, 5 );
+ bSizer290->Add( 0, 5, 0, 0, 5 );
- bSizer290->Add( 0, 5, 0, 0, 5 );
+ m_bpButtonEmail = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ bSizer290->Add( m_bpButtonEmail, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
- m_bpButtonEmail = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- bSizer290->Add( m_bpButtonEmail, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
+ bSizer289->Add( bSizer290, 0, wxEXPAND, 5 );
- bSizer289->Add( bSizer290, 0, wxEXPAND, 5 );
+ bSizer186->Add( bSizer289, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer186->Add( bSizer289, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizerMainSection->Add( bSizer186, 0, wxALL|wxEXPAND, 5 );
- bSizerMainSection->Add( bSizer186, 0, wxALL|wxEXPAND, 5 );
+ m_staticline34 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMainSection->Add( m_staticline34, 0, wxEXPAND, 5 );
- m_staticline34 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMainSection->Add( m_staticline34, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer185;
+ bSizer185 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer185;
- bSizer185 = new wxBoxSizer( wxHORIZONTAL );
+ m_staticTextGpl = new wxStaticText( m_panel41, wxID_ANY, _("Published under the GNU General Public License:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextGpl->Wrap( -1 );
+ bSizer185->Add( m_staticTextGpl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_staticTextGpl = new wxStaticText( m_panel41, wxID_ANY, _("Published under the GNU General Public License:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextGpl->Wrap( -1 );
- bSizer185->Add( m_staticTextGpl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_bpButtonGpl = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
+ m_bpButtonGpl->SetToolTip( _("https://www.gnu.org/licenses/gpl-3.0") );
- m_bpButtonGpl = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
- m_bpButtonGpl->SetToolTip( _("https://www.gnu.org/licenses/gpl-3.0") );
+ bSizer185->Add( m_bpButtonGpl, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer185->Add( m_bpButtonGpl, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ bSizerMainSection->Add( bSizer185, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerMainSection->Add( bSizer185, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer174->Add( bSizerMainSection, 0, 0, 5 );
- bSizer174->Add( bSizerMainSection, 0, 0, 5 );
+ m_staticline37 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer174->Add( m_staticline37, 0, wxEXPAND, 5 );
- m_staticline37 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer174->Add( m_staticline37, 0, wxEXPAND, 5 );
+ wxBoxSizer* bSizer177;
+ bSizer177 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer177;
- bSizer177 = new wxBoxSizer( wxVERTICAL );
+ m_staticTextThanksForLoc = new wxStaticText( m_panel41, wxID_ANY, _("Many thanks for localization:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextThanksForLoc->Wrap( -1 );
+ bSizer177->Add( m_staticTextThanksForLoc, 0, wxALL, 5 );
- m_staticTextThanksForLoc = new wxStaticText( m_panel41, wxID_ANY, _("Many thanks for localization:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextThanksForLoc->Wrap( -1 );
- bSizer177->Add( m_staticTextThanksForLoc, 0, wxALL, 5 );
+ m_scrolledWindowTranslators = new wxScrolledWindow( m_panel41, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), wxVSCROLL );
+ m_scrolledWindowTranslators->SetScrollRate( 10, 10 );
+ m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- m_scrolledWindowTranslators = new wxScrolledWindow( m_panel41, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxVSCROLL );
- m_scrolledWindowTranslators->SetScrollRate( 10, 10 );
- m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ fgSizerTranslators = new wxFlexGridSizer( 0, 2, 2, 10 );
+ fgSizerTranslators->SetFlexibleDirection( wxBOTH );
+ fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- fgSizerTranslators = new wxFlexGridSizer( 0, 2, 2, 10 );
- fgSizerTranslators->SetFlexibleDirection( wxBOTH );
- fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ m_scrolledWindowTranslators->SetSizer( fgSizerTranslators );
+ m_scrolledWindowTranslators->Layout();
+ fgSizerTranslators->Fit( m_scrolledWindowTranslators );
+ bSizer177->Add( m_scrolledWindowTranslators, 1, wxEXPAND|wxLEFT, 5 );
- m_scrolledWindowTranslators->SetSizer( fgSizerTranslators );
- m_scrolledWindowTranslators->Layout();
- fgSizerTranslators->Fit( m_scrolledWindowTranslators );
- bSizer177->Add( m_scrolledWindowTranslators, 1, wxEXPAND|wxLEFT, 5 );
+ bSizer174->Add( bSizer177, 0, wxEXPAND|wxLEFT, 5 );
- bSizer174->Add( bSizer177, 0, wxEXPAND|wxLEFT, 5 );
+ m_panel41->SetSizer( bSizer174 );
+ m_panel41->Layout();
+ bSizer174->Fit( m_panel41 );
+ bSizer31->Add( m_panel41, 0, wxEXPAND, 5 );
- m_panel41->SetSizer( bSizer174 );
- m_panel41->Layout();
- bSizer174->Fit( m_panel41 );
- bSizer31->Add( m_panel41, 0, wxEXPAND, 5 );
+ m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer31->Add( m_staticline36, 0, wxEXPAND, 5 );
- m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline36, 0, wxEXPAND, 5 );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonClose->SetDefault();
+ bSizerStdButtons->Add( m_buttonClose, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonClose->SetDefault();
- bSizerStdButtons->Add( m_buttonClose, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer31->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- bSizer31->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ this->SetSizer( bSizer31 );
+ this->Layout();
+ bSizer31->Fit( this );
- this->SetSizer( bSizer31 );
- this->Layout();
- bSizer31->Fit( this );
+ this->Centre( wxBOTH );
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
- m_buttonDonate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnDonate ), NULL, this );
- m_buttonShowDonationDetails->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnShowDonationDetails ), NULL, this );
- m_bpButtonForum->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOpenForum ), NULL, this );
- m_bpButtonHomepage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOpenHomepage ), NULL, this );
- m_bpButtonEmail->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnSendEmail ), NULL, this );
- m_bpButtonGpl->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnShowGpl ), NULL, this );
- m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
+ m_buttonDonate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnDonate ), NULL, this );
+ m_buttonShowDonationDetails->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnShowDonationDetails ), NULL, this );
+ m_bpButtonForum->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOpenForum ), NULL, this );
+ m_bpButtonHomepage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOpenHomepage ), NULL, this );
+ m_bpButtonEmail->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnSendEmail ), NULL, this );
+ m_bpButtonGpl->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnShowGpl ), NULL, this );
+ m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
}
AboutDlgGenerated::~AboutDlgGenerated()
@@ -5166,61 +5199,61 @@ AboutDlgGenerated::~AboutDlgGenerated()
DownloadProgressDlgGenerated::DownloadProgressDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapDownloading = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer72->Add( m_bitmapDownloading, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_bitmapDownloading = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer72->Add( m_bitmapDownloading, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
- m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextHeader->Wrap( -1 );
- bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+ m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
- bSizer72->Add( 20, 0, 0, 0, 5 );
+ bSizer72->Add( 20, 0, 0, 0, 5 );
- bSizer24->Add( bSizer72, 0, 0, 5 );
+ bSizer24->Add( bSizer72, 0, 0, 5 );
- wxBoxSizer* bSizer212;
- bSizer212 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer212;
+ bSizer212 = new wxBoxSizer( wxVERTICAL );
- m_gaugeProgress = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
- m_gaugeProgress->SetValue( 0 );
- bSizer212->Add( m_gaugeProgress, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+ m_gaugeProgress = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
+ m_gaugeProgress->SetValue( 0 );
+ bSizer212->Add( m_gaugeProgress, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
- m_staticTextDetails = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDetails->Wrap( -1 );
- bSizer212->Add( m_staticTextDetails, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ m_staticTextDetails = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDetails->Wrap( -1 );
+ bSizer212->Add( m_staticTextDetails, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- bSizer24->Add( bSizer212, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bSizer24->Add( bSizer212, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 );
+ m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonCancel->SetDefault();
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ m_buttonCancel->SetDefault();
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizer24->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer24->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- this->SetSizer( bSizer24 );
- this->Layout();
- bSizer24->Fit( this );
+ this->SetSizer( bSizer24 );
+ this->Layout();
+ bSizer24->Fit( this );
- // Connect Events
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DownloadProgressDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DownloadProgressDlgGenerated::OnCancel ), NULL, this );
}
DownloadProgressDlgGenerated::~DownloadProgressDlgGenerated()
@@ -5229,183 +5262,181 @@ DownloadProgressDlgGenerated::~DownloadProgressDlgGenerated()
ActivationDlgGenerated::ActivationDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer54;
- bSizer54 = new wxBoxSizer( wxVERTICAL );
+ this->SetSizeHints( wxSize( -1, -1 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ wxBoxSizer* bSizer54;
+ bSizer54 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxVERTICAL );
+ m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer165;
- bSizer165 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxVERTICAL );
- m_bitmapActivation = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizer165->Add( m_bitmapActivation, 0, wxALL, 10 );
+ wxBoxSizer* bSizer165;
+ bSizer165 = new wxBoxSizer( wxHORIZONTAL );
+ m_bitmapActivation = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer165->Add( m_bitmapActivation, 0, wxALL, 10 );
- bSizer165->Add( 0, 120, 0, 0, 5 );
- wxBoxSizer* bSizer16;
- bSizer16 = new wxBoxSizer( wxVERTICAL );
+ bSizer165->Add( 0, 120, 0, 0, 5 );
+ wxBoxSizer* bSizer16;
+ bSizer16 = new wxBoxSizer( wxVERTICAL );
- bSizer16->Add( 0, 10, 0, 0, 5 );
- m_textCtrlLastError = new wxTextCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE );
- bSizer16->Add( m_textCtrlLastError, 1, wxEXPAND, 5 );
+ bSizer16->Add( 0, 10, 0, 0, 5 );
+ m_textCtrlLastError = new wxTextCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE );
+ bSizer16->Add( m_textCtrlLastError, 1, wxEXPAND, 5 );
- bSizer16->Add( 0, 5, 0, 0, 5 );
+ bSizer16->Add( 0, 5, 0, 0, 5 );
- bSizer165->Add( bSizer16, 1, wxEXPAND, 5 );
+ bSizer165->Add( bSizer16, 1, wxEXPAND, 5 );
- bSizer172->Add( bSizer165, 1, wxEXPAND, 5 );
- m_staticTextMain = new wxStaticText( m_panel35, wxID_ANY, _("Activate the FreeFileSync Donation Edition by one of the following methods:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMain->Wrap( -1 );
- bSizer172->Add( m_staticTextMain, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
+ bSizer172->Add( bSizer165, 1, wxEXPAND, 5 );
+ m_staticTextMain = new wxStaticText( m_panel35, wxID_ANY, _("Activate the FreeFileSync Donation Edition by one of the following methods:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMain->Wrap( -1 );
+ bSizer172->Add( m_staticTextMain, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 );
- m_panel35->SetSizer( bSizer172 );
- m_panel35->Layout();
- bSizer172->Fit( m_panel35 );
- bSizer54->Add( m_panel35, 1, wxEXPAND, 5 );
- m_staticline181 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline181, 0, wxEXPAND|wxBOTTOM, 5 );
+ m_panel35->SetSizer( bSizer172 );
+ m_panel35->Layout();
+ bSizer172->Fit( m_panel35 );
+ bSizer54->Add( m_panel35, 1, wxEXPAND, 5 );
- m_staticline18111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline18111, 0, wxEXPAND|wxTOP, 5 );
+ m_staticline181 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline181, 0, wxEXPAND|wxBOTTOM, 5 );
- m_panel3511 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel3511->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_staticline18111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline18111, 0, wxEXPAND|wxTOP, 5 );
- wxBoxSizer* bSizer263;
- bSizer263 = new wxBoxSizer( wxVERTICAL );
+ m_panel3511 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel3511->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer234;
- bSizer234 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer263;
+ bSizer263 = new wxBoxSizer( wxVERTICAL );
- m_staticTextMain1 = new wxStaticText( m_panel3511, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMain1->Wrap( -1 );
- bSizer234->Add( m_staticTextMain1, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+ wxBoxSizer* bSizer234;
+ bSizer234 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText136 = new wxStaticText( m_panel3511, wxID_ANY, _("Activate via internet now:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText136->Wrap( -1 );
- bSizer234->Add( m_staticText136, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_staticTextMain1 = new wxStaticText( m_panel3511, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMain1->Wrap( -1 );
+ bSizer234->Add( m_staticTextMain1, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonActivateOnline = new wxButton( m_panel3511, wxID_ANY, _("Activate online"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_staticText136 = new wxStaticText( m_panel3511, wxID_ANY, _("Activate via internet now:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText136->Wrap( -1 );
+ bSizer234->Add( m_staticText136, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- m_buttonActivateOnline->SetDefault();
- m_buttonActivateOnline->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonActivateOnline = new wxButton( m_panel3511, wxID_ANY, _("Activate online"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- bSizer234->Add( m_buttonActivateOnline, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_buttonActivateOnline->SetDefault();
+ m_buttonActivateOnline->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ bSizer234->Add( m_buttonActivateOnline, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer263->Add( bSizer234, 0, wxEXPAND|wxALL, 10 );
+ bSizer263->Add( bSizer234, 0, wxEXPAND|wxALL, 10 );
- m_panel3511->SetSizer( bSizer263 );
- m_panel3511->Layout();
- bSizer263->Fit( m_panel3511 );
- bSizer54->Add( m_panel3511, 0, wxEXPAND, 5 );
- m_staticline181111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline181111, 0, wxEXPAND|wxBOTTOM, 5 );
+ m_panel3511->SetSizer( bSizer263 );
+ m_panel3511->Layout();
+ bSizer263->Fit( m_panel3511 );
+ bSizer54->Add( m_panel3511, 0, wxEXPAND, 5 );
- m_staticline181112 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline181112, 0, wxEXPAND|wxTOP, 5 );
+ m_staticline181111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline181111, 0, wxEXPAND|wxBOTTOM, 5 );
- m_panel351 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel351->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_staticline181112 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline181112, 0, wxEXPAND|wxTOP, 5 );
- wxBoxSizer* bSizer266;
- bSizer266 = new wxBoxSizer( wxVERTICAL );
+ m_panel351 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel351->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer237;
- bSizer237 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer266;
+ bSizer266 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer236;
- bSizer236 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer237;
+ bSizer237 = new wxBoxSizer( wxVERTICAL );
- m_staticText175 = new wxStaticText( m_panel351, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText175->Wrap( -1 );
- bSizer236->Add( m_staticText175, 0, wxRIGHT|wxALIGN_BOTTOM, 5 );
+ wxBoxSizer* bSizer236;
+ bSizer236 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText1361 = new wxStaticText( m_panel351, wxID_ANY, _("Retrieve an offline activation key from the following URL:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1361->Wrap( -1 );
- bSizer236->Add( m_staticText1361, 1, wxRIGHT|wxALIGN_BOTTOM, 5 );
+ m_staticText175 = new wxStaticText( m_panel351, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText175->Wrap( -1 );
+ bSizer236->Add( m_staticText175, 0, wxRIGHT|wxALIGN_BOTTOM, 5 );
- m_buttonCopyUrl = new wxButton( m_panel351, wxID_ANY, _("&Copy to clipboard"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonCopyUrl->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
+ m_staticText1361 = new wxStaticText( m_panel351, wxID_ANY, _("Retrieve an offline activation key from the following URL:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1361->Wrap( -1 );
+ bSizer236->Add( m_staticText1361, 1, wxRIGHT|wxALIGN_BOTTOM, 5 );
- bSizer236->Add( m_buttonCopyUrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_buttonCopyUrl = new wxButton( m_panel351, wxID_ANY, _("&Copy to clipboard"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizer236->Add( m_buttonCopyUrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer237->Add( bSizer236, 0, wxEXPAND|wxBOTTOM, 5 );
+ bSizer237->Add( bSizer236, 0, wxEXPAND|wxBOTTOM, 5 );
- m_textCtrlManualActivationUrl = new wxTextCtrl( m_panel351, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,55 ), wxTE_MULTILINE|wxTE_READONLY );
- bSizer237->Add( m_textCtrlManualActivationUrl, 0, wxEXPAND|wxBOTTOM, 5 );
+ m_textCtrlManualActivationUrl = new wxTextCtrl( m_panel351, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, 55 ), wxTE_MULTILINE|wxTE_READONLY );
+ bSizer237->Add( m_textCtrlManualActivationUrl, 0, wxEXPAND|wxBOTTOM, 5 );
- wxBoxSizer* bSizer235;
- bSizer235 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer235;
+ bSizer235 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText13611 = new wxStaticText( m_panel351, wxID_ANY, _("Enter activation key:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText13611->Wrap( -1 );
- bSizer235->Add( m_staticText13611, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_staticText13611 = new wxStaticText( m_panel351, wxID_ANY, _("Enter activation key:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText13611->Wrap( -1 );
+ bSizer235->Add( m_staticText13611, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- m_textCtrlOfflineActivationKey = new wxTextCtrl( m_panel351, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 250,-1 ), wxTE_PROCESS_ENTER );
- bSizer235->Add( m_textCtrlOfflineActivationKey, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ m_textCtrlOfflineActivationKey = new wxTextCtrl( m_panel351, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 250, -1 ), wxTE_PROCESS_ENTER );
+ bSizer235->Add( m_textCtrlOfflineActivationKey, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
- m_buttonActivateOffline = new wxButton( m_panel351, wxID_ANY, _("Activate offline"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonActivateOffline->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonActivateOffline = new wxButton( m_panel351, wxID_ANY, _("Activate offline"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_buttonActivateOffline->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizer235->Add( m_buttonActivateOffline, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer235->Add( m_buttonActivateOffline, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer237->Add( bSizer235, 0, wxEXPAND|wxTOP, 5 );
+ bSizer237->Add( bSizer235, 0, wxEXPAND|wxTOP, 5 );
- bSizer266->Add( bSizer237, 0, wxALL|wxEXPAND, 10 );
+ bSizer266->Add( bSizer237, 0, wxALL|wxEXPAND, 10 );
- m_panel351->SetSizer( bSizer266 );
- m_panel351->Layout();
- bSizer266->Fit( m_panel351 );
- bSizer54->Add( m_panel351, 0, wxEXPAND, 5 );
+ m_panel351->SetSizer( bSizer266 );
+ m_panel351->Layout();
+ bSizer266->Fit( m_panel351 );
+ bSizer54->Add( m_panel351, 0, wxEXPAND, 5 );
- m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 );
+ m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer54->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer54->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- this->SetSizer( bSizer54 );
- this->Layout();
- bSizer54->Fit( this );
+ this->SetSizer( bSizer54 );
+ this->Layout();
+ bSizer54->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ActivationDlgGenerated::OnClose ) );
- m_buttonActivateOnline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::OnActivateOnline ), NULL, this );
- m_buttonCopyUrl->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::OnCopyUrl ), NULL, this );
- m_textCtrlOfflineActivationKey->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ActivationDlgGenerated::OnOfflineActivationEnter ), NULL, this );
- m_buttonActivateOffline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::OnActivateOffline ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ActivationDlgGenerated::OnClose ) );
+ m_buttonActivateOnline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::OnActivateOnline ), NULL, this );
+ m_buttonCopyUrl->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::OnCopyUrl ), NULL, this );
+ m_textCtrlOfflineActivationKey->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ActivationDlgGenerated::OnOfflineActivationEnter ), NULL, this );
+ m_buttonActivateOffline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::OnActivateOffline ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::OnCancel ), NULL, this );
}
ActivationDlgGenerated::~ActivationDlgGenerated()
@@ -5414,66 +5445,66 @@ ActivationDlgGenerated::~ActivationDlgGenerated()
CfgHighlightDlgGenerated::CfgHighlightDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer96;
- bSizer96 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer96;
+ bSizer96 = new wxBoxSizer( wxVERTICAL );
- m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer98;
- bSizer98 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer98;
+ bSizer98 = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer238;
- bSizer238 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer238;
+ bSizer238 = new wxBoxSizer( wxVERTICAL );
- m_staticTextHighlight = new wxStaticText( m_panel35, wxID_ANY, _("Highlight configurations that have not been run for more than the following number of days:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextHighlight->Wrap( -1 );
- bSizer238->Add( m_staticTextHighlight, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_staticTextHighlight = new wxStaticText( m_panel35, wxID_ANY, _("Highlight configurations that have not been run for more than the following number of days:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHighlight->Wrap( -1 );
+ bSizer238->Add( m_staticTextHighlight, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_spinCtrlOverdueDays = new wxSpinCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer238->Add( m_spinCtrlOverdueDays, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_spinCtrlOverdueDays = new wxSpinCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer238->Add( m_spinCtrlOverdueDays, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer98->Add( bSizer238, 1, wxALL|wxEXPAND, 5 );
+ bSizer98->Add( bSizer238, 1, wxALL|wxEXPAND, 5 );
- m_panel35->SetSizer( bSizer98 );
- m_panel35->Layout();
- bSizer98->Fit( m_panel35 );
- bSizer96->Add( m_panel35, 0, 0, 5 );
+ m_panel35->SetSizer( bSizer98 );
+ m_panel35->Layout();
+ bSizer98->Fit( m_panel35 );
+ bSizer96->Add( m_panel35, 0, 0, 5 );
- m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 );
+ m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
- bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- this->SetSizer( bSizer96 );
- this->Layout();
- bSizer96->Fit( this );
+ this->SetSizer( bSizer96 );
+ this->Layout();
+ bSizer96->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CfgHighlightDlgGenerated::OnClose ) );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CfgHighlightDlgGenerated::OnOkay ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CfgHighlightDlgGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CfgHighlightDlgGenerated::OnClose ) );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CfgHighlightDlgGenerated::OnOkay ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CfgHighlightDlgGenerated::OnCancel ), NULL, this );
}
CfgHighlightDlgGenerated::~CfgHighlightDlgGenerated()
@@ -5482,112 +5513,112 @@ CfgHighlightDlgGenerated::~CfgHighlightDlgGenerated()
WarnAccessRightsMissingDlgGenerated::WarnAccessRightsMissingDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxSize( -1, -1 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer330;
- bSizer330 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer330;
+ bSizer330 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapGrantAccess = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer330->Add( m_bitmapGrantAccess, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ m_bitmapGrantAccess = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer330->Add( m_bitmapGrantAccess, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
- wxBoxSizer* bSizer95;
- bSizer95 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer95;
+ bSizer95 = new wxBoxSizer( wxVERTICAL );
- m_staticTextDescr = new wxStaticText( this, wxID_ANY, _("FreeFileSync requires access rights to avoid \"Operation not permitted\" errors when synchronizing your data (e.g. Mail, Messages, Calendars)."), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextDescr->Wrap( -1 );
- bSizer95->Add( m_staticTextDescr, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+ m_staticTextDescr = new wxStaticText( this, wxID_ANY, _("FreeFileSync requires access rights to avoid \"Operation not permitted\" errors when synchronizing your data (e.g. Mail, Messages, Calendars)."), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_staticTextDescr->Wrap( -1 );
+ bSizer95->Add( m_staticTextDescr, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
- m_staticline20 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer95->Add( m_staticline20, 0, wxEXPAND, 5 );
+ m_staticline20 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer95->Add( m_staticline20, 0, wxEXPAND, 5 );
- m_panel39 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel39->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel39 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel39->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer166;
- bSizer166 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer166;
+ bSizer166 = new wxBoxSizer( wxVERTICAL );
- ffgSizer11 = new wxFlexGridSizer( 0, 2, 5, 5 );
- ffgSizer11->SetFlexibleDirection( wxBOTH );
- ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ ffgSizer11 = new wxFlexGridSizer( 0, 2, 5, 5 );
+ ffgSizer11->SetFlexibleDirection( wxBOTH );
+ ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticTextStep1 = new wxStaticText( m_panel39, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStep1->Wrap( -1 );
- ffgSizer11->Add( m_staticTextStep1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticTextStep1 = new wxStaticText( m_panel39, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStep1->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextStep1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_buttonLocateBundle = new wxButton( m_panel39, wxID_ANY, _("Locate the FreeFileSync app"), wxDefaultPosition, wxDefaultSize, 0 );
- ffgSizer11->Add( m_buttonLocateBundle, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ m_buttonLocateBundle = new wxButton( m_panel39, wxID_ANY, _("Locate the FreeFileSync app"), wxDefaultPosition, wxDefaultSize, 0 );
+ ffgSizer11->Add( m_buttonLocateBundle, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_staticTextStep2 = new wxStaticText( m_panel39, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStep2->Wrap( -1 );
- ffgSizer11->Add( m_staticTextStep2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticTextStep2 = new wxStaticText( m_panel39, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStep2->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextStep2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_buttonOpenSecurity = new wxButton( m_panel39, wxID_ANY, _("Open Security && Privacy"), wxDefaultPosition, wxDefaultSize, 0 );
- ffgSizer11->Add( m_buttonOpenSecurity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ m_buttonOpenSecurity = new wxButton( m_panel39, wxID_ANY, _("Open Security && Privacy"), wxDefaultPosition, wxDefaultSize, 0 );
+ ffgSizer11->Add( m_buttonOpenSecurity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_staticTextStep3 = new wxStaticText( m_panel39, wxID_ANY, _("3."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStep3->Wrap( -1 );
- ffgSizer11->Add( m_staticTextStep3, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticTextStep3 = new wxStaticText( m_panel39, wxID_ANY, _("3."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStep3->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextStep3, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_staticTextAllowChanges = new wxStaticText( m_panel39, wxID_ANY, _("Click the lock to allow changes."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextAllowChanges->Wrap( -1 );
- ffgSizer11->Add( m_staticTextAllowChanges, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextAllowChanges = new wxStaticText( m_panel39, wxID_ANY, _("Click the lock to allow changes."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAllowChanges->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextAllowChanges, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextStep4 = new wxStaticText( m_panel39, wxID_ANY, _("4."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStep4->Wrap( -1 );
- ffgSizer11->Add( m_staticTextStep4, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticTextStep4 = new wxStaticText( m_panel39, wxID_ANY, _("4."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStep4->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextStep4, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_staticTextGrantAccess = new wxStaticText( m_panel39, wxID_ANY, _("Drag FreeFileSync into the panel."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextGrantAccess->Wrap( -1 );
- ffgSizer11->Add( m_staticTextGrantAccess, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_staticTextGrantAccess = new wxStaticText( m_panel39, wxID_ANY, _("Drag FreeFileSync into the panel."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextGrantAccess->Wrap( -1 );
+ ffgSizer11->Add( m_staticTextGrantAccess, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer166->Add( ffgSizer11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10 );
+ bSizer166->Add( ffgSizer11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10 );
- m_panel39->SetSizer( bSizer166 );
- m_panel39->Layout();
- bSizer166->Fit( m_panel39 );
- bSizer95->Add( m_panel39, 1, wxEXPAND, 5 );
+ m_panel39->SetSizer( bSizer166 );
+ m_panel39->Layout();
+ bSizer166->Fit( m_panel39 );
+ bSizer95->Add( m_panel39, 1, wxEXPAND, 5 );
- m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer95->Add( m_staticline36, 0, wxEXPAND, 5 );
+ m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer95->Add( m_staticline36, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxVERTICAL );
- m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("&Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer25->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("&Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer25->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- m_buttonClose->SetDefault();
- bSizerStdButtons->Add( m_buttonClose, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_buttonClose->SetDefault();
+ bSizerStdButtons->Add( m_buttonClose, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizer25->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer25->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- bSizer95->Add( bSizer25, 0, wxEXPAND, 5 );
+ bSizer95->Add( bSizer25, 0, wxEXPAND, 5 );
- bSizer330->Add( bSizer95, 1, wxEXPAND, 5 );
+ bSizer330->Add( bSizer95, 1, wxEXPAND, 5 );
- this->SetSizer( bSizer330 );
- this->Layout();
- bSizer330->Fit( this );
+ this->SetSizer( bSizer330 );
+ this->Layout();
+ bSizer330->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarnAccessRightsMissingDlgGenerated::OnClose ) );
- m_buttonLocateBundle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::OnShowAppBundle ), NULL, this );
- m_buttonOpenSecurity->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::OnOpenSecuritySettings ), NULL, this );
- m_checkBoxDontShowAgain->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::OnCheckBoxClick ), NULL, this );
- m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::OnOK ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarnAccessRightsMissingDlgGenerated::OnClose ) );
+ m_buttonLocateBundle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::OnShowAppBundle ), NULL, this );
+ m_buttonOpenSecurity->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::OnOpenSecuritySettings ), NULL, this );
+ m_checkBoxDontShowAgain->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::OnCheckBoxClick ), NULL, this );
+ m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::OnOK ), NULL, this );
}
WarnAccessRightsMissingDlgGenerated::~WarnAccessRightsMissingDlgGenerated()
diff --git a/FreeFileSync/Source/ui/gui_generated.h b/FreeFileSync/Source/ui/gui_generated.h
index 29c620a0..93a3fa24 100644
--- a/FreeFileSync/Source/ui/gui_generated.h
+++ b/FreeFileSync/Source/ui/gui_generated.h
@@ -39,13 +39,13 @@
#include <wx/checkbox.h>
#include <wx/frame.h>
#include <wx/listbox.h>
-#include <wx/tglbtn.h>
#include <wx/radiobut.h>
#include <wx/hyperlink.h>
#include <wx/spinctrl.h>
#include <wx/choice.h>
#include <wx/notebook.h>
#include <wx/dialog.h>
+#include <wx/tglbtn.h>
#include <wx/treectrl.h>
#include <wx/grid.h>
#include <wx/calctrl.h>
@@ -61,224 +61,224 @@
///////////////////////////////////////////////////////////////////////////////
class MainDialogGenerated : public wxFrame
{
- private:
-
- protected:
- wxMenuBar* m_menubar;
- wxMenu* m_menuFile;
- wxMenuItem* m_menuItemNew;
- wxMenuItem* m_menuItemLoad;
- wxMenuItem* m_menuItemSave;
- wxMenuItem* m_menuItemSaveAs;
- wxMenuItem* m_menuItemSaveAsBatch;
- wxMenuItem* m_menuItemQuit;
- wxMenu* m_menu4;
- wxMenuItem* m_menuItemShowLog;
- wxMenuItem* m_menuItemCompare;
- wxMenuItem* m_menuItemCompSettings;
- wxMenuItem* m_menuItemFilter;
- wxMenuItem* m_menuItemSyncSettings;
- wxMenuItem* m_menuItemSynchronize;
- wxMenu* m_menuTools;
- wxMenuItem* m_menuItemOptions;
- wxMenu* m_menuLanguages;
- wxMenuItem* m_menuItemFind;
- wxMenuItem* m_menuItemExportList;
- wxMenuItem* m_menuItemShowMain;
- wxMenuItem* m_menuItemShowFolders;
- wxMenuItem* m_menuItemShowViewFilter;
- wxMenuItem* m_menuItemShowConfig;
- wxMenuItem* m_menuItemShowOverview;
- wxMenu* m_menuHelp;
- wxMenuItem* m_menuItemHelp;
- wxMenuItem* m_menuItemCheckVersionNow;
- wxMenuItem* m_menuItemCheckVersionAuto;
- wxMenuItem* m_menuItemAbout;
- wxBoxSizer* bSizerPanelHolder;
- wxPanel* m_panelTopButtons;
- wxBoxSizer* bSizerTopButtons;
- wxButton* m_buttonCancel;
- zen::BitmapTextButton* m_buttonCompare;
- wxBitmapButton* m_bpButtonCmpConfig;
- wxBitmapButton* m_bpButtonCmpContext;
- wxBitmapButton* m_bpButtonFilter;
- wxBitmapButton* m_bpButtonFilterContext;
- wxBitmapButton* m_bpButtonSyncConfig;
- wxBitmapButton* m_bpButtonSyncContext;
- zen::BitmapTextButton* m_buttonSync;
- wxPanel* m_panelDirectoryPairs;
- wxStaticText* m_staticTextResolvedPathL;
- wxBitmapButton* m_bpButtonAddPair;
- wxButton* m_buttonSelectFolderLeft;
- wxPanel* m_panelTopCenter;
- wxBitmapButton* m_bpButtonSwapSides;
- wxStaticText* m_staticTextResolvedPathR;
- wxButton* m_buttonSelectFolderRight;
- wxScrolledWindow* m_scrolledWindowFolderPairs;
- wxBoxSizer* bSizerAddFolderPairs;
- zen::Grid* m_gridOverview;
- wxPanel* m_panelCenter;
- fff::TripleSplitter* m_splitterMain;
- zen::Grid* m_gridMainL;
- zen::Grid* m_gridMainC;
- zen::Grid* m_gridMainR;
- wxPanel* m_panelStatusBar;
- wxBoxSizer* bSizerFileStatus;
- wxBoxSizer* bSizerStatusLeft;
- wxBoxSizer* bSizerStatusLeftDirectories;
- wxStaticBitmap* m_bitmapSmallDirectoryLeft;
- wxStaticText* m_staticTextStatusLeftDirs;
- wxBoxSizer* bSizerStatusLeftFiles;
- wxStaticBitmap* m_bitmapSmallFileLeft;
- wxStaticText* m_staticTextStatusLeftFiles;
- wxStaticText* m_staticTextStatusLeftBytes;
- wxStaticLine* m_staticline9;
- wxStaticText* m_staticTextStatusCenter;
- wxBoxSizer* bSizerStatusRight;
- wxStaticLine* m_staticline10;
- wxBoxSizer* bSizerStatusRightDirectories;
- wxStaticBitmap* m_bitmapSmallDirectoryRight;
- wxStaticText* m_staticTextStatusRightDirs;
- wxBoxSizer* bSizerStatusRightFiles;
- wxStaticBitmap* m_bitmapSmallFileRight;
- wxStaticText* m_staticTextStatusRightFiles;
- wxStaticText* m_staticTextStatusRightBytes;
- wxStaticText* m_staticTextFullStatus;
- wxPanel* m_panelSearch;
- wxBitmapButton* m_bpButtonHideSearch;
- wxStaticText* m_staticText101;
- wxTextCtrl* m_textCtrlSearchTxt;
- wxCheckBox* m_checkBoxMatchCase;
- wxPanel* m_panelLog;
- wxBoxSizer* bSizerLog;
- wxBoxSizer* bSizer42;
- wxFlexGridSizer* ffgSizer11;
- wxFlexGridSizer* ffgSizer111;
- wxFlexGridSizer* ffgSizer112;
- wxStaticLine* m_staticline70;
- wxPanel* m_panelConfig;
- wxBoxSizer* bSizerConfig;
- wxBoxSizer* bSizerCfgHistoryButtons;
- wxBitmapButton* m_bpButtonNew;
- wxStaticText* m_staticText951;
- wxBitmapButton* m_bpButtonOpen;
- wxStaticText* m_staticText95;
- wxBitmapButton* m_bpButtonSave;
- wxStaticText* m_staticText961;
- wxBitmapButton* m_bpButtonSaveAs;
- wxBitmapButton* m_bpButtonSaveAsBatch;
- wxStaticText* m_staticText97;
- zen::Grid* m_gridCfgHistory;
- wxPanel* m_panelViewFilter;
- wxBoxSizer* bSizerViewFilter;
- wxBitmapButton* m_bpButtonShowLog;
- zen::ToggleButton* m_bpButtonViewTypeSyncAction;
- wxBitmapButton* m_bpButtonViewContext;
- zen::ToggleButton* m_bpButtonShowExcluded;
- zen::ToggleButton* m_bpButtonShowDeleteLeft;
- zen::ToggleButton* m_bpButtonShowUpdateLeft;
- zen::ToggleButton* m_bpButtonShowCreateLeft;
- zen::ToggleButton* m_bpButtonShowLeftOnly;
- zen::ToggleButton* m_bpButtonShowLeftNewer;
- zen::ToggleButton* m_bpButtonShowEqual;
- zen::ToggleButton* m_bpButtonShowDoNothing;
- zen::ToggleButton* m_bpButtonShowDifferent;
- zen::ToggleButton* m_bpButtonShowRightNewer;
- zen::ToggleButton* m_bpButtonShowRightOnly;
- zen::ToggleButton* m_bpButtonShowCreateRight;
- zen::ToggleButton* m_bpButtonShowUpdateRight;
- zen::ToggleButton* m_bpButtonShowDeleteRight;
- zen::ToggleButton* m_bpButtonShowConflict;
- wxStaticText* m_staticText96;
- wxPanel* m_panelStatistics;
- wxBoxSizer* bSizer1801;
- wxStaticBitmap* m_bitmapDeleteLeft;
- wxStaticText* m_staticTextDeleteLeft;
- wxStaticBitmap* m_bitmapUpdateLeft;
- wxStaticText* m_staticTextUpdateLeft;
- wxStaticBitmap* m_bitmapCreateLeft;
- wxStaticText* m_staticTextCreateLeft;
- wxStaticBitmap* m_bitmapData;
- wxStaticText* m_staticTextData;
- wxStaticBitmap* m_bitmapCreateRight;
- wxStaticText* m_staticTextCreateRight;
- wxStaticBitmap* m_bitmapUpdateRight;
- wxStaticText* m_staticTextUpdateRight;
- wxStaticBitmap* m_bitmapDeleteRight;
- wxStaticText* m_staticTextDeleteRight;
-
- // Virtual event handlers, 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 OnMenuQuit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowLog( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCompare( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuOptions( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuFindItem( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuExportFileList( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuResetLayout( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuCheckVersionAutomatically( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCompSettingsContext( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnCompSettingsContext( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnGlobalFilterContext( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnGlobalFilterContext( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncSettingsContext( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncSettingsContext( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTopFolderPairAdd( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTopFolderPairRemove( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTopLocalCompCfg( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTopLocalFilterCfg( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTopLocalSyncCfg( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHideSearchPanel( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSearchGridEnter( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleViewType( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnViewTypeContext( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnViewTypeContext( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnToggleViewButton( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
- wxPanel* m_panelTopLeft;
- wxBitmapButton* m_bpButtonRemovePair;
- fff::FolderHistoryBox* m_folderPathLeft;
- wxBitmapButton* m_bpButtonSelectAltFolderLeft;
- wxBitmapButton* m_bpButtonLocalCompCfg;
- wxBitmapButton* m_bpButtonLocalFilter;
- wxBitmapButton* m_bpButtonLocalSyncCfg;
- wxPanel* m_panelTopRight;
- fff::FolderHistoryBox* m_folderPathRight;
- wxBitmapButton* m_bpButtonSelectAltFolderRight;
- wxStaticBitmap* m_bitmapSyncResult;
- wxStaticText* m_staticTextSyncResult;
- wxStaticText* m_staticTextProcessed;
- wxStaticText* m_staticTextRemaining;
- wxPanel* m_panelItemStats;
- wxStaticBitmap* m_bitmapItemStat;
- wxStaticText* m_staticTextItemsProcessed;
- wxStaticText* m_staticTextBytesProcessed;
- wxStaticText* m_staticTextItemsRemaining;
- wxStaticText* m_staticTextBytesRemaining;
- wxPanel* m_panelTimeStats;
- wxStaticBitmap* m_bitmapTimeStat;
- wxStaticText* m_staticTextTimeElapsed;
- wxBoxSizer* bSizerStatistics;
- wxBoxSizer* bSizerData;
-
- MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-
- ~MainDialogGenerated();
+private:
+
+protected:
+ wxMenuBar* m_menubar;
+ wxMenu* m_menuFile;
+ wxMenuItem* m_menuItemNew;
+ wxMenuItem* m_menuItemLoad;
+ wxMenuItem* m_menuItemSave;
+ wxMenuItem* m_menuItemSaveAs;
+ wxMenuItem* m_menuItemSaveAsBatch;
+ wxMenuItem* m_menuItemQuit;
+ wxMenu* m_menu4;
+ wxMenuItem* m_menuItemShowLog;
+ wxMenuItem* m_menuItemCompare;
+ wxMenuItem* m_menuItemCompSettings;
+ wxMenuItem* m_menuItemFilter;
+ wxMenuItem* m_menuItemSyncSettings;
+ wxMenuItem* m_menuItemSynchronize;
+ wxMenu* m_menuTools;
+ wxMenuItem* m_menuItemOptions;
+ wxMenu* m_menuLanguages;
+ wxMenuItem* m_menuItemFind;
+ wxMenuItem* m_menuItemExportList;
+ wxMenuItem* m_menuItemShowMain;
+ wxMenuItem* m_menuItemShowFolders;
+ wxMenuItem* m_menuItemShowViewFilter;
+ wxMenuItem* m_menuItemShowConfig;
+ wxMenuItem* m_menuItemShowOverview;
+ wxMenu* m_menuHelp;
+ wxMenuItem* m_menuItemHelp;
+ wxMenuItem* m_menuItemCheckVersionNow;
+ wxMenuItem* m_menuItemCheckVersionAuto;
+ wxMenuItem* m_menuItemAbout;
+ wxBoxSizer* bSizerPanelHolder;
+ wxPanel* m_panelTopButtons;
+ wxBoxSizer* bSizerTopButtons;
+ wxButton* m_buttonCancel;
+ zen::BitmapTextButton* m_buttonCompare;
+ wxBitmapButton* m_bpButtonCmpContext;
+ wxBitmapButton* m_bpButtonCmpConfig;
+ wxBitmapButton* m_bpButtonFilter;
+ wxBitmapButton* m_bpButtonFilterContext;
+ wxBitmapButton* m_bpButtonSyncConfig;
+ zen::BitmapTextButton* m_buttonSync;
+ wxBitmapButton* m_bpButtonSyncContext;
+ wxPanel* m_panelDirectoryPairs;
+ wxStaticText* m_staticTextResolvedPathL;
+ wxBitmapButton* m_bpButtonAddPair;
+ wxButton* m_buttonSelectFolderLeft;
+ wxPanel* m_panelTopCenter;
+ wxBitmapButton* m_bpButtonSwapSides;
+ wxStaticText* m_staticTextResolvedPathR;
+ wxButton* m_buttonSelectFolderRight;
+ wxScrolledWindow* m_scrolledWindowFolderPairs;
+ wxBoxSizer* bSizerAddFolderPairs;
+ zen::Grid* m_gridOverview;
+ wxPanel* m_panelCenter;
+ fff::TripleSplitter* m_splitterMain;
+ zen::Grid* m_gridMainL;
+ zen::Grid* m_gridMainC;
+ zen::Grid* m_gridMainR;
+ wxPanel* m_panelStatusBar;
+ wxBoxSizer* bSizerFileStatus;
+ wxBoxSizer* bSizerStatusLeft;
+ wxBoxSizer* bSizerStatusLeftDirectories;
+ wxStaticBitmap* m_bitmapSmallDirectoryLeft;
+ wxStaticText* m_staticTextStatusLeftDirs;
+ wxBoxSizer* bSizerStatusLeftFiles;
+ wxStaticBitmap* m_bitmapSmallFileLeft;
+ wxStaticText* m_staticTextStatusLeftFiles;
+ wxStaticText* m_staticTextStatusLeftBytes;
+ wxStaticLine* m_staticline9;
+ wxStaticText* m_staticTextStatusCenter;
+ wxBoxSizer* bSizerStatusRight;
+ wxStaticLine* m_staticline10;
+ wxBoxSizer* bSizerStatusRightDirectories;
+ wxStaticBitmap* m_bitmapSmallDirectoryRight;
+ wxStaticText* m_staticTextStatusRightDirs;
+ wxBoxSizer* bSizerStatusRightFiles;
+ wxStaticBitmap* m_bitmapSmallFileRight;
+ wxStaticText* m_staticTextStatusRightFiles;
+ wxStaticText* m_staticTextStatusRightBytes;
+ wxStaticText* m_staticTextFullStatus;
+ wxPanel* m_panelSearch;
+ wxBitmapButton* m_bpButtonHideSearch;
+ wxStaticText* m_staticText101;
+ wxTextCtrl* m_textCtrlSearchTxt;
+ wxCheckBox* m_checkBoxMatchCase;
+ wxPanel* m_panelLog;
+ wxBoxSizer* bSizerLog;
+ wxBoxSizer* bSizer42;
+ wxFlexGridSizer* ffgSizer11;
+ wxFlexGridSizer* ffgSizer111;
+ wxFlexGridSizer* ffgSizer112;
+ wxStaticLine* m_staticline70;
+ wxPanel* m_panelConfig;
+ wxBoxSizer* bSizerConfig;
+ wxBoxSizer* bSizerCfgHistoryButtons;
+ wxBitmapButton* m_bpButtonNew;
+ wxStaticText* m_staticText951;
+ wxBitmapButton* m_bpButtonOpen;
+ wxStaticText* m_staticText95;
+ wxBitmapButton* m_bpButtonSave;
+ wxStaticText* m_staticText961;
+ wxBitmapButton* m_bpButtonSaveAs;
+ wxBitmapButton* m_bpButtonSaveAsBatch;
+ wxStaticText* m_staticText97;
+ zen::Grid* m_gridCfgHistory;
+ wxPanel* m_panelViewFilter;
+ wxBoxSizer* bSizerViewFilter;
+ wxBitmapButton* m_bpButtonShowLog;
+ zen::ToggleButton* m_bpButtonViewTypeSyncAction;
+ wxBitmapButton* m_bpButtonViewContext;
+ zen::ToggleButton* m_bpButtonShowExcluded;
+ zen::ToggleButton* m_bpButtonShowDeleteLeft;
+ zen::ToggleButton* m_bpButtonShowUpdateLeft;
+ zen::ToggleButton* m_bpButtonShowCreateLeft;
+ zen::ToggleButton* m_bpButtonShowLeftOnly;
+ zen::ToggleButton* m_bpButtonShowLeftNewer;
+ zen::ToggleButton* m_bpButtonShowEqual;
+ zen::ToggleButton* m_bpButtonShowDoNothing;
+ zen::ToggleButton* m_bpButtonShowDifferent;
+ zen::ToggleButton* m_bpButtonShowRightNewer;
+ zen::ToggleButton* m_bpButtonShowRightOnly;
+ zen::ToggleButton* m_bpButtonShowCreateRight;
+ zen::ToggleButton* m_bpButtonShowUpdateRight;
+ zen::ToggleButton* m_bpButtonShowDeleteRight;
+ zen::ToggleButton* m_bpButtonShowConflict;
+ wxStaticText* m_staticText96;
+ wxPanel* m_panelStatistics;
+ wxBoxSizer* bSizer1801;
+ wxStaticBitmap* m_bitmapDeleteLeft;
+ wxStaticText* m_staticTextDeleteLeft;
+ wxStaticBitmap* m_bitmapUpdateLeft;
+ wxStaticText* m_staticTextUpdateLeft;
+ wxStaticBitmap* m_bitmapCreateLeft;
+ wxStaticText* m_staticTextCreateLeft;
+ wxStaticBitmap* m_bitmapData;
+ wxStaticText* m_staticTextData;
+ wxStaticBitmap* m_bitmapCreateRight;
+ wxStaticText* m_staticTextCreateRight;
+ wxStaticBitmap* m_bitmapUpdateRight;
+ wxStaticText* m_staticTextUpdateRight;
+ wxStaticBitmap* m_bitmapDeleteRight;
+ wxStaticText* m_staticTextDeleteRight;
+
+ // Virtual event handlers, 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 OnMenuQuit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowLog( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCompare( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuOptions( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuFindItem( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuExportFileList( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuResetLayout( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuCheckVersionAutomatically( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCompSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnCompSettingsContext( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnGlobalFilterContextMouse( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnGlobalFilterContext( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncSettingsContext( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTopFolderPairAdd( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTopFolderPairRemove( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTopLocalCompCfg( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTopLocalFilterCfg( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTopLocalSyncCfg( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHideSearchPanel( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSearchGridEnter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleViewType( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnViewTypeContextMouse( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnViewTypeContext( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleViewButton( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+ wxPanel* m_panelTopLeft;
+ wxBitmapButton* m_bpButtonRemovePair;
+ fff::FolderHistoryBox* m_folderPathLeft;
+ wxBitmapButton* m_bpButtonSelectAltFolderLeft;
+ wxBitmapButton* m_bpButtonLocalCompCfg;
+ wxBitmapButton* m_bpButtonLocalFilter;
+ wxBitmapButton* m_bpButtonLocalSyncCfg;
+ wxPanel* m_panelTopRight;
+ fff::FolderHistoryBox* m_folderPathRight;
+ wxBitmapButton* m_bpButtonSelectAltFolderRight;
+ wxStaticBitmap* m_bitmapSyncResult;
+ wxStaticText* m_staticTextSyncResult;
+ wxStaticText* m_staticTextProcessed;
+ wxStaticText* m_staticTextRemaining;
+ wxPanel* m_panelItemStats;
+ wxStaticBitmap* m_bitmapItemStat;
+ wxStaticText* m_staticTextItemsProcessed;
+ wxStaticText* m_staticTextBytesProcessed;
+ wxStaticText* m_staticTextItemsRemaining;
+ wxStaticText* m_staticTextBytesRemaining;
+ wxPanel* m_panelTimeStats;
+ wxStaticBitmap* m_bitmapTimeStat;
+ wxStaticText* m_staticTextTimeElapsed;
+ wxBoxSizer* bSizerStatistics;
+ wxBoxSizer* bSizerData;
+
+ MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+
+ ~MainDialogGenerated();
};
@@ -287,28 +287,28 @@ class MainDialogGenerated : public wxFrame
///////////////////////////////////////////////////////////////////////////////
class FolderPairPanelGenerated : public wxPanel
{
- private:
-
- protected:
- wxButton* m_buttonSelectFolderLeft;
- wxButton* m_buttonSelectFolderRight;
-
- public:
- wxPanel* m_panelLeft;
- wxBitmapButton* m_bpButtonFolderPairOptions;
- wxBitmapButton* m_bpButtonRemovePair;
- fff::FolderHistoryBox* m_folderPathLeft;
- wxBitmapButton* m_bpButtonSelectAltFolderLeft;
- wxPanel* m_panel20;
- wxBitmapButton* m_bpButtonLocalCompCfg;
- wxBitmapButton* m_bpButtonLocalFilter;
- wxBitmapButton* m_bpButtonLocalSyncCfg;
- wxPanel* m_panelRight;
- fff::FolderHistoryBox* m_folderPathRight;
- wxBitmapButton* m_bpButtonSelectAltFolderRight;
-
- FolderPairPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString );
- ~FolderPairPanelGenerated();
+private:
+
+protected:
+ wxButton* m_buttonSelectFolderLeft;
+ wxButton* m_buttonSelectFolderRight;
+
+public:
+ wxPanel* m_panelLeft;
+ wxBitmapButton* m_bpButtonFolderPairOptions;
+ wxBitmapButton* m_bpButtonRemovePair;
+ fff::FolderHistoryBox* m_folderPathLeft;
+ wxBitmapButton* m_bpButtonSelectAltFolderLeft;
+ wxPanel* m_panel20;
+ wxBitmapButton* m_bpButtonLocalCompCfg;
+ wxBitmapButton* m_bpButtonLocalFilter;
+ wxBitmapButton* m_bpButtonLocalSyncCfg;
+ wxPanel* m_panelRight;
+ fff::FolderHistoryBox* m_folderPathRight;
+ wxBitmapButton* m_bpButtonSelectAltFolderRight;
+
+ FolderPairPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString );
+ ~FolderPairPanelGenerated();
};
@@ -317,236 +317,236 @@ class FolderPairPanelGenerated : public wxPanel
///////////////////////////////////////////////////////////////////////////////
class ConfigDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticText* m_staticTextFolderPairLabel;
- wxListBox* m_listBoxFolderPair;
- wxNotebook* m_notebook;
- wxPanel* m_panelCompSettingsTab;
- wxBoxSizer* bSizerHeaderCompSettings;
- wxStaticText* m_staticTextMainCompSettings;
- wxCheckBox* m_checkBoxUseLocalCmpOptions;
- wxStaticLine* m_staticlineCompHeader;
- wxPanel* m_panelComparisonSettings;
- wxStaticText* m_staticText91;
- wxToggleButton* m_toggleBtnByTimeSize;
- wxToggleButton* m_toggleBtnByContent;
- wxToggleButton* m_toggleBtnBySize;
- wxStaticBitmap* m_bitmapCompVariant;
- wxStaticText* m_staticTextCompVarDescription;
- wxStaticLine* m_staticline33;
- wxCheckBox* m_checkBoxSymlinksInclude;
- wxRadioButton* m_radioBtnSymlinksFollow;
- wxRadioButton* m_radioBtnSymlinksDirect;
- wxHyperlinkCtrl* m_hyperlink24;
- wxStaticLine* m_staticline44;
- wxStaticText* m_staticText112;
- wxTextCtrl* m_textCtrlTimeShift;
- wxStaticText* m_staticText1381;
- wxStaticText* m_staticText13811;
- wxHyperlinkCtrl* m_hyperlink241;
- wxStaticLine* m_staticline441;
- wxStaticLine* m_staticline331;
- wxBoxSizer* bSizerCompMisc;
- wxStaticBitmap* m_bitmapIgnoreErrors;
- wxCheckBox* m_checkBoxIgnoreErrors;
- wxCheckBox* m_checkBoxAutoRetry;
- wxFlexGridSizer* fgSizerAutoRetry;
- wxStaticText* m_staticText96;
- wxStaticText* m_staticTextAutoRetryDelay;
- wxSpinCtrl* m_spinCtrlAutoRetryCount;
- wxSpinCtrl* m_spinCtrlAutoRetryDelay;
- wxStaticLine* m_staticline3311;
- wxStaticLine* m_staticline751;
- wxBoxSizer* bSizerPerformance;
- wxStaticText* m_staticTextPerfDeRequired;
- wxStaticLine* m_staticlinePerfDeRequired;
- wxPanel* m_panelPerfHeader;
- wxStaticBitmap* m_bitmapPerf;
- wxStaticText* m_staticText13611;
- wxBoxSizer* bSizer260;
- wxStaticText* m_staticTextPerfParallelOps;
- wxScrolledWindow* m_scrolledWindowPerf;
- wxFlexGridSizer* fgSizerPerf;
- wxHyperlinkCtrl* m_hyperlink1711;
- wxPanel* m_panelFilterSettingsTab;
- wxBoxSizer* bSizerHeaderFilterSettings;
- wxStaticText* m_staticTextMainFilterSettings;
- wxStaticText* m_staticTextLocalFilterSettings;
- wxStaticLine* m_staticlineFilterHeader;
- wxPanel* m_panelFilterSettings;
- wxStaticBitmap* m_bitmapInclude;
- wxStaticText* m_staticText78;
- wxTextCtrl* m_textCtrlInclude;
- wxStaticBitmap* m_bitmapExclude;
- wxStaticText* m_staticText77;
- wxHyperlinkCtrl* m_hyperlink171;
- wxTextCtrl* m_textCtrlExclude;
- wxStaticLine* m_staticline24;
- wxStaticBitmap* m_bitmapFilterSize;
- wxStaticText* m_staticText80;
- wxStaticText* m_staticText101;
- wxSpinCtrl* m_spinCtrlMinSize;
- wxChoice* m_choiceUnitMinSize;
- wxStaticText* m_staticText102;
- wxSpinCtrl* m_spinCtrlMaxSize;
- wxChoice* m_choiceUnitMaxSize;
- wxStaticLine* m_staticline23;
- wxStaticBitmap* m_bitmapFilterDate;
- wxStaticText* m_staticText79;
- wxChoice* m_choiceUnitTimespan;
- wxSpinCtrl* m_spinCtrlTimespan;
- wxStaticLine* m_staticline231;
- wxButton* m_buttonClear;
- wxPanel* m_panelSyncSettingsTab;
- wxBoxSizer* bSizerHeaderSyncSettings;
- wxStaticText* m_staticTextMainSyncSettings;
- wxCheckBox* m_checkBoxUseLocalSyncOptions;
- wxStaticLine* m_staticlineSyncHeader;
- wxPanel* m_panelSyncSettings;
- wxStaticText* m_staticText86;
- wxToggleButton* m_toggleBtnTwoWay;
- wxToggleButton* m_toggleBtnMirror;
- wxToggleButton* m_toggleBtnUpdate;
- wxToggleButton* m_toggleBtnCustom;
- wxBoxSizer* bSizerSyncDirHolder;
- wxBoxSizer* bSizerSyncDirections;
- wxStaticText* m_staticTextCategory;
- wxFlexGridSizer* ffgSizer11;
- wxStaticBitmap* m_bitmapLeftOnly;
- wxStaticBitmap* m_bitmapLeftNewer;
- wxStaticBitmap* m_bitmapDifferent;
- wxStaticBitmap* m_bitmapConflict;
- wxStaticBitmap* m_bitmapRightNewer;
- wxStaticBitmap* m_bitmapRightOnly;
- wxBitmapButton* m_bpButtonLeftOnly;
- wxBitmapButton* m_bpButtonLeftNewer;
- wxBitmapButton* m_bpButtonDifferent;
- wxBitmapButton* m_bpButtonConflict;
- wxBitmapButton* m_bpButtonRightNewer;
- wxBitmapButton* m_bpButtonRightOnly;
- wxStaticText* m_staticText120;
- wxBoxSizer* bSizerDatabase;
- wxStaticBitmap* m_bitmapDatabase;
- wxStaticText* m_staticText145;
- wxStaticText* m_staticTextSyncVarDescription;
- wxStaticLine* m_staticline431;
- wxStaticLine* m_staticline72;
- wxCheckBox* m_checkBoxDetectMove;
- wxHyperlinkCtrl* m_hyperlink242;
- wxStaticLine* m_staticline54;
- wxBoxSizer* bSizer2361;
- wxStaticText* m_staticText87;
- wxToggleButton* m_toggleBtnRecycler;
- wxToggleButton* m_toggleBtnPermanent;
- wxToggleButton* m_toggleBtnVersioning;
- wxBoxSizer* bSizerVersioningHolder;
- wxStaticBitmap* m_bitmapDeletionType;
- wxStaticText* m_staticTextDeletionTypeDescription;
- wxPanel* m_panelVersioning;
- wxStaticBitmap* m_bitmapVersioning;
- wxStaticText* m_staticText155;
- wxHyperlinkCtrl* m_hyperlink243;
- fff::FolderHistoryBox* m_versioningFolderPath;
- wxButton* m_buttonSelectVersioningFolder;
- wxStaticText* m_staticText93;
- wxChoice* m_choiceVersioningStyle;
- wxStaticText* m_staticTextNamingCvtPart1;
- wxStaticText* m_staticTextNamingCvtPart2Bold;
- wxStaticText* m_staticTextNamingCvtPart3;
- wxStaticLine* m_staticline69;
- wxStaticText* m_staticTextLimitVersions;
- wxFlexGridSizer* fgSizer15;
- wxCheckBox* m_checkBoxVersionMaxDays;
- wxCheckBox* m_checkBoxVersionCountMin;
- wxCheckBox* m_checkBoxVersionCountMax;
- wxSpinCtrl* m_spinCtrlVersionMaxDays;
- wxSpinCtrl* m_spinCtrlVersionCountMin;
- wxSpinCtrl* m_spinCtrlVersionCountMax;
- wxStaticLine* m_staticline582;
- wxBoxSizer* bSizerSyncMisc;
- wxStaticBitmap* m_bitmapEmail;
- wxCheckBox* m_checkBoxSendEmail;
- fff::CommandBox* m_comboBoxEmail;
- wxBitmapButton* m_bpButtonEmailAlways;
- wxBitmapButton* m_bpButtonEmailErrorWarning;
- wxBitmapButton* m_bpButtonEmailErrorOnly;
- wxStaticText* m_staticTextPerfDeRequired2;
- wxStaticLine* m_staticline57;
- wxPanel* m_panelLogfile;
- wxStaticBitmap* m_bitmapLogFile;
- wxCheckBox* m_checkBoxOverrideLogPath;
- wxButton* m_buttonSelectLogFolder;
- wxStaticLine* m_staticline80;
- wxStaticText* m_staticTextPostSync;
- fff::CommandBox* m_comboBoxPostSyncCommand;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonOkay;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void onListBoxKeyEvent( wxKeyEvent& event ) { event.Skip(); }
- virtual void OnSelectFolderPair( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleLocalCompSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCompByTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnCompByTimeSize( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCompByContentDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnCompByContent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCompBySizeDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnCompBySize( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnChangeCompOption( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpComparisonSettings( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnHelpTimeShift( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnToggleIgnoreErrors( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleAutoRetry( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpPerformance( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnChangeFilterOption( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpFilterSettings( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnFilterReset( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleLocalSyncSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncTwoWayDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncTwoWay( 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 OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleDetectMovedFiles( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpDetectMovedFiles( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnDeletionRecycler( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDeletionPermanent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDeletionVersioning( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpVersioning( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnChanegVersioningStyle( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleVersioningLimit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleMiscEmail( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnEmailAlways( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnEmailErrorWarning( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnEmailErrorOnly( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleMiscOption( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
- wxStaticBitmap* m_bitmapRetryErrors;
- wxStaticText* m_staticTextFilterDescr;
- wxBitmapButton* m_bpButtonSelectVersioningAltFolder;
- wxBitmapButton* m_bpButtonSelectAltLogFolder;
- fff::FolderHistoryBox* m_logFolderPath;
- wxChoice* m_choicePostSyncCondition;
-
- ConfigDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
- ~ConfigDlgGenerated();
+private:
+
+protected:
+ wxStaticText* m_staticTextFolderPairLabel;
+ wxListBox* m_listBoxFolderPair;
+ wxNotebook* m_notebook;
+ wxPanel* m_panelCompSettingsTab;
+ wxBoxSizer* bSizerHeaderCompSettings;
+ wxStaticText* m_staticTextMainCompSettings;
+ wxCheckBox* m_checkBoxUseLocalCmpOptions;
+ wxStaticLine* m_staticlineCompHeader;
+ wxPanel* m_panelComparisonSettings;
+ wxStaticText* m_staticText91;
+ zen::ToggleButton* m_buttonByTimeSize;
+ zen::ToggleButton* m_buttonByContent;
+ zen::ToggleButton* m_buttonBySize;
+ wxStaticBitmap* m_bitmapCompVariant;
+ wxStaticText* m_staticTextCompVarDescription;
+ wxStaticLine* m_staticline33;
+ wxCheckBox* m_checkBoxSymlinksInclude;
+ wxRadioButton* m_radioBtnSymlinksFollow;
+ wxRadioButton* m_radioBtnSymlinksDirect;
+ wxHyperlinkCtrl* m_hyperlink24;
+ wxStaticLine* m_staticline44;
+ wxStaticText* m_staticText112;
+ wxTextCtrl* m_textCtrlTimeShift;
+ wxStaticText* m_staticText1381;
+ wxStaticText* m_staticText13811;
+ wxHyperlinkCtrl* m_hyperlink241;
+ wxStaticLine* m_staticline441;
+ wxStaticLine* m_staticline331;
+ wxBoxSizer* bSizerCompMisc;
+ wxStaticBitmap* m_bitmapIgnoreErrors;
+ wxCheckBox* m_checkBoxIgnoreErrors;
+ wxCheckBox* m_checkBoxAutoRetry;
+ wxFlexGridSizer* fgSizerAutoRetry;
+ wxStaticText* m_staticText96;
+ wxStaticText* m_staticTextAutoRetryDelay;
+ wxSpinCtrl* m_spinCtrlAutoRetryCount;
+ wxSpinCtrl* m_spinCtrlAutoRetryDelay;
+ wxStaticLine* m_staticline3311;
+ wxStaticLine* m_staticline751;
+ wxBoxSizer* bSizerPerformance;
+ wxStaticText* m_staticTextPerfDeRequired;
+ wxStaticLine* m_staticlinePerfDeRequired;
+ wxPanel* m_panelPerfHeader;
+ wxStaticBitmap* m_bitmapPerf;
+ wxStaticText* m_staticText13611;
+ wxBoxSizer* bSizer260;
+ wxStaticText* m_staticTextPerfParallelOps;
+ wxScrolledWindow* m_scrolledWindowPerf;
+ wxFlexGridSizer* fgSizerPerf;
+ wxHyperlinkCtrl* m_hyperlink1711;
+ wxPanel* m_panelFilterSettingsTab;
+ wxBoxSizer* bSizerHeaderFilterSettings;
+ wxStaticText* m_staticTextMainFilterSettings;
+ wxStaticText* m_staticTextLocalFilterSettings;
+ wxStaticLine* m_staticlineFilterHeader;
+ wxPanel* m_panelFilterSettings;
+ wxStaticBitmap* m_bitmapInclude;
+ wxStaticText* m_staticText78;
+ wxTextCtrl* m_textCtrlInclude;
+ wxStaticBitmap* m_bitmapExclude;
+ wxStaticText* m_staticText77;
+ wxHyperlinkCtrl* m_hyperlink171;
+ wxTextCtrl* m_textCtrlExclude;
+ wxStaticLine* m_staticline24;
+ wxStaticBitmap* m_bitmapFilterSize;
+ wxStaticText* m_staticText80;
+ wxStaticText* m_staticText101;
+ wxSpinCtrl* m_spinCtrlMinSize;
+ wxChoice* m_choiceUnitMinSize;
+ wxStaticText* m_staticText102;
+ wxSpinCtrl* m_spinCtrlMaxSize;
+ wxChoice* m_choiceUnitMaxSize;
+ wxStaticLine* m_staticline23;
+ wxStaticBitmap* m_bitmapFilterDate;
+ wxStaticText* m_staticText79;
+ wxChoice* m_choiceUnitTimespan;
+ wxSpinCtrl* m_spinCtrlTimespan;
+ wxStaticLine* m_staticline231;
+ wxButton* m_buttonClear;
+ wxPanel* m_panelSyncSettingsTab;
+ wxBoxSizer* bSizerHeaderSyncSettings;
+ wxStaticText* m_staticTextMainSyncSettings;
+ wxCheckBox* m_checkBoxUseLocalSyncOptions;
+ wxStaticLine* m_staticlineSyncHeader;
+ wxPanel* m_panelSyncSettings;
+ wxStaticText* m_staticText86;
+ zen::ToggleButton* m_buttonTwoWay;
+ zen::ToggleButton* m_buttonMirror;
+ zen::ToggleButton* m_buttonUpdate;
+ zen::ToggleButton* m_buttonCustom;
+ wxBoxSizer* bSizerSyncDirHolder;
+ wxBoxSizer* bSizerSyncDirections;
+ wxStaticText* m_staticTextCategory;
+ wxFlexGridSizer* ffgSizer11;
+ wxStaticBitmap* m_bitmapLeftOnly;
+ wxStaticBitmap* m_bitmapLeftNewer;
+ wxStaticBitmap* m_bitmapDifferent;
+ wxStaticBitmap* m_bitmapConflict;
+ wxStaticBitmap* m_bitmapRightNewer;
+ wxStaticBitmap* m_bitmapRightOnly;
+ wxBitmapButton* m_bpButtonLeftOnly;
+ wxBitmapButton* m_bpButtonLeftNewer;
+ wxBitmapButton* m_bpButtonDifferent;
+ wxBitmapButton* m_bpButtonConflict;
+ wxBitmapButton* m_bpButtonRightNewer;
+ wxBitmapButton* m_bpButtonRightOnly;
+ wxStaticText* m_staticText120;
+ wxBoxSizer* bSizerDatabase;
+ wxStaticBitmap* m_bitmapDatabase;
+ wxStaticText* m_staticText145;
+ wxStaticText* m_staticTextSyncVarDescription;
+ wxStaticLine* m_staticline431;
+ wxStaticLine* m_staticline72;
+ wxCheckBox* m_checkBoxDetectMove;
+ wxHyperlinkCtrl* m_hyperlink242;
+ wxStaticLine* m_staticline54;
+ wxBoxSizer* bSizer2361;
+ wxStaticText* m_staticText87;
+ zen::ToggleButton* m_buttonRecycler;
+ zen::ToggleButton* m_buttonPermanent;
+ zen::ToggleButton* m_buttonVersioning;
+ wxBoxSizer* bSizerVersioningHolder;
+ wxStaticBitmap* m_bitmapDeletionType;
+ wxStaticText* m_staticTextDeletionTypeDescription;
+ wxPanel* m_panelVersioning;
+ wxStaticBitmap* m_bitmapVersioning;
+ wxStaticText* m_staticText155;
+ wxHyperlinkCtrl* m_hyperlink243;
+ fff::FolderHistoryBox* m_versioningFolderPath;
+ wxButton* m_buttonSelectVersioningFolder;
+ wxStaticText* m_staticText93;
+ wxChoice* m_choiceVersioningStyle;
+ wxStaticText* m_staticTextNamingCvtPart1;
+ wxStaticText* m_staticTextNamingCvtPart2Bold;
+ wxStaticText* m_staticTextNamingCvtPart3;
+ wxStaticLine* m_staticline69;
+ wxStaticText* m_staticTextLimitVersions;
+ wxFlexGridSizer* fgSizer15;
+ wxCheckBox* m_checkBoxVersionMaxDays;
+ wxCheckBox* m_checkBoxVersionCountMin;
+ wxCheckBox* m_checkBoxVersionCountMax;
+ wxSpinCtrl* m_spinCtrlVersionMaxDays;
+ wxSpinCtrl* m_spinCtrlVersionCountMin;
+ wxSpinCtrl* m_spinCtrlVersionCountMax;
+ wxStaticLine* m_staticline582;
+ wxBoxSizer* bSizerSyncMisc;
+ wxStaticBitmap* m_bitmapEmail;
+ wxCheckBox* m_checkBoxSendEmail;
+ fff::CommandBox* m_comboBoxEmail;
+ wxBitmapButton* m_bpButtonEmailAlways;
+ wxBitmapButton* m_bpButtonEmailErrorWarning;
+ wxBitmapButton* m_bpButtonEmailErrorOnly;
+ wxStaticText* m_staticTextPerfDeRequired2;
+ wxStaticLine* m_staticline57;
+ wxPanel* m_panelLogfile;
+ wxStaticBitmap* m_bitmapLogFile;
+ wxCheckBox* m_checkBoxOverrideLogPath;
+ wxButton* m_buttonSelectLogFolder;
+ wxStaticLine* m_staticline80;
+ wxStaticText* m_staticTextPostSync;
+ fff::CommandBox* m_comboBoxPostSyncCommand;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonOkay;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void onListBoxKeyEvent( wxKeyEvent& event ) { event.Skip(); }
+ virtual void OnSelectFolderPair( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleLocalCompSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCompByTimeSize( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCompByTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnCompByContent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCompByContentDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnCompBySize( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCompBySizeDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnChangeCompOption( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpComparisonSettings( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnHelpTimeShift( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnToggleIgnoreErrors( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleAutoRetry( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpPerformance( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnChangeFilterOption( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpFilterSettings( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnFilterReset( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleLocalSyncSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncTwoWay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncTwoWayDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncMirror( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleDetectMovedFiles( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpDetectMovedFiles( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnDeletionRecycler( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDeletionPermanent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDeletionVersioning( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpVersioning( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnChanegVersioningStyle( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleVersioningLimit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleMiscEmail( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnEmailAlways( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnEmailErrorWarning( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnEmailErrorOnly( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleMiscOption( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+ wxStaticBitmap* m_bitmapRetryErrors;
+ wxStaticText* m_staticTextFilterDescr;
+ wxBitmapButton* m_bpButtonSelectVersioningAltFolder;
+ wxBitmapButton* m_bpButtonSelectAltLogFolder;
+ fff::FolderHistoryBox* m_logFolderPath;
+ wxChoice* m_choicePostSyncCondition;
+
+ ConfigDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
+ ~ConfigDlgGenerated();
};
@@ -555,112 +555,112 @@ class ConfigDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class CloudSetupDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmapCloud;
- wxStaticText* m_staticText136;
- wxToggleButton* m_toggleBtnGdrive;
- wxToggleButton* m_toggleBtnSftp;
- wxToggleButton* m_toggleBtnFtp;
- wxStaticLine* m_staticline371;
- wxPanel* m_panel41;
- wxBoxSizer* bSizerGdrive;
- wxStaticBitmap* m_bitmapGdriveUser;
- wxStaticText* m_staticText166;
- wxListBox* m_listBoxGdriveUsers;
- zen::BitmapTextButton* m_buttonGdriveAddUser;
- zen::BitmapTextButton* m_buttonGdriveRemoveUser;
- wxStaticLine* m_staticline841;
- wxStaticBitmap* m_bitmapGdriveDrive;
- wxStaticText* m_staticText186;
- wxListBox* m_listBoxGdriveDrives;
- wxStaticLine* m_staticline73;
- wxBoxSizer* bSizerServer;
- wxStaticBitmap* m_bitmapServer;
- wxStaticText* m_staticText12311;
- wxTextCtrl* m_textCtrlServer;
- wxStaticText* m_staticText1233;
- wxTextCtrl* m_textCtrlPort;
- wxStaticLine* m_staticline58;
- wxBoxSizer* bSizerAuth;
- wxBoxSizer* bSizerAuthInner;
- wxBoxSizer* bSizerFtpEncrypt;
- wxStaticText* m_staticText1251;
- wxRadioButton* m_radioBtnEncryptNone;
- wxRadioButton* m_radioBtnEncryptSsl;
- wxStaticLine* m_staticline5721;
- wxBoxSizer* bSizerSftpAuth;
- wxStaticText* m_staticText125;
- wxRadioButton* m_radioBtnPassword;
- wxRadioButton* m_radioBtnKeyfile;
- wxRadioButton* m_radioBtnAgent;
- wxStaticLine* m_staticline572;
- wxPanel* m_panelAuth;
- wxStaticText* m_staticText123;
- wxTextCtrl* m_textCtrlUserName;
- wxStaticText* m_staticTextKeyfile;
- wxBoxSizer* bSizerKeyFile;
- wxTextCtrl* m_textCtrlKeyfilePath;
- wxButton* m_buttonSelectKeyfile;
- wxStaticText* m_staticTextPassword;
- wxBoxSizer* bSizerPassword;
- wxTextCtrl* m_textCtrlPasswordVisible;
- wxTextCtrl* m_textCtrlPasswordHidden;
- wxCheckBox* m_checkBoxShowPassword;
- wxStaticLine* m_staticline581;
- wxStaticBitmap* m_bitmapServerDir;
- wxStaticText* m_staticText1232;
- wxTextCtrl* m_textCtrlServerPath;
- wxButton* m_buttonSelectFolder;
- wxBoxSizer* bSizerAccessTimeout;
- wxStaticText* m_staticTextTimeout;
- wxSpinCtrl* m_spinCtrlTimeout;
- wxStaticLine* m_staticline571;
- wxStaticBitmap* m_bitmapPerf;
- wxStaticText* m_staticText1361;
- wxHyperlinkCtrl* m_hyperlink171;
- wxStaticLine* m_staticline57;
- wxPanel* m_panel411;
- wxBoxSizer* bSizerConnectionsLabel;
- wxStaticText* m_staticTextConnectionsLabel;
- wxStaticText* m_staticTextConnectionsLabelSub;
- wxSpinCtrl* m_spinCtrlConnectionCount;
- wxStaticText* m_staticTextConnectionCountDescr;
- wxStaticText* m_staticTextChannelCountSftp;
- wxSpinCtrl* m_spinCtrlChannelCountSftp;
- wxButton* m_buttonChannelCountSftp;
- wxCheckBox* m_checkBoxAllowZlib;
- wxStaticText* m_staticTextZlibDescr;
- wxStaticLine* m_staticline12;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonOkay;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnConnectionGdrive( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConnectionSftp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConnectionFtp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnGdriveUserSelect( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnGdriveUserAdd( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnGdriveUserRemove( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAuthPassword( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAuthKeyfile( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAuthAgent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSelectKeyfile( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleShowPassword( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnBrowseCloudFolder( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpFtpPerformance( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnDetectServerChannelLimit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- CloudSetupDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Access Online Storage"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~CloudSetupDlgGenerated();
+private:
+
+protected:
+ wxStaticBitmap* m_bitmapCloud;
+ wxStaticText* m_staticText136;
+ wxToggleButton* m_toggleBtnGdrive;
+ wxToggleButton* m_toggleBtnSftp;
+ wxToggleButton* m_toggleBtnFtp;
+ wxStaticLine* m_staticline371;
+ wxPanel* m_panel41;
+ wxBoxSizer* bSizerGdrive;
+ wxStaticBitmap* m_bitmapGdriveUser;
+ wxStaticText* m_staticText166;
+ wxListBox* m_listBoxGdriveUsers;
+ zen::BitmapTextButton* m_buttonGdriveAddUser;
+ zen::BitmapTextButton* m_buttonGdriveRemoveUser;
+ wxStaticLine* m_staticline841;
+ wxStaticBitmap* m_bitmapGdriveDrive;
+ wxStaticText* m_staticText186;
+ wxListBox* m_listBoxGdriveDrives;
+ wxStaticLine* m_staticline73;
+ wxBoxSizer* bSizerServer;
+ wxStaticBitmap* m_bitmapServer;
+ wxStaticText* m_staticText12311;
+ wxTextCtrl* m_textCtrlServer;
+ wxStaticText* m_staticText1233;
+ wxTextCtrl* m_textCtrlPort;
+ wxStaticLine* m_staticline58;
+ wxBoxSizer* bSizerAuth;
+ wxBoxSizer* bSizerAuthInner;
+ wxBoxSizer* bSizerFtpEncrypt;
+ wxStaticText* m_staticText1251;
+ wxRadioButton* m_radioBtnEncryptNone;
+ wxRadioButton* m_radioBtnEncryptSsl;
+ wxStaticLine* m_staticline5721;
+ wxBoxSizer* bSizerSftpAuth;
+ wxStaticText* m_staticText125;
+ wxRadioButton* m_radioBtnPassword;
+ wxRadioButton* m_radioBtnKeyfile;
+ wxRadioButton* m_radioBtnAgent;
+ wxStaticLine* m_staticline572;
+ wxPanel* m_panelAuth;
+ wxStaticText* m_staticText123;
+ wxTextCtrl* m_textCtrlUserName;
+ wxStaticText* m_staticTextKeyfile;
+ wxBoxSizer* bSizerKeyFile;
+ wxTextCtrl* m_textCtrlKeyfilePath;
+ wxButton* m_buttonSelectKeyfile;
+ wxStaticText* m_staticTextPassword;
+ wxBoxSizer* bSizerPassword;
+ wxTextCtrl* m_textCtrlPasswordVisible;
+ wxTextCtrl* m_textCtrlPasswordHidden;
+ wxCheckBox* m_checkBoxShowPassword;
+ wxStaticLine* m_staticline581;
+ wxStaticBitmap* m_bitmapServerDir;
+ wxStaticText* m_staticText1232;
+ wxTextCtrl* m_textCtrlServerPath;
+ wxButton* m_buttonSelectFolder;
+ wxBoxSizer* bSizerAccessTimeout;
+ wxStaticText* m_staticTextTimeout;
+ wxSpinCtrl* m_spinCtrlTimeout;
+ wxStaticLine* m_staticline571;
+ wxStaticBitmap* m_bitmapPerf;
+ wxStaticText* m_staticText1361;
+ wxHyperlinkCtrl* m_hyperlink171;
+ wxStaticLine* m_staticline57;
+ wxPanel* m_panel411;
+ wxBoxSizer* bSizerConnectionsLabel;
+ wxStaticText* m_staticTextConnectionsLabel;
+ wxStaticText* m_staticTextConnectionsLabelSub;
+ wxSpinCtrl* m_spinCtrlConnectionCount;
+ wxStaticText* m_staticTextConnectionCountDescr;
+ wxStaticText* m_staticTextChannelCountSftp;
+ wxSpinCtrl* m_spinCtrlChannelCountSftp;
+ wxButton* m_buttonChannelCountSftp;
+ wxCheckBox* m_checkBoxAllowZlib;
+ wxStaticText* m_staticTextZlibDescr;
+ wxStaticLine* m_staticline12;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonOkay;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnConnectionGdrive( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConnectionSftp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConnectionFtp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnGdriveUserSelect( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnGdriveUserAdd( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnGdriveUserRemove( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAuthPassword( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAuthKeyfile( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAuthAgent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSelectKeyfile( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleShowPassword( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnBrowseCloudFolder( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpFtpPerformance( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnDetectServerChannelLimit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ CloudSetupDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Access Online Storage"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~CloudSetupDlgGenerated();
};
@@ -669,28 +669,28 @@ class CloudSetupDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class AbstractFolderPickerGenerated : public wxDialog
{
- private:
+private:
- protected:
- wxPanel* m_panel41;
- wxStaticText* m_staticTextStatus;
- wxTreeCtrl* m_treeCtrlFileSystem;
- wxStaticLine* m_staticline12;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonOkay;
- wxButton* m_buttonCancel;
+protected:
+ wxPanel* m_panel41;
+ wxStaticText* m_staticTextStatus;
+ wxTreeCtrl* m_treeCtrlFileSystem;
+ wxStaticLine* m_staticline12;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonOkay;
+ wxButton* m_buttonCancel;
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnExpandNode( wxTreeEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnExpandNode( wxTreeEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
- public:
+public:
- AbstractFolderPickerGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select a folder"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
- ~AbstractFolderPickerGenerated();
+ AbstractFolderPickerGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select a folder"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
+ ~AbstractFolderPickerGenerated();
};
@@ -699,49 +699,50 @@ class AbstractFolderPickerGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class SyncConfirmationDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmapSync;
- wxStaticText* m_staticTextCaption;
- wxStaticLine* m_staticline371;
- wxPanel* m_panelStatistics;
- wxStaticLine* m_staticline38;
- wxStaticText* m_staticText84;
- wxStaticText* m_staticTextVariant;
- wxStaticLine* m_staticline14;
- wxStaticText* m_staticText83;
- wxStaticBitmap* m_bitmapDeleteLeft;
- wxStaticBitmap* m_bitmapUpdateLeft;
- wxStaticBitmap* m_bitmapCreateLeft;
- wxStaticBitmap* m_bitmapData;
- wxStaticBitmap* m_bitmapCreateRight;
- wxStaticBitmap* m_bitmapUpdateRight;
- wxStaticBitmap* m_bitmapDeleteRight;
- wxStaticText* m_staticTextDeleteLeft;
- wxStaticText* m_staticTextUpdateLeft;
- wxStaticText* m_staticTextCreateLeft;
- wxStaticText* m_staticTextData;
- wxStaticText* m_staticTextCreateRight;
- wxStaticText* m_staticTextUpdateRight;
- wxStaticText* m_staticTextDeleteRight;
- wxStaticLine* m_staticline381;
- wxStaticLine* m_staticline12;
- wxCheckBox* m_checkBoxDontShowAgain;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonStartSync;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, 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:
-
- SyncConfirmationDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~SyncConfirmationDlgGenerated();
+private:
+
+protected:
+ wxStaticBitmap* m_bitmapSync;
+ wxStaticText* m_staticTextCaption;
+ wxStaticLine* m_staticline371;
+ wxPanel* m_panelStatistics;
+ wxStaticLine* m_staticline38;
+ wxStaticText* m_staticText84;
+ wxStaticText* m_staticTextSyncVar;
+ wxStaticBitmap* m_bitmapSyncVar;
+ wxStaticLine* m_staticline14;
+ wxStaticText* m_staticText83;
+ wxStaticBitmap* m_bitmapDeleteLeft;
+ wxStaticBitmap* m_bitmapUpdateLeft;
+ wxStaticBitmap* m_bitmapCreateLeft;
+ wxStaticBitmap* m_bitmapData;
+ wxStaticBitmap* m_bitmapCreateRight;
+ wxStaticBitmap* m_bitmapUpdateRight;
+ wxStaticBitmap* m_bitmapDeleteRight;
+ wxStaticText* m_staticTextDeleteLeft;
+ wxStaticText* m_staticTextUpdateLeft;
+ wxStaticText* m_staticTextCreateLeft;
+ wxStaticText* m_staticTextData;
+ wxStaticText* m_staticTextCreateRight;
+ wxStaticText* m_staticTextUpdateRight;
+ wxStaticText* m_staticTextDeleteRight;
+ wxStaticLine* m_staticline381;
+ wxStaticLine* m_staticline12;
+ wxCheckBox* m_checkBoxDontShowAgain;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonStartSync;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, 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:
+
+ SyncConfirmationDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~SyncConfirmationDlgGenerated();
};
@@ -750,40 +751,40 @@ class SyncConfirmationDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class CompareProgressDlgGenerated : public wxPanel
{
- private:
-
- protected:
- wxStaticText* m_staticTextStatus;
- wxFlexGridSizer* ffgSizer11;
- wxFlexGridSizer* ffgSizer111;
- wxFlexGridSizer* ffgSizer112;
- wxStaticText* m_staticText1461;
- wxStaticText* m_staticTextRetryCount;
- wxStaticText* m_staticText146;
- wxBoxSizer* bSizerProgressGraph;
- wxFlexGridSizer* ffgSizer113;
- zen::Graph2D* m_panelProgressGraph;
-
- public:
- wxStaticText* m_staticTextProcessed;
- wxStaticText* m_staticTextRemaining;
- wxPanel* m_panelItemStats;
- wxStaticBitmap* m_bitmapItemStat;
- wxStaticText* m_staticTextItemsProcessed;
- wxStaticText* m_staticTextBytesProcessed;
- wxStaticText* m_staticTextItemsRemaining;
- wxStaticText* m_staticTextBytesRemaining;
- wxPanel* m_panelTimeStats;
- wxStaticBitmap* m_bitmapTimeStat;
- wxStaticText* m_staticTextTimeElapsed;
- wxStaticText* m_staticTextTimeRemaining;
- wxBoxSizer* bSizerErrorsRetry;
- wxStaticBitmap* m_bitmapRetryErrors;
- wxBoxSizer* bSizerErrorsIgnore;
- wxStaticBitmap* m_bitmapIgnoreErrors;
-
- CompareProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxBORDER_RAISED, const wxString& name = wxEmptyString );
- ~CompareProgressDlgGenerated();
+private:
+
+protected:
+ wxStaticText* m_staticTextStatus;
+ wxFlexGridSizer* ffgSizer11;
+ wxFlexGridSizer* ffgSizer111;
+ wxFlexGridSizer* ffgSizer112;
+ wxStaticText* m_staticText1461;
+ wxStaticText* m_staticTextRetryCount;
+ wxStaticText* m_staticText146;
+ wxBoxSizer* bSizerProgressGraph;
+ wxFlexGridSizer* ffgSizer113;
+ zen::Graph2D* m_panelProgressGraph;
+
+public:
+ wxStaticText* m_staticTextProcessed;
+ wxStaticText* m_staticTextRemaining;
+ wxPanel* m_panelItemStats;
+ wxStaticBitmap* m_bitmapItemStat;
+ wxStaticText* m_staticTextItemsProcessed;
+ wxStaticText* m_staticTextBytesProcessed;
+ wxStaticText* m_staticTextItemsRemaining;
+ wxStaticText* m_staticTextBytesRemaining;
+ wxPanel* m_panelTimeStats;
+ wxStaticBitmap* m_bitmapTimeStat;
+ wxStaticText* m_staticTextTimeElapsed;
+ wxStaticText* m_staticTextTimeRemaining;
+ wxBoxSizer* bSizerErrorsRetry;
+ wxStaticBitmap* m_bitmapRetryErrors;
+ wxBoxSizer* bSizerErrorsIgnore;
+ wxStaticBitmap* m_bitmapIgnoreErrors;
+
+ CompareProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxBORDER_RAISED, const wxString& name = wxEmptyString );
+ ~CompareProgressDlgGenerated();
};
@@ -792,60 +793,60 @@ class CompareProgressDlgGenerated : public wxPanel
///////////////////////////////////////////////////////////////////////////////
class SyncProgressPanelGenerated : public wxPanel
{
- private:
-
- protected:
- wxPanel* m_panel53;
- wxBoxSizer* bSizer42;
- wxFlexGridSizer* ffgSizer11;
- wxFlexGridSizer* ffgSizer111;
- wxFlexGridSizer* ffgSizer112;
- wxStaticText* m_staticText1461;
- wxStaticText* m_staticText146;
- wxStaticText* m_staticText137;
-
- public:
- wxBoxSizer* bSizerRoot;
- wxStaticBitmap* m_bitmapStatus;
- wxStaticText* m_staticTextPhase;
- wxBitmapButton* m_bpButtonMinimizeToTray;
- wxBoxSizer* bSizerStatusText;
- wxStaticText* m_staticTextStatus;
- wxPanel* m_panelProgress;
- zen::Graph2D* m_panelGraphBytes;
- wxStaticBitmap* m_bitmapGraphKeyBytes;
- wxStaticBitmap* m_bitmapGraphKeyItems;
- wxStaticText* m_staticTextProcessed;
- wxStaticText* m_staticTextRemaining;
- wxPanel* m_panelItemStats;
- wxStaticBitmap* m_bitmapItemStat;
- wxStaticText* m_staticTextItemsProcessed;
- wxStaticText* m_staticTextBytesProcessed;
- wxStaticText* m_staticTextItemsRemaining;
- wxStaticText* m_staticTextBytesRemaining;
- wxPanel* m_panelTimeStats;
- wxStaticBitmap* m_bitmapTimeStat;
- wxStaticText* m_staticTextTimeElapsed;
- wxStaticText* m_staticTextTimeRemaining;
- wxBoxSizer* bSizerDynSpace;
- zen::Graph2D* m_panelGraphItems;
- wxBoxSizer* bSizerProgressFooter;
- wxBoxSizer* bSizerErrorsRetry;
- wxStaticBitmap* m_bitmapRetryErrors;
- wxStaticText* m_staticTextRetryCount;
- wxBoxSizer* bSizerErrorsIgnore;
- wxStaticBitmap* m_bitmapIgnoreErrors;
- wxChoice* m_choicePostSyncAction;
- wxNotebook* m_notebookResult;
- wxStaticLine* m_staticlineFooter;
- wxBoxSizer* bSizerStdButtons;
- wxCheckBox* m_checkBoxAutoClose;
- wxButton* m_buttonClose;
- wxButton* m_buttonPause;
- wxButton* m_buttonStop;
-
- SyncProgressPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
- ~SyncProgressPanelGenerated();
+private:
+
+protected:
+ wxPanel* m_panel53;
+ wxBoxSizer* bSizer42;
+ wxFlexGridSizer* ffgSizer11;
+ wxFlexGridSizer* ffgSizer111;
+ wxFlexGridSizer* ffgSizer112;
+ wxStaticText* m_staticText1461;
+ wxStaticText* m_staticText146;
+ wxStaticText* m_staticText137;
+
+public:
+ wxBoxSizer* bSizerRoot;
+ wxStaticBitmap* m_bitmapStatus;
+ wxStaticText* m_staticTextPhase;
+ wxBitmapButton* m_bpButtonMinimizeToTray;
+ wxBoxSizer* bSizerStatusText;
+ wxStaticText* m_staticTextStatus;
+ wxPanel* m_panelProgress;
+ zen::Graph2D* m_panelGraphBytes;
+ wxStaticBitmap* m_bitmapGraphKeyBytes;
+ wxStaticBitmap* m_bitmapGraphKeyItems;
+ wxStaticText* m_staticTextProcessed;
+ wxStaticText* m_staticTextRemaining;
+ wxPanel* m_panelItemStats;
+ wxStaticBitmap* m_bitmapItemStat;
+ wxStaticText* m_staticTextItemsProcessed;
+ wxStaticText* m_staticTextBytesProcessed;
+ wxStaticText* m_staticTextItemsRemaining;
+ wxStaticText* m_staticTextBytesRemaining;
+ wxPanel* m_panelTimeStats;
+ wxStaticBitmap* m_bitmapTimeStat;
+ wxStaticText* m_staticTextTimeElapsed;
+ wxStaticText* m_staticTextTimeRemaining;
+ wxBoxSizer* bSizerDynSpace;
+ zen::Graph2D* m_panelGraphItems;
+ wxBoxSizer* bSizerProgressFooter;
+ wxBoxSizer* bSizerErrorsRetry;
+ wxStaticBitmap* m_bitmapRetryErrors;
+ wxStaticText* m_staticTextRetryCount;
+ wxBoxSizer* bSizerErrorsIgnore;
+ wxStaticBitmap* m_bitmapIgnoreErrors;
+ wxChoice* m_choicePostSyncAction;
+ wxNotebook* m_notebookResult;
+ wxStaticLine* m_staticlineFooter;
+ wxBoxSizer* bSizerStdButtons;
+ wxCheckBox* m_checkBoxAutoClose;
+ wxButton* m_buttonClose;
+ wxButton* m_buttonPause;
+ wxButton* m_buttonStop;
+
+ SyncProgressPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
+ ~SyncProgressPanelGenerated();
};
@@ -854,25 +855,25 @@ class SyncProgressPanelGenerated : public wxPanel
///////////////////////////////////////////////////////////////////////////////
class LogPanelGenerated : public wxPanel
{
- private:
+private:
- protected:
- zen::ToggleButton* m_bpButtonErrors;
- zen::ToggleButton* m_bpButtonWarnings;
- zen::ToggleButton* m_bpButtonInfo;
- wxStaticLine* m_staticline13;
+protected:
+ zen::ToggleButton* m_bpButtonErrors;
+ zen::ToggleButton* m_bpButtonWarnings;
+ zen::ToggleButton* m_bpButtonInfo;
+ wxStaticLine* m_staticline13;
- // Virtual event handlers, 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(); }
+ // 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:
- zen::Grid* m_gridMessages;
+public:
+ zen::Grid* m_gridMessages;
- LogPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
- ~LogPanelGenerated();
+ LogPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
+ ~LogPanelGenerated();
};
@@ -881,49 +882,49 @@ class LogPanelGenerated : public wxPanel
///////////////////////////////////////////////////////////////////////////////
class BatchDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmapBatchJob;
- wxStaticText* m_staticTextHeader;
- wxStaticLine* m_staticline18;
- wxPanel* m_panel35;
- wxStaticText* m_staticText146;
- wxFlexGridSizer* ffgSizer11;
- wxStaticBitmap* m_bitmapMinimizeToTray;
- wxCheckBox* m_checkBoxRunMinimized;
- wxStaticLine* m_staticline26;
- wxStaticBitmap* m_bitmapIgnoreErrors;
- wxCheckBox* m_checkBoxIgnoreErrors;
- wxRadioButton* m_radioBtnErrorDialogShow;
- wxRadioButton* m_radioBtnErrorDialogCancel;
- wxStaticLine* m_staticline261;
- wxStaticText* m_staticText137;
- wxStaticLine* m_staticline262;
- wxStaticLine* m_staticline25;
- wxHyperlinkCtrl* m_hyperlink17;
- wxStaticLine* m_staticline13;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonSaveAs;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnToggleRunMinimized( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToggleIgnoreErrors( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnErrorDialogShow( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnErrorDialogCancel( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpScheduleBatch( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
- wxCheckBox* m_checkBoxAutoClose;
- wxChoice* m_choicePostSyncAction;
-
- BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Save as a Batch Job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~BatchDlgGenerated();
+private:
+
+protected:
+ wxStaticBitmap* m_bitmapBatchJob;
+ wxStaticText* m_staticTextHeader;
+ wxStaticLine* m_staticline18;
+ wxPanel* m_panel35;
+ wxStaticText* m_staticText146;
+ wxFlexGridSizer* ffgSizer11;
+ wxStaticBitmap* m_bitmapMinimizeToTray;
+ wxCheckBox* m_checkBoxRunMinimized;
+ wxStaticLine* m_staticline26;
+ wxStaticBitmap* m_bitmapIgnoreErrors;
+ wxCheckBox* m_checkBoxIgnoreErrors;
+ wxRadioButton* m_radioBtnErrorDialogShow;
+ wxRadioButton* m_radioBtnErrorDialogCancel;
+ wxStaticLine* m_staticline261;
+ wxStaticText* m_staticText137;
+ wxStaticLine* m_staticline262;
+ wxStaticLine* m_staticline25;
+ wxHyperlinkCtrl* m_hyperlink17;
+ wxStaticLine* m_staticline13;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonSaveAs;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnToggleRunMinimized( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToggleIgnoreErrors( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnErrorDialogShow( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnErrorDialogCancel( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpScheduleBatch( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+ wxCheckBox* m_checkBoxAutoClose;
+ wxChoice* m_choicePostSyncAction;
+
+ BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Save as a Batch Job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~BatchDlgGenerated();
};
@@ -932,32 +933,32 @@ class BatchDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class DeleteDlgGenerated : public wxDialog
{
- private:
+private:
- protected:
- wxStaticBitmap* m_bitmapDeleteType;
- wxStaticText* m_staticTextHeader;
- wxStaticLine* m_staticline91;
- wxPanel* m_panel31;
- wxStaticLine* m_staticline42;
- wxTextCtrl* m_textCtrlFileList;
- wxStaticLine* m_staticline9;
- wxBoxSizer* bSizerStdButtons;
- wxCheckBox* m_checkBoxUseRecycler;
- wxButton* m_buttonOK;
- wxButton* m_buttonCancel;
+protected:
+ wxStaticBitmap* m_bitmapDeleteType;
+ wxStaticText* m_staticTextHeader;
+ wxStaticLine* m_staticline91;
+ wxPanel* m_panel31;
+ wxStaticLine* m_staticline42;
+ wxTextCtrl* m_textCtrlFileList;
+ wxStaticLine* m_staticline9;
+ wxBoxSizer* bSizerStdButtons;
+ wxCheckBox* m_checkBoxUseRecycler;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnUseRecycler( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+ // 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 OnOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
- public:
+public:
- DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Delete Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
- ~DeleteDlgGenerated();
+ DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Delete Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
+ ~DeleteDlgGenerated();
};
@@ -966,36 +967,36 @@ class DeleteDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class CopyToDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmapCopyTo;
- wxStaticText* m_staticTextHeader;
- wxStaticLine* m_staticline91;
- wxPanel* m_panel31;
- wxStaticLine* m_staticline42;
- wxTextCtrl* m_textCtrlFileList;
- wxButton* m_buttonSelectTargetFolder;
- wxStaticLine* m_staticline9;
- wxBoxSizer* bSizerStdButtons;
- wxCheckBox* m_checkBoxKeepRelPath;
- wxCheckBox* m_checkBoxOverwriteIfExists;
- wxButton* m_buttonOK;
- wxButton* m_buttonCancel;
-
- // 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 OnOK( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
- fff::FolderHistoryBox* m_targetFolderPath;
- wxBitmapButton* m_bpButtonSelectAltTargetFolder;
-
- CopyToDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Copy Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
- ~CopyToDlgGenerated();
+private:
+
+protected:
+ wxStaticBitmap* m_bitmapCopyTo;
+ wxStaticText* m_staticTextHeader;
+ wxStaticLine* m_staticline91;
+ wxPanel* m_panel31;
+ wxStaticLine* m_staticline42;
+ wxTextCtrl* m_textCtrlFileList;
+ wxButton* m_buttonSelectTargetFolder;
+ wxStaticLine* m_staticline9;
+ wxBoxSizer* bSizerStdButtons;
+ wxCheckBox* m_checkBoxKeepRelPath;
+ wxCheckBox* m_checkBoxOverwriteIfExists;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+
+ // 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 OnOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+ fff::FolderHistoryBox* m_targetFolderPath;
+ wxBitmapButton* m_bpButtonSelectAltTargetFolder;
+
+ CopyToDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Copy Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
+ ~CopyToDlgGenerated();
};
@@ -1004,100 +1005,100 @@ class CopyToDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class OptionsDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmapSettings;
- wxStaticText* m_staticText44;
- wxStaticLine* m_staticline20;
- wxPanel* m_panel39;
- wxCheckBox* m_checkBoxFailSafe;
- wxStaticText* m_staticText911;
- wxStaticText* m_staticText91;
- wxStaticText* m_staticText9111;
- wxBoxSizer* bSizerLockedFiles;
- wxCheckBox* m_checkBoxCopyLocked;
- wxStaticText* m_staticText921;
- wxStaticText* m_staticText92;
- wxStaticText* m_staticText922;
- wxCheckBox* m_checkBoxCopyPermissions;
- wxStaticText* m_staticText931;
- wxStaticText* m_staticText93;
- wxStaticText* m_staticText932;
- wxStaticLine* m_staticline39;
- wxStaticBitmap* m_bitmapWarnings;
- wxStaticText* m_staticTextResetDialogs;
- wxButton* m_buttonRestoreDialogs;
- wxStaticText* m_staticTextAllDialogsShown;
- wxStaticLine* m_staticline191;
- wxStaticBitmap* m_bitmapLogFile;
- wxStaticText* m_staticText163;
- wxHyperlinkCtrl* m_hyperlinkLogFolder;
- wxStaticLine* m_staticline83;
- wxStaticLine* m_staticline82;
- wxCheckBox* m_checkBoxLogFilesMaxAge;
- wxSpinCtrl* m_spinCtrlLogFilesMaxAge;
- wxStaticLine* m_staticline81;
- wxStaticText* m_staticText184;
- wxRadioButton* m_radioBtnLogHtml;
- wxRadioButton* m_radioBtnLogText;
- wxStaticLine* m_staticline361;
- wxStaticBitmap* m_bitmapNotificationSounds;
- wxStaticText* m_staticText851;
- wxFlexGridSizer* ffgSizer11;
- wxStaticBitmap* m_bitmapCompareDone;
- wxStaticText* m_staticText171;
- wxTextCtrl* m_textCtrlSoundPathCompareDone;
- wxButton* m_buttonSelectSoundCompareDone;
- wxBitmapButton* m_bpButtonPlayCompareDone;
- wxStaticBitmap* m_bitmapSyncDone;
- wxStaticText* m_staticText1711;
- wxTextCtrl* m_textCtrlSoundPathSyncDone;
- wxButton* m_buttonSelectSoundSyncDone;
- wxBitmapButton* m_bpButtonPlaySyncDone;
- wxStaticLine* m_staticline3611;
- wxStaticBitmap* m_bitmapConsole;
- wxStaticText* m_staticText85;
- wxBitmapButton* m_bpButtonAddRow;
- wxBitmapButton* m_bpButtonRemoveRow;
- wxStaticText* m_staticText174;
- wxStaticText* m_staticText175;
- wxStaticText* m_staticText178;
- wxStaticText* m_staticText179;
- wxStaticText* m_staticText189;
- wxStaticText* m_staticText190;
- wxStaticText* m_staticText176;
- wxStaticText* m_staticText177;
- wxHyperlinkCtrl* m_hyperlink17;
- wxGrid* m_gridCustomCommand;
- wxStaticLine* m_staticline36;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonDefault;
- wxButton* m_buttonOkay;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnRestoreDialogs( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowLogFolder( wxHyperlinkEvent& event ) { event.Skip(); }
- virtual void OnToggleLogfilesLimit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnChangeSoundFilePath( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSelectSoundCompareDone( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnPlayCompareDone( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSelectSoundSyncDone( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnPlaySyncDone( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpExternalApps( wxHyperlinkEvent& 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:
-
- OptionsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~OptionsDlgGenerated();
+private:
+
+protected:
+ wxStaticBitmap* m_bitmapSettings;
+ wxStaticText* m_staticText44;
+ wxStaticLine* m_staticline20;
+ wxPanel* m_panel39;
+ wxCheckBox* m_checkBoxFailSafe;
+ wxStaticText* m_staticText911;
+ wxStaticText* m_staticText91;
+ wxStaticText* m_staticText9111;
+ wxBoxSizer* bSizerLockedFiles;
+ wxCheckBox* m_checkBoxCopyLocked;
+ wxStaticText* m_staticText921;
+ wxStaticText* m_staticText92;
+ wxStaticText* m_staticText922;
+ wxCheckBox* m_checkBoxCopyPermissions;
+ wxStaticText* m_staticText931;
+ wxStaticText* m_staticText93;
+ wxStaticText* m_staticText932;
+ wxStaticLine* m_staticline39;
+ wxStaticBitmap* m_bitmapWarnings;
+ wxStaticText* m_staticTextResetDialogs;
+ wxButton* m_buttonRestoreDialogs;
+ wxStaticText* m_staticTextAllDialogsShown;
+ wxStaticLine* m_staticline191;
+ wxStaticBitmap* m_bitmapLogFile;
+ wxStaticText* m_staticText163;
+ wxHyperlinkCtrl* m_hyperlinkLogFolder;
+ wxStaticLine* m_staticline83;
+ wxStaticLine* m_staticline82;
+ wxCheckBox* m_checkBoxLogFilesMaxAge;
+ wxSpinCtrl* m_spinCtrlLogFilesMaxAge;
+ wxStaticLine* m_staticline81;
+ wxStaticText* m_staticText184;
+ wxRadioButton* m_radioBtnLogHtml;
+ wxRadioButton* m_radioBtnLogText;
+ wxStaticLine* m_staticline361;
+ wxStaticBitmap* m_bitmapNotificationSounds;
+ wxStaticText* m_staticText851;
+ wxFlexGridSizer* ffgSizer11;
+ wxStaticBitmap* m_bitmapCompareDone;
+ wxStaticText* m_staticText171;
+ wxTextCtrl* m_textCtrlSoundPathCompareDone;
+ wxButton* m_buttonSelectSoundCompareDone;
+ wxBitmapButton* m_bpButtonPlayCompareDone;
+ wxStaticBitmap* m_bitmapSyncDone;
+ wxStaticText* m_staticText1711;
+ wxTextCtrl* m_textCtrlSoundPathSyncDone;
+ wxButton* m_buttonSelectSoundSyncDone;
+ wxBitmapButton* m_bpButtonPlaySyncDone;
+ wxStaticLine* m_staticline3611;
+ wxStaticBitmap* m_bitmapConsole;
+ wxStaticText* m_staticText85;
+ wxBitmapButton* m_bpButtonAddRow;
+ wxBitmapButton* m_bpButtonRemoveRow;
+ wxStaticText* m_staticText174;
+ wxStaticText* m_staticText175;
+ wxStaticText* m_staticText178;
+ wxStaticText* m_staticText179;
+ wxStaticText* m_staticText189;
+ wxStaticText* m_staticText190;
+ wxStaticText* m_staticText176;
+ wxStaticText* m_staticText177;
+ wxHyperlinkCtrl* m_hyperlink17;
+ wxGrid* m_gridCustomCommand;
+ wxStaticLine* m_staticline36;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonDefault;
+ wxButton* m_buttonOkay;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnRestoreDialogs( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowLogFolder( wxHyperlinkEvent& event ) { event.Skip(); }
+ virtual void OnToggleLogfilesLimit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnChangeSoundFilePath( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSelectSoundCompareDone( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPlayCompareDone( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSelectSoundSyncDone( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPlaySyncDone( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpExternalApps( wxHyperlinkEvent& 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:
+
+ OptionsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~OptionsDlgGenerated();
};
@@ -1106,16 +1107,16 @@ class OptionsDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class TooltipDlgGenerated : public wxDialog
{
- private:
+private:
- protected:
+protected:
- public:
- wxStaticBitmap* m_bitmapLeft;
- wxStaticText* m_staticTextMain;
+public:
+ wxStaticBitmap* m_bitmapLeft;
+ wxStaticText* m_staticTextMain;
- TooltipDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~TooltipDlgGenerated();
+ TooltipDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~TooltipDlgGenerated();
};
@@ -1124,29 +1125,29 @@ class TooltipDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class SelectTimespanDlgGenerated : public wxDialog
{
- private:
+private:
- protected:
- wxPanel* m_panel35;
- wxCalendarCtrl* m_calendarFrom;
- wxCalendarCtrl* m_calendarTo;
- wxStaticLine* m_staticline21;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonOkay;
- wxButton* m_buttonCancel;
+protected:
+ wxPanel* m_panel35;
+ wxCalendarCtrl* m_calendarFrom;
+ wxCalendarCtrl* m_calendarTo;
+ wxStaticLine* m_staticline21;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonOkay;
+ wxButton* m_buttonCancel;
- // Virtual event handlers, 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(); }
+ // 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:
+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();
+ 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();
};
@@ -1155,60 +1156,60 @@ class SelectTimespanDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class AboutDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxPanel* m_panel41;
- wxStaticBitmap* m_bitmapLogoLeft;
- wxStaticLine* m_staticline81;
- wxBoxSizer* bSizerMainSection;
- wxStaticLine* m_staticline82;
- wxStaticBitmap* m_bitmapLogo;
- wxStaticLine* m_staticline341;
- wxStaticText* m_staticTextVersion;
- wxStaticLine* m_staticline3411;
- wxPanel* m_panelDonate;
- wxPanel* m_panel39;
- wxStaticBitmap* m_bitmapDonate;
- wxStaticText* m_staticTextDonate;
- wxButton* m_buttonDonate;
- wxPanel* m_panelThankYou;
- wxPanel* m_panel391;
- wxStaticBitmap* m_bitmapThanks;
- wxStaticText* m_staticTextThanks;
- wxStaticText* m_staticTextNoAutoUpdate;
- wxButton* m_buttonShowDonationDetails;
- wxStaticLine* m_staticline3412;
- wxStaticText* m_staticText94;
- wxBitmapButton* m_bpButtonForum;
- wxBitmapButton* m_bpButtonHomepage;
- wxBitmapButton* m_bpButtonEmail;
- wxStaticLine* m_staticline34;
- wxStaticText* m_staticTextGpl;
- wxBitmapButton* m_bpButtonGpl;
- wxStaticLine* m_staticline37;
- wxStaticText* m_staticTextThanksForLoc;
- wxScrolledWindow* m_scrolledWindowTranslators;
- wxFlexGridSizer* fgSizerTranslators;
- wxStaticLine* m_staticline36;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonClose;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnDonate( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowDonationDetails( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOpenForum( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOpenHomepage( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSendEmail( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowGpl( wxCommandEvent& 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();
+private:
+
+protected:
+ wxPanel* m_panel41;
+ wxStaticBitmap* m_bitmapLogoLeft;
+ wxStaticLine* m_staticline81;
+ wxBoxSizer* bSizerMainSection;
+ wxStaticLine* m_staticline82;
+ wxStaticBitmap* m_bitmapLogo;
+ wxStaticLine* m_staticline341;
+ wxStaticText* m_staticTextVersion;
+ wxStaticLine* m_staticline3411;
+ wxPanel* m_panelDonate;
+ wxPanel* m_panel39;
+ wxStaticBitmap* m_bitmapDonate;
+ wxStaticText* m_staticTextDonate;
+ wxButton* m_buttonDonate;
+ wxPanel* m_panelThankYou;
+ wxPanel* m_panel391;
+ wxStaticBitmap* m_bitmapThanks;
+ wxStaticText* m_staticTextThanks;
+ wxStaticText* m_staticTextNoAutoUpdate;
+ wxButton* m_buttonShowDonationDetails;
+ wxStaticLine* m_staticline3412;
+ wxStaticText* m_staticText94;
+ wxBitmapButton* m_bpButtonForum;
+ wxBitmapButton* m_bpButtonHomepage;
+ wxBitmapButton* m_bpButtonEmail;
+ wxStaticLine* m_staticline34;
+ wxStaticText* m_staticTextGpl;
+ wxBitmapButton* m_bpButtonGpl;
+ wxStaticLine* m_staticline37;
+ wxStaticText* m_staticTextThanksForLoc;
+ wxScrolledWindow* m_scrolledWindowTranslators;
+ wxFlexGridSizer* fgSizerTranslators;
+ wxStaticLine* m_staticline36;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonClose;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnDonate( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowDonationDetails( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOpenForum( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOpenHomepage( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSendEmail( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowGpl( wxCommandEvent& 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();
};
@@ -1217,25 +1218,25 @@ class AboutDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class DownloadProgressDlgGenerated : public wxDialog
{
- private:
+private:
- protected:
- wxStaticBitmap* m_bitmapDownloading;
- wxStaticText* m_staticTextHeader;
- wxGauge* m_gaugeProgress;
- wxStaticText* m_staticTextDetails;
- wxStaticLine* m_staticline9;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonCancel;
+protected:
+ wxStaticBitmap* m_bitmapDownloading;
+ wxStaticText* m_staticTextHeader;
+ wxGauge* m_gaugeProgress;
+ wxStaticText* m_staticTextDetails;
+ wxStaticLine* m_staticline9;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonCancel;
- // Virtual event handlers, overide them in your derived class
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
- public:
+public:
- DownloadProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 );
- ~DownloadProgressDlgGenerated();
+ DownloadProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 );
+ ~DownloadProgressDlgGenerated();
};
@@ -1244,46 +1245,46 @@ class DownloadProgressDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class ActivationDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxPanel* m_panel35;
- wxStaticBitmap* m_bitmapActivation;
- wxTextCtrl* m_textCtrlLastError;
- wxStaticText* m_staticTextMain;
- wxStaticLine* m_staticline181;
- wxStaticLine* m_staticline18111;
- wxPanel* m_panel3511;
- wxStaticText* m_staticTextMain1;
- wxStaticText* m_staticText136;
- wxButton* m_buttonActivateOnline;
- wxStaticLine* m_staticline181111;
- wxStaticLine* m_staticline181112;
- wxPanel* m_panel351;
- wxStaticText* m_staticText175;
- wxStaticText* m_staticText1361;
- wxButton* m_buttonCopyUrl;
- wxTextCtrl* m_textCtrlManualActivationUrl;
- wxStaticText* m_staticText13611;
- wxTextCtrl* m_textCtrlOfflineActivationKey;
- wxButton* m_buttonActivateOffline;
- wxStaticLine* m_staticline13;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnActivateOnline( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCopyUrl( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOfflineActivationEnter( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnActivateOffline( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- ActivationDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~ActivationDlgGenerated();
+private:
+
+protected:
+ wxPanel* m_panel35;
+ wxStaticBitmap* m_bitmapActivation;
+ wxTextCtrl* m_textCtrlLastError;
+ wxStaticText* m_staticTextMain;
+ wxStaticLine* m_staticline181;
+ wxStaticLine* m_staticline18111;
+ wxPanel* m_panel3511;
+ wxStaticText* m_staticTextMain1;
+ wxStaticText* m_staticText136;
+ wxButton* m_buttonActivateOnline;
+ wxStaticLine* m_staticline181111;
+ wxStaticLine* m_staticline181112;
+ wxPanel* m_panel351;
+ wxStaticText* m_staticText175;
+ wxStaticText* m_staticText1361;
+ wxButton* m_buttonCopyUrl;
+ wxTextCtrl* m_textCtrlManualActivationUrl;
+ wxStaticText* m_staticText13611;
+ wxTextCtrl* m_textCtrlOfflineActivationKey;
+ wxButton* m_buttonActivateOffline;
+ wxStaticLine* m_staticline13;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnActivateOnline( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCopyUrl( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOfflineActivationEnter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnActivateOffline( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ ActivationDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~ActivationDlgGenerated();
};
@@ -1292,27 +1293,27 @@ class ActivationDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class CfgHighlightDlgGenerated : public wxDialog
{
- private:
+private:
- protected:
- wxPanel* m_panel35;
- wxStaticText* m_staticTextHighlight;
- wxSpinCtrl* m_spinCtrlOverdueDays;
- wxStaticLine* m_staticline21;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonOkay;
- wxButton* m_buttonCancel;
+protected:
+ wxPanel* m_panel35;
+ wxStaticText* m_staticTextHighlight;
+ wxSpinCtrl* m_spinCtrlOverdueDays;
+ wxStaticLine* m_staticline21;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonOkay;
+ wxButton* m_buttonCancel;
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
- public:
+public:
- CfgHighlightDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Highlight Configurations"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~CfgHighlightDlgGenerated();
+ CfgHighlightDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Highlight Configurations"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~CfgHighlightDlgGenerated();
};
@@ -1321,39 +1322,39 @@ class CfgHighlightDlgGenerated : public wxDialog
///////////////////////////////////////////////////////////////////////////////
class WarnAccessRightsMissingDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmapGrantAccess;
- wxStaticText* m_staticTextDescr;
- wxStaticLine* m_staticline20;
- wxPanel* m_panel39;
- wxFlexGridSizer* ffgSizer11;
- wxStaticText* m_staticTextStep1;
- wxButton* m_buttonLocateBundle;
- wxStaticText* m_staticTextStep2;
- wxButton* m_buttonOpenSecurity;
- wxStaticText* m_staticTextStep3;
- wxStaticText* m_staticTextAllowChanges;
- wxStaticText* m_staticTextStep4;
- wxStaticText* m_staticTextGrantAccess;
- wxStaticLine* m_staticline36;
- wxCheckBox* m_checkBoxDontShowAgain;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonClose;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnShowAppBundle( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOpenSecuritySettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- WarnAccessRightsMissingDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Grant Full Disk Access"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~WarnAccessRightsMissingDlgGenerated();
+private:
+
+protected:
+ wxStaticBitmap* m_bitmapGrantAccess;
+ wxStaticText* m_staticTextDescr;
+ wxStaticLine* m_staticline20;
+ wxPanel* m_panel39;
+ wxFlexGridSizer* ffgSizer11;
+ wxStaticText* m_staticTextStep1;
+ wxButton* m_buttonLocateBundle;
+ wxStaticText* m_staticTextStep2;
+ wxButton* m_buttonOpenSecurity;
+ wxStaticText* m_staticTextStep3;
+ wxStaticText* m_staticTextAllowChanges;
+ wxStaticText* m_staticTextStep4;
+ wxStaticText* m_staticTextGrantAccess;
+ wxStaticLine* m_staticline36;
+ wxCheckBox* m_checkBoxDontShowAgain;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonClose;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnShowAppBundle( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOpenSecuritySettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ WarnAccessRightsMissingDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Grant Full Disk Access"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~WarnAccessRightsMissingDlgGenerated();
};
diff --git a/FreeFileSync/Source/ui/gui_status_handler.cpp b/FreeFileSync/Source/ui/gui_status_handler.cpp
index aa635da2..9484af2c 100644
--- a/FreeFileSync/Source/ui/gui_status_handler.cpp
+++ b/FreeFileSync/Source/ui/gui_status_handler.cpp
@@ -147,12 +147,12 @@ StatusHandlerTemporaryPanel::Result StatusHandlerTemporaryPanel::reportResults()
{
if (getAbortStatus())
{
- errorLog_.logMsg(_("Stopped"), MSG_TYPE_ERROR); //= user cancel; *not* a MSG_TYPE_FATAL_ERROR!
+ errorLog_.logMsg(_("Stopped"), MSG_TYPE_ERROR); //= user cancel
return SyncResult::aborted;
}
const ErrorLog::Stats logCount = errorLog_.getStats();
- if (logCount.error + logCount.fatal > 0)
+ if (logCount.error > 0)
return SyncResult::finishedError;
else if (logCount.warning > 0)
return SyncResult::finishedWarning;
@@ -277,14 +277,14 @@ void StatusHandlerTemporaryPanel::reportFatalError(const std::wstring& msg)
{
PauseTimers dummy(*mainDlg_.compareStatus_);
- errorLog_.logMsg(msg, MSG_TYPE_FATAL_ERROR);
+ errorLog_.logMsg(msg, MSG_TYPE_ERROR);
if (!mainDlg_.compareStatus_->getOptionIgnoreErrors())
{
forceUiUpdateNoThrow(); //noexcept! => don't throw here when error occurs during clean up!
switch (showConfirmationDialog(&mainDlg_, DialogInfoType::error,
- PopupDialogCfg().setTitle(_("Serious Error")).
+ PopupDialogCfg().setTitle(_("Error")).
setDetailInstructions(msg),
_("&Ignore"), _("Ignore &all")))
{
@@ -372,12 +372,12 @@ StatusHandlerFloatingDialog::Result StatusHandlerFloatingDialog::reportResults(c
{
if (getAbortStatus())
{
- errorLog_.logMsg(_("Stopped"), MSG_TYPE_ERROR); //= user cancel; *not* a MSG_TYPE_FATAL_ERROR!
+ errorLog_.logMsg(_("Stopped"), MSG_TYPE_ERROR); //= user cancel
return SyncResult::aborted;
}
const ErrorLog::Stats logCount = errorLog_.getStats();
- if (logCount.error + logCount.fatal > 0)
+ if (logCount.error > 0)
return SyncResult::finishedError;
else if (logCount.warning > 0)
return SyncResult::finishedWarning;
@@ -416,8 +416,8 @@ StatusHandlerFloatingDialog::Result StatusHandlerFloatingDialog::reportResults(c
//--------------------- post sync command ----------------------
if (const Zstring cmdLine = trimCpy(postSyncCommand);
!cmdLine.empty())
- if (postSyncCondition == PostSyncCondition::COMPLETION ||
- (postSyncCondition == PostSyncCondition::ERRORS) == (syncResult == SyncResult::aborted ||
+ if (postSyncCondition == PostSyncCondition::completion ||
+ (postSyncCondition == PostSyncCondition::errors) == (syncResult == SyncResult::aborted ||
syncResult == SyncResult::finishedError))
////----------------------------------------------------------------------
//::wxSetEnv(L"logfile_path", AFS::getDisplayPath(logFilePath));
@@ -632,21 +632,21 @@ void StatusHandlerFloatingDialog::reportFatalError(const std::wstring& msg)
{
PauseTimers dummy(*progressDlg_);
- errorLog_.logMsg(msg, MSG_TYPE_FATAL_ERROR);
+ errorLog_.logMsg(msg, MSG_TYPE_ERROR);
if (!progressDlg_->getOptionIgnoreErrors())
{
forceUiUpdateNoThrow(); //noexcept! => don't throw here when error occurs during clean up!
switch (showConfirmationDialog(progressDlg_->getWindowIfVisible(), DialogInfoType::error,
- PopupDialogCfg().setTitle(_("Serious Error")).
+ PopupDialogCfg().setTitle(_("Error")).
setDetailInstructions(msg),
_("&Ignore"), _("Ignore &all")))
{
- case ConfirmationButton2::accept:
+ case ConfirmationButton2::accept: //ignore
break;
- case ConfirmationButton2::acceptAll:
+ case ConfirmationButton2::acceptAll: //ignore all
progressDlg_->setOptionIgnoreErrors(true);
break;
diff --git a/FreeFileSync/Source/ui/log_panel.cpp b/FreeFileSync/Source/ui/log_panel.cpp
index e531e3a3..03279804 100644
--- a/FreeFileSync/Source/ui/log_panel.cpp
+++ b/FreeFileSync/Source/ui/log_panel.cpp
@@ -22,18 +22,18 @@ inline wxColor getColorGridLine() { return { 192, 192, 192 }; } //light grey
inline
-wxBitmap getImageButtonPressed(const char* imageName)
+wxImage getImageButtonPressed(const char* imageName)
{
- return layOver(getResourceImage("msg_button_pressed").ConvertToImage(),
- getResourceImage(imageName).ConvertToImage());
+ return layOver(loadImage("msg_button_pressed"),
+ loadImage(imageName));
}
inline
-wxBitmap getImageButtonReleased(const char* imageName)
+wxImage getImageButtonReleased(const char* imageName)
{
- return greyScale(getResourceImage(imageName)).ConvertToImage();
- //getResourceImage(utfTo<wxString>(imageName)).ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally!
+ return greyScale(loadImage(imageName));
+ //loadImage(utfTo<wxString>(imageName)).ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally!
//brighten(output, 30);
//moveImage(output, 1, 0); //move image right one pixel
@@ -178,8 +178,6 @@ public:
return _("Warning");
case MSG_TYPE_ERROR:
return _("Error");
- case MSG_TYPE_FATAL_ERROR:
- return _("Serious Error");
}
break;
@@ -200,7 +198,7 @@ public:
//-------------- draw item separation line -----------------
{
- wxDCPenChanger dummy2(dc, getColorGridLine());
+ wxDCPenChanger dummy2(dc, wxPen(getColorGridLine(), fastFromDIP(1)));
const bool drawBottomLine = [&] //don't separate multi-line messages
{
if (std::optional<MessageView::LogEntryView> nextEntry = msgView_.getEntry(row + 1))
@@ -226,20 +224,19 @@ public:
case ColumnTypeLog::category:
if (entry->firstLine)
{
- wxBitmap msgTypeIcon = [&]
+ wxImage msgTypeIcon = [&]
{
switch (entry->type)
{
case MSG_TYPE_INFO:
- return getResourceImage("msg_info_sicon");
+ return loadImage("msg_info", getDefaultMenuIconSize());
case MSG_TYPE_WARNING:
- return getResourceImage("msg_warning_sicon");
+ return loadImage("msg_warning", getDefaultMenuIconSize());
case MSG_TYPE_ERROR:
- case MSG_TYPE_FATAL_ERROR:
- return getResourceImage("msg_error_sicon");
+ return loadImage("msg_error", getDefaultMenuIconSize());
}
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}();
drawBitmapRtlNoMirror(dc, enabled ? msgTypeIcon : msgTypeIcon.ConvertToDisabled(), rectTmp, wxALIGN_CENTER);
}
@@ -264,7 +261,7 @@ public:
return 2 * getColumnGapLeft() + dc.GetTextExtent(getValue(row, colType)).GetWidth();
case ColumnTypeLog::category:
- return getResourceImage("msg_info_sicon").GetWidth();
+ return getDefaultMenuIconSize();
case ColumnTypeLog::text:
return getColumnGapLeft() + dc.GetTextExtent(getValue(row, colType)).GetWidth();
@@ -281,12 +278,12 @@ public:
static int getColumnCategoryDefaultWidth()
{
- return getResourceImage("msg_info_sicon").GetWidth();
+ return getDefaultMenuIconSize();
}
static int getRowDefaultHeight(const Grid& grid)
{
- return std::max(getResourceImage("msg_info_sicon").GetHeight(), grid.getMainWin().GetCharHeight() + fastFromDIP(2)) + 1; //+ some space + bottom border
+ return std::max(getDefaultMenuIconSize(), grid.getMainWin().GetCharHeight() + fastFromDIP(2)) + 1; //+ some space + bottom border
}
std::wstring getToolTip(size_t row, ColumnType colType) const override
@@ -360,15 +357,15 @@ void LogPanel::setLog(const std::shared_ptr<const ErrorLog>& log)
btn.SetToolTip(tooltip);
};
- initButton(*m_bpButtonErrors, "msg_error", _("Error" ) + L" (" + formatNumber(logCount.error + logCount.fatal) + L')');
- initButton(*m_bpButtonWarnings, "msg_warning", _("Warning") + L" (" + formatNumber(logCount.warning ) + L')');
- initButton(*m_bpButtonInfo, "msg_info", _("Info" ) + L" (" + formatNumber(logCount.info ) + L')');
+ initButton(*m_bpButtonErrors, "msg_error", _("Error" ) + L" (" + formatNumber(logCount.error) + L')');
+ initButton(*m_bpButtonWarnings, "msg_warning", _("Warning") + L" (" + formatNumber(logCount.warning) + L')');
+ initButton(*m_bpButtonInfo, "msg_info", _("Info" ) + L" (" + formatNumber(logCount.info) + L')');
m_bpButtonErrors ->setActive(true);
m_bpButtonWarnings->setActive(true);
- m_bpButtonInfo ->setActive(logCount.warning + logCount.error + logCount.fatal == 0);
+ m_bpButtonInfo ->setActive(logCount.warning + logCount.error == 0);
- m_bpButtonErrors ->Show(logCount.error + logCount.fatal != 0);
+ m_bpButtonErrors ->Show(logCount.error != 0);
m_bpButtonWarnings->Show(logCount.warning != 0);
m_bpButtonInfo ->Show(logCount.info != 0);
@@ -391,7 +388,7 @@ void LogPanel::updateGrid()
{
int includedTypes = 0;
if (m_bpButtonErrors->isActive())
- includedTypes |= MSG_TYPE_ERROR | MSG_TYPE_FATAL_ERROR;
+ includedTypes |= MSG_TYPE_ERROR;
if (m_bpButtonWarnings->isActive())
includedTypes |= MSG_TYPE_WARNING;
@@ -463,10 +460,10 @@ void LogPanel::onMsgGridContext(GridClickEvent& event)
}();
ContextMenu menu;
- menu.addItem(_("Copy") + L"\tCtrl+C", [this] { copySelectionToClipboard(); }, nullptr, !selection.empty());
+ menu.addItem(_("Copy") + L"\tCtrl+C", [this] { copySelectionToClipboard(); }, wxNullImage, !selection.empty());
menu.addSeparator();
- menu.addItem(_("Select all") + L"\tCtrl+A", [this] { m_gridMessages->selectAllRows(GridEventPolicy::ALLOW); }, nullptr, rowCount > 0);
+ menu.addItem(_("Select all") + L"\tCtrl+A", [this] { m_gridMessages->selectAllRows(GridEventPolicy::ALLOW); }, wxNullImage, rowCount > 0);
menu.popup(*m_gridMessages, event.mousePos_);
}
diff --git a/FreeFileSync/Source/ui/main_dlg.cpp b/FreeFileSync/Source/ui/main_dlg.cpp
index 02b22d65..bbe626ab 100644
--- a/FreeFileSync/Source/ui/main_dlg.cpp
+++ b/FreeFileSync/Source/ui/main_dlg.cpp
@@ -68,11 +68,11 @@ IconBuffer::IconSize convert(FileIconSize isize)
{
switch (isize)
{
- case FileIconSize::SMALL:
+ case FileIconSize::small:
return IconBuffer::SIZE_SMALL;
- case FileIconSize::MEDIUM:
+ case FileIconSize::medium:
return IconBuffer::SIZE_MEDIUM;
- case FileIconSize::LARGE:
+ case FileIconSize::large:
return IconBuffer::SIZE_LARGE;
}
return IconBuffer::SIZE_SMALL;
@@ -239,24 +239,40 @@ public:
namespace
{
-void updateTopButton(wxBitmapButton& btn, const wxBitmap& bmp, const wxString& variantName, bool makeGrey)
+void updateTopButton(wxBitmapButton& btn, const wxImage& img, const wxString& varName, const char* varIconName /*optional*/, bool makeGrey)
{
- wxImage labelImage = createImageFromText(btn.GetLabel(), btn.GetFont(), wxSystemSettings::GetColour(makeGrey ? wxSYS_COLOUR_GRAYTEXT : wxSYS_COLOUR_BTNTEXT));
- wxImage variantImage = createImageFromText(variantName,
- wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD),
- wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
- wxImage descrImage = stackImages(labelImage, variantImage, ImageStackLayout::vertical, ImageStackAlignment::center);
- const wxImage& iconImage = makeGrey ? greyScale(bmp.ConvertToImage()) : bmp.ConvertToImage();
+ wxImage btnIconImg = makeGrey ? greyScale(img) : img;
- wxImage dynImage = btn.GetLayoutDirection() != wxLayout_RightToLeft ?
- stackImages(iconImage, descrImage, ImageStackLayout::horizontal, ImageStackAlignment::center, fastFromDIP(5)) :
- stackImages(descrImage, iconImage, ImageStackLayout::horizontal, ImageStackAlignment::center, fastFromDIP(5));
+ wxImage btnLabelImg = createImageFromText(btn.GetLabel(), btn.GetFont(), wxSystemSettings::GetColour(makeGrey ? wxSYS_COLOUR_GRAYTEXT : wxSYS_COLOUR_BTNTEXT));
- wxSize btnSize = dynImage.GetSize() + wxSize(fastFromDIP(10), fastFromDIP(10)); //add border space
+ wxImage varLabelImg = createImageFromText(varName,
+ wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD),
+ wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
+ wxImage varImg = varLabelImg;
+ if (varIconName)
+ {
+ wxImage varIcon = mirrorIfRtl(loadImage(varIconName, -1 /*maxWidth*/, getDefaultMenuIconSize()));
+
+ if (makeGrey)
+ varIcon = greyScale(varIcon);
+
+ varImg = btn.GetLayoutDirection() != wxLayout_RightToLeft ?
+ stackImages(varLabelImg, varIcon, ImageStackLayout::horizontal, ImageStackAlignment::center, fastFromDIP(5)) :
+ stackImages(varIcon, varLabelImg, ImageStackLayout::horizontal, ImageStackAlignment::center, fastFromDIP(5));
+ }
+
+ wxImage btnImg = stackImages(btnLabelImg, varImg, ImageStackLayout::vertical, ImageStackAlignment::center);
+
+ btnImg = btn.GetLayoutDirection() != wxLayout_RightToLeft ?
+ stackImages(btnIconImg, btnImg, ImageStackLayout::horizontal, ImageStackAlignment::center, fastFromDIP(5)) :
+ stackImages(btnImg, btnIconImg, ImageStackLayout::horizontal, ImageStackAlignment::center, fastFromDIP(5));
+
+ wxSize btnSize = btnImg.GetSize() + wxSize(fastFromDIP(10), fastFromDIP(10)); //add border space
btnSize.x = std::max(btnSize.x, fastFromDIP(TOP_BUTTON_OPTIMAL_WIDTH_DIP));
- dynImage.Resize(btnSize, wxPoint() + (btnSize - dynImage.GetSize()) / 2);
- setImage(btn, wxBitmap(dynImage));
+ btnImg = resizeCanvas(btnImg, btnSize, wxALIGN_CENTER);
+
+ setImage(btn, btnImg);
}
//##################################################################################################################################
@@ -394,49 +410,46 @@ MainDialog::MainDialog(const Zstring& globalConfigFilePath,
setRelativeFontSize(*m_buttonSync, 1.4);
setRelativeFontSize(*m_buttonCancel, 1.4);
- //set icons for this dialog
SetIcon(getFfsIcon()); //set application icon
auto generateSaveAsImage = [](const char* layoverName)
{
- wxImage backImg = getResourceImage("file_save").ConvertToImage();
- const wxSize oldSize = backImg.GetSize();
+ const wxSize oldSize = loadImage("file_save").GetSize();
- backImg = shrinkImage(backImg, backImg.GetWidth() * 9 / 10);
- backImg.Resize(oldSize, wxPoint(0, oldSize.GetHeight() - backImg.GetHeight()));
+ wxImage backImg = loadImage("file_save", oldSize.GetWidth() * 9 / 10);
+ backImg = resizeCanvas(backImg, oldSize, wxALIGN_BOTTOM | wxALIGN_LEFT);
- return layOver(backImg, shrinkImage(getResourceImage(layoverName).ConvertToImage(), backImg.GetWidth() * 7 / 10), wxALIGN_TOP | wxALIGN_RIGHT);
+ return layOver(backImg, loadImage(layoverName, backImg.GetWidth() * 7 / 10), wxALIGN_TOP | wxALIGN_RIGHT);
};
- m_bpButtonCmpConfig ->SetBitmapLabel(getResourceImage("cfg_compare"));
- m_bpButtonSyncConfig->SetBitmapLabel(getResourceImage("cfg_sync"));
+ m_bpButtonCmpConfig ->SetBitmapLabel(loadImage("cfg_compare"));
+ m_bpButtonSyncConfig->SetBitmapLabel(loadImage("cfg_sync"));
- m_bpButtonCmpContext ->SetBitmapLabel(mirrorIfRtl(getResourceImage("button_arrow_right")));
- m_bpButtonFilterContext->SetBitmapLabel(mirrorIfRtl(getResourceImage("button_arrow_right")));
- m_bpButtonSyncContext ->SetBitmapLabel(mirrorIfRtl(getResourceImage("button_arrow_right")));
- m_bpButtonViewContext ->SetBitmapLabel(mirrorIfRtl(getResourceImage("button_arrow_right")));
+ m_bpButtonCmpContext ->SetBitmapLabel(mirrorIfRtl(loadImage("button_arrow_right")));
+ m_bpButtonFilterContext->SetBitmapLabel(mirrorIfRtl(loadImage("button_arrow_right")));
+ m_bpButtonSyncContext ->SetBitmapLabel(mirrorIfRtl(loadImage("button_arrow_right")));
+ m_bpButtonViewContext ->SetBitmapLabel(mirrorIfRtl(loadImage("button_arrow_right")));
- m_bpButtonNew ->SetBitmapLabel(getResourceImage("file_new"));
- m_bpButtonOpen ->SetBitmapLabel(getResourceImage("file_load"));
+ m_bpButtonNew ->SetBitmapLabel(loadImage("file_new"));
+ m_bpButtonOpen ->SetBitmapLabel(loadImage("file_load"));
m_bpButtonSaveAs ->SetBitmapLabel(generateSaveAsImage("file_sync"));
m_bpButtonSaveAsBatch->SetBitmapLabel(generateSaveAsImage("file_batch"));
- m_bpButtonAddPair ->SetBitmapLabel(getResourceImage("item_add"));
- m_bpButtonHideSearch ->SetBitmapLabel(getResourceImage("close_panel"));
- m_bpButtonShowLog ->SetBitmapLabel(getResourceImage("log_file"));
+ m_bpButtonAddPair ->SetBitmapLabel(loadImage("item_add"));
+ m_bpButtonHideSearch ->SetBitmapLabel(loadImage("close_panel"));
+ m_bpButtonShowLog ->SetBitmapLabel(loadImage("log_file"));
- m_bpButtonFilter ->SetMinSize({getResourceImage("cfg_filter").GetWidth() + fastFromDIP(27), -1}); //make the filter button wider
+ m_bpButtonFilter ->SetMinSize({loadImage("cfg_filter").GetWidth() + fastFromDIP(27), -1}); //make the filter button wider
m_textCtrlSearchTxt->SetMinSize({fastFromDIP(220), -1});
//----------------------------------------------------------------------------------------
wxImage labelImage = createImageFromText(_("Select view:"), m_bpButtonViewTypeSyncAction->GetFont(), wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
- const wxSize labelSize = labelImage.GetSize() + wxSize(fastFromDIP(10), 0); //add border space
- labelImage.Resize(labelSize, wxPoint() + (labelSize - labelImage.GetSize()) / 2);
+ labelImage = resizeCanvas(labelImage, labelImage.GetSize() + wxSize(fastFromDIP(10), 0), wxALIGN_CENTER); //add border space
auto generateViewTypeImage = [&](const char* imgName)
{
- return stackImages(labelImage, mirrorIfRtl(getResourceImage(imgName).ConvertToImage()), ImageStackLayout::vertical, ImageStackAlignment::center);
+ return stackImages(labelImage, mirrorIfRtl(loadImage(imgName)), ImageStackLayout::vertical, ImageStackAlignment::center);
};
m_bpButtonViewTypeSyncAction->init(generateViewTypeImage("viewtype_sync_action"),
generateViewTypeImage("viewtype_cmp_result"));
@@ -461,16 +474,17 @@ MainDialog::MainDialog(const Zstring& globalConfigFilePath,
m_bpButtonShowDifferent ->SetToolTip(_("Show files that are different"));
//----------------------------------------------------------------------------------------
- const wxBitmap& bmpFile = IconBuffer::genericFileIcon(IconBuffer::SIZE_SMALL);
- const wxBitmap& bmpDir = IconBuffer::genericDirIcon (IconBuffer::SIZE_SMALL);
+ const wxImage& imgFile = IconBuffer::genericFileIcon(IconBuffer::SIZE_SMALL);
+ const wxImage& imgDir = IconBuffer::genericDirIcon (IconBuffer::SIZE_SMALL);
//init log panel
setRelativeFontSize(*m_staticTextSyncResult, 1.5);
- const wxBitmap& bmpTime = getResourceImage("cmp_file_time_sicon");
- m_bitmapItemStat->SetBitmap(bmpFile);
- m_bitmapTimeStat->SetBitmap(bmpTime);
- m_bitmapItemStat->SetMinSize({-1, std::max(IconBuffer::getSize(IconBuffer::SIZE_SMALL), bmpTime.GetHeight())});
- m_bitmapTimeStat->SetMinSize({-1, std::max(IconBuffer::getSize(IconBuffer::SIZE_SMALL), bmpTime.GetHeight())});
+
+ m_bitmapItemStat->SetBitmap(imgFile);
+
+ wxImage imgTime = loadImage("time", -1 /*maxWidth*/, imgFile.GetHeight());
+ m_bitmapTimeStat->SetBitmap(imgTime);
+ m_bitmapTimeStat->SetMinSize({-1, imgFile.GetHeight()});
logPanel_ = new LogPanel(m_panelLog); //pass ownership
bSizerLog->Add(logPanel_, 1, wxEXPAND);
@@ -511,7 +525,7 @@ MainDialog::MainDialog(const Zstring& globalConfigFilePath,
wxAuiPaneInfo().Name(L"CenterPanel").CenterPane().PaneBorder(false));
//set comparison button label tentatively for m_panelTopButtons to receive final height:
- updateTopButton(*m_buttonCompare, getResourceImage("compare"), L"Dummy", false /*makeGrey*/);
+ updateTopButton(*m_buttonCompare, loadImage("compare"), L"Dummy", nullptr /*varIconName*/, false /*makeGrey*/);
m_panelTopButtons->GetSizer()->SetSizeHints(m_panelTopButtons); //~=Fit() + SetMinSize()
m_buttonCancel->SetBitmap(getTransparentPixel()); //set dummy image (can't be empty!): text-only buttons are rendered smaller on OS X!
@@ -631,36 +645,36 @@ MainDialog::MainDialog(const Zstring& globalConfigFilePath,
m_bpButtonSyncContext->SetToolTip(m_bpButtonSyncConfig->GetToolTipText());
- m_bitmapSmallDirectoryLeft ->SetBitmap(bmpDir);
- m_bitmapSmallFileLeft ->SetBitmap(bmpFile);
- m_bitmapSmallDirectoryRight->SetBitmap(bmpDir);
- m_bitmapSmallFileRight ->SetBitmap(bmpFile);
+ m_bitmapSmallDirectoryLeft ->SetBitmap(imgDir);
+ m_bitmapSmallFileLeft ->SetBitmap(imgFile);
+ m_bitmapSmallDirectoryRight->SetBitmap(imgDir);
+ m_bitmapSmallFileRight ->SetBitmap(imgFile);
- m_menuItemNew ->SetBitmap(getResourceImage("file_new_sicon"));
- m_menuItemLoad ->SetBitmap(getResourceImage("file_load_sicon"));
- m_menuItemSave ->SetBitmap(getResourceImage("file_save_sicon"));
- m_menuItemSaveAsBatch->SetBitmap(getResourceImage("file_batch_sicon"));
+ m_menuItemNew ->SetBitmap(loadImage("file_new_sicon"));
+ m_menuItemLoad ->SetBitmap(loadImage("file_load_sicon"));
+ m_menuItemSave ->SetBitmap(loadImage("file_save_sicon"));
+ m_menuItemSaveAsBatch->SetBitmap(loadImage("file_batch_sicon"));
- m_menuItemShowLog ->SetBitmap(getResourceImage("log_file_sicon"));
- m_menuItemCompare ->SetBitmap(getResourceImage("compare_sicon"));
- m_menuItemCompSettings->SetBitmap(getResourceImage("cfg_compare_sicon"));
- m_menuItemFilter ->SetBitmap(getResourceImage("cfg_filter_sicon"));
- m_menuItemSyncSettings->SetBitmap(getResourceImage("cfg_sync_sicon"));
- m_menuItemSynchronize ->SetBitmap(getResourceImage("file_sync_sicon"));
+ m_menuItemShowLog ->SetBitmap(loadImage("log_file_sicon"));
+ m_menuItemCompare ->SetBitmap(loadImage("compare_sicon"));
+ m_menuItemCompSettings->SetBitmap(loadImage("cfg_compare_sicon"));
+ m_menuItemFilter ->SetBitmap(loadImage("cfg_filter_sicon"));
+ m_menuItemSyncSettings->SetBitmap(loadImage("cfg_sync_sicon"));
+ m_menuItemSynchronize ->SetBitmap(loadImage("file_sync_sicon"));
- m_menuItemOptions ->SetBitmap(getResourceImage("settings_sicon"));
- m_menuItemFind ->SetBitmap(getResourceImage("find_sicon"));
+ m_menuItemOptions ->SetBitmap(loadImage("settings_sicon"));
+ m_menuItemFind ->SetBitmap(loadImage("find_sicon"));
- m_menuItemHelp ->SetBitmap(getResourceImage("help_sicon"));
- m_menuItemAbout->SetBitmap(getResourceImage("about_sicon"));
- m_menuItemCheckVersionNow->SetBitmap(getResourceImage("update_check_sicon"));
+ m_menuItemHelp ->SetBitmap(loadImage("help_sicon"));
+ m_menuItemAbout->SetBitmap(loadImage("about_sicon"));
+ m_menuItemCheckVersionNow->SetBitmap(loadImage("update_check_sicon"));
//create language selection menu
for (const TranslationInfo& ti : getExistingTranslations())
{
wxMenuItem* newItem = new wxMenuItem(m_menuLanguages, wxID_ANY, ti.languageName);
- newItem->SetBitmap(getResourceImage(ti.languageFlag));
+ newItem->SetBitmap(loadImage(ti.languageFlag));
m_menuLanguages->Bind(wxEVT_COMMAND_MENU_SELECTED, [this, langId = ti.languageID](wxCommandEvent&) { this->switchProgramLanguage(langId); }, newItem->GetId());
m_menuLanguages->Append(newItem); //pass ownership
@@ -708,7 +722,7 @@ MainDialog::MainDialog(const Zstring& globalConfigFilePath,
//notify about (logical) application main window => program won't quit, but stay on this dialog
- setMainWindow(this);
+ setGlobalWindow(this);
//init handling of first folder pair
firstFolderPair_ = std::make_unique<FolderPairFirst>(*this);
@@ -1879,19 +1893,19 @@ void MainDialog::onTreeButtonEvent(wxKeyEvent& event)
{
case WXK_NUMPAD_LEFT:
case WXK_LEFT: //ALT + <-
- setSyncDirManually(selection, SyncDirection::LEFT);
+ setSyncDirManually(selection, SyncDirection::left);
return;
case WXK_NUMPAD_RIGHT:
case WXK_RIGHT: //ALT + ->
- setSyncDirManually(selection, SyncDirection::RIGHT);
+ setSyncDirManually(selection, SyncDirection::right);
return;
case WXK_NUMPAD_UP:
case WXK_NUMPAD_DOWN:
case WXK_UP: /* ALT + /|\ */
case WXK_DOWN: /* ALT + \|/ */
- setSyncDirManually(selection, SyncDirection::NONE);
+ setSyncDirManually(selection, SyncDirection::none);
return;
}
@@ -1954,19 +1968,19 @@ void MainDialog::onGridButtonEvent(wxKeyEvent& event, Grid& grid, bool leftSide)
{
case WXK_NUMPAD_LEFT:
case WXK_LEFT: //ALT + <-
- setSyncDirManually(selection, SyncDirection::LEFT);
+ setSyncDirManually(selection, SyncDirection::left);
return;
case WXK_NUMPAD_RIGHT:
case WXK_RIGHT: //ALT + ->
- setSyncDirManually(selection, SyncDirection::RIGHT);
+ setSyncDirManually(selection, SyncDirection::right);
return;
case WXK_NUMPAD_UP:
case WXK_NUMPAD_DOWN:
case WXK_UP: /* ALT + /|\ */
case WXK_DOWN: /* ALT + \|/ */
- setSyncDirManually(selection, SyncDirection::NONE);
+ setSyncDirManually(selection, SyncDirection::none);
return;
}
@@ -2073,7 +2087,7 @@ void MainDialog::onLocalKeyEvent(wxKeyEvent& event) //process key events without
}
case WXK_F11:
- setViewTypeSyncAction(!m_bpButtonViewTypeSyncAction->isActive());
+ setGridViewType(m_bpButtonViewTypeSyncAction->isActive() ? GridViewType::category : GridViewType::action);
return; //-> swallow event!
//redirect certain (unhandled) keys directly to grid!
@@ -2183,7 +2197,8 @@ void MainDialog::onTreeGridSelection(GridSelectEvent& event)
markedFilesAndLinks.insert(files->filesAndLinks.begin(), files->filesAndLinks.end());
}
- filegrid::setNavigationMarker(*m_gridMainL, std::move(markedFilesAndLinks), std::move(markedContainer));
+ filegrid::setNavigationMarker(*m_gridMainL, *m_gridMainR,
+ std::move(markedFilesAndLinks), std::move(markedContainer));
event.Skip();
}
@@ -2200,9 +2215,9 @@ void MainDialog::onTreeGridContext(GridClickEvent& event)
return mirrorIfRtl(getSyncOpImage(!selection.empty() && selection[0]->getSyncOperation() != SO_EQUAL ?
selection[0]->testSyncOperation(dir) : soDefault));
};
- const wxBitmap opRight = getImage(SyncDirection::RIGHT, SO_OVERWRITE_RIGHT);
- const wxBitmap opNone = getImage(SyncDirection::NONE, SO_DO_NOTHING );
- const wxBitmap opLeft = getImage(SyncDirection::LEFT, SO_OVERWRITE_LEFT );
+ const wxImage opRight = getImage(SyncDirection::right, SO_OVERWRITE_RIGHT);
+ const wxImage opNone = getImage(SyncDirection::none, SO_DO_NOTHING );
+ const wxImage opLeft = getImage(SyncDirection::left, SO_OVERWRITE_LEFT );
wxString shortcutLeft = L"\tAlt+Left";
wxString shortcutRight = L"\tAlt+Right";
@@ -2210,9 +2225,9 @@ void MainDialog::onTreeGridContext(GridClickEvent& event)
std::swap(shortcutLeft, shortcutRight);
const bool nonEqualSelected = selectionIncludesNonEqualItem(selection);
- menu.addItem(_("Set direction:") + L" ->" + shortcutRight, [this, &selection] { setSyncDirManually(selection, SyncDirection::RIGHT); }, &opRight, nonEqualSelected);
- menu.addItem(_("Set direction:") + L" -" L"\tAlt+Down", [this, &selection] { setSyncDirManually(selection, SyncDirection::NONE); }, &opNone, nonEqualSelected);
- menu.addItem(_("Set direction:") + L" <-" + shortcutLeft, [this, &selection] { setSyncDirManually(selection, SyncDirection::LEFT); }, &opLeft, nonEqualSelected);
+ menu.addItem(_("Set direction:") + L" ->" + shortcutRight, [this, &selection] { setSyncDirManually(selection, SyncDirection::right); }, opRight, nonEqualSelected);
+ menu.addItem(_("Set direction:") + L" -" L"\tAlt+Down", [this, &selection] { setSyncDirManually(selection, SyncDirection::none); }, opNone, nonEqualSelected);
+ menu.addItem(_("Set direction:") + L" <-" + shortcutLeft, [this, &selection] { setSyncDirManually(selection, SyncDirection::left); }, opLeft, nonEqualSelected);
//Gtk needs a direction, "<-", because it has no context menu icons!
//Gtk requires "no spaces" for shortcut identifiers!
menu.addSeparator();
@@ -2237,22 +2252,22 @@ void MainDialog::onTreeGridContext(GridClickEvent& event)
labelRel += FILE_NAME_SEPARATOR;
submenu.addItem(utfTo<wxString>(labelRel), [this, &selection, include] { filterItems(selection, include); });
- menu.addSubmenu(label, submenu, &getResourceImage(iconName));
+ menu.addSubmenu(label, submenu, loadImage(iconName));
}
else if (selection.size() > 1)
{
//by relative path
menu.addItem(label + L" <" + _("multiple selection") + L">",
- [this, &selection, include] { filterItems(selection, include); }, &getResourceImage(iconName));
+ [this, &selection, include] { filterItems(selection, include); }, loadImage(iconName));
}
};
addFilterMenu(_("&Include via filter:"), "filter_include_sicon", true);
addFilterMenu(_("&Exclude via filter:"), "filter_exclude_sicon", false);
//----------------------------------------------------------------------------------------------------
if (m_bpButtonShowExcluded->isActive() && !selection.empty() && !selection[0]->isActive())
- menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setFilterManually(selection, true); }, &getResourceImage("checkbox_true"));
+ menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setFilterManually(selection, true); }, loadImage("checkbox_true"));
else
- menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setFilterManually(selection, false); }, &getResourceImage("checkbox_false"), !selection.empty());
+ menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setFilterManually(selection, false); }, loadImage("checkbox_false"), !selection.empty());
//----------------------------------------------------------------------------------------------------
const bool selectionContainsItemsToSync = [&]
{
@@ -2281,14 +2296,14 @@ void MainDialog::onTreeGridContext(GridClickEvent& event)
return false;
}();
menu.addSeparator();
- menu.addItem(_("&Synchronize selection") + L"\tEnter", [&] { startSyncForSelecction(selection); }, &getResourceImage("file_sync_selection_sicon"), selectionContainsItemsToSync);
+ menu.addItem(_("&Synchronize selection") + L"\tEnter", [&] { startSyncForSelecction(selection); }, loadImage("file_sync_selection_sicon"), selectionContainsItemsToSync);
//----------------------------------------------------------------------------------------------------
const bool haveNonEmptyItems = std::any_of(selection.begin(), selection.end(), [](const FileSystemObject* fsObj) { return !fsObj->isEmpty<LEFT_SIDE>() || !fsObj->isEmpty<RIGHT_SIDE>(); });
//menu.addSeparator();
- //menu.addItem(_("&Copy to...") + L"\tCtrl+T", [&] { copyToAlternateFolder(selection, selection); }, nullptr, haveNonEmptyItems);
+ //menu.addItem(_("&Copy to...") + L"\tCtrl+T", [&] { copyToAlternateFolder(selection, selection); }, wxNullImage, haveNonEmptyItems);
//----------------------------------------------------------------------------------------------------
menu.addSeparator();
- menu.addItem(_("&Delete") + L"\t(Shift+)Del", [&] { deleteSelectedFiles(selection, selection, true /*moveToRecycler*/); }, nullptr, haveNonEmptyItems);
+ menu.addItem(_("&Delete") + L"\t(Shift+)Del", [&] { deleteSelectedFiles(selection, selection, true /*moveToRecycler*/); }, wxNullImage, haveNonEmptyItems);
menu.popup(*m_gridOverview, event.mousePos_);
}
@@ -2319,9 +2334,9 @@ void MainDialog::onMainGridContextRim(bool leftSide, GridClickEvent& event)
return mirrorIfRtl(getSyncOpImage(!selection.empty() && selection[0]->getSyncOperation() != SO_EQUAL ?
selection[0]->testSyncOperation(dir) : soDefault));
};
- const wxBitmap opRight = getImage(SyncDirection::RIGHT, SO_OVERWRITE_RIGHT);
- const wxBitmap opNone = getImage(SyncDirection::NONE, SO_DO_NOTHING );
- const wxBitmap opLeft = getImage(SyncDirection::LEFT, SO_OVERWRITE_LEFT );
+ const wxImage opRight = getImage(SyncDirection::right, SO_OVERWRITE_RIGHT);
+ const wxImage opNone = getImage(SyncDirection::none, SO_DO_NOTHING );
+ const wxImage opLeft = getImage(SyncDirection::left, SO_OVERWRITE_LEFT );
wxString shortcutLeft = L"\tAlt+Left";
wxString shortcutRight = L"\tAlt+Right";
@@ -2329,9 +2344,9 @@ void MainDialog::onMainGridContextRim(bool leftSide, GridClickEvent& event)
std::swap(shortcutLeft, shortcutRight);
const bool nonEqualSelected = selectionIncludesNonEqualItem(selection);
- menu.addItem(_("Set direction:") + L" ->" + shortcutRight, [this, &selection] { setSyncDirManually(selection, SyncDirection::RIGHT); }, &opRight, nonEqualSelected);
- menu.addItem(_("Set direction:") + L" -" L"\tAlt+Down", [this, &selection] { setSyncDirManually(selection, SyncDirection::NONE); }, &opNone, nonEqualSelected);
- menu.addItem(_("Set direction:") + L" <-" + shortcutLeft, [this, &selection] { setSyncDirManually(selection, SyncDirection::LEFT); }, &opLeft, nonEqualSelected);
+ menu.addItem(_("Set direction:") + L" ->" + shortcutRight, [this, &selection] { setSyncDirManually(selection, SyncDirection::right); }, opRight, nonEqualSelected);
+ menu.addItem(_("Set direction:") + L" -" L"\tAlt+Down", [this, &selection] { setSyncDirManually(selection, SyncDirection::none); }, opNone, nonEqualSelected);
+ menu.addItem(_("Set direction:") + L" <-" + shortcutLeft, [this, &selection] { setSyncDirManually(selection, SyncDirection::left); }, opLeft, nonEqualSelected);
//Gtk needs a direction, "<-", because it has no context menu icons!
//Gtk requires "no spaces" for shortcut identifiers!
menu.addSeparator();
@@ -2365,22 +2380,22 @@ void MainDialog::onMainGridContextRim(bool leftSide, GridClickEvent& event)
labelRel += FILE_NAME_SEPARATOR;
submenu.addItem(utfTo<wxString>(labelRel), [this, &selection, include] { filterItems(selection, include); });
- menu.addSubmenu(label, submenu, &getResourceImage(iconName));
+ menu.addSubmenu(label, submenu, loadImage(iconName));
}
else if (selection.size() > 1)
{
//by relative path
menu.addItem(label + L" <" + _("multiple selection") + L">",
- [this, &selection, include] { filterItems(selection, include); }, &getResourceImage(iconName));
+ [this, &selection, include] { filterItems(selection, include); }, loadImage(iconName));
}
};
addFilterMenu(_("&Include via filter:"), "filter_include_sicon", true);
addFilterMenu(_("&Exclude via filter:"), "filter_exclude_sicon", false);
//----------------------------------------------------------------------------------------------------
if (m_bpButtonShowExcluded->isActive() && !selection.empty() && !selection[0]->isActive())
- menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setFilterManually(selection, true); }, &getResourceImage("checkbox_true"));
+ menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setFilterManually(selection, true); }, loadImage("checkbox_true"));
else
- menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setFilterManually(selection, false); }, &getResourceImage("checkbox_false"), !selection.empty());
+ menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setFilterManually(selection, false); }, loadImage("checkbox_false"), !selection.empty());
//----------------------------------------------------------------------------------------------------
const bool selectionContainsItemsToSync = [&]
{
@@ -2409,7 +2424,7 @@ void MainDialog::onMainGridContextRim(bool leftSide, GridClickEvent& event)
return false;
}();
menu.addSeparator();
- menu.addItem(_("&Synchronize selection") + L"\tEnter", [&] { startSyncForSelecction(selection); }, &getResourceImage("file_sync_selection_sicon"), selectionContainsItemsToSync);
+ menu.addItem(_("&Synchronize selection") + L"\tEnter", [&] { startSyncForSelecction(selection); }, loadImage("file_sync_selection_sicon"), selectionContainsItemsToSync);
//----------------------------------------------------------------------------------------------------
if (!globalCfg_.gui.externalApps.empty())
{
@@ -2433,7 +2448,7 @@ void MainDialog::onMainGridContextRim(bool leftSide, GridClickEvent& event)
else if (pos < 9)
description += L"\t" + numberTo<std::wstring>(pos);
- menu.addItem(description, openApp, nullptr, !selectionLeft.empty() || !selectionRight.empty());
+ menu.addItem(description, openApp, wxNullImage, !selectionLeft.empty() || !selectionRight.empty());
}
}
//----------------------------------------------------------------------------------------------------
@@ -2441,10 +2456,10 @@ void MainDialog::onMainGridContextRim(bool leftSide, GridClickEvent& event)
const bool haveNonEmptyItemsR = std::any_of(selectionRight.begin(), selectionRight.end(), [](const FileSystemObject* fsObj) { return !fsObj->isEmpty<RIGHT_SIDE>(); });
menu.addSeparator();
- menu.addItem(_("&Copy to...") + L"\tCtrl+T", [&] { copyToAlternateFolder(selectionLeft, selectionRight); }, nullptr, haveNonEmptyItemsL || haveNonEmptyItemsR);
+ menu.addItem(_("&Copy to...") + L"\tCtrl+T", [&] { copyToAlternateFolder(selectionLeft, selectionRight); }, wxNullImage, haveNonEmptyItemsL || haveNonEmptyItemsR);
//----------------------------------------------------------------------------------------------------
menu.addSeparator();
- menu.addItem(_("&Delete") + L"\t(Shift+)Del", [&] { deleteSelectedFiles(selectionLeft, selectionRight, true /*moveToRecycler*/); }, nullptr, haveNonEmptyItemsL || haveNonEmptyItemsR);
+ menu.addItem(_("&Delete") + L"\t(Shift+)Del", [&] { deleteSelectedFiles(selectionLeft, selectionRight, true /*moveToRecycler*/); }, wxNullImage, haveNonEmptyItemsL || haveNonEmptyItemsR);
menu.popup(leftSide ? *m_gridMainL : *m_gridMainR, event.mousePos_);
}
@@ -2544,8 +2559,8 @@ void MainDialog::onGridLabelContextC(GridLabelClickEvent& event)
ContextMenu menu;
const bool actionView = m_bpButtonViewTypeSyncAction->isActive();
- menu.addRadio(_("Category") + (actionView ? L"\tF11" : L""), [&] { setViewTypeSyncAction(false); }, !actionView);
- menu.addRadio(_("Action") + (!actionView ? L"\tF11" : L""), [&] { setViewTypeSyncAction(true ); }, actionView);
+ menu.addRadio(_("Category") + (actionView ? L"\tF11" : L""), [&] { setGridViewType(GridViewType::category); }, !actionView);
+ menu.addRadio(_("Action") + (!actionView ? L"\tF11" : L""), [&] { setGridViewType(GridViewType::action ); }, actionView);
menu.popup(*this);
}
@@ -2575,7 +2590,7 @@ void MainDialog::onGridLabelContextRim(Grid& grid, ColumnTypeRim type, bool left
Grid::ColAttributes* caToggle = nullptr;
for (Grid::ColAttributes& ca : colAttr)
- if (ca.type == static_cast<ColumnType>(ColumnTypeRim::ITEM_PATH))
+ if (ca.type == static_cast<ColumnType>(ColumnTypeRim::path))
caItemPath = &ca;
else if (ca.type == ct)
caToggle = &ca;
@@ -2597,7 +2612,7 @@ void MainDialog::onGridLabelContextRim(Grid& grid, ColumnTypeRim type, bool left
if (const GridData* prov = grid.getDataProvider())
for (const Grid::ColAttributes& ca : grid.getColumnConfig())
menu.addCheckBox(prov->getColumnLabel(ca.type), [ct = ca.type, toggleColumn] { toggleColumn(ct); },
- ca.visible, ca.type != static_cast<ColumnType>(ColumnTypeRim::ITEM_PATH)); //do not allow user to hide this column!
+ ca.visible, ca.type != static_cast<ColumnType>(ColumnTypeRim::path)); //do not allow user to hide this column!
//----------------------------------------------------------------------------------------------
menu.addSeparator();
@@ -2612,9 +2627,9 @@ void MainDialog::onGridLabelContextRim(Grid& grid, ColumnTypeRim type, bool left
{
menu.addRadio(label, [fmt, &setItemPathFormat] { setItemPathFormat(fmt); }, itemPathFormat == fmt);
};
- addFormatEntry(_("Full path" ), ItemPathFormat::FULL_PATH);
- addFormatEntry(_("Relative path"), ItemPathFormat::RELATIVE_PATH);
- addFormatEntry(_("Item name" ), ItemPathFormat::ITEM_NAME);
+ addFormatEntry(_("Item name" ), ItemPathFormat::name);
+ addFormatEntry(_("Relative path"), ItemPathFormat::relative);
+ addFormatEntry(_("Full path" ), ItemPathFormat::full);
//----------------------------------------------------------------------------------------------
menu.addSeparator();
@@ -2645,11 +2660,11 @@ void MainDialog::onGridLabelContextRim(Grid& grid, ColumnTypeRim type, bool left
{
menu.addRadio(label, [sz, &setIconSize] { setIconSize(sz, true /*showIcons*/); }, globalCfg_.gui.mainDlg.iconSize == sz, globalCfg_.gui.mainDlg.showIcons);
};
- addSizeEntry(L" " + _("Small" ), FileIconSize::SMALL );
- addSizeEntry(L" " + _("Medium"), FileIconSize::MEDIUM);
- addSizeEntry(L" " + _("Large" ), FileIconSize::LARGE );
+ addSizeEntry(L" " + _("Small" ), FileIconSize::small );
+ addSizeEntry(L" " + _("Medium"), FileIconSize::medium);
+ addSizeEntry(L" " + _("Large" ), FileIconSize::large );
//----------------------------------------------------------------------------------------------
- // if (type == ColumnTypeRim::DATE)
+ // if (type == ColumnTypeRim::date)
{
menu.addSeparator();
@@ -2754,17 +2769,13 @@ void MainDialog::OnCompSettingsContext(wxEvent& event)
auto addVariantItem = [&](CompareVariant cmpVar, const char* iconName)
{
- const wxBitmap& iconNormal = getResourceImage(iconName);
- const wxBitmap iconGrey = greyScale(iconNormal);
- menu.addItem(getVariantName(cmpVar), [&setVariant, cmpVar] { setVariant(cmpVar); }, activeCmpVar == cmpVar ? &iconNormal : &iconGrey);
- };
- addVariantItem(CompareVariant::timeSize, "cmp_file_time_sicon");
- addVariantItem(CompareVariant::content, "cmp_file_content_sicon");
- addVariantItem(CompareVariant::size, "cmp_file_size_sicon");
+ const wxImage imgSel = loadImage(iconName, -1 /*maxWidth*/, getDefaultMenuIconSize());
- //menu.addRadio(getVariantName(CompareVariant::timeSize), [&] { setVariant(CompareVariant::timeSize); }, activeCmpVar == CompareVariant::timeSize);
- //menu.addRadio(getVariantName(CompareVariant::content ), [&] { setVariant(CompareVariant::content); }, activeCmpVar == CompareVariant::content);
- //menu.addRadio(getVariantName(CompareVariant::size ), [&] { setVariant(CompareVariant::size); }, activeCmpVar == CompareVariant::size);
+ menu.addItem(getVariantName(cmpVar), [&setVariant, cmpVar] { setVariant(cmpVar); }, greyScaleIfDisabled(imgSel, activeCmpVar == cmpVar));
+ };
+ addVariantItem(CompareVariant::timeSize, "cmp_time");
+ addVariantItem(CompareVariant::content, "cmp_content");
+ addVariantItem(CompareVariant::size, "cmp_size");
menu.popup(*m_bpButtonCmpContext, { m_bpButtonCmpContext->GetSize().x, 0 });
}
@@ -2774,18 +2785,24 @@ void MainDialog::OnSyncSettingsContext(wxEvent& event)
{
ContextMenu menu;
- auto setVariant = [&](DirectionConfig::Variant var)
+ auto setVariant = [&](SyncVariant var)
{
currentCfg_.mainCfg.syncCfg.directionCfg.var = var;
applySyncDirections();
};
- const auto currentVar = getConfig().mainCfg.syncCfg.directionCfg.var;
+ const auto activeSyncVar = getConfig().mainCfg.syncCfg.directionCfg.var;
- menu.addRadio(getVariantName(DirectionConfig::TWO_WAY), [&] { setVariant(DirectionConfig::TWO_WAY); }, currentVar == DirectionConfig::TWO_WAY);
- menu.addRadio(getVariantName(DirectionConfig::MIRROR), [&] { setVariant(DirectionConfig::MIRROR); }, currentVar == DirectionConfig::MIRROR);
- menu.addRadio(getVariantName(DirectionConfig::UPDATE), [&] { setVariant(DirectionConfig::UPDATE); }, currentVar == DirectionConfig::UPDATE);
- menu.addRadio(getVariantName(DirectionConfig::CUSTOM), [&] { setVariant(DirectionConfig::CUSTOM); }, currentVar == DirectionConfig::CUSTOM);
+ auto addVariantItem = [&](SyncVariant syncVar, const char* iconName)
+ {
+ const wxImage imgSel = mirrorIfRtl(loadImage(iconName, -1 /*maxWidth*/, getDefaultMenuIconSize()));
+
+ menu.addItem(getVariantName(syncVar), [&setVariant, syncVar] { setVariant(syncVar); }, greyScaleIfDisabled(imgSel, activeSyncVar == syncVar));
+ };
+ addVariantItem(SyncVariant::twoWay, "sync_twoway");
+ addVariantItem(SyncVariant::mirror, "sync_mirror");
+ addVariantItem(SyncVariant::update, "sync_update");
+ addVariantItem(SyncVariant::custom, "sync_custom");
menu.popup(*m_bpButtonSyncContext, { m_bpButtonSyncContext->GetSize().x, 0 });
}
@@ -2860,14 +2877,14 @@ void MainDialog::updateUnsavedCfgStatus()
const bool allowSave = haveUnsavedCfg ||
activeConfigFiles_.size() > 1;
- auto makeBrightGrey = [](const wxBitmap& bmp) -> wxBitmap
+ auto makeBrightGrey = [](wxImage img)
{
- wxImage img = bmp.ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally!
+ img = img.ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally!
brighten(img, 80);
return img;
};
- setImage(*m_bpButtonSave, allowSave ? getResourceImage("file_save") : makeBrightGrey(getResourceImage("file_save")));
+ setImage(*m_bpButtonSave, allowSave ? loadImage("file_save") : makeBrightGrey(loadImage("file_save")));
m_bpButtonSave->Enable(allowSave);
m_menuItemSave->Enable(allowSave); //bitmap is automatically greyscaled on Win7 (introducing a crappy looking shift), but not on XP
@@ -3362,7 +3379,7 @@ void MainDialog::onCfgGridContext(GridClickEvent& event)
const std::vector<size_t> selectedRows = m_gridCfgHistory->getSelectedRows();
//--------------------------------------------------------------------------------------------------------
- menu.addItem(_("&Rename...") + L"\tF2", [this] { renameSelectedCfgHistoryItem (); }, nullptr, !selectedRows.empty());
+ menu.addItem(_("&Rename...") + L"\tF2", [this] { renameSelectedCfgHistoryItem (); }, wxNullImage, !selectedRows.empty());
//--------------------------------------------------------------------------------------------------------
ContextMenu submenu;
@@ -3388,10 +3405,10 @@ void MainDialog::onCfgGridContext(GridClickEvent& event)
{
wxMemoryDC dc(bmpSquare);
dc.SetBrush(!col.Ok() ? wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) : col);
- dc.SetPen(wxColor(0xdd, 0xdd, 0xdd)); //light grey
+ dc.SetPen(wxPen(wxColor(0xdd, 0xdd, 0xdd), fastFromDIP(1))); //light grey
dc.DrawRectangle(wxPoint(), bmpSquare.GetSize());
}
- submenu.addItem(name, applyBackColor, &bmpSquare, !selectedRows.empty());
+ submenu.addItem(name, applyBackColor, bmpSquare.ConvertToImage(), !selectedRows.empty());
};
addColorOption(wxNullColour, L'(' + _("&Default") + L')'); //meta options should be enclosed in parentheses
addColorOption({ 0xff, 0xd8, 0xcb }, _("Red"));
@@ -3402,9 +3419,9 @@ void MainDialog::onCfgGridContext(GridClickEvent& event)
addColorOption({ 0xf2, 0xcb, 0xff }, _("Purple"));
addColorOption({ 0xdd, 0xdd, 0xdd }, _("Grey"));
- menu.addSubmenu(_("Background color"), submenu, &getResourceImage("color_sicon"), !selectedRows.empty());
+ menu.addSubmenu(_("Background color"), submenu, loadImage("color_sicon"), !selectedRows.empty());
//--------------------------------------------------------------------------------------------------------
- menu.addItem(_("Hide configuration") + L"\tDel", [this] { deleteSelectedCfgHistoryItems(); }, nullptr, !selectedRows.empty());
+ menu.addItem(_("Hide configuration") + L"\tDel", [this] { deleteSelectedCfgHistoryItems(); }, wxNullImage, !selectedRows.empty());
//--------------------------------------------------------------------------------------------------------
menu.popup(*m_gridCfgHistory, event.mousePos_);
//event.Skip();
@@ -3554,7 +3571,7 @@ void MainDialog::setConfig(const XmlGuiConfig& newGuiCfg, const std::vector<Zstr
setAddFolderPairs(currentCfg_.mainCfg.additionalPairs);
- setViewTypeSyncAction(currentCfg_.highlightSyncAction);
+ setGridViewType(currentCfg_.gridViewType);
clearGrid(); //+ update GUI!
@@ -3578,7 +3595,7 @@ XmlGuiConfig MainDialog::getConfig() const
guiCfg.mainCfg.additionalPairs.push_back(panel->getValues());
//sync preview
- guiCfg.highlightSyncAction = m_bpButtonViewTypeSyncAction->isActive();
+ guiCfg.gridViewType = m_bpButtonViewTypeSyncAction->isActive() ? GridViewType::action : GridViewType::category;
return guiCfg;
}
@@ -3745,10 +3762,10 @@ void MainDialog::OnGlobalFilterContext(wxEvent& event)
};
ContextMenu menu;
- menu.addItem( _("Clear filter"), clearFilter, nullptr, !isNullFilter(currentCfg_.mainCfg.globalFilter));
+ menu.addItem( _("Clear filter"), clearFilter, wxNullImage, !isNullFilter(currentCfg_.mainCfg.globalFilter));
menu.addSeparator();
- menu.addItem( _("Copy"), copyFilter, nullptr, !isNullFilter(currentCfg_.mainCfg.globalFilter));
- menu.addItem( _("Paste"), pasteFilter, nullptr, filterCfgOnClipboard_.get() != nullptr);
+ menu.addItem( _("Copy"), copyFilter, wxNullImage, !isNullFilter(currentCfg_.mainCfg.globalFilter));
+ menu.addItem( _("Paste"), pasteFilter, wxNullImage, filterCfgOnClipboard_.get() != nullptr);
menu.popup(*m_bpButtonFilterContext, { m_bpButtonFilterContext->GetSize().x, 0 });
}
@@ -3756,7 +3773,7 @@ void MainDialog::OnGlobalFilterContext(wxEvent& event)
void MainDialog::OnToggleViewType(wxCommandEvent& event)
{
- setViewTypeSyncAction(!m_bpButtonViewTypeSyncAction->isActive());
+ setGridViewType(m_bpButtonViewTypeSyncAction->isActive() ? GridViewType::category : GridViewType::action);
}
@@ -3830,15 +3847,15 @@ void MainDialog::OnViewTypeContext(wxEvent& event)
};
ContextMenu menu;
- menu.addItem( _("Save as default"), saveDefault, &getResourceImage("file_save_sicon"));
- menu.popup(*this);
+ menu.addItem( _("Save as default"), saveDefault, loadImage("file_save_sicon"));
+ menu.popup(*m_bpButtonViewContext, { m_bpButtonViewContext->GetSize().x, 0 });
}
void MainDialog::updateGlobalFilterButton()
{
//global filter: test for Null-filter
- setImage(*m_bpButtonFilter, greyScaleIfDisabled(getResourceImage("cfg_filter"), !isNullFilter(currentCfg_.mainCfg.globalFilter)));
+ setImage(*m_bpButtonFilter, greyScaleIfDisabled(loadImage("cfg_filter"), !isNullFilter(currentCfg_.mainCfg.globalFilter)));
const std::wstring status = !isNullFilter(currentCfg_.mainCfg.globalFilter) ? _("Active") : _("None");
m_bpButtonFilter->SetToolTip(_("Filter") + L" (F7) (" + status + L')');
@@ -3960,8 +3977,34 @@ void MainDialog::updateGui()
updateUnsavedCfgStatus();
- updateTopButton(*m_buttonCompare, getResourceImage("compare"), getCompVariantName(getConfig().mainCfg), false /*makeGrey*/);
- updateTopButton(*m_buttonSync, getResourceImage("file_sync"), getSyncVariantName(getConfig().mainCfg), folderCmp_.empty());
+ const auto& mainCfg = getConfig().mainCfg;
+ const std::optional<CompareVariant> cmpVar = getCompVariant(mainCfg);
+ const std::optional<SyncVariant> syncVar = getSyncVariant(mainCfg);
+
+ const char* cmpVarIconName = nullptr;
+ if (cmpVar)
+ switch (*cmpVar)
+ {
+ //*INDENT-OFF*
+ case CompareVariant::timeSize: cmpVarIconName = "cmp_time"; break;
+ case CompareVariant::content: cmpVarIconName = "cmp_content"; break;
+ case CompareVariant::size: cmpVarIconName = "cmp_size"; break;
+ //*INDENT-ON*
+ }
+ const char* syncVarIconName = nullptr;
+ if (syncVar)
+ switch (*syncVar)
+ {
+ //*INDENT-OFF*
+ case SyncVariant::twoWay: syncVarIconName = "sync_twoway"; break;
+ case SyncVariant::mirror: syncVarIconName = "sync_mirror"; break;
+ case SyncVariant::update: syncVarIconName = "sync_update"; break;
+ case SyncVariant::custom: syncVarIconName = "sync_custom"; break;
+ //*INDENT-ON*
+ }
+
+ updateTopButton(*m_buttonCompare, loadImage("compare"), getVariantName(cmpVar), cmpVarIconName, false /*makeGrey*/);
+ updateTopButton(*m_buttonSync, loadImage("file_sync"), getVariantName(syncVar), syncVarIconName, folderCmp_.empty());
m_panelTopButtons->Layout();
m_menuItemExportList->Enable(!folderCmp_.empty()); //a CSV without even folder names confuses users: https://freefilesync.org/forum/viewtopic.php?t=4787
@@ -3998,7 +4041,7 @@ void MainDialog::updateStatistics()
txtControl.SetFont(fnt);
txtControl.SetLabel(valueAsString);
- bmpControl.SetBitmap(greyScaleIfDisabled(mirrorIfRtl(getResourceImage(imageName)), !isZeroValue));
+ bmpControl.SetBitmap(greyScaleIfDisabled(mirrorIfRtl(loadImage(imageName)), !isZeroValue));
}
};
@@ -4033,11 +4076,11 @@ void MainDialog::applyCompareConfig(bool setDefaultViewType)
{
case CompareVariant::timeSize:
case CompareVariant::size:
- setViewTypeSyncAction(true);
+ setGridViewType(GridViewType::action);
break;
case CompareVariant::content:
- setViewTypeSyncAction(false);
+ setGridViewType(GridViewType::category);
break;
}
}
@@ -4063,7 +4106,7 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
bool dontShowAgain = false;
if (showSyncConfirmationDlg(this, false /*syncSelection*/,
- getSyncVariantName(guiCfg.mainCfg),
+ getSyncVariant(guiCfg.mainCfg),
SyncStatistics(folderCmp_),
dontShowAgain) != ReturnSmallDlg::BUTTON_OKAY)
return;
@@ -4282,7 +4325,7 @@ void MainDialog::startSyncForSelecction(const std::vector<FileSystemObject*>& se
if (showSyncConfirmationDlg(this,
true /*syncSelection*/,
- getSyncVariantName(guiCfg.mainCfg),
+ getSyncVariant(guiCfg.mainCfg),
SyncStatistics(folderCmpSelect),
dontShowAgain) != ReturnSmallDlg::BUTTON_OKAY)
return;
@@ -4346,20 +4389,20 @@ void MainDialog::updateConfigLastRunStats(time_t lastRunTime, SyncResult result,
void MainDialog::setLastOperationLog(const ProcessSummary& summary, const std::shared_ptr<const zen::ErrorLog>& errorLog)
{
- const wxBitmap syncResultImage = [&]
+ const wxImage syncResultImage = [&]
{
switch (summary.syncResult)
{
case SyncResult::finishedSuccess:
- return getResourceImage("result_success");
+ return loadImage("result_success");
case SyncResult::finishedWarning:
- return getResourceImage("result_warning");
+ return loadImage("result_warning");
case SyncResult::finishedError:
case SyncResult::aborted:
- return getResourceImage("result_error");
+ return loadImage("result_error");
}
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}();
const wxImage logOverlayImage = [&]
@@ -4368,10 +4411,10 @@ void MainDialog::setLastOperationLog(const ProcessSummary& summary, const std::s
if (errorLog)
{
const ErrorLog::Stats logCount = errorLog->getStats();
- if (logCount.error + logCount.fatal > 0)
- return getResourceImage("msg_error_sicon").ConvertToImage();
+ if (logCount.error > 0)
+ return loadImage("msg_error", getDefaultMenuIconSize());
if (logCount.warning > 0)
- return getResourceImage("msg_warning_sicon").ConvertToImage();
+ return loadImage("msg_warning", getDefaultMenuIconSize());
}
return wxNullImage;
}();
@@ -4408,7 +4451,7 @@ void MainDialog::setLastOperationLog(const ProcessSummary& summary, const std::s
//m_panelItemStats->Layout(); //needed?
//m_panelTimeStats->Layout(); //
- setImage(*m_bpButtonShowLog, layOver(getResourceImage("log_file").ConvertToImage(), logOverlayImage, wxALIGN_BOTTOM | wxALIGN_RIGHT));
+ setImage(*m_bpButtonShowLog, layOver(loadImage("log_file"), logOverlayImage, wxALIGN_BOTTOM | wxALIGN_RIGHT));
m_bpButtonShowLog->Show(static_cast<bool>(errorLog));
}
@@ -4510,7 +4553,7 @@ void MainDialog::onGridDoubleClickRim(size_t row, bool leftSide)
void MainDialog::onGridLabelLeftClickC(GridLabelClickEvent& event)
{
const ColumnTypeCenter colType = static_cast<ColumnTypeCenter>(event.colType_);
- if (colType != ColumnTypeCenter::CHECKBOX)
+ if (colType != ColumnTypeCenter::checkbox)
{
bool sortAscending = getDefaultSortDirection(colType);
@@ -4647,14 +4690,14 @@ void MainDialog::updateGridViewData()
//accessibility: always set both foreground AND background colors!
wxImage imgCountPressed = mirrorIfRtl(createImageFromText(formatNumber(itemCount), btn.GetFont().Bold(), wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)));
wxImage imgCountReleased = mirrorIfRtl(createImageFromText(formatNumber(itemCount), btn.GetFont(), wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)));
- imgCountReleased.Resize(imgCountPressed.GetSize(), wxPoint() + (imgCountPressed.GetSize() - imgCountReleased.GetSize()) / 2); //match with imgCountPressed's bold font
+ imgCountReleased = resizeCanvas(imgCountReleased, imgCountPressed.GetSize(), wxALIGN_CENTER); //match with imgCountPressed's bold font
//add bottom/right border space
- imgCountPressed .Resize(imgCountPressed .GetSize() + wxSize(fastFromDIP(5), fastFromDIP(5)), wxPoint());
- imgCountReleased.Resize(imgCountReleased.GetSize() + wxSize(fastFromDIP(5), fastFromDIP(5)), wxPoint());
+ imgCountPressed = resizeCanvas(imgCountPressed, imgCountPressed .GetSize() + wxSize(fastFromDIP(5), fastFromDIP(5)), wxALIGN_TOP | wxALIGN_LEFT);
+ imgCountReleased = resizeCanvas(imgCountReleased, imgCountReleased.GetSize() + wxSize(fastFromDIP(5), fastFromDIP(5)), wxALIGN_TOP | wxALIGN_LEFT);
- wxImage imgCategory = getResourceImage(imgName).ConvertToImage();
- imgCategory.Resize(imgCategory.GetSize() + wxSize(fastFromDIP(5), fastFromDIP(2)), wxPoint(fastFromDIP(5), fastFromDIP(2) / 2));
+ wxImage imgCategory = loadImage(imgName);
+ imgCategory = resizeCanvas(imgCategory, imgCategory.GetSize() + wxSize(fastFromDIP(5), fastFromDIP(2)), wxALIGN_CENTER);
wxImage imgIconReleased = imgCategory.ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally!
brighten(imgIconReleased, 80);
@@ -4662,28 +4705,8 @@ void MainDialog::updateGridViewData()
wxImage imgButtonPressed = stackImages(imgCategory, imgCountPressed, ImageStackLayout::horizontal, ImageStackAlignment::bottom);
wxImage imgButtonReleased = stackImages(imgIconReleased, imgCountReleased, ImageStackLayout::horizontal, ImageStackAlignment::bottom);
- wxBitmap bmpBorderRect(imgButtonPressed.GetWidth(), imgButtonPressed.GetHeight()); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes
- {
- //draw rectangle border with gradient
- const wxColor colFrom = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
- const wxColor colTo(0x11, 0x79, 0xfe); //light blue
-
- wxMemoryDC dc(bmpBorderRect);
- dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
- wxRect rect(bmpBorderRect.GetSize());
-
- const int borderSize = fastFromDIP(3);
- for (int i = 1 ; i <= borderSize; ++i)
- {
- const wxColor colGradient((colFrom.Red () * (borderSize - i) + colTo.Red () * i) / borderSize,
- (colFrom.Green() * (borderSize - i) + colTo.Green() * i) / borderSize,
- (colFrom.Blue () * (borderSize - i) + colTo.Blue () * i) / borderSize);
- dc.SetPen(colGradient);
- dc.DrawRectangle(rect);
- rect.Deflate(1);
- }
- }
- wxImage imgBorderRect = bmpBorderRect.ConvertToImage();
+ //draw rectangle border with gradient as background
+ wxImage imgBorderRect = renderPressedButton(imgButtonPressed.GetSize()).ConvertToImage();
convertToVanillaImage(imgBorderRect);
imgButtonPressed = layOver(imgBorderRect, imgButtonPressed);
@@ -5082,10 +5105,10 @@ void MainDialog::OnShowFolderPairOptions(wxEvent& event)
const ptrdiff_t pos = it - additionalFolderPairs_.begin();
ContextMenu menu;
- menu.addItem(_("Add folder pair"), [this, pos] { insertAddFolderPair({ LocalPairConfig() }, pos); }, &getResourceImage("item_add_sicon"));
+ menu.addItem(_("Add folder pair"), [this, pos] { insertAddFolderPair({ LocalPairConfig() }, pos); }, loadImage("item_add_sicon"));
menu.addSeparator();
- menu.addItem(_("Move up" ) + L"\tAlt+Page Up", [this, pos] { moveAddFolderPairUp(pos); }, &getResourceImage("move_up_sicon"));
- menu.addItem(_("Move down") + L"\tAlt+Page Down", [this, pos] { moveAddFolderPairUp(pos + 1); }, &getResourceImage("move_down_sicon"), pos + 1 < makeSigned(additionalFolderPairs_.size()));
+ menu.addItem(_("Move up" ) + L"\tAlt+Page Up", [this, pos] { moveAddFolderPairUp(pos); }, loadImage("move_up_sicon"));
+ menu.addItem(_("Move down") + L"\tAlt+Page Down", [this, pos] { moveAddFolderPairUp(pos + 1); }, loadImage("move_down_sicon"), pos + 1 < makeSigned(additionalFolderPairs_.size()));
menu.popup(*(*it)->m_bpButtonFolderPairOptions, { (*it)->m_bpButtonFolderPairOptions->GetSize().x, 0 });
break;
@@ -5174,10 +5197,10 @@ void MainDialog::updateGuiForFolderPair()
!isNullFilter(firstFolderPair_->getFilterConfig());
//harmonize with MainDialog::showConfigDialog()!
- m_bpButtonLocalCompCfg ->Show(showLocalCfgFirstPair);
- m_bpButtonLocalSyncCfg ->Show(showLocalCfgFirstPair);
- m_bpButtonLocalFilter ->Show(showLocalCfgFirstPair);
- setImage(*m_bpButtonSwapSides, getResourceImage(showLocalCfgFirstPair ? "swap_slim" : "swap"));
+ m_bpButtonLocalCompCfg->Show(showLocalCfgFirstPair);
+ m_bpButtonLocalSyncCfg->Show(showLocalCfgFirstPair);
+ m_bpButtonLocalFilter ->Show(showLocalCfgFirstPair);
+ setImage(*m_bpButtonSwapSides, loadImage(showLocalCfgFirstPair ? "swap_slim" : "swap"));
//update sub-panel sizes for calculations below!!!
m_panelTopCenter->GetSizer()->SetSizeHints(m_panelTopCenter); //~=Fit() + SetMinSize()
@@ -5255,7 +5278,7 @@ void MainDialog::insertAddFolderPair(const std::vector<LocalPairConfig>& newPair
newPair->m_folderPathLeft ->setHistory(folderHistoryLeft_ );
newPair->m_folderPathRight->setHistory(folderHistoryRight_);
- newPair->m_bpButtonFolderPairOptions->SetBitmapLabel(getResourceImage("button_arrow_down"));
+ newPair->m_bpButtonFolderPairOptions->SetBitmapLabel(loadImage("button_arrow_down"));
//set width of left folder panel
const int width = m_panelTopLeft->GetSize().GetWidth();
@@ -5418,7 +5441,7 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event)
auto colAttrRight = m_gridMainR->getColumnConfig();
std::erase_if(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; });
- std::erase_if(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast<ColumnTypeCenter>(ca.type) == ColumnTypeCenter::CHECKBOX; });
+ std::erase_if(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast<ColumnTypeCenter>(ca.type) == ColumnTypeCenter::checkbox; });
std::erase_if(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; });
if (provLeft && provCenter && provRight)
@@ -5497,13 +5520,13 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event)
void MainDialog::OnMenuCheckVersion(wxCommandEvent& event)
{
- checkForUpdateNow(this, globalCfg_.gui.lastOnlineVersion);
+ checkForUpdateNow(*this, globalCfg_.gui.lastOnlineVersion);
}
void MainDialog::OnMenuUpdateAvailable(wxCommandEvent& event)
{
- checkForUpdateNow(this, globalCfg_.gui.lastOnlineVersion); //show changelog + handle Donation Edition auto-updater (including expiration)
+ checkForUpdateNow(*this, globalCfg_.gui.lastOnlineVersion); //show changelog + handle Donation Edition auto-updater (including expiration)
}
@@ -5521,7 +5544,7 @@ void MainDialog::OnMenuCheckVersionAutomatically(wxCommandEvent& event)
flashStatusInformation(_("Searching for program updates..."));
//synchronous update check is sufficient here:
automaticUpdateCheckEval(this, globalCfg_.gui.lastUpdateCheck, globalCfg_.gui.lastOnlineVersion,
- automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare().get()).get());
+ automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare(*this).get()).get());
}
}
@@ -5535,10 +5558,10 @@ void MainDialog::OnRegularUpdateCheck(wxIdleEvent& event)
{
flashStatusInformation(_("Searching for program updates..."));
- std::shared_ptr<UpdateCheckResultPrep> resultPrep = automaticUpdateCheckPrepare(); //run on main thread:
+ std::shared_ptr<const UpdateCheckResultPrep> resultPrep = automaticUpdateCheckPrepare(*this); //run on main thread:
guiQueue_.processAsync([resultPrep] { return automaticUpdateCheckRunAsync(resultPrep.get()); }, //run on worker thread: (long-running part of the check)
- [this] (std::shared_ptr<UpdateCheckResult>&& resultAsync)
+ [this] (std::shared_ptr<const UpdateCheckResult>&& resultAsync)
{
automaticUpdateCheckEval(this, globalCfg_.gui.lastUpdateCheck, globalCfg_.gui.lastOnlineVersion,
resultAsync.get()); //run on main thread:
@@ -5591,15 +5614,15 @@ void MainDialog::switchProgramLanguage(wxLanguage langId)
}
-void MainDialog::setViewTypeSyncAction(bool value)
+void MainDialog::setGridViewType(GridViewType vt)
{
//if (m_bpButtonViewTypeSyncAction->isActive() == value) return; support polling -> what about initialization?
- m_bpButtonViewTypeSyncAction->setActive(value);
- m_bpButtonViewTypeSyncAction->SetToolTip((value ? _("Action") : _("Category")) + L" (F11)");
+ m_bpButtonViewTypeSyncAction->setActive(vt == GridViewType::action);
+ m_bpButtonViewTypeSyncAction->SetToolTip((vt == GridViewType::action ? _("Action") : _("Category")) + L" (F11)");
//toggle display of sync preview in middle grid
- filegrid::highlightSyncAction(*m_gridMainC, value);
+ filegrid::setViewType(*m_gridMainC, vt);
updateGui();
}
diff --git a/FreeFileSync/Source/ui/main_dlg.h b/FreeFileSync/Source/ui/main_dlg.h
index ceef4712..d762f81f 100644
--- a/FreeFileSync/Source/ui/main_dlg.h
+++ b/FreeFileSync/Source/ui/main_dlg.h
@@ -140,14 +140,14 @@ private:
void OnContextSetLayout(wxMouseEvent& event);
void onLocalKeyEvent (wxKeyEvent& event);
- void OnCompSettingsContext(wxMouseEvent& event) override { OnCompSettingsContext(static_cast<wxEvent&>(event)); }
- void OnCompSettingsContext(wxCommandEvent& event) override { OnCompSettingsContext(static_cast<wxEvent&>(event)); }
- void OnSyncSettingsContext(wxMouseEvent& event) override { OnSyncSettingsContext(static_cast<wxEvent&>(event)); }
- void OnSyncSettingsContext(wxCommandEvent& event) override { OnSyncSettingsContext(static_cast<wxEvent&>(event)); }
- void OnGlobalFilterContext(wxMouseEvent& event) override { OnGlobalFilterContext(static_cast<wxEvent&>(event)); }
- void OnGlobalFilterContext(wxCommandEvent& event) override { OnGlobalFilterContext(static_cast<wxEvent&>(event)); }
- void OnViewTypeContext (wxMouseEvent& event) override { OnViewTypeContext (static_cast<wxEvent&>(event)); }
- void OnViewTypeContext (wxCommandEvent& event) override { OnViewTypeContext (static_cast<wxEvent&>(event)); }
+ void OnCompSettingsContext (wxCommandEvent& event) override { OnCompSettingsContext(static_cast<wxEvent&>(event)); }
+ void OnCompSettingsContextMouse(wxMouseEvent& event) override { OnCompSettingsContext(static_cast<wxEvent&>(event)); }
+ void OnSyncSettingsContext (wxCommandEvent& event) override { OnSyncSettingsContext(static_cast<wxEvent&>(event)); }
+ void OnSyncSettingsContextMouse(wxMouseEvent& event) override { OnSyncSettingsContext(static_cast<wxEvent&>(event)); }
+ void OnGlobalFilterContext (wxCommandEvent& event) override { OnGlobalFilterContext(static_cast<wxEvent&>(event)); }
+ void OnGlobalFilterContextMouse(wxMouseEvent& event) override { OnGlobalFilterContext(static_cast<wxEvent&>(event)); }
+ void OnViewTypeContext (wxCommandEvent& event) override { OnViewTypeContext (static_cast<wxEvent&>(event)); }
+ void OnViewTypeContextMouse (wxMouseEvent& event) override { OnViewTypeContext (static_cast<wxEvent&>(event)); }
void OnCompSettingsContext(wxEvent& event);
void OnSyncSettingsContext(wxEvent& event);
@@ -334,7 +334,7 @@ private:
//toggle to display configuration preview instead of comparison result:
//for read access use: m_bpButtonViewTypeSyncAction->isActive()
//when changing value use:
- void setViewTypeSyncAction(bool value);
+ void setGridViewType(GridViewType vt);
wxAuiManager auiMgr_; //implement dockable GUI design
diff --git a/FreeFileSync/Source/ui/progress_indicator.cpp b/FreeFileSync/Source/ui/progress_indicator.cpp
index b7820c83..218c0463 100644
--- a/FreeFileSync/Source/ui/progress_indicator.cpp
+++ b/FreeFileSync/Source/ui/progress_indicator.cpp
@@ -180,14 +180,15 @@ CompareProgressPanel::Impl::Impl(wxFrame& parentWindow) :
CompareProgressDlgGenerated(&parentWindow),
parentWindow_(parentWindow)
{
- const wxBitmap& bmpTime = getResourceImage("cmp_file_time_sicon");
- m_bitmapItemStat->SetBitmap(IconBuffer::genericFileIcon(IconBuffer::SIZE_SMALL));
- m_bitmapTimeStat->SetBitmap(bmpTime);
- m_bitmapItemStat->SetMinSize({-1, std::max(IconBuffer::getSize(IconBuffer::SIZE_SMALL), bmpTime.GetHeight())});
- m_bitmapTimeStat->SetMinSize({-1, std::max(IconBuffer::getSize(IconBuffer::SIZE_SMALL), bmpTime.GetHeight())});
+ const wxImage& imgFile = IconBuffer::genericFileIcon(IconBuffer::SIZE_SMALL);
+ m_bitmapItemStat->SetBitmap(imgFile);
- m_bitmapIgnoreErrors->SetBitmap(getResourceImage("error_ignore_active"));
- m_bitmapRetryErrors ->SetBitmap(getResourceImage("error_retry"));
+ const wxImage imgTime = loadImage("time", -1 /*maxWidth*/, imgFile.GetHeight());
+ m_bitmapTimeStat->SetBitmap(imgTime);
+ m_bitmapTimeStat->SetMinSize({-1, imgFile.GetHeight()});
+
+ m_bitmapIgnoreErrors->SetBitmap(loadImage("error_ignore_active"));
+ m_bitmapRetryErrors ->SetBitmap(loadImage("error_retry"));
//make sure that standard height matches ProcessPhase::comparingContent statistics layout (== largest)
@@ -198,10 +199,10 @@ CompareProgressPanel::Impl::Impl(wxFrame& parentWindow) :
setBaseColors(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)).
setSelectionMode(Graph2D::SELECT_NONE));
- m_panelProgressGraph->addCurve(curveDataBytes_, Graph2D::CurveAttributes().setLineWidth(1).fillPolygonArea(getColorBytes()).setColor(Graph2D::getBorderColor()));
- m_panelProgressGraph->addCurve(curveDataItems_, Graph2D::CurveAttributes().setLineWidth(1).fillPolygonArea(getColorItems()).setColor(Graph2D::getBorderColor()));
+ m_panelProgressGraph->addCurve(curveDataBytes_, Graph2D::CurveAttributes().setLineWidth(fastFromDIP(1)).fillPolygonArea(getColorBytes()).setColor(Graph2D::getBorderColor()));
+ m_panelProgressGraph->addCurve(curveDataItems_, Graph2D::CurveAttributes().setLineWidth(fastFromDIP(1)).fillPolygonArea(getColorItems()).setColor(Graph2D::getBorderColor()));
- m_panelProgressGraph->addCurve(std::make_shared<CurveDataProgressSeparatorLine>(), Graph2D::CurveAttributes().setLineWidth(1).setColor(Graph2D::getBorderColor()));
+ m_panelProgressGraph->addCurve(std::make_shared<CurveDataProgressSeparatorLine>(), Graph2D::CurveAttributes().setLineWidth(fastFromDIP(1)).setColor(Graph2D::getBorderColor()));
Layout();
m_panelItemStats->Layout();
@@ -819,16 +820,17 @@ syncStat_(&syncStat)
//set std order after button visibility was set
setStandardButtonLayout(*pnl_.bSizerStdButtons, StdButtons().setAffirmative(pnl_.m_buttonPause).setCancel(pnl_.m_buttonStop));
- pnl_.m_bpButtonMinimizeToTray->SetBitmapLabel(getResourceImage("minimize_to_tray"));
+ pnl_.m_bpButtonMinimizeToTray->SetBitmapLabel(loadImage("minimize_to_tray"));
+
+ const wxImage& imgFile = IconBuffer::genericFileIcon(IconBuffer::SIZE_SMALL);
+ pnl_.m_bitmapItemStat->SetBitmap(imgFile);
- const wxBitmap& bmpTime = getResourceImage("cmp_file_time_sicon");
- pnl_.m_bitmapItemStat->SetBitmap(IconBuffer::genericFileIcon(IconBuffer::SIZE_SMALL));
- pnl_.m_bitmapTimeStat->SetBitmap(bmpTime);
- pnl_.m_bitmapItemStat->SetMinSize({-1, std::max(IconBuffer::getSize(IconBuffer::SIZE_SMALL), bmpTime.GetHeight())});
- pnl_.m_bitmapTimeStat->SetMinSize({-1, std::max(IconBuffer::getSize(IconBuffer::SIZE_SMALL), bmpTime.GetHeight())});
+ const wxImage imgTime = loadImage("time", -1 /*maxWidth*/, imgFile.GetHeight());
+ pnl_.m_bitmapTimeStat->SetBitmap(imgTime);
+ pnl_.m_bitmapTimeStat->SetMinSize({-1, imgFile.GetHeight()});
- pnl_.m_bitmapIgnoreErrors->SetBitmap(getResourceImage("error_ignore_active"));
- pnl_.m_bitmapRetryErrors ->SetBitmap(getResourceImage("error_retry"));
+ pnl_.m_bitmapIgnoreErrors->SetBitmap(loadImage("error_ignore_active"));
+ pnl_.m_bitmapRetryErrors ->SetBitmap(loadImage("error_retry"));
//init graph
const int xLabelHeight = this->GetCharHeight() + fastFromDIP(2) /*margin*/; //use same height for both graphs to make sure they stretch evenly
@@ -845,14 +847,14 @@ syncStat_(&syncStat)
setBaseColors(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)).
setSelectionMode(Graph2D::SELECT_NONE));
- pnl_.m_panelGraphBytes->setCurve(curveDataBytesTotal_, Graph2D::CurveAttributes().setLineWidth(1).fillCurveArea(*wxWHITE).setColor(wxColor(192, 192, 192))); //medium grey
- pnl_.m_panelGraphItems->setCurve(curveDataItemsTotal_, Graph2D::CurveAttributes().setLineWidth(1).fillCurveArea(*wxWHITE).setColor(wxColor(192, 192, 192))); //medium grey
+ pnl_.m_panelGraphBytes->setCurve(curveDataBytesTotal_, Graph2D::CurveAttributes().setLineWidth(fastFromDIP(1)).fillCurveArea(*wxWHITE).setColor(wxColor(192, 192, 192))); //medium grey
+ pnl_.m_panelGraphItems->setCurve(curveDataItemsTotal_, Graph2D::CurveAttributes().setLineWidth(fastFromDIP(1)).fillCurveArea(*wxWHITE).setColor(wxColor(192, 192, 192))); //medium grey
- pnl_.m_panelGraphBytes->addCurve(curveDataBytes_, Graph2D::CurveAttributes().setLineWidth(2).fillCurveArea(getColorBytes()).setColor(getColorBytesRim()));
- pnl_.m_panelGraphItems->addCurve(curveDataItems_, Graph2D::CurveAttributes().setLineWidth(2).fillCurveArea(getColorItems()).setColor(getColorItemsRim()));
+ pnl_.m_panelGraphBytes->addCurve(curveDataBytes_, Graph2D::CurveAttributes().setLineWidth(fastFromDIP(2)).fillCurveArea(getColorBytes()).setColor(getColorBytesRim()));
+ pnl_.m_panelGraphItems->addCurve(curveDataItems_, Graph2D::CurveAttributes().setLineWidth(fastFromDIP(2)).fillCurveArea(getColorItems()).setColor(getColorItemsRim()));
- pnl_.m_panelGraphBytes->addCurve(curveDataBytesCurrent_, Graph2D::CurveAttributes().setLineWidth(2).fillCurveArea(getColorBytesBackground()).setColor(getColorBytesBackgroundRim()));
- pnl_.m_panelGraphItems->addCurve(curveDataItemsCurrent_, Graph2D::CurveAttributes().setLineWidth(2).fillCurveArea(getColorItemsBackground()).setColor(getColorItemsBackgroundRim()));
+ pnl_.m_panelGraphBytes->addCurve(curveDataBytesCurrent_, Graph2D::CurveAttributes().setLineWidth(fastFromDIP(2)).fillCurveArea(getColorBytesBackground()).setColor(getColorBytesBackgroundRim()));
+ pnl_.m_panelGraphItems->addCurve(curveDataItemsCurrent_, Graph2D::CurveAttributes().setLineWidth(fastFromDIP(2)).fillCurveArea(getColorItemsBackground()).setColor(getColorItemsBackgroundRim()));
//graph legend:
auto generateSquareBitmap = [&](const wxColor& fillCol, const wxColor& borderCol)
@@ -861,7 +863,7 @@ syncStat_(&syncStat)
{
wxMemoryDC dc(bmpSquare);
dc.SetBrush(fillCol);
- dc.SetPen(borderCol);
+ dc.SetPen(wxPen(borderCol, fastFromDIP(1)));
dc.DrawRectangle(wxPoint(), bmpSquare.GetSize());
}
return bmpSquare;
@@ -1207,26 +1209,26 @@ void SyncProgressDialogImpl<TopLevelDialog>::updateStaticGui() //depends on "syn
pnl_.m_staticTextPhase->SetLabel(getDialogPhaseText(*syncStat_, paused_));
//pnl_.m_bitmapStatus->SetToolTip(); -> redundant
- const wxBitmap statusImage = [&]
+ const wxImage statusImage = [&]
{
if (paused_)
- return getResourceImage("status_pause");
+ return loadImage("status_pause");
if (syncStat_->getAbortStatus())
- return getResourceImage("result_error");
+ return loadImage("result_error");
switch (syncStat_->currentPhase())
{
case ProcessPhase::none:
case ProcessPhase::scanning:
- return getResourceImage("status_scanning");
+ return loadImage("status_scanning");
case ProcessPhase::comparingContent:
- return getResourceImage("status_binary_compare");
+ return loadImage("status_binary_compare");
case ProcessPhase::synchronizing:
- return getResourceImage("status_syncing");
+ return loadImage("status_syncing");
}
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}();
pnl_.m_bitmapStatus->SetBitmap(statusImage);
@@ -1316,20 +1318,20 @@ void SyncProgressDialogImpl<TopLevelDialog>::showSummary(SyncResult syncResult,
syncStat_ = nullptr;
//----------------------------------
- const wxBitmap statusImage = [&]
+ const wxImage statusImage = [&]
{
switch (syncResult)
{
case SyncResult::finishedSuccess:
- return getResourceImage("result_success");
+ return loadImage("result_success");
case SyncResult::finishedWarning:
- return getResourceImage("result_warning");
+ return loadImage("result_warning");
case SyncResult::finishedError:
case SyncResult::aborted:
- return getResourceImage("result_error");
+ return loadImage("result_error");
}
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}();
pnl_.m_bitmapStatus->SetBitmap(statusImage);
@@ -1403,21 +1405,21 @@ void SyncProgressDialogImpl<TopLevelDialog>::showSummary(SyncResult syncResult,
//show log instead of graph if errors occurred! (not required for ignored warnings)
const ErrorLog::Stats logCount = log.ref().getStats();
- if (logCount.error + logCount.fatal > 0)
+ if (logCount.error > 0)
pnl_.m_notebookResult->ChangeSelection(pagePosLog);
//fill image list to cope with wxNotebook image setting design desaster...
- const int imgListSize = getResourceImage("log_file_sicon").GetHeight();
+ const int imgListSize = loadImage("log_file_sicon").GetHeight();
auto imgList = std::make_unique<wxImageList>(imgListSize, imgListSize);
- auto addToImageList = [&](const wxBitmap& bmp)
+ auto addToImageList = [&](const wxImage& img)
{
- assert(bmp.GetWidth () <= imgListSize);
- assert(bmp.GetHeight() <= imgListSize);
- imgList->Add(bmp);
+ assert(img.GetWidth () <= imgListSize);
+ assert(img.GetHeight() <= imgListSize);
+ imgList->Add(img);
};
- addToImageList(getResourceImage("progress_sicon"));
- addToImageList(getResourceImage("log_file_sicon"));
+ addToImageList(loadImage("progress_sicon"));
+ addToImageList(loadImage("log_file_sicon"));
pnl_.m_notebookResult->AssignImageList(imgList.release()); //pass ownership
diff --git a/FreeFileSync/Source/ui/search_grid.cpp b/FreeFileSync/Source/ui/search_grid.cpp
index 86ea8bb6..25154725 100644
--- a/FreeFileSync/Source/ui/search_grid.cpp
+++ b/FreeFileSync/Source/ui/search_grid.cpp
@@ -7,7 +7,7 @@
#include "search_grid.h"
#include <zen/zstring.h>
#include <zen/utf.h>
-#include <zen/perf.h>
+//#include <zen/perf.h>
using namespace zen;
using namespace fff;
@@ -15,46 +15,55 @@ using namespace fff;
namespace
{
-inline std::wstring getUnicodeNormalFormWide(const std::wstring& str) { return utfTo<std::wstring>(getUnicodeNormalForm(utfTo<Zstring>(str))); }
-inline std::wstring makeUpperCopyWide (const std::wstring& str) { return utfTo<std::wstring>(makeUpperCopy (utfTo<Zstring>(str))); }
+template <bool respectCase> inline
+void normalizeForSeach(std::wstring& str)
+{
+ for (wchar_t& c : str)
+ if (!isAsciiChar(c))
+ {
+ str = utfTo<std::wstring>(getUnicodeNormalForm(utfTo<Zstring>(str)));
+ std::replace(str.begin(), str.end(), L'\\', L'/');
+ return;
+ }
+ else if (c == L'\\')
+ c = L'/';
+}
+
+
+template <> inline
+void normalizeForSeach<false>(std::wstring& str)
+{
+ for (wchar_t& c : str)
+ if (!isAsciiChar(c))
+ {
+ str = utfTo<std::wstring>(getUpperCase(utfTo<Zstring>(str))); //getUnicodeNormalForm() is implied by getUpperCase()
+ std::replace(str.begin(), str.end(), L'\\', L'/');
+ return;
+ }
+ else if (c == L'\\')
+ c = L'/';
+ else
+ c = asciiToUpper(c);
+}
template <bool respectCase>
class MatchFound
{
public:
- MatchFound(const std::wstring& textToFind) : textToFind_(getUnicodeNormalFormWide(textToFind)) {}
- bool operator()(const std::wstring& phrase) const
+ MatchFound(const std::wstring& textToFind) : textToFind_(textToFind)
{
- if (isAsciiString(phrase)) //perf: save Zstring conversion for getUnicodeNormalFormWide() when not needed
- return contains(phrase, textToFind_);
- else
- return contains(getUnicodeNormalFormWide(phrase), textToFind_);
+ normalizeForSeach<respectCase>(textToFind_);
}
-private:
- const std::wstring textToFind_;
-};
-
-
-template <>
-class MatchFound<false>
-{
-public:
- MatchFound(const std::wstring& textToFind) : textToFind_(makeUpperCopyWide(textToFind)) {}
bool operator()(std::wstring&& phrase) const
{
- if (isAsciiString(phrase)) //perf: save Zstring conversion for makeUpperCopyWide() when not needed
- {
- for (wchar_t& c : phrase) c = asciiToUpper(c);
- return contains(phrase, textToFind_);
- }
- else
- return contains(makeUpperCopyWide(phrase), textToFind_); //getUnicodeNormalForm() is implied by makeUpperCopy()
+ normalizeForSeach<respectCase>(phrase);
+ return contains(phrase, textToFind_);
}
private:
- const std::wstring textToFind_;
+ std::wstring textToFind_;
};
//###########################################################################################
diff --git a/FreeFileSync/Source/ui/small_dlgs.cpp b/FreeFileSync/Source/ui/small_dlgs.cpp
index 7adfcc57..69a1da25 100644
--- a/FreeFileSync/Source/ui/small_dlgs.cpp
+++ b/FreeFileSync/Source/ui/small_dlgs.cpp
@@ -77,8 +77,8 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
assert(m_buttonClose->GetId() == wxID_OK); //we cannot use wxID_CLOSE else Esc key won't work: yet another wxWidgets bug??
- m_bitmapLogo ->SetBitmap(getResourceImage("logo"));
- m_bitmapLogoLeft->SetBitmap(getResourceImage("logo-left"));
+ m_bitmapLogo ->SetBitmap(loadImage("logo"));
+ m_bitmapLogoLeft->SetBitmap(loadImage("logo-left"));
//------------------------------------
@@ -105,23 +105,23 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
//------------------------------------
{
m_panelThankYou->Hide();
- m_bitmapDonate->SetBitmap(getResourceImage("ffs_heart"));
+ m_bitmapDonate->SetBitmap(loadImage("ffs_heart"));
setRelativeFontSize(*m_staticTextDonate, 1.25);
setRelativeFontSize(*m_buttonDonate, 1.25);
}
//------------------------------------
- wxImage forumImage = stackImages(getResourceImage("ffs_forum").ConvertToImage(),
+ wxImage forumImage = stackImages(loadImage("ffs_forum"),
createImageFromText(L"FreeFileSync Forum", *wxNORMAL_FONT, m_bpButtonForum->GetForegroundColour()),
ImageStackLayout::vertical, ImageStackAlignment::center, fastFromDIP(5));
- m_bpButtonForum->SetBitmapLabel(wxBitmap(forumImage));
+ m_bpButtonForum->SetBitmapLabel(forumImage);
- setBitmapTextLabel(*m_bpButtonHomepage, getResourceImage("ffs_homepage").ConvertToImage(), L"FreeFileSync.org");
- setBitmapTextLabel(*m_bpButtonEmail, getResourceImage("ffs_email" ).ConvertToImage(), L"zenju@" L"freefilesync.org");
+ setBitmapTextLabel(*m_bpButtonHomepage, loadImage("ffs_homepage"), L"FreeFileSync.org");
+ setBitmapTextLabel(*m_bpButtonEmail, loadImage("ffs_email" ), L"zenju@" L"freefilesync.org");
m_bpButtonEmail->SetToolTip(L"mailto:zenju@" L"freefilesync.org");
//------------------------------------
- m_bpButtonGpl->SetBitmapLabel(getResourceImage("gpl"));
+ m_bpButtonGpl->SetBitmapLabel(loadImage("gpl"));
//have the GPL text wrap to two lines:
wxMemoryDC dc;
@@ -136,7 +136,7 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
for (const TranslationInfo& ti : getExistingTranslations())
{
//country flag
- wxStaticBitmap* staticBitmapFlag = new wxStaticBitmap(m_scrolledWindowTranslators, wxID_ANY, getResourceImage(ti.languageFlag));
+ wxStaticBitmap* staticBitmapFlag = new wxStaticBitmap(m_scrolledWindowTranslators, wxID_ANY, wxBitmap(loadImage(ti.languageFlag)));
fgSizerTranslators->Add(staticBitmapFlag, 0, wxALIGN_CENTER);
//translator name
@@ -225,8 +225,8 @@ private:
};
CloudType type_ = CloudType::gdrive;
- const wxString textLoading_ = L'(' + _("Loading...") + L')';
- const wxString textMyDrive_ = _("My Drive");
+ const wxString txtLoading_ = L'(' + _("Loading...") + L')';
+ const wxString txtMyDrive_ = _("My Drive");
const SftpLogin sftpDefault_;
@@ -247,7 +247,7 @@ CloudSetupDlg::CloudSetupDlg(wxWindow* parent, Zstring& folderPathPhrase, size_t
{
setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonOkay).setCancel(m_buttonCancel));
- m_toggleBtnGdrive->SetBitmap(getResourceImage("google_drive"));
+ m_toggleBtnGdrive->SetBitmap(loadImage("google_drive"));
m_toggleBtnSftp ->SetBitmap(getTransparentPixel()); //set dummy image (can't be empty!): text-only buttons are rendered smaller on OS X!
m_toggleBtnFtp ->SetBitmap(getTransparentPixel()); //
@@ -255,14 +255,14 @@ CloudSetupDlg::CloudSetupDlg(wxWindow* parent, Zstring& folderPathPhrase, size_t
setRelativeFontSize(*m_toggleBtnSftp, 1.25);
setRelativeFontSize(*m_toggleBtnFtp, 1.25);
- setBitmapTextLabel(*m_buttonGdriveAddUser, shrinkImage(getResourceImage("user_add" ).ConvertToImage(), fastFromDIP(20)), m_buttonGdriveAddUser ->GetLabel());
- setBitmapTextLabel(*m_buttonGdriveRemoveUser, shrinkImage(getResourceImage("user_remove").ConvertToImage(), fastFromDIP(20)), m_buttonGdriveRemoveUser->GetLabel());
+ setBitmapTextLabel(*m_buttonGdriveAddUser, loadImage("user_add", fastFromDIP(20)), m_buttonGdriveAddUser ->GetLabel());
+ setBitmapTextLabel(*m_buttonGdriveRemoveUser, loadImage("user_remove", fastFromDIP(20)), m_buttonGdriveRemoveUser->GetLabel());
- m_bitmapGdriveUser ->SetBitmap(shrinkImage(getResourceImage("user" ).ConvertToImage(), fastFromDIP(20)));
- m_bitmapGdriveDrive->SetBitmap(shrinkImage(getResourceImage("drive" ).ConvertToImage(), fastFromDIP(20)));
- m_bitmapServer ->SetBitmap(shrinkImage(getResourceImage("server").ConvertToImage(), fastFromDIP(20)));
- m_bitmapCloud ->SetBitmap(getResourceImage("cloud"));
- m_bitmapPerf ->SetBitmap(getResourceImage("speed"));
+ m_bitmapGdriveUser ->SetBitmap(loadImage("user", fastFromDIP(20)));
+ m_bitmapGdriveDrive->SetBitmap(loadImage("drive", fastFromDIP(20)));
+ m_bitmapServer ->SetBitmap(loadImage("server", fastFromDIP(20)));
+ m_bitmapCloud ->SetBitmap(loadImage("cloud"));
+ m_bitmapPerf ->SetBitmap(loadImage("speed"));
m_bitmapServerDir->SetBitmap(IconBuffer::genericDirIcon(IconBuffer::SIZE_SMALL));
m_checkBoxShowPassword->SetValue(false);
@@ -465,7 +465,7 @@ void CloudSetupDlg::OnGdriveUserSelect(wxCommandEvent& event)
void CloudSetupDlg::gdriveUpdateDrivesAndSelect(const std::string& accountEmail, const Zstring& sharedDriveName)
{
m_listBoxGdriveDrives->Clear();
- m_listBoxGdriveDrives->Append(textLoading_);
+ m_listBoxGdriveDrives->Append(txtLoading_);
guiQueue_.processAsync([accountEmail]() -> std::variant<std::vector<Zstring /*sharedDriveName*/>, FileError>
{
@@ -475,20 +475,24 @@ void CloudSetupDlg::gdriveUpdateDrivesAndSelect(const std::string& accountEmail,
}
catch (const FileError& e) { return e; }
},
- [this, sharedDriveName](const std::variant<std::vector<Zstring /*sharedDriveName*/>, FileError>& result)
+ [this, accountEmail, sharedDriveName](const std::variant<std::vector<Zstring /*sharedDriveName*/>, FileError>& result)
{
+ if (const int selPos = m_listBoxGdriveUsers->GetSelection();
+ selPos == wxNOT_FOUND || utfTo<std::string>(m_listBoxGdriveUsers->GetString(selPos)) != accountEmail)
+ return; //different accountEmail selected in the meantime!
+
m_listBoxGdriveDrives->Clear();
if (const FileError* e = std::get_if<FileError>(&result))
showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e->toString()));
else
{
- m_listBoxGdriveDrives->Append(textMyDrive_);
+ m_listBoxGdriveDrives->Append(txtMyDrive_);
for (const Zstring& driveName : std::get<std::vector<Zstring>>(result))
m_listBoxGdriveDrives->Append(utfTo<wxString>(driveName));
- const wxString driveNameLabel = sharedDriveName.empty() ? textMyDrive_ : utfTo<wxString>(sharedDriveName);
+ const wxString driveNameLabel = sharedDriveName.empty() ? txtMyDrive_ : utfTo<wxString>(sharedDriveName);
if (const int selPos = m_listBoxGdriveDrives->FindString(driveNameLabel, true /*caseSensitive*/);
selPos != wxNOT_FOUND)
@@ -658,8 +662,8 @@ AbstractPath CloudSetupDlg::getFolderPath() const
selPos2 != wxNOT_FOUND)
{
if (const wxString& sharedDriveName = m_listBoxGdriveDrives->GetString(selPos2);
- sharedDriveName != textMyDrive_ &&
- sharedDriveName != textLoading_)
+ sharedDriveName != txtMyDrive_ &&
+ sharedDriveName != txtLoading_)
login.sharedDriveName = utfTo<Zstring>(sharedDriveName);
}
}
@@ -798,7 +802,7 @@ CopyToDialog::CopyToDialog(wxWindow* parent,
setMainInstructionFont(*m_staticTextHeader);
- m_bitmapCopyTo->SetBitmap(getResourceImage("copy_to"));
+ m_bitmapCopyTo->SetBitmap(loadImage("copy_to"));
targetFolder = std::make_unique<FolderSelector>(this, *this, *m_buttonSelectTargetFolder, *m_bpButtonSelectAltTargetFolder, *m_targetFolderPath, nullptr /*staticText*/, nullptr /*wxWindow*/,
nullptr /*droppedPathsFilter*/,
@@ -953,14 +957,14 @@ void DeleteDialog::updateGui()
{
header = _P("Do you really want to move the following item to the recycle bin?",
"Do you really want to move the following %x items to the recycle bin?", itemCount);
- m_bitmapDeleteType->SetBitmap(getResourceImage("delete_recycler"));
+ m_bitmapDeleteType->SetBitmap(loadImage("delete_recycler"));
m_buttonOK->SetLabel(_("Move")); //no access key needed: use ENTER!
}
else
{
header = _P("Do you really want to delete the following item?",
"Do you really want to delete the following %x items?", itemCount);
- m_bitmapDeleteType->SetBitmap(getResourceImage("delete_permanently"));
+ m_bitmapDeleteType->SetBitmap(loadImage("delete_permanently"));
m_buttonOK->SetLabel(replaceCpy(_("&Delete"), L"&", L""));
}
m_staticTextHeader->SetLabel(header);
@@ -1016,7 +1020,7 @@ class SyncConfirmationDlg : public SyncConfirmationDlgGenerated
public:
SyncConfirmationDlg(wxWindow* parent,
bool syncSelection,
- const wxString& variantName,
+ std::optional<SyncVariant> syncVar,
const SyncStatistics& st,
bool& dontShowAgain);
private:
@@ -1033,7 +1037,7 @@ private:
SyncConfirmationDlg::SyncConfirmationDlg(wxWindow* parent,
bool syncSelection,
- const wxString& variantName,
+ std::optional<SyncVariant> syncVar,
const SyncStatistics& st,
bool& dontShowAgain) :
SyncConfirmationDlgGenerated(parent),
@@ -1042,10 +1046,25 @@ SyncConfirmationDlg::SyncConfirmationDlg(wxWindow* parent,
setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonStartSync).setCancel(m_buttonCancel));
setMainInstructionFont(*m_staticTextCaption);
- m_bitmapSync->SetBitmap(getResourceImage(syncSelection ? "file_sync_selection" : "file_sync"));
+ m_bitmapSync->SetBitmap(loadImage(syncSelection ? "file_sync_selection" : "file_sync"));
m_staticTextCaption->SetLabel(syncSelection ?_("Start to synchronize the selection?") : _("Start synchronization now?"));
- m_staticTextVariant->SetLabel(variantName);
+ m_staticTextSyncVar->SetLabel(getVariantName(syncVar));
+
+ const char* varImgName = nullptr;
+ if (syncVar)
+ switch (*syncVar)
+ {
+ //*INDENT-OFF*
+ case SyncVariant::twoWay: varImgName = "sync_twoway"; break;
+ case SyncVariant::mirror: varImgName = "sync_mirror"; break;
+ case SyncVariant::update: varImgName = "sync_update"; break;
+ case SyncVariant::custom: varImgName = "sync_custom"; break;
+ //*INDENT-ON*
+ }
+ if (varImgName)
+ m_bitmapSyncVar->SetBitmap(loadImage(varImgName, -1 /*maxWidth*/, getDefaultMenuIconSize()));
+
m_checkBoxDontShowAgain->SetValue(dontShowAgain);
Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(SyncConfirmationDlg::onLocalKeyEvent), nullptr, this);
@@ -1059,7 +1078,7 @@ SyncConfirmationDlg::SyncConfirmationDlg(wxWindow* parent,
setText(txtControl, valueAsString);
- bmpControl.SetBitmap(greyScaleIfDisabled(mirrorIfRtl(getResourceImage(imageName)), !isZeroValue));
+ bmpControl.SetBitmap(greyScaleIfDisabled(mirrorIfRtl(loadImage(imageName)), !isZeroValue));
};
auto setIntValue = [&setValue](wxStaticText& txtControl, int value, wxStaticBitmap& bmpControl, const char* imageName)
@@ -1098,13 +1117,13 @@ void SyncConfirmationDlg::OnStartSync(wxCommandEvent& event)
ReturnSmallDlg::ButtonPressed fff::showSyncConfirmationDlg(wxWindow* parent,
bool syncSelection,
- const wxString& variantName,
+ std::optional<SyncVariant> syncVar,
const SyncStatistics& statistics,
bool& dontShowAgain)
{
SyncConfirmationDlg dlg(parent,
syncSelection,
- variantName,
+ syncVar,
statistics,
dontShowAgain);
return static_cast<ReturnSmallDlg::ButtonPressed>(dlg.ShowModal());
@@ -1180,17 +1199,17 @@ OptionsDlg::OptionsDlg(wxWindow* parent, XmlGlobalSettings& globalSettings) :
m_hyperlinkLogFolder->SetLabel(utfTo<wxString>(getDefaultLogFolderPath()));
setRelativeFontSize(*m_hyperlinkLogFolder, 1.2);
- m_bitmapSettings ->SetBitmap (getResourceImage("settings"));
- m_bitmapWarnings ->SetBitmap(shrinkImage(getResourceImage("msg_warning").ConvertToImage(), fastFromDIP(20)));
- m_bitmapLogFile ->SetBitmap(shrinkImage(getResourceImage("log_file" ).ConvertToImage(), fastFromDIP(20)));
- m_bitmapNotificationSounds->SetBitmap (getResourceImage("notification_sounds"));
- m_bitmapConsole ->SetBitmap(shrinkImage(getResourceImage("command_line").ConvertToImage(), fastFromDIP(20)));
- m_bitmapCompareDone ->SetBitmap (getResourceImage("compare_sicon"));
- m_bitmapSyncDone ->SetBitmap (getResourceImage("file_sync_sicon"));
- m_bpButtonPlayCompareDone ->SetBitmapLabel(getResourceImage("play_sound"));
- m_bpButtonPlaySyncDone ->SetBitmapLabel(getResourceImage("play_sound"));
- m_bpButtonAddRow ->SetBitmapLabel(getResourceImage("item_add"));
- m_bpButtonRemoveRow ->SetBitmapLabel(getResourceImage("item_remove"));
+ m_bitmapSettings ->SetBitmap (loadImage("settings"));
+ m_bitmapWarnings ->SetBitmap (loadImage("msg_warning", fastFromDIP(20)));
+ m_bitmapLogFile ->SetBitmap (loadImage("log_file", fastFromDIP(20)));
+ m_bitmapNotificationSounds->SetBitmap (loadImage("notification_sounds"));
+ m_bitmapConsole ->SetBitmap (loadImage("command_line", fastFromDIP(20)));
+ m_bitmapCompareDone ->SetBitmap (loadImage("compare_sicon"));
+ m_bitmapSyncDone ->SetBitmap (loadImage("file_sync_sicon"));
+ m_bpButtonPlayCompareDone ->SetBitmapLabel(loadImage("play_sound"));
+ m_bpButtonPlaySyncDone ->SetBitmapLabel(loadImage("play_sound"));
+ m_bpButtonAddRow ->SetBitmapLabel(loadImage("item_add"));
+ m_bpButtonRemoveRow ->SetBitmapLabel(loadImage("item_remove"));
m_staticTextAllDialogsShown->SetLabel(L'(' + _("No dialogs hidden") + L')');
@@ -1662,7 +1681,7 @@ ActivationDlg::ActivationDlg(wxWindow* parent,
//setMainInstructionFont(*m_staticTextMain);
- m_bitmapActivation->SetBitmap(getResourceImage("internet"));
+ m_bitmapActivation->SetBitmap(loadImage("internet"));
m_textCtrlOfflineActivationKey->ForceUpper();
m_textCtrlLastError ->ChangeValue(lastErrorMsg);
@@ -1766,7 +1785,7 @@ DownloadProgressWindow::Impl::Impl(wxWindow* parent, int64_t fileSizeTotal) :
m_staticTextDetails->SetMinSize({fastFromDIP(550), -1});
- m_bitmapDownloading->SetBitmap(getResourceImage("internet"));
+ m_bitmapDownloading->SetBitmap(loadImage("internet"));
m_gaugeProgress->SetRange(GAUGE_FULL_RANGE);
diff --git a/FreeFileSync/Source/ui/small_dlgs.h b/FreeFileSync/Source/ui/small_dlgs.h
index 921d83e6..9f5aa689 100644
--- a/FreeFileSync/Source/ui/small_dlgs.h
+++ b/FreeFileSync/Source/ui/small_dlgs.h
@@ -43,7 +43,7 @@ ReturnSmallDlg::ButtonPressed showDeleteDialog(wxWindow* parent,
ReturnSmallDlg::ButtonPressed showSyncConfirmationDlg(wxWindow* parent,
bool syncSelection,
- const wxString& variantName,
+ std::optional<SyncVariant> syncVar,
const SyncStatistics& statistics,
bool& dontShowAgain);
diff --git a/FreeFileSync/Source/ui/sync_cfg.cpp b/FreeFileSync/Source/ui/sync_cfg.cpp
index 7c6da67a..01799c81 100644
--- a/FreeFileSync/Source/ui/sync_cfg.cpp
+++ b/FreeFileSync/Source/ui/sync_cfg.cpp
@@ -39,6 +39,51 @@ namespace
const int CFG_DESCRIPTION_WIDTH_DIP = 230;
+void initBitmapRadioButtons(const std::vector<std::pair<ToggleButton*, std::string /*imgName*/>>& buttons, bool alignLeft)
+{
+ const bool physicalLeft = alignLeft == (wxTheApp->GetLayoutDirection() != wxLayout_RightToLeft);
+
+ auto generateSelectImage = [physicalLeft](wxButton& btn, const std::string& imgName, bool selected)
+ {
+ wxImage imgTxt = createImageFromText(btn.GetLabel(), btn.GetFont(), btn.GetForegroundColour());
+
+ wxImage imgIco = mirrorIfRtl(loadImage(imgName, -1 /*maxWidth*/, getDefaultMenuIconSize()));
+ if (!selected)
+ imgIco = greyScale(imgIco);
+
+ wxImage imgStack = physicalLeft ?
+ stackImages(imgIco, imgTxt, ImageStackLayout::horizontal, ImageStackAlignment::center, fastFromDIP(5)) :
+ stackImages(imgTxt, imgIco, ImageStackLayout::horizontal, ImageStackAlignment::center, fastFromDIP(5));
+
+ return resizeCanvas(imgStack, imgStack.GetSize() + wxSize(fastFromDIP(14), fastFromDIP(12)), wxALIGN_CENTER);
+ };
+
+ wxSize maxExtent;
+ std::unordered_map<const ToggleButton*, wxImage> labelsNotSel;
+ for (auto& [btn, imgName] : buttons)
+ {
+ wxImage img = generateSelectImage(*btn, imgName, false /*selected*/);
+ maxExtent.x = std::max(maxExtent.x, img.GetWidth());
+ maxExtent.y = std::max(maxExtent.y, img.GetHeight());
+
+ labelsNotSel[btn] = std::move(img);
+ }
+
+ for (auto& [btn, imgName] : buttons)
+ {
+ wxImage imgSelBack = renderSelectedButton(maxExtent).ConvertToImage();
+ convertToVanillaImage(imgSelBack);
+
+ btn->init(layOver(imgSelBack, generateSelectImage(*btn, imgName, true /*selected*/), wxALIGN_CENTER_VERTICAL | (physicalLeft ? wxALIGN_LEFT : wxALIGN_RIGHT)),
+ resizeCanvas(labelsNotSel[btn], maxExtent, wxALIGN_CENTER_VERTICAL | (physicalLeft ? wxALIGN_LEFT : wxALIGN_RIGHT)));
+
+ btn->SetMinSize(maxExtent); //get rid of selection border on Windows :)
+ //SetMinSize() instead of SetSize() is needed here for wxWindows layout determination to work correctly
+ }
+}
+
+//==========================================================================
+
class ConfigDialog : public ConfigDlgGenerated
{
public:
@@ -115,10 +160,10 @@ private:
EnumDescrList<UnitSize> enumSizeDescr_;
//------------- synchronization panel -----------------
- void OnSyncTwoWay(wxCommandEvent& event) override { directionCfg_.var = DirectionConfig::TWO_WAY; updateSyncGui(); }
- void OnSyncMirror(wxCommandEvent& event) override { directionCfg_.var = DirectionConfig::MIRROR; updateSyncGui(); }
- void OnSyncUpdate(wxCommandEvent& event) override { directionCfg_.var = DirectionConfig::UPDATE; updateSyncGui(); }
- void OnSyncCustom(wxCommandEvent& event) override { directionCfg_.var = DirectionConfig::CUSTOM; updateSyncGui(); }
+ void OnSyncTwoWay(wxCommandEvent& event) override { directionCfg_.var = SyncVariant::twoWay; updateSyncGui(); }
+ void OnSyncMirror(wxCommandEvent& event) override { directionCfg_.var = SyncVariant::mirror; updateSyncGui(); }
+ void OnSyncUpdate(wxCommandEvent& event) override { directionCfg_.var = SyncVariant::update; updateSyncGui(); }
+ void OnSyncCustom(wxCommandEvent& event) override { directionCfg_.var = SyncVariant::custom; updateSyncGui(); }
void OnToggleLocalSyncSettings(wxCommandEvent& event) override { updateSyncGui(); }
void OnToggleDetectMovedFiles (wxCommandEvent& event) override { directionCfg_.detectMovedFiles = !directionCfg_.detectMovedFiles; updateSyncGui(); } //parameter NOT owned by checkbox!
@@ -161,7 +206,7 @@ private:
void updateSyncGui();
//parameters with ownership NOT within GUI controls!
- DirectionConfig directionCfg_;
+ SyncDirectionConfig directionCfg_;
DeletionPolicy handleDeletion_ = DeletionPolicy::recycler; //use Recycler, delete permanently or move to user-defined location
const std::function<size_t(const Zstring& folderPathPhrase)> getDeviceParallelOps_;
@@ -225,23 +270,24 @@ std::wstring getCompVariantDescription(CompareVariant var)
}
-std::wstring getSyncVariantDescription(DirectionConfig::Variant var)
+std::wstring getSyncVariantDescription(SyncVariant var)
{
switch (var)
{
- case DirectionConfig::TWO_WAY:
+ case SyncVariant::twoWay:
return _("Identify and propagate changes on both sides. Deletions, moves and conflicts are detected automatically using a database.");
- case DirectionConfig::MIRROR:
+ case SyncVariant::mirror:
return _("Create a mirror backup of the left folder by adapting the right folder to match.");
- case DirectionConfig::UPDATE:
+ case SyncVariant::update:
return _("Copy new and updated files to the right folder.");
- case DirectionConfig::CUSTOM:
+ case SyncVariant::custom:
return _("Configure your own synchronization rules.");
}
assert(false);
return _("Error");
}
+//==========================================================================
ConfigDialog::ConfigDialog(wxWindow* parent,
SyncConfigPanel panelToShow,
@@ -298,20 +344,20 @@ showMultipleCfgs_(showMultipleCfgs)
m_notebook->SetPadding(wxSize(fastFromDIP(2), 0)); //height cannot be changed
//fill image list to cope with wxNotebook image setting design desaster...
- const int imgListSize = getResourceImage("cfg_compare_sicon").GetHeight();
+ const int imgListSize = loadImage("cfg_compare_sicon").GetHeight();
auto imgList = std::make_unique<wxImageList>(imgListSize, imgListSize);
- auto addToImageList = [&](const wxBitmap& bmp)
+ auto addToImageList = [&](const wxImage& img)
{
- assert(bmp.GetWidth () <= imgListSize);
- assert(bmp.GetHeight() <= imgListSize);
- imgList->Add(bmp);
- imgList->Add(greyScale(bmp));
+ assert(img.GetWidth () <= imgListSize);
+ assert(img.GetHeight() <= imgListSize);
+ imgList->Add(img);
+ imgList->Add(greyScale(img));
};
//add images in same sequence like ConfigTypeImage enum!!!
- addToImageList(getResourceImage("cfg_compare_sicon"));
- addToImageList(getResourceImage("cfg_filter_sicon"));
- addToImageList(getResourceImage("cfg_sync_sicon"));
+ addToImageList(loadImage("cfg_compare_sicon"));
+ addToImageList(loadImage("cfg_filter_sicon"));
+ addToImageList(loadImage("cfg_sync_sicon"));
assert(imgList->GetImageCount() == static_cast<int>(ConfigTypeImage::SYNC_GREY) + 1);
m_notebook->AssignImageList(imgList.release()); //pass ownership
@@ -323,18 +369,25 @@ showMultipleCfgs_(showMultipleCfgs)
m_notebook->ChangeSelection(static_cast<size_t>(panelToShow));
//------------- comparison panel ----------------------
- setRelativeFontSize(*m_toggleBtnByTimeSize, 1.25);
- setRelativeFontSize(*m_toggleBtnBySize, 1.25);
- setRelativeFontSize(*m_toggleBtnByContent, 1.25);
+ setRelativeFontSize(*m_buttonByTimeSize, 1.25);
+ setRelativeFontSize(*m_buttonByContent, 1.25);
+ setRelativeFontSize(*m_buttonBySize, 1.25);
+
+ initBitmapRadioButtons(
+ {
+ {m_buttonByTimeSize, "cmp_time" },
+ {m_buttonByContent, "cmp_content"},
+ {m_buttonBySize, "cmp_size" },
+ }, true /*alignLeft*/);
- m_toggleBtnByTimeSize->SetToolTip(getCompVariantDescription(CompareVariant::timeSize));
- m_toggleBtnByContent ->SetToolTip(getCompVariantDescription(CompareVariant::content));
- m_toggleBtnBySize ->SetToolTip(getCompVariantDescription(CompareVariant::size));
+ m_buttonByTimeSize->SetToolTip(getCompVariantDescription(CompareVariant::timeSize));
+ m_buttonByContent ->SetToolTip(getCompVariantDescription(CompareVariant::content));
+ m_buttonBySize ->SetToolTip(getCompVariantDescription(CompareVariant::size));
m_staticTextCompVarDescription->SetMinSize({fastFromDIP(CFG_DESCRIPTION_WIDTH_DIP), -1});
m_scrolledWindowPerf->SetMinSize({fastFromDIP(220), -1});
- m_bitmapPerf->SetBitmap(greyScaleIfDisabled(getResourceImage("speed"), enableExtraFeatures_));
+ m_bitmapPerf->SetBitmap(greyScaleIfDisabled(loadImage("speed"), enableExtraFeatures_));
m_panelPerfHeader->Enable(enableExtraFeatures_);
m_spinCtrlAutoRetryCount->SetMinSize({fastFromDIP(60), -1}); //Hack: set size (why does wxWindow::Size() not work?)
@@ -356,47 +409,57 @@ showMultipleCfgs_(showMultipleCfgs)
m_staticTextFilterDescr->Wrap(fastFromDIP(450));
enumTimeDescr_.
- add(UnitTime::NONE, L'(' + _("None") + L')'). //meta options should be enclosed in parentheses
- add(UnitTime::TODAY, _("Today")).
+ add(UnitTime::none, L'(' + _("None") + L')'). //meta options should be enclosed in parentheses
+ add(UnitTime::today, _("Today")).
//add(UnitTime::THIS_WEEK, _("This week")).
- add(UnitTime::THIS_MONTH, _("This month")).
- add(UnitTime::THIS_YEAR, _("This year")).
- add(UnitTime::LAST_X_DAYS, _("Last x days:"));
+ add(UnitTime::thisMonth, _("This month")).
+ add(UnitTime::thisYear, _("This year")).
+ add(UnitTime::lastDays, _("Last x days:"));
enumSizeDescr_.
- add(UnitSize::NONE, L'(' + _("None") + L')'). //meta options should be enclosed in parentheses
- add(UnitSize::BYTE, _("Byte")).
- add(UnitSize::KB, _("KB")).
- add(UnitSize::MB, _("MB"));
+ add(UnitSize::none, L'(' + _("None") + L')'). //meta options should be enclosed in parentheses
+ add(UnitSize::byte, _("Byte")).
+ add(UnitSize::kb, _("KB")).
+ add(UnitSize::mb, _("MB"));
//------------- synchronization panel -----------------
- m_toggleBtnTwoWay->SetLabel(getVariantName(DirectionConfig::TWO_WAY));
- m_toggleBtnMirror->SetLabel(getVariantName(DirectionConfig::MIRROR));
- m_toggleBtnUpdate->SetLabel(getVariantName(DirectionConfig::UPDATE));
- m_toggleBtnCustom->SetLabel(getVariantName(DirectionConfig::CUSTOM));
-
- m_toggleBtnTwoWay->SetToolTip(getSyncVariantDescription(DirectionConfig::TWO_WAY));
- m_toggleBtnMirror->SetToolTip(getSyncVariantDescription(DirectionConfig::MIRROR));
- m_toggleBtnUpdate->SetToolTip(getSyncVariantDescription(DirectionConfig::UPDATE));
- m_toggleBtnCustom->SetToolTip(getSyncVariantDescription(DirectionConfig::CUSTOM));
-
- m_bitmapLeftOnly ->SetBitmap(mirrorIfRtl(greyScale(getResourceImage("cat_left_only" ))));
- m_bitmapRightOnly ->SetBitmap(mirrorIfRtl(greyScale(getResourceImage("cat_right_only" ))));
- m_bitmapLeftNewer ->SetBitmap(mirrorIfRtl(greyScale(getResourceImage("cat_left_newer" ))));
- m_bitmapRightNewer->SetBitmap(mirrorIfRtl(greyScale(getResourceImage("cat_right_newer"))));
- m_bitmapDifferent ->SetBitmap(mirrorIfRtl(greyScale(getResourceImage("cat_different" ))));
- m_bitmapConflict ->SetBitmap(mirrorIfRtl(greyScale(getResourceImage("cat_conflict" ))));
-
- setRelativeFontSize(*m_toggleBtnTwoWay, 1.25);
- setRelativeFontSize(*m_toggleBtnMirror, 1.25);
- setRelativeFontSize(*m_toggleBtnUpdate, 1.25);
- setRelativeFontSize(*m_toggleBtnCustom, 1.25);
+ m_buttonTwoWay->SetToolTip(getSyncVariantDescription(SyncVariant::twoWay));
+ m_buttonMirror->SetToolTip(getSyncVariantDescription(SyncVariant::mirror));
+ m_buttonUpdate->SetToolTip(getSyncVariantDescription(SyncVariant::update));
+ m_buttonCustom->SetToolTip(getSyncVariantDescription(SyncVariant::custom));
+
+ m_bitmapLeftOnly ->SetBitmap(mirrorIfRtl(greyScale(loadImage("cat_left_only" ))));
+ m_bitmapRightOnly ->SetBitmap(mirrorIfRtl(greyScale(loadImage("cat_right_only" ))));
+ m_bitmapLeftNewer ->SetBitmap(mirrorIfRtl(greyScale(loadImage("cat_left_newer" ))));
+ m_bitmapRightNewer->SetBitmap(mirrorIfRtl(greyScale(loadImage("cat_right_newer"))));
+ m_bitmapDifferent ->SetBitmap(mirrorIfRtl(greyScale(loadImage("cat_different" ))));
+ m_bitmapConflict ->SetBitmap(mirrorIfRtl(greyScale(loadImage("cat_conflict" ))));
+
+ setRelativeFontSize(*m_buttonTwoWay, 1.25);
+ setRelativeFontSize(*m_buttonMirror, 1.25);
+ setRelativeFontSize(*m_buttonUpdate, 1.25);
+ setRelativeFontSize(*m_buttonCustom, 1.25);
+
+ initBitmapRadioButtons(
+ {
+ {m_buttonTwoWay, "sync_twoway"},
+ {m_buttonMirror, "sync_mirror"},
+ {m_buttonUpdate, "sync_update"},
+ {m_buttonCustom, "sync_custom"},
+ }, false /*alignLeft*/);
m_staticTextSyncVarDescription->SetMinSize({fastFromDIP(CFG_DESCRIPTION_WIDTH_DIP), -1});
- m_toggleBtnRecycler ->SetToolTip(_("Retain deleted and overwritten files in the recycle bin"));
- m_toggleBtnPermanent ->SetToolTip(_("Delete and overwrite files permanently"));
- m_toggleBtnVersioning->SetToolTip(_("Move files to a user-defined folder"));
+ m_buttonRecycler ->SetToolTip(_("Retain deleted and overwritten files in the recycle bin"));
+ m_buttonPermanent ->SetToolTip(_("Delete and overwrite files permanently"));
+ m_buttonVersioning->SetToolTip(_("Move files to a user-defined folder"));
+
+ initBitmapRadioButtons(
+ {
+ {m_buttonRecycler, "delete_recycler" },
+ {m_buttonPermanent, "delete_permanently"},
+ {m_buttonVersioning, "delete_versioning" },
+ }, true /*alignLeft*/);
enumVersioningStyle_.
add(VersioningStyle::replace, _("Replace"), _("Move files and replace if existing")).
@@ -422,9 +485,9 @@ showMultipleCfgs_(showMultipleCfgs)
//m_staticTextPostSync->SetMinSize({fastFromDIP(180), -1});
enumPostSyncCondition_.
- add(PostSyncCondition::COMPLETION, _("On completion:")).
- add(PostSyncCondition::ERRORS, _("On errors:")).
- add(PostSyncCondition::SUCCESS, _("On success:"));
+ add(PostSyncCondition::completion, _("On completion:")).
+ add(PostSyncCondition::errors, _("On errors:")).
+ add(PostSyncCondition::success, _("On success:"));
m_comboBoxPostSyncCommand->SetHint(_("Example:") + L" systemctl poweroff");
@@ -455,7 +518,7 @@ showMultipleCfgs_(showMultipleCfgs)
//temporarily set main config as reference for window height calculations:
globalPairCfg_ = GlobalPairConfig();
- globalPairCfg_.syncCfg.directionCfg.var = DirectionConfig::MIRROR; //
+ globalPairCfg_.syncCfg.directionCfg.var = SyncVariant::mirror; //
globalPairCfg_.syncCfg.handleDeletion = DeletionPolicy::versioning; //
globalPairCfg_.syncCfg.versioningFolderPhrase = Zstr("dummy"); //set tentatively for sync dir height calculation below
globalPairCfg_.syncCfg.versioningStyle = VersioningStyle::timestampFile; //
@@ -607,7 +670,7 @@ std::optional<CompConfig> ConfigDialog::getCompConfig() const
CompConfig compCfg;
compCfg.compareVar = localCmpVar_;
- compCfg.handleSymlinks = !m_checkBoxSymlinksInclude->GetValue() ? SymLinkHandling::EXCLUDE : m_radioBtnSymlinksDirect->GetValue() ? SymLinkHandling::DIRECT : SymLinkHandling::FOLLOW;
+ compCfg.handleSymlinks = !m_checkBoxSymlinksInclude->GetValue() ? SymLinkHandling::exclude : m_radioBtnSymlinksDirect->GetValue() ? SymLinkHandling::direct : SymLinkHandling::follow;
compCfg.ignoreTimeShiftMinutes = fromTimeShiftPhrase(copyStringTo<std::wstring>(m_textCtrlTimeShift->GetValue()));
return compCfg;
@@ -625,15 +688,15 @@ void ConfigDialog::setCompConfig(const CompConfig* compCfg)
switch (tmpCfg.handleSymlinks)
{
- case SymLinkHandling::EXCLUDE:
+ case SymLinkHandling::exclude:
m_checkBoxSymlinksInclude->SetValue(false);
m_radioBtnSymlinksFollow ->SetValue(true);
break;
- case SymLinkHandling::FOLLOW:
+ case SymLinkHandling::follow:
m_checkBoxSymlinksInclude->SetValue(true);
m_radioBtnSymlinksFollow->SetValue(true);
break;
- case SymLinkHandling::DIRECT:
+ case SymLinkHandling::direct:
m_checkBoxSymlinksInclude->SetValue(true);
m_radioBtnSymlinksDirect->SetValue(true);
break;
@@ -655,35 +718,22 @@ void ConfigDialog::updateCompGui()
static_cast<int>(compOptionsEnabled ? ConfigTypeImage::COMPARISON : ConfigTypeImage::COMPARISON_GREY));
//update toggle buttons -> they have no parameter-ownership at all!
- m_toggleBtnByTimeSize->SetValue(false);
- m_toggleBtnBySize ->SetValue(false);
- m_toggleBtnByContent ->SetValue(false);
-
- if (compOptionsEnabled) //help wxWidgets a little to render inactive config state (needed on Windows, NOT on Linux!)
- switch (localCmpVar_)
- {
- case CompareVariant::timeSize:
- m_toggleBtnByTimeSize->SetValue(true);
- break;
- case CompareVariant::content:
- m_toggleBtnByContent->SetValue(true);
- break;
- case CompareVariant::size:
- m_toggleBtnBySize->SetValue(true);
- break;
- }
+ m_buttonByTimeSize->setActive(CompareVariant::timeSize == localCmpVar_ && compOptionsEnabled);
+ m_buttonByContent ->setActive(CompareVariant::content == localCmpVar_ && compOptionsEnabled);
+ m_buttonBySize ->setActive(CompareVariant::size == localCmpVar_ && compOptionsEnabled);
+ //compOptionsEnabled: nudge wxWidgets to render inactive config state (needed on Windows, NOT on Linux!)
switch (localCmpVar_) //unconditionally update image, including "local options off"
{
case CompareVariant::timeSize:
//help wxWidgets a little to render inactive config state (needed on Windows, NOT on Linux!)
- m_bitmapCompVariant->SetBitmap(greyScaleIfDisabled(getResourceImage("cmp_file_time"), compOptionsEnabled));
+ m_bitmapCompVariant->SetBitmap(greyScaleIfDisabled(loadImage("cmp_time"), compOptionsEnabled));
break;
case CompareVariant::content:
- m_bitmapCompVariant->SetBitmap(greyScaleIfDisabled(getResourceImage("cmp_file_content"), compOptionsEnabled));
+ m_bitmapCompVariant->SetBitmap(greyScaleIfDisabled(loadImage("cmp_content"), compOptionsEnabled));
break;
case CompareVariant::size:
- m_bitmapCompVariant->SetBitmap(greyScaleIfDisabled(getResourceImage("cmp_file_size"), compOptionsEnabled));
+ m_bitmapCompVariant->SetBitmap(greyScaleIfDisabled(loadImage("cmp_size"), compOptionsEnabled));
break;
}
@@ -752,14 +802,14 @@ void ConfigDialog::updateFilterGui()
m_notebook->SetPageImage(static_cast<size_t>(SyncConfigPanel::FILTER),
static_cast<int>(!isNullFilter(activeCfg) ? ConfigTypeImage::FILTER: ConfigTypeImage::FILTER_GREY));
- m_bitmapInclude ->SetBitmap(greyScaleIfDisabled(getResourceImage("filter_include"), !NameFilter::isNull(activeCfg.includeFilter, FilterConfig().excludeFilter)));
- m_bitmapExclude ->SetBitmap(greyScaleIfDisabled(getResourceImage("filter_exclude"), !NameFilter::isNull(FilterConfig().includeFilter, activeCfg.excludeFilter)));
- m_bitmapFilterDate->SetBitmap(greyScaleIfDisabled(getResourceImage("cmp_file_time"), activeCfg.unitTimeSpan != UnitTime::NONE));
- m_bitmapFilterSize->SetBitmap(greyScaleIfDisabled(getResourceImage("cmp_file_size"), activeCfg.unitSizeMin != UnitSize::NONE || activeCfg.unitSizeMax != UnitSize::NONE));
+ m_bitmapInclude ->SetBitmap(greyScaleIfDisabled(loadImage("filter_include"), !NameFilter::isNull(activeCfg.includeFilter, FilterConfig().excludeFilter)));
+ m_bitmapExclude ->SetBitmap(greyScaleIfDisabled(loadImage("filter_exclude"), !NameFilter::isNull(FilterConfig().includeFilter, activeCfg.excludeFilter)));
+ m_bitmapFilterDate->SetBitmap(greyScaleIfDisabled(loadImage("cmp_time"), activeCfg.unitTimeSpan != UnitTime::none));
+ m_bitmapFilterSize->SetBitmap(greyScaleIfDisabled(loadImage("cmp_size"), activeCfg.unitSizeMin != UnitSize::none || activeCfg.unitSizeMax != UnitSize::none));
- m_spinCtrlTimespan->Enable(activeCfg.unitTimeSpan == UnitTime::LAST_X_DAYS);
- m_spinCtrlMinSize ->Enable(activeCfg.unitSizeMin != UnitSize::NONE);
- m_spinCtrlMaxSize ->Enable(activeCfg.unitSizeMax != UnitSize::NONE);
+ m_spinCtrlTimespan->Enable(activeCfg.unitTimeSpan == UnitTime::lastDays);
+ m_spinCtrlMinSize ->Enable(activeCfg.unitSizeMin != UnitSize::none);
+ m_spinCtrlMaxSize ->Enable(activeCfg.unitSizeMax != UnitSize::none);
m_buttonClear->Enable(!(activeCfg == FilterConfig()));
}
@@ -801,31 +851,31 @@ void toggleSyncDirection(SyncDirection& current)
{
switch (current)
{
- case SyncDirection::RIGHT:
- current = SyncDirection::LEFT;
+ case SyncDirection::right:
+ current = SyncDirection::left;
break;
- case SyncDirection::LEFT:
- current = SyncDirection::NONE;
+ case SyncDirection::left:
+ current = SyncDirection::none;
break;
- case SyncDirection::NONE:
- current = SyncDirection::RIGHT;
+ case SyncDirection::none:
+ current = SyncDirection::right;
break;
}
}
-void toggleCustomSyncConfig(DirectionConfig& directionCfg, SyncDirection& custSyncDir)
+void toggleCustomSyncConfig(SyncDirectionConfig& directionCfg, SyncDirection& custSyncDir)
{
switch (directionCfg.var)
{
- case DirectionConfig::TWO_WAY:
+ case SyncVariant::twoWay:
assert(false);
break;
- case DirectionConfig::MIRROR:
- case DirectionConfig::UPDATE:
+ case SyncVariant::mirror:
+ case SyncVariant::update:
directionCfg.custom = extractDirections(directionCfg);
break;
- case DirectionConfig::CUSTOM:
+ case SyncVariant::custom:
break;
}
SyncDirection syncDirOld = custSyncDir;
@@ -834,30 +884,30 @@ void toggleCustomSyncConfig(DirectionConfig& directionCfg, SyncDirection& custSy
//some config optimization: if custom settings happen to match "mirror" or "update", just switch variant
const DirectionSet mirrorSet = []
{
- DirectionConfig mirrorCfg;
- mirrorCfg.var = DirectionConfig::MIRROR;
+ SyncDirectionConfig mirrorCfg;
+ mirrorCfg.var = SyncVariant::mirror;
return extractDirections(mirrorCfg);
}();
const DirectionSet updateSet = []
{
- DirectionConfig updateCfg;
- updateCfg.var = DirectionConfig::UPDATE;
+ SyncDirectionConfig updateCfg;
+ updateCfg.var = SyncVariant::update;
return extractDirections(updateCfg);
}();
if (directionCfg.custom == mirrorSet)
{
- directionCfg.var = DirectionConfig::MIRROR;
+ directionCfg.var = SyncVariant::mirror;
custSyncDir = syncDirOld;
}
else if (directionCfg.custom == updateSet)
{
- directionCfg.var = DirectionConfig::UPDATE;
+ directionCfg.var = SyncVariant::update;
custSyncDir = syncDirOld;
}
else
- directionCfg.var = DirectionConfig::CUSTOM;
+ directionCfg.var = SyncVariant::custom;
}
@@ -903,7 +953,7 @@ void ConfigDialog::OnConflict(wxCommandEvent& event)
}
-void updateSyncDirectionIcons(const DirectionConfig& directionCfg,
+void updateSyncDirectionIcons(const SyncDirectionConfig& directionCfg,
wxBitmapButton& buttonLeftOnly,
wxBitmapButton& buttonRightOnly,
wxBitmapButton& buttonLeftNewer,
@@ -911,28 +961,31 @@ void updateSyncDirectionIcons(const DirectionConfig& directionCfg,
wxBitmapButton& buttonDifferent,
wxBitmapButton& buttonConflict)
{
- if (directionCfg.var != DirectionConfig::TWO_WAY) //automatic mode needs no sync-directions
+ if (directionCfg.var != SyncVariant::twoWay) //automatic mode needs no sync-directions
{
auto updateButton = [](wxBitmapButton& button, SyncDirection dir,
const char* imgNameLeft, const char* imgNameNone, const char* imgNameRight,
SyncOperation opLeft, SyncOperation opNone, SyncOperation opRight)
{
+ const char* imgName = nullptr;
switch (dir)
{
- case SyncDirection::LEFT:
- button.SetBitmapLabel(mirrorIfRtl(getResourceImage(imgNameLeft)));
+ case SyncDirection::left:
+ imgName = imgNameLeft;
button.SetToolTip(getSyncOpDescription(opLeft));
break;
- case SyncDirection::NONE:
- button.SetBitmapLabel(mirrorIfRtl(getResourceImage(imgNameNone)));
+ case SyncDirection::none:
+ imgName = imgNameNone;
button.SetToolTip(getSyncOpDescription(opNone));
break;
- case SyncDirection::RIGHT:
- button.SetBitmapLabel(mirrorIfRtl(getResourceImage(imgNameRight)));
+ case SyncDirection::right:
+ imgName = imgNameRight;
button.SetToolTip(getSyncOpDescription(opRight));
break;
}
- button.SetBitmapDisabled(greyScale(button.GetBitmap())); //fix wxWidgets' all-too-clever multi-state!
+ wxImage img = mirrorIfRtl(loadImage(imgName));
+ button.SetBitmapLabel(img);
+ button.SetBitmapDisabled(greyScale(img)); //fix wxWidgets' all-too-clever multi-state!
//=> the disabled bitmap is generated during first SetBitmapLabel() call but never updated again by wxWidgets!
};
@@ -944,22 +997,9 @@ void updateSyncDirectionIcons(const DirectionConfig& directionCfg,
updateButton(buttonRightNewer, dirCfg.rightNewer, "so_update_left", "so_none", "so_update_right", SO_OVERWRITE_LEFT, SO_DO_NOTHING, SO_OVERWRITE_RIGHT );
updateButton(buttonDifferent, dirCfg.different, "so_update_left", "so_none", "so_update_right", SO_OVERWRITE_LEFT, SO_DO_NOTHING, SO_OVERWRITE_RIGHT );
- switch (dirCfg.conflict)
- {
- case SyncDirection::LEFT:
- buttonConflict.SetBitmapLabel(mirrorIfRtl(getResourceImage("so_update_left")));
- buttonConflict.SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT));
- break;
- case SyncDirection::NONE:
- buttonConflict.SetBitmapLabel(mirrorIfRtl(getResourceImage("cat_conflict"))); //silent dependency from algorithm.cpp::Redetermine!!!
- buttonConflict.SetToolTip(_("Leave as unresolved conflict"));
- break;
- case SyncDirection::RIGHT:
- buttonConflict.SetBitmapLabel(mirrorIfRtl(getResourceImage("so_update_right")));
- buttonConflict.SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT));
- break;
- }
- buttonConflict.SetBitmapDisabled(greyScale(buttonConflict.GetBitmap())); //fix wxWidgets' all-too-clever multi-state!
+ updateButton(buttonConflict, dirCfg.conflict, "so_update_left", "cat_conflict", "so_update_right", SO_OVERWRITE_LEFT, SO_DO_NOTHING, SO_OVERWRITE_RIGHT );
+ if (dirCfg.conflict == SyncDirection::none)
+ buttonConflict.SetToolTip(_("Leave as unresolved conflict")); //silent dependency from algorithm.cpp::Redetermine!!!
}
}
@@ -1033,11 +1073,11 @@ void ConfigDialog::updateSyncGui()
m_checkBoxDetectMove->SetValue(detectMovedFilesEnabled(directionCfg_)); //parameter NOT owned by checkbox!
//display only relevant sync options
- bSizerDatabase ->Show(directionCfg_.var == DirectionConfig::TWO_WAY);
- bSizerSyncDirections->Show(directionCfg_.var != DirectionConfig::TWO_WAY);
+ bSizerDatabase ->Show(directionCfg_.var == SyncVariant::twoWay);
+ bSizerSyncDirections->Show(directionCfg_.var != SyncVariant::twoWay);
- if (directionCfg_.var == DirectionConfig::TWO_WAY)
- m_bitmapDatabase->SetBitmap(greyScaleIfDisabled(getResourceImage("database"), syncOptionsEnabled));
+ if (directionCfg_.var == SyncVariant::twoWay)
+ m_bitmapDatabase->SetBitmap(greyScaleIfDisabled(loadImage("database"), syncOptionsEnabled));
else
{
const CompareVariant activeCmpVar = m_checkBoxUseLocalCmpOptions->GetValue() ? localCmpVar_ : globalPairCfg_.cmpCfg.compareVar;
@@ -1056,58 +1096,28 @@ void ConfigDialog::updateSyncGui()
m_staticTextSyncVarDescription->Wrap(fastFromDIP(CFG_DESCRIPTION_WIDTH_DIP)); //needs to be reapplied after SetLabel()
//update toggle buttons -> they have no parameter-ownership at all!
- m_toggleBtnTwoWay->SetValue(false);
- m_toggleBtnMirror->SetValue(false);
- m_toggleBtnUpdate->SetValue(false);
- m_toggleBtnCustom->SetValue(false);
-
- if (syncOptionsEnabled) //help wxWidgets a little to render inactive config state (needed on Windows, NOT on Linux!)
- switch (directionCfg_.var)
- {
- case DirectionConfig::TWO_WAY:
- m_toggleBtnTwoWay->SetValue(true);
- break;
- case DirectionConfig::MIRROR:
- m_toggleBtnMirror->SetValue(true);
- break;
- case DirectionConfig::UPDATE:
- m_toggleBtnUpdate->SetValue(true);
- break;
- case DirectionConfig::CUSTOM:
- m_toggleBtnCustom->SetValue(true);
- break;
- }
+ m_buttonTwoWay->setActive(SyncVariant::twoWay == directionCfg_.var && syncOptionsEnabled);
+ m_buttonMirror->setActive(SyncVariant::mirror == directionCfg_.var && syncOptionsEnabled);
+ m_buttonUpdate->setActive(SyncVariant::update == directionCfg_.var && syncOptionsEnabled);
+ m_buttonCustom->setActive(SyncVariant::custom == directionCfg_.var && syncOptionsEnabled);
+ //syncOptionsEnabled: nudge wxWidgets to render inactive config state (needed on Windows, NOT on Linux!)
- m_toggleBtnRecycler ->SetValue(false);
- m_toggleBtnPermanent ->SetValue(false);
- m_toggleBtnVersioning->SetValue(false);
-
- if (syncOptionsEnabled) //help wxWidgets a little to render inactive config state (needed on Windows, NOT on Linux!)
- switch (handleDeletion_) //unconditionally update image, including "local options off"
- {
- case DeletionPolicy::recycler:
- m_toggleBtnRecycler->SetValue(true);
- break;
- case DeletionPolicy::permanent:
- m_toggleBtnPermanent->SetValue(true);
- break;
- case DeletionPolicy::versioning:
- m_toggleBtnVersioning->SetValue(true);
- break;
- }
+ m_buttonRecycler ->setActive(DeletionPolicy::recycler == handleDeletion_ && syncOptionsEnabled);
+ m_buttonPermanent ->setActive(DeletionPolicy::permanent == handleDeletion_ && syncOptionsEnabled);
+ m_buttonVersioning->setActive(DeletionPolicy::versioning == handleDeletion_ && syncOptionsEnabled);
switch (handleDeletion_) //unconditionally update image, including "local options off"
{
case DeletionPolicy::recycler:
- m_bitmapDeletionType->SetBitmap(greyScaleIfDisabled(getResourceImage("delete_recycler"), syncOptionsEnabled));
+ m_bitmapDeletionType->SetBitmap(greyScaleIfDisabled(loadImage("delete_recycler"), syncOptionsEnabled));
setText(*m_staticTextDeletionTypeDescription, _("Retain deleted and overwritten files in the recycle bin"));
break;
case DeletionPolicy::permanent:
- m_bitmapDeletionType->SetBitmap(greyScaleIfDisabled(getResourceImage("delete_permanently"), syncOptionsEnabled));
+ m_bitmapDeletionType->SetBitmap(greyScaleIfDisabled(loadImage("delete_permanently"), syncOptionsEnabled));
setText(*m_staticTextDeletionTypeDescription, _("Delete and overwrite files permanently"));
break;
case DeletionPolicy::versioning:
- m_bitmapVersioning->SetBitmap(greyScaleIfDisabled(getResourceImage("delete_versioning"), syncOptionsEnabled));
+ m_bitmapVersioning->SetBitmap(greyScaleIfDisabled(loadImage("delete_versioning"), syncOptionsEnabled));
break;
}
//m_staticTextDeletionTypeDescription->Wrap(fastFromDIP(200)); //needs to be reapplied after SetLabel()
@@ -1287,20 +1297,20 @@ void ConfigDialog::updateMiscGui()
{
const MiscSyncConfig miscCfg = getMiscSyncOptions();
- m_bitmapIgnoreErrors->SetBitmap(greyScaleIfDisabled(getResourceImage("error_ignore_active"), miscCfg.ignoreErrors));
- m_bitmapRetryErrors ->SetBitmap(greyScaleIfDisabled(getResourceImage("error_retry"), miscCfg.automaticRetryCount > 0 ));
+ m_bitmapIgnoreErrors->SetBitmap(greyScaleIfDisabled(loadImage("error_ignore_active"), miscCfg.ignoreErrors));
+ m_bitmapRetryErrors ->SetBitmap(greyScaleIfDisabled(loadImage("error_retry"), miscCfg.automaticRetryCount > 0 ));
fgSizerAutoRetry->Show(miscCfg.automaticRetryCount > 0);
m_panelComparisonSettings->Layout(); //showing "retry count" can affect bSizerPerformance!
//----------------------------------------------------------------------------
const bool sendEmailEnabled = m_checkBoxSendEmail->GetValue();
- m_bitmapEmail->SetBitmap(greyScaleIfDisabled(getResourceImage("email"), sendEmailEnabled).ConvertToImage());
+ m_bitmapEmail->SetBitmap(greyScaleIfDisabled(loadImage("email"), sendEmailEnabled));
m_comboBoxEmail->Show(sendEmailEnabled);
- auto updateButton = [successIcon = getResourceImage("msg_success_sicon").ConvertToImage(),
- warningIcon = getResourceImage("msg_warning_sicon").ConvertToImage(),
- errorIcon = getResourceImage("msg_error_sicon" ).ConvertToImage(),
+ auto updateButton = [successIcon = loadImage("msg_success", getDefaultMenuIconSize()),
+ warningIcon = loadImage("msg_warning", getDefaultMenuIconSize()),
+ errorIcon = loadImage("msg_error", getDefaultMenuIconSize()),
sendEmailEnabled, this] (wxBitmapButton& button, ResultsNotification notifyCondition)
{
button.Show(sendEmailEnabled);
@@ -1316,7 +1326,7 @@ void ConfigDialog::updateMiscGui()
label = stackImages(label, warningIcon, ImageStackLayout::horizontal, ImageStackAlignment::center);
}
else
- label.Resize({label.GetWidth() + warningIcon.GetWidth(), label.GetHeight()}, {});
+ label = resizeCanvas(label, {label.GetWidth() + warningIcon.GetWidth(), label.GetHeight()}, wxALIGN_LEFT);
if (notifyCondition == ResultsNotification::always)
{
@@ -1324,7 +1334,7 @@ void ConfigDialog::updateMiscGui()
label = stackImages(label, successIcon, ImageStackLayout::horizontal, ImageStackAlignment::center);
}
else
- label.Resize({label.GetWidth() + successIcon.GetWidth(), label.GetHeight()}, {});
+ label = resizeCanvas(label, {label.GetWidth() + successIcon.GetWidth(), label.GetHeight()}, wxALIGN_LEFT);
button.SetToolTip(tooltip);
button.SetBitmapLabel(notifyCondition == emailNotifyCondition_ && sendEmailEnabled ? label : greyScale(label));
@@ -1339,7 +1349,7 @@ void ConfigDialog::updateMiscGui()
m_staticTextPerfDeRequired2->Show(!enableExtraFeatures_); //required after each bSizerSyncMisc->Show()
//----------------------------------------------------------------------------
- m_bitmapLogFile->SetBitmap(shrinkImage(greyScaleIfDisabled(getResourceImage("log_file"), m_checkBoxOverrideLogPath->GetValue()).ConvertToImage(), fastFromDIP(20)));
+ m_bitmapLogFile->SetBitmap(greyScaleIfDisabled(loadImage("log_file", fastFromDIP(20)), m_checkBoxOverrideLogPath->GetValue()));
m_logFolderPath ->Enable(m_checkBoxOverrideLogPath->GetValue()); //
m_buttonSelectLogFolder ->Show(m_checkBoxOverrideLogPath->GetValue()); //enabled status can't be derived from resolved config!
m_bpButtonSelectAltLogFolder->Show(m_checkBoxOverrideLogPath->GetValue()); //
diff --git a/FreeFileSync/Source/ui/sync_cfg.h b/FreeFileSync/Source/ui/sync_cfg.h
index c9e481f7..9b1dffb5 100644
--- a/FreeFileSync/Source/ui/sync_cfg.h
+++ b/FreeFileSync/Source/ui/sync_cfg.h
@@ -37,7 +37,7 @@ struct MiscSyncConfig
std::chrono::seconds automaticRetryDelay{0};
Zstring postSyncCommand;
- PostSyncCondition postSyncCondition = PostSyncCondition::COMPLETION;
+ PostSyncCondition postSyncCondition = PostSyncCondition::completion;
Zstring altLogFolderPathPhrase;
diff --git a/FreeFileSync/Source/ui/tray_icon.cpp b/FreeFileSync/Source/ui/tray_icon.cpp
index fbd3fd38..07127f68 100644
--- a/FreeFileSync/Source/ui/tray_icon.cpp
+++ b/FreeFileSync/Source/ui/tray_icon.cpp
@@ -116,7 +116,7 @@ wxIcon FfsTrayIcon::ProgressIconGenerator::get(double fraction)
//fill yellow remainder
fillRange(genImage, startFillPixel, pixelCount, wxColor(240, 200, 0));
- iconBuf_.CopyFromBitmap(wxBitmap(genImage));
+ iconBuf_.CopyFromBitmap(genImage);
startPixBuf_ = startFillPixel;
}
@@ -197,7 +197,7 @@ private:
FfsTrayIcon::FfsTrayIcon(const std::function<void()>& requestResume) :
trayIcon_(new TaskBarImpl(requestResume)),
- iconGenerator_(std::make_unique<ProgressIconGenerator>(getResourceImage("FFS_tray_24").ConvertToImage()))
+ iconGenerator_(std::make_unique<ProgressIconGenerator>(loadImage("FFS_tray_24")))
{
trayIcon_->SetIcon(iconGenerator_->get(activeFraction_), activeToolTip_);
}
diff --git a/FreeFileSync/Source/ui/tree_grid.cpp b/FreeFileSync/Source/ui/tree_grid.cpp
index 7d6942d8..70c9aec1 100644
--- a/FreeFileSync/Source/ui/tree_grid.cpp
+++ b/FreeFileSync/Source/ui/tree_grid.cpp
@@ -61,15 +61,15 @@ void TreeView::extractVisibleSubtree(ContainerObject& hierObj, //in
//if (file.isActive())
// switch (file.getSyncDir())
// {
- // case SyncDirection::LEFT:
+ // case SyncDirection::left:
// return file.getFileSize<RIGHT_SIDE>();
- // case SyncDirection::RIGHT:
+ // case SyncDirection::right:
// return file.getFileSize<LEFT_SIDE>();
- // case SyncDirection::NONE:
+ // case SyncDirection::none:
// break;
// }
- //prefer file-browser semantics over sync preview (=> always show useful numbers, even for SyncDirection::NONE)
+ //prefer file-browser semantics over sync preview (=> always show useful numbers, even for SyncDirection::none)
//discussion: https://freefilesync.org/forum/viewtopic.php?t=1595
return std::max(file.getFileSize<LEFT_SIDE>(), file.getFileSize<RIGHT_SIDE>());
};
@@ -243,13 +243,13 @@ void TreeView::sortSingleLevel(std::vector<TreeLine>& items, ColumnTypeTree colu
switch (columnType)
{
- case ColumnTypeTree::FOLDER_NAME:
+ case ColumnTypeTree::folder:
std::sort(items.begin(), items.end(), LessShortName<ascending>());
break;
- case ColumnTypeTree::ITEM_COUNT:
+ case ColumnTypeTree::itemCount:
std::sort(items.begin(), items.end(), makeSortDirection(lessCount, std::bool_constant<ascending>()));
break;
- case ColumnTypeTree::BYTES:
+ case ColumnTypeTree::bytes:
std::sort(items.begin(), items.end(), makeSortDirection(lessBytes, std::bool_constant<ascending>()));
break;
}
@@ -703,8 +703,8 @@ public:
GridDataTree(Grid& grid) :
widthNodeIcon_(IconBuffer::getSize(IconBuffer::SIZE_SMALL)),
widthLevelStep_(widthNodeIcon_),
- widthNodeStatus_(getResourceImage("node_expanded").GetWidth()),
- rootBmp_(shrinkImage(getResourceImage("root_folder").ConvertToImage(), widthNodeIcon_)),
+ widthNodeStatus_(loadImage("node_expanded").GetWidth()),
+ rootIcon_(loadImage("root_folder", widthNodeIcon_)),
grid_(grid)
{
grid.getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(GridDataTree::onKeyDown), nullptr, this);
@@ -726,7 +726,7 @@ private:
{
switch (static_cast<ColumnTypeTree>(colType))
{
- case ColumnTypeTree::FOLDER_NAME:
+ case ColumnTypeTree::folder:
if (std::unique_ptr<TreeView::Node> node = treeDataView_.getLine(row))
if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get()))
{
@@ -740,8 +740,8 @@ private:
}
break;
- case ColumnTypeTree::ITEM_COUNT:
- case ColumnTypeTree::BYTES:
+ case ColumnTypeTree::itemCount:
+ case ColumnTypeTree::bytes:
break;
}
return std::wstring();
@@ -752,7 +752,7 @@ private:
if (std::unique_ptr<TreeView::Node> node = treeDataView_.getLine(row))
switch (static_cast<ColumnTypeTree>(colType))
{
- case ColumnTypeTree::FOLDER_NAME:
+ case ColumnTypeTree::folder:
if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get()))
return root->displayName;
else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get()))
@@ -761,10 +761,10 @@ private:
return _("Files");
break;
- case ColumnTypeTree::ITEM_COUNT:
+ case ColumnTypeTree::itemCount:
return formatNumber(node->itemCount_);
- case ColumnTypeTree::BYTES:
+ case ColumnTypeTree::bytes:
return formatFilesizeShort(node->bytes_);
}
@@ -785,7 +785,7 @@ private:
if (const auto [sortCol, ascending] = treeDataView_.getSortDirection();
colTypeTree == sortCol)
{
- const wxBitmap sortMarker = getResourceImage(ascending ? "sort_ascending" : "sort_descending");
+ const wxImage sortMarker = loadImage(ascending ? "sort_ascending" : "sort_descending");
drawBitmapRtlNoMirror(dc, enabled ? sortMarker : sortMarker.ConvertToDisabled(), rectInner, wxALIGN_CENTER_HORIZONTAL);
}
}
@@ -808,7 +808,7 @@ private:
// --------------------------------------------------------------------------------
// -> synchronize renderCell() <-> getBestSize() <-> getRowMouseHover()
- if (static_cast<ColumnTypeTree>(colType) == ColumnTypeTree::FOLDER_NAME)
+ if (static_cast<ColumnTypeTree>(colType) == ColumnTypeTree::folder)
{
if (std::unique_ptr<TreeView::Node> node = treeDataView_.getLine(row))
{
@@ -834,7 +834,7 @@ private:
const wxRect areaPerc(rectTmp.x, rectTmp.y + 2, percentageBarWidth_, rectTmp.height - 4);
{
//clear background
- wxDCPenChanger dummy (dc, getColorPercentBorder());
+ wxDCPenChanger dummy (dc, wxPen(getColorPercentBorder(), fastFromDIP(1)));
wxDCBrushChanger dummy2(dc, getColorPercentBackground());
dc.DrawRectangle(areaPerc);
@@ -860,14 +860,14 @@ private:
//node status
auto drawStatus = [&](const char* imageName)
{
- const wxBitmap& bmp = getResourceImage(imageName);
+ const wxImage& img = loadImage(imageName);
- wxRect rectStat(rectTmp.GetTopLeft(), wxSize(bmp.GetWidth(), bmp.GetHeight()));
+ wxRect rectStat(rectTmp.GetTopLeft(), wxSize(img.GetWidth(), img.GetHeight()));
rectStat.y += (rectTmp.height - rectStat.height) / 2;
//clearArea(dc, rectStat, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
clearArea(dc, rectStat, *wxWHITE); //accessibility: always set both foreground AND background colors!
- drawBitmapRtlNoMirror(dc, bmp, rectStat, wxALIGN_CENTER);
+ drawBitmapRtlNoMirror(dc, img, rectStat, wxALIGN_CENTER);
};
const bool drawMouseHover = static_cast<HoverAreaTree>(rowHover) == HoverAreaTree::NODE;
@@ -887,11 +887,11 @@ private:
rectTmp.width -= widthNodeStatus_ + gridGap_;
if (rectTmp.width > 0)
{
- wxBitmap nodeIcon;
+ wxImage nodeIcon;
bool isActive = true;
//icon
if (dynamic_cast<const TreeView::RootNode*>(node.get()))
- nodeIcon = rootBmp_;
+ nodeIcon = rootIcon_;
else if (auto dir = dynamic_cast<const TreeView::DirNode*>(node.get()))
{
nodeIcon = dirIcon_;
@@ -901,7 +901,7 @@ private:
nodeIcon = fileIcon_;
if (!isActive)
- nodeIcon = wxBitmap(nodeIcon.ConvertToImage().ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3)); //treat all channels equally!
+ nodeIcon = nodeIcon.ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3); //treat all channels equally!
drawBitmapRtlNoMirror(dc, nodeIcon, rectTmp, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
@@ -926,8 +926,8 @@ private:
int alignment = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL;
//have file size and item count right-justified (but don't change for RTL languages)
- if ((static_cast<ColumnTypeTree>(colType) == ColumnTypeTree::BYTES ||
- static_cast<ColumnTypeTree>(colType) == ColumnTypeTree::ITEM_COUNT) && grid_.GetLayoutDirection() != wxLayout_RightToLeft)
+ if ((static_cast<ColumnTypeTree>(colType) == ColumnTypeTree::bytes ||
+ static_cast<ColumnTypeTree>(colType) == ColumnTypeTree::itemCount) && grid_.GetLayoutDirection() != wxLayout_RightToLeft)
{
rectTmp.width -= 2 * gridGap_;
alignment = wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL;
@@ -946,7 +946,7 @@ private:
{
// -> synchronize renderCell() <-> getBestSize() <-> getRowMouseHover()
- if (static_cast<ColumnTypeTree>(colType) == ColumnTypeTree::FOLDER_NAME)
+ if (static_cast<ColumnTypeTree>(colType) == ColumnTypeTree::folder)
{
if (std::unique_ptr<TreeView::Node> node = treeDataView_.getLine(row))
return node->level_ * widthLevelStep_ + gridGap_ + (showPercentBar_ ? percentageBarWidth_ + 2 * gridGap_ : 0) + widthNodeStatus_ + gridGap_
@@ -964,7 +964,7 @@ private:
{
switch (static_cast<ColumnTypeTree>(colType))
{
- case ColumnTypeTree::FOLDER_NAME:
+ case ColumnTypeTree::folder:
if (std::unique_ptr<TreeView::Node> node = treeDataView_.getLine(row))
{
const int tolerance = 2;
@@ -977,8 +977,8 @@ private:
}
break;
- case ColumnTypeTree::ITEM_COUNT:
- case ColumnTypeTree::BYTES:
+ case ColumnTypeTree::itemCount:
+ case ColumnTypeTree::bytes:
break;
}
return HoverArea::NONE;
@@ -988,11 +988,11 @@ private:
{
switch (static_cast<ColumnTypeTree>(colType))
{
- case ColumnTypeTree::FOLDER_NAME:
- return _("Name");
- case ColumnTypeTree::ITEM_COUNT:
+ case ColumnTypeTree::folder:
+ return _("Folder");
+ case ColumnTypeTree::itemCount:
return _("Items");
- case ColumnTypeTree::BYTES:
+ case ColumnTypeTree::bytes:
return _("Size");
}
return std::wstring();
@@ -1103,7 +1103,7 @@ private:
Grid::ColAttributes* caToggle = nullptr;
for (Grid::ColAttributes& ca : colAttr)
- if (ca.type == static_cast<ColumnType>(ColumnTypeTree::FOLDER_NAME))
+ if (ca.type == static_cast<ColumnType>(ColumnTypeTree::folder))
caFolderName = &ca;
else if (ca.type == ct)
caToggle = &ca;
@@ -1125,7 +1125,7 @@ private:
for (const Grid::ColAttributes& ca : grid_.getColumnConfig())
{
menu.addCheckBox(getColumnLabel(ca.type), [ct = ca.type, toggleColumn] { toggleColumn(ct); },
- ca.visible, ca.type != static_cast<ColumnType>(ColumnTypeTree::FOLDER_NAME)); //do not allow user to hide file name column!
+ ca.visible, ca.type != static_cast<ColumnType>(ColumnTypeTree::folder)); //do not allow user to hide file name column!
}
//--------------------------------------------------------------------------------------------------------
menu.addSeparator();
@@ -1176,14 +1176,14 @@ private:
const int gridGap_ = fastFromDIP(TREE_GRID_GAP_SIZE_DIP);
const int percentageBarWidth_ = fastFromDIP(PERCENTAGE_BAR_WIDTH_DIP);
- const wxBitmap fileIcon_ = IconBuffer::genericFileIcon(IconBuffer::SIZE_SMALL);
- const wxBitmap dirIcon_ = IconBuffer::genericDirIcon (IconBuffer::SIZE_SMALL);
+ const wxImage fileIcon_ = IconBuffer::genericFileIcon(IconBuffer::SIZE_SMALL);
+ const wxImage dirIcon_ = IconBuffer::genericDirIcon (IconBuffer::SIZE_SMALL);
const int widthNodeIcon_;
const int widthLevelStep_;
const int widthNodeStatus_;
- const wxBitmap rootBmp_;
+ const wxImage rootIcon_;
Grid& grid_;
bool showPercentBar_ = true;
diff --git a/FreeFileSync/Source/ui/tree_grid_attr.h b/FreeFileSync/Source/ui/tree_grid_attr.h
index bc6e5300..4a392c7a 100644
--- a/FreeFileSync/Source/ui/tree_grid_attr.h
+++ b/FreeFileSync/Source/ui/tree_grid_attr.h
@@ -16,14 +16,14 @@ namespace fff
{
enum class ColumnTypeTree
{
- FOLDER_NAME,
- ITEM_COUNT,
- BYTES,
+ folder,
+ itemCount,
+ bytes,
};
struct ColAttributesTree
{
- ColumnTypeTree type = ColumnTypeTree::FOLDER_NAME;
+ ColumnTypeTree type = ColumnTypeTree::folder;
int offset = 0;
int stretch = 0;
bool visible = false;
@@ -34,27 +34,27 @@ inline
std::vector<ColAttributesTree> getTreeGridDefaultColAttribs()
{
using namespace zen;
- return //harmonize with tree_view.cpp::onGridLabelContext() => expects stretched FOLDER_NAME and non-stretched other columns!
+ return //harmonize with tree_view.cpp::onGridLabelContext() => expects stretched folder and non-stretched other columns!
{
- { ColumnTypeTree::FOLDER_NAME, fastFromDIP(0 - 60 - 60), 1, true }, //stretch to full width and substract sum of fixed size widths
- { ColumnTypeTree::ITEM_COUNT, fastFromDIP(60), 0, true },
- { ColumnTypeTree::BYTES, fastFromDIP(60), 0, true }, //GTK needs a few pixels more width
+ { ColumnTypeTree::folder, fastFromDIP(0 - 60 - 60), 1, true }, //stretch to full width and substract sum of fixed size widths
+ { ColumnTypeTree::itemCount, fastFromDIP(60), 0, true },
+ { ColumnTypeTree::bytes, fastFromDIP(60), 0, true }, //GTK needs a few pixels more width
};
}
const bool treeGridShowPercentageDefault = true;
-const ColumnTypeTree treeGridLastSortColumnDefault = ColumnTypeTree::BYTES;
+const ColumnTypeTree treeGridLastSortColumnDefault = ColumnTypeTree::bytes;
inline
bool getDefaultSortDirection(ColumnTypeTree colType)
{
switch (colType)
{
- case ColumnTypeTree::FOLDER_NAME:
+ case ColumnTypeTree::folder:
return true;
- case ColumnTypeTree::ITEM_COUNT:
+ case ColumnTypeTree::itemCount:
return false;
- case ColumnTypeTree::BYTES:
+ case ColumnTypeTree::bytes:
return false;
}
assert(false);
diff --git a/FreeFileSync/Source/ui/version_check.cpp b/FreeFileSync/Source/ui/version_check.cpp
index cff65791..0a8ac407 100644
--- a/FreeFileSync/Source/ui/version_check.cpp
+++ b/FreeFileSync/Source/ui/version_check.cpp
@@ -111,7 +111,7 @@ std::wstring getIso3166Country()
//coordinate with get_latest_version_number.php
-std::vector<std::pair<std::string, std::string>> geHttpPostParameters()
+std::vector<std::pair<std::string, std::string>> geHttpPostParameters(wxWindow& parent)
{
assert(runningMainThread()); //this function is not thread-safe, e.g. consider wxWidgets usage in isPortableVersion()
std::vector<std::pair<std::string, std::string>> params;
@@ -136,9 +136,16 @@ std::vector<std::pair<std::string, std::string>> geHttpPostParameters()
const char* osArch = ZEN_STRINGIZE_NUMBER(ZEN_BUILD_ARCH);
params.emplace_back("os_arch", osArch);
+#if GTK_MAJOR_VERSION == 2
+ //wxWindow::GetContentScaleFactor() requires GTK3 or later
+#elif GTK_MAJOR_VERSION == 3
+ params.emplace_back("dip_scale", numberTo<std::string>(parent.GetContentScaleFactor()));
+#else
+#error unknown GTK version!
+#endif
+
params.emplace_back("language", utfTo<std::string>(getIso639Language()));
params.emplace_back("country", utfTo<std::string>(getIso3166Country()));
-
return params;
}
@@ -165,7 +172,7 @@ void showUpdateAvailableDialog(wxWindow* parent, const std::string& onlineVersio
}
switch (showConfirmationDialog(parent, DialogInfoType::info, PopupDialogCfg().
- setIcon(getResourceImage("update_available")).
+ setIcon(loadImage("update_available")).
setTitle(_("Check for Program Updates")).
setMainInstructions(replaceCpy(_("FreeFileSync %x is available!"), L"%x", utfTo<std::wstring>(onlineVersion)) + L' ' + _("Download now?")).
setDetailInstructions(updateDetailsMsg),
@@ -223,18 +230,18 @@ void fff::disableUpdateCheck(time_t& lastUpdateCheck)
}
-void fff::checkForUpdateNow(wxWindow* parent, std::string& lastOnlineVersion)
+void fff::checkForUpdateNow(wxWindow& parent, std::string& lastOnlineVersion)
{
try
{
- const std::string onlineVersion = getOnlineVersion(geHttpPostParameters()); //throw SysError
+ const std::string onlineVersion = getOnlineVersion(geHttpPostParameters(parent)); //throw SysError
lastOnlineVersion = onlineVersion;
if (haveNewerVersionOnline(onlineVersion))
- showUpdateAvailableDialog(parent, onlineVersion);
+ showUpdateAvailableDialog(&parent, onlineVersion);
else
- showNotificationDialog(parent, DialogInfoType::info, PopupDialogCfg().
- setIcon(getResourceImage("update_check")).
+ showNotificationDialog(&parent, DialogInfoType::info, PopupDialogCfg().
+ setIcon(loadImage("update_check")).
setTitle(_("Check for Program Updates")).
setMainInstructions(_("FreeFileSync is up to date.")));
}
@@ -244,7 +251,7 @@ void fff::checkForUpdateNow(wxWindow* parent, std::string& lastOnlineVersion)
{
lastOnlineVersion = "Unknown";
- switch (showQuestionDialog(parent, DialogInfoType::error, PopupDialogCfg().
+ switch (showQuestionDialog(&parent, DialogInfoType::error, PopupDialogCfg().
setTitle(_("Check for Program Updates")).
setMainInstructions(_("Cannot find current FreeFileSync version number online. A newer version is likely available. Check manually now?")).
setDetailInstructions(e.toString()), _("&Check"), _("&Retry")))
@@ -260,7 +267,7 @@ void fff::checkForUpdateNow(wxWindow* parent, std::string& lastOnlineVersion)
}
}
else
- switch (showConfirmationDialog(parent, DialogInfoType::error, PopupDialogCfg().
+ switch (showConfirmationDialog(&parent, DialogInfoType::error, PopupDialogCfg().
setTitle(_("Check for Program Updates")).
setMainInstructions(replaceCpy(_("Unable to connect to %x."), L"%x", L"freefilesync.org")).
setDetailInstructions(e.toString()), _("&Retry")))
@@ -277,13 +284,15 @@ void fff::checkForUpdateNow(wxWindow* parent, std::string& lastOnlineVersion)
struct fff::UpdateCheckResultPrep
{
- const std::vector<std::pair<std::string, std::string>> postParameters = geHttpPostParameters();
+ std::vector<std::pair<std::string, std::string>> postParameters;
};
-std::shared_ptr<UpdateCheckResultPrep> fff::automaticUpdateCheckPrepare()
+std::shared_ptr<const UpdateCheckResultPrep> fff::automaticUpdateCheckPrepare(wxWindow& parent)
{
assert(runningMainThread());
- return std::make_shared<UpdateCheckResultPrep>();
+ auto prep = std::make_shared<UpdateCheckResultPrep>();
+ prep->postParameters = geHttpPostParameters(parent);
+ return prep;
}
@@ -296,7 +305,7 @@ struct fff::UpdateCheckResult
bool internetIsAlive = false;
};
-std::shared_ptr<UpdateCheckResult> fff::automaticUpdateCheckRunAsync(const UpdateCheckResultPrep* resultPrep)
+std::shared_ptr<const UpdateCheckResult> fff::automaticUpdateCheckRunAsync(const UpdateCheckResultPrep* resultPrep)
{
//assert(!runningMainThread()); -> allow synchronous call, too
try
diff --git a/FreeFileSync/Source/ui/version_check.h b/FreeFileSync/Source/ui/version_check.h
index 013849e4..4b17d679 100644
--- a/FreeFileSync/Source/ui/version_check.h
+++ b/FreeFileSync/Source/ui/version_check.h
@@ -25,15 +25,15 @@ struct UpdateCheckResultPrep;
struct UpdateCheckResult;
//run on main thread:
-std::shared_ptr<UpdateCheckResultPrep> automaticUpdateCheckPrepare();
+std::shared_ptr<const UpdateCheckResultPrep> automaticUpdateCheckPrepare(wxWindow& parent);
//run on worker thread: (long-running part of the check)
-std::shared_ptr<UpdateCheckResult> automaticUpdateCheckRunAsync(const UpdateCheckResultPrep* resultPrep);
+std::shared_ptr<const UpdateCheckResult> automaticUpdateCheckRunAsync(const UpdateCheckResultPrep* resultPrep);
//run on main thread:
void automaticUpdateCheckEval(wxWindow* parent, time_t& lastUpdateCheck, std::string& lastOnlineVersion,
const UpdateCheckResult* asyncResult);
//----------------------------------------------------------------------------
//call from main thread:
-void checkForUpdateNow(wxWindow* parent, std::string& lastOnlineVersion);
+void checkForUpdateNow(wxWindow& parent, std::string& lastOnlineVersion);
//----------------------------------------------------------------------------
}
diff --git a/FreeFileSync/Source/version/version.h b/FreeFileSync/Source/version/version.h
index ae27463a..29b4dab7 100644
--- a/FreeFileSync/Source/version/version.h
+++ b/FreeFileSync/Source/version/version.h
@@ -3,7 +3,7 @@
namespace fff
{
-const char ffsVersion[] = "10.25"; //internal linkage!
+const char ffsVersion[] = "11.0"; //internal linkage!
const char FFS_VERSION_SEPARATOR = '.';
}
diff --git a/libcurl/rest.cpp b/libcurl/rest.cpp
index 1f430ce3..e17de3ea 100644
--- a/libcurl/rest.cpp
+++ b/libcurl/rest.cpp
@@ -137,7 +137,7 @@ HttpSession::Result HttpSession::perform(const std::string& serverRelPath,
for (const std::string& headerLine : extraHeaders)
headers = ::curl_slist_append(headers, headerLine.c_str());
- //WTF!!! 1 sec delay when server doesn't support "Expect: 100-continue!! https://stackoverflow.com/questions/49670008/how-to-disable-expect-100-continue-in-libcurl
+ //WTF!!! 1-sec delay when server doesn't support "Expect: 100-continue"!! https://stackoverflow.com/questions/49670008/how-to-disable-expect-100-continue-in-libcurl
headers = ::curl_slist_append(headers, "Expect:"); //guess, what: www.googleapis.com doesn't support it! e.g. gdriveUploadFile()
if (headers)
diff --git a/wx+/app_main.h b/wx+/app_main.h
index 8d2a6eeb..570a2a9c 100644
--- a/wx+/app_main.h
+++ b/wx+/app_main.h
@@ -14,8 +14,8 @@
namespace zen
{
//just some wrapper around a global variable representing the (logical) main application window
-void setMainWindow(wxWindow* window); //set main window and enable "exit on frame delete"
-bool mainWindowWasSet();
+void setGlobalWindow(wxWindow* window); //set main window and enable "exit on frame delete"
+bool globalWindowWasSet();
@@ -26,7 +26,7 @@ bool mainWindowWasSet();
namespace impl
{
inline
-bool& refMainWndStatus()
+bool& refGlobalWindowStatus()
{
static bool status = false; //external linkage!
return status;
@@ -35,15 +35,15 @@ bool& refMainWndStatus()
inline
-void setMainWindow(wxWindow* window)
+void setGlobalWindow(wxWindow* window)
{
wxTheApp->SetTopWindow(window);
wxTheApp->SetExitOnFrameDelete(true);
- impl::refMainWndStatus() = true;
+ impl::refGlobalWindowStatus() = true;
}
-inline bool mainWindowWasSet() { return impl::refMainWndStatus(); }
+inline bool globalWindowWasSet() { return impl::refGlobalWindowStatus(); }
}
#endif //APP_MAIN_H_08215601837818347575856
diff --git a/wx+/async_task.h b/wx+/async_task.h
index 1599c4d7..47660a6a 100644
--- a/wx+/async_task.h
+++ b/wx+/async_task.h
@@ -16,18 +16,16 @@
namespace zen
{
-/*
-Run a task in an async thread, but process result in GUI event loop
--------------------------------------------------------------------
-1. put AsyncGuiQueue instance inside a dialog:
- AsyncGuiQueue guiQueue;
+/* Run a task in an async thread, but process result in GUI event loop
+ -------------------------------------------------------------------
+ 1. put AsyncGuiQueue instance inside a dialog:
+ AsyncGuiQueue guiQueue;
-2. schedule async task and synchronous continuation:
- guiQueue.processAsync(evalAsync, evalOnGui);
+ 2. schedule async task and synchronous continuation:
+ guiQueue.processAsync(evalAsync, evalOnGui);
-Alternative: use wxWidgets' inter-thread communication (wxEvtHandler::QueueEvent) https://wiki.wxwidgets.org/Inter-Thread_and_Inter-Process_communication
- => don't bother, probably too many MT race conditions lurking around
-*/
+ Alternative: wxWidgets' inter-thread communication (wxEvtHandler::QueueEvent) https://wiki.wxwidgets.org/Inter-Thread_and_Inter-Process_communication
+ => don't bother, probably too many MT race conditions lurking around */
namespace impl
{
@@ -44,7 +42,8 @@ class ConcreteTask : public Task
{
public:
template <class Fun2>
- ConcreteTask(std::future<ResultType>&& asyncResult, Fun2&& evalOnGui) : asyncResult_(std::move(asyncResult)), evalOnGui_(std::forward<Fun2>(evalOnGui)) {}
+ ConcreteTask(std::future<ResultType>&& asyncResult, Fun2&& evalOnGui) :
+ asyncResult_(std::move(asyncResult)), evalOnGui_(std::forward<Fun2>(evalOnGui)) {}
bool resultReady () const override { return isReady(asyncResult_); }
void evaluateResult() override
diff --git a/wx+/bitmap_button.h b/wx+/bitmap_button.h
index b40d8dd3..508a72fc 100644
--- a/wx+/bitmap_button.h
+++ b/wx+/bitmap_button.h
@@ -8,6 +8,7 @@
#define BITMAP_BUTTON_H_83415718945878341563415
#include <wx/bmpbuttn.h>
+#include <wx/settings.h>
#include "image_tools.h"
#include "dc.h"
@@ -26,17 +27,20 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr) :
- wxBitmapButton(parent, id, wxNullBitmap, pos, size, style | wxBU_AUTODRAW, validator, name) { SetLabel(label); }
+ wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name)
+ {
+ SetLabel(label);
+ }
};
//wxButton::SetBitmap() also supports "image + text", but screws up proper gap and border handling
void setBitmapTextLabel(wxBitmapButton& btn, const wxImage& img, const wxString& text, int gap = fastFromDIP(5), int border = fastFromDIP(5));
//set bitmap label flicker free:
-void setImage(wxBitmapButton& button, const wxBitmap& bmp);
-
-
+void setImage(wxBitmapButton& button, const wxImage& bmp);
+wxBitmap renderSelectedButton(const wxSize& sz);
+wxBitmap renderPressedButton(const wxSize& sz);
@@ -53,34 +57,80 @@ void setBitmapTextLabel(wxBitmapButton& btn, const wxImage& img, const wxString&
gap = std::max(0, gap);
border = std::max(0, border);
- wxImage dynImage = createImageFromText(text, btn.GetFont(), btn.GetForegroundColour());
+ wxImage imgTxt = createImageFromText(text, btn.GetFont(), btn.GetForegroundColour());
if (img.IsOk())
- dynImage = btn.GetLayoutDirection() != wxLayout_RightToLeft ?
- stackImages(img, dynImage, ImageStackLayout::horizontal, ImageStackAlignment::center, gap) :
- stackImages(dynImage, img, ImageStackLayout::horizontal, ImageStackAlignment::center, gap);
+ imgTxt = btn.GetLayoutDirection() != wxLayout_RightToLeft ?
+ stackImages(img, imgTxt, ImageStackLayout::horizontal, ImageStackAlignment::center, gap) :
+ stackImages(imgTxt, img, ImageStackLayout::horizontal, ImageStackAlignment::center, gap);
//SetMinSize() instead of SetSize() is needed here for wxWindows layout determination to work correctly
const int defaultHeight = wxButton::GetDefaultSize().GetHeight();
- btn.SetMinSize({dynImage.GetWidth () + 2 * border,
- std::max(dynImage.GetHeight() + 2 * border, defaultHeight)});
+ btn.SetMinSize({imgTxt.GetWidth () + 2 * border,
+ std::max(imgTxt.GetHeight() + 2 * border, defaultHeight)});
- btn.SetBitmapLabel(wxBitmap(dynImage));
+ btn.SetBitmapLabel(imgTxt);
//SetLabel() calls confuse wxBitmapButton in the disabled state and it won't show the image! workaround:
- btn.SetBitmapDisabled(wxBitmap(dynImage.ConvertToDisabled()));
+ btn.SetBitmapDisabled(imgTxt.ConvertToDisabled());
}
inline
-void setImage(wxBitmapButton& button, const wxBitmap& bmp)
+void setImage(wxBitmapButton& button, const wxImage& img)
{
- if (!button.GetBitmapLabel().IsSameAs(bmp))
+ if (!img.IsOk())
{
- button.SetBitmapLabel(bmp);
+ button.SetBitmapLabel (wxNullBitmap);
+ button.SetBitmapDisabled(wxNullBitmap);
+ return;
+ }
- //wxWidgets excels at screwing up consistently once again:
- //the first call to SetBitmapLabel() *implicitly* sets the disabled bitmap, too, subsequent calls, DON'T!
- button.SetBitmapDisabled(bmp.ConvertToDisabled()); //inefficiency: wxBitmap::ConvertToDisabled() implicitly converts to wxImage!
+ button.SetBitmapLabel(img);
+
+ //wxWidgets excels at screwing up consistently once again:
+ //the first call to SetBitmapLabel() *implicitly* sets the disabled bitmap, too, subsequent calls, DON'T!
+ button.SetBitmapDisabled(img.ConvertToDisabled()); //inefficiency: wxBitmap::ConvertToDisabled() implicitly converts to wxImage!
+}
+
+
+inline
+wxBitmap renderSelectedButton(const wxSize& sz)
+{
+ wxBitmap bmp(sz); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes
+ {
+ wxMemoryDC dc(bmp);
+ dc.SetBrush(wxColor(0xcc, 0xe4, 0xf8)); //light blue
+ dc.SetPen (wxColor(0x79, 0xbc, 0xed)); //medium blue
+ dc.DrawRectangle(wxRect(bmp.GetSize()));
+ }
+ return bmp;
+}
+
+
+inline
+wxBitmap renderPressedButton(const wxSize& sz)
+{
+ wxBitmap bmp(sz); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes
+ {
+ //draw rectangle border with gradient
+ const wxColor colFrom = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
+ const wxColor colTo(0x11, 0x79, 0xfe); //light blue
+
+ wxMemoryDC dc(bmp);
+ dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+ wxRect rect(bmp.GetSize());
+
+ const int borderSize = fastFromDIP(3);
+ for (int i = 1 ; i <= borderSize; ++i)
+ {
+ const wxColor colGradient((colFrom.Red () * (borderSize - i) + colTo.Red () * i) / borderSize,
+ (colFrom.Green() * (borderSize - i) + colTo.Green() * i) / borderSize,
+ (colFrom.Blue () * (borderSize - i) + colTo.Blue () * i) / borderSize);
+ dc.SetPen(colGradient);
+ dc.DrawRectangle(rect);
+ rect.Deflate(1);
+ }
}
+ return bmp;
}
}
diff --git a/wx+/context_menu.h b/wx+/context_menu.h
index 08a313bf..7096da33 100644
--- a/wx+/context_menu.h
+++ b/wx+/context_menu.h
@@ -29,10 +29,10 @@ class ContextMenu : private wxEvtHandler
public:
ContextMenu() {}
- void addItem(const wxString& label, const std::function<void()>& command, const wxBitmap* bmp = nullptr, bool enabled = true)
+ void addItem(const wxString& label, const std::function<void()>& command, const wxImage& img = wxNullImage, bool enabled = true)
{
wxMenuItem* newItem = new wxMenuItem(menu_.get(), wxID_ANY, label); //menu owns item!
- if (bmp) newItem->SetBitmap(*bmp); //do not set AFTER appending item! wxWidgets screws up for yet another crappy reason
+ if (img.IsOk()) newItem->SetBitmap(img); //do not set AFTER appending item! wxWidgets screws up for yet another crappy reason
menu_->Append(newItem);
if (!enabled) newItem->Enable(false); //do not enable BEFORE appending item! wxWidgets screws up for yet another crappy reason
commandList_[newItem->GetId()] = command; //defer event connection, this may be a submenu only!
@@ -56,7 +56,7 @@ public:
void addSeparator() { menu_->AppendSeparator(); }
- void addSubmenu(const wxString& label, ContextMenu& submenu, const wxBitmap* bmp = nullptr, bool enabled = true) //invalidates submenu!
+ void addSubmenu(const wxString& label, ContextMenu& submenu, const wxImage& img = wxNullImage, bool enabled = true) //invalidates submenu!
{
//transfer submenu commands:
commandList_.insert(submenu.commandList_.begin(), submenu.commandList_.end());
@@ -65,7 +65,7 @@ public:
submenu.menu_->SetNextHandler(menu_.get()); //on wxGTK submenu events are not propagated to their parent menu by default!
wxMenuItem* newItem = new wxMenuItem(menu_.get(), wxID_ANY, label, L"", wxITEM_NORMAL, submenu.menu_.release()); //menu owns item, item owns submenu!
- if (bmp) newItem->SetBitmap(*bmp); //do not set AFTER appending item! wxWidgets screws up for yet another crappy reason
+ if (img.IsOk()) newItem->SetBitmap(img); //do not set AFTER appending item! wxWidgets screws up for yet another crappy reason
menu_->Append(newItem);
if (!enabled) newItem->Enable(false);
}
diff --git a/wx+/dc.h b/wx+/dc.h
index f6f5518b..f1b92ad2 100644
--- a/wx+/dc.h
+++ b/wx+/dc.h
@@ -17,37 +17,38 @@
namespace zen
{
-/*
- 1. wxDCClipper does *not* stack: another fix for yet another poor wxWidgets implementation
+/* 1. wxDCClipper does *not* stack: another fix for yet another poor wxWidgets implementation
- class RecursiveDcClipper
- {
- RecursiveDcClipper(wxDC& dc, const wxRect& r)
- };
+ class RecursiveDcClipper
+ {
+ RecursiveDcClipper(wxDC& dc, const wxRect& r)
+ };
2. wxAutoBufferedPaintDC skips one pixel on left side when RTL layout is active: a fix for a poor wxWidgets implementation
- class BufferedPaintDC
- {
- BufferedPaintDC(wxWindow& wnd, std::unique_ptr<wxBitmap>& buffer)
- };
-*/
+ class BufferedPaintDC
+ {
+ BufferedPaintDC(wxWindow& wnd, std::unique_ptr<wxBitmap>& buffer)
+ }; */
inline
void clearArea(wxDC& dc, const wxRect& rect, const wxColor& col)
{
+ if (rect.width > 0 && //clearArea() is surprisingly expensive
+ rect.height > 0)
+ {
wxDCPenChanger dummy (dc, col);
wxDCBrushChanger dummy2(dc, col);
dc.DrawRectangle(rect);
+ }
}
-/*
-Standard DPI:
- Windows/Ubuntu: 96 x 96
- macOS: wxWidgets uses DIP (note: wxScreenDC().GetPPI() returns 72 x 72 which is a lie; looks like 96 x 96)
-*/
+/* Standard DPI:
+ Windows/Ubuntu: 96 x 96
+ macOS: wxWidgets uses DIP (note: wxScreenDC().GetPPI() returns 72 x 72 which is a lie; looks like 96 x 96) */
+
inline
int fastFromDIP(int d) //like wxWindow::FromDIP (but tied to primary monitor and buffered)
{
@@ -60,7 +61,7 @@ int fastFromDIP(int d) //like wxWindow::FromDIP (but tied to primary monitor and
assert(wxTheApp); //only call after wxWidgets was initalized!
static const int dpiY = wxScreenDC().GetPPI().y; //perf: buffering for calls to ::GetDeviceCaps() needed!?
const int defaultDpi = 96;
- return numeric::round(1.0 * d * dpiY / defaultDpi);
+ return 1.0 * d * dpiY / defaultDpi + 0.49 /*round values like 1.5 down, e.g. 1 pixel on 150% scale*/;
#endif
}
diff --git a/wx+/graph.cpp b/wx+/graph.cpp
index 1fb3775c..f3805fca 100644
--- a/wx+/graph.cpp
+++ b/wx+/graph.cpp
@@ -150,7 +150,7 @@ void drawXLabel(wxDC& dc, double xMin, double xMax, int blockCount, const Conver
if (blockCount <= 0)
return;
- wxDCPenChanger dummy(dc, wxColor(192, 192, 192)); //light grey => not accessible! but no big deal...
+ wxDCPenChanger dummy(dc, wxPen(wxColor(192, 192, 192), fastFromDIP(1))); //light grey => not accessible! but no big deal...
wxDCTextColourChanger textColor(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
const double valRangePerBlock = (xMax - xMin) / blockCount;
@@ -178,7 +178,7 @@ void drawYLabel(wxDC& dc, double yMin, double yMax, int blockCount, const Conver
if (blockCount <= 0)
return;
- wxDCPenChanger dummy(dc, wxColor(192, 192, 192)); //light grey => not accessible! but no big deal...
+ wxDCPenChanger dummy(dc, wxPen(wxColor(192, 192, 192), fastFromDIP(1))); //light grey => not accessible! but no big deal...
wxDCTextColourChanger textColor(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
const double valRangePerBlock = (yMax - yMin) / blockCount;
@@ -591,7 +591,7 @@ void Graph2D::render(wxDC& dc) const
{
//paint graph background (excluding label area)
- wxDCPenChanger dummy (dc, getBorderColor());
+ wxDCPenChanger dummy (dc, wxPen(getBorderColor(), fastFromDIP(1)));
wxDCBrushChanger dummy2(dc, attr_.colorBack);
//accessibility: consider system text and background colors; small drawback: color of graphs is NOT connected to the background! => responsibility of client to use correct colors
@@ -749,7 +749,7 @@ void Graph2D::render(wxDC& dc) const
if (points.size() >= 3)
{
wxDCBrushChanger dummy(dc, it->second.fillColor);
- wxDCPenChanger dummy2(dc, it->second.fillColor);
+ wxDCPenChanger dummy2(dc, wxPen(it->second.fillColor, fastFromDIP(1)));
dc.DrawPolygon(static_cast<int>(points.size()), &points[0]);
}
}
@@ -761,7 +761,7 @@ void Graph2D::render(wxDC& dc) const
{
//alpha channel not supported on wxMSW, so draw selection before curves
wxDCBrushChanger dummy(dc, wxColor(168, 202, 236)); //light blue
- wxDCPenChanger dummy2(dc, wxColor( 51, 153, 255)); //dark blue
+ wxDCPenChanger dummy2(dc, wxPen(wxColor(51, 153, 255), fastFromDIP(1))); //dark blue
auto shrink = [](double* low, double* high)
{
diff --git a/wx+/grid.cpp b/wx+/grid.cpp
index 0ce5c978..3f1599f3 100644
--- a/wx+/grid.cpp
+++ b/wx+/grid.cpp
@@ -123,7 +123,7 @@ int GridData::getBestSize(wxDC& dc, size_t row, ColumnType colType)
wxRect GridData::drawCellBorder(wxDC& dc, const wxRect& rect) //returns remaining rectangle
{
- wxDCPenChanger dummy2(dc, getColorGridLine());
+ wxDCPenChanger dummy2(dc, wxPen(getColorGridLine(), fastFromDIP(1)));
dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight());
dc.DrawLine(rect.GetBottomRight(), rect.GetTopRight() + wxPoint(0, -1));
@@ -156,7 +156,7 @@ void GridData::drawCellText(wxDC& dc, const wxRect& rect, const std::wstring& te
- wxDC::DrawLabel results in GetTextExtent() call even for empty strings!!!
=> skip the wxDC::DrawLabel() cruft and directly call wxDC::DrawText()! */
assert(!contains(text, L'\n'));
- if (text.empty())
+ if (rect.width <= 0 || rect.height <= 0 || text.empty())
return;
//truncate large texts and add ellipsis
@@ -166,7 +166,7 @@ void GridData::drawCellText(wxDC& dc, const wxRect& rect, const std::wstring& te
if (extentTrunc.GetWidth() > rect.width)
{
- //unlike Windows 7 Explorer, we truncate UTF-16 correctly: e.g. CJK-Ideogramm encodes to TWO wchar_t: utfTo<std::wstring>("\xf0\xa4\xbd\x9c");
+ //unlike Windows Explorer, we truncate UTF-16 correctly: e.g. CJK-Ideogramm encodes to TWO wchar_t: utfTo<std::wstring>("\xf0\xa4\xbd\x9c");
size_t low = 0; //number of unicode chars!
size_t high = unicodeLength(text); //
if (high > 1)
@@ -208,7 +208,7 @@ void GridData::drawCellText(wxDC& dc, const wxRect& rect, const std::wstring& te
else if (alignment & wxALIGN_CENTER_VERTICAL)
pt.y += static_cast<int>(std::floor((rect.height - extentTrunc.GetHeight()) / 2.0)); //round down negative values, too!
- //std::unique_ptr<RecursiveDcClipper> clip; -> redundant!? RecursiveDcClipper already used during Grid cell rendering
+ //std::unique_ptr<RecursiveDcClipper> clip; -> redundant!? RecursiveDcClipper already used during grid cell rendering
//if (extentTrunc.GetWidth() > rect.width)
// clip = std::make_unique<RecursiveDcClipper>(dc, rect);
@@ -230,12 +230,12 @@ wxRect GridData::drawColumnLabelBackground(wxDC& dc, const wxRect& rect, bool hi
{
//left border
{
- wxDCPenChanger dummy(dc, *wxWHITE_PEN);
+ wxDCPenChanger dummy(dc, wxPen(*wxWHITE, fastFromDIP(1)));
dc.DrawLine(rect.GetTopLeft(), rect.GetBottomLeft());
}
//bottom, right border
{
- wxDCPenChanger dummy(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
+ wxDCPenChanger dummy(dc, wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), fastFromDIP(1)));
dc.GradientFillLinear(wxRect(rect.GetTopRight(), rect.GetBottomRight()), getColorLabelGradientFrom(), dc.GetPen().GetColour(), wxSOUTH);
dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0));
}
@@ -419,10 +419,10 @@ private:
dc.GradientFillLinear(clientRect, getColorLabelGradientFrom(), getColorLabelGradientTo(), wxSOUTH);
- dc.SetPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
+ dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), fastFromDIP(1)));
{
- wxDCPenChanger dummy(dc, getColorLabelGradientFrom());
+ wxDCPenChanger dummy(dc, wxPen(getColorLabelGradientFrom(), fastFromDIP(1)));
dc.DrawLine(clientRect.GetTopLeft(), clientRect.GetTopRight());
}
@@ -433,7 +433,7 @@ private:
wxRect rectShrinked = clientRect;
rectShrinked.Deflate(1);
- dc.SetPen(*wxWHITE_PEN);
+ dc.SetPen(wxPen(*wxWHITE, fastFromDIP(1)));
//dc.DrawLine(clientRect.GetTopLeft(), clientRect.GetTopRight() + wxPoint(1, 0));
dc.DrawLine(rectShrinked.GetTopLeft(), rectShrinked.GetBottomLeft() + wxPoint(0, 1));
@@ -534,11 +534,11 @@ private:
//border lines
{
- wxDCPenChanger dummy(dc, *wxWHITE_PEN);
+ wxDCPenChanger dummy(dc, wxPen(*wxWHITE, fastFromDIP(1)));
dc.DrawLine(rect.GetTopLeft(), rect.GetTopRight());
}
{
- wxDCPenChanger dummy(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
+ wxDCPenChanger dummy(dc, wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), fastFromDIP(1)));
dc.DrawLine(rect.GetTopLeft(), rect.GetBottomLeft());
dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight());
dc.DrawLine(rect.GetBottomRight(), rect.GetTopRight() + wxPoint(0, -1));
@@ -1520,8 +1520,14 @@ wxSize Grid::GetSizeAvailableForScrollTarget(const wxSize& size)
//luckily "scrollbar-spacing" is stable on GTK3
const wxSize scrollBarSizeTmp = GetSize() - GetClientSize();
- assert(scrollBarSizeTmp.x == 0 || scrollBarSizeTmp.x == 6 || scrollBarSizeTmp.x == 13); //lame hard-coded numbers (from Ubuntu 19.10)
- assert(scrollBarSizeTmp.y == 0 || scrollBarSizeTmp.y == 6 || scrollBarSizeTmp.y == 13); //=> but let's have a *close* eye on scrollbar fluctuation!
+ //lame hard-coded numbers (from Ubuntu 19.10) and openSuse
+ //=> let's have a *close* eye on scrollbar fluctuation!
+ assert(scrollBarSizeTmp.x == 0 ||
+ scrollBarSizeTmp.x == 6 || scrollBarSizeTmp.x == 13 || //Ubuntu 19.10
+ scrollBarSizeTmp.x == 16); //openSuse
+ assert(scrollBarSizeTmp.y == 0 ||
+ scrollBarSizeTmp.y == 6 || scrollBarSizeTmp.y == 13 || //Ubuntu 19.10
+ scrollBarSizeTmp.y == 16); //openSuse
#else
#error unknown GTK version!
#endif
diff --git a/wx+/image_holder.h b/wx+/image_holder.h
index b11ae451..32f8a863 100644
--- a/wx+/image_holder.h
+++ b/wx+/image_holder.h
@@ -8,7 +8,7 @@
#define IMAGE_HOLDER_H_284578426342567457
#include <memory>
-
+ #include <gio/gio.h>
//used by fs/abstract.h => check carefully before adding dependencies!
//DO NOT add any wx/wx+ includes!
@@ -47,6 +47,26 @@ private:
std::unique_ptr<unsigned char, CLibFree> rgb_; //optional
std::unique_ptr<unsigned char, CLibFree> alpha_; //
};
+
+
+struct FileIconHolder
+{
+ //- GTK is NOT thread-safe! The most we can do from worker threads is retrieve a GIcon and later *try*(!) to convert it on the MAIN THREAD! >:( what a waste
+ //- at least g_file_query_info() *always* returns G_IS_THEMED_ICON(gicon) for native file systems => main thread won't block https://gitlab.gnome.org/GNOME/glib/blob/master/gio/glocalfileinfo.c#L1733
+ //- what about G_IS_FILE_ICON(gicon), G_IS_LOADABLE_ICON(gicon)? => may block! => do NOT convert on main thread! (no big deal: doesn't seem to occur in practice)
+ FileIconHolder() {};
+
+ FileIconHolder(GIcon* gi, int maxSz) : //takes ownership!
+ gicon(gi),
+ maxSize(maxSz) {}
+
+ struct GiconFree { void operator()(GIcon* icon) const { ::g_object_unref(icon); } };
+
+ std::unique_ptr<GIcon, GiconFree> gicon;
+ int maxSize = 0;
+
+ explicit operator bool() const { return static_cast<bool>(gicon); }
+};
}
#endif //IMAGE_HOLDER_H_284578426342567457
diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp
index 5328b845..d09e5dfa 100644
--- a/wx+/image_resources.cpp
+++ b/wx+/image_resources.cpp
@@ -5,10 +5,8 @@
// *****************************************************************************
#include "image_resources.h"
-#include <memory>
#include <map>
#include <zen/utf.h>
-#include <zen/globals.h>
#include <zen/perf.h>
#include <zen/thread.h>
#include <zen/file_io.h>
@@ -27,20 +25,19 @@ using namespace zen;
namespace
{
-ImageHolder dpiScale(int width, int height, int dpiWidth, int dpiHeight, const unsigned char* imageRgb, const unsigned char* imageAlpha, int hqScale)
+ImageHolder xbrzScale(int width, int height, const unsigned char* imageRgb, const unsigned char* imageAlpha, int hqScale)
{
- assert(imageRgb && imageAlpha); //see convertToVanillaImage()
- if (width <= 0 || height <= 0 || dpiWidth <= 0 || dpiHeight <= 0)
+ assert(imageRgb && imageAlpha && width > 0 && height > 0); //see convertToVanillaImage()
+ if (width <= 0 || height <= 0)
return ImageHolder(0, 0, true /*withAlpha*/);
const int hqWidth = width * hqScale;
const int hqHeight = height * hqScale;
//get rid of allocation and buffer std::vector<> at thread-level? => no discernable perf improvement
- std::vector<uint32_t> buf(hqWidth * hqHeight + std::max(width * height, dpiWidth * dpiHeight));
+ std::vector<uint32_t> buf(hqWidth * hqHeight + width * height);
uint32_t* const argbSrc = &buf[0] + hqWidth * hqHeight;
uint32_t* const xbrTrg = &buf[0];
- uint32_t* const dpiTrg = argbSrc;
//convert RGB (RGB byte order) to ARGB (BGRA byte order)
{
@@ -60,18 +57,13 @@ ImageHolder dpiScale(int width, int height, int dpiWidth, int dpiHeight, const u
xbrz::ColorFormat::ARGB_UNBUFFERED); //ColorFormat colFmt,
//test: total xBRZ scaling time with ARGB: 300ms, ARGB_UNBUFFERED: 50ms
//-----------------------------------------------------
- xbrz::bilinearScale(xbrTrg, //const uint32_t* src,
- hqWidth, hqHeight, //int srcWidth, int srcHeight,
- dpiTrg, //uint32_t* trg,
- dpiWidth, dpiHeight); //int trgWidth, int trgHeight
- //-----------------------------------------------------
//convert BGRA to RGB + alpha
- ImageHolder trgImg(dpiWidth, dpiHeight, true /*withAlpha*/);
+ ImageHolder trgImg(hqWidth, hqHeight, true /*withAlpha*/);
{
unsigned char* rgb = trgImg.getRgb();
unsigned char* alpha = trgImg.getAlpha();
- std::for_each(dpiTrg, dpiTrg + dpiWidth * dpiHeight, [&](uint32_t col)
+ std::for_each(xbrTrg, xbrTrg + hqWidth * hqHeight, [&](uint32_t col)
{
*alpha++ = xbrz::getAlpha(col);
*rgb++ = xbrz::getRed (col);
@@ -86,28 +78,24 @@ ImageHolder dpiScale(int width, int height, int dpiWidth, int dpiHeight, const u
auto getScalerTask(const std::string& imageName, const wxImage& img, int hqScale, Protected<std::vector<std::pair<std::string, ImageHolder>>>& result)
{
return [imageName,
- width = img.GetWidth(),
- height = img.GetHeight(),
- dpiWidth = fastFromDIP(img.GetWidth()),
- dpiHeight = fastFromDIP(img.GetHeight()), //don't call (wxWidgets function!) fastFromDIP() from worker thread
- rgb = img.GetData(),
- alpha = img.GetAlpha(),
+ width = img.GetWidth(), //
+ height = img.GetHeight(), //don't call wxWidgets functions from worker thread
+ rgb = img.GetData(), //
+ alpha = img.GetAlpha(), //
hqScale, &result]
{
- ImageHolder ih = dpiScale(width, height,
- dpiWidth, dpiHeight,
- rgb, alpha, hqScale);
+ ImageHolder ih = xbrzScale(width, height, rgb, alpha, hqScale);
result.access([&](std::vector<std::pair<std::string, ImageHolder>>& r) { r.emplace_back(imageName, std::move(ih)); });
};
}
-class DpiParallelScaler
+class HqParallelScaler
{
public:
- DpiParallelScaler(int hqScale) : hqScale_(hqScale) { assert(hqScale > 1); }
+ HqParallelScaler(int hqScale) : hqScale_(hqScale) { assert(hqScale > 1); }
- ~DpiParallelScaler() { threadGroup_ = {}; } //DpiParallelScaler must out-live threadGroup!!!
+ ~HqParallelScaler() { threadGroup_ = {}; } //imgKeeper_ must out-live threadGroup!!!
void add(const std::string& imageName, const wxImage& img)
{
@@ -115,11 +103,11 @@ public:
threadGroup_->run(getScalerTask(imageName, img, hqScale_, result_));
}
- std::map<std::string, wxBitmap> waitAndGetResult()
+ std::unordered_map<std::string, wxImage> waitAndGetResult()
{
threadGroup_->wait();
- std::map<std::string, wxBitmap> output;
+ std::unordered_map<std::string, wxImage> output;
result_.access([&](std::vector<std::pair<std::string, ImageHolder>>& r)
{
@@ -147,46 +135,48 @@ private:
//================================================================================================
//================================================================================================
-class GlobalBitmaps
+class ImageBuffer
{
public:
- static std::shared_ptr<GlobalBitmaps> instance()
- {
- static FunStatGlobal<GlobalBitmaps> inst;
- inst.initOnce([] { return std::make_unique<GlobalBitmaps>(); });
- assert(runningMainThread()); //wxWidgets is not thread-safe!
- return inst.get();
- }
+ explicit ImageBuffer(const Zstring& filePath); //throw FileError
- GlobalBitmaps() {}
- ~GlobalBitmaps() { assert(bitmaps_.empty() && anims_.empty()); } //don't leave wxWidgets objects for static destruction!
+ const wxImage& getImage(const std::string& name, int maxWidth /*optional*/, int maxHeight /*optional*/);
- void init(const Zstring& filePath);
- void cleanup()
- {
- bitmaps_.clear();
- anims_ .clear();
- dpiScaler_.reset();
- }
+private:
+ ImageBuffer (const ImageBuffer&) = delete;
+ ImageBuffer& operator=(const ImageBuffer&) = delete;
- const wxBitmap& getImage (const std::string& name);
- const wxAnimation& getAnimation(const std::string& name) const;
+ const wxImage& getRawImage (const std::string& name);
+ const wxImage& getScaledImage(const std::string& name);
-private:
- GlobalBitmaps (const GlobalBitmaps&) = delete;
- GlobalBitmaps& operator=(const GlobalBitmaps&) = delete;
+ std::unordered_map<std::string, wxImage> imagesRaw_;
+ std::unordered_map<std::string, wxImage> imagesScaled_;
+
+ std::unique_ptr<HqParallelScaler> hqScaler_;
+
+ using OutImageKey = std::tuple<std::string /*name*/, int /*height*/>;
+
+ struct OutImageKeyHash
+ {
+ size_t operator()(const OutImageKey& imKey) const
+ {
+ const auto& [name, height] = imKey;
+
+ FNV1aHash<size_t> hash;
+ for (const char c : name)
+ hash.add(c);
- std::map<std::string, wxBitmap> bitmaps_;
- std::map<std::string, wxAnimation> anims_;
+ hash.add(height);
- std::unique_ptr<DpiParallelScaler> dpiScaler_;
+ return hash.get();
+ }
+ };
+ std::unordered_map<OutImageKey, wxImage, OutImageKeyHash> imagesOut_;
};
-void GlobalBitmaps::init(const Zstring& zipPath) //throw FileError
+ImageBuffer::ImageBuffer(const Zstring& zipPath) //throw FileError
{
- assert(bitmaps_.empty() && anims_.empty());
-
std::vector<std::pair<Zstring /*file name*/, std::string /*byte stream*/>> streams;
try //to load from ZIP first:
@@ -223,13 +213,12 @@ void GlobalBitmaps::init(const Zstring& zipPath) //throw FileError
const int hqScale = std::clamp<int>(std::ceil(fastFromDIP(1000) / 1000.0), 1, xbrz::SCALE_FACTOR_MAX);
//even for 125% DPI scaling, "2xBRZ + bilinear downscale" gives a better result than mere "125% bilinear upscale"!
if (hqScale > 1)
- dpiScaler_ = std::make_unique<DpiParallelScaler>(hqScale);
+ hqScaler_ = std::make_unique<HqParallelScaler>(hqScale);
for (const auto& [fileName, stream] : streams)
if (endsWith(fileName, Zstr(".png")))
{
wxMemoryInputStream wxstream(stream.c_str(), stream.size()); //stream does not take ownership of data
- //bonus: work around wxWidgets bug: wxAnimation::Load() requires seekable input stream (zip-input stream is not seekable)
wxImage img(wxstream, wxBITMAP_TYPE_PNG);
assert(img.IsOk());
@@ -239,88 +228,114 @@ void GlobalBitmaps::init(const Zstring& zipPath) //throw FileError
convertToVanillaImage(img);
const std::string imageName = utfTo<std::string>(beforeLast(fileName, Zstr("."), IF_MISSING_RETURN_NONE));
- if (dpiScaler_)
- dpiScaler_->add(imageName, img); //scale in parallel!
+
+ imagesRaw_.emplace(imageName, img);
+ if (hqScaler_)
+ hqScaler_->add(imageName, img); //scale in parallel!
else
- bitmaps_.emplace(imageName, img);
+ imagesScaled_.emplace(imageName, img);
- //alternative: wxBitmap::NewFromPNGData(stream.c_str(), stream.size())?
- // => Windows: just a (slow!) wrapper for wxBitmpat(wxImage())!
+ //wxBitmap::NewFromPNGData(stream.c_str(), stream.size())?
+ // => Windows: just a (slow!) wrapper for wxBitmap(wxImage())!
}
-#if 0
- else if (endsWith(fileName, Zstr(".gif")))
- {
- [[maybe_unused]] const bool loadSuccess = anims_[fileName].Load(wxstream, wxANIMATION_TYPE_GIF);
- assert(loadSuccess);
- }
-#endif
else
assert(false);
}
-const wxBitmap& GlobalBitmaps::getImage(const std::string& name)
+const wxImage& ImageBuffer::getRawImage(const std::string& name)
+{
+ if (auto it = imagesRaw_.find(name);
+ it != imagesRaw_.end())
+ return it->second;
+
+ assert(false);
+ return wxNullImage;
+}
+
+
+const wxImage& ImageBuffer::getScaledImage(const std::string& name)
{
- //test: this function is first called about 220ms after GlobalBitmaps::init() has ended
+ //test: this function is first called about 220ms after ImageBuffer::ImageBuffer() has ended
// => should be enough time to finish xBRZ scaling in parallel (which takes 50ms)
//debug perf: extra 800-1000ms during startup
- if (dpiScaler_)
+ if (hqScaler_)
{
- bitmaps_ = dpiScaler_->waitAndGetResult();
- dpiScaler_.reset();
+ imagesScaled_ = hqScaler_->waitAndGetResult();
+ hqScaler_.reset();
}
- if (auto it = bitmaps_.find(name);
- it != bitmaps_.end())
+ if (auto it = imagesScaled_.find(name);
+ it != imagesScaled_.end())
return it->second;
assert(false);
- return wxNullBitmap;
+ return wxNullImage;
}
-const wxAnimation& GlobalBitmaps::getAnimation(const std::string& name) const
+const wxImage& ImageBuffer::getImage(const std::string& name, int maxWidth /*optional*/, int maxHeight /*optional*/)
{
- if (auto it = anims_.find(name);
- it != anims_.end())
- return it->second;
- assert(false);
- return wxNullAnimation;
+ const wxImage& rawImg = getRawImage(name);
+
+ const wxSize dpiSize(fastFromDIP(rawImg.GetWidth ()),
+ fastFromDIP(rawImg.GetHeight()));
+
+ int outHeight = dpiSize.y;
+ if (maxWidth >= 0 && maxWidth < dpiSize.x)
+ outHeight = rawImg.GetHeight() * maxWidth / rawImg.GetWidth();
+
+ if (maxHeight >= 0 && maxHeight < outHeight)
+ outHeight = maxHeight;
+
+ const OutImageKey imkey{name, outHeight};
+
+ auto it = imagesOut_.find(imkey);
+ if (it == imagesOut_.end())
+ {
+ if (rawImg.GetHeight() >= outHeight) //=> skip needless xBRZ upscaling
+ it = imagesOut_.emplace(imkey, shrinkImage(rawImg, -1 /*maxWidth*/, outHeight)).first;
+ else if (rawImg.GetHeight() >= 0.9 * outHeight) //almost there: also no need for xBRZ-scale
+ //however: for 125% DPI scaling, "2xBRZ + bilinear downscale" gives a better result than mere "125% bilinear upscale"!
+ it = imagesOut_.emplace(imkey, rawImg.Scale(rawImg.GetWidth() * outHeight / rawImg.GetHeight(), outHeight, wxIMAGE_QUALITY_BILINEAR)).first;
+ else
+ it = imagesOut_.emplace(imkey, shrinkImage(getScaledImage(name), -1 /*maxWidth*/, outHeight)).first;
+ }
+ return it->second;
}
+
+
+std::unique_ptr<ImageBuffer> globalImageBuffer;
}
-void zen::initResourceImages(const Zstring& zipPath)
+void zen::imageResourcesInit(const Zstring& zipPath) //throw FileError
{
- if (std::shared_ptr<GlobalBitmaps> inst = GlobalBitmaps::instance())
- inst->init(zipPath);
- else
- assert(false);
+ assert(runningMainThread()); //wxWidgets is not thread-safe!
+ assert(!globalImageBuffer);
+ globalImageBuffer = std::make_unique<ImageBuffer>(zipPath); //throw FileError
}
-void zen::cleanupResourceImages()
+void zen::ImageResourcesCleanup()
{
- if (std::shared_ptr<GlobalBitmaps> inst = GlobalBitmaps::instance())
- inst->cleanup();
- else
- assert(false);
+ assert(runningMainThread()); //wxWidgets is not thread-safe!
+ assert(globalImageBuffer);
+ globalImageBuffer.reset();
}
-const wxBitmap& zen::getResourceImage(const std::string& name)
+const wxImage& zen::loadImage(const std::string& name, int maxWidth /*optional*/, int maxHeight /*optional*/)
{
- if (std::shared_ptr<GlobalBitmaps> inst = GlobalBitmaps::instance())
- return inst->getImage(name);
- assert(false);
- return wxNullBitmap;
+ assert(runningMainThread()); //wxWidgets is not thread-safe!
+ assert(globalImageBuffer);
+ if (globalImageBuffer)
+ return globalImageBuffer->getImage(name, maxWidth, maxHeight);
+ return wxNullImage;
}
-const wxAnimation& zen::getResourceAnimation(const std::string& name)
+const wxImage& zen::loadImage(const std::string& name, int maxSize)
{
- if (std::shared_ptr<GlobalBitmaps> inst = GlobalBitmaps::instance())
- return inst->getAnimation(name);
- assert(false);
- return wxNullAnimation;
+ return loadImage(name, maxSize, maxSize);
}
diff --git a/wx+/image_resources.h b/wx+/image_resources.h
index b996d977..2ac6f308 100644
--- a/wx+/image_resources.h
+++ b/wx+/image_resources.h
@@ -7,7 +7,6 @@
#ifndef IMAGE_RESOURCES_H_8740257825342532457
#define IMAGE_RESOURCES_H_8740257825342532457
-#include <wx/bitmap.h>
#include <wx/animate.h>
#include <zen/zstring.h>
@@ -15,11 +14,11 @@
namespace zen
{
//pass resources .zip file at application startup
-void initResourceImages(const Zstring& zipPath); //throw FileError
-void cleanupResourceImages();
+void imageResourcesInit(const Zstring& zipPath); //throw FileError
+void ImageResourcesCleanup();
-const wxBitmap& getResourceImage (const std::string& name);
-const wxAnimation& getResourceAnimation(const std::string& name);
+const wxImage& loadImage(const std::string& name, int maxWidth /*optional*/, int maxHeight /*optional*/);
+const wxImage& loadImage(const std::string& name, int maxSize = -1);
}
#endif //IMAGE_RESOURCES_H_8740257825342532457
diff --git a/wx+/image_tools.cpp b/wx+/image_tools.cpp
index 9fcc5563..19ba6ba6 100644
--- a/wx+/image_tools.cpp
+++ b/wx+/image_tools.cpp
@@ -14,48 +14,116 @@ using namespace zen;
namespace
{
-void writeToImage(wxImage& output, const wxImage& top, const wxPoint& pos)
+template <int PixBytes>
+void copyImageBlock(const unsigned char* src, int srcWidth,
+ /**/ unsigned char* trg, int trgWidth, int blockWidth, int blockHeight)
{
- const int topWidth = top.GetWidth ();
- const int topHeight = top.GetHeight();
- const int outWidth = output.GetWidth();
+ assert(srcWidth >= blockWidth && trgWidth >= blockWidth);
+ const int srcPitch = srcWidth * PixBytes;
+ const int trgPitch = trgWidth * PixBytes;
+ const int blockPitch = blockWidth * PixBytes;
+ for (int y = 0; y < blockHeight; ++y)
+ std::memcpy(trg + y * trgPitch, src + y * srcPitch, blockPitch);
+}
+
- assert(0 <= pos.x && pos.x + topWidth <= outWidth ); //draw area must be a
- assert(0 <= pos.y && pos.y + topHeight <= output.GetHeight()); //subset of output image!
- assert(top.HasAlpha() && output.HasAlpha());
+//...what wxImage::Resize() wants to be when it grows up
+void copySubImage(const wxImage& src, wxPoint srcPos,
+ /**/ wxImage& trg, wxPoint trgPos, wxSize blockSize)
+{
+ auto pointClamp = [](const wxPoint& pos, const wxImage& img) -> wxPoint
+ {
+ return {
+ std::clamp(pos.x, 0, img.GetWidth ()),
+ std::clamp(pos.y, 0, img.GetHeight())};
+ };
+ auto pointMinus = [](const wxPoint& lhs, const wxPoint& rhs) { return wxSize{lhs.x - rhs.x, lhs.y - rhs.y}; };
+ //work around yet another wxWidgets screw up: WTF does "operator-(wxPoint, wxPoint)" return wxPoint instead of wxSize!??
+
+ const wxPoint trgPos2 = pointClamp(trgPos, trg);
+ const wxPoint trgPos2End = pointClamp(trgPos + blockSize, trg);
+
+ blockSize = pointMinus(trgPos2End, trgPos2);
+ srcPos += pointMinus(trgPos2, trgPos);
+ trgPos = trgPos2;
+ if (blockSize.x <= 0 || blockSize.y <= 0)
+ return;
+
+ const wxPoint srcPos2 = pointClamp(srcPos, src);
+ const wxPoint srcPos2End = pointClamp(srcPos + blockSize, src);
+
+ blockSize = pointMinus(srcPos2End, srcPos2);
+ trgPos += pointMinus(srcPos2, srcPos);
+ srcPos = srcPos2;
+ if (blockSize.x <= 0 || blockSize.y <= 0)
+ return;
+ //what if target block size is bigger than source block size? should we clear the area that is not copied from source?
+
+ copyImageBlock<3>(src.GetData() + 3 * (srcPos.x + srcPos.y * src.GetWidth()), src.GetWidth(),
+ trg.GetData() + 3 * (trgPos.x + trgPos.y * trg.GetWidth()), trg.GetWidth(),
+ blockSize.x, blockSize.y);
+
+ copyImageBlock<1>(src.GetAlpha() + srcPos.x + srcPos.y * src.GetWidth(), src.GetWidth(),
+ trg.GetAlpha() + trgPos.x + trgPos.y * trg.GetWidth(), trg.GetWidth(),
+ blockSize.x, blockSize.y);
+}
+
+
+void copyImageLayover(const wxImage& src,
+ /**/ wxImage& trg, wxPoint trgPos)
+{
+ const int srcWidth = src.GetWidth ();
+ const int srcHeight = src.GetHeight();
+ const int trgWidth = trg.GetWidth();
+
+ assert(0 <= trgPos.x && trgPos.x + srcWidth <= trgWidth ); //draw area must be a
+ assert(0 <= trgPos.y && trgPos.y + srcHeight <= trg.GetHeight()); //subset of target image!
//https://en.wikipedia.org/wiki/Alpha_compositing
- const unsigned char* topRgb = top.GetData();
- const unsigned char* topAlpha = top.GetAlpha();
+ const unsigned char* srcRgb = src.GetData();
+ const unsigned char* srcAlpha = src.GetAlpha();
- for (int y = 0; y < topHeight; ++y)
+ for (int y = 0; y < srcHeight; ++y)
{
- unsigned char* outRgb = output.GetData () + 3 * (pos.x + (pos.y + y) * outWidth);
- unsigned char* outAlpha = output.GetAlpha() + pos.x + (pos.y + y) * outWidth;
+ unsigned char* trgRgb = trg.GetData () + 3 * (trgPos.x + (trgPos.y + y) * trgWidth);
+ unsigned char* trgAlpha = trg.GetAlpha() + trgPos.x + (trgPos.y + y) * trgWidth;
- for (int x = 0; x < topWidth; ++x)
+ for (int x = 0; x < srcWidth; ++x)
{
- const int w1 = *topAlpha; //alpha-composition interpreted as weighted average
- const int w2 = *outAlpha * (255 - w1) / 255;
+ const int w1 = *srcAlpha; //alpha-composition interpreted as weighted average
+ const int w2 = *trgAlpha * (255 - w1) / 255;
const int wSum = w1 + w2;
- auto calcColor = [w1, w2, wSum](unsigned char colTop, unsigned char colBot)
+ auto calcColor = [w1, w2, wSum](unsigned char colsrc, unsigned char colTrg)
{
- return static_cast<unsigned char>(wSum == 0 ? 0 : (colTop * w1 + colBot * w2) / wSum);
+ return static_cast<unsigned char>(wSum == 0 ? 0 : (colsrc * w1 + colTrg * w2) / wSum);
};
- outRgb[0] = calcColor(topRgb[0], outRgb[0]);
- outRgb[1] = calcColor(topRgb[1], outRgb[1]);
- outRgb[2] = calcColor(topRgb[2], outRgb[2]);
+ trgRgb[0] = calcColor(srcRgb[0], trgRgb[0]);
+ trgRgb[1] = calcColor(srcRgb[1], trgRgb[1]);
+ trgRgb[2] = calcColor(srcRgb[2], trgRgb[2]);
- *outAlpha = static_cast<unsigned char>(wSum);
+ *trgAlpha = static_cast<unsigned char>(wSum);
- topRgb += 3;
- outRgb += 3;
- ++topAlpha;
- ++outAlpha;
+ srcRgb += 3;
+ trgRgb += 3;
+ ++srcAlpha;
+ ++trgAlpha;
}
}
}
+
+
+std::vector<std::pair<wxString, wxSize>> getTextExtentInfo(const wxString& text, const wxFont& font)
+{
+ wxMemoryDC dc; //the context used for bitmaps
+ dc.SetFont(font); //the font parameter of GetMultiLineTextExtent() is not evaluated on OS X, wxWidgets 2.9.5, so apply it to the DC directly!
+
+ std::vector<std::pair<wxString, wxSize>> lineInfo; //text + extent
+ for (const wxString& line : split(text, L'\n', SplitType::ALLOW_EMPTY))
+ lineInfo.emplace_back(line, line.empty() ? wxSize() : dc.GetTextExtent(line));
+
+ return lineInfo;
+}
}
@@ -69,27 +137,23 @@ wxImage zen::stackImages(const wxImage& img1, const wxImage& img2, ImageStackLay
const int img2Width = img2.GetWidth ();
const int img2Height = img2.GetHeight();
- int width = std::max(img1Width, img2Width);
- int height = std::max(img1Height, img2Height);
-
- if (dir == ImageStackLayout::horizontal)
- width = img1Width + gap + img2Width;
- else
- height = img1Height + gap + img2Height;
+ const wxSize newSize = dir == ImageStackLayout::horizontal ?
+ wxSize(img1Width + gap + img2Width, std::max(img1Height, img2Height)) :
+ wxSize(std::max(img1Width, img2Width), img1Height + gap + img2Height);
- wxImage output(width, height);
+ wxImage output(newSize);
output.SetAlpha();
- ::memset(output.GetAlpha(), wxIMAGE_ALPHA_TRANSPARENT, width * height);
+ std::memset(output.GetAlpha(), wxIMAGE_ALPHA_TRANSPARENT, newSize.x * newSize.y);
auto calcPos = [&](int imageExtent, int totalExtent)
{
switch (align)
{
case ImageStackAlignment::center:
- return static_cast<int>(std::floor((totalExtent - imageExtent) / 2.0)); //consistency: round down negative values, too!
- case ImageStackAlignment::left:
+ return (totalExtent - imageExtent) / 2;
+ case ImageStackAlignment::left: //or top
return 0;
- case ImageStackAlignment::right:
+ case ImageStackAlignment::right: //or bottom
return totalExtent - imageExtent;
}
assert(false);
@@ -99,34 +163,19 @@ wxImage zen::stackImages(const wxImage& img1, const wxImage& img2, ImageStackLay
switch (dir)
{
case ImageStackLayout::horizontal:
- writeToImage(output, img1, wxPoint(0, calcPos(img1Height, height)));
- writeToImage(output, img2, wxPoint(img1Width + gap, calcPos(img2Height, height)));
+ copySubImage(img1, wxPoint(), output, wxPoint(0, calcPos(img1Height, newSize.y)), img1.GetSize());
+ copySubImage(img2, wxPoint(), output, wxPoint(img1Width + gap, calcPos(img2Height, newSize.y)), img2.GetSize());
break;
case ImageStackLayout::vertical:
- writeToImage(output, img1, wxPoint(calcPos(img1Width, width), 0));
- writeToImage(output, img2, wxPoint(calcPos(img2Width, width), img1Height + gap));
+ copySubImage(img1, wxPoint(), output, wxPoint(calcPos(img1Width, newSize.x), 0), img1.GetSize());
+ copySubImage(img2, wxPoint(), output, wxPoint(calcPos(img2Width, newSize.x), img1Height + gap), img2.GetSize());
break;
}
return output;
}
-namespace
-{
-std::vector<std::pair<wxString, wxSize>> getTextExtentInfo(const wxString& text, const wxFont& font)
-{
- wxMemoryDC dc; //the context used for bitmaps
- dc.SetFont(font); //the font parameter of GetMultiLineTextExtent() is not evalated on OS X, wxWidgets 2.9.5, so apply it to the DC directly!
-
- std::vector<std::pair<wxString, wxSize>> lineInfo; //text + extent
- for (const wxString& line : split(text, L'\n', SplitType::ALLOW_EMPTY))
- lineInfo.emplace_back(line, line.empty() ? wxSize() : dc.GetTextExtent(line));
-
- return lineInfo;
-}
-}
-
wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const wxColor& col, ImageStackAlignment textAlign)
{
//assert(!contains(text, L"&")); //accelerator keys not supported here
@@ -147,7 +196,7 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const
lineHeight = std::max(lineHeight, lineSize.GetHeight()); //wxWidgets comment "GetTextExtent will return 0 for empty string"
}
if (maxWidth == 0 || lineHeight == 0)
- return wxImage();
+ return wxNullImage;
wxBitmap newBitmap(maxWidth, lineHeight * lineInfo.size()); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes
{
@@ -155,7 +204,7 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const
dc.SetBackground(*wxWHITE_BRUSH);
dc.Clear();
- dc.SetTextForeground(*wxBLACK); //for use in calcAlphaForBlackWhiteImage
+ dc.SetTextForeground(*wxBLACK); //for proper alpha-channel calculation
dc.SetTextBackground(*wxWHITE); //
dc.SetFont(font);
@@ -175,7 +224,6 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const
dc.DrawText(lineText, wxPoint((maxWidth - lineSize.GetWidth()) / 2, posY));
break;
}
-
posY += lineHeight;
}
}
@@ -193,11 +241,9 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const
//black(0,0,0) becomes wxIMAGE_ALPHA_OPAQUE(255), while white(255,255,255) becomes wxIMAGE_ALPHA_TRANSPARENT(0)
*alpha++ = static_cast<unsigned char>((255 - rgb[0] + 255 - rgb[1] + 255 - rgb[2]) / 3); //mixed-mode arithmetics!
- rgb[0] = col.Red (); //
- rgb[1] = col.Green(); //apply actual text color
- rgb[2] = col.Blue (); //
-
- rgb += 3;
+ *rgb++ = col.Red (); //
+ *rgb++ = col.Green(); //apply actual text color
+ *rgb++ = col.Blue (); //
}
return output;
}
@@ -208,43 +254,91 @@ wxImage zen::layOver(const wxImage& back, const wxImage& front, int alignment)
if (!front.IsOk()) return back;
assert(front.HasAlpha() && back.HasAlpha());
- const int width = std::max(back.GetWidth(), front.GetWidth());
- const int height = std::max(back.GetHeight(), front.GetHeight());
+ const wxSize newSize(std::max(back.GetWidth(), front.GetWidth()),
+ std::max(back.GetHeight(), front.GetHeight()));
- const int offsetX = [&]
+ auto calcNewPos = [&](const wxImage& img)
{
- if (alignment & wxALIGN_RIGHT)
- return back.GetWidth() - front.GetWidth();
- if (alignment & wxALIGN_CENTER_HORIZONTAL)
- return (back.GetWidth() - front.GetWidth()) / 2;
-
- static_assert(wxALIGN_LEFT == 0);
- return 0;
- }();
+ wxPoint newPos;
+ if (alignment & wxALIGN_RIGHT) //note: wxALIGN_LEFT == 0!
+ newPos.x = newSize.GetWidth() - img.GetWidth();
+ else if (alignment & wxALIGN_CENTER_HORIZONTAL)
+ newPos.x = (newSize.GetWidth() - img.GetWidth()) / 2;
+
+ if (alignment & wxALIGN_BOTTOM) //note: wxALIGN_TOP == 0!
+ newPos.y = newSize.GetHeight() - img.GetHeight();
+ else if (alignment & wxALIGN_CENTER_VERTICAL)
+ newPos.y = (newSize.GetHeight() - img.GetHeight()) / 2;
+
+ return newPos;
+ };
- const int offsetY = [&]
- {
- if (alignment & wxALIGN_BOTTOM)
- return back.GetHeight() - front.GetHeight();
- if (alignment & wxALIGN_CENTER_VERTICAL)
- return (back.GetHeight() - front.GetHeight()) / 2;
+ wxImage output(newSize);
+ output.SetAlpha();
+ std::memset(output.GetAlpha(), wxIMAGE_ALPHA_TRANSPARENT, newSize.x * newSize.y);
- static_assert(wxALIGN_TOP == 0);
- return 0;
- }();
+ copySubImage(back, wxPoint(), output, calcNewPos(back), back.GetSize());
+ //use resizeCanvas()? might return ref-counted copy!
//can't use wxMemoryDC and wxDC::DrawBitmap(): no alpha channel support on wxGTK!
- wxImage output(width, height);
+ copyImageLayover(front, output, calcNewPos(front));
+
+ return output;
+}
+
+
+wxImage zen::resizeCanvas(const wxImage& img, wxSize newSize, int alignment)
+{
+ if (newSize == img.GetSize())
+ return img; //caveat: wxImage is ref-counted *without* copy on write
+
+ wxPoint newPos;
+ if (alignment & wxALIGN_RIGHT) //note: wxALIGN_LEFT == 0!
+ newPos.x = newSize.GetWidth() - img.GetWidth();
+ else if (alignment & wxALIGN_CENTER_HORIZONTAL)
+ newPos.x = static_cast<int>(std::floor((newSize.GetWidth() - img.GetWidth()) / 2)); //consistency: round down negative values, too!
+
+ if (alignment & wxALIGN_BOTTOM) //note: wxALIGN_TOP == 0!
+ newPos.y = newSize.GetHeight() - img.GetHeight();
+ else if (alignment & wxALIGN_CENTER_VERTICAL)
+ newPos.y = static_cast<int>(std::floor((newSize.GetHeight() - img.GetHeight()) / 2)); //consistency: round down negative values, too!
+
+ wxImage output(newSize);
output.SetAlpha();
- ::memset(output.GetAlpha(), wxIMAGE_ALPHA_TRANSPARENT, width * height);
+ std::memset(output.GetAlpha(), wxIMAGE_ALPHA_TRANSPARENT, newSize.x * newSize.y);
- const wxPoint posBack(std::max(-offsetX, 0), std::max(-offsetY, 0));
- writeToImage(output, back, posBack);
- writeToImage(output, front, posBack + wxPoint(offsetX, offsetY));
+ copySubImage(img, wxPoint(), output, newPos, img.GetSize());
+ //about 50x faster than e.g. wxImage::Resize!!! suprise :>
return output;
}
+wxImage zen::shrinkImage(const wxImage& img, int maxWidth /*optional*/, int maxHeight /*optional*/)
+{
+ wxSize newSize = img.GetSize();
+
+ if (maxWidth >= 0)
+ if (maxWidth < newSize.x)
+ {
+ newSize.y = newSize.y * maxWidth / newSize.x;
+ newSize.x = maxWidth;
+ }
+ if (maxHeight >= 0)
+ if (maxHeight < newSize.y)
+ {
+ newSize = img.GetSize(); //avoid loss of precision
+ newSize.x = newSize.x * maxHeight / newSize.y; //
+ newSize.y = maxHeight;
+ }
+
+ if (newSize == img.GetSize())
+ return img;
+
+ return img.Scale(newSize.x, newSize.y, wxIMAGE_QUALITY_BILINEAR); //looks sharper than wxIMAGE_QUALITY_HIGH!
+ //perf: use xbrz::bilinearScale instead? only about 10% shorter runtime
+}
+
+
void zen::convertToVanillaImage(wxImage& img)
{
if (!img.HasAlpha())
@@ -268,20 +362,20 @@ void zen::convertToVanillaImage(wxImage& img)
if (haveMask)
{
img.SetMask(false);
- unsigned char* alphaPtr = img.GetAlpha();
- const unsigned char* dataPtr = img.GetData();
+ unsigned char* alpha = img.GetAlpha();
+ const unsigned char* rgb = img.GetData();
const int pixelCount = width * height;
for (int i = 0; i < pixelCount; ++ i)
{
- const unsigned char r = *dataPtr++;
- const unsigned char g = *dataPtr++;
- const unsigned char b = *dataPtr++;
+ const unsigned char r = *rgb++;
+ const unsigned char g = *rgb++;
+ const unsigned char b = *rgb++;
if (r == mask_r &&
g == mask_g &&
b == mask_b)
- alphaPtr[i] = wxIMAGE_ALPHA_TRANSPARENT;
+ alpha[i] = wxIMAGE_ALPHA_TRANSPARENT;
}
}
}
diff --git a/wx+/image_tools.h b/wx+/image_tools.h
index 3e401f73..cd895c2e 100644
--- a/wx+/image_tools.h
+++ b/wx+/image_tools.h
@@ -8,10 +8,10 @@
#define IMAGE_TOOLS_H_45782456427634254
#include <numeric>
-#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/dcmemory.h>
#include <zen/basic_math.h>
+#include <wx+/dc.h>
namespace zen
@@ -36,10 +36,8 @@ wxImage createImageFromText(const wxString& text, const wxFont& font, const wxCo
wxImage layOver(const wxImage& back, const wxImage& front, int alignment = wxALIGN_CENTER);
-wxImage greyScale(const wxImage& img); //greyscale + brightness adaption
-wxBitmap greyScale(const wxBitmap& bmp); //
-wxBitmap greyScaleIfDisabled(const wxBitmap& bmp, bool enabled);
-
+wxImage greyScale(const wxImage& img); //greyscale + brightness adaption
+wxImage greyScaleIfDisabled(const wxImage& img, bool enabled);
//void moveImage(wxImage& img, int right, int up);
void adjustBrightness(wxImage& img, int targetLevel);
@@ -52,7 +50,10 @@ void convertToVanillaImage(wxImage& img); //add alpha channel if missing + remov
//wxColor hsvColor(double h, double s, double v); //h within [0, 360), s, v within [0, 1]
-wxImage shrinkImage(const wxImage& img, int requestedSize);
+wxImage shrinkImage(const wxImage& img, int maxWidth /*optional*/, int maxHeight /*optional*/);
+inline wxImage shrinkImage(const wxImage& img, int maxSize) { return shrinkImage(img, maxSize, maxSize); }
+
+wxImage resizeCanvas(const wxImage& img, wxSize newSize, int alignment);
inline
@@ -65,48 +66,38 @@ wxImage getTransparentPixel()
}
+inline
+int getDefaultMenuIconSize()
+{
+ return fastFromDIP(24);
+}
-//################################### implementation ###################################
-/*
-inline
-void moveImage(wxImage& img, int right, int up)
-{
- img = img.GetSubImage(wxRect(std::max(0, -right), std::max(0, up), img.GetWidth() - abs(right), img.GetHeight() - abs(up)));
- img.Resize(wxSize(img.GetWidth() + abs(right), img.GetHeight() + abs(up)), wxPoint(std::max(0, right), std::max(0, -up)));
-}
-*/
+
+//################################### implementation ###################################
+
inline
wxImage greyScale(const wxImage& img)
{
wxImage output = img.ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3); //treat all channels equally!
- //wxImage output = bmp.ConvertToImage().ConvertToGreyscale();
adjustBrightness(output, 160);
return output;
}
inline
-wxBitmap greyScale(const wxBitmap& bmp)
-{
- assert(!bmp.GetMask()); //wxWidgets screws up for the gazillionth time applying a mask instead of alpha channel if the .png image has only 0 and 0xff opacity values!!!
- return greyScale(bmp.ConvertToImage());
-}
-
-
-inline
-wxBitmap greyScaleIfDisabled(const wxBitmap& bmp, bool enabled)
+wxImage greyScaleIfDisabled(const wxImage& img, bool enabled)
{
if (enabled) //avoid ternary WTF
- return bmp;
+ return img;
else
- return greyScale(bmp);
+ return greyScale(img);
}
@@ -162,20 +153,6 @@ void adjustBrightness(wxImage& img, int targetLevel)
}
-inline
-wxImage shrinkImage(const wxImage& img, int requestedSize)
-{
- const int maxExtent = std::max(img.GetWidth(), img.GetHeight());
- assert(requestedSize <= maxExtent);
-
- if (requestedSize >= maxExtent)
- return img;
-
- return img.Scale(img.GetWidth () * requestedSize / maxExtent,
- img.GetHeight() * requestedSize / maxExtent, wxIMAGE_QUALITY_BILINEAR); //looks sharper than wxIMAGE_QUALITY_HIGH!
-}
-
-
/*
inline
wxColor gradient(const wxColor& from, const wxColor& to, double fraction)
diff --git a/wx+/popup_dlg.cpp b/wx+/popup_dlg.cpp
index 2011a228..bdb904f2 100644
--- a/wx+/popup_dlg.cpp
+++ b/wx+/popup_dlg.cpp
@@ -103,14 +103,14 @@ public:
case DialogInfoType::info:
//"Information" is meaningless as caption text!
//confirmation doesn't use info icon
- //iconTmp = getResourceImage("msg_info");
+ //iconTmp = loadImage("msg_info");
break;
case DialogInfoType::warning:
- iconTmp = getResourceImage("msg_warning");
+ iconTmp = loadImage("msg_warning");
titleTmp = _("Warning");
break;
case DialogInfoType::error:
- iconTmp = getResourceImage("msg_error");
+ iconTmp = loadImage("msg_error");
titleTmp = _("Error");
break;
}
diff --git a/wx+/popup_dlg_generated.cpp b/wx+/popup_dlg_generated.cpp
index af43c85b..7fc05d53 100644
--- a/wx+/popup_dlg_generated.cpp
+++ b/wx+/popup_dlg_generated.cpp
@@ -11,91 +11,91 @@
PopupDialogGenerated::PopupDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( -1, -1 ), wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+ this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
- m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel33->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+ m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panel33->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- wxBoxSizer* bSizer165;
- bSizer165 = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizer165;
+ bSizer165 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapMsgType = new wxStaticBitmap( m_panel33, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 );
- bSizer165->Add( m_bitmapMsgType, 0, wxALL, 10 );
+ m_bitmapMsgType = new wxStaticBitmap( m_panel33, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer165->Add( m_bitmapMsgType, 0, wxALL, 10 );
- wxBoxSizer* bSizer16;
- bSizer16 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer16;
+ bSizer16 = new wxBoxSizer( wxVERTICAL );
- bSizer16->Add( 0, 10, 0, 0, 5 );
+ bSizer16->Add( 0, 10, 0, 0, 5 );
- m_staticTextMain = new wxStaticText( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMain->Wrap( -1 );
- bSizer16->Add( m_staticTextMain, 0, wxRIGHT, 10 );
+ m_staticTextMain = new wxStaticText( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMain->Wrap( -1 );
+ bSizer16->Add( m_staticTextMain, 0, wxRIGHT, 10 );
- bSizer16->Add( 0, 5, 0, 0, 5 );
+ bSizer16->Add( 0, 5, 0, 0, 5 );
- m_textCtrlTextDetail = new wxTextCtrl( m_panel33, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE );
- bSizer16->Add( m_textCtrlTextDetail, 1, wxEXPAND, 5 );
+ m_textCtrlTextDetail = new wxTextCtrl( m_panel33, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE );
+ bSizer16->Add( m_textCtrlTextDetail, 1, wxEXPAND, 5 );
- bSizer165->Add( bSizer16, 1, wxEXPAND, 5 );
+ bSizer165->Add( bSizer16, 1, wxEXPAND, 5 );
- m_panel33->SetSizer( bSizer165 );
- m_panel33->Layout();
- bSizer165->Fit( m_panel33 );
- bSizer24->Add( m_panel33, 1, wxEXPAND, 5 );
+ m_panel33->SetSizer( bSizer165 );
+ m_panel33->Layout();
+ bSizer165->Fit( m_panel33 );
+ bSizer24->Add( m_panel33, 1, wxEXPAND, 5 );
- m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer24->Add( m_staticline6, 0, wxEXPAND, 5 );
+ m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer24->Add( m_staticline6, 0, wxEXPAND, 5 );
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxVERTICAL );
- m_checkBoxCustom = new wxCheckBox( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer25->Add( m_checkBoxCustom, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ m_checkBoxCustom = new wxCheckBox( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer25->Add( m_checkBoxCustom, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
+ bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL );
- m_buttonAccept = new wxButton( this, wxID_YES, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
+ m_buttonAccept = new wxButton( this, wxID_YES, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonAccept->SetDefault();
- bSizerStdButtons->Add( m_buttonAccept, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_buttonAccept->SetDefault();
+ bSizerStdButtons->Add( m_buttonAccept, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- m_buttonAcceptAll = new wxButton( this, wxID_YESTOALL, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- bSizerStdButtons->Add( m_buttonAcceptAll, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonAcceptAll = new wxButton( this, wxID_YESTOALL, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizerStdButtons->Add( m_buttonAcceptAll, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
- m_buttonDecline = new wxButton( this, wxID_NO, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- bSizerStdButtons->Add( m_buttonDecline, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonDecline = new wxButton( this, wxID_NO, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizerStdButtons->Add( m_buttonDecline, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 );
- bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
- bSizer25->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
+ bSizer25->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 );
- bSizer24->Add( bSizer25, 0, wxEXPAND, 5 );
+ bSizer24->Add( bSizer25, 0, wxEXPAND, 5 );
- this->SetSizer( bSizer24 );
- this->Layout();
- bSizer24->Fit( this );
+ this->SetSizer( bSizer24 );
+ this->Layout();
+ bSizer24->Fit( this );
- this->Centre( wxBOTH );
+ this->Centre( wxBOTH );
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PopupDialogGenerated::OnClose ) );
- m_checkBoxCustom->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnCheckBoxClick ), NULL, this );
- m_buttonAccept->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnButtonAccept ), NULL, this );
- m_buttonAcceptAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnButtonAcceptAll ), NULL, this );
- m_buttonDecline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnButtonDecline ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnCancel ), NULL, this );
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PopupDialogGenerated::OnClose ) );
+ m_checkBoxCustom->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnCheckBoxClick ), NULL, this );
+ m_buttonAccept->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnButtonAccept ), NULL, this );
+ m_buttonAcceptAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnButtonAcceptAll ), NULL, this );
+ m_buttonDecline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnButtonDecline ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PopupDialogGenerated::OnCancel ), NULL, this );
}
PopupDialogGenerated::~PopupDialogGenerated()
diff --git a/wx+/popup_dlg_generated.h b/wx+/popup_dlg_generated.h
index 33cc4872..8191ca0f 100644
--- a/wx+/popup_dlg_generated.h
+++ b/wx+/popup_dlg_generated.h
@@ -38,33 +38,34 @@
///////////////////////////////////////////////////////////////////////////////
class PopupDialogGenerated : public wxDialog
{
-private:
+ private:
-protected:
- wxPanel* m_panel33;
- wxStaticBitmap* m_bitmapMsgType;
- wxStaticText* m_staticTextMain;
- wxTextCtrl* m_textCtrlTextDetail;
- wxStaticLine* m_staticline6;
- wxCheckBox* m_checkBoxCustom;
- wxBoxSizer* bSizerStdButtons;
- wxButton* m_buttonAccept;
- wxButton* m_buttonAcceptAll;
- wxButton* m_buttonDecline;
- wxButton* m_buttonCancel;
+ protected:
+ wxPanel* m_panel33;
+ wxStaticBitmap* m_bitmapMsgType;
+ wxStaticText* m_staticTextMain;
+ wxTextCtrl* m_textCtrlTextDetail;
+ wxStaticLine* m_staticline6;
+ wxCheckBox* m_checkBoxCustom;
+ wxBoxSizer* bSizerStdButtons;
+ wxButton* m_buttonAccept;
+ wxButton* m_buttonAcceptAll;
+ wxButton* m_buttonDecline;
+ wxButton* m_buttonCancel;
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnButtonAccept( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnButtonAcceptAll( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnButtonDecline( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonAccept( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonAcceptAll( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonDecline( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-public:
+ public:
- PopupDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~PopupDialogGenerated();
+ PopupDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~PopupDialogGenerated();
};
+
diff --git a/wx+/rtl.h b/wx+/rtl.h
index 3ab701a7..8e386b49 100644
--- a/wx+/rtl.h
+++ b/wx+/rtl.h
@@ -15,12 +15,11 @@
namespace zen
{
//functions supporting right-to-left GUI layout
-void drawBitmapRtlMirror (wxDC& dc, const wxBitmap& bmp, const wxRect& rect, int alignment, std::optional<wxBitmap>& buffer);
-void drawBitmapRtlNoMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, int alignment);
+void drawBitmapRtlMirror (wxDC& dc, const wxImage& img, const wxRect& rect, int alignment, std::optional<wxBitmap>& buffer);
+void drawBitmapRtlNoMirror(wxDC& dc, const wxImage& img, const wxRect& rect, int alignment);
//wxDC::DrawIcon DOES mirror by default -> implement RTL support when needed
-wxBitmap mirrorIfRtl(const wxBitmap& bmp);
-wxImage mirrorIfRtl(const wxImage& bmp);
+wxImage mirrorIfRtl(const wxImage& img);
//manual text flow correction: https://www.w3.org/International/articles/inline-bidi-markup/
@@ -34,34 +33,35 @@ wxImage mirrorIfRtl(const wxImage& bmp);
//---------------------- implementation ------------------------
namespace impl
{
-//don't use wxDC::DrawLabel: it results in expensive GetTextExtent() call even when passing an empty string!!!
-//also avoid wxDC::DrawLabel 1-off alignment bugs
+//don't use wxDC::DrawLabel:
+// - expensive GetTextExtent() call even when passing an empty string!!!
+// - 1-off alignment bugs!
inline
-void drawBitmapAligned(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, int alignment)
+void drawBitmapAligned(wxDC& dc, const wxImage& img, const wxRect& rect, int alignment)
{
wxPoint pt = rect.GetTopLeft();
if (alignment & wxALIGN_RIGHT) //note: wxALIGN_LEFT == 0!
- pt.x += rect.width - bmp.GetWidth();
+ pt.x += rect.width - img.GetWidth();
else if (alignment & wxALIGN_CENTER_HORIZONTAL)
- pt.x += (rect.width - bmp.GetWidth()) / 2;
+ pt.x += (rect.width - img.GetWidth()) / 2;
if (alignment & wxALIGN_BOTTOM) //note: wxALIGN_TOP == 0!
- pt.y += rect.height - bmp.GetHeight();
+ pt.y += rect.height - img.GetHeight();
else if (alignment & wxALIGN_CENTER_VERTICAL)
- pt.y += (rect.height - bmp.GetHeight()) / 2;
+ pt.y += (rect.height - img.GetHeight()) / 2;
- dc.DrawBitmap(bmp, pt);
+ dc.DrawBitmap(img, pt);
}
}
inline
-void drawBitmapRtlMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, int alignment, std::optional<wxBitmap>& buffer)
+void drawBitmapRtlMirror(wxDC& dc, const wxImage& img, const wxRect& rect, int alignment, std::optional<wxBitmap>& buffer)
{
switch (dc.GetLayoutDirection())
{
case wxLayout_LeftToRight:
- return impl::drawBitmapAligned(dc, bmp, rect, alignment);
+ return impl::drawBitmapAligned(dc, img, rect, alignment);
case wxLayout_RightToLeft:
{
@@ -71,7 +71,7 @@ void drawBitmapRtlMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, int
wxMemoryDC memDc(*buffer);
memDc.Blit(wxPoint(0, 0), rect.GetSize(), &dc, rect.GetTopLeft()); //blit in: background is mirrored due to memDc, dc having different layout direction!
- impl::drawBitmapAligned(memDc, bmp, wxRect(0, 0, rect.width, rect.height), alignment);
+ impl::drawBitmapAligned(memDc, img, wxRect(0, 0, rect.width, rect.height), alignment);
//note: we cannot simply use memDc.SetLayoutDirection(wxLayout_RightToLeft) due to some strange 1 pixel bug!
dc.Blit(rect.GetTopLeft(), rect.GetSize(), &memDc, wxPoint(0, 0)); //blit out: mirror once again
@@ -80,37 +80,27 @@ void drawBitmapRtlMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, int
case wxLayout_Default: //CAVEAT: wxPaintDC/wxMemoryDC on wxGTK/wxMAC does not implement SetLayoutDirection()!!! => GetLayoutDirection() == wxLayout_Default
if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft)
- return impl::drawBitmapAligned(dc, bmp.ConvertToImage().Mirror(), rect, alignment);
+ return impl::drawBitmapAligned(dc, img.Mirror(), rect, alignment);
else
- return impl::drawBitmapAligned(dc, bmp, rect, alignment);
+ return impl::drawBitmapAligned(dc, img, rect, alignment);
}
}
inline
-void drawBitmapRtlNoMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, int alignment)
+void drawBitmapRtlNoMirror(wxDC& dc, const wxImage& img, const wxRect& rect, int alignment)
{
- return impl::drawBitmapAligned(dc, bmp, rect, alignment); //wxDC::DrawBitmap does NOT mirror by default
+ return impl::drawBitmapAligned(dc, img, rect, alignment); //wxDC::DrawBitmap does NOT mirror by default
}
inline
-wxImage mirrorIfRtl(const wxImage& bmp)
+wxImage mirrorIfRtl(const wxImage& img)
{
if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft)
- return bmp.Mirror();
+ return img.Mirror();
else
- return bmp;
-}
-
-
-inline
-wxBitmap mirrorIfRtl(const wxBitmap& bmp)
-{
- if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft)
- return bmp.ConvertToImage().Mirror();
- else
- return bmp;
+ return img;
}
}
diff --git a/wx+/toggle_button.h b/wx+/toggle_button.h
index 98ca32b3..0a359c5c 100644
--- a/wx+/toggle_button.h
+++ b/wx+/toggle_button.h
@@ -16,6 +16,7 @@ namespace zen
class ToggleButton : public wxBitmapButton
{
public:
+ //wxBitmapButton constructor
ToggleButton(wxWindow* parent,
wxWindowID id,
const wxBitmap& bitmap,
@@ -23,13 +24,25 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxButtonNameStr) : wxBitmapButton(parent, id, bitmap, pos, size, style, validator, name)
+ const wxString& name = wxButtonNameStr) :
+ wxBitmapButton(parent, id, bitmap, pos, size, style, validator, name) {}
+
+ //wxButton constructor
+ ToggleButton(wxWindow* parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxButtonNameStr) :
+ wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name)
{
- SetLayoutDirection(wxLayout_LeftToRight); //avoid mirroring RTL languages like Hebrew or Arabic
+ SetLabel(label);
}
- void init(const wxBitmap& bmpActive,
- const wxBitmap& bmpInactive);
+ void init(const wxImage& imgActive,
+ const wxImage& imgInactive);
void setActive(bool value);
bool isActive() const { return active_; }
@@ -37,8 +50,8 @@ public:
private:
bool active_ = false;
- wxBitmap bmpActive_;
- wxBitmap bmpInactive_;
+ wxImage imgActive_;
+ wxImage imgInactive_;
};
@@ -49,13 +62,13 @@ private:
//######################## implementation ########################
inline
-void ToggleButton::init(const wxBitmap& bmpActive,
- const wxBitmap& bmpInactive)
+void ToggleButton::init(const wxImage& imgActive,
+ const wxImage& imgInactive)
{
- bmpActive_ = bmpActive;
- bmpInactive_ = bmpInactive;
+ imgActive_ = imgActive;
+ imgInactive_ = imgInactive;
- setImage(*this, active_ ? bmpActive_ : bmpInactive_);
+ setImage(*this, active_ ? imgActive_ : imgInactive_);
}
@@ -65,7 +78,7 @@ void ToggleButton::setActive(bool value)
if (active_ != value)
{
active_ = value;
- setImage(*this, active_ ? bmpActive_ : bmpInactive_);
+ setImage(*this, active_ ? imgActive_ : imgInactive_);
}
}
}
diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp
index 0beef0bf..e3c021c6 100644
--- a/wx+/tooltip.cpp
+++ b/wx+/tooltip.cpp
@@ -54,16 +54,17 @@ public:
};
-void Tooltip::show(const wxString& text, wxPoint mousePos, const wxBitmap* bmp)
+void Tooltip::show(const wxString& text, wxPoint mousePos, const wxImage* img)
{
if (!tipWindow_)
tipWindow_ = new TooltipDlgGenerated(&parent_); //ownership passed to parent
- const wxBitmap& newBmp = bmp ? *bmp : wxNullBitmap;
+ const wxImage& newImg = img ? *img : wxNullImage;
- if (!tipWindow_->bitmapLeft_->GetBitmap().IsSameAs(newBmp))
+ if (!lastUsedImg_.IsSameAs(newImg))
{
- tipWindow_->bitmapLeft_->SetBitmap(newBmp);
+ lastUsedImg_ = newImg;
+ tipWindow_->bitmapLeft_->SetBitmap(newImg);
tipWindow_->Refresh(); //needed if bitmap size changed!
}
diff --git a/wx+/tooltip.h b/wx+/tooltip.h
index d74beb9d..b496f36c 100644
--- a/wx+/tooltip.h
+++ b/wx+/tooltip.h
@@ -8,6 +8,7 @@
#define TOOLTIP_H_8912740832170515
#include <wx/window.h>
+#include <wx/image.h>
namespace zen
@@ -19,13 +20,14 @@ public:
void show(const wxString& text,
wxPoint mousePos, //absolute screen coordinates
- const wxBitmap* bmp = nullptr);
+ const wxImage* img = nullptr);
void hide();
private:
class TooltipDlgGenerated;
TooltipDlgGenerated* tipWindow_ = nullptr;
wxWindow& parent_;
+ wxImage lastUsedImg_;
};
}
diff --git a/xBRZ/src/xbrz.cpp b/xBRZ/src/xbrz.cpp
index 4e9fe6dc..50660b84 100644
--- a/xBRZ/src/xbrz.cpp
+++ b/xBRZ/src/xbrz.cpp
@@ -467,7 +467,10 @@ public:
void readPonm(Kernel_4x4& ker, int x) const //(x, y) is at kernel position E
{
- [[likely]] if (const int x_p2 = x + 2; 0 <= x_p2 && x_p2 < srcWidth_)
+#if __has_cpp_attribute(likely)
+ [[likely]]
+#endif
+ if (const int x_p2 = x + 2; 0 <= x_p2 && x_p2 < srcWidth_)
{
ker.p = s_m1 ? s_m1[x_p2] : 0;
ker.o = s_0 ? s_0 [x_p2] : 0;
@@ -520,6 +523,16 @@ private:
};
+inline
+void fillBlock(uint32_t* trg, int trgWidth, uint32_t col, int blockSize)
+{
+ for (int y = 0; y < blockSize; ++y, trg += trgWidth)
+ // std::fill(trg, trg + blockSize, col);
+ for (int x = 0; x < blockSize; ++x)
+ trg[x] = col;
+}
+
+
template <class Scaler, class ColorDistance, class OobReader> //scaler policy: see "Scaler2x" reference implementation
void scaleImage(const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight, const xbrz::ScalerCfg& cfg, int yFirst, int yLast)
{
@@ -670,7 +683,10 @@ void scaleImage(const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight,
addTopR(blend_xy1, res.blend_h); //set 2nd known corner for (x, y + 1)
preProcBuf[x] = blend_xy1; //store on current buffer position for use on next row
- [[likely]] if (x + 1 < srcWidth)
+#if __has_cpp_attribute(likely)
+ [[likely]]
+#endif
+ if (x + 1 < srcWidth)
{
//blend_xy1 -> blend_x1y1
clearAddTopL(blend_xy1, res.blend_i); //set 1st known corner for (x + 1, y + 1) and buffer for use on next column
@@ -680,7 +696,8 @@ void scaleImage(const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight,
}
//fill block of size scale * scale with the given color
- fillBlock(out, trgWidth * sizeof(uint32_t), ker4.e, Scaler::scale, Scaler::scale);
+ fillBlock(out, trgWidth, ker4.e, Scaler::scale);
+
//place *after* preprocessing step, to not overwrite the results while processing the last pixel!
//blend all four corners of current pixel
@@ -1145,6 +1162,7 @@ void xbrz::scale(size_t factor, const uint32_t* src, uint32_t* trg, int srcWidth
static_assert(SCALE_FACTOR_MAX == 6);
switch (colFmt)
{
+ //*INDENT-OFF*
case ColorFormat::RGB:
switch (factor)
{
@@ -1177,6 +1195,7 @@ void xbrz::scale(size_t factor, const uint32_t* src, uint32_t* trg, int srcWidth
case 6: return scaleImage<Scaler6x<ColorGradientARGB>, ColorDistanceUnbufferedARGB, OobReaderTransparent>(src, trg, srcWidth, srcHeight, cfg, yFirst, yLast);
}
break;
+ //*INDENT-ON*
}
assert(false);
}
@@ -1186,8 +1205,10 @@ bool xbrz::equalColorTest(uint32_t col1, uint32_t col2, ColorFormat colFmt, doub
{
switch (colFmt)
{
- case ColorFormat::RGB: return ColorDistanceRGB::dist(col1, col2, luminanceWeight) < equalColorTolerance;
- case ColorFormat::ARGB: return ColorDistanceARGB::dist(col1, col2, luminanceWeight) < equalColorTolerance;
+ case ColorFormat::RGB:
+ return ColorDistanceRGB::dist(col1, col2, luminanceWeight) < equalColorTolerance;
+ case ColorFormat::ARGB:
+ return ColorDistanceARGB::dist(col1, col2, luminanceWeight) < equalColorTolerance;
case ColorFormat::ARGB_UNBUFFERED:
return ColorDistanceUnbufferedARGB::dist(col1, col2, luminanceWeight) < equalColorTolerance;
}
@@ -1199,18 +1220,32 @@ bool xbrz::equalColorTest(uint32_t col1, uint32_t col2, ColorFormat colFmt, doub
void xbrz::bilinearScale(const uint32_t* src, int srcWidth, int srcHeight,
/**/ uint32_t* trg, int trgWidth, int trgHeight)
{
- bilinearScale(src, srcWidth, srcHeight, srcWidth * sizeof(uint32_t),
- trg, trgWidth, trgHeight, trgWidth * sizeof(uint32_t),
- 0, trgHeight, [](uint32_t pix) { return pix; });
+ const auto imgReader = [src, srcWidth](int x, int y, BytePixel& pix)
+ {
+ static_assert(sizeof(pix) == sizeof(uint32_t));
+ std::memcpy(pix, src + y * srcWidth + x, sizeof(pix));
+ };
+
+ const auto imgWriter = [trg](const xbrz::BytePixel& pix) mutable { std::memcpy(trg++, pix, sizeof(pix)); };
+
+ bilinearScale(imgReader, srcWidth, srcHeight,
+ imgWriter, trgWidth, trgHeight, 0, trgHeight);
}
void xbrz::nearestNeighborScale(const uint32_t* src, int srcWidth, int srcHeight,
/**/ uint32_t* trg, int trgWidth, int trgHeight)
{
- nearestNeighborScale(src, srcWidth, srcHeight, srcWidth * sizeof(uint32_t),
- trg, trgWidth, trgHeight, trgWidth * sizeof(uint32_t),
- 0, trgHeight, [](uint32_t pix) { return pix; });
+ const auto imgReader = [src, srcWidth](int x, int y, BytePixel& pix)
+ {
+ static_assert(sizeof(pix) == sizeof(uint32_t));
+ std::memcpy(pix, src + y * srcWidth + x, sizeof(pix));
+ };
+
+ const auto imgWriter = [trg](const xbrz::BytePixel& pix) mutable { std::memcpy(trg++, pix, sizeof(pix)); };
+
+ nearestNeighborScale(imgReader, srcWidth, srcHeight,
+ imgWriter, trgWidth, trgHeight, 0, trgHeight);
}
diff --git a/xBRZ/src/xbrz_tools.h b/xBRZ/src/xbrz_tools.h
index 9d8e8247..404849ca 100644
--- a/xBRZ/src/xbrz_tools.h
+++ b/xBRZ/src/xbrz_tools.h
@@ -33,8 +33,8 @@ inline unsigned char getRed (uint32_t pix) { return getByte<2>(pix); }
inline unsigned char getGreen(uint32_t pix) { return getByte<1>(pix); }
inline unsigned char getBlue (uint32_t pix) { return getByte<0>(pix); }
-inline uint32_t makePixel(unsigned char a, unsigned char r, unsigned char g, unsigned char b) { return (a << 24) | (r << 16) | (g << 8) | b; }
-inline uint32_t makePixel( unsigned char r, unsigned char g, unsigned char b) { return (r << 16) | (g << 8) | b; }
+inline uint32_t makePixel(uint32_t a, uint32_t r, uint32_t g, uint32_t b) { return (a << 24) | (r << 16) | (g << 8) | b; }
+inline uint32_t makePixel( uint32_t r, uint32_t g, uint32_t b) { return (r << 16) | (g << 8) | b; }
inline uint32_t rgb555to888(uint16_t pix) { return ((pix & 0x7C00) << 9) | ((pix & 0x03E0) << 6) | ((pix & 0x001F) << 3); }
inline uint32_t rgb565to888(uint16_t pix) { return ((pix & 0xF800) << 8) | ((pix & 0x07E0) << 5) | ((pix & 0x001F) << 3); }
@@ -43,49 +43,30 @@ inline uint16_t rgb888to555(uint32_t pix) { return static_cast<uint16_t>(((pix &
inline uint16_t rgb888to565(uint32_t pix) { return static_cast<uint16_t>(((pix & 0xF80000) >> 8) | ((pix & 0x00FC00) >> 5) | ((pix & 0x0000F8) >> 3)); }
-template <class Pix> inline
-Pix* byteAdvance(Pix* ptr, int bytes)
-{
- using PixNonConst = typename std::remove_cv<Pix>::type;
- using PixByte = typename std::conditional<std::is_same<Pix, PixNonConst>::value, char, const char>::type;
-
- static_assert(std::is_integral<PixNonConst>::value, "Pix* is expected to be cast-able to char*");
+using BytePixel = unsigned char[4]; //unspecified byte order
+static_assert(std::alignment_of_v<BytePixel> == 1); // :)
- return reinterpret_cast<Pix*>(reinterpret_cast<PixByte*>(ptr) + bytes);
-}
-
-//fill block with the given color
-template <class Pix> inline
-void fillBlock(Pix* trg, int pitch /*[bytes]*/, Pix col, int blockWidth, int blockHeight)
+template <class PixReader, class PixWriter> inline
+void unscaledCopy(PixReader srcReader /* (int x, int y, BytePixel& pix) */,
+ PixWriter trgWriter /* (const BytePixel& pix) */, int width, int height)
{
- //for (int y = 0; y < blockHeight; ++y, trg = byteAdvance(trg, pitch))
- // std::fill(trg, trg + blockWidth, col);
-
- for (int y = 0; y < blockHeight; ++y, trg = byteAdvance(trg, pitch))
- for (int x = 0; x < blockWidth; ++x)
- trg[x] = col;
+ for (int y = 0; y < height; ++y)
+ for (int x = 0; x < width; ++x)
+ {
+ BytePixel pix; //uninitialized
+ srcReader(x, y, pix);
+ trgWriter(pix);
+ }
}
//nearest-neighbor (going over target image - slow for upscaling, since source is read multiple times missing out on cache! Fast for similar image sizes!)
-template <class PixSrc, class PixTrg, class PixConverter>
-void nearestNeighborScale(const PixSrc* src, int srcWidth, int srcHeight, int srcPitch /*[bytes]*/,
- /**/ PixTrg* trg, int trgWidth, int trgHeight, int trgPitch /*[bytes]*/,
- int yFirst, int yLast, PixConverter pixCvrt /*convert PixSrc to PixTrg*/)
+template <class PixReader, class PixWriter>
+void nearestNeighborScale(PixReader srcReader /* (int x, int y, BytePixel& pix) */, int srcWidth, int srcHeight,
+ PixWriter trgWriter /* (const BytePixel& pix) */, int trgWidth, int trgHeight,
+ int yFirst, int yLast)
{
- static_assert(std::is_integral<PixSrc>::value, "PixSrc* is expected to be cast-able to char*");
- static_assert(std::is_integral<PixTrg>::value, "PixTrg* is expected to be cast-able to char*");
-
- static_assert(std::is_same<decltype(pixCvrt(PixSrc())), PixTrg>::value, "PixConverter returning wrong pixel format");
-
- if (srcPitch < srcWidth * static_cast<int>(sizeof(PixSrc)) ||
- trgPitch < trgWidth * static_cast<int>(sizeof(PixTrg)))
- {
- assert(false);
- return;
- }
-
yFirst = std::max(yFirst, 0);
yLast = std::min(yLast, trgHeight);
if (yFirst >= yLast || srcHeight <= 0 || srcWidth <= 0) return;
@@ -93,92 +74,28 @@ void nearestNeighborScale(const PixSrc* src, int srcWidth, int srcHeight, int sr
for (int y = yFirst; y < yLast; ++y)
{
const int ySrc = srcHeight * y / trgHeight;
- const PixSrc* const srcLine = byteAdvance(src, ySrc * srcPitch);
- /**/ PixTrg* const trgLine = byteAdvance(trg, y * trgPitch);
for (int x = 0; x < trgWidth; ++x)
{
const int xSrc = srcWidth * x / trgWidth;
- trgLine[x] = pixCvrt(srcLine[xSrc]);
- }
- }
-}
-
-
-//nearest-neighbor (going over source image - fast for upscaling, since source is read only once
-template <class PixSrc, class PixTrg, class PixConverter>
-void nearestNeighborScaleOverSource(const PixSrc* src, int srcWidth, int srcHeight, int srcPitch /*[bytes]*/,
- /**/ PixTrg* trg, int trgWidth, int trgHeight, int trgPitch /*[bytes]*/,
- int yFirst, int yLast, PixConverter pixCvrt /*convert PixSrc to PixTrg*/)
-{
- static_assert(std::is_integral<PixSrc>::value, "PixSrc* is expected to be cast-able to char*");
- static_assert(std::is_integral<PixTrg>::value, "PixTrg* is expected to be cast-able to char*");
-
- static_assert(std::is_same<decltype(pixCvrt(PixSrc())), PixTrg>::value, "PixConverter returning wrong pixel format");
-
- if (srcPitch < srcWidth * static_cast<int>(sizeof(PixSrc)) ||
- trgPitch < trgWidth * static_cast<int>(sizeof(PixTrg)))
- {
- assert(false);
- return;
- }
-
- yFirst = std::max(yFirst, 0);
- yLast = std::min(yLast, srcHeight);
- if (yFirst >= yLast || trgWidth <= 0 || trgHeight <= 0) return;
-
- for (int y = yFirst; y < yLast; ++y)
- {
- //mathematically: ySrc = floor(srcHeight * yTrg / trgHeight)
- // => search for integers in: [ySrc, ySrc + 1) * trgHeight / srcHeight
-
- //keep within for loop to support MT input slices!
- const int yTrgFirst = ( y * trgHeight + srcHeight - 1) / srcHeight; //=ceil(y * trgHeight / srcHeight)
- const int yTrgLast = ((y + 1) * trgHeight + srcHeight - 1) / srcHeight; //=ceil(((y + 1) * trgHeight) / srcHeight)
- const int blockHeight = yTrgLast - yTrgFirst;
-
- if (blockHeight > 0)
- {
- const PixSrc* srcLine = byteAdvance(src, y * srcPitch);
- /**/ PixTrg* trgLine = byteAdvance(trg, yTrgFirst * trgPitch);
- int xTrgFirst = 0;
-
- for (int x = 0; x < srcWidth; ++x)
- {
- const int xTrgLast = ((x + 1) * trgWidth + srcWidth - 1) / srcWidth;
- const int blockWidth = xTrgLast - xTrgFirst;
- if (blockWidth > 0)
- {
- xTrgFirst = xTrgLast;
- const auto trgPix = pixCvrt(srcLine[x]);
- fillBlock(trgLine, trgPitch, trgPix, blockWidth, blockHeight);
- trgLine += blockWidth;
- }
- }
+ BytePixel pix; //uninitialized
+ srcReader(xSrc, ySrc, pix);
+ trgWriter(pix);
}
}
}
-template <class PixTrg, class PixConverter>
-void bilinearScale(const uint32_t* src, int srcWidth, int srcHeight, int srcPitch,
- /**/ PixTrg* trg, int trgWidth, int trgHeight, int trgPitch,
- int yFirst, int yLast, PixConverter pixCvrt /*convert uint32_t to PixTrg*/)
+template <class PixReader, class PixWriter>
+void bilinearScale(PixReader srcReader /* (int x, int y, BytePixel& pix) */, int srcWidth, int srcHeight,
+ PixWriter trgWriter /* (const BytePixel& pix) */, int trgWidth, int trgHeight,
+ int yFirst, int yLast)
{
- static_assert(std::is_integral<PixTrg>::value, "PixTrg* is expected to be cast-able to char*");
- static_assert(std::is_same<decltype(pixCvrt(uint32_t())), PixTrg>::value, "PixConverter returning wrong pixel format");
-
- if (srcPitch < srcWidth * static_cast<int>(sizeof(uint32_t)) ||
- trgPitch < trgWidth * static_cast<int>(sizeof(PixTrg)))
- {
- assert(false);
- return;
- }
-
yFirst = std::max(yFirst, 0);
yLast = std::min(yLast, trgHeight);
- if (yFirst >= yLast || srcHeight <= 0 || srcWidth <= 0) return;
+ if (yFirst >= yLast || srcHeight <= 0 || srcWidth <= 0)
+ return;
const double scaleX = static_cast<double>(trgWidth ) / srcWidth;
const double scaleY = static_cast<double>(trgHeight) / srcHeight;
@@ -198,7 +115,8 @@ void bilinearScale(const uint32_t* src, int srcWidth, int srcHeight, int srcPitc
{
const int x1 = srcWidth * x / trgWidth;
int x2 = x1 + 1;
- if (x2 == srcWidth) --x2;
+ if (x2 == srcWidth)
+ --x2;
const double xx1 = x / scaleX - x1;
const double x2x = 1 - xx1;
@@ -210,58 +128,109 @@ void bilinearScale(const uint32_t* src, int srcWidth, int srcHeight, int srcPitc
{
const int y1 = srcHeight * y / trgHeight;
int y2 = y1 + 1;
- if (y2 == srcHeight) --y2;
+ if (y2 == srcHeight)
+ --y2;
const double yy1 = y / scaleY - y1;
const double y2y = 1 - yy1;
- const uint32_t* const srcLine = byteAdvance(src, y1 * srcPitch);
- const uint32_t* const srcLineNext = byteAdvance(src, y2 * srcPitch);
- PixTrg* const trgLine = byteAdvance(trg, y * trgPitch);
-
for (int x = 0; x < trgWidth; ++x)
{
//perf: do NOT "simplify" the variable layout without measurement!
- const int x1 = buf[x].x1;
- const int x2 = buf[x].x2;
- const double xx1 = buf[x].xx1;
- const double x2x = buf[x].x2x;
+ const CoeffsX& bufX = buf[x];
+ const int x1 = bufX.x1;
+ const int x2 = bufX.x2;
+ const double xx1 = bufX.xx1;
+ const double x2x = bufX.x2x;
const double x2xy2y = x2x * y2y;
const double xx1y2y = xx1 * y2y;
const double x2xyy1 = x2x * yy1;
const double xx1yy1 = xx1 * yy1;
- auto interpolate = [=](int offset)
+ BytePixel pix11; //
+ BytePixel pix21; //uninitialized
+ BytePixel pix12; //
+ BytePixel pix22; //
+
+ srcReader(x1, y1, pix11); //
+ srcReader(x2, y1, pix21); //perf: srcReader has to (re-)calculate row using y
+ srcReader(x1, y2, pix12); // => ~7% additional runtime
+ srcReader(x2, y2, pix22); //
+
+ const auto interpolate = [&](int offset)
{
/* https://en.wikipedia.org/wiki/Bilinear_interpolation
(c11(x2 - x) + c21(x - x1)) * (y2 - y ) +
- (c12(x2 - x) + c22(x - x1)) * (y - y1) */
- const auto c11 = (srcLine [x1] >> (8 * offset)) & 0xff;
- const auto c21 = (srcLine [x2] >> (8 * offset)) & 0xff;
- const auto c12 = (srcLineNext[x1] >> (8 * offset)) & 0xff;
- const auto c22 = (srcLineNext[x2] >> (8 * offset)) & 0xff;
-
- return c11 * x2xy2y + c21 * xx1y2y +
- c12 * x2xyy1 + c22 * xx1yy1;
+ (c12(x2 - x) + c22(x - x1)) * (y - y1) */
+ return static_cast<unsigned char>(pix11[offset] * x2xy2y + pix21[offset] * xx1y2y +
+ pix12[offset] * x2xyy1 + pix22[offset] * xx1yy1 + 0.5);
};
+ trgWriter(BytePixel{interpolate(0),
+ interpolate(1),
+ interpolate(2),
+ interpolate(3)});
+ }
+ }
+}
- const double bi = interpolate(0);
- const double gi = interpolate(1);
- const double ri = interpolate(2);
- const double ai = interpolate(3);
- const auto b = static_cast<uint32_t>(bi + 0.5);
- const auto g = static_cast<uint32_t>(gi + 0.5);
- const auto r = static_cast<uint32_t>(ri + 0.5);
- const auto a = static_cast<uint32_t>(ai + 0.5);
+#if 0
+//nearest-neighbor (going over source image - fast for upscaling, since source is read only once
+template <class PixSrc, class PixTrg, class PixConverter>
+void nearestNeighborScaleOverSource(const PixSrc* src, int srcWidth, int srcHeight, int srcPitch /*[bytes]*/,
+ /**/ PixTrg* trg, int trgWidth, int trgHeight, int trgPitch /*[bytes]*/,
+ int yFirst, int yLast, PixConverter pixCvrt /*convert PixSrc to PixTrg*/)
+{
+ static_assert(std::is_integral<PixSrc>::value, "PixSrc* is expected to be cast-able to char*");
+ static_assert(std::is_integral<PixTrg>::value, "PixTrg* is expected to be cast-able to char*");
- const uint32_t trgPix = (a << 24) | (r << 16) | (g << 8) | b;
+ static_assert(std::is_same<decltype(pixCvrt(PixSrc())), PixTrg>::value, "PixConverter returning wrong pixel format");
- trgLine[x] = pixCvrt(trgPix);
+ if (srcPitch < srcWidth * static_cast<int>(sizeof(PixSrc)) ||
+ trgPitch < trgWidth * static_cast<int>(sizeof(PixTrg)))
+ {
+ assert(false);
+ return;
+ }
+
+ yFirst = std::max(yFirst, 0);
+ yLast = std::min(yLast, srcHeight);
+ if (yFirst >= yLast || trgWidth <= 0 || trgHeight <= 0) return;
+
+ for (int y = yFirst; y < yLast; ++y)
+ {
+ //mathematically: ySrc = floor(srcHeight * yTrg / trgHeight)
+ // => search for integers in: [ySrc, ySrc + 1) * trgHeight / srcHeight
+
+ //keep within for loop to support MT input slices!
+ const int yTrgFirst = ( y * trgHeight + srcHeight - 1) / srcHeight; //=ceil(y * trgHeight / srcHeight)
+ const int yTrgLast = ((y + 1) * trgHeight + srcHeight - 1) / srcHeight; //=ceil(((y + 1) * trgHeight) / srcHeight)
+ const int blockHeight = yTrgLast - yTrgFirst;
+
+ if (blockHeight > 0)
+ {
+ const PixSrc* srcLine = byteAdvance(src, y * srcPitch);
+ /**/ PixTrg* trgLine = byteAdvance(trg, yTrgFirst * trgPitch);
+ int xTrgFirst = 0;
+
+ for (int x = 0; x < srcWidth; ++x)
+ {
+ const int xTrgLast = ((x + 1) * trgWidth + srcWidth - 1) / srcWidth;
+ const int blockWidth = xTrgLast - xTrgFirst;
+ if (blockWidth > 0)
+ {
+ xTrgFirst = xTrgLast;
+
+ const auto trgPix = pixCvrt(srcLine[x]);
+ fillBlock(trgLine, trgPitch, trgPix, blockWidth, blockHeight);
+ trgLine += blockWidth;
+ }
+ }
}
}
}
+#endif
}
#endif //XBRZ_TOOLS_H_825480175091875
diff --git a/zen/base64.h b/zen/base64.h
index 623f8f7f..b39a6a52 100644
--- a/zen/base64.h
+++ b/zen/base64.h
@@ -114,7 +114,7 @@ OutputIterator decodeBase64(InputIterator first, InputIterator last, OutputItera
return INDEX_END;
const unsigned char ch = static_cast<unsigned char>(*first++);
- if (ch < 128) //we're in lower ASCII table half
+ if (ch < arraySize(DECODING_MIME)) //we're in lower ASCII table half
{
const int index = DECODING_MIME[ch];
if (0 <= index && index <= static_cast<int>(INDEX_PAD)) //skip all unknown characters (including carriage return, line-break, tab)
diff --git a/zen/error_log.h b/zen/error_log.h
index ab23e33a..8604f127 100644
--- a/zen/error_log.h
+++ b/zen/error_log.h
@@ -19,16 +19,15 @@ namespace zen
{
enum MessageType
{
- MSG_TYPE_INFO = 0x1,
- MSG_TYPE_WARNING = 0x2,
- MSG_TYPE_ERROR = 0x4,
- MSG_TYPE_FATAL_ERROR = 0x8,
+ MSG_TYPE_INFO = 0x1,
+ MSG_TYPE_WARNING = 0x2,
+ MSG_TYPE_ERROR = 0x4,
};
struct LogEntry
{
time_t time = 0;
- MessageType type = MSG_TYPE_FATAL_ERROR;
+ MessageType type = MSG_TYPE_ERROR;
Zstringc message; //conserve memory (=> avoid std::string SSO overhead!)
};
@@ -45,7 +44,6 @@ public:
int info = 0;
int warning = 0;
int error = 0;
- int fatal = 0;
};
Stats getStats() const;
@@ -91,11 +89,8 @@ ErrorLog::Stats ErrorLog::getStats() const
case MSG_TYPE_ERROR:
++count.error;
break;
- case MSG_TYPE_FATAL_ERROR:
- ++count.fatal;
- break;
}
- assert(static_cast<int>(entries_.size()) == count.info + count.warning + count.error + count.fatal);
+ assert(static_cast<int>(entries_.size()) == count.info + count.warning + count.error);
return count;
}
@@ -111,8 +106,6 @@ std::wstring getMessageTypeLabel(MessageType type)
return _("Warning");
case MSG_TYPE_ERROR:
return _("Error");
- case MSG_TYPE_FATAL_ERROR:
- return _("Serious Error");
}
assert(false);
return std::wstring();
diff --git a/zen/file_access.cpp b/zen/file_access.cpp
index 8f021843..10713ce5 100644
--- a/zen/file_access.cpp
+++ b/zen/file_access.cpp
@@ -176,7 +176,7 @@ int64_t zen::getFreeDiskSpace(const Zstring& path) //throw FileError, returns <
struct ::statfs info = {};
if (::statfs(path.c_str(), &info) != 0)
THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot determine free disk space for %x."), L"%x", fmtPath(path)), "statfs");
-
+
return static_cast<int64_t>(info.f_bsize) * info.f_bavail;
}
@@ -205,11 +205,12 @@ Zstring zen::getTempFolderPath() //throw FileError
{
if (const char* buf = ::getenv("TMPDIR")) //no extended error reporting
return buf;
-
+ //TMPDIR not set on CentOS 7, WTF!
return P_tmpdir; //usually resolves to "/tmp"
}
+
void zen::removeFilePlain(const Zstring& filePath) //throw FileError
{
const char* functionName = "unlink";
@@ -300,11 +301,11 @@ namespace
/* Usage overview: (avoid circular pattern!)
- moveAndRenameItem() --> moveAndRenameFileSub()
- | /|\
- \|/ |
- Fix8Dot3NameClash()
-*/
+ moveAndRenameItem() --> moveAndRenameFileSub()
+ | /|\
+ \|/ |
+ Fix8Dot3NameClash() */
+
//wrapper for file system rename function:
void moveAndRenameFileSub(const Zstring& pathFrom, const Zstring& pathTo, bool replaceExisting) //throw FileError, ErrorMoveUnsupported, ErrorTargetExisting
{
@@ -521,10 +522,12 @@ void zen::createDirectory(const Zstring& dirPath) //throw FileError, ErrorTarget
if (std::all_of(dirName.begin(), dirName.end(), [](Zchar c) { return c == Zstr('.'); }))
/**/throw FileError(getErrorMsg(), replaceCpy<std::wstring>(L"Invalid folder name %x.", L"%x", fmtPath(dirName)));
+ #if 0 //not appreciated: https://freefilesync.org/forum/viewtopic.php?t=7509
//not critical, but will visually confuse user sooner or later:
if (startsWith(dirName, Zstr(' ')) ||
endsWith (dirName, Zstr(' ')))
throw FileError(getErrorMsg(), replaceCpy<std::wstring>(L"Folder name %x starts/ends with space character.", L"%x", fmtPath(dirName)));
+ #endif
const mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO; //0777, default for newly created directories
@@ -542,16 +545,16 @@ void zen::createDirectory(const Zstring& dirPath) //throw FileError, ErrorTarget
}
-void zen::createDirectoryIfMissingRecursion(const Zstring& dirPath) //throw FileError
+bool zen::createDirectoryIfMissingRecursion(const Zstring& dirPath) //throw FileError
{
const std::optional<Zstring> parentPath = getParentFolderPath(dirPath);
if (!parentPath) //device root
- return;
+ return false;
try //generally we expect that path already exists (see: ffs_paths.cpp) => check first
{
if (getItemType(dirPath) != ItemType::file) //throw FileError
- return;
+ return false;
}
catch (FileError&) {} //not yet existing or access error? let's find out...
@@ -560,13 +563,14 @@ void zen::createDirectoryIfMissingRecursion(const Zstring& dirPath) //throw File
try
{
createDirectory(dirPath); //throw FileError, ErrorTargetExisting
+ return true;
}
catch (FileError&)
{
try
{
if (getItemType(dirPath) != ItemType::file) //throw FileError
- return; //already existing => possible, if createDirectoryIfMissingRecursion() is run in parallel
+ return true; //already existing => possible, if createDirectoryIfMissingRecursion() is run in parallel
}
catch (FileError&) {} //not yet existing or access error
@@ -580,12 +584,19 @@ void zen::tryCopyDirectoryAttributes(const Zstring& sourcePath, const Zstring& t
}
-void zen::copySymlink(const Zstring& sourcePath, const Zstring& targetPath, bool copyFilePermissions) //throw FileError
+void zen::copySymlink(const Zstring& sourcePath, const Zstring& targetPath) //throw FileError
{
- const Zstring linkPath = getSymlinkTargetRaw(sourcePath); //throw FileError; accept broken symlinks
+ const SymlinkRawContent linkContent = getSymlinkRawContent(sourcePath); //throw FileError; accept broken symlinks
- if (::symlink(linkPath.c_str(), targetPath.c_str()) != 0)
- THROW_LAST_FILE_ERROR(replaceCpy(replaceCpy(_("Cannot copy symbolic link %x to %y."), L"%x", L'\n' + fmtPath(sourcePath)), L"%y", L'\n' + fmtPath(targetPath)), "symlink");
+ try //harmonize with NativeFileSystem::equalSymlinkContentForSameAfsType()
+ {
+ if (::symlink(linkContent.targetPath.c_str(), targetPath.c_str()) != 0)
+ THROW_LAST_SYS_ERROR("symlink");
+ }
+ catch (const SysError& e)
+ {
+ throw FileError(replaceCpy(replaceCpy(_("Cannot copy symbolic link %x to %y."), L"%x", L'\n' + fmtPath(sourcePath)), L"%y", L'\n' + fmtPath(targetPath)), e.toString());
+ }
//allow only consistent objects to be created -> don't place before ::symlink(); targetPath may already exist!
ZEN_ON_SCOPE_FAIL(try { removeSymlinkPlain(targetPath); /*throw FileError*/ }
@@ -597,17 +608,11 @@ void zen::copySymlink(const Zstring& sourcePath, const Zstring& targetPath, bool
THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot read file attributes of %x."), L"%x", fmtPath(sourcePath)), "lstat");
setWriteTimeNative(targetPath, sourceInfo.st_mtim, ProcSymlink::DIRECT); //throw FileError
-
- if (copyFilePermissions)
- copyItemPermissions(sourcePath, targetPath, ProcSymlink::DIRECT); //throw FileError
}
-namespace
-{
-FileCopyResult copyFileOsSpecific(const Zstring& sourceFile, //throw FileError, ErrorTargetExisting
- const Zstring& targetFile,
- const IOCallback& notifyUnbufferedIO)
+FileCopyResult zen::copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, //throw FileError, ErrorTargetExisting, (ErrorFileLocked), X
+ const IOCallback& notifyUnbufferedIO /*throw X*/)
{
int64_t totalUnbufferedIO = 0;
@@ -678,33 +683,4 @@ FileCopyResult copyFileOsSpecific(const Zstring& sourceFile, //throw FileError,
return result;
}
-/* ------------------
- |File Copy Layers|
- ------------------
- copyNewFile
- |
- copyFileOsSpecific (solve 8.3 issue on Windows)
- |
- copyFileWindowsSelectRoutine
- / \
-copyFileWindowsDefault(::CopyFileEx) copyFileWindowsStream(::BackupRead/::BackupWrite)
-*/
-}
-
-
-FileCopyResult zen::copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, bool copyFilePermissions, //throw FileError, ErrorTargetExisting, ErrorFileLocked, X
- const IOCallback& notifyUnbufferedIO /*throw X*/)
-{
- const FileCopyResult result = copyFileOsSpecific(sourceFile, targetFile, notifyUnbufferedIO); //throw FileError, ErrorTargetExisting, ErrorFileLocked, X
-
- //at this point we know we created a new file, so it's fine to delete it for cleanup!
- ZEN_ON_SCOPE_FAIL(try { removeFilePlain(targetFile); }
- catch (FileError&) {});
-
- if (copyFilePermissions)
- copyItemPermissions(sourceFile, targetFile, ProcSymlink::FOLLOW); //throw FileError
-
- return result;
-}
-
diff --git a/zen/file_access.h b/zen/file_access.h
index 66c41fbd..a3fa56d7 100644
--- a/zen/file_access.h
+++ b/zen/file_access.h
@@ -52,7 +52,7 @@ enum class ProcSymlink
};
void setFileTime(const Zstring& filePath, time_t modTime, ProcSymlink procSl); //throw FileError
-//symlink handling: always follow:
+//symlink handling: follow
int64_t getFreeDiskSpace(const Zstring& path); //throw FileError, returns < 0 if not available
VolumeId getVolumeId(const Zstring& itemPath); //throw FileError
uint64_t getFileSize(const Zstring& filePath); //throw FileError
@@ -73,16 +73,16 @@ void copyItemPermissions(const Zstring& sourcePath, const Zstring& targetPath, P
void createDirectory(const Zstring& dirPath); //throw FileError, ErrorTargetExisting
-//- no error if already existing
-//- create recursively if parent directory is not existing
-void createDirectoryIfMissingRecursion(const Zstring& dirPath); //throw FileError
+//creates directories recursively if not existing
+//returns false if folder already exists
+bool createDirectoryIfMissingRecursion(const Zstring& dirPath); //throw FileError
-//symlink handling: follow link!
+//symlink handling: follow
//expects existing source/target directories
-//reports note-worthy errors only
+//reports "note-worthy" errors only
void tryCopyDirectoryAttributes(const Zstring& sourcePath, const Zstring& targetPath); //throw FileError
-void copySymlink(const Zstring& sourcePath, const Zstring& targetPath, bool copyFilePermissions); //throw FileError
+void copySymlink(const Zstring& sourcePath, const Zstring& targetPath); //throw FileError
struct FileCopyResult
{
@@ -93,7 +93,7 @@ struct FileCopyResult
std::optional<FileError> errorModTime; //failure to set modification time
};
-FileCopyResult copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, bool copyFilePermissions, //throw FileError, ErrorTargetExisting, ErrorFileLocked, X
+FileCopyResult copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, //throw FileError, ErrorTargetExisting, ErrorFileLocked, X
//accummulated delta != file size! consider ADS, sparse, compressed files
const IOCallback& notifyUnbufferedIO /*throw X*/);
diff --git a/zen/file_io.cpp b/zen/file_io.cpp
index 942f367f..80a83724 100644
--- a/zen/file_io.cpp
+++ b/zen/file_io.cpp
@@ -46,23 +46,21 @@ namespace
{
FileBase::FileHandle openHandleForRead(const Zstring& filePath) //throw FileError, ErrorFileLocked
{
- //- "filePath" could be a named pipe which *blocks* forever for open()!
- //- open() with O_NONBLOCK avoids the block, but opens successfully
- //- create sample pipe: "sudo mkfifo named_pipe"
+ //caveat: check for file types that block during open(): character device, block device, named pipe
struct ::stat fileInfo = {};
if (::stat(filePath.c_str(), &fileInfo) == 0) //follows symlinks
{
if (!S_ISREG(fileInfo.st_mode) &&
- !S_ISLNK(fileInfo.st_mode) &&
- !S_ISDIR(fileInfo.st_mode))
+ !S_ISDIR(fileInfo.st_mode) && //open() will fail with "EISDIR: Is a directory" => nice
+ !S_ISLNK(fileInfo.st_mode)) //?? shouldn't be possible after successful stat()
{
const std::wstring typeName = [m = fileInfo.st_mode]
{
std::wstring name =
- S_ISCHR (m) ? L"character device" :
- S_ISBLK (m) ? L"block device" :
+ S_ISCHR (m) ? L"character device" : //e.g. /dev/null
+ S_ISBLK (m) ? L"block device" : //e.g. /dev/sda1
S_ISFIFO(m) ? L"FIFO, named pipe" :
- S_ISSOCK(m) ? L"socket" : L"";
+ S_ISSOCK(m) ? L"socket" : L""; //doesn't block but open() error is unclear: "ENXIO: No such device or address"
if (!name.empty())
name += L", ";
return name + printNumber<std::wstring>(L"0%06o", m & S_IFMT);
diff --git a/zen/http.cpp b/zen/http.cpp
index 848b2cb3..57d61221 100644
--- a/zen/http.cpp
+++ b/zen/http.cpp
@@ -492,7 +492,7 @@ bool zen::isValidEmail(const std::string& email)
if (comp.empty() || !std::all_of(comp.begin(), comp.end(), [](char c)
{
const char printable[] = "!#$%&'*+-/=?^_`{|}~";
- return isAsciiAlpha(c) || isDigit(c) || makeUnsigned(c) >= 128 ||
+ return isAsciiAlpha(c) || isDigit(c) || !isAsciiChar(c) ||
std::find(std::begin(printable), std::end(printable), c) != std::end(printable);
}))
return false;
@@ -507,7 +507,7 @@ bool zen::isValidEmail(const std::string& email)
for (const std::string& comp : split(domain, '.', SplitType::ALLOW_EMPTY))
if (comp.empty() || comp.size() > 63 ||
- !std::all_of(comp.begin(), comp.end(), [](char c) { return isAsciiAlpha(c) ||isDigit(c) || makeUnsigned(c) >= 128 || c == '-'; }))
+ !std::all_of(comp.begin(), comp.end(), [](char c) { return isAsciiAlpha(c) ||isDigit(c) || !isAsciiChar(c) || c == '-'; }))
return false;
}
diff --git a/zen/legacy_compiler.cpp b/zen/legacy_compiler.cpp
index 3e3b7ba7..416993ed 100644
--- a/zen/legacy_compiler.cpp
+++ b/zen/legacy_compiler.cpp
@@ -5,12 +5,6 @@
// *****************************************************************************
#include "legacy_compiler.h"
-#include <charconv>
-//1. including this one in string_tools.h blows up VC++:
-// "An internal error has occurred in the compiler. (compiler file 'd:\agent\_work\1\s\src\vctools\Compiler\Utc\src\p2\p2symtab.c', line 2618)"
-//2. using inside PCH: "fatal error C1076: compiler limit: internal heap limit reached"
-
-
#if __cpp_lib_to_chars
#error get rid of workarounds
#endif
diff --git a/zen/legacy_compiler.h b/zen/legacy_compiler.h
index 13cdd8d0..16e22d03 100644
--- a/zen/legacy_compiler.h
+++ b/zen/legacy_compiler.h
@@ -12,8 +12,9 @@
-//https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations
+//https://en.cppreference.com/w/cpp/feature_test
//https://en.cppreference.com/w/User:D41D8CD98F/feature_testing_macros
+//https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations
//https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html
namespace std
{
diff --git a/zen/open_ssl.cpp b/zen/open_ssl.cpp
index f436875b..f2b48fd9 100644
--- a/zen/open_ssl.cpp
+++ b/zen/open_ssl.cpp
@@ -628,7 +628,7 @@ private:
zen::TlsContext::TlsContext(int socket, const Zstring& server, const Zstring* caCertFilePath) :
pimpl_(std::make_unique<Impl>(socket, utfTo<std::string>(server), caCertFilePath)) {} //throw SysError
zen::TlsContext::~TlsContext() {}
-size_t zen::TlsContext::tryRead ( void* buffer, size_t bytesToRead ) { return pimpl_->tryRead(buffer, bytesToRead); } //throw SysError
+size_t zen::TlsContext::tryRead ( void* buffer, size_t bytesToRead ) { return pimpl_->tryRead (buffer, bytesToRead); } //throw SysError
size_t zen::TlsContext::tryWrite(const void* buffer, size_t bytesToWrite) { return pimpl_->tryWrite(buffer, bytesToWrite); } //throw SysError
diff --git a/zen/perf.h b/zen/perf.h
index 33005e9f..2598ea76 100644
--- a/zen/perf.h
+++ b/zen/perf.h
@@ -21,9 +21,9 @@
/* Example: Aggregated function call time:
- static zen::PerfTimer timer;
- timer.resume();
- ZEN_ON_SCOPE_EXIT(timer.pause());
+ static zen::PerfTimer perfTest(true); //startPaused
+ perfTest.resume();
+ ZEN_ON_SCOPE_EXIT(perfTest.pause());
*/
namespace zen
@@ -41,6 +41,8 @@ namespace zen
class StopWatch
{
public:
+ explicit StopWatch(bool startPaused = false) : paused_(startPaused) {}
+
bool isPaused() const { return paused_; }
void pause()
@@ -77,7 +79,7 @@ public:
}
private:
- bool paused_ = false;
+ bool paused_;
std::chrono::steady_clock::time_point startTime_ = std::chrono::steady_clock::now();
std::chrono::nanoseconds elapsedUntilPause_{}; //std::chrono::duration is uninitialized by default! WTF! When will this stupidity end???
};
@@ -86,10 +88,13 @@ private:
class PerfTimer
{
public:
- [[deprecated]] PerfTimer() {}
+ [[deprecated]] explicit PerfTimer(bool startPaused = false) : watch_(startPaused) {}
~PerfTimer() { if (!resultShown_) showResult(); }
+ void pause () { watch_.pause(); }
+ void resume() { watch_.resume(); }
+
void showResult()
{
const bool wasRunning = !watch_.isPaused();
diff --git a/zen/recycler.cpp b/zen/recycler.cpp
index 28b2d6c1..9c463546 100644
--- a/zen/recycler.cpp
+++ b/zen/recycler.cpp
@@ -23,7 +23,7 @@ bool zen::recycleOrDeleteIfExists(const Zstring& itemPath) //throw FileError
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))
{
@@ -52,10 +52,9 @@ bool zen::recycleOrDeleteIfExists(const Zstring& itemPath) //throw FileError
}
-/*
-We really need access to a similar function to check whether a directory supports trashing and emit a warning if it does not!
+/* We really need access to a similar function to check whether a directory supports trashing and emit a warning if it does not!
-The following function looks perfect, alas it is restricted to local files and to the implementation of GIO only:
+ The following function looks perfect, alas it is restricted to local files and to the implementation of GIO only:
gboolean _g_local_file_has_trash_dir(const char* dirpath, dev_t dir_dev);
See: http://www.netmite.com/android/mydroid/2.0/external/bluetooth/glib/gio/glocalfileinfo.h
@@ -67,5 +66,4 @@ The following function looks perfect, alas it is restricted to local files and t
writable && parent_info->has_trash_dir);
=> We're NOT interested in whether the specified folder can be trashed, but whether it supports thrashing its child elements! (Only support, not actual write access!)
- This renders G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH useless for this purpose.
-*/
+ This renders G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH useless for this purpose. */
diff --git a/zen/scope_guard.h b/zen/scope_guard.h
index 846d5663..e97d3f0a 100644
--- a/zen/scope_guard.h
+++ b/zen/scope_guard.h
@@ -60,7 +60,8 @@ template <typename F> inline
void runScopeGuardDestructor(F& fun, bool failed, std::integral_constant<ScopeGuardRunMode, ScopeGuardRunMode::onFail>) noexcept
{
if (failed)
- try { fun(); } catch (...) { assert(false); }
+ try { fun(); }
+ catch (...) { assert(false); }
}
@@ -71,9 +72,10 @@ public:
explicit ScopeGuard(const F& fun) : fun_(fun) {}
explicit ScopeGuard( F&& fun) : fun_(std::move(fun)) {}
- ScopeGuard(ScopeGuard&& other) : fun_(std::move(other.fun_)),
- exeptionCount_(other.exeptionCount_),
- dismissed_(other.dismissed_) { other.dismissed_ = true; }
+ ScopeGuard(ScopeGuard&& tmp) :
+ fun_(std::move(tmp.fun_)),
+ exeptionCount_(tmp.exeptionCount_),
+ dismissed_(tmp.dismissed_) { tmp.dismissed_ = true; }
~ScopeGuard() noexcept(runMode == ScopeGuardRunMode::onFail)
{
diff --git a/zen/serialize.h b/zen/serialize.h
index a34f91a7..6c57e4ee 100644
--- a/zen/serialize.h
+++ b/zen/serialize.h
@@ -11,21 +11,20 @@
#include <cstdint>
#include <stdexcept>
#include "string_base.h"
+#include "sys_error.h"
//keep header clean from specific stream implementations! (e.g.file_io.h)! used by abstract.h!
namespace zen
{
-//high-performance unformatted serialization (avoiding wxMemoryOutputStream/wxMemoryInputStream inefficiencies)
+/* high-performance unformatted serialization (avoiding wxMemoryOutputStream/wxMemoryInputStream inefficiencies)
-/*
--------------------------
|Binary Container Concept|
--------------------------
binary container for data storage: must support "basic" std::vector interface (e.g. std::vector<std::byte>, std::string, Zbase<char>)
-*/
-/*
+
-------------------------------
|Buffered Input Stream Concept|
-------------------------------
@@ -49,8 +48,7 @@ struct BufferedOutputStream
Optional: support stream-copying
--------------------------------
const IOCallback& notifyUnbufferedIO
-};
-*/
+}; */
using IOCallback = std::function<void(int64_t bytesDelta)>; //throw X
@@ -65,8 +63,12 @@ template <class N, class BufferedOutputStream> void writeNumber (BufferedOutpu
template <class C, class BufferedOutputStream> void writeContainer(BufferedOutputStream& stream, const C& str); //noexcept
template < class BufferedOutputStream> void writeArray (BufferedOutputStream& stream, const void* buffer, size_t len); //
//----------------------------------------------------------------------
-class UnexpectedEndOfStreamError {};
-template <class N, class BufferedInputStream> N readNumber (BufferedInputStream& stream); //throw UnexpectedEndOfStreamError (corrupted data)
+struct SysErrorUnexpectedEos : public SysError
+{
+ SysErrorUnexpectedEos() : SysError(_("File content is corrupted.") + L" (unexpected end of stream)") {}
+};
+
+template <class N, class BufferedInputStream> N readNumber (BufferedInputStream& stream); //throw SysErrorUnexpectedEos (corrupted data)
template <class C, class BufferedInputStream> C readContainer(BufferedInputStream& stream); //
template < class BufferedInputStream> void readArray (BufferedInputStream& stream, void* buffer, size_t len); //
@@ -220,40 +222,40 @@ void writeContainer(BufferedOutputStream& stream, const C& cont) //don't even co
template <class BufferedInputStream> inline
-void readArray(BufferedInputStream& stream, void* buffer, size_t len) //throw UnexpectedEndOfStreamError
+void readArray(BufferedInputStream& stream, void* buffer, size_t len) //throw SysErrorUnexpectedEos
{
const size_t bytesRead = stream.read(buffer, len);
assert(bytesRead <= len); //buffer overflow otherwise not always detected!
if (bytesRead < len)
- throw UnexpectedEndOfStreamError();
+ throw SysErrorUnexpectedEos();
}
template <class N, class BufferedInputStream> inline
-N readNumber(BufferedInputStream& stream) //throw UnexpectedEndOfStreamError
+N readNumber(BufferedInputStream& stream) //throw SysErrorUnexpectedEos
{
static_assert(IsArithmetic<N>::value || std::is_same_v<N, bool> || std::is_enum_v<N>);
N num{};
- readArray(stream, &num, sizeof(N)); //throw UnexpectedEndOfStreamError
+ readArray(stream, &num, sizeof(N)); //throw SysErrorUnexpectedEos
return num;
}
template <class C, class BufferedInputStream> inline
-C readContainer(BufferedInputStream& stream) //throw UnexpectedEndOfStreamError
+C readContainer(BufferedInputStream& stream) //throw SysErrorUnexpectedEos
{
C cont;
- auto strLength = readNumber<uint32_t>(stream); //throw UnexpectedEndOfStreamError
+ auto strLength = readNumber<uint32_t>(stream); //throw SysErrorUnexpectedEos
if (strLength > 0)
{
try
{
- cont.resize(strLength); //throw std::length_error
+ cont.resize(strLength); //throw std::length_error, std::bad_alloc
}
- catch (std::length_error&) { throw UnexpectedEndOfStreamError(); } //most likely this is due to data corruption!
- catch ( std::bad_alloc&) { throw UnexpectedEndOfStreamError(); } //
+ catch (std::length_error&) { throw SysErrorUnexpectedEos(); } //most likely this is due to data corruption!
+ catch ( std::bad_alloc&) { throw SysErrorUnexpectedEos(); } //
- readArray(stream, &cont[0], sizeof(typename C::value_type) * strLength); //throw UnexpectedEndOfStreamError
+ readArray(stream, &cont[0], sizeof(typename C::value_type) * strLength); //throw SysErrorUnexpectedEos
}
return cont;
}
diff --git a/zen/shell_execute.cpp b/zen/shell_execute.cpp
index c8779bb8..90ccfdf3 100644
--- a/zen/shell_execute.cpp
+++ b/zen/shell_execute.cpp
@@ -82,6 +82,7 @@ std::pair<int /*exit code*/, std::wstring> zen::consoleExecute(const Zstring& cm
const int EC_CHILD_LAUNCH_FAILED = 120; //avoid 127: used by the system, e.g. failure to execute due to missing .so file
+ //use O_TMPFILE? sounds nice, but support is probably crap: https://github.com/libvips/libvips/issues/1151
const int fdTempFile = ::open(tempFilePath.c_str(), O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC,
S_IRUSR | S_IWUSR); //0600
if (fdTempFile == -1)
diff --git a/zen/stl_tools.h b/zen/stl_tools.h
index 5fd29b6b..7d071413 100644
--- a/zen/stl_tools.h
+++ b/zen/stl_tools.h
@@ -270,7 +270,7 @@ Num hashArray(ByteIterator first, ByteIterator last)
static_assert(IsInteger<ValType>::value || std::is_same_v<ValType, char> || std::is_same_v<ValType, wchar_t>);
FNV1aHash<Num> hash;
- std::for_each(first, last, [&hash](ValType v) { hash.add(static_cast<Num>(v)); });
+ std::for_each(first, last, [&hash](ValType v) { hash.add(v); });
return hash.get();
}
diff --git a/zen/string_tools.h b/zen/string_tools.h
index eaf1a700..cfdb27bd 100644
--- a/zen/string_tools.h
+++ b/zen/string_tools.h
@@ -26,6 +26,7 @@ template <class Char> bool isWhiteSpace(Char c);
template <class Char> bool isLineBreak (Char c);
template <class Char> bool isDigit (Char c); //not exactly the same as "std::isdigit" -> we consider '0'-'9' only!
template <class Char> bool isHexDigit (Char c);
+template <class Char> bool isAsciiChar (Char c);
template <class Char> bool isAsciiAlpha(Char c);
template <class S > bool isAsciiString(const S& str);
template <class Char> Char asciiToLower(Char c);
@@ -143,6 +144,13 @@ bool isHexDigit(Char c)
template <class Char> inline
+bool isAsciiChar(Char c)
+{
+ return makeUnsigned(c) < 128;
+}
+
+
+template <class Char> inline
bool isAsciiAlpha(Char c)
{
static_assert(std::is_same_v<Char, char> || std::is_same_v<Char, wchar_t>);
@@ -155,7 +163,7 @@ template <class S> inline
bool isAsciiString(const S& str)
{
const auto* const first = strBegin(str);
- return std::all_of(first, first + strLength(str), [](auto c) { return makeUnsigned(c) < 128; });
+ return std::all_of(first, first + strLength(str), [](auto c) { return isAsciiChar(c); });
}
@@ -255,7 +263,7 @@ int compareString(const S& lhs, const T& rhs)
const size_t lhsLen = strLength(lhs);
const size_t rhsLen = strLength(rhs);
- //length check *after* strcmpWithNulls(): we do care about natural ordering: e.g. for "compareString(makeUpperCopy(lhs), makeUpperCopy(rhs))"
+ //length check *after* strcmpWithNulls(): we do care about natural ordering: e.g. for "compareString(getUpperCase(lhs), getUpperCase(rhs))"
if (const int rv = impl::strcmpWithNulls(strBegin(lhs), strBegin(rhs), std::min(lhsLen, rhsLen));
rv != 0)
return rv;
diff --git a/zen/string_traits.h b/zen/string_traits.h
index 69d76b44..76d601b3 100644
--- a/zen/string_traits.h
+++ b/zen/string_traits.h
@@ -99,11 +99,7 @@ ZEN_INIT_DETECT_MEMBER(length) //
template <class S>
class StringTraits
{
-#if __cpp_lib_remove_cvref
using CleanType = std::remove_cvref_t<S>;
-#else
- using CleanType = std::remove_cv_t<std::remove_reference_t<S>>;
-#endif
using NonArrayType = std::remove_extent_t <CleanType>;
using NonPtrType = std::remove_pointer_t<NonArrayType>;
using UndecoratedType = std::remove_cv_t <NonPtrType>; //handle "const char* const"
diff --git a/zen/symlink_target.h b/zen/symlink_target.h
index 077fd4b3..59003284 100644
--- a/zen/symlink_target.h
+++ b/zen/symlink_target.h
@@ -17,8 +17,13 @@
namespace zen
{
-Zstring getSymlinkResolvedPath(const Zstring& linkPath); //throw FileError; Win: requires Vista or later!
-Zstring getSymlinkTargetRaw (const Zstring& linkPath); //throw FileError
+struct SymlinkRawContent
+{
+ Zstring targetPath;
+};
+SymlinkRawContent getSymlinkRawContent(const Zstring& linkPath); //throw FileError
+
+Zstring getSymlinkResolvedPath(const Zstring& linkPath); //throw FileError
}
@@ -34,7 +39,7 @@ Zstring getSymlinkTargetRaw (const Zstring& linkPath); //throw FileError
namespace
{
//retrieve raw target data of symlink or junction
-Zstring getSymlinkRawTargetString_impl(const Zstring& linkPath) //throw FileError
+zen::SymlinkRawContent getSymlinkRawContent_impl(const Zstring& linkPath) //throw FileError
{
using namespace zen;
const size_t BUFFER_SIZE = 10000;
@@ -46,7 +51,7 @@ Zstring getSymlinkRawTargetString_impl(const Zstring& linkPath) //throw FileErro
if (bytesWritten >= static_cast<ssize_t>(BUFFER_SIZE)) //detect truncation, not an error for readlink!
throw FileError(replaceCpy(_("Cannot resolve symbolic link %x."), L"%x", fmtPath(linkPath)), formatSystemError("readlink", L"", L"Buffer truncated."));
- return Zstring(&buffer[0], bytesWritten); //readlink does not append 0-termination!
+ return {Zstring(&buffer[0], bytesWritten)}; //readlink does not append 0-termination!
}
@@ -65,7 +70,8 @@ Zstring getResolvedSymlinkPath_impl(const Zstring& linkPath) //throw FileError
namespace zen
{
inline
-Zstring getSymlinkTargetRaw(const Zstring& linkPath) { return getSymlinkRawTargetString_impl(linkPath); }
+SymlinkRawContent getSymlinkRawContent(const Zstring& linkPath) { return getSymlinkRawContent_impl(linkPath); }
+
inline
Zstring getSymlinkResolvedPath(const Zstring& linkPath) { return getResolvedSymlinkPath_impl(linkPath); }
diff --git a/zen/system.cpp b/zen/system.cpp
index f39fae84..23e2c343 100644
--- a/zen/system.cpp
+++ b/zen/system.cpp
@@ -56,7 +56,7 @@ ComputerModel zen::getComputerModel() //throw FileError
const std::string stream = loadBinContainer<std::string>(filePath, nullptr /*notifyUnbufferedIO*/); //throw FileError
return utfTo<std::wstring>(trimCpy(stream));
}
- catch (const FileError& e) { throw SysError(e.toString()); } //errors should be further enriched by context info => SysError
+ catch (const FileError& e) { throw SysError(replaceCpy(e.toString(), L"\n\n", L'\n')); } //errors should be further enriched by context info => SysError
};
cm.model = tryGetInfo("/sys/devices/virtual/dmi/id/product_name"); //throw SysError
cm.vendor = tryGetInfo("/sys/devices/virtual/dmi/id/sys_vendor"); //
@@ -103,7 +103,7 @@ std::wstring zen::getOsDescription() //throw FileError
{
releaseInfo = loadBinContainer<std::string>("/etc/os-release", nullptr /*notifyUnbufferedIO*/); //throw FileError
}
- catch (const FileError& e) { throw SysError(e.toString()); } //further enrich with context info => SysError
+ catch (const FileError& e) { throw SysError(replaceCpy(e.toString(), L"\n\n", L'\n')); } //errors should be further enriched by context info => SysError
std::string osName;
std::string osVersion;
diff --git a/zen/zstring.cpp b/zen/zstring.cpp
index 690f004b..b78bc118 100644
--- a/zen/zstring.cpp
+++ b/zen/zstring.cpp
@@ -14,7 +14,7 @@
using namespace zen;
-Zstring makeUpperCopy(const Zstring& str)
+Zstring getUpperCase(const Zstring& str)
{
//fast pre-check:
if (isAsciiString(str)) //perf: in the range of 3.5ns
@@ -81,7 +81,7 @@ Zstring replaceCpyAsciiNoCase(const Zstring& str, const Zstring& oldTerm, const
for (size_t pos = 0;;)
{
- const size_t posFound = std::search(str.begin() + pos, str.end(), //can't use makeUpperCopy(): input/output sizes may differ!
+ const size_t posFound = std::search(str.begin() + pos, str.end(), //can't use getUpperCase(): input/output sizes may differ!
oldTerm.begin(), oldTerm.end(),
[](Zchar charL, Zchar charR) { return asciiToUpper(charL) == asciiToUpper(charR); }) - str.begin();
@@ -100,8 +100,7 @@ Zstring replaceCpyAsciiNoCase(const Zstring& str, const Zstring& oldTerm, const
}
-/*
-https://docs.microsoft.com/de-de/windows/desktop/Intl/handling-sorting-in-your-applications
+/* https://docs.microsoft.com/de-de/windows/desktop/Intl/handling-sorting-in-your-applications
Perf test: compare strings 10 mio times; 64 bit build
-----------------------------------------------------
@@ -120,8 +119,8 @@ OS X (UTF8 char)
856 ns | CFStringCreateWithCString + CFStringCompare(kCFCompareCaseInsensitive)
1110 ns | CFStringCreateWithCStringNoCopy + CFStringCompare(kCFCompareCaseInsensitive)
________________________
-time per call | function
-*/
+time per call | function */
+
int compareNativePath(const Zstring& lhs, const Zstring& rhs)
{
assert(lhs.find(Zchar('\0')) == Zstring::npos); //don't expect embedded nulls!
diff --git a/zen/zstring.h b/zen/zstring.h
index e262603e..adfd671b 100644
--- a/zen/zstring.h
+++ b/zen/zstring.h
@@ -28,7 +28,7 @@ using Zstringc = zen::Zbase<char>;
// - different UTF-8 encoding length of upper-case chars
// - different number of upper case chars (e.g. "ߢ => "SS" on macOS)
// - output is Unicode-normalized
-Zstring makeUpperCopy(const Zstring& str);
+Zstring getUpperCase(const Zstring& str);
//Windows, Linux: precomposed
//macOS: decomposed
@@ -43,11 +43,11 @@ Zstring replaceCpyAsciiNoCase(const Zstring& str, const Zstring& oldTerm, const
//------------------------------------------------------------------------------------------
-inline bool equalNoCase(const Zstring& lhs, const Zstring& rhs) { return makeUpperCopy(lhs) == makeUpperCopy(rhs); }
+inline bool equalNoCase(const Zstring& lhs, const Zstring& rhs) { return getUpperCase(lhs) == getUpperCase(rhs); }
struct ZstringNoCase //use as STL container key: avoid needless upper-case conversions during std::map<>::find()
{
- ZstringNoCase(const Zstring& str) : upperCase(makeUpperCopy(str)) {}
+ ZstringNoCase(const Zstring& str) : upperCase(getUpperCase(str)) {}
Zstring upperCase;
std::strong_ordering operator<=>(const ZstringNoCase& other) const = default;
bgstack15