summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Application.cpp17
-rw-r--r--Application.h3
-rw-r--r--BUILD/Changelog.txt25
-rw-r--r--BUILD/FreeFileSync.chmbin377164 -> 502518 bytes
-rw-r--r--BUILD/Help/html/Features.html4
-rw-r--r--BUILD/Help/html/advanced/069dee95-d329-4e99-ab3d-678edf80fbca.jpegbin35558 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/17e8fbfe-a994-4860-abaa-e00e0289b44c.jpegbin7121 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/7aa44556-38dc-467e-9902-2c9143cd0116.jpegbin67331 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/93f0cb09-bd16-4d76-b764-e30042a8e123.jpegbin5576 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/DaylightSavingTime.html14
-rw-r--r--BUILD/Help/html/advanced/ExternalApp.html24
-rw-r--r--BUILD/Help/html/advanced/RealtimeSync.html39
-rw-r--r--BUILD/Help/html/advanced/RunAsService.html12
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_17e8fbfe.pngbin0 -> 9916 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_4f230a46.jpgbin11177 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_4f230a46.pngbin0 -> 16072 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_68e0fe53.jpgbin4262 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_68e0fe53.pngbin0 -> 7391 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_7aa44556.pngbin0 -> 101229 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_bf02de4e.pngbin0 -> 13958 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_m3be0f332.jpgbin7969 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_m3be0f332.pngbin0 -> 16574 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_m3e56d901.jpgbin30249 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/RunAsService_html_m3e56d901.pngbin0 -> 72687 bytes
-rw-r--r--BUILD/Help/html/advanced/bf02de4e-7b45-4353-97e8-85b55cff3ac5.jpegbin5829 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/ce1ccceb-e3c6-4fab-adac-ef16f36698b0.jpegbin12654 -> 0 bytes
-rw-r--r--BUILD/Help/html/advanced/f1d462c4-3bd9-4463-a858-ae3de5f6af9e.jpegbin8929 -> 0 bytes
-rw-r--r--BUILD/Languages/chinese_simple.lng30
-rw-r--r--BUILD/Languages/chinese_traditional.lng32
-rw-r--r--BUILD/Languages/czech.lng30
-rw-r--r--BUILD/Languages/dutch.lng30
-rw-r--r--BUILD/Languages/english_uk.lng30
-rw-r--r--BUILD/Languages/finnish.lng34
-rw-r--r--BUILD/Languages/french.lng28
-rw-r--r--BUILD/Languages/german.lng34
-rw-r--r--BUILD/Languages/greek.lng906
-rw-r--r--BUILD/Languages/hebrew.lng28
-rw-r--r--BUILD/Languages/hungarian.lng30
-rw-r--r--BUILD/Languages/italian.lng30
-rw-r--r--BUILD/Languages/japanese.lng28
-rw-r--r--BUILD/Languages/polish.lng40
-rw-r--r--BUILD/Languages/portuguese.lng30
-rw-r--r--BUILD/Languages/portuguese_br.lng34
-rw-r--r--BUILD/Languages/romanian.lng30
-rw-r--r--BUILD/Languages/russian.lng58
-rw-r--r--BUILD/Languages/slovenian.lng30
-rw-r--r--BUILD/Languages/spanish.lng28
-rw-r--r--BUILD/Languages/swedish.lng28
-rw-r--r--BUILD/Languages/turkish.lng74
-rw-r--r--BUILD/Resources.datbin294369 -> 294876 bytes
-rw-r--r--FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj1
-rw-r--r--FreeFileSync.cbp6
-rw-r--r--FreeFileSync.vcxproj11
-rw-r--r--Makefile2
-rw-r--r--RealtimeSync/RealtimeSync.cbp3
-rw-r--r--RealtimeSync/RealtimeSync.vcxproj2
-rw-r--r--RealtimeSync/application.cpp5
-rw-r--r--RealtimeSync/application.h10
-rw-r--r--RealtimeSync/gui_generated.cpp441
-rw-r--r--RealtimeSync/gui_generated.h150
-rw-r--r--RealtimeSync/main_dlg.cpp75
-rw-r--r--RealtimeSync/main_dlg.h7
-rw-r--r--RealtimeSync/makefile3
-rw-r--r--RealtimeSync/notify.cpp4
-rw-r--r--RealtimeSync/notify.h2
-rw-r--r--RealtimeSync/pch.h2
-rw-r--r--RealtimeSync/resource.rc2
-rw-r--r--RealtimeSync/resources.cpp2
-rw-r--r--RealtimeSync/resources.h2
-rw-r--r--RealtimeSync/tray_menu.cpp34
-rw-r--r--RealtimeSync/tray_menu.h4
-rw-r--r--RealtimeSync/watcher.cpp2
-rw-r--r--RealtimeSync/watcher.h8
-rw-r--r--RealtimeSync/xml_ffs.cpp2
-rw-r--r--RealtimeSync/xml_ffs.h2
-rw-r--r--RealtimeSync/xml_proc.cpp2
-rw-r--r--RealtimeSync/xml_proc.h2
-rw-r--r--algorithm.cpp311
-rw-r--r--algorithm.h4
-rw-r--r--comparison.cpp294
-rw-r--r--comparison.h3
-rw-r--r--file_hierarchy.cpp35
-rw-r--r--file_hierarchy.h481
-rw-r--r--library/binary.cpp2
-rw-r--r--library/binary.h2
-rw-r--r--library/cmp_filetime.h66
-rw-r--r--library/custom_grid.cpp26
-rw-r--r--library/custom_grid.h6
-rw-r--r--library/db_file.cpp159
-rw-r--r--library/db_file.h2
-rw-r--r--library/detect_renaming.cpp2
-rw-r--r--library/detect_renaming.h2
-rw-r--r--library/dir_lock.cpp70
-rw-r--r--library/dir_lock.h2
-rw-r--r--library/error_log.cpp2
-rw-r--r--library/error_log.h2
-rw-r--r--library/filter.cpp2
-rw-r--r--library/filter.h19
-rw-r--r--library/icon_buffer.cpp9
-rw-r--r--library/icon_buffer.h10
-rw-r--r--library/pch.h2
-rw-r--r--library/process_xml.cpp20
-rw-r--r--library/process_xml.h10
-rw-r--r--library/resources.cpp2
-rw-r--r--library/resources.h2
-rw-r--r--library/soft_filter.cpp2
-rw-r--r--library/soft_filter.h2
-rw-r--r--library/statistics.cpp82
-rw-r--r--library/statistics.h29
-rw-r--r--library/status_handler.cpp2
-rw-r--r--library/status_handler.h2
-rw-r--r--resource.rc2
-rw-r--r--shared/IFileOperation/dll_main.cpp2
-rw-r--r--shared/IFileOperation/file_op.cpp2
-rw-r--r--shared/IFileOperation/file_op.h2
-rw-r--r--shared/ShadowCopy/dll_main.cpp2
-rw-r--r--shared/ShadowCopy/shadow.cpp2
-rw-r--r--shared/ShadowCopy/shadow.h2
-rw-r--r--shared/Taskbar_Seven/dll_main.cpp2
-rw-r--r--shared/Taskbar_Seven/taskbar.cpp2
-rw-r--r--shared/Taskbar_Seven/taskbar.h2
-rw-r--r--shared/app_main.cpp2
-rw-r--r--shared/app_main.h2
-rw-r--r--shared/assert_static.h2
-rw-r--r--shared/build_info.h2
-rw-r--r--shared/c_dll.h2
-rw-r--r--shared/check_exist.cpp2
-rw-r--r--shared/check_exist.h2
-rw-r--r--shared/com_error.h2
-rw-r--r--shared/com_ptr.h2
-rw-r--r--shared/com_util.h2
-rw-r--r--shared/custom_button.cpp2
-rw-r--r--shared/custom_button.h2
-rw-r--r--shared/custom_combo_box.cpp16
-rw-r--r--shared/custom_combo_box.h8
-rw-r--r--shared/custom_tooltip.cpp2
-rw-r--r--shared/custom_tooltip.h2
-rw-r--r--shared/debug_new.cpp2
-rw-r--r--shared/debug_new.h2
-rw-r--r--shared/dir_name.cpp2
-rw-r--r--shared/dir_name.h2
-rw-r--r--shared/disable_standby.h30
-rw-r--r--shared/dll_loader.cpp2
-rw-r--r--shared/dll_loader.h2
-rw-r--r--shared/file_error.h2
-rw-r--r--shared/file_handling.cpp240
-rw-r--r--shared/file_handling.h2
-rw-r--r--shared/file_id.cpp66
-rw-r--r--shared/file_id.h180
-rw-r--r--shared/file_io.cpp4
-rw-r--r--shared/file_io.h2
-rw-r--r--shared/file_traverser.cpp30
-rw-r--r--shared/file_traverser.h2
-rw-r--r--shared/global_func.cpp2
-rw-r--r--shared/global_func.h2
-rw-r--r--shared/guid.cpp54
-rw-r--r--shared/guid.h22
-rw-r--r--shared/help_provider.cpp4
-rw-r--r--shared/help_provider.h2
-rw-r--r--shared/localization.cpp12
-rw-r--r--shared/localization.h2
-rw-r--r--shared/long_path_prefix.cpp2
-rw-r--r--shared/long_path_prefix.h2
-rw-r--r--shared/perf.h2
-rw-r--r--shared/privilege.cpp102
-rw-r--r--shared/privilege.h59
-rw-r--r--shared/recycler.cpp2
-rw-r--r--shared/recycler.h2
-rw-r--r--shared/serialize.cpp10
-rw-r--r--shared/serialize.h8
-rw-r--r--shared/shadow.cpp2
-rw-r--r--shared/shadow.h2
-rw-r--r--shared/standard_paths.cpp2
-rw-r--r--shared/standard_paths.h2
-rw-r--r--shared/string_conv.h2
-rw-r--r--shared/symlink_target.h14
-rw-r--r--shared/system_constants.h2
-rw-r--r--shared/system_func.cpp2
-rw-r--r--shared/system_func.h2
-rw-r--r--shared/taskbar.cpp2
-rw-r--r--shared/taskbar.h2
-rw-r--r--shared/toggle_button.cpp2
-rw-r--r--shared/toggle_button.h2
-rw-r--r--shared/util.cpp15
-rw-r--r--shared/util.h8
-rw-r--r--shared/xml_base.cpp2
-rw-r--r--shared/xml_base.h2
-rw-r--r--shared/xml_error.h2
-rw-r--r--shared/zbase.h2
-rw-r--r--shared/zstring.cpp2
-rw-r--r--shared/zstring.h4
-rw-r--r--structures.cpp53
-rw-r--r--structures.h41
-rw-r--r--synchronization.cpp350
-rw-r--r--synchronization.h102
-rw-r--r--ui/batch_config.cpp18
-rw-r--r--ui/batch_config.h2
-rw-r--r--ui/batch_status_handler.cpp2
-rw-r--r--ui/batch_status_handler.h2
-rw-r--r--ui/check_version.cpp2
-rw-r--r--ui/check_version.h2
-rw-r--r--ui/folder_pair.h2
-rw-r--r--ui/grid_view.cpp6
-rw-r--r--ui/grid_view.h2
-rw-r--r--ui/gui_generated.cpp389
-rw-r--r--ui/gui_generated.h59
-rw-r--r--ui/gui_status_handler.cpp33
-rw-r--r--ui/gui_status_handler.h2
-rw-r--r--ui/is_null_filter.h2
-rw-r--r--ui/main_dlg.cpp771
-rw-r--r--ui/main_dlg.h92
-rw-r--r--ui/mouse_move_dlg.cpp39
-rw-r--r--ui/mouse_move_dlg.h11
-rw-r--r--ui/msg_popup.cpp8
-rw-r--r--ui/msg_popup.h2
-rw-r--r--ui/progress_indicator.cpp112
-rw-r--r--ui/progress_indicator.h2
-rw-r--r--ui/search.cpp4
-rw-r--r--ui/search.h2
-rw-r--r--ui/small_dlgs.cpp26
-rw-r--r--ui/small_dlgs.h2
-rw-r--r--ui/sorting.h10
-rw-r--r--ui/switch_to_gui.cpp2
-rw-r--r--ui/switch_to_gui.h2
-rw-r--r--ui/sync_cfg.cpp2
-rw-r--r--ui/sync_cfg.h2
-rw-r--r--ui/tray_icon.cpp4
-rw-r--r--ui/tray_icon.h2
-rw-r--r--version/version.h2
-rw-r--r--version/version.rc4
230 files changed, 4499 insertions, 2889 deletions
diff --git a/Application.cpp b/Application.cpp
index d8b7c760..5699a68c 100644
--- a/Application.cpp
+++ b/Application.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "application.h"
@@ -24,6 +24,8 @@
#include <wx/sound.h>
#include "shared/file_handling.h"
#include "shared/string_conv.h"
+#include "shared/util.h"
+#include <wx/log.h>
#ifdef FFS_LINUX
#include <gtk/gtk.h>
@@ -41,7 +43,7 @@ bool Application::OnInit()
returnValue = 0;
//do not call wxApp::OnInit() to avoid using default commandline parser
-//Note: initialization is done in the FIRST idle event instead of OnInit. Reason: Commandline mode requires the wxApp eventhandler to be established
+//Note: initialization is done in the FIRST idle event instead of OnInit. Reason: batch mode requires the wxApp eventhandler to be established
//for UI update events. This is not the case at the time of OnInit().
Connect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), NULL, this);
@@ -171,7 +173,8 @@ int Application::OnRun()
wxFile safeOutput(ffs3::getConfigDir() + wxT("LastError.txt"), wxFile::write);
safeOutput.Write(wxString::FromAscii(e.what()));
- wxMessageBox(wxString::FromAscii(e.what()), _("An exception occurred!"), wxOK | wxICON_ERROR);
+ wxSafeShowMessage(_("An exception occurred!"), wxString::FromAscii(e.what()));
+
return -9;
}
@@ -238,16 +241,18 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
statusHandler.reset(new BatchStatusHandler(false, ffs3::extractJobName(filename), NULL, batchCfg.handleError, switchBatchToGui, returnValue));
//COMPARE DIRECTORIES
- ffs3::FolderComparison folderCmp;
ffs3::CompareProcess comparison(batchCfg.mainCfg.handleSymlinks,
globSettings.fileTimeTolerance,
globSettings.optDialogs,
statusHandler.get());
+ ffs3::FolderComparison folderCmp;
comparison.startCompareProcess(ffs3::extractCompareCfg(batchCfg.mainCfg),
batchCfg.mainCfg.compareVar,
folderCmp);
+ const bool syncNeeded = synchronizationNeeded(folderCmp);
+
//START SYNCHRONIZATION
ffs3::SyncProcess synchronization(
globSettings.optDialogs,
@@ -262,7 +267,7 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
synchronization.startSynchronizationProcess(syncProcessCfg, folderCmp);
//check if there are files/folders to be sync'ed at all
- if (!synchronizationNeeded(folderCmp))
+ if (!syncNeeded)
{
statusHandler->logInfo(_("Nothing to synchronize according to configuration!")); //inform about this special case
//return; -> disabled: <automatic> mode requires database to be written in any case
@@ -273,7 +278,7 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
{
const wxString soundFile = ffs3::getResourceDir() + wxT("Sync_Complete.wav");
if (ffs3::fileExists(ffs3::wxToZ(soundFile)))
- wxSound::Play(soundFile, wxSOUND_ASYNC);
+ wxSound::Play(soundFile, wxSOUND_ASYNC); //warning: this may fail and show a wxWidgets error message!
}
}
catch (ffs3::AbortThisProcess&) //exit used by statusHandler
diff --git a/Application.h b/Application.h
index bfc4a45f..7a666223 100644
--- a/Application.h
+++ b/Application.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FREEFILESYNCAPP_H
@@ -29,7 +29,6 @@ private:
return wxLayout_LeftToRight;
}
-
xmlAccess::XmlGlobalSettings globalSettings; //settings used by GUI, batch mode or both
int returnValue;
};
diff --git a/BUILD/Changelog.txt b/BUILD/Changelog.txt
index dc7dd689..bfe24ff8 100644
--- a/BUILD/Changelog.txt
+++ b/BUILD/Changelog.txt
@@ -2,6 +2,31 @@
|FreeFileSync|
--------------
+Changelog v3.13
+---------------
+Implemented Advanced User Interface to allow user specified layout customizations
+Process case sensitive file/directory/symlink names
+Synchronize name/attributes only avoiding full copy if appropriate
+Prevent hibernation/sleep mode during comparison and synchronization (Windows)
+New database format: single file for FreeFileSync 32 and 64 bit versions
+ - full sync suggested before migrating to v3.13
+ - old sync.x64.ffs_db files may be deleted
+Improved algorithm to calculate remaining time
+Allow resizing window containing multiple folder pairs
+Show folder short names in column file name
+Correctly report message "nothing to sync" in batch mode
+Removed libjpg-8 dependency (Linux)
+Fixed loading correct maximized position on multi-screen desktop
+RealtimeSync: Removed blank icons in ALT-TAB list during execution of commandline
+Show RealtimeSync job name as systray tooltip
+Last used configurations as sorted list without size limitation
+Remove redundant configuration when merging multiple ffs_gui/ffs_batch files
+Warning if folder is modified that is part of multiple folder pairs
+Aggregated warning messages for all folder pairs instead of one per pair
+Added privilege to access restricted symlink content
+Added Greek translation
+
+
Changelog v3.12
---------------
Allow empty folder pairs without complaining
diff --git a/BUILD/FreeFileSync.chm b/BUILD/FreeFileSync.chm
index 6a48eef9..fe69506a 100644
--- a/BUILD/FreeFileSync.chm
+++ b/BUILD/FreeFileSync.chm
Binary files differ
diff --git a/BUILD/Help/html/Features.html b/BUILD/Help/html/Features.html
index c5665a7d..6182e752 100644
--- a/BUILD/Help/html/Features.html
+++ b/BUILD/Help/html/Features.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20101013;18402500">
+ <META NAME="CHANGED" CONTENT="20110114;15200">
<STYLE TYPE="text/css">
<!--
@page { margin: 2cm }
@@ -111,6 +111,8 @@
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Advanced
locking strategy to allow multiple synchronization processes (e.g.
multiple writers, same network share).</FONT></P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Case-sensitive
+ synchronization of file, directory and symlink names</FONT></P>
</OL>
</BODY>
</HTML> \ No newline at end of file
diff --git a/BUILD/Help/html/advanced/069dee95-d329-4e99-ab3d-678edf80fbca.jpeg b/BUILD/Help/html/advanced/069dee95-d329-4e99-ab3d-678edf80fbca.jpeg
deleted file mode 100644
index 3a7b7565..00000000
--- a/BUILD/Help/html/advanced/069dee95-d329-4e99-ab3d-678edf80fbca.jpeg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/17e8fbfe-a994-4860-abaa-e00e0289b44c.jpeg b/BUILD/Help/html/advanced/17e8fbfe-a994-4860-abaa-e00e0289b44c.jpeg
deleted file mode 100644
index 78274f6d..00000000
--- a/BUILD/Help/html/advanced/17e8fbfe-a994-4860-abaa-e00e0289b44c.jpeg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/7aa44556-38dc-467e-9902-2c9143cd0116.jpeg b/BUILD/Help/html/advanced/7aa44556-38dc-467e-9902-2c9143cd0116.jpeg
deleted file mode 100644
index f158af02..00000000
--- a/BUILD/Help/html/advanced/7aa44556-38dc-467e-9902-2c9143cd0116.jpeg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/93f0cb09-bd16-4d76-b764-e30042a8e123.jpeg b/BUILD/Help/html/advanced/93f0cb09-bd16-4d76-b764-e30042a8e123.jpeg
deleted file mode 100644
index 673b074c..00000000
--- a/BUILD/Help/html/advanced/93f0cb09-bd16-4d76-b764-e30042a8e123.jpeg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/DaylightSavingTime.html b/BUILD/Help/html/advanced/DaylightSavingTime.html
index b29a612a..38f277cb 100644
--- a/BUILD/Help/html/advanced/DaylightSavingTime.html
+++ b/BUILD/Help/html/advanced/DaylightSavingTime.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
<META NAME="CREATED" CONTENT="20091208;20054200">
- <META NAME="CHANGED" CONTENT="20100902;19275000">
+ <META NAME="CHANGED" CONTENT="20101219;15552100">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -14,17 +14,17 @@
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
- H2 { margin-bottom: 0.21cm }
- H2.western { font-family: "Arial", sans-serif; font-size: 14pt; font-style: italic }
- H2.cjk { font-family: "MS Mincho"; font-size: 14pt; font-style: italic }
- H2.ctl { font-family: "Mangal"; font-size: 14pt; font-style: italic }
+ H3 { margin-bottom: 0.21cm }
+ H3.western { font-family: "Arial", sans-serif }
+ H3.cjk { font-family: "MS Mincho" }
+ H3.ctl { font-family: "Mangal" }
A:link { so-language: zxx }
-->
</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
-<H2 CLASS="western" STYLE="font-style: normal"><FONT FACE="Tahoma, sans-serif">Daylight
-saving time <SPAN STYLE="font-weight: normal">(Windows)</SPAN></FONT></H2>
+<H3 CLASS="western"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal">Daylight
+saving time </SPAN><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">(Windows)</SPAN></SPAN></FONT></H3>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">A
diff --git a/BUILD/Help/html/advanced/ExternalApp.html b/BUILD/Help/html/advanced/ExternalApp.html
index 1c28932c..1dd05d4e 100644
--- a/BUILD/Help/html/advanced/ExternalApp.html
+++ b/BUILD/Help/html/advanced/ExternalApp.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20100902;19180200">
+ <META NAME="CHANGED" CONTENT="20101229;20324200">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -27,16 +27,18 @@
application via double-click</FONT></H3>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync
-opens the operating system's standard file browser per default on
-each double-click e. g. by invoking &quot;<FONT FACE="Courier New, monospace">explorer
-/select, %name</FONT>&quot; on Windows.</FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">If some
-other application shall be started instead, just navigate to &quot;</FONT><FONT FACE="Tahoma, sans-serif"><I>Menu
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">By
+default FreeFileSync opens the operating system's standard file
+browser on each double-click by invoking &quot;<FONT FACE="Courier New, monospace">explorer
+/select, %name</FONT>&quot; on Windows and &quot;<FONT FACE="Courier New, monospace">xdg-open
+%dir</FONT>&quot; on Linux.</FONT></P>
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">However
+the user is free to integrate other external applications into
+FreeFileSync: navigate to &quot;</FONT><FONT FACE="Tahoma, sans-serif"><I>Menu
-&gt; Advanced -&gt; Global settings: External Applications</I></FONT><FONT FACE="Tahoma, sans-serif">&quot;
-and add or replace a command string. The first one is used when
-double-clicking while all subsequent entries are still available in
-right-click context menu on main dialog. The following macros are
+and add or replace a command string. The first entry is used when
+double-clicking a row while all subsequent entries are only available
+in right-click context menu on main dialog. The following macros are
available:</FONT></P>
<UL>
<P><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
@@ -59,6 +61,8 @@ available:</FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Start
visual difference tool: <FONT FACE="Courier New, monospace">C:\Program
Files\WinMerge\WinMergeU.exe &quot;%name&quot; &quot;%nameCo&quot;</FONT></FONT></P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Open
+ Console: <FONT FACE="Courier New, monospace">cmd /k cd /D &quot;%dir&quot;</FONT></FONT></P>
</UL>
</UL>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
diff --git a/BUILD/Help/html/advanced/RealtimeSync.html b/BUILD/Help/html/advanced/RealtimeSync.html
index 635b86d1..d5738fb2 100644
--- a/BUILD/Help/html/advanced/RealtimeSync.html
+++ b/BUILD/Help/html/advanced/RealtimeSync.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20101016;14325500">
+ <META NAME="CHANGED" CONTENT="20110102;20030700">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -63,14 +63,18 @@ to begin monitoring.</FONT></P>
<LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Tahoma, sans-serif">The settings dialog can be skipped
by passing a RealtimeSync configuration file (<FONT FACE="Courier New, monospace">*.ffs_real</FONT>)
- OR a FreeFileSync Batch file (<FONT FACE="Courier New, monospace">*.ffs_batch</FONT>)
- as first command-line argument. This enables integration with your
- operating system's auto start facility:</FONT></P>
+ OR a FreeFileSync batch file (<FONT FACE="Courier New, monospace">*.ffs_batch</FONT>)
+ as first command-line argument. This allows for integration with
+ the operating system's auto start facility.</FONT></P>
<LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Tahoma, sans-serif">Using RealtimeSync is not
restricted to starting FreeFileSync. It can also be used in other
scenarios, like sending an email whenever a certain directory is
modified.</FONT></P>
+ <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Tahoma, sans-serif">The command-line must not block
+ the progress. If a FreeFileSync batch file is to be called make
+ sure it is operating in &quot;silent-mode&quot;.</FONT></P>
</UL>
</SPAN><BR CLEAR=LEFT>
</P>
@@ -92,19 +96,14 @@ to begin monitoring.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT>
-<FONT FACE="Tahoma, sans-serif">(Smart synchronization when USB
-sticks are inserted into your PC - in combination with FreeFileSync)</FONT></P>
+<FONT FACE="Tahoma, sans-serif">(Automatic synchronization when USB
+stick is inserted)</FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Assume
-you have multiple(!) USB sticks that contain data you want to
-automatically synchronize in two-way mode whenever you insert one of
-the sticks into the PC. In order to be on the safe side, you decide
-to setup FreeFileSync batch jobs (</FONT><FONT FACE="Courier New, monospace">*.ffs_batch</FONT><FONT FACE="Tahoma, sans-serif">)
-using </FONT><FONT FACE="Tahoma, sans-serif"><I>&lt;Automatic&gt;</I></FONT>
-<FONT FACE="Tahoma, sans-serif">mode so that conflicts, for example
-files modified on both sides, are detected avoiding data loss. Save
-the relevant configuration on each USB stick's root directory to have
-it called when the stick is mounted. Then configure RealtimeSync
-analog to the following:</FONT></P>
+you have multiple USB sticks that contain data you want to
+automatically synchronize whenever you insert one of the sticks into
+the PC. Save the relevant configuration on each USB stick's root
+directory to have it called when the stick is mounted. Then configure
+RealtimeSync analog to the following:</FONT></P>
<UL>
<P><IMG SRC="rts.png" NAME="Grafik2" ALIGN=BOTTOM WIDTH=462 HEIGHT=411 BORDER=0></P>
</UL>
@@ -114,14 +113,16 @@ analog to the following:</FONT></P>
directory &quot;</FONT><FONT FACE="Courier New, monospace">H:\Data</FONT><FONT FACE="Tahoma, sans-serif">&quot;
becomes available, the command-line executes and starts the batch job
whose configuration is located on the stick. Furthermore it also
-starts the batch job each time files are modified within &quot;</FONT><FONT FACE="Courier New, monospace">H:\Data</FONT><FONT FACE="Tahoma, sans-serif">&quot;.
+starts the batch job each time files are modified in &quot;</FONT><FONT FACE="Courier New, monospace">H:\Data</FONT><FONT FACE="Tahoma, sans-serif">&quot;.
</FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT>
+<FONT FACE="Tahoma, sans-serif">(Calling a custom .cmd or .bat file)</FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">For
-additional convenience it might be nice if the batch job remains
-silent if synchronization completes successfully, otherwise shows
+additional convenience it may be nice if the batch job remains silent
+if synchronization completes successfully, otherwise shows
FreeFileSync's GUI dialog when errors occurred. Therefore create two
configurations, one silent-mode batch to be called by default and one
<FONT FACE="Courier New, monospace">*.ffs_gui</FONT> to be called
diff --git a/BUILD/Help/html/advanced/RunAsService.html b/BUILD/Help/html/advanced/RunAsService.html
index 07bbb56d..54408579 100644
--- a/BUILD/Help/html/advanced/RunAsService.html
+++ b/BUILD/Help/html/advanced/RunAsService.html
@@ -49,7 +49,7 @@ Create and register a new Service via command line:</FONT></P>
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Courier New, monospace">instsrv &lt;ServiceName&gt;
&lt;PathToResourceKit&gt;\srvany.exe</FONT></P>
- </SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="RunAsService_html_4f230a46.jpg" NAME="Grafik9" ALIGN=BOTTOM WIDTH=430 HEIGHT=107 BORDER=0></P>
+ </SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="RunAsService_html_4f230a46.png" NAME="Grafik9" ALIGN=BOTTOM WIDTH=430 HEIGHT=107 BORDER=0></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
@@ -60,10 +60,10 @@ the new Service with RealtimeSync:</FONT></P>
the Registry editor (Regedit.exe) and navigate to key
&quot;</FONT><FONT FACE="Courier New, monospace">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\&lt;ServiceName&gt;</FONT><FONT FACE="Tahoma, sans-serif">&quot;</FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Add
- a new key &quot;</FONT><FONT FACE="Courier New, monospace">Parameters</FONT><FONT FACE="Tahoma, sans-serif">&quot;.<BR><IMG SRC="bf02de4e-7b45-4353-97e8-85b55cff3ac5.jpeg" NAME="Grafik8" ALIGN=BOTTOM WIDTH=249 HEIGHT=101 BORDER=0></FONT></P>
+ a new key &quot;</FONT><FONT FACE="Courier New, monospace">Parameters</FONT><FONT FACE="Tahoma, sans-serif">&quot;.<BR><IMG SRC="RunAsService_html_bf02de4e.png" NAME="Grafik8" ALIGN=BOTTOM WIDTH=249 HEIGHT=101 BORDER=0></FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Add
a new String value named &quot;</FONT><FONT FACE="Courier New, monospace">Application</FONT><FONT FACE="Tahoma, sans-serif">&quot;
- and specify a command line that shall be executed as value.<BR><IMG SRC="RunAsService_html_m3be0f332.jpg" NAME="Grafik10" ALIGN=BOTTOM WIDTH=620 HEIGHT=58 BORDER=0></FONT></P>
+ and specify a command line that shall be executed as value.<BR><IMG SRC="RunAsService_html_m3be0f332.png" NAME="Grafik10" ALIGN=BOTTOM WIDTH=620 HEIGHT=58 BORDER=0></FONT></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
@@ -97,7 +97,7 @@ administration:</FONT></P>
<P STYLE="margin-right: 0.98cm"><SPAN ID="Rahmen5" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Tahoma, sans-serif">net start &lt;ServiceName&gt;</FONT></P>
- </SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="17e8fbfe-a994-4860-abaa-e00e0289b44c.jpeg" NAME="Grafik5" ALIGN=BOTTOM WIDTH=640 HEIGHT=55 BORDER=0><BR>&nbsp;<BR><IMG SRC="7aa44556-38dc-467e-9902-2c9143cd0116.jpeg" NAME="Grafik1" ALIGN=BOTTOM WIDTH=548 HEIGHT=291 BORDER=0></P>
+ </SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="RunAsService_html_17e8fbfe.png" NAME="Grafik5" ALIGN=BOTTOM WIDTH=640 HEIGHT=55 BORDER=0><BR>&nbsp;<BR><IMG SRC="RunAsService_html_7aa44556.png" NAME="Grafik1" ALIGN=BOTTOM WIDTH=548 HEIGHT=291 BORDER=0></P>
</UL>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><BR>
</P>
@@ -111,7 +111,7 @@ administration:</FONT></P>
Service administration.</FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
-<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><IMG SRC="RunAsService_html_m3e56d901.jpg" NAME="Grafik6" ALIGN=BOTTOM WIDTH=410 HEIGHT=468 BORDER=0></P>
+<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><IMG SRC="RunAsService_html_m3e56d901.png" NAME="Grafik6" ALIGN=BOTTOM WIDTH=410 HEIGHT=468 BORDER=0></P>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
@@ -122,7 +122,7 @@ Service shall be removed from the system, enter via command line:</FONT></P>
<P STYLE="margin-right: 0.98cm"><SPAN ID="Rahmen6" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT FACE="Tahoma, sans-serif">instsrv &lt;ServiceName&gt; remove</FONT></P>
- </SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="RunAsService_html_68e0fe53.jpg" NAME="Grafik7" ALIGN=MIDDLE WIDTH=640 HEIGHT=52 BORDER=0></P>
+ </SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="RunAsService_html_68e0fe53.png" NAME="Grafik7" ALIGN=MIDDLE WIDTH=640 HEIGHT=52 BORDER=0></P>
</UL>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><BR>
</P>
diff --git a/BUILD/Help/html/advanced/RunAsService_html_17e8fbfe.png b/BUILD/Help/html/advanced/RunAsService_html_17e8fbfe.png
new file mode 100644
index 00000000..23eb6083
--- /dev/null
+++ b/BUILD/Help/html/advanced/RunAsService_html_17e8fbfe.png
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_4f230a46.jpg b/BUILD/Help/html/advanced/RunAsService_html_4f230a46.jpg
deleted file mode 100644
index df346c8f..00000000
--- a/BUILD/Help/html/advanced/RunAsService_html_4f230a46.jpg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_4f230a46.png b/BUILD/Help/html/advanced/RunAsService_html_4f230a46.png
new file mode 100644
index 00000000..a32a442d
--- /dev/null
+++ b/BUILD/Help/html/advanced/RunAsService_html_4f230a46.png
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_68e0fe53.jpg b/BUILD/Help/html/advanced/RunAsService_html_68e0fe53.jpg
deleted file mode 100644
index 9b0638ba..00000000
--- a/BUILD/Help/html/advanced/RunAsService_html_68e0fe53.jpg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_68e0fe53.png b/BUILD/Help/html/advanced/RunAsService_html_68e0fe53.png
new file mode 100644
index 00000000..5639a21c
--- /dev/null
+++ b/BUILD/Help/html/advanced/RunAsService_html_68e0fe53.png
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_7aa44556.png b/BUILD/Help/html/advanced/RunAsService_html_7aa44556.png
new file mode 100644
index 00000000..b37fe6e4
--- /dev/null
+++ b/BUILD/Help/html/advanced/RunAsService_html_7aa44556.png
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_bf02de4e.png b/BUILD/Help/html/advanced/RunAsService_html_bf02de4e.png
new file mode 100644
index 00000000..2bdac2db
--- /dev/null
+++ b/BUILD/Help/html/advanced/RunAsService_html_bf02de4e.png
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_m3be0f332.jpg b/BUILD/Help/html/advanced/RunAsService_html_m3be0f332.jpg
deleted file mode 100644
index 93e70d1b..00000000
--- a/BUILD/Help/html/advanced/RunAsService_html_m3be0f332.jpg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_m3be0f332.png b/BUILD/Help/html/advanced/RunAsService_html_m3be0f332.png
new file mode 100644
index 00000000..5ad45cfa
--- /dev/null
+++ b/BUILD/Help/html/advanced/RunAsService_html_m3be0f332.png
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_m3e56d901.jpg b/BUILD/Help/html/advanced/RunAsService_html_m3e56d901.jpg
deleted file mode 100644
index e02d95d9..00000000
--- a/BUILD/Help/html/advanced/RunAsService_html_m3e56d901.jpg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/RunAsService_html_m3e56d901.png b/BUILD/Help/html/advanced/RunAsService_html_m3e56d901.png
new file mode 100644
index 00000000..860d1543
--- /dev/null
+++ b/BUILD/Help/html/advanced/RunAsService_html_m3e56d901.png
Binary files differ
diff --git a/BUILD/Help/html/advanced/bf02de4e-7b45-4353-97e8-85b55cff3ac5.jpeg b/BUILD/Help/html/advanced/bf02de4e-7b45-4353-97e8-85b55cff3ac5.jpeg
deleted file mode 100644
index 289665f6..00000000
--- a/BUILD/Help/html/advanced/bf02de4e-7b45-4353-97e8-85b55cff3ac5.jpeg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/ce1ccceb-e3c6-4fab-adac-ef16f36698b0.jpeg b/BUILD/Help/html/advanced/ce1ccceb-e3c6-4fab-adac-ef16f36698b0.jpeg
deleted file mode 100644
index 2508296c..00000000
--- a/BUILD/Help/html/advanced/ce1ccceb-e3c6-4fab-adac-ef16f36698b0.jpeg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Help/html/advanced/f1d462c4-3bd9-4463-a858-ae3de5f6af9e.jpeg b/BUILD/Help/html/advanced/f1d462c4-3bd9-4463-a858-ae3de5f6af9e.jpeg
deleted file mode 100644
index 00b66c40..00000000
--- a/BUILD/Help/html/advanced/f1d462c4-3bd9-4463-a858-ae3de5f6af9e.jpeg
+++ /dev/null
Binary files differ
diff --git a/BUILD/Languages/chinese_simple.lng b/BUILD/Languages/chinese_simple.lng
index eaae2c4a..9898f0ed 100644
--- a/BUILD/Languages/chinese_simple.lng
+++ b/BUILD/Languages/chinese_simple.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y 个对象被成功删除
-%x Byte
+%x Bytes
%x 字节
%x GB
%x GB
@@ -256,6 +256,10 @@ Continue
继续
Conversion error:
转换错误:
+Copy attributes only from left to right
+从左边到右边只复制文件属性
+Copy attributes only from right to left
+从右边到左边只复制文件属性
Copy filesystem permissions
复制文件系统的权限
Copy from left to right
@@ -353,7 +357,7 @@ Donate with PayPal
Download now?
立即下载?
Drag && drop
-拖拽
+拖放
Elements found:
已找到的元素:
Elements processed:
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
两侧都有,右侧较新的文件
Files that have different content
有不同内容的文件
+Files/folders that differ in attributes only
+文件/文件夹仅属性不同
Files/folders that exist on left side only
仅在左侧存在的文件/文件夹
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
要查找什么:
Folder Comparison and Synchronization
文件夹比较与同步
+Folder pairs
+文件夹对
Follow
跟随
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
日志信息:
Logging
记录
+Main bar
+主工具条
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
不支持在WOW64上使用卷影复制. 请使用 FreeFileSync 64位版本.
Match case
匹配大小写
-Minimum Idle Time
-最小空闲时间
+Minimum Idle Time [seconds]
+最小空闲时间[秒]
Mirror ->>
镜像 ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
在GNU通用公共许可下发布:
Question
问题
-Quit
-退出
Re-enable all hidden dialogs?
重新启用所有隐藏的对话框?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
报告翻译错误
Reset
重置
+Reset view
+重置视图
Right
右侧
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
设置方向:
Setting default synchronization directions: Old files will be overwritten with newer files.
设置默认的同步方向:旧文件会被新文件覆盖.
+Show \"%x\"
+显示 \"%x\"
Show conflicts
显示冲突
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
存在不可解决的冲突!
Update ->
升级 ->
+Updating attributes of %x
+更新 %x 的属性
Usage:
用法:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
校验文件 %x
Volume name %x not part of filename %y!
卷名 %x 并非文件名 %y 的一部分!
-Waiting for all directories to become available...
-等待所有目录转为可用状态...
+Waiting for missing directories...
+正在等待丢失的目录...
Waiting while directory is locked (%x)...
由于目录已锁定而正在等待(%x)...
Warning
diff --git a/BUILD/Languages/chinese_traditional.lng b/BUILD/Languages/chinese_traditional.lng
index a8a019a2..fc07f62b 100644
--- a/BUILD/Languages/chinese_traditional.lng
+++ b/BUILD/Languages/chinese_traditional.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y 個物件已删除成功
-%x Byte
-%x Byte
+%x Bytes
+%x 位元組
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
繼續
Conversion error:
轉換錯誤:
+Copy attributes only from left to right
+複製只有從左邊到右邊的屬性
+Copy attributes only from right to left
+複製只有從右邊到左邊的屬性
Copy filesystem permissions
複製檔案系統權限
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
檔案存在於兩邊,右邊檔案較新
Files that have different content
具有不同內容的檔案
+Files/folders that differ in attributes only
+檔案/資料夾只有屬性不同
Files/folders that exist on left side only
只存在於左邊的檔案/資料夾
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
尋找內容:
Folder Comparison and Synchronization
資料夾比對和同步
+Folder pairs
+資料夾對
Follow
跟隨
Free disk space available:
@@ -507,7 +515,7 @@ FreeFileSync 批次檔
FreeFileSync configuration
FreeFileSync 配置
FreeFileSync is up to date!
-FreeFileSync 已是最新版本!
+FreeFileSync 已經是最新版本!
Full path
完整路徑
Generating database...
@@ -606,12 +614,14 @@ Log-messages:
日誌訊息:
Logging
日誌記錄
+Main bar
+主欄位
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
不支援製作 WOW64 上的卷影副本。請使用 FreeFileSync 64位元版本。
Match case
區分大小寫
-Minimum Idle Time
-最小閒置時間
+Minimum Idle Time [seconds]
+最小閒置時間 [秒]
Mirror ->>
鏡像 ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
在GNU通用公共許可證下發佈:
Question
問題
-Quit
-離開
Re-enable all hidden dialogs?
重新啟用所有隱藏的對話框嗎?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
回報翻譯錯誤
Reset
重置
+Reset view
+重置檢視
Right
右邊
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
設定方向:
Setting default synchronization directions: Old files will be overwritten with newer files.
設定預設同步方向:舊檔案會被較新的檔案覆蓋。
+Show \"%x\"
+顯示 \"%x\"
Show conflicts
顯示衝突
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
存在未解決的衝突!
Update ->
更新 ->
+Updating attributes of %x
+更新 %x 個的屬性
Usage:
使用量:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
驗證檔 %x
Volume name %x not part of filename %y!
卷名 %x 並非檔名 %y 的一部份!
-Waiting for all directories to become available...
-等待所有目錄變為可用...
+Waiting for missing directories...
+等待缺少的目錄...
Waiting while directory is locked (%x)...
等待目錄被鎖定(%x)...
Warning
diff --git a/BUILD/Languages/czech.lng b/BUILD/Languages/czech.lng
index 4e9def42..8067567e 100644
--- a/BUILD/Languages/czech.lng
+++ b/BUILD/Languages/czech.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objektů úspěšně smazáno
-%x Byte
-%x Byte
+%x Bytes
+%x B
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
Pokračovat
Conversion error:
Chyba konverze:
+Copy attributes only from left to right
+Kopírovat vlastnosti jen z leva do prava
+Copy attributes only from right to left
+Kopírovat vlastnosti jen z prava do leva
Copy filesystem permissions
Kopírovat oprávnění k souborům
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Soubory, které existují na obou stranách, z nichž vpravo je novější
Files that have different content
Soubory, které mají rozdílný obsah
+Files/folders that differ in attributes only
+Soubory, ketré se liší pouze ve vlastnostech
Files/folders that exist on left side only
Soubory/adresáře, které existují pouze vlevo
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Najít:
Folder Comparison and Synchronization
Porovnání a Synchronizace adresářů
+Folder pairs
+Adresářové páry
Follow
Použít cíl
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Záznamy:
Logging
Zaznamenávání
+Main bar
+Hlavní lišta
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Vytváření stínových kopií na WOW64 není podporováno. Prosím použijte 64 bitovou verzi FreeFileSync.
Match case
Rozlišovat malá a velká písmena
-Minimum Idle Time
-Minimální čas prodlevy
+Minimum Idle Time [seconds]
+Minimální čas prodlevy [v sekundách]
Mirror ->>
Zrcadlení ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Vydáno podle GNU General Public License (GPL):
Question
Otázky
-Quit
-Konec
Re-enable all hidden dialogs?
Znovu povolit skryté dialogy?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Hlásit chyby překladu
Reset
Resetovat
+Reset view
+Výchozí zobrazení
Right
Pravý
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Nastavit adresář:
Setting default synchronization directions: Old files will be overwritten with newer files.
Nastaven výchozí způsob synchronizace: Staré soubory budou nahrazeny novými.
+Show \"%x\"
+Zobrazit \"%x\"
Show conflicts
Zobrazit konflikty
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Nevyřešené konflikty!
Update ->
Aktualizuj ->
+Updating attributes of %x
+Aktualizace atributů souboru %x
Usage:
Použití:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Kontroluji soubor %x
Volume name %x not part of filename %y!
Disk %x není součástí jména souboru %y!
-Waiting for all directories to become available...
-Čekání na zpřístupnění všech adresářů...
+Waiting for missing directories...
+Čekání na nedostupné adresáře...
Waiting while directory is locked (%x)...
Čekání na uzamčení adresáře (%x)
Warning
diff --git a/BUILD/Languages/dutch.lng b/BUILD/Languages/dutch.lng
index 5e1d3499..bbd949a5 100644
--- a/BUILD/Languages/dutch.lng
+++ b/BUILD/Languages/dutch.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objecten succesvol verwijderd
-%x Byte
-%x Byte
+%x Bytes
+%x Bytes
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
Doorgaan
Conversion error:
Fout bij het converteren:
+Copy attributes only from left to right
+Kopieer attributen alleen van links naar rechts
+Copy attributes only from right to left
+Kopieer attributen alleen van rechts naar links
Copy filesystem permissions
Kopieer bestandsmachtigingen
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Bestanden die aan beide kanten bestaan, maar waarvan de rechterkant nieuwer is
Files that have different content
Bestanden dat andere inhoud hebben
+Files/folders that differ in attributes only
+Alleen bestanden/mappen die anders zijn dan attributen
Files/folders that exist on left side only
Bestanden/mappen die alleen aan de linkerkant bestaan
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Vind wat:
Folder Comparison and Synchronization
Mappen vergelijken en synchroniseren
+Folder pairs
+Paren mappen
Follow
Volg
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Logberichten:
Logging
Loggen
+Main bar
+Hoofdbalk
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Schaduw kopieen op WOW64 worden niet ondersteund. Gebruik alstublieft de 64-bit versie van FreeFileSync.
Match case
Hoofdlettergevoelig
-Minimum Idle Time
-Minimale Inactieve Tijd
+Minimum Idle Time [seconds]
+Minimale inactieve tijd [seconden]
Mirror ->>
Spiegelen ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Gepubliceerd onder de GNU General Public License:
Question
Vraag
-Quit
-Afsluiten
Re-enable all hidden dialogs?
Herstellen van alle verborgen dialogen?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Rapporteer een fout in de vertaling
Reset
Reset
+Reset view
+Scherm resetten
Right
Rechts
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Selecteer map:
Setting default synchronization directions: Old files will be overwritten with newer files.
Instellingen worden veranderd naar standaard instellingen: Oude bestanden worden overschreven naar nieuwere bestanden.
+Show \"%x\"
+Laat \"%x\" zien
Show conflicts
Geef conflicten weer
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Er bestaan onopgeloste conflicten!
Update ->
Overschrijven ->
+Updating attributes of %x
+Attributen updaten van %x
Usage:
Gebruik:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Verifiëren bestand %x
Volume name %x not part of filename %y!
Volume naam %x maakt niet deel uit van bestandsnaam %y!
-Waiting for all directories to become available...
-Wachten op alle mappen....
+Waiting for missing directories...
+Wachten op de missende mappen...
Waiting while directory is locked (%x)...
Wachten totdat map is beveiligd (%x)...
Warning
diff --git a/BUILD/Languages/english_uk.lng b/BUILD/Languages/english_uk.lng
index 60b3f04c..5144a57b 100644
--- a/BUILD/Languages/english_uk.lng
+++ b/BUILD/Languages/english_uk.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objects deleted successfully
-%x Byte
-%x Byte
+%x Bytes
+%x Bytes
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
Continue
Conversion error:
Conversion error:
+Copy attributes only from left to right
+Copy attributes only from left to right
+Copy attributes only from right to left
+Copy attributes only from right to left
Copy filesystem permissions
Copy filesystem permissions
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Files that exist on both sides, right one is newer
Files that have different content
Files that have different content
+Files/folders that differ in attributes only
+Files/folders that differ in attributes only
Files/folders that exist on left side only
Files/folders that exist on left side only
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Find what:
Folder Comparison and Synchronization
Folder Comparison and Synchronisation
+Folder pairs
+Folder pairs
Follow
Follow
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Log-messages:
Logging
Logging
+Main bar
+Main bar
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Match case
Match case
-Minimum Idle Time
-Minimum Idle Time
+Minimum Idle Time [seconds]
+Minimum Idle Time [seconds]
Mirror ->>
Mirror ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Published under the GNU General Public Licence:
Question
Question
-Quit
-Quit
Re-enable all hidden dialogs?
Re-enable all hidden dialogues?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Report translation error
Reset
Reset
+Reset view
+Reset view
Right
Right
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Set direction:
Setting default synchronization directions: Old files will be overwritten with newer files.
Setting default synchronisation directions: Old files will be overwritten with newer files.
+Show \"%x\"
+Show \"%x\"
Show conflicts
Show conflicts
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Unresolved conflicts existing!
Update ->
Update ->
+Updating attributes of %x
+Updating attributes of %x
Usage:
Usage:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Verifying file %x
Volume name %x not part of filename %y!
Volume name %x not part of filename %y!
-Waiting for all directories to become available...
-Waiting for all directories to become available...
+Waiting for missing directories...
+Waiting for missing directories...
Waiting while directory is locked (%x)...
Waiting while directory is locked (%x)...
Warning
diff --git a/BUILD/Languages/finnish.lng b/BUILD/Languages/finnish.lng
index ca642e15..314d0baf 100644
--- a/BUILD/Languages/finnish.lng
+++ b/BUILD/Languages/finnish.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI Framework\n wxFormBuilder\t- wxWidgets GUI-Builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y Kohteiden poisto onnistui
-%x Byte
-%x Tavua
+%x Bytes
+%x tavua
%x GB
%x GB
%x MB
@@ -17,7 +17,7 @@
%x directories
%x hakemistoa
%x files
-%x tiedostoista
+%x tiedostoa
%x hour(s)
%x tunti(a)
%x kB
@@ -27,7 +27,7 @@
%x of %y rows in view
%x riviä %y rivistä näytössä
%x of 1 row in view
-%x 1 rivistä näytössä
+%x 1:tä rivistä näytössä
%x sec
%x s
%x%
@@ -256,6 +256,10 @@ Continue
Jatka
Conversion error:
Konversio virhe:
+Copy attributes only from left to right
+Monista vain ominaisuudet vasen -> oikea
+Copy attributes only from right to left
+Monista vain ominaisuudet oikea -> vasen
Copy filesystem permissions
Monista tiedosto-oikeudet
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Tiedosto löytyy molemmilla puolilla, oikea on uudempi
Files that have different content
Tiedostoja joissa eri sisältö
+Files/folders that differ in attributes only
+Tiedostoja/hakemistoja poikkeama vain ominaisuuksissa
Files/folders that exist on left side only
Tiedostoja/hakemistoja vain vasemmalla
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Etsi:
Folder Comparison and Synchronization
Hakemistojen vertailu ja täsmäytys
+Folder pairs
+Hakemistoparit
Follow
Seuraa
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Lokin viestit:
Logging
Kirjaa
+Main bar
+Päävalikko
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
WOW64 varjokopiointia ei tueta. Käytä FreeFileSync 64-bittistä versiota.
Match case
Täsmää kirjainkoko
-Minimum Idle Time
-Min. joutoaika
+Minimum Idle Time [seconds]
+Minimi joutoaika [sekuntteja]
Mirror ->>
Peilaava ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Julkaistu lisenssillä GNU General Public License:
Question
Kysymys
-Quit
-Lopeta
Re-enable all hidden dialogs?
Ota uudestaan käyttöön piilotetut?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Ilmoita käännösvirheestä
Reset
Palauta
+Reset view
+Palauta näkymä
Right
Oikea
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Aseta suunta:
Setting default synchronization directions: Old files will be overwritten with newer files.
Aseta oletu suunta täsmäytykselle: Vanhat tiedostot ylikirjoitetaan uudemilla tiedostoilla.
+Show \"%x\"
+Näytä \"%x\"
Show conflicts
Näytä ristiriidat
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Ratkaisemattomia poikkeamia!
Update ->
Päivittävä ->
+Updating attributes of %x
+Päivita %x:n ominaisuudet
Usage:
Käyttöaste:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Tarkistan tiedosto %x
Volume name %x not part of filename %y!
Osan nimi %x ei esiinny tiedostonimessä %y!
-Waiting for all directories to become available...
-Odotan että kaikki hakemistot ovat saatavilla ...
+Waiting for missing directories...
+Odottaa puuttuvia hakemistoja...
Waiting while directory is locked (%x)...
Odotan hakemiston lukitusta (%x)...
Warning
diff --git a/BUILD/Languages/french.lng b/BUILD/Languages/french.lng
index 7703cbe5..132225fb 100644
--- a/BUILD/Languages/french.lng
+++ b/BUILD/Languages/french.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port de la GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objets supprimés avec succès
-%x Byte
+%x Bytes
%x Octets
%x GB
%x Go
@@ -256,6 +256,10 @@ Continue
Continuer
Conversion error:
Erreur de conversion :
+Copy attributes only from left to right
+Copier uniquement les attributs de gauche à droite
+Copy attributes only from right to left
+Copier uniquement les attributs de droite à gauche
Copy filesystem permissions
Copie des attributs de fichiers
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Fichiers existants des deux côtés, celui de droite est plus récent
Files that have different content
Fichiers ayant un contenu différent
+Files/folders that differ in attributes only
+Fichiers/Dossiers dont seuls les attributs diffèrent
Files/folders that exist on left side only
Fichiers/répertoires existant seulement à gauche
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Chercher cela :
Folder Comparison and Synchronization
Comparaison de dossiers et Synchronisation
+Folder pairs
+Paires de dossiers
Follow
Suivre
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Messages log :
Logging
Connexion
+Main bar
+Barre principale
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
La copie en tâche de fond sur WOW64 n'est pas possible. Utilisez pour cela la version 64 bits de FreeFileSync.
Match case
Respecter la casse
-Minimum Idle Time
-Temps mort minimum
+Minimum Idle Time [seconds]
+Délai minimum (secondes)
Mirror ->>
Miroir ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Publié sous licence GNU General Public License :
Question
Question
-Quit
-Quitter
Re-enable all hidden dialogs?
Réactiver les boîtes de dialogues masquées ?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Etat des erreurs de transfert
Reset
Réinitialiser
+Reset view
+Réinitialiser la vue
Right
Droite
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Choix de la direction :
Setting default synchronization directions: Old files will be overwritten with newer files.
Directions de la synchronisation par défaut : les anciens fichiers seront remplacés par les nouveaux.
+Show \"%x\"
+Afficher \"%x\"
Show conflicts
Afficher les conflits
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Il y a des conflits non résolus !
Update ->
Mise à Jour ->
+Updating attributes of %x
+Mise à jour des attributs de %x
Usage:
Utilisation :
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Contrôle du fichier %x
Volume name %x not part of filename %y!
Le nom de volume %x ne fait pas partie du nom de fichier %y !
-Waiting for all directories to become available...
-En attente de la disponibilité de tous les répertoires...
+Waiting for missing directories...
+En attente des répertoires absents ...
Waiting while directory is locked (%x)...
En attente tant que le répertoire est verrouillé (%x)...
Warning
diff --git a/BUILD/Languages/german.lng b/BUILD/Languages/german.lng
index 20e752ae..7fbeb87c 100644
--- a/BUILD/Languages/german.lng
+++ b/BUILD/Languages/german.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI Framework\n wxFormBuilder\t- wxWidgets GUI-Builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x von %y Objekten erfolgreich gelöscht
-%x Byte
-%x Byte
+%x Bytes
+%x Bytes
%x GB
%x GB
%x MB
@@ -154,6 +154,8 @@ Konfiguration &laden...
<Symlink>
<multiple selection>
<Mehrfachauswahl>
+A directory will be modified which is part of multiple folder pairs! Please review synchronization settings!
+Es wird ein Verzeichnis verändert werden, das Teil mehrerer Verzeichnispaare ist! Bitte die Synchronisationseinstellungen prüfen!
A newer version of FreeFileSync is available:
Eine neuere Version von FreeFileSync ist verfügbar:
Abort requested: Waiting for current operation to finish...
@@ -256,6 +258,10 @@ Continue
Fortfahren
Conversion error:
Fehler bei Konvertierung:
+Copy attributes only from left to right
+Nur Attribute von links nach rechts kopieren
+Copy attributes only from right to left
+Nur Attribute von rechts nach links kopieren
Copy filesystem permissions
Dateisystemberechtigungen kopieren
Copy from left to right
@@ -472,6 +478,8 @@ Files that exist on both sides, right one is newer
Auf beiden Seiten existierende Dateien; rechte Datei ist neuer
Files that have different content
Dateien mit verschiedenem Inhalt
+Files/folders that differ in attributes only
+Dateien/Verzeichnisse mit unterschiedlichen Attributen
Files/folders that exist on left side only
Nur links exisitierende Dateien/Verzeichnisse
Files/folders that exist on right side only
@@ -494,6 +502,8 @@ Find what:
Suchen nach:
Folder Comparison and Synchronization
Verzeichnisvergleich und Synchronisation
+Folder pairs
+Verzeichnispaare
Follow
Folgen
Free disk space available:
@@ -606,12 +616,14 @@ Log-messages:
Meldungen:
Logging
Protokoll
+Main bar
+Hauptleiste
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Das Erstellen von Schattenkopien unter WOW64 wird nicht unterstützt. Bitte benutzen Sie die FreeFileSync 64-Bit Version.
Match case
Groß-/Kleinschreibung
-Minimum Idle Time
-Minimale Ruhezeit
+Minimum Idle Time [seconds]
+Minimale Ruhezeit [Sekunden]
Mirror ->>
Spiegeln ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +698,6 @@ Published under the GNU General Public License:
Veröffentlicht unter der GNU General Public License:
Question
Frage
-Quit
-Beenden
Re-enable all hidden dialogs?
Alle versteckten Dialoge wieder anzeigen?
RealtimeSync - Automated Synchronization
@@ -708,6 +718,8 @@ Report translation error
Übersetzungsfehler melden
Reset
Zurücksetzen
+Reset view
+Ansicht zurücksetzen
Right
Rechts
S&ave configuration...
@@ -734,6 +746,8 @@ Set direction:
Setze Richtung:
Setting default synchronization directions: Old files will be overwritten with newer files.
Setze Standardwerte für Synchronisationsrichtungen: Alte Dateien werden durch neuere überschrieben.
+Show \"%x\"
+Zeige \"%x\"
Show conflicts
Konflikte zeigen
Show files that are different
@@ -801,7 +815,7 @@ Behandlung Symbolischer Links
Symlinks %x have the same date but a different target!
Die Symbolischen Links %x haben dasselbe Datum, aber ein unterschiedliches Ziel!
Synchronization Preview
-Vorschau auf Synchronisation
+Synchronisationsvorschau
Synchronization aborted!
Synchronisation abgebrochen!
Synchronization completed successfully!
@@ -852,6 +866,8 @@ Unresolved conflicts existing!
Es existieren ungelöste Konflikte!
Update ->
Aktualisieren ->
+Updating attributes of %x
+Aktualisiere Attribute von %x
Usage:
Verwendung:
Use Recycle Bin
@@ -868,8 +884,8 @@ Verifying file %x
Verifiziere Datei %x
Volume name %x not part of filename %y!
Laufwerksname %x ist kein Teil des Dateinamens %y!
-Waiting for all directories to become available...
-Warte, bis alle Verzeichnisse verfügbar sind...
+Waiting for missing directories...
+Warte auf fehlende Verzeichnisse...
Waiting while directory is locked (%x)...
Warte während Verzeichnis gesperrt ist (%x)...
Warning
diff --git a/BUILD/Languages/greek.lng b/BUILD/Languages/greek.lng
new file mode 100644
index 00000000..b3584f1f
--- /dev/null
+++ b/BUILD/Languages/greek.lng
@@ -0,0 +1,906 @@
+ MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
+ MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
+%x / %y objects deleted successfully
+%x / %y objets supprimés avec succès
+%x Bytes
+%x Bytes
+%x GB
+%x GB
+%x MB
+%x MB
+%x PB
+%x PB
+%x TB
+%x TB
+%x day(s)
+%x ημέρα/ημέρες
+%x directories
+%x υποκατάλογοι
+%x files
+%x αρχεία
+%x hour(s)
+%x ώρα/ώρες
+%x kB
+%x kB
+%x min
+%x λεπτό/λεπτά
+%x of %y rows in view
+%x από τις %y φανερές γραμμές
+%x of 1 row in view
+%x από τη 1 φανερή γραμμή
+%x sec
+%x δ/λεπτα
+%x%
+%x%
+&Abort
+&Άκυρο
+&About...
+&Σχετικά...
+&Advanced
+&Για προχωρημένους
+&Cancel
+&Άκυρο
+&Check for new version
+&Έλεγχος για νέα έκδοση
+&Content
+&Περιεχόμενα
+&Create batch job...
+&Δημιουργία μιας δέσμης ενεργειών...
+&Default
+&Προεπιλογή
+&Exit
+&Έξοδος
+&Export file list...
+&Εξαγωγή καταλόγου αρχείων...
+&File
+&Αρχείο
+&Find next
+&Εύρεση επομένου
+&Global settings...
+&Γενικές ρυθμίσεις...
+&Help
+&Βοήθεια
+&Ignore
+&Παράβλεψη
+&Language
+&Γλώσσα
+&Load
+&Άνοιγμα
+&Load configuration...
+&Άνοιγμα διάταξης...
+&New
+&Δημιουργία
+&No
+&Όχι
+&OK
+&OK
+&Pause
+&Παύση
+&Program
+&Πρόγραμμα
+&Quit
+&Έξοδος
+&Restore
+&Επαναφορά
+&Retry
+&Επανάληψη
+&Save
+&Αποθήκευση
+&Switch
+&Εναλλαγή
+&Yes
+&Ναι
+(Build: %x)
+(Δημιουργήθηκε : %x)
+(Requires an Internet connection!)
+(Απαιτεί σύνδεση με το Internet)
+- Other side's counterpart to %dir
+- Ο αντίστοιχος %dir της άλλης πλευράς
+- Other side's counterpart to %name
+- Το αντίστοιχο %name της άλλης πλευράς
+- conflict
+- διένεξη
+- conflict (same date, different size)
+- διένεξη (ίδια ημερομηνία, διαφορετικό μέγεθος)
+- different
+- διαφορετικά
+- directory part only
+- μόνο τους υποκαταλόγους
+- equal
+- ίδια
+- exists left only
+- υπάρχει μόνο στα αριστερά
+- exists right only
+- υπάρχει μόνο στα δεξιά
+- full file or directory name
+- πλήρες όνομα του αρχείου ή υποκαταλόγου
+- left
+- αριστερά
+- left newer
+- αριστερά πιο πρόσφατο
+- right
+- δεξιά
+- right newer
+- δεξιά πιο πρόσφατο
+/sec
+/δευτερόλεπτο
+1 directory
+1 υποκατάλογος
+1 file
+1 αρχείο
+1. &Compare
+1. &Σύγκριση
+1. Enter relative file or directory names separated by ';' or a new line.
+1. Εισάγετε τα σχετικά ονόματα των αρχείων ή των υποκαταλόγων χωρισμένα με ';' ή με αλλαγή γραμμής.
+1. Select directories to monitor.
+1. Επιλέξτε τους υποκαταλόγους που θα παρακολουθούνται.
+2. &Synchronize...
+2. &Συγχρονισμός...
+2. Enter a command line.
+2. Εισάγετε μια γραμμή εντολών.
+2. Use wildcard characters '*' and '?'.
+2. Μπορείτε να χρησιμοποιήσετε τους χαρακτήρες-μπαλαντέρ '*' και '?'.
+3. Exclude files directly on main grid via context menu.
+3. Μπορείτε να εξαιρέσετε αρχεία στη βασική οθόνη κάνοντας δεξί κλικ.
+3. Press 'Start'.
+3. Πατήστε το 'Έναρξη'.
+<Automatic>
+<Αυτόματα>
+<Directory>
+<Υποκατάλογος>
+<Last session>
+<Τελευταία χρήση>
+<Symlink>
+<Συμβολικός δεσμός>
+<multiple selection>
+<πολλαπλή επιλογή>
+A newer version of FreeFileSync is available:
+Μια νεότερη έκδοση του FreeFileSync είναι διαθέσιμη:
+Abort requested: Waiting for current operation to finish...
+Ζητήθηκε ματαίωση: Αναμονή για την λήξη της τρέχουσας εργασίας...
+Abort synchronization immediately
+Άμεση ματαίωση του συγχρονισμού
+Aborted
+Ματαιώθηκε
+About
+Σχετικά με
+Action
+Ενέργεια
+Add folder
+Προσθήκη υποκαταλόγου
+Add folder pair
+Προσθήκη ζεύγους υποκαταλόγων
+All directories in sync!
+Όλοι οι υποκατάλογοι είναι συγχρονισμένοι!
+An exception occurred!
+Παρουσιάστηκε σφάλμα!
+As a result the files are separated into the following categories:
+Ως αποτέλεσμα, τα αρχεία χωρίζονται στις εξής κατηγορίες:
+As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller:
+Όπως λέει και ο τίτλος, δύο αρχεία που έχουν το ίδιο όνομα θεωρούνται ίδια μόνο και μόνον εάν έχουν το ίδιο περιεχόμενο. Αυτή η επιλογή είναι χρήσιμη για έλεγχο αξιοπιστίας παρά για αντίγραφα ασφαλείας. Επομένως οι ημερομηνίες των αρχείων δε λαμβάνονται υπόψη καθόλου.\n\nΜε αυτήν την επιλογή το δένδρο απόφασης είναι μικρότερο:
+Assemble a batch file for automated synchronization. To start in batch mode simply pass the name of the file to the FreeFileSync executable: FreeFileSync.exe <batchfile>. This can also be scheduled in your operating system's task planner.
+Δημιουργία ενός αρχείου δέσμης ενεργειών για αυτόματο συγχρονισμό. Για την έναρξη σε λειτουργία δέσμης, δώστε το όνομα του αρχείου στο εκτελέσιμο του FreeFileSync: FreeFileSync.exe <αρχείο δέσμης>. Αυτή η λειτουργία μπορεί να προγραμματιστεί και στο χρονοδιάγραμμα εργασιών του λειτουργικού σας συστήματος.
+At least one directory input field is empty.
+Τουλάχιστον ένα από πεδία εισόδου είναι κενό.
+Auto-adjust columns
+Αυτόματη προσαρμογή των στηλών
+Batch execution
+Εκτέλεση δέσμης ενεργειών
+Batch file created successfully!
+Το αρχείο δέσμης ενεργειών δημιουργήθηκε επιτυχώς!
+Batch job
+Δέσμη ενεργειών
+Big thanks for localizing FreeFileSync goes out to:
+Για τις μεταφράσεις του FreeFileSync, ευχαριστούμε τους:
+Both sides have changed since last synchronization!
+Και οι δυο πλευρές έχουν αλλάξει από τον τελευταίο συγχρονισμό!
+Browse
+Αναζήτηση
+Browse directory
+Αναζήτηση υποκαταλόγου
+Cannot determine sync-direction:
+Δεν μπορεί να προσδιοριστεί η κατεύθυνση συγχρονισμού:
+Cannot find %x
+Δεν μπορεί να βρεθεί το %x
+Category
+Κατηγορία
+Clear filter settings
+Διαγραφή όλων των επιλογών φίλτρου
+Comma separated list
+Κατάλογος οριοθετημένος με κόμματα
+Command line
+Γραμμή εντολών
+Command line is empty!
+Η γραμμή εντολών είναι κενή!
+Compare
+Σύγκριση
+Compare both sides
+Σύγκριση των δύο πλευρών
+Compare by \"File content\"
+Σύγκριση με βάση το \"Περιεχόμενο αρχείων\"
+Compare by \"File size and date\"
+Σύγκριση με βάση το \"Μέγεθος και Ημερομηνία αρχείων\"
+Compare by...
+Σύγκριση με βάση το...
+Comparing content of files %x
+Σύγκριση του περιεχομένου των αρχείων %x
+Comparing content...
+Σύγκριση του περιεχομένου...
+Comparing files by content failed.
+Η σύγκριση του περιεχομένου των αρχείων απέτυχε.
+Comparison Result
+Αποτέλεσμα της σύγκρισης
+Comparison settings
+Ρυθμίσεις σύγκρισης
+Completed
+Ολοκληρώθηκε
+Configuration
+Διάταξη
+Configuration loaded!
+Η διάταξη έχει ανοιχθεί!
+Configuration overview:
+Σύνοψη της διάταξης:
+Configuration saved!
+Η διάταξη αποθηκεύτηκε!
+Configure filter
+Ρύθμιση του φίλτρου
+Configure your own synchronization rules.
+Ορίστε τους δικούς σας κανόνες συγχρονισμού.
+Confirm
+Επιβεβαίωση
+Conflict detected:
+Ανιχνεύθηκε διένεξη:
+Conflicts/files that cannot be categorized
+Διενέξεις/αρχεία που δεν μπορούν να κατηγοριοποιηθούν
+Continue
+Συνέχεια
+Conversion error:
+Σφάλμα μετατροπής:
+Copy attributes only from left to right
+Αντιγραφή των χαρακτηριστικών αρχείου μόνο από τα αριστερά προς τα δεξιά
+Copy attributes only from right to left
+Αντιγραφή των χαρακτηριστικών αρχείου μόνο από τα δεξιά προς τα αριστερά
+Copy filesystem permissions
+Αντιγραφή των αδειών των αρχείων
+Copy from left to right
+Αντιγραφή από τα αριστερά προς τα δεξιά
+Copy from left to right overwriting
+Αντιγραφή από τα αριστερά προς τα δεξιά με αντικατάσταση
+Copy from right to left
+Αντιγραφή από τα δεξιά προς τα αριστερά
+Copy from right to left overwriting
+Αντιγραφή από τα δεξιά προς τα αριστερά με αντικατάσταση
+Copy locked files
+Αντιγραφή κλειδωμένων αρχείων
+Copy new or updated files to right folder.
+Αντιγραφή των νέων ή πιο πρόσφατων αρχείων στον υποκατάλογο δεξιά.
+Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights)
+Αντιγραφή κλειδωμένων ή διαμοιρασμένων αρχείων με την υπηρεσία Volume Shadow Copy\n(απαιτεί δικαιώματα Administrator)
+Copy to clipboard\tCTRL+C
+Αντιγραφή στο πρόχειρο\tCTRL+C
+Copying new Symbolic Link %x to %y
+Αντιγραφή του νέου Συμβολικού Δεσμού %x στο %y
+Copying new file %x to %y
+Αντιγραφή του νέου αρχείου %x στο %y
+Could not determine volume name for file:
+Δεν ήταν δυνατό να προσδιοριστεί το όνομα τόμου για το αρχείο:
+Could not initialize directory monitoring:
+Δεν ήταν δυνατό να γίνει έναρξη παρακολούθησης του υποκαταλόγου:
+Could not load a required DLL:
+Δεν φορτώθηκε μια απαιτούμενη βιβλιοθήκη DLL:
+Could not read values for the following XML nodes:
+Δεν αναγνώστηκαν τιμές για τους ακόλουθους κόμβους XML:
+Create a batch job
+Δημιουργία μιας δέσμης ενεργειών
+Creating folder %x
+Δημιουργία του υποκαταλόγου %x
+Custom
+Εξατομίκευση
+Customize columns
+Εξατομίκευση στηλών
+Customize...
+Εξατομίκευση...
+D-Click
+Διπλό κλικ
+DECISION TREE
+ΔΕΝΔΡΟ ΑΠΟΦΑΣΗΣ
+Data verification error: Source and target file have different content!
+Σφάλμα επικύρωσης δεδομένων: Τα αρχεία προέλευσης και προορισμού έχουν διαφορετικό περιεχόμενο!
+Date
+Ημερομηνία
+Delete files/folders existing on left side only
+Διαγραφή των αρχείων/υποκαταλόγων που υπάρχουν μόνο στα αριστερά
+Delete files/folders existing on right side only
+Διαγραφή των αρχείων/υποκαταλόγων που υπάρχουν μόνο στα δεξιά
+Delete files\tDEL
+Διαγραφή αρχείων\tDEL
+Delete on both sides
+Διαγραφή και στις δυο πλευρές
+Delete on both sides even if the file is selected on one side only
+Διαγραφή και στις δυο πλευρές, ακόμα κι αν το αρχείο έχει επιλεχθεί μόνο στη μια πλευρά
+Delete or overwrite files permanently
+Μόνιμη διαγραφή ή αντικατάσταση των αρχείων
+Delete permanently
+Μόνιμη διαγραφή
+Deleting Symbolic Link %x
+Διαγραφή του Συμβολικού Δεσμού %x
+Deleting file %x
+Διαγραφή του αρχείου %x
+Deleting folder %x
+Διαγραφή του υποκαταλόγου %x
+Deletion handling
+Διαχείριση των διαγραφών
+Description
+Περιγραφή
+Direct
+Ως δεσμό
+Directories are dependent! Be careful when setting up synchronization rules:
+Οι υποκατάλογοι είναι εξαρτώμενοι. Προσοχή κατά την εισαγωγή των κανόνων συγχρονισμού:
+Directories to watch
+Υποκατάλογοι για παρακολούθηση
+Directory
+Υποκατάλογος
+Directory does not exist:
+Ο υποκατάλογος δεν υπάρχει:
+Do not show this dialog again
+Να μην εμφανιστεί ξανά αυτό το μήνυμα
+Do nothing
+Καμία ενέργεια
+Do you really want to delete the following object(s)?
+Είστε σίγουροι ότι θέλετε να διαγράψετε τα ακόλουθα στοιχεία;
+Do you really want to move the following object(s) to the Recycle Bin?
+Είστε σίγουροι ότι θέλετε να μεταφέρετε τα ακόλουθα στοιχεία στον Κάδο Ανακύκλωσης;
+Do you want FreeFileSync to automatically check for updates every week?
+Θέλετε το FreeFileSync να ελέγχει αυτόματα για ενημερώσεις κάθε εβδομάδα;
+Donate with PayPal
+Κάντε μια δωρεά μέσω PayPal
+Download now?
+Λήψη τώρα;
+Drag && drop
+Μεταφορά && Απόθεση
+Elements found:
+Βρέθηκαν στοιχεία:
+Elements processed:
+Επεξεργάστηκαν στοιχεία:
+Elements remaining:
+Περισσεύουν στοιχεία:
+Email
+Email
+Encoding extended time information: %x
+Κωδικοποίηση εκτεταμένων πληροφοριών για την ώρα: %x
+Endless loop when traversing directory:
+Ατέρμονος βρόχος κατά την την ανάλυση του υποκαταλόγου:
+Error
+Σφάλμα
+Error changing modification time:
+Σφάλμα κατά την αλλαγή της ώρας τροποποίησης:
+Error copying file permissions:
+Σφάλμα κατά την αντιγραφή των αδειών των αρχείων:
+Error copying file:
+Σφάλμα κατά την αντιγραφή του αρχείου:
+Error copying locked file %x!
+Σφάλμα κατά την αντιγραφή του κλειδωμένου αρχείου %x !
+Error copying symbolic link:
+Σφάλμα κατά την αντιγραφή του συμβολικού δεσμού:
+Error creating directory:
+Σφάλμα κατά τη δημιουργία του υποκαταλόγου:
+Error deleting directory:
+Σφάλμα κατά τη διαγραφή του υποκαταλόγου:
+Error deleting file:
+Σφάλμα κατά τη διαγραφή του αρχείου:
+Error handling
+Διαχείριση σφαλμάτων
+Error loading library function:
+Σφάλμα κατά τη φόρτωση της συνάρτησης βιβλιοθήκης:
+Error moving directory:
+Σφάλμα κατά τη μεταφορά του υποκαταλόγου:
+Error moving file:
+Σφάλμα κατά τη μεταφορά του αρχείου:
+Error moving to Recycle Bin:
+Σφάλμα κατά τη μεταφορά στον Κάδο Ανακύκλωσης:
+Error opening file:
+Σφάλμα κατά το άνοιγμα του αρχείου:
+Error parsing configuration file:
+Σφάλμα κατά την ανάλυση του αρχείου διάταξης:
+Error reading file attributes:
+Σφάλμα κατά την ανάγνωση των χαρακτηριστικών του αρχείου:
+Error reading file:
+Σφάλμα κατά την ανάγνωση του αρχείου:
+Error reading from synchronization database:
+Σφάλμα κατά την ανάγνωση από τη βάση δεδομένων συγχρονισμού:
+Error reading security context:
+Σφάλμα κατά την ανάγνωση του πλαισίου ασφαλείας:
+Error resolving symbolic link:
+Σφάλμα κατά την επίλυση του συμβολικού δεσμού:
+Error setting directory lock:
+Σφάλμα κατά το κλείδωμα του υποκαταλόγου:
+Error setting privilege:
+Σφάλμα κατά τον ορισμό δικαιωμάτων:
+Error starting Volume Shadow Copy Service!
+Σφάλμα κατά την έναρξη της υπηρεσίας Volume Shadow Copy!
+Error traversing directory:
+Σφάλμα κατά την ανάλυση του υποκαταλόγου:
+Error when monitoring directories.
+Σφάλμα κατά την παρακολούθηση υποκαταλόγων.
+Error writing file:
+Σφάλμα κατά την εγγραφή του αρχείου:
+Error writing security context:
+Σφάλμα κατά την εγγραφή του πλαισίου ασφάλειας:
+Error writing to synchronization database:
+Σφάλμα κατά την εγγραφή στη βάση δεδομένων συγχρονισμού:
+Example
+Παράδειγμα
+Exclude
+Εξαίρεση
+Exclude all rows
+Εξαίρεση όλων των γραμμών
+Exclude temporarily
+Προσωρινή εξαίρεση
+Exclude via filter:
+Εξαίρεση με βάση το φίλτρο:
+Exit instantly
+Άμεση έξοδος
+Extension
+Επέκταση
+External applications
+Εξωτερικές εφαρμογές
+Fatal Error
+Σημαντικό Σφάλμα
+Feedback and suggestions are welcome at:
+Σχόλια και προτάσεις είναι ευπρόσδεκτα στα:
+File %x has an invalid date!
+Το αρχείο %x δεν έχει έγκυρη ημερομηνία!
+File already exists. Overwrite?
+Το αρχείο υπάρχει ήδη. Να αντικατασταθεί;
+File content
+Περιεχόμενο αρχείων
+File does not exist:
+Το αρχείο δεν υπάρχει:
+File list exported!
+Ο κατάλογος των αρχείων έχει εξαχθεί!
+File size and date
+Μέγεθος και ημερομηνία αρχείων
+Filename
+Όνομα αρχείου
+Files %x have the same date but a different size!
+Τα αρχεία %x έχουν την ίδια ημερομηνία αλλά διαφορετικό μέγεθος!
+Files are found equal if\n - file content\nis the same
+Τα αρχεία θεωρούνται ίδια, εάν\n - το περιεχόμενό τους\nείναι ίδιο.
+Files are found equal if\n - filesize\n - last write time and date\nare the same
+Τα αρχεία θεωρούνται ίδια, εάν\n - το μέγεθός τους\n - η ημερομηνία και ώρα τελευταίας τροποποίησης\nείναι ίδια.
+Files that are equal on both sides
+Αρχεία ίδια και στις δυο πλευρές
+Files that exist on both sides, left one is newer
+Αρχεία που υπάρχουν και στις δυο πλευρές, αριστερά είναι πιο πρόσφατα
+Files that exist on both sides, right one is newer
+Αρχεία που υπάρχουν και στις δυο πλευρές, δεξιά είναι πιο πρόσφατα
+Files that have different content
+Αρχεία που έχουν διαφορετικό περιεχόμενο
+Files/folders that differ in attributes only
+Αρχεία/υποκατάλογοι που διαφέρουν μόνο στα χαρακτηριστικά αρχείου
+Files/folders that exist on left side only
+Αρχεία/υποκατάλογοι που υπάρχουν μόνο στα αριστερά
+Files/folders that exist on right side only
+Αρχεία/υποκατάλογοι που υπάρχουν μόνο στα δεξιά
+Filter files
+Φιλτράρισμα
+Filter is active
+Το φίλτρο είναι ενεργό
+Filter settings have changed!
+Οι ρυθμίσεις φίλτρου έχουν αλλάξει!
+Filter view
+Επιλογή εμφάνισης
+Filter: All pairs
+Φίλτρο: Όλα τα ζεύγη
+Filter: Single pair
+Φίλτρο: Ένα ζεύγος
+Find
+Αναζήτηση
+Find what:
+Αναζήτηση του:
+Folder Comparison and Synchronization
+Σύγκριση υποκαταλόγων και Συγχρονισμός
+Folder pairs
+Ζεύγη υποκαταλόγων
+Follow
+Ως περιεχόμενο
+Free disk space available:
+Espace disque disponible :
+FreeFileSync Batch Job
+FreeFileSync Δέσμη Ενεργειών
+FreeFileSync at Sourceforge
+Το FreeFileSync στο Sourceforge
+FreeFileSync batch file
+FreeFileSync αρχείο δέσμης
+FreeFileSync configuration
+Αρχείο διάταξης FreeFileSync
+FreeFileSync is up to date!
+Το FreeFileSync είναι ενημερωμένο!
+Full path
+Πλήρης διαδρομή
+Generating database...
+Δημιουργία βάσης δεδομένων...
+Generating file list...
+Δημιουργία καταλόγου αρχείων...
+Global settings
+Γενικές ρυθμίσεις
+Help
+Βοήθεια
+Hidden dialogs:
+Κρυμμένα παράθυρα διαλόγου:
+Hide all error and warning messages
+Απόκρυψη όλων των σφαλμάτων και προειδοποιήσεων
+Hide conflicts
+Απόκρυψη διενέξεων
+Hide excluded items
+Απόκρυψη των εξαιρεθέντων στοιχείων
+Hide files that are different
+Απόκρυψη των αρχείων που είναι διαφορετικά
+Hide files that are equal
+Απόκρυψη των αρχείων που είναι ίδια
+Hide files that are newer on left
+Απόκρυψη των αρχείων που είναι πιο πρόσφατα στα αριστερά
+Hide files that are newer on right
+Απόκρυψη των αρχείων που είναι πιο πρόσφατα στα δεξιά
+Hide files that exist on left side only
+Απόκρυψη των αρχείων που υπάρχουν μόνο στα αριστερά
+Hide files that exist on right side only
+Απόκρυψη των αρχείων που υπάρχουν μόνο στα δεξιά
+Hide files that will be created on the left side
+Απόκρυψη των αρχείων που θα δημιουργηθούν στα αριστερά
+Hide files that will be created on the right side
+Απόκρυψη των αρχείων που θα δημιουργηθούν στα δεξιά
+Hide files that will be deleted on the left side
+Απόκρυψη των αρχείων που θα διαγραφούν στα αριστερά
+Hide files that will be deleted on the right side
+Απόκρυψη των αρχείων που θα διαγραφούν στα δεξιά
+Hide files that will be overwritten on left side
+Απόκρυψη των αρχείων που θα αντικατασταθούν στα αριστερά
+Hide files that will be overwritten on right side
+Απόκρυψη των αρχείων που θα αντικατασταθούν στα δεξιά
+Hide files that won't be copied
+Απόκρυψη των αρχείων που δε θα αντιγραφούν
+Hide filtered or temporarily excluded files
+Απόκρυψη των αρχείων που φιλτραρίστηκαν ή εξαιρέθηκαν προσωρινά
+Hide further error messages during the current process
+Απόκρυψη επόμενων μηνυμάτων σφάλματος στην τρέχουσα διαδικασία
+Hints:
+Συμβουλές:
+Homepage
+Ιστοσελίδα
+Identify and propagate changes on both sides using a database. Deletions and conflicts are detected automatically.
+Ανίχνευση και εφαρμογή των αλλαγών και στις δυο πλευρές με τη χρήση βάσης δεδομένων. Διαγραφές και διενέξεις ανιχνεύονται αυτόματα.
+Idle time between detection of last change and execution of command line in seconds
+Χρόνος αναμονής μεταξύ της ανίχνευσης της τελευταίας αλλαγής και της εκτέλεσης της γραμμής εντολών [δευτερόλεπτα]
+If you like FFS
+Αν σας αρέσει το FFS
+Ignore
+Παράβλεψη
+Ignore errors
+Παράβλεψη των σφαλμάτων
+Ignore subsequent errors
+Παράβλεψη των επόμενων σφαλμάτων
+Include
+Συμπερίληψη
+Include all rows
+Συμπερίληψη όλων των γραμμών
+Include temporarily
+Προσωρινή συμπερίληψη
+Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\*
+Συμπερίληψη: *.doc;*.zip;*.exe\nΕξαίρεση: \\temp\\*
+Incompatible synchronization database format:
+Η μορφή της βάσης δεδομένων συγχρονισμού δεν είναι συμβατή:
+Info
+Πληροφορία
+Information
+Πληροφορία
+Initial synchronization:
+Αρχικός συγχρονισμός:
+Integrate external applications into context menu. The following macros are available:
+Ένταξη εξωτερικών εφαρμογών στο μενού περιβάλλοντος. Οι ακόλουθες μακροεντολές είναι διαθέσιμες:
+Invalid FreeFileSync config file!
+Μη έγκυρο αρχείο διάταξης του FreeFileSync!
+Leave as unresolved conflict
+Παράβλεψη ως ανεπίλυτη διένεξη
+Left
+Αριστερά
+Legend
+Εξήγηση των συμβόλων για κάθε κατηγορία
+Load configuration from file
+Άνοιγμα διάταξης από αρχείο
+Load configuration history (press DEL to delete items)
+Άνοιγμα του ιστορικού των διατάξεων (πατήστε DEL για να σβήσετε καταχωρήσεις)
+Log-messages:
+Αποθηκευμένα μηνύματα:
+Logging
+Καταγραφή μηνυμάτων
+Main bar
+Γραμμή εργαλείων
+Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
+Δεν είναι δυνατή η δημιουργία σκιώδους αντίγραφου σε WOW64. Χρησιμοποιείστε την 64-bit έκδοση του FreeFileSync.
+Match case
+Αντιστοίχιση πεζών-κεφαλαίων
+Minimum Idle Time [seconds]
+Ελάχιστος Χρόνος Αναμονής [δευτερόλεπτα]
+Mirror ->>
+Κατοπτρισμός ->>
+Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
+Κατοπτρικό αντίγραφο του αριστερού υποκαταλόγου: Ο υποκατάλογος δεξιά θα αντικατασταθεί και θα αντιστοιχεί εξολοκλήρου στον αριστερό μετά το συγχρονισμό.
+Monitoring active...
+Ενεργή παρακολούθηση...
+More than 50% of the total number of files will be copied or deleted!
+Περισσότερα από το 50% των αρχείων θα αντιγραφούν ή διαγραφούν!
+Move column down
+Μετακίνηση της στήλης κάτω
+Move column up
+Μετακίνηση της στήλης πάνω
+Move files into a time-stamped subdirectory
+Μεταφορά των αρχείων σε έναν υποκατάλογο με ένδειξη ώρας
+Moving %x to Recycle Bin
+Μεταφορά του %x στον Κάδο Ανακύκλωσης
+Moving Symbolic Link %x to user-defined directory %y
+Μεταφορά του Συμβολικού Δεσμού %x στον υποκατάλογο %y που ορίστηκε από το χρήστη
+Moving file %x to user-defined directory %y
+Μεταφορά του αρχείου %x στον υποκατάλογο %y που ορίστηκε από το χρήστη
+Moving folder %x to user-defined directory %y
+Μεταφορά του υποκαταλόγου %x στον υποκατάλογο %y που ορίστηκε από το χρήστη
+Multiple...
+Πολλαπλές ρυθμίσεις...
+No change since last synchronization!
+Καμία αλλαγή από τον προηγούμενο συγχρονισμό!
+No filter selected
+Δεν έχει επιλεχθεί φίλτρο
+Not enough free disk space available in:
+Δεν υπάρχει αρκετός διαθέσιμος χώρος στο δίσκο:
+Nothing to synchronize according to configuration!
+Τίποτα προς συγχρονισμό με βάση τη διάταξη!
+Number of files and directories that will be created
+Αριθμός αρχείων και υποκαταλόγων που θα δημιουργηθούν
+Number of files and directories that will be deleted
+Αριθμός αρχείων και υποκαταλόγων που θα διαγραφούν
+Number of files that will be overwritten
+Αριθμός αρχείων και υποκαταλόγων που θα αντικατασταθούν
+One of the FreeFileSync database entries within the following file is not yet existing:
+Μια από τις εγγραφές στη βάση δεδομένων του FreeFileSync σχετικά με το ακόλουθο αρχείο δεν υπάρχει ακόμη:
+One of the FreeFileSync database files is not yet existing:
+Μια από τις βάσεις δεδομένων του FreeFileSync δεν υπάρχει ακόμα:
+Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
+Μόνο όσα αρχεία/υποκατάλογοι έχουν περάσει το φίλτρο θα επιλεχθούν για συγχρονισμό. Το φίλτρο θα εφαρμοστεί στο όνομα, πάντα σε σχέση(!) με τους βασικούς υποκαταλόγους συγχρονισμού.
+Open with Explorer
+Άνοιγμα με την Εξερεύνηση
+Open with default application
+Άνοιγμα με την προεπιλεγμένη εφαρμογή
+Operation aborted!
+Η λειτουργία ματαιώθηκε!
+Operation:
+Λειτουργία:
+Overview
+Σύνοψη
+Overwriting Symbolic Link %x in %y
+Αντικατάσταση του Συμβολικού Δεσμού %x στο %y
+Overwriting file %x in %y
+Αντικατάσταση του αρχείου %x στο %y
+Pause
+Παύση
+Paused
+Σε παύση
+Planned directory deletion is in conflict with its subdirectories and -files!
+Η διαγραφή του επιλεγμένου καταλόγου είναι σε διένεξη με τους υποκαταλόγους και τα -αρχεία του!
+Please run a Compare first before synchronizing!
+Παρακαλώ εκτελέστε πρώτα Σύγκριση πριν το Συγχρονισμό!
+Press \"Switch\" to open FreeFileSync GUI mode.
+Πατήστε \"Εναλλαγή\" για να ανοίξετε το γραφικό περιβάλλον του FreeFileSync
+Processing folder pair:
+Σύγκριση του ζεύγους υποκαταλόγων:
+Published under the GNU General Public License:
+Διανέμεται υπό την Γενική Άδεια Δημόσιας Χρήσης GNU:
+Question
+Ερώτηση
+Re-enable all hidden dialogs?
+Επανεμφάνιση όλων των κρυμμένων παραθύρων διαλόγου;
+RealtimeSync - Automated Synchronization
+RealtimeSync - Αυτοματοποιημένος Συγχρονισμός
+RealtimeSync configuration
+Διαμόρφωση του RealtimeSync
+Recycle Bin not yet supported for this system!
+Ο Κάδος Ανακύκλωσης δεν υποστηρίζεται σε αυτό το σύστημα!
+Relative path
+Σχετική διαδρομή
+Remove alternate settings
+Απομάκρυνση των διαφοροποιημένων ρυθμίσεων
+Remove folder
+Διαγραφή του υποκαταλόγου
+Remove folder pair
+Διαγραφή του ζεύγους υποκαταλόγων
+Report translation error
+Αναφέρετε λάθη μετάφρασης
+Reset
+Επανεμφάνιση
+Reset view
+Επαναφορά αρχικής εμφάνισης
+Right
+Δεξιά
+S&ave configuration...
+Α&ποθήκευση διάταξης...
+S&witch view
+Α&λλαγή εμφάνισης
+Save changes to current configuration?
+Να αποθηκευτούν οι αλλαγές στην τρέχουσα διάταξη;
+Save current configuration to file
+Αποθήκευση της τρέχουσας διάταξης
+Scanning...
+Ανίχνευση...
+Scanning:
+Ανίχνευση:
+Select a folder
+Επιλογή υποκαταλόγου
+Select alternate synchronization settings
+Επιλογή διαφοροποιημένων ρυθμίσεων συγχρονισμού
+Select logfile directory:
+Επιλέξτε έναν κατάλογο για το αρχείο καταγραφής:
+Select variant:
+Επιλέξτε μια μέθοδο:
+Set direction:
+Επιλογή κατεύθυνσης:
+Setting default synchronization directions: Old files will be overwritten with newer files.
+Ρύθμιση προεπιλεγμένης κατεύθυνσης συγχρονισμού: Τα νεότερα αρχεία θα αντικαταστήσουν τα παλιότερα.
+Show \"%x\"
+Εμφάνιση της γραμμής \"%x\"
+Show conflicts
+Εμφάνιση διενέξεων
+Show files that are different
+Εμφάνιση των αρχείων που είναι διαφορετικά
+Show files that are equal
+Εμφάνιση των αρχείων που είναι ίδια
+Show files that are newer on left
+Εμφάνιση των αρχείων που είναι πιο πρόσφατα στα αριστερά
+Show files that are newer on right
+Εμφάνιση των αρχείων που είναι πιο πρόσφατα στα δεξιά
+Show files that exist on left side only
+Εμφάνιση των αρχείων που υπάρχουν μόνο στα αριστερά
+Show files that exist on right side only
+Εμφάνιση των αρχείων που υπάρχουν μόνο στα δεξιά
+Show files that will be created on the left side
+Εμφάνιση των αρχείων που θα δημιουργηθούν στα αριστερά
+Show files that will be created on the right side
+Εμφάνιση των αρχείων που θα δημιουργηθούν στα δεξιά
+Show files that will be deleted on the left side
+Εμφάνιση των αρχείων που θα διαγραφούν στα αριστερά
+Show files that will be deleted on the right side
+Εμφάνιση των αρχείων που θα διαγραφούν στα δεξιά
+Show files that will be overwritten on left side
+Εμφάνιση των αρχείων που θα αντικατασταθούν στα αριστερά
+Show files that will be overwritten on right side
+Εμφάνιση των αρχείων που θα αντικατασταθούν στα αριστερά
+Show files that won't be copied
+Εμφάνιση των αρχείων που δε θα αντιγραφούν
+Show hidden dialogs
+Επανεμφάνιση των κρυμμένων παραθύρων διαλόγου
+Show popup
+Εμφάνιση αναδυόμενου παράθυρου
+Show popup on errors or warnings
+Εμφάνιση αναδυόμενου παράθυρου σε σφάλματα ή προειδοποιήσεις
+Significant difference detected:
+Ανιχνεύθηκαν σημαντικές διαφορές:
+Silent mode
+Σιωπηλή λειτουργία
+Size
+Μέγεθος
+Source code written completely in C++ utilizing:
+Ο πηγαίος κώδικας γράφτηκε σε C++ με τη χρήση:
+Source directory does not exist anymore:
+Ο υποκατάλογος προέλευσης δεν υπάρχει πλέον:
+Speed:
+Ταχύτητα:
+Start
+Έναρξη
+Start minimized and write status information to a logfile
+Έναρξη σε ελαχιστοποίηση και εγγραφή πληροφοριών κατάστασης σε αρχείο καταγραφής.
+Start synchronization
+Έναρξη του συγχρονισμού
+Statistics
+Στατιστικά
+Status feedback
+Αναφορά κατάστασης
+Stop
+Λήξη
+Swap sides
+Ανταλλαγή πλευρών
+Switching to FreeFileSync GUI mode...
+Εναλλαγή στο γραφικό περιβάλλον του FreeFileSync...
+Symbolic Link handling
+Τρόπος διαχείρισης των συμβολικών δεσμών
+Symlinks %x have the same date but a different target!
+Οι συμβολικοί δεσμοί %x έχουν την ίδια ημερομηνία αλλά διαφορετικό προορισμό!
+Synchronization Preview
+Προεπισκόπηση του συγχρονισμού
+Synchronization aborted!
+Ο συγχρονισμός ματαιώθηκε!
+Synchronization completed successfully!
+Ο συγχρονισμός ολοκληρώθηκε επιτυχώς!
+Synchronization completed with errors!
+Ο συγχρονισμός ολοκληρώθηκε με σφάλματα!
+Synchronization settings
+Ρυθμίσεις συγχρονισμού
+Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
+Συγχρονισμός όλων των αρχείων .doc, .zip και .exe εκτός αυτών στον υποκατάλογο \"temp\".
+Synchronize...
+Συγχρονισμός...
+Synchronizing...
+Γίνεται συγχρονισμός...
+System out of memory!
+Ανεπαρκής μνήμη συστήματος!
+Target directory already existing!
+Ο υποκατάλογος προορισμού υπάρχει ήδη!
+Target file already existing!
+Το αρχείο προορισμού υπάρχει ήδη!
+The command line is executed each time:\n- all directories become available (e.g. USB stick insert)\n- files within these directories or subdirectories are modified
+Η γραμμή ενεργειών εκτελείται κάθε φορά που:\n- όλοι οι υποκατάλογοι γίνονται διαθέσιμοι (π.χ. εισαγωγή ενός USB stick)\n- κάποια αρχεία σε αυτούς τους καταλόγους ή υποκαταλόγους τους έχουν τροποποιηθεί
+The file does not contain a valid configuration:
+Το αρχείο δεν περιέχει μια έγκυρη διάταξη:
+The file was not processed by last synchronization!
+Το αρχείο δεν συμμετείχε στον τελευταίο συγχρονισμό!
+This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
+Με βάση αυτήν την επιλογή, δύο αρχεία που έχουν το ίδιο όνομα θεωρούνται ίδια, όταν έχουν το ίδιο μέγεθος ΚΑΙ ίδια ημέρα και ώρα τελευταίας τροποποίησης.
+Time
+Ώρα
+Time elapsed:
+Χρόνος που πέρασε:
+Time remaining:
+Χρόνος που απομένει:
+Total amount of data that will be transferred
+Συνολικός όγκος δεδομένων που θα μεταφερθούν
+Total required free disk space:
+Συνολικός απαιτούμενος χώρος στο δίσκο:
+Total time:
+Συνολική διάρκεια:
+Transfer file and directory permissions\n(Requires Administrator rights)
+Μεταφορά των αδειών για τα αρχεία και τους υποκαταλόγους\n(Απαιτεί δικαιώματα Aministrator)
+Unable to connect to sourceforge.net!
+Δεν είναι δυνατή η σύνδεση με το sourceforge.net!
+Unable to create logfile!
+Δεν είναι δυνατή η δημιουργία ενός αρχείου καταγραφής!
+Unresolved conflicts existing!
+Υπάρχουν ανεπίλυτες διενέξεις!
+Update ->
+Ενημέρωση ->
+Updating attributes of %x
+Ενημέρωση των χαρακτηριστικών αρχείου του %x
+Usage:
+Χρήση:
+Use Recycle Bin
+Χρήση του Κάδου Ανακύκλωσης
+Use Recycle Bin when deleting or overwriting files
+Χρήση του Κάδου Ανακύκλωσης κατά τη διαγραφή ή αντικατάσταση αρχείων
+User-defined directory
+Υποκατάλογος που ορίζεται από το χρήστη
+User-defined directory for deletion was not specified!
+Δεν ορίστηκε από τον χρήστη υποκατάλογος για τα αρχεία προς διαγραφή!
+Variant
+Μέθοδος
+Verifying file %x
+Επικύρωση του αρχείου %x
+Volume name %x not part of filename %y!
+Το όνομα τόμου %x δεν είναι μέρος του ονόματος του αρχείου %y!
+Waiting for missing directories...
+Αναμονή για τους υποκαταλόγους που απουσιάζουν...
+Waiting while directory is locked (%x)...
+Αναμονή μέχρι να κλειδωθεί ο υποκατάλογος (%x)...
+Warning
+Προσοχή
+Warning: Synchronization failed for %x item(s):
+Προσοχή: Ο συγχρονισμός απέτυχε σε %x στοιχείο/στοιχεία:
+When the comparison is started with this option set the following decision tree is processed:
+Εάν γίνει σύγκριση με αυτήν την επιλογή, ακολουθείται το παρακάτω δένδρο απόφασης:
+You can ignore conflicts and continue synchronization.
+Μπορείτε να αγνοήσετε τις διενέξεις και να συνεχίσετε το συγχρονισμό.
+You can ignore the error to consider not existing directories as empty.
+Μπορείτε να αγνοήσετε το σφάλμα, θεωρώντας ότι ο υποκατάλογος που δεν υπάρχει είναι κενός.
+You may try to synchronize remaining items again (WITHOUT having to re-compare)!
+Μπορείτε να προσπαθήσετε να συγχρονίσετε τα υπόλοιπα στοιχεία (ΧΩΡΙΣ να χρειάζεται να τα ξανασυγκρίνετε)!
+different
+διαφορετικά
+file exists on both sides
+Το αρχείο υπάρχει και στις δυο πλευρές
+on one side only
+το αρχείο υπάρχει μόνο στη μια πλευρά
diff --git a/BUILD/Languages/hebrew.lng b/BUILD/Languages/hebrew.lng
index dd1621b2..43916285 100644
--- a/BUILD/Languages/hebrew.lng
+++ b/BUILD/Languages/hebrew.lng
@@ -2,8 +2,8 @@
MinGW \t- מהדר גנו של חלונות\n wxWidgets \t- ממשק גרפי של תוכנת קוד פתוח\n wxFormBuilder\t- wxWidgets מנוע ממשג גרפי\n CodeBlocks \t- IDE תוכנת קוד פתוח
%x / %y objects deleted successfully
אוביקטים נמחקו בהצלחה %y מ %x
-%x Byte
-%x בייט
+%x Bytes
+
%x GB
%x גיגה ביט
%x MB
@@ -256,6 +256,10 @@ Continue
המשך
Conversion error:
טעות בהסבה:
+Copy attributes only from left to right
+
+Copy attributes only from right to left
+
Copy filesystem permissions
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
קבצים הנמצאים בשני הצדדים -הימני חדש יותר
Files that have different content
קבצים בעלי תוכן שונה
+Files/folders that differ in attributes only
+
Files/folders that exist on left side only
קבצים ותיקיות הנמצאים בעמודה השמאלית בלבד
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
חפש מה:
Folder Comparison and Synchronization
סנכרון קבצים ומחיצות
+Folder pairs
+
Follow
Free disk space available:
@@ -606,11 +614,13 @@ Log-messages:
הודעת יומן:
Logging
רישום ביומן
+Main bar
+
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
לא נתמכת בגרסה זאת אנא התקן גרסה 64 WOW64 העתקת צל ב
Match case
אותיות התאם
-Minimum Idle Time
+Minimum Idle Time [seconds]
Mirror ->>
מראה ->>
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
GNU מפורסם במסגרת:
Question
שאלה
-Quit
-יציאה
Re-enable all hidden dialogs?
הפעל מחדש דיאלוגים נסתרים?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
:דווח שגיאת תרגום
Reset
אפס
+Reset view
+
Right
ימין
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
בחר כוון:
Setting default synchronization directions: Old files will be overwritten with newer files.
בחר בררת מחדל של סנכרון קבצים ישנים ידרסו ע"י קבצים חדשים יותר.
+Show \"%x\"
+
Show conflicts
הראה קונפליקטים
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
קיים קונפליקט לא פתור!
Update ->
שדרג->
+Updating attributes of %x
+
Usage:
שימוש:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
מאמת קובץ %x
Volume name %x not part of filename %y!
כנונן %x לא בנתיב של קובץ %y!
-Waiting for all directories to become available...
-מחכה להתפנות כל המחיצות...
+Waiting for missing directories...
+
Waiting while directory is locked (%x)...
Warning
diff --git a/BUILD/Languages/hungarian.lng b/BUILD/Languages/hungarian.lng
index 838fe79a..c19b94d9 100644
--- a/BUILD/Languages/hungarian.lng
+++ b/BUILD/Languages/hungarian.lng
@@ -2,8 +2,8 @@
MinGW \t- A GNU fordítócsomag Windows portja\n wxWidgets \t- Nyílt forráskódú GUI keretrendszer\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Nyílt forráskódú IDE
%x / %y objects deleted successfully
%X / %Y objektum sikeresen törölve
-%x Byte
-%x bájt
+%x Bytes
+
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
Folytatás
Conversion error:
Konverziós hiba:
+Copy attributes only from left to right
+
+Copy attributes only from right to left
+
Copy filesystem permissions
Fájlrendszer jogosultságok másolása
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Mindkét oldalon létező fájlok, de a jobb oldali újabb
Files that have different content
Fájlok, amelyeknek különböző a tartalmuk:
+Files/folders that differ in attributes only
+
Files/folders that exist on left side only
Csak a bal oldalon létező fájlok/mappák
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Mit keresünk:
Folder Comparison and Synchronization
Mappa összehasonlítás és szinkronizáció
+Folder pairs
+
Follow
Követés
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Naplóbejegyzések:
Logging
Naplózás
+Main bar
+
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
A Shadow Copy a WOW64-en nem támogatott. Kérjük, használja a 64-bites FreeFileSync-et.
Match case
Kis-/nagybetű egyezés
-Minimum Idle Time
-Minimális tétleségi idő
+Minimum Idle Time [seconds]
+
Mirror ->>
Tükrözés ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Kiadva a GNU General Public License alatt:
Question
Kérdés
-Quit
-Kilépés
Re-enable all hidden dialogs?
Engedélyezzük újra az összes rejtett párbeszédablakot?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Fordítói hiba bejelentése
Reset
Helyreállítás
+Reset view
+
Right
Jobb oldal
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Irány
Setting default synchronization directions: Old files will be overwritten with newer files.
Alapértelmezett szinkronizációs irányok beállítása: a régebbi fájlok felülíródnak az újabbakkal.
+Show \"%x\"
+
Show conflicts
Ütközések mutatása
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Feloldatlan ütközések vannak!
Update ->
Frissítés ->
+Updating attributes of %x
+
Usage:
Használat:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
%x fájl ellenőrzése
Volume name %x not part of filename %y!
A(z) %x kötetnevet nem tartalmazza a(z) %y fájlnév!
-Waiting for all directories to become available...
-Várakozás az összes mappa elérhetővé válására...
+Waiting for missing directories...
+
Waiting while directory is locked (%x)...
Várakozás a mappa zárolásának a feloldására (%x)...
Warning
diff --git a/BUILD/Languages/italian.lng b/BUILD/Languages/italian.lng
index e9570526..6f48299f 100644
--- a/BUILD/Languages/italian.lng
+++ b/BUILD/Languages/italian.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port della GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y oggetti cancellati con successo
-%x Byte
-%x Byte
+%x Bytes
+
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
Continua
Conversion error:
Errore di conversione:
+Copy attributes only from left to right
+
+Copy attributes only from right to left
+
Copy filesystem permissions
Copia permessi del filesystem
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Files esistenti su entrambi i lati, più recenti a destra
Files that have different content
Files con contenuto differente
+Files/folders that differ in attributes only
+
Files/folders that exist on left side only
Files/cartelle esistenti solo a sinistra
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Trova cosa:
Folder Comparison and Synchronization
Comparazione di Cartelle e Sincronizzazione
+Folder pairs
+
Follow
Segui
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Log-messages:
Logging
Logging
+Main bar
+
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
La creazione di copie shadow su WOW64 non e' supportata. Utilizzare FreeFileSync in versione 64-bit.
Match case
Corrispondenza
-Minimum Idle Time
-Tempo di Attesa Minimo
+Minimum Idle Time [seconds]
+
Mirror ->>
Mirror ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Pubblicato sotto licenza GNU General Public:
Question
Domanda
-Quit
-Esci
Re-enable all hidden dialogs?
Ripristinare tutti i messaggi nascosti?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Segnala errori di traduzione
Reset
Reset
+Reset view
+
Right
Destra
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Imposta direzione:
Setting default synchronization directions: Old files will be overwritten with newer files.
Imposta direzioni di sincronizzazione di default: I vecchi file saranno sovrascritti dai nuovi.
+Show \"%x\"
+
Show conflicts
Mostra conflitti
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Sono presenti conflitti irrisolti!
Update ->
Aggiorna ->
+Updating attributes of %x
+
Usage:
Uso:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Verifica di file %x
Volume name %x not part of filename %y!
Il nome volume %x non è parte del nome file %y!
-Waiting for all directories to become available...
-In attesa che tutte le directory siano disponibili...
+Waiting for missing directories...
+
Waiting while directory is locked (%x)...
Attendi mentre la directory è bloccata (%x)...
Warning
diff --git a/BUILD/Languages/japanese.lng b/BUILD/Languages/japanese.lng
index 4a79eba1..ed6a4653 100644
--- a/BUILD/Languages/japanese.lng
+++ b/BUILD/Languages/japanese.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y のオブジェクトを削除しました
-%x Byte
+%x Bytes
%x バイト
%x GB
%x GB
@@ -256,6 +256,10 @@ Continue
続行
Conversion error:
変換エラー:
+Copy attributes only from left to right
+属性のみ左から右にコピー
+Copy attributes only from right to left
+属性のみ右から左にコピー
Copy filesystem permissions
ファイルシステム・パーミッションをコピー
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
両側に存在するが、右側の方がより新しい
Files that have different content
内容が異なるファイル
+Files/folders that differ in attributes only
+属性のみ異なるファイル/フォルダ
Files/folders that exist on left side only
左側のみに存在するファイル/フォルダ
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
検索語:
Folder Comparison and Synchronization
フォルダの比較と同期
+Folder pairs
+フォルダ・ペア
Follow
フォロー
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
ログメッセージ:
Logging
ログ
+Main bar
+メインバー
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
WOW64 では、ボリュームシャドウコピーに対応していません、FreeFileSync 64-bit 版をお試しください。
Match case
文字種を区別
-Minimum Idle Time
-最小待機時間
+Minimum Idle Time [seconds]
+最小待機時間[秒]
Mirror ->>
ミラー >>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Published under the GNU General Public License:
Question
質問
-Quit
-終了
Re-enable all hidden dialogs?
すべての非表示ダイアログを有効にしますか?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
翻訳エラーの詳細
Reset
リセット
+Reset view
+表示リセット
Right
右側
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
方向の設定:
Setting default synchronization directions: Old files will be overwritten with newer files.
同期方向のデフォルト設定: 古いファイルに新しいファイルを上書き
+Show \"%x\"
+\"%x\" を表示
Show conflicts
不一致を表示
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
未解決の不一致があります!
Update ->
更新 ->
+Updating attributes of %x
+%x の属性を更新
Usage:
使用方法:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
ファイル %x の検証中
Volume name %x not part of filename %y!
ボリューム名 %x にファイル名 %y はありません!
-Waiting for all directories to become available...
-すべてのディレクトリが利用可能になるまで待機中...
+Waiting for missing directories...
+見失ったディレクトリの待機中
Waiting while directory is locked (%x)...
待機時間中ディレクトリはロックされます(%x)...
Warning
diff --git a/BUILD/Languages/polish.lng b/BUILD/Languages/polish.lng
index a8120869..0e8b400b 100644
--- a/BUILD/Languages/polish.lng
+++ b/BUILD/Languages/polish.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y usuniętych obiektów
-%x Byte
+%x Bytes
%x Bajtów
%x GB
%x GB
@@ -77,7 +77,7 @@
&Pause
&Pauza
&Program
-
+&Program
&Quit
&Zamknij
&Restore
@@ -256,6 +256,10 @@ Continue
Kontynuuj
Conversion error:
Błąd konwersji:
+Copy attributes only from left to right
+Kopiuj atrybuty tylko z lewej strony
+Copy attributes only from right to left
+Kopiuj atrybuty tylko z prawej strony
Copy filesystem permissions
Kopiuj uprawnienia plików
Copy from left to right
@@ -363,7 +367,7 @@ Pozostałe elementy:
Email
Poczta
Encoding extended time information: %x
-
+Odkodowywanie rozszerzonych informacji o czasie: %x
Endless loop when traversing directory:
Zapętlenie podczas przeglądania katalogu:
Error
@@ -405,7 +409,7 @@ Błąd odczytu pliku:
Error reading from synchronization database:
Błąd odczytu z bazy danych synchronizacji:
Error reading security context:
-
+Błąd odczytu kontekstu bezpieczeństwa:
Error resolving symbolic link:
Błąd odczytu dowiązania symbolicznego:
Error setting directory lock:
@@ -421,7 +425,7 @@ Błąd podczas monitorowania katalogów.
Error writing file:
Błąd zapisu pliku:
Error writing security context:
-
+Błąd zapisu kontekstu bezpieczeństwa:
Error writing to synchronization database:
Błąd zapisu do bazy danych synchronizacji:
Example
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Pliki, które istnieją po obu stronach, prawa strona jest nowsza
Files that have different content
Pliki, które mają różną zawartość
+Files/folders that differ in attributes only
+Pliki/foldery różniące się wyłącznie atrybutami
Files/folders that exist on left side only
Pliki/katalogi istniejące tylko po lewej stronie
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Co:
Folder Comparison and Synchronization
Porównywanie i Synchronizacja folderów
+Folder pairs
+Pary folderów
Follow
Podąrzaj
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Logi:
Logging
Tworzenie logów
+Main bar
+Główny pasek
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Tworzenie Shadow Copies dla WOW64 nie jest obsługiwane. Zainstaluj 64 bitową wersję FreeFileSync.
Match case
Uwzględnij wielkość liter
-Minimum Idle Time
-Minimalny czas bezczynności
+Minimum Idle Time [seconds]
+Minimalny czas bezczynności [sekundy]
Mirror ->>
Lustrzana ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Udostępnione na zasadach licencji GNU General Public License:
Question
Pytanie
-Quit
-Zakończ
Re-enable all hidden dialogs?
Odblokować wszystkie ukryte dialogi?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Zgłoś błąd w tłumaczeniu
Reset
Resetuj
+Reset view
+Resetuj widok
Right
Prawy
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Kierunek synchronizacji:
Setting default synchronization directions: Old files will be overwritten with newer files.
Ustawianie domyślnego kierunku synchronizacji: Stare pliki zostaną nadpisane nowszymi.
+Show \"%x\"
+Pokaż \"%x\"
Show conflicts
Pokaż konflikty
Show files that are different
@@ -783,7 +795,7 @@ Prędkość:
Start
Rozpocznij
Start minimized and write status information to a logfile
-
+Uruchom zminimalizowane i zapisuj informacje do pliku logów
Start synchronization
Rozpocznij synchronizację
Statistics
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Istnieją nierozwiązane konflikty!
Update ->
Uaktualnij ->
+Updating attributes of %x
+Aktualizowanie atrybutów %x
Usage:
Użycie:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Weryfikowanie pliku %x
Volume name %x not part of filename %y!
Dysk %x nie jest częścią pliku %y!
-Waiting for all directories to become available...
-Oczekiwanie aż katalogi staną się dostępne...
+Waiting for missing directories...
+Oczekiwanie na brakujące katalogi...
Waiting while directory is locked (%x)...
Blokada katalogu (%x), oczekiwanie...
Warning
@@ -879,7 +893,7 @@ Uwaga: Błąd synchronizacji dla \"%x\" elementów:
When the comparison is started with this option set the following decision tree is processed:
Gdy porównywanie z zaznaczoną opcją jest w toku, podejmowane są następujące dezyje:
You can ignore conflicts and continue synchronization.
-Możesz je zignorować i kontynułować synchronizację.
+Możesz je zignorować i kontynuować synchronizację.
You can ignore the error to consider not existing directories as empty.
Możesz zignorować ten błąd i uznać nieistniejący katalog za pusty.
You may try to synchronize remaining items again (WITHOUT having to re-compare)!
diff --git a/BUILD/Languages/portuguese.lng b/BUILD/Languages/portuguese.lng
index d82bc6f7..9713e47a 100644
--- a/BUILD/Languages/portuguese.lng
+++ b/BUILD/Languages/portuguese.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objectos eliminados com sucesso
-%x Byte
-%x Byte
+%x Bytes
+
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
Continuar
Conversion error:
Erro de conversão:
+Copy attributes only from left to right
+
+Copy attributes only from right to left
+
Copy filesystem permissions
Copiar permissões do sistema de ficheiros
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Ficheiros existentes dos dois lados, à direita é mais recente
Files that have different content
Ficheiros com conteúdo diferente
+Files/folders that differ in attributes only
+
Files/folders that exist on left side only
Ficheiros/pastas existentes somente à esquerda
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Procurar:
Folder Comparison and Synchronization
Comparação e Sincronização de pastas
+Folder pairs
+
Follow
Seguir
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Log de mensagens:
Logging
A escrever em log
+Main bar
+
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Fazer cópias fantasma em WOW64 não é suportado. Por favor usar a versão 64-bit.
Match case
Correspondência
-Minimum Idle Time
-Tempo de espera mínimo
+Minimum Idle Time [seconds]
+
Mirror ->>
Espelhar ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Publicado sobre GNU General Public License:
Question
Questão
-Quit
-Sair
Re-enable all hidden dialogs?
Reactivar todos os diálogos ocultos?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Informar um erro de tradução
Reset
Reiniciar
+Reset view
+
Right
Direita
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Escolher direcção:
Setting default synchronization directions: Old files will be overwritten with newer files.
Escolher direcção de sincronização por defeito: Os ficheiros antigos serão substituídos pelos novos.
+Show \"%x\"
+
Show conflicts
Mostrar conflitos
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Existem conflitos por resolver!
Update ->
Actualizar ->
+Updating attributes of %x
+
Usage:
Uso:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
A verificar ficheiro %x
Volume name %x not part of filename %y!
Nome do volume %x não faz parte do ficheiro %y!
-Waiting for all directories to become available...
-Aguardando que todos os directorios fiquem disponíveis...
+Waiting for missing directories...
+
Waiting while directory is locked (%x)...
Aguardando enquanto o directório é bloqueado (%x)...
Warning
diff --git a/BUILD/Languages/portuguese_br.lng b/BUILD/Languages/portuguese_br.lng
index 0cb7eb56..f2045bb0 100644
--- a/BUILD/Languages/portuguese_br.lng
+++ b/BUILD/Languages/portuguese_br.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objetos apagados com sucesso
-%x Byte
-%x Byte
+%x Bytes
+%x Bytes
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
Continuar
Conversion error:
Erro de conversão:
+Copy attributes only from left to right
+Copiar atributos somente da esquerda para a direita
+Copy attributes only from right to left
+Copiar atributos somente da direita para a esquerda
Copy filesystem permissions
Copiar permissões de arquivos e diretórios
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Arquivos que existem nos dois lados, sendo à direita mais recentes
Files that have different content
Arquivos que possuem conteúdo diferente
+Files/folders that differ in attributes only
+Arquivos/pastas que diferem somente em atributos
Files/folders that exist on left side only
Arquivos/pastas que existem somente à esquerda
Files/folders that exist on right side only
@@ -483,7 +489,7 @@ Filtro está ativo
Filter settings have changed!
As configurações do filtro foram alteradas!
Filter view
-Filtrar vista
+Filtrar visualização
Filter: All pairs
Filtro: Todos os pares
Filter: Single pair
@@ -494,6 +500,8 @@ Find what:
Localizar o que:
Folder Comparison and Synchronization
Comparação e Sincronização de Pastas
+Folder pairs
+Pares de pastas
Follow
Seguir
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Log de mensagens:
Logging
Gravando log
+Main bar
+Barra principal
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Cópias de sombra no WOW64 não são suportadas. Por favor use a versão 64-bits do FreeFileSync.
Match case
Diferenciar maiúsculas e minúsculas
-Minimum Idle Time
-Tempo Ocioso Mínimo
+Minimum Idle Time [seconds]
+Mínimo Tempo Ocioso [segundos]
Mirror ->>
Espelhar ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Publicado sobre a GNU General Public License:
Question
Questão
-Quit
-Sair
Re-enable all hidden dialogs?
Reabilitar todos os diálogos ocultos?
RealtimeSync - Automated Synchronization
@@ -707,7 +715,9 @@ Remover par de pastas
Report translation error
Reportar erro de tradução
Reset
-Reiniciar
+Restaurar
+Reset view
+Restaurar visualização
Right
Direita
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Configurar direção
Setting default synchronization directions: Old files will be overwritten with newer files.
Configurando direções padrões de sincronização: Arquivos antigos serão substituídos por arquivos mais novos.
+Show \"%x\"
+Mostrar \"%x\"
Show conflicts
Mostrar conflitos
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Conflitos não resolvidos existentes!
Update ->
Atualizar ->
+Updating attributes of %x
+Atualizando atributos de %x
Usage:
Uso:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Verificando arquivo %x
Volume name %x not part of filename %y!
Nome do volume %x não é parte do arquivo %y!
-Waiting for all directories to become available...
-Esperando que todos os diretóricos fiquem disponíveis...
+Waiting for missing directories...
+Esperando por diretórios faltantes...
Waiting while directory is locked (%x)...
Esperando enquanto o diretório é travado (%x)...
Warning
diff --git a/BUILD/Languages/romanian.lng b/BUILD/Languages/romanian.lng
index 23b51f86..448c533b 100644
--- a/BUILD/Languages/romanian.lng
+++ b/BUILD/Languages/romanian.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port din GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y obiecte șterse cu succes
-%x Byte
+%x Bytes
%x Baiți
%x GB
%x GB
@@ -233,7 +233,7 @@ Rezultatul Comparării
Comparison settings
Setările Comparării
Completed
-Terminată
+Sincronizare Terminată
Configuration
Configurație
Configuration loaded!
@@ -256,6 +256,10 @@ Continue
Continuă
Conversion error:
Eroare de convertire:
+Copy attributes only from left to right
+Copiază doar atributele de la stînga la dreapta
+Copy attributes only from right to left
+Copiază doar atributele de la dreapta la stînga
Copy filesystem permissions
Copiază permisiunile sistemului de file
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
File care există în ambele părți, cea din dreapta fiind mai nouă
Files that have different content
File care au conținut diferit
+Files/folders that differ in attributes only
+File sau dosare care diferă doar la atribute
Files/folders that exist on left side only
File sau dosare care există doar în partea stîngă
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Găsește Asta:
Folder Comparison and Synchronization
Comparare și Sincronizare de Dosare
+Folder pairs
+Perechi de Dosare
Follow
Urmărește
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Mesaje de jurnalizare:
Logging
Jurnalizez
+Main bar
+Bara Principală
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Realizarea de copii de rezervă prin sistemul WOW64 nu este suportată. Folosește versiunea pe 64-biți a FreeFileSync.
Match case
Potrivește MAJ/min
-Minimum Idle Time
-Timp Minim de Inactivitate
+Minimum Idle Time [seconds]
+Timp Minim de Inactivitate [secunde]
Mirror ->>
Clonare =>>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Publicat sub licența GNU GPL:
Question
Întrebare
-Quit
-Ieși
Re-enable all hidden dialogs?
Reactivezi casetele de dialog ascunse?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Raportarea erorilor de traducere
Reset
Resetează
+Reset view
+Resetează Vederea
Right
Dreapta
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Setează Acțiunea ca în Icoana Alăturată:
Setting default synchronization directions: Old files will be overwritten with newer files.
Va fi setat sensul implicit de sincronizare: Filele vechi vor fi suprascrise de cele noi.
+Show \"%x\"
+Arată \"%x\"
Show conflicts
Arată conflictele
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Există conflicte nerezolvate!
Update ->
Actualizare =>
+Updating attributes of %x
+Actualizez atributele lui %x
Usage:
Utilizare:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Verific fila %x
Volume name %x not part of filename %y!
Numele volumului %x nu face parte din numele filei %y !
-Waiting for all directories to become available...
-Aștept ca toate dosarele să devină disponibile...
+Waiting for missing directories...
+Aștept ca dosarele lipsă să devină disponibile...
Waiting while directory is locked (%x)...
Aștept ca dosarul să fie zăvorît (%x)...
Warning
diff --git a/BUILD/Languages/russian.lng b/BUILD/Languages/russian.lng
index 6ff42818..318229e6 100644
--- a/BUILD/Languages/russian.lng
+++ b/BUILD/Languages/russian.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI Framework\n wxFormBuilder\t- wxWidgets GUI-Builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y объектов удалено удачно
-%x Byte
+%x Bytes
%x Байт
%x GB
%x ГБ
@@ -67,7 +67,7 @@
&Load
&Загрузить
&Load configuration...
-&Загрузить конфигурацию...
+&Загрузить настройки синхронизации...
&New
&Новая
&No
@@ -154,6 +154,8 @@
<Символьная ссылка>
<multiple selection>
<групповое выделение>
+A directory will be modified which is part of multiple folder pairs! Please review synchronization settings!
+
A newer version of FreeFileSync is available:
Доступна новая версия FreeFileSync:
Abort requested: Waiting for current operation to finish...
@@ -235,15 +237,15 @@ Comparison settings
Completed
Завершено
Configuration
-Настройка
+Настройки синхронизации
Configuration loaded!
-Настройка загружена!
+Настройки синхронизации загружены!
Configuration overview:
-Конфигурация:
+Настройки синхронизации:
Configuration saved!
-Настройка сохранена!
+Настройки синхронизации сохранены!
Configure filter
-Настройка фильтра
+Настройки фильтра
Configure your own synchronization rules.
Настроить свои собственные правила синхронизации.
Confirm
@@ -256,6 +258,10 @@ Continue
Продолжить
Conversion error:
Ошибка преобразования:
+Copy attributes only from left to right
+Копировать только атрибуты слева направо
+Copy attributes only from right to left
+Копировать только атрибуты справа налево
Copy filesystem permissions
Копировать права доступа файловой системы
Copy from left to right
@@ -397,7 +403,7 @@ Error moving to Recycle Bin:
Error opening file:
Ошибка при открытии файла:
Error parsing configuration file:
-Ошибка при анализе файла конфигурации:
+Ошибка при анализе файла настроек синхронизации:
Error reading file attributes:
Ошибка при чтении параметров файла:
Error reading file:
@@ -472,6 +478,8 @@ Files that exist on both sides, right one is newer
Файлы, существующие на обоих сторонах, правый новее
Files that have different content
Файлы, имеющие различное содержание
+Files/folders that differ in attributes only
+Файлы/папки, которые отличаются только атрибутами
Files/folders that exist on left side only
Файлы/папки, существующие только на левой стороне
Files/folders that exist on right side only
@@ -494,6 +502,8 @@ Find what:
Найти:
Folder Comparison and Synchronization
Сравнение и синхронизация
+Folder pairs
+Пары папок для синхронизации
Follow
Последовательное
Free disk space available:
@@ -599,19 +609,21 @@ Left
Legend
Легенда
Load configuration from file
-Загрузить конфигурацию из файла
+Загрузить настройки синхронизации из файла
Load configuration history (press DEL to delete items)
-Выбрать конфигурацию из списка (нажмите DEL для удаления пунктов)
+Выбрать настройки синхронизации из списка\n(нажмите DEL для удаления пунктов)
Log-messages:
Лог-сообщения:
Logging
Лог-файлы
+Main bar
+Главная панель
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Создание теневых копий на WOW64 не поддерживается. Пожалуйста, используйте FreeFileSync 64-разрядной версии.
Match case
Учитывать регистр
-Minimum Idle Time
-Минимальное время простоя
+Minimum Idle Time [seconds]
+Минимальное время простоя [секунд]
Mirror ->>
Зеркало ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -643,7 +655,7 @@ No filter selected
Not enough free disk space available in:
Не достаточно свободного места в:
Nothing to synchronize according to configuration!
-Ничего нет для синхронизации в соответствии с конфигурацией!
+Ничего нет для синхронизации в соответствии с настройками синхронизации!
Number of files and directories that will be created
Число файлов и папок, которые будут созданы
Number of files and directories that will be deleted
@@ -686,8 +698,6 @@ Published under the GNU General Public License:
Издается под лицензией GNU General Public License:
Question
Вопрос
-Quit
-Выход
Re-enable all hidden dialogs?
Показать все скрытые диалоги?
RealtimeSync - Automated Synchronization
@@ -708,16 +718,18 @@ Report translation error
Сообщить об ошибке перевода
Reset
Сбросить
+Reset view
+Сброс настроек вида
Right
Справа
S&ave configuration...
-Сохранить конфигурацию...
+Сохранить настройки синхронизации...
S&witch view
Переключить вид
Save changes to current configuration?
-Сохранить изменения в текущей конфигурации?
+Сохранить изменения в текущих настройках синхронизации?
Save current configuration to file
-Сохранить текущую конфигурацию в файл
+Сохранить текущие настройки синхронизации в файл
Scanning...
Сканирование...
Scanning:
@@ -734,6 +746,8 @@ Set direction:
Выберите направление:
Setting default synchronization directions: Old files will be overwritten with newer files.
Настройка направления синхронизации по умолчанию:\nСтарые файлы будут заменены более новыми файлами.
+Show \"%x\"
+Показать \"%x\"
Show conflicts
Показать конфликтующие файлы
Show files that are different
@@ -825,7 +839,7 @@ Target file already existing!
The command line is executed each time:\n- all directories become available (e.g. USB stick insert)\n- files within these directories or subdirectories are modified
Командная строка выполняется каждый раз, когда:\n- все папки становятся доступны (например, подключение переносного носителя)\n- файлы в папках или подпапках изменены
The file does not contain a valid configuration:
-Файл не содержит действительную конфигурацию:
+Файл не содержит действительных настроек синхронизации:
The file was not processed by last synchronization!
Файл не был обработан при последней синхронизации!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
@@ -852,6 +866,8 @@ Unresolved conflicts existing!
Существуют нерешенные конфликты
Update ->
Обновить ->
+Updating attributes of %x
+Обновление атрибутов %x
Usage:
Инструкция:
Use Recycle Bin
@@ -868,8 +884,8 @@ Verifying file %x
Проверка файла %x
Volume name %x not part of filename %y!
Имя тома %x не является частью имени файла %y!
-Waiting for all directories to become available...
-Ожидание, пока все папки станут доступными...
+Waiting for missing directories...
+Ожидание пропущенных папок...
Waiting while directory is locked (%x)...
Ожидание снятия блокировки с папки (%x)...
Warning
diff --git a/BUILD/Languages/slovenian.lng b/BUILD/Languages/slovenian.lng
index 84c725e8..c1006eba 100644
--- a/BUILD/Languages/slovenian.lng
+++ b/BUILD/Languages/slovenian.lng
@@ -2,8 +2,8 @@
MinGW \t- Windows port od GNU Compiler Collection\n wxWidgets \t- Open-Source GUI ogrodje\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objektov uspešno izbrisanih
-%x Byte
-%x Bajt
+%x Bytes
+%x Bajtov
%x GB
%x GB
%x MB
@@ -256,6 +256,10 @@ Continue
Nadaljuj
Conversion error:
Napaka pri pretvorbi:
+Copy attributes only from left to right
+Kopiraj atribute samo iz leve na desno
+Copy attributes only from right to left
+Kopiraj atribute samo iz desne na levo
Copy filesystem permissions
Kopiraj dovoljenja datotečnega sistema
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Datoteke, ki obstajajo na obeh straneh, desna je novejša
Files that have different content
Datoteke, ki imajo različno vsebino
+Files/folders that differ in attributes only
+Datoteke/mape, ki se razlikujejo samo v atributih
Files/folders that exist on left side only
Datoteke/mape, ki obstajajo samo na levi strani
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Najdi kaj
Folder Comparison and Synchronization
Primerjava in sinhronizacija imenika
+Folder pairs
+Pari map
Follow
Sledi
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Sporočila beleženja:
Logging
Beležim
+Main bar
+Glavna vrstica
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Ustvarjanje senčnih kopij na WOW63 ni podprto. Prosimo uporabite 64-bitno FreeFileSync različico.
Match case
Ujemaj se s primerom
-Minimum Idle Time
-Minimalni čas nedejavnosti
+Minimum Idle Time [seconds]
+Minimalen čas nedejavnosti [sekunde]
Mirror ->>
Zrcalno ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Objavljeno pod licenco GNU General Public:
Question
Vprašanje
-Quit
-Zapusti
Re-enable all hidden dialogs?
Ponovno omogočim skrite pogovore?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Poročaj o napaki prevoda
Reset
Ponastavi
+Reset view
+Ponastavi pogled
Right
Desno
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Nastavi smer:
Setting default synchronization directions: Old files will be overwritten with newer files.
Nastavljanje privzetih smeri sinhronizacije: Stare datoteke bodo prepisane z novimi datotekami.
+Show \"%x\"
+Prikaži \"%x\"
Show conflicts
Prikaži spore
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Obstajajo nerešeni spori!
Update ->
Posodobi ->
+Updating attributes of %x
+Posodabljam atribute od %x
Usage:
Uporaba:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Preverjam datoteko %x
Volume name %x not part of filename %y!
Ime volumna %x ni del imena datoteke %y!
-Waiting for all directories to become available...
-Čakam, da bodo vsi imeniki na voljo...
+Waiting for missing directories...
+Čakam na manjkajoče imenike...
Waiting while directory is locked (%x)...
Čakam, medtem ko se zaklepa imenik (%x)...
Warning
diff --git a/BUILD/Languages/spanish.lng b/BUILD/Languages/spanish.lng
index 15a25781..4bb360fa 100644
--- a/BUILD/Languages/spanish.lng
+++ b/BUILD/Languages/spanish.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objetos borrados satisfactoriamente
-%x Byte
+%x Bytes
%x Bytes
%x GB
%x GB
@@ -256,6 +256,10 @@ Continue
Continuar
Conversion error:
Error de conversión:
+Copy attributes only from left to right
+Copiar sólo atributos de izquierda a derecha
+Copy attributes only from right to left
+Copiar sólo atributos de izquierda a derecha
Copy filesystem permissions
Permisos de copia del sistema de ficheros
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Archivos que existen en ambos lados, el de la derecha es más reciente
Files that have different content
Archivos que tienen un contenido diferente
+Files/folders that differ in attributes only
+Archivos/carpetas que se diferencian sólo en atributos
Files/folders that exist on left side only
Archivos/carpetas que existen sólo en el lado izquierdo
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Buscar:
Folder Comparison and Synchronization
Comparación y Sincronización de Carpetas
+Folder pairs
+Pares de carpetas
Follow
Seguir
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Registro de mensajes:
Logging
Iniciando sesión
+Main bar
+Barra principal
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
La realización de copias shadow en WOW64 no está soportado. Por favor, use la versión 64-bit de FreeFileSync.
Match case
Distinción entre mayúsculas y minúsculas
-Minimum Idle Time
-Tiempo de inactividad mínimo
+Minimum Idle Time [seconds]
+Tiempo mínimo de espera [segundos]
Mirror ->>
Espejo ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Publicado bajo "GNU General Public License":
Question
Pregunta
-Quit
-Salir
Re-enable all hidden dialogs?
¿Reactivar todos los diálogos ocultos?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Informar de errores de traducción
Reset
Reiniciar
+Reset view
+Reiniciar vista
Right
Derecha
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Indicar dirección:
Setting default synchronization directions: Old files will be overwritten with newer files.
Fijando direcciones de sincronización por defecto: Los archivos viejos serán sobreescritos por los archivos nuevos.
+Show \"%x\"
+Mostrar \"%x\"
Show conflicts
Mostrar conflictos
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
¡Existen conflictos sin resolver!
Update ->
Actualizar ->
+Updating attributes of %x
+Actualizar atributos de %x
Usage:
Uso:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Verificación del archivo %x
Volume name %x not part of filename %y!
El nombre del volumen %x no es una parte del nombre de archivo %y
-Waiting for all directories to become available...
-Esperando a que todos los directorios esten disponibles...
+Waiting for missing directories...
+Esperando directorios faltantes...
Waiting while directory is locked (%x)...
Esperando mientras el directorio se encuentre bloqueado (%x)...
Warning
diff --git a/BUILD/Languages/swedish.lng b/BUILD/Languages/swedish.lng
index 93f0fbdb..f12608ef 100644
--- a/BUILD/Languages/swedish.lng
+++ b/BUILD/Languages/swedish.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI Framework\n wxFormBuilder\t- wxWidgets GUI-Builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%x / %y objekt borttagna
-%x Byte
+%x Bytes
%x Byte
%x GB
%x GB
@@ -256,6 +256,10 @@ Continue
Fortsätt
Conversion error:
Konversionsfel:
+Copy attributes only from left to right
+Kopiera attribut endast från vänster till höger
+Copy attributes only from right to left
+Kopiera attribut endast från höger till vänster
Copy filesystem permissions
Kopiera filsystembehörigheter
Copy from left to right
@@ -472,6 +476,8 @@ Files that exist on both sides, right one is newer
Filer som finns på båda sidor, höger är nyare
Files that have different content
Filer som har olika innehåll
+Files/folders that differ in attributes only
+Filer/Kataloger som endast skiljer i attribut
Files/folders that exist on left side only
Filer/kataloger som finns på vänster sida enbart
Files/folders that exist on right side only
@@ -494,6 +500,8 @@ Find what:
Sök efter:
Folder Comparison and Synchronization
Katalogjämförelse och synkronisering
+Folder pairs
+Katalogpar
Follow
Följ
Free disk space available:
@@ -606,12 +614,14 @@ Log-messages:
Log-meddelanden:
Logging
Loggar
+Main bar
+Huvudfält
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Skuggkopior av wow64 stöds ej. Använd FreeFileSync x64 istället!
Match case
Matcha gemener/VERSALER
-Minimum Idle Time
-Minsta väntetid
+Minimum Idle Time [seconds]
+Minsta ledig tid [sekunder]
Mirror ->>
Spegla ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
Publiserad under GNU General Public License:
Question
Fråga
-Quit
-Avsluta
Re-enable all hidden dialogs?
Återaktivera alla dolda meddelanden?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Rapportera översättningsfel
Reset
Återställ
+Reset view
+Återställ vy
Right
Höger
S&ave configuration...
@@ -734,6 +744,8 @@ Set direction:
Ange riktning:
Setting default synchronization directions: Old files will be overwritten with newer files.
Standardsynkronisering: Gamla filer kommer att skrivas över av nyare versioner.
+Show \"%x\"
+Visa \"%x\"
Show conflicts
Visa konflikter
Show files that are different
@@ -852,6 +864,8 @@ Unresolved conflicts existing!
Obehandlad konflikt upptäckt!
Update ->
Uppdatera ->
+Updating attributes of %x
+Uppdaterar attribut för %x
Usage:
Användning:
Use Recycle Bin
@@ -868,8 +882,8 @@ Verifying file %x
Verifierar %x
Volume name %x not part of filename %y!
Volymnamn %x saknas i filnamn %y!
-Waiting for all directories to become available...
-Väntar på att alla sökvägar skall bli åtkommliga...
+Waiting for missing directories...
+Väntar på saknade destinationer...
Waiting while directory is locked (%x)...
Väntar medan katalogen låses (%x)...
Warning
diff --git a/BUILD/Languages/turkish.lng b/BUILD/Languages/turkish.lng
index 9b5d89f9..0054b44e 100644
--- a/BUILD/Languages/turkish.lng
+++ b/BUILD/Languages/turkish.lng
@@ -2,7 +2,7 @@
MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI Framework\n wxFormBuilder\t- wxWidgets GUI-Builder\n CodeBlocks \t- Open-Source IDE
%x / %y objects deleted successfully
%y ögeden %x tanesi sorunsuz silindi
-%x Byte
+%x Bytes
%x Bayt
%x GB
%x GB
@@ -77,7 +77,7 @@ Ye&ni
&Pause
&Duraklat
&Program
-
+&Program
&Quit
Çı&k
&Restore
@@ -151,7 +151,7 @@ Ge&ri yükle
<Last session>
<Önceki oturum>
<Symlink>
-<Symlink>
+<Smblkbağlantı>
<multiple selection>
<çoklu seçim>
A newer version of FreeFileSync is available:
@@ -221,7 +221,7 @@ Compare by \"File content\"
Compare by \"File size and date\"
\"Dosya boyutu ve tarihi\"ne göre karşılaştırma
Compare by...
-Karşılaştırmayı yaparken şunu kullan:
+Karşılaştırma ölçütünü seçin:
Comparing content of files %x
%x dosyalarının içeriği karşılaştırılıyor
Comparing content...
@@ -256,6 +256,10 @@ Continue
Devam et
Conversion error:
Dönüştürme hatası:
+Copy attributes only from left to right
+Öznitelikleri yalnızca soldan sağa kopyala
+Copy attributes only from right to left
+Öznitelikleri yalnızca sağdan sola kopyala
Copy filesystem permissions
Dosya sistemi izinlerini de kopyala
Copy from left to right
@@ -269,7 +273,7 @@ Sağdan sola üzerine yazarak kopyala
Copy locked files
Kilitli dosyaları da kopyala
Copy new or updated files to right folder.
-Soldan sağa yalnız yeni ya da güncellenmiş dosyalar kopyalanır.
+Yalnız yeni ya da güncellenmiş dosyalar soldan sağa kopyalanır.
Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights)
Paylaşılmış ya da kilitli dosyaları Birim Gölge Kopya Hizmetini\n kullanarak kopyala (Yönetici izinlerine gerek duyar)
Copy to clipboard\tCTRL+C
@@ -315,7 +319,7 @@ Her iki yandakini de sil
Delete on both sides even if the file is selected on one side only
Dosya yalnız bir tarafta seçili olsa bile her iki yandakini de sil
Delete or overwrite files permanently
-Kalıcı olarak üzerine yaz ya da sil
+Dosyaları kalıcı olarak siler ya da üzerine yazar
Delete permanently
Kalıcı olarak sil
Deleting Symbolic Link %x
@@ -353,7 +357,7 @@ PayPal ile bağış yapın
Download now?
Şimdi indir?
Drag && drop
-Klasör ya da dosyaları sürükleyip buraya bırakabilirsiniz
+Klasör ya da dosyaları buraya sürükleyip bırakabilirsiniz
Elements found:
Bulunan bileşenler:
Elements processed:
@@ -363,7 +367,7 @@ Kalan bileşenler:
Email
E-posta
Encoding extended time information: %x
-
+Uzatılmış zaman bilgisi kodlanıyor: %x
Endless loop when traversing directory:
Klasörlerde dolaşırken sonsuz döngü:
Error
@@ -405,7 +409,7 @@ Dosya okunurken hata:
Error reading from synchronization database:
Eşleştirme veri tabanı okunurken hata:
Error reading security context:
-
+Güüvenlik bağlamı okunurken hata:
Error resolving symbolic link:
Sembolik bağlantı çözümlenirken hata:
Error setting directory lock:
@@ -421,7 +425,7 @@ Klasörler izlenirken hata.
Error writing file:
Dosya yazılırken hata:
Error writing security context:
-
+Güvenlik bağlamı yazılırken hata:
Error writing to synchronization database:
Eşleştirme veri tabanına yazılırken hata:
Example
@@ -461,21 +465,23 @@ Dosya adı
Files %x have the same date but a different size!
%x dosyalarının tarihleri aynı fakat boyutları farklı!
Files are found equal if\n - file content\nis the same
-Eşit dosyaları bulurken\n - dosya içeriği\naynı olanlara bakılır
+Eşit dosyalar aranırken\n - dosya içeriği\naynı olanlara bakılır
Files are found equal if\n - filesize\n - last write time and date\nare the same
-Eşit dosyaları bulurken\n - dosya boyutu\n - son yazma zamanı ve tarihi\naynı olanlara bakılır
+Eşit dosyalar aranırken\n - dosya boyutu\n - son kayıt zamanı ve tarihi\naynı olanlara bakılır
Files that are equal on both sides
Her iki yanda da eşit olan dosyalar
Files that exist on both sides, left one is newer
-Her iki yanda da varolup, solda daha yeni olan dosyalar
+Her iki yanda da bulunup, solda daha yeni olan dosyalar
Files that exist on both sides, right one is newer
-Her iki yanda da varolup, sağda daha yeni olan dosyalar
+Her iki yanda da bulunup, sağda daha yeni olan dosyalar
Files that have different content
Farklı içeriğe sahip dosyalar
+Files/folders that differ in attributes only
+Yalnız öznitelikleri farklı dosya ve klasörler
Files/folders that exist on left side only
-Yalnız sol yanda bulunan dosyalar/klasörler
+Yalnız sol yanda bulunan dosya ve klasörler
Files/folders that exist on right side only
-Yalnız sağ yanda bulunan dosyalar/klasörler
+Yalnız sağ yanda bulunan dosya ve klasörler
Filter files
Dosya süzgeci
Filter is active
@@ -494,6 +500,8 @@ Find what:
Aranacak:
Folder Comparison and Synchronization
Klasör Karşılaştırma ve Eşleştirme
+Folder pairs
+Klasör çiftleri
Follow
İzle
Free disk space available:
@@ -589,7 +597,7 @@ Bilgi
Initial synchronization:
Başlangıç eşleştirmesi:
Integrate external applications into context menu. The following macros are available:
-Dış uygulamaları sağ tuş menüsüne ekle. Şu makrolar kullanılabilir:
+Dış uygulamaları sağ tuş menüsüne ekler. Şu makrolar kullanılabilir:
Invalid FreeFileSync config file!
Geçersiz FreeFileSync yapılandırma dosyası!
Leave as unresolved conflict
@@ -599,19 +607,21 @@ Sol
Legend
Gösterge
Load configuration from file
-Yapılandırmayı dosyadan yükle
+Dosyadan yapılandırmayı yükle
Load configuration history (press DEL to delete items)
Geçmişteki yapılandırmalardan yükle (Listedeki öğeleri silmek için DEL’e basın)
Log-messages:
Günlük iletileri:
Logging
Günlükleme
+Main bar
+Ana çubuk
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
WOW64 üzerinde gölge kopyalama desteklenmiyor. FreeFileSync 64-bit sürümünü kullanın
Match case
Büyük/küçük harf uydur
-Minimum Idle Time
-En Az Boşluk Süresi
+Minimum Idle Time [seconds]
+En az boşta bekleme süresi [saniye]
Mirror ->>
Yansı ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -625,7 +635,7 @@ Sütunu aşağı taşı
Move column up
Sütunu yukarı taşı
Move files into a time-stamped subdirectory
-Dosyaları zaman damgalı bir alt klasöre taşı
+Dosyaları zaman damgasıyla bir alt klasöre taşır
Moving %x to Recycle Bin
%x Geri Dönüşüm Kutusu'na atılıyor
Moving Symbolic Link %x to user-defined directory %y
@@ -655,7 +665,7 @@ One of the FreeFileSync database entries within the following file is not yet ex
One of the FreeFileSync database files is not yet existing:
FreeFileSync veritabanı dosyalarından biri henüz yok:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
-Yalnız süzgeçten geçen dosyalar/klasörler eşleştirme için seçilir. Süzgeç, temel eşleştirme klasörlerine, adlara göre uygulanır.
+Eşleştirme için yalnız süzgeçten geçen dosya ve klasörler seçilir. Süzgeç, temel eşleştirme klasörlerine adlarla ilişkili olarak uygulanır.
Open with Explorer
Gezgin ile aç
Open with default application
@@ -686,8 +696,6 @@ Published under the GNU General Public License:
GNU Genel Kamu Lisansına şartları altında yayınlanmıştır:
Question
Soru
-Quit
-Çık
Re-enable all hidden dialogs?
Tüm gizlenmiş iletiler yeniden görünür olsun mu?
RealtimeSync - Automated Synchronization
@@ -708,6 +716,8 @@ Report translation error
Çeviri hatasını bildir
Reset
Sıfırla
+Reset view
+Görünümü sıfırla
Right
Sağ
S&ave configuration...
@@ -717,7 +727,7 @@ Orta görünümü &değiştir
Save changes to current configuration?
Değişiklikleri şu anki yapılandırmaya kaydetmek ister misiniz?
Save current configuration to file
-Kullanımdaki yapılandırmayı dosyaya kaydet
+Geçerli yapılandırmayı dosyaya kaydet
Scanning...
Taranıyor...
Scanning:
@@ -734,6 +744,8 @@ Set direction:
Yönü seçin:
Setting default synchronization directions: Old files will be overwritten with newer files.
Varsayılan eşleştirme yönleri ayarlanıyor: Yeni dosyalar eski dosyaların üzerine yazılacak.
+Show \"%x\"
+\"%x\" panelini göster
Show conflicts
Çelişkileri göster
Show files that are different
@@ -767,7 +779,7 @@ Gizlenmiş iletileri göster
Show popup
Açılır pencerede göster
Show popup on errors or warnings
-Hata ve uyarılarda açılır bir pencere gösterir
+Hata ve uyarıları açılır bir pencerede gösterir
Significant difference detected:
Önemli fark saptandı:
Silent mode
@@ -783,7 +795,7 @@ Hız:
Start
Başla
Start minimized and write status information to a logfile
-
+Simge durumuna küçültülmüş olarak başlat ve durum bilgisini günlük dosyasına yaz
Start synchronization
Eşleştirmeyi başlat
Statistics
@@ -852,12 +864,14 @@ Unresolved conflicts existing!
Çözülmemiş tutarsızlıklar var!
Update ->
Güncelle ->
+Updating attributes of %x
+%x öznitelikleri güncelleniyor
Usage:
Kullanım:
Use Recycle Bin
Geri Dönüşüm Kutusu'nu kullan
Use Recycle Bin when deleting or overwriting files
-Dosyaları silerken ve üzerine yazarken Geri Dönüşüm Kutusu'nu kullan
+Dosya silme ve üzerine yazma sırasında Geri Dönüşüm Kutusu'nu kullanır
User-defined directory
Kullanıcının belirttiği klasöre taşı
User-defined directory for deletion was not specified!
@@ -868,8 +882,8 @@ Verifying file %x
%x dosyası doğrulanıyor
Volume name %x not part of filename %y!
%x birim adı, %y dosya adının parçası değil!
-Waiting for all directories to become available...
-Tüm klasörlerlerin hazır olması bekleniyor...
+Waiting for missing directories...
+Kayıp klasörler için bekleniyor...
Waiting while directory is locked (%x)...
Klasör kilitli olduğundan bekleniyor (%x)...
Warning
diff --git a/BUILD/Resources.dat b/BUILD/Resources.dat
index b2bd5570..4b617b7c 100644
--- a/BUILD/Resources.dat
+++ b/BUILD/Resources.dat
Binary files differ
diff --git a/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj b/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj
index dffb1560..c201cbdf 100644
--- a/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj
+++ b/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj
@@ -271,6 +271,7 @@
<ClCompile Include="shared\help_provider.cpp" />
<ClCompile Include="shared\localization.cpp" />
<ClCompile Include="shared\long_path_prefix.cpp" />
+ <ClCompile Include="shared\privilege.cpp" />
<ClCompile Include="shared\recycler.cpp" />
<ClCompile Include="shared\serialize.cpp" />
<ClCompile Include="shared\shadow.cpp" />
diff --git a/FreeFileSync.cbp b/FreeFileSync.cbp
index 47bb0408..17baf847 100644
--- a/FreeFileSync.cbp
+++ b/FreeFileSync.cbp
@@ -22,6 +22,7 @@
<Linker>
<Add option="-s" />
<Add option="-static" />
+ <Add library="libwxmsw28u_aui.a" />
<Add library="libwxmsw28u_adv.a" />
<Add library="libwxmsw28u_core.a" />
<Add library="libwxbase28u.a" />
@@ -77,6 +78,7 @@
<Add library="libwxmsw28ud_core.a" />
<Add library="libwxbase28ud.a" />
<Add library="libwxbase28ud_net.a" />
+ <Add library="libwxmsw28ud_aui.a" />
<Add library="libboost_thread-mgw45-mt-sd-1_45.a" />
<Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll" />
</Linker>
@@ -107,7 +109,6 @@
</ResourceCompiler>
<Linker>
<Add option="-mthreads" />
- <Add option="-Wl,--enable-auto-import" />
<Add library="libkernel32.a" />
<Add library="libuser32.a" />
<Add library="libuuid.a" />
@@ -264,6 +265,7 @@
</Unit>
<Unit filename="shared\dir_name.cpp" />
<Unit filename="shared\dir_name.h" />
+ <Unit filename="shared\disable_standby.h" />
<Unit filename="shared\dll_loader.cpp" />
<Unit filename="shared\dll_loader.h" />
<Unit filename="shared\dst_hack.cpp" />
@@ -293,6 +295,8 @@
<Unit filename="shared\localization.h" />
<Unit filename="shared\long_path_prefix.cpp" />
<Unit filename="shared\long_path_prefix.h" />
+ <Unit filename="shared\privilege.cpp" />
+ <Unit filename="shared\privilege.h" />
<Unit filename="shared\recycler.cpp" />
<Unit filename="shared\recycler.h" />
<Unit filename="shared\serialize.cpp" />
diff --git a/FreeFileSync.vcxproj b/FreeFileSync.vcxproj
index 2d17e319..5fd7ed8a 100644
--- a/FreeFileSync.vcxproj
+++ b/FreeFileSync.vcxproj
@@ -116,7 +116,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <AdditionalDependencies>wxmsw28ud_adv.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxpngd.lib;wxzlibd.lib;wxbase28ud_net.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wxmsw28ud_aui.lib;wxmsw28ud_adv.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxpngd.lib;wxzlibd.lib;wxbase28ud_net.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories>
<LinkStatus>
</LinkStatus>
@@ -151,7 +151,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <AdditionalDependencies>wxmsw28ud_adv.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxpngd.lib;wxzlibd.lib;wxbase28ud_net.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wxmsw28ud_aui.lib;wxmsw28ud_adv.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxpngd.lib;wxzlibd.lib;wxbase28ud_net.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories>
<LinkStatus>
</LinkStatus>
@@ -187,7 +187,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SuppressStartupBanner>true</SuppressStartupBanner>
- <AdditionalDependencies>wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wxmsw28u_aui.lib;wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories>
<LinkStatus>
@@ -218,11 +218,11 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>false</GenerateDebugInformation>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SuppressStartupBanner>true</SuppressStartupBanner>
- <AdditionalDependencies>wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wxmsw28u_aui.lib;wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories>
<LinkStatus>
@@ -273,6 +273,7 @@
<ClCompile Include="shared\help_provider.cpp" />
<ClCompile Include="shared\localization.cpp" />
<ClCompile Include="shared\long_path_prefix.cpp" />
+ <ClCompile Include="shared\privilege.cpp" />
<ClCompile Include="shared\recycler.cpp" />
<ClCompile Include="shared\serialize.cpp" />
<ClCompile Include="shared\shadow.cpp" />
diff --git a/Makefile b/Makefile
index d9f9e3e3..85b41e08 100644
--- a/Makefile
+++ b/Makefile
@@ -21,12 +21,10 @@ FFS_CPPFLAGS+=`pkg-config --cflags gtkmm-2.4`
LINKFLAGS+=`pkg-config --libs gtkmm-2.4`
#support for SELinux (optional)
-ifeq ($(BUILD),release)
SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES)
ifeq ($(SELINUX_EXISTING),YES)
FFS_CPPFLAGS += -DHAVE_SELINUX
endif
-endif
FILE_LIST= #internal list of all *.cpp files needed for compilation
FILE_LIST+=structures.cpp
diff --git a/RealtimeSync/RealtimeSync.cbp b/RealtimeSync/RealtimeSync.cbp
index 4dd1addb..3bf0f88e 100644
--- a/RealtimeSync/RealtimeSync.cbp
+++ b/RealtimeSync/RealtimeSync.cbp
@@ -79,7 +79,6 @@
</ResourceCompiler>
<Linker>
<Add option="-mthreads" />
- <Add option="-Wl,--enable-auto-import" />
<Add library="libkernel32.a" />
<Add library="libuser32.a" />
<Add library="libuuid.a" />
@@ -145,6 +144,7 @@
<Unit filename="..\shared\localization.h" />
<Unit filename="..\shared\long_path_prefix.cpp" />
<Unit filename="..\shared\long_path_prefix.h" />
+ <Unit filename="..\shared\privilege.cpp" />
<Unit filename="..\shared\shadow.cpp" />
<Unit filename="..\shared\standard_paths.cpp" />
<Unit filename="..\shared\standard_paths.h" />
@@ -154,6 +154,7 @@
<Unit filename="..\shared\tinyxml\tinyxml.cpp" />
<Unit filename="..\shared\tinyxml\tinyxmlerror.cpp" />
<Unit filename="..\shared\tinyxml\tinyxmlparser.cpp" />
+ <Unit filename="..\shared\util.cpp" />
<Unit filename="..\shared\xml_base.cpp" />
<Unit filename="..\shared\xml_base.h" />
<Unit filename="..\structures.cpp" />
diff --git a/RealtimeSync/RealtimeSync.vcxproj b/RealtimeSync/RealtimeSync.vcxproj
index 858c909b..e16e892f 100644
--- a/RealtimeSync/RealtimeSync.vcxproj
+++ b/RealtimeSync/RealtimeSync.vcxproj
@@ -238,12 +238,14 @@
<ClCompile Include="..\shared\help_provider.cpp" />
<ClCompile Include="..\shared\localization.cpp" />
<ClCompile Include="..\shared\long_path_prefix.cpp" />
+ <ClCompile Include="..\shared\privilege.cpp" />
<ClCompile Include="..\shared\shadow.cpp" />
<ClCompile Include="..\shared\standard_paths.cpp" />
<ClCompile Include="..\shared\system_func.cpp" />
<ClCompile Include="..\shared\tinyxml\tinyxml.cpp" />
<ClCompile Include="..\shared\tinyxml\tinyxmlerror.cpp" />
<ClCompile Include="..\shared\tinyxml\tinyxmlparser.cpp" />
+ <ClCompile Include="..\shared\util.cpp" />
<ClCompile Include="..\shared\xml_base.cpp" />
<ClCompile Include="..\shared\zstring.cpp" />
<ClCompile Include="..\structures.cpp" />
diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp
index d3a1f0e0..55e46fc6 100644
--- a/RealtimeSync/application.cpp
+++ b/RealtimeSync/application.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "application.h"
@@ -14,6 +14,7 @@
#include "../shared/standard_paths.h"
#include <wx/file.h>
#include "../shared/string_conv.h"
+#include <wx/log.h>
#ifdef FFS_LINUX
#include <gtk/gtk.h>
@@ -92,7 +93,7 @@ int Application::OnRun()
wxFile safeOutput(ffs3::getConfigDir() + wxT("LastError.txt"), wxFile::write);
safeOutput.Write(wxString::FromAscii(e.what()));
- wxMessageBox(wxString::FromAscii(e.what()), _("An exception occurred!"), wxOK | wxICON_ERROR);
+ wxSafeShowMessage(_("An exception occurred!"), wxString::FromAscii(e.what()));
return -9;
}
diff --git a/RealtimeSync/application.h b/RealtimeSync/application.h
index 00b6a4ec..a8a931e0 100644
--- a/RealtimeSync/application.h
+++ b/RealtimeSync/application.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef REALTIMESYNCAPP_H
@@ -20,10 +20,10 @@ public:
private:
void OnStartApplication(wxIdleEvent& event);
- virtual wxLayoutDirection GetLayoutDirection() const //disable RTL languages for now...
-{
- return wxLayout_LeftToRight;
-}
+ virtual wxLayoutDirection GetLayoutDirection() const //disable RTL languages for now...
+ {
+ return wxLayout_LeftToRight;
+ }
};
diff --git a/RealtimeSync/gui_generated.cpp b/RealtimeSync/gui_generated.cpp
index 6b15a5eb..d87b536c 100644
--- a/RealtimeSync/gui_generated.cpp
+++ b/RealtimeSync/gui_generated.cpp
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 16 2008)
+// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -13,232 +13,235 @@
MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 420,440 ), wxDefaultSize );
-
- m_menubar1 = new wxMenuBar( 0 );
- m_menuFile = new wxMenu();
- wxMenuItem* m_menuItem14;
- m_menuItem14 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("CTRL-S"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem14 );
-
- wxMenuItem* m_menuItem13;
- m_menuItem13 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL-L"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem13 );
-
- m_menuFile->AppendSeparator();
-
- wxMenuItem* m_menuItem4;
- m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("CTRL-Q"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem4 );
-
- m_menubar1->Append( m_menuFile, _("&File") );
-
- m_menuHelp = new wxMenu();
- wxMenuItem* m_menuItemContent;
- m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemContent );
-
- m_menuHelp->AppendSeparator();
-
- m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("SHIFT-F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemAbout );
-
- m_menubar1->Append( m_menuHelp, _("&Help") );
-
- this->SetMenuBar( m_menubar1 );
-
- bSizerMain = new wxBoxSizer( wxVERTICAL );
-
- m_panelMain = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1;
- bSizer1 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer1->Add( 0, 10, 0, 0, 5 );
-
- wxStaticBoxSizer* sbSizer41;
- sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, wxEmptyString ), wxVERTICAL );
-
- m_staticText2 = new wxStaticText( m_panelMain, wxID_ANY, _("Usage:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText2->Wrap( -1 );
- m_staticText2->SetFont( wxFont( 10, 74, 90, 90, true, wxEmptyString ) );
-
- sbSizer41->Add( m_staticText2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- m_staticText3 = new wxStaticText( m_panelMain, wxID_ANY, _("1. Select directories to monitor."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText3->Wrap( -1 );
- sbSizer41->Add( m_staticText3, 0, wxLEFT, 10 );
-
- m_staticText4 = new wxStaticText( m_panelMain, wxID_ANY, _("2. Enter a command line."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText4->Wrap( -1 );
- sbSizer41->Add( m_staticText4, 0, wxLEFT, 10 );
-
- m_staticText5 = new wxStaticText( m_panelMain, wxID_ANY, _("3. Press 'Start'."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText5->Wrap( -1 );
- sbSizer41->Add( m_staticText5, 0, wxLEFT, 10 );
-
- m_staticline3 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- sbSizer41->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
-
- m_staticText21 = new wxStaticText( m_panelMain, wxID_ANY, _("The command line is executed each time:\n- all directories become available (e.g. USB stick insert)\n- files within these directories or subdirectories are modified"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText21->Wrap( -1 );
- sbSizer41->Add( m_staticText21, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- bSizer1->Add( sbSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 40 );
-
- m_staticline2 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer1->Add( m_staticline2, 0, wxTOP|wxBOTTOM|wxEXPAND, 10 );
-
- wxBoxSizer* bSizer8;
- bSizer8 = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sbSizer5;
- sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Directories to watch") ), wxVERTICAL );
-
- m_panelMainFolder = new wxPanel( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer114;
- bSizer114 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer781;
- bSizer781 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonAddFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonAddFolder->SetToolTip( _("Add folder") );
-
- m_bpButtonAddFolder->SetToolTip( _("Add folder") );
-
- bSizer781->Add( m_bpButtonAddFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonRemoveTopFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") );
-
- m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") );
-
- bSizer781->Add( m_bpButtonRemoveTopFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer114->Add( bSizer781, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_txtCtrlDirectoryMain = new wxTextCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer114->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerMain = new wxDirPickerCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerMain->SetToolTip( _("Select a folder") );
-
- bSizer114->Add( m_dirPickerMain, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelMainFolder->SetSizer( bSizer114 );
- m_panelMainFolder->Layout();
- bSizer114->Fit( m_panelMainFolder );
- sbSizer5->Add( m_panelMainFolder, 0, wxEXPAND, 5 );
-
- m_scrolledWinFolders = new wxScrolledWindow( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_scrolledWinFolders->SetScrollRate( 5, 5 );
- bSizerFolders = new wxBoxSizer( wxVERTICAL );
-
- m_scrolledWinFolders->SetSizer( bSizerFolders );
- m_scrolledWinFolders->Layout();
- bSizerFolders->Fit( m_scrolledWinFolders );
- sbSizer5->Add( m_scrolledWinFolders, 0, wxEXPAND, 5 );
-
- bSizer8->Add( sbSizer5, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- bSizer1->Add( bSizer8, 1, wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer3;
- sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Command line") ), wxVERTICAL );
-
- m_textCtrlCommand = new wxTextCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- sbSizer3->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM, 5 );
-
- bSizer1->Add( sbSizer3, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- wxStaticBoxSizer* sbSizer4;
- sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Minimum Idle Time") ), wxVERTICAL );
-
- m_spinCtrlDelay = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- m_spinCtrlDelay->SetToolTip( _("Idle time between detection of last change and execution of command line in seconds") );
-
- sbSizer4->Add( m_spinCtrlDelay, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer1->Add( sbSizer4, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- m_staticline1 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer1->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
-
- m_buttonStart = new wxButtonWithImage( m_panelMain, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 );
- m_buttonStart->SetDefault();
- m_buttonStart->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) );
-
- bSizer1->Add( m_buttonStart, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_buttonCancel = new wxButton( m_panelMain, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 );
- bSizer1->Add( m_buttonCancel, 0, 0, 5 );
-
- m_panelMain->SetSizer( bSizer1 );
- m_panelMain->Layout();
- bSizer1->Fit( m_panelMain );
- bSizerMain->Add( m_panelMain, 1, wxEXPAND, 5 );
-
- this->SetSizer( bSizerMain );
- this->Layout();
- bSizerMain->Fit( this );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) );
- this->Connect( m_menuItem14->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) );
- this->Connect( m_menuItem13->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) );
- this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) );
- this->Connect( m_menuItemContent->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) );
- this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) );
- m_bpButtonAddFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this );
- m_bpButtonRemoveTopFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this );
- m_buttonStart->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnQuit ), NULL, this );
+ this->SetSizeHints( wxSize( 420,440 ), wxDefaultSize );
+
+ m_menubar1 = new wxMenuBar( 0 );
+ m_menuFile = new wxMenu();
+ wxMenuItem* m_menuItem14;
+ m_menuItem14 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("CTRL-S"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem14 );
+
+ wxMenuItem* m_menuItem13;
+ m_menuItem13 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL-L"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem13 );
+
+ wxMenuItem* m_separator1;
+ m_separator1 = m_menuFile->AppendSeparator();
+
+ wxMenuItem* m_menuItem4;
+ m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("CTRL-Q"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem4 );
+
+ m_menubar1->Append( m_menuFile, _("&File") );
+
+ m_menuHelp = new wxMenu();
+ wxMenuItem* m_menuItemContent;
+ m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemContent );
+
+ wxMenuItem* m_separator2;
+ m_separator2 = m_menuHelp->AppendSeparator();
+
+ m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("SHIFT-F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemAbout );
+
+ m_menubar1->Append( m_menuHelp, _("&Help") );
+
+ this->SetMenuBar( m_menubar1 );
+
+ bSizerMain = new wxBoxSizer( wxVERTICAL );
+
+ m_panelMain = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1;
+ bSizer1 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer1->Add( 0, 10, 0, 0, 5 );
+
+ wxStaticBoxSizer* sbSizer41;
+ sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, wxEmptyString ), wxVERTICAL );
+
+ m_staticText2 = new wxStaticText( m_panelMain, wxID_ANY, _("Usage:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText2->Wrap( -1 );
+ m_staticText2->SetFont( wxFont( 10, 74, 90, 90, true, wxEmptyString ) );
+
+ sbSizer41->Add( m_staticText2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_staticText3 = new wxStaticText( m_panelMain, wxID_ANY, _("1. Select directories to monitor."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText3->Wrap( -1 );
+ sbSizer41->Add( m_staticText3, 0, wxLEFT, 10 );
+
+ m_staticText4 = new wxStaticText( m_panelMain, wxID_ANY, _("2. Enter a command line."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText4->Wrap( -1 );
+ sbSizer41->Add( m_staticText4, 0, wxLEFT, 10 );
+
+ m_staticText5 = new wxStaticText( m_panelMain, wxID_ANY, _("3. Press 'Start'."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText5->Wrap( -1 );
+ sbSizer41->Add( m_staticText5, 0, wxLEFT, 10 );
+
+ m_staticline3 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ sbSizer41->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+
+ m_staticText21 = new wxStaticText( m_panelMain, wxID_ANY, _("The command line is executed each time:\n- all directories become available (e.g. USB stick insert)\n- files within these directories or subdirectories are modified"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText21->Wrap( -1 );
+ sbSizer41->Add( m_staticText21, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ bSizer1->Add( sbSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 40 );
+
+ m_staticline2 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer1->Add( m_staticline2, 0, wxTOP|wxBOTTOM|wxEXPAND, 10 );
+
+ wxBoxSizer* bSizer8;
+ bSizer8 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer5;
+ sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Directories to watch") ), wxVERTICAL );
+
+ m_panelMainFolder = new wxPanel( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer114;
+ bSizer114 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer781;
+ bSizer781 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonAddFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonAddFolder->SetToolTip( _("Add folder") );
+
+ m_bpButtonAddFolder->SetToolTip( _("Add folder") );
+
+ bSizer781->Add( m_bpButtonAddFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonRemoveTopFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") );
+
+ m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") );
+
+ bSizer781->Add( m_bpButtonRemoveTopFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer114->Add( bSizer781, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_txtCtrlDirectoryMain = new wxTextCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer114->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerMain = new wxDirPickerCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerMain->SetToolTip( _("Select a folder") );
+
+ bSizer114->Add( m_dirPickerMain, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelMainFolder->SetSizer( bSizer114 );
+ m_panelMainFolder->Layout();
+ bSizer114->Fit( m_panelMainFolder );
+ sbSizer5->Add( m_panelMainFolder, 0, wxEXPAND, 5 );
+
+ m_scrolledWinFolders = new wxScrolledWindow( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_scrolledWinFolders->SetScrollRate( 5, 5 );
+ bSizerFolders = new wxBoxSizer( wxVERTICAL );
+
+ m_scrolledWinFolders->SetSizer( bSizerFolders );
+ m_scrolledWinFolders->Layout();
+ bSizerFolders->Fit( m_scrolledWinFolders );
+ sbSizer5->Add( m_scrolledWinFolders, 0, wxEXPAND, 5 );
+
+ bSizer8->Add( sbSizer5, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ bSizer1->Add( bSizer8, 1, wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer3;
+ sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Command line") ), wxVERTICAL );
+
+ m_textCtrlCommand = new wxTextCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ sbSizer3->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM, 5 );
+
+ bSizer1->Add( sbSizer3, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxStaticBoxSizer* sbSizer4;
+ sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Minimum Idle Time [seconds]") ), wxVERTICAL );
+
+ m_spinCtrlDelay = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ m_spinCtrlDelay->SetToolTip( _("Idle time between detection of last change and execution of command line in seconds") );
+
+ sbSizer4->Add( m_spinCtrlDelay, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer1->Add( sbSizer4, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_staticline1 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer1->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
+
+ m_buttonStart = new wxButtonWithImage( m_panelMain, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 );
+ m_buttonStart->SetDefault();
+ m_buttonStart->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) );
+
+ bSizer1->Add( m_buttonStart, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_buttonCancel = new wxButton( m_panelMain, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 );
+ bSizer1->Add( m_buttonCancel, 0, 0, 5 );
+
+ m_panelMain->SetSizer( bSizer1 );
+ m_panelMain->Layout();
+ bSizer1->Fit( m_panelMain );
+ bSizerMain->Add( m_panelMain, 1, wxEXPAND, 5 );
+
+ this->SetSizer( bSizerMain );
+ this->Layout();
+ bSizerMain->Fit( this );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) );
+ this->Connect( m_menuItem14->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) );
+ this->Connect( m_menuItem13->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) );
+ this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) );
+ this->Connect( m_menuItemContent->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) );
+ this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) );
+ m_bpButtonAddFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this );
+ m_bpButtonRemoveTopFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this );
+ m_buttonStart->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnQuit ), NULL, this );
}
MainDlgGenerated::~MainDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) );
- m_bpButtonAddFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this );
- m_bpButtonRemoveTopFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this );
- m_buttonStart->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this );
- m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnQuit ), NULL, this );
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) );
+ this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) );
+ this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) );
+ m_bpButtonAddFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this );
+ m_bpButtonRemoveTopFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this );
+ m_buttonStart->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnQuit ), NULL, this );
+
}
FolderGenerated::FolderGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
- wxBoxSizer* bSizer114;
- bSizer114 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonRemoveFolder = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") );
-
- m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") );
-
- bSizer114->Add( m_bpButtonRemoveFolder, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer20;
- bSizer20 = new wxBoxSizer( wxHORIZONTAL );
-
- m_txtCtrlDirectory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer20->Add( m_txtCtrlDirectory, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPicker = new wxDirPickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPicker->SetToolTip( _("Select a folder") );
-
- bSizer20->Add( m_dirPicker, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer114->Add( bSizer20, 1, 0, 5 );
-
- this->SetSizer( bSizer114 );
- this->Layout();
- bSizer114->Fit( this );
+ wxBoxSizer* bSizer114;
+ bSizer114 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonRemoveFolder = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") );
+
+ m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") );
+
+ bSizer114->Add( m_bpButtonRemoveFolder, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer20;
+ bSizer20 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_txtCtrlDirectory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer20->Add( m_txtCtrlDirectory, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPicker = new wxDirPickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPicker->SetToolTip( _("Select a folder") );
+
+ bSizer20->Add( m_dirPicker, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer114->Add( bSizer20, 1, 0, 5 );
+
+ this->SetSizer( bSizer114 );
+ this->Layout();
+ bSizer114->Fit( this );
}
FolderGenerated::~FolderGenerated()
diff --git a/RealtimeSync/gui_generated.h b/RealtimeSync/gui_generated.h
index 2b00d1bc..a0760448 100644
--- a/RealtimeSync/gui_generated.h
+++ b/RealtimeSync/gui_generated.h
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 16 2008)
+// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -39,72 +39,102 @@ class wxButtonWithImage;
///////////////////////////////////////////////////////////////////////////////
/// Class MainDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class MainDlgGenerated : public wxFrame
+class MainDlgGenerated : public wxFrame
{
- private:
-
- protected:
- wxMenuBar* m_menubar1;
- wxMenu* m_menuFile;
- wxMenu* m_menuHelp;
- wxMenuItem* m_menuItemAbout;
- wxBoxSizer* bSizerMain;
- wxPanel* m_panelMain;
-
- wxStaticText* m_staticText2;
- wxStaticText* m_staticText3;
- wxStaticText* m_staticText4;
- wxStaticText* m_staticText5;
- wxStaticLine* m_staticline3;
- wxStaticText* m_staticText21;
- wxStaticLine* m_staticline2;
- wxPanel* m_panelMainFolder;
- wxBitmapButton* m_bpButtonAddFolder;
- wxBitmapButton* m_bpButtonRemoveTopFolder;
- wxTextCtrl* m_txtCtrlDirectoryMain;
- wxScrolledWindow* m_scrolledWinFolders;
- wxBoxSizer* bSizerFolders;
- wxTextCtrl* m_textCtrlCommand;
- wxSpinCtrl* m_spinCtrlDelay;
- wxStaticLine* m_staticline1;
- wxButtonWithImage* m_buttonStart;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
- virtual void OnSaveConfig( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnLoadConfig( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnShowHelp( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuAbout( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnAddFolder( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnRemoveTopFolder( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnStart( wxCommandEvent& event ){ event.Skip(); }
-
-
- public:
- wxDirPickerCtrl* m_dirPickerMain;
- MainDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("RealtimeSync - Automated Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
- ~MainDlgGenerated();
-
+private:
+
+protected:
+ wxMenuBar* m_menubar1;
+ wxMenu* m_menuFile;
+ wxMenu* m_menuHelp;
+ wxMenuItem* m_menuItemAbout;
+ wxBoxSizer* bSizerMain;
+ wxPanel* m_panelMain;
+
+ wxStaticText* m_staticText2;
+ wxStaticText* m_staticText3;
+ wxStaticText* m_staticText4;
+ wxStaticText* m_staticText5;
+ wxStaticLine* m_staticline3;
+ wxStaticText* m_staticText21;
+ wxStaticLine* m_staticline2;
+ wxPanel* m_panelMainFolder;
+ wxBitmapButton* m_bpButtonAddFolder;
+ wxBitmapButton* m_bpButtonRemoveTopFolder;
+ wxTextCtrl* m_txtCtrlDirectoryMain;
+ wxScrolledWindow* m_scrolledWinFolders;
+ wxBoxSizer* bSizerFolders;
+ wxTextCtrl* m_textCtrlCommand;
+ wxSpinCtrl* m_spinCtrlDelay;
+ wxStaticLine* m_staticline1;
+ wxButtonWithImage* m_buttonStart;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event )
+ {
+ event.Skip();
+ }
+ virtual void OnSaveConfig( wxCommandEvent& event )
+ {
+ event.Skip();
+ }
+ virtual void OnLoadConfig( wxCommandEvent& event )
+ {
+ event.Skip();
+ }
+ virtual void OnQuit( wxCommandEvent& event )
+ {
+ event.Skip();
+ }
+ virtual void OnShowHelp( wxCommandEvent& event )
+ {
+ event.Skip();
+ }
+ virtual void OnMenuAbout( wxCommandEvent& event )
+ {
+ event.Skip();
+ }
+ virtual void OnAddFolder( wxCommandEvent& event )
+ {
+ event.Skip();
+ }
+ virtual void OnRemoveTopFolder( wxCommandEvent& event )
+ {
+ event.Skip();
+ }
+ virtual void OnStart( wxCommandEvent& event )
+ {
+ event.Skip();
+ }
+
+
+public:
+ wxDirPickerCtrl* m_dirPickerMain;
+
+ MainDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("RealtimeSync - Automated Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+
+ ~MainDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class FolderGenerated
///////////////////////////////////////////////////////////////////////////////
-class FolderGenerated : public wxPanel
+class FolderGenerated : public wxPanel
{
- private:
-
- protected:
-
- public:
- wxBitmapButton* m_bpButtonRemoveFolder;
- wxTextCtrl* m_txtCtrlDirectory;
- wxDirPickerCtrl* m_dirPicker;
- FolderGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
- ~FolderGenerated();
-
+private:
+
+protected:
+
+public:
+ wxBitmapButton* m_bpButtonRemoveFolder;
+ wxTextCtrl* m_txtCtrlDirectory;
+ wxDirPickerCtrl* m_dirPicker;
+
+ FolderGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+ ~FolderGenerated();
+
};
#endif //__gui_generated__
diff --git a/RealtimeSync/main_dlg.cpp b/RealtimeSync/main_dlg.cpp
index 3f22dcc3..d832b0aa 100644
--- a/RealtimeSync/main_dlg.cpp
+++ b/RealtimeSync/main_dlg.cpp
@@ -1,14 +1,13 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "main_dlg.h"
#include "resources.h"
#include "../shared/custom_button.h"
#include "../shared/standard_paths.h"
-//#include "functions.h"
#include <wx/msgdlg.h>
#include <wx/wupdlock.h>
#include "watcher.h"
@@ -22,12 +21,12 @@
#include "../shared/assert_static.h"
#include "../shared/build_info.h"
#include "../shared/help_provider.h"
+#include "../shared/util.h"
using namespace ffs3;
-MainDialog::MainDialog(wxDialog *dlg,
- const wxString& cfgFilename)
+MainDialog::MainDialog(wxDialog *dlg, const wxString& cfgFileName)
: MainDlgGenerated(dlg)
{
wxWindowUpdateLocker dummy(this); //avoid display distortion
@@ -45,31 +44,17 @@ MainDialog::MainDialog(wxDialog *dlg,
//prepare drag & drop
dirNameFirst.reset(new ffs3::DirectoryName(m_panelMainFolder, m_dirPickerMain, m_txtCtrlDirectoryMain));
- //load config values
+ //--------------------------- load config values ------------------------------------
xmlAccess::XmlRealConfig newConfig;
- bool startWatchingImmediately = false;
+ const wxString currentConfigFile = cfgFileName.empty() ? lastConfigFileName() : cfgFileName;
- if (cfgFilename.empty())
+ bool loadCfgSuccess = false;
+ if (!cfgFileName.empty() || wxFileExists(lastConfigFileName()))
try
{
- rts::readRealOrBatchConfig(lastConfigFileName(), newConfig);
- }
- catch (const xmlAccess::XmlError& error)
- {
- if (wxFileExists(lastConfigFileName())) //show error only if it's a parsing problem
- {
- if (error.getSeverity() == xmlAccess::XmlError::WARNING)
- wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING);
- else
- wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR);
- }
- }
- else
- try
- {
- rts::readRealOrBatchConfig(cfgFilename, newConfig);
- startWatchingImmediately = true;
+ rts::readRealOrBatchConfig(currentConfigFile, newConfig);
+ loadCfgSuccess = true;
}
catch (const xmlAccess::XmlError& error)
{
@@ -79,7 +64,11 @@ MainDialog::MainDialog(wxDialog *dlg,
wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR);
}
+ const bool startWatchingImmediately = loadCfgSuccess && !cfgFileName.empty();
+
setConfiguration(newConfig);
+ setLastUsedConfig(currentConfigFile);
+ //-----------------------------------------------------------------------------------------
Fit();
Center();
@@ -181,9 +170,7 @@ void MainDialog::OnStart(wxCommandEvent& event)
Hide();
- wxWindowDisabler dummy; //avoid unwanted re-entrance in the following process
-
- switch (rts::startDirectoryMonitor(currentCfg))
+ switch (rts::startDirectoryMonitor(currentCfg, ffs3::extractJobName(currentConfigFileName)))
{
case rts::QUIT:
{
@@ -202,7 +189,11 @@ void MainDialog::OnStart(wxCommandEvent& event)
void MainDialog::OnSaveConfig(wxCommandEvent& event)
{
- const wxString defaultFileName = wxT("Realtime.ffs_real");
+ wxString defaultFileName = currentConfigFileName.empty() ? wxT("Realtime.ffs_real") : currentConfigFileName;
+ //attention: currentConfigFileName may be an imported *.ffs_batch file! We don't want to overwrite it with a GUI config!
+ if (defaultFileName.EndsWith(wxT(".ffs_batch")))
+ defaultFileName.Replace(wxT(".ffs_batch"), wxT(".ffs_real"), false);
+
wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, defaultFileName, wxString(_("RealtimeSync configuration")) + wxT(" (*.ffs_real)|*.ffs_real"), wxFD_SAVE);
if (filePicker->ShowModal() == wxID_OK)
@@ -212,19 +203,16 @@ void MainDialog::OnSaveConfig(wxCommandEvent& event)
if (wxFileExists(newFileName))
{
wxMessageDialog* messageDlg = new wxMessageDialog(this, wxString(_("File already exists. Overwrite?")) + wxT(" \"") + newFileName + wxT("\""), _("Warning") , wxOK | wxCANCEL);
-
if (messageDlg->ShowModal() != wxID_OK)
- {
- OnSaveConfig(event); //retry
- return;
- }
+ return OnSaveConfig(event); //retry
}
+ //write config to XML
const xmlAccess::XmlRealConfig currentCfg = getConfiguration();
-
- try //write config to XML
+ try
{
writeRealConfig(currentCfg, newFileName);
+ setLastUsedConfig(newFileName);
}
catch (const ffs3::FileError& error)
{
@@ -254,6 +242,23 @@ void MainDialog::loadConfig(const wxString& filename)
}
setConfiguration(newConfig);
+ setLastUsedConfig(filename);
+}
+
+
+void MainDialog::setLastUsedConfig(const wxString& filename)
+{
+ //set title
+ if (filename == lastConfigFileName())
+ {
+ SetTitle(_("RealtimeSync - Automated Synchronization"));
+ currentConfigFileName.clear();
+ }
+ else
+ {
+ SetTitle(wxString(wxT("RealtimeSync - ")) + filename);
+ currentConfigFileName = filename;
+ }
}
diff --git a/RealtimeSync/main_dlg.h b/RealtimeSync/main_dlg.h
index 22c39146..7f052e39 100644
--- a/RealtimeSync/main_dlg.h
+++ b/RealtimeSync/main_dlg.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef REALTIMESYNCMAIN_H
@@ -44,7 +44,7 @@ private:
class MainDialog: public MainDlgGenerated
{
public:
- MainDialog(wxDialog *dlg, const wxString& cfgFilename);
+ MainDialog(wxDialog *dlg, const wxString& cfgFileName);
~MainDialog();
void loadConfig(const wxString& filename);
@@ -64,6 +64,7 @@ private:
void setConfiguration(const xmlAccess::XmlRealConfig& cfg);
xmlAccess::XmlRealConfig getConfiguration();
+ void setLastUsedConfig(const wxString& filename);
void layoutAsync(); //call Layout() asynchronously
@@ -76,6 +77,8 @@ private:
std::auto_ptr<ffs3::DirectoryName> dirNameFirst;
std::vector<DirectoryPanel*> dirNamesExtra; //additional pairs to the standard pair
+
+ wxString currentConfigFileName;
};
#endif // REALTIMESYNCMAIN_H
diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile
index e60ca3bf..a445b922 100644
--- a/RealtimeSync/makefile
+++ b/RealtimeSync/makefile
@@ -7,7 +7,7 @@ FFS_CPPFLAGS = -Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debu
LINKFLAGS = `wx-config --libs --debug=no --unicode=yes` -lboost_thread -O3 -pthread
#static build used for precompiled release
-ifeq ($(BUILD),static)
+ifeq ($(BUILD),release)
FFS_CPPFLAGS = -Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes --static=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -O3 -pthread
LINKFLAGS = `wx-config --libs --debug=no --unicode=yes --static=yes` /usr/local/lib/libboost_thread.a -O3 -pthread
endif
@@ -23,6 +23,7 @@ FILE_LIST+=xml_proc.cpp
FILE_LIST+=xml_ffs.cpp
FILE_LIST+=../library/process_xml.cpp
FILE_LIST+=../structures.cpp
+FILE_LIST+=../shared/util.cpp
FILE_LIST+=../shared/check_exist.cpp
FILE_LIST+=../shared/localization_no_BOM.cpp
FILE_LIST+=../shared/inotify/inotify-cxx.cpp
diff --git a/RealtimeSync/notify.cpp b/RealtimeSync/notify.cpp
index c87c15fc..182b7cd0 100644
--- a/RealtimeSync/notify.cpp
+++ b/RealtimeSync/notify.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "notify.h"
@@ -199,7 +199,7 @@ public:
{
const DWORD lastError = ::GetLastError();
if (lastError != ERROR_CALL_NOT_IMPLEMENTED && //fail on SAMBA share: this shouldn't be a showstopper!
- lastError != ERROR_SERVICE_SPECIFIC_ERROR) //neither should be fail for "Pogoplug" mapped network drives
+ lastError != ERROR_SERVICE_SPECIFIC_ERROR) //neither should be fail for "Pogoplug" mapped network drives
throw ffs3::FileError(wxString(wxT("Could not register device removal notifications:")) + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError));
}
else
diff --git a/RealtimeSync/notify.h b/RealtimeSync/notify.h
index 07d74f2a..1f7a204a 100644
--- a/RealtimeSync/notify.h
+++ b/RealtimeSync/notify.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef NOTIFY_H_INCLUDED
diff --git a/RealtimeSync/pch.h b/RealtimeSync/pch.h
index 53076de8..9894b1c5 100644
--- a/RealtimeSync/pch.h
+++ b/RealtimeSync/pch.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef RTS_PRECOMPILED_HEADER
diff --git a/RealtimeSync/resource.rc b/RealtimeSync/resource.rc
index f3dfb090..dcdb6ad1 100644
--- a/RealtimeSync/resource.rc
+++ b/RealtimeSync/resource.rc
@@ -20,7 +20,7 @@ BEGIN
VALUE "FileVersion", VER_FREEFILESYNC_STR
VALUE "ProductName", "RealtimeSync\0"
VALUE "ProductVersion", VER_FREEFILESYNC_STR
- VALUE "LegalCopyright", "(c) 2008 - 2010 ZenJu\0"
+ VALUE "LegalCopyright", "(c) 2008 - 2011 ZenJu\0"
END
END
BLOCK "VarFileInfo"
diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp
index b6e35c38..f966d4fa 100644
--- a/RealtimeSync/resources.cpp
+++ b/RealtimeSync/resources.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "resources.h"
diff --git a/RealtimeSync/resources.h b/RealtimeSync/resources.h
index 5a9f780b..1237c811 100644
--- a/RealtimeSync/resources.h
+++ b/RealtimeSync/resources.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef RESOURCES_H_INCLUDED
diff --git a/RealtimeSync/tray_menu.cpp b/RealtimeSync/tray_menu.cpp
index 9c0db35a..c85df169 100644
--- a/RealtimeSync/tray_menu.cpp
+++ b/RealtimeSync/tray_menu.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "tray_menu.h"
@@ -29,7 +29,7 @@ using namespace rts;
class TrayIconHolder : private wxEvtHandler
{
public:
- TrayIconHolder();
+ TrayIconHolder(const wxString& jobname);
~TrayIconHolder();
void doUiRefreshNow();
@@ -61,6 +61,8 @@ private:
bool m_abortRequested;
bool m_resumeRequested;
+
+ const wxString jobName_; //RTS job name, may be empty
};
@@ -113,9 +115,10 @@ private:
//##############################################################################################################
-TrayIconHolder::TrayIconHolder() :
+TrayIconHolder::TrayIconHolder(const wxString& jobname) :
m_abortRequested(false),
- m_resumeRequested(false)
+ m_resumeRequested(false),
+ jobName_(jobname)
{
trayMenu = new RtsTrayIcon(this); //not in initialization list: give it a valid parent object!
@@ -146,7 +149,8 @@ void TrayIconHolder::showIconActive()
#elif defined FFS_LINUX
realtimeIcon.CopyFromBitmap(GlobalResources::getInstance().getImageByName(wxT("RTS_tray_linux.png"))); //use a 22x22 bitmap for perfect fit
#endif
- trayMenu->SetIcon(realtimeIcon, wxString(wxT("RealtimeSync")) + wxT(" - ") + _("Monitoring active..."));
+ const wxString postFix = jobName_.empty() ? wxString() : (wxT("\n\"") + jobName_ + wxT("\""));
+ trayMenu->SetIcon(realtimeIcon, _("Monitoring active...") + postFix);
}
@@ -158,7 +162,8 @@ void TrayIconHolder::showIconWaiting()
#elif defined FFS_LINUX
realtimeIcon.CopyFromBitmap(GlobalResources::getInstance().getImageByName(wxT("RTS_tray_waiting_linux.png"))); //use a 22x22 bitmap for perfect fit
#endif
- trayMenu->SetIcon(realtimeIcon, wxString(wxT("RealtimeSync")) + wxT(" - ") + _("Waiting for all directories to become available..."));
+ const wxString postFix = jobName_.empty() ? wxString() : (wxT("\n\"") + jobName_ + wxT("\""));
+ trayMenu->SetIcon(realtimeIcon, _("Waiting for missing directories...") + postFix);
}
@@ -231,7 +236,9 @@ class StartSyncNowException {};
class WaitCallbackImpl : public rts::WaitCallback
{
public:
- WaitCallbackImpl() : nextSyncStart_(std::numeric_limits<long>::max()) {}
+ WaitCallbackImpl(const wxString& jobname) :
+ trayIcon(jobname),
+ nextSyncStart_(std::numeric_limits<long>::max()) {}
void notifyAllDirectoriesExist()
{
@@ -279,13 +286,13 @@ watcher.h (low level wait for directory changes)
*/
-rts::MonitorResponse rts::startDirectoryMonitor(const xmlAccess::XmlRealConfig& config)
+rts::MonitorResponse rts::startDirectoryMonitor(const xmlAccess::XmlRealConfig& config, const wxString& jobname)
{
const std::vector<Zstring> dirList = convert(config.directories);
try
{
- WaitCallbackImpl callback;
+ WaitCallbackImpl callback(jobname);
if (config.commandline.empty())
throw ffs3::FileError(_("Command line is empty!"));
@@ -296,7 +303,14 @@ rts::MonitorResponse rts::startDirectoryMonitor(const xmlAccess::XmlRealConfig&
while (true)
{
- wxExecute(config.commandline, wxEXEC_SYNC); //execute command
+ //execute command
+ {
+ //by default wxExecute uses a zero sized dummy window as a hack to keep focus which leaves a useless empty icon in ALT-TAB list
+ //=> use wxEXEC_NODISABLE and roll our own window disabler! (see comment in app.cpp: void *wxGUIAppTraits::BeforeChildWaitLoop())
+ wxWindowDisabler dummy; //disables all top level windows
+ wxExecute(config.commandline, wxEXEC_SYNC | wxEXEC_NODISABLE);
+ }
+
wxLog::FlushActive(); //show wxWidgets error messages (if any)
callback.scheduleNextSync(std::numeric_limits<long>::max()); //next sync not scheduled (yet)
diff --git a/RealtimeSync/tray_menu.h b/RealtimeSync/tray_menu.h
index 048fda60..01fbba17 100644
--- a/RealtimeSync/tray_menu.h
+++ b/RealtimeSync/tray_menu.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef TRAYMENU_H_INCLUDED
@@ -19,7 +19,7 @@ enum MonitorResponse
QUIT
};
-MonitorResponse startDirectoryMonitor(const xmlAccess::XmlRealConfig& config);
+MonitorResponse startDirectoryMonitor(const xmlAccess::XmlRealConfig& config, const wxString& jobname); //jobname may be empty
}
diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp
index d03c98b8..029b2d00 100644
--- a/RealtimeSync/watcher.cpp
+++ b/RealtimeSync/watcher.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "watcher.h"
diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h
index dc579edc..7208e7fb 100644
--- a/RealtimeSync/watcher.h
+++ b/RealtimeSync/watcher.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef WATCHER_H_INCLUDED
@@ -30,9 +30,9 @@ public:
//wait until changes are detected or if a directory is not available (anymore)
enum WaitResult
{
- CHANGE_DETECTED,
- CHANGE_DIR_MISSING
- };
+ CHANGE_DETECTED,
+ CHANGE_DIR_MISSING
+};
WaitResult waitForChanges(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler); //throw(FileError)
//wait until all directories become available (again)
diff --git a/RealtimeSync/xml_ffs.cpp b/RealtimeSync/xml_ffs.cpp
index 864ceff9..be798efc 100644
--- a/RealtimeSync/xml_ffs.cpp
+++ b/RealtimeSync/xml_ffs.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "xml_ffs.h"
diff --git a/RealtimeSync/xml_ffs.h b/RealtimeSync/xml_ffs.h
index cef11c9f..69e6e7a9 100644
--- a/RealtimeSync/xml_ffs.h
+++ b/RealtimeSync/xml_ffs.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef XMLFREEFILESYNC_H_INCLUDED
diff --git a/RealtimeSync/xml_proc.cpp b/RealtimeSync/xml_proc.cpp
index 273a687f..ca217b44 100644
--- a/RealtimeSync/xml_proc.cpp
+++ b/RealtimeSync/xml_proc.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "xml_proc.h"
diff --git a/RealtimeSync/xml_proc.h b/RealtimeSync/xml_proc.h
index 3e6c0c0a..70a879a8 100644
--- a/RealtimeSync/xml_proc.h
+++ b/RealtimeSync/xml_proc.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef XMLPROCESSING_H_INCLUDED
diff --git a/algorithm.cpp b/algorithm.cpp
index 93aacf40..ec3944ee 100644
--- a/algorithm.cpp
+++ b/algorithm.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "algorithm.h"
@@ -18,21 +18,12 @@
#include "shared/global_func.h"
#include "shared/loki/TypeManip.h"
#include "library/db_file.h"
+#include "library/cmp_filetime.h"
//#include "shared/loki/NullType.h"
using namespace ffs3;
-wxString ffs3::extractJobName(const wxString& configFilename)
-{
- using namespace common;
-
- const wxString shortName = configFilename.AfterLast(FILE_NAME_SEPARATOR); //returns the whole string if seperator not found
- const wxString jobName = shortName.BeforeLast(wxChar('.')); //returns empty string if seperator not found
- return jobName.IsEmpty() ? shortName : jobName;
-}
-
-
void ffs3::swapGrids(const MainConfiguration& config, FolderComparison& folderCmp)
{
std::for_each(folderCmp.begin(), folderCmp.end(), boost::bind(&BaseDirMapping::swap, _1));
@@ -120,6 +111,9 @@ private:
case FILE_EQUAL:
fileObj.setSyncDir(SYNC_DIR_NONE);
break;
+ case FILE_DIFFERENT_METADATA:
+ fileObj.setSyncDir(config.conflict); //use setting from "conflict/cannot categorize"
+ break;
}
}
@@ -148,6 +142,10 @@ private:
case SYMLINK_EQUAL:
linkObj.setSyncDir(SYNC_DIR_NONE);
break;
+ case SYMLINK_DIFFERENT_METADATA:
+ linkObj.setSyncDir(config.conflict); //use setting from "conflict/cannot categorize"
+ break;
+
}
}
@@ -164,6 +162,9 @@ private:
case DIR_EQUAL:
dirObj.setSyncDir(SYNC_DIR_NONE);
break;
+ case DIR_DIFFERENT_METADATA:
+ dirObj.setSyncDir(config.conflict); //use setting from "conflict/cannot categorize"
+ break;
}
//recursion
@@ -219,61 +220,44 @@ bool ffs3::allElementsEqual(const FolderComparison& folderCmp)
{
return std::find_if(folderCmp.begin(), folderCmp.end(), std::not1(AllElementsEqual())) == folderCmp.end();
}
-
-//---------------------------------------------------------------------------------------------------------------
-inline
-bool sameFileTime(const wxLongLong& a, const wxLongLong& b, size_t tolerance)
-{
- if (a < b)
- return b <= a + tolerance;
- else
- return a <= b + tolerance;
-}
//---------------------------------------------------------------------------------------------------------------
class DataSetFile
{
public:
- DataSetFile(const FileMapping& fileObj, Loki::Int2Type<LEFT_SIDE>) :
- lastWriteTime_(NULL),
- fileSize_(NULL)
+ DataSetFile() {}
+
+ DataSetFile(const Zstring& name, const FileDescriptor& fileDescr)
{
- init<LEFT_SIDE>(fileObj);
+ shortName = name;
+ lastWriteTime = fileDescr.lastWriteTimeRaw;
+ fileSize = fileDescr.fileSize;
}
- DataSetFile(const FileMapping& fileObj, Loki::Int2Type<RIGHT_SIDE>) :
- lastWriteTime_(NULL),
- fileSize_(NULL)
+ DataSetFile(const FileMapping& fileObj, Loki::Int2Type<LEFT_SIDE>)
{
- init<RIGHT_SIDE>(fileObj);
+ init<LEFT_SIDE>(fileObj);
}
-
- DataSetFile(const FileContainer* fileCont) :
- lastWriteTime_(NULL),
- fileSize_(NULL)
+ DataSetFile(const FileMapping& fileObj, Loki::Int2Type<RIGHT_SIDE>)
{
- if (fileCont)
- {
- const FileDescriptor& dbData = fileCont->getData();
- lastWriteTime_ = &dbData.lastWriteTimeRaw;
- fileSize_ = &dbData.fileSize;
- }
+ init<RIGHT_SIDE>(fileObj);
}
bool operator==(const DataSetFile& other) const
{
- if (lastWriteTime_ == NULL)
- return other.lastWriteTime_ == NULL;
+ if (shortName.empty())
+ return other.shortName.empty();
else
{
- if (other.lastWriteTime_ == NULL)
+ if (other.shortName.empty())
return false;
else
{
- //respect 2 second FAT/FAT32 precision! copying a file to a FAT32 drive changes it's modification date by up to 2 seconds
- return ::sameFileTime(*lastWriteTime_, *other.lastWriteTime_, 2) &&
- *fileSize_ == *other.fileSize_;
+ return shortName == other.shortName && //detect changes in case (windows)
+ //respect 2 second FAT/FAT32 precision! copying a file to a FAT32 drive changes it's modification date by up to 2 seconds
+ sameFileTime(lastWriteTime, other.lastWriteTime, 2) &&
+ fileSize == other.fileSize;
}
}
}
@@ -290,13 +274,15 @@ private:
{
if (!fileObj.isEmpty<side>())
{
- lastWriteTime_ = &fileObj.getLastWriteTime<side>();
- fileSize_ = &fileObj.getFileSize<side>();
+ shortName = fileObj.getShortName<side>();
+ lastWriteTime = fileObj.getLastWriteTime<side>();
+ fileSize = fileObj.getFileSize<side>();
}
}
- const wxLongLong* lastWriteTime_; //optional
- const wxULongLong* fileSize_; //optional
+ Zstring shortName; //empty if object not existing
+ wxLongLong lastWriteTime;
+ wxULongLong fileSize;
};
@@ -304,6 +290,22 @@ private:
class DataSetSymlink
{
public:
+ DataSetSymlink()
+#ifdef FFS_WIN
+ : type(LinkDescriptor::TYPE_FILE) //dummy value
+#endif
+ {}
+
+ DataSetSymlink(const Zstring& name, const LinkDescriptor& linkDescr)
+ {
+ shortName = name;
+ lastWriteTime = linkDescr.lastWriteTimeRaw;
+ targetPath = linkDescr.targetPath;
+#ifdef FFS_WIN //type of symbolic link is relevant for Windows only
+ type = linkDescr.type;
+#endif
+ }
+
DataSetSymlink(const SymLinkMapping& linkObj, Loki::Int2Type<LEFT_SIDE>)
{
init<LEFT_SIDE>(linkObj);
@@ -314,35 +316,23 @@ public:
init<RIGHT_SIDE>(linkObj);
}
- DataSetSymlink(const SymLinkContainer* linkCont)
- {
- if (linkCont)
- {
- const LinkDescriptor& dbData = linkCont->getData();
- data.lastWriteTime = &dbData.lastWriteTimeRaw;
- data.targetPath = &dbData.targetPath;
-#ifdef FFS_WIN //type of symbolic link is relevant for Windows only
- data.type = dbData.type;
-#endif
- }
- }
-
bool operator==(const DataSetSymlink& other) const
{
- if (data.lastWriteTime == NULL) //implicit test if object is existing at all
- return other.data.lastWriteTime == NULL;
+ if (shortName.empty()) //test if object is existing at all
+ return other.shortName.empty();
else
{
- if (other.data.lastWriteTime == NULL)
+ if (other.shortName.empty())
return false;
else
{
- //respect 2 second FAT/FAT32 precision! copying a file to a FAT32 drive changes it's modification date by up to 2 seconds
- return *data.targetPath == *other.data.targetPath &&
+ return shortName == other.shortName &&
+ //respect 2 second FAT/FAT32 precision! copying a file to a FAT32 drive changes it's modification date by up to 2 seconds
+ sameFileTime(lastWriteTime, other.lastWriteTime, 2) &&
#ifdef FFS_WIN //comparison of symbolic link type is relevant for Windows only
- data.type == other.data.type &&
+ type == other.type &&
#endif
- (!data.targetPath->empty() || ::sameFileTime(*data.lastWriteTime, *other.data.lastWriteTime, 2)); //date may be ignored, if targetPaths can actually be considered
+ targetPath == other.targetPath;
}
}
}
@@ -357,30 +347,27 @@ private:
template <SelectedSide side>
void init(const SymLinkMapping& linkObj)
{
+#ifdef FFS_WIN
+ type = LinkDescriptor::TYPE_FILE; //always initialize
+#endif
+
if (!linkObj.isEmpty<side>())
{
- data.lastWriteTime = &linkObj.getLastWriteTime<side>();
- data.targetPath = &linkObj.getTargetPath<side>();
+ shortName = linkObj.getShortName<side>();
+ lastWriteTime = linkObj.getLastWriteTime<side>();
+ targetPath = linkObj.getTargetPath<side>();
#ifdef FFS_WIN //type of symbolic link is relevant for Windows only
- data.type = linkObj.getLinkType<side>();
+ type = linkObj.getLinkType<side>();
#endif
}
}
- struct DataReferences
- {
- DataReferences() :
-#ifdef FFS_WIN //type of symbolic link is relevant for Windows only
- type(LinkDescriptor::TYPE_FILE),
-#endif
- lastWriteTime(NULL), targetPath(NULL) {}
-
+ Zstring shortName; //empty if object not existing
+ wxLongLong lastWriteTime;
+ Zstring targetPath;
#ifdef FFS_WIN
- LinkDescriptor::LinkType type;
+ LinkDescriptor::LinkType type;
#endif
- const wxLongLong* lastWriteTime; //use to test for overall object existence!
- const Zstring* targetPath;
- } data;
};
@@ -388,18 +375,20 @@ private:
class DataSetDir
{
public:
+ DataSetDir() {}
+
+ DataSetDir(const Zstring& name) :
+ shortName(name) {}
+
DataSetDir(const DirMapping& dirObj, Loki::Int2Type<LEFT_SIDE>) :
- existing(!dirObj.isEmpty<LEFT_SIDE>()) {}
+ shortName(dirObj.getShortName<LEFT_SIDE>()) {}
DataSetDir(const DirMapping& dirObj, Loki::Int2Type<RIGHT_SIDE>) :
- existing(!dirObj.isEmpty<RIGHT_SIDE>()) {}
-
- DataSetDir(bool isExising) :
- existing(isExising) {}
+ shortName(dirObj.getShortName<RIGHT_SIDE>()) {}
bool operator==(const DataSetDir& other) const
{
- return existing == other.existing;
+ return shortName == other.shortName;
}
template <class T>
@@ -409,7 +398,7 @@ public:
}
private:
- bool existing;
+ Zstring shortName; //empty if object not existing
};
@@ -417,19 +406,25 @@ private:
DataSetFile retrieveDataSetFile(const Zstring& objShortName, const DirContainer* dbDirectory)
{
if (dbDirectory)
- return dbDirectory->findFile(objShortName); //return value may be NULL
+ {
+ DirContainer::FileList::const_iterator iter = dbDirectory->files.find(objShortName);
+ if (iter != dbDirectory->files.end())
+ return DataSetFile(iter->first, iter->second);
+ }
- //object not found
- return DataSetFile(NULL);
+ return DataSetFile(); //object not found
}
DataSetSymlink retrieveDataSetSymlink(const Zstring& objShortName, const DirContainer* dbDirectory)
{
if (dbDirectory)
- return dbDirectory->findLink(objShortName); //return value may be NULL
+ {
+ DirContainer::LinkList::const_iterator iter = dbDirectory->links.find(objShortName);
+ if (iter != dbDirectory->links.end())
+ return DataSetSymlink(iter->first, iter->second);
+ }
- //object not found
- return DataSetSymlink(NULL);
+ return DataSetSymlink(); //object not found
}
@@ -437,17 +432,17 @@ std::pair<DataSetDir, const DirContainer*> retrieveDataSetDir(const Zstring& obj
{
if (dbDirectory)
{
- const DirContainer* dbDir = dbDirectory->findDir(objShortName);
- if (dbDir)
- return std::make_pair(DataSetDir(true), dbDir);
+ DirContainer::DirList::const_iterator iter = dbDirectory->dirs.find(objShortName);
+ if (iter != dbDirectory->dirs.end())
+ return std::make_pair(DataSetDir(iter->first), &iter->second);
}
- //object not found
- return std::make_pair(DataSetDir(false), static_cast<const DirContainer*>(NULL));
+ return std::make_pair(DataSetDir(), static_cast<const DirContainer*>(NULL)); //object not found
}
//--------------------------------------------------------------------------------------------------------
+/*
class SetDirChangedFilter
{
public:
@@ -515,7 +510,7 @@ private:
const wxString txtFilterChanged;
};
-
+*/
//test whether planned deletion of a directory is in conflict with (direct!) sub-elements that are not categorized for deletion (e.g. shall be copied or are in conflict themselves)
class FindDeleteDirConflictNonRec
@@ -544,6 +539,8 @@ public:
case SO_OVERWRITE_RIGHT:
case SO_DO_NOTHING:
case SO_EQUAL:
+ case SO_COPY_METADATA_TO_LEFT:
+ case SO_COPY_METADATA_TO_RIGHT:
;
}
return false;
@@ -622,22 +619,22 @@ private:
return std::pair<DirInfoPtr, DirInfoPtr>(); //NULL
}
+ /*
+ bool filterFileConflictFound(const Zstring& relativeName) const
+ {
+ //if filtering would have excluded file during database creation, then we can't say anything about its former state
+ return (dbFilterLeft && !dbFilterLeft ->passFileFilter(relativeName)) ||
+ (dbFilterRight && !dbFilterRight->passFileFilter(relativeName));
+ }
- bool filterFileConflictFound(const Zstring& shortname) const
- {
- //if filtering would have excluded file during database creation, then we can't say anything about its former state
- return (dbFilterLeft && !dbFilterLeft ->passFileFilter(shortname)) ||
- (dbFilterRight && !dbFilterRight->passFileFilter(shortname));
- }
-
-
- bool filterDirConflictFound(const Zstring& shortname) const
- {
- //if filtering would have excluded directory during database creation, then we can't say anything about its former state
- return (dbFilterLeft && !dbFilterLeft ->passDirFilter(shortname, NULL)) ||
- (dbFilterRight && !dbFilterRight->passDirFilter(shortname, NULL));
- }
+ bool filterDirConflictFound(const Zstring& relativeName) const
+ {
+ //if filtering would have excluded directory during database creation, then we can't say anything about its former state
+ return (dbFilterLeft && !dbFilterLeft ->passDirFilter(relativeName, NULL)) ||
+ (dbFilterRight && !dbFilterRight->passDirFilter(relativeName, NULL));
+ }
+ */
template<typename Iterator, typename Function>
friend Function std::for_each(Iterator, Iterator, Function);
@@ -681,17 +678,18 @@ private:
}
//#####################################################################################################
-
- if (filterFileConflictFound(fileObj.getObjShortName()))
- {
- if (cat == FILE_LEFT_SIDE_ONLY)
- fileObj.setSyncDir(SYNC_DIR_RIGHT);
- else if (cat == FILE_RIGHT_SIDE_ONLY)
- fileObj.setSyncDir(SYNC_DIR_LEFT);
- else
- fileObj.setSyncDirConflict(txtFilterChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
- return;
- }
+ /*
+ if (filterFileConflictFound(fileObj.getObjRelativeName()))
+ {
+ if (cat == FILE_LEFT_SIDE_ONLY)
+ fileObj.setSyncDir(SYNC_DIR_RIGHT);
+ else if (cat == FILE_RIGHT_SIDE_ONLY)
+ fileObj.setSyncDir(SYNC_DIR_LEFT);
+ else
+ fileObj.setSyncDirConflict(txtFilterChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
+ return;
+ }
+ */
//determine datasets for change detection
const DataSetFile dataDbLeft = retrieveDataSetFile(fileObj.getObjShortName(), dbDirectoryLeft);
@@ -746,16 +744,18 @@ private:
if (cat == SYMLINK_EQUAL)
return;
- if (filterFileConflictFound(linkObj.getObjShortName())) //always use file filter: Link type may not be "stable" on Linux!
- {
- if (cat == SYMLINK_LEFT_SIDE_ONLY)
- linkObj.setSyncDir(SYNC_DIR_RIGHT);
- else if (cat == SYMLINK_RIGHT_SIDE_ONLY)
- linkObj.setSyncDir(SYNC_DIR_LEFT);
- else
- linkObj.setSyncDirConflict(txtFilterChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
- return;
- }
+ /*
+ if (filterFileConflictFound(linkObj.getObjRelativeName())) //always use file filter: Link type may not be "stable" on Linux!
+ {
+ if (cat == SYMLINK_LEFT_SIDE_ONLY)
+ linkObj.setSyncDir(SYNC_DIR_RIGHT);
+ else if (cat == SYMLINK_RIGHT_SIDE_ONLY)
+ linkObj.setSyncDir(SYNC_DIR_LEFT);
+ else
+ linkObj.setSyncDirConflict(txtFilterChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
+ return;
+ }
+ */
//determine datasets for change detection
const DataSetSymlink dataDbLeft = retrieveDataSetSymlink(linkObj.getObjShortName(), dbDirectoryLeft);
@@ -801,24 +801,25 @@ private:
{
const CompareDirResult cat = dirObj.getDirCategory();
- if (filterDirConflictFound(dirObj.getObjShortName()))
- {
- switch (cat)
- {
- case DIR_LEFT_SIDE_ONLY:
- dirObj.setSyncDir(SYNC_DIR_RIGHT);
- break;
- case DIR_RIGHT_SIDE_ONLY:
- dirObj.setSyncDir(SYNC_DIR_LEFT);
- break;
- case DIR_EQUAL:
- ;
- }
-
- SetDirChangedFilter().execute(dirObj); //filter issue for this directory => treat subfiles/-dirs the same
- return;
- }
+ /*
+ if (filterDirConflictFound(dirObj.getObjRelativeName()))
+ {
+ switch (cat)
+ {
+ case DIR_LEFT_SIDE_ONLY:
+ dirObj.setSyncDir(SYNC_DIR_RIGHT);
+ break;
+ case DIR_RIGHT_SIDE_ONLY:
+ dirObj.setSyncDir(SYNC_DIR_LEFT);
+ break;
+ case DIR_EQUAL:
+ ;
+ }
+ SetDirChangedFilter().execute(dirObj); //filter issue for this directory => treat subfiles/-dirs the same
+ return;
+ }
+ */
//determine datasets for change detection
const std::pair<DataSetDir, const DirContainer*> dataDbLeftStuff = retrieveDataSetDir(dirObj.getObjShortName(), dbDirectoryLeft);
const std::pair<DataSetDir, const DirContainer*> dataDbRightStuff = retrieveDataSetDir(dirObj.getObjShortName(), dbDirectoryRight);
diff --git a/algorithm.h b/algorithm.h
index c1acec9e..4e3a5e83 100644
--- a/algorithm.h
+++ b/algorithm.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef ALGORITHM_H_INCLUDED
@@ -14,8 +14,6 @@ namespace ffs3
{
class BaseFilter;
- wxString extractJobName(const wxString& configFilename);
-
void swapGrids(const MainConfiguration& config, FolderComparison& folderCmp);
struct DeterminationProblem //callback
diff --git a/comparison.cpp b/comparison.cpp
index db56ea54..7e4c00c9 100644
--- a/comparison.cpp
+++ b/comparison.cpp
@@ -1,14 +1,14 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "comparison.h"
#include <stdexcept>
#include "shared/global_func.h"
#include <wx/intl.h>
-#include <wx/timer.h>
+//#include <wx/timer.h>
#include <wx/msgdlg.h>
#include <wx/log.h>
#include "algorithm.h"
@@ -24,6 +24,7 @@
#include <boost/bind.hpp>
#include "library/binary.h"
#include "library/dir_lock.h"
+#include "library/cmp_filetime.h"
#ifdef FFS_WIN
#include "shared/perf.h"
@@ -459,46 +460,43 @@ void foldersAreValidForComparison(const std::vector<FolderPairCfg>& folderPairsF
}
-bool dependencyExists(const std::set<Zstring>& folders, const Zstring& newFolder, wxString& warningMessage)
+namespace
+{
+struct EqualDependentDirectory : public std::binary_function<Zstring, Zstring, bool>
{
- for (std::set<Zstring>::const_iterator i = folders.begin(); i != folders.end(); ++i)
+ bool operator()(const Zstring& lhs, const Zstring& rhs) const
{
- const size_t commonLen = std::min(newFolder.length(), i->length());
- if (EqualFilename()(Zstring(newFolder.c_str(), commonLen), Zstring(i->c_str(), commonLen))) //test wheter i begins with newFolder or the other way round
- {
- warningMessage = wxString(_("Directories are dependent! Be careful when setting up synchronization rules:")) + wxT("\n") +
- wxT("\"") + zToWx(*i) + wxT("\"\n") +
- wxT("\"") + zToWx(newFolder) + wxT("\"");
- return true;
- }
+ return EqualFilename()(Zstring(lhs.c_str(), std::min(lhs.length(), rhs.length())),
+ Zstring(rhs.c_str(), std::min(lhs.length(), rhs.length())));
}
- return false;
+};
}
-
-bool foldersHaveDependencies(const std::vector<FolderPairCfg>& folderPairsFrom, wxString& warningMessage)
+//check whether one side is subdirectory of other side (folder pair wise!)
+//similar check if one directory is read/written by multiple pairs not before beginning of synchronization
+wxString checkFolderDependency(const std::vector<FolderPairCfg>& folderPairsForm) //returns warning message, empty if all ok
{
- warningMessage.Clear();
+ typedef std::vector<std::pair<wxString, wxString> > DirDirList;
+ DirDirList dependentDirs;
- std::set<Zstring> folders;
- for (std::vector<FolderPairCfg>::const_iterator i = folderPairsFrom.begin(); i != folderPairsFrom.end(); ++i)
- {
- if (!i->leftDirectory.empty()) //empty folders names might be accepted by user
+ for (std::vector<FolderPairCfg>::const_iterator i = folderPairsForm.begin(); i != folderPairsForm.end(); ++i)
+ if (!i->leftDirectory.empty() && !i->rightDirectory.empty()) //empty folders names may be accepted by user
{
- if (dependencyExists(folders, i->leftDirectory, warningMessage))
- return true;
- folders.insert(i->leftDirectory);
+ if (EqualDependentDirectory()(i->leftDirectory, i->rightDirectory)) //test wheter leftDirectory begins with rightDirectory or the other way round
+ dependentDirs.push_back(std::make_pair(zToWx(i->leftDirectory), zToWx(i->rightDirectory)));
}
- if (!i->rightDirectory.empty()) //empty folders names might be accepted by user
- {
- if (dependencyExists(folders, i->rightDirectory, warningMessage))
- return true;
- folders.insert(i->rightDirectory);
- }
- }
+ wxString warnignMsg;
- return false;
+ if (!dependentDirs.empty())
+ {
+ warnignMsg = _("Directories are dependent! Be careful when setting up synchronization rules:");
+ for (DirDirList::const_iterator i = dependentDirs.begin(); i != dependentDirs.end(); ++i)
+ warnignMsg += wxString(wxT("\n\n")) +
+ wxT("\"") + i->first + wxT("\"\n") +
+ wxT("\"") + i->second + wxT("\"");
+ }
+ return warnignMsg;
}
@@ -643,9 +641,10 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc
#endif
// #ifdef FFS_WIN
- //PERF_START;
+// PERF_START;
// #endif
+
//init process: keep at beginning so that all gui elements are initialized properly
statusUpdater->initNewProcess(-1, 0, StatusHandler::PROCESS_SCANNING); //it's not known how many files will be scanned => -1 objects
@@ -660,8 +659,8 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc
{
//check if folders have dependencies
- wxString warningMessage;
- if (foldersHaveDependencies(directoryPairsFormatted, warningMessage))
+ wxString warningMessage = checkFolderDependency(directoryPairsFormatted);
+ if (!warningMessage.empty())
statusUpdater->reportWarning(warningMessage.c_str(), m_warnings.warningDependentFolders);
}
@@ -670,6 +669,9 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc
try
{
+ //prevent shutdown while (binary) comparison is in progress
+ util::DisableStandby dummy2;
+
//place a lock on all directories before traversing (sync.ffs_lock)
std::map<Zstring, DirLock> lockHolder;
{
@@ -816,61 +818,10 @@ wxString getConflictSameDateDiffSize(const FileMapping& fileObj)
//-----------------------------------------------------------------------------
-class CmpFileTime
-{
-public:
- CmpFileTime(size_t tolerance) :
- tolerance_(tolerance) {}
-
- enum Result
- {
- TIME_EQUAL,
- TIME_LEFT_NEWER,
- TIME_RIGHT_NEWER,
- TIME_LEFT_INVALID,
- TIME_RIGHT_INVALID
- };
-
- Result getResult(const wxLongLong& lhs, const wxLongLong& rhs) const
- {
- if (lhs == rhs)
- return TIME_EQUAL;
-
- //number of seconds since Jan 1st 1970 + 1 year (needn't be too precise)
- static const long oneYearFromNow = wxGetUTCTime() + 365 * 24 * 3600;
-
- //check for erroneous dates (but only if dates are not (EXACTLY) the same)
- if (lhs < 0 || lhs > oneYearFromNow) //earlier than Jan 1st 1970 or more than one year in future
- return TIME_LEFT_INVALID;
-
- if (rhs < 0 || rhs > oneYearFromNow)
- return TIME_RIGHT_INVALID;
-
- if (sameFileTime(lhs, rhs, tolerance_)) //last write time may differ by up to 2 seconds (NTFS vs FAT32)
- return TIME_EQUAL;
-
- //regular time comparison
- if (lhs < rhs)
- return TIME_RIGHT_NEWER;
- else
- return TIME_LEFT_NEWER;
- }
-
-private:
- static bool sameFileTime(const wxLongLong& a, const wxLongLong& b, size_t tolerance)
- {
- if (a < b)
- return b <= a + tolerance;
- else
- return a <= b + tolerance;
- }
-
- const size_t tolerance_;
-};
-
-
void CompareProcess::categorizeSymlinkByTime(SymLinkMapping* linkObj) const
{
+ const CmpFileTime timeCmp(fileTimeTolerance);
+
//categorize symlinks that exist on both sides
if ( //special handling: if symlinks have the same "content" they are seen as equal while other metadata is ignored
#ifdef FFS_WIN //type of symbolic link is relevant for Windows only
@@ -879,11 +830,18 @@ void CompareProcess::categorizeSymlinkByTime(SymLinkMapping* linkObj) const
!linkObj->getTargetPath<LEFT_SIDE>().empty() &&
linkObj->getTargetPath<LEFT_SIDE>() == linkObj->getTargetPath<RIGHT_SIDE>())
{
- linkObj->setCategory<SYMLINK_EQUAL>();
+ //symlinks have same "content"
+ if ( linkObj->getShortName<LEFT_SIDE>() == linkObj->getShortName<RIGHT_SIDE>() &&
+ timeCmp.getResult(linkObj->getLastWriteTime<LEFT_SIDE>(),
+ linkObj->getLastWriteTime<RIGHT_SIDE>()) == CmpFileTime::TIME_EQUAL)
+ linkObj->setCategory<SYMLINK_EQUAL>();
+ else
+ linkObj->setCategory<SYMLINK_DIFFERENT_METADATA>();
return;
}
- switch (CmpFileTime(fileTimeTolerance).getResult(linkObj->getLastWriteTime<LEFT_SIDE>(), linkObj->getLastWriteTime<RIGHT_SIDE>()))
+ switch (timeCmp.getResult(linkObj->getLastWriteTime<LEFT_SIDE>(),
+ linkObj->getLastWriteTime<RIGHT_SIDE>()))
{
case CmpFileTime::TIME_EQUAL:
if (
@@ -891,7 +849,12 @@ void CompareProcess::categorizeSymlinkByTime(SymLinkMapping* linkObj) const
linkObj->getLinkType<LEFT_SIDE>() == linkObj->getLinkType<RIGHT_SIDE>() &&
#endif
linkObj->getTargetPath<LEFT_SIDE>() == linkObj->getTargetPath<RIGHT_SIDE>()) //may both be empty if following link failed
- linkObj->setCategory<SYMLINK_EQUAL>();
+ {
+ if ( linkObj->getShortName<LEFT_SIDE>() == linkObj->getShortName<RIGHT_SIDE>())
+ linkObj->setCategory<SYMLINK_EQUAL>();
+ else
+ linkObj->setCategory<SYMLINK_DIFFERENT_METADATA>();
+ }
else
{
wxString conflictMsg = wxString(_("Conflict detected:")) + wxT("\n") + _("Symlinks %x have the same date but a different target!");
@@ -946,11 +909,17 @@ void CompareProcess::compareByTimeSize(const std::vector<FolderPairCfg>& directo
{
FileMapping* const line = *i;
- switch (timeCmp.getResult(line->getLastWriteTime<LEFT_SIDE>(), line->getLastWriteTime<RIGHT_SIDE>()))
+ switch (timeCmp.getResult(line->getLastWriteTime<LEFT_SIDE>(),
+ line->getLastWriteTime<RIGHT_SIDE>()))
{
case CmpFileTime::TIME_EQUAL:
if (line->getFileSize<LEFT_SIDE>() == line->getFileSize<RIGHT_SIDE>())
- line->setCategory<FILE_EQUAL>();
+ {
+ if (line->getShortName<LEFT_SIDE>() == line->getShortName<RIGHT_SIDE>())
+ line->setCategory<FILE_EQUAL>();
+ else
+ line->setCategory<FILE_DIFFERENT_METADATA>();
+ }
else
line->setCategoryConflict(getConflictSameDateDiffSize(*line)); //same date, different filesize
break;
@@ -990,12 +959,22 @@ wxULongLong getBytesToCompare(const std::vector<FileMapping*>& rowsToCompare)
void CompareProcess::categorizeSymlinkByContent(SymLinkMapping* linkObj) const
{
//categorize symlinks that exist on both sides
+ const CmpFileTime timeCmp(fileTimeTolerance);
+
if (
#ifdef FFS_WIN //type of symbolic link is relevant for Windows only
linkObj->getLinkType<LEFT_SIDE>() == linkObj->getLinkType<RIGHT_SIDE>() &&
#endif
linkObj->getTargetPath<LEFT_SIDE>() == linkObj->getTargetPath<RIGHT_SIDE>())
- linkObj->setCategory<SYMLINK_EQUAL>();
+ {
+ //symlinks have same "content"
+ if ( linkObj->getShortName<LEFT_SIDE>() == linkObj->getShortName<RIGHT_SIDE>() &&
+ timeCmp.getResult(linkObj->getLastWriteTime<LEFT_SIDE>(),
+ linkObj->getLastWriteTime<RIGHT_SIDE>()) == CmpFileTime::TIME_EQUAL)
+ linkObj->setCategory<SYMLINK_EQUAL>();
+ else
+ linkObj->setCategory<SYMLINK_DIFFERENT_METADATA>();
+ }
else
linkObj->setCategory<SYMLINK_DIFFERENT>();
}
@@ -1049,13 +1028,15 @@ void CompareProcess::compareByContent(const std::vector<FolderPairCfg>& director
common::convertToSigned(bytesTotal),
StatusHandler::PROCESS_COMPARING_CONTENT);
+ const CmpFileTime timeCmp(fileTimeTolerance);
+
//compare files (that have same size) bytewise...
for (std::vector<FileMapping*>::const_iterator j = filesToCompareBytewise.begin(); j != filesToCompareBytewise.end(); ++j)
{
- FileMapping* const gridline = *j;
+ FileMapping* const line = *j;
Zstring statusText = txtComparingContentOfFiles;
- statusText.Replace(Zstr("%x"), gridline->getRelativeName<LEFT_SIDE>(), false);
+ statusText.Replace(Zstr("%x"), line->getRelativeName<LEFT_SIDE>(), false);
statusUpdater->reportInfo(statusText);
//check files that exist in left and right model but have different content
@@ -1066,13 +1047,20 @@ void CompareProcess::compareByContent(const std::vector<FolderPairCfg>& director
try
{
- if (filesHaveSameContentUpdating(gridline->getFullName<LEFT_SIDE>(),
- gridline->getFullName<RIGHT_SIDE>(),
- gridline->getFileSize<LEFT_SIDE>() * 2,
+ if (filesHaveSameContentUpdating(line->getFullName<LEFT_SIDE>(),
+ line->getFullName<RIGHT_SIDE>(),
+ line->getFileSize<LEFT_SIDE>() * 2,
statusUpdater))
- gridline->setCategory<FILE_EQUAL>();
+ {
+ if ( line->getShortName<LEFT_SIDE>() == line->getShortName<RIGHT_SIDE>() &&
+ timeCmp.getResult(line->getLastWriteTime<LEFT_SIDE>(),
+ line->getLastWriteTime<RIGHT_SIDE>()) == CmpFileTime::TIME_EQUAL)
+ line->setCategory<FILE_EQUAL>();
+ else
+ line->setCategory<FILE_DIFFERENT_METADATA>();
+ }
else
- gridline->setCategory<FILE_DIFFERENT>();
+ line->setCategory<FILE_DIFFERENT>();
statusUpdater->updateProcessedData(2, 0); //processed data is communicated in subfunctions!
break;
@@ -1082,7 +1070,7 @@ void CompareProcess::compareByContent(const std::vector<FolderPairCfg>& director
ErrorHandler::Response rv = statusUpdater->reportError(error.msg());
if (rv == ErrorHandler::IGNORE_ERROR)
{
- gridline->setCategoryConflict(wxString(_("Conflict detected:")) + wxT("\n") + _("Comparing files by content failed."));
+ line->setCategoryConflict(wxString(_("Conflict detected:")) + wxT("\n") + _("Comparing files by content failed."));
break;
}
@@ -1119,19 +1107,19 @@ template <>
void MergeSides::fillOneSide<LEFT_SIDE>(const DirContainer& dirCont, HierarchyObject& output)
{
//reserve() fulfills one task here: massive performance improvement!
- output.useSubFiles().reserve(dirCont.fileCount());
- output.useSubDirs(). reserve(dirCont.dirCount());
- output.useSubLinks().reserve(dirCont.linkCount());
+ output.useSubFiles().reserve(dirCont.files.size());
+ output.useSubDirs(). reserve(dirCont.dirs. size());
+ output.useSubLinks().reserve(dirCont.links.size());
- for (DirContainer::SubFileList::const_iterator i = dirCont.fileBegin(); i != dirCont.fileEnd(); ++i)
- output.addSubFile(i->second.getData(), i->first);
+ for (DirContainer::FileList::const_iterator i = dirCont.files.begin(); i != dirCont.files.end(); ++i)
+ output.addSubFile(i->second, i->first);
- for (DirContainer::SubLinkList::const_iterator i = dirCont.linkBegin(); i != dirCont.linkEnd(); ++i)
- output.addSubLink(i->second.getData(), i->first);
+ for (DirContainer::LinkList::const_iterator i = dirCont.links.begin(); i != dirCont.links.end(); ++i)
+ output.addSubLink(i->second, i->first);
- for (DirContainer::SubDirList::const_iterator i = dirCont.dirBegin(); i != dirCont.dirEnd(); ++i)
+ for (DirContainer::DirList::const_iterator i = dirCont.dirs.begin(); i != dirCont.dirs.end(); ++i)
{
- DirMapping& newDirMap = output.addSubDir(true, i->first, false);
+ DirMapping& newDirMap = output.addSubDir(i->first, Zstring());
fillOneSide<LEFT_SIDE>(i->second, newDirMap); //recurse into subdirectories
}
}
@@ -1141,19 +1129,19 @@ template <>
void MergeSides::fillOneSide<RIGHT_SIDE>(const DirContainer& dirCont, HierarchyObject& output)
{
//reserve() fulfills one task here: massive performance improvement!
- output.useSubFiles().reserve(dirCont.fileCount());
- output.useSubDirs(). reserve(dirCont.dirCount());
- output.useSubLinks().reserve(dirCont.linkCount());
+ output.useSubFiles().reserve(dirCont.files.size());
+ output.useSubDirs ().reserve(dirCont.dirs. size());
+ output.useSubLinks().reserve(dirCont.links.size());
- for (DirContainer::SubFileList::const_iterator i = dirCont.fileBegin(); i != dirCont.fileEnd(); ++i)
- output.addSubFile(i->first, i->second.getData());
+ for (DirContainer::FileList::const_iterator i = dirCont.files.begin(); i != dirCont.files.end(); ++i)
+ output.addSubFile(i->first, i->second);
- for (DirContainer::SubLinkList::const_iterator i = dirCont.linkBegin(); i != dirCont.linkEnd(); ++i)
- output.addSubLink(i->first, i->second.getData());
+ for (DirContainer::LinkList::const_iterator i = dirCont.links.begin(); i != dirCont.links.end(); ++i)
+ output.addSubLink(i->first, i->second);
- for (DirContainer::SubDirList::const_iterator i = dirCont.dirBegin(); i != dirCont.dirEnd(); ++i)
+ for (DirContainer::DirList::const_iterator i = dirCont.dirs.begin(); i != dirCont.dirs.end(); ++i)
{
- DirMapping& newDirMap = output.addSubDir(false, i->first, true);
+ DirMapping& newDirMap = output.addSubDir(Zstring(), i->first);
fillOneSide<RIGHT_SIDE>(i->second, newDirMap); //recurse into subdirectories
}
}
@@ -1170,89 +1158,91 @@ void MergeSides::execute(const DirContainer& leftSide, const DirContainer& right
//HierarchyObject::addSubFile() must not invalidate references used in "appendUndefined"! Currently a std::list, so no problem.
//reserve() fulfills two task here: 1. massive performance improvement! 2. ensure references in appendUndefined remain valid!
- output.useSubFiles().reserve(leftSide.fileCount() + rightSide.fileCount()); //assume worst case!
- output.useSubDirs(). reserve(leftSide.dirCount() + rightSide.dirCount()); //
- output.useSubLinks().reserve(leftSide.linkCount() + rightSide.linkCount()); //
+ output.useSubFiles().reserve(leftSide.files.size() + rightSide.files.size()); //assume worst case!
+ output.useSubDirs(). reserve(leftSide.dirs. size() + rightSide.dirs. size()); //
+ output.useSubLinks().reserve(leftSide.links.size() + rightSide.links.size()); //
- for (DirContainer::SubFileList::const_iterator i = leftSide.fileBegin(); i != leftSide.fileEnd(); ++i)
+ for (DirContainer::FileList::const_iterator i = leftSide.files.begin(); i != leftSide.files.end(); ++i)
{
- const FileContainer* rightFile = rightSide.findFile(i->first);
+ DirContainer::FileList::const_iterator rightFile = rightSide.files.find(i->first);
//find files that exist on left but not on right
- if (rightFile == NULL)
- output.addSubFile(i->second.getData(), i->first);
+ if (rightFile == rightSide.files.end())
+ output.addSubFile(i->second, i->first);
//find files that exist on left and right
else
{
FileMapping& newEntry = output.addSubFile(
- i->second.getData(),
i->first,
+ i->second,
FILE_EQUAL, //FILE_EQUAL is just a dummy-value here
- rightFile->getData());
+ rightFile->first,
+ rightFile->second);
appendUndefinedFile.push_back(&newEntry);
}
}
//find files that exist on right but not on left
- for (DirContainer::SubFileList::const_iterator j = rightSide.fileBegin(); j != rightSide.fileEnd(); ++j)
+ for (DirContainer::FileList::const_iterator j = rightSide.files.begin(); j != rightSide.files.end(); ++j)
{
- if (leftSide.findFile(j->first) == NULL)
- output.addSubFile(j->first, j->second.getData());
+ if (leftSide.files.find(j->first) == leftSide.files.end())
+ output.addSubFile(j->first, j->second);
}
//-----------------------------------------------------------------------------------------------
- for (DirContainer::SubLinkList::const_iterator i = leftSide.linkBegin(); i != leftSide.linkEnd(); ++i)
+ for (DirContainer::LinkList::const_iterator i = leftSide.links.begin(); i != leftSide.links.end(); ++i)
{
- const SymLinkContainer* rightLink = rightSide.findLink(i->first);
+ DirContainer::LinkList::const_iterator rightLink = rightSide.links.find(i->first);
- //find files that exist on left but not on right
- if (rightLink == NULL)
- output.addSubLink(i->second.getData(), i->first);
- //find files that exist on left and right
+ //find links that exist on left but not on right
+ if (rightLink == rightSide.links.end())
+ output.addSubLink(i->second, i->first);
+ //find links that exist on left and right
else
{
SymLinkMapping& newEntry = output.addSubLink(
- i->second.getData(),
i->first,
+ i->second,
SYMLINK_EQUAL, //SYMLINK_EQUAL is just a dummy-value here
- rightLink->getData());
+ rightLink->first,
+ rightLink->second);
appendUndefinedLink.push_back(&newEntry);
}
}
- //find files that exist on right but not on left
- for (DirContainer::SubLinkList::const_iterator j = rightSide.linkBegin(); j != rightSide.linkEnd(); ++j)
+ //find links that exist on right but not on left
+ for (DirContainer::LinkList::const_iterator j = rightSide.links.begin(); j != rightSide.links.end(); ++j)
{
- if (leftSide.findLink(j->first) == NULL)
- output.addSubLink(j->first, j->second.getData());
+ if (leftSide.links.find(j->first) == leftSide.links.end())
+ output.addSubLink(j->first, j->second);
}
//-----------------------------------------------------------------------------------------------
- for (DirContainer::SubDirList::const_iterator i = leftSide.dirBegin(); i != leftSide.dirEnd(); ++i)
+ for (DirContainer::DirList::const_iterator i = leftSide.dirs.begin(); i != leftSide.dirs.end(); ++i)
{
- const DirContainer* rightDir = rightSide.findDir(i->first);
+ DirContainer::DirList::const_iterator rightDir = rightSide.dirs.find(i->first);
//find directories that exist on left but not on right
- if (rightDir == NULL)
+ if (rightDir == rightSide.dirs.end())
{
- DirMapping& newDirMap = output.addSubDir(true, i->first, false);
+ DirMapping& newDirMap = output.addSubDir(i->first, Zstring());
fillOneSide<LEFT_SIDE>(i->second, newDirMap); //recurse into subdirectories
}
else //directories that exist on both sides
{
- DirMapping& newDirMap = output.addSubDir(true, i->first, true);
- execute(i->second, *rightDir, newDirMap); //recurse into subdirectories
+ DirMapping& newDirMap = output.addSubDir(i->first, rightDir->first);
+ execute(i->second, rightDir->second, newDirMap); //recurse into subdirectories
}
}
//find directories that exist on right but not on left
- for (DirContainer::SubDirList::const_iterator j = rightSide.dirBegin(); j != rightSide.dirEnd(); ++j)
+ for (DirContainer::DirList::const_iterator j = rightSide.dirs.begin(); j != rightSide.dirs.end(); ++j)
{
- if (leftSide.findDir(j->first) == NULL)
+ if (leftSide.dirs.find(j->first) == leftSide.dirs.end())
{
- DirMapping& newDirMap = output.addSubDir(false, j->first, true);
+ DirMapping& newDirMap = output.addSubDir(Zstring(), j->first);
fillOneSide<RIGHT_SIDE>(j->second, newDirMap); //recurse into subdirectories
}
}
diff --git a/comparison.h b/comparison.h
index 7ed54eeb..792f813c 100644
--- a/comparison.h
+++ b/comparison.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef COMPARISON_H_INCLUDED
@@ -11,6 +11,7 @@
#include "library/process_xml.h"
#include "library/status_handler.h"
#include "structures.h"
+#include "shared/disable_standby.h"
namespace ffs3
diff --git a/file_hierarchy.cpp b/file_hierarchy.cpp
index 84ed0162..179aa1c5 100644
--- a/file_hierarchy.cpp
+++ b/file_hierarchy.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "file_hierarchy.h"
@@ -110,9 +110,10 @@ void FileSystemObject::removeEmpty(BaseDirMapping& baseDir)
}
-SyncOperation FileSystemObject::getSyncOperation(const CompareFilesResult cmpResult,
- const bool selectedForSynchronization,
- const SyncDirectionIntern syncDir)
+SyncOperation FileSystemObject::getSyncOperation(
+ CompareFilesResult cmpResult,
+ bool selectedForSynchronization,
+ SyncDirectionIntern syncDir)
{
if (!selectedForSynchronization)
return cmpResult == FILE_EQUAL ?
@@ -178,6 +179,20 @@ SyncOperation FileSystemObject::getSyncOperation(const CompareFilesResult cmpRes
}
break;
+ case FILE_DIFFERENT_METADATA:
+ switch (syncDir)
+ {
+ case SYNC_DIR_INT_LEFT:
+ return SO_COPY_METADATA_TO_LEFT;
+ case SYNC_DIR_INT_RIGHT:
+ return SO_COPY_METADATA_TO_RIGHT;
+ case SYNC_DIR_INT_NONE:
+ return SO_DO_NOTHING;
+ case SYNC_DIR_INT_CONFLICT:
+ return SO_UNRESOLVED_CONFLICT;
+ }
+ break;
+
case FILE_EQUAL:
assert(syncDir == SYNC_DIR_INT_NONE);
return SO_EQUAL;
@@ -189,17 +204,15 @@ SyncOperation FileSystemObject::getSyncOperation(const CompareFilesResult cmpRes
const Zstring& ffs3::getSyncDBFilename()
{
- //32 and 64 bit for Linux and Windows builds are binary incompatible! So give them different names
+ //Linux and Windows builds are binary incompatible: char/wchar_t case, sensitive/insensitive
+ //32 and 64 bit db files ARE designed to be binary compatible!
+ //Give db files different names.
//make sure they end with ".ffs_db". These files will not be included into comparison when located in base sync directories
#ifdef FFS_WIN
- static Zstring output = Zstring(util::is64BitBuild ?
- Zstr("sync.x64.") :
- Zstr("sync.")) + SYNC_DB_FILE_ENDING;
+ static Zstring output = Zstring(Zstr("sync.")) + SYNC_DB_FILE_ENDING;
#elif defined FFS_LINUX
//files beginning with dots are hidden e.g. in Nautilus
- static Zstring output = Zstring(util::is64BitBuild ?
- Zstr(".sync.x64.") :
- Zstr(".sync.")) + SYNC_DB_FILE_ENDING;
+ static Zstring output = Zstring(Zstr(".sync.")) + SYNC_DB_FILE_ENDING;
#endif
return output;
}
diff --git a/file_hierarchy.h b/file_hierarchy.h
index 2cbbb7ca..f4d9537a 100644
--- a/file_hierarchy.h
+++ b/file_hierarchy.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FILEHIERARCHY_H_INCLUDED
@@ -45,11 +45,12 @@ namespace ffs3
{
struct FileDescriptor
{
+ FileDescriptor() {}
FileDescriptor(const wxLongLong& lastWriteTimeRawIn,
const wxULongLong& fileSizeIn) :
- //const util::FileID fileId) :
lastWriteTimeRaw(lastWriteTimeRawIn),
fileSize(fileSizeIn) {}
+
wxLongLong lastWriteTimeRaw; //number of seconds since Jan. 1st 1970 UTC, same semantics like time_t (== signed long)
wxULongLong fileSize;
@@ -66,6 +67,7 @@ struct LinkDescriptor
TYPE_FILE //Windows: file symlink; Linux: file symlink or broken link (or other symlink, pathological)
};
+ LinkDescriptor() : type(TYPE_FILE) {}
LinkDescriptor(const wxLongLong& lastWriteTimeRawIn,
const Zstring& targetPathIn,
LinkType lt) :
@@ -86,87 +88,46 @@ enum SelectedSide
};
-class FileContainer;
-class SymLinkContainer;
class DirMapping;
class FileMapping;
class SymLinkMapping;
class FileSystemObject;
-class BaseDirMapping;
-class HierarchyObject;
+
//------------------------------------------------------------------
/*
- DirContainer FileContainer
-
ERD:
DirContainer 1 -----> 0..n DirContainer
-DirContainer 1 -----> 0..n FileContainer
+DirContainer 1 -----> 0..n FileDescriptor
+DirContainer 1 -----> 0..n LinkDescriptor
*/
-//------------------------------------------------------------------
-
-class DirContainer
+struct DirContainer
{
-public:
- void addSubFile(const Zstring& shortName, const FileDescriptor& fileData);
- void addSubLink(const Zstring& shortName, const LinkDescriptor& linkData);
- DirContainer& addSubDir(const Zstring& shortName);
-
//------------------------------------------------------------------
- typedef std::map<Zstring, DirContainer, LessFilename> SubDirList; //key: shortName
- typedef std::map<Zstring, FileContainer, LessFilename> SubFileList; //
- typedef std::map<Zstring, SymLinkContainer, LessFilename> SubLinkList; //
+ typedef std::map<Zstring, DirContainer, LessFilename> DirList; //
+ typedef std::map<Zstring, FileDescriptor, LessFilename> FileList; //key: shortName
+ typedef std::map<Zstring, LinkDescriptor, LessFilename> LinkList; //
//------------------------------------------------------------------
- //iterator access: std::map is implementation detail! don't expose
- SubDirList::const_iterator dirBegin() const;
- SubDirList::const_iterator dirEnd() const;
+ DirList dirs; //contained directories
+ FileList files; //contained files
+ LinkList links; //contained symlinks (note: only symlinks that are not treated as their target are placed here!)
- SubFileList::const_iterator fileBegin() const;
- SubFileList::const_iterator fileEnd() const;
-
- SubLinkList::const_iterator linkBegin() const;
- SubLinkList::const_iterator linkEnd() const;
-
- size_t dirCount() const;
- size_t fileCount() const;
- size_t linkCount() const;
-
- const DirContainer* findDir (const Zstring& shortName) const; //returns NULL if not found
- const FileContainer* findFile(const Zstring& shortName) const; //
- const SymLinkContainer* findLink(const Zstring& shortName) const; //
-
- DirContainer() {} //default constructor use for base directory only!
-
-private:
- SubDirList subDirs; //contained directories
- SubFileList subFiles; //contained files
- SubLinkList subLinks; //contained symlinks (note: only symlinks that are not treated as their target are placed here!)
-};
-
-//------------------------------------------------------------------
-class FileContainer
-{
-public:
- const FileDescriptor& getData() const;
-
-private:
- friend class DirContainer;
- FileContainer(const FileDescriptor& fileData) : data(fileData) {}
-
- const FileDescriptor data;
-};
-
-class SymLinkContainer
-{
-public:
- const LinkDescriptor& getData() const;
+ //convenience
+ DirContainer& addSubDir(const Zstring& shortName)
+ {
+ return dirs.insert(std::make_pair(shortName, DirContainer())).first->second;
+ }
-private:
- friend class DirContainer;
- SymLinkContainer(const LinkDescriptor& linkData) : data(linkData) {}
+ void addSubFile(const Zstring& shortName, const FileDescriptor& fileData)
+ {
+ files.insert(std::make_pair(shortName, fileData));
+ }
- const LinkDescriptor data;
+ void addSubLink(const Zstring& shortName, const LinkDescriptor& linkData)
+ {
+ links.insert(std::make_pair(shortName, linkData));
+ }
};
@@ -195,26 +156,27 @@ public:
FileSystemObject* retrieveById(ObjectID id); //returns NULL if object is not found; logarithmic complexity
const FileSystemObject* retrieveById(ObjectID id) const; //
- DirMapping& addSubDir(bool existsLeft,
- const Zstring& dirNameShort,
- bool existsRight);
+ DirMapping& addSubDir(const Zstring& shortNameLeft,
+ const Zstring& shortNameRight);
- FileMapping& addSubFile(const FileDescriptor& left, //file exists on both sides
- const Zstring& fileNameShort,
- CompareFilesResult defaultCmpResult,
- const FileDescriptor& right);
+ FileMapping& addSubFile(const Zstring& shortNameLeft,
+ const FileDescriptor& left, //file exists on both sides
+ CompareFilesResult defaultCmpResult,
+ const Zstring& shortNameRight,
+ const FileDescriptor& right);
void addSubFile(const FileDescriptor& left, //file exists on left side only
- const Zstring& fileNameShort);
- void addSubFile(const Zstring& fileNameShort, //file exists on right side only
+ const Zstring& shortNameLeft);
+ void addSubFile(const Zstring& shortNameRight, //file exists on right side only
const FileDescriptor& right);
- SymLinkMapping& addSubLink(const LinkDescriptor& left, //link exists on both sides
- const Zstring& linkNameShort,
+ SymLinkMapping& addSubLink(const Zstring& shortNameLeft,
+ const LinkDescriptor& left, //link exists on both sides
CompareSymlinkResult defaultCmpResult,
+ const Zstring& shortNameRight,
const LinkDescriptor& right);
void addSubLink(const LinkDescriptor& left, //link exists on left side only
- const Zstring& linkNameShort);
- void addSubLink(const Zstring& linkNameShort, //link exists on right side only
+ const Zstring& shortNameLeft);
+ void addSubLink(const Zstring& shortNameRight, //link exists on right side only
const LinkDescriptor& right);
const Zstring& getRelativeNamePf() const; //get name relative to base sync dir with FILE_NAME_SEPARATOR postfix: "blah\"
@@ -275,6 +237,33 @@ const Zstring& HierarchyObject::getBaseDir<RIGHT_SIDE>() const //postfixed!
//------------------------------------------------------------------
+class BaseDirMapping : public HierarchyObject //synchronization base directory
+{
+public:
+ BaseDirMapping(const Zstring& dirPostfixedLeft,
+ const Zstring& dirPostfixedRight,
+ const BaseFilter::FilterRef& filterIn) :
+ HierarchyObject(dirPostfixedLeft, dirPostfixedRight),
+ filter(filterIn) {}
+
+ const BaseFilter::FilterRef& getFilter() const;
+ template <SelectedSide side> Zstring getDBFilename() const;
+ virtual void swap();
+
+ //BaseDirMapping is created incrementally and not once via constructor => same for locks
+ template <SelectedSide side> void holdLock(const DirLock& lock);
+
+private:
+ boost::shared_ptr<DirLock> leftDirLock;
+ boost::shared_ptr<DirLock> rightDirLock;
+
+ BaseFilter::FilterRef filter;
+};
+
+
+typedef std::vector<BaseDirMapping> FolderComparison;
+
+//------------------------------------------------------------------
struct RelNamesBuffered
{
RelNamesBuffered(const Zstring& baseDirPfLIn, //base sync dir postfixed
@@ -312,8 +301,8 @@ public:
template <SelectedSide side> bool isEmpty() const;
template <SelectedSide side> const Zstring& getShortName() const;
template <SelectedSide side> const Zstring getRelativeName() const; //get name relative to base sync dir without FILE_NAME_SEPARATOR prefix
- template <SelectedSide side> const Zstring getFullName() const; //getFullName() == getBaseDirPf() + getRelativeName()
template <SelectedSide side> const Zstring& getBaseDirPf() const; //base sync directory postfixed with FILE_NAME_SEPARATOR
+ template <SelectedSide side> const Zstring getFullName() const; //getFullName() == getBaseDirPf() + getRelativeName()
HierarchyObject::ObjectID getId() const; //get unique id; ^= logical key
@@ -339,13 +328,13 @@ public:
static void removeEmptyNonRec(HierarchyObject& hierObj); //physically remove all invalid entries (where both sides are empty) non-recursively
protected:
- FileSystemObject(bool existsLeft, bool existsRight, const Zstring& shortName, const HierarchyObject& parent) :
+ FileSystemObject(const Zstring& shortNameLeft, const Zstring& shortNameRight, const HierarchyObject& parent) :
selectedForSynchronization(true),
syncDir(SYNC_DIR_INT_NONE),
nameBuffer(parent.getBaseDir<LEFT_SIDE>(), parent.getBaseDir<RIGHT_SIDE>(), parent.getRelativeNamePf()),
- existsLeft_(existsLeft),
- existsRight_(existsRight),
- shortName_(shortName),
+ shortNameLeft_(shortNameLeft),
+ shortNameRight_(shortNameRight),
+ //shortNameRight_(shortNameRight == shortNameLeft ? shortNameLeft : shortNameRight), -> strangely doesn't seem to shrink peak memory consumption at all!
uniqueId(getUniqueId()) {}
~FileSystemObject() {} //don't need polymorphic deletion
@@ -366,21 +355,20 @@ private:
SYNC_DIR_INT_NONE = SYNC_DIR_NONE,
SYNC_DIR_INT_CONFLICT //set if automatic synchronization cannot determine a direction
};
- static SyncOperation getSyncOperation(const CompareFilesResult cmpResult,
- const bool selectedForSynchronization,
- const SyncDirectionIntern syncDir); //evaluate comparison result and sync direction
+ static SyncOperation getSyncOperation(CompareFilesResult cmpResult,
+ bool selectedForSynchronization,
+ SyncDirectionIntern syncDir); //evaluate comparison result and sync direction
bool selectedForSynchronization;
SyncDirectionIntern syncDir;
wxString syncOpConflictDescr; //only filled if syncDir == SYNC_DIR_INT_CONFLICT
-
//buffer some redundant data:
RelNamesBuffered nameBuffer; //base sync dirs + relative parent name: this does NOT belong into FileDescriptor/DirDescriptor
- bool existsLeft_;
- bool existsRight_;
- Zstring shortName_;
+ Zstring shortNameLeft_; //slightly redundant under linux, but on windows the "same" filenames can differ in case
+ Zstring shortNameRight_; //use as indicator: an empty name means: not existing!
+
HierarchyObject::ObjectID uniqueId;
};
@@ -404,13 +392,26 @@ private:
virtual void copyToR();
//------------------------------------------------------------------
- DirMapping(bool existsLeft,
- const Zstring& dirNameShort,
- bool existsRight,
+ DirMapping(const Zstring& shortNameLeft, //use empty shortname if "not existing"
+ const Zstring& shortNameRight, //
const HierarchyObject& parent) :
- FileSystemObject(existsLeft, existsRight, dirNameShort, parent),
- HierarchyObject(parent, dirNameShort),
- cmpResult(!existsRight ? DIR_LEFT_SIDE_ONLY : (existsLeft ? DIR_EQUAL : DIR_RIGHT_SIDE_ONLY)) {}
+ FileSystemObject(shortNameLeft, shortNameRight, parent),
+ HierarchyObject(parent, shortNameRight.empty() ? shortNameLeft : shortNameRight)
+ {
+ assert(!shortNameLeft.empty() || !shortNameRight.empty());
+
+ if (shortNameRight.empty())
+ cmpResult = DIR_LEFT_SIDE_ONLY;
+ else if (shortNameLeft.empty())
+ cmpResult = DIR_RIGHT_SIDE_ONLY;
+ else
+ {
+ if (shortNameLeft == shortNameRight)
+ cmpResult = DIR_EQUAL;
+ else
+ cmpResult = DIR_DIFFERENT_METADATA;
+ }
+ }
//categorization
CompareDirResult cmpResult;
@@ -437,29 +438,16 @@ private:
void setCategory();
void setCategoryConflict(const wxString& description);
- FileMapping(const FileDescriptor& left, //file exists on both sides
- const Zstring& fileNameShort,
+ FileMapping(const Zstring& shortNameLeft, //use empty string if "not existing"
+ const FileDescriptor& left,
CompareFilesResult defaultCmpResult,
+ const Zstring& shortNameRight, //
const FileDescriptor& right,
const HierarchyObject& parent) :
- FileSystemObject(true, true, fileNameShort, parent),
+ FileSystemObject(shortNameLeft, shortNameRight, parent),
cmpResult(defaultCmpResult),
dataLeft(left),
dataRight(right) {}
- FileMapping(const FileDescriptor& left, //file exists on left side only
- const Zstring& fileNameShort,
- const HierarchyObject& parent) :
- FileSystemObject(true, false, fileNameShort, parent),
- cmpResult(FILE_LEFT_SIDE_ONLY),
- dataLeft(left),
- dataRight(0, 0) {}
- FileMapping(const Zstring& fileNameShort, //file exists on right side only
- const FileDescriptor& right,
- const HierarchyObject& parent) :
- FileSystemObject(false, true, fileNameShort, parent),
- cmpResult(FILE_RIGHT_SIDE_ONLY),
- dataLeft(0, 0),
- dataRight(right) {}
virtual void swap();
virtual void removeObjectL();
@@ -503,28 +491,15 @@ private:
void setCategory();
void setCategoryConflict(const wxString& description);
- SymLinkMapping(const LinkDescriptor& left, //link exists on both sides
- const Zstring& linkNameShort,
- CompareSymlinkResult defaultCmpResult,
- const LinkDescriptor& right,
- const HierarchyObject& parent) :
- FileSystemObject(true, true, linkNameShort, parent),
- cmpResult(defaultCmpResult),
- dataLeft(left),
- dataRight(right) {}
- SymLinkMapping(const LinkDescriptor& left, //link exists on left side only
- const Zstring& linkNameShort,
- const HierarchyObject& parent) :
- FileSystemObject(true, false, linkNameShort, parent),
- cmpResult(SYMLINK_LEFT_SIDE_ONLY),
- dataLeft(left),
- dataRight(0, Zstring(), LinkDescriptor::TYPE_FILE) {}
- SymLinkMapping(const Zstring& linkNameShort, //link exists on right side only
+ SymLinkMapping(const Zstring& shortNameLeft, //use empty string if "not existing"
+ const LinkDescriptor& left,
+ CompareSymlinkResult defaultCmpResult,
+ const Zstring& shortNameRight, //use empty string if "not existing"
const LinkDescriptor& right,
const HierarchyObject& parent) :
- FileSystemObject(false, true, linkNameShort, parent),
- cmpResult(SYMLINK_RIGHT_SIDE_ONLY),
- dataLeft(0, Zstring(), LinkDescriptor::TYPE_FILE),
+ FileSystemObject(shortNameLeft, shortNameRight, parent),
+ cmpResult(defaultCmpResult),
+ dataLeft(left),
dataRight(right) {}
//------------------------------------------------------------------
@@ -537,33 +512,6 @@ private:
};
//------------------------------------------------------------------
-class BaseDirMapping : public HierarchyObject //synchronization base directory
-{
-public:
- BaseDirMapping(const Zstring& dirPostfixedLeft,
- const Zstring& dirPostfixedRight,
- const BaseFilter::FilterRef& filterIn) :
- HierarchyObject(dirPostfixedLeft, dirPostfixedRight),
- filter(filterIn) {}
-
- const BaseFilter::FilterRef& getFilter() const;
- template <SelectedSide side> Zstring getDBFilename() const;
- virtual void swap();
-
- //BaseDirMapping is created incrementally and not once via constructor => same for locks
- template <SelectedSide side> void holdLock(const DirLock& lock);
-
-private:
- boost::shared_ptr<DirLock> leftDirLock;
- boost::shared_ptr<DirLock> rightDirLock;
-
- BaseFilter::FilterRef filter;
-};
-
-
-typedef std::vector<BaseDirMapping> FolderComparison;
-
-//------------------------------------------------------------------
@@ -643,128 +591,6 @@ HierarchyObject::ObjectID FileSystemObject::getUniqueId()
inline
-DirContainer::SubDirList::const_iterator DirContainer::dirBegin() const
-{
- return subDirs.begin();
-}
-
-
-inline
-DirContainer::SubDirList::const_iterator DirContainer::dirEnd() const
-{
- return subDirs.end();
-}
-
-
-inline
-DirContainer::SubFileList::const_iterator DirContainer::fileBegin() const
-{
- return subFiles.begin();
-}
-
-
-inline
-DirContainer::SubFileList::const_iterator DirContainer::fileEnd() const
-{
- return subFiles.end();
-}
-
-
-inline
-DirContainer::SubLinkList::const_iterator DirContainer::linkBegin() const
-{
- return subLinks.begin();
-}
-
-
-inline
-DirContainer::SubLinkList::const_iterator DirContainer::linkEnd() const
-{
- return subLinks.end();
-}
-
-
-inline
-size_t DirContainer::dirCount() const
-{
- return subDirs.size();
-}
-
-
-inline
-size_t DirContainer::fileCount() const
-{
- return subFiles.size();
-}
-
-
-inline
-size_t DirContainer::linkCount() const
-{
- return subLinks.size();
-}
-
-
-inline
-const DirContainer* DirContainer::findDir(const Zstring& shortName) const
-{
- const SubDirList::const_iterator iter = subDirs.find(shortName);
- return iter == subDirs.end() ? NULL : &iter->second;
-}
-
-
-inline
-const FileContainer* DirContainer::findFile(const Zstring& shortName) const
-{
- const SubFileList::const_iterator iter = subFiles.find(shortName);
- return iter == subFiles.end() ? NULL : &iter->second;
-}
-
-
-inline
-const SymLinkContainer* DirContainer::findLink(const Zstring& shortName) const
-{
- const SubLinkList::const_iterator iter = subLinks.find(shortName);
- return iter == subLinks.end() ? NULL : &iter->second;
-}
-
-
-inline
-const FileDescriptor& FileContainer::getData() const
-{
- return data;
-}
-
-
-inline
-const LinkDescriptor& SymLinkContainer::getData() const
-{
- return data;
-}
-
-
-inline
-DirContainer& DirContainer::addSubDir(const Zstring& shortName)
-{
- return subDirs.insert(std::make_pair(shortName, DirContainer())).first->second;
-}
-
-
-inline
-void DirContainer::addSubFile(const Zstring& shortName, const FileDescriptor& fileData)
-{
- subFiles.insert(std::make_pair(shortName, FileContainer(fileData)));
-}
-
-
-inline
-void DirContainer::addSubLink(const Zstring& shortName, const LinkDescriptor& linkData)
-{
- subLinks.insert(std::make_pair(shortName, SymLinkContainer(linkData)));
-}
-
-
-inline
CompareFilesResult FileMapping::getCategory() const
{
return cmpResult;
@@ -857,7 +683,7 @@ template <>
inline
bool FileSystemObject::isEmpty<LEFT_SIDE>() const
{
- return !existsLeft_;
+ return shortNameLeft_.empty();
}
@@ -865,7 +691,7 @@ template <>
inline
bool FileSystemObject::isEmpty<RIGHT_SIDE>() const
{
- return !existsRight_;
+ return shortNameRight_.empty();
}
@@ -876,12 +702,19 @@ bool FileSystemObject::isEmpty() const
}
-template <SelectedSide side>
+template <>
+inline
+const Zstring& FileSystemObject::getShortName<LEFT_SIDE>() const
+{
+ return shortNameLeft_; //empty if not existing
+}
+
+
+template <>
inline
-const Zstring& FileSystemObject::getShortName() const
+const Zstring& FileSystemObject::getShortName<RIGHT_SIDE>() const
{
- static Zstring null;
- return isEmpty<side>() ? null : shortName_;
+ return shortNameRight_; //empty if not existing
}
@@ -889,21 +722,21 @@ template <SelectedSide side>
inline
const Zstring FileSystemObject::getRelativeName() const
{
- return isEmpty<side>() ? Zstring() : nameBuffer.parentRelNamePf + shortName_;
+ return isEmpty<side>() ? Zstring() : nameBuffer.parentRelNamePf + getShortName<side>();
}
inline
const Zstring FileSystemObject::getObjRelativeName() const
{
- return nameBuffer.parentRelNamePf + shortName_;
+ return nameBuffer.parentRelNamePf + getObjShortName();
}
inline
const Zstring& FileSystemObject::getObjShortName() const
{
- return shortName_;
+ return isEmpty<LEFT_SIDE>() ? getShortName<RIGHT_SIDE>() : getShortName<LEFT_SIDE>();
}
@@ -918,7 +751,7 @@ template <SelectedSide side>
inline
const Zstring FileSystemObject::getFullName() const
{
- return isEmpty<side>() ? Zstring() : getBaseDirPf<side>() + nameBuffer.parentRelNamePf + shortName_;
+ return isEmpty<side>() ? Zstring() : getBaseDirPf<side>() + nameBuffer.parentRelNamePf + getShortName<side>();
}
@@ -942,7 +775,7 @@ template <>
inline
void FileSystemObject::removeObject<LEFT_SIDE>()
{
- existsLeft_ = false;
+ shortNameLeft_.clear();
removeObjectL();
}
@@ -951,7 +784,7 @@ template <>
inline
void FileSystemObject::removeObject<RIGHT_SIDE>()
{
- existsRight_ = false;
+ shortNameRight_.clear();
removeObjectR();
}
@@ -962,11 +795,11 @@ void FileSystemObject::synchronizeSides()
switch (syncDir)
{
case SYNC_DIR_INT_LEFT:
- existsLeft_ = existsRight_;
+ shortNameLeft_ = shortNameRight_;
copyToL();
break;
case SYNC_DIR_INT_RIGHT:
- existsRight_ = existsLeft_;
+ shortNameRight_ = shortNameLeft_;
copyToR();
break;
case SYNC_DIR_INT_NONE:
@@ -983,7 +816,7 @@ inline
void FileSystemObject::swap()
{
std::swap(nameBuffer.baseDirPfL, nameBuffer.baseDirPfR);
- std::swap(existsLeft_, existsRight_);
+ std::swap(shortNameLeft_, shortNameRight_);
}
@@ -1009,66 +842,69 @@ const Zstring& HierarchyObject::getRelativeNamePf() const
inline
-DirMapping& HierarchyObject::addSubDir(bool existsLeft,
- const Zstring& dirNameShort,
- bool existsRight)
+DirMapping& HierarchyObject::addSubDir(const Zstring& shortNameLeft,
+ const Zstring& shortNameRight)
{
- subDirs.push_back(DirMapping(existsLeft, dirNameShort, existsRight, *this));
+ subDirs.push_back(DirMapping(shortNameLeft, shortNameRight, *this));
return subDirs.back();
}
inline
-FileMapping& HierarchyObject::addSubFile(const FileDescriptor& left, //file exists on both sides
- const Zstring& fileNameShort,
- CompareFilesResult defaultCmpResult,
- const FileDescriptor& right)
+FileMapping& HierarchyObject::addSubFile(
+ const Zstring& shortNameLeft,
+ const FileDescriptor& left, //file exists on both sides
+ CompareFilesResult defaultCmpResult,
+ const Zstring& shortNameRight,
+ const FileDescriptor& right)
{
- subFiles.push_back(FileMapping(left, fileNameShort, defaultCmpResult, right, *this));
+ subFiles.push_back(FileMapping(shortNameLeft, left, defaultCmpResult, shortNameRight, right, *this));
return subFiles.back();
}
inline
void HierarchyObject::addSubFile(const FileDescriptor& left, //file exists on left side only
- const Zstring& fileNameShort)
+ const Zstring& shortNameLeft)
{
- subFiles.push_back(FileMapping(left, fileNameShort, *this));
+ subFiles.push_back(FileMapping(shortNameLeft, left, FILE_LEFT_SIDE_ONLY, Zstring(), FileDescriptor(), *this));
}
inline
-void HierarchyObject::addSubFile(const Zstring& fileNameShort, //file exists on right side only
+void HierarchyObject::addSubFile(const Zstring& shortNameRight, //file exists on right side only
const FileDescriptor& right)
{
- subFiles.push_back(FileMapping(fileNameShort, right, *this));
+ subFiles.push_back(FileMapping(Zstring(), FileDescriptor(), FILE_RIGHT_SIDE_ONLY, shortNameRight, right, *this));
}
inline
-SymLinkMapping& HierarchyObject::addSubLink(const LinkDescriptor& left, //link exists on both sides
- const Zstring& linkNameShort,
- CompareSymlinkResult defaultCmpResult,
- const LinkDescriptor& right)
+SymLinkMapping& HierarchyObject::addSubLink(
+ const Zstring& shortNameLeft,
+ const LinkDescriptor& left, //link exists on both sides
+ CompareSymlinkResult defaultCmpResult,
+ const Zstring& shortNameRight,
+ const LinkDescriptor& right)
{
- subLinks.push_back(SymLinkMapping(left, linkNameShort, defaultCmpResult, right, *this));
+ subLinks.push_back(SymLinkMapping(shortNameLeft, left, defaultCmpResult, shortNameRight, right, *this));
return subLinks.back();
}
inline
void HierarchyObject::addSubLink(const LinkDescriptor& left, //link exists on left side only
- const Zstring& linkNameShort)
+ const Zstring& shortNameLeft)
{
- subLinks.push_back(SymLinkMapping(left, linkNameShort, *this));
+ subLinks.push_back(SymLinkMapping(shortNameLeft, left, SYMLINK_LEFT_SIDE_ONLY, Zstring(), LinkDescriptor(), *this));
}
inline
-void HierarchyObject::addSubLink(const Zstring& linkNameShort, //link exists on right side only
+void HierarchyObject::addSubLink(const Zstring& shortNameRight, //link exists on right side only
const LinkDescriptor& right)
{
- subLinks.push_back(SymLinkMapping(linkNameShort, right, *this));
+ subLinks.push_back(SymLinkMapping(Zstring(), LinkDescriptor(), SYMLINK_RIGHT_SIDE_ONLY, shortNameRight, right, *this));
}
@@ -1139,6 +975,7 @@ void DirMapping::swap()
cmpResult = DIR_LEFT_SIDE_ONLY;
break;
case DIR_EQUAL:
+ case DIR_DIFFERENT_METADATA:
break;
}
}
@@ -1232,6 +1069,7 @@ void FileMapping::swap()
break;
case FILE_DIFFERENT:
case FILE_EQUAL:
+ case FILE_DIFFERENT_METADATA:
case FILE_CONFLICT:
break;
}
@@ -1432,6 +1270,7 @@ void SymLinkMapping::swap()
cmpResult = SYMLINK_LEFT_NEWER;
break;
case SYMLINK_EQUAL:
+ case SYMLINK_DIFFERENT_METADATA:
case SYMLINK_DIFFERENT:
case SYMLINK_CONFLICT:
break;
@@ -1496,5 +1335,3 @@ void SymLinkMapping::setCategoryConflict(const wxString& description)
}
#endif // FILEHIERARCHY_H_INCLUDED
-
-
diff --git a/library/binary.cpp b/library/binary.cpp
index cbcef238..1b722702 100644
--- a/library/binary.cpp
+++ b/library/binary.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "binary.h"
diff --git a/library/binary.h b/library/binary.h
index bf477116..847c7169 100644
--- a/library/binary.h
+++ b/library/binary.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef BINARY_H_INCLUDED
diff --git a/library/cmp_filetime.h b/library/cmp_filetime.h
new file mode 100644
index 00000000..b95eae5f
--- /dev/null
+++ b/library/cmp_filetime.h
@@ -0,0 +1,66 @@
+#ifndef CMP_FILETIME_H_INCLUDED
+#define CMP_FILETIME_H_INCLUDED
+
+#include <wx/longlong.h>
+#include <wx/stopwatch.h>
+
+
+namespace ffs3
+{
+//---------------------------------------------------------------------------------------------------------------
+inline
+bool sameFileTime(const wxLongLong& a, const wxLongLong& b, size_t tolerance)
+{
+ if (a < b)
+ return b <= a + tolerance;
+ else
+ return a <= b + tolerance;
+}
+//---------------------------------------------------------------------------------------------------------------
+
+class CmpFileTime
+{
+public:
+ CmpFileTime(size_t tolerance) :
+ tolerance_(tolerance) {}
+
+ enum Result
+ {
+ TIME_EQUAL,
+ TIME_LEFT_NEWER,
+ TIME_RIGHT_NEWER,
+ TIME_LEFT_INVALID,
+ TIME_RIGHT_INVALID
+ };
+
+ Result getResult(const wxLongLong& lhs, const wxLongLong& rhs) const
+ {
+ if (lhs == rhs)
+ return TIME_EQUAL;
+
+ //number of seconds since Jan 1st 1970 + 1 year (needn't be too precise)
+ static const long oneYearFromNow = wxGetUTCTime() + 365 * 24 * 3600; //static in header: not a big deal in this case!
+
+ //check for erroneous dates (but only if dates are not (EXACTLY) the same)
+ if (lhs < 0 || lhs > oneYearFromNow) //earlier than Jan 1st 1970 or more than one year in future
+ return TIME_LEFT_INVALID;
+
+ if (rhs < 0 || rhs > oneYearFromNow)
+ return TIME_RIGHT_INVALID;
+
+ if (sameFileTime(lhs, rhs, tolerance_)) //last write time may differ by up to 2 seconds (NTFS vs FAT32)
+ return TIME_EQUAL;
+
+ //regular time comparison
+ if (lhs < rhs)
+ return TIME_RIGHT_NEWER;
+ else
+ return TIME_LEFT_NEWER;
+ }
+
+private:
+ const size_t tolerance_;
+};
+}
+
+#endif // CMP_FILETIME_H_INCLUDED
diff --git a/library/custom_grid.cpp b/library/custom_grid.cpp
index e7a724a0..274ef778 100644
--- a/library/custom_grid.cpp
+++ b/library/custom_grid.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "custom_grid.h"
@@ -197,8 +197,11 @@ protected:
static const wxColour COLOR_CMP_BLUE;
static const wxColour COLOR_CMP_GREEN;
static const wxColour COLOR_SYNC_BLUE;
+ static const wxColour COLOR_SYNC_BLUE_LIGHT;
static const wxColour COLOR_SYNC_GREEN;
+ static const wxColour COLOR_SYNC_GREEN_LIGHT;
static const wxColour COLOR_YELLOW;
+ static const wxColour COLOR_YELLOW_LIGHT;
const GridView* gridDataView; //(very fast) access to underlying grid data :)
@@ -217,8 +220,11 @@ const wxColour CustomGridTable::COLOR_CMP_RED( 249, 163, 165);
const wxColour CustomGridTable::COLOR_CMP_BLUE( 144, 232, 246);
const wxColour CustomGridTable::COLOR_CMP_GREEN( 147, 253, 159);
const wxColour CustomGridTable::COLOR_SYNC_BLUE( 201, 203, 247);
+const wxColour CustomGridTable::COLOR_SYNC_BLUE_LIGHT(201, 225, 247);
const wxColour CustomGridTable::COLOR_SYNC_GREEN(197, 248, 190);
+const wxColour CustomGridTable::COLOR_SYNC_GREEN_LIGHT(226, 248, 190);
const wxColour CustomGridTable::COLOR_YELLOW( 247, 252, 62);
+const wxColour CustomGridTable::COLOR_YELLOW_LIGHT(253, 252, 169);
class CustomGridTableRim : public CustomGridTable
@@ -331,10 +337,10 @@ protected:
value = zToWx(dirObj.getFullName<side>());
break;
case xmlAccess::FILENAME:
- value = wxEmptyString;
+ value = zToWx(dirObj.getShortName<side>());
break;
case xmlAccess::REL_PATH:
- value = zToWx(dirObj.getRelativeName<side>());
+ value = zToWx(dirObj.getParentRelativeName());
break;
case xmlAccess::DIRECTORY:
value = zToWx(dirObj.getBaseDirPf<side>());
@@ -527,10 +533,14 @@ private:
case SO_DELETE_LEFT:
case SO_OVERWRITE_LEFT:
return COLOR_SYNC_BLUE;
+ case SO_COPY_METADATA_TO_LEFT:
+ return COLOR_SYNC_BLUE_LIGHT;
case SO_CREATE_NEW_RIGHT:
case SO_DELETE_RIGHT:
case SO_OVERWRITE_RIGHT:
return COLOR_SYNC_GREEN;
+ case SO_COPY_METADATA_TO_RIGHT:
+ return COLOR_SYNC_GREEN_LIGHT;
case SO_UNRESOLVED_CONFLICT:
return COLOR_YELLOW;
case SO_DO_NOTHING:
@@ -554,6 +564,8 @@ private:
return *wxWHITE;
case FILE_CONFLICT:
return COLOR_YELLOW;
+ case FILE_DIFFERENT_METADATA:
+ return COLOR_YELLOW_LIGHT;
}
}
}
@@ -1919,9 +1931,11 @@ void CustomGridMiddle::showToolTip(int rowNumber, wxPoint pos)
toolTip->show(getDescription(syncOp), pos, &GlobalResources::getInstance().getImageByName(wxT("syncDeleteRightAct")));
break;
case SO_OVERWRITE_LEFT:
+ case SO_COPY_METADATA_TO_LEFT:
toolTip->show(getDescription(syncOp), pos, &GlobalResources::getInstance().getImageByName(wxT("syncDirLeftAct")));
break;
case SO_OVERWRITE_RIGHT:
+ case SO_COPY_METADATA_TO_RIGHT:
toolTip->show(getDescription(syncOp), pos, &GlobalResources::getInstance().getImageByName(wxT("syncDirRightAct")));
break;
case SO_DO_NOTHING:
@@ -1958,6 +1972,9 @@ void CustomGridMiddle::showToolTip(int rowNumber, wxPoint pos)
case FILE_EQUAL:
toolTip->show(getDescription(cmpRes), pos, &GlobalResources::getInstance().getImageByName(wxT("equalAct")));
break;
+ case FILE_DIFFERENT_METADATA:
+ toolTip->show(getDescription(cmpRes), pos, &GlobalResources::getInstance().getImageByName(wxT("conflictAct")));
+ break;
case FILE_CONFLICT:
toolTip->show(fsObj->getCatConflict(), pos, &GlobalResources::getInstance().getImageByName(wxT("conflictAct")));
break;
@@ -2178,6 +2195,7 @@ void GridCellRendererMiddle::Draw(wxGrid& grid,
dc.DrawLabel(wxEmptyString, GlobalResources::getInstance().getImageByName(wxT("equalSmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL);
break;
case FILE_CONFLICT:
+ case FILE_DIFFERENT_METADATA:
dc.DrawLabel(wxEmptyString, GlobalResources::getInstance().getImageByName(wxT("conflictSmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL);
break;
}
@@ -2232,8 +2250,10 @@ const wxBitmap& ffs3::getSyncOpImage(SyncOperation syncOp)
case SO_DELETE_RIGHT:
return GlobalResources::getInstance().getImageByName(wxT("deleteRightSmall"));
case SO_OVERWRITE_RIGHT:
+ case SO_COPY_METADATA_TO_RIGHT:
return GlobalResources::getInstance().getImageByName(wxT("syncDirRightSmall"));
case SO_OVERWRITE_LEFT:
+ case SO_COPY_METADATA_TO_LEFT:
return GlobalResources::getInstance().getImageByName(wxT("syncDirLeftSmall"));
case SO_DO_NOTHING:
return GlobalResources::getInstance().getImageByName(wxT("syncDirNoneSmall"));
diff --git a/library/custom_grid.h b/library/custom_grid.h
index 193b403d..1517230b 100644
--- a/library/custom_grid.h
+++ b/library/custom_grid.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef CUSTOMGRID_H_INCLUDED
@@ -167,12 +167,12 @@ protected:
template <ffs3::SelectedSide side>
void setTooltip(const wxMouseEvent& event);
-void setOtherGrid(CustomGridRim* other); //call during initialization!
+ void setOtherGrid(CustomGridRim* other); //call during initialization!
private:
CustomGridTableRim* getGridDataTableRim() const;
-void OnResizeColumn(wxGridSizeEvent& event);
+ void OnResizeColumn(wxGridSizeEvent& event);
//this method is called when grid view changes: useful for parallel updating of multiple grids
virtual void alignOtherGrids(CustomGrid* gridLeft, CustomGrid* gridMiddle, CustomGrid* gridRight);
diff --git a/library/db_file.cpp b/library/db_file.cpp
index a0f5099c..180ab0a4 100644
--- a/library/db_file.cpp
+++ b/library/db_file.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "db_file.h"
@@ -29,7 +29,7 @@ namespace
{
//-------------------------------------------------------------------------------------------------------------------------------
const char FILE_FORMAT_DESCR[] = "FreeFileSync";
-const int FILE_FORMAT_VER = 4;
+const int FILE_FORMAT_VER = 5;
//-------------------------------------------------------------------------------------------------------------------------------
@@ -40,11 +40,10 @@ public:
FileInputStream(filename)
{
//read FreeFileSync file identifier
- char formatDescr[sizeof(FILE_FORMAT_DESCR)];
+ char formatDescr[sizeof(FILE_FORMAT_DESCR)] = {};
Read(formatDescr, sizeof(formatDescr)); //throw (FileError)
- formatDescr[sizeof(formatDescr) - 1] = 0;
- if (std::string(formatDescr) != FILE_FORMAT_DESCR)
+ if (!std::equal(FILE_FORMAT_DESCR, FILE_FORMAT_DESCR + sizeof(FILE_FORMAT_DESCR), formatDescr))
throw FileError(wxString(_("Incompatible synchronization database format:")) + wxT(" \n") + wxT("\"") + zToWx(filename) + wxT("\""));
}
@@ -75,6 +74,10 @@ class ReadDirInfo : public util::ReadInputStream
public:
ReadDirInfo(wxInputStream& stream, const wxString& errorObjName, DirInformation& dirInfo) : ReadInputStream(stream, errorObjName)
{
+ //|-------------------------------------------------------------------------------------
+ //| ensure 32/64 bit portability: used fixed size data types only e.g. boost::uint32_t |
+ //|-------------------------------------------------------------------------------------
+
//read filter settings
dirInfo.filter = BaseFilter::loadFilter(getStream());
check();
@@ -86,15 +89,15 @@ public:
private:
void execute(DirContainer& dirCont) const
{
- size_t fileCount = readNumberC<size_t>();
+ boost::uint32_t fileCount = readNumberC<boost::uint32_t>();
while (fileCount-- != 0)
readSubFile(dirCont);
- size_t symlinkCount = readNumberC<size_t>();
+ boost::uint32_t symlinkCount = readNumberC<boost::uint32_t>();
while (symlinkCount-- != 0)
readSubLink(dirCont);
- size_t dirCount = readNumberC<size_t>();
+ boost::uint32_t dirCount = readNumberC<boost::uint32_t>();
while (dirCount-- != 0)
readSubDirectory(dirCont);
}
@@ -104,11 +107,11 @@ private:
//attention: order of function argument evaluation is undefined! So do it one after the other...
const Zstring shortName = readStringC(); //file name
- const long modHigh = readNumberC<long>();
- const unsigned long modLow = readNumberC<unsigned long>();
+ const boost::int32_t modHigh = readNumberC<boost::int32_t>();
+ const boost::uint32_t modLow = readNumberC<boost::uint32_t>();
- const unsigned long sizeHigh = readNumberC<unsigned long>();
- const unsigned long sizeLow = readNumberC<unsigned long>();
+ const boost::uint32_t sizeHigh = readNumberC<boost::uint32_t>();
+ const boost::uint32_t sizeLow = readNumberC<boost::uint32_t>();
//const util::FileID fileIdentifier(stream_);
//check();
@@ -122,11 +125,11 @@ private:
void readSubLink(DirContainer& dirCont) const
{
//attention: order of function argument evaluation is undefined! So do it one after the other...
- const Zstring shortName = readStringC(); //file name
- const long modHigh = readNumberC<long>();
- const unsigned long modLow = readNumberC<unsigned long>();
- const Zstring targetPath = readStringC(); //file name
- const LinkDescriptor::LinkType linkType = static_cast<LinkDescriptor::LinkType>(readNumberC<int>());
+ const Zstring shortName = readStringC(); //file name
+ const boost::int32_t modHigh = readNumberC<boost::int32_t>();
+ const boost::uint32_t modLow = readNumberC<boost::uint32_t>();
+ const Zstring targetPath = readStringC(); //file name
+ const LinkDescriptor::LinkType linkType = static_cast<LinkDescriptor::LinkType>(readNumberC<boost::int32_t>());
dirCont.addSubLink(shortName,
LinkDescriptor(wxLongLong(modHigh, modLow), targetPath, linkType));
@@ -141,10 +144,13 @@ private:
}
};
-
-typedef boost::shared_ptr<std::vector<char> > MemoryStreamPtr; //byte stream representing DirInformation
-typedef std::map<util::UniqueId, MemoryStreamPtr> DirectoryTOC; //list of streams ordered by a UUID pointing to their partner database
-typedef std::pair<util::UniqueId, DirectoryTOC> DbStreamData; //header data: UUID representing this database, item data: list of dir-streams
+namespace
+{
+typedef std::string UniqueId;
+typedef boost::shared_ptr<std::vector<char> > MemoryStreamPtr; //byte stream representing DirInformation
+typedef std::map<UniqueId, MemoryStreamPtr> DirectoryTOC; //list of streams ordered by a UUID pointing to their partner database
+typedef std::pair<UniqueId, DirectoryTOC> DbStreamData; //header data: UUID representing this database, item data: list of dir-streams
+}
/* Example
left side right side
--------- ----------
@@ -160,21 +166,26 @@ class ReadFileStream : public util::ReadInputStream
public:
ReadFileStream(wxInputStream& stream, const wxString& filename, DbStreamData& output) : ReadInputStream(stream, filename)
{
- if (readNumberC<int>() != FILE_FORMAT_VER) //read file format version
+ //|-------------------------------------------------------------------------------------
+ //| ensure 32/64 bit portability: used fixed size data types only e.g. boost::uint32_t |
+ //|-------------------------------------------------------------------------------------
+
+ if (readNumberC<boost::int32_t>() != FILE_FORMAT_VER) //read file format version
throw FileError(wxString(_("Incompatible synchronization database format:")) + wxT(" \n") + wxT("\"") + filename + wxT("\""));
//read DB id
- output.first = util::UniqueId(getStream());
- check();
+ const CharArray tmp = readArrayC();
+ output.first.assign(tmp->begin(), tmp->end());
DirectoryTOC& dbList = output.second;
dbList.clear();
- size_t dbCount = readNumberC<size_t>(); //number of databases: one for each sync-pair
+ boost::uint32_t dbCount = readNumberC<boost::uint32_t>(); //number of databases: one for each sync-pair
while (dbCount-- != 0)
{
- const util::UniqueId partnerID(getStream()); //DB id of partner databases
- check();
+ //DB id of partner databases
+ const CharArray tmp2 = readArrayC();
+ const std::string partnerID(tmp2->begin(), tmp2->end());
CharArray buffer = readArrayC(); //read db-entry stream (containing DirInformation)
@@ -188,8 +199,8 @@ DbStreamData loadFile(const Zstring& filename) //throw (FileError)
{
if (!ffs3::fileExists(filename))
throw FileErrorDatabaseNotExisting(wxString(_("Initial synchronization:")) + wxT(" \n\n") +
- _("One of the FreeFileSync database files is not yet existing:") + wxT(" \n") +
- wxT("\"") + zToWx(filename) + wxT("\""));
+ _("One of the FreeFileSync database files is not yet existing:") + wxT(" \n") +
+ wxT("\"") + zToWx(filename) + wxT("\""));
//read format description (uncompressed)
FileInputStreamDB uncompressed(filename); //throw (FileError)
@@ -219,13 +230,13 @@ std::pair<DirInfoPtr, DirInfoPtr> ffs3::loadFromDisk(const BaseDirMapping& baseM
if (dbLeft == dbEntriesLeft.second.end())
throw FileErrorDatabaseNotExisting(wxString(_("Initial synchronization:")) + wxT(" \n\n") +
- _("One of the FreeFileSync database entries within the following file is not yet existing:") + wxT(" \n") +
- wxT("\"") + zToWx(fileNameLeft) + wxT("\""));
+ _("One of the FreeFileSync database entries within the following file is not yet existing:") + wxT(" \n") +
+ wxT("\"") + zToWx(fileNameLeft) + wxT("\""));
if (dbRight == dbEntriesRight.second.end())
throw FileErrorDatabaseNotExisting(wxString(_("Initial synchronization:")) + wxT(" \n\n") +
- _("One of the FreeFileSync database entries within the following file is not yet existing:") + wxT(" \n") +
- wxT("\"") + zToWx(fileNameRight) + wxT("\""));
+ _("One of the FreeFileSync database entries within the following file is not yet existing:") + wxT(" \n") +
+ wxT("\"") + zToWx(fileNameRight) + wxT("\""));
//read streams into DirInfo
boost::shared_ptr<DirInformation> dirInfoLeft(new DirInformation);
@@ -278,13 +289,13 @@ private:
{
util::ProxyForEach<SaveDirInfo<side> > prx(*this); //grant std::for_each access to private parts of this class
- writeNumberC<size_t>(std::count_if(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), IsNonEmpty<side>())); //number of (existing) files
+ writeNumberC<boost::uint32_t>(std::count_if(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), IsNonEmpty<side>())); //number of (existing) files
std::for_each(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), prx);
- writeNumberC<size_t>(std::count_if(hierObj.useSubLinks().begin(), hierObj.useSubLinks().end(), IsNonEmpty<side>())); //number of (existing) files
+ writeNumberC<boost::uint32_t>(std::count_if(hierObj.useSubLinks().begin(), hierObj.useSubLinks().end(), IsNonEmpty<side>())); //number of (existing) files
std::for_each(hierObj.useSubLinks().begin(), hierObj.useSubLinks().end(), prx);
- writeNumberC<size_t>(std::count_if(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(), IsNonEmpty<side>())); //number of (existing) directories
+ writeNumberC<boost::uint32_t>(std::count_if(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(), IsNonEmpty<side>())); //number of (existing) directories
std::for_each(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(), prx);
}
@@ -292,11 +303,11 @@ private:
{
if (!fileMap.isEmpty<side>())
{
- writeStringC(fileMap.getObjShortName()); //file name
- writeNumberC<long>( fileMap.getLastWriteTime<side>().GetHi()); //last modification time
- writeNumberC<unsigned long>(fileMap.getLastWriteTime<side>().GetLo()); //
- writeNumberC<unsigned long>(fileMap.getFileSize<side>().GetHi()); //filesize
- writeNumberC<unsigned long>(fileMap.getFileSize<side>().GetLo()); //
+ writeStringC(fileMap.getShortName<side>()); //file name
+ writeNumberC<boost::int32_t> (fileMap.getLastWriteTime<side>().GetHi()); //last modification time
+ writeNumberC<boost::uint32_t>(fileMap.getLastWriteTime<side>().GetLo()); //
+ writeNumberC<boost::uint32_t>(fileMap.getFileSize<side>().GetHi()); //filesize
+ writeNumberC<boost::uint32_t>(fileMap.getFileSize<side>().GetLo()); //
//fileMap.getFileID<side>().toStream(stream_); //unique file identifier
//check();
@@ -307,11 +318,11 @@ private:
{
if (!linkObj.isEmpty<side>())
{
- writeStringC(linkObj.getObjShortName());
- writeNumberC<long>( linkObj.getLastWriteTime<side>().GetHi()); //last modification time
- writeNumberC<unsigned long>(linkObj.getLastWriteTime<side>().GetLo()); //
+ writeStringC(linkObj.getShortName<side>());
+ writeNumberC<boost::int32_t> (linkObj.getLastWriteTime<side>().GetHi()); //last modification time
+ writeNumberC<boost::uint32_t>(linkObj.getLastWriteTime<side>().GetLo()); //
writeStringC(linkObj.getTargetPath<side>());
- writeNumberC<int>(linkObj.getLinkType<side>());
+ writeNumberC<boost::int32_t>(linkObj.getLinkType<side>());
}
}
@@ -319,7 +330,7 @@ private:
{
if (!dirMap.isEmpty<side>())
{
- writeStringC(dirMap.getObjShortName()); //directory name
+ writeStringC(dirMap.getShortName<side>()); //directory name
execute(dirMap); //recurse
}
}
@@ -332,22 +343,22 @@ public:
WriteFileStream(const DbStreamData& input, const wxString& filename, wxOutputStream& stream) : WriteOutputStream(filename, stream)
{
//save file format version
- writeNumberC<int>(FILE_FORMAT_VER);
+ writeNumberC<boost::int32_t>(FILE_FORMAT_VER);
//write DB id
- input.first.toStream(getStream());
- check();
+ writeArrayC(std::vector<char>(input.first.begin(), input.first.end()));
const DirectoryTOC& dbList = input.second;
- writeNumberC<size_t>(dbList.size()); //number of database records: one for each sync-pair
+ writeNumberC<boost::uint32_t>(static_cast<boost::uint32_t>(dbList.size())); //number of database records: one for each sync-pair
for (DirectoryTOC::const_iterator i = dbList.begin(); i != dbList.end(); ++i)
{
- i->first.toStream(getStream()); //DB id of partner database
- check();
+ //DB id of partner database
+ writeArrayC(std::vector<char>(i->first.begin(), i->first.end()));
- writeArrayC(*(i->second)); //write DirInformation stream
+ //write DirInformation stream
+ writeArrayC(*(i->second));
}
}
};
@@ -377,19 +388,16 @@ void saveFile(const DbStreamData& dbStream, const Zstring& filename) //throw (Fi
}
-bool entryExisting(const DirectoryTOC& table, const util::UniqueId& newKey, const MemoryStreamPtr& newValue)
+bool entryExisting(const DirectoryTOC& table, const UniqueId& newKey, const MemoryStreamPtr& newValue)
{
DirectoryTOC::const_iterator iter = table.find(newKey);
if (iter == table.end())
return false;
- if (!iter->second.get())
- return !newValue.get();
-
- if (!newValue.get())
- return false;
+ if (!newValue.get() || !iter->second.get())
+ return !newValue.get() && !iter->second.get();
- return newValue->size() == iter->second->size() && std::equal(newValue->begin(), newValue->end(), iter->second->begin());
+ return *newValue == *iter->second;
}
@@ -407,22 +415,27 @@ void ffs3::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileError)
//read file data: db ID + mapping of partner-ID/DirInfo-stream: may throw!
DbStreamData dbEntriesLeft;
- if (ffs3::fileExists(baseMapping.getDBFilename<LEFT_SIDE>()))
- try
- {
- dbEntriesLeft = ::loadFile(baseMapping.getDBFilename<LEFT_SIDE>());
- }
- catch(FileError&) {} //if error occurs: just overwrite old file! User is already informed about issues right after comparing!
- //else -> dbEntriesLeft has empty mapping, but already a DB-ID!
+ try
+ {
+ dbEntriesLeft = ::loadFile(baseMapping.getDBFilename<LEFT_SIDE>());
+ }
+ catch(FileError&)
+ {
+ //if error occurs: just overwrite old file! User is already informed about issues right after comparing!
+ //dbEntriesLeft has empty mapping, but already a DB-ID!
+ dbEntriesLeft.first = util::generateGUID();
+ }
//read file data: db ID + mapping of partner-ID/DirInfo-stream: may throw!
DbStreamData dbEntriesRight;
- if (ffs3::fileExists(baseMapping.getDBFilename<RIGHT_SIDE>()))
- try
- {
- dbEntriesRight = ::loadFile(baseMapping.getDBFilename<RIGHT_SIDE>());
- }
- catch(FileError&) {} //if error occurs: just overwrite old file! User is already informed about issues right after comparing!
+ try
+ {
+ dbEntriesRight = ::loadFile(baseMapping.getDBFilename<RIGHT_SIDE>());
+ }
+ catch(FileError&)
+ {
+ dbEntriesRight.first = util::generateGUID();
+ }
//create new database entries
MemoryStreamPtr dbEntryLeft(new std::vector<char>);
diff --git a/library/db_file.h b/library/db_file.h
index ea9d68ad..8b88473d 100644
--- a/library/db_file.h
+++ b/library/db_file.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef DBFILE_H_INCLUDED
diff --git a/library/detect_renaming.cpp b/library/detect_renaming.cpp
index 617a3eba..3c491ae3 100644
--- a/library/detect_renaming.cpp
+++ b/library/detect_renaming.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "detect_renaming.h"
diff --git a/library/detect_renaming.h b/library/detect_renaming.h
index 45bdf59d..ab974cf9 100644
--- a/library/detect_renaming.h
+++ b/library/detect_renaming.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef DETECTRENAMING_H_INCLUDED
diff --git a/library/dir_lock.cpp b/library/dir_lock.cpp
index f4ed8e07..3d443b11 100644
--- a/library/dir_lock.cpp
+++ b/library/dir_lock.cpp
@@ -17,6 +17,7 @@
#include "../shared/serialize.h"
#include <boost/cstdint.hpp>
#include "../shared/build_info.h"
+#include <wx/log.h>
#ifdef FFS_WIN
#include <tlhelp32.h>
@@ -40,6 +41,9 @@ const size_t EMIT_LIFE_SIGN_INTERVAL = 5000; //show life sign; unit [ms]
const size_t POLL_LIFE_SIGN_INTERVAL = 6000; //poll for life sign; unit [ms]
const size_t DETECT_EXITUS_INTERVAL = 30000; //assume abandoned lock; unit [ms]
+const char LOCK_FORMAT_DESCR[] = "FreeFileSync";
+const int LOCK_FORMAT_VER = 1; //lock file format version
+
typedef Zbase<Zchar, StorageDeepCopy> BasicString; //thread safe string class
}
@@ -72,7 +76,7 @@ public:
}
catch (const std::exception& e) //exceptions must be catched per thread
{
- wxMessageBox(wxString::FromAscii(e.what()), wxString(_("An exception occurred!")) + wxT("(Dirlock)"), wxOK | wxICON_ERROR);
+ wxSafeShowMessage(wxString(_("An exception occurred!")) + wxT("(Dirlock)"), wxString::FromAscii(e.what())); //simple wxMessageBox won't do for threads
}
}
@@ -130,18 +134,6 @@ private:
namespace
{
-bool somethingExists(const Zstring& objname) //throw() check whether any object with this name exists
-{
-#ifdef FFS_WIN
- return ::GetFileAttributes(applyLongPathPrefix(objname).c_str()) != INVALID_FILE_ATTRIBUTES;
-
-#elif defined FFS_LINUX
- struct stat fileInfo;
- return ::lstat(objname.c_str(), &fileInfo) == 0;
-#endif
-}
-
-
void deleteLockFile(const Zstring& filename) //throw (FileError)
{
#ifdef FFS_WIN
@@ -207,24 +199,25 @@ Zstring deleteAbandonedLockName(const Zstring& lockfilename)
namespace
{
+//read string from file stream
inline
-std::string readString(wxInputStream& stream) //read string from file stream
+std::string readString(wxInputStream& stream) //throw (std::exception)
{
const boost::uint32_t strLength = util::readNumber<boost::uint32_t>(stream);
std::string output;
- if (strLength > 0)
- {
- output.resize(strLength);
- stream.Read(&output[0], strLength);
- }
+ if (strLength > 0)
+ {
+ output.resize(strLength); //may throw for corrupted data
+ stream.Read(&output[0], strLength);
+ }
return output;
}
inline
void writeString(wxOutputStream& stream, const std::string& str) //write string to filestream
-{
- const boost::uint32_t strLength = static_cast<boost::uint32_t>(str.length());
+{
+ const boost::uint32_t strLength = static_cast<boost::uint32_t>(str.length());
util::writeNumber<boost::uint32_t>(stream, strLength);
stream.Write(str.c_str(), strLength);
}
@@ -246,6 +239,7 @@ struct LockInformation
{
LockInformation()
{
+ lockId = util::generateGUID();
#ifdef FFS_WIN
procDescr.processId = ::GetCurrentProcessId();
#elif defined FFS_LINUX
@@ -254,9 +248,16 @@ struct LockInformation
procDescr.computerId = getComputerId();
}
- LockInformation(wxInputStream& stream) : //read
- lockId(util::UniqueId(stream))
+ LockInformation(wxInputStream& stream) //read
{
+ char formatDescr[sizeof(LOCK_FORMAT_DESCR)] = {};
+ stream.Read(formatDescr, sizeof(LOCK_FORMAT_DESCR)); //file format header
+ const int lockFileVersion = util::readNumber<boost::int32_t>(stream); //
+ (void)lockFileVersion;
+
+ //some format checking here?
+
+ lockId = readString(stream);
procDescr.processId = static_cast<ProcessId>(util::readNumber<boost::uint64_t>(stream)); //possible loss of precision (32/64 bit process) covered by buildId
procDescr.computerId = readString(stream);
}
@@ -265,7 +266,10 @@ struct LockInformation
{
assert_static(sizeof(ProcessId) <= sizeof(boost::uint64_t)); //ensure portability
- lockId.toStream(stream);
+ stream.Write(LOCK_FORMAT_DESCR, sizeof(LOCK_FORMAT_DESCR));
+ util::writeNumber<boost::int32_t>(stream, LOCK_FORMAT_VER);
+
+ writeString(stream, lockId);
util::writeNumber<boost::uint64_t>(stream, procDescr.processId);
writeString(stream, procDescr.computerId);
}
@@ -276,7 +280,7 @@ struct LockInformation
typedef pid_t ProcessId;
#endif
- util::UniqueId lockId; //16 byte portable construct
+ std::string lockId; //16 byte UUID
struct ProcessDescription
{
@@ -314,7 +318,6 @@ ProcessStatus getProcessStatus(const LockInformation::ProcessDescription& procDe
if (!::Process32First(snapshot, //__in HANDLE hSnapshot,
&processEntry)) //__inout LPPROCESSENTRY32 lppe
return PROC_STATUS_NO_IDEA;
-
do
{
if (processEntry.th32ProcessID == procDescr.processId)
@@ -335,7 +338,7 @@ ProcessStatus getProcessStatus(const LockInformation::ProcessDescription& procDe
void writeLockInfo(const Zstring& lockfilename) //throw (FileError)
{
- //write GUID at the beginning of the file: this ID is a universal identifier for this lock (no matter what the path is, considering symlinks ,etc.)
+ //write GUID at the beginning of the file: this ID is a universal identifier for this lock (no matter what the path is, considering symlinks, distributed network, etc.)
FileOutputStream lockFile(lockfilename); //throw FileError()
LockInformation().toStream(lockFile);
}
@@ -349,7 +352,7 @@ LockInformation retrieveLockInfo(const Zstring& lockfilename) //throw (FileError
}
-util::UniqueId retrieveLockId(const Zstring& lockfilename) //throw (FileError, ErrorNotExisting)
+std::string retrieveLockId(const Zstring& lockfilename) //throw (FileError, ErrorNotExisting)
{
return retrieveLockInfo(lockfilename).lockId;
}
@@ -541,7 +544,7 @@ public:
try //actual check based on lock UUID, deadlock prevention: "lockfilename" may be an alternative name for an already active lock
{
- const util::UniqueId lockId = retrieveLockId(lockfilename); //throw (FileError, ErrorNotExisting)
+ const std::string lockId = retrieveLockId(lockfilename); //throw (FileError, ErrorNotExisting)
const boost::shared_ptr<SharedDirLock>& activeLock = findActive(lockId); //returns null-lock if not found
if (activeLock)
@@ -554,7 +557,7 @@ public:
//not yet in buffer, so create a new directory lock
boost::shared_ptr<SharedDirLock> newLock(new SharedDirLock(lockfilename, callback)); //throw (FileError)
- const util::UniqueId newLockId = retrieveLockId(lockfilename); //throw (FileError, ErrorNotExisting)
+ const std::string newLockId = retrieveLockId(lockfilename); //throw (FileError, ErrorNotExisting)
//update registry
fileToUuid[lockfilename] = newLockId; //throw()
@@ -566,7 +569,7 @@ public:
private:
LockAdmin() {}
- boost::shared_ptr<SharedDirLock> findActive(const util::UniqueId& lockId) //returns null-lock if not found
+ boost::shared_ptr<SharedDirLock> findActive(const std::string& lockId) //returns null-lock if not found
{
UuidToLockMap::const_iterator iterLock = uuidToLock.find(lockId);
return iterLock != uuidToLock.end() ?
@@ -576,8 +579,9 @@ private:
typedef boost::weak_ptr<SharedDirLock> SharedLock;
- typedef std::map<Zstring, util::UniqueId, LessFilename> FileToUuidMap; //n:1 handle uppper/lower case correctly
- typedef std::map<util::UniqueId, SharedLock> UuidToLockMap; //1:1
+ typedef std::string UniqueId;
+ typedef std::map<Zstring, UniqueId, LessFilename> FileToUuidMap; //n:1 handle uppper/lower case correctly
+ typedef std::map<UniqueId, SharedLock> UuidToLockMap; //1:1
FileToUuidMap fileToUuid; //lockname |-> UUID; locks can be referenced by a lockfilename or alternatively a UUID
UuidToLockMap uuidToLock; //UUID |-> "shared lock ownership"
diff --git a/library/dir_lock.h b/library/dir_lock.h
index fba65d2b..9ae4da08 100644
--- a/library/dir_lock.h
+++ b/library/dir_lock.h
@@ -19,7 +19,7 @@ RAII structure to place a directory lock against other FFS processes:
- ownership shared between all object instances refering to a specific lock location(= UUID)
- can be copied safely and efficiently! (ref-counting)
- detects and resolves abandoned locks (instantly if lock is associated with local pc, else after 30 seconds)
- - race-free (Windows, almost on Linux)
+ - race-free (Windows, almost on Linux(NFS))
*/
class DirLock
{
diff --git a/library/error_log.cpp b/library/error_log.cpp
index 9936a2ea..4f7c5847 100644
--- a/library/error_log.cpp
+++ b/library/error_log.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "error_log.h"
diff --git a/library/error_log.h b/library/error_log.h
index 876f78b9..d5696f80 100644
--- a/library/error_log.h
+++ b/library/error_log.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef ERRORLOGGING_H_INCLUDED
diff --git a/library/filter.cpp b/library/filter.cpp
index 7697ea4b..789a5d81 100644
--- a/library/filter.cpp
+++ b/library/filter.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "filter.h"
diff --git a/library/filter.h b/library/filter.h
index 91caff7d..c1be61eb 100644
--- a/library/filter.h
+++ b/library/filter.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FFS_FILTER_H_INCLUDED
@@ -55,8 +55,8 @@ public:
static FilterRef loadFilter(wxInputStream& stream); //CAVEAT!!! adapt this method for each new derivation!!!
private:
- virtual Zstring uniqueClassIdentifier() const = 0; //get identifier, used for serialization
virtual void save(wxOutputStream& stream) const = 0; //serialization
+ virtual Zstring uniqueClassIdentifier() const = 0; //get identifier, used for serialization
virtual bool cmpLessSameType(const BaseFilter& other) const = 0; //typeid(*this) == typeid(other) in this context!
};
@@ -64,14 +64,15 @@ private:
class NullFilter : public BaseFilter //no filtering at all
{
public:
- static FilterRef load(wxInputStream& stream); //"serial constructor"
virtual bool passFileFilter(const Zstring& relFilename) const;
virtual bool passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const;
virtual bool isNull() const;
private:
- virtual Zstring uniqueClassIdentifier() const;
+ friend class BaseFilter;
virtual void save(wxOutputStream& stream) const {}
+ virtual Zstring uniqueClassIdentifier() const;
+ static FilterRef load(wxInputStream& stream); //"serial constructor"
virtual bool cmpLessSameType(const BaseFilter& other) const;
};
@@ -80,15 +81,16 @@ class NameFilter : public BaseFilter //standard filter by filename
{
public:
NameFilter(const Zstring& includeFilter, const Zstring& excludeFilter);
- static FilterRef load(wxInputStream& stream); //"serial constructor"
virtual bool passFileFilter(const Zstring& relFilename) const;
virtual bool passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const;
virtual bool isNull() const;
private:
- virtual Zstring uniqueClassIdentifier() const;
+ friend class BaseFilter;
virtual void save(wxOutputStream& stream) const;
+ virtual Zstring uniqueClassIdentifier() const;
+ static FilterRef load(wxInputStream& stream); //"serial constructor"
virtual bool cmpLessSameType(const BaseFilter& other) const;
std::set<Zstring> filterFileIn; //upper case (windows)
@@ -105,15 +107,16 @@ class CombinedFilter : public BaseFilter //combine two filters to match if and
{
public:
CombinedFilter(const FilterRef& first, const FilterRef& second) : first_(first), second_(second) {}
- static FilterRef load(wxInputStream& stream); //"serial constructor"
virtual bool passFileFilter(const Zstring& relFilename) const;
virtual bool passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const;
virtual bool isNull() const;
private:
- virtual Zstring uniqueClassIdentifier() const;
+ friend class BaseFilter;
virtual void save(wxOutputStream& stream) const;
+ virtual Zstring uniqueClassIdentifier() const;
+ static FilterRef load(wxInputStream& stream); //"serial constructor"
virtual bool cmpLessSameType(const BaseFilter& other) const;
const FilterRef first_;
diff --git a/library/icon_buffer.cpp b/library/icon_buffer.cpp
index 20ff60f7..e03ec8c4 100644
--- a/library/icon_buffer.cpp
+++ b/library/icon_buffer.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "icon_buffer.h"
@@ -9,6 +9,7 @@
#include <map>
#include <queue>
#include <set>
+#include <wx/log.h>
#ifdef FFS_WIN
#include <wx/msw/wrapwin.h> //includes "windows.h"
@@ -321,7 +322,7 @@ void IconBuffer::WorkerThread::operator()() //thread entry
}
catch (const std::exception& e) //exceptions must be catched per thread
{
- wxMessageBox(wxString::FromAscii(e.what()), wxString(_("An exception occurred!")) + wxT("(Icon buffer)"), wxOK | wxICON_ERROR);
+ wxSafeShowMessage(wxString(_("An exception occurred!")) + wxT("(Icon buffer)"), wxString::FromAscii(e.what())); //simple wxMessageBox won't do for threads
}
}
@@ -364,7 +365,7 @@ void IconBuffer::WorkerThread::doWork()
//---------------------------------------------------------------------------------------------------
-class IconBuffer::IconDB : public std::map<BasicString, IconBuffer::IconHolder> {}; //entryName/icon -> ATTENTION: avoid ref-counting for this shared data structure!
+class IconBuffer::IconDB : public std::map<BasicString, IconBuffer::IconHolder, LessFilename> {}; //entryName/icon -> ATTENTION: avoid ref-counting for this shared data structure!
class IconBuffer::IconDbSequence : public std::queue<BasicString> {}; //entryName
//---------------------------------------------------------------------------------------------------
@@ -427,7 +428,7 @@ void IconBuffer::insertIntoBuffer(const BasicString& entryName, const IconHolder
assert(buffer->size() == bufSequence->size());
//remove elements if buffer becomes too big:
- if (buffer->size() > BUFFER_SIZE) //limit buffer size: critical because GDI resources are limited (e.g. 10000 on XP per process)
+ if (buffer->size() > BUFFER_SIZE_MAX) //limit buffer size: critical because GDI resources are limited (e.g. 10000 on XP per process)
{
//remove oldest element
buffer->erase(bufSequence->front());
diff --git a/library/icon_buffer.h b/library/icon_buffer.h
index 3e021445..d273a970 100644
--- a/library/icon_buffer.h
+++ b/library/icon_buffer.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef ICONBUFFER_H_INCLUDED
@@ -36,14 +36,14 @@ private:
IconBuffer();
~IconBuffer();
- static const size_t BUFFER_SIZE = 800; //maximum number of icons to buffer
+ static const size_t BUFFER_SIZE_MAX = 800; //maximum number of icons to buffer
class IconDB;
class IconHolder;
class IconDbSequence;
//---------------------------------------------------------------------------------------------------
-typedef Zbase<Zchar, StorageDeepCopy> BasicString; //thread safe string class
+ typedef Zbase<Zchar, StorageDeepCopy> BasicString; //thread safe string class
//avoid reference-counted objects for shared data: NOT THREADSAFE!!! (implicitly shared variable: ref-count)
//---------------------------------------------------------------------------------------------------
@@ -54,8 +54,8 @@ typedef Zbase<Zchar, StorageDeepCopy> BasicString; //thread safe string class
static IconHolder getAssociatedIconByExt(const BasicString& extension);
#ifdef FFS_WIN
-static BasicString getFileExtension(const BasicString& filename);
-static bool isPriceyExtension(const BasicString& extension);
+ static BasicString getFileExtension(const BasicString& filename);
+ static bool isPriceyExtension(const BasicString& extension);
#endif
//---------------------- Shared Data -------------------------
diff --git a/library/pch.h b/library/pch.h
index f7ff59ab..a8d6ae30 100644
--- a/library/pch.h
+++ b/library/pch.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FFS_PRECOMPILED_HEADER
diff --git a/library/process_xml.cpp b/library/process_xml.cpp
index bccd8e3a..c4e80d17 100644
--- a/library/process_xml.cpp
+++ b/library/process_xml.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "process_xml.h"
@@ -432,6 +432,10 @@ void FfsXmlParser::readXmlGlobalSettings(xmlAccess::XmlGlobalSettings& outputCfg
//folder dependency check
readXmlElementLogging("CheckForDependentFolders", optionalDialogs, outputCfg.optDialogs.warningDependentFolders);
+
+ //check for multi write access for directory as part of multiple pairs
+ readXmlElementLogging("CheckForMultipleWriteAccess", optionalDialogs, outputCfg.optDialogs.warningMultiFolderWriteAccess);
+
//significant difference check
readXmlElementLogging("CheckForSignificantDifference", optionalDialogs, outputCfg.optDialogs.warningSignificantDifference);
//check free disk space
@@ -517,9 +521,7 @@ void FfsXmlParser::readXmlGlobalSettings(xmlAccess::XmlGlobalSettings& outputCfg
//load config history elements
readXmlElementLogging("Folder", historyRight, outputCfg.gui.folderHistoryRight);
-
- readXmlElementLogging("SelectedTabBottomLeft", mainWindow, outputCfg.gui.selectedTabBottomLeft);
-
+ readXmlElementLogging("Perspective", mainWindow, outputCfg.gui.guiPerspectiveLast);
//external applications
const TiXmlElement* extApps = TiXmlHandleConst(gui).FirstChild("ExternalApplications").FirstChild("Commandline").ToElement();
@@ -542,9 +544,6 @@ void FfsXmlParser::readXmlGlobalSettings(xmlAccess::XmlGlobalSettings& outputCfg
//load config file history
const TiXmlElement* cfgHistory = TiXmlHandleConst(gui).FirstChild("ConfigHistory").ToElement();
- //load max. history size
- readXmlAttributeLogging("MaximumSize", cfgHistory, outputCfg.gui.cfgHistoryMax);
-
//load config history elements
readXmlElementLogging("File", cfgHistory, outputCfg.gui.cfgFileHistory);
@@ -846,6 +845,9 @@ bool writeXmlGlobalSettings(const xmlAccess::XmlGlobalSettings& inputCfg, TiXmlD
//warning: dependent folders
addXmlElement("CheckForDependentFolders", inputCfg.optDialogs.warningDependentFolders, optionalDialogs);
+ //check for multi write access for directory as part of multiple pairs
+ addXmlElement("CheckForMultipleWriteAccess", inputCfg.optDialogs.warningMultiFolderWriteAccess, optionalDialogs);
+
//significant difference check
addXmlElement("CheckForSignificantDifference", inputCfg.optDialogs.warningSignificantDifference, optionalDialogs);
@@ -941,7 +943,7 @@ bool writeXmlGlobalSettings(const xmlAccess::XmlGlobalSettings& inputCfg, TiXmlD
addXmlElement("Folder", inputCfg.gui.folderHistoryLeft, historyLeft);
addXmlElement("Folder", inputCfg.gui.folderHistoryRight, historyRight);
- addXmlElement("SelectedTabBottomLeft", inputCfg.gui.selectedTabBottomLeft, mainWindow);
+ addXmlElement("Perspective", inputCfg.gui.guiPerspectiveLast, mainWindow);
//external applications
TiXmlElement* extApp = new TiXmlElement("ExternalApplications");
@@ -960,7 +962,6 @@ bool writeXmlGlobalSettings(const xmlAccess::XmlGlobalSettings& inputCfg, TiXmlD
TiXmlElement* cfgHistory = new TiXmlElement("ConfigHistory");
gui->LinkEndChild(cfgHistory);
- addXmlAttribute("MaximumSize", inputCfg.gui.cfgHistoryMax, cfgHistory);
addXmlElement("File", inputCfg.gui.cfgFileHistory, cfgHistory);
@@ -992,6 +993,7 @@ wxString xmlAccess::getGlobalConfigFile()
void xmlAccess::OptionalDialogs::resetDialogs()
{
warningDependentFolders = true;
+ warningMultiFolderWriteAccess = true;
warningSignificantDifference = true;
warningNotEnoughDiskSpace = true;
warningUnresolvedConflicts = true;
diff --git a/library/process_xml.h b/library/process_xml.h
index 24a2fe9b..92d94d14 100644
--- a/library/process_xml.h
+++ b/library/process_xml.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef PROCESSXML_H_INCLUDED
@@ -100,6 +100,7 @@ struct OptionalDialogs
void resetDialogs();
bool warningDependentFolders;
+ bool warningMultiFolderWriteAccess;
bool warningSignificantDifference;
bool warningNotEnoughDiskSpace;
bool warningUnresolvedConflicts;
@@ -142,10 +143,8 @@ struct XmlGlobalSettings
isMaximized(false),
autoAdjustColumnsLeft(false),
autoAdjustColumnsRight(false),
- cfgHistoryMax(10),
folderHistLeftMax(12),
folderHistRightMax(12),
- selectedTabBottomLeft(0),
deleteOnBothSides(false),
useRecyclerForManualDeletion(true), //enable if OS supports it; else user will have to activate first and then get an error message
#ifdef FFS_WIN
@@ -187,7 +186,6 @@ struct XmlGlobalSettings
ExternalApps externelApplications;
std::vector<wxString> cfgFileHistory;
- unsigned int cfgHistoryMax;
std::vector<wxString> folderHistoryLeft;
unsigned int folderHistLeftMax;
@@ -195,8 +193,6 @@ struct XmlGlobalSettings
std::vector<wxString> folderHistoryRight;
unsigned int folderHistRightMax;
- int selectedTabBottomLeft;
-
bool deleteOnBothSides;
bool useRecyclerForManualDeletion;
bool textSearchRespectCase;
@@ -205,6 +201,8 @@ struct XmlGlobalSettings
size_t addFolderPairCountMax;
long lastUpdateCheck; //time of last update check
+
+ wxString guiPerspectiveLast; //used by wxAuiManager
} gui;
//---------------------------------------------------------------------
diff --git a/library/resources.cpp b/library/resources.cpp
index 637dfea3..5ef33826 100644
--- a/library/resources.cpp
+++ b/library/resources.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "resources.h"
diff --git a/library/resources.h b/library/resources.h
index d2e7ce49..776fe785 100644
--- a/library/resources.h
+++ b/library/resources.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef RESOURCES_H_INCLUDED
diff --git a/library/soft_filter.cpp b/library/soft_filter.cpp
index 18dcfd54..1c191b98 100644
--- a/library/soft_filter.cpp
+++ b/library/soft_filter.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "soft_filter.h"
diff --git a/library/soft_filter.h b/library/soft_filter.h
index dc889245..ad81ea44 100644
--- a/library/soft_filter.h
+++ b/library/soft_filter.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SOFTFILTER_H_INCLUDED
diff --git a/library/statistics.cpp b/library/statistics.cpp
index d246a7cc..7a77740c 100644
--- a/library/statistics.cpp
+++ b/library/statistics.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "statistics.h"
@@ -29,7 +29,7 @@ RetrieveStatistics::~RetrieveStatistics()
outputFile.Write(wxT("Time(ms);Objects;Data\n"));
- for (std::vector<statEntry>::const_iterator i = data.begin(); i != data.end(); ++i)
+ for (std::vector<StatEntry>::const_iterator i = data.begin(); i != data.end(); ++i)
{
using common::numberToString;
outputFile.Write(numberToString(i->time));
@@ -44,7 +44,7 @@ RetrieveStatistics::~RetrieveStatistics()
void RetrieveStatistics::writeEntry(const double value, const int objects)
{
- statEntry newEntry;
+ StatEntry newEntry;
newEntry.value = value;
newEntry.objects = objects;
newEntry.time = timer->Time();
@@ -104,7 +104,7 @@ wxString Statistics::formatRemainingTime(double timeInMs) const
formattedTime -= formattedTime % 5; //"floor"
}
else
- formattedTime = int(remainingTime); //"floor"
+ formattedTime = static_cast<int>(remainingTime); //"floor"
}
remainingTimeLast = formattedTime;
@@ -115,10 +115,10 @@ wxString Statistics::formatRemainingTime(double timeInMs) const
}
-Statistics::Statistics(const int totalObjectCount,
- const double totalDataAmount,
- const unsigned windowSizeRemainingTime,
- const unsigned windowSizeBytesPerSecond) :
+Statistics::Statistics(int totalObjectCount,
+ double totalDataAmount,
+ unsigned windowSizeRemainingTime,
+ unsigned windowSizeBytesPerSecond) :
objectsTotal(totalObjectCount),
dataTotal(totalDataAmount),
windowSizeRemTime(windowSizeRemainingTime),
@@ -132,20 +132,27 @@ Statistics::~Statistics()
delete timer;
}
-void Statistics::addMeasurement(const int objectsCurrent, const double dataCurrent)
+void Statistics::addMeasurement(int objectsCurrent, double dataCurrent)
{
- record newEntry;
- newEntry.objects = objectsCurrent;
- newEntry.data = dataCurrent;
- newEntry.time = timer->Time();
+ Record newRecord;
+ newRecord.objects = objectsCurrent;
+ newRecord.data = dataCurrent;
+
+ const long currentTime = timer->Time();
+
+ const TimeRecordMap::value_type newEntry(currentTime, newRecord);
//insert new record
- measurements.push_back(newEntry);
+ if (!measurements.empty())
+ measurements.insert(--measurements.end(), newEntry); //use fact that time is monotonously ascending
+ else
+ measurements.insert(newEntry);
//remove all records earlier than "currentTime - windowSize"
- const long newBegin = newEntry.time - windowMax;
- while (!measurements.empty() && measurements.front().time < newBegin)
- measurements.pop_front();
+ const long newBegin = currentTime - windowMax;
+ TimeRecordMap::iterator windowBegin = measurements.upper_bound(newBegin);
+ if (windowBegin != measurements.begin())
+ measurements.erase(measurements.begin(), --windowBegin); //retain one point before newBegin in order to handle "measurement holes"
}
@@ -153,20 +160,19 @@ wxString Statistics::getRemainingTime() const
{
if (!measurements.empty())
{
+ const TimeRecordMap::value_type& backRecord = *measurements.rbegin();
//find start of records "window"
- const record backElement = measurements.back();
- const long frontTime = backElement.time - windowSizeRemTime;
- std::list<record>::const_iterator frontElement = measurements.end();
- do
- {
- --frontElement;
- }
- while (frontElement != measurements.begin() && frontElement->time > frontTime);
+ const long frontTime = backRecord.first - windowSizeRemTime;
+ TimeRecordMap::const_iterator windowBegin = measurements.upper_bound(frontTime);
+ if (windowBegin != measurements.begin())
+ --windowBegin; //one point before window begin in order to handle "measurement holes"
- const double timeDelta = backElement.time - frontElement->time;
- const double dataDelta = backElement.data - frontElement->data;
+ const TimeRecordMap::value_type& frontRecord = *windowBegin;
+//-----------------------------------------------------------------------------------------------
+ const double timeDelta = backRecord.first - frontRecord.first;
+ const double dataDelta = backRecord.second.data - frontRecord.second.data;
- const double dataRemaining = dataTotal - backElement.data;
+ const double dataRemaining = dataTotal - backRecord.second.data;
if (!isNull(dataDelta))
return formatRemainingTime(dataRemaining * timeDelta / dataDelta);
@@ -180,17 +186,17 @@ wxString Statistics::getBytesPerSecond() const
{
if (!measurements.empty())
{
+ const TimeRecordMap::value_type& backRecord = *measurements.rbegin();
//find start of records "window"
- const long frontTime = measurements.back().time - windowSizeBPS;
- std::list<record>::const_iterator frontElement = measurements.end();
- do
- {
- --frontElement;
- }
- while (frontElement != measurements.begin() && frontElement->time > frontTime);
-
- const double timeDelta = measurements.back().time - frontElement->time;
- const double dataDelta = measurements.back().data - frontElement->data;
+ const long frontTime = backRecord.first - windowSizeBPS;
+ TimeRecordMap::const_iterator windowBegin = measurements.upper_bound(frontTime);
+ if (windowBegin != measurements.begin())
+ --windowBegin; //one point before window begin in order to handle "measurement holes"
+
+ const TimeRecordMap::value_type& frontRecord = *windowBegin;
+//-----------------------------------------------------------------------------------------------
+ const double timeDelta = backRecord.first - frontRecord.first;
+ const double dataDelta = backRecord.second.data - frontRecord.second.data;
if (!isNull(timeDelta))
return ffs3::formatFilesizeToShortString(dataDelta * 1000 / timeDelta) + _("/sec");
diff --git a/library/statistics.h b/library/statistics.h
index 26e8c196..a9692d77 100644
--- a/library/statistics.h
+++ b/library/statistics.h
@@ -1,14 +1,14 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef STATISTICS_H_INCLUDED
#define STATISTICS_H_INCLUDED
#include <vector>
-#include <list>
+#include <map>
#include <memory>
#include <wx/defs.h>
@@ -27,14 +27,14 @@ public:
void writeEntry(const double value, const int objects);
private:
- struct statEntry
+ struct StatEntry
{
long time;
int objects;
double value;
};
- std::vector<statEntry> data;
+ std::vector<StatEntry> data;
std::auto_ptr<wxStopWatch> timer;
};
@@ -42,14 +42,14 @@ private:
class Statistics
{
public:
- Statistics(const int totalObjectCount,
- const double totalDataAmount,
- const unsigned windowSizeRemainingTime, //time in ms
- const unsigned windowSizeBytesPerSecond); //time in ms
+ Statistics(int totalObjectCount,
+ double totalDataAmount,
+ unsigned windowSizeRemainingTime, //time in ms
+ unsigned windowSizeBytesPerSecond); //time in ms
~Statistics();
- void addMeasurement(const int objectsCurrent, const double dataCurrent);
+ void addMeasurement(int objectsCurrent, double dataCurrent);
wxString getRemainingTime() const; //returns the remaining time in milliseconds
wxString getBytesPerSecond() const;
@@ -57,7 +57,7 @@ public:
void resumeTimer();
private:
- wxString formatRemainingTime(const double timeInMs) const;
+ wxString formatRemainingTime(double timeInMs) const;
const int objectsTotal;
const double dataTotal;
@@ -68,14 +68,15 @@ private:
mutable int remainingTimeLast; //used for "smoothening" remaining time
- struct record
+ struct Record
{
- int objects;
+ int objects; //object count
double data; //unit: bytes
- long time; //unit: milliseconds
};
- std::list<record> measurements;
+ typedef std::multimap<long, Record> TimeRecordMap; //time, unit: milliseconds
+ TimeRecordMap measurements; //
+
wxStopWatch* timer;
};
diff --git a/library/status_handler.cpp b/library/status_handler.cpp
index 0f953a32..e81746a4 100644
--- a/library/status_handler.cpp
+++ b/library/status_handler.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "status_handler.h"
diff --git a/library/status_handler.h b/library/status_handler.h
index c15a80ba..d89c4f5b 100644
--- a/library/status_handler.h
+++ b/library/status_handler.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef STATUSHANDLER_H_INCLUDED
diff --git a/resource.rc b/resource.rc
index ef013684..54ba6078 100644
--- a/resource.rc
+++ b/resource.rc
@@ -23,7 +23,7 @@ BEGIN
VALUE "FileVersion", VER_FREEFILESYNC_STR
VALUE "ProductName", "FreeFileSync\0"
VALUE "ProductVersion", VER_FREEFILESYNC_STR
- VALUE "LegalCopyright", "(c) 2008 - 2010 ZenJu\0"
+ VALUE "LegalCopyright", "(c) 2008 - 2011 ZenJu\0"
END
END
BLOCK "VarFileInfo"
diff --git a/shared/IFileOperation/dll_main.cpp b/shared/IFileOperation/dll_main.cpp
index 142e26a2..d23e5c48 100644
--- a/shared/IFileOperation/dll_main.cpp
+++ b/shared/IFileOperation/dll_main.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
diff --git a/shared/IFileOperation/file_op.cpp b/shared/IFileOperation/file_op.cpp
index cc8c58bc..b1b7f4cd 100644
--- a/shared/IFileOperation/file_op.cpp
+++ b/shared/IFileOperation/file_op.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "file_op.h"
diff --git a/shared/IFileOperation/file_op.h b/shared/IFileOperation/file_op.h
index 97c75747..9842f0d6 100644
--- a/shared/IFileOperation/file_op.h
+++ b/shared/IFileOperation/file_op.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef RECYCLER_DLL_H
diff --git a/shared/ShadowCopy/dll_main.cpp b/shared/ShadowCopy/dll_main.cpp
index 142e26a2..d23e5c48 100644
--- a/shared/ShadowCopy/dll_main.cpp
+++ b/shared/ShadowCopy/dll_main.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
diff --git a/shared/ShadowCopy/shadow.cpp b/shared/ShadowCopy/shadow.cpp
index a5c280e8..d536470a 100644
--- a/shared/ShadowCopy/shadow.cpp
+++ b/shared/ShadowCopy/shadow.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "shadow.h"
diff --git a/shared/ShadowCopy/shadow.h b/shared/ShadowCopy/shadow.h
index f1100284..683a4e16 100644
--- a/shared/ShadowCopy/shadow.h
+++ b/shared/ShadowCopy/shadow.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SHADOWCOPY_H
diff --git a/shared/Taskbar_Seven/dll_main.cpp b/shared/Taskbar_Seven/dll_main.cpp
index 142e26a2..d23e5c48 100644
--- a/shared/Taskbar_Seven/dll_main.cpp
+++ b/shared/Taskbar_Seven/dll_main.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
diff --git a/shared/Taskbar_Seven/taskbar.cpp b/shared/Taskbar_Seven/taskbar.cpp
index d1b1638c..c853eb5d 100644
--- a/shared/Taskbar_Seven/taskbar.cpp
+++ b/shared/Taskbar_Seven/taskbar.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "taskbar.h"
diff --git a/shared/Taskbar_Seven/taskbar.h b/shared/Taskbar_Seven/taskbar.h
index 34e122c0..295cdbcd 100644
--- a/shared/Taskbar_Seven/taskbar.h
+++ b/shared/Taskbar_Seven/taskbar.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef TASKBAR_SEVEN_DLL_H
diff --git a/shared/app_main.cpp b/shared/app_main.cpp
index 3d42212a..6b87cf45 100644
--- a/shared/app_main.cpp
+++ b/shared/app_main.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "app_main.h"
diff --git a/shared/app_main.h b/shared/app_main.h
index 7e4fa7e7..bdfb9b08 100644
--- a/shared/app_main.h
+++ b/shared/app_main.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef APPMAIN_H_INCLUDED
diff --git a/shared/assert_static.h b/shared/assert_static.h
index 9eb94f3c..d2bd0a3a 100644
--- a/shared/assert_static.h
+++ b/shared/assert_static.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef ASSERTSTATIC_H_INCLUDED
diff --git a/shared/build_info.h b/shared/build_info.h
index 945284d2..e398a8a0 100644
--- a/shared/build_info.h
+++ b/shared/build_info.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef BUILDINFO_H_INCLUDED
diff --git a/shared/c_dll.h b/shared/c_dll.h
index 4d485893..3941cc0e 100644
--- a/shared/c_dll.h
+++ b/shared/c_dll.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef C_DLL_HEADER
diff --git a/shared/check_exist.cpp b/shared/check_exist.cpp
index 8bc629b5..97a25ec8 100644
--- a/shared/check_exist.cpp
+++ b/shared/check_exist.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "check_exist.h"
diff --git a/shared/check_exist.h b/shared/check_exist.h
index 7e9cecd8..6ec5534c 100644
--- a/shared/check_exist.h
+++ b/shared/check_exist.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef CHECKEXIST_H_INCLUDED
diff --git a/shared/com_error.h b/shared/com_error.h
index 73551f6e..30c7904f 100644
--- a/shared/com_error.h
+++ b/shared/com_error.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef COM_ERROR_HEADER
diff --git a/shared/com_ptr.h b/shared/com_ptr.h
index 52a072fa..f8331220 100644
--- a/shared/com_ptr.h
+++ b/shared/com_ptr.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SMART_COM_PTR_H
diff --git a/shared/com_util.h b/shared/com_util.h
index 22e2075f..a396fbee 100644
--- a/shared/com_util.h
+++ b/shared/com_util.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef COM_UTILITY_HEADER
diff --git a/shared/custom_button.cpp b/shared/custom_button.cpp
index 7154814b..ea473fc2 100644
--- a/shared/custom_button.cpp
+++ b/shared/custom_button.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "custom_button.h"
diff --git a/shared/custom_button.h b/shared/custom_button.h
index b50dd4da..63875e42 100644
--- a/shared/custom_button.h
+++ b/shared/custom_button.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef CUSTOMBUTTON_H_INCLUDED
diff --git a/shared/custom_combo_box.cpp b/shared/custom_combo_box.cpp
index 18adb38a..a1f28b5c 100644
--- a/shared/custom_combo_box.cpp
+++ b/shared/custom_combo_box.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "custom_combo_box.h"
@@ -57,15 +57,15 @@ void CustomComboBox::OnKeyEvent(wxKeyEvent& event)
const int selectedItem = this->GetCurrentSelection();
if (0 <= selectedItem && selectedItem < static_cast<int>(this->GetCount()) &&
#if wxCHECK_VERSION(2, 9, 1)
- dropDownShown)
+ dropDownShown)
#else
- //what a mess...:
- (GetValue() != GetString(selectedItem) || //avoid problems when a character shall be deleted instead of list item
- GetValue() == wxEmptyString)) //exception: always allow removing empty entry
+ //what a mess...:
+ (GetValue() != GetString(selectedItem) || //avoid problems when a character shall be deleted instead of list item
+ GetValue() == wxEmptyString)) //exception: always allow removing empty entry
#endif
- {
- //save old (selected) value: deletion seems to have influence on this
- const wxString currentVal = this->GetValue();
+ {
+ //save old (selected) value: deletion seems to have influence on this
+ const wxString currentVal = this->GetValue();
this->SetSelection(wxNOT_FOUND);
//delete selected row
diff --git a/shared/custom_combo_box.h b/shared/custom_combo_box.h
index 28361a30..070790a6 100644
--- a/shared/custom_combo_box.h
+++ b/shared/custom_combo_box.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef CUSTOMCOMBOBOX_H_INCLUDED
@@ -31,10 +31,10 @@ private:
void OnKeyEvent(wxKeyEvent& event);
#if wxCHECK_VERSION(2, 9, 1)
- void OnShowDropDown(wxCommandEvent& event);
- void OnHideDropDown(wxCommandEvent& event);
+ void OnShowDropDown(wxCommandEvent& event);
+ void OnHideDropDown(wxCommandEvent& event);
- bool dropDownShown;
+ bool dropDownShown;
#endif
};
diff --git a/shared/custom_tooltip.cpp b/shared/custom_tooltip.cpp
index 5b4e5e40..f19f3822 100644
--- a/shared/custom_tooltip.cpp
+++ b/shared/custom_tooltip.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "custom_tooltip.h"
diff --git a/shared/custom_tooltip.h b/shared/custom_tooltip.h
index c6bf6cd6..c5cb132b 100644
--- a/shared/custom_tooltip.h
+++ b/shared/custom_tooltip.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef CUSTOMTOOLTIP_H_INCLUDED
diff --git a/shared/debug_new.cpp b/shared/debug_new.cpp
index 0c0c8b52..bb02b112 100644
--- a/shared/debug_new.cpp
+++ b/shared/debug_new.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "debug_new.h"
diff --git a/shared/debug_new.h b/shared/debug_new.h
index e96b1e48..73591c45 100644
--- a/shared/debug_new.h
+++ b/shared/debug_new.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef DEBUGNEW_H_INCLUDED
diff --git a/shared/dir_name.cpp b/shared/dir_name.cpp
index 28c1c413..4ae3ef2f 100644
--- a/shared/dir_name.cpp
+++ b/shared/dir_name.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "dir_name.h"
diff --git a/shared/dir_name.h b/shared/dir_name.h
index 163caaad..ad0f2a52 100644
--- a/shared/dir_name.h
+++ b/shared/dir_name.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef DRAGANDDROP_H_INCLUDED
diff --git a/shared/disable_standby.h b/shared/disable_standby.h
new file mode 100644
index 00000000..399d0b9c
--- /dev/null
+++ b/shared/disable_standby.h
@@ -0,0 +1,30 @@
+#ifndef PREVENTSTANDBY_H_INCLUDED
+#define PREVENTSTANDBY_H_INCLUDED
+
+#ifdef FFS_WIN
+#include <wx/msw/wrapwin.h> //includes "windows.h"
+#endif
+
+namespace util
+{
+class DisableStandby
+{
+public:
+ DisableStandby()
+ {
+#ifdef FFS_WIN
+ ::SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED /* | ES_AWAYMODE_REQUIRED*/ );
+#endif
+ }
+
+ ~DisableStandby()
+ {
+#ifdef FFS_WIN
+ ::SetThreadExecutionState(ES_CONTINUOUS);
+#endif
+ }
+
+};
+}
+
+#endif // PREVENTSTANDBY_H_INCLUDED
diff --git a/shared/dll_loader.cpp b/shared/dll_loader.cpp
index 61a5a2fb..03b9bf6e 100644
--- a/shared/dll_loader.cpp
+++ b/shared/dll_loader.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "dll_loader.h"
diff --git a/shared/dll_loader.h b/shared/dll_loader.h
index b3fa5218..24dd4f14 100644
--- a/shared/dll_loader.h
+++ b/shared/dll_loader.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef DLLLOADER_H_INCLUDED
diff --git a/shared/file_error.h b/shared/file_error.h
index 2804e337..152062af 100644
--- a/shared/file_error.h
+++ b/shared/file_error.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FILEERROR_H_INCLUDED
diff --git a/shared/file_handling.cpp b/shared/file_handling.cpp
index b05b9cf8..10cab5ef 100644
--- a/shared/file_handling.cpp
+++ b/shared/file_handling.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "file_handling.h"
@@ -24,6 +24,7 @@
#include "symlink_target.h"
#ifdef FFS_WIN
+#include "privilege.h"
#include "dll_loader.h"
#include <wx/msw/wrapwin.h> //includes "windows.h"
#include "long_path_prefix.h"
@@ -209,16 +210,16 @@ bool ffs3::fileExists(const Zstring& filename)
// we must use GetFileAttributes() instead of the ANSI C functions because
// it can cope with network (UNC) paths unlike them
const DWORD ret = ::GetFileAttributes(applyLongPathPrefix(filename).c_str());
- return (ret != INVALID_FILE_ATTRIBUTES) && !(ret & FILE_ATTRIBUTE_DIRECTORY); //returns true for (file-)symlinks also
+ return ret != INVALID_FILE_ATTRIBUTES && !(ret & FILE_ATTRIBUTE_DIRECTORY); //returns true for (file-)symlinks also
#elif defined FFS_LINUX
struct stat fileInfo;
- return (::lstat(filename.c_str(), &fileInfo) == 0 &&
- (S_ISLNK(fileInfo.st_mode) || S_ISREG(fileInfo.st_mode))); //in Linux a symbolic link is neither file nor directory
+ return ::lstat(filename.c_str(), &fileInfo) == 0 &&
+ (S_ISLNK(fileInfo.st_mode) || S_ISREG(fileInfo.st_mode)); //in Linux a symbolic link is neither file nor directory
#endif
}
-
+#include <wx/msgdlg.h>
bool ffs3::dirExists(const Zstring& dirname)
{
//symbolic links (broken or not) are also treated as existing directories!
@@ -226,13 +227,12 @@ bool ffs3::dirExists(const Zstring& dirname)
// we must use GetFileAttributes() instead of the ANSI C functions because
// it can cope with network (UNC) paths unlike them
const DWORD ret = ::GetFileAttributes(applyLongPathPrefix(dirname).c_str());
-
return (ret != INVALID_FILE_ATTRIBUTES) && (ret & FILE_ATTRIBUTE_DIRECTORY); //returns true for (dir-)symlinks also
#elif defined FFS_LINUX
struct stat dirInfo;
- return (::lstat(dirname.c_str(), &dirInfo) == 0 &&
- (S_ISLNK(dirInfo.st_mode) || S_ISDIR(dirInfo.st_mode))); //in Linux a symbolic link is neither file nor directory
+ return ::lstat(dirname.c_str(), &dirInfo) == 0 &&
+ (S_ISLNK(dirInfo.st_mode) || S_ISDIR(dirInfo.st_mode)); //in Linux a symbolic link is neither file nor directory
#endif
}
@@ -241,12 +241,12 @@ bool ffs3::symlinkExists(const Zstring& objname)
{
#ifdef FFS_WIN
const DWORD ret = ::GetFileAttributes(applyLongPathPrefix(objname).c_str());
- return (ret != INVALID_FILE_ATTRIBUTES) && (ret & FILE_ATTRIBUTE_REPARSE_POINT);
+ return ret != INVALID_FILE_ATTRIBUTES && (ret & FILE_ATTRIBUTE_REPARSE_POINT);
#elif defined FFS_LINUX
struct stat fileInfo;
- return (::lstat(objname.c_str(), &fileInfo) == 0 &&
- S_ISLNK(fileInfo.st_mode)); //symbolic link
+ return ::lstat(objname.c_str(), &fileInfo) == 0 &&
+ S_ISLNK(fileInfo.st_mode); //symbolic link
#endif
}
@@ -592,18 +592,18 @@ bool fix8Dot3NameClash(const Zstring& oldName, const Zstring& newName) //throw
//we detected an event where newName is in shortname format (although it is intended to be a long name) and
//writing target file failed because another unrelated file happens to have the same short name
- const Zstring newNameFullPathLong = newName.BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR +
- fileNameLong;
+ const Zstring unrelatedPathLong = newName.BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR +
+ fileNameLong;
//find another name in short format: this ensures the actual short name WILL be renamed as well!
const Zstring parkedTarget = createTemp8Dot3Name(newName);
//move already existing short name out of the way for now
- renameFileInternal(newNameFullPathLong, parkedTarget); //throw (FileError, ErrorDifferentVolume);
+ renameFileInternal(unrelatedPathLong, parkedTarget); //throw (FileError, ErrorDifferentVolume);
//DON'T call ffs3::renameFile() to avoid reentrance!
//schedule cleanup; the file system should assign this unrelated file a new (unique) short name
- Loki::ScopeGuard guard = Loki::MakeGuard(renameFileInternalNoThrow, parkedTarget, newNameFullPathLong);//equivalent to Boost.ScopeExit in this case
+ Loki::ScopeGuard guard = Loki::MakeGuard(renameFileInternalNoThrow, parkedTarget, unrelatedPathLong);//equivalent to Boost.ScopeExit in this case
(void)guard; //silence warning "unused variable"
renameFileInternal(oldName, newName); //the short filename name clash is solved, this should work now
@@ -673,6 +673,10 @@ void ffs3::moveFile(const Zstring& sourceFile, const Zstring& targetFile, MoveFi
wxT("\n\n") + _("Operation aborted!"));
}
+ //support case-sensitive renaming
+ if (EqualFilename()(sourceFile, targetFile)) //difference in case only
+ return renameFile(sourceFile, targetFile); //throw (FileError, ErrorDifferentVolume);
+
if (somethingExists(targetFile)) //test file existence: e.g. Linux might silently overwrite existing symlinks
throw FileError(wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") + zToWx(targetFile) + wxT("\"") +
wxT("\n\n") + _("Target file already existing!"));
@@ -989,7 +993,10 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo
throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted());
}
- if ((sourceAttr.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && deRefSymlinks) //we have a symlink AND need to dereference...
+ const bool isReparsePoint = (sourceAttr.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
+ const bool isDirectory = (sourceAttr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
+
+ if (isReparsePoint && deRefSymlinks) //we have a symlink AND need to dereference...
{
HANDLE hSource = ::CreateFile(applyLongPathPrefix(sourceObj).c_str(),
FILE_READ_ATTRIBUTES,
@@ -1003,7 +1010,6 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo
const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceObj) + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted());
}
-
boost::shared_ptr<void> dummy(hSource, ::CloseHandle);
if (!::GetFileTime(hSource, //__in HANDLE hFile,
@@ -1023,7 +1029,7 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo
}
//####################################### DST hack ###########################################
- if ((sourceAttr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) //dst hack not (yet) required for directories (symlinks implicitly checked by isFatDrive())
+ if (!isDirectory) //dst hack not (yet) required for directories (symlinks implicitly checked by isFatDrive())
{
if (dst::isFatDrive(sourceObj)) //throw()
{
@@ -1046,6 +1052,9 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo
}
+ //privilege SE_BACKUP_NAME doesn't seem to be required here for symbolic links
+ //note: setting privileges requires admin rights!
+
HANDLE hTarget = ::CreateFile(applyLongPathPrefix(targetObj).c_str(),
FILE_WRITE_ATTRIBUTES,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
@@ -1071,7 +1080,7 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo
}
#ifndef NDEBUG //dst hack: verify data written
- if (dst::isFatDrive(targetObj)) //throw()
+ if (dst::isFatDrive(targetObj) && !ffs3::dirExists(targetObj)) //throw()
{
WIN32_FILE_ATTRIBUTE_DATA debugeAttr = {};
assert(::GetFileAttributesEx(applyLongPathPrefix(targetObj).c_str(), //__in LPCTSTR lpFileName,
@@ -1083,7 +1092,6 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo
}
#endif
-
#elif defined FFS_LINUX
if (deRefSymlinks)
{
@@ -1099,7 +1107,7 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo
newTimes.modtime = objInfo.st_mtime;
//(try to) set new "last write time"
- if (::utime(targetObj.c_str(), &newTimes) != 0) //return value not evalutated!
+ if (::utime(targetObj.c_str(), &newTimes) != 0) //return value not evaluated!
{
wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetObj) + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted());
@@ -1121,7 +1129,7 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo
newTimes[1].tv_sec = objInfo.st_mtime; /* seconds */
newTimes[1].tv_usec = 0; /* microseconds */
- if (::lutimes(targetObj.c_str(), newTimes) != 0) //return value not evalutated!
+ if (::lutimes(targetObj.c_str(), newTimes) != 0) //return value not evaluated!
{
wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetObj) + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted());
@@ -1221,148 +1229,6 @@ void copySymlinkInternal(const Zstring& sourceLink, const Zstring& targetLink, b
}
-namespace ffs3
-{
-#ifdef FFS_WIN
-class Privileges
-{
-public:
- static Privileges& getInstance()
- {
- static Privileges instance;
- return instance;
- }
-
- void ensureActive(LPCTSTR privilege) //throw FileError()
- {
- if (activePrivileges.find(privilege) != activePrivileges.end())
- return; //privilege already active
-
- if (privilegeIsActive(privilege)) //privilege was already active before starting this tool
- activePrivileges.insert(std::make_pair(privilege, false));
- else
- {
- setPrivilege(privilege, true);
- activePrivileges.insert(std::make_pair(privilege, true));
- }
- }
-
-private:
- Privileges() {}
- Privileges(Privileges&);
- void operator=(Privileges&);
-
- ~Privileges() //clean up: deactivate all privileges that have been activated by this application
- {
- for (PrivBuffType::const_iterator i = activePrivileges.begin(); i != activePrivileges.end(); ++i)
- try
- {
- if (i->second)
- Privileges::setPrivilege(i->first, false);
- }
- catch(...) {}
- }
-
- static bool privilegeIsActive(LPCTSTR privilege); //throw FileError()
- static void setPrivilege(LPCTSTR privilege, bool enable); //throw FileError()
-
- typedef std::map<Zstring, bool> PrivBuffType; //bool: enabled by this application
-
- PrivBuffType activePrivileges;
-};
-
-
-bool Privileges::privilegeIsActive(LPCTSTR privilege) //throw FileError()
-{
- HANDLE hToken = NULL;
- if (!::OpenProcessToken(::GetCurrentProcess(), //__in HANDLE ProcessHandle,
- TOKEN_QUERY, //__in DWORD DesiredAccess,
- &hToken)) //__out PHANDLE TokenHandle
- {
- const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
- throw FileError(errorMessage + ffs3::getLastErrorFormatted());
- }
- boost::shared_ptr<void> dummy(hToken, ::CloseHandle);
-
- LUID luid = {0};
- if (!::LookupPrivilegeValue(
- NULL, //__in_opt LPCTSTR lpSystemName,
- privilege, //__in LPCTSTR lpName,
- &luid )) //__out PLUID lpLuid
- {
- const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
- throw FileError(errorMessage + ffs3::getLastErrorFormatted());
- }
-
- PRIVILEGE_SET priv = {0};
- priv.PrivilegeCount = 1;
- priv.Control = PRIVILEGE_SET_ALL_NECESSARY;
- priv.Privilege[0].Luid = luid;
- priv.Privilege[0].Attributes = SE_PRIVILEGE_ENABLED;
-
- BOOL alreadyGranted = FALSE;
- if (!::PrivilegeCheck(
- hToken, //__in HANDLE ClientToken,
- &priv, //__inout PPRIVILEGE_SET RequiredPrivileges,
- &alreadyGranted)) //__out LPBOOL pfResult
- {
- const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
- throw FileError(errorMessage + ffs3::getLastErrorFormatted());
- }
-
- return alreadyGranted == TRUE;
-}
-
-
-void Privileges::setPrivilege(LPCTSTR privilege, bool enable) //throw FileError()
-{
- HANDLE hToken = NULL;
- if (!::OpenProcessToken(::GetCurrentProcess(), //__in HANDLE ProcessHandle,
- TOKEN_ADJUST_PRIVILEGES, //__in DWORD DesiredAccess,
- &hToken)) //__out PHANDLE TokenHandle
- {
- const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
- throw FileError(errorMessage + ffs3::getLastErrorFormatted());
- }
- boost::shared_ptr<void> dummy(hToken, ::CloseHandle);
-
- LUID luid = {0};
- if (!::LookupPrivilegeValue(
- NULL, //__in_opt LPCTSTR lpSystemName,
- privilege, //__in LPCTSTR lpName,
- &luid )) //__out PLUID lpLuid
- {
- const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
- throw FileError(errorMessage + ffs3::getLastErrorFormatted());
- }
-
- TOKEN_PRIVILEGES tp = {0};
- tp.PrivilegeCount = 1;
- tp.Privileges[0].Luid = luid;
- tp.Privileges[0].Attributes = enable ? SE_PRIVILEGE_ENABLED : 0;
-
- if (!::AdjustTokenPrivileges(
- hToken, //__in HANDLE TokenHandle,
- false, //__in BOOL DisableAllPrivileges,
- &tp, //__in_opt PTOKEN_PRIVILEGES NewState,
- 0, //__in DWORD BufferLength,
- NULL, //__out_opt PTOKEN_PRIVILEGES PreviousState,
- NULL)) //__out_opt PDWORD ReturnLength
- {
- const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
- throw FileError(errorMessage + ffs3::getLastErrorFormatted());
- }
-
- if (::GetLastError() == ERROR_NOT_ALL_ASSIGNED) //check although previous function returned with success!
- {
- const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
- throw FileError(errorMessage + ffs3::getLastErrorFormatted());
- }
-}
-#endif
-}
-
-
#ifdef HAVE_SELINUX
//copy SELinux security context
void copySecurityContext(const Zstring& source, const Zstring& target, bool derefSymlinks) //throw FileError()
@@ -1415,10 +1281,12 @@ void copySecurityContext(const Zstring& source, const Zstring& target, bool dere
#endif //HAVE_SELINUX
-//copy permissions for files, directories or symbolic links
+//copy permissions for files, directories or symbolic links:
void ffs3::copyObjectPermissions(const Zstring& source, const Zstring& target, bool derefSymlinks) //throw FileError(); probably requires admin rights
{
#ifdef FFS_WIN
+ //setting privileges requires admin rights!
+
//enable privilege: required to read/write SACL information
Privileges::getInstance().ensureActive(SE_SECURITY_NAME); //polling allowed...
@@ -1480,12 +1348,12 @@ void ffs3::copyObjectPermissions(const Zstring& source, const Zstring& target, b
const HANDLE hTarget = ::CreateFile( targetFmt.c_str(), // lpFileName
- FILE_GENERIC_WRITE | WRITE_OWNER | WRITE_DAC | ACCESS_SYSTEM_SECURITY, // dwDesiredAccess: all four seem to be required!!!
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, // dwShareMode
- NULL, // lpSecurityAttributes
- OPEN_EXISTING, // dwCreationDisposition
- FILE_FLAG_BACKUP_SEMANTICS | (derefSymlinks ? 0 : FILE_FLAG_OPEN_REPARSE_POINT), // dwFlagsAndAttributes
- NULL); // hTemplateFile
+ FILE_GENERIC_WRITE | WRITE_OWNER | WRITE_DAC | ACCESS_SYSTEM_SECURITY, // dwDesiredAccess: all four seem to be required!!!
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, // dwShareMode
+ NULL, // lpSecurityAttributes
+ OPEN_EXISTING, // dwCreationDisposition
+ FILE_FLAG_BACKUP_SEMANTICS | (derefSymlinks ? 0 : FILE_FLAG_OPEN_REPARSE_POINT), // dwFlagsAndAttributes
+ NULL); // hTemplateFile
if (hTarget == INVALID_HANDLE_VALUE)
{
const wxString errorMessage = wxString(_("Error copying file permissions:")) + wxT("\n\"") + zToWx(source) + wxT("\" ->\n\"") + zToWx(target) + wxT("\"") + wxT("\n\n");
@@ -2008,33 +1876,3 @@ void ffs3::copyFile(const Zstring& sourceFile,
guardTargetFile.Dismiss(); //target has been created successfully!
}
#endif
-
-
-
-/*
-#ifdef FFS_WIN
-inline
-Zstring getDriveName(const Zstring& directoryName) //GetVolume() doesn't work under Linux!
-{
- const Zstring volumeName = wxFileName(directoryName.c_str()).GetVolume().c_str();
- if (volumeName.empty())
- return Zstring();
-
- return volumeName + wxFileName::GetVolumeSeparator().c_str() + common::FILE_NAME_SEPARATOR;
-}
-
-
-bool ffs3::isFatDrive(const Zstring& directoryName)
-{
- const Zstring driveName = getDriveName(directoryName);
- if (driveName.empty())
- return false;
-
- wxChar fileSystem[32];
- if (!GetVolumeInformation(driveName.c_str(), NULL, 0, NULL, NULL, NULL, fileSystem, 32))
- return false;
-
- return Zstring(fileSystem).StartsWith(wxT("FAT"));
-}
-#endif //FFS_WIN
-*/
diff --git a/shared/file_handling.h b/shared/file_handling.h
index af20ccf8..4ec9c6d2 100644
--- a/shared/file_handling.h
+++ b/shared/file_handling.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FILE_HANDLING_H_INCLUDED
diff --git a/shared/file_id.cpp b/shared/file_id.cpp
index 0c8afa3d..7b091201 100644
--- a/shared/file_id.cpp
+++ b/shared/file_id.cpp
@@ -1,31 +1,45 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "file_id.h"
#ifdef FFS_WIN
-#include "assert_static.h"
#include <wx/msw/wrapwin.h> //includes "windows.h"
#include "long_path_prefix.h"
#include <boost/shared_ptr.hpp>
#elif defined FFS_LINUX
+#include <sys/stat.h>
#endif
+namespace
+{
+template <class T>
+inline
+std::string numberToString(T number)
+{
+ const char* rawBegin = reinterpret_cast<const char*>(&number);
+ return std::string(rawBegin, rawBegin + sizeof(number));
+}
+}
-#ifdef FFS_WIN
-util::FileID util::retrieveFileID(const Zstring& filename)
+
+std::string util::retrieveFileID(const Zstring& filename)
{
- //ensure our DWORD_FFS really is the same as DWORD
- assert_static(sizeof(util::FileID::DWORD_FFS) == sizeof(DWORD));
+ std::string fileID;
-//WARNING: CreateFile() is SLOW, while GetFileInformationByHandle() is quite cheap!
+#ifdef FFS_WIN
+//WARNING: CreateFile() is SLOW, while GetFileInformationByHandle() is cheap!
//http://msdn.microsoft.com/en-us/library/aa363788(VS.85).aspx
+
+ //privilege SE_BACKUP_NAME doesn't seem to be required here at all
+ //note: setting privileges requires admin rights!
+
const HANDLE hFile = ::CreateFile(ffs3::applyLongPathPrefix(filename).c_str(),
0,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
@@ -37,37 +51,35 @@ util::FileID util::retrieveFileID(const Zstring& filename)
{
boost::shared_ptr<void> dummy(hFile, ::CloseHandle);
- BY_HANDLE_FILE_INFORMATION info;
- if (::GetFileInformationByHandle(hFile, &info))
+ BY_HANDLE_FILE_INFORMATION fileInfo = {};
+ if (::GetFileInformationByHandle(hFile, &fileInfo))
{
- return util::FileID(info.dwVolumeSerialNumber,
- info.nFileIndexHigh,
- info.nFileIndexLow);
+ fileID += numberToString(fileInfo.dwVolumeSerialNumber);
+ fileID += numberToString(fileInfo.nFileIndexHigh);
+ fileID += numberToString(fileInfo.nFileIndexLow);
}
}
- return util::FileID(); //empty ID
-}
-
#elif defined FFS_LINUX
-util::FileID util::retrieveFileID(const Zstring& filename)
-{
- struct stat fileInfo;
- if (::lstat(filename.c_str(), &fileInfo) == 0) //lstat() does not resolve symlinks
- return util::FileID(fileInfo.st_dev, fileInfo.st_ino);
+ struct stat fileInfo = {};
+ if (::lstat(filename.c_str(), &fileInfo) == 0) //lstat() does not follow symlinks
+ {
+ fileID += numberToString(fileInfo.st_dev);
+ fileID += numberToString(fileInfo.st_ino);
+ }
+#endif
- return util::FileID(); //empty ID
+ return fileID;
}
-#endif
bool util::sameFileSpecified(const Zstring& file1, const Zstring& file2)
{
- const util::FileID id1 = retrieveFileID(file1);
- const util::FileID id2 = retrieveFileID(file2);
+ const std::string id1 = retrieveFileID(file1);
+ const std::string id2 = retrieveFileID(file2);
- if (id1 != FileID() && id2 != FileID())
- return id1 == id2;
+ if (id1.empty() || id2.empty())
+ return false;
- return false;
+ return id1 == id2;
}
diff --git a/shared/file_id.h b/shared/file_id.h
index d00ca20a..2e94bf5a 100644
--- a/shared/file_id.h
+++ b/shared/file_id.h
@@ -1,62 +1,23 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FILEID_H_INCLUDED
#define FILEID_H_INCLUDED
-#include <wx/stream.h>
#include "zstring.h"
+#include <string>
-#ifdef FFS_WIN
-#elif defined FFS_LINUX
-#include <sys/stat.h>
-#endif
//unique file identifier
namespace util
{
-class FileID
-{
-public:
- //standard copy constructor and assignment operator are okay!
-
- FileID(wxInputStream& stream); //read
- void toStream(wxOutputStream& stream) const; //write
-
- bool isNull() const;
- bool operator==(const FileID& rhs) const;
- bool operator!=(const FileID& rhs) const;
- bool operator<(const FileID& rhs) const;
-
- FileID();
-#ifdef FFS_WIN
- typedef unsigned long DWORD_FFS; //we don't want do include "windows.h" or "<wx/msw/wrapwin.h>" here, do we?
-
- FileID(DWORD_FFS dwVolumeSN,
- DWORD_FFS fileIndexHi,
- DWORD_FFS fileIndexLo);
-#elif defined FFS_LINUX
- FileID(dev_t devId,
- ino_t inId);
-#endif
-private:
-#ifdef FFS_WIN
- DWORD_FFS dwVolumeSerialNumber;
- DWORD_FFS nFileIndexHigh;
- DWORD_FFS nFileIndexLow;
-#elif defined FFS_LINUX
- dev_t deviceId;
- ino_t inodeId;
-#endif
-};
-
//get unique file id (symbolic link handling: opens the link!!!)
-//error condition: returns FileID ()
-FileID retrieveFileID(const Zstring& filename);
+//returns empty string on error!
+std::string retrieveFileID(const Zstring& filename);
//test whether two distinct paths point to the same file or directory:
// true: paths point to same files/dirs
@@ -64,137 +25,4 @@ FileID retrieveFileID(const Zstring& filename);
bool sameFileSpecified(const Zstring& file1, const Zstring& file2);
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//---------------Inline Implementation---------------------------------------------------
-#ifdef FFS_WIN
-inline
-util::FileID::FileID() :
- dwVolumeSerialNumber(0),
- nFileIndexHigh(0),
- nFileIndexLow(0) {}
-
-inline
-util::FileID::FileID(DWORD_FFS dwVolumeSN,
- DWORD_FFS fileIndexHi,
- DWORD_FFS fileIndexLo) :
- dwVolumeSerialNumber(dwVolumeSN),
- nFileIndexHigh(fileIndexHi),
- nFileIndexLow(fileIndexLo) {}
-
-inline
-bool util::FileID::isNull() const
-{
- return dwVolumeSerialNumber == 0 &&
- nFileIndexHigh == 0 &&
- nFileIndexLow == 0;
-}
-
-inline
-bool util::FileID::operator==(const FileID& rhs) const
-{
- return dwVolumeSerialNumber == rhs.dwVolumeSerialNumber &&
- nFileIndexHigh == rhs.nFileIndexHigh &&
- nFileIndexLow == rhs.nFileIndexLow;
-}
-
-inline
-bool util::FileID::operator<(const FileID& rhs) const
-{
- if (dwVolumeSerialNumber != rhs.dwVolumeSerialNumber)
- return dwVolumeSerialNumber < rhs.dwVolumeSerialNumber;
-
- if (nFileIndexHigh != rhs.nFileIndexHigh)
- return nFileIndexHigh < rhs.nFileIndexHigh;
-
- return nFileIndexLow < rhs.nFileIndexLow;
-}
-
-inline
-util::FileID::FileID(wxInputStream& stream) //read
-{
- stream.Read(&dwVolumeSerialNumber, sizeof(dwVolumeSerialNumber));
- stream.Read(&nFileIndexHigh, sizeof(nFileIndexHigh));
- stream.Read(&nFileIndexLow, sizeof(nFileIndexLow));
-}
-
-inline
-void util::FileID::toStream(wxOutputStream& stream) const //write
-{
- stream.Write(&dwVolumeSerialNumber, sizeof(dwVolumeSerialNumber));
- stream.Write(&nFileIndexHigh, sizeof(nFileIndexHigh));
- stream.Write(&nFileIndexLow, sizeof(nFileIndexLow));
-}
-
-#elif defined FFS_LINUX
-inline
-util::FileID::FileID() :
- deviceId(0),
- inodeId(0) {}
-
-inline
-util::FileID::FileID(dev_t devId,
- ino_t inId) :
- deviceId(devId),
- inodeId(inId) {}
-
-inline
-bool util::FileID::isNull() const
-{
- return deviceId == 0 &&
- inodeId == 0;
-}
-
-inline
-bool util::FileID::operator==(const FileID& rhs) const
-{
- return deviceId == rhs.deviceId &&
- inodeId == rhs.inodeId;
-}
-
-inline
-bool util::FileID::operator<(const FileID& rhs) const
-{
- if (deviceId != rhs.deviceId)
- return deviceId < rhs.deviceId;
-
- return inodeId < rhs.inodeId;
-}
-
-inline
-util::FileID::FileID(wxInputStream& stream) //read
-{
- stream.Read(&deviceId, sizeof(deviceId));
- stream.Read(&inodeId, sizeof(inodeId));
-}
-
-inline
-void util::FileID::toStream(wxOutputStream& stream) const //write
-{
- stream.Write(&deviceId, sizeof(deviceId));
- stream.Write(&inodeId, sizeof(inodeId));
-}
-#endif
-inline
-bool util::FileID::operator!=(const FileID& rhs) const
-{
- return !(*this == rhs);
-}
-
#endif // FILEID_H_INCLUDED
diff --git a/shared/file_io.cpp b/shared/file_io.cpp
index 78796bbe..b75b8a13 100644
--- a/shared/file_io.cpp
+++ b/shared/file_io.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "file_io.h"
@@ -61,7 +61,7 @@ FileInput::FileInput(const Zstring& filename) : //throw FileError()
const DWORD lastError = ::GetLastError();
const wxString& errorMessage = wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError);
if (lastError == ERROR_FILE_NOT_FOUND ||
- lastError == ERROR_PATH_NOT_FOUND)
+ lastError == ERROR_PATH_NOT_FOUND)
throw ErrorNotExisting(errorMessage);
else
throw FileError(errorMessage);
diff --git a/shared/file_io.h b/shared/file_io.h
index c3fb3f65..0781595b 100644
--- a/shared/file_io.h
+++ b/shared/file_io.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FILEIO_H_INCLUDED
diff --git a/shared/file_traverser.cpp b/shared/file_traverser.cpp
index f2b531e9..66242fa2 100644
--- a/shared/file_traverser.cpp
+++ b/shared/file_traverser.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "file_traverser.h"
@@ -170,7 +170,13 @@ private:
{
details.targetPath = getSymlinkRawTargetString(fullName); //throw (FileError)
}
- catch (FileError&) {}
+ catch (FileError& e)
+ {
+ (void)e;
+#ifndef NDEBUG //show broken symlink / access errors in debug build!
+ sink.onError(e.msg());
+#endif
+ }
details.lastWriteTimeRaw = getWin32TimeInformation(fileMetaData.ftLastWriteTime);
details.dirLink = (fileMetaData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; //directory symlinks have this flag on Windows
@@ -225,13 +231,12 @@ private:
&fileMetaData)); // pointer to structure for data on found file
const DWORD lastError = ::GetLastError();
- if (lastError == ERROR_NO_MORE_FILES)
- return; //everything okay
-
- //else: we have a problem... report it:
- const wxString errorMessage = wxString(_("Error traversing directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\"") ;
- sink.onError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError));
- return;
+ if (lastError != ERROR_NO_MORE_FILES) //this is fine
+ {
+ //else we have a problem... report it:
+ const wxString errorMessage = wxString(_("Error traversing directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\"") ;
+ sink.onError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError));
+ }
#elif defined FFS_LINUX
DIR* dirObj = ::opendir(directory.c_str()); //directory must NOT end with path separator, except "/"
@@ -301,7 +306,12 @@ private:
{
details.targetPath = getSymlinkRawTargetString(fullName); //throw (FileError)
}
- catch (FileError&) {}
+ catch (FileError& e)
+ {
+#ifndef NDEBUG //show broken symlink / access errors in debug build!
+ sink.onError(e.msg());
+#endif
+ }
details.lastWriteTimeRaw = fileInfo.st_mtime; //UTC time(ANSI C format); unit: 1 second
details.dirLink = ::stat(fullName.c_str(), &fileInfo) == 0 && S_ISDIR(fileInfo.st_mode); //S_ISDIR and S_ISLNK are mutually exclusive on Linux => need to follow link
diff --git a/shared/file_traverser.h b/shared/file_traverser.h
index 61237834..0e25886b 100644
--- a/shared/file_traverser.h
+++ b/shared/file_traverser.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FILETRAVERSER_H_INCLUDED
diff --git a/shared/global_func.cpp b/shared/global_func.cpp
index c3d76c57..fe741b22 100644
--- a/shared/global_func.cpp
+++ b/shared/global_func.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "global_func.h"
diff --git a/shared/global_func.h b/shared/global_func.h
index 20221f63..169ad611 100644
--- a/shared/global_func.h
+++ b/shared/global_func.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef GLOBALFUNCTIONS_H_INCLUDED
diff --git a/shared/guid.cpp b/shared/guid.cpp
index b20a1143..dcf63e60 100644
--- a/shared/guid.cpp
+++ b/shared/guid.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "guid.h"
@@ -12,59 +12,17 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
+
#include <boost/uuid/uuid_generators.hpp>
+
#ifdef __MINGW32__
#pragma GCC diagnostic pop
#endif
-#include <cassert>
-#include <algorithm>
-#include <vector>
-
-using namespace util;
-
-
-struct UniqueId::IntData
-{
- boost::uuids::uuid nativeRep;
-};
-
-
-UniqueId::UniqueId() : pData(new IntData)
-{
- pData->nativeRep = boost::uuids::random_generator()();
-}
-
-
-bool UniqueId::operator==(const UniqueId rhs) const
-{
- return pData->nativeRep == rhs.pData->nativeRep;
-}
-
-bool UniqueId::operator<(const UniqueId rhs) const
+std::string util::generateGUID() //creates a 16 byte GUID
{
- return pData->nativeRep < rhs.pData->nativeRep;
-}
-
-
-UniqueId::UniqueId(wxInputStream& stream) : //read
- pData(new IntData)
-{
- std::vector<char> rawData(boost::uuids::uuid::static_size());
- stream.Read(&rawData[0], rawData.size());
-
- std::copy(rawData.begin(), rawData.end(), pData->nativeRep.begin());
-}
-
-
-void UniqueId::toStream(wxOutputStream& stream) const //write
-{
- std::vector<char> rawData;
- std::copy(pData->nativeRep.begin(), pData->nativeRep.end(), std::back_inserter(rawData));
-
- assert(boost::uuids::uuid::static_size() == rawData.size());
-
- stream.Write(&rawData[0], rawData.size());
+ boost::uuids::uuid nativeRep = boost::uuids::random_generator()();
+ return std::string(nativeRep.begin(), nativeRep.end());
}
diff --git a/shared/guid.h b/shared/guid.h
index 49d2f008..166e9eb1 100644
--- a/shared/guid.h
+++ b/shared/guid.h
@@ -1,32 +1,18 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef GUID_H_INCLUDED
#define GUID_H_INCLUDED
-#include <wx/stream.h>
-#include <boost/shared_ptr.hpp>
+#include <string>
+
namespace util
{
-class UniqueId
-{
-public:
- UniqueId(); //create UUID
-
- UniqueId(wxInputStream& stream); //read
- void toStream(wxOutputStream& stream) const; //write
-
- bool operator==(const UniqueId rhs) const;
- bool operator<(const UniqueId rhs) const;
-
-private:
- struct IntData;
- boost::shared_ptr<IntData> pData;
-};
+std::string generateGUID(); //creates a 16 byte GUID
}
diff --git a/shared/help_provider.cpp b/shared/help_provider.cpp
index 0110934c..9b9e1bc6 100644
--- a/shared/help_provider.cpp
+++ b/shared/help_provider.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "help_provider.h"
@@ -21,8 +21,6 @@ public:
wxT("FreeFileSync.chm"));
#elif defined FFS_LINUX
wxT("Help/FreeFileSync.hhp"));
-
- wxImage::AddHandler(new wxJPEGHandler); //ownership passed; display .jpg files correctly in Linux
#endif
}
diff --git a/shared/help_provider.h b/shared/help_provider.h
index b59f47a8..0fd9ab2f 100644
--- a/shared/help_provider.h
+++ b/shared/help_provider.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef HELPPROVIDER_H_INCLUDED
diff --git a/shared/localization.cpp b/shared/localization.cpp
index ae9b5143..678767b9 100644
--- a/shared/localization.cpp
+++ b/shared/localization.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "localization.h"
@@ -48,7 +48,7 @@ const std::vector<ffs3::LocInfoLine>& LocalizationInfo::getMapping()
namespace
{
- struct CompareByName : public std::binary_function<ffs3::LocInfoLine, ffs3::LocInfoLine, bool>
+struct CompareByName : public std::binary_function<ffs3::LocInfoLine, ffs3::LocInfoLine, bool>
{
bool operator()(const ffs3::LocInfoLine& lhs, const ffs3::LocInfoLine& rhs) const
{
@@ -97,6 +97,13 @@ LocalizationInfo::LocalizationInfo()
newEntry.languageFlag = wxT("spain.png");
locMapping.push_back(newEntry);
+ newEntry.languageID = wxLANGUAGE_GREEK;
+ newEntry.languageName = wxT("Ελληνικά");
+ newEntry.languageFile = wxT("greek.lng");
+ newEntry.translatorName = wxT("Γιώργος Γιαγλής");
+ newEntry.languageFlag = wxT("greece.png");
+ locMapping.push_back(newEntry);
+
newEntry.languageID = wxLANGUAGE_FRENCH;
newEntry.languageName = wxT("Français");
newEntry.languageFile = wxT("french.lng");
@@ -299,6 +306,7 @@ int mapLanguageDialect(const int language)
//case wxLANGUAGE_CZECH:
//case wxLANGUAGE_FINNISH:
+ //case wxLANGUAGE_GREEK:
//case wxLANGUAGE_JAPANESE:
//case wxLANGUAGE_POLISH:
//case wxLANGUAGE_SLOVENIAN:
diff --git a/shared/localization.h b/shared/localization.h
index 9435030d..40d71423 100644
--- a/shared/localization.h
+++ b/shared/localization.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef MISC_H_INCLUDED
diff --git a/shared/long_path_prefix.cpp b/shared/long_path_prefix.cpp
index 1c17065c..3fb0703d 100644
--- a/shared/long_path_prefix.cpp
+++ b/shared/long_path_prefix.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "long_path_prefix.h"
diff --git a/shared/long_path_prefix.h b/shared/long_path_prefix.h
index b14a17dc..df4c31ab 100644
--- a/shared/long_path_prefix.h
+++ b/shared/long_path_prefix.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef LONGPATHPREFIX_H_INCLUDED
diff --git a/shared/perf.h b/shared/perf.h
index e4e279bb..4f955748 100644
--- a/shared/perf.h
+++ b/shared/perf.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef DEBUG_PERF_HEADER
diff --git a/shared/privilege.cpp b/shared/privilege.cpp
new file mode 100644
index 00000000..16f9d385
--- /dev/null
+++ b/shared/privilege.cpp
@@ -0,0 +1,102 @@
+#include "privilege.h"
+#include <wx/intl.h>
+#include "system_func.h"
+#include <boost/shared_ptr.hpp>
+
+using namespace ffs3;
+
+
+Privileges& Privileges::getInstance()
+{
+ static Privileges instance;
+ return instance;
+}
+
+
+bool Privileges::privilegeIsActive(LPCTSTR privilege) //throw FileError()
+{
+ HANDLE hToken = NULL;
+ if (!::OpenProcessToken(::GetCurrentProcess(), //__in HANDLE ProcessHandle,
+ TOKEN_QUERY, //__in DWORD DesiredAccess,
+ &hToken)) //__out PHANDLE TokenHandle
+ {
+ const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
+ throw FileError(errorMessage + ffs3::getLastErrorFormatted());
+ }
+ boost::shared_ptr<void> dummy(hToken, ::CloseHandle);
+
+ LUID luid = {0};
+ if (!::LookupPrivilegeValue(
+ NULL, //__in_opt LPCTSTR lpSystemName,
+ privilege, //__in LPCTSTR lpName,
+ &luid )) //__out PLUID lpLuid
+ {
+ const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
+ throw FileError(errorMessage + ffs3::getLastErrorFormatted());
+ }
+
+ PRIVILEGE_SET priv = {0};
+ priv.PrivilegeCount = 1;
+ priv.Control = PRIVILEGE_SET_ALL_NECESSARY;
+ priv.Privilege[0].Luid = luid;
+ priv.Privilege[0].Attributes = SE_PRIVILEGE_ENABLED;
+
+ BOOL alreadyGranted = FALSE;
+ if (!::PrivilegeCheck(
+ hToken, //__in HANDLE ClientToken,
+ &priv, //__inout PPRIVILEGE_SET RequiredPrivileges,
+ &alreadyGranted)) //__out LPBOOL pfResult
+ {
+ const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
+ throw FileError(errorMessage + ffs3::getLastErrorFormatted());
+ }
+
+ return alreadyGranted == TRUE;
+}
+
+
+void Privileges::setPrivilege(LPCTSTR privilege, bool enable) //throw FileError()
+{
+ HANDLE hToken = NULL;
+ if (!::OpenProcessToken(::GetCurrentProcess(), //__in HANDLE ProcessHandle,
+ TOKEN_ADJUST_PRIVILEGES, //__in DWORD DesiredAccess,
+ &hToken)) //__out PHANDLE TokenHandle
+ {
+ const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
+ throw FileError(errorMessage + ffs3::getLastErrorFormatted());
+ }
+ boost::shared_ptr<void> dummy(hToken, ::CloseHandle);
+
+ LUID luid = {0};
+ if (!::LookupPrivilegeValue(
+ NULL, //__in_opt LPCTSTR lpSystemName,
+ privilege, //__in LPCTSTR lpName,
+ &luid )) //__out PLUID lpLuid
+ {
+ const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
+ throw FileError(errorMessage + ffs3::getLastErrorFormatted());
+ }
+
+ TOKEN_PRIVILEGES tp = {0};
+ tp.PrivilegeCount = 1;
+ tp.Privileges[0].Luid = luid;
+ tp.Privileges[0].Attributes = enable ? SE_PRIVILEGE_ENABLED : 0;
+
+ if (!::AdjustTokenPrivileges(
+ hToken, //__in HANDLE TokenHandle,
+ false, //__in BOOL DisableAllPrivileges,
+ &tp, //__in_opt PTOKEN_PRIVILEGES NewState,
+ 0, //__in DWORD BufferLength,
+ NULL, //__out_opt PTOKEN_PRIVILEGES PreviousState,
+ NULL)) //__out_opt PDWORD ReturnLength
+ {
+ const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
+ throw FileError(errorMessage + ffs3::getLastErrorFormatted());
+ }
+
+ if (::GetLastError() == ERROR_NOT_ALL_ASSIGNED) //check although previous function returned with success!
+ {
+ const wxString errorMessage = wxString(_("Error setting privilege:")) + wxT(" \"") + privilege + wxT("\"") + wxT("\n\n");
+ throw FileError(errorMessage + ffs3::getLastErrorFormatted());
+ }
+}
diff --git a/shared/privilege.h b/shared/privilege.h
new file mode 100644
index 00000000..c5ec99c7
--- /dev/null
+++ b/shared/privilege.h
@@ -0,0 +1,59 @@
+#ifndef PRIVILEGE_H_INCLUDED
+#define PRIVILEGE_H_INCLUDED
+
+#include <map>
+#include "zstring.h"
+#include "file_error.h"
+#include <wx/msw/wrapwin.h> //includes "windows.h"
+
+
+namespace ffs3
+{
+#ifdef FFS_WIN
+class Privileges
+{
+public:
+ static Privileges& getInstance();
+
+ void ensureActive(LPCTSTR privilege) //throw FileError()
+ {
+ if (activePrivileges.find(privilege) != activePrivileges.end())
+ return; //privilege already active
+
+ if (privilegeIsActive(privilege)) //privilege was already active before starting this tool
+ activePrivileges.insert(std::make_pair(privilege, false));
+ else
+ {
+ setPrivilege(privilege, true);
+ activePrivileges.insert(std::make_pair(privilege, true));
+ }
+ }
+
+private:
+ Privileges() {}
+ Privileges(Privileges&);
+ void operator=(Privileges&);
+
+ ~Privileges() //clean up: deactivate all privileges that have been activated by this application
+ {
+ for (PrivBuffType::const_iterator i = activePrivileges.begin(); i != activePrivileges.end(); ++i)
+ try
+ {
+ if (i->second)
+ Privileges::setPrivilege(i->first, false);
+ }
+ catch(...) {}
+ }
+
+ static bool privilegeIsActive(LPCTSTR privilege); //throw FileError()
+ static void setPrivilege(LPCTSTR privilege, bool enable); //throw FileError()
+
+ typedef std::map<Zstring, bool> PrivBuffType; //bool: enabled by this application
+
+ PrivBuffType activePrivileges;
+};
+#endif
+}
+
+
+#endif // PRIVILEGE_H_INCLUDED
diff --git a/shared/recycler.cpp b/shared/recycler.cpp
index 2ee23462..4a0d7290 100644
--- a/shared/recycler.cpp
+++ b/shared/recycler.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "recycler.h"
diff --git a/shared/recycler.h b/shared/recycler.h
index 7537e875..b9fc9719 100644
--- a/shared/recycler.h
+++ b/shared/recycler.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef RECYCLER_H_INCLUDED
diff --git a/shared/serialize.cpp b/shared/serialize.cpp
index f5765d3d..f71207be 100644
--- a/shared/serialize.cpp
+++ b/shared/serialize.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "serialize.h"
@@ -13,13 +13,13 @@ using namespace util;
void ReadInputStream::throwReadError() const //throw FileError()
{
throw ffs3::FileError(wxString(_("Error reading from synchronization database:")) + wxT(" \n") +
- wxT("\"") + errorObjName_ + wxT("\""));
+ wxT("\"") + errorObjName_ + wxT("\""));
}
ReadInputStream::CharArray ReadInputStream::readArrayC() const
{
- const size_t byteCount = readNumberC<size_t>();
+ const boost::uint32_t byteCount = readNumberC<boost::uint32_t>();
CharArray buffer(new std::vector<char>(byteCount));
if (byteCount > 0)
{
@@ -36,13 +36,13 @@ ReadInputStream::CharArray ReadInputStream::readArrayC() const
void WriteOutputStream::throwWriteError() const //throw FileError()
{
throw ffs3::FileError(wxString(_("Error writing to synchronization database:")) + wxT(" \n") +
- wxT("\"") + errorObjName_ + wxT("\""));
+ wxT("\"") + errorObjName_ + wxT("\""));
}
void WriteOutputStream::writeArrayC(const std::vector<char>& buffer) const
{
- writeNumberC<size_t>(buffer.size());
+ writeNumberC<boost::uint32_t>(static_cast<boost::uint32_t>(buffer.size()));
if (buffer.size() > 0)
{
stream_.Write(&buffer[0], buffer.size());
diff --git a/shared/serialize.h b/shared/serialize.h
index 5f1d5fbf..8da0a449 100644
--- a/shared/serialize.h
+++ b/shared/serialize.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SERIALIZE_H_INCLUDED
@@ -37,7 +37,7 @@ protected:
Zstring readStringC() const; //throw FileError(), checked read operation
- typedef boost::shared_ptr<std::vector<char> > CharArray;
+ typedef boost::shared_ptr<std::vector<char> > CharArray; //there's no guarantee std::string has a ref-counted implementation... so use this "thing"
CharArray readArrayC() const; //throw FileError()
void check() const;
@@ -129,7 +129,7 @@ void writeNumber(wxOutputStream& stream, T number)
inline
Zstring readString(wxInputStream& stream)
{
- const size_t strLength = readNumber<size_t>(stream);
+ const boost::uint32_t strLength = readNumber<boost::uint32_t>(stream);
if (strLength <= 1000)
{
Zchar buffer[1000];
@@ -148,7 +148,7 @@ Zstring readString(wxInputStream& stream)
inline
void writeString(wxOutputStream& stream, const Zstring& str)
{
- writeNumber<size_t>(stream, str.length());
+ writeNumber<boost::uint32_t>(stream, static_cast<boost::uint32_t>(str.length()));
stream.Write(str.c_str(), sizeof(Zchar) * str.length());
}
diff --git a/shared/shadow.cpp b/shared/shadow.cpp
index 39f21d2a..5a70bb6e 100644
--- a/shared/shadow.cpp
+++ b/shared/shadow.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "shadow.h"
diff --git a/shared/shadow.h b/shared/shadow.h
index 2be44b41..b122e59d 100644
--- a/shared/shadow.h
+++ b/shared/shadow.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SHADOW_H_INCLUDED
diff --git a/shared/standard_paths.cpp b/shared/standard_paths.cpp
index 2bebe056..6f723ef7 100644
--- a/shared/standard_paths.cpp
+++ b/shared/standard_paths.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "standard_paths.h"
diff --git a/shared/standard_paths.h b/shared/standard_paths.h
index 956cf81c..5ecae9a7 100644
--- a/shared/standard_paths.h
+++ b/shared/standard_paths.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef STANDARDPATHS_H_INCLUDED
diff --git a/shared/string_conv.h b/shared/string_conv.h
index bb8f6c7e..85181d11 100644
--- a/shared/string_conv.h
+++ b/shared/string_conv.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef STRINGCONV_H_INCLUDED
diff --git a/shared/symlink_target.h b/shared/symlink_target.h
index c68d5229..358f2913 100644
--- a/shared/symlink_target.h
+++ b/shared/symlink_target.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SYMLINK_WIN_H_INCLUDED
@@ -17,6 +17,7 @@
#ifdef FFS_WIN
#include <wx/msw/wrapwin.h> //includes "windows.h"
#include "WinIoCtl.h"
+#include "privilege.h"
#include "long_path_prefix.h"
#elif defined FFS_LINUX
@@ -60,7 +61,7 @@ typedef struct _REPARSE_DATA_BUFFER
namespace
{
- //retrieve raw target data of symlink or junction
+//retrieve raw target data of symlink or junction
Zstring getSymlinkRawTargetString(const Zstring& linkPath) //throw (FileError)
{
using ffs3::zToWx;
@@ -68,6 +69,13 @@ Zstring getSymlinkRawTargetString(const Zstring& linkPath) //throw (FileError)
#ifdef FFS_WIN
//FSCTL_GET_REPARSE_POINT: http://msdn.microsoft.com/en-us/library/aa364571(VS.85).aspx
+ try //setting privileges requires admin rights! This shall not cause an error in user mode!
+ {
+ //allow access to certain symbolic links/junctions
+ ffs3::Privileges::getInstance().ensureActive(SE_BACKUP_NAME); //throw FileError()
+ }
+ catch (...) {}
+
const HANDLE hLink = ::CreateFile(ffs3::applyLongPathPrefix(linkPath).c_str(),
GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
@@ -111,7 +119,7 @@ Zstring getSymlinkRawTargetString(const Zstring& linkPath) //throw (FileError)
else if (reparseData.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT)
{
output = Zstring(reparseData.MountPointReparseBuffer.PathBuffer + reparseData.MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
- reparseData.MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR));
+ reparseData.MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR));
}
else
{
diff --git a/shared/system_constants.h b/shared/system_constants.h
index 7f34c467..6f89609e 100644
--- a/shared/system_constants.h
+++ b/shared/system_constants.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SYSTEMCONSTANTS_H_INCLUDED
diff --git a/shared/system_func.cpp b/shared/system_func.cpp
index 4f60f724..430451e5 100644
--- a/shared/system_func.cpp
+++ b/shared/system_func.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "system_func.h"
diff --git a/shared/system_func.h b/shared/system_func.h
index b15f4c0c..0bbd25d0 100644
--- a/shared/system_func.h
+++ b/shared/system_func.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SYSTEMFUNCTIONS_H_INCLUDED
diff --git a/shared/taskbar.cpp b/shared/taskbar.cpp
index f5f07c1e..881a1570 100644
--- a/shared/taskbar.cpp
+++ b/shared/taskbar.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "taskbar.h"
diff --git a/shared/taskbar.h b/shared/taskbar.h
index acf2d6da..b41734b3 100644
--- a/shared/taskbar.h
+++ b/shared/taskbar.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef TASKBARPROGRESS_H_INCLUDED
diff --git a/shared/toggle_button.cpp b/shared/toggle_button.cpp
index 2da64ee4..511822b1 100644
--- a/shared/toggle_button.cpp
+++ b/shared/toggle_button.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "toggle_button.h"
diff --git a/shared/toggle_button.h b/shared/toggle_button.h
index a67d5fff..6613fdd4 100644
--- a/shared/toggle_button.h
+++ b/shared/toggle_button.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef TOGGLEBUTTON_H_INCLUDED
diff --git a/shared/util.cpp b/shared/util.cpp
index 25c8c5e0..f115f8dc 100644
--- a/shared/util.cpp
+++ b/shared/util.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "util.h"
@@ -16,11 +16,22 @@
#include "system_func.h"
#include "check_exist.h"
#include "assert_static.h"
+#include "system_constants.h"
+
#ifdef FFS_WIN
#include <wx/msw/wrapwin.h> //includes "windows.h"
#endif
+wxString ffs3::extractJobName(const wxString& configFilename)
+{
+ using namespace common;
+
+ const wxString shortName = configFilename.AfterLast(FILE_NAME_SEPARATOR); //returns the whole string if seperator not found
+ const wxString jobName = shortName.BeforeLast(wxChar('.')); //returns empty string if seperator not found
+ return jobName.IsEmpty() ? shortName : jobName;
+}
+
wxString ffs3::formatFilesizeToShortString(const wxLongLong& filesize)
{
@@ -39,7 +50,7 @@ wxString ffs3::formatFilesizeToShortString(double filesize)
if (filesize < 0)
return _("Error");
- wxString output = _("%x Byte");
+ wxString output = _("%x Bytes");
if (filesize > 999)
{
diff --git a/shared/util.h b/shared/util.h
index 2495838c..90a73094 100644
--- a/shared/util.h
+++ b/shared/util.h
@@ -1,24 +1,26 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef UTIL_H_INCLUDED
#define UTIL_H_INCLUDED
-#include "../shared/zstring.h"
#include <wx/string.h>
#include <wx/longlong.h>
-#include "../shared/global_func.h"
#include <wx/textctrl.h>
#include <wx/filepicker.h>
#include <wx/combobox.h>
#include <wx/scrolwin.h>
+#include "zstring.h"
+#include "global_func.h"
namespace ffs3
{
+wxString extractJobName(const wxString& configFilename);
+
wxString formatFilesizeToShortString(const wxLongLong& filesize);
wxString formatFilesizeToShortString(const wxULongLong& filesize);
wxString formatFilesizeToShortString(double filesize);
diff --git a/shared/xml_base.cpp b/shared/xml_base.cpp
index 3213786d..99d4d3ca 100644
--- a/shared/xml_base.cpp
+++ b/shared/xml_base.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "xml_base.h"
diff --git a/shared/xml_base.h b/shared/xml_base.h
index 6d342b48..44650ec9 100644
--- a/shared/xml_base.h
+++ b/shared/xml_base.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef XMLBASE_H_INCLUDED
diff --git a/shared/xml_error.h b/shared/xml_error.h
index bd5153cb..ea66af89 100644
--- a/shared/xml_error.h
+++ b/shared/xml_error.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef XMLERROR_H_INCLUDED
diff --git a/shared/zbase.h b/shared/zbase.h
index 1caf0e44..c3d539a1 100644
--- a/shared/zbase.h
+++ b/shared/zbase.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef Z_BASE_H_INCLUDED
diff --git a/shared/zstring.cpp b/shared/zstring.cpp
index 1a05831d..40590a90 100644
--- a/shared/zstring.cpp
+++ b/shared/zstring.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "zstring.h"
diff --git a/shared/zstring.h b/shared/zstring.h
index a015dbe4..73e2f066 100644
--- a/shared/zstring.h
+++ b/shared/zstring.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef ZSTRING_H_INCLUDED
@@ -67,7 +67,7 @@ public:
LeakChecker::instance().insert(newMem, size); //test Zbase for memory leaks
return newMem;
#else
- return ::operator new(size);
+ return ::operator new(size);
#endif
}
diff --git a/structures.cpp b/structures.cpp
index ce41e93f..4dde40e0 100644
--- a/structures.cpp
+++ b/structures.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "structures.h"
@@ -170,6 +170,8 @@ wxString ffs3::getDescription(CompareFilesResult cmpRes)
return _("Files that have different content");
case FILE_EQUAL:
return _("Files that are equal on both sides");
+ case FILE_DIFFERENT_METADATA:
+ return _("Files/folders that differ in attributes only");
case FILE_CONFLICT:
return _("Conflicts/files that cannot be categorized");
}
@@ -196,6 +198,7 @@ wxString ffs3::getSymbol(CompareFilesResult cmpRes)
case FILE_EQUAL:
return wxT("'=="); //added quotation mark to avoid error in Excel cell when exporting to *.cvs
case FILE_CONFLICT:
+ case FILE_DIFFERENT_METADATA:
return wxT("\\/\\->");
}
@@ -224,6 +227,10 @@ wxString ffs3::getDescription(SyncOperation op)
return _("Do nothing");
case SO_EQUAL:
return _("Files that are equal on both sides");
+ case SO_COPY_METADATA_TO_LEFT:
+ return _("Copy attributes only from right to left");
+ case SO_COPY_METADATA_TO_RIGHT:
+ return _("Copy attributes only from left to right");
case SO_UNRESOLVED_CONFLICT:
return _("Conflicts/files that cannot be categorized");
};
@@ -246,8 +253,10 @@ wxString ffs3::getSymbol(SyncOperation op)
case SO_DELETE_RIGHT:
return wxT("-D");
case SO_OVERWRITE_LEFT:
+ case SO_COPY_METADATA_TO_LEFT:
return wxT("<-");
case SO_OVERWRITE_RIGHT:
+ case SO_COPY_METADATA_TO_RIGHT:
return wxT("->");
case SO_DO_NOTHING:
return wxT(" -");
@@ -262,6 +271,22 @@ wxString ffs3::getSymbol(SyncOperation op)
}
+namespace
+{
+bool sameFilterConfig(const std::vector<FolderPairEnh>& folderPairs)
+{
+ if (folderPairs.empty())
+ return true;
+
+ for (std::vector<FolderPairEnh>::const_iterator fp = folderPairs.begin(); fp != folderPairs.end(); ++fp)
+ if (!(fp->localFilter == folderPairs[0].localFilter))
+ return false;
+
+ return true;
+}
+}
+
+
ffs3::MainConfiguration ffs3::merge(const std::vector<MainConfiguration>& mainCfgs)
{
assert(!mainCfgs.empty());
@@ -269,7 +294,7 @@ ffs3::MainConfiguration ffs3::merge(const std::vector<MainConfiguration>& mainCf
return ffs3::MainConfiguration();
if (mainCfgs.size() == 1) //mergeConfigFilesImpl relies on this!
- return mainCfgs[0];
+ return mainCfgs[0]; //
//merge folder pair config
std::vector<FolderPairEnh> fpMerged;
@@ -300,9 +325,31 @@ ffs3::MainConfiguration ffs3::merge(const std::vector<MainConfiguration>& mainCf
fpMerged.insert(fpMerged.end(), fpTmp.begin(), fpTmp.end());
}
+ //optimization: remove redundant configuration
+ FilterConfig newGlobalFilter;
+
+ const bool sameLocalFilter = sameFilterConfig(fpMerged);
+ if (sameLocalFilter)
+ newGlobalFilter = fpMerged[0].localFilter;
+
+ for (std::vector<FolderPairEnh>::iterator fp = fpMerged.begin(); fp != fpMerged.end(); ++fp)
+ {
+ //if local config matches output global config we don't need local one
+ if ( fp->altSyncConfig &&
+ *fp->altSyncConfig ==
+ AlternateSyncConfig(mainCfgs[0].syncConfiguration,
+ mainCfgs[0].handleDeletion,
+ mainCfgs[0].customDeletionDirectory))
+ fp->altSyncConfig.reset();
+
+ if (sameLocalFilter) //use global filter in this case
+ fp->localFilter = FilterConfig();
+ }
+
+
//final assembly
ffs3::MainConfiguration cfgOut = mainCfgs[0];
- cfgOut.globalFilter = FilterConfig(); //all filtering was moved to item level!
+ cfgOut.globalFilter = newGlobalFilter;
cfgOut.firstPair = fpMerged[0];
cfgOut.additionalPairs.assign(fpMerged.begin() + 1, fpMerged.end());
diff --git a/structures.h b/structures.h
index ca6f8e7d..6146865e 100644
--- a/structures.h
+++ b/structures.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FREEFILESYNC_H_INCLUDED
@@ -42,6 +42,7 @@ enum CompareFilesResult
FILE_RIGHT_NEWER,
FILE_DIFFERENT,
FILE_EQUAL,
+ FILE_DIFFERENT_METADATA, //both sides equal, but different metadata only
FILE_CONFLICT
};
//attention make sure these /|\ \|/ three enums match!!!
@@ -49,7 +50,8 @@ enum CompareDirResult
{
DIR_LEFT_SIDE_ONLY = FILE_LEFT_SIDE_ONLY,
DIR_RIGHT_SIDE_ONLY = FILE_RIGHT_SIDE_ONLY,
- DIR_EQUAL = FILE_EQUAL
+ DIR_EQUAL = FILE_EQUAL,
+ DIR_DIFFERENT_METADATA = FILE_DIFFERENT_METADATA //both sides equal, but different metadata only
};
enum CompareSymlinkResult
@@ -60,6 +62,7 @@ enum CompareSymlinkResult
SYMLINK_RIGHT_NEWER = FILE_RIGHT_NEWER,
SYMLINK_DIFFERENT = FILE_DIFFERENT,
SYMLINK_EQUAL = FILE_EQUAL,
+ SYMLINK_DIFFERENT_METADATA = FILE_DIFFERENT_METADATA, //files are considered "equal" but different only in metadata
SYMLINK_CONFLICT = FILE_CONFLICT
};
@@ -90,6 +93,8 @@ enum SyncOperation
SO_DELETE_RIGHT,
SO_OVERWRITE_LEFT,
SO_OVERWRITE_RIGHT,
+ SO_COPY_METADATA_TO_LEFT, //objects are already equal: transfer metadata only
+ SO_COPY_METADATA_TO_RIGHT, //
SO_DO_NOTHING, //= both sides differ, but nothing will be synced
SO_EQUAL, //= both sides are equal, so nothing will be synced
SO_UNRESOLVED_CONFLICT
@@ -103,25 +108,6 @@ wxString getSymbol(SyncOperation op);
class AbortThisProcess {};
-struct SyncConfigCustom //save last used custom config settings
-{
- SyncConfigCustom() :
- exLeftSideOnly( SYNC_DIR_NONE),
- exRightSideOnly(SYNC_DIR_NONE),
- leftNewer( SYNC_DIR_NONE),
- rightNewer( SYNC_DIR_NONE),
- different( SYNC_DIR_NONE),
- conflict( SYNC_DIR_NONE) {}
-
- SyncDirection exLeftSideOnly;
- SyncDirection exRightSideOnly;
- SyncDirection leftNewer;
- SyncDirection rightNewer;
- SyncDirection different;
- SyncDirection conflict;
-};
-
-
struct SyncConfiguration //technical representation of sync-config: not to be edited by GUI directly!
{
SyncConfiguration() :
@@ -144,12 +130,13 @@ struct SyncConfiguration //technical representation of sync-config: not to be ed
bool operator==(const SyncConfiguration& other) const
{
return automatic == other.automatic &&
- exLeftSideOnly == other.exLeftSideOnly &&
- exRightSideOnly == other.exRightSideOnly &&
- leftNewer == other.leftNewer &&
- rightNewer == other.rightNewer &&
- different == other.different &&
- conflict == other.conflict;
+ (automatic || //if automatic is on, other settings are not relevant
+ (exLeftSideOnly == other.exLeftSideOnly &&
+ exRightSideOnly == other.exRightSideOnly &&
+ leftNewer == other.leftNewer &&
+ rightNewer == other.rightNewer &&
+ different == other.different &&
+ conflict == other.conflict));
}
bool automatic; //use sync-database
diff --git a/synchronization.cpp b/synchronization.cpp
index 493bf077..8e0dc7de 100644
--- a/synchronization.cpp
+++ b/synchronization.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "synchronization.h"
@@ -21,6 +21,8 @@
#include <boost/scoped_array.hpp>
#include <memory>
#include "library/db_file.h"
+#include "shared/disable_standby.h"
+#include "library/cmp_filetime.h"
#ifdef FFS_WIN
#include "shared/long_path_prefix.h"
@@ -58,27 +60,6 @@ SyncStatistics::SyncStatistics(const FolderComparison& folderCmp)
}
-int SyncStatistics::getCreate(bool inclLeft, bool inclRight) const
-{
- return (inclLeft ? createLeft : 0) +
- (inclRight ? createRight : 0);
-}
-
-
-int SyncStatistics::getOverwrite(bool inclLeft, bool inclRight) const
-{
- return (inclLeft ? overwriteLeft : 0) +
- (inclRight ? overwriteRight : 0);
-}
-
-
-int SyncStatistics::getDelete(bool inclLeft, bool inclRight) const
-{
- return (inclLeft ? deleteLeft : 0) +
- (inclRight ? deleteRight : 0);
-}
-
-
int SyncStatistics::getConflict() const
{
return conflict;
@@ -161,6 +142,14 @@ void SyncStatistics::getFileNumbers(const FileMapping& fileObj)
firstConflicts.push_back(std::make_pair(fileObj.getObjRelativeName(), fileObj.getSyncOpConflict()));
break;
+ case SO_COPY_METADATA_TO_LEFT:
+ ++overwriteLeft;
+ break;
+
+ case SO_COPY_METADATA_TO_RIGHT:
+ ++overwriteRight;
+ break;
+
case SO_DO_NOTHING:
case SO_EQUAL:
break;
@@ -190,10 +179,12 @@ void SyncStatistics::getLinkNumbers(const SymLinkMapping& linkObj)
break;
case SO_OVERWRITE_LEFT:
+ case SO_COPY_METADATA_TO_LEFT:
++overwriteLeft;
break;
case SO_OVERWRITE_RIGHT:
+ case SO_COPY_METADATA_TO_RIGHT:
++overwriteRight;
break;
@@ -242,6 +233,14 @@ void SyncStatistics::getDirNumbers(const DirMapping& dirObj)
firstConflicts.push_back(std::make_pair(dirObj.getObjRelativeName(), dirObj.getSyncOpConflict()));
break;
+ case SO_COPY_METADATA_TO_LEFT:
+ ++overwriteLeft;
+ break;
+
+ case SO_COPY_METADATA_TO_RIGHT:
+ ++overwriteRight;
+ break;
+
case SO_DO_NOTHING:
case SO_EQUAL:
break;
@@ -339,6 +338,8 @@ private:
case SO_DO_NOTHING:
case SO_EQUAL:
case SO_UNRESOLVED_CONFLICT:
+ case SO_COPY_METADATA_TO_LEFT:
+ case SO_COPY_METADATA_TO_RIGHT:
break;
}
@@ -421,11 +422,11 @@ bool ffs3::synchronizationNeeded(const FolderComparison& folderCmp)
bool significantDifferenceDetected(const SyncStatistics& folderPairStat)
{
//initial file copying shall not be detected as major difference
- if ( folderPairStat.getCreate(true, false) == 0 &&
+ if ( folderPairStat.getCreate<LEFT_SIDE>() == 0 &&
folderPairStat.getOverwrite() == 0 &&
folderPairStat.getDelete() == 0 &&
folderPairStat.getConflict() == 0) return false;
- if ( folderPairStat.getCreate(false, true) == 0 &&
+ if ( folderPairStat.getCreate<RIGHT_SIDE>() == 0 &&
folderPairStat.getOverwrite() == 0 &&
folderPairStat.getDelete() == 0 &&
folderPairStat.getConflict() == 0) return false;
@@ -859,6 +860,8 @@ bool diskSpaceIsReduced(const FileMapping& fileObj)
case SO_DO_NOTHING:
case SO_EQUAL:
case SO_UNRESOLVED_CONFLICT:
+ case SO_COPY_METADATA_TO_LEFT:
+ case SO_COPY_METADATA_TO_RIGHT:
return false;
}
return false; //dummy
@@ -881,11 +884,13 @@ bool diskSpaceIsReduced(const DirMapping& dirObj)
case SO_CREATE_NEW_RIGHT:
case SO_DO_NOTHING:
case SO_EQUAL:
+ case SO_COPY_METADATA_TO_LEFT:
+ case SO_COPY_METADATA_TO_RIGHT:
return false;
}
return false; //dummy
}
-//----------------------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------------------
class ffs3::SynchronizeFolderPair
@@ -903,12 +908,13 @@ public:
delHandling_(delHandling),
verifyCopiedFiles_(syncProc.verifyCopiedFiles_),
copyFilePermissions_(syncProc.copyFilePermissions_),
- txtCopyingFile (wxToZ(_("Copying new file %x to %y")). Replace(Zstr("%x"), Zstr("\"%x\""), false).Replace(Zstr("%y"), Zstr("\n\"%y\""), false)),
+ txtCopyingFile (wxToZ(_("Copying new file %x to %y")). Replace(Zstr("%x"), Zstr("\"%x\""), false).Replace(Zstr("%y"), Zstr("\n\"%y\""), false)),
txtCopyingLink (wxToZ(_("Copying new Symbolic Link %x to %y")).Replace(Zstr("%x"), Zstr("\"%x\""), false).Replace(Zstr("%y"), Zstr("\n\"%y\""), false)),
- txtOverwritingFile(wxToZ(_("Overwriting file %x in %y")). Replace(Zstr("%x"), Zstr("\"%x\""), false).Replace(Zstr("%y"), Zstr("\n\"%y\""), false)),
+ txtOverwritingFile(wxToZ(_("Overwriting file %x in %y")). Replace(Zstr("%x"), Zstr("\"%x\""), false).Replace(Zstr("%y"), Zstr("\n\"%y\""), false)),
txtOverwritingLink(wxToZ(_("Overwriting Symbolic Link %x in %y")).Replace(Zstr("%x"), Zstr("\"%x\""), false).Replace(Zstr("%y"), Zstr("\n\"%y\""), false)),
txtCreatingFolder (wxToZ(_("Creating folder %x")).Replace(Zstr("%x"), Zstr("\n\"%x\""), false)),
- txtVerifying (wxToZ(_("Verifying file %x")). Replace(Zstr("%x"), Zstr("\n\"%x\""), false)) {}
+ txtVerifying (wxToZ(_("Verifying file %x")). Replace(Zstr("%x"), Zstr("\n\"%x\""), false)),
+ txtWritingAttributes(wxToZ(_("Updating attributes of %x")).Replace(Zstr("%x"), Zstr("\n\"%x\""), false)) {}
template <bool reduceDiskSpace> //"true" if files deletion shall happen only
@@ -948,6 +954,7 @@ private:
const Zstring txtOverwritingLink;
const Zstring txtCreatingFolder;
const Zstring txtVerifying;
+ const Zstring txtWritingAttributes;
};
@@ -985,10 +992,12 @@ void SynchronizeFolderPair::execute(HierarchyObject& hierObj)
switch (syncOp)
{
case SO_CREATE_NEW_LEFT:
- copyFileTimes(i->getFullName<RIGHT_SIDE>(), i->getFullName<LEFT_SIDE>(), true); //throw (FileError)
+ case SO_COPY_METADATA_TO_LEFT:
+ copyFileTimes(i->getFullName<RIGHT_SIDE>(), i->getFullName<LEFT_SIDE>(), true); //deref symlinks; throw (FileError)
break;
case SO_CREATE_NEW_RIGHT:
- copyFileTimes(i->getFullName<LEFT_SIDE>(), i->getFullName<RIGHT_SIDE>(), true); //throw (FileError)
+ case SO_COPY_METADATA_TO_RIGHT:
+ copyFileTimes(i->getFullName<LEFT_SIDE>(), i->getFullName<RIGHT_SIDE>(), true); //deref symlinks; throw (FileError)
break;
case SO_OVERWRITE_RIGHT:
case SO_OVERWRITE_LEFT:
@@ -1014,7 +1023,7 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const
switch (fileObj.getSyncOperation()) //evaluate comparison result and sync direction
{
case SO_CREATE_NEW_LEFT:
- target = fileObj.getBaseDirPf<LEFT_SIDE>() + fileObj.getRelativeName<RIGHT_SIDE>();
+ target = fileObj.getBaseDirPf<LEFT_SIDE>() + fileObj.getRelativeName<RIGHT_SIDE>(); //can't use "getFullName" as target is not yet existing
statusText = txtCopyingFile;
statusText.Replace(Zstr("%x"), fileObj.getShortName<RIGHT_SIDE>(), false);
@@ -1055,8 +1064,23 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const
delHandling_.removeFile<RIGHT_SIDE>(fileObj); //throw FileError()
break;
+ case SO_OVERWRITE_LEFT:
+ target = fileObj.getBaseDirPf<LEFT_SIDE>() + fileObj.getRelativeName<RIGHT_SIDE>(); //respect differences in case of source object
+
+ statusText = txtOverwritingFile;
+ statusText.Replace(Zstr("%x"), fileObj.getShortName<RIGHT_SIDE>(), false);
+ statusText.Replace(Zstr("%y"), fileObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR), false);
+ statusUpdater_.reportInfo(statusText);
+ statusUpdater_.requestUiRefresh(); //trigger display refresh
+
+ delHandling_.removeFile<LEFT_SIDE>(fileObj); //throw FileError()
+ fileObj.removeObject<LEFT_SIDE>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!)
+
+ copyFileUpdating(fileObj.getFullName<RIGHT_SIDE>(), target, fileObj.getFileSize<RIGHT_SIDE>());
+ break;
+
case SO_OVERWRITE_RIGHT:
- target = fileObj.getBaseDirPf<RIGHT_SIDE>() + fileObj.getRelativeName<LEFT_SIDE>();
+ target = fileObj.getBaseDirPf<RIGHT_SIDE>() + fileObj.getRelativeName<LEFT_SIDE>(); //respect differences in case of source object
statusText = txtOverwritingFile;
statusText.Replace(Zstr("%x"), fileObj.getShortName<LEFT_SIDE>(), false);
@@ -1070,19 +1094,32 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const
copyFileUpdating(fileObj.getFullName<LEFT_SIDE>(), target, fileObj.getFileSize<LEFT_SIDE>());
break;
- case SO_OVERWRITE_LEFT:
- target = fileObj.getBaseDirPf<LEFT_SIDE>() + fileObj.getRelativeName<RIGHT_SIDE>();
+ case SO_COPY_METADATA_TO_LEFT:
+ statusText = txtWritingAttributes;
+ statusText.Replace(Zstr("%x"), fileObj.getFullName<LEFT_SIDE>(), false);
+ statusUpdater_.reportInfo(statusText);
+ statusUpdater_.requestUiRefresh(); //trigger display refresh
- statusText = txtOverwritingFile;
- statusText.Replace(Zstr("%x"), fileObj.getShortName<RIGHT_SIDE>(), false);
- statusText.Replace(Zstr("%y"), fileObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR), false);
+ if (fileObj.getShortName<LEFT_SIDE>() != fileObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only)
+ moveFile(fileObj.getFullName<LEFT_SIDE>(),
+ fileObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + fileObj.getShortName<RIGHT_SIDE>()); //throw (FileError);
+
+ if (!sameFileTime(fileObj.getLastWriteTime<LEFT_SIDE>(), fileObj.getLastWriteTime<RIGHT_SIDE>(), 2)) ////respect 2 second FAT/FAT32 precision
+ copyFileTimes(fileObj.getFullName<RIGHT_SIDE>(), fileObj.getFullName<LEFT_SIDE>(), true); //deref symlinks; throw (FileError)
+ break;
+
+ case SO_COPY_METADATA_TO_RIGHT:
+ statusText = txtWritingAttributes;
+ statusText.Replace(Zstr("%x"), fileObj.getFullName<RIGHT_SIDE>(), false);
statusUpdater_.reportInfo(statusText);
statusUpdater_.requestUiRefresh(); //trigger display refresh
- delHandling_.removeFile<LEFT_SIDE>(fileObj); //throw FileError()
- fileObj.removeObject<LEFT_SIDE>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!)
+ if (fileObj.getShortName<LEFT_SIDE>() != fileObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only)
+ moveFile(fileObj.getFullName<RIGHT_SIDE>(),
+ fileObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + fileObj.getShortName<LEFT_SIDE>()); //throw (FileError);
- copyFileUpdating(fileObj.getFullName<RIGHT_SIDE>(), target, fileObj.getFileSize<RIGHT_SIDE>());
+ if (!sameFileTime(fileObj.getLastWriteTime<LEFT_SIDE>(), fileObj.getLastWriteTime<RIGHT_SIDE>(), 2)) ////respect 2 second FAT/FAT32 precision
+ copyFileTimes(fileObj.getFullName<LEFT_SIDE>(), fileObj.getFullName<RIGHT_SIDE>(), true); //deref symlinks; throw (FileError)
break;
case SO_DO_NOTHING:
@@ -1149,8 +1186,23 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const
deleteSymlink<RIGHT_SIDE>(linkObj); //throw FileError()
break;
+ case SO_OVERWRITE_LEFT:
+ target = linkObj.getBaseDirPf<LEFT_SIDE>() + linkObj.getRelativeName<RIGHT_SIDE>(); //respect differences in case of source object
+
+ statusText = txtOverwritingLink;
+ statusText.Replace(Zstr("%x"), linkObj.getShortName<RIGHT_SIDE>(), false);
+ statusText.Replace(Zstr("%y"), linkObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR), false);
+ statusUpdater_.reportInfo(statusText);
+ statusUpdater_.requestUiRefresh(); //trigger display refresh
+
+ deleteSymlink<LEFT_SIDE>(linkObj); //throw FileError()
+ linkObj.removeObject<LEFT_SIDE>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!)
+
+ copySymlink(linkObj.getFullName<RIGHT_SIDE>(), target, linkObj.getLinkType<RIGHT_SIDE>());
+ break;
+
case SO_OVERWRITE_RIGHT:
- target = linkObj.getBaseDirPf<RIGHT_SIDE>() + linkObj.getRelativeName<LEFT_SIDE>();
+ target = linkObj.getBaseDirPf<RIGHT_SIDE>() + linkObj.getRelativeName<LEFT_SIDE>(); //respect differences in case of source object
statusText = txtOverwritingLink;
statusText.Replace(Zstr("%x"), linkObj.getShortName<LEFT_SIDE>(), false);
@@ -1164,19 +1216,32 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const
copySymlink(linkObj.getFullName<LEFT_SIDE>(), target, linkObj.getLinkType<LEFT_SIDE>());
break;
- case SO_OVERWRITE_LEFT:
- target = linkObj.getBaseDirPf<LEFT_SIDE>() + linkObj.getRelativeName<RIGHT_SIDE>();
+ case SO_COPY_METADATA_TO_LEFT:
+ statusText = txtWritingAttributes;
+ statusText.Replace(Zstr("%x"), linkObj.getFullName<LEFT_SIDE>(), false);
+ statusUpdater_.reportInfo(statusText);
+ statusUpdater_.requestUiRefresh(); //trigger display refresh
- statusText = txtOverwritingLink;
- statusText.Replace(Zstr("%x"), linkObj.getShortName<RIGHT_SIDE>(), false);
- statusText.Replace(Zstr("%y"), linkObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR), false);
+ if (linkObj.getShortName<LEFT_SIDE>() != linkObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only)
+ moveFile(linkObj.getFullName<LEFT_SIDE>(),
+ linkObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + linkObj.getShortName<RIGHT_SIDE>()); //throw (FileError);
+
+ if (!sameFileTime(linkObj.getLastWriteTime<LEFT_SIDE>(), linkObj.getLastWriteTime<RIGHT_SIDE>(), 2)) ////respect 2 second FAT/FAT32 precision
+ copyFileTimes(linkObj.getFullName<RIGHT_SIDE>(), linkObj.getFullName<LEFT_SIDE>(), false); //don't deref symlinks; throw (FileError)
+ break;
+
+ case SO_COPY_METADATA_TO_RIGHT:
+ statusText = txtWritingAttributes;
+ statusText.Replace(Zstr("%x"), linkObj.getFullName<RIGHT_SIDE>(), false);
statusUpdater_.reportInfo(statusText);
statusUpdater_.requestUiRefresh(); //trigger display refresh
- deleteSymlink<LEFT_SIDE>(linkObj); //throw FileError()
- linkObj.removeObject<LEFT_SIDE>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!)
+ if (linkObj.getShortName<LEFT_SIDE>() != linkObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only)
+ moveFile(linkObj.getFullName<RIGHT_SIDE>(),
+ linkObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + linkObj.getShortName<LEFT_SIDE>()); //throw (FileError);
- copySymlink(linkObj.getFullName<RIGHT_SIDE>(), target, linkObj.getLinkType<RIGHT_SIDE>());
+ if (!sameFileTime(linkObj.getLastWriteTime<LEFT_SIDE>(), linkObj.getLastWriteTime<RIGHT_SIDE>(), 2)) ////respect 2 second FAT/FAT32 precision
+ copyFileTimes(linkObj.getFullName<LEFT_SIDE>(), linkObj.getFullName<RIGHT_SIDE>(), false); //don't deref symlinks; throw (FileError)
break;
case SO_DO_NOTHING:
@@ -1268,6 +1333,30 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const
}
break;
+ case SO_COPY_METADATA_TO_LEFT:
+ statusText = txtWritingAttributes;
+ statusText.Replace(Zstr("%x"), dirObj.getFullName<LEFT_SIDE>(), false);
+ statusUpdater_.reportInfo(statusText);
+ statusUpdater_.requestUiRefresh(); //trigger display refresh
+
+ if (dirObj.getShortName<LEFT_SIDE>() != dirObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only)
+ moveFile(dirObj.getFullName<LEFT_SIDE>(),
+ dirObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + dirObj.getShortName<RIGHT_SIDE>()); //throw (FileError);
+ //copyFileTimes(dirObj.getFullName<RIGHT_SIDE>(), dirObj.getFullName<LEFT_SIDE>(), true); //throw (FileError) -> is executed after sub-objects have finished synchronization
+ break;
+
+ case SO_COPY_METADATA_TO_RIGHT:
+ statusText = txtWritingAttributes;
+ statusText.Replace(Zstr("%x"), dirObj.getFullName<RIGHT_SIDE>(), false);
+ statusUpdater_.reportInfo(statusText);
+ statusUpdater_.requestUiRefresh(); //trigger display refresh
+
+ if (dirObj.getShortName<LEFT_SIDE>() != dirObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only)
+ moveFile(dirObj.getFullName<RIGHT_SIDE>(),
+ dirObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + dirObj.getShortName<LEFT_SIDE>()); //throw (FileError);
+ //copyFileTimes(dirObj.getFullName<LEFT_SIDE>(), dirObj.getFullName<RIGHT_SIDE>(), true); //throw (FileError) -> is executed after sub-objects have finished synchronization
+ break;
+
case SO_OVERWRITE_RIGHT:
case SO_OVERWRITE_LEFT:
assert(false);
@@ -1303,6 +1392,24 @@ void makeSameLength(wxString& first, wxString& second)
first.Pad(maxPref - first.length(), wxT(' '), true);
second.Pad(maxPref - second.length(), wxT(' '), true);
}
+
+struct LessDependentDirectory : public std::binary_function<Zstring, Zstring, bool>
+{
+ bool operator()(const Zstring& lhs, const Zstring& rhs) const
+ {
+ return LessFilename()(Zstring(lhs.c_str(), std::min(lhs.length(), rhs.length())),
+ Zstring(rhs.c_str(), std::min(lhs.length(), rhs.length())));
+ }
+};
+
+struct EqualDependentDirectory : public std::binary_function<Zstring, Zstring, bool>
+{
+ bool operator()(const Zstring& lhs, const Zstring& rhs) const
+ {
+ return EqualFilename()(Zstring(lhs.c_str(), std::min(lhs.length(), rhs.length())),
+ Zstring(rhs.c_str(), std::min(lhs.length(), rhs.length())));
+ }
+};
}
@@ -1328,16 +1435,58 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
if (syncConfig.size() != folderCmp.size())
throw std::logic_error("Programming Error: Contract violation!");
- std::vector<std::pair<bool, bool> > baseDirNeeded;
+ //aggregate information
+ typedef std::set<Zstring, LessDependentDirectory> DirReadSet; //count (at least one) read access
+ typedef std::map<Zstring, size_t, LessDependentDirectory> DirWriteMap; //count (read+)write accesses
+ DirReadSet dirReadCount;
+ DirWriteMap dirWriteCount;
+
+ typedef std::vector<std::pair<Zstring, Zstring> > DirPairList;
+ DirPairList significantDiff;
+ typedef std::vector<std::pair<Zstring, std::pair<wxLongLong, wxLongLong> > > DirSpaceRequAvailList; //dirname / space required / space available
+ DirSpaceRequAvailList diskSpaceMissing;
+
+
+ //start checking folder pairs
for (FolderComparison::const_iterator j = folderCmp.begin(); j != folderCmp.end(); ++j)
{
+ //exclude some pathological case (leftdir, rightdir are empty)
+ if (EqualFilename()(j->getBaseDir<LEFT_SIDE>(), j->getBaseDir<RIGHT_SIDE>()))
+ continue;
+
const FolderPairSyncCfg& folderPairCfg = syncConfig[j - folderCmp.begin()];
const SyncStatistics statisticsFolderPair(*j);
- //save information whether base directories need to be created (if not yet existing)
- baseDirNeeded.push_back(std::make_pair(statisticsFolderPair.getCreate(true, false) > 0,
- statisticsFolderPair.getCreate(false, true) > 0));
+ //aggregate information of folders used by multiple pairs in read/write access
+ const bool writeLeft = statisticsFolderPair.getCreate <LEFT_SIDE>() +
+ statisticsFolderPair.getOverwrite<LEFT_SIDE>() +
+ statisticsFolderPair.getDelete <LEFT_SIDE>() > 0;
+
+ const bool writeRight = statisticsFolderPair.getCreate <RIGHT_SIDE>() +
+ statisticsFolderPair.getOverwrite<RIGHT_SIDE>() +
+ statisticsFolderPair.getDelete <RIGHT_SIDE>() > 0;
+ if (!EqualDependentDirectory()(j->getBaseDir<LEFT_SIDE>(), j->getBaseDir<RIGHT_SIDE>())) //true in general
+ {
+ if (writeLeft)
+ {
+ ++dirWriteCount[j->getBaseDir<LEFT_SIDE>()];
+ if (writeRight)
+ ++dirWriteCount[j->getBaseDir<RIGHT_SIDE>()];
+ else
+ dirReadCount.insert(j->getBaseDir<RIGHT_SIDE>());
+ }
+ else if (writeRight)
+ {
+ dirReadCount.insert(j->getBaseDir<LEFT_SIDE>());
+ ++dirWriteCount[j->getBaseDir<RIGHT_SIDE>()];
+ }
+ }
+ else //if folder pair contains two dependent folders, a warning was already issued after comparison; in this context treat as one write access at most
+ {
+ if (writeLeft || writeRight)
+ ++dirWriteCount[j->getBaseDir<LEFT_SIDE>()];
+ }
if (statisticsFolderPair.getOverwrite() + statisticsFolderPair.getDelete() > 0)
{
@@ -1373,13 +1522,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
//check if more than 50% of total number of files/dirs are to be created/overwritten/deleted
if (significantDifferenceDetected(statisticsFolderPair))
- {
- statusUpdater.reportWarning(wxString(_("Significant difference detected:")) + wxT("\n") +
- zToWx(j->getBaseDir<LEFT_SIDE>()) + wxT(" <-> ") + wxT("\n") +
- zToWx(j->getBaseDir<RIGHT_SIDE>()) + wxT("\n\n") +
- _("More than 50% of the total number of files will be copied or deleted!"),
- m_warnings.warningSignificantDifference);
- }
+ significantDiff.push_back(std::make_pair(j->getBaseDir<LEFT_SIDE>(), j->getBaseDir<RIGHT_SIDE>()));
//check for sufficient free diskspace in left directory
const std::pair<wxLongLong, wxLongLong> spaceNeeded = freeDiskSpaceNeeded(*j, folderPairCfg.handleDeletion, folderPairCfg.custDelFolder);
@@ -1389,11 +1532,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
{
if (0 < freeDiskSpaceLeft && //zero disk space is either an error or not: in both cases this warning message is obsolete (WebDav seems to report 0)
freeDiskSpaceLeft < spaceNeeded.first)
- statusUpdater.reportWarning(wxString(_("Not enough free disk space available in:")) + wxT("\n") +
- wxT("\"") + zToWx(j->getBaseDir<LEFT_SIDE>()) + wxT("\"\n\n") +
- _("Total required free disk space:") + wxT(" ") + formatFilesizeToShortString(spaceNeeded.first) + wxT("\n") +
- _("Free disk space available:") + wxT(" ") + formatFilesizeToShortString(freeDiskSpaceLeft),
- m_warnings.warningNotEnoughDiskSpace);
+ diskSpaceMissing.push_back(std::make_pair(j->getBaseDir<LEFT_SIDE>(), std::make_pair(spaceNeeded.first, freeDiskSpaceLeft)));
}
//check for sufficient free diskspace in right directory
@@ -1402,11 +1541,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
{
if (0 < freeDiskSpaceRight && //zero disk space is either an error or not: in both cases this warning message is obsolete (WebDav seems to report 0)
freeDiskSpaceRight < spaceNeeded.second)
- statusUpdater.reportWarning(wxString(_("Not enough free disk space available in:")) + wxT("\n") +
- wxT("\"") + zToWx(j->getBaseDir<RIGHT_SIDE>()) + wxT("\"\n\n") +
- _("Total required free disk space:") + wxT(" ") + formatFilesizeToShortString(spaceNeeded.second) + wxT("\n") +
- _("Free disk space available:") + wxT(" ") + formatFilesizeToShortString(freeDiskSpaceRight),
- m_warnings.warningNotEnoughDiskSpace);
+ diskSpaceMissing.push_back(std::make_pair(j->getBaseDir<RIGHT_SIDE>(), std::make_pair(spaceNeeded.second, freeDiskSpaceRight)));
}
}
@@ -1434,6 +1569,53 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
statusUpdater.reportWarning(warningMessage, m_warnings.warningUnresolvedConflicts);
}
+
+ //check if more than 50% of total number of files/dirs are to be created/overwritten/deleted
+ if (!significantDiff.empty())
+ {
+ wxString warningMessage = _("Significant difference detected:");
+
+ for (DirPairList::const_iterator i = significantDiff.begin(); i != significantDiff.end(); ++i)
+ warningMessage += wxString(wxT("\n\n")) +
+ zToWx(i->first) + wxT(" <-> ") + wxT("\n") +
+ zToWx(i->second);
+ warningMessage += wxString(wxT("\n\n")) +_("More than 50% of the total number of files will be copied or deleted!");
+
+ statusUpdater.reportWarning(warningMessage, m_warnings.warningSignificantDifference);
+ }
+
+
+ //check for sufficient free diskspace
+ if (!diskSpaceMissing.empty())
+ {
+ wxString warningMessage = _("Not enough free disk space available in:");
+
+ for (DirSpaceRequAvailList::const_iterator i = diskSpaceMissing.begin(); i != diskSpaceMissing.end(); ++i)
+ warningMessage += wxString(wxT("\n\n")) +
+ wxT("\"") + zToWx(i->first) + wxT("\"\n") +
+ _("Total required free disk space:") + wxT(" ") + formatFilesizeToShortString(i->second.first) + wxT("\n") +
+ _("Free disk space available:") + wxT(" ") + formatFilesizeToShortString(i->second.second);
+
+ statusUpdater.reportWarning(warningMessage, m_warnings.warningNotEnoughDiskSpace);
+ }
+
+
+ //check if folders are used by multiple pairs in read/write access
+ std::vector<Zstring> conflictDirs;
+ for (DirWriteMap::const_iterator i = dirWriteCount.begin(); i != dirWriteCount.end(); ++i)
+ if ( i->second >= 2 || //multiple write accesses
+ (i->second == 1 && dirReadCount.find(i->first) != dirReadCount.end())) //read/write access
+ conflictDirs.push_back(i->first);
+
+ if (!conflictDirs.empty())
+ {
+ wxString warningMessage = wxString(_("A directory will be modified which is part of multiple folder pairs! Please review synchronization settings!")) + wxT("\n");
+ for (std::vector<Zstring>::const_iterator i = conflictDirs.begin(); i != conflictDirs.end(); ++i)
+ warningMessage += wxString(wxT("\n")) +
+ wxT("\"") + zToWx(*i) + wxT("\"");
+ statusUpdater.reportWarning(warningMessage, m_warnings.warningMultiFolderWriteAccess);
+ }
+
//-------------------end of basic checks------------------------------------------
#ifdef FFS_WIN
@@ -1458,6 +1640,9 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
try
{
+ //prevent shutdown while synchronization is in progress
+ util::DisableStandby dummy;
+
//loop through all directory pairs
assert(syncConfig.size() == folderCmp.size());
for (FolderComparison::iterator j = folderCmp.begin(); j != folderCmp.end(); ++j)
@@ -1479,20 +1664,17 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
wxT("\t") + right + wxT("\"") + zToWx(j->getBaseDir<RIGHT_SIDE>()) + wxT("\"");
statusUpdater.reportInfo(wxToZ(statusTxt));
//------------------------------------------------------------------------------------------
- //(try to) create base dir first -> no symlink or attribute copying!
- if (baseDirNeeded[j - folderCmp.begin()].first)
- try
- {
- ffs3::createDirectory(j->getBaseDir<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR));
- }
- catch (...) {}
-
- if (baseDirNeeded[j - folderCmp.begin()].second)
- try //create base dir first -> no symlink or attribute copying!
- {
- ffs3::createDirectory(j->getBaseDir<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR));
- }
- catch (...) {}
+ //(try to) create base dir first (if not yet existing) -> no symlink or attribute copying!
+ try
+ {
+ ffs3::createDirectory(j->getBaseDir<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR));
+ }
+ catch (...) {}
+ try //create base dir first -> no symlink or attribute copying!
+ {
+ ffs3::createDirectory(j->getBaseDir<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR));
+ }
+ catch (...) {}
//------------------------------------------------------------------------------------------
//generate name of alternate deletion directory (unique for session AND folder pair)
diff --git a/synchronization.h b/synchronization.h
index afa36dff..d83315f4 100644
--- a/synchronization.h
+++ b/synchronization.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SYNCHRONIZATION_H_INCLUDED
@@ -22,10 +22,16 @@ public:
SyncStatistics(const HierarchyObject& hierObj);
SyncStatistics(const FolderComparison& folderCmp);
- int getCreate( bool inclLeft = true, bool inclRight = true) const;
- int getOverwrite(bool inclLeft = true, bool inclRight = true) const;
- int getDelete( bool inclLeft = true, bool inclRight = true) const;
- int getConflict() const;
+ int getCreate() const;
+ template <SelectedSide side> int getCreate() const;
+
+ int getOverwrite() const;
+ template <SelectedSide side> int getOverwrite() const;
+
+ int getDelete() const;
+ template <SelectedSide side> int getDelete() const;
+
+ int getConflict() const;
typedef std::vector<std::pair<Zstring, wxString> > ConflictTexts; // Pair(filename/conflict text)
const ConflictTexts& getFirstConflicts() const; //get first few sync conflicts
@@ -94,6 +100,92 @@ private:
StatusHandler& statusUpdater;
};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// inline implementation
+template <>
+inline
+int SyncStatistics::getCreate<LEFT_SIDE>() const
+{
+ return createLeft;
+}
+
+template <>
+inline
+int SyncStatistics::getCreate<RIGHT_SIDE>() const
+{
+ return createRight;
+}
+
+inline
+int SyncStatistics::getCreate() const
+{
+ return getCreate<LEFT_SIDE>() + getCreate<RIGHT_SIDE>();
+}
+
+template <>
+inline
+int SyncStatistics::getOverwrite<LEFT_SIDE>() const
+{
+ return overwriteLeft;
+}
+
+template <>
+inline
+int SyncStatistics::getOverwrite<RIGHT_SIDE>() const
+{
+ return overwriteRight;
+}
+
+inline
+int SyncStatistics::getOverwrite() const
+{
+ return getOverwrite<LEFT_SIDE>() + getOverwrite<RIGHT_SIDE>();
+}
+
+
+template <>
+inline
+int SyncStatistics::getDelete<LEFT_SIDE>() const
+{
+ return deleteLeft;
+}
+
+template <>
+inline
+int SyncStatistics::getDelete<RIGHT_SIDE>() const
+{
+ return deleteRight;
+}
+
+inline
+int SyncStatistics::getDelete() const
+{
+ return getDelete<LEFT_SIDE>() + getDelete<RIGHT_SIDE>();
+}
}
#endif // SYNCHRONIZATION_H_INCLUDED
diff --git a/ui/batch_config.cpp b/ui/batch_config.cpp
index 5aca5d67..9b32ee35 100644
--- a/ui/batch_config.cpp
+++ b/ui/batch_config.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "batch_config.h"
@@ -159,11 +159,11 @@ public:
//prepare drag & drop
dirNameLeft(batchDialog.m_panelLeft,
- batchDialog.m_dirPickerLeft,
- batchDialog.m_directoryLeft),
+ batchDialog.m_dirPickerLeft,
+ batchDialog.m_directoryLeft),
dirNameRight(batchDialog.m_panelRight,
- batchDialog.m_dirPickerRight,
- batchDialog.m_directoryRight) {}
+ batchDialog.m_dirPickerRight,
+ batchDialog.m_directoryRight) {}
void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter)
{
@@ -213,10 +213,10 @@ void BatchDialog::init()
new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere...
this,
m_panelOverview,
- m_panelLogging,
- m_staticText56,
- m_staticText44,
- m_bitmap27); //ownership passed to "this"
+ m_panelLogging,
+ m_staticText56,
+ m_staticText44,
+ m_bitmap27); //ownership passed to "this"
#endif
wxWindowUpdateLocker dummy(this); //avoid display distortion
diff --git a/ui/batch_config.h b/ui/batch_config.h
index 62645c78..cc4e014f 100644
--- a/ui/batch_config.h
+++ b/ui/batch_config.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef BATCHCONFIG_H_INCLUDED
diff --git a/ui/batch_status_handler.cpp b/ui/batch_status_handler.cpp
index 1bcc4b33..ba70de39 100644
--- a/ui/batch_status_handler.cpp
+++ b/ui/batch_status_handler.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "batch_status_handler.h"
diff --git a/ui/batch_status_handler.h b/ui/batch_status_handler.h
index ca32aa81..2d3b4cda 100644
--- a/ui/batch_status_handler.h
+++ b/ui/batch_status_handler.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef BATCHSTATUSHANDLER_H_INCLUDED
diff --git a/ui/check_version.cpp b/ui/check_version.cpp
index cd1d4c48..4fb74c49 100644
--- a/ui/check_version.cpp
+++ b/ui/check_version.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "check_version.h"
diff --git a/ui/check_version.h b/ui/check_version.h
index 023e5023..f7fb409d 100644
--- a/ui/check_version.h
+++ b/ui/check_version.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef UPDATEVERSION_H_INCLUDED
diff --git a/ui/folder_pair.h b/ui/folder_pair.h
index 5dc016ef..6c633fce 100644
--- a/ui/folder_pair.h
+++ b/ui/folder_pair.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef FOLDERPAIR_H_INCLUDED
diff --git a/ui/grid_view.cpp b/ui/grid_view.cpp
index 24e558fc..8ff8762d 100644
--- a/ui/grid_view.cpp
+++ b/ui/grid_view.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "grid_view.h"
@@ -120,6 +120,7 @@ GridView::StatusCmpResult GridView::updateCmpResult(bool hideFiltered, //maps so
if (!equalFilesActive) continue;
break;
case FILE_CONFLICT:
+ case FILE_DIFFERENT_METADATA: //no extra button on screen
output.existsConflict = true;
if (!conflictFilesActive) continue;
break;
@@ -177,7 +178,6 @@ GridView::StatusSyncPreview GridView::updateSyncPreview(bool hideFiltered, //map
if (hideFiltered && !fsObj->isActive())
continue;
-
switch (fsObj->getSyncOperation()) //evaluate comparison result and sync direction
{
case SO_CREATE_NEW_LEFT:
@@ -197,10 +197,12 @@ GridView::StatusSyncPreview GridView::updateSyncPreview(bool hideFiltered, //map
if (!syncDeleteRightActive) continue;
break;
case SO_OVERWRITE_RIGHT:
+ case SO_COPY_METADATA_TO_RIGHT: //no extra button on screen
output.existsSyncDirRight = true;
if (!syncDirOverwRightActive) continue;
break;
case SO_OVERWRITE_LEFT:
+ case SO_COPY_METADATA_TO_LEFT: //no extra button on screen
output.existsSyncDirLeft = true;
if (!syncDirOverwLeftActive) continue;
break;
diff --git a/ui/grid_view.h b/ui/grid_view.h
index 0307d758..acc63ea5 100644
--- a/ui/grid_view.h
+++ b/ui/grid_view.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef GRIDVIEW_H_INCLUDED
diff --git a/ui/gui_generated.cpp b/ui/gui_generated.cpp
index b830b0be..27e6ddd2 100644
--- a/ui/gui_generated.cpp
+++ b/ui/gui_generated.cpp
@@ -90,20 +90,20 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
this->SetMenuBar( m_menubar1 );
- bSizer1 = new wxBoxSizer( wxVERTICAL );
+ bSizerPanelHolder = new wxBoxSizer( wxVERTICAL );
- m_panel71 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
- bSizer6 = new wxBoxSizer( wxHORIZONTAL );
+ m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
+ bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL );
- bSizer6->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerTopButtons->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxFlexGridSizer* fgSizer121;
fgSizer121 = new wxFlexGridSizer( 2, 2, 0, 0 );
fgSizer121->SetFlexibleDirection( wxBOTH );
fgSizer121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticTextCmpVariant = new wxStaticText( m_panel71, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCmpVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextCmpVariant->Wrap( -1 );
m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
@@ -116,33 +116,33 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
wxBoxSizer* bSizer30;
bSizer30 = new wxBoxSizer( wxHORIZONTAL );
- m_buttonCompare = new wxButtonWithImage( m_panel71, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,42 ), 0 );
+ m_buttonCompare = new wxButtonWithImage( m_panelTopButtons, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,42 ), 0 );
m_buttonCompare->SetDefault();
m_buttonCompare->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) );
m_buttonCompare->SetToolTip( _("Compare both sides") );
bSizer30->Add( m_buttonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_buttonAbort = new wxButton( m_panel71, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 180,42 ), 0 );
+ m_buttonAbort = new wxButton( m_panelTopButtons, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 180,42 ), 0 );
m_buttonAbort->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) );
m_buttonAbort->Enable( false );
m_buttonAbort->Hide();
- bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL, 5 );
fgSizer121->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonCmpConfig = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
+ m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
fgSizer121->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
- bSizer6->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+ bSizerTopButtons->Add( fgSizer121, 0, wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer6->Add( 0, 0, 1, 0, 5 );
+ bSizerTopButtons->Add( 0, 0, 1, 0, 5 );
wxFlexGridSizer* fgSizer12;
fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 );
@@ -152,45 +152,46 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticTextSyncVariant = new wxStaticText( m_panel71, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSyncVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSyncVariant->Wrap( -1 );
m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
fgSizer12->Add( m_staticTextSyncVariant, 1, wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButtonSyncConfig = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
+ m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
- m_buttonStartSync = new wxButtonWithImage( m_panel71, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( -1,42 ), 0 );
+ m_buttonStartSync = new wxButtonWithImage( m_panelTopButtons, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( -1,42 ), 0 );
m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) );
m_buttonStartSync->SetToolTip( _("Start synchronization") );
fgSizer12->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer6->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+ bSizerTopButtons->Add( fgSizer12, 0, wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer6->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerTopButtons->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_panel71->SetSizer( bSizer6 );
- m_panel71->Layout();
- bSizer6->Fit( m_panel71 );
- bSizer1->Add( m_panel71, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ m_panelTopButtons->SetSizer( bSizerTopButtons );
+ m_panelTopButtons->Layout();
+ bSizerTopButtons->Fit( m_panelTopButtons );
+ bSizerPanelHolder->Add( m_panelTopButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1601;
+ bSizer1601 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer91;
bSizer91 = new wxBoxSizer( wxHORIZONTAL );
- m_panelTopLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panelTopLeft->SetMinSize( wxSize( 1,1 ) );
- wxBoxSizer* bSizer92;
- bSizer92 = new wxBoxSizer( wxVERTICAL );
-
sbSizerDirLeft = new wxStaticBoxSizer( new wxStaticBox( m_panelTopLeft, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL );
m_directoryLeft = new CustomComboBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
@@ -201,30 +202,24 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
sbSizerDirLeft->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer92->Add( sbSizerDirLeft, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- m_panelTopLeft->SetSizer( bSizer92 );
+ m_panelTopLeft->SetSizer( sbSizerDirLeft );
m_panelTopLeft->Layout();
- bSizer92->Fit( m_panelTopLeft );
- bSizer91->Add( m_panelTopLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ sbSizerDirLeft->Fit( m_panelTopLeft );
+ bSizer91->Add( m_panelTopLeft, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
- m_panelTopMiddle = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopMiddle = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer93;
bSizer93 = new wxBoxSizer( wxVERTICAL );
bSizer93->Add( 0, 3, 0, 0, 5 );
- bSizerMiddle = new wxBoxSizer( wxHORIZONTAL );
-
m_bpButtonSwapSides = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
m_bpButtonSwapSides->SetToolTip( _("Swap sides") );
m_bpButtonSwapSides->SetToolTip( _("Swap sides") );
- bSizerMiddle->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer93->Add( bSizerMiddle, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+ bSizer93->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
wxBoxSizer* bSizer160;
bSizer160 = new wxBoxSizer( wxHORIZONTAL );
@@ -251,15 +246,9 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
bSizer93->Fit( m_panelTopMiddle );
bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- m_panelTopRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panelTopRight->SetMinSize( wxSize( 1,1 ) );
- wxBoxSizer* bSizer94;
- bSizer94 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer77;
- bSizer77 = new wxBoxSizer( wxHORIZONTAL );
-
sbSizerDirRight = new wxStaticBoxSizer( new wxStaticBox( m_panelTopRight, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL );
m_bpButtonAddPair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
@@ -284,18 +273,14 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
sbSizerDirRight->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer77->Add( sbSizerDirRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
-
- bSizer94->Add( bSizer77, 0, wxEXPAND|wxLEFT, 3 );
-
- m_panelTopRight->SetSizer( bSizer94 );
+ m_panelTopRight->SetSizer( sbSizerDirRight );
m_panelTopRight->Layout();
- bSizer94->Fit( m_panelTopRight );
+ sbSizerDirRight->Fit( m_panelTopRight );
bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- bSizer1->Add( bSizer91, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 );
- m_scrolledWindowFolderPairs = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
+ m_scrolledWindowFolderPairs = new wxScrolledWindow( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
m_scrolledWindowFolderPairs->SetScrollRate( 5, 5 );
m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) );
@@ -304,11 +289,19 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs );
m_scrolledWindowFolderPairs->Layout();
bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs );
- bSizer1->Add( m_scrolledWindowFolderPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelDirectoryPairs->SetSizer( bSizer1601 );
+ m_panelDirectoryPairs->Layout();
+ bSizer1601->Fit( m_panelDirectoryPairs );
+ bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_panelGrids = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelGrids->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) );
bSizerGridHolder = new wxBoxSizer( wxHORIZONTAL );
- m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelLeft = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer7;
bSizer7 = new wxBoxSizer( wxVERTICAL );
@@ -338,14 +331,14 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_gridLeft->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
m_gridLeft->SetMinSize( wxSize( 1,1 ) );
- bSizer7->Add( m_gridLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
+ bSizer7->Add( m_gridLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
m_panelLeft->SetSizer( bSizer7 );
m_panelLeft->Layout();
bSizer7->Fit( m_panelLeft );
bSizerGridHolder->Add( m_panelLeft, 1, wxEXPAND, 5 );
- m_panelMiddle = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelMiddle = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer18;
bSizer18 = new wxBoxSizer( wxVERTICAL );
@@ -375,14 +368,14 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
// Cell Defaults
m_gridMiddle->SetDefaultCellFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Arial") ) );
m_gridMiddle->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
- bSizer18->Add( m_gridMiddle, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 );
+ bSizer18->Add( m_gridMiddle, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_panelMiddle->SetSizer( bSizer18 );
m_panelMiddle->Layout();
bSizer18->Fit( m_panelMiddle );
- bSizerGridHolder->Add( m_panelMiddle, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ bSizerGridHolder->Add( m_panelMiddle, 0, wxEXPAND, 5 );
- m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelRight = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxVERTICAL );
@@ -412,55 +405,61 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_gridRight->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
m_gridRight->SetMinSize( wxSize( 1,1 ) );
- bSizer10->Add( m_gridRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
+ bSizer10->Add( m_gridRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT, 5 );
m_panelRight->SetSizer( bSizer10 );
m_panelRight->Layout();
bSizer10->Fit( m_panelRight );
bSizerGridHolder->Add( m_panelRight, 1, wxEXPAND, 5 );
- bSizer1->Add( bSizerGridHolder, 1, wxEXPAND, 5 );
+ m_panelGrids->SetSizer( bSizerGridHolder );
+ m_panelGrids->Layout();
+ bSizerGridHolder->Fit( m_panelGrids );
+ bSizerPanelHolder->Add( m_panelGrids, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
- m_panelBottom = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+ m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerConfig = new wxBoxSizer( wxHORIZONTAL );
- wxBoxSizer* bSizer120;
- bSizer120 = new wxBoxSizer( wxVERTICAL );
- m_notebookBottomLeft = new wxNotebook( m_panelBottom, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
- m_panel30 = new wxPanel( m_notebookBottomLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer139;
- bSizer139 = new wxBoxSizer( wxHORIZONTAL );
+ bSizerConfig->Add( 10, 0, 0, 0, 5 );
- m_bpButtonSave = new wxBitmapButton( m_panel30, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ wxBoxSizer* bSizer151;
+ bSizer151 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
m_bpButtonSave->SetToolTip( _("Save current configuration to file") );
m_bpButtonSave->SetToolTip( _("Save current configuration to file") );
- bSizer139->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonLoad = new wxBitmapButton( m_panel30, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButtonLoad = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
m_bpButtonLoad->SetToolTip( _("Load configuration from file") );
m_bpButtonLoad->SetToolTip( _("Load configuration from file") );
- bSizer139->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ bSizer151->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerConfig->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- wxArrayString m_choiceHistoryChoices;
- m_choiceHistory = new wxChoice( m_panel30, wxID_ANY, wxDefaultPosition, wxSize( 170,-1 ), m_choiceHistoryChoices, 0 );
- m_choiceHistory->SetSelection( 0 );
- m_choiceHistory->SetToolTip( _("Load configuration history (press DEL to delete items)") );
+ m_listBoxHistory = new wxListBox( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE|wxLB_SORT );
+ m_listBoxHistory->SetToolTip( _("Load configuration history (press DEL to delete items)") );
+ m_listBoxHistory->SetMinSize( wxSize( -1,40 ) );
- bSizer139->Add( m_choiceHistory, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerConfig->Add( m_listBoxHistory, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
- m_panel30->SetSizer( bSizer139 );
- m_panel30->Layout();
- bSizer139->Fit( m_panel30 );
- m_notebookBottomLeft->AddPage( m_panel30, _("Configuration"), true );
- m_panelFilter = new wxPanel( m_notebookBottomLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelConfig->SetSizer( bSizerConfig );
+ m_panelConfig->Layout();
+ bSizerConfig->Fit( m_panelConfig );
+ bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 );
+
+ m_panelFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer140;
bSizer140 = new wxBoxSizer( wxHORIZONTAL );
+
+ bSizer140->Add( 10, 0, 0, 0, 5 );
+
m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
bSizer140->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
@@ -477,171 +476,139 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_panelFilter->SetSizer( bSizer140 );
m_panelFilter->Layout();
bSizer140->Fit( m_panelFilter );
- m_notebookBottomLeft->AddPage( m_panelFilter, _("Filter files"), false );
-
- bSizer120->Add( m_notebookBottomLeft, 0, wxALL, 5 );
-
- bSizer3->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
-
- m_panelViewFilter = new wxPanel( m_panelBottom, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer64;
- bSizer64 = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sbSizer31;
- sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( m_panelViewFilter, wxID_ANY, _("Filter view") ), wxHORIZONTAL );
-
- sbSizer31->SetMinSize( wxSize( 100,-1 ) );
-
- sbSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonSyncCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonSyncCreateLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonSyncDirOverwLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonSyncDirOverwLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonSyncDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonSyncDeleteLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonSyncDirNone = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonSyncDirNone, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonSyncDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonSyncDeleteRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonSyncDirOverwRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonSyncDirOverwRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonSyncCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonSyncCreateRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerPanelHolder->Add( m_panelFilter, 0, 0, 5 );
- m_bpButtonConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- sbSizer31->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
-
- sbSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
-
- bSizer64->Add( sbSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_panelViewFilter->SetSizer( bSizer64 );
- m_panelViewFilter->Layout();
- bSizer64->Fit( m_panelViewFilter );
- bSizer3->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- bSizerBottomRight = new wxBoxSizer( wxHORIZONTAL );
+ m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerStatistics = new wxBoxSizer( wxHORIZONTAL );
- bSizerBottomRight->Add( 5, 0, 1, 0, 5 );
-
- m_panelSyncPreview = new wxPanel( m_panelBottom, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer121;
- bSizer121 = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sbSizer161;
- sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( m_panelSyncPreview, wxID_ANY, _("Statistics") ), wxHORIZONTAL );
+ bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 );
wxFlexGridSizer* fgSizer5;
fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 );
fgSizer5->SetFlexibleDirection( wxHORIZONTAL );
fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_bitmapCreate = new wxStaticBitmap( m_panelSyncPreview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapCreate = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") );
fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_textCtrlCreate = new wxTextCtrl( m_panelSyncPreview, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY );
+ m_textCtrlCreate = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY );
m_textCtrlCreate->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) );
m_textCtrlCreate->SetBackgroundColour( wxColour( 208, 208, 208 ) );
m_textCtrlCreate->SetToolTip( _("Number of files and directories that will be created") );
fgSizer5->Add( m_textCtrlCreate, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_bitmapDelete = new wxStaticBitmap( m_panelSyncPreview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapDelete = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") );
fgSizer5->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- m_textCtrlDelete = new wxTextCtrl( m_panelSyncPreview, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY );
+ m_textCtrlDelete = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY );
m_textCtrlDelete->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) );
m_textCtrlDelete->SetBackgroundColour( wxColour( 208, 208, 208 ) );
m_textCtrlDelete->SetToolTip( _("Number of files and directories that will be deleted") );
fgSizer5->Add( m_textCtrlDelete, 0, wxALIGN_CENTER_VERTICAL, 5 );
- sbSizer161->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ bSizerStatistics->Add( fgSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
wxFlexGridSizer* fgSizer6;
fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 5 );
fgSizer6->SetFlexibleDirection( wxHORIZONTAL );
fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_bitmapUpdate = new wxStaticBitmap( m_panelSyncPreview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapUpdate = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") );
fgSizer6->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_textCtrlUpdate = new wxTextCtrl( m_panelSyncPreview, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY );
+ m_textCtrlUpdate = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY );
m_textCtrlUpdate->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) );
m_textCtrlUpdate->SetBackgroundColour( wxColour( 208, 208, 208 ) );
m_textCtrlUpdate->SetToolTip( _("Number of files that will be overwritten") );
fgSizer6->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_bitmapData = new wxStaticBitmap( m_panelSyncPreview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") );
fgSizer6->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_textCtrlData = new wxTextCtrl( m_panelSyncPreview, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY );
+ m_textCtrlData = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY );
m_textCtrlData->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) );
m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) );
m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") );
fgSizer6->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 );
- sbSizer161->Add( fgSizer6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ bSizerStatistics->Add( fgSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
+
+
+ bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_panelStatistics->SetSizer( bSizerStatistics );
+ m_panelStatistics->Layout();
+ bSizerStatistics->Fit( m_panelStatistics );
+ bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonSyncCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDirOverwLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDirOverwLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer121->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bpButtonDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDirNone = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDirNone, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_panelSyncPreview->SetSizer( bSizer121 );
- m_panelSyncPreview->Layout();
- bSizer121->Fit( m_panelSyncPreview );
- bSizerBottomRight->Add( m_panelSyncPreview, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bpButtonSyncDirOverwRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDirOverwRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButton10 = new wxBitmapButton( m_panelBottom, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW );
- m_bpButton10->Hide();
- m_bpButton10->SetToolTip( _("Quit") );
+ m_bpButtonSyncCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- m_bpButton10->Hide();
- m_bpButton10->SetToolTip( _("Quit") );
+ m_bpButtonConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizerBottomRight->Add( m_bpButton10, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
- bSizer3->Add( bSizerBottomRight, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+ bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
- m_panelBottom->SetSizer( bSizer3 );
- m_panelBottom->Layout();
- bSizer3->Fit( m_panelBottom );
- bSizer1->Add( m_panelBottom, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+ m_panelViewFilter->SetSizer( bSizerViewFilter );
+ m_panelViewFilter->Layout();
+ bSizerViewFilter->Fit( m_panelViewFilter );
+ bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_panelStatusBar = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL );
wxBoxSizer* bSizer451;
@@ -711,10 +678,11 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_panelStatusBar->SetSizer( bSizer451 );
m_panelStatusBar->Layout();
bSizer451->Fit( m_panelStatusBar );
- bSizer1->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+ bSizerPanelHolder->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
- this->SetSizer( bSizer1 );
+ this->SetSizer( bSizerPanelHolder );
this->Layout();
+ bSizerPanelHolder->Fit( this );
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
@@ -753,8 +721,8 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_gridRight->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this );
m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this );
m_bpButtonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this );
- m_choiceHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
- m_choiceHistory->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
+ m_listBoxHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
+ m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
m_bpButtonSyncCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this );
@@ -771,7 +739,6 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_bpButtonSyncDirOverwRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this );
m_bpButtonSyncCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this );
m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this );
- m_bpButton10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnQuit ), NULL, this );
}
MainDialogGenerated::~MainDialogGenerated()
@@ -813,8 +780,8 @@ MainDialogGenerated::~MainDialogGenerated()
m_gridRight->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this );
m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this );
m_bpButtonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this );
- m_choiceHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
- m_choiceHistory->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
+ m_listBoxHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
+ m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
m_bpButtonSyncCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this );
@@ -831,7 +798,6 @@ MainDialogGenerated::~MainDialogGenerated()
m_bpButtonSyncDirOverwRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this );
m_bpButtonSyncCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this );
m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this );
- m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnQuit ), NULL, this );
}
@@ -858,41 +824,28 @@ FolderPairGenerated::FolderPairGenerated( wxWindow* parent, wxWindowID id, const
bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel20->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) );
-
wxBoxSizer* bSizer95;
bSizer95 = new wxBoxSizer( wxHORIZONTAL );
- m_panel21 = new wxPanel( m_panel20, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panel21->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* bSizer96;
- bSizer96 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
- bSizer96->Add( 0, 0, 1, wxEXPAND, 5 );
+ m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonLocalFilter = new wxBitmapButton( m_panel21, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer96->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer95->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer96->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ m_bpButtonAltSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer95->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonAltSyncCfg = new wxBitmapButton( m_panel21, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer96->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer96->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_panel21->SetSizer( bSizer96 );
- m_panel21->Layout();
- bSizer96->Fit( m_panel21 );
- bSizer95->Add( m_panel21, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
m_panel20->SetSizer( bSizer95 );
m_panel20->Layout();
bSizer95->Fit( m_panel20 );
- bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer135;
@@ -1444,6 +1397,9 @@ CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id,
wxBoxSizer* bSizer40;
bSizer40 = new wxBoxSizer( wxVERTICAL );
+
+ bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
+
bSizer42 = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer157;
@@ -1564,7 +1520,7 @@ CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id,
bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
+ bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer48;
bSizer48 = new wxBoxSizer( wxHORIZONTAL );
@@ -1583,7 +1539,10 @@ CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id,
bSizer40->Add( bSizer48, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH );
- bSizer40->Add( m_gauge2, 0, wxALL|wxEXPAND, 5 );
+ bSizer40->Add( m_gauge2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
this->SetSizer( bSizer40 );
this->Layout();
diff --git a/ui/gui_generated.h b/ui/gui_generated.h
index cbcce489..07531fb0 100644
--- a/ui/gui_generated.h
+++ b/ui/gui_generated.h
@@ -36,13 +36,14 @@ class wxButtonWithImage;
#include <wx/statbox.h>
#include <wx/scrolwin.h>
#include <wx/grid.h>
-#include <wx/choice.h>
+#include <wx/listbox.h>
#include <wx/checkbox.h>
-#include <wx/notebook.h>
#include <wx/statbmp.h>
#include <wx/textctrl.h>
#include <wx/statline.h>
#include <wx/frame.h>
+#include <wx/choice.h>
+#include <wx/notebook.h>
#include <wx/dialog.h>
#include <wx/gauge.h>
#include <wx/radiobut.h>
@@ -77,9 +78,9 @@ class MainDialogGenerated : public wxFrame
wxMenu* m_menuHelp;
wxMenuItem* m_menuItemCheckVer;
wxMenuItem* m_menuItemAbout;
- wxBoxSizer* bSizer1;
- wxPanel* m_panel71;
- wxBoxSizer* bSizer6;
+ wxBoxSizer* bSizerPanelHolder;
+ wxPanel* m_panelTopButtons;
+ wxBoxSizer* bSizerTopButtons;
wxStaticText* m_staticTextCmpVariant;
@@ -92,10 +93,10 @@ class MainDialogGenerated : public wxFrame
wxBitmapButton* m_bpButtonSyncConfig;
wxButtonWithImage* m_buttonStartSync;
+ wxPanel* m_panelDirectoryPairs;
wxStaticBoxSizer* sbSizerDirLeft;
wxPanel* m_panelTopMiddle;
- wxBoxSizer* bSizerMiddle;
wxBitmapButton* m_bpButtonSwapSides;
@@ -104,22 +105,36 @@ class MainDialogGenerated : public wxFrame
wxBitmapButton* m_bpButtonAddPair;
wxScrolledWindow* m_scrolledWindowFolderPairs;
wxBoxSizer* bSizerAddFolderPairs;
+ wxPanel* m_panelGrids;
wxBoxSizer* bSizerGridHolder;
CustomGridLeft* m_gridLeft;
wxPanel* m_panelMiddle;
CustomGridMiddle* m_gridMiddle;
CustomGridRight* m_gridRight;
- wxPanel* m_panelBottom;
- wxBoxSizer* bSizer3;
- wxNotebook* m_notebookBottomLeft;
- wxPanel* m_panel30;
+ wxPanel* m_panelConfig;
+ wxBoxSizer* bSizerConfig;
+
wxBitmapButton* m_bpButtonSave;
wxBitmapButton* m_bpButtonLoad;
- wxChoice* m_choiceHistory;
+ wxListBox* m_listBoxHistory;
wxPanel* m_panelFilter;
+
wxBitmapButton* m_bpButtonFilter;
wxCheckBox* m_checkBoxHideFilt;
+ wxPanel* m_panelStatistics;
+ wxBoxSizer* bSizerStatistics;
+
+ wxStaticBitmap* m_bitmapCreate;
+ wxTextCtrl* m_textCtrlCreate;
+ wxStaticBitmap* m_bitmapDelete;
+ wxTextCtrl* m_textCtrlDelete;
+ wxStaticBitmap* m_bitmapUpdate;
+ wxTextCtrl* m_textCtrlUpdate;
+ wxStaticBitmap* m_bitmapData;
+ wxTextCtrl* m_textCtrlData;
+
wxPanel* m_panelViewFilter;
+ wxBoxSizer* bSizerViewFilter;
ToggleButton* m_bpButtonSyncCreateLeft;
ToggleButton* m_bpButtonSyncDirOverwLeft;
@@ -136,18 +151,6 @@ class MainDialogGenerated : public wxFrame
ToggleButton* m_bpButtonSyncCreateRight;
ToggleButton* m_bpButtonConflict;
- wxBoxSizer* bSizerBottomRight;
-
- wxPanel* m_panelSyncPreview;
- wxStaticBitmap* m_bitmapCreate;
- wxTextCtrl* m_textCtrlCreate;
- wxStaticBitmap* m_bitmapDelete;
- wxTextCtrl* m_textCtrlDelete;
- wxStaticBitmap* m_bitmapUpdate;
- wxTextCtrl* m_textCtrlUpdate;
- wxStaticBitmap* m_bitmapData;
- wxTextCtrl* m_textCtrlData;
- wxBitmapButton* m_bpButton10;
wxPanel* m_panelStatusBar;
wxStaticText* m_staticTextStatusLeft;
@@ -211,7 +214,6 @@ class MainDialogGenerated : public wxFrame
virtual void OnSyncDirRight( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSyncCreateRight( wxCommandEvent& event ) { event.Skip(); }
virtual void OnConflictFiles( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); }
public:
@@ -227,7 +229,7 @@ class MainDialogGenerated : public wxFrame
wxPanel* m_panelLeft;
wxPanel* m_panelRight;
- MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 933,612 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+ MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
~MainDialogGenerated();
@@ -241,7 +243,6 @@ class FolderPairGenerated : public wxPanel
private:
protected:
- wxPanel* m_panel20;
@@ -250,7 +251,7 @@ class FolderPairGenerated : public wxPanel
wxPanel* m_panelLeft;
wxTextCtrl* m_directoryLeft;
wxDirPickerCtrl* m_dirPickerLeft;
- wxPanel* m_panel21;
+ wxPanel* m_panel20;
wxBitmapButton* m_bpButtonLocalFilter;
wxBitmapButton* m_bpButtonAltSyncCfg;
wxPanel* m_panelRight;
@@ -382,6 +383,7 @@ class CompareStatusGenerated : public wxPanel
private:
protected:
+
wxBoxSizer* bSizer42;
wxBoxSizer* bSizerFilesFound;
wxStaticText* m_staticText321;
@@ -406,10 +408,11 @@ class CompareStatusGenerated : public wxPanel
wxStaticText* m_staticText30;
wxTextCtrl* m_textCtrlStatus;
wxGauge* m_gauge2;
+
public:
- CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+ CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxRAISED_BORDER|wxTAB_TRAVERSAL );
~CompareStatusGenerated();
};
diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp
index 218f5cdc..2be1e0db 100644
--- a/ui/gui_status_handler.cpp
+++ b/ui/gui_status_handler.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "gui_status_handler.h"
@@ -26,17 +26,14 @@ CompareStatusHandler::CompareStatusHandler(MainDialog* dlg) :
//prevent user input during "compare", do not disable maindialog since abort-button would also be disabled
mainDialog->disableAllElements();
+ mainDialog->compareStatus->init(); //clear old values
//display status panel during compare
- mainDialog->compareStatus->init(); //clear old values and make visible
-
- mainDialog->bSizer1->Layout(); //both sizers need to recalculate!
- mainDialog->bSizer6->Layout(); //adapt layout for wxBitmapWithImage
- mainDialog->Refresh();
+ mainDialog->auiMgr.GetPane(mainDialog->compareStatus->getAsWindow()).Show();
+ mainDialog->auiMgr.Update();
//register abort button
- mainDialog->m_buttonAbort->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompareStatusHandler::OnAbortCompare ), NULL, this);
-
+ mainDialog->m_buttonAbort->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompareStatusHandler::OnAbortCompare), NULL, this);
//register key event
mainDialog->Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(CompareStatusHandler::OnKeyPressed), NULL, this);
}
@@ -48,21 +45,17 @@ CompareStatusHandler::~CompareStatusHandler()
//reenable complete main dialog
mainDialog->enableAllElements();
+ mainDialog->compareStatus->finalize();
+
+ mainDialog->auiMgr.GetPane(mainDialog->compareStatus->getAsWindow()).Hide();
+ mainDialog->auiMgr.Update();
if (abortIsRequested())
mainDialog->pushStatusInformation(_("Operation aborted!"));
- //hide status panel from main window
- mainDialog->compareStatus->finalize();
-
- mainDialog->bSizer6->Layout(); //adapt layout for wxBitmapWithImage
- mainDialog->Layout();
- mainDialog->Refresh();
-
- //register key event
+ //de-register keys
mainDialog->Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(CompareStatusHandler::OnKeyPressed), NULL, this);
- //de-register abort button
- mainDialog->m_buttonAbort->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompareStatusHandler::OnAbortCompare ), NULL, this);
+ mainDialog->m_buttonAbort->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompareStatusHandler::OnAbortCompare), NULL, this);
}
@@ -269,8 +262,8 @@ SyncStatusHandler::~SyncStatusHandler()
inline
void SyncStatusHandler::reportInfo(const Zstring& text)
{
- //if (currentProcess == StatusHandler::PROCESS_SYNCHRONIZING)
- //errorLog.logInfo(zToWx(text)); -> don't spam with file copy info: visually identifying warning messages has priority!
+ //if (currentProcess == StatusHandler::PROCESS_SYNCHRONIZING)
+ //errorLog.logInfo(zToWx(text)); -> don't spam with file copy info: visually identifying warning messages has priority!
syncStatusFrame.setStatusText_NoUpdate(text);
}
diff --git a/ui/gui_status_handler.h b/ui/gui_status_handler.h
index c44e257b..f504270b 100644
--- a/ui/gui_status_handler.h
+++ b/ui/gui_status_handler.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef GUISTATUSHANDLER_H_INCLUDED
diff --git a/ui/is_null_filter.h b/ui/is_null_filter.h
index aeb72533..7c8826d6 100644
--- a/ui/is_null_filter.h
+++ b/ui/is_null_filter.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef ISNULLFILTER_H_INCLUDED
diff --git a/ui/main_dlg.cpp b/ui/main_dlg.cpp
index 5fa6aee7..c8106cf9 100644
--- a/ui/main_dlg.cpp
+++ b/ui/main_dlg.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "main_dlg.h"
@@ -54,11 +54,21 @@
#include <wx/app.h>
#include <boost/bind.hpp>
-
using namespace ffs3;
using ffs3::CustomLocale;
+namespace
+{
+struct wxClientDataString : public wxClientData //we need a wxClientData derived class to tell wxWidgets to take object ownership!
+{
+ wxClientDataString(const wxString& name) : name_(name) {}
+
+ wxString name_;
+};
+}
+
+
class DirectoryNameMainImpl : public DirectoryNameMainDlg
{
public:
@@ -318,8 +328,13 @@ struct DirNotFound
{
bool operator()(const FolderPairEnh& fp) const
{
- return !dirExists(ffs3::getFormattedDirectoryName(fp.leftDirectory)) ||
- !dirExists(ffs3::getFormattedDirectoryName(fp.rightDirectory));
+ const Zstring dirFmtLeft = ffs3::getFormattedDirectoryName(fp.leftDirectory);
+ const Zstring dirFmtRight = ffs3::getFormattedDirectoryName(fp.rightDirectory);
+
+ if (dirFmtLeft.empty() && dirFmtRight.empty())
+ return false;
+
+ return !dirExists(dirFmtLeft) || !dirExists(dirFmtRight);
}
};
@@ -334,10 +349,9 @@ MainDialog::MainDialog(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings
bool loadCfgSuccess = false;
if (!cfgFileName.empty() || fileExists(wxToZ(lastConfigFileName())))
- {
- //load XML
try
{
+ //load XML
std::vector<wxString> filenames;
filenames.push_back(currentConfigFile);
@@ -352,16 +366,49 @@ MainDialog::MainDialog(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings
else
wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR);
}
- }
+ const bool startComparisonImmediately = loadCfgSuccess && !cfgFileName.empty();
init(guiCfg,
settings,
- !cfgFileName.empty() && loadCfgSuccess);
+ startComparisonImmediately);
setLastUsedConfig(currentConfigFile, loadCfgSuccess ? guiCfg : xmlAccess::XmlGuiConfig()); //simulate changed config on parsing errors
}
+#ifdef FFS_WIN
+class PanelMoveWindow : public MouseMoveWindow
+{
+public:
+ PanelMoveWindow(MainDialog& mainDlg) :
+ MouseMoveWindow(mainDlg,
+ mainDlg.m_panelTopButtons,
+ //mainDlg.m_panelDirectoryPairs,
+ mainDlg.m_panelConfig,
+ mainDlg.m_panelFilter,
+ mainDlg.m_panelViewFilter,
+ mainDlg.m_panelStatistics,
+ mainDlg.m_panelStatusBar),
+ mainDlg_(mainDlg) {}
+
+ virtual bool allowMove(const wxMouseEvent& event)
+ {
+ wxPanel* panel = dynamic_cast<wxPanel*>(event.GetEventObject());
+
+ const wxAuiPaneInfo& paneInfo = mainDlg_.auiMgr.GetPane(panel);
+ if ( paneInfo.IsOk() &&
+ paneInfo.IsFloating())
+ return false; //prevent main dialog move
+
+ return true;; //allow dialog move
+ }
+
+private:
+ MainDialog& mainDlg_;
+};
+#endif
+
+
MainDialog::MainDialog(const xmlAccess::XmlGuiConfig& guiCfg,
xmlAccess::XmlGlobalSettings& settings,
bool startComparison) :
@@ -378,6 +425,8 @@ MainDialog::~MainDialog()
//keep non-inline destructor for std::auto_ptr to work with forward declaration
cleanUp(true); //do NOT include any other code here! cleanUp() is re-used when switching languages
+
+ auiMgr.UnInit();
}
@@ -390,23 +439,67 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg,
//--------- avoid mirroring this dialog in RTL languages like Hebrew or Arabic --------------------
m_panelViewFilter->SetLayoutDirection(wxLayout_LeftToRight);
m_panelStatusBar->SetLayoutDirection(wxLayout_LeftToRight);
-// if (GetLayoutDirection() == wxLayout_RightToLeft)
-//{
-// bSizerGridHolder->Detach(m_panelRight);
-// bSizerGridHolder->Detach(m_panelLeft);
-// bSizerGridHolder->Add(m_panelLeft);
-// bSizerGridHolder->Prepend(m_panelRight);
-//bSizerGridHolder->Fit(this);
-//
-// bSizerGridHolder->Layout();
-//}
-//------------------------------------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------
+
+//---------------- support for dockable gui style --------------------------------
+ bSizerPanelHolder->Detach(m_panelTopButtons);
+ bSizerPanelHolder->Detach(m_panelDirectoryPairs);
+ bSizerPanelHolder->Detach(m_panelGrids);
+ bSizerPanelHolder->Detach(m_panelConfig);
+ bSizerPanelHolder->Detach(m_panelFilter);
+ bSizerPanelHolder->Detach(m_panelViewFilter);
+ bSizerPanelHolder->Detach(m_panelStatistics);
+ bSizerPanelHolder->Detach(m_panelStatusBar);
+
+ auiMgr.SetManagedWindow(this);
+ auiMgr.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE);
+
+ //caption required for all panes that can be manipulated by the users => used by context menu
+ auiMgr.AddPane(m_panelTopButtons,
+ wxAuiPaneInfo().Name(wxT("Panel1")).Top().Caption(_("Main bar")).CaptionVisible(false).PaneBorder(false).Gripper().MinSize(-1, m_buttonCompare->GetSize().GetHeight() - 5));
+ //note: min height is calculated incorrectly by wxAuiManager if panes with and without caption are in the same row => use smaller min-size
+
+ compareStatus.reset(new CompareStatus(*this)); //integrate the compare status panel (in hidden state)
+ auiMgr.AddPane(compareStatus->getAsWindow(),
+ wxAuiPaneInfo().Name(wxT("Panel9")).Top().Row(1).CaptionVisible(false).PaneBorder(false).Hide()); //name "CmpStatus" used by context menu
+
+ auiMgr.AddPane(m_panelDirectoryPairs,
+ wxAuiPaneInfo().Name(wxT("Panel2")).Top().Row(2).Caption(_("Folder pairs")).CaptionVisible(false).PaneBorder(false).Gripper());
+
+ auiMgr.AddPane(m_panelGrids,
+ wxAuiPaneInfo().Name(wxT("Panel3")).CenterPane().PaneBorder(false));
+
+ auiMgr.AddPane(m_panelConfig,
+ wxAuiPaneInfo().Name(wxT("Panel4")).Bottom().Row(1).Position(0).Caption(_("Configuration")).MinSize(m_listBoxHistory->GetSize().GetWidth(), m_panelConfig->GetSize().GetHeight()));
+
+ auiMgr.AddPane(m_panelFilter,
+ wxAuiPaneInfo().Name(wxT("Panel5")).Bottom().Row(1).Position(1).Caption(_("Filter files")).MinSize(-1, m_panelFilter->GetSize().GetHeight()));
+
+ auiMgr.AddPane(m_panelViewFilter,
+ wxAuiPaneInfo().Name(wxT("Panel6")).Bottom().Row(1).Position(2).Caption(_("Filter view")).MinSize(m_bpButtonSyncDirNone->GetSize().GetWidth(), m_panelViewFilter->GetSize().GetHeight()));
+
+ auiMgr.AddPane(m_panelStatistics,
+ wxAuiPaneInfo().Name(wxT("Panel7")).Bottom().Row(1).Position(3).Caption(_("Statistics")).MinSize(m_panelStatistics->GetSize().GetWidth() / 2, m_panelStatistics->GetSize().GetHeight()));
+
+ auiMgr.AddPane(m_panelStatusBar,
+ wxAuiPaneInfo().Name(wxT("Panel8")).Bottom().Row(0).CaptionVisible(false).PaneBorder(false).DockFixed());
+
+ auiMgr.Update();
+ defaultPerspective = auiMgr.SavePerspective();
+//----------------------------------------------------------------------------------
+//register view layout context menu
+ m_panelTopButtons->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSetLayout), NULL, this);
+ m_panelConfig ->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSetLayout), NULL, this);
+ m_panelFilter ->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSetLayout), NULL, this);
+ m_panelViewFilter->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSetLayout), NULL, this);
+ m_panelStatistics->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSetLayout), NULL, this);
+ m_panelStatusBar ->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSetLayout), NULL, this);
+//----------------------------------------------------------------------------------
globalSettings = &settings;
gridDataView.reset(new ffs3::GridView);
contextMenu.reset(new wxMenu); //initialize right-click context menu; will be dynamically re-created on each R-mouse-click
- compareStatus.reset(new CompareStatus(*this));
cleanedUp = false;
lastSortColumn = -1;
lastSortGrid = NULL;
@@ -414,10 +507,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg,
updateFileIcons.reset(new IconUpdater(m_gridLeft, m_gridRight));
#ifdef FFS_WIN
- new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere...
- m_panel71,
- m_panelBottom,
- m_panelStatusBar); //ownership passed to "this"
+ new PanelMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere... //ownership passed to "this"
#endif
syncPreview.reset(new SyncPreview(this));
@@ -426,7 +516,6 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg,
SetIcon(*GlobalResources::getInstance().programIcon); //set application icon
-
//notify about (logical) application main window => program won't quit, but stay on this dialog
ffs3::AppMainWindow::setMainWindow(this);
@@ -440,7 +529,6 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg,
setCurrentConfiguration(guiCfg);
//set icons for this dialog
- m_bpButton10->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("exit")));
m_buttonCompare->setBitmapFront(GlobalResources::getInstance().getImageByName(wxT("compare")));
m_bpButtonSyncConfig->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("syncConfig")));
m_bpButtonCmpConfig->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("cmpConfig")));
@@ -454,7 +542,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg,
m_bitmapDelete->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("delete")));
m_bitmapData->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("data")));
- bSizer6->Layout(); //wxButtonWithImage size might have changed
+ m_panelTopButtons->Layout(); //wxButtonWithImage size might have changed
//menu icons: workaround for wxWidgets: small hack to update menu items: actually this is a wxWidgets bug (affects Windows- and Linux-build)
MenuItemUpdater updateMenuFile(m_menuFile);
@@ -491,21 +579,31 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg,
}
//support for CTRL + C and DEL on grids
- m_gridLeft->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridLeftButtonEvent), NULL, this);
- m_gridRight->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridRightButtonEvent), NULL, this);
+ m_gridLeft ->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridLeftButtonEvent), NULL, this);
+ m_gridRight ->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridRightButtonEvent), NULL, this);
m_gridMiddle->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridMiddleButtonEvent), NULL, this);
//register global hotkeys (without explicit menu entry)
wxTheApp->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::OnGlobalKeyEvent), NULL, this);
Connect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleEvent), NULL, this);
+
Connect(wxEVT_SIZE, wxSizeEventHandler(MainDialog::OnResize), NULL, this);
Connect(wxEVT_MOVE, wxSizeEventHandler(MainDialog::OnResize), NULL, this);
m_bpButtonFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(MainDialog::OnGlobalFilterOpenContext), NULL, this);
//calculate witdh of folder pair manually (if scrollbars are visible)
- m_scrolledWindowFolderPairs->Connect(wxEVT_SIZE, wxSizeEventHandler(MainDialog::OnResizeFolderPairs), NULL, this);
+ m_panelTopLeft->Connect(wxEVT_SIZE, wxEventHandler(MainDialog::OnResizeFolderPairs), NULL, this);
+
+ //dynamically change sizer direction depending on size
+ m_panelConfig ->Connect(wxEVT_SIZE, wxEventHandler(MainDialog::OnResizeConfigPanel), NULL, this);
+ m_panelViewFilter->Connect(wxEVT_SIZE, wxEventHandler(MainDialog::OnResizeViewPanel), NULL, this);
+ m_panelStatistics->Connect(wxEVT_SIZE, wxEventHandler(MainDialog::OnResizeStatisticsPanel), NULL, this);
+ wxSizeEvent dummy3;
+ OnResizeConfigPanel (dummy3); //call once on window creation
+ OnResizeViewPanel (dummy3); //
+ OnResizeStatisticsPanel(dummy3); //
//event handler for manual (un-)checking of rows and setting of sync direction
m_gridMiddle->Connect(FFS_CHECK_ROWS_EVENT, FFSCheckRowsEventHandler(MainDialog::OnCheckRows), NULL, this);
@@ -522,18 +620,6 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg,
//mainly to update row label sizes...
updateGuiGrid();
- //integrate the compare status panel (in hidden state)
- bSizer1->Insert(1, compareStatus->getAsWindow(), 0, wxEXPAND | wxBOTTOM, 5 );
- Layout(); //avoid screen flicker when panel is shown later
- compareStatus->getAsWindow()->Hide();
-
- //correct width of swap button above middle grid
- const wxSize source = m_gridMiddle->GetSize();
- const wxSize target = m_bpButtonSwapSides->GetSize();
- const int spaceToAdd = source.GetX() - target.GetX();
- bSizerMiddle->Insert(1, spaceToAdd / 2, 0, 0);
- bSizerMiddle->Insert(0, spaceToAdd - (spaceToAdd / 2), 0, 0);
-
//register regular check for update on next idle event
Connect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), NULL, this);
@@ -620,8 +706,20 @@ void MainDialog::readGlobalSettings()
m_gridLeft->enableFileIcons(globalSettings->gui.showFileIconsLeft);
m_gridRight->enableFileIcons(globalSettings->gui.showFileIconsRight);
- //set selected tab
- m_notebookBottomLeft->ChangeSelection(globalSettings->gui.selectedTabBottomLeft);
+//------------------------------------------------------------------------------------------------
+ //wxAuiManager erroneously loads panel captions, we don't want that
+ typedef std::vector<std::pair<wxString, wxString> > CaptionNameMapping;
+ CaptionNameMapping captionNameMap;
+ const wxAuiPaneInfoArray& paneArray = auiMgr.GetAllPanes();
+ for (size_t i = 0; i < paneArray.size(); ++i)
+ captionNameMap.push_back(std::make_pair(paneArray[i].caption, paneArray[i].name));
+
+ auiMgr.LoadPerspective(globalSettings->gui.guiPerspectiveLast);
+
+ //restore original captions
+ for (CaptionNameMapping::const_iterator i = captionNameMap.begin(); i != captionNameMap.end(); ++i)
+ auiMgr.GetPane(i->second).Caption(i->first);
+ auiMgr.Update();
}
@@ -639,7 +737,12 @@ void MainDialog::writeGlobalSettings()
globalSettings->gui.columnAttribRight = m_gridRight->getColumnAttributes();
//write list of last used configuration files
- globalSettings->gui.cfgFileHistory = cfgFileNames;
+ std::vector<wxString> cfgFileHistory;
+ for (int i = 0; i < static_cast<int>(m_listBoxHistory->GetCount()); ++i)
+ if (m_listBoxHistory->GetClientObject(i))
+ cfgFileHistory.push_back(static_cast<wxClientDataString*>(m_listBoxHistory->GetClientObject(i))->name_);
+
+ globalSettings->gui.cfgFileHistory = cfgFileHistory;
//write list of last used folders
globalSettings->gui.folderHistoryLeft.clear();
@@ -652,8 +755,7 @@ void MainDialog::writeGlobalSettings()
for (unsigned i = 0; i < rightFolderHistory.GetCount(); ++i)
globalSettings->gui.folderHistoryRight.push_back(rightFolderHistory[i]);
- //get selected tab
- globalSettings->gui.selectedTabBottomLeft = m_notebookBottomLeft->GetSelection();
+ globalSettings->gui.guiPerspectiveLast = auiMgr.SavePerspective();
}
@@ -885,7 +987,7 @@ void MainDialog::deleteSelectedFiles()
int totalDeleteCount = 0;
- wxWindow* oldFocus = wxWindow::FindFocus();
+ wxWindow* oldFocus = wxWindow::FindFocus();
if (ffs3::showDeleteDialog(compRefLeft,
compRefRight,
@@ -924,7 +1026,7 @@ void MainDialog::deleteSelectedFiles()
m_gridRight-> ClearSelection();
}
- if (oldFocus)
+ if (oldFocus)
oldFocus->SetFocus(); //restore focus before deletion
}
}
@@ -967,6 +1069,21 @@ void exstractNames(const FileSystemObject& fsObj, wxString& name, wxString& dir)
}
+void MainDialog::openExternalApplication(const wxString& commandline)
+{
+ if (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid())
+ {
+ const CustomGrid* leadGrid = m_gridLeft->isLeadGrid() ?
+ static_cast<CustomGrid*>(m_gridLeft) :
+ static_cast<CustomGrid*>(m_gridRight);
+ std::set<size_t> selection = getSelectedRows(leadGrid);
+
+ if (selection.size() == 1)
+ openExternalApplication(*selection.begin(), m_gridLeft->isLeadGrid(), commandline);
+ }
+}
+
+
void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const wxString& commandline)
{
if (commandline.empty())
@@ -1052,76 +1169,54 @@ void MainDialog::clearStatusBar()
void MainDialog::disableAllElements()
{
//disenables all elements (except abort button) that might receive user input during long-running processes: comparison, deletion
- m_bpButtonCmpConfig-> Disable();
- m_notebookBottomLeft->Disable();
- m_checkBoxHideFilt-> Disable();
+ m_bpButtonCmpConfig ->Disable();
+ m_panelFilter ->Disable();
+ m_panelConfig ->Disable();
m_bpButtonSyncConfig->Disable();
- m_buttonStartSync-> Disable();
- m_dirPickerLeft-> Disable();
- m_dirPickerRight-> Disable();
- m_bpButtonSwapSides-> Disable();
- m_bpButtonLeftOnly-> Disable();
- m_bpButtonLeftNewer-> Disable();
- m_bpButtonEqual-> Disable();
- m_bpButtonDifferent-> Disable();
- m_bpButtonRightNewer->Disable();
- m_bpButtonRightOnly-> Disable();
- m_panelLeft-> Disable();
- m_panelMiddle-> Disable();
- m_panelRight-> Disable();
- m_panelTopLeft-> Disable();
- m_panelTopMiddle-> Disable();
- m_panelTopRight-> Disable();
- m_bpButton10-> Disable();
- m_scrolledWindowFolderPairs->Disable();
+ m_buttonStartSync ->Disable();
+ m_panelGrids ->Disable();
+ m_panelDirectoryPairs->Disable();
m_menubar1->EnableTop(0, false);
m_menubar1->EnableTop(1, false);
m_menubar1->EnableTop(2, false);
- EnableCloseButton(false);
//show abort button
m_buttonAbort->Enable();
m_buttonAbort->Show();
+ m_buttonAbort->SetFocus();
m_buttonCompare->Disable();
m_buttonCompare->Hide();
- m_buttonAbort->SetFocus();
+ m_bpButtonCmpConfig ->Disable();
+ m_bpButtonSyncConfig->Disable();
+ m_buttonStartSync ->Disable();
+
+ m_panelTopButtons->Layout();
}
void MainDialog::enableAllElements()
{
- m_bpButtonCmpConfig-> Enable();
- m_notebookBottomLeft->Enable();
- m_checkBoxHideFilt-> Enable();
+ m_bpButtonCmpConfig ->Enable();
+ m_panelFilter ->Enable();
+ m_panelConfig ->Enable();
m_bpButtonSyncConfig->Enable();
- m_buttonStartSync-> Enable();
- m_dirPickerLeft-> Enable();
- m_dirPickerRight-> Enable();
- m_bpButtonSwapSides-> Enable();
- m_bpButtonLeftOnly-> Enable();
- m_bpButtonLeftNewer-> Enable();
- m_bpButtonEqual-> Enable();
- m_bpButtonDifferent-> Enable();
- m_bpButtonRightNewer->Enable();
- m_bpButtonRightOnly-> Enable();
- m_panelLeft-> Enable();
- m_panelMiddle-> Enable();
- m_panelRight-> Enable();
- m_panelTopLeft-> Enable();
- m_panelTopMiddle-> Enable();
- m_panelTopRight-> Enable();
- m_bpButton10-> Enable();
- m_scrolledWindowFolderPairs->Enable();
+ m_buttonStartSync ->Enable();
+ m_panelGrids ->Enable();
+ m_panelDirectoryPairs->Enable();
m_menubar1->EnableTop(0, true);
m_menubar1->EnableTop(1, true);
m_menubar1->EnableTop(2, true);
- EnableCloseButton(true);
//show compare button
m_buttonAbort->Disable();
m_buttonAbort->Hide();
m_buttonCompare->Enable();
m_buttonCompare->Show();
+ m_bpButtonCmpConfig ->Enable();
+ m_bpButtonSyncConfig->Enable();
+ m_buttonStartSync ->Enable();
+
+ m_panelTopButtons->Layout();
}
@@ -1139,7 +1234,8 @@ void MainDialog::OnResize(wxSizeEvent& event)
//test ALL parameters at once, since width/height are invalid if the window is minimized (eg x,y == -32000; height = 28, width = 160)
//note: negative values for x and y are possible when using multiple monitors!
- if (width > 0 && height > 0 && x >= -3360 && y >= -200)
+ if (width > 0 && height > 0 && x >= -3360 && y >= -200 &&
+ wxDisplay::GetFromPoint(wxPoint(x, y)) != wxNOT_FOUND) //make sure upper left corner is in visible view
{
widthNotMaximized = width; //visible coordinates x < 0 and y < 0 are possible with dual monitors!
heightNotMaximized = height;
@@ -1153,16 +1249,57 @@ void MainDialog::OnResize(wxSizeEvent& event)
}
-void MainDialog::OnResizeFolderPairs(wxSizeEvent& event)
+namespace
{
- //adapt left-shift display distortion caused by scrollbars for multiple folder pairs
- if (additionalFolderPairs.size() > 0)
+void updateSizerOrientation(wxBoxSizer& sizer, wxWindow& window)
+{
+ if (window.GetSize().GetWidth() > window.GetSize().GetHeight()) //check window NOT sizer width!
{
- const int width = m_panelTopLeft->GetSize().GetWidth();
-
- for (std::vector<DirectoryPair*>::iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
- (*i)->m_panelLeft->SetMinSize(wxSize(width, -1));
+ if (sizer.GetOrientation() != wxHORIZONTAL)
+ {
+ sizer.SetOrientation(wxHORIZONTAL);
+ window.Layout();
+ }
}
+ else
+ {
+ if (sizer.GetOrientation() != wxVERTICAL)
+ {
+ sizer.SetOrientation(wxVERTICAL);
+ window.Layout();
+ }
+ }
+}
+}
+
+
+void MainDialog::OnResizeConfigPanel(wxEvent& event)
+{
+ updateSizerOrientation(*bSizerConfig, *m_panelConfig);
+ event.Skip();
+}
+
+
+void MainDialog::OnResizeViewPanel(wxEvent& event)
+{
+ updateSizerOrientation(*bSizerViewFilter, *m_panelViewFilter);
+ event.Skip();
+}
+
+
+void MainDialog::OnResizeStatisticsPanel(wxEvent& event)
+{
+ updateSizerOrientation(*bSizerStatistics, *m_panelStatistics);
+ event.Skip();
+}
+
+
+void MainDialog::OnResizeFolderPairs(wxEvent& event)
+{
+ //adapt left-shift display distortion caused by scrollbars for multiple folder pairs
+ const int width = m_panelTopLeft->GetSize().GetWidth();
+ for (std::vector<DirectoryPair*>::iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
+ (*i)->m_panelLeft->SetMinSize(wxSize(width, -1));
event.Skip();
}
@@ -1233,8 +1370,8 @@ void MainDialog::onGridLeftButtonEvent(wxKeyEvent& event)
case WXK_RETURN:
case WXK_NUMPAD_ENTER:
{
- wxCommandEvent dummy(wxEVT_NULL, externalAppIDFirst); //open with first external application
- OnContextOpenWith(dummy);
+ if (!globalSettings->gui.externelApplications.empty())
+ openExternalApplication(globalSettings->gui.externelApplications[0].second); //open with first external application
}
return;
}
@@ -1325,8 +1462,8 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event)
case WXK_RETURN:
case WXK_NUMPAD_ENTER:
{
- wxCommandEvent dummy(wxEVT_NULL, externalAppIDFirst); //open with first external application
- OnContextOpenWith(dummy);
+ if (!globalSettings->gui.externelApplications.empty())
+ openExternalApplication(globalSettings->gui.externelApplications[0].second); //open with first external application
}
return;
}
@@ -1362,7 +1499,13 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou
//------------------------------------------------------------
-//temporal variables used by exclude via context menu
+//temporal variables used by exclude via context menu, transport string object to context menu handler
+struct CtxtSelectionString : public wxObject
+{
+ CtxtSelectionString(const wxString& name) : objName(name) {}
+ const wxString objName;
+};
+
struct SelectedExtension : public wxObject
{
SelectedExtension(const Zstring& ext) : extension(ext) {}
@@ -1378,7 +1521,6 @@ struct FilterObject
Zstring relativeName;
bool isDir;
};
-
typedef std::vector<FilterObject> FilterObjList;
struct FilterObjContainer : public wxObject
@@ -1423,6 +1565,7 @@ void MainDialog::OnContextRim(wxGridEvent& event)
const FileSystemObject* fsObj = gridDataView->getObject(selectionBegin);
+ int contextItemID = 2000;
//#######################################################
//re-create context menu
@@ -1434,25 +1577,28 @@ void MainDialog::OnContextRim(wxGridEvent& event)
if (selectionLeft.size() + selectionRight.size() > 0)
{
//CONTEXT_SYNC_DIR_LEFT
- wxMenuItem* menuItemSyncDirLeft = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_DIR_LEFT, wxString(_("Set direction:")) +
+ wxMenuItem* menuItemSyncDirLeft = new wxMenuItem(contextMenu.get(), ++contextItemID, wxString(_("Set direction:")) +
wxT(" ") + getSymbol(fsObj->testSyncOperation(true, SYNC_DIR_LEFT)) +
wxT("\tALT + LEFT")); //Linux needs a direction, "<-", because it has no context menu icons!
menuItemSyncDirLeft->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(true, SYNC_DIR_LEFT)));
contextMenu->Append(menuItemSyncDirLeft);
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirLeft), NULL, this);
//CONTEXT_SYNC_DIR_NONE
- wxMenuItem* menuItemSyncDirNone = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_DIR_NONE, wxString(_("Set direction:")) +
+ wxMenuItem* menuItemSyncDirNone = new wxMenuItem(contextMenu.get(), ++contextItemID, wxString(_("Set direction:")) +
wxT(" ") + getSymbol(fsObj->testSyncOperation(true, SYNC_DIR_NONE)) +
wxT("\tALT + UP"));
menuItemSyncDirNone->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(true, SYNC_DIR_NONE)));
contextMenu->Append(menuItemSyncDirNone);
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirNone), NULL, this);
//CONTEXT_SYNC_DIR_RIGHT
- wxMenuItem* menuItemSyncDirRight = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_DIR_RIGHT, wxString(_("Set direction:")) +
+ wxMenuItem* menuItemSyncDirRight = new wxMenuItem(contextMenu.get(), ++contextItemID, wxString(_("Set direction:")) +
wxT(" ") + getSymbol(fsObj->testSyncOperation(true, SYNC_DIR_RIGHT)) +
wxT("\tALT + RIGHT"));
menuItemSyncDirRight->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(true, SYNC_DIR_RIGHT)));
contextMenu->Append(menuItemSyncDirRight);
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirRight), NULL, this);
contextMenu->AppendSeparator();
}
@@ -1464,22 +1610,24 @@ void MainDialog::OnContextRim(wxGridEvent& event)
{
if (fsObj->isActive())
{
- wxMenuItem* menuItemExclTemp = new wxMenuItem(contextMenu.get(), CONTEXT_FILTER_TEMP, wxString(_("Exclude temporarily")) + wxT("\tSPACE"));
+ wxMenuItem* menuItemExclTemp = new wxMenuItem(contextMenu.get(), ++contextItemID, wxString(_("Exclude temporarily")) + wxT("\tSPACE"));
menuItemExclTemp->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("checkboxFalse")));
contextMenu->Append(menuItemExclTemp);
}
else
{
- wxMenuItem* menuItemInclTemp = new wxMenuItem(contextMenu.get(), CONTEXT_FILTER_TEMP, wxString(_("Include temporarily")) + wxT("\tSPACE"));
+ wxMenuItem* menuItemInclTemp = new wxMenuItem(contextMenu.get(), ++contextItemID, wxString(_("Include temporarily")) + wxT("\tSPACE"));
menuItemInclTemp->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("checkboxTrue")));
contextMenu->Append(menuItemInclTemp);
}
}
else
{
- contextMenu->Append(CONTEXT_FILTER_TEMP, wxString(_("Exclude temporarily")) + wxT("\tSPACE")); //this element should always be visible
- contextMenu->Enable(CONTEXT_FILTER_TEMP, false);
+ contextMenu->Append(contextItemID, wxString(_("Exclude temporarily")) + wxT("\tSPACE")); //this element should always be visible
+ contextMenu->Enable(contextItemID, false);
}
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextFilterTemp), NULL, this);
+
//###############################################################################################
//get list of relative file/dir-names for filtering
@@ -1530,12 +1678,12 @@ void MainDialog::OnContextRim(wxGridEvent& event)
const Zstring extension = filename.AfterLast(Zchar('.'));
//add context menu item
- wxMenuItem* menuItemExclExt = new wxMenuItem(contextMenu.get(), CONTEXT_EXCLUDE_EXT, wxString(_("Exclude via filter:")) + wxT(" ") + wxT("*.") + zToWx(extension));
+ wxMenuItem* menuItemExclExt = new wxMenuItem(contextMenu.get(), ++contextItemID, wxString(_("Exclude via filter:")) + wxT(" ") + wxT("*.") + zToWx(extension));
menuItemExclExt->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("filterSmall")));
contextMenu->Append(menuItemExclExt);
//connect event
- contextMenu->Connect(CONTEXT_EXCLUDE_EXT,
+ contextMenu->Connect(contextItemID,
wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler(MainDialog::OnContextExcludeExtension),
new SelectedExtension(extension), //ownership passed!
@@ -1545,11 +1693,12 @@ void MainDialog::OnContextRim(wxGridEvent& event)
//CONTEXT_EXCLUDE_OBJ
+ ++contextItemID;
wxMenuItem* menuItemExclObj = NULL;
if (exFilterCandidateObj.size() == 1)
- menuItemExclObj = new wxMenuItem(contextMenu.get(), CONTEXT_EXCLUDE_OBJ, wxString(_("Exclude via filter:")) + wxT(" ") + zToWx(exFilterCandidateObj[0].relativeName.AfterLast(common::FILE_NAME_SEPARATOR)));
+ menuItemExclObj = new wxMenuItem(contextMenu.get(), contextItemID, wxString(_("Exclude via filter:")) + wxT(" ") + zToWx(exFilterCandidateObj[0].relativeName.AfterLast(common::FILE_NAME_SEPARATOR)));
else if (exFilterCandidateObj.size() > 1)
- menuItemExclObj = new wxMenuItem(contextMenu.get(), CONTEXT_EXCLUDE_OBJ, wxString(_("Exclude via filter:")) + wxT(" ") + _("<multiple selection>"));
+ menuItemExclObj = new wxMenuItem(contextMenu.get(), contextItemID, wxString(_("Exclude via filter:")) + wxT(" ") + _("<multiple selection>"));
if (menuItemExclObj != NULL)
{
@@ -1557,7 +1706,7 @@ void MainDialog::OnContextRim(wxGridEvent& event)
contextMenu->Append(menuItemExclObj);
//connect event
- contextMenu->Connect(CONTEXT_EXCLUDE_OBJ,
+ contextMenu->Connect(contextItemID,
wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler(MainDialog::OnContextExcludeObject),
new FilterObjContainer(exFilterCandidateObj), //ownership passed!
@@ -1565,7 +1714,6 @@ void MainDialog::OnContextRim(wxGridEvent& event)
}
-
//CONTEXT_EXTERNAL_APP
if (!globalSettings->gui.externelApplications.empty())
{
@@ -1574,57 +1722,51 @@ void MainDialog::OnContextRim(wxGridEvent& event)
const bool externalAppEnabled = (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid()) &&
(selectionLeft.size() + selectionRight.size() == 1);
- int newID = externalAppIDFirst;
for (xmlAccess::ExternalApps::iterator i = globalSettings->gui.externelApplications.begin();
i != globalSettings->gui.externelApplications.end();
- ++i, ++newID)
+ ++i)
{
//some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly"
wxString description = wxGetTranslation(i->first);
if (description.empty())
description = wxT(" "); //wxWidgets doesn't like empty items
+ ++contextItemID;
if (i == globalSettings->gui.externelApplications.begin())
- contextMenu->Append(newID, description + wxT("\t") + wxString(_("D-Click")) + wxT("; ENTER"));
+ contextMenu->Append(contextItemID, description + wxT("\t") + wxString(_("D-Click")) + wxT("; ENTER"));
else
- contextMenu->Append(newID, description);
+ contextMenu->Append(contextItemID, description);
+ contextMenu->Enable(contextItemID, externalAppEnabled);
- contextMenu->Enable(newID, externalAppEnabled);
-
- //register event
- contextMenu->Connect(newID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextOpenWith), NULL, this);
+ contextMenu->Connect(contextItemID,
+ wxEVT_COMMAND_MENU_SELECTED,
+ wxCommandEventHandler(MainDialog::OnContextOpenWith),
+ new CtxtSelectionString(i->second), //ownership passed!
+ this);
}
}
-
contextMenu->AppendSeparator();
//CONTEXT_CLIPBOARD
- contextMenu->Append(CONTEXT_CLIPBOARD, _("Copy to clipboard\tCTRL+C"));
+ contextMenu->Append(++contextItemID, _("Copy to clipboard\tCTRL+C"));
if ( (m_gridLeft->isLeadGrid() && selectionLeft.size()) ||
(m_gridRight->isLeadGrid() && selectionRight.size()))
- contextMenu->Enable(CONTEXT_CLIPBOARD, true);
+ contextMenu->Enable(contextItemID, true);
else
- contextMenu->Enable(CONTEXT_CLIPBOARD, false);
+ contextMenu->Enable(contextItemID, false);
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCopyClipboard), NULL, this);
//CONTEXT_DELETE_FILES
- contextMenu->Append(CONTEXT_DELETE_FILES, _("Delete files\tDEL"));
+ contextMenu->Append(++contextItemID, _("Delete files\tDEL"));
if (selectionLeft.size() + selectionRight.size() == 0)
- contextMenu->Enable(CONTEXT_DELETE_FILES, false);
-
+ contextMenu->Enable(contextItemID, false);
- //###############################################################################################
- //connect events
- contextMenu->Connect(CONTEXT_FILTER_TEMP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextFilterTemp), NULL, this);
- contextMenu->Connect(CONTEXT_CLIPBOARD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCopyClipboard), NULL, this);
- contextMenu->Connect(CONTEXT_DELETE_FILES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextDeleteFiles), NULL, this);
- contextMenu->Connect(CONTEXT_SYNC_DIR_LEFT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirLeft), NULL, this);
- contextMenu->Connect(CONTEXT_SYNC_DIR_NONE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirNone), NULL, this);
- contextMenu->Connect(CONTEXT_SYNC_DIR_RIGHT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirRight), NULL, this);
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextDeleteFiles), NULL, this);
//show context menu
PopupMenu(contextMenu.get());
@@ -1723,22 +1865,13 @@ void MainDialog::OnContextCopyClipboard(wxCommandEvent& event)
void MainDialog::OnContextOpenWith(wxCommandEvent& event)
{
- if (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid())
- {
- const CustomGrid* leadGrid = m_gridLeft->isLeadGrid() ?
- static_cast<CustomGrid*>(m_gridLeft) :
- static_cast<CustomGrid*>(m_gridRight);
- std::set<size_t> selection = getSelectedRows(leadGrid);
-
- const int index = event.GetId() - externalAppIDFirst;
-
- if ( selection.size() == 1 &&
- 0 <= index && static_cast<size_t>(index) < globalSettings->gui.externelApplications.size())
- openExternalApplication(*selection.begin(), m_gridLeft->isLeadGrid(), globalSettings->gui.externelApplications[index].second);
- }
+ CtxtSelectionString* stringObj = dynamic_cast<CtxtSelectionString*>(event.m_callbackUserData);
+ if (stringObj)
+ openExternalApplication(stringObj->objName);
}
+
void MainDialog::OnContextDeleteFiles(wxCommandEvent& event)
{
deleteSelectedFiles();
@@ -1771,17 +1904,18 @@ void MainDialog::OnContextSyncDirRight(wxCommandEvent& event)
void MainDialog::OnContextRimLabelLeft(wxGridEvent& event)
{
+ int ctxtElementId = 1000;
+
contextMenu.reset(new wxMenu); //re-create context menu
- contextMenu->Append(CONTEXT_CUSTOMIZE_COLUMN_LEFT, _("Customize..."));
+ contextMenu->Append(++ctxtElementId, _("Customize..."));
+ contextMenu->Connect(ctxtElementId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnLeft), NULL, this);
contextMenu->AppendSeparator();
- wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), CONTEXT_AUTO_ADJUST_COLUMN_LEFT, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK);
+ wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), ++ctxtElementId, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK);
contextMenu->Append(itemAutoAdjust);
itemAutoAdjust->Check(globalSettings->gui.autoAdjustColumnsLeft);
-
- contextMenu->Connect(CONTEXT_CUSTOMIZE_COLUMN_LEFT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnLeft), NULL, this);
- contextMenu->Connect(CONTEXT_AUTO_ADJUST_COLUMN_LEFT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustLeft), NULL, this);
+ contextMenu->Connect(ctxtElementId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustLeft), NULL, this);
PopupMenu(contextMenu.get()); //show context menu
}
@@ -1789,17 +1923,19 @@ void MainDialog::OnContextRimLabelLeft(wxGridEvent& event)
void MainDialog::OnContextRimLabelRight(wxGridEvent& event)
{
+ int ctxtElementId = 1000;
+
contextMenu.reset(new wxMenu); //re-create context menu
- contextMenu->Append(CONTEXT_CUSTOMIZE_COLUMN_RIGHT, _("Customize..."));
+
+ contextMenu->Append(++ctxtElementId, _("Customize..."));
+ contextMenu->Connect(ctxtElementId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnRight), NULL, this);
contextMenu->AppendSeparator();
- wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), CONTEXT_AUTO_ADJUST_COLUMN_RIGHT, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK);
+ wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), ++ctxtElementId, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK);
contextMenu->Append(itemAutoAdjust);
itemAutoAdjust->Check(globalSettings->gui.autoAdjustColumnsRight);
-
- contextMenu->Connect(CONTEXT_CUSTOMIZE_COLUMN_RIGHT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnRight), NULL, this);
- contextMenu->Connect(CONTEXT_AUTO_ADJUST_COLUMN_RIGHT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustRight), NULL, this);
+ contextMenu->Connect(ctxtElementId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustRight), NULL, this);
PopupMenu(contextMenu.get()); //show context menu
}
@@ -1851,19 +1987,20 @@ void MainDialog::OnContextAutoAdjustRight(wxCommandEvent& event)
void MainDialog::OnContextMiddle(wxGridEvent& event)
{
- contextMenu.reset(new wxMenu); //re-create context menu
+ int contextItemID = 2000;
- contextMenu->Append(CONTEXT_CHECK_ALL, _("Include all rows"));
- contextMenu->Append(CONTEXT_UNCHECK_ALL, _("Exclude all rows"));
+ contextMenu.reset(new wxMenu); //re-create context menu
+ contextMenu->Append(++contextItemID, _("Include all rows"));
if (gridDataView->rowsTotal() == 0)
- {
- contextMenu->Enable(CONTEXT_CHECK_ALL, false);
- contextMenu->Enable(CONTEXT_UNCHECK_ALL, false);
- }
+ contextMenu->Enable(contextItemID, false);
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextIncludeAll), NULL, this);
+
- contextMenu->Connect(CONTEXT_CHECK_ALL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextIncludeAll), NULL, this);
- contextMenu->Connect(CONTEXT_UNCHECK_ALL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextExcludeAll), NULL, this);
+ contextMenu->Append(++contextItemID, _("Exclude all rows"));
+ if (gridDataView->rowsTotal() == 0)
+ contextMenu->Enable(contextItemID, false);
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextExcludeAll), NULL, this);
PopupMenu(contextMenu.get()); //show context menu
}
@@ -1871,10 +2008,15 @@ void MainDialog::OnContextMiddle(wxGridEvent& event)
void MainDialog::OnContextMiddleLabel(wxGridEvent& event)
{
+ int contextItemID = 2000;
+
contextMenu.reset(new wxMenu); //re-create context menu
- wxMenuItem* itemSyncPreview = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_PREVIEW, _("Synchronization Preview"));
- wxMenuItem* itemCmpResult = new wxMenuItem(contextMenu.get(), CONTEXT_COMPARISON_RESULT, _("Comparison Result"));
+ wxMenuItem* itemSyncPreview = new wxMenuItem(contextMenu.get(), ++contextItemID, _("Synchronization Preview"));
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncView), NULL, this);
+
+ wxMenuItem* itemCmpResult = new wxMenuItem(contextMenu.get(), ++contextItemID, _("Comparison Result"));
+ contextMenu->Connect(contextItemID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextComparisonView), NULL, this);
if (syncPreview->previewIsEnabled())
itemSyncPreview->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("syncViewSmall")));
@@ -1884,13 +2026,66 @@ void MainDialog::OnContextMiddleLabel(wxGridEvent& event)
contextMenu->Append(itemCmpResult);
contextMenu->Append(itemSyncPreview);
- contextMenu->Connect(CONTEXT_SYNC_PREVIEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncView), NULL, this);
- contextMenu->Connect(CONTEXT_COMPARISON_RESULT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextComparisonView), NULL, this);
+ PopupMenu(contextMenu.get()); //show context menu
+}
+
+
+void MainDialog::OnContextSetLayout(wxMouseEvent& event)
+{
+ int itemId = 1000;
+
+ contextMenu.reset(new wxMenu); //re-create context menu
+
+ contextMenu->Append(++itemId, _("Reset view"));
+ contextMenu->Connect(itemId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSetLayoutReset), NULL, this);
+
+ typedef std::vector<std::pair<wxString, wxString> > CaptionNameMapping;
+ CaptionNameMapping captionNameMap;
+
+ const wxAuiPaneInfoArray& paneArray = auiMgr.GetAllPanes();
+ for (size_t i = 0; i < paneArray.size(); ++i)
+ if (!paneArray[i].IsShown() && !paneArray[i].name.empty() && paneArray[i].window != compareStatus->getAsWindow())
+ captionNameMap.push_back(std::make_pair(paneArray[i].caption, paneArray[i].name));
+
+ if (!captionNameMap.empty())
+ {
+ contextMenu->AppendSeparator();
+
+ for (CaptionNameMapping::const_iterator i = captionNameMap.begin(); i != captionNameMap.end(); ++i)
+ {
+ wxString entry = _("Show \"%x\"");
+ entry.Replace(wxT("%x"), i->first);
+
+ contextMenu->Append(++itemId, entry);
+ contextMenu->Connect(itemId,
+ wxEVT_COMMAND_MENU_SELECTED,
+ wxCommandEventHandler(MainDialog::OnContextSetLayoutShowPanel),
+ new CtxtSelectionString(i->second), //ownership passed!
+ this);
+ }
+ }
PopupMenu(contextMenu.get()); //show context menu
}
+void MainDialog::OnContextSetLayoutReset(wxCommandEvent& event)
+{
+ auiMgr.LoadPerspective(defaultPerspective);
+}
+
+
+void MainDialog::OnContextSetLayoutShowPanel(wxCommandEvent& event)
+{
+ CtxtSelectionString* stringObj = dynamic_cast<CtxtSelectionString*>(event.m_callbackUserData);
+ if (stringObj)
+ {
+ auiMgr.GetPane(stringObj->objName).Show();
+ auiMgr.Update();
+ }
+}
+
+
void MainDialog::OnContextIncludeAll(wxCommandEvent& event)
{
ffs3::setActiveStatus(true, gridDataView->getDataTentative());
@@ -1941,54 +2136,47 @@ wxString getFormattedHistoryElement(const wxString& filename)
}
-//tests if the same filenames are specified, even if they are relative to the current working directory/include symlinks or \\?\ prefix
-class FindDuplicates
-{
-public:
- FindDuplicates(const Zstring& name) : m_name(name) {}
-
- bool operator()(const wxString& other) const
- {
- return util::sameFileSpecified(m_name, wxToZ(other));
- }
-
-private:
- const Zstring& m_name;
-};
-
-
void MainDialog::addFileToCfgHistory(const wxString& filename)
{
//only (still) existing files should be included in the list
if (util::fileExists(wxToZ(filename), 200) == util::EXISTING_FALSE) //potentially slow network access: wait 200ms
return;
- std::vector<wxString>::const_iterator i = find_if(cfgFileNames.begin(), cfgFileNames.end(), FindDuplicates(wxToZ(filename)));
- if (i != cfgFileNames.end())
+ int posFound = -1;
+
+ for (int i = 0; i < static_cast<int>(m_listBoxHistory->GetCount()); ++i)
+ if (m_listBoxHistory->GetClientObject(i))
+ {
+ const wxString& filenameTmp = static_cast<wxClientDataString*>(m_listBoxHistory->GetClientObject(i))->name_;
+
+ //tests if the same filenames are specified, even if they are relative to the current working directory/include symlinks or \\?\ prefix
+ if (util::sameFileSpecified(wxToZ(filename), wxToZ(filenameTmp)))
+ {
+ posFound = i;
+ break;
+ }
+ }
+
+ if (posFound != -1)
{
//if entry is in the list, then jump to element
- m_choiceHistory->SetSelection(i - cfgFileNames.begin());
+ m_listBoxHistory->SetSelection(posFound);
}
else
{
- cfgFileNames.insert(cfgFileNames.begin(), filename);
-
+ int newPos = -1;
//the default config file should receive another name on GUI
if (util::sameFileSpecified(wxToZ(lastConfigFileName()), wxToZ(filename)))
- m_choiceHistory->Insert(_("<Last session>"), 0); //insert at beginning of list
+ newPos = m_listBoxHistory->Append(_("<Last session>"), new wxClientDataString(filename)); //insert at beginning of list
else
- m_choiceHistory->Insert(getFormattedHistoryElement(filename), 0); //insert at beginning of list
+ newPos = m_listBoxHistory->Append(getFormattedHistoryElement(filename), new wxClientDataString(filename)); //insert at beginning of list
- m_choiceHistory->SetSelection(0);
+ m_listBoxHistory->SetSelection(newPos);
}
//keep maximal size of history list
- if (cfgFileNames.size() > globalSettings->gui.cfgHistoryMax)
- {
- //delete last rows
- cfgFileNames.pop_back();
- m_choiceHistory->Delete(globalSettings->gui.cfgHistoryMax);
- }
+ //if (m_comboHistory->GetCount() > globalSettings->gui.cfgHistoryMax)
+ // m_comboHistory->Delete(globalSettings->gui.cfgHistoryMax);
}
@@ -2071,9 +2259,13 @@ void MainDialog::OnNewConfig(wxCommandEvent& event)
void MainDialog::OnLoadFromHistory(wxCommandEvent& event)
{
- const int selectedItem = m_choiceHistory->GetSelection();
- if (0 <= selectedItem && unsigned(selectedItem) < cfgFileNames.size())
- loadConfiguration(cfgFileNames[selectedItem]);
+ const int selectedItem = m_listBoxHistory->GetSelection();
+ if ( selectedItem != wxNOT_FOUND &&
+ m_listBoxHistory->GetClientObject(selectedItem))
+ {
+ const wxString filename = static_cast<wxClientDataString*>(m_listBoxHistory->GetClientObject(selectedItem))->name_;
+ loadConfiguration(filename);
+ }
}
@@ -2128,26 +2320,50 @@ void MainDialog::OnCfgHistoryKeyEvent(wxKeyEvent& event)
if (keyCode == WXK_DELETE || keyCode == WXK_NUMPAD_DELETE)
{
//try to delete the currently selected config history item
- const int selectedItem = m_choiceHistory->GetCurrentSelection();
- if ( 0 <= selectedItem &&
- selectedItem < int(m_choiceHistory->GetCount()) &&
- selectedItem < int(cfgFileNames.size()))
+ //const int selectedItem = m_listBoxHistory->GetCurrentSelection();
+ const int selectedItem = m_listBoxHistory->GetSelection();
+ if (selectedItem != wxNOT_FOUND)
{
- //delete selected row
- cfgFileNames.erase(cfgFileNames.begin() + selectedItem);
- m_choiceHistory->Delete(selectedItem);
+ m_listBoxHistory->Delete(selectedItem);
+
+ //set selection on next element
+ if (m_listBoxHistory->GetCount() > 0)
+ {
+ int newSelection = selectedItem;
+ if (newSelection >= static_cast<int>(m_listBoxHistory->GetCount()))
+ newSelection = m_listBoxHistory->GetCount() - 1;
+ m_listBoxHistory->SetSelection(newSelection);
+ }
}
+
+ return; //"swallow" event
}
+
event.Skip();
}
-void MainDialog::OnClose(wxCloseEvent &event)
+void MainDialog::OnClose(wxCloseEvent& event)
{
- if (!saveOldConfig()) //notify user about changed settings
- return;
+ if (m_buttonAbort->IsShown()) //delegate to "abort" button if available
+ {
+ wxCommandEvent dummy(wxEVT_COMMAND_BUTTON_CLICKED);
+ m_buttonAbort->ProcessEvent(dummy);
- Destroy();
+ if (event.CanVeto()) event.Veto(); //that's what we want here
+ else Destroy(); //shouldn't be necessary
+ }
+ else
+ {
+ const bool cancelled = !saveOldConfig(); //notify user about changed settings
+ if (cancelled && event.CanVeto())
+ {
+ event.Veto();
+ return;
+ }
+
+ Destroy();
+ }
}
@@ -2261,16 +2477,14 @@ bool MainDialog::writeConfigurationToXml(const wxString& filename)
try
{
xmlAccess::writeConfig(guiCfg, filename);
+ setLastUsedConfig(filename, guiCfg);
+ return true;
}
catch (const xmlAccess::XmlError& error)
{
wxMessageBox(error.msg().c_str(), _("Error"), wxOK | wxICON_ERROR);
return false;
}
-
- setLastUsedConfig(filename, guiCfg);
-
- return true;
}
@@ -2319,7 +2533,7 @@ void MainDialog::setCurrentConfiguration(const xmlAccess::XmlGuiConfig& newGuiCf
//update sync variant name
m_staticTextSyncVariant->SetLabel(wxString(wxT("(")) + currentCfg.mainCfg.getSyncVariantName() + wxT(")"));
- bSizer6->Layout(); //adapt layout for variant text
+ m_panelTopButtons->Layout(); //adapt layout for variant text
}
@@ -2633,31 +2847,16 @@ void MainDialog::initViewFilterButtons()
void MainDialog::updateFilterButtons()
{
- //prepare filter icon
- if (m_notebookBottomLeft->GetImageList() == NULL)
- {
- wxImageList* panelIcons = new wxImageList(16, 16);
- panelIcons->Add(wxBitmap(GlobalResources::getInstance().getImageByName(wxT("filterSmall"))));
- panelIcons->Add(wxBitmap(GlobalResources::getInstance().getImageByName(wxT("filterSmallGrey"))));
- m_notebookBottomLeft->AssignImageList(panelIcons); //pass ownership
- }
-
//global filter: test for Null-filter
if (isNullFilter(currentCfg.mainCfg.globalFilter))
{
m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOff")));
m_bpButtonFilter->SetToolTip(_("No filter selected"));
-
- //additional filter icon
- m_notebookBottomLeft->SetPageImage(1, 1);
}
else
{
m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOn")));
m_bpButtonFilter->SetToolTip(_("Filter is active"));
-
- //show filter icon
- m_notebookBottomLeft->SetPageImage(1, 0);
}
//update main local filter
@@ -2729,9 +2928,9 @@ void MainDialog::OnCompare(wxCommandEvent &event)
m_buttonStartSync->SetFocus();
//hide sort direction indicator on GUI grids
- m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridLeft ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
- m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridRight ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
//reset last sort selection: used for determining sort direction
lastSortColumn = -1;
@@ -2749,10 +2948,8 @@ void MainDialog::OnCompare(wxCommandEvent &event)
updateGuiGrid();
//prepare status information
- wxString statusInfo;
if (allElementsEqual(gridDataView->getDataTentative()))
- statusInfo += _("All directories in sync!");
- pushStatusInformation(statusInfo);
+ pushStatusInformation(_("All directories in sync!"));
}
}
@@ -2792,6 +2989,8 @@ void MainDialog::updateGuiGrid()
//update sync preview statistics
calculatePreview();
+ auiMgr.Update(); //fix small display distortion, if view filter panel is empty
+
m_gridLeft ->Refresh();
m_gridMiddle->Refresh();
m_gridRight ->Refresh();
@@ -2852,7 +3051,7 @@ void MainDialog::OnCmpSettings(wxCommandEvent& event)
{
//update compare variant name
m_staticTextCmpVariant->SetLabel(wxString(wxT("(")) + getVariantName(currentCfg.mainCfg.compareVar) + wxT(")"));
- bSizer6->Layout(); //adapt layout for variant text
+ m_panelTopButtons->Layout(); //adapt layout for variant text
//disable the sync button
syncPreview->enableSynchronization(false);
@@ -3278,13 +3477,9 @@ void MainDialog::updateGridViewData()
m_panelViewFilter->Hide();
}
-
- bSizer3->Layout();
-
- //update status information
+ //clear status information
clearStatusBar();
-
wxString statusLeftNew;
wxString statusMiddleNew;
wxString statusRightNew;
@@ -3426,7 +3621,7 @@ void MainDialog::updateSyncConfig()
{
//update sync variant name
m_staticTextSyncVariant->SetLabel(wxString(wxT("(")) + getCurrentConfiguration().mainCfg.getSyncVariantName() + wxT(")"));
- bSizer6->Layout(); //adapt layout for variant text
+ m_panelTopButtons->Layout(); //adapt layout for variant text
class RedetermineCallback : public DeterminationProblem
@@ -3463,6 +3658,8 @@ void MainDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
{
if (additionalFolderPairs.size() > 0)
{
+ wxWindowUpdateLocker dummy(this); //avoid display distortion
+
//get settings from second folder pair
const FolderPairEnh cfgSecond = getEnahncedPair(additionalFolderPairs[0]);
@@ -3487,6 +3684,8 @@ void MainDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
void MainDialog::OnRemoveFolderPair(wxCommandEvent& event)
{
+ wxWindowUpdateLocker dummy(this); //avoid display distortion
+
const wxObject* const eventObj = event.GetEventObject(); //find folder pair originating the event
for (std::vector<DirectoryPair*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
if (eventObj == (*i)->m_bpButtonRemovePair)
@@ -3512,7 +3711,6 @@ void MainDialog::updateGuiForFolderPair()
m_bpButtonRemovePair->Hide();
else
m_bpButtonRemovePair->Show();
-
m_panelTopRight->Layout();
//adapt local filter and sync cfg for first folder pair
@@ -3533,14 +3731,28 @@ void MainDialog::updateGuiForFolderPair()
m_bpButtonSwapSides->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("swapSlim")));
}
-
m_panelTopMiddle->Layout();
+
+
+ int addPairHeight = 0;
+ if (additionalFolderPairs.size() > 0)
+ addPairHeight = std::min<double>(1.5, additionalFolderPairs.size()) * //have 0.5 * height indicate that more folders are there
+ additionalFolderPairs[0]->GetSize().GetHeight();
+
+ //ensure additional folder pairs are at least partially visible
+ auiMgr.GetPane(m_panelDirectoryPairs).MinSize(-1, m_panelTopLeft->GetSize().GetHeight() + addPairHeight);
+ auiMgr.Update();
+
+ m_scrolledWindowFolderPairs->Fit(); //adjust scrolled window size
+
+ //m_scrolledWindowFolderPairs->Layout(); //adjust stuff inside scrolled window
+ m_panelDirectoryPairs->Layout();
}
void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool addFront)
{
- wxWindowUpdateLocker dummy(this); //avoid display distortion
+ wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion
if (!newPairs.empty())
{
@@ -3550,9 +3762,6 @@ void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool
//add new folder pair
DirectoryPair* newPair = new DirectoryPair(m_scrolledWindowFolderPairs, *this);
- //correct width of middle block
- newPair->m_panel21->SetMinSize(wxSize(m_gridMiddle->GetSize().GetWidth(), -1));
-
//set width of left folder panel
const int width = m_panelTopLeft->GetSize().GetWidth();
newPair->m_panelLeft->SetMinSize(wxSize(width, -1));
@@ -3583,13 +3792,12 @@ void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool
}
//set size of scrolled window
- const size_t visiblePairs = std::min(additionalFolderPairs.size(), globalSettings->gui.addFolderPairCountMax); //up to "addFolderPairCountMax" additional pairs shall be shown
- m_scrolledWindowFolderPairs->SetMinSize(wxSize( -1, pairHeight * static_cast<int>(visiblePairs)));
+ //m_scrolledWindowFolderPairs->SetMinSize(wxSize( -1, pairHeight * static_cast<int>(visiblePairs)));
//update controls
- m_scrolledWindowFolderPairs->Fit(); //adjust scrolled window size
- m_scrolledWindowFolderPairs->Layout(); //adjust stuff inside scrolled window
- bSizer1->Layout();
+// m_scrolledWindowFolderPairs->Fit(); //adjust scrolled window size
+ // m_scrolledWindowFolderPairs->Layout(); //adjust stuff inside scrolled window
+ //bSizer1->Layout();
}
updateGuiForFolderPair();
@@ -3598,27 +3806,27 @@ void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool
void MainDialog::removeAddFolderPair(size_t pos)
{
- wxWindowUpdateLocker dummy(this); //avoid display distortion
+ wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion
if (pos < additionalFolderPairs.size())
{
//remove folder pairs from window
DirectoryPair* pairToDelete = additionalFolderPairs[pos];
- const int pairHeight = pairToDelete->GetSize().GetHeight();
+ //const int pairHeight = pairToDelete->GetSize().GetHeight();
bSizerAddFolderPairs->Detach(pairToDelete); //Remove() does not work on Window*, so do it manually
pairToDelete->Destroy(); //
additionalFolderPairs.erase(additionalFolderPairs.begin() + pos); //remove element from vector
//set size of scrolled window
- const size_t additionalRows = additionalFolderPairs.size();
- if (additionalRows <= globalSettings->gui.addFolderPairCountMax) //up to "addFolderPairCountMax" additional pairs shall be shown
- m_scrolledWindowFolderPairs->SetMinSize(wxSize(-1, pairHeight * static_cast<int>(additionalRows)));
+ //const size_t additionalRows = additionalFolderPairs.size();
+ //if (additionalRows <= globalSettings->gui.addFolderPairCountMax) //up to "addFolderPairCountMax" additional pairs shall be shown
+ // m_scrolledWindowFolderPairs->SetMinSize(wxSize(-1, pairHeight * static_cast<int>(additionalRows)));
//update controls
- m_scrolledWindowFolderPairs->Fit(); //adjust scrolled window size
- m_scrolledWindowFolderPairs->Layout(); //adjust stuff inside scrolled window
- bSizer1->Layout();
+ //m_scrolledWindowFolderPairs->Fit(); //adjust scrolled window size
+ //m_scrolledWindowFolderPairs->Layout(); //adjust stuff inside scrolled window
+ //bSizer1->Layout();
}
updateGuiForFolderPair();
@@ -3627,13 +3835,14 @@ void MainDialog::removeAddFolderPair(size_t pos)
void MainDialog::clearAddFolderPairs()
{
- wxWindowUpdateLocker dummy(this); //avoid display distortion
+ wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion
additionalFolderPairs.clear();
bSizerAddFolderPairs->Clear(true);
- m_scrolledWindowFolderPairs->SetMinSize(wxSize(-1, 0));
- bSizer1->Layout();
+ updateGuiForFolderPair();
+ //m_scrolledWindowFolderPairs->SetMinSize(wxSize(-1, 0));
+ //bSizer1->Layout();
}
//########################################################################################################
@@ -3793,10 +4002,12 @@ void MainDialog::OnLayoutWindowAsync(wxIdleEvent& event)
wxWindowUpdateLocker dummy(this); //avoid display distortion
//adjust folder pair distortion on startup
- m_scrolledWindowFolderPairs->Fit();
+ for (std::vector<DirectoryPair*>::iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
+ (*i)->Layout();
+ m_panelTopButtons->Layout();
Layout(); //strangely this layout call works if called in next idle event only
- Refresh();
+ auiMgr.Update(); //fix view filter distortion
}
diff --git a/ui/main_dlg.h b/ui/main_dlg.h
index 68310065..3559aff8 100644
--- a/ui/main_dlg.h
+++ b/ui/main_dlg.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef MAINDIALOG_H
@@ -13,6 +13,8 @@
#include <memory>
#include <map>
#include <set>
+#include <wx/aui/aui.h>
+
class CustomGrid;
class FFSCheckRowsEvent;
@@ -21,6 +23,7 @@ class IconUpdater;
class DirectoryPair;
class DirectoryPairFirst;
class CompareStatus;
+class PanelMoveWindow;
namespace ffs3
@@ -49,40 +52,7 @@ private:
friend class DirectoryNameMainImpl;
template <class GuiPanel>
friend class FolderPairCallback;
-
-//IDs for context menu items
- enum ContextIDRim //context menu for left and right grids
- {
- CONTEXT_FILTER_TEMP = 10,
- CONTEXT_EXCLUDE_EXT,
- CONTEXT_EXCLUDE_OBJ,
- CONTEXT_CLIPBOARD,
- CONTEXT_EXTERNAL_APP,
- CONTEXT_DELETE_FILES,
- CONTEXT_SYNC_DIR_LEFT,
- CONTEXT_SYNC_DIR_NONE,
- CONTEXT_SYNC_DIR_RIGHT
- };
-
- enum ContextIDRimLabel//context menu for column settings
- {
- CONTEXT_CUSTOMIZE_COLUMN_LEFT,
- CONTEXT_CUSTOMIZE_COLUMN_RIGHT,
- CONTEXT_AUTO_ADJUST_COLUMN_LEFT,
- CONTEXT_AUTO_ADJUST_COLUMN_RIGHT
- };
-
- enum ContextIDMiddle//context menu for middle grid
- {
- CONTEXT_CHECK_ALL = 20,
- CONTEXT_UNCHECK_ALL
- };
-
- enum ContextIDMiddleLabel
- {
- CONTEXT_COMPARISON_RESULT = 30,
- CONTEXT_SYNC_PREVIEW
- };
+ friend class PanelMoveWindow;
MainDialog();
@@ -134,8 +104,8 @@ private:
void copySelectionToClipboard(const CustomGrid* selectedGrid);
void deleteSelectedFiles();
+ void openExternalApplication(const wxString& commandline);
void openExternalApplication(size_t rowNumber, bool leftSide, const wxString& commandline);
- static const int externalAppIDFirst = 1000; //id of first external app item
//work to be done in idle time
void OnIdleEvent(wxEvent& event);
@@ -156,26 +126,29 @@ private:
void OnContextRimLabelRight( wxGridEvent& event);
void OnContextMiddle( wxGridEvent& event);
void OnContextMiddleLabel( wxGridEvent& event);
+ void OnContextSetLayout( wxMouseEvent& event);
void OnGlobalKeyEvent( wxKeyEvent& event);
//context menu handler methods
- void OnContextFilterTemp(wxCommandEvent& event);
- void OnContextExcludeExtension(wxCommandEvent& event);
- void OnContextExcludeObject(wxCommandEvent& event);
- void OnContextCopyClipboard(wxCommandEvent& event);
- void OnContextOpenWith(wxCommandEvent& event);
- void OnContextDeleteFiles(wxCommandEvent& event);
- void OnContextSyncDirLeft(wxCommandEvent& event);
- void OnContextSyncDirNone(wxCommandEvent& event);
- void OnContextSyncDirRight(wxCommandEvent& event);
- void OnContextCustColumnLeft(wxCommandEvent& event);
- void OnContextCustColumnRight(wxCommandEvent& event);
- void OnContextAutoAdjustLeft(wxCommandEvent& event);
- void OnContextAutoAdjustRight(wxCommandEvent& event);
- void OnContextIncludeAll(wxCommandEvent& event);
- void OnContextExcludeAll(wxCommandEvent& event);
- void OnContextComparisonView(wxCommandEvent& event);
- void OnContextSyncView(wxCommandEvent& event);
+ void OnContextFilterTemp (wxCommandEvent& event);
+ void OnContextExcludeExtension (wxCommandEvent& event);
+ void OnContextExcludeObject (wxCommandEvent& event);
+ void OnContextCopyClipboard (wxCommandEvent& event);
+ void OnContextOpenWith (wxCommandEvent& event);
+ void OnContextDeleteFiles (wxCommandEvent& event);
+ void OnContextSyncDirLeft (wxCommandEvent& event);
+ void OnContextSyncDirNone (wxCommandEvent& event);
+ void OnContextSyncDirRight (wxCommandEvent& event);
+ void OnContextCustColumnLeft (wxCommandEvent& event);
+ void OnContextCustColumnRight (wxCommandEvent& event);
+ void OnContextAutoAdjustLeft (wxCommandEvent& event);
+ void OnContextAutoAdjustRight (wxCommandEvent& event);
+ void OnContextIncludeAll (wxCommandEvent& event);
+ void OnContextExcludeAll (wxCommandEvent& event);
+ void OnContextComparisonView (wxCommandEvent& event);
+ void OnContextSyncView (wxCommandEvent& event);
+ void OnContextSetLayoutReset (wxCommandEvent& event);
+ void OnContextSetLayoutShowPanel(wxCommandEvent& event);
void OnDirSelected(wxFileDirPickerEvent& event);
@@ -219,7 +192,10 @@ private:
void refreshGridAfterFilterChange(const int delay);
void OnResize( wxSizeEvent& event);
- void OnResizeFolderPairs( wxSizeEvent& event);
+ void OnResizeFolderPairs( wxEvent& event);
+ void OnResizeConfigPanel( wxEvent& event);
+ void OnResizeViewPanel( wxEvent& event);
+ void OnResizeStatisticsPanel(wxEvent& event);
void OnHideFilteredButton( wxCommandEvent& event);
void OnConfigureFilter( wxCommandEvent& event);
void OnSwapSides( wxCommandEvent& event);
@@ -296,10 +272,6 @@ private:
bool cleanedUp;
- //save the last used config filename history
- std::vector<wxString> cfgFileNames;
-
-
//remember last sort executed (for determination of sort order)
int lastSortColumn;
const wxGrid* lastSortGrid;
@@ -325,6 +297,10 @@ private:
bool synchronizationEnabled; //determines whether synchronization should be allowed
};
std::auto_ptr<SyncPreview> syncPreview; //always bound
+
+ wxAuiManager auiMgr; //implement dockable GUI design
+
+ wxString defaultPerspective;
};
#endif // MAINDIALOG_H
diff --git a/ui/mouse_move_dlg.cpp b/ui/mouse_move_dlg.cpp
index efaba5fc..abaa7ead 100644
--- a/ui/mouse_move_dlg.cpp
+++ b/ui/mouse_move_dlg.cpp
@@ -1,10 +1,11 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "mouse_move_dlg.h"
+#include <vector>
#include <wx/msw/wrapwin.h> //includes "windows.h"
using namespace ffs3;
@@ -18,26 +19,36 @@ MouseMoveWindow::MouseMoveWindow(wxWindow& parent,
wxWindow* child5,
wxWindow* child6) : wxWindow(&parent, wxID_ANY)
{
- if (child1) child1->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this);
- if (child2) child2->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this);
- if (child3) child3->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this);
- if (child4) child4->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this);
- if (child5) child5->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this);
- if (child6) child6->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this);
+ std::vector<wxWindow*> windList;
+
+ if (child1) windList.push_back(child1);
+ if (child2) windList.push_back(child2);
+ if (child3) windList.push_back(child3);
+ if (child4) windList.push_back(child4);
+ if (child5) windList.push_back(child5);
+ if (child6) windList.push_back(child6);
+
+ for (std::vector<wxWindow*>::const_iterator i = windList.begin(); i != windList.end(); ++i)
+ (*i)->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MouseMoveWindow::LeftButtonDown), NULL, this);
Hide(); //this is just a dummy window so that its parent can have ownership
Disable();
}
+MouseMoveWindow::~MouseMoveWindow() {}
+
+
void MouseMoveWindow::LeftButtonDown(wxMouseEvent& event)
{
- if (!GetParent())
- return;
-
- ::ReleaseCapture();
- //::SendMessage(GetHwndOf(dialogToMove_), WM_NCLBUTTONDOWN, HTCAPTION, 0);
- ::SendMessage(static_cast<HWND>(GetParent()->GetHWND()), WM_NCLBUTTONDOWN, HTCAPTION, 0);
+ if (GetParent() && allowMove(event))
+ {
+ ::ReleaseCapture();
+ //::SendMessage(GetHwndOf(dialogToMove_), WM_NCLBUTTONDOWN, HTCAPTION, 0);
+ ::SendMessage(static_cast<HWND>(GetParent()->GetHWND()), WM_NCLBUTTONDOWN, HTCAPTION, 0);
- //event.Skip(); -> swallow event, to avoid other windows losing focus
+ return;
+ //event.Skip(); -> swallow event, to avoid other windows losing focus
+ }
+ event.Skip();
}
diff --git a/ui/mouse_move_dlg.h b/ui/mouse_move_dlg.h
index c7d07629..ccdf6c01 100644
--- a/ui/mouse_move_dlg.h
+++ b/ui/mouse_move_dlg.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef MOUSEMOVEWINDOW_H_INCLUDED
@@ -24,11 +24,16 @@ public:
wxWindow* child5 = NULL,
wxWindow* child6 = NULL);
+ virtual ~MouseMoveWindow();
+
+ virtual bool allowMove(const wxMouseEvent& event)
+ {
+ return true;
+ }
+
private:
void LeftButtonDown(wxMouseEvent& event);
};
-
-
}
diff --git a/ui/msg_popup.cpp b/ui/msg_popup.cpp
index adf5ac7f..0b6d3584 100644
--- a/ui/msg_popup.cpp
+++ b/ui/msg_popup.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "msg_popup.h"
@@ -15,7 +15,7 @@ ErrorDlg::ErrorDlg(wxWindow* parentWindow, const int activeButtons, const wxStri
{
#ifdef FFS_WIN
new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere...
- this, m_bitmap10); //ownership passed to "this"
+ this, m_bitmap10); //ownership passed to "this"
#endif
m_bitmap10->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("error")));
@@ -79,7 +79,7 @@ WarningDlg::WarningDlg(wxWindow* parentWindow, int activeButtons, const wxStrin
{
#ifdef FFS_WIN
new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere...
- this, m_bitmap10); //ownership passed to "this"
+ this, m_bitmap10); //ownership passed to "this"
#endif
m_bitmap10->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("warning")));
@@ -141,7 +141,7 @@ QuestionDlg::QuestionDlg(wxWindow* parentWindow, int activeButtons, const wxStri
{
#ifdef FFS_WIN
new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere...
- this, m_bitmap10); //ownership passed to "this"
+ this, m_bitmap10); //ownership passed to "this"
#endif
m_bitmap10->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("question")));
diff --git a/ui/msg_popup.h b/ui/msg_popup.h
index fee3c6ed..44743c1b 100644
--- a/ui/msg_popup.h
+++ b/ui/msg_popup.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef MESSAGEPOPUP_H_INCLUDED
diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp
index e5cfa879..541e2694 100644
--- a/ui/progress_indicator.cpp
+++ b/ui/progress_indicator.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "progress_indicator.h"
@@ -27,6 +27,11 @@ using namespace ffs3;
namespace
{
+//window size used for statistics in milliseconds
+const int windowSizeRemainingTime = 60000; //some usecases have dropouts of 40 seconds -> 60 sec. window size handles them well
+const int windowSizeBytesPerSec = 5000; //
+
+
void setNewText(const wxString& newText, wxTextCtrl& control, bool& updateLayout)
{
if (control.GetValue().length() != newText.length())
@@ -208,7 +213,7 @@ void CompareStatus::CompareStatusImpl::init()
updateStatusPanelNow();
- Show(); //make visible
+ Layout();
}
@@ -218,7 +223,6 @@ void CompareStatus::CompareStatusImpl::finalize() //hide again
taskbar_.reset();
#endif
- Hide();
parentWindow_.SetTitle(titleTextBackup);
}
@@ -239,7 +243,7 @@ void CompareStatus::CompareStatusImpl::switchToCompareBytewise(int totalObjectsT
scalingFactor = 0;
//set new statistics handler: 10 seconds "window" for remaining time, 5 seconds for speed
- statistics.reset(new Statistics(totalObjectsToProcess, totalDataToProcess.ToDouble(), 10000, 5000));
+ statistics.reset(new Statistics(totalObjectsToProcess, totalDataToProcess.ToDouble(), windowSizeRemainingTime, windowSizeBytesPerSec));
lastStatCallSpeed = -1000000; //some big number
lastStatCallRemTime = -1000000;
@@ -251,6 +255,7 @@ void CompareStatus::CompareStatusImpl::switchToCompareBytewise(int totalObjectsT
m_gauge2->Show();
bSizer42->Layout();
+ Layout();
}
@@ -304,7 +309,7 @@ void CompareStatus::CompareStatusImpl::showProgressExternally(const wxString& pr
void CompareStatus::CompareStatusImpl::updateStatusPanelNow()
{
//static RetrieveStatistics statistic;
- //statistic.writeEntry(currentData, currentObjects);
+ //statistic.writeEntry(currentData.ToDouble(), currentObjects);
{
//wxWindowUpdateLocker dummy(this) -> not needed
@@ -441,6 +446,10 @@ private:
wxString titelTextBackup;
+ //save last used systray icon description
+ wxString progressTextLast;
+ float progressPercentLast;
+
boost::shared_ptr<MinimizeToTray> minimizedToSysTray; //optional: if filled, hides all visible windows, shows again if destroyed
};
@@ -530,7 +539,8 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWin
processPaused(false),
currentStatus(SyncStatus::ABORTED),
lastStatCallSpeed(-1000000), //some big number
- lastStatCallRemTime(-1000000)
+ lastStatCallRemTime(-1000000),
+ progressPercentLast(0)
{
#ifdef FFS_WIN
new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere...
@@ -618,7 +628,8 @@ void SyncStatus::SyncStatusImpl::resetGauge(int totalObjectsToProcess, wxLongLon
scalingFactor = 0;
//set new statistics handler: 10 seconds "window" for remaining time, 5 seconds for speed
- statistics.reset(new Statistics(totalObjectsToProcess, totalDataToProcess.ToDouble(), 10000, 5000));
+ statistics.reset(new Statistics(totalObjectsToProcess, totalDataToProcess.ToDouble(), windowSizeRemainingTime, windowSizeBytesPerSec));
+
lastStatCallSpeed = -1000000; //some big number
lastStatCallRemTime = -1000000;
}
@@ -650,6 +661,11 @@ void SyncStatus::SyncStatusImpl::showProgressExternally(const wxString& progress
minimizedToSysTray->setToolTip(progressText, percent);
//minimizedToSysTray may be a zombie... so set title text anyway
+ //save progress text for later use (e.g. set systray icon tooltip in paused mode)
+ progressTextLast = progressText;
+ progressPercentLast = percent;
+
+
if (mainDialog) //show percentage in maindialog title (and thereby in taskbar)
{
if (mainDialog->GetTitle() != progressText)
@@ -699,13 +715,13 @@ void SyncStatus::SyncStatusImpl::showProgressExternally(const wxString& progress
void SyncStatus::SyncStatusImpl::updateStatusDialogNow()
{
//static RetrieveStatistics statistic;
- //statistic.writeEntry(currentData, currentObjects);
+ //statistic.writeEntry(currentData.ToDouble(), currentObjects);
const float percent = totalData == 0 ? 0 : currentData.ToDouble() * 100 / totalData.ToDouble();
//write status information to systray, taskbar, parent title ect.
- const wxString postFix = jobName_.empty() ? wxString() : (wxT(" - \"") + jobName_ + wxT("\""));
+ const wxString postFix = jobName_.empty() ? wxString() : (wxT("\n\"") + jobName_ + wxT("\""));
switch (currentStatus)
{
case SyncStatus::SCANNING:
@@ -786,13 +802,26 @@ void SyncStatus::SyncStatusImpl::updateStatusDialogNow()
}
}
+
//support for pause button
- while (processPaused && currentProcessIsRunning())
+ if(processPaused)
{
- wxMilliSleep(UI_UPDATE_INTERVAL);
- updateUiNow();
+ if (statistics.get()) statistics->pauseTimer();
+
+ while (processPaused && currentProcessIsRunning())
+ {
+ wxMilliSleep(UI_UPDATE_INTERVAL);
+ updateUiNow();
+ }
+
+ if (statistics.get()) statistics->resumeTimer();
}
+ /*
+ /|\
+ | keep this order to ensure one full statistics update before entering pause mode
+ \|/
+ */
updateUiNow();
}
@@ -904,7 +933,19 @@ void SyncStatus::SyncStatusImpl::OnOkay(wxCommandEvent& event)
void SyncStatus::SyncStatusImpl::OnAbort(wxCommandEvent& event)
{
- Close(); //generate close event: do NOT destroy window unconditionally!
+ processPaused = false;
+ if (currentProcessIsRunning())
+ {
+ m_buttonAbort->Disable();
+ m_buttonAbort->Hide();
+ m_buttonPause->Disable();
+ m_buttonPause->Hide();
+
+ setStatusText_NoUpdate(wxToZ(_("Abort requested: Waiting for current operation to finish...")));
+ //no Layout() or UI-update here to avoid cascaded Yield()-call
+
+ processStatusHandler->requestAbortion();
+ }
}
@@ -912,49 +953,41 @@ void SyncStatus::SyncStatusImpl::OnPause(wxCommandEvent& event)
{
static SyncStatus::SyncStatusID previousStatus = SyncStatus::ABORTED;
- if (processPaused)
- {
- setCurrentStatus(previousStatus);
- processPaused = false;
- m_buttonPause->SetLabel(_("Pause"));
- m_animationControl1->Play();
+ processPaused = !processPaused;
- //resume timers
- timeElapsed.Resume();
- if (statistics.get())
- statistics->resumeTimer();
- }
- else
+ if (processPaused)
{
previousStatus = currentStatus; //save current status
-
setCurrentStatus(SyncStatus::PAUSE);
- processPaused = true;
+
m_buttonPause->SetLabel(_("Continue"));
m_animationControl1->Stop();
//pause timers
timeElapsed.Pause();
- if (statistics.get())
- statistics->pauseTimer();
+ }
+ else
+ {
+ setCurrentStatus(previousStatus);
+
+ m_buttonPause->SetLabel(_("Pause"));
+ m_animationControl1->Play();
+
+ //resume timers
+ timeElapsed.Resume();
}
}
void SyncStatus::SyncStatusImpl::OnClose(wxCloseEvent& event)
{
- processPaused = false;
- if (currentProcessIsRunning())
+ if (m_buttonAbort->IsShown()) //delegate to "abort" button if available
{
- m_buttonAbort->Disable();
- m_buttonAbort->Hide();
- m_buttonPause->Disable();
- m_buttonPause->Hide();
+ wxCommandEvent dummy(wxEVT_COMMAND_BUTTON_CLICKED);
+ m_buttonAbort->ProcessEvent(dummy);
- setStatusText_NoUpdate(wxToZ(_("Abort requested: Waiting for current operation to finish...")));
- //no Layout() or UI-update here to avoid cascaded Yield()-call
-
- processStatusHandler->requestAbortion();
+ if (event.CanVeto()) event.Veto(); //that's what we want here
+ else Destroy(); //shouldn't be necessary
}
else
Destroy();
@@ -971,6 +1004,7 @@ void SyncStatus::SyncStatusImpl::OnIconize(wxIconizeEvent& event)
void SyncStatus::SyncStatusImpl::minimizeToTray()
{
minimizedToSysTray.reset(new MinimizeToTray(this, mainDialog));
+ minimizedToSysTray->setToolTip(progressTextLast, progressPercentLast); //set tooltip: in pause mode there is no statistics update, so this is the only chance
}
diff --git a/ui/progress_indicator.h b/ui/progress_indicator.h
index bb5a287c..9e139ae5 100644
--- a/ui/progress_indicator.h
+++ b/ui/progress_indicator.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef PROGRESSINDICATOR_H_INCLUDED
diff --git a/ui/search.cpp b/ui/search.cpp
index 23cf89b1..d27e3009 100644
--- a/ui/search.cpp
+++ b/ui/search.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "search.h"
@@ -40,7 +40,7 @@ SearchDlg::SearchDlg(wxWindow& parentWindow, wxString& searchText, bool& respect
{
#ifdef FFS_WIN
new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere...
- this); //ownership passed to "this"
+ this); //ownership passed to "this"
#endif
m_checkBoxMatchCase->SetValue(respectCase_);
diff --git a/ui/search.h b/ui/search.h
index 22ef9bc9..4b1c0a81 100644
--- a/ui/search.h
+++ b/ui/search.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SEARCH_H_INCLUDED
diff --git a/ui/small_dlgs.cpp b/ui/small_dlgs.cpp
index e582142c..0e93337e 100644
--- a/ui/small_dlgs.cpp
+++ b/ui/small_dlgs.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "gui_generated.h"
@@ -452,11 +452,11 @@ DefaultReturnCode::Response ffs3::showDeleteDialog(const std::vector<ffs3::FileS
DefaultReturnCode::Response rv = DefaultReturnCode::BUTTON_CANCEL;
DeleteDialog confirmDeletion(NULL,
- rowsOnLeft,
- rowsOnRight,
- deleteOnBothSides,
- useRecycleBin,
- totalDeleteCount);
+ rowsOnLeft,
+ rowsOnRight,
+ deleteOnBothSides,
+ useRecycleBin,
+ totalDeleteCount);
if (confirmDeletion.ShowModal() == DeleteDialog::BUTTON_OKAY)
rv = DefaultReturnCode::BUTTON_OKAY;
return rv;
@@ -639,7 +639,7 @@ SyncPreviewDlg::SyncPreviewDlg(wxWindow* parentWindow,
{
#ifdef FFS_WIN
new ffs3::MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere...
- this, m_staticTextVariant); //ownership passed to "this"
+ this, m_staticTextVariant); //ownership passed to "this"
#endif
using ffs3::numberToStringSep;
@@ -653,13 +653,13 @@ SyncPreviewDlg::SyncPreviewDlg(wxWindow* parentWindow,
m_staticTextVariant->SetLabel(variantName);
m_textCtrlData->SetValue(ffs3::formatFilesizeToShortString(statistics.getDataToProcess()));
- m_textCtrlCreateL->SetValue(numberToStringSep(statistics.getCreate( true, false)));
- m_textCtrlUpdateL->SetValue(numberToStringSep(statistics.getOverwrite(true, false)));
- m_textCtrlDeleteL->SetValue(numberToStringSep(statistics.getDelete( true, false)));
+ m_textCtrlCreateL->SetValue(numberToStringSep(statistics.getCreate <LEFT_SIDE>()));
+ m_textCtrlUpdateL->SetValue(numberToStringSep(statistics.getOverwrite<LEFT_SIDE>()));
+ m_textCtrlDeleteL->SetValue(numberToStringSep(statistics.getDelete <LEFT_SIDE>()));
- m_textCtrlCreateR->SetValue(numberToStringSep(statistics.getCreate( false, true)));
- m_textCtrlUpdateR->SetValue(numberToStringSep(statistics.getOverwrite(false, true)));
- m_textCtrlDeleteR->SetValue(numberToStringSep(statistics.getDelete( false, true)));
+ m_textCtrlCreateR->SetValue(numberToStringSep(statistics.getCreate <RIGHT_SIDE>()));
+ m_textCtrlUpdateR->SetValue(numberToStringSep(statistics.getOverwrite<RIGHT_SIDE>()));
+ m_textCtrlDeleteR->SetValue(numberToStringSep(statistics.getDelete <RIGHT_SIDE>()));
m_checkBoxDontShowAgain->SetValue(dontShowAgain);
diff --git a/ui/small_dlgs.h b/ui/small_dlgs.h
index 57a5f542..73253b15 100644
--- a/ui/small_dlgs.h
+++ b/ui/small_dlgs.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SMALLDIALOGS_H_INCLUDED
diff --git a/ui/sorting.h b/ui/sorting.h
index 305cb916..ce3e4648 100644
--- a/ui/sorting.h
+++ b/ui/sorting.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SORTING_H_INCLUDED
@@ -93,13 +93,13 @@ bool sortByRelativeName(const FileSystemObject& a, const FileSystemObject& b)
const bool isDirectoryA = isDirectoryMapping(a);
const Zstring& relDirNameA = isDirectoryA ?
- a.getRelativeName<side>() : //directory
- a.getParentRelativeName(); //file or symlink
+ a.getRelativeName<side>() : //directory
+ a.getParentRelativeName(); //file or symlink
const bool isDirectoryB = isDirectoryMapping(b);
const Zstring& relDirNameB = isDirectoryB ?
- b.getRelativeName<side>() : //directory
- b.getParentRelativeName(); //file or symlink
+ b.getRelativeName<side>() : //directory
+ b.getParentRelativeName(); //file or symlink
//compare relative names without filenames first
diff --git a/ui/switch_to_gui.cpp b/ui/switch_to_gui.cpp
index 121047e6..87827c54 100644
--- a/ui/switch_to_gui.cpp
+++ b/ui/switch_to_gui.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "switch_to_gui.h"
diff --git a/ui/switch_to_gui.h b/ui/switch_to_gui.h
index b39354f8..a938c7d8 100644
--- a/ui/switch_to_gui.h
+++ b/ui/switch_to_gui.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SWITCHTOGUI_H_INCLUDED
diff --git a/ui/sync_cfg.cpp b/ui/sync_cfg.cpp
index c0af4881..371f90cb 100644
--- a/ui/sync_cfg.cpp
+++ b/ui/sync_cfg.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "sync_cfg.h"
diff --git a/ui/sync_cfg.h b/ui/sync_cfg.h
index 805bb03f..fb00136a 100644
--- a/ui/sync_cfg.h
+++ b/ui/sync_cfg.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef SYNCCONFIG_H_INCLUDED
diff --git a/ui/tray_icon.cpp b/ui/tray_icon.cpp
index 71de676d..087ee9d3 100644
--- a/ui/tray_icon.cpp
+++ b/ui/tray_icon.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "tray_icon.h"
@@ -39,7 +39,7 @@ wxIcon generateIcon(size_t percent) //generate icon with progress indicator
if (buffer.first == indicatorHeight)
return buffer.second;
- wxImage genImage(trayIcon.ConvertToImage());
+ wxImage genImage(trayIcon.ConvertToImage());
if ( genImage.GetWidth() > 0 &&
genImage.GetHeight() > 0)
diff --git a/ui/tray_icon.h b/ui/tray_icon.h
index b351dfc8..1207d1fa 100644
--- a/ui/tray_icon.h
+++ b/ui/tray_icon.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef TRAYICON_H_INCLUDED
diff --git a/version/version.h b/version/version.h
index b1d104bd..febc8f0f 100644
--- a/version/version.h
+++ b/version/version.h
@@ -2,5 +2,5 @@
namespace ffs3
{
- const wxString currentVersion = wxT("3.12"); //internal linkage!
+ const wxString currentVersion = wxT("3.13"); //internal linkage!
}
diff --git a/version/version.rc b/version/version.rc
index e9dcc18a..23330588 100644
--- a/version/version.rc
+++ b/version/version.rc
@@ -1,2 +1,2 @@
-#define VER_FREEFILESYNC 3,12,0,0
-#define VER_FREEFILESYNC_STR "3.12\0"
+#define VER_FREEFILESYNC 3,13,0,0
+#define VER_FREEFILESYNC_STR "3.13\0"
bgstack15