diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:08:06 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:08:06 +0200 |
commit | fbe76102e941b9f1edaf236788e42678f05fdf9a (patch) | |
tree | f5f538316019fa89be8dc478103490c3a826f3ac | |
parent | 3.8 (diff) | |
download | FreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.tar.gz FreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.tar.bz2 FreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.zip |
3.9
-rw-r--r-- | Application.cpp | 70 | ||||
-rw-r--r-- | Application.h | 2 | ||||
-rw-r--r-- | BUILD/Changelog.txt | 19 | ||||
-rw-r--r-- | BUILD/FreeFileSync.chm | bin | 374528 -> 376650 bytes | |||
-rw-r--r-- | BUILD/Help/Table of Contents.hhc | 2 | ||||
-rw-r--r-- | BUILD/Help/html/Features.html | 8 | ||||
-rw-r--r-- | BUILD/Help/html/Unbenannt 1.odf | bin | 0 -> 4975 bytes | |||
-rw-r--r-- | BUILD/Help/html/advanced/Batch Scripting.html | 14 | ||||
-rw-r--r-- | BUILD/Help/html/advanced/DragDrop.html | 8 | ||||
-rw-r--r-- | BUILD/Help/html/advanced/ExcludeSubfolder.html | 80 | ||||
-rw-r--r-- | BUILD/Help/html/advanced/TimeStamped.html | 29 | ||||
-rw-r--r-- | BUILD/Languages/chinese_simple.lng | 94 | ||||
-rw-r--r-- | BUILD/Languages/chinese_traditional.lng | 58 | ||||
-rw-r--r-- | BUILD/Languages/czech.lng | 60 | ||||
-rw-r--r-- | BUILD/Languages/dutch.lng | 48 | ||||
-rw-r--r-- | BUILD/Languages/english_uk.lng | 54 | ||||
-rw-r--r-- | BUILD/Languages/finnish.lng | 48 | ||||
-rw-r--r-- | BUILD/Languages/french.lng | 48 | ||||
-rw-r--r-- | BUILD/Languages/german.lng | 40 | ||||
-rw-r--r-- | BUILD/Languages/hebrew.lng | 48 | ||||
-rw-r--r-- | BUILD/Languages/hungarian.lng | 54 | ||||
-rw-r--r-- | BUILD/Languages/italian.lng | 92 | ||||
-rw-r--r-- | BUILD/Languages/japanese.lng | 48 | ||||
-rw-r--r-- | BUILD/Languages/polish.lng | 56 | ||||
-rw-r--r-- | BUILD/Languages/portuguese.lng | 48 | ||||
-rw-r--r-- | BUILD/Languages/portuguese_br.lng | 56 | ||||
-rw-r--r-- | BUILD/Languages/romanian.lng | 56 | ||||
-rw-r--r-- | BUILD/Languages/russian.lng | 120 | ||||
-rw-r--r-- | BUILD/Languages/slovenian.lng | 54 | ||||
-rw-r--r-- | BUILD/Languages/spanish.lng | 48 | ||||
-rw-r--r-- | BUILD/Languages/swedish.lng | 48 | ||||
-rw-r--r-- | BUILD/Languages/turkish.lng | 46 | ||||
-rw-r--r-- | BUILD/Resources.dat | bin | 296154 -> 296186 bytes | |||
-rw-r--r-- | Cleanup.cmd | 2 | ||||
-rw-r--r-- | FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj | 310 | ||||
-rw-r--r-- | FreeFileSync.cbp | 206 | ||||
-rw-r--r-- | FreeFileSync.vcxproj | 121 | ||||
-rw-r--r-- | Makefile | 82 | ||||
-rw-r--r-- | RealtimeSync/RealtimeSync.cbp | 84 | ||||
-rw-r--r-- | RealtimeSync/RealtimeSync.vcxproj | 81 | ||||
-rw-r--r-- | RealtimeSync/application.cpp | 16 | ||||
-rw-r--r-- | RealtimeSync/functions.cpp | 10 | ||||
-rw-r--r-- | RealtimeSync/functions.h | 2 | ||||
-rw-r--r-- | RealtimeSync/gui_generated.cpp (renamed from RealtimeSync/guiGenerated.cpp) | 4 | ||||
-rw-r--r-- | RealtimeSync/gui_generated.h (renamed from RealtimeSync/guiGenerated.h) | 0 | ||||
-rw-r--r-- | RealtimeSync/main_dlg.cpp (renamed from RealtimeSync/mainDialog.cpp) | 76 | ||||
-rw-r--r-- | RealtimeSync/main_dlg.h (renamed from RealtimeSync/mainDialog.h) | 10 | ||||
-rw-r--r-- | RealtimeSync/makefile | 43 | ||||
-rw-r--r-- | RealtimeSync/notify.cpp | 268 | ||||
-rw-r--r-- | RealtimeSync/notify.h | 40 | ||||
-rw-r--r-- | RealtimeSync/pch.h | 6 | ||||
-rw-r--r-- | RealtimeSync/resources.cpp | 8 | ||||
-rw-r--r-- | RealtimeSync/tray_menu.cpp (renamed from RealtimeSync/trayMenu.cpp) | 52 | ||||
-rw-r--r-- | RealtimeSync/tray_menu.h (renamed from RealtimeSync/trayMenu.h) | 4 | ||||
-rw-r--r-- | RealtimeSync/watcher.cpp | 372 | ||||
-rw-r--r-- | RealtimeSync/watcher.h | 4 | ||||
-rw-r--r-- | RealtimeSync/xml_ffs.cpp (renamed from RealtimeSync/xmlFreeFileSync.cpp) | 34 | ||||
-rw-r--r-- | RealtimeSync/xml_ffs.h (renamed from RealtimeSync/xmlFreeFileSync.h) | 4 | ||||
-rw-r--r-- | RealtimeSync/xml_proc.cpp (renamed from RealtimeSync/xmlProcessing.cpp) | 4 | ||||
-rw-r--r-- | RealtimeSync/xml_proc.h (renamed from RealtimeSync/xmlProcessing.h) | 2 | ||||
-rw-r--r-- | algorithm.cpp | 107 | ||||
-rw-r--r-- | algorithm.h | 4 | ||||
-rw-r--r-- | comparison.cpp | 296 | ||||
-rw-r--r-- | comparison.h | 15 | ||||
-rw-r--r-- | file_hierarchy.cpp (renamed from fileHierarchy.cpp) | 20 | ||||
-rw-r--r-- | file_hierarchy.h (renamed from fileHierarchy.h) | 82 | ||||
-rw-r--r-- | library/binary.cpp | 8 | ||||
-rw-r--r-- | library/binary.h | 4 | ||||
-rw-r--r-- | library/custom_grid.cpp (renamed from library/CustomGrid.cpp) | 34 | ||||
-rw-r--r-- | library/custom_grid.h (renamed from library/CustomGrid.h) | 22 | ||||
-rw-r--r-- | library/db_file.cpp (renamed from library/dbFile.cpp) | 84 | ||||
-rw-r--r-- | library/db_file.h (renamed from library/dbFile.h) | 4 | ||||
-rw-r--r-- | library/detect_renaming.cpp (renamed from library/detectRenaming.cpp) | 2 | ||||
-rw-r--r-- | library/detect_renaming.h (renamed from library/detectRenaming.h) | 6 | ||||
-rw-r--r-- | library/dir_lock.cpp | 448 | ||||
-rw-r--r-- | library/dir_lock.h | 35 | ||||
-rw-r--r-- | library/error_log.cpp (renamed from library/errorLogging.cpp) | 4 | ||||
-rw-r--r-- | library/error_log.h (renamed from library/errorLogging.h) | 2 | ||||
-rw-r--r-- | library/filter.cpp | 38 | ||||
-rw-r--r-- | library/filter.h | 2 | ||||
-rw-r--r-- | library/icon_buffer.cpp (renamed from library/iconBuffer.cpp) | 163 | ||||
-rw-r--r-- | library/icon_buffer.h (renamed from library/iconBuffer.h) | 11 | ||||
-rw-r--r-- | library/pch.h | 9 | ||||
-rw-r--r-- | library/process_xml.cpp (renamed from library/processXml.cpp) | 270 | ||||
-rw-r--r-- | library/process_xml.h (renamed from library/processXml.h) | 48 | ||||
-rw-r--r-- | library/resources.cpp | 10 | ||||
-rw-r--r-- | library/soft_filter.cpp (renamed from library/softFilter.cpp) | 2 | ||||
-rw-r--r-- | library/soft_filter.h (renamed from library/softFilter.h) | 4 | ||||
-rw-r--r-- | library/statistics.cpp | 42 | ||||
-rw-r--r-- | library/statistics.h | 2 | ||||
-rw-r--r-- | library/status_handler.cpp (renamed from library/statusHandler.cpp) | 2 | ||||
-rw-r--r-- | library/status_handler.h (renamed from library/statusHandler.h) | 0 | ||||
-rw-r--r-- | resource.rc | 2 | ||||
-rw-r--r-- | shared/IFileOperation/FileOperation_Vista.vcxproj | 6 | ||||
-rw-r--r-- | shared/IFileOperation/dll_main.cpp (renamed from shared/IFileOperation/dllmain.cpp) | 14 | ||||
-rw-r--r-- | shared/IFileOperation/file_op.cpp (renamed from shared/IFileOperation/fileOp.cpp) | 107 | ||||
-rw-r--r-- | shared/IFileOperation/file_op.h (renamed from shared/IFileOperation/fileOp.h) | 0 | ||||
-rw-r--r-- | shared/ShadowCopy/Shadow_2003.vcxproj | 2 | ||||
-rw-r--r-- | shared/ShadowCopy/Shadow_XP.vcxproj | 2 | ||||
-rw-r--r-- | shared/ShadowCopy/dll_main.cpp (renamed from shared/ShadowCopy/dllmain.cpp) | 14 | ||||
-rw-r--r-- | shared/ShadowCopy/shadow.cpp | 139 | ||||
-rw-r--r-- | shared/ShadowCopy/shadow.h | 2 | ||||
-rw-r--r-- | shared/Taskbar_Seven/Taskbar_Seven.vcxproj | 2 | ||||
-rw-r--r-- | shared/Taskbar_Seven/dll_main.cpp (renamed from shared/Taskbar_Seven/dllmain.cpp) | 16 | ||||
-rw-r--r-- | shared/Taskbar_Seven/taskbar.cpp | 30 | ||||
-rw-r--r-- | shared/app_main.cpp (renamed from shared/appMain.cpp) | 6 | ||||
-rw-r--r-- | shared/app_main.h (renamed from shared/appMain.h) | 2 | ||||
-rw-r--r-- | shared/assert_static.h | 37 | ||||
-rw-r--r-- | shared/build_info.h (renamed from shared/buildInfo.h) | 2 | ||||
-rw-r--r-- | shared/checkExist.cpp | 54 | ||||
-rw-r--r-- | shared/checkExist.h | 19 | ||||
-rw-r--r-- | shared/check_exist.cpp | 83 | ||||
-rw-r--r-- | shared/check_exist.h | 25 | ||||
-rw-r--r-- | shared/com_error.h | 77 | ||||
-rw-r--r-- | shared/com_ptr.h | 186 | ||||
-rw-r--r-- | shared/com_util.h | 155 | ||||
-rw-r--r-- | shared/custom_button.cpp (renamed from shared/customButton.cpp) | 2 | ||||
-rw-r--r-- | shared/custom_button.h (renamed from shared/customButton.h) | 0 | ||||
-rw-r--r-- | shared/custom_combo_box.cpp (renamed from shared/customComboBox.cpp) | 2 | ||||
-rw-r--r-- | shared/custom_combo_box.h (renamed from shared/customComboBox.h) | 0 | ||||
-rw-r--r-- | shared/custom_tooltip.cpp (renamed from shared/customTooltip.cpp) | 2 | ||||
-rw-r--r-- | shared/custom_tooltip.h (renamed from shared/customTooltip.h) | 0 | ||||
-rw-r--r-- | shared/debug_new.cpp (renamed from shared/debugNew.cpp) | 2 | ||||
-rw-r--r-- | shared/debug_new.h (renamed from shared/debugNew.h) | 4 | ||||
-rw-r--r-- | shared/dll_loader.cpp (renamed from shared/dllLoader.cpp) | 12 | ||||
-rw-r--r-- | shared/dll_loader.h (renamed from shared/dllLoader.h) | 2 | ||||
-rw-r--r-- | shared/drag_n_drop.cpp (renamed from shared/dragAndDrop.cpp) | 60 | ||||
-rw-r--r-- | shared/drag_n_drop.h (renamed from shared/dragAndDrop.h) | 5 | ||||
-rw-r--r-- | shared/file_error.h (renamed from shared/fileError.h) | 11 | ||||
-rw-r--r-- | shared/file_handling.cpp (renamed from shared/fileHandling.cpp) | 879 | ||||
-rw-r--r-- | shared/file_handling.h (renamed from shared/fileHandling.h) | 22 | ||||
-rw-r--r-- | shared/file_id.cpp (renamed from shared/fileID.cpp) | 28 | ||||
-rw-r--r-- | shared/file_id.h (renamed from shared/fileID.h) | 34 | ||||
-rw-r--r-- | shared/file_io.cpp (renamed from shared/fileIO.cpp) | 52 | ||||
-rw-r--r-- | shared/file_io.h (renamed from shared/fileIO.h) | 10 | ||||
-rw-r--r-- | shared/file_traverser.cpp (renamed from shared/fileTraverser.cpp) | 48 | ||||
-rw-r--r-- | shared/file_traverser.h (renamed from shared/fileTraverser.h) | 4 | ||||
-rw-r--r-- | shared/global_func.cpp (renamed from shared/globalFunctions.cpp) | 10 | ||||
-rw-r--r-- | shared/global_func.h (renamed from shared/globalFunctions.h) | 22 | ||||
-rw-r--r-- | shared/guid.cpp | 18 | ||||
-rw-r--r-- | shared/guid.h | 3 | ||||
-rw-r--r-- | shared/help_provider.cpp (renamed from shared/helpProvider.cpp) | 8 | ||||
-rw-r--r-- | shared/help_provider.h (renamed from shared/helpProvider.h) | 2 | ||||
-rw-r--r-- | shared/localization.cpp | 24 | ||||
-rw-r--r-- | shared/localization.h | 2 | ||||
-rw-r--r-- | shared/lock.cpp | 8 | ||||
-rw-r--r-- | shared/long_path_prefix.cpp (renamed from shared/longPathPrefix.cpp) | 8 | ||||
-rw-r--r-- | shared/long_path_prefix.h (renamed from shared/longPathPrefix.h) | 2 | ||||
-rw-r--r-- | shared/parallelCall.cpp | 159 | ||||
-rw-r--r-- | shared/parallelCall.h | 34 | ||||
-rw-r--r-- | shared/perf.h | 42 | ||||
-rw-r--r-- | shared/recycler.cpp | 42 | ||||
-rw-r--r-- | shared/recycler.h | 4 | ||||
-rw-r--r-- | shared/serialize.cpp | 6 | ||||
-rw-r--r-- | shared/serialize.h | 4 | ||||
-rw-r--r-- | shared/shadow.cpp | 204 | ||||
-rw-r--r-- | shared/shadow.h | 22 | ||||
-rw-r--r-- | shared/signal_processing.h | 166 | ||||
-rw-r--r-- | shared/standard_paths.cpp (renamed from shared/standardPaths.cpp) | 32 | ||||
-rw-r--r-- | shared/standard_paths.h (renamed from shared/standardPaths.h) | 2 | ||||
-rw-r--r-- | shared/staticAssert.h | 24 | ||||
-rw-r--r-- | shared/string_conv.h (renamed from shared/stringConv.h) | 2 | ||||
-rw-r--r-- | shared/system_constants.h (renamed from shared/systemConstants.h) | 2 | ||||
-rw-r--r-- | shared/system_func.cpp (renamed from shared/systemFunctions.cpp) | 10 | ||||
-rw-r--r-- | shared/system_func.h (renamed from shared/systemFunctions.h) | 2 | ||||
-rw-r--r-- | shared/taskbar.cpp | 28 | ||||
-rw-r--r-- | shared/taskbar.h | 2 | ||||
-rw-r--r-- | shared/toggle_button.cpp (renamed from shared/toggleButton.cpp) | 2 | ||||
-rw-r--r-- | shared/toggle_button.h (renamed from shared/toggleButton.h) | 0 | ||||
-rw-r--r-- | shared/util.cpp | 42 | ||||
-rw-r--r-- | shared/util.h | 12 | ||||
-rw-r--r-- | shared/xml_base.cpp (renamed from shared/xmlBase.cpp) | 22 | ||||
-rw-r--r-- | shared/xml_base.h (renamed from shared/xmlBase.h) | 14 | ||||
-rw-r--r-- | shared/xml_error.h (renamed from shared/xmlError.h) | 2 | ||||
-rw-r--r-- | shared/zstring.cpp | 36 | ||||
-rw-r--r-- | shared/zstring.h | 55 | ||||
-rw-r--r-- | structures.cpp | 72 | ||||
-rw-r--r-- | structures.h | 40 | ||||
-rw-r--r-- | synchronization.cpp | 285 | ||||
-rw-r--r-- | synchronization.h | 10 | ||||
-rw-r--r-- | ui/batch_config.cpp (renamed from ui/batchConfig.cpp) | 105 | ||||
-rw-r--r-- | ui/batch_config.h (renamed from ui/batchConfig.h) | 10 | ||||
-rw-r--r-- | ui/batch_status_handler.cpp (renamed from ui/batchStatusHandler.cpp) | 50 | ||||
-rw-r--r-- | ui/batch_status_handler.h (renamed from ui/batchStatusHandler.h) | 16 | ||||
-rw-r--r-- | ui/check_version.cpp (renamed from ui/checkVersion.cpp) | 58 | ||||
-rw-r--r-- | ui/check_version.h (renamed from ui/checkVersion.h) | 2 | ||||
-rw-r--r-- | ui/folder_pair.h (renamed from ui/folderPair.h) | 20 | ||||
-rw-r--r-- | ui/grid_view.cpp (renamed from ui/gridView.cpp) | 14 | ||||
-rw-r--r-- | ui/grid_view.h (renamed from ui/gridView.h) | 8 | ||||
-rw-r--r-- | ui/guiGenerated.cpp | 3768 | ||||
-rw-r--r-- | ui/guiGenerated.h | 1443 | ||||
-rw-r--r-- | ui/gui_generated.cpp | 3782 | ||||
-rw-r--r-- | ui/gui_generated.h | 1042 | ||||
-rw-r--r-- | ui/gui_status_handler.cpp (renamed from ui/guiStatusHandler.cpp) | 22 | ||||
-rw-r--r-- | ui/gui_status_handler.h (renamed from ui/guiStatusHandler.h) | 8 | ||||
-rw-r--r-- | ui/is_null_filter.h (renamed from ui/isNullFilter.h) | 2 | ||||
-rw-r--r-- | ui/main_dlg.cpp (renamed from ui/MainDialog.cpp) | 364 | ||||
-rw-r--r-- | ui/main_dlg.h (renamed from ui/MainDialog.h) | 14 | ||||
-rw-r--r-- | ui/mouse_move_dlg.cpp (renamed from ui/mouseMoveWindow.cpp) | 4 | ||||
-rw-r--r-- | ui/mouse_move_dlg.h (renamed from ui/mouseMoveWindow.h) | 2 | ||||
-rw-r--r-- | ui/msg_popup.cpp (renamed from ui/messagePopup.cpp) | 2 | ||||
-rw-r--r-- | ui/msg_popup.h (renamed from ui/messagePopup.h) | 2 | ||||
-rw-r--r-- | ui/progress_indicator.cpp (renamed from ui/progressIndicator.cpp) | 38 | ||||
-rw-r--r-- | ui/progress_indicator.h (renamed from ui/progressIndicator.h) | 2 | ||||
-rw-r--r-- | ui/search.cpp | 6 | ||||
-rw-r--r-- | ui/search.h | 2 | ||||
-rw-r--r-- | ui/small_dlgs.cpp (renamed from ui/SmallDialogs.cpp) | 94 | ||||
-rw-r--r-- | ui/small_dlgs.h (renamed from ui/SmallDialogs.h) | 6 | ||||
-rw-r--r-- | ui/sorting.h | 48 | ||||
-rw-r--r-- | ui/switch_to_gui.cpp (renamed from ui/switchToGui.cpp) | 6 | ||||
-rw-r--r-- | ui/switch_to_gui.h (renamed from ui/switchToGui.h) | 4 | ||||
-rw-r--r-- | ui/sync_cfg.cpp (renamed from ui/syncConfig.cpp) | 42 | ||||
-rw-r--r-- | ui/sync_cfg.h (renamed from ui/syncConfig.h) | 30 | ||||
-rw-r--r-- | ui/tray_icon.cpp (renamed from ui/trayIcon.cpp) | 6 | ||||
-rw-r--r-- | ui/tray_icon.h (renamed from ui/trayIcon.h) | 0 | ||||
-rw-r--r-- | version/version.h | 4 | ||||
-rw-r--r-- | version/version.rc | 4 |
217 files changed, 10775 insertions, 8983 deletions
diff --git a/Application.cpp b/Application.cpp index d0a05124..120bd567 100644 --- a/Application.cpp +++ b/Application.cpp @@ -5,36 +5,37 @@ // ************************************************************************** // #include "application.h" -#include "ui/mainDialog.h" +#include "ui/main_dlg.h" #include <wx/msgdlg.h> #include "comparison.h" #include "algorithm.h" #include "synchronization.h" #include <memory> -#include "ui/batchStatusHandler.h" -#include "ui/checkVersion.h" +#include "ui/batch_status_handler.h" +#include "ui/check_version.h" #include "library/filter.h" #include <wx/file.h> -#include "shared/xmlBase.h" +#include "shared/xml_base.h" #include "library/resources.h" -#include "ui/switchToGui.h" -#include "shared/standardPaths.h" +#include "ui/switch_to_gui.h" +#include "shared/standard_paths.h" #include "shared/localization.h" -#include "shared/appMain.h" +#include "shared/app_main.h" #include <wx/sound.h> -#include "shared/fileHandling.h" -#include "shared/stringConv.h" +#include "shared/file_handling.h" +#include "shared/string_conv.h" #ifdef FFS_LINUX #include <gtk/gtk.h> #endif -using FreeFileSync::CustomLocale; -using FreeFileSync::SwitchToGui; +using ffs3::CustomLocale; +using ffs3::SwitchToGui; IMPLEMENT_APP(Application) + bool Application::OnInit() { returnValue = 0; @@ -50,7 +51,7 @@ bool Application::OnInit() void Application::OnStartApplication(wxIdleEvent&) { - using namespace FreeFileSync; + using namespace ffs3; Disconnect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), NULL, this); @@ -63,7 +64,7 @@ void Application::OnStartApplication(wxIdleEvent&) ~HandleAppExit() { - if (!FreeFileSync::AppMainWindow::mainWindowWasSet()) + if (!ffs3::AppMainWindow::mainWindowWasSet()) wxTheApp->ExitMainLoop(); //quit application, if no main window was set (batch silent mode) } @@ -74,7 +75,7 @@ void Application::OnStartApplication(wxIdleEvent&) SetAppName(wxT("FreeFileSync")); #ifdef FFS_LINUX - ::gtk_rc_parse(FreeFileSync::wxToZ(FreeFileSync::getResourceDir()) + "styles.rc"); //remove inner border from bitmap buttons + ::gtk_rc_parse(ffs3::wxToZ(ffs3::getResourceDir()) + "styles.rc"); //remove inner border from bitmap buttons #endif @@ -104,16 +105,16 @@ void Application::OnStartApplication(wxIdleEvent&) try //load global settings from XML { if (fileExists(wxToZ(xmlAccess::getGlobalConfigFile()))) - xmlAccess::readGlobalSettings(globalSettings); + xmlAccess::readConfig(globalSettings); //else: globalSettings already has default values } catch (const xmlAccess::XmlError& error) { //show messagebox and continue if (error.getSeverity() == xmlAccess::XmlError::WARNING) - ; //wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING); -> ignore parsing errors: should be migration problems only *cross-fingers* + ; //wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); -> ignore parsing errors: should be migration problems only *cross-fingers* else - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); } //set program language @@ -161,10 +162,10 @@ int Application::OnRun() catch (const std::exception& e) //catch all STL exceptions { //unfortunately it's not always possible to display a message box in this erroneous situation, however (non-stream) file output always works! - wxFile safeOutput(FreeFileSync::getConfigDir() + wxT("LastError.txt"), wxFile::write); + wxFile safeOutput(ffs3::getConfigDir() + wxT("LastError.txt"), wxFile::write); safeOutput.Write(wxString::FromAscii(e.what())); - wxMessageBox(wxString::FromAscii(e.what()), _("An exception occured!"), wxOK | wxICON_ERROR); + wxMessageBox(wxString::FromAscii(e.what()), _("An exception occurred!"), wxOK | wxICON_ERROR); return -9; } @@ -179,11 +180,11 @@ int Application::OnExit() try //save global settings to XML { - xmlAccess::writeGlobalSettings(globalSettings); + xmlAccess::writeConfig(globalSettings); } catch (const xmlAccess::XmlError& error) { - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); } return 0; @@ -205,18 +206,18 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet xmlAccess::XmlBatchConfig batchCfg; //structure to receive gui settings try { - xmlAccess::readBatchConfig(filename, batchCfg); + xmlAccess::readConfig(filename, batchCfg); } catch (const xmlAccess::XmlError& error) { - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); return; } //all settings have been read successfully... //regular check for program updates -> disabled for batch //if (!batchCfg.silent) - // FreeFileSync::checkForUpdatePeriodically(globSettings.lastUpdateCheck); + // ffs3::checkForUpdatePeriodically(globSettings.lastUpdateCheck); try //begin of synchronization process (all in one try-catch block) { @@ -230,14 +231,14 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet statusHandler.reset(new BatchStatusHandler(false, filename, NULL, batchCfg.handleError, switchBatchToGui, returnValue)); //COMPARE DIRECTORIES - FreeFileSync::FolderComparison folderCmp; - FreeFileSync::CompareProcess comparison(batchCfg.mainCfg.handleSymlinks, - batchCfg.mainCfg.hidden.fileTimeTolerance, + ffs3::FolderComparison folderCmp; + ffs3::CompareProcess comparison(batchCfg.mainCfg.handleSymlinks, + globSettings.fileTimeTolerance, globSettings.ignoreOneHourDiff, globSettings.optDialogs, statusHandler.get()); - comparison.startCompareProcess(FreeFileSync::extractCompareCfg(batchCfg.mainCfg), + comparison.startCompareProcess(ffs3::extractCompareCfg(batchCfg.mainCfg), batchCfg.mainCfg.compareVar, folderCmp); @@ -249,23 +250,24 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet } //START SYNCHRONIZATION - FreeFileSync::SyncProcess synchronization( + ffs3::SyncProcess synchronization( globSettings.optDialogs, - batchCfg.mainCfg.hidden.verifyFileCopy, + globSettings.verifyFileCopy, globSettings.copyLockedFiles, + globSettings.copyFilePermissions, *statusHandler); - const std::vector<FreeFileSync::FolderPairSyncCfg> syncProcessCfg = FreeFileSync::extractSyncCfg(batchCfg.mainCfg); + const std::vector<ffs3::FolderPairSyncCfg> syncProcessCfg = ffs3::extractSyncCfg(batchCfg.mainCfg); assert(syncProcessCfg.size() == folderCmp.size()); synchronization.startSynchronizationProcess(syncProcessCfg, folderCmp); //play (optional) sound notification after sync has completed (GUI and batch mode) - const wxString soundFile = FreeFileSync::getResourceDir() + wxT("Sync_Complete.wav"); - if (FreeFileSync::fileExists(FreeFileSync::wxToZ(soundFile))) + const wxString soundFile = ffs3::getResourceDir() + wxT("Sync_Complete.wav"); + if (ffs3::fileExists(ffs3::wxToZ(soundFile))) wxSound::Play(soundFile, wxSOUND_ASYNC); } - catch (FreeFileSync::AbortThisProcess&) //exit used by statusHandler + catch (ffs3::AbortThisProcess&) //exit used by statusHandler { if (returnValue >= 0) returnValue = -12; diff --git a/Application.h b/Application.h index cf69890d..bfc4a45f 100644 --- a/Application.h +++ b/Application.h @@ -8,7 +8,7 @@ #define FREEFILESYNCAPP_H #include <wx/app.h> -#include "library/processXml.h" +#include "library/process_xml.h" class Application : public wxApp diff --git a/BUILD/Changelog.txt b/BUILD/Changelog.txt index a896ab4a..693d96fc 100644 --- a/BUILD/Changelog.txt +++ b/BUILD/Changelog.txt @@ -2,6 +2,25 @@ |FreeFileSync| -------------- +Changelog v3.9 +-------------- +Advanced locking strategy to allow multiple processes synchronize the same directories (e.g. via network share) +Merge multiple *.ffs_batch, *.ffs_gui files or combinations of both via drag & drop +Copy file and folder permissions (requires admin rights): + - Windows: owner, group, DACL, SACL + - Linux: owner, group, permissions + - correctly handle Symbolic Links + - new option in global settings +Compare by content evaluates Symbolic Links +32-Bit build compiled with MinGW/GCC to preserve Windows 2000 compatibility +RealtimeSync: Handle requests for device removal (USB stick) while monitoring +Sort by filesize: group symlinks before directories +Added macros %week%, %month%, %year% for creating time-stamped directories +Touch database file when changes occured only +Moved settings "file time tolerance" and "verify copied files" to GlobalSettings.xml +Updated translation files + + Changelog v3.8 -------------- New options handling Symlinks: ignore/direct/follow => warning: new database format for <Automatic> mode diff --git a/BUILD/FreeFileSync.chm b/BUILD/FreeFileSync.chm Binary files differindex 0772a6ac..cfcf6752 100644 --- a/BUILD/FreeFileSync.chm +++ b/BUILD/FreeFileSync.chm diff --git a/BUILD/Help/Table of Contents.hhc b/BUILD/Help/Table of Contents.hhc index e57b8399..35ad8d46 100644 --- a/BUILD/Help/Table of Contents.hhc +++ b/BUILD/Help/Table of Contents.hhc @@ -53,7 +53,7 @@ <param name="Local" value="html\advanced\SendMail.html"> </OBJECT> <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Exclude subfolders"> + <param name="Name" value="Exclude via filter"> <param name="Local" value="html\advanced\ExcludeSubfolder.html"> </OBJECT> <LI> <OBJECT type="text/sitemap"> diff --git a/BUILD/Help/html/Features.html b/BUILD/Help/html/Features.html index 195794b2..0bf33088 100644 --- a/BUILD/Help/html/Features.html +++ b/BUILD/Help/html/Features.html @@ -3,9 +3,9 @@ <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE></TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.1 (Win32)"> + <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> <META NAME="CREATED" CONTENT="20091206;16574000"> - <META NAME="CHANGED" CONTENT="20100207;17105100"> + <META NAME="CHANGED" CONTENT="20100807;20464900"> <STYLE TYPE="text/css"> <!-- @page { margin: 2cm } @@ -13,6 +13,7 @@ H3 { margin-bottom: 0.21cm } H3.western { font-family: "Arial", sans-serif } H3.cjk { font-family: "MS Mincho" } + H3.ctl { font-family: "Mangal" } A:link { so-language: zxx } --> </STYLE> @@ -110,6 +111,9 @@ regular backups with macros %time%, %date% within directory names</FONT></P> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Copy file and folder create/access/modification times when synchronizing</FONT></P> + <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> </OL> </BODY> </HTML>
\ No newline at end of file diff --git a/BUILD/Help/html/Unbenannt 1.odf b/BUILD/Help/html/Unbenannt 1.odf Binary files differnew file mode 100644 index 00000000..e51231f5 --- /dev/null +++ b/BUILD/Help/html/Unbenannt 1.odf diff --git a/BUILD/Help/html/advanced/Batch Scripting.html b/BUILD/Help/html/advanced/Batch Scripting.html index 3629edf3..c7436792 100644 --- a/BUILD/Help/html/advanced/Batch Scripting.html +++ b/BUILD/Help/html/advanced/Batch Scripting.html @@ -5,7 +5,7 @@ <TITLE></TITLE> <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> <META NAME="CREATED" CONTENT="20091206;16574000"> - <META NAME="CHANGED" CONTENT="20100418;14135000"> + <META NAME="CHANGED" CONTENT="20100807;21103000"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -17,6 +17,7 @@ H3 { margin-bottom: 0.21cm } H3.western { font-family: "Arial", sans-serif } H3.cjk { font-family: "MS Mincho" } + H3.ctl { font-family: "Mangal" } A:link { so-language: zxx } --> </STYLE> @@ -34,8 +35,9 @@ some general hints for custom *.cmd and *.bat files.</FONT></P> <P STYLE="margin-bottom: 0cm"><BR> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B> -(A simple locking facility when sync'ing with multiple computers in -parallel)</FONT></P> +A simple locking facility – (<SPAN STYLE="font-style: normal"><B>Note:</B></SPAN><I> +FreeFileSync already has a more powerful directory locking mechanism +implemented that allows multiple writers in parallel</I>)</FONT></P> <UL> <P><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"> @@ -68,7 +70,7 @@ parallel)</FONT></P> <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm"> <FONT FACE="Courier New, monospace">wscript C:\Program files\FreeFileSync\Invisible.vbs C:\MyBatchFile.cmd</FONT></P> - </SPAN><BR CLEAR=LEFT><FONT COLOR="#808080"> </FONT> + </SPAN><BR CLEAR=LEFT><FONT COLOR="#808080"> </FONT> </P> </OL> <OL START=3> @@ -80,8 +82,8 @@ parallel)</FONT></P> Files\FreeFileSync\FreeFileSync.exe" "H:\Silent_Config.ffs_batch"<BR>if not errorlevel 0 (<BR> </FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::if - something went wrong, add special treatment here<BR></B></I></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal"> echo - Errors occurred during synchronization...</SPAN></SPAN></FONT></FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B><BR></B></I></FONT></FONT><FONT FACE="Courier New, monospace"> pause<BR>)</FONT></P> + something went wrong, add special treatment here<BR></B></I></FONT></FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">echo + Errors occurred during synchronization...</SPAN></SPAN></FONT></FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B><BR></B></I></FONT></FONT> <FONT FACE="Courier New, monospace">pause<BR>)</FONT></P> </SPAN><BR CLEAR=LEFT> </P> </OL> diff --git a/BUILD/Help/html/advanced/DragDrop.html b/BUILD/Help/html/advanced/DragDrop.html index e9e580ca..1f08a07a 100644 --- a/BUILD/Help/html/advanced/DragDrop.html +++ b/BUILD/Help/html/advanced/DragDrop.html @@ -3,9 +3,9 @@ <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE></TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)"> + <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> <META NAME="CREATED" CONTENT="20091206;16574000"> - <META NAME="CHANGED" CONTENT="20091209;21062300"> + <META NAME="CHANGED" CONTENT="20100729;21153900"> <STYLE TYPE="text/css"> <!-- @page { margin: 2cm } @@ -13,6 +13,7 @@ H3 { margin-bottom: 0.21cm } H3.western { font-family: "Arial", sans-serif } H3.cjk { font-family: "MS Mincho" } + H3.ctl { font-family: "Mangal" } A:link { so-language: zxx } --> </STYLE> @@ -45,6 +46,9 @@ supported in various situations:</FONT></P> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">drag & drop *.ffs_batch files onto the batch dialog to display and edit the batch configuration</FONT></P> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">merge + multiple *.ffs_batch, *.ffs_gui files or combinations of both via + drag & drop</FONT></P> </UL> </UL> </BODY> diff --git a/BUILD/Help/html/advanced/ExcludeSubfolder.html b/BUILD/Help/html/advanced/ExcludeSubfolder.html index 550ba633..239d88b9 100644 --- a/BUILD/Help/html/advanced/ExcludeSubfolder.html +++ b/BUILD/Help/html/advanced/ExcludeSubfolder.html @@ -3,9 +3,9 @@ <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE></TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)"> + <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> <META NAME="CREATED" CONTENT="20091206;16574000"> - <META NAME="CHANGED" CONTENT="20091209;20394400"> + <META NAME="CHANGED" CONTENT="20100711;12255900"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -17,18 +17,68 @@ 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="de-DE" DIR="LTR"> -<H3 CLASS="western"><FONT FACE="Tahoma, sans-serif">Exclude -subfolders from synchronization</FONT></H3> +<BODY LANG="en-US" DIR="LTR"> +<H3 CLASS="western"><FONT FACE="Tahoma, sans-serif">Exclude via +filter</FONT></H3> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Excluding +files and directories woks by specifying a phrase that is compared +against a file or directory path. Only if the file/directory matches +at least one entry in the include list and none of the entries in the +exclude list it passes filtering. The phrase is also a file or +directory name, but it must be relative to the base sync-directory +and may additionally include wildcards like '*' or '?'.</FONT></P> <P STYLE="margin-bottom: 0cm"><BR> </P> -<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">In -order to synchronize all files from base synchronization directories -excluding all subfolders, simply set up a filter like this:</FONT></P> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B> +<SPAN STYLE="font-weight: normal">(Mirror-Sync from </SPAN><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">C:\Source</SPAN></FONT> +<SPAN STYLE="font-weight: normal">to </SPAN><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">D:\Target)</SPAN></FONT></FONT></P> +<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Exclude + single file </SPAN></FONT><FONT FACE="Courier New, monospace">C:\Source\file.txt:<BR></FONT> <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Filter: + </SPAN></FONT><FONT FACE="Courier New, monospace">\file.txt</FONT></P> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Exclude + single folder </SPAN></FONT><FONT FACE="Courier New, monospace">C:\Source\sample\subfolder:<BR></FONT> <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Filter: + </SPAN></FONT><FONT FACE="Courier New, monospace">\sample\subfolder</FONT></P> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Exclude + all </SPAN></FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">*.tmp</SPAN></FONT> + <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">files + beyond </SPAN></FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">subfolder</SPAN></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">:<BR></SPAN></FONT> <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Filter: + </SPAN></FONT><FONT FACE="Courier New, monospace">\sample\subfolder\*.tmp</FONT></P> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Exclude + all files and folders named </SPAN></FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">CVS</SPAN></FONT> + <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">within + arbitrary sub directories:<BR></SPAN></FONT> <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Filter: + </SPAN></FONT><FONT FACE="Courier New, monospace">*\CVS</FONT></P> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Exclude + all files and folders that have </SPAN></FONT><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">test</SPAN></FONT> + <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">as + part of their name:<BR></SPAN></FONT> <FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-weight: normal">Filter: + </SPAN></FONT><FONT FACE="Courier New, monospace">*test*</FONT></P> +</SPAN><BR CLEAR=LEFT><BR> +</P> +<P STYLE="margin-bottom: 0cm"><BR> +</P> +<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen3" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff"> + <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm"> + <FONT FACE="Tahoma, sans-serif"><B>Note:</B><BR>A filter phrase + „<FONT FACE="Courier New, monospace">\fileOrDir”</FONT> + matches both a file or a directory named „<FONT FACE="Courier New, monospace">fileOrDir”</FONT>. + In most cases there is no need to distinguish between a phrase to be + used for files or directories. In cases where it is clear you want + to process directories only, you can give a hint by adding a + backslash: „<FONT FACE="Courier New, monospace">\fileOrDir\”</FONT>. + Now this filter will be matched against directories only.</FONT></P> +</SPAN><BR CLEAR=LEFT><BR> +</P> +<P STYLE="margin-bottom: 0cm"><BR> +</P> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B> +<SPAN STYLE="font-weight: normal">(Exclude all sub folders</SPAN><FONT FACE="Courier New, monospace"><SPAN STYLE="font-weight: normal">)</SPAN></FONT></FONT></P> <P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 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">Include: <FONT FACE="Courier New, monospace">*</FONT><BR>Exclude: @@ -37,7 +87,17 @@ excluding all subfolders, simply set up a filter like this:</FONT></P> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">This will exclude all objects within the two directories that end with a -'<FONT FACE="Courier New, monospace">\</FONT>' character, which is -interpreted as the end of a directory name.</FONT></P> +'</FONT><FONT FACE="Courier New, monospace">\</FONT><FONT FACE="Tahoma, sans-serif">' +character, which is interpreted as the end of a directory name.</FONT></P> +<P STYLE="margin-bottom: 0cm"><BR> +</P> +<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen4" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff"> + <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm"> + <FONT FACE="Tahoma, sans-serif"><B>Note:</B><BR>In most cases + specifying a filter phrase manually is not necessary! You can + exclude files, directories and even whole lists of both directly on + main dialog via right-click context menu.</FONT></P> +</SPAN><BR CLEAR=LEFT><BR> +</P> </BODY> </HTML>
\ No newline at end of file diff --git a/BUILD/Help/html/advanced/TimeStamped.html b/BUILD/Help/html/advanced/TimeStamped.html index 6428243c..392efea2 100644 --- a/BUILD/Help/html/advanced/TimeStamped.html +++ b/BUILD/Help/html/advanced/TimeStamped.html @@ -3,9 +3,9 @@ <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE></TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)"> + <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> <META NAME="CREATED" CONTENT="20091206;16574000"> - <META NAME="CHANGED" CONTENT="20091213;16013600"> + <META NAME="CHANGED" CONTENT="20100713;20300500"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -17,6 +17,7 @@ H3 { margin-bottom: 0.21cm } H3.western { font-family: "Arial", sans-serif } H3.cjk { font-family: "MS Mincho" } + H3.ctl { font-family: "Mangal" } A:link { so-language: zxx } --> </STYLE> @@ -27,8 +28,8 @@ backups with time-stamped directory names</FONT></H3> <P STYLE="margin-bottom: 0cm"><BR> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">You can -use macros <FONT FACE="Courier New, monospace">%time%</FONT>, <FONT FACE="Courier New, monospace">%date%</FONT> -within directory names you want to synchronize.</FONT></P> +use special macros within directory names that are expanded during +synchronization.</FONT></P> <P STYLE="margin-bottom: 0cm"><BR> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT></P> @@ -38,7 +39,7 @@ which you want to backup each day into a time-stamped target directory like "<FONT FACE="Courier New, monospace">C:\Target_2009-10-08</FONT>". All that needs to be done is setting up base directories like these:</FONT></P> <UL> - <P STYLE="margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> + <P><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> <UL> <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Source folder: "<FONT FACE="Courier New, monospace">C:\Source</FONT>"<BR>Target @@ -55,5 +56,23 @@ synchronization. In order to further automate this process, you can create a *.ffs_batch file with this configuration and choose "<I>ignore errors</I>" to avoid the warning that target directory is not (yet) existing.</FONT></P> +<P STYLE="margin-bottom: 0cm"><BR> +</P> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Overview:</B></FONT></P> +<UL> + <P><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> + <UL> + <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">%time% - + </FONT>current time, format [hhmmss], e.g. "<FONT FACE="Courier New, monospace">201340</FONT>"<BR><FONT FACE="Courier New, monospace">%date% - + </FONT>current date, e.g. "<FONT FACE="Courier New, monospace">2010-07-13</FONT>"<BR><FONT FACE="Courier New, monospace">%week% - + </FONT>calendar week, e.g. "<FONT FACE="Courier New, monospace">28</FONT>"<BR><FONT FACE="Courier New, monospace">%month% - + </FONT>current month, e.g. "<FONT FACE="Courier New, monospace">July</FONT>"<BR><FONT FACE="Courier New, monospace">%year% - + </FONT>current year, e.g. "<FONT FACE="Courier New, monospace">2010</FONT>"</FONT></P> + </UL> + </SPAN><BR CLEAR=LEFT> + </P> +</UL> +<P STYLE="margin-bottom: 0cm"><BR> +</P> </BODY> </HTML>
\ No newline at end of file diff --git a/BUILD/Languages/chinese_simple.lng b/BUILD/Languages/chinese_simple.lng index 1b9d610a..6d621a2f 100644 --- a/BUILD/Languages/chinese_simple.lng +++ b/BUILD/Languages/chinese_simple.lng @@ -1,45 +1,35 @@ 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 - Byte - å—节 - GB - GB - MB - MB - day(s) - æ—¥ - hour(s) - æ—¶ - kB - kB - min - 分 - sec - 秒 %x / %y objects deleted successfully %x / %y 个对象被æˆåŠŸåˆ 除 %x Byte - +%x å—节 %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 is not a valid FreeFileSync batch file! -%x ä¸æ˜¯æœ‰æ•ˆçš„ FreeFileSync 批处ç†æ–‡ä»¶ +%x hour(s) +%x å°æ—¶ %x kB - +%x KB +%x min +%x 分 %x of %y rows in view -%x of %y 横å‘视图 +%y è¡Œä¸çš„ %x è¡Œå¯è§ %x of 1 row in view -%x of 1 行视图 +%x of 1 è¡Œå¯è§ +%x sec +%x 秒 %x% %x% &Abort @@ -99,7 +89,7 @@ &Yes 是(&Y) (Build: %x) - +(Build: %x) (Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".) (请注æ„åªæœ‰FAT/FAT32分区å—æ¤é—®é¢˜å½±å“!\nåœ¨æ‰€æœ‰å…¶ä»–æƒ…å†µä¸‹ä½ å¯ç¦ç”¨\"忽略一å°æ—¶å·®å¼‚\"这一选项.) (Requires an Internet connection!) @@ -161,7 +151,7 @@ <Last session> <最åŽä¼šè¯> <Symlink> - +<符å·è¿žæŽ¥> <multiple selection> <多选> A newer version of FreeFileSync is available: @@ -182,7 +172,7 @@ Add folder pair æ·»åŠ æˆå¯¹æ–‡ä»¶å¤¹ All directories in sync! 所有目录åŒæ¥! -An exception occured! +An exception occurred! å‘生异常! As a result the files are separated into the following categories: å…¶ç»“æžœæ˜¯æ–‡ä»¶åˆ†ä¸ºä»¥ä¸‹å‡ ç±»: @@ -233,7 +223,7 @@ Compare by \"File size and date\" Compare by... 比较选项... Comparing content of files %x -æ£åœ¨æ¯”较文件内容的百分比 %x +æ£åœ¨æ¯”较文件 %x 的内容 Comparing content... æ£åœ¨æ¯”较文件内容... Comparing files by content failed. @@ -266,6 +256,8 @@ Continue ç»§ç» Conversion error: 转æ¢é”™è¯¯: +Copy filesystem permissions +å¤åˆ¶æ–‡ä»¶ç³»ç»Ÿçš„æƒé™ Copy from left to right 从左侧å¤åˆ¶åˆ°å³ä¾§ Copy from left to right overwriting @@ -278,16 +270,16 @@ Copy locked files å¤åˆ¶è¢«é”定的文件 Copy new or updated files to right folder. å¤åˆ¶æ–°çš„或修改过的文件到å³ä¾§æ–‡ä»¶å¤¹ -Copy shared or locked files using Volume Shadow Copy Service -使用å·å½±å¤åˆ¶æœåŠ¡æ¥å¤åˆ¶å…±äº«æˆ–é”定的文件 +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +通过å·å½±å¤åˆ¶æœåŠ¡å¤åˆ¶å…±äº«æˆ–é”定的文件\n(需è¦ç®¡ç†å‘˜æƒé™) Copy to clipboard\tCTRL+C å¤åˆ¶åˆ°å‰ªè´´æ¿\tCTRL+C Copying Symbolic Link %x overwriting %y - +æ£åœ¨å¤åˆ¶ç¬¦å·è¿žæŽ¥ %x 覆盖 %y Copying Symbolic Link %x to %y - +æ£åœ¨å¤åˆ¶ç¬¦å·è¿žæŽ¥ %x 到 %y Copying file %x overwriting %y - +æ£åœ¨å¤åˆ¶æ–‡ä»¶ %x 覆盖 %y Copying file %x to %y æ£å¤åˆ¶æ–‡ä»¶ %x 到 %y Could not determine volume name for file: @@ -335,7 +327,7 @@ Delete or overwrite files permanently Delete permanently æ°¸ä¹…æ€§åˆ é™¤ Deleting Symbolic Link %x - +æ£åœ¨åˆ 除符å·è¿žæŽ¥ %x Deleting file %x æ£åˆ 除文件 %x Deleting folder %x @@ -345,7 +337,7 @@ Deletion handling Description æè¿° Direct - +直接 Directories are dependent! Be careful when setting up synchronization rules: 目录有ä¾èµ–性ï¼åœ¨è®¾ç«‹åŒæ¥è§„则时请å°å¿ƒ: Directories to watch @@ -384,6 +376,8 @@ Error 错误 Error changing modification time: 改å˜ä¿®æ”¹æ—¶é—´æ—¶å‡ºé”™: +Error copying file permissions: +å¤åˆ¶æ–‡ä»¶æƒé™æ—¶å‡ºé”™: Error copying file: å¤åˆ¶æ–‡ä»¶å‡ºé”™: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: 从åŒæ¥æ•°æ®åº“ä¸è¯»å–时出错: Error resolving symbolic link: 解决符å·é“¾æŽ¥å‡ºé”™: +Error setting privilege: +设置æƒé™æ—¶å‡ºé”™: Error starting Volume Shadow Copy Service! å¯åŠ¨å·å½±å¤åˆ¶æœåŠ¡æ—¶å‡ºé”™! Error traversing directory: é历目录出错: Error when monitoring directories. 监视目录时出错. -Error writing file attributes: -写文件属性出错: Error writing file: 写入文件出错: Error writing to synchronization database: @@ -503,13 +497,13 @@ Find what: Folder Comparison and Synchronization 文件夹比较与åŒæ¥ Follow - +è·Ÿéš Free disk space available: å¯ç”¨ç£ç›˜ç©ºé—´: FreeFileSync Batch Job FreeFileSync 批处ç†ä½œä¸š FreeFileSync at Sourceforge -FreeFileSync at Sourceforge +Sourceforge上的FreeFileSync FreeFileSync batch file FreeFileSync 批处ç†æ–‡ä»¶ FreeFileSync configuration @@ -573,7 +567,7 @@ Identify and propagate changes on both sides using a database. Deletions and con If you like FFS å¦‚æžœä½ å–œæ¬¢ FFS Ignore - +忽略 Ignore 1-hour file time difference 忽略1å°æ—¶æ–‡ä»¶æ—¶é—´å·®å¼‚ Ignore errors @@ -598,6 +592,8 @@ Initial synchronization: åˆå§‹åŒ–åŒæ¥: Integrate external applications into context menu. The following macros are available: 集æˆå¤–部应用程åºåˆ°å³é”®èœå•. 如下å®å¯ç”¨: +Invalid FreeFileSync config file! +æ— æ•ˆçš„ FreeFileSync é…置文件! Leave as unresolved conflict é—ç•™ä¸ºæœªè§£å†³çš„å†²çª Left @@ -633,7 +629,7 @@ 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 @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! è®¡åˆ’çš„ç›®å½•åˆ é™¤ä¸Žå…¶å目录和文件有冲çª! Please run a Compare first before synchronizing! åŒæ¥ä¹‹å‰è¯·å…ˆè¿›è¡Œå¯¹æ¯” -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. 按\"切æ¢\"å¯æ‰“å¼€FreeFileSync图形用户界é¢æ¨¡å—. Processing folder pair: æ£åœ¨å¤„ç†æˆå¯¹æ–‡ä»¶å¤¹: @@ -794,12 +790,12 @@ Stop åœæ¢ Swap sides ä¸¤ä¾§äº’æ¢ -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... 切æ¢è‡³FreeFileSync图形用户界é¢æ¨¡å—... Symbolic Link handling - +æ£åœ¨å¤„ç†ç¬¦å·è¿žæŽ¥ Symlinks %x have the same date but a different target! - +符å·è¿žæŽ¥ %x 有相åŒçš„æ—¥æœŸä½†ç›®æ ‡ä¸åŒ! Synchronization Preview åŒæ¥é¢„览 Synchronization aborted! @@ -825,7 +821,7 @@ 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- 所有目录转为å¯ç”¨çŠ¶æ€(例如æ’å…¥U盘)\n- 目录或å目录里的文件被修改 The file does not contain a valid configuration: 该文件ä¸åŒ…å«æœ‰æ•ˆçš„é…ç½®: The file was not processed by last synchronization! @@ -844,6 +840,8 @@ Total required free disk space: 所需å¯ç”¨ç£ç›˜ç©ºé—´æ€»é‡: Total time: 总共时间: +Transfer file and directory permissions\n(Requires Administrator rights) +转移文件和目录的æƒé™\n(需è¦ç®¡ç†å‘˜æƒé™) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes 对文件时间差异在精确的+/-1å°æ—¶çš„文件认为是相åŒçš„,å°äºŽ1å°æ—¶çš„认为是冲çªä»¥æ¤æ¥å¤„ç†å¤ä»¤æ—¶çš„å˜åŒ– Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/chinese_traditional.lng b/BUILD/Languages/chinese_traditional.lng index 56658a93..57b5e5aa 100644 --- a/BUILD/Languages/chinese_traditional.lng +++ b/BUILD/Languages/chinese_traditional.lng @@ -1,21 +1,5 @@ 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 - Byte - ä½å…ƒçµ„ - GB - GB - MB - MB - day(s) - æ—¥ - hour(s) - 時 - kB - kB - min - 分 - sec - 秒 %x / %y objects deleted successfully %x / %y å€‹ç‰©ä»¶å·²åˆ é™¤æˆåŠŸ %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x 天 %x directories %x 目錄 %x files %x 檔案 -%x is not a valid FreeFileSync batch file! -%x ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„ FreeFileSync æ‰¹æ¬¡æª”ï¼ +%x hour(s) +%x å°æ™‚ %x kB %x kB +%x min +%x 分 %x of %y rows in view 顯示 %y 之 %x è¡Œ %x of 1 row in view 顯示 1 之 %x è¡Œ +%x sec +%x 秒 %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair 新增一å°è³‡æ–™å¤¾ All directories in sync! åŒæ¥æ‰€æœ‰ç›®éŒ„ï¼ -An exception occured! +An exception occurred! ç™¼ç”Ÿç•°å¸¸ï¼ As a result the files are separated into the following categories: çµæžœæ˜¯æª”案分為以下幾類: @@ -266,6 +256,8 @@ Continue 繼續 Conversion error: 轉æ›éŒ¯èª¤ï¼š +Copy filesystem permissions +è¤‡è£½æª”æ¡ˆç³»çµ±æ¬Šé™ Copy from left to right 從左邊複製到å³é‚Š Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files 複製被鎖定的檔案 Copy new or updated files to right folder. 將新的或更新éŽçš„檔案複製到å³é‚Šçš„資料夾ä¸ã€‚ -Copy shared or locked files using Volume Shadow Copy Service -使用å·å½±è¤‡è£½æœå‹™ä¾†è¤‡è£½å…±äº«æˆ–鎖定的檔案 +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +複製共用或鎖定檔案使用使用å·å½±è¤‡è£½æœå‹™\n(需è¦ç®¡ç†å“¡æ¬Šé™) Copy to clipboard\tCTRL+C 複製到剪貼簿\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error 錯誤 Error changing modification time: 變更修改時間錯誤: +Error copying file permissions: +複製檔案權é™éŒ¯èª¤ï¼š Error copying file: 複製檔案錯誤: Error copying locked file %x! @@ -418,14 +412,16 @@ Error reading from synchronization database: 讀å–åŒæ¥è³‡æ–™åº«éŒ¯èª¤ï¼š Error resolving symbolic link: 解决符號連çµéŒ¯èª¤ï¼š +Error setting directory lock: + +Error setting privilege: +è¨å®šæ¬Šé™éŒ¯èª¤ï¼š Error starting Volume Shadow Copy Service! å•Ÿå‹•å·å½±è¤‡è£½æœå‹™éŒ¯èª¤ï¼ Error traversing directory: éæ·ç›®éŒ„錯誤: Error when monitoring directories. 監測目錄錯誤。 -Error writing file attributes: -寫入檔案屬性錯誤: Error writing file: 寫入檔案錯誤: Error writing to synchronization database: @@ -598,6 +594,8 @@ Initial synchronization: åˆå§‹åŒ–åŒæ¥ï¼š Integrate external applications into context menu. The following macros are available: æ•´åˆä¸Šä¸‹æ–‡åŠŸèƒ½è¡¨ä¸çš„外部應用程å¼ã€‚å¯ä»¥ä½¿ç”¨ä¸‹é¢çš„巨集: +Invalid FreeFileSync config file! +無效的 FreeFileSync é…ç½®æª”æ¡ˆï¼ Leave as unresolved conflict ä¿ç•™çµ¦æœªè§£æ±ºçš„è¡çª Left @@ -655,7 +653,7 @@ 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 檔案ä¸å˜åœ¨ï¼š +以下資料庫æ¢ç›®çš„å…¶ä¸ä¸€å€‹ 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. @@ -678,7 +676,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! 計劃è¦åˆªé™¤çš„目錄與其å目錄和檔案是è¡çªçš„ï¼ Please run a Compare first before synchronizing! 請執行åŒæ¥å‰å…ˆæ¯”å°ï¼ -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. 按下 \"切æ›\" é–‹å•Ÿ FreeFileSync 圖形介é¢æ“作方å¼ã€‚ Processing folder pair: 處ç†ä¸€å°è³‡æ–™å¤¾ï¼š @@ -704,6 +702,8 @@ Remove folder 移除資料夾 Remove folder pair 移除一å°è³‡æ–™å¤¾ +Removing abandoned directory lock (%x)... + Report translation error å›žå ±ç¿»è¯éŒ¯èª¤ Reset @@ -794,7 +794,7 @@ Stop åœæ¢ Swap sides å…©é‚Šäº¤æ› -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... åˆ‡æ› FreeFileSync 圖形介é¢æ“作方å¼... Symbolic Link handling 符號連çµè™•ç† @@ -825,7 +825,7 @@ 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隨身碟)\n- 檔案在這些目錄或å目錄會被修改 +命令列æ¯æ¬¡åŸ·è¡Œï¼š\n- å¯ç”¨çš„目錄(例如æ’å…¥USB隨身碟)\n- 檔案在這些目錄或å目錄會被修改 The file does not contain a valid configuration: 該檔案ä¸åŒ…å«æœ‰æ•ˆçš„é…置: The file was not processed by last synchronization! @@ -844,6 +844,8 @@ Total required free disk space: 全部所需è¦çš„å¯ç”¨ç£ç¢Ÿç©ºé–“: Total time: 全部時間: +Transfer file and directory permissions\n(Requires Administrator rights) +傳輸檔案和目錄權é™\n(需è¦ç®¡ç†å“¡æ¬Šé™) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes å°æª”案時差在精確的+/-1å°æ™‚的檔案判斷視為相åŒçš„,以å°æ–¼1å°æ™‚作為è¡çªï¼Œæ˜¯ç‚ºäº†è™•ç†æ—¥å…‰ç¯€ç´„時間的變化 Unable to connect to sourceforge.net! @@ -872,6 +874,8 @@ Volume name %x not part of filename %y! å·å %x 並éžæª”å %y çš„ä¸€éƒ¨ä»½ï¼ Waiting for all directories to become available... ç‰å¾…所有目錄變為å¯ç”¨... +Waiting while directory is locked (%x)... + Warning è¦å‘Š Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/czech.lng b/BUILD/Languages/czech.lng index 6cc29511..c7e486a5 100644 --- a/BUILD/Languages/czech.lng +++ b/BUILD/Languages/czech.lng @@ -1,21 +1,5 @@ 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 - Byte - Byte - GB - GB - MB - MB - day(s) - d - hour(s) - hod - kB - kB - min - min - sec - s %x / %y objects deleted successfully %x / %y objektů úspěšnÄ› smazáno %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x d %x directories adresářů: %x %x files souborů: %x -%x is not a valid FreeFileSync batch file! -%x nenà platným dávkovým souborem programu FreeFileSync! +%x hour(s) +%x h %x kB %x kB +%x min +%x min %x of %y rows in view %x z %y řádků %x of 1 row in view %x z 1 řádku +%x sec +%x s %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair PÅ™idat adresář pro porovnánà All directories in sync! VÅ¡echny adresáře jsou synchronizovány! -An exception occured! +An exception occurred! Vyskytla se chyba! As a result the files are separated into the following categories: Jako výsledek jsou soubory rozdÄ›leny do následujÃcÃch kategoriÃ: @@ -266,6 +256,8 @@ Continue PokraÄovat Conversion error: Chyba konverze: +Copy filesystem permissions +KopÃrovat oprávnÄ›nà k souborům Copy from left to right KopÃrovat z leva do prava Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files KopÃrovat zamÄené soubory Copy new or updated files to right folder. KopÃrovat nové nebo aktualizované soubory do adresáře vpravo. -Copy shared or locked files using Volume Shadow Copy Service -KopÃrovat sdÃlené nebo zamÄené soubory pomocà Volume Shadow Copy Service +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +KopÃrovat sdÃlené nebo zamÄené soubory pomocà Volume Shadow Copy Service\n(Vyžaduje administrátorské oprávnÄ›nÃ) Copy to clipboard\tCTRL+C Vložit do schránky\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Chyba Error changing modification time: Chyba nastavenà Äasu zmÄ›ny: +Error copying file permissions: +Chyba kopÃrovánà oprávnÄ›nà souborů: Error copying file: Chyba kopÃrovánà souboru: Error copying locked file %x! @@ -418,14 +412,16 @@ Error reading from synchronization database: Chyba Ätenà synchronizaÄnà databáze: Error resolving symbolic link: Chyba odkazu zástupce: +Error setting directory lock: + +Error setting privilege: +Chyba nastavenà práv: Error starting Volume Shadow Copy Service! Chyba spuÅ¡tÄ›nà služby Volume Shadow Copy Service! Error traversing directory: Chyba procházenà adresáře: Error when monitoring directories. Chyba pÅ™i sledovánà adresářů. -Error writing file attributes: -Chyba zápisu atributů souboru: Error writing file: Chyba zápisu souboru: Error writing to synchronization database: @@ -598,6 +594,8 @@ Initial synchronization: Prvotnà synchronizace: Integrate external applications into context menu. The following macros are available: Integrace externà aplikace do kontextového menu. K dispozici jsou následujÃcà makra: +Invalid FreeFileSync config file! +Chybný konfiguraÄnà soubor FreeFileSync! Leave as unresolved conflict Ponechat jako nevyÅ™eÅ¡ený konflikt Left @@ -613,7 +611,7 @@ Záznamy: Logging Zaznamenávánà Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version. -Vytvářenà stÃnových kopÃà na WOW64 nenà podporováno. ProsÃm použijte 64 bitovou verzi FreeFileSync. +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 Mirror ->> @@ -678,12 +676,12 @@ Planned directory deletion is in conflict with its subdirectories and -files! Naplánované smazánà adresáře je v konfliktu s podadresáři a/nebo soubory! Please run a Compare first before synchronizing! ProsÃm proveÄte nejdÅ™Ãv porovnánà pÅ™ed synchronizacÃ! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. TalÄÃtkem \"PÅ™epnout\" otevÅ™ete okno FreeFileSync. Processing folder pair: Zpracovávánà adresářové páru: Published under the GNU General Public License: -Vydáno podl GNU General Public License (GPL): +Vydáno podle GNU General Public License (GPL): Question Otázky Quit @@ -704,6 +702,8 @@ Remove folder Odstranit adresář Remove folder pair Odstranit dvojici adresářů +Removing abandoned directory lock (%x)... + Report translation error Hlásit chyby pÅ™ekladu Reset @@ -733,7 +733,7 @@ Vyberte adresář pro záznamy: Select variant: Vyberte variantu: Set direction: -Nastavit asresář: +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 conflicts @@ -794,7 +794,7 @@ Stop Stop Swap sides ZmÄ›na stran -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... OtevÃránà okna FreeFileSync... Symbolic Link handling Zpracovánà symbolických odkazů @@ -844,6 +844,8 @@ Total required free disk space: Požadované volné mÃsto na disku: Total time: Celkový Äas: +Transfer file and directory permissions\n(Requires Administrator rights) +PÅ™enést pÅ™Ãstupová oprávnÄ›nà souborů a adresářů\n(Vyžaduje administrátorké oprávnÄ›nÃ) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Považovat Äas souboru liÅ¡Ãcà se pÅ™esnÄ› o +/- 1 hodinu jako shodný, ménÄ› než 1 hodinu jako konflikt, kvůli zpracovánà a pÅ™echodům na Letnà Äas Unable to connect to sourceforge.net! @@ -872,6 +874,8 @@ 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 while directory is locked (%x)... + Warning Varovánà Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/dutch.lng b/BUILD/Languages/dutch.lng index 0c771872..054db99d 100644 --- a/BUILD/Languages/dutch.lng +++ b/BUILD/Languages/dutch.lng @@ -1,21 +1,5 @@ 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 - Byte - Byte - GB - GB - MB - MB - day(s) - dag(en) - hour(s) - u(u)r(en) - kB - kB - min - min - sec - sec %x / %y objects deleted successfully %x / %y objecten succesvol verwijderd %x Byte @@ -28,18 +12,24 @@ %x TB +%x day(s) + %x directories %x paden %x files %x bestanden -%x is not a valid FreeFileSync batch file! -%x is geen geldig FreeFileSync batch-bestand! +%x hour(s) + %x kB +%x min + %x of %y rows in view %x van de %y rijen in zicht %x of 1 row in view %x van 1 rij in zicht +%x sec + %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Voeg 1 paar gekoppelde mappen toe All directories in sync! Alle paden zijn gesynchroniseerd! -An exception occured! +An exception occurred! Er heeft een uitzondering plaatsgevonden! As a result the files are separated into the following categories: Hierdoor worden de bestanden gescheiden in de volgende categorieën: @@ -266,6 +256,8 @@ Continue Doorgaan Conversion error: Fout bij het converteren: +Copy filesystem permissions + Copy from left to right Kopieer van links naar rechts Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Kopieer 'alleen lezen' bestanden Copy new or updated files to right folder. Kopieer nieuwe of geupdate bestanden naar de rechter map. -Copy shared or locked files using Volume Shadow Copy Service -Kopieer gedeelde of alleen-lezen bestanden met Volume Shadow Copy Service +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) + Copy to clipboard\tCTRL+C Kopieer naar het klembord\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Fout Error changing modification time: Er is een fout opgetreden bij het aanpassen van de bestandstijd: +Error copying file permissions: + Error copying file: Er is een fout opgetreden bij het kopiëren van bestand: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Er is een fout opgetreden bij het lezen van de synchronisatie-database: Error resolving symbolic link: Er is een fout opgetreden bij het ophalen van een symbolische koppeling: +Error setting privilege: + Error starting Volume Shadow Copy Service! Er is een fout opgetreden bij het starten van de Volume Schadow Copy Service! Error traversing directory: Er is een fout opgetreden bij het doorzoeken van map: Error when monitoring directories. Er is een fout opgetreden bij het observeren van locaties. -Error writing file attributes: -Er is een fout opgetreden bij het schrijven van de bestands-eigenschappen: Error writing file: Er is een fout opgetreden bij het schrijven naar bestand: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: Initiële synchronisatie: Integrate external applications into context menu. The following macros are available: Integreer externe applicaties in het context menu. De volgende macros zijn beschikbaar: +Invalid FreeFileSync config file! + Leave as unresolved conflict Beschouwen als onopgelost conflict Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! Please run a Compare first before synchronizing! Voer eerst een Vergelijking uit voordat u synchroniseerd. -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Processing folder pair: Verwerken van gekoppelde folder: @@ -794,7 +790,7 @@ Stop Stop Swap sides Wissel zijdes -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Symbolic Link handling @@ -844,6 +840,8 @@ Total required free disk space: Benodigde hoeveelheid vrije schijfruimte: Total time: Totale tijd: +Transfer file and directory permissions\n(Requires Administrator rights) + Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Behandel bestandstijden die verschillen met precies +/- 1 uur als gelijk en minder als 1 uur als conflict om zomertijd veranderingen te verwerken Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/english_uk.lng b/BUILD/Languages/english_uk.lng index b5d0923a..a020bd25 100644 --- a/BUILD/Languages/english_uk.lng +++ b/BUILD/Languages/english_uk.lng @@ -1,21 +1,5 @@ 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 - Byte - Byte - GB - GB - MB - MB - day(s) - day(s) - hour(s) - hour(s) - kB - kB - min - min - sec - sec %x / %y objects deleted successfully %x / %y objects deleted successfully %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x day(s) %x directories %x directories %x files %x files -%x is not a valid FreeFileSync batch file! -%x is not a valid FreeFileSync batch file! +%x hour(s) +%x hour(s) %x kB %x kB +%x min +%x min %x of %y rows in view %x of %y rows in view %x of 1 row in view %x of 1 row in view +%x sec +%x sec %x% %x% &Abort @@ -182,8 +172,8 @@ Add folder pair Add folder pair All directories in sync! All directories in sync! -An exception occured! -An exception occured! +An exception occurred! +An exception occurred! As a result the files are separated into the following categories: 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: @@ -266,6 +256,8 @@ Continue Continue Conversion error: Conversion error: +Copy filesystem permissions +Copy filesystem permissions Copy from left to right Copy from left to right Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Copy locked files Copy new or updated files to right folder. Copy new or updated files to right folder. -Copy shared or locked files using Volume Shadow Copy Service -Copy shared or locked files using Volume Shadow Copy Service +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) Copy to clipboard\tCTRL+C Copy to clipboard\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Error Error changing modification time: Error changing modification time: +Error copying file permissions: +Error copying file permissions: Error copying file: Error copying file: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Error reading from synchronisation database: Error resolving symbolic link: Error resolving symbolic link: +Error setting privilege: +Error setting privilege: Error starting Volume Shadow Copy Service! Error starting Volume Shadow Copy Service! Error traversing directory: Error traversing directory: Error when monitoring directories. Error when monitoring directories. -Error writing file attributes: -Error writing file attributes: Error writing file: Error writing file: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: Initial synchronisation: Integrate external applications into context menu. The following macros are available: Integrate external applications into context menu. The following macros are available: +Invalid FreeFileSync config file! +Invalid FreeFileSync config file! Leave as unresolved conflict Leave as unresolved conflict Left @@ -678,8 +674,8 @@ Planned directory deletion is in conflict with its subdirectories and -files! Planned directory deletion is in conflict with its subdirectories and -files! Please run a Compare first before synchronizing! Please run a Compare first before synchronising! -Press \"Switch\" to open FreeFileSync GUI modus. -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. +Press \"Switch\" to open FreeFileSync GUI mode. Processing folder pair: Processing folder pair: Published under the GNU General Public License: @@ -794,8 +790,8 @@ Stop Stop Swap sides Swap sides -Switching to FreeFileSync GUI modus... -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... +Switching to FreeFileSync GUI mode... Symbolic Link handling Symbolic Link handling Symlinks %x have the same date but a different target! @@ -844,6 +840,8 @@ Total required free disk space: Total required free disk space: Total time: Total time: +Transfer file and directory permissions\n(Requires Administrator rights) +Transfer file and directory permissions\n(Requires Administrator rights) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/finnish.lng b/BUILD/Languages/finnish.lng index 6648f921..6ca7cda8 100644 --- a/BUILD/Languages/finnish.lng +++ b/BUILD/Languages/finnish.lng @@ -1,21 +1,5 @@ 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 - Byte - tavua - GB - GB - MB - MB - day(s) - päivää(e) - hour(s) - tunti(n) - kB - kB - min - Min. - sec - Sek. %x / %y objects deleted successfully %x / %y Kohteiden poisto onnistui %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) + %x directories %x hakemistoa %x files %x tiedostoista -%x is not a valid FreeFileSync batch file! -%x ei kelvollinen FreeFileSync eräajotiedosto! +%x hour(s) + %x kB %x kB +%x min + %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 sec + %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Lisää hakemistopari All directories in sync! Kaikki hakemistot täsmäävät! -An exception occured! +An exception occurred! Virhe havaittu! As a result the files are separated into the following categories: Tiedoston on avattu seuraaviin luokkiin: @@ -266,6 +256,8 @@ Continue Jatka Conversion error: Konversio virhe: +Copy filesystem permissions + Copy from left to right Kopioidaan vasen -> oikea Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Kopioi lukitut tiedostot Copy new or updated files to right folder. Kopioidaan uudet tai muuttuneet tiedostot oikeaan hakemistoon. -Copy shared or locked files using Volume Shadow Copy Service -Kopioi jaetut ja lukitut tiedostot käyttäen Volume Shadow Copy Service +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) + Copy to clipboard\tCTRL+C Kopioi Leikepöydälle\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Virhe Error changing modification time: Virhe muuttaessa tiedoston aikaa: +Error copying file permissions: + Error copying file: Virhe kopioitaessa tiedostoa: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Virhe lukiessa täsmäytyksen tietokantaa: Error resolving symbolic link: Virhe selvittäessä symbolista linkkiä: +Error setting privilege: + Error starting Volume Shadow Copy Service! Virhe käynnistäessä Volume Shadow Copy Service! Error traversing directory: Virhe hakemistoa läpikäydessä: Error when monitoring directories. Virhe seuratessa hakemistoa. -Error writing file attributes: -Virhe kirjottaessa tiedosto ominaisuuksia: Error writing file: Virhe kirjottaessa tiedosto: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: Ensi täsmäytys: Integrate external applications into context menu. The following macros are available: Liitä ulkoinen sovellus viitekehysvalikkoon. Seuraavat makrot ovat valittavissa: +Invalid FreeFileSync config file! + Leave as unresolved conflict Jätä ratkaisemattomana virheenä Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! Suunniteltu hakemiston poistaminen on ristiriidassa alihakemiston ja tiedostojen kanssa! Please run a Compare first before synchronizing! Aja tarkistus ennen täsmäytystä. -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Paina \"Vaihda\" Avaa FreeFileSync GUI toimintoa. Processing folder pair: Käsitellään hakemistoparia: @@ -794,7 +790,7 @@ Stop Stop Swap sides Puolten vaihto -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Siirtyminen FreeFileSync GUI toimintoon... Symbolic Link handling Symlinkkien hallinta @@ -844,6 +840,8 @@ Total required free disk space: Vaadittu vapaa levytila: Total time: Kokonaisaika: +Transfer file and directory permissions\n(Requires Administrator rights) + Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Kohtele tiedostoja jolla aikaleima on tasan +/- tunti samoina, korjaa kesäajan siirtoa Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/french.lng b/BUILD/Languages/french.lng index b390f956..51e2adaa 100644 --- a/BUILD/Languages/french.lng +++ b/BUILD/Languages/french.lng @@ -1,21 +1,5 @@ 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 de la GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE - Byte - Octet - GB - Go - MB - Mo - day(s) - jour(s) - hour(s) - heure(s) - kB - Ko - min - min - sec - sec %x / %y objects deleted successfully %x / %y objets supprimés avec succès %x Byte @@ -28,18 +12,24 @@ %x Po %x TB %x To +%x day(s) +%x jour(s) %x directories %x répertoires %x files %x fichiers -%x is not a valid FreeFileSync batch file! -%x n'est pas un fichier batch FreeFileSync valide ! +%x hour(s) +%x heure(s) %x kB %x Ko +%x min +%x min %x of %y rows in view %x sur %y lignes affichées %x of 1 row in view %x sur 1 ligne affichée +%x sec +%x sec %x% %x % &Abort @@ -182,7 +172,7 @@ Add folder pair Ajout d'un couple de dossiers All directories in sync! Tous les répertoires sont synchronisés ! -An exception occured! +An exception occurred! Une erreur s'est produite ! As a result the files are separated into the following categories: En conclusion, les fichiers sont répartis dans les catégories suivantes : @@ -266,6 +256,8 @@ Continue Continuer Conversion error: Erreur de conversion : +Copy filesystem permissions +Copie des attributs de fichiers Copy from left to right Copie de gauche à droite Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Copier les fichiers verrouillés Copy new or updated files to right folder. Copie les fichiers nouveaux ou modifiés dans le dossier de droite. -Copy shared or locked files using Volume Shadow Copy Service -Copier les fichiers partagés ou verrouilés en utilisant le service Volume Shadow Copy +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +La copie des fichiers partagés ou verrouillés nécessite le Service Volume Shadow Copy\n(avec les droits administrateur) Copy to clipboard\tCTRL+C Copier dans le presse-papiers\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Erreur Error changing modification time: Erreur lors du changement de la date de modification : +Error copying file permissions: +Erreur lors de la copie des attributs système Error copying file: Erreur lors de la copie du fichier : Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Erreur lors de la lecture de la base de données de synchro : Error resolving symbolic link: Erreur lors de la résolution du lien symbolique : +Error setting privilege: +Erreur de paramétrage de privilège Error starting Volume Shadow Copy Service! Erreur lors du démarrage du service 'Volume Shadow Copy' ! Error traversing directory: Erreur lors du parcours du répertoire : Error when monitoring directories. Erreur lors de la surveillance des répertoires. -Error writing file attributes: -Erreur lors de l'écriture des attributs du fichier : Error writing file: Erreur lors de l'écriture du fichier : Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: Première synchronisation : Integrate external applications into context menu. The following macros are available: Inclure les applications externes dans le menu contextuel. Les macros suivantes sont disponibles : +Invalid FreeFileSync config file! +Fichier de configuration FreeFileSync invalide ! Leave as unresolved conflict Abandonner en tant que conflit non résolu Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! Le répertoire de suppression choisi est en conflit avec ses sous-répertoires et -fichiers ! Please run a Compare first before synchronizing! Veuillez lancer une Comparaison avant de lancer la synchronisation ! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Appuyer sur \"Changer \" pour ouvrir le mode FreeFileSync GUI Processing folder pair: Traitement de la paire de dossiers : @@ -794,7 +790,7 @@ Stop Arrêt Swap sides Permuter les côtés -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Changement en mode FreeFileSync GUI... Symbolic Link handling Gestion des Liens Symboliques @@ -844,6 +840,8 @@ Total required free disk space: Espace disque nécessaire : Total time: Durée totale : +Transfer file and directory permissions\n(Requires Administrator rights) +Transfert des attributs système des fichiers et des répertoires\n(avec les droits administrateur) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Traiter les heures qui diffèrent exactement de +/- 1 heure comme égales, et celles qui diffèrent de moins d'une heure comme conflit sur la gestion de l'heure d'été Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/german.lng b/BUILD/Languages/german.lng index 9adac7a6..c7a23e4a 100644 --- a/BUILD/Languages/german.lng +++ b/BUILD/Languages/german.lng @@ -1,13 +1,5 @@ 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 - day(s) - Tag(e) - hour(s) - Stunde(n) - min - Min. - sec - Sek. %x / %y objects deleted successfully %x von %y Objekten erfolgreich gelöscht %x Byte @@ -20,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x Tag(e) %x directories %x Verzeichnisse %x files %x Dateien -%x is not a valid FreeFileSync batch file! -%x ist keine gültige FreeFileSync-Batchdatei! +%x hour(s) +%x Stunde(n) %x kB %x kB +%x min +%x Min. %x of %y rows in view %x von %y Zeilen zur Ansicht %x of 1 row in view %x von 1 Zeile zur Ansicht +%x sec +%x Sek. %x% %x% &Abort @@ -174,7 +172,7 @@ Add folder pair Verzeichnispaar hinzufügen All directories in sync! Alle Verzeichnisse sind synchron! -An exception occured! +An exception occurred! Eine Ausnahme ist aufgetreten! As a result the files are separated into the following categories: Das Ergebnis ist eine Aufteilung in folgende Kategorien: @@ -258,6 +256,8 @@ Continue Fortfahren Conversion error: Fehler bei Konvertierung: +Copy filesystem permissions +Dateisystemberechtigungen kopieren Copy from left to right Von links nach rechts kopieren Copy from left to right overwriting @@ -270,8 +270,8 @@ Copy locked files Gesperrte Dateien kopieren Copy new or updated files to right folder. Neue oder aktualisierte Dateien vom linken in das rechte Verzeichnis kopieren. -Copy shared or locked files using Volume Shadow Copy Service -Gesperrte oder gemeinsam verwendete Dateien mit Hilfe des Volume Shadow Copy Service kopieren +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +Kopiere gesperrte Dateien mit Hilfe des Volume Shadow Copy Service\n(Benötigt Administratorrechte) Copy to clipboard\tCTRL+C In die Zwischenablage kopieren\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -376,6 +376,8 @@ Error Fehler Error changing modification time: Fehler beim Setzen der Dateiänderungszeit: +Error copying file permissions: +Fehler beim Kopieren der Dateiberechtigungen: Error copying file: Fehler beim Kopieren der Datei: Error copying locked file %x! @@ -410,14 +412,14 @@ Error reading from synchronization database: Fehler beim Lesen der Synchronisationsdatenbank: Error resolving symbolic link: Fehler beim Auflösen des Symbolischen Links: +Error setting privilege: +Fehler beim Setzen des Privilegs: Error starting Volume Shadow Copy Service! Fehler beim Starten des Volume Shadow Copy Service! Error traversing directory: Fehler beim Durchsuchen des Verzeichnisses: Error when monitoring directories. Fehler beim Ãœberwachen der Verzeichnisse. -Error writing file attributes: -Fehler beim Schreiben der Dateiattribute: Error writing file: Fehler beim Schreiben der Datei: Error writing to synchronization database: @@ -590,6 +592,8 @@ Initial synchronization: Erstmalige Synchronisation: Integrate external applications into context menu. The following macros are available: Integriert externe Anwendungen in das Kontextmenu. Die folgenden Makros stehen zur Verfügung: +Invalid FreeFileSync config file! +Ungültige FreeFileSync Konfigurationsdatei! Leave as unresolved conflict Als unbehandelten Konflikt belassen Left @@ -670,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! Das geplante Löschen des Verzeichnisses steht in Konflikt mit seinen Unterverzeichnissen und -dateien Please run a Compare first before synchronizing! Vor der Synchronisation bitte zuerst einen Vergleich ausführen! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. \"Wechseln\" öffnet FreeFileSync in der graphischen Ansicht. Processing folder pair: Bearbeite Verzeichnispaar: @@ -786,7 +790,7 @@ Stop Stop Swap sides Seiten vertauschen -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Wechsle in die graphische Ansicht... Symbolic Link handling Verwendung Symbolischer Links @@ -836,6 +840,8 @@ Total required free disk space: Insgesamt benötigter freier Speicherplatz: Total time: Gesamtzeit: +Transfer file and directory permissions\n(Requires Administrator rights) +Ãœbertrage Datei- und Verzeichnisberechtigungen\n(Benötigt Administratorrechte) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Betrachte Dateizeiten mit einer Differenz von genau +/- einer Stunde als gleich, mit weniger als einer Stunde als Konflikt, um Zeitumstellungen richtig zu behandeln Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/hebrew.lng b/BUILD/Languages/hebrew.lng index 5ca0b934..69b53a86 100644 --- a/BUILD/Languages/hebrew.lng +++ b/BUILD/Languages/hebrew.lng @@ -1,21 +1,5 @@ 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- מהדר ×’× ×• של ×—×œ×•× ×•×ª\n wxWidgets \t- ממשק גרפי של ×ª×•×›× ×ª קוד פתוח\n wxFormBuilder\t- wxWidgets ×ž× ×•×¢ ממשג גרפי\n CodeBlocks \t- IDE ×ª×•×›× ×ª קוד פתוח - Byte - ביית - GB - גב - MB - מב - day(s) - ×™×•× - hour(s) - שעות - kB - קב - min - דקה - sec - ×©× ×™×” %x / %y objects deleted successfully ××•×‘×™×§×˜×™× × ×ž×—×§×• בהצלחה %y מ %x %x Byte @@ -28,18 +12,24 @@ %x פיקו ביט %x TB %x טרה ביט +%x day(s) + %x directories מחיצות %x %x files %x ×§×‘×¦×™× -%x is not a valid FreeFileSync batch file! -!קובץ ×צווה ×œ× ×ž×ª××™× %x +%x hour(s) + %x kB %x קב +%x min + %x of %y rows in view שורות בתצוגה %y מ %x %x of 1 row in view שורות בתצוגה %x מ 1 +%x sec + %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair הוסף מחיצה זוגית All directories in sync! כל המחיצות ×ž×¡×•× ×›×¨× ×•×ª! -An exception occured! +An exception occurred! ×ירוע חריג! As a result the files are separated into the following categories: :כתוצ××” ×”×§×‘×¦×™× ×”×•×¤×¨×“×• לקטגוריות הב×ות @@ -266,6 +256,8 @@ Continue המשך Conversion error: טעות בהסבה: +Copy filesystem permissions + Copy from left to right העתק משמ×ל לימין Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files העתק ×§×‘×¦×™× × ×¢×•×œ×™× Copy new or updated files to right folder. העתק ×§×‘×¦×™× ×—×“×©×™× ×ו ×ž×¢×•×“×›× ×™× ×œ×ž×—×™×¦×” ×”×™×ž× ×™×ª. -Copy shared or locked files using Volume Shadow Copy Service -העתק ×§×‘×¦×™× ×ž×©×•×ª×‘×™× ×ו × ×¢×•×œ×™× ×‘×¢×–×¨×ª שרות העתקה מוצל +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) + Copy to clipboard\tCTRL+C העתק למכתבה \tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error טעות Error changing modification time: טעות ×‘×©×™× ×•×™ זמן: +Error copying file permissions: + Error copying file: טעות בהעתקת קובץ: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: טעות בקרי××” מבסיס ×”× ×ª×•× ×™× ×©×œ ×”×¡× ×›×¨×•×Ÿ: Error resolving symbolic link: טעות ×‘×¤×¢× ×•×— מר××” ×ž×§×•× ×¡×™×ž×œ×™ (Symbolic Link) +Error setting privilege: + Error starting Volume Shadow Copy Service! טעות ×‘×˜×¢×™× ×ª מעתיק ×¦×œ×œ×™× (Shadow Copy Service)! Error traversing directory: טעות בהצלבת מחיצות Error when monitoring directories. טעות ×‘× ×™×ª×•×¨ מחיצות. -Error writing file attributes: -טעות בכתיבת ×ª×›×•× ×•×ª קובץ: Error writing file: טעות בכתיבת קובת: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: ×¡× ×›×¨×•×Ÿ ר××©×•× ×™: Integrate external applications into context menu. The following macros are available: :הטמע ×ª×•×›× ×•×ª ×—×™×¦×•× ×™×•×ª לתפריט המקרו הב××™× ×ž×•×›× ×™× +Invalid FreeFileSync config file! + Leave as unresolved conflict הש×ר ×›×§×•× ×¤×œ×™×§×˜ ×œ× ×ž×˜×•×¤×œ Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! מחיצה המיועדת למחיקה מצויה בסתירה לתקיות ×”×ž×©× ×” ×•×œ×§×‘×¦×™× Please run a Compare first before synchronizing! הרץ השוו××” ×œ×¤× ×™ ×¡× ×›×¨×•×Ÿ! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. \"לחץ\" לפתיחת FreeFileSync בממשק גרפי. Processing folder pair: מבצע זיווז מחיצות: @@ -794,7 +790,7 @@ Stop עצור Swap sides החלף ×¦×“×“×™× -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... החלף לתצורת ממשק חזותי... Symbolic Link handling @@ -844,6 +840,8 @@ Total required free disk space: זכרון ×¤× ×•×™ כללי × ×“×¨×© Total time: זמן מקומי: +Transfer file and directory permissions\n(Requires Administrator rights) + Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes התיחס ×œ×–×ž× ×™ הקובץ ×›×שר ×”× ×©×•× ×™× ×‘×“×™×•×§ ב +/- שעה ×›×©×•×•×™× ×œ×¦×•×¨×š פתרון בעית שעון קיץ Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/hungarian.lng b/BUILD/Languages/hungarian.lng index faffa5ad..51f228f3 100644 --- a/BUILD/Languages/hungarian.lng +++ b/BUILD/Languages/hungarian.lng @@ -1,21 +1,5 @@ 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- 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 - Byte - Bájt - GB - GB - MB - MB - day(s) - nap - hour(s) - óra - kB - kB - min - perc - sec - másodperc %x / %y objects deleted successfully %X / %Y objektum sikeresen törölve %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x nap %x directories %x mappa %x files %x fájl -%x is not a valid FreeFileSync batch file! -A(z) %x nem megfelelÅ‘ FreeFileSync kötegelt feladat fájl! +%x hour(s) +%x óra %x kB %x kB +%x min +%x perc %x of %y rows in view %x sor látható a(z) %y sorból %x of 1 row in view %x sor látható az 1 sorból +%x sec +%x másodperc %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Mappa pár megadása All directories in sync! Minden mappa szinkronban! -An exception occured! +An exception occurred! Kivétel keletkezett! As a result the files are separated into the following categories: Eredményképpen a fájlok a következÅ‘ kategóriákra bomlanak: @@ -266,6 +256,8 @@ Continue Folytatás Conversion error: Konverziós hiba: +Copy filesystem permissions +Fájlrendszer jogosultságok másolása Copy from left to right Másolás a bal oldalról a jobb oldalra Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Zárolt fájlok másolása Copy new or updated files to right folder. Új vagy frissÃtett fájlok másolása a jobb oldali mappába. -Copy shared or locked files using Volume Shadow Copy Service -Megosztott vagy zárolt fájlok másolása a Volume Shadow Copy Service segÃtségével +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +A megosztott vagy zárolt fájlok másolása a Volume Shadow Copy szolgáltatással\n(Adminisztrátori jogok szükségesek) Copy to clipboard\tCTRL+C Másolás a vágólapra\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Hiba Error changing modification time: Az utolsó változtatás dátumának módosÃtása sikertelen: +Error copying file permissions: +Hiba történt a fájl jogosultságainak másolása közben: Error copying file: A fájl másolása sikertelen: Error copying locked file %x! @@ -418,14 +412,16 @@ Error reading from synchronization database: Hiba történt a szinkronizációs adatbázis olvasása közben: Error resolving symbolic link: A szimbolikus link feloldása sikertelen: +Error setting directory lock: + +Error setting privilege: +Hiba történt a jogok beállÃtása közben: Error starting Volume Shadow Copy Service! Hiba történt a Volume Shadow Copy szolgáltatás indÃtása közben! Error traversing directory: A mappa átnézése sikertelen: Error when monitoring directories. Hiba történt a mappák figyelése közben. -Error writing file attributes: -A fájl attribútumainak Ãrása sikertelen: Error writing file: A fájl Ãrása sikertelen: Error writing to synchronization database: @@ -598,6 +594,8 @@ Initial synchronization: ElsÅ‘ szinkronizáció: Integrate external applications into context menu. The following macros are available: KülsÅ‘ alkalmazás integrálása a helyi menübe. Az elérhetÅ‘ makrók a következÅ‘k: +Invalid FreeFileSync config file! +Érvénytelen a FreeFileSync beállÃtásait tartalmazó fájl! Leave as unresolved conflict Feloldatlan ütközésként hagyni Left @@ -678,7 +676,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! A tervezett mappának a törlése ütközik az almappáival és fájljaival. Please run a Compare first before synchronizing! Kérjük, futtass le egy összehasonlÃtást mielÅ‘tt szinkronizálnál! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Kérjük, nyomja meg a \"Váltás\" gombot a GUI mód megnyitásához. Processing folder pair: Mappapár feldolgozása: @@ -704,6 +702,8 @@ Remove folder Mappa eltávolÃtása Remove folder pair Mappa párok eltávolÃtása +Removing abandoned directory lock (%x)... + Report translation error FordÃtói hiba bejelentése Reset @@ -794,7 +794,7 @@ Stop MegállÃtás Swap sides Oldalak felcserélése -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Váltás a FreeFileSync GUI módjára... Symbolic Link handling Symlink kezelés @@ -844,6 +844,8 @@ Total required free disk space: Összes igényelt szabad lemezterület: Total time: Becsült idÅ‘: +Transfer file and directory permissions\n(Requires Administrator rights) +Fájlok és mappák jogosultságainak átvitele\n(Adminisztrátori jogok szükségesek) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes A fájlok dátumának pontosan +/- 1 órával való eltérése esetén a fájlok egyeznek, a kevesebb mint 1 órával való eltérés esetén pedig ütköznek, a Nyári IdÅ‘számÃtás kezeléséhez Unable to connect to sourceforge.net! @@ -872,6 +874,8 @@ 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 while directory is locked (%x)... + Warning Figyelem Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/italian.lng b/BUILD/Languages/italian.lng index 79104c4f..b81c7aa7 100644 --- a/BUILD/Languages/italian.lng +++ b/BUILD/Languages/italian.lng @@ -1,45 +1,35 @@ 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 della GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE - Byte - Byte - GB - GB - MB - MB - day(s) - giorno(i) - hour(s) - ora(e) - kB - kB - min - min - sec - sec %x / %y objects deleted successfully %x / %y oggetti cancellati con successo %x Byte - +%x Byte +%x GB %x GB - %x MB - +%x MB +%x PB %x PB - %x TB - +%x TB +%x day(s) +%x giorno(i) %x directories %x cartelle %x files %x files -%x is not a valid FreeFileSync batch file! -%x non è un batch file valido per FreeFileSync! +%x hour(s) +%x ora(e) %x kB - +%x kB +%x min +%x min %x of %y rows in view %x di %y righe visualizzate %x of 1 row in view %x di 1 riga visualizzata +%x sec +%x sec %x% %x% &Abort @@ -99,7 +89,7 @@ &Yes &Si (Build: %x) - +(Build: %x) (Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".) (Solo volumi con file-system FAT/FAT32 risentono di questo problema!\nIn tutti gli altri casi puoi disabilitare l'impostazione \"ignora differenze di 1 ora\".) (Requires an Internet connection!) @@ -161,7 +151,7 @@ <Last session> <Ultima sessione> <Symlink> - +<Symlink> <multiple selection> <selezione multipla> A newer version of FreeFileSync is available: @@ -182,7 +172,7 @@ Add folder pair Aggiungi una coppia di cartelle All directories in sync! Tutte le directory in sync! -An exception occured! +An exception occurred! Si è verificato un problema! As a result the files are separated into the following categories: I file risultano infine ripartiti nelle seguenti categorie: @@ -266,6 +256,8 @@ Continue Continua Conversion error: Errore di conversione: +Copy filesystem permissions +Copia permessi del filesystem Copy from left to right Copia da sinistra a destra Copy from left to right overwriting @@ -278,16 +270,16 @@ Copy locked files Copia file bloccati Copy new or updated files to right folder. Copia file nuovi o aggiornati nella cartella di destra. -Copy shared or locked files using Volume Shadow Copy Service -Copia file condivisi o bloccati usando il servizio Volume Shadow Copy +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +Copia file condivisi o bloccati usando il Servizio Volume Shadow Copy\n(Richiede diritti di Administrator) Copy to clipboard\tCTRL+C Copia nella clipboard\tCTRL+C Copying Symbolic Link %x overwriting %y - +Copia Link Simbolico %x sovrascrivendo %y Copying Symbolic Link %x to %y - +Copia Link Simbolico %x su %y Copying file %x overwriting %y - +Copia file %x sovrascrivendo %y Copying file %x to %y Copia di file da %x a %y Could not determine volume name for file: @@ -335,7 +327,7 @@ Cancella o sovrascrivi file definitivamente Delete permanently Cancella definitivamente Deleting Symbolic Link %x - +Eliminazione Link Simbolico %x Deleting file %x Eliminazione file %x Deleting folder %x @@ -345,7 +337,7 @@ Gestione cancellazione Description Descrizione Direct - +Diretto Directories are dependent! Be careful when setting up synchronization rules: Le directory sono dipendenti! Fai attenzione quando configuri le regole di sincronizzazione: Directories to watch @@ -384,6 +376,8 @@ Error Errore Error changing modification time: Errore durante la modifica della data: +Error copying file permissions: +Errore durante la copia dei permessi su file: Error copying file: Errore durante la copia del file: Error copying locked file %x! @@ -418,14 +412,16 @@ Error reading from synchronization database: Errore in lettura dal database di sincronizzione: Error resolving symbolic link: Errore nella risoluzione di collegamento simbolico: +Error setting directory lock: + +Error setting privilege: +Errore nel settaggio dei privilegi: Error starting Volume Shadow Copy Service! Errore in avvio del Servizio Volume Shadow Copy! Error traversing directory: Errore nel percorso della directory: Error when monitoring directories. Errore durante il monitoraggio directory. -Error writing file attributes: -Errore nella scrittura degli attributi file: Error writing file: Errore durante la scrittura del file: Error writing to synchronization database: @@ -503,7 +499,7 @@ Trova cosa: Folder Comparison and Synchronization Comparazione di Cartelle e Sincronizzazione Follow - +Segui Free disk space available: Spazio libero su disco disponibile: FreeFileSync Batch Job @@ -573,7 +569,7 @@ Identifica e propaga cambiamenti su entrambi i lati usando un database. Cancella If you like FFS Se ti piace FFS Ignore - +Ignora Ignore 1-hour file time difference Ignora la differenza di file time di 1 ora Ignore errors @@ -598,6 +594,8 @@ Initial synchronization: Prima sincronizzazione: Integrate external applications into context menu. The following macros are available: Integra applicazioni esterne nel menu contestuale. Sono disponibili le seguenti macro: +Invalid FreeFileSync config file! +File di configurazione FreeFileSync non valido! Leave as unresolved conflict Lascia come conflitti irrisolti Left @@ -633,7 +631,7 @@ Sposta file in una sotto-cartella datata Moving %x to Recycle Bin Spostamento di %x nel Cestino Moving Symbolic Link %x to user-defined directory %y - +Spostamento Link Simbolico %x su directory definita dall'utente %y Moving file %x to user-defined directory %y Spostamento del file %x nella directory personalizzata %y Moving folder %x to user-defined directory %y @@ -678,7 +676,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! La cancellazione della directory pianificata e' in conflitto con queste sottodirectory e files! Please run a Compare first before synchronizing! Prima di sincronizzare effettua una Comparazione! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Premi \"Switch\" per aprire modalità GUI di FreeFileSync Processing folder pair: Elaborazione coppia di cartelle: @@ -704,6 +702,8 @@ Remove folder Rimuovi cartella Remove folder pair Elimina la coppia di cartelle +Removing abandoned directory lock (%x)... + Report translation error Segnala errori di traduzione Reset @@ -794,12 +794,12 @@ Stop Stop Swap sides Inverti i lati -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Switch alla modalità GUI di FreeFileSync... Symbolic Link handling - +Gestione Link Simbolico Symlinks %x have the same date but a different target! - +Symlinks %x hanno stessa data ma differente target! Synchronization Preview Anteprima Sincronizzazione Synchronization aborted! @@ -825,7 +825,7 @@ Directory di destinazione già esistente! Target file already existing! File destinazione già esistente! 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 - +La linea di comando è eseguita ogni volta che:\n- tutte le cartelle diventano disponibili (es: inserimento memoria USB)\n- file in queste cartelle o sottocartelle vengono modificati The file does not contain a valid configuration: Il file non contiene una configurazione valida The file was not processed by last synchronization! @@ -844,6 +844,8 @@ Total required free disk space: Spazio libero su disco richiesto: Total time: Tempo totale: +Transfer file and directory permissions\n(Requires Administrator rights) +Trasferisci file e permessi sulle cartelle\n(Richiede diritti di Administrator) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Tratta file time che differiscono di esattamente +/- 1 ora come uguali, meno di 1 ora come conflitto per gestire i cambiamenti di Daylight Saving Time Unable to connect to sourceforge.net! @@ -872,6 +874,8 @@ 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 while directory is locked (%x)... + Warning Attenzione Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/japanese.lng b/BUILD/Languages/japanese.lng index 73b9e0f4..54b13d37 100644 --- a/BUILD/Languages/japanese.lng +++ b/BUILD/Languages/japanese.lng @@ -1,21 +1,5 @@ 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 - Byte - ãƒã‚¤ãƒˆ - GB - GB - MB - MB - day(s) - æ—¥(é–“) - hour(s) - 時(é–“) - kB - kB - min - 分 - sec - 秒 %x / %y objects deleted successfully %x / %y ã®ã‚ªãƒ–ジェクトを削除ã—ã¾ã—㟠%x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x æ—¥ %x directories %x ディレクトリ %x files %x 個ã®ãƒ•ã‚¡ã‚¤ãƒ« -%x is not a valid FreeFileSync batch file! -%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 @@ -182,7 +172,7 @@ Add folder pair フォルダã®ãƒšã‚¢ã‚’è¿½åŠ All directories in sync! ã™ã¹ã¦ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’åŒæœŸ! -An exception occured! +An exception occurred! 例外ãŒç™ºç”Ÿã—ã¾ã—ãŸ! As a result the files are separated into the following categories: ファイルã¯ä»¥ä¸‹ã®ã‚«ãƒ†ã‚´ãƒªã«åˆ†é¡žã•ã‚Œã¾ã™: @@ -266,6 +256,8 @@ Continue 続行 Conversion error: 変æ›ã‚¨ãƒ©ãƒ¼: +Copy filesystem permissions +ファイルシステム・パーミッションをコピー Copy from left to right å·¦ã‹ã‚‰å³ã«ã‚³ãƒ”ー Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files ãƒãƒƒã‚¯ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’コピー Copy new or updated files to right folder. æ–°ã—ã„(æ›´æ–°)ファイルをå³ãƒ•ã‚©ãƒ«ãƒ€ã«ã‚³ãƒ”ー -Copy shared or locked files using Volume Shadow Copy Service -共有ã€ã¾ãŸã¯ãƒœãƒªãƒ¥ãƒ¼ãƒ シャドウコピーã§ãƒãƒƒã‚¯ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’コピー +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +ボリュームシャドーコピーを使用ã—ã¦å…±æœ‰/ãƒãƒƒã‚¯ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’コピー\n(管ç†è€…権é™ãŒå¿…è¦) Copy to clipboard\tCTRL+C クリップボードã«ã‚³ãƒ”ー\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error エラー Error changing modification time: 時間ã®ä¿®æ£ä¸ã®ã‚¨ãƒ©ãƒ¼: +Error copying file permissions: +パーミッションコピーä¸ã®ã‚¨ãƒ©ãƒ¼ Error copying file: ファイルã®ã‚³ãƒ”ーã«å¤±æ•—: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: åŒæœŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ã®èªã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼: Error resolving symbolic link: シンボリックリンクã®è§£æ±ºã«å¤±æ•—: +Error setting privilege: +特権ã®è¨å®šã‚¨ãƒ©ãƒ¼: Error starting Volume Shadow Copy Service! ボリュームシャドウコピーã®é–‹å§‹ã«å¤±æ•—! Error traversing directory: ディレクトリã®ç§»å‹•ã‚¨ãƒ©ãƒ¼: Error when monitoring directories. ディレクトリã®ç›£è¦–エラー -Error writing file attributes: -ファイル属性ã®æ›¸ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼: Error writing file: ファイル書ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: åŒæœŸå‡¦ç†ã®åˆæœŸåŒ–: Integrate external applications into context menu. The following macros are available: 外部ã®ã‚¢ãƒ—リケーションをコンテã‚ストメニューã«çµ±åˆã€ä»¥ä¸‹ã®ãƒžã‚¯ãƒãŒåˆ©ç”¨ã§ãã¾ã™: +Invalid FreeFileSync config file! +無効㪠FreeFileSync 構æˆãƒ•ã‚¡ã‚¤ãƒ«ã§ã™! Leave as unresolved conflict 未解決ã®ç«¶åˆã¯ãã®ã¾ã¾æ®‹ã™ Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! ディレクトリを削除ã™ã‚‹ã¨ã€ã‚µãƒ–ディレクトリã€ãƒ•ã‚¡ã‚¤ãƒ«ã®ç«¶åˆãŒèµ·ã“ã‚‹å¯èƒ½å§“ãŒã‚ã‚Šã¾ã™! Please run a Compare first before synchronizing! åŒæœŸå‡¦ç†ã‚’実行ã™ã‚‹å‰ã«æ¯”較を行ã£ã¦ãã ã•ã„! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. \"切り替ãˆ\" を押ã™ã¨ FreeFileSync GUI モードã§é–‹ãã¾ã™ Processing folder pair: フォルダペアを処ç†ä¸: @@ -794,7 +790,7 @@ Stop åœæ¢ Swap sides パãƒãƒ«ã‚’入れ替㈠-Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... FreeFileSync GUI モードã®åˆ‡ã‚Šæ›¿ãˆä¸... Symbolic Link handling シンボリックリンク・リンクã®å–り扱ㄠ@@ -844,6 +840,8 @@ Total required free disk space: å¿…è¦ãªåˆè¨ˆãƒ‡ã‚£ã‚¹ã‚¯ç©ºã容é‡: Total time: åˆè¨ˆæ™‚é–“: +Transfer file and directory permissions\n(Requires Administrator rights) +ファイルã¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ãƒ‘ーミッション転é€\n(管ç†è€…権é™ãŒå¿…è¦) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes ファイルã®æ™‚é–“ã® +/- ã‚’æ£ç¢ºã« 1 時間以上ã®å·®ç•°ã¯ä¸ä¸€è‡´ã€1 時間未満ã®å·®ç•°ã¯åŒæ§˜ãƒ•ã‚¡ã‚¤ãƒ«ã¨ã—ã¦å–り扱ã„ã¾ã™(å¤æ™‚é–“ã¯å¤‰æ›ã•ã‚Œã¾ã™) Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/polish.lng b/BUILD/Languages/polish.lng index 4d486a48..d656ea3e 100644 --- a/BUILD/Languages/polish.lng +++ b/BUILD/Languages/polish.lng @@ -1,21 +1,5 @@ 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 - Byte - Bajt - GB - GB - MB - MB - day(s) - dni - hour(s) - godziny - kB - kB - min - minuty - sec - sekundy %x / %y objects deleted successfully %x / %y usuniÄ™tych obiektów %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x dni %x directories %x katalogi %x files %x pliki -%x is not a valid FreeFileSync batch file! -%x nie jest poprawnym plikiem batch programu FreeFileSync! +%x hour(s) +%x godzin %x kB %x kB +%x min +%x minut %x of %y rows in view %x z %y wierszy w widoku %x of 1 row in view %x z 1 wiersza w widoku +%x sec +%x sekund %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Dodaj foldery do porównania All directories in sync! Wszystkie katalogi zsynchronizowane! -An exception occured! +An exception occurred! WystÄ…piÅ‚ wyjÄ…tek! As a result the files are separated into the following categories: W rezultacie pliki zostaÅ‚y podzielone na nastÄ™pujÄ…ce kategorie: @@ -266,6 +256,8 @@ Continue Kontynuuj Conversion error: BÅ‚Ä…d konwersji: +Copy filesystem permissions +Kopiuj uprawnienia plików Copy from left to right Kopiuj z lewej do prawej Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Kopiuj zablokowane pliki Copy new or updated files to right folder. Kopiuj nowe lub aktualniejsze pliki na prawÄ… stronÄ™. -Copy shared or locked files using Volume Shadow Copy Service -Kopiuj współdzielone lub zablokowane pliki używajÄ…c Volume Shadow Copy Service +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +Kopiuj pliki udostÄ™pnione i zablokowane używajÄ…c usÅ‚ugi Volume Shadow Copy\n (Wymaga uprawnieÅ„ administratora) Copy to clipboard\tCTRL+C Kopiuj do pamiÄ™ci\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error BÅ‚Ä…d Error changing modification time: BÅ‚Ä…d zmiany godziny modyfikacji: +Error copying file permissions: +BÅ‚Ä…d podczas kopiowania uprawnieÅ„ pliku: Error copying file: BÅ‚Ä…d podczas kopiowania pliku: Error copying locked file %x! @@ -409,7 +403,7 @@ BÅ‚Ä…d podczas przenoszenia do kosza: Error opening file: BÅ‚Ä…d odczytu pliku: Error parsing configuration file: -BÅ‚Ä…d podczas parsowania pliku konfiguracyjnego: +BÅ‚Ä…d parsowania pliku konfiguracyjnego: Error reading file attributes: BÅ‚Ä…d odczytu atrybutów pliku: Error reading file: @@ -418,14 +412,16 @@ Error reading from synchronization database: BÅ‚Ä…d odczytu z bazy danych synchronizacji: Error resolving symbolic link: BÅ‚Ä…d odczytu dowiÄ…zania symbolicznego: +Error setting directory lock: + +Error setting privilege: +BÅ‚Ä…d ustawiania uprawnieÅ„: Error starting Volume Shadow Copy Service! BÅ‚Ä…d podczas uruchamianiu usÅ‚ugi Shadow Copy! Error traversing directory: BÅ‚Ä…d podczas odczytywania katalogu: Error when monitoring directories. BÅ‚Ä…d podczas monitorowania katalogów. -Error writing file attributes: -BÅ‚Ä…d zapisu atrybutów pliku: Error writing file: BÅ‚Ä…d zapisu pliku: Error writing to synchronization database: @@ -598,6 +594,8 @@ Initial synchronization: WstÄ™pna synchronizacja: Integrate external applications into context menu. The following macros are available: DoÅ‚Ä…cz zewnÄ™trznÄ… aplikacjÄ™ do menu kontekstowego. DostÄ™pne macra: +Invalid FreeFileSync config file! +NieprawidÅ‚owy plik konfiguracyjny! Leave as unresolved conflict Zostaw jako nierozwiÄ…zany konflikt Left @@ -678,7 +676,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! UsuniÄ™cie katalogów jest w konflikcie podkatalogami oraz plikami! Please run a Compare first before synchronizing! Przed synchronizacjÄ… należy uruchomić Porównaj! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. NaciÅ›nij \"PrzeÅ‚Ä…cz\" aby otworzyć moduÅ‚ GUI. Processing folder pair: Przetwarzanie folderów: @@ -704,6 +702,8 @@ Remove folder UsuÅ„ folder Remove folder pair UsuÅ„ parÄ™ folderów +Removing abandoned directory lock (%x)... + Report translation error ZgÅ‚oÅ› bÅ‚Ä…d w tÅ‚umaczeniu Reset @@ -794,7 +794,7 @@ Stop Zatrzymaj Swap sides ZamieÅ„ stronami -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... PrzeÅ‚Ä…czanie do trybu GUI FreeFileSync Symbolic Link handling ObsÅ‚uga dowiÄ…zaÅ„ symbolicznych @@ -844,6 +844,8 @@ Total required free disk space: CaÅ‚kowita wymagana przestrzeÅ„ dyskowa: Total time: CaÅ‚kowity czas: +Transfer file and directory permissions\n(Requires Administrator rights) +Transfer uprawnieÅ„ plików i katalogów\n(Wymaga uprawnieÅ„ Administratora) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Traktuj pliki różniÄ…ce siÄ™ dokÅ‚adnie +/- 1 godzinÄ™ jako równe, mniej niż 1 godzinÄ™ jako konflikt by uwzglÄ™dnić zmiane czasu letniego Unable to connect to sourceforge.net! @@ -872,6 +874,8 @@ 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 while directory is locked (%x)... + Warning Uwaga Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/portuguese.lng b/BUILD/Languages/portuguese.lng index 3f320f91..1f376257 100644 --- a/BUILD/Languages/portuguese.lng +++ b/BUILD/Languages/portuguese.lng @@ -1,21 +1,5 @@ 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 - Byte - Byte - GB - GB - MB - MB - day(s) - dia(s) - hour(s) - hora(s) - kB - kB - min - min - sec - seg %x / %y objects deleted successfully %x / %y objectos eliminados com sucesso %x Byte @@ -28,18 +12,24 @@ %x TB +%x day(s) + %x directories %x pastas %x files %x ficheiros -%x is not a valid FreeFileSync batch file! -%x não é um batch válido do FreeFileSync! +%x hour(s) + %x kB +%x min + %x of %y rows in view %x de %y ficheiros %x of 1 row in view %x de 1 linha +%x sec + %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Adicionar um par de pastas All directories in sync! Todas as pastas sincronizadas! -An exception occured! +An exception occurred! Ocorreu uma excepção! As a result the files are separated into the following categories: Como resultado, os ficheiros foram separados nas seguintes categorias: @@ -266,6 +256,8 @@ Continue Continuar Conversion error: Erro de conversão: +Copy filesystem permissions + Copy from left to right Copiar da esquerda para a direita Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Copiar ficheiros bloqueados Copy new or updated files to right folder. Copiar ficheiros novos ou actualizados para a direita -Copy shared or locked files using Volume Shadow Copy Service -Copiar ficheiros partilhados ou bloqueados usando o serviço Volume Shadow Copy +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) + Copy to clipboard\tCTRL+C Copiar para a Ãrea de transferência\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Erro Error changing modification time: Erro ao mudar a hora de modificação: +Error copying file permissions: + Error copying file: Erro ao copiar ficheiro: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Erro ao ler a base de dados de sincronização: Error resolving symbolic link: Erro na resolução do link simbólico: +Error setting privilege: + Error starting Volume Shadow Copy Service! Erro ao iniciar o serviço Volume Shadow Copy! Error traversing directory: Erro ao percorrer a pasta: Error when monitoring directories. Erro ao monitorizar os directórios. -Error writing file attributes: -Erro na escrita dos atributos do ficheiro: Error writing file: Erro de escrita no ficheiro: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: Sincronização inicial: Integrate external applications into context menu. The following macros are available: Integrar aplicações externas no menu de contexto. As seguintes macros estão disponÃveis: +Invalid FreeFileSync config file! + Leave as unresolved conflict Deixar como conflito Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! Please run a Compare first before synchronizing! Use Comparar antes da primeira sincronização! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Processing folder pair: A processar o par do directorio: @@ -794,7 +790,7 @@ Stop Parar Swap sides Trocar lados -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Symbolic Link handling @@ -844,6 +840,8 @@ Total required free disk space: Espaço livre necessário: Total time: Tempo total: +Transfer file and directory permissions\n(Requires Administrator rights) + Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Tratar ficheiros com exactamente +/- 1 hora como iguais, e menos de 1 hora como conflito, para salvaguardar a alteração da Hora de Verão Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/portuguese_br.lng b/BUILD/Languages/portuguese_br.lng index 9a8669b9..1a84c512 100644 --- a/BUILD/Languages/portuguese_br.lng +++ b/BUILD/Languages/portuguese_br.lng @@ -1,21 +1,5 @@ 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 - Byte - Byte - GB - GB - MB - MB - day(s) - dia(s) - hour(s) - hora(s) - kB - kB - min - min - sec - seg %x / %y objects deleted successfully %x / %y objetos apagados com sucesso %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x dia(s) %x directories %x diretórios %x files %x arquivos -%x is not a valid FreeFileSync batch file! -%x não é um arquivo batch válido do FreeFileSync! +%x hour(s) +%x hora(s) %x kB %x kB +%x min +%x min %x of %y rows in view %x de %y arquivos %x of 1 row in view %x de 1 linha +%x sec +%x seg %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Adicionar par de pastas All directories in sync! Todos os diretórios em sincronismo! -An exception occured! +An exception occurred! Ocorreu uma exceção! As a result the files are separated into the following categories: Como resultado, os arquivos são separados nas seguintes categorias: @@ -266,6 +256,8 @@ Continue Continuar Conversion error: Erro de conversão: +Copy filesystem permissions +Copiar permissões de arquivos e diretórios Copy from left to right Copiar da esquerda para a direita Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Copiar arquivos bloqueados (em uso) Copy new or updated files to right folder. Copiar arquivos novos ou atualizados para a pasta da direita -Copy shared or locked files using Volume Shadow Copy Service -Copiar arquivos compartilhados ou bloqueados usando o Serviço de Cópias de Sombra de Volume +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +Copiar arquivos compartilhados ou bloqueados (em uso) usando o Serviço de Cópias de Sombra de Volume\n(Requer direitos de Administrador) Copy to clipboard\tCTRL+C Copiar para a Ãrea de transferência\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Erro Error changing modification time: Erro ao mudar a hora de modificação: +Error copying file permissions: +Erro ao copiar permissões do arquivo: Error copying file: Erro ao copiar arquivo: Error copying locked file %x! @@ -418,14 +412,16 @@ Error reading from synchronization database: Erro ao ler do banco de dados de sincronização: Error resolving symbolic link: Erro na resolução de link simbólico: +Error setting directory lock: + +Error setting privilege: +Erro ao definir privilégio: Error starting Volume Shadow Copy Service! Erro ao inicializar o Serviço de Cópias de Sombra de Volume! Error traversing directory: Erro ao percorrer diretório: Error when monitoring directories. Erro monitorando diretórios. -Error writing file attributes: -Erro ao escrever atributos do arquivo: Error writing file: Erro ao escrever arquivo: Error writing to synchronization database: @@ -598,6 +594,8 @@ Initial synchronization: Sincronização inicial: Integrate external applications into context menu. The following macros are available: Integrar aplicações externas no menu de contexto. As seguintes macros estão disponÃveis: +Invalid FreeFileSync config file! +Arquivo de configuração do FreeFileSync inválido! Leave as unresolved conflict Deixar como conflito não resolvido Left @@ -678,7 +676,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! O diretório a ser apagado está em conflito com seus subdiretórios e -arquivos! Please run a Compare first before synchronizing! Por favor execute primeiro a Comparação antes de sincronizar! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Pressione \"Alterar\" para abrir o modo GUI do FreeFileSync. Processing folder pair: Processando par de pastas: @@ -704,6 +702,8 @@ Remove folder Remover pasta Remove folder pair Remover par de pastas +Removing abandoned directory lock (%x)... + Report translation error Reportar erro de tradução Reset @@ -794,7 +794,7 @@ Stop Parar Swap sides Inverter lados -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Alterando para o modo GUI do FreeFileSync... Symbolic Link handling Tratamento de Links Simbólicos @@ -844,8 +844,10 @@ Total required free disk space: Espaço livre total requerido: Total time: Tempo total: +Transfer file and directory permissions\n(Requires Administrator rights) +Transferir permissões de arquivos e diretórios\n(Requer direitos de Administrador) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes -Tratar tempo dos arquivos que diferem exatamente por +/- 1 hora como igual, menor que 1 hora como conflito para lidar com mudanças de Horário de Verão +Tratar tempo dos arquivos que diferem exatamente por mais ou menos 1 hora como igual e menor que 1 hora como conflito para lidar com mudanças de Horário de Verão Unable to connect to sourceforge.net! Não foi possÃvel conectar a sourceforge.net! Unable to create logfile! @@ -872,6 +874,8 @@ 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 while directory is locked (%x)... + Warning Atenção Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/romanian.lng b/BUILD/Languages/romanian.lng index aaab97ce..7bb1bb92 100644 --- a/BUILD/Languages/romanian.lng +++ b/BUILD/Languages/romanian.lng @@ -1,21 +1,5 @@ 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 din GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE - Byte - BaiÈ›i - GB - GB - MB - MB - day(s) - zile - hour(s) - ore - kB - KB - min - min - sec - sec %x / %y objects deleted successfully %x / %y obiecte È™terse cu succes %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x zile %x directories %x dosare %x files %x file -%x is not a valid FreeFileSync batch file! -%x nu este o filă lot FreeFileSync validă ! +%x hour(s) +%x ore %x kB %x KB +%x min +%x min %x of %y rows in view %x din %y rînduri afiÈ™ate %x of 1 row in view %x din 1 rînd afiÈ™at +%x sec +%x sec %x% %x% &Abort @@ -85,7 +75,7 @@ &OK &OK &Pause -&Pauză +&Pauzează &Quit &IeÈ™i &Restore @@ -182,7 +172,7 @@ Add folder pair Adaugă Pereche Nouă de Dosare All directories in sync! Toate dosarele au fost sincronizate! -An exception occured! +An exception occurred! A apărut o excepÈ›ie ! As a result the files are separated into the following categories: ÃŽn concluzie, filele sînt repartizate în categoriile următoare: @@ -266,6 +256,8 @@ Continue Continuă Conversion error: Eroare de convertire: +Copy filesystem permissions +Copiază permisiunile sistemului de file Copy from left to right Copiază de la Stînga la Dreapta Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Copiază filele zăvorîte [locked] Copy new or updated files to right folder. Copiază în dosarul din dreapta filele actualizate sau noi. -Copy shared or locked files using Volume Shadow Copy Service -Copiază filele partajate sau zăvorîte folosind serviciul de salvgardare din Windows +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +Copiază filele partajate sau zăvorîte folosind Serviciul de Salvgardare a Volumelor [Volume Shadow Copy]\n(Necesită drepturi de Administrator) Copy to clipboard\tCTRL+C Copiază în CliplanÈ™etă\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Eroare Error changing modification time: Eroare la schimbarea datei de modificare: +Error copying file permissions: +Eroare la copierea permisiunilor filei: Error copying file: Eroare la copierea filei: Error copying locked file %x! @@ -418,14 +412,16 @@ Error reading from synchronization database: Eroare la citirea din baza de date a sincronizării: Error resolving symbolic link: Eroare la rezolvarea legăturii simbolice: +Error setting directory lock: + +Error setting privilege: +Eroare la setarea privilegiului: Error starting Volume Shadow Copy Service! Eroare la pornirea serviciului Volume Shadow Copy! Error traversing directory: Eroare la parcurgerea dosarului: Error when monitoring directories. Eroare la monitorizarea dosarelor. -Error writing file attributes: -Eroare la scrierea atributelor filei: Error writing file: Eroare la scrierea filei: Error writing to synchronization database: @@ -598,6 +594,8 @@ Initial synchronization: Sincronizare iniÈ›ială: Integrate external applications into context menu. The following macros are available: Include aplicaÈ›iile externe în meniul contextual. Sînt disponibile următoarele macrocomenzi: +Invalid FreeFileSync config file! +Filă de configurare FreeFileSync nevalidă! Leave as unresolved conflict Lasă ca Conflict Nerezolvat Left @@ -678,7 +676,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! Ștergerea plănuită a dosarului intră în conflict cu subdosarele È™i filele sale! Please run a Compare first before synchronizing! Rulează compararea înainte de a sincroniza! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Apasă \"Comută\" pentru a deschide modul grafic al FreeFileSync Processing folder pair: Procesez perechea de dosare: @@ -704,6 +702,8 @@ Remove folder ÃŽnlătură Dosarul Remove folder pair ÃŽnlătură Perechea de Dosare +Removing abandoned directory lock (%x)... + Report translation error Raportarea erorilor de traducere Reset @@ -794,7 +794,7 @@ Stop OpreÈ™te Swap sides Schimbă părÈ›ile între ele -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Comut la modul grafic al FreeFileSync... Symbolic Link handling Prelucrarea Legăturilor Simbolice (Simlegături) @@ -844,6 +844,8 @@ Total required free disk space: SpaÈ›iu de stocare necesar: Total time: Timp Total: +Transfer file and directory permissions\n(Requires Administrator rights) +Transferă permisiunile filelor È™i dosarelor\n(Necesită drepturi de Administrator) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Tratează ca egale timpurile filelor care diferă exact cu +/- 1 oră, iar cele care diferă cu mai puÈ›in de 1 oră, ca niÈ™te conflicte generate de gestionarea orei de vară Unable to connect to sourceforge.net! @@ -872,6 +874,8 @@ 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 while directory is locked (%x)... + Warning Avertisment Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/russian.lng b/BUILD/Languages/russian.lng index 030df988..5e588273 100644 --- a/BUILD/Languages/russian.lng +++ b/BUILD/Languages/russian.lng @@ -1,47 +1,37 @@ 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 - Byte - Байт - GB - ГБ - MB - МБ - day(s) - день(ей) - hour(s) - чаÑ(ов) - kB - кБ - min - мин. - sec - Ñек. %x / %y objects deleted successfully %x / %y объектов удалено удачно %x Byte - +%x Байт %x GB - +%x ГБ %x MB - +%x МБ %x PB - +%x ПБ %x TB +%x ТБ +%x day(s) %x directories %x папки %x files %x файл(ов) -%x is not a valid FreeFileSync batch file! -%x не корректный файл пакетного Ð·Ð°Ð´Ð°Ð½Ð¸Ñ FreeFileSync! +%x hour(s) + %x kB +%x кБ +%x min %x of %y rows in view %x из %y Ñтрок(и) показано %x of 1 row in view %x из 1 Ñтрока показана -%x% +%x sec +%x% +%x% &Abort &Отмена &About... @@ -95,11 +85,11 @@ &Save &Сохранить &Switch - +&Переключить &Yes &Да (Build: %x) - +(Сборка %x) (Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".) (Помните, что только диÑки FAT/FAT32 Ñтрадают от Ñтой проблемы!\nВо вÑех оÑтальных ÑлучаÑÑ… вы можете отключить параметр \"игнорировать 1-чаÑовую разницу\".) (Requires an Internet connection!) @@ -161,7 +151,7 @@ <Last session> <ПоÑледнÑÑ ÑеÑÑиÑ> <Symlink> - +<Ð¡Ð¸Ð¼Ð²Ð¾Ð»ÑŒÐ½Ð°Ñ ÑÑылка> <multiple selection> <групповое выделение> A newer version of FreeFileSync is available: @@ -182,7 +172,7 @@ Add folder pair Добавить пару папок All directories in sync! Ð’Ñе папки Ñинхронизированы! -An exception occured! +An exception occurred! ИÑключение произошло! As a result the files are separated into the following categories: Как результат файлы разделÑÑŽÑ‚ÑÑ Ð½Ð° Ñледующие категории: @@ -207,7 +197,7 @@ Both sides have changed since last synchronization! Browse Обзор Browse directory - +Обзор папок Cannot determine sync-direction: Ðевозможно определить направление Ñинхронизации: Cannot find %x @@ -215,7 +205,7 @@ Cannot find %x Category ÐšÐ°Ñ‚ÐµÐ³Ð¾Ñ€Ð¸Ñ Clear filter settings - +ОчиÑтить наÑтройки фильтра Comma separated list СпиÑок, разделÑемый запÑтыми Command line @@ -266,6 +256,8 @@ Continue Продолжить Conversion error: Ошибка преобразованиÑ: +Copy filesystem permissions + Copy from left to right Скопировать Ñлева направо Copy from left to right overwriting @@ -278,16 +270,16 @@ Copy locked files Копировать заблокированные файлы Copy new or updated files to right folder. Копировать новые или обновлÑÑ‚ÑŒ файлы на правой Ñтороне. -Copy shared or locked files using Volume Shadow Copy Service -Копировать общие или заблокированные файлы Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ Службы Теневого ÐšÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¢Ð¾Ð¼Ð° +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) + Copy to clipboard\tCTRL+C Копировать в буфер обмена\tCTRL+C Copying Symbolic Link %x overwriting %y - +Копирование Ñимвольной ÑÑылки %x Ñ Ð¿ÐµÑ€ÐµÐ·Ð°Ð¿Ð¸Ñью %y Copying Symbolic Link %x to %y - +Копирование Ñимовльной ÑÑылки %x в %y Copying file %x overwriting %y - +Копирование файла %x Ñ Ð¿ÐµÑ€ÐµÐ·Ð°Ð¿Ð¸Ñью %y Copying file %x to %y Копирование файла %x в %y Could not determine volume name for file: @@ -335,7 +327,7 @@ Delete or overwrite files permanently Delete permanently УдалÑÑ‚ÑŒ, не Ð¿Ð¾Ð¼ÐµÑ‰Ð°Ñ Ð² "Корзину" Deleting Symbolic Link %x - +Удаление Ñимвольной ÑÑылки %x Deleting file %x Удаление файла %x Deleting folder %x @@ -345,7 +337,7 @@ Deletion handling Description ОпиÑание Direct - +ПрÑмое Directories are dependent! Be careful when setting up synchronization rules: ЗавиÑимые папки! Будьте внимательны при наÑтройке правил Ñинхронизации: Directories to watch @@ -371,11 +363,11 @@ Download now? Drag && drop Drag && drop Elements found: - +Ðлементов найдено: Elements processed: - +Ðлементов обработано: Elements remaining: - +Ðлементов оÑталоÑÑŒ: Email Почта Endless loop when traversing directory: @@ -384,6 +376,8 @@ Error Ошибка Error changing modification time: Ошибка при изменении времени модификации файла: +Error copying file permissions: + Error copying file: Ошибка при копировании файла: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Ошибка при чтении из базы данных Ñинхронизации: Error resolving symbolic link: Ошибка при решении ÑимволичеÑкой ÑÑылки: +Error setting privilege: + Error starting Volume Shadow Copy Service! Ошибка при запуÑке Службы Теневого ÐšÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¢Ð¾Ð¼Ð°! Error traversing directory: Ошибка при переÑечении папок: Error when monitoring directories. Ошибка при мониторинге папок. -Error writing file attributes: -Ошибка при запиÑи параметров файла: Error writing file: Ошибка при запиÑи файла: Error writing to synchronization database: @@ -479,7 +473,7 @@ 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 exist on left side only Файлы/папки, ÑущеÑтвующие только на левой Ñтороне Files/folders that exist on right side only @@ -487,15 +481,15 @@ 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: @@ -503,7 +497,7 @@ Find what: Folder Comparison and Synchronization Сравнение и ÑÐ¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Follow - +ПоÑледовательное Free disk space available: ДоÑтупно Ñвободного меÑта на диÑке: FreeFileSync Batch Job @@ -573,7 +567,7 @@ Identify and propagate changes on both sides using a database. Deletions and con If you like FFS ЕÑли Вам понравилÑÑ FFS Ignore - +Игнорировать Ignore 1-hour file time difference Игнорировать 1-чаÑовую разницу во времени Ignore errors @@ -598,6 +592,8 @@ Initial synchronization: ÐŸÐµÑ€Ð²Ð¾Ð½Ð°Ñ‡Ð°Ð»ÑŒÐ½Ð°Ñ ÑинхронизациÑ: Integrate external applications into context menu. The following macros are available: Интегрирует внешние Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð² контекÑтное меню.\nСледующие команды доÑтупны: +Invalid FreeFileSync config file! + Leave as unresolved conflict ОÑтавить как нерешенный конфликт Left @@ -633,7 +629,7 @@ 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 @@ -663,7 +659,7 @@ Only files/directories that pass filtering will be selected for synchronization. Open with Explorer Открыть путь в Проводнике Open with default application - +Открыть Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¿Ð¾-умолчанию Operation aborted! ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¾Ñ‚Ð¼ÐµÐ½ÐµÐ½Ð°! Operation: @@ -675,11 +671,11 @@ 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 modus. - +Press \"Switch\" to open FreeFileSync GUI mode. +Ðажмите \"Переключить\" Ð´Ð»Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÑŒÑкого графичеÑкого интерфейÑа FreeFileSync. Processing folder pair: Обработка пары папок: Published under the GNU General Public License: @@ -695,7 +691,7 @@ RealtimeSync - ÐвтоматичеÑÐºÐ°Ñ ÑÐ¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ RealtimeSync configuration ÐаÑтройка RealtimeSync Recycle Bin not yet supported for this system! - +Корзина пока не поддерживаетÑÑ Ð´Ð»Ñ Ñтой ÑиÑтемы! Relative path ОтноÑительный путь Remove alternate settings @@ -789,17 +785,17 @@ Start synchronization Statistics СтатиÑтика Status feedback - +Ð¡Ñ‚Ð°Ñ‚ÑƒÑ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾Ð¹ ÑвÑзи Stop Стоп Swap sides ПоменÑÑ‚ÑŒ направление -Switching to FreeFileSync GUI modus... - +Switching to FreeFileSync GUI mode... +Переключение на пользовательÑкий графичеÑкий Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ FreeFileSync... Symbolic Link handling - +Обращение к Ñимвольной ÑÑылке Symlinks %x have the same date but a different target! - +Ð¡Ð¸Ð¼Ð²Ð¾Ð»ÑŒÐ½Ð°Ñ ÑÑылка %x имеет ту же дату, но различное Ñодержание! Synchronization Preview ПредпроÑмотр Ñинхронизации Synchronization aborted! @@ -825,11 +821,11 @@ 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- вÑе папки ÑтановÑÑ‚ÑÑ Ð´Ð¾Ñтупны (например, подключение переноÑного ноÑителÑ)\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 @@ -844,6 +840,8 @@ Total required free disk space: Общее требуемое Ñвободное диÑковое проÑтранÑтво: Total time: Общее времÑ: +Transfer file and directory permissions\n(Requires Administrator rights) + Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Учитывать файлы, которые отличаютÑÑ Ð¿Ð¾ времени на 1 чаÑ, как равные, менее чем на 1 чаÑ, как конфликтные, чтобы учеÑÑ‚ÑŒ переход на летнее Ð²Ñ€ÐµÐ¼Ñ Unable to connect to sourceforge.net! @@ -871,7 +869,7 @@ Verifying file %x Volume name %x not part of filename %y! Ð˜Ð¼Ñ Ñ‚Ð¾Ð¼Ð° %x не ÑвлÑетÑÑ Ñ‡Ð°Ñтью имени файла %y! Waiting for all directories to become available... - +Ожидание, пока вÑе папки Ñтанут доÑтупными... Warning Внимание Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/slovenian.lng b/BUILD/Languages/slovenian.lng index 7dce6bf4..72c1b604 100644 --- a/BUILD/Languages/slovenian.lng +++ b/BUILD/Languages/slovenian.lng @@ -1,21 +1,5 @@ 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 od GNU Compiler Collection\n wxWidgets \t- Open-Source GUI ogrodje\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE - Byte - Bajt - GB - GB - MB - MB - day(s) - dni - hour(s) - ur - kB - kB - min - min - sec - sek %x / %y objects deleted successfully %x / %y objektov uspeÅ¡no izbrisanih %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x dan/dni %x directories %x imeniki %x files %x datoteke -%x is not a valid FreeFileSync batch file! -%x ni veljavna FreeFileSync batch datoteka! +%x hour(s) +%x ura/ur %x kB %x kB +%x min +%x min %x of %y rows in view %x od %y vrstic prikazanih %x of 1 row in view %x od 1 vrstice prikazane +%x sec +%x sek %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Dodaj par imenikov All directories in sync! Vsi imeniki so sinhronizirani! -An exception occured! +An exception occurred! Zgodila se je napaka! As a result the files are separated into the following categories: Kot rezultat so datoteke razdeljene v naslednje kategorije: @@ -266,6 +256,8 @@ Continue Nadaljuj Conversion error: Napaka pri pretvorbi: +Copy filesystem permissions +Kopiraj dovoljenja datoteÄnega sistema Copy from left to right Kopiraj iz leve na desno Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Kopiraj zaklenjene datoteke Copy new or updated files to right folder. Kopiraj nove ali posodobljene datoteke v desno mapo. -Copy shared or locked files using Volume Shadow Copy Service -Kopiraj deljene ali zaklenjene datoteke z uporabo servisa Volume Shadow Copy +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +Kopiraj deljene ali zaklenjene datoteke z uporabo servisa Shadow Copy\n(Zahteva pravice skrbnika) Copy to clipboard\tCTRL+C Kopiraj v odložiÅ¡Äe\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Napaka Error changing modification time: Napaka pri spreminjanju Äasa modifikacije: +Error copying file permissions: +Napaka pri kopiranju datoteÄnih dovoljenj: Error copying file: Napaka pri kopiranju datoteke: Error copying locked file %x! @@ -418,14 +412,16 @@ Error reading from synchronization database: Napaka pri branju iz sinhronizacijske podatkovne baze: Error resolving symbolic link: Napaka pri razreÅ¡evanju simboliÄne povezave: +Error setting directory lock: + +Error setting privilege: +Napaka pri nastavljanju privilegija: Error starting Volume Shadow Copy Service! Napaka pri zagonu servisa Volume Shadow Copy! Error traversing directory: Napaka pri prehajanju imenika: Error when monitoring directories. Napaka pri nadzorovanju imenikov. -Error writing file attributes: -Napaka pri pisanju atributov datoteke: Error writing file: Napaka pri pisanju datoteke: Error writing to synchronization database: @@ -598,6 +594,8 @@ Initial synchronization: ZaÄetna sinhronizacija: Integrate external applications into context menu. The following macros are available: Integriraj zunanje aplikacije v kontekstni menu. Na voljo so naslednji makri: +Invalid FreeFileSync config file! +Neveljavna FreeFileSync nastavitvena datoteka! Leave as unresolved conflict Pusti kot nereÅ¡eni spor Left @@ -678,7 +676,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! NaÄrtovano brisanje imenika je v sporu z njegovimi podimeniki in -datotekami! Please run a Compare first before synchronizing! Prosim najprej zaženite Primerjaj preden sinhronizirate! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Pritisnite \"Zamenjaj\", da odprete FreeFileSync GUI naÄin. Processing folder pair: Obdelujem par map: @@ -704,6 +702,8 @@ Remove folder Odstrani v mapo Remove folder pair Odstrani par imenikov +Removing abandoned directory lock (%x)... + Report translation error PoroÄaj o napaki prevoda Reset @@ -794,7 +794,7 @@ Stop Ustavi Swap sides Zamenjaj strani -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Preklapljam v FreeFileSync GUI naÄin... Symbolic Link handling Rokovanje s simboliÄnimi povezavami @@ -844,6 +844,8 @@ Total required free disk space: Skupno zahtevani prosti prostor na disku: Total time: Celoten Äas: +Transfer file and directory permissions\n(Requires Administrator rights) +Prenesi dovoljenja datotek in imenikov\n(Zahteva pravice skrbnika) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Obravnavaj Äas spremembe datoteke, ki se razlikuje za toÄno +/- 1 uro kot enak, Äe pa je manjÅ¡i kot 1 ura, pa kot spor, da lahko obravnavamo spremembe Poletnega Äasa Unable to connect to sourceforge.net! @@ -872,6 +874,8 @@ 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 while directory is locked (%x)... + Warning Pozor Warning: Synchronization failed for %x item(s): diff --git a/BUILD/Languages/spanish.lng b/BUILD/Languages/spanish.lng index 23bd2a59..92792843 100644 --- a/BUILD/Languages/spanish.lng +++ b/BUILD/Languages/spanish.lng @@ -1,21 +1,5 @@ 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 - Byte - Byte - GB - GB - MB - MB - day(s) - dia(s) - hour(s) - hora(s) - kB - kB - min - min - sec - seg %x / %y objects deleted successfully %x / %y objetos borrados satisfactoriamente %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) + %x directories %x directorios %x files %x archivos -%x is not a valid FreeFileSync batch file! -%x no es un archivo batch de FreeFileSync válido! +%x hour(s) + %x kB %x kB +%x min + %x of %y rows in view %x de %y filas en vista %x of 1 row in view %x de 1 fila en vista +%x sec + %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Añadir un par de carpetas All directories in sync! ¡Todos los directorios en sincronización! -An exception occured! +An exception occurred! ¡Ha ocurrido una excepción! As a result the files are separated into the following categories: Como resultado, los archivos están separados en las siguientes categorÃas: @@ -266,6 +256,8 @@ Continue Continuar Conversion error: Error de conversión: +Copy filesystem permissions + Copy from left to right Copiar de izquierda a derecha Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Copiar archivos bloqueados Copy new or updated files to right folder. Copiar archivos nuevos o actualizados a la carpeta de la derecha. -Copy shared or locked files using Volume Shadow Copy Service -Copiar archivos compartidos o bloqueados usando el servicio "Volume Shadow Copy" +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) + Copy to clipboard\tCTRL+C Copiar al Portapapeles\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Error Error changing modification time: Error al cambiar hora de modificación: +Error copying file permissions: + Error copying file: Error al copiar archivo: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Error al leer de la base de datos de sincronización: Error resolving symbolic link: Error al resolver enlace simbólico: +Error setting privilege: + Error starting Volume Shadow Copy Service! ¡Error al iniciar el servicio "Volume Shadow Copy"! Error traversing directory: Error al buscar en el directorio: Error when monitoring directories. Error al visualizar los directorios. -Error writing file attributes: -Error al escribir atributos de archivo: Error writing file: Error al escribir archivo: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: Sincronización inicial: Integrate external applications into context menu. The following macros are available: Integrar aplicaciones externas en el menú de contexto. Los siguientes macros están disponibles: +Invalid FreeFileSync config file! + Leave as unresolved conflict Dejar como conflicto sin resolver Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! ¡La eliminación planeada del directorio se encuentra en conflicto con sus subdirectorios y archivos! Please run a Compare first before synchronizing! ¡Por favor, ejecute la comparación antes de la sincronización! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Presionar \"Cambiar\" para abrir el modo GUI de FreeFileSync. Processing folder pair: Procesar un par de carpetas: @@ -794,7 +790,7 @@ Stop Detener Swap sides Intercambiar lados -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Cambiando al modo GUI de FreeFileSync... Symbolic Link handling Gestión de enlaces simbólicos @@ -844,6 +840,8 @@ Total required free disk space: Espacio total de disco necesario: Total time: Tiempo total: +Transfer file and directory permissions\n(Requires Administrator rights) + Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes El archivo en cuestión tiene una diferencia de tiempo de +/- 1 hora, menos de una hora entra en conflicto para gestionar los cambios referentes al horario de verano Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/swedish.lng b/BUILD/Languages/swedish.lng index e5c5a68c..9e4b4a9e 100644 --- a/BUILD/Languages/swedish.lng +++ b/BUILD/Languages/swedish.lng @@ -1,21 +1,5 @@ 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 - Byte - Byte - GB - GB - MB - MB - day(s) - dag(ar) - hour(s) - timma(r) - kB - kB - min - min. - sec - sek. %x / %y objects deleted successfully %x / %y objekt borttagna %x Byte @@ -28,18 +12,24 @@ %x PB %x TB %x TB +%x day(s) +%x dag(ar) %x directories %x kataloger %x files %x filer -%x is not a valid FreeFileSync batch file! -%x är ingen giltig FreeFileSync batch-fil! +%x hour(s) +%x timma(r) %x kB %x kB +%x min +%x min %x of %y rows in view %x rader av %y i vyn %x of 1 row in view %x av 1 rad i vyn +%x sec +%x sek %x% %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Lägg till katalogpar All directories in sync! Alla kataloger synkade! -An exception occured! +An exception occurred! Ett undantag inträffade! As a result the files are separated into the following categories: Som ett resultat blir filerna separerade i följande kategorier: @@ -266,6 +256,8 @@ Continue Fortsätt Conversion error: Konversionsfel: +Copy filesystem permissions +Kopiera filsystembehörigheter Copy from left to right Kopiera frÃ¥n vänster till höger Copy from left to right overwriting @@ -278,8 +270,8 @@ Copy locked files Kopiera lÃ¥sta filer Copy new or updated files to right folder. Kopiera nya och uppdaterade filer till höger katalog. -Copy shared or locked files using Volume Shadow Copy Service -Använd Volume Shadow Copy Service för att kopiera lÃ¥sta eller delade filer +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) +Kopiera delade eller lÃ¥sta filer med hjälp av Volume Shadow Copy Service\n(Kräver administratörsrättighet) Copy to clipboard\tCTRL+C Kopiera till urklipp\tCTRL+C Copying Symbolic Link %x overwriting %y @@ -384,6 +376,8 @@ Error Fel Error changing modification time: Kan inte modifiera tidsstämpel: +Error copying file permissions: +Kan inte kopiera filsystembehörighet: Error copying file: Kan inte kopiera fil: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Kan inte läsa frÃ¥n databasen: Error resolving symbolic link: Kan inte tyda symbolisk länk: +Error setting privilege: +Kan inte ange privilegie: Error starting Volume Shadow Copy Service! Kan inte starta 'Volume Shadow Copy Service'! Error traversing directory: Accessfel pÃ¥ katalog: Error when monitoring directories. Fel vid övervakning av kataloger. -Error writing file attributes: -Kan inte skriva filattribut: Error writing file: Kan inte skriva fil: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: Initial synkronisering: Integrate external applications into context menu. The following macros are available: Integrera externa program i högerklicksmeny. Följande variabler finns tillgängliga: +Invalid FreeFileSync config file! +Felaktig FreeFileSync konfigurationsfil! Leave as unresolved conflict Ignorera konflikt Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! Planerad katalogborttagning är i konflikt med sina underkataloger och filer Please run a Compare first before synchronizing! Du mÃ¥ste trycka \"Jämför\" innan du kan synkronisera. -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Tryck pÃ¥ \"Växla\" för att öppna FreeFileSyncs grafiska läge Processing folder pair: Processar katalogpar: @@ -794,7 +790,7 @@ Stop Stopp Swap sides Byt sida -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Växlar till FreeFileSyncs grafiska läge Symbolic Link handling Hantering av Symboliska länkar @@ -844,6 +840,8 @@ Total required free disk space: Ledigt diskutrymme som krävs: Total time: Total tid: +Transfer file and directory permissions\n(Requires Administrator rights) +Överför fil- och katalogrättigheter\n(Kräver administratörsrättigheter) Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Betrakta tidsstämplar som skiljer exakt +/- 1 timme som lika, och mindre än 1 timme som konflikt, för att hantera sommartid Unable to connect to sourceforge.net! diff --git a/BUILD/Languages/turkish.lng b/BUILD/Languages/turkish.lng index 6c7aa151..8971e84c 100644 --- a/BUILD/Languages/turkish.lng +++ b/BUILD/Languages/turkish.lng @@ -1,21 +1,5 @@ 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 - Byte - Bit - GB - GB - MB - MB - day(s) - gün(ler) - hour(s) - saat(ler) - kB - kB - min - dak - sec - san %x / %y objects deleted successfully %x / %y obje baÅŸarıyla silindi %x Byte @@ -28,18 +12,24 @@ %x TB +%x day(s) + %x directories %x dizin %x files %x dosya -%x is not a valid FreeFileSync batch file! -%x geçerli bir FreeFileSync komut (batch) dosyası deÄŸildir! +%x hour(s) + %x kB +%x min + %x of %y rows in view %y satırdan %x'i görüntüleniyor %x of 1 row in view 1 satırdan %x'i görüntüleniyor +%x sec + %x% &Abort @@ -182,7 +172,7 @@ Add folder pair Klasör çifti ekle All directories in sync! -An exception occured! +An exception occurred! OlaÄŸan dışı bir durum oluÅŸtu! As a result the files are separated into the following categories: Sonuç olarak dosyalar takibeden katagorilere göre ayrıldı: @@ -266,6 +256,8 @@ Continue Devam et Conversion error: Dönüştürme hatası: +Copy filesystem permissions + Copy from left to right Soldan saÄŸa kopyala Copy from left to right overwriting @@ -278,7 +270,7 @@ Copy locked files Copy new or updated files to right folder. Yeni veya güncellenmiÅŸ dosyaları saÄŸdaki klasöre kopyala. -Copy shared or locked files using Volume Shadow Copy Service +Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) Copy to clipboard\tCTRL+C Hafızaya kopyala\tCTRL+C @@ -384,6 +376,8 @@ Error Hata Error changing modification time: DeÄŸiÅŸiklik tarihini deÄŸiÅŸtirirken hata: +Error copying file permissions: + Error copying file: Dosya kopyalarken hata: Error copying locked file %x! @@ -418,14 +412,14 @@ Error reading from synchronization database: Senkronizasyon veri tabanýndan okuma hatasý: Error resolving symbolic link: Sembolik baÄŸlantıyı çözümlerken hata: +Error setting privilege: + Error starting Volume Shadow Copy Service! 'Volume shadow copy' servisini baÅŸlatırken hata! Error traversing directory: Dizini okurken hata: Error when monitoring directories. Dizinler izlenirken hata. -Error writing file attributes: -Dosya özniteliklerini yazarken hata: Error writing file: Dosya yazarken hata: Error writing to synchronization database: @@ -598,6 +592,8 @@ Initial synchronization: Baþlangýç senkronizasyonu: Integrate external applications into context menu. The following macros are available: Harici uygulamaları içerik menüsüne ekle. Åžu makro’lar temin edilebilir: +Invalid FreeFileSync config file! + Leave as unresolved conflict ÇözülmemiÅŸ tutarsızlık olarak bırak Left @@ -678,7 +674,7 @@ Planned directory deletion is in conflict with its subdirectories and -files! Please run a Compare first before synchronizing! -Press \"Switch\" to open FreeFileSync GUI modus. +Press \"Switch\" to open FreeFileSync GUI mode. Processing folder pair: @@ -794,7 +790,7 @@ Stop Durdur Swap sides Tarafları ters çevir -Switching to FreeFileSync GUI modus... +Switching to FreeFileSync GUI mode... Symbolic Link handling @@ -844,6 +840,8 @@ Total required free disk space: Toplam gerekli boÅŸ disk alanı: Total time: Toplam zaman: +Transfer file and directory permissions\n(Requires Administrator rights) + Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes Dosya tarihleri tam olarak +/- 1 saat farklı olduÄŸunda dosyaları eÅŸit olarak algıla. 1 saatten az tarih farklılıklarını ise tutarsızlık olarak belirt (Gün ışığından yararlanma durumu) Unable to connect to sourceforge.net! diff --git a/BUILD/Resources.dat b/BUILD/Resources.dat Binary files differindex 57450b8d..42cbfb40 100644 --- a/BUILD/Resources.dat +++ b/BUILD/Resources.dat diff --git a/Cleanup.cmd b/Cleanup.cmd index ebed029e..c224ad0b 100644 --- a/Cleanup.cmd +++ b/Cleanup.cmd @@ -29,9 +29,11 @@ del BUILD\RealtimeSync*.lib del BUILD\RealtimeSync*.exp del BUILD\FreeFileSync.exe +del BUILD\FreeFileSync_Debug.exe del BUILD\FreeFileSync_Win32.exe del BUILD\FreeFileSync_x64.exe del BUILD\RealtimeSync.exe +del BUILD\RealtimeSync_Debug.exe del BUILD\RealtimeSync_Win32.exe del BUILD\RealtimeSync_x64.exe del BUILD\gmon.out diff --git a/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj b/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj new file mode 100644 index 00000000..6fe2a80e --- /dev/null +++ b/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj @@ -0,0 +1,310 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{86C36CC7-9418-4253-9929-829486F59A00}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>FreeFileSync</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v100</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v100</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>BUILD\</OutDir> + <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> + <TargetName>$(ProjectName)_$(PlatformName)_beta</TargetName> + <GenerateManifest>false</GenerateManifest> + <EmbedManifest>true</EmbedManifest> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>BUILD\</OutDir> + <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> + <TargetName>$(ProjectName)_$(PlatformName)</TargetName> + <GenerateManifest>false</GenerateManifest> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>BUILD\</OutDir> + <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> + <GenerateManifest>false</GenerateManifest> + <TargetName>$(ProjectName)_$(PlatformName)_beta</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>BUILD\</OutDir> + <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> + <GenerateManifest>false</GenerateManifest> + <TargetName>$(ProjectName)_$(PlatformName)</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-2.9.1\include;C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> + <PrecompiledHeaderFile>$(ProjectDir)library\pch.h</PrecompiledHeaderFile> + <DisableSpecificWarnings>4100</DisableSpecificWarnings> + <MultiProcessorCompilation>false</MultiProcessorCompilation> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> + <ForcedIncludeFiles>$(ProjectDir)library/pch.h</ForcedIncludeFiles> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SuppressStartupBanner>true</SuppressStartupBanner> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <AdditionalDependencies>wxmsw29ud_adv.lib;wxmsw29ud_core.lib;wxbase29ud.lib;wxpngd.lib;wxzlibd.lib;wxbase29ud_net.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> + <LinkStatus> + </LinkStatus> + </Link> + <ResourceCompile> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-2.9.1\include;C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib\mswud</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions> + </ResourceCompile> + <Manifest> + <SuppressDependencyElement> + </SuppressDependencyElement> + </Manifest> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> + <PrecompiledHeaderFile>$(ProjectDir)library\pch.h</PrecompiledHeaderFile> + <DisableSpecificWarnings>4100</DisableSpecificWarnings> + <MultiProcessorCompilation>false</MultiProcessorCompilation> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> + <ForcedIncludeFiles>$(ProjectDir)library/pch.h</ForcedIncludeFiles> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <SuppressStartupBanner>true</SuppressStartupBanner> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SuppressStartupBanner>true</SuppressStartupBanner> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <AdditionalDependencies>wxmsw29ud_adv.lib;wxmsw29ud_core.lib;wxbase29ud.lib;wxpngd.lib;wxzlibd.lib;wxbase29ud_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> + </Link> + <ResourceCompile> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-2.9.1\include;C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib\mswud</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);WX_CPU_AMD64</PreprocessorDefinitions> + </ResourceCompile> + <Manifest> + <SuppressDependencyElement> + </SuppressDependencyElement> + </Manifest> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level4</WarningLevel> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-2.9.1\include;C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>false</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalDependencies>wxmsw29u_adv.lib;wxmsw29u_core.lib;wxbase29u.lib;wxpng.lib;wxzlib.lib;wxbase29u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> + <LinkStatus> + </LinkStatus> + </Link> + <ResourceCompile> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-2.9.1\include;C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib\mswu</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions> + <Culture> + </Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level4</WarningLevel> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <DisableSpecificWarnings>4100</DisableSpecificWarnings> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <SuppressStartupBanner>true</SuppressStartupBanner> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>false</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalDependencies>wxmsw29u_adv.lib;wxmsw29u_core.lib;wxbase29u.lib;wxpng.lib;wxzlib.lib;wxbase29u_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> + </LinkStatus> + </Link> + <ResourceCompile> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-2.9.1\include;C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib\mswu</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);WX_CPU_AMD64</PreprocessorDefinitions> + <Culture> + </Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="algorithm.cpp"> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> + </ClCompile> + <ClCompile Include="application.cpp" /> + <ClCompile Include="comparison.cpp" /> + <ClCompile Include="file_hierarchy.cpp" /> + <ClCompile Include="library\binary.cpp" /> + <ClCompile Include="library\custom_grid.cpp" /> + <ClCompile Include="library\db_file.cpp" /> + <ClCompile Include="library\dir_lock.cpp" /> + <ClCompile Include="library\error_log.cpp" /> + <ClCompile Include="library\filter.cpp" /> + <ClCompile Include="library\icon_buffer.cpp" /> + <ClCompile Include="library\process_xml.cpp" /> + <ClCompile Include="library\resources.cpp" /> + <ClCompile Include="library\soft_filter.cpp" /> + <ClCompile Include="library\statistics.cpp" /> + <ClCompile Include="library\status_handler.cpp" /> + <ClCompile Include="shared\app_main.cpp" /> + <ClCompile Include="shared\check_exist.cpp" /> + <ClCompile Include="shared\custom_button.cpp" /> + <ClCompile Include="shared\custom_combo_box.cpp" /> + <ClCompile Include="shared\custom_tooltip.cpp" /> + <ClCompile Include="shared\dll_loader.cpp" /> + <ClCompile Include="shared\drag_n_drop.cpp" /> + <ClCompile Include="shared\file_handling.cpp" /> + <ClCompile Include="shared\file_id.cpp" /> + <ClCompile Include="shared\file_io.cpp" /> + <ClCompile Include="shared\file_traverser.cpp" /> + <ClCompile Include="shared\global_func.cpp" /> + <ClCompile Include="shared\guid.cpp" /> + <ClCompile Include="shared\help_provider.cpp" /> + <ClCompile Include="shared\localization.cpp" /> + <ClCompile Include="shared\long_path_prefix.cpp" /> + <ClCompile Include="shared\recycler.cpp" /> + <ClCompile Include="shared\serialize.cpp" /> + <ClCompile Include="shared\shadow.cpp" /> + <ClCompile Include="shared\standard_paths.cpp" /> + <ClCompile Include="shared\system_func.cpp" /> + <ClCompile Include="shared\taskbar.cpp" /> + <ClCompile Include="shared\tinyxml\tinyxml.cpp" /> + <ClCompile Include="shared\tinyxml\tinyxmlerror.cpp" /> + <ClCompile Include="shared\tinyxml\tinyxmlparser.cpp" /> + <ClCompile Include="shared\toggle_button.cpp" /> + <ClCompile Include="shared\util.cpp" /> + <ClCompile Include="shared\xml_base.cpp" /> + <ClCompile Include="shared\zstring.cpp" /> + <ClCompile Include="structures.cpp" /> + <ClCompile Include="synchronization.cpp" /> + <ClCompile Include="ui\batch_config.cpp" /> + <ClCompile Include="ui\batch_status_handler.cpp" /> + <ClCompile Include="ui\check_version.cpp" /> + <ClCompile Include="ui\grid_view.cpp" /> + <ClCompile Include="ui\gui_generated.cpp" /> + <ClCompile Include="ui\gui_status_handler.cpp" /> + <ClCompile Include="ui\main_dlg.cpp" /> + <ClCompile Include="ui\msg_popup.cpp" /> + <ClCompile Include="ui\mouse_move_dlg.cpp" /> + <ClCompile Include="ui\progress_indicator.cpp" /> + <ClCompile Include="ui\search.cpp" /> + <ClCompile Include="ui\small_dlgs.cpp" /> + <ClCompile Include="ui\switch_to_gui.cpp" /> + <ClCompile Include="ui\sync_cfg.cpp" /> + <ClCompile Include="ui\tray_icon.cpp" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="resource.rc" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/FreeFileSync.cbp b/FreeFileSync.cbp index 750cc527..a8e8709d 100644 --- a/FreeFileSync.cbp +++ b/FreeFileSync.cbp @@ -8,7 +8,7 @@ <Option compiler="gcc" /> <Build> <Target title="Release"> - <Option output="BUILD\FreeFileSync" prefix_auto="1" extension_auto="1" /> + <Option output="BUILD\FreeFileSync_Win32" prefix_auto="1" extension_auto="1" /> <Option working_dir="BUILD\" /> <Option object_output="OBJ\Release_FFS_GCC\" /> <Option type="0" /> @@ -21,12 +21,14 @@ </Compiler> <Linker> <Add option="-s" /> + <Add option="-static" /> <Add library="libwxmsw28u_adv.a" /> <Add library="libwxmsw28u_core.a" /> <Add library="libwxbase28u.a" /> <Add library="libwxpng.a" /> <Add library="libwxzlib.a" /> <Add library="libwxbase28u_net.a" /> + <Add library="libboost_thread-mgw45-mt-s-1_43.a" /> <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib" /> </Linker> </Target> @@ -52,11 +54,12 @@ <Add library="libwxbase28ud.a" /> <Add library="libwxpngd.a" /> <Add library="libwxzlibd.a" /> + <Add library="libboost_thread-mgw45-mt-sd-1_43.a" /> <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll" /> </Linker> </Target> <Target title="Debug-DLL"> - <Option output="BUILD\FreeFileSync" prefix_auto="1" extension_auto="1" /> + <Option output="BUILD\FreeFileSync_Debug" prefix_auto="1" extension_auto="1" /> <Option working_dir="BUILD" /> <Option object_output="OBJ\Debug_FFS_GCC\" /> <Option type="0" /> @@ -74,6 +77,7 @@ <Add library="libwxmsw28ud_core.a" /> <Add library="libwxbase28ud.a" /> <Add library="libwxbase28ud_net.a" /> + <Add library="libboost_thread-mgw45-mt-sd-1_43.a" /> <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll" /> </Linker> </Target> @@ -96,7 +100,7 @@ <Add option="-DwxUSE_UNICODE" /> <Add option="-DZSTRING_WIDE_CHAR" /> <Add directory="C:\Programme\C++\wxWidgets\include" /> - <Add directory="shared\boost_1_x" /> + <Add directory="C:\Program Files\C++\Boost" /> </Compiler> <ResourceCompiler> <Add directory="C:\Programme\C++\wxWidgets\include" /> @@ -112,9 +116,10 @@ <Add library="liboleaut32.a" /> <Add library="libgdi32.a" /> <Add library="libcomdlg32.a" /> - <Add library="libwinmm.a" /> <Add library="libws2_32.a" /> - <Add library="libwinspool" /> + <Add library="libwinspool.a" /> + <Add library="libwinmm.a" /> + <Add directory="C:\Program Files\C++\Boost\stage\lib" /> </Linker> <Unit filename="WxWizFrame.fbp"> <Option target="<{~None~}>" /> @@ -134,29 +139,30 @@ <Unit filename="comparison.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="fileHierarchy.cpp" /> - <Unit filename="fileHierarchy.h" /> + <Unit filename="file_hierarchy.cpp" /> + <Unit filename="file_hierarchy.h" /> <Unit filename="library\binary.cpp" /> <Unit filename="library\binary.h" /> - <Unit filename="library\checkExist.h" /> - <Unit filename="library\customGrid.cpp"> + <Unit filename="library\custom_grid.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="library\customGrid.h"> + <Unit filename="library\custom_grid.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="library\dbFile.cpp" /> - <Unit filename="library\dbFile.h"> + <Unit filename="library\db_file.cpp" /> + <Unit filename="library\db_file.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="library\detectRenaming.h" /> - <Unit filename="library\errorLogging.cpp"> + <Unit filename="library\detect_renaming.h" /> + <Unit filename="library\dir_lock.cpp" /> + <Unit filename="library\dir_lock.h" /> + <Unit filename="library\error_log.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="library\errorLogging.h"> + <Unit filename="library\error_log.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> @@ -185,11 +191,11 @@ <Unit filename="library\gtest\unittest3.cpp"> <Option target="Unit Test" /> </Unit> - <Unit filename="library\iconBuffer.cpp"> + <Unit filename="library\icon_buffer.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="library\iconBuffer.h"> + <Unit filename="library\icon_buffer.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> @@ -199,16 +205,16 @@ <Option target="Unit Test" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="library\processXml.cpp" /> - <Unit filename="library\processXml.h"> + <Unit filename="library\process_xml.cpp" /> + <Unit filename="library\process_xml.h"> <Option target="<{~None~}>" /> </Unit> <Unit filename="library\resources.cpp" /> <Unit filename="library\resources.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="library\softFilter.cpp" /> - <Unit filename="library\softFilter.h" /> + <Unit filename="library\soft_filter.cpp" /> + <Unit filename="library\soft_filter.h" /> <Unit filename="library\statistics.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> @@ -216,8 +222,8 @@ <Unit filename="library\statistics.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="library\statusHandler.cpp" /> - <Unit filename="library\statusHandler.h"> + <Unit filename="library\status_handler.cpp" /> + <Unit filename="library\status_handler.h"> <Option target="<{~None~}>" /> </Unit> <Unit filename="resource.rc"> @@ -226,64 +232,64 @@ <Option target="Debug-DLL" /> </Unit> <Unit filename="shared\Recycler.h" /> - <Unit filename="shared\appMain.cpp"> + <Unit filename="shared\app_main.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\appMain.h"> + <Unit filename="shared\app_main.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\buildInfo.h" /> - <Unit filename="shared\checkExist.cpp" /> - <Unit filename="shared\checkExist.h" /> - <Unit filename="shared\customButton.cpp"> + <Unit filename="shared\build_info.h" /> + <Unit filename="shared\check_exist.cpp" /> + <Unit filename="shared\check_exist.h" /> + <Unit filename="shared\custom_button.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\customButton.h"> + <Unit filename="shared\custom_button.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\customComboBox.cpp" /> - <Unit filename="shared\customComboBox.h" /> - <Unit filename="shared\customTooltip.cpp"> + <Unit filename="shared\custom_combo_box.cpp" /> + <Unit filename="shared\custom_combo_box.h" /> + <Unit filename="shared\custom_tooltip.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\customTooltip.h"> + <Unit filename="shared\custom_tooltip.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\debugNew.h" /> - <Unit filename="shared\dllLoader.cpp" /> - <Unit filename="shared\dllLoader.h" /> - <Unit filename="shared\dragAndDrop.cpp"> + <Unit filename="shared\debug_new.h" /> + <Unit filename="shared\dll_loader.cpp" /> + <Unit filename="shared\dll_loader.h" /> + <Unit filename="shared\drag_n_drop.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\dragAndDrop.h"> + <Unit filename="shared\drag_n_drop.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\fileError.h" /> - <Unit filename="shared\fileHandling.cpp" /> - <Unit filename="shared\fileHandling.h" /> - <Unit filename="shared\fileID.cpp" /> - <Unit filename="shared\fileID.h" /> - <Unit filename="shared\fileIO.cpp" /> - <Unit filename="shared\fileIO.h" /> - <Unit filename="shared\fileTraverser.cpp" /> - <Unit filename="shared\fileTraverser.h" /> - <Unit filename="shared\globalFunctions.cpp" /> - <Unit filename="shared\globalFunctions.h" /> + <Unit filename="shared\file_error.h" /> + <Unit filename="shared\file_handling.cpp" /> + <Unit filename="shared\file_handling.h" /> + <Unit filename="shared\file_id.cpp" /> + <Unit filename="shared\file_id.h" /> + <Unit filename="shared\file_io.cpp" /> + <Unit filename="shared\file_io.h" /> + <Unit filename="shared\file_traverser.cpp" /> + <Unit filename="shared\file_traverser.h" /> + <Unit filename="shared\global_func.cpp" /> + <Unit filename="shared\global_func.h" /> <Unit filename="shared\guid.cpp" /> <Unit filename="shared\guid.h" /> - <Unit filename="shared\helpProvider.cpp"> + <Unit filename="shared\help_provider.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\helpProvider.h"> + <Unit filename="shared\help_provider.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> @@ -291,23 +297,20 @@ <Unit filename="shared\localization.h" /> <Unit filename="shared\lock.cpp" /> <Unit filename="shared\lock.h" /> - <Unit filename="shared\longPathPrefix.cpp" /> - <Unit filename="shared\longPathPrefix.h" /> - <Unit filename="shared\parallelCall.cpp" /> - <Unit filename="shared\parallelCall.h" /> + <Unit filename="shared\long_path_prefix.cpp" /> + <Unit filename="shared\long_path_prefix.h" /> <Unit filename="shared\recycler.cpp" /> <Unit filename="shared\recycler.h" /> <Unit filename="shared\serialize.cpp" /> <Unit filename="shared\serialize.h" /> <Unit filename="shared\shadow.cpp" /> <Unit filename="shared\shadow.h" /> - <Unit filename="shared\standardPaths.cpp" /> - <Unit filename="shared\standardPaths.h" /> - <Unit filename="shared\staticAssert.h" /> - <Unit filename="shared\stringConv.h" /> - <Unit filename="shared\systemConstants.h" /> - <Unit filename="shared\systemFunctions.cpp" /> - <Unit filename="shared\systemFunctions.h" /> + <Unit filename="shared\standard_paths.cpp" /> + <Unit filename="shared\standard_paths.h" /> + <Unit filename="shared\string_conv.h" /> + <Unit filename="shared\system_constants.h" /> + <Unit filename="shared\system_func.cpp" /> + <Unit filename="shared\system_func.h" /> <Unit filename="shared\taskbar.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> @@ -320,19 +323,19 @@ <Unit filename="shared\tinyxml\tinyxml.cpp" /> <Unit filename="shared\tinyxml\tinyxmlerror.cpp" /> <Unit filename="shared\tinyxml\tinyxmlparser.cpp" /> - <Unit filename="shared\toggleButton.cpp"> + <Unit filename="shared\toggle_button.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\toggleButton.h"> + <Unit filename="shared\toggle_button.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> <Unit filename="shared\util.cpp" /> <Unit filename="shared\util.h" /> - <Unit filename="shared\xmlBase.cpp" /> - <Unit filename="shared\xmlBase.h" /> - <Unit filename="shared\xmlError.h" /> + <Unit filename="shared\xml_base.cpp" /> + <Unit filename="shared\xml_base.h" /> + <Unit filename="shared\xml_error.h" /> <Unit filename="shared\zstring.cpp" /> <Unit filename="shared\zstring.h" /> <Unit filename="structures.cpp" /> @@ -343,110 +346,119 @@ <Unit filename="synchronization.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="ui\batchConfig.cpp"> + <Unit filename="ui\batch_config.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\batchConfig.h"> + <Unit filename="ui\batch_config.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\batchStatusHandler.cpp"> + <Unit filename="ui\batch_status_handler.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\batchStatusHandler.h" /> - <Unit filename="ui\checkVersion.cpp"> + <Unit filename="ui\batch_status_handler.h" /> + <Unit filename="ui\check_version.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\checkVersion.h"> + <Unit filename="ui\check_version.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="ui\folderPair.h"> + <Unit filename="ui\folder_pair.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\gridView.cpp"> + <Unit filename="ui\grid_view.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\gridView.h"> + <Unit filename="ui\grid_view.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="ui\guiGenerated.cpp"> + <Unit filename="ui\gui_generated.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\guiGenerated.h"> + <Unit filename="ui\gui_generated.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="ui\guiStatusHandler.cpp"> + <Unit filename="ui\gui_status_handler.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\guiStatusHandler.h"> + <Unit filename="ui\gui_status_handler.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="ui\mainDialog.cpp"> + <Unit filename="ui\main_dlg.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\mainDialog.h"> + <Unit filename="ui\main_dlg.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="ui\messagePopup.cpp"> + <Unit filename="ui\mouse_move_dlg.cpp" /> + <Unit filename="ui\mouse_move_dlg.h" /> + <Unit filename="ui\msg_popup.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\messagePopup.h" /> - <Unit filename="ui\mouseMoveWindow.cpp" /> - <Unit filename="ui\mouseMoveWindow.h" /> - <Unit filename="ui\progressIndicator.cpp"> + <Unit filename="ui\msg_popup.h" /> + <Unit filename="ui\progress_indicator.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\progressIndicator.h" /> + <Unit filename="ui\progress_indicator.h" /> <Unit filename="ui\search.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> <Unit filename="ui\search.h" /> - <Unit filename="ui\smallDialogs.cpp"> + <Unit filename="ui\small_dlgs.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\smallDialogs.h"> + <Unit filename="ui\small_dlgs.h"> <Option target="<{~None~}>" /> </Unit> <Unit filename="ui\sorting.h"> <Option target="<{~None~}>" /> </Unit> - <Unit filename="ui\switchToGui.cpp"> + <Unit filename="ui\switch_to_gui.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\switchToGui.h"> + <Unit filename="ui\switch_to_gui.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\syncConfig.cpp"> + <Unit filename="ui\sync_cfg.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\syncConfig.h"> + <Unit filename="ui\sync_cfg.h"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\trayIcon.cpp"> + <Unit filename="ui\tray_icon.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="ui\trayIcon.h" /> + <Unit filename="ui\tray_icon.h" /> <Extensions> <code_completion /> <envvars /> <debugger /> + <DoxyBlocks> + <comment_style block="0" line="0" /> + <doxyfile_project /> + <doxyfile_build /> + <doxyfile_warnings /> + <doxyfile_output /> + <doxyfile_dot /> + <general /> + </DoxyBlocks> </Extensions> </Project> </CodeBlocks_project_file> diff --git a/FreeFileSync.vcxproj b/FreeFileSync.vcxproj index e0bb3457..05ee798f 100644 --- a/FreeFileSync.vcxproj +++ b/FreeFileSync.vcxproj @@ -19,7 +19,7 @@ </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> - <ProjectGuid>{86C36CC7-9418-4253-9929-829486F59A00}</ProjectGuid> + <ProjectGuid>{86C36CC7-9418-4253-9928-828486F59A00}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>FreeFileSync</RootNamespace> </PropertyGroup> @@ -101,7 +101,7 @@ <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswud;.\shared\boost_1_x</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <PrecompiledHeaderFile>$(ProjectDir)library\pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> @@ -117,7 +117,7 @@ <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> - <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> @@ -136,7 +136,7 @@ <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud;.\shared\boost_1_x</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <PrecompiledHeaderFile>$(ProjectDir)library\pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> @@ -152,7 +152,7 @@ <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> - <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> @@ -173,9 +173,9 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswu;.\shared\boost_1_x</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> - <DisableSpecificWarnings>4100</DisableSpecificWarnings> + <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <MultiProcessorCompilation>true</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> @@ -186,9 +186,9 @@ <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;%(AdditionalDependencies)</AdditionalDependencies> + <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> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> @@ -207,7 +207,7 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu;.\shared\boost_1_x</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100</DisableSpecificWarnings> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -221,9 +221,9 @@ <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;%(AdditionalDependencies)</AdditionalDependencies> + <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> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> @@ -241,74 +241,77 @@ </ClCompile> <ClCompile Include="application.cpp" /> <ClCompile Include="comparison.cpp" /> - <ClCompile Include="fileHierarchy.cpp" /> + <ClCompile Include="file_hierarchy.cpp" /> <ClCompile Include="library\binary.cpp" /> - <ClCompile Include="library\customGrid.cpp" /> - <ClCompile Include="library\dbFile.cpp" /> - <ClCompile Include="library\errorLogging.cpp" /> + <ClCompile Include="library\custom_grid.cpp" /> + <ClCompile Include="library\db_file.cpp" /> + <ClCompile Include="library\dir_lock.cpp" /> + <ClCompile Include="library\error_log.cpp" /> <ClCompile Include="library\filter.cpp" /> - <ClCompile Include="library\iconBuffer.cpp" /> - <ClCompile Include="library\processXml.cpp" /> + <ClCompile Include="library\icon_buffer.cpp" /> + <ClCompile Include="library\process_xml.cpp" /> <ClCompile Include="library\resources.cpp" /> - <ClCompile Include="library\softFilter.cpp" /> + <ClCompile Include="library\soft_filter.cpp" /> <ClCompile Include="library\statistics.cpp" /> - <ClCompile Include="library\statusHandler.cpp" /> - <ClCompile Include="shared\appMain.cpp" /> - <ClCompile Include="shared\checkExist.cpp" /> - <ClCompile Include="shared\customButton.cpp" /> - <ClCompile Include="shared\customComboBox.cpp" /> - <ClCompile Include="shared\customTooltip.cpp" /> - <ClCompile Include="shared\dllLoader.cpp" /> - <ClCompile Include="shared\dragAndDrop.cpp" /> - <ClCompile Include="shared\fileHandling.cpp" /> - <ClCompile Include="shared\fileID.cpp" /> - <ClCompile Include="shared\fileIO.cpp" /> - <ClCompile Include="shared\fileTraverser.cpp" /> - <ClCompile Include="shared\globalFunctions.cpp" /> - <ClCompile Include="shared\guid.cpp"> - <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings> - <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4100</DisableSpecificWarnings> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="shared\helpProvider.cpp" /> + <ClCompile Include="library\status_handler.cpp" /> + <ClCompile Include="shared\app_main.cpp" /> + <ClCompile Include="shared\check_exist.cpp" /> + <ClCompile Include="shared\custom_button.cpp" /> + <ClCompile Include="shared\custom_combo_box.cpp" /> + <ClCompile Include="shared\custom_tooltip.cpp" /> + <ClCompile Include="shared\dll_loader.cpp" /> + <ClCompile Include="shared\drag_n_drop.cpp" /> + <ClCompile Include="shared\file_handling.cpp" /> + <ClCompile Include="shared\file_id.cpp" /> + <ClCompile Include="shared\file_io.cpp" /> + <ClCompile Include="shared\file_traverser.cpp" /> + <ClCompile Include="shared\global_func.cpp" /> + <ClCompile Include="shared\guid.cpp" /> + <ClCompile Include="shared\help_provider.cpp" /> <ClCompile Include="shared\localization.cpp" /> - <ClCompile Include="shared\longPathPrefix.cpp" /> - <ClCompile Include="shared\parallelCall.cpp" /> + <ClCompile Include="shared\long_path_prefix.cpp" /> <ClCompile Include="shared\recycler.cpp" /> <ClCompile Include="shared\serialize.cpp" /> <ClCompile Include="shared\shadow.cpp" /> - <ClCompile Include="shared\standardPaths.cpp" /> - <ClCompile Include="shared\systemFunctions.cpp" /> + <ClCompile Include="shared\standard_paths.cpp" /> + <ClCompile Include="shared\system_func.cpp" /> <ClCompile Include="shared\taskbar.cpp" /> <ClCompile Include="shared\tinyxml\tinyxml.cpp" /> <ClCompile Include="shared\tinyxml\tinyxmlerror.cpp" /> <ClCompile Include="shared\tinyxml\tinyxmlparser.cpp" /> - <ClCompile Include="shared\toggleButton.cpp" /> + <ClCompile Include="shared\toggle_button.cpp" /> <ClCompile Include="shared\util.cpp" /> - <ClCompile Include="shared\xmlBase.cpp" /> + <ClCompile Include="shared\xml_base.cpp" /> <ClCompile Include="shared\zstring.cpp" /> <ClCompile Include="structures.cpp" /> <ClCompile Include="synchronization.cpp" /> - <ClCompile Include="ui\batchConfig.cpp" /> - <ClCompile Include="ui\batchStatusHandler.cpp" /> - <ClCompile Include="ui\checkVersion.cpp" /> - <ClCompile Include="ui\gridView.cpp" /> - <ClCompile Include="ui\guiGenerated.cpp" /> - <ClCompile Include="ui\guiStatusHandler.cpp" /> - <ClCompile Include="ui\mainDialog.cpp" /> - <ClCompile Include="ui\messagePopup.cpp" /> - <ClCompile Include="ui\mouseMoveWindow.cpp" /> - <ClCompile Include="ui\progressIndicator.cpp" /> + <ClCompile Include="ui\batch_config.cpp" /> + <ClCompile Include="ui\batch_status_handler.cpp" /> + <ClCompile Include="ui\check_version.cpp" /> + <ClCompile Include="ui\grid_view.cpp" /> + <ClCompile Include="ui\gui_generated.cpp" /> + <ClCompile Include="ui\gui_status_handler.cpp" /> + <ClCompile Include="ui\main_dlg.cpp" /> + <ClCompile Include="ui\msg_popup.cpp" /> + <ClCompile Include="ui\mouse_move_dlg.cpp" /> + <ClCompile Include="ui\progress_indicator.cpp" /> <ClCompile Include="ui\search.cpp" /> - <ClCompile Include="ui\smallDialogs.cpp" /> - <ClCompile Include="ui\switchToGui.cpp" /> - <ClCompile Include="ui\syncConfig.cpp" /> - <ClCompile Include="ui\trayIcon.cpp" /> + <ClCompile Include="ui\small_dlgs.cpp" /> + <ClCompile Include="ui\switch_to_gui.cpp" /> + <ClCompile Include="ui\sync_cfg.cpp" /> + <ClCompile Include="ui\tray_icon.cpp" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="resource.rc" /> </ItemGroup> + <ItemGroup> + <None Include="WxWizFrame.fbp"> + <SubType>Designer</SubType> + </None> + </ItemGroup> + <ItemGroup> + <ClInclude Include="library\pch.h" /> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> @@ -5,8 +5,8 @@ BINDIR = $(DESTDIR)$(prefix)/bin SHAREDIR = $(DESTDIR)$(prefix)/share APPSHAREDIR = $(SHAREDIR)/$(APPNAME) -FFS_CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c -Ishared/boost_1_x -LINKFLAGS=`wx-config --libs --debug=no --unicode=yes` -O3 -pthread +FFS_CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c +LINKFLAGS=`wx-config --libs --debug=no --unicode=yes` -lboost_thread -O3 -pthread #support for GTKMM FFS_CPPFLAGS+=`pkg-config --cflags gtkmm-2.4` @@ -17,58 +17,58 @@ FILE_LIST+=structures.cpp FILE_LIST+=algorithm.cpp FILE_LIST+=comparison.cpp FILE_LIST+=synchronization.cpp -FILE_LIST+=fileHierarchy.cpp +FILE_LIST+=file_hierarchy.cpp FILE_LIST+=application.cpp -FILE_LIST+=ui/guiGenerated.cpp +FILE_LIST+=ui/gui_generated.cpp FILE_LIST+=shared/util.cpp -FILE_LIST+=ui/gridView.cpp -FILE_LIST+=ui/mainDialog.cpp -FILE_LIST+=ui/batchConfig.cpp -FILE_LIST+=ui/syncConfig.cpp -FILE_LIST+=ui/checkVersion.cpp -FILE_LIST+=ui/batchStatusHandler.cpp -FILE_LIST+=ui/guiStatusHandler.cpp -FILE_LIST+=ui/trayIcon.cpp +FILE_LIST+=ui/grid_view.cpp +FILE_LIST+=ui/main_dlg.cpp +FILE_LIST+=ui/batch_config.cpp +FILE_LIST+=ui/sync_cfg.cpp +FILE_LIST+=ui/check_version.cpp +FILE_LIST+=ui/batch_status_handler.cpp +FILE_LIST+=ui/gui_status_handler.cpp +FILE_LIST+=ui/tray_icon.cpp FILE_LIST+=ui/search.cpp -FILE_LIST+=ui/switchToGui.cpp -FILE_LIST+=ui/messagePopup.cpp -FILE_LIST+=ui/progressIndicator.cpp -FILE_LIST+=library/customGrid.cpp -FILE_LIST+=library/errorLogging.cpp -FILE_LIST+=library/statusHandler.cpp +FILE_LIST+=ui/switch_to_gui.cpp +FILE_LIST+=ui/msg_popup.cpp +FILE_LIST+=ui/progress_indicator.cpp +FILE_LIST+=library/custom_grid.cpp +FILE_LIST+=library/error_log.cpp +FILE_LIST+=library/status_handler.cpp FILE_LIST+=library/resources.cpp -FILE_LIST+=ui/smallDialogs.cpp -FILE_LIST+=library/processXml.cpp -FILE_LIST+=library/iconBuffer.cpp +FILE_LIST+=ui/small_dlgs.cpp +FILE_LIST+=library/process_xml.cpp +FILE_LIST+=library/icon_buffer.cpp FILE_LIST+=library/statistics.cpp FILE_LIST+=library/filter.cpp FILE_LIST+=library/binary.cpp -FILE_LIST+=library/dbFile.cpp +FILE_LIST+=library/db_file.cpp +FILE_LIST+=library/dir_lock.cpp FILE_LIST+=shared/localization_no_BOM.cpp -FILE_LIST+=shared/fileIO.cpp -FILE_LIST+=shared/dragAndDrop.cpp +FILE_LIST+=shared/file_io.cpp +FILE_LIST+=shared/drag_n_drop.cpp FILE_LIST+=shared/guid.cpp -FILE_LIST+=shared/checkExist.cpp -FILE_LIST+=shared/parallelCall.cpp +FILE_LIST+=shared/check_exist.cpp FILE_LIST+=shared/tinyxml/tinyxml.cpp FILE_LIST+=shared/tinyxml/tinyxmlerror.cpp FILE_LIST+=shared/tinyxml/tinyxmlparser.cpp -FILE_LIST+=shared/globalFunctions.cpp -FILE_LIST+=shared/systemFunctions.cpp -FILE_LIST+=shared/customTooltip.cpp -FILE_LIST+=shared/fileHandling.cpp -FILE_LIST+=shared/fileTraverser.cpp -FILE_LIST+=shared/standardPaths.cpp +FILE_LIST+=shared/global_func.cpp +FILE_LIST+=shared/system_func.cpp +FILE_LIST+=shared/custom_tooltip.cpp +FILE_LIST+=shared/file_handling.cpp +FILE_LIST+=shared/file_traverser.cpp +FILE_LIST+=shared/standard_paths.cpp FILE_LIST+=shared/zstring.cpp -FILE_LIST+=shared/xmlBase.cpp -FILE_LIST+=shared/appMain.cpp -FILE_LIST+=shared/customButton.cpp -FILE_LIST+=shared/toggleButton.cpp -FILE_LIST+=shared/customComboBox.cpp +FILE_LIST+=shared/xml_base.cpp +FILE_LIST+=shared/app_main.cpp +FILE_LIST+=shared/custom_button.cpp +FILE_LIST+=shared/toggle_button.cpp +FILE_LIST+=shared/custom_combo_box.cpp FILE_LIST+=shared/serialize.cpp -FILE_LIST+=shared/fileID.cpp +FILE_LIST+=shared/file_id.cpp FILE_LIST+=shared/recycler.cpp -FILE_LIST+=shared/helpProvider.cpp +FILE_LIST+=shared/help_provider.cpp #list of all *.o files OBJECT_LIST=$(foreach file, $(FILE_LIST), OBJ/$(subst .cpp,.o,$(notdir $(file)))) @@ -83,8 +83,8 @@ init: if [ ! -d OBJ ]; then mkdir OBJ; fi #remove byte ordering mark: needed by Visual C++ but an error with GCC -removeBOM: tools/removeBOM.cpp - g++ -o OBJ/removeBOM tools/removeBOM.cpp +removeBOM: tools/remove_BOM.cpp + g++ -o OBJ/removeBOM tools/remove_BOM.cpp ./OBJ/removeBOM shared/localization.cpp shared/localization_no_BOM.cpp %.dep : %.cpp diff --git a/RealtimeSync/RealtimeSync.cbp b/RealtimeSync/RealtimeSync.cbp index dd803ecf..e423cbfb 100644 --- a/RealtimeSync/RealtimeSync.cbp +++ b/RealtimeSync/RealtimeSync.cbp @@ -8,7 +8,7 @@ <Option compiler="gcc" /> <Build> <Target title="Release"> - <Option output="..\BUILD\RealtimeSync" prefix_auto="1" extension_auto="1" /> + <Option output="..\BUILD\RealtimeSync_Win32" prefix_auto="1" extension_auto="1" /> <Option working_dir="..\BUILD" /> <Option object_output="..\OBJ\Release_RTS_GCC" /> <Option type="0" /> @@ -21,16 +21,18 @@ </Compiler> <Linker> <Add option="-s" /> + <Add option="-static" /> <Add library="libwxmsw28u_core.a" /> <Add library="libwxmsw28u_adv.a" /> <Add library="libwxbase28u.a" /> <Add library="libwxpng.a" /> <Add library="libwxzlib.a" /> + <Add library="libboost_thread-mgw45-mt-s-1_43.a" /> <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib" /> </Linker> </Target> <Target title="Debug-DLL"> - <Option output="..\BUILD\RealtimeSync" prefix_auto="1" extension_auto="1" /> + <Option output="..\BUILD\RealtimeSync_Debug" prefix_auto="1" extension_auto="1" /> <Option working_dir="..\BUILD" /> <Option object_output="..\OBJ\Debug_RTS_GCC" /> <Option type="0" /> @@ -49,6 +51,7 @@ <Add library="libwxbase28ud.a" /> <Add library="libwxpngd.a" /> <Add library="libwxzlibd.a" /> + <Add library="libboost_thread-mgw45-mt-sd-1_43.a" /> <Add directory="C:\Program Files\C++\wxWidgets\lib\gcc_dll" /> </Linker> </Target> @@ -68,7 +71,7 @@ <Add option="-DZSTRING_WIDE_CHAR" /> <Add option="-DTIXML_USE_STL" /> <Add directory="C:\Programme\C++\wxWidgets\include" /> - <Add directory="..\shared\boost_1_x" /> + <Add directory="C:\Program Files\C++\Boost" /> </Compiler> <ResourceCompiler> <Add directory="C:\Programme\C++\wxWidgets\include" /> @@ -85,16 +88,20 @@ <Add library="liboleaut32.a" /> <Add library="libcomdlg32.a" /> <Add library="libws2_32.a" /> + <Add library="libwinspool.a" /> + <Add directory="C:\Program Files\C++\Boost\stage\lib" /> </Linker> <Unit filename="WxWizDialog.fbp" /> <Unit filename="application.cpp" /> <Unit filename="application.h" /> <Unit filename="functions.cpp" /> <Unit filename="functions.h" /> - <Unit filename="guiGenerated.cpp" /> - <Unit filename="guiGenerated.h" /> - <Unit filename="mainDialog.cpp" /> - <Unit filename="mainDialog.h" /> + <Unit filename="gui_generated.cpp" /> + <Unit filename="gui_generated.h" /> + <Unit filename="main_dlg.cpp" /> + <Unit filename="main_dlg.h" /> + <Unit filename="notify.cpp" /> + <Unit filename="notify.h" /> <Unit filename="pch.h"> <Option compile="1" /> <Option weight="0" /> @@ -105,49 +112,48 @@ </Unit> <Unit filename="resources.cpp" /> <Unit filename="resources.h" /> - <Unit filename="trayMenu.cpp" /> - <Unit filename="trayMenu.h" /> + <Unit filename="tray_menu.cpp" /> + <Unit filename="tray_menu.h" /> <Unit filename="watcher.cpp" /> <Unit filename="watcher.h" /> - <Unit filename="xmlFreeFileSync.cpp" /> - <Unit filename="xmlFreeFileSync.h" /> - <Unit filename="xmlProcessing.cpp" /> - <Unit filename="xmlProcessing.h" /> - <Unit filename="..\Shared\customButton.cpp" /> - <Unit filename="..\Shared\customButton.h" /> - <Unit filename="..\Shared\dragAndDrop.cpp" /> - <Unit filename="..\Shared\dragAndDrop.h" /> + <Unit filename="xml_ffs.cpp" /> + <Unit filename="xml_ffs.h" /> + <Unit filename="xml_proc.cpp" /> + <Unit filename="xml_proc.h" /> + <Unit filename="..\Shared\custom_button.cpp" /> + <Unit filename="..\Shared\custom_button.h" /> + <Unit filename="..\Shared\drag_n_drop.cpp" /> + <Unit filename="..\Shared\drag_n_drop.h" /> <Unit filename="..\Shared\zstring.cpp" /> <Unit filename="..\Shared\zstring.h" /> - <Unit filename="..\library\processXml.cpp" /> - <Unit filename="..\shared\checkExist.cpp" /> - <Unit filename="..\shared\dllLoader.cpp" /> - <Unit filename="..\shared\dllLoader.h" /> - <Unit filename="..\shared\fileError.h" /> - <Unit filename="..\shared\fileHandling.cpp" /> - <Unit filename="..\shared\fileHandling.h" /> - <Unit filename="..\shared\fileID.cpp" /> - <Unit filename="..\shared\fileIO.cpp" /> - <Unit filename="..\shared\fileTraverser.cpp" /> - <Unit filename="..\shared\globalFunctions.cpp" /> - <Unit filename="..\shared\globalFunctions.h" /> - <Unit filename="..\shared\helpProvider.cpp" /> + <Unit filename="..\library\process_xml.cpp" /> + <Unit filename="..\shared\check_exist.cpp" /> + <Unit filename="..\shared\dll_loader.cpp" /> + <Unit filename="..\shared\dll_loader.h" /> + <Unit filename="..\shared\file_error.h" /> + <Unit filename="..\shared\file_handling.cpp" /> + <Unit filename="..\shared\file_handling.h" /> + <Unit filename="..\shared\file_id.cpp" /> + <Unit filename="..\shared\file_io.cpp" /> + <Unit filename="..\shared\file_traverser.cpp" /> + <Unit filename="..\shared\global_func.cpp" /> + <Unit filename="..\shared\global_func.h" /> + <Unit filename="..\shared\help_provider.cpp" /> <Unit filename="..\shared\localization.cpp" /> <Unit filename="..\shared\localization.h" /> - <Unit filename="..\shared\longPathPrefix.cpp" /> - <Unit filename="..\shared\longPathPrefix.h" /> - <Unit filename="..\shared\parallelCall.cpp" /> + <Unit filename="..\shared\long_path_prefix.cpp" /> + <Unit filename="..\shared\long_path_prefix.h" /> <Unit filename="..\shared\shadow.cpp" /> - <Unit filename="..\shared\standardPaths.cpp" /> - <Unit filename="..\shared\standardPaths.h" /> - <Unit filename="..\shared\systemFunctions.cpp" /> - <Unit filename="..\shared\systemFunctions.h" /> + <Unit filename="..\shared\standard_paths.cpp" /> + <Unit filename="..\shared\standard_paths.h" /> + <Unit filename="..\shared\system_func.cpp" /> + <Unit filename="..\shared\system_func.h" /> <Unit filename="..\shared\tinyxml\tinystr.cpp" /> <Unit filename="..\shared\tinyxml\tinyxml.cpp" /> <Unit filename="..\shared\tinyxml\tinyxmlerror.cpp" /> <Unit filename="..\shared\tinyxml\tinyxmlparser.cpp" /> - <Unit filename="..\shared\xmlBase.cpp" /> - <Unit filename="..\shared\xmlBase.h" /> + <Unit filename="..\shared\xml_base.cpp" /> + <Unit filename="..\shared\xml_base.h" /> <Unit filename="..\structures.cpp" /> <Extensions> <code_completion /> diff --git a/RealtimeSync/RealtimeSync.vcxproj b/RealtimeSync/RealtimeSync.vcxproj index 04f1d7a8..4812a3d0 100644 --- a/RealtimeSync/RealtimeSync.vcxproj +++ b/RealtimeSync/RealtimeSync.vcxproj @@ -28,7 +28,7 @@ <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v100</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> @@ -41,7 +41,7 @@ <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v100</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> @@ -100,13 +100,13 @@ <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR</PreprocessorDefinitions> - <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswud;..\shared\boost_1_x</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>$(ProjectDir)../library/pch.h</PrecompiledHeaderFile> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> + <PrecompiledHeaderFile>$(ProjectDir)/pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>$(ProjectDir)../library/pch.h</ForcedIncludeFiles> + <ForcedIncludeFiles>$(ProjectDir)/pch.h</ForcedIncludeFiles> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> @@ -115,7 +115,7 @@ <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> - <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> @@ -130,13 +130,13 @@ <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR</PreprocessorDefinitions> - <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud;..\shared\boost_1_x</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>$(ProjectDir)../library/pch.h</PrecompiledHeaderFile> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> + <PrecompiledHeaderFile>$(ProjectDir)/pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>$(ProjectDir)../library/pch.h</ForcedIncludeFiles> + <ForcedIncludeFiles>$(ProjectDir)/pch.h</ForcedIncludeFiles> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <SuppressStartupBanner>true</SuppressStartupBanner> </ClCompile> @@ -146,7 +146,7 @@ <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> - <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> @@ -163,9 +163,9 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;ZSTRING_WIDE_CHAR</PreprocessorDefinitions> - <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswu;..\shared\boost_1_x</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> - <DisableSpecificWarnings>4100</DisableSpecificWarnings> + <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <MultiProcessorCompilation>true</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> @@ -176,9 +176,9 @@ <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;%(AdditionalDependencies)</AdditionalDependencies> + <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> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> @@ -197,7 +197,7 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;ZSTRING_WIDE_CHAR</PreprocessorDefinitions> - <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu;..\shared\boost_1_x</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100</DisableSpecificWarnings> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -211,9 +211,9 @@ <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;%(AdditionalDependencies)</AdditionalDependencies> + <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> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>C:\Programme\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> @@ -225,44 +225,51 @@ </ResourceCompile> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\library\processXml.cpp" /> - <ClCompile Include="..\shared\checkExist.cpp" /> - <ClCompile Include="..\shared\customButton.cpp" /> - <ClCompile Include="..\shared\dllLoader.cpp" /> - <ClCompile Include="..\shared\dragAndDrop.cpp" /> - <ClCompile Include="..\shared\fileHandling.cpp" /> - <ClCompile Include="..\shared\fileIO.cpp" /> - <ClCompile Include="..\shared\fileTraverser.cpp" /> - <ClCompile Include="..\shared\globalFunctions.cpp" /> - <ClCompile Include="..\shared\helpProvider.cpp" /> + <ClCompile Include="..\library\process_xml.cpp" /> + <ClCompile Include="..\shared\check_exist.cpp" /> + <ClCompile Include="..\shared\custom_button.cpp" /> + <ClCompile Include="..\shared\dll_loader.cpp" /> + <ClCompile Include="..\shared\drag_n_drop.cpp" /> + <ClCompile Include="..\shared\file_handling.cpp" /> + <ClCompile Include="..\shared\file_io.cpp" /> + <ClCompile Include="..\shared\file_traverser.cpp" /> + <ClCompile Include="..\shared\global_func.cpp" /> + <ClCompile Include="..\shared\help_provider.cpp" /> <ClCompile Include="..\shared\localization.cpp" /> - <ClCompile Include="..\shared\longPathPrefix.cpp" /> - <ClCompile Include="..\shared\parallelCall.cpp" /> + <ClCompile Include="..\shared\long_path_prefix.cpp" /> <ClCompile Include="..\shared\shadow.cpp" /> - <ClCompile Include="..\shared\standardPaths.cpp" /> - <ClCompile Include="..\shared\systemFunctions.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\xmlBase.cpp" /> + <ClCompile Include="..\shared\xml_base.cpp" /> <ClCompile Include="..\shared\zstring.cpp" /> <ClCompile Include="..\structures.cpp" /> <ClCompile Include="application.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> + <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)/pch.h</PrecompiledHeaderFile> </ClCompile> <ClCompile Include="functions.cpp" /> - <ClCompile Include="guiGenerated.cpp" /> - <ClCompile Include="mainDialog.cpp" /> + <ClCompile Include="gui_generated.cpp" /> + <ClCompile Include="main_dlg.cpp" /> + <ClCompile Include="notify.cpp" /> <ClCompile Include="resources.cpp" /> - <ClCompile Include="trayMenu.cpp" /> + <ClCompile Include="tray_menu.cpp" /> <ClCompile Include="watcher.cpp" /> - <ClCompile Include="xmlFreeFileSync.cpp" /> - <ClCompile Include="xmlProcessing.cpp" /> + <ClCompile Include="xml_ffs.cpp" /> + <ClCompile Include="xml_proc.cpp" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="resource.rc" /> </ItemGroup> + <ItemGroup> + <None Include="WxWizDialog.fbp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="pch.h" /> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp index a48369b4..d3a1f0e0 100644 --- a/RealtimeSync/application.cpp +++ b/RealtimeSync/application.cpp @@ -5,15 +5,15 @@ // ************************************************************************** // #include "application.h" -#include "mainDialog.h" +#include "main_dlg.h" #include <wx/event.h> #include "resources.h" #include <wx/msgdlg.h> #include "../shared/localization.h" -#include "xmlFreeFileSync.h" -#include "../shared/standardPaths.h" +#include "xml_ffs.h" +#include "../shared/standard_paths.h" #include <wx/file.h> -#include "../shared/stringConv.h" +#include "../shared/string_conv.h" #ifdef FFS_LINUX #include <gtk/gtk.h> @@ -41,11 +41,11 @@ void Application::OnStartApplication(wxIdleEvent& event) SetAppName(wxT("FreeFileSync")); //use a different app name, to have "GetUserDataDir()" return the same directory as for FreeFileSync #ifdef FFS_LINUX - ::gtk_rc_parse(FreeFileSync::wxToZ(FreeFileSync::getResourceDir()) + "styles.rc"); //remove inner border from bitmap buttons + ::gtk_rc_parse(ffs3::wxToZ(ffs3::getResourceDir()) + "styles.rc"); //remove inner border from bitmap buttons #endif //set program language - FreeFileSync::CustomLocale::getInstance().setLanguage(RealtimeSync::getProgramLanguage()); + ffs3::CustomLocale::getInstance().setLanguage(rts::getProgramLanguage()); //try to set config/batch-filename set by %1 parameter wxString cfgFilename; @@ -89,10 +89,10 @@ int Application::OnRun() catch (const std::exception& e) //catch all STL exceptions { //unfortunately it's not always possible to display a message box in this erroneous situation, however (non-stream) file output always works! - wxFile safeOutput(FreeFileSync::getConfigDir() + wxT("LastError.txt"), wxFile::write); + wxFile safeOutput(ffs3::getConfigDir() + wxT("LastError.txt"), wxFile::write); safeOutput.Write(wxString::FromAscii(e.what())); - wxMessageBox(wxString::FromAscii(e.what()), _("An exception occured!"), wxOK | wxICON_ERROR); + wxMessageBox(wxString::FromAscii(e.what()), _("An exception occurred!"), wxOK | wxICON_ERROR); return -9; } diff --git a/RealtimeSync/functions.cpp b/RealtimeSync/functions.cpp index 15461cc4..f66db6b4 100644 --- a/RealtimeSync/functions.cpp +++ b/RealtimeSync/functions.cpp @@ -7,15 +7,15 @@ #include "functions.h" #include <wx/textctrl.h> #include <wx/filepicker.h> -#include "../shared/stringConv.h" -#include "../shared/fileHandling.h" +#include "../shared/string_conv.h" +#include "../shared/file_handling.h" -using namespace FreeFileSync; +using namespace ffs3; -void RealtimeSync::setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker) +void rts::setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker) { txtCtrl->SetValue(dirname); - const Zstring leftDirFormatted = FreeFileSync::getFormattedDirectoryName(wxToZ(dirname)); + const Zstring leftDirFormatted = ffs3::getFormattedDirectoryName(wxToZ(dirname)); if (dirExists(leftDirFormatted)) dirPicker->SetPath(zToWx(leftDirFormatted)); } diff --git a/RealtimeSync/functions.h b/RealtimeSync/functions.h index e8c03a93..5b20ee9e 100644 --- a/RealtimeSync/functions.h +++ b/RealtimeSync/functions.h @@ -13,7 +13,7 @@ class wxTextCtrl; class wxDirPickerCtrl; -namespace RealtimeSync +namespace rts { void setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker); } diff --git a/RealtimeSync/guiGenerated.cpp b/RealtimeSync/gui_generated.cpp index 4ee67bc9..5bdae20e 100644 --- a/RealtimeSync/guiGenerated.cpp +++ b/RealtimeSync/gui_generated.cpp @@ -5,9 +5,9 @@ // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "../shared/customButton.h" +#include "../shared/custom_button.h" -#include "guiGenerated.h" +#include "gui_generated.h" /////////////////////////////////////////////////////////////////////////// diff --git a/RealtimeSync/guiGenerated.h b/RealtimeSync/gui_generated.h index 7be541d4..7be541d4 100644 --- a/RealtimeSync/guiGenerated.h +++ b/RealtimeSync/gui_generated.h diff --git a/RealtimeSync/mainDialog.cpp b/RealtimeSync/main_dlg.cpp index a6bc7829..d1a30c48 100644 --- a/RealtimeSync/mainDialog.cpp +++ b/RealtimeSync/main_dlg.cpp @@ -4,26 +4,26 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "mainDialog.h" +#include "main_dlg.h" #include "resources.h" -#include "../shared/customButton.h" -#include "../shared/standardPaths.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" #include <wx/utils.h> -#include "xmlProcessing.h" -#include "trayMenu.h" -#include "../shared/fileHandling.h" -#include "xmlFreeFileSync.h" -#include "../shared/systemConstants.h" -#include "../shared/stringConv.h" -#include "../shared/staticAssert.h" -#include "../shared/buildInfo.h" -#include "../shared/helpProvider.h" +#include "xml_proc.h" +#include "tray_menu.h" +#include "../shared/file_handling.h" +#include "xml_ffs.h" +#include "../shared/system_constants.h" +#include "../shared/string_conv.h" +#include "../shared/assert_static.h" +#include "../shared/build_info.h" +#include "../shared/help_provider.h" -using namespace FreeFileSync; +using namespace ffs3; MainDialog::MainDialog(wxDialog *dlg, @@ -43,7 +43,7 @@ MainDialog::MainDialog(wxDialog *dlg, Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnKeyPressed), NULL, this); //prepare drag & drop - dragDropOnFolder.reset(new FreeFileSync::DragDropOnDlg(m_panelMainFolder, m_dirPickerMain, m_txtCtrlDirectoryMain)); + dragDropOnFolder.reset(new ffs3::DragDropOnDlg(m_panelMainFolder, m_dirPickerMain, m_txtCtrlDirectoryMain)); //load config values xmlAccess::XmlRealConfig newConfig; @@ -53,30 +53,30 @@ MainDialog::MainDialog(wxDialog *dlg, if (cfgFilename.empty()) try { - RealtimeSync::readRealOrBatchConfig(lastConfigFileName(), newConfig); + 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.show(), _("Warning"), wxOK | wxICON_WARNING); + wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); else - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); } } else try { - RealtimeSync::readRealOrBatchConfig(cfgFilename, newConfig); + rts::readRealOrBatchConfig(cfgFilename, newConfig); startWatchingImmediately = true; } catch (const xmlAccess::XmlError& error) { if (error.getSeverity() == xmlAccess::XmlError::WARNING) - wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING); + wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); else - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); } setConfiguration(newConfig); @@ -105,7 +105,7 @@ MainDialog::~MainDialog() } catch (const xmlAccess::XmlError& error) { - wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg().c_str(), _("Error"), wxOK | wxICON_ERROR); } } @@ -124,7 +124,7 @@ void MainDialog::OnQuit(wxCommandEvent &event) const wxString& MainDialog::lastConfigFileName() { - static wxString instance = FreeFileSync::getConfigDir() + wxT("LastRun.ffs_real"); + static wxString instance = ffs3::getConfigDir() + wxT("LastRun.ffs_real"); return instance; } @@ -132,9 +132,9 @@ const wxString& MainDialog::lastConfigFileName() void MainDialog::OnShowHelp(wxCommandEvent& event) { #ifdef FFS_WIN - FreeFileSync::displayHelpEntry(wxT("html\\advanced\\RealtimeSync.html")); + ffs3::displayHelpEntry(wxT("html\\advanced\\RealtimeSync.html")); #elif defined FFS_LINUX - FreeFileSync::displayHelpEntry(wxT("html/advanced/RealtimeSync.html")); + ffs3::displayHelpEntry(wxT("html/advanced/RealtimeSync.html")); #endif } @@ -150,11 +150,11 @@ void MainDialog::OnMenuAbout(wxCommandEvent& event) #endif //wxUSE_UNICODE //compile time info about 32/64-bit build - if (Utility::is64BitBuild) + if (util::is64BitBuild) build += wxT(" x64"); else build += wxT(" x86"); - assert_static(Utility::is32BitBuild || Utility::is64BitBuild); + assert_static(util::is32BitBuild || util::is64BitBuild); wxString buildFormatted = _("(Build: %x)"); buildFormatted.Replace(wxT("%x"), build); @@ -183,16 +183,16 @@ void MainDialog::OnStart(wxCommandEvent& event) wxWindowDisabler dummy; //avoid unwanted re-entrance in the following process - switch (RealtimeSync::startDirectoryMonitor(currentCfg)) + switch (rts::startDirectoryMonitor(currentCfg)) { - case RealtimeSync::QUIT: + case rts::QUIT: { Destroy(); return; } break; - case RealtimeSync::RESUME: + case rts::RESUME: break; } @@ -226,9 +226,9 @@ void MainDialog::OnSaveConfig(wxCommandEvent& event) { writeRealConfig(currentCfg, newFileName); } - catch (const FreeFileSync::FileError& error) + catch (const ffs3::FileError& error) { - wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg().c_str(), _("Error"), wxOK | wxICON_ERROR); } } } @@ -240,15 +240,15 @@ void MainDialog::loadConfig(const wxString& filename) try { - RealtimeSync::readRealOrBatchConfig(filename, newConfig); + rts::readRealOrBatchConfig(filename, newConfig); } catch (const xmlAccess::XmlError& error) { if (error.getSeverity() == xmlAccess::XmlError::WARNING) - wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING); + wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); else { - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); return; } } @@ -280,7 +280,7 @@ void MainDialog::setConfiguration(const xmlAccess::XmlRealConfig& cfg) //fill top folder m_txtCtrlDirectoryMain->SetValue(*cfg.directories.begin()); - const Zstring dirFormatted = FreeFileSync::getFormattedDirectoryName(wxToZ(*cfg.directories.begin())); + const Zstring dirFormatted = ffs3::getFormattedDirectoryName(wxToZ(*cfg.directories.begin())); if (dirExists(dirFormatted)) m_dirPickerMain->SetPath(zToWx(dirFormatted)); @@ -316,7 +316,7 @@ void MainDialog::OnAddFolder(wxCommandEvent& event) const wxString topFolder = m_txtCtrlDirectoryMain->GetValue(); //clear existing top folder first - RealtimeSync::setDirectoryName(wxEmptyString, m_txtCtrlDirectoryMain, m_dirPickerMain); + rts::setDirectoryName(wxEmptyString, m_txtCtrlDirectoryMain, m_dirPickerMain); std::vector<wxString> newFolders; newFolders.push_back(topFolder.c_str()); @@ -345,7 +345,7 @@ void MainDialog::OnRemoveTopFolder(wxCommandEvent& event) if (additionalFolders.size() > 0) { const wxString topDir = (*additionalFolders.begin())->m_txtCtrlDirectory->GetValue().c_str(); - RealtimeSync::setDirectoryName(topDir, m_txtCtrlDirectoryMain, m_dirPickerMain); + rts::setDirectoryName(topDir, m_txtCtrlDirectoryMain, m_dirPickerMain); removeAddFolder(0); //remove first of additional folders } @@ -391,7 +391,7 @@ void MainDialog::addFolder(const std::vector<wxString>& newFolders, bool addFron newFolder->m_bpButtonRemoveFolder->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainDialog::OnRemoveFolder), NULL, this ); //insert directory name - RealtimeSync::setDirectoryName(*i, newFolder->m_txtCtrlDirectory, newFolder->m_dirPicker); + rts::setDirectoryName(*i, newFolder->m_txtCtrlDirectory, newFolder->m_dirPicker); } //set size of scrolled window diff --git a/RealtimeSync/mainDialog.h b/RealtimeSync/main_dlg.h index 8b83b058..0f408f6d 100644 --- a/RealtimeSync/mainDialog.h +++ b/RealtimeSync/main_dlg.h @@ -7,10 +7,10 @@ #ifndef REALTIMESYNCMAIN_H #define REALTIMESYNCMAIN_H -#include "guiGenerated.h" +#include "gui_generated.h" #include <vector> #include <memory> -#include "../shared/dragAndDrop.h" +#include "../shared/drag_n_drop.h" namespace xmlAccess { @@ -23,11 +23,11 @@ class FolderPanel : public FolderGenerated public: FolderPanel(wxWindow* parent) : FolderGenerated(parent), - dragDropOnFolder(new FreeFileSync::DragDropOnDlg(this, m_dirPicker, m_txtCtrlDirectory)) {} + dragDropOnFolder(new ffs3::DragDropOnDlg(this, m_dirPicker, m_txtCtrlDirectory)) {} private: //support for drag and drop - std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnFolder; + std::auto_ptr<ffs3::DragDropOnDlg> dragDropOnFolder; }; @@ -69,7 +69,7 @@ private: std::vector<FolderPanel*> additionalFolders; //additional pairs to the standard pair //support for drag and drop on main folder - std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnFolder; + std::auto_ptr<ffs3::DragDropOnDlg> dragDropOnFolder; }; #endif // REALTIMESYNCMAIN_H diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile index 1b7018eb..764cb5f9 100644 --- a/RealtimeSync/makefile +++ b/RealtimeSync/makefile @@ -3,39 +3,38 @@ APPNAME = RealtimeSync prefix = /usr BINDIR = $(DESTDIR)$(prefix)/bin -FFS_CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c -I../shared/boost_1_x -LINKFLAGS=`wx-config --libs --debug=no --unicode=yes` -O3 -pthread +FFS_CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c +LINKFLAGS=`wx-config --libs --debug=no --unicode=yes` -lboost_thread -O3 -pthread FILE_LIST= #internal list of all *.cpp files needed for compilation FILE_LIST+=application.cpp FILE_LIST+=functions.cpp -FILE_LIST+=guiGenerated.cpp -FILE_LIST+=mainDialog.cpp +FILE_LIST+=gui_generated.cpp +FILE_LIST+=main_dlg.cpp FILE_LIST+=resources.cpp -FILE_LIST+=trayMenu.cpp +FILE_LIST+=tray_menu.cpp FILE_LIST+=watcher.cpp -FILE_LIST+=xmlProcessing.cpp -FILE_LIST+=xmlFreeFileSync.cpp -FILE_LIST+=../library/processXml.cpp +FILE_LIST+=xml_proc.cpp +FILE_LIST+=xml_ffs.cpp +FILE_LIST+=../library/process_xml.cpp FILE_LIST+=../structures.cpp -FILE_LIST+=../shared/checkExist.cpp -FILE_LIST+=../shared/parallelCall.cpp +FILE_LIST+=../shared/check_exist.cpp FILE_LIST+=../shared/localization_no_BOM.cpp FILE_LIST+=../shared/inotify/inotify-cxx.cpp FILE_LIST+=../shared/tinyxml/tinyxml.cpp FILE_LIST+=../shared/tinyxml/tinyxmlerror.cpp FILE_LIST+=../shared/tinyxml/tinyxmlparser.cpp -FILE_LIST+=../shared/globalFunctions.cpp -FILE_LIST+=../shared/systemFunctions.cpp -FILE_LIST+=../shared/dragAndDrop.cpp +FILE_LIST+=../shared/global_func.cpp +FILE_LIST+=../shared/system_func.cpp +FILE_LIST+=../shared/drag_n_drop.cpp FILE_LIST+=../shared/zstring.cpp -FILE_LIST+=../shared/xmlBase.cpp -FILE_LIST+=../shared/customButton.cpp -FILE_LIST+=../shared/fileHandling.cpp -FILE_LIST+=../shared/fileTraverser.cpp -FILE_LIST+=../shared/standardPaths.cpp -FILE_LIST+=../shared/helpProvider.cpp -FILE_LIST+=../shared/fileIO.cpp +FILE_LIST+=../shared/xml_base.cpp +FILE_LIST+=../shared/custom_button.cpp +FILE_LIST+=../shared/file_handling.cpp +FILE_LIST+=../shared/file_traverser.cpp +FILE_LIST+=../shared/standard_paths.cpp +FILE_LIST+=../shared/help_provider.cpp +FILE_LIST+=../shared/file_io.cpp #list of all *.o files OBJECT_LIST=$(foreach file, $(FILE_LIST), OBJ/$(subst .cpp,.o,$(notdir $(file)))) @@ -50,8 +49,8 @@ init: if [ ! -d OBJ ]; then mkdir OBJ; fi #remove byte ordering mark: needed by Visual C++ but an error with GCC -removeBOM: ../tools/removeBOM.cpp - g++ -o OBJ/removeBOM ../tools/removeBOM.cpp +removeBOM: ../tools/remove_BOM.cpp + g++ -o OBJ/removeBOM ../tools/remove_BOM.cpp ./OBJ/removeBOM ../shared/localization.cpp ../shared/localization_no_BOM.cpp %.dep : %.cpp diff --git a/RealtimeSync/notify.cpp b/RealtimeSync/notify.cpp new file mode 100644 index 00000000..fc9ac8cc --- /dev/null +++ b/RealtimeSync/notify.cpp @@ -0,0 +1,268 @@ +// ************************************************************************** +// * 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) * +// ************************************************************************** +// +#include "notify.h" +#include <set> +#include "../shared/system_func.h" +#include "../shared/Loki/ScopeGuard.h" +#include <algorithm> +#include <boost/bind.hpp> +#include <dbt.h> + +using namespace ffs3; + + +/* +//convert bitmask into "real" drive-letter +Zstring getDriveFromMask(ULONG unitmask) +{ + for (int i = 0; i < 26; ++i) + { + if (unitmask & 0x1) + return Zstring() + static_cast<DefaultChar>(DefaultChar('A') + i) + DefaultStr(":\\"); + unitmask >>= 1; + } + return Zstring(); +} +*/ + +namespace +{ +bool messageProviderConstructed = false; +} + + +class MessageProvider //administrates a single dummy window to receive messages +{ +public: + static MessageProvider& instance() //throw (FileError) + { + static MessageProvider inst; + messageProviderConstructed = true; + return inst; + } + + class Listener + { + public: + virtual ~Listener() {} + virtual void onMessage(UINT message, WPARAM wParam, LPARAM lParam) = 0; //throw()! + }; + void registerListener(Listener& l); + void unregisterListener(Listener& l); //don't unregister objects with static lifetime + + HWND getWnd() const; //get handle in order to register additional notifications + +private: + MessageProvider(); + ~MessageProvider(); + MessageProvider(const MessageProvider&); + MessageProvider& operator=(const MessageProvider&); + + static const wchar_t WINDOW_NAME[]; + + friend LRESULT CALLBACK topWndProc(HWND, UINT, WPARAM, LPARAM); + void processMessage(UINT message, WPARAM wParam, LPARAM lParam); + + const HINSTANCE process; + HWND windowHandle; + + std::set<Listener*> listener; +}; + + +const wchar_t MessageProvider::WINDOW_NAME[] = L"E6AD5EB1-527B-4EEF-AC75-27883B233380"; //random name + + +LRESULT CALLBACK topWndProc( + HWND hwnd, //handle to window + UINT uMsg, //message identifier + WPARAM wParam, //first message parameter + LPARAM lParam) //second message parameter +{ + if (messageProviderConstructed) //attention: this callback is triggered in the middle of singleton construction! It is a bad idea to to call back at this time! + try + { + MessageProvider::instance().processMessage(uMsg, wParam, lParam); //not supposed to throw + } + catch (...) {} + + return ::DefWindowProc(hwnd, uMsg, wParam, lParam); +} + + +MessageProvider::MessageProvider() : + process(::GetModuleHandle(NULL)), //get program's module handle + windowHandle(NULL) +{ + if (process == NULL) + throw ffs3::FileError(wxString(wxT("Could not start monitoring window notifications:")) + wxT("\n\n") + + ffs3::getLastErrorFormatted() + wxT(" (GetModuleHandle)")); + + //register the main window class + WNDCLASS wc = {}; + wc.lpfnWndProc = topWndProc; + wc.hInstance = process; + wc.lpszClassName = WINDOW_NAME; + + if (::RegisterClass(&wc) == 0) + throw ffs3::FileError(wxString(wxT("Could not start monitoring window notifications:")) + wxT("\n\n") + + ffs3::getLastErrorFormatted() + wxT(" (RegisterClass)")); + + Loki::ScopeGuard guardClass = Loki::MakeGuard(::UnregisterClass, WINDOW_NAME, process); + + //create dummy-window + windowHandle = ::CreateWindow( + WINDOW_NAME, //LPCTSTR lpClassName OR ATOM in low-order word! + NULL, //LPCTSTR lpWindowName, + 0, //DWORD dwStyle, + 0, //int x, + 0, //int y, + 0, //int nWidth, + 0, //int nHeight, + 0, //note: we need a toplevel window to receive device arrival events, not a message-window (HWND_MESSAGE)! + NULL, //HMENU hMenu, + process, //HINSTANCE hInstance, + NULL); //LPVOID lpParam + if (windowHandle == NULL) + throw ffs3::FileError(wxString(wxT("Could not start monitoring window notifications:")) + wxT("\n\n") + + ffs3::getLastErrorFormatted() + wxT(" (CreateWindow)")); + + guardClass.Dismiss(); +} + + +MessageProvider::~MessageProvider() +{ + //clean-up in reverse order + ::DestroyWindow(windowHandle); + ::UnregisterClass(WINDOW_NAME, //LPCTSTR lpClassName OR ATOM in low-order word! + process); //HINSTANCE hInstance +} + + +inline +void MessageProvider::registerListener(Listener& l) +{ + listener.insert(&l); +} + + +inline +void MessageProvider::unregisterListener(Listener& l) //don't unregister objects with static lifetime +{ + listener.erase(&l); +} + + +inline +HWND MessageProvider::getWnd() const //get handle in order to register additional notifications +{ + return windowHandle; +} + + +void MessageProvider::processMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + std::for_each(listener.begin(), listener.end(), boost::bind(&Listener::onMessage, _1, message, wParam, lParam)); +} +//#################################################################################################### + + +class NotifyRequestDeviceRemoval::Pimpl : private MessageProvider::Listener +{ +public: + Pimpl(NotifyRequestDeviceRemoval& parent, const std::vector<HANDLE>& openHandles) : //throw (FileError) + parent_(parent) + { + MessageProvider::instance().registerListener(*this); //throw (FileError) + + //register handles to receive notifications + DEV_BROADCAST_HANDLE filter = {}; + filter.dbch_size = sizeof(filter); + filter.dbch_devicetype = DBT_DEVTYP_HANDLE; + + try + { + for (std::vector<HANDLE>::const_iterator i = openHandles.begin(); i != openHandles.end(); ++i) + { + filter.dbch_handle = *i; + + HDEVNOTIFY hNotfication = ::RegisterDeviceNotification( + MessageProvider::instance().getWnd(), //__in HANDLE hRecipient, + &filter, //__in LPVOID NotificationFilter, + DEVICE_NOTIFY_WINDOW_HANDLE); //__in DWORD Flags + if (hNotfication == NULL) + throw ffs3::FileError(wxString(wxT("Could not register device removal notifications:")) + wxT("\n\n") + ffs3::getLastErrorFormatted()); + + notifications.insert(hNotfication); + } + } + catch (...) + { + std::for_each(notifications.begin(), notifications.end(), ::UnregisterDeviceNotification); + MessageProvider::instance().unregisterListener(*this); //throw() in this case + throw; + } + } + + ~Pimpl() + { + std::for_each(notifications.begin(), notifications.end(), ::UnregisterDeviceNotification); + MessageProvider::instance().unregisterListener(*this); + } + +private: + virtual void onMessage(UINT message, WPARAM wParam, LPARAM lParam) //throw()! + { + //DBT_DEVICEQUERYREMOVE example: http://msdn.microsoft.com/en-us/library/aa363427(v=VS.85).aspx + if (message == WM_DEVICECHANGE) + { + if ( wParam == DBT_DEVICEQUERYREMOVE || + wParam == DBT_DEVICEQUERYREMOVEFAILED || + wParam == DBT_DEVICEREMOVECOMPLETE) + { + PDEV_BROADCAST_HDR header = reinterpret_cast<PDEV_BROADCAST_HDR>(lParam); + if (header->dbch_devicetype == DBT_DEVTYP_HANDLE) + { + PDEV_BROADCAST_HANDLE body = reinterpret_cast<PDEV_BROADCAST_HANDLE>(lParam); + +#ifdef __MINGW32__ + const HDEVNOTIFY requestNotification = reinterpret_cast<HDEVNOTIFY>(body->dbch_hdevnotify); +#else + const HDEVNOTIFY requestNotification = body->dbch_hdevnotify; +#endif + if (notifications.find(requestNotification) != notifications.end()) //is it for one of our notifications we registered? + switch (wParam) + { + case DBT_DEVICEQUERYREMOVE: + parent_.onRequestRemoval(body->dbch_handle); + break; + case DBT_DEVICEQUERYREMOVEFAILED: + parent_.onRemovalFinished(body->dbch_handle, false); + break; + case DBT_DEVICEREMOVECOMPLETE: + parent_.onRemovalFinished(body->dbch_handle, true); + break; + } + } + } + } + } + + NotifyRequestDeviceRemoval& parent_; + std::set<HDEVNOTIFY> notifications; +}; +//#################################################################################################### + + +NotifyRequestDeviceRemoval::NotifyRequestDeviceRemoval(const std::vector<HANDLE>& openHandles) +{ + pimpl.reset(new Pimpl(*this, openHandles)); +} + + +NotifyRequestDeviceRemoval::~NotifyRequestDeviceRemoval() {} //make sure ~auto_ptr() works with complete type diff --git a/RealtimeSync/notify.h b/RealtimeSync/notify.h new file mode 100644 index 00000000..07d74f2a --- /dev/null +++ b/RealtimeSync/notify.h @@ -0,0 +1,40 @@ +// ************************************************************************** +// * 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) * +// ************************************************************************** +// +#ifndef NOTIFY_H_INCLUDED +#define NOTIFY_H_INCLUDED + +#ifndef FFS_WIN +use in windows build only +#endif + +#include <wx/msw/wrapwin.h> //includes "windows.h" +#include "../shared/file_error.h" +#include <vector> +#include <memory> + +//handle (user-) request for device removal via template method pattern +//evaluate directly after processing window messages +class NotifyRequestDeviceRemoval +{ +public: + NotifyRequestDeviceRemoval(const std::vector<HANDLE>& openHandles); //throw (FileError) + virtual ~NotifyRequestDeviceRemoval(); + +private: + virtual void onRequestRemoval(HANDLE hnd) = 0; //throw()! + //NOTE: onRemovalFinished is NOT guaranteed to execute after onRequestRemoval()! but most likely will + virtual void onRemovalFinished(HANDLE hnd, bool successful) = 0; //throw()! + + NotifyRequestDeviceRemoval(NotifyRequestDeviceRemoval&); //no copying + void operator=(NotifyRequestDeviceRemoval&); // + + class Pimpl; + std::auto_ptr<Pimpl> pimpl; +}; + + +#endif // NOTIFY_H_INCLUDED diff --git a/RealtimeSync/pch.h b/RealtimeSync/pch.h index aaee9032..53076de8 100644 --- a/RealtimeSync/pch.h +++ b/RealtimeSync/pch.h @@ -4,8 +4,8 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#ifndef FFS_PRECOMPILED_HEADER -#define FFS_PRECOMPILED_HEADER +#ifndef RTS_PRECOMPILED_HEADER +#define RTS_PRECOMPILED_HEADER //pay attention when using this file: might cause issues! #ifndef __WXDEBUG__ @@ -100,4 +100,4 @@ do NOT use in release build! #endif //FFS_WIN //##################################################### -#endif //FFS_PRECOMPILED_HEADER +#endif //RTS_PRECOMPILED_HEADER
\ No newline at end of file diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp index c2678878..b6e35c38 100644 --- a/RealtimeSync/resources.cpp +++ b/RealtimeSync/resources.cpp @@ -10,10 +10,10 @@ #include <wx/image.h> #include <wx/icon.h> #include <memory> -#include "../shared/standardPaths.h" -#include "../shared/systemConstants.h" +#include "../shared/standard_paths.h" +#include "../shared/system_constants.h" -using namespace FreeFileSync; +using namespace ffs3; const GlobalResources& GlobalResources::getInstance() @@ -42,7 +42,7 @@ GlobalResources::~GlobalResources() void GlobalResources::load() const { - wxFFileInputStream input(FreeFileSync::getResourceDir() + wxT("Resources.dat")); + wxFFileInputStream input(ffs3::getResourceDir() + wxT("Resources.dat")); if (input.IsOk()) //if not... we don't want to react too harsh here { //activate support for .png files diff --git a/RealtimeSync/trayMenu.cpp b/RealtimeSync/tray_menu.cpp index 4e82b5f7..1ea7416c 100644 --- a/RealtimeSync/trayMenu.cpp +++ b/RealtimeSync/tray_menu.cpp @@ -4,28 +4,28 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "trayMenu.h" +#include "tray_menu.h" #include <wx/msgdlg.h> #include <wx/taskbar.h> #include <wx/app.h> #include "resources.h" #include <algorithm> #include <iterator> -#include "../shared/stringConv.h" +#include "../shared/string_conv.h" #include <wx/utils.h> #include <wx/menu.h> #include "watcher.h" #include <wx/utils.h> #include <wx/log.h> -#include "../shared/staticAssert.h" -#include "../shared/buildInfo.h" +#include "../shared/assert_static.h" +#include "../shared/build_info.h" #include <wx/icon.h> //Linux needs this #include <wx/timer.h> -using namespace RealtimeSync; +using namespace rts; -class WaitCallbackImpl : private wxEvtHandler, public RealtimeSync::WaitCallback //keep this order: else VC++ generates wrong code +class WaitCallbackImpl : private wxEvtHandler, public rts::WaitCallback //keep this order: else VC++ generates wrong code { public: WaitCallbackImpl(); @@ -175,23 +175,23 @@ void WaitCallbackImpl::OnContextMenuSelection(wxCommandEvent& event) break; case CONTEXT_ABOUT: { - //build information - wxString build = __TDATE__; + //build information + wxString build = __TDATE__; #if wxUSE_UNICODE - build += wxT(" - Unicode"); + build += wxT(" - Unicode"); #else - build += wxT(" - ANSI"); + build += wxT(" - ANSI"); #endif //wxUSE_UNICODE - //compile time info about 32/64-bit build - if (Utility::is64BitBuild) - build += wxT(" x64"); - else - build += wxT(" x86"); - assert_static(Utility::is32BitBuild || Utility::is64BitBuild); + //compile time info about 32/64-bit build + if (util::is64BitBuild) + build += wxT(" x64"); + else + build += wxT(" x86"); + assert_static(util::is32BitBuild || util::is64BitBuild); -wxString buildFormatted = _("(Build: %x)"); -buildFormatted.Replace(wxT("%x"), build); + wxString buildFormatted = _("(Build: %x)"); + buildFormatted.Replace(wxT("%x"), build); wxMessageDialog aboutDlg(NULL, wxString(wxT("RealtimeSync")) + wxT("\n\n") + buildFormatted, _("About"), wxOK); aboutDlg.ShowModal(); @@ -218,15 +218,15 @@ namespace { std::vector<Zstring> convert(const std::vector<wxString>& dirList) { - std::vector<Zstring> output; + std::set<Zstring, LessFilename> output; std::transform(dirList.begin(), dirList.end(), - std::back_inserter(output), static_cast<Zstring (*)(const wxString&)>(FreeFileSync::wxToZ)); - return output; + std::inserter(output, output.end()), static_cast<Zstring (*)(const wxString&)>(ffs3::wxToZ)); + return std::vector<Zstring>(output.begin(), output.end()); } } -RealtimeSync::MonitorResponse RealtimeSync::startDirectoryMonitor(const xmlAccess::XmlRealConfig& config) +rts::MonitorResponse rts::startDirectoryMonitor(const xmlAccess::XmlRealConfig& config) { const std::vector<Zstring> dirList = convert(config.directories); @@ -235,7 +235,7 @@ RealtimeSync::MonitorResponse RealtimeSync::startDirectoryMonitor(const xmlAcces WaitCallbackImpl callback; if (config.commandline.empty()) - throw FreeFileSync::FileError(_("Command line is empty!")); + throw ffs3::FileError(_("Command line is empty!")); while (true) { @@ -264,7 +264,7 @@ RealtimeSync::MonitorResponse RealtimeSync::startDirectoryMonitor(const xmlAcces while (wxGetLocalTime() < nextExec) { callback.requestUiRefresh(); - wxMilliSleep(RealtimeSync::UI_UPDATE_INTERVAL); + wxMilliSleep(rts::UI_UPDATE_INTERVAL); } } } @@ -272,9 +272,9 @@ RealtimeSync::MonitorResponse RealtimeSync::startDirectoryMonitor(const xmlAcces { return ab.getCommand(); } - catch (const FreeFileSync::FileError& error) + catch (const ffs3::FileError& error) { - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); return RESUME; } diff --git a/RealtimeSync/trayMenu.h b/RealtimeSync/tray_menu.h index 8bf73a47..048fda60 100644 --- a/RealtimeSync/trayMenu.h +++ b/RealtimeSync/tray_menu.h @@ -8,10 +8,10 @@ #define TRAYMENU_H_INCLUDED #include "watcher.h" -#include "xmlProcessing.h" +#include "xml_proc.h" -namespace RealtimeSync +namespace rts { enum MonitorResponse { diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp index 9af48783..89fc5e61 100644 --- a/RealtimeSync/watcher.cpp +++ b/RealtimeSync/watcher.cpp @@ -5,36 +5,35 @@ // ************************************************************************** // #include "watcher.h" -#include "../shared/systemFunctions.h" -//#include "functions.h" +#include "../shared/system_func.h" #include <wx/intl.h> -//#include <wx/filefn.h> -#include "../shared/stringConv.h" -#include "../shared/fileHandling.h" +#include "../shared/string_conv.h" +#include "../shared/file_handling.h" #include <stdexcept> #include <set> #include <wx/timer.h> #include <algorithm> #ifdef FFS_WIN +#include "notify.h" #include <wx/msw/wrapwin.h> //includes "windows.h" -#include "../shared/longPathPrefix.h" +#include "../shared/long_path_prefix.h" +#include <boost/shared_ptr.hpp> #elif defined FFS_LINUX -//#include <exception> #include "../shared/inotify/inotify-cxx.h" -#include "../shared/fileTraverser.h" +#include "../shared/file_traverser.h" #endif -using namespace FreeFileSync; +using namespace ffs3; -bool RealtimeSync::updateUiIsAllowed() +bool rts::updateUiIsAllowed() { static wxLongLong lastExec; const wxLongLong newExec = wxGetLocalTimeMillis(); - if (newExec - lastExec >= RealtimeSync::UI_UPDATE_INTERVAL) //perform ui updates not more often than necessary + if (newExec - lastExec >= rts::UI_UPDATE_INTERVAL) //perform ui updates not more often than necessary { lastExec = newExec; return true; @@ -42,238 +41,34 @@ bool RealtimeSync::updateUiIsAllowed() return false; } -#ifdef FFS_WIN -/* -template <class T> //have a disctinct static variable per class! -class InstanceCounter //exception safety!!!! use RAII for counter inc/dec! -{ -public: - InstanceCounter() - { - ++instanceCount; - //we're programming on global variables: only one instance of NotifyDeviceArrival allowed at a time! - if (instanceCount > 1) - throw std::logic_error("Only one instance of NotifyDeviceArrival allowed!"); - } - ~InstanceCounter() - { - --instanceCount; - } -private: - static size_t instanceCount; //this class needs to be a singleton but with variable lifetime! => count instances to check consistency -}; -template <class T> //we need a disctinct static variable per class! -size_t InstanceCounter<T>::instanceCount = 0; - - -std::set<Zstring> driveNamesArrived; //letters of newly arrived drive names - -//convert bitmask into "real" drive-letter -void notifyDriveFromMask (ULONG unitmask) -{ - for (wchar_t i = 0; i < 26; ++i) - { - if (unitmask & 0x1) - { - Zstring newDrivePath; - newDrivePath += DefaultChar('A') + i; - newDrivePath += DefaultStr(":\\"); - driveNamesArrived.insert(newDrivePath); - return; - } - unitmask = unitmask >> 1; - } -} - - -LRESULT CALLBACK MainWndProc( - HWND hwnd, // handle to window - UINT uMsg, // message identifier - WPARAM wParam, // first message parameter - LPARAM lParam) // second message parameter +#ifdef FFS_WIN +//shared_ptr custom deleter +void cleanUpChangeNotifications(const std::vector<HANDLE>* handles) { + for (std::vector<HANDLE>::const_iterator i = handles->begin(); i != handles->end(); ++i) + if (*i != INVALID_HANDLE_VALUE) + ::FindCloseChangeNotification(*i); - //detect device arrival: http://msdn.microsoft.com/en-us/library/aa363215(VS.85).aspx - if (uMsg == WM_DEVICECHANGE) - { - if (wParam == DBT_DEVICEARRIVAL) - { - PDEV_BROADCAST_HDR lpdb = reinterpret_cast<PDEV_BROADCAST_HDR>(lParam); - if (lpdb->dbch_devicetype == DBT_DEVTYP_VOLUME) - { - PDEV_BROADCAST_VOLUME lpdbv = reinterpret_cast<PDEV_BROADCAST_VOLUME>(lpdb); - //warning: lpdbv->dbcv_flags is 0 for USB-sticks! - - //insert drive name notification into global variable: - notifyDriveFromMask(lpdbv->dbcv_unitmask); - } - } - } - //default - return DefWindowProc(hwnd, uMsg, wParam, lParam); + delete handles; //don't forget!!! custom deleter needs to care for everything! } - -class NotifyDeviceArrival //e.g. insertion of USB-Stick -{ -public: - NotifyDeviceArrival() : - parentInstance(NULL), - registeredClass(NULL), - windowHandle(NULL) - { - //get program's module handle - parentInstance = GetModuleHandle(NULL); - if (parentInstance == NULL) - throw FreeFileSync::FileError(wxString(("Could not start monitoring for volume arrival:")) + wxT("\n\n") + - FreeFileSync::getLastErrorFormatted()+ wxT(" (GetModuleHandle)")); - - //register the main window class - WNDCLASS wc; - wc.style = 0; - wc.lpfnWndProc = MainWndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = parentInstance; - wc.hIcon = NULL; - wc.hCursor = NULL; - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; - wc.lpszClassName = wxT("DeviceArrivalWatcher"); - - registeredClass =:: RegisterClass(&wc); - if (registeredClass == 0) - throw FreeFileSync::FileError(wxString(("Could not start monitoring for volume arrival:")) + wxT("\n\n") + - FreeFileSync::getLastErrorFormatted()+ wxT(" (RegisterClass)")); - - //create dummy-window - windowHandle = ::CreateWindow( - reinterpret_cast<LPCTSTR>(registeredClass), //LPCTSTR lpClassName OR ATOM in low-order word! - 0, //LPCTSTR lpWindowName, - 0, //DWORD dwStyle, - 0, //int x, - 0, //int y, - 0, //int nWidth, - 0, //int nHeight, - 0, //note: we need a toplevel window to receive device arrival events, not a message-window (HWND_MESSAGE)! - NULL, //HMENU hMenu, - parentInstance, //HINSTANCE hInstance, - NULL); //LPVOID lpParam - if (windowHandle == NULL) - throw FreeFileSync::FileError(wxString( ("Could not start monitoring for volume arrival:")) + wxT("\n\n") + - FreeFileSync::getLastErrorFormatted() + wxT(" (CreateWindow)")); - - //clear global variable - driveNamesArrived.clear(); - } - - ~NotifyDeviceArrival() - { - //clean-up in reverse order - if (windowHandle != NULL) - ::DestroyWindow(windowHandle); - - if (registeredClass != 0) - ::UnregisterClass(reinterpret_cast<LPCTSTR>(registeredClass), //LPCTSTR lpClassName OR ATOM in low-order word! - parentInstance); //HINSTANCE hInstance - } - - - //test if one of the notifications matches one of the directory paths specified - bool notificationsFound(const std::vector<Zstring>& dirList) const - { - //do NOT rely on string parsing! use (volume directory) file ids! - std::set<Utility::FileID> notifiedIds; - for (std::set<Zstring>::const_iterator j = driveNamesArrived.begin(); j != driveNamesArrived.end(); ++j) - { - const Utility::FileID notifiedVolId = Utility::retrieveFileID(*j); - if (notifiedVolId != Utility::FileID()) - notifiedIds.insert(notifiedVolId); - } - //clear global variable - driveNamesArrived.clear(); - - if (!notifiedIds.empty()) //minor optimization - { - for (std::vector<Zstring>::const_iterator i = dirList.begin(); i != dirList.end(); ++i) - { - //retrieve volume name - wchar_t volumeNameRaw[1000]; - if (::GetVolumePathName(i->c_str(), //__in LPCTSTR lpszFileName, - volumeNameRaw, //__out LPTSTR lpszVolumePathName, - 1000)) //__in DWORD cchBufferLength - { - const Utility::FileID monitoredId = Utility::retrieveFileID(volumeNameRaw); - if (monitoredId != Utility::FileID()) - { - if (notifiedIds.find(monitoredId) != notifiedIds.end()) - return true; - } - } - } - } - - return false; - } - -private: - HINSTANCE parentInstance; - ATOM registeredClass; - HWND windowHandle; - - //we're programming on global variables: only one instance of NotifyDeviceArrival allowed at a time! - InstanceCounter<NotifyDeviceArrival> dummy; //exception safety!!!! use RAII for counter inc/dec! -}; -*/ - - -//-------------------------------------------------------------------------------------------------------------- -class ChangeNotifications -{ -public: - ~ChangeNotifications() - { - for (std::vector<HANDLE>::const_iterator i = arrayHandle.begin(); i != arrayHandle.end(); ++i) - if (*i != INVALID_HANDLE_VALUE) - ::FindCloseChangeNotification(*i); - } - - void addHandle(HANDLE hndl) - { - arrayHandle.push_back(hndl); - } - - size_t getSize() const - { - return arrayHandle.size(); - } - - const HANDLE* getArray() - { - return &arrayHandle[0]; //client needs to check getSize() before calling this method! - } - -private: - std::vector<HANDLE> arrayHandle; -}; - #elif defined FFS_LINUX -class DirsOnlyTraverser : public FreeFileSync::TraverseCallback +class DirsOnlyTraverser : public ffs3::TraverseCallback { public: DirsOnlyTraverser(std::vector<std::string>& dirs) : m_dirs(dirs) {} virtual void onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details) {} - virtual void onSymlink(const DefaultChar* shortName, const Zstring& fullName, const SymlinkInfo& details) {} + virtual void onSymlink(const DefaultChar* shortName, const Zstring& fullName, const SymlinkInfo& details) {} virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName) { m_dirs.push_back(fullName.c_str()); - return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), this); + return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), this); } virtual void onError(const wxString& errorText) { - throw FreeFileSync::FileError(errorText); + throw ffs3::FileError(errorText); } private: @@ -285,7 +80,7 @@ private: class WatchDirectories //detect changes to directory availability { public: - WatchDirectories() : allExistingBuffer(true) {} + WatchDirectories() : allExisting_(true) {} //initialization void addForMonitoring(const Zstring& dirName) @@ -301,47 +96,48 @@ public: if (newExec - lastExec >= UPDATE_INTERVAL) { lastExec = newExec; - allExistingBuffer = std::find_if(dirList.begin(), dirList.end(), notExisting) == dirList.end(); + allExisting_ = std::find_if(dirList.begin(), dirList.end(), notExisting) == dirList.end(); } - return allExistingBuffer; + return allExisting_; } private: static bool notExisting(const Zstring& dirname) { - return !FreeFileSync::dirExists(dirname); + return !ffs3::dirExists(dirname); } mutable wxLongLong lastExec; - mutable bool allExistingBuffer; + mutable bool allExisting_; - std::set<Zstring> dirList; //save avail. directories, avoid double-entries + std::set<Zstring, LessFilename> dirList; //save avail. directories, avoid double-entries }; -RealtimeSync::WaitResult RealtimeSync::waitForChanges(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler) //throw(FileError) +rts::WaitResult rts::waitForChanges(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler) //throw(FileError) { if (dirNames.empty()) //pathological case, but check is needed nevertheless - throw FreeFileSync::FileError(_("At least one directory input field is empty.")); + throw ffs3::FileError(_("At least one directory input field is empty.")); //detect when volumes are removed/are not available anymore WatchDirectories dirWatcher; #ifdef FFS_WIN - ChangeNotifications notifications; + typedef boost::shared_ptr<std::vector<HANDLE> > ChangeNotifList; + ChangeNotifList changeNotifications(new std::vector<HANDLE>, ::cleanUpChangeNotifications); for (std::vector<Zstring>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i) { - const Zstring formattedDir = FreeFileSync::getFormattedDirectoryName(*i); + const Zstring formattedDir = ffs3::getFormattedDirectoryName(*i); if (formattedDir.empty()) - throw FreeFileSync::FileError(_("At least one directory input field is empty.")); + throw ffs3::FileError(_("At least one directory input field is empty.")); dirWatcher.addForMonitoring(formattedDir); const HANDLE rv = ::FindFirstChangeNotification( - FreeFileSync::applyLongPathPrefix(formattedDir).c_str(), //__in LPCTSTR lpPathName, + ffs3::applyLongPathPrefix(formattedDir).c_str(), //__in LPCTSTR lpPathName, true, //__in BOOL bWatchSubtree, FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | @@ -354,34 +150,82 @@ RealtimeSync::WaitResult RealtimeSync::waitForChanges(const std::vector<Zstring> return CHANGE_DIR_MISSING; const wxString errorMessage = wxString(_("Could not initialize directory monitoring:")) + wxT("\n\"") + zToWx(*i) + wxT("\""); - throw FreeFileSync::FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw ffs3::FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } - notifications.addHandle(rv); + changeNotifications->push_back(rv); } + if (changeNotifications->size() == 0) + throw ffs3::FileError(_("At least one directory input field is empty.")); + + + //detect user request for device removal (e.g. usb stick) + class HandleVolumeRemoval : public NotifyRequestDeviceRemoval + { + public: + HandleVolumeRemoval(ChangeNotifList& openHandles) : + NotifyRequestDeviceRemoval(*openHandles), //throw (FileError) + removalRequested(false), + operationComplete(false), + openHandles_(openHandles) {} + + bool requestReceived() const + { + return removalRequested; + } + bool finished() const + { + return operationComplete; + } + + private: + virtual void onRequestRemoval(HANDLE hnd) //don't throw! + { + openHandles_.reset(); //free all handles + removalRequested = true; //and make sure they are not used anymore + } + virtual void onRemovalFinished(HANDLE hnd, bool successful) //throw()! + { + operationComplete = true; + } + + bool removalRequested; + bool operationComplete; + ChangeNotifList& openHandles_; + } removalRequest(changeNotifications); - if (notifications.getSize() == 0) - throw FreeFileSync::FileError(_("At least one directory input field is empty.")); while (true) { //check for changes within directories: - const DWORD rv = ::WaitForMultipleObjects( //NOTE: notifications.getArray() returns valid pointer, because it cannot be empty in this context - static_cast<DWORD>(notifications.getSize()), //__in DWORD nCount, - notifications.getArray(), //__in const HANDLE *lpHandles, - false, //__in BOOL bWaitAll, - UI_UPDATE_INTERVAL); //__in DWORD dwMilliseconds - if (WAIT_OBJECT_0 <= rv && rv < WAIT_OBJECT_0 + notifications.getSize()) + const DWORD rv = ::WaitForMultipleObjects( //NOTE: changeNotifications returns valid pointer, because it cannot be empty in this context + static_cast<DWORD>(changeNotifications->size()), //__in DWORD nCount, + &(*changeNotifications)[0], //__in const HANDLE *lpHandles, + false, //__in BOOL bWaitAll, + UI_UPDATE_INTERVAL); //__in DWORD dwMilliseconds + if (WAIT_OBJECT_0 <= rv && rv < WAIT_OBJECT_0 + changeNotifications->size()) return CHANGE_DETECTED; //directory change detected else if (rv == WAIT_FAILED) - throw FreeFileSync::FileError(wxString(_("Error when monitoring directories.")) + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw ffs3::FileError(wxString(_("Error when monitoring directories.")) + wxT("\n\n") + ffs3::getLastErrorFormatted()); //else if (rv == WAIT_TIMEOUT) if (!dirWatcher.allExisting()) //check for removed devices: return CHANGE_DIR_MISSING; statusHandler->requestUiRefresh(); + + //handle device removal + if (removalRequest.requestReceived()) + { + const wxMilliClock_t maxwait = wxGetLocalTimeMillis() + 5000; //HandleVolumeRemoval::finished() not guaranteed! + while (!removalRequest.finished() && wxGetLocalTimeMillis() < maxwait) + { + wxMilliSleep(rts::UI_UPDATE_INTERVAL); + statusHandler->requestUiRefresh(); + } + return CHANGE_DIR_MISSING; + } } #elif defined FFS_LINUX @@ -390,10 +234,10 @@ RealtimeSync::WaitResult RealtimeSync::waitForChanges(const std::vector<Zstring> //add all subdirectories for (std::vector<Zstring>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i) { - const Zstring formattedDir = FreeFileSync::getFormattedDirectoryName(*i); + const Zstring formattedDir = ffs3::getFormattedDirectoryName(*i); if (formattedDir.empty()) - throw FreeFileSync::FileError(_("At least one directory input field is empty.")); + throw ffs3::FileError(_("At least one directory input field is empty.")); dirWatcher.addForMonitoring(formattedDir); @@ -403,11 +247,11 @@ RealtimeSync::WaitResult RealtimeSync::waitForChanges(const std::vector<Zstring> try //get all subdirectories { DirsOnlyTraverser traverser(fullDirList); - FreeFileSync::traverseFolder(formattedDir, false, &traverser); //don't traverse into symlinks (analog to windows build) + ffs3::traverseFolder(formattedDir, false, &traverser); //don't traverse into symlinks (analog to windows build) } - catch (const FreeFileSync::FileError&) + catch (const ffs3::FileError&) { - if (!FreeFileSync::dirExists(formattedDir)) //that's no good locking behavior, but better than nothing + if (!ffs3::dirExists(formattedDir)) //that's no good locking behavior, but better than nothing return CHANGE_DIR_MISSING; throw; @@ -438,17 +282,17 @@ RealtimeSync::WaitResult RealtimeSync::waitForChanges(const std::vector<Zstring> } catch (const InotifyException& e) { - if (!FreeFileSync::dirExists(i->c_str())) //that's no good locking behavior, but better than nothing + if (!ffs3::dirExists(i->c_str())) //that's no good locking behavior, but better than nothing return CHANGE_DIR_MISSING; const wxString errorMessage = wxString(_("Could not initialize directory monitoring:")) + wxT("\n\"") + zToWx(i->c_str()) + wxT("\""); - throw FreeFileSync::FileError(errorMessage + wxT("\n\n") + zToWx(e.GetMessage().c_str())); + throw ffs3::FileError(errorMessage + wxT("\n\n") + zToWx(e.GetMessage().c_str())); } } if (notifications.GetWatchCount() == 0) - throw FreeFileSync::FileError(_("At least one directory input field is empty.")); + throw ffs3::FileError(_("At least one directory input field is empty.")); while (true) { @@ -460,33 +304,33 @@ RealtimeSync::WaitResult RealtimeSync::waitForChanges(const std::vector<Zstring> if (!dirWatcher.allExisting()) //check for removed devices: return CHANGE_DIR_MISSING; - wxMilliSleep(RealtimeSync::UI_UPDATE_INTERVAL); + wxMilliSleep(rts::UI_UPDATE_INTERVAL); statusHandler->requestUiRefresh(); } } catch (const InotifyException& e) { - throw FreeFileSync::FileError(wxString(_("Error when monitoring directories.")) + wxT("\n\n") + zToWx(e.GetMessage().c_str())); + throw ffs3::FileError(wxString(_("Error when monitoring directories.")) + wxT("\n\n") + zToWx(e.GetMessage().c_str())); } catch (const std::exception& e) { - throw FreeFileSync::FileError(wxString(_("Error when monitoring directories.")) + wxT("\n\n") + zToWx(e.what())); + throw ffs3::FileError(wxString(_("Error when monitoring directories.")) + wxT("\n\n") + zToWx(e.what())); } #endif } -void RealtimeSync::waitForMissingDirs(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler) //throw(FileError) +void rts::waitForMissingDirs(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler) //throw(FileError) { //new: support for monitoring newly connected directories volumes (e.g.: USB-sticks) WatchDirectories dirWatcher; for (std::vector<Zstring>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i) { - const Zstring formattedDir = FreeFileSync::getFormattedDirectoryName(*i); + const Zstring formattedDir = ffs3::getFormattedDirectoryName(*i); if (formattedDir.empty()) - throw FreeFileSync::FileError(_("At least one directory input field is empty.")); + throw ffs3::FileError(_("At least one directory input field is empty.")); dirWatcher.addForMonitoring(formattedDir); } @@ -496,7 +340,7 @@ void RealtimeSync::waitForMissingDirs(const std::vector<Zstring>& dirNames, Wait if (dirWatcher.allExisting()) //check for newly arrived devices: return; - wxMilliSleep(RealtimeSync::UI_UPDATE_INTERVAL); + wxMilliSleep(rts::UI_UPDATE_INTERVAL); statusHandler->requestUiRefresh(); } } diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h index c0690c33..dc579edc 100644 --- a/RealtimeSync/watcher.h +++ b/RealtimeSync/watcher.h @@ -9,10 +9,10 @@ #include "../shared/zstring.h" #include <vector> -#include "../shared/fileError.h" +#include "../shared/file_error.h" -namespace RealtimeSync +namespace rts { const int UI_UPDATE_INTERVAL = 100; //perform ui updates not more often than necessary, 100 seems to be a good value with only a minimal performance loss diff --git a/RealtimeSync/xmlFreeFileSync.cpp b/RealtimeSync/xml_ffs.cpp index ac4c1e3a..3f87b20f 100644 --- a/RealtimeSync/xmlFreeFileSync.cpp +++ b/RealtimeSync/xml_ffs.cpp @@ -4,18 +4,18 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "xmlFreeFileSync.h" -#include "../shared/standardPaths.h" -#include "../shared/globalFunctions.h" +#include "xml_ffs.h" +#include "../shared/standard_paths.h" +#include "../shared/global_func.h" #include "../shared/zstring.h" #include "functions.h" -#include "../shared/xmlBase.h" -#include "../shared/stringConv.h" +#include "../shared/xml_base.h" +#include "../shared/string_conv.h" //include FreeFileSync xml headers -#include "../library/processXml.h" +#include "../library/process_xml.h" -using namespace FreeFileSync; +using namespace ffs3; #ifdef FFS_WIN @@ -44,7 +44,7 @@ xmlAccess::XmlRealConfig convertBatchToReal(const xmlAccess::XmlBatchConfig& bat uniqueFolders.insert(zToWx(batchCfg.mainCfg.firstPair.rightDirectory)); //additional folders - for (std::vector<FreeFileSync::FolderPairEnh>::const_iterator i = batchCfg.mainCfg.additionalPairs.begin(); + for (std::vector<ffs3::FolderPairEnh>::const_iterator i = batchCfg.mainCfg.additionalPairs.begin(); i != batchCfg.mainCfg.additionalPairs.end(); ++i) { uniqueFolders.insert(zToWx(i->leftDirectory)); @@ -53,7 +53,7 @@ xmlAccess::XmlRealConfig convertBatchToReal(const xmlAccess::XmlBatchConfig& bat output.directories.insert(output.directories.end(), uniqueFolders.begin(), uniqueFolders.end()); - output.commandline = FreeFileSync::getBinaryDir() + + output.commandline = ffs3::getBinaryDir() + #ifdef FFS_WIN wxT("FreeFileSync.exe") + #elif defined FFS_LINUX @@ -65,7 +65,7 @@ xmlAccess::XmlRealConfig convertBatchToReal(const xmlAccess::XmlBatchConfig& bat } -void RealtimeSync::readRealOrBatchConfig(const wxString& filename, xmlAccess::XmlRealConfig& config) //throw (xmlAccess::XmlError); +void rts::readRealOrBatchConfig(const wxString& filename, xmlAccess::XmlRealConfig& config) //throw (xmlAccess::XmlError); { if (xmlAccess::getXmlType(filename) != xmlAccess::XML_BATCH_CONFIG) { @@ -77,30 +77,28 @@ void RealtimeSync::readRealOrBatchConfig(const wxString& filename, xmlAccess::Xm xmlAccess::XmlBatchConfig batchCfg; try { - xmlAccess::readBatchConfig(filename, batchCfg); //throw (xmlAccess::XmlError); + xmlAccess::readConfig(filename, batchCfg); //throw (xmlAccess::XmlError); } catch (const xmlAccess::XmlError& e) { - if (e.getSeverity() != xmlAccess::XmlError::WARNING) - throw; + if (e.getSeverity() == xmlAccess::XmlError::WARNING) + config = convertBatchToReal(batchCfg, filename); //do work despite parsing errors, then re-throw - config = convertBatchToReal(batchCfg, filename); //do work despite parsing errors, then re-throw throw; // } config = convertBatchToReal(batchCfg, filename); } -int RealtimeSync::getProgramLanguage() +int rts::getProgramLanguage() { xmlAccess::XmlGlobalSettings settings; try { - xmlAccess::readGlobalSettings(settings); + xmlAccess::readConfig(settings); } - catch (const xmlAccess::XmlError&) - {} //user default language if error occured + catch (const xmlAccess::XmlError&) {} //user default language if error occured return settings.programLanguage; } diff --git a/RealtimeSync/xmlFreeFileSync.h b/RealtimeSync/xml_ffs.h index 8955ccf1..cef11c9f 100644 --- a/RealtimeSync/xmlFreeFileSync.h +++ b/RealtimeSync/xml_ffs.h @@ -7,12 +7,12 @@ #ifndef XMLFREEFILESYNC_H_INCLUDED #define XMLFREEFILESYNC_H_INCLUDED -#include "xmlProcessing.h" +#include "xml_proc.h" //reuse (some of) FreeFileSync's xml files -namespace RealtimeSync +namespace rts { void readRealOrBatchConfig(const wxString& filename, xmlAccess::XmlRealConfig& config); //throw (xmlAccess::XmlError); diff --git a/RealtimeSync/xmlProcessing.cpp b/RealtimeSync/xml_proc.cpp index e9420d1b..273a687f 100644 --- a/RealtimeSync/xmlProcessing.cpp +++ b/RealtimeSync/xml_proc.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "xmlProcessing.h" +#include "xml_proc.h" #include <wx/filefn.h> #include <wx/intl.h> @@ -35,7 +35,7 @@ void xmlAccess::readRealConfig(const wxString& filename, XmlRealConfig& config) RtsXmlParser parser(doc.RootElement()); parser.readXmlRealConfig(config); //read GUI layout configuration - if (parser.errorsOccured()) + if (parser.errorsOccurred()) throw XmlError(wxString(_("Error parsing configuration file:")) + wxT("\n\"") + filename + wxT("\"\n\n") + parser.getErrorMessageFormatted(), XmlError::WARNING); } diff --git a/RealtimeSync/xmlProcessing.h b/RealtimeSync/xml_proc.h index bcfcf8f2..bac42f1e 100644 --- a/RealtimeSync/xmlProcessing.h +++ b/RealtimeSync/xml_proc.h @@ -9,7 +9,7 @@ #include <vector> #include <wx/string.h> -#include "../shared/xmlBase.h" +#include "../shared/xml_base.h" namespace xmlAccess diff --git a/algorithm.cpp b/algorithm.cpp index a44fbebf..128742ed 100644 --- a/algorithm.cpp +++ b/algorithm.cpp @@ -9,21 +9,21 @@ #include <stdexcept> #include <wx/log.h> #include "library/resources.h" -#include "shared/fileHandling.h" +#include "shared/file_handling.h" #include "shared/recycler.h" #include <wx/msgdlg.h> #include "library/filter.h" #include <boost/bind.hpp> -#include "shared/stringConv.h" -#include "shared/globalFunctions.h" +#include "shared/string_conv.h" +#include "shared/global_func.h" #include "shared/loki/TypeManip.h" -#include "library/dbFile.h" +#include "library/db_file.h" //#include "shared/loki/NullType.h" -using namespace FreeFileSync; +using namespace ffs3; -void FreeFileSync::swapGrids(const MainConfiguration& config, FolderComparison& folderCmp) +void ffs3::swapGrids(const MainConfiguration& config, FolderComparison& folderCmp) { std::for_each(folderCmp.begin(), folderCmp.end(), boost::bind(&BaseDirMapping::swap, _1)); redetermineSyncDirection(config, folderCmp, NULL); @@ -38,7 +38,7 @@ public: void execute(HierarchyObject& hierObj) const { - Utility::Proxy<const Redetermine> prx(*this); //grant std::for_each access to private parts of this class + util::ProxyForEach<const Redetermine> prx(*this); //grant std::for_each access to private parts of this class std::for_each(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), prx); //process files std::for_each(hierObj.useSubLinks().begin(), hierObj.useSubLinks().end(), prx); //process links @@ -46,20 +46,20 @@ public: } private: - friend class Utility::Proxy<const Redetermine>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! + friend class util::ProxyForEach<const Redetermine>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! void operator()(FileMapping& fileObj) const { switch (fileObj.getCategory()) { case FILE_LEFT_SIDE_ONLY: - if (fileObj.getFullName<LEFT_SIDE>().EndsWith(FreeFileSync::TEMP_FILE_ENDING)) + if (fileObj.getFullName<LEFT_SIDE>().EndsWith(ffs3::TEMP_FILE_ENDING)) fileObj.setSyncDir(SYNC_DIR_LEFT); //schedule potentially existing temporary files for deletion else fileObj.setSyncDir(config.exLeftSideOnly); break; case FILE_RIGHT_SIDE_ONLY: - if (fileObj.getFullName<RIGHT_SIDE>().EndsWith(FreeFileSync::TEMP_FILE_ENDING)) + if (fileObj.getFullName<RIGHT_SIDE>().EndsWith(ffs3::TEMP_FILE_ENDING)) fileObj.setSyncDir(SYNC_DIR_RIGHT); //schedule potentially existing temporary files for deletion else fileObj.setSyncDir(config.exRightSideOnly); @@ -100,6 +100,9 @@ private: break; case SYMLINK_CONFLICT: linkObj.setSyncDir(config.conflict); + break; + case SYMLINK_DIFFERENT: + linkObj.setSyncDir(config.different); break; case SYMLINK_EQUAL: linkObj.setSyncDir(SYNC_DIR_NONE); @@ -171,7 +174,7 @@ struct AllElementsEqual : public std::unary_function<BaseDirMapping, bool> }; -bool FreeFileSync::allElementsEqual(const FolderComparison& folderCmp) +bool ffs3::allElementsEqual(const FolderComparison& folderCmp) { return std::find_if(folderCmp.begin(), folderCmp.end(), std::not1(AllElementsEqual())) == folderCmp.end(); } @@ -412,7 +415,7 @@ public: void execute(HierarchyObject& hierObj) const { - Utility::Proxy<const SetDirChangedFilter> prx(*this); //grant std::for_each access to private parts of this class + util::ProxyForEach<const SetDirChangedFilter> prx(*this); //grant std::for_each access to private parts of this class std::for_each(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), prx); //process files std::for_each(hierObj.useSubLinks().begin(), hierObj.useSubLinks().end(), prx); //process links @@ -420,7 +423,7 @@ public: } private: - friend class Utility::Proxy<const SetDirChangedFilter>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! + friend class util::ProxyForEach<const SetDirChangedFilter>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! void operator()(FileMapping& fileObj) const { @@ -532,7 +535,7 @@ public: { //use standard settings: SyncConfiguration defaultSync; - FreeFileSync::setTwoWay(defaultSync); + ffs3::setTwoWay(defaultSync); Redetermine(defaultSync).execute(baseDirectory); return; } @@ -571,7 +574,7 @@ private: } catch (FileError& error) //e.g. incompatible database version { - if (handler_) handler_->reportWarning(error.show() + wxT(" \n\n") + + if (handler_) handler_->reportWarning(error.msg() + wxT(" \n\n") + _("Setting default synchronization directions: Old files will be overwritten with newer files.")); } return std::pair<DirInfoPtr, DirInfoPtr>(); //NULL @@ -624,12 +627,12 @@ private: //##################### schedule potentially existing temporary files for deletion #################### - if (cat == FILE_LEFT_SIDE_ONLY && fileObj.getFullName<LEFT_SIDE>().EndsWith(FreeFileSync::TEMP_FILE_ENDING)) + if (cat == FILE_LEFT_SIDE_ONLY && fileObj.getFullName<LEFT_SIDE>().EndsWith(ffs3::TEMP_FILE_ENDING)) { fileObj.setSyncDir(SYNC_DIR_LEFT); return; } - else if (cat == FILE_RIGHT_SIDE_ONLY && fileObj.getFullName<RIGHT_SIDE>().EndsWith(FreeFileSync::TEMP_FILE_ENDING)) + else if (cat == FILE_RIGHT_SIDE_ONLY && fileObj.getFullName<RIGHT_SIDE>().EndsWith(ffs3::TEMP_FILE_ENDING)) { fileObj.setSyncDir(SYNC_DIR_RIGHT); return; @@ -857,7 +860,7 @@ private: //--------------------------------------------------------------------------------------------------------------- -void FreeFileSync::redetermineSyncDirection(const SyncConfiguration& config, BaseDirMapping& baseDirectory, DeterminationProblem* handler) +void ffs3::redetermineSyncDirection(const SyncConfiguration& config, BaseDirMapping& baseDirectory, DeterminationProblem* handler) { if (config.automatic) RedetermineAuto(baseDirectory, handler); @@ -866,7 +869,7 @@ void FreeFileSync::redetermineSyncDirection(const SyncConfiguration& config, Bas } -void FreeFileSync::redetermineSyncDirection(const MainConfiguration& currentMainCfg, FolderComparison& folderCmp, DeterminationProblem* handler) +void ffs3::redetermineSyncDirection(const MainConfiguration& currentMainCfg, FolderComparison& folderCmp, DeterminationProblem* handler) { if (folderCmp.size() == 0) return; @@ -897,7 +900,7 @@ public: void execute(HierarchyObject& hierObj) const { - Utility::Proxy<const SetNewDirection> prx(*this); //grant std::for_each access to private parts of this class + util::ProxyForEach<const SetNewDirection> prx(*this); //grant std::for_each access to private parts of this class std::for_each(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), prx); //process files std::for_each(hierObj.useSubLinks().begin(), hierObj.useSubLinks().end(), prx); //process links @@ -905,7 +908,7 @@ public: } private: - friend class Utility::Proxy<const SetNewDirection>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! + friend class util::ProxyForEach<const SetNewDirection>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! void operator()(FileMapping& fileObj) const { @@ -930,7 +933,7 @@ private: }; -void FreeFileSync::setSyncDirectionRec(SyncDirection newDirection, FileSystemObject& fsObj) +void ffs3::setSyncDirectionRec(SyncDirection newDirection, FileSystemObject& fsObj) { if (fsObj.getCategory() != FILE_EQUAL) fsObj.setSyncDir(newDirection); @@ -958,14 +961,14 @@ template <bool include> class InOrExcludeAllRows { public: - void operator()(FreeFileSync::BaseDirMapping& baseDirectory) const //be careful with operator() to no get called by std::for_each! + void operator()(ffs3::BaseDirMapping& baseDirectory) const //be careful with operator() to no get called by std::for_each! { execute(baseDirectory); } - void execute(FreeFileSync::HierarchyObject& hierObj) const //don't create ambiguity by replacing with operator() + void execute(ffs3::HierarchyObject& hierObj) const //don't create ambiguity by replacing with operator() { - Utility::Proxy<const InOrExcludeAllRows<include> > prx(*this); //grant std::for_each access to private parts of this class + util::ProxyForEach<const InOrExcludeAllRows<include> > prx(*this); //grant std::for_each access to private parts of this class std::for_each(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), prx); //process files std::for_each(hierObj.useSubLinks().begin(), hierObj.useSubLinks().end(), prx); //process links @@ -973,19 +976,19 @@ public: } private: - friend class Utility::Proxy<const InOrExcludeAllRows<include> >; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! + friend class util::ProxyForEach<const InOrExcludeAllRows<include> >; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! - void operator()(FreeFileSync::FileMapping& fileObj) const + void operator()(ffs3::FileMapping& fileObj) const { fileObj.setActive(include); } - void operator()(FreeFileSync::SymLinkMapping& linkObj) const + void operator()(ffs3::SymLinkMapping& linkObj) const { linkObj.setActive(include); } - void operator()(FreeFileSync::DirMapping& dirObj) const + void operator()(ffs3::DirMapping& dirObj) const { dirObj.setActive(include); execute(dirObj); //recursion @@ -993,7 +996,7 @@ private: }; -void FreeFileSync::setActiveStatus(bool newStatus, FreeFileSync::FolderComparison& folderCmp) +void ffs3::setActiveStatus(bool newStatus, ffs3::FolderComparison& folderCmp) { if (newStatus) std::for_each(folderCmp.begin(), folderCmp.end(), InOrExcludeAllRows<true>()); //include all rows @@ -1002,7 +1005,7 @@ void FreeFileSync::setActiveStatus(bool newStatus, FreeFileSync::FolderCompariso } -void FreeFileSync::setActiveStatus(bool newStatus, FreeFileSync::FileSystemObject& fsObj) +void ffs3::setActiveStatus(bool newStatus, ffs3::FileSystemObject& fsObj) { fsObj.setActive(newStatus); @@ -1041,9 +1044,9 @@ class FilterData public: FilterData(const BaseFilter& filterProcIn) : filterProc(filterProcIn) {} - void execute(FreeFileSync::HierarchyObject& hierObj) const + void execute(ffs3::HierarchyObject& hierObj) const { - Utility::Proxy<const FilterData> prx(*this); //grant std::for_each access to private parts of this class + util::ProxyForEach<const FilterData> prx(*this); //grant std::for_each access to private parts of this class std::for_each(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), prx); //files std::for_each(hierObj.useSubLinks().begin(), hierObj.useSubLinks().end(), prx); //symlinks @@ -1051,23 +1054,23 @@ public: }; private: - friend class Utility::Proxy<const FilterData>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! + friend class util::ProxyForEach<const FilterData>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! - bool processObject(FreeFileSync::FileSystemObject& fsObj) const; + bool processObject(ffs3::FileSystemObject& fsObj) const; - void operator()(FreeFileSync::FileMapping& fileObj) const + void operator()(ffs3::FileMapping& fileObj) const { if (processObject(fileObj)) fileObj.setActive(filterProc.passFileFilter(fileObj.getObjRelativeName())); } - void operator()(FreeFileSync::SymLinkMapping& linkObj) const + void operator()(ffs3::SymLinkMapping& linkObj) const { if (processObject(linkObj)) linkObj.setActive(filterProc.passFileFilter(linkObj.getObjRelativeName())); } - void operator()(FreeFileSync::DirMapping& dirObj) const + void operator()(ffs3::DirMapping& dirObj) const { bool subObjMightMatch = true; const bool filterPassed = filterProc.passDirFilter(dirObj.getObjRelativeName(), &subObjMightMatch); @@ -1090,28 +1093,28 @@ private: template <> //process all elements inline -bool FilterData<STRATEGY_ALL>::processObject(FreeFileSync::FileSystemObject& fsObj) const +bool FilterData<STRATEGY_ALL>::processObject(ffs3::FileSystemObject& fsObj) const { return true; } template <> inline -bool FilterData<STRATEGY_ACTIVE_ONLY>::processObject(FreeFileSync::FileSystemObject& fsObj) const +bool FilterData<STRATEGY_ACTIVE_ONLY>::processObject(ffs3::FileSystemObject& fsObj) const { return fsObj.isActive(); } } -void FreeFileSync::addExcludeFiltering(const Zstring& excludeFilter, FolderComparison& folderCmp) +void ffs3::addExcludeFiltering(const Zstring& excludeFilter, FolderComparison& folderCmp) { for (std::vector<BaseDirMapping>::iterator i = folderCmp.begin(); i != folderCmp.end(); ++i) FilterData<STRATEGY_ACTIVE_ONLY>(*BaseFilter::FilterRef(new NameFilter(DefaultStr("*"), excludeFilter))).execute(*i); } -void FreeFileSync::applyFiltering(const MainConfiguration& currentMainCfg, FolderComparison& folderCmp) +void ffs3::applyFiltering(const MainConfiguration& currentMainCfg, FolderComparison& folderCmp) { if (folderCmp.size() == 0) return; @@ -1142,7 +1145,7 @@ void FreeFileSync::applyFiltering(const MainConfiguration& currentMainCfg, Folde //############################################################################################################ -std::pair<wxString, int> FreeFileSync::deleteFromGridAndHDPreview( //assemble message containing all files to be deleted +std::pair<wxString, int> ffs3::deleteFromGridAndHDPreview( //assemble message containing all files to be deleted const std::vector<FileSystemObject*>& rowsToDeleteOnLeft, const std::vector<FileSystemObject*>& rowsToDeleteOnRight, const bool deleteOnBothSides) @@ -1219,7 +1222,7 @@ void deleteFromGridAndHDOneSide(std::vector<FileSystemObject*>& rowsToDeleteOneS if (!fsObj->isEmpty<side>()) { if (useRecycleBin) - FreeFileSync::moveToRecycleBin(fsObj->getFullName<side>()); //throw (FileError) + ffs3::moveToRecycleBin(fsObj->getFullName<side>()); //throw (FileError) else { //del directories and symlinks @@ -1227,7 +1230,7 @@ void deleteFromGridAndHDOneSide(std::vector<FileSystemObject*>& rowsToDeleteOneS { virtual void visit(const FileMapping& fileObj) { - FreeFileSync::removeFile(fileObj.getFullName<side>()); + ffs3::removeFile(fileObj.getFullName<side>()); } virtual void visit(const SymLinkMapping& linkObj) @@ -1235,17 +1238,17 @@ void deleteFromGridAndHDOneSide(std::vector<FileSystemObject*>& rowsToDeleteOneS switch (linkObj.getLinkType<side>()) { case LinkDescriptor::TYPE_DIR: - FreeFileSync::removeDirectory(linkObj.getFullName<side>()); + ffs3::removeDirectory(linkObj.getFullName<side>()); break; case LinkDescriptor::TYPE_FILE: - FreeFileSync::removeFile(linkObj.getFullName<side>()); + ffs3::removeFile(linkObj.getFullName<side>()); break; } } virtual void visit(const DirMapping& dirObj) { - FreeFileSync::removeDirectory(dirObj.getFullName<side>()); + ffs3::removeDirectory(dirObj.getFullName<side>()); } } delPerm; fsObj->accept(delPerm); @@ -1259,7 +1262,7 @@ void deleteFromGridAndHDOneSide(std::vector<FileSystemObject*>& rowsToDeleteOneS } catch (const FileError& error) { - DeleteFilesHandler::Response rv = statusHandler->reportError(error.show()); + DeleteFilesHandler::Response rv = statusHandler->reportError(error.msg()); if (rv == DeleteFilesHandler::IGNORE_ERROR) break; @@ -1293,7 +1296,7 @@ private: }; -void FreeFileSync::deleteFromGridAndHD(FolderComparison& folderCmp, //attention: rows will be physically deleted! +void ffs3::deleteFromGridAndHD(FolderComparison& folderCmp, //attention: rows will be physically deleted! std::vector<FileSystemObject*>& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows std::vector<FileSystemObject*>& rowsToDeleteOnRight, //all pointers need to be bound! const bool deleteOnBothSides, @@ -1340,7 +1343,7 @@ void FreeFileSync::deleteFromGridAndHD(FolderComparison& folderCmp, //############################################################################################################ /*Statistical theory: detect daylight saving time (DST) switch by comparing files that exist on both sides (and have same filesizes). If there are "enough" -that have a shift by +-1h then assert that DST switch occured. +that have a shift by +-1h then assert that DST switch occurred. What is "enough" =: N? N should be large enough AND small enough that the following two errors remain small: Error 1: A DST switch is detected although there was none @@ -1393,7 +1396,7 @@ unsigned int getThreshold(const unsigned filesWithSameSizeTotal) } -void FreeFileSync::checkForDSTChange(const FileCompareResult& gridData, +void ffs3::checkForDSTChange(const FileCompareResult& gridData, const std::vector<FolderPair>& directoryPairsFormatted, int& timeShift, wxString& driveName) { diff --git a/algorithm.h b/algorithm.h index cdd278ac..7b96358d 100644 --- a/algorithm.h +++ b/algorithm.h @@ -7,10 +7,10 @@ #ifndef ALGORITHM_H_INCLUDED #define ALGORITHM_H_INCLUDED -#include "fileHierarchy.h" +#include "file_hierarchy.h" -namespace FreeFileSync +namespace ffs3 { class BaseFilter; diff --git a/comparison.cpp b/comparison.cpp index 66bfb0ca..a049c57a 100644 --- a/comparison.cpp +++ b/comparison.cpp @@ -6,7 +6,7 @@ // #include "comparison.h" #include <stdexcept> -#include "shared/globalFunctions.h" +#include "shared/global_func.h" #include <wx/intl.h> #include <wx/timer.h> #include <wx/msgdlg.h> @@ -14,20 +14,23 @@ #include "algorithm.h" #include "shared/util.h" #include <memory> -#include "shared/stringConv.h" -#include "shared/fileHandling.h" -#include "shared/systemFunctions.h" -#include "shared/fileTraverser.h" +#include "shared/string_conv.h" +#include "shared/file_handling.h" +#include "shared/system_func.h" +#include "shared/file_traverser.h" #include "library/filter.h" #include <map> -#include "fileHierarchy.h" +#include "file_hierarchy.h" #include <boost/bind.hpp> #include "library/binary.h" +#include "library/dir_lock.h" -using namespace FreeFileSync; +using namespace ffs3; +const Zstring LOCK_FILE_ENDING = DefaultStr("ffs_lock"); -std::vector<FreeFileSync::FolderPairCfg> FreeFileSync::extractCompareCfg(const MainConfiguration& mainCfg) + +std::vector<ffs3::FolderPairCfg> ffs3::extractCompareCfg(const MainConfiguration& mainCfg) { //merge first and additional pairs std::vector<FolderPairEnh> allPairs; @@ -59,7 +62,7 @@ std::vector<FreeFileSync::FolderPairCfg> FreeFileSync::extractCompareCfg(const M class BaseDirCallback; -class DirCallback : public FreeFileSync::TraverseCallback +class DirCallback : public ffs3::TraverseCallback { public: DirCallback(BaseDirCallback* baseCallback, @@ -139,9 +142,9 @@ void DirCallback::onFile(const DefaultChar* shortName, const Zstring& fullName, //#warning this call is NOT acceptable for Linux! // //Linux: retrieveFileID takes about 50% longer in VM! (avoidable because of redundant stat() call!) -// const Utility::FileID fileIdentifier = details.fileSize >= baseCallback_->detectRenameThreshold_ ? -// Utility::retrieveFileID(fullName) : -// Utility::FileID(); +// const util::FileID fileIdentifier = details.fileSize >= baseCallback_->detectRenameThreshold_ ? +// util::retrieveFileID(fullName) : +// util::FileID(); output_.addSubFile(shortName, FileDescriptor(details.lastWriteTimeRaw, details.fileSize)); @@ -188,7 +191,7 @@ void DirCallback::onSymlink(const DefaultChar* shortName, const Zstring& fullNam TraverseCallback::ReturnValDir DirCallback::onDir(const DefaultChar* shortName, const Zstring& fullName) { - using globalFunctions::FILE_NAME_SEPARATOR; + using common::FILE_NAME_SEPARATOR; //assemble status message (performance optimized) = textScanning + wxT("\"") + fullName + wxT("\"") Zstring statusText = baseCallback_->textScanning; @@ -244,8 +247,11 @@ void DirCallback::onError(const wxString& errorText) void BaseDirCallback::onFile(const DefaultChar* shortName, const Zstring& fullName, const TraverseCallback::FileInfo& details) { - //do not list the database file(s) sync.ffs_db, sync.x64.ffs_db, etc. - if (Zstring(shortName).AfterLast(DefaultChar('.')).cmpFileName(DefaultStr("ffs_db")) == 0) + //do not list the database file(s) sync.ffs_db, sync.x64.ffs_db, etc. or lock files + const Zstring& ending = Zstring(shortName).AfterLast(DefaultChar('.')); //(returns the whole string if ch not found) + + if ( cmpFileName(ending, SYNC_DB_FILE_ENDING) == 0 || + cmpFileName(ending, LOCK_FILE_ENDING) == 0) return; DirCallback::onFile(shortName, fullName, details); @@ -267,7 +273,7 @@ struct DirBufferKey bool operator<(const DirBufferKey& b) const { - const int rv = directoryName.cmpFileName(b.directoryName); + const int rv = cmpFileName(directoryName, b.directoryName); if (rv != 0) return rv < 0; @@ -305,12 +311,12 @@ DirContainer& CompareProcess::DirectoryBuffer::insertIntoBuffer(const DirBufferK DirBufferValue baseContainer(new DirContainer); buffer.insert(std::make_pair(newKey, baseContainer)); - if (FreeFileSync::dirExists(newKey.directoryName)) //folder existence already checked in startCompareProcess(): do not treat as error when arriving here! + if (ffs3::dirExists(newKey.directoryName)) //folder existence already checked in startCompareProcess(): do not treat as error when arriving here! { - std::auto_ptr<TraverseCallback> traverser(new BaseDirCallback(*baseContainer, - handleSymlinks_, - newKey.filter, - statusUpdater_)); + BaseDirCallback traverser(*baseContainer, + handleSymlinks_, + newKey.filter, + statusUpdater_); bool followSymlinks = false; switch (handleSymlinks_) @@ -327,7 +333,7 @@ DirContainer& CompareProcess::DirectoryBuffer::insertIntoBuffer(const DirBufferK } //get all files and folders from directoryPostfixed (and subdirectories) - traverseFolder(newKey.directoryName, followSymlinks, traverser.get()); //exceptions may be thrown! + traverseFolder(newKey.directoryName, followSymlinks, &traverser); //exceptions may be thrown! } return *baseContainer.get(); } @@ -379,11 +385,11 @@ void foldersAreValidForComparison(const std::vector<FolderPairCfg>& folderPairsF //check if folders exist if (!i->leftDirectory.empty()) - while (!FreeFileSync::dirExists(i->leftDirectory)) + while (!ffs3::dirExists(i->leftDirectory)) { ErrorHandler::Response rv = statusUpdater->reportError(wxString(_("Directory does not exist:")) + wxT(" \n") + wxT("\"") + zToWx(i->leftDirectory) + wxT("\"") + wxT("\n\n") + - additionalInfo + wxT(" ") + FreeFileSync::getLastErrorFormatted()); + additionalInfo + wxT(" ") + ffs3::getLastErrorFormatted()); if (rv == ErrorHandler::IGNORE_ERROR) break; else if (rv == ErrorHandler::RETRY) @@ -393,11 +399,11 @@ void foldersAreValidForComparison(const std::vector<FolderPairCfg>& folderPairsF } if (!i->rightDirectory.empty()) - while (!FreeFileSync::dirExists(i->rightDirectory)) + while (!ffs3::dirExists(i->rightDirectory)) { ErrorHandler::Response rv = statusUpdater->reportError(wxString(_("Directory does not exist:")) + wxT("\n") + wxT("\"") + zToWx(i->rightDirectory) + wxT("\"") + wxT("\n\n") + - additionalInfo + wxT(" ") + FreeFileSync::getLastErrorFormatted()); + additionalInfo + wxT(" ") + ffs3::getLastErrorFormatted()); if (rv == ErrorHandler::IGNORE_ERROR) break; else if (rv == ErrorHandler::RETRY) @@ -414,7 +420,7 @@ bool dependencyExists(const std::set<Zstring>& folders, const Zstring& newFolder for (std::set<Zstring>::const_iterator i = folders.begin(); i != folders.end(); ++i) { const size_t commonLen = std::min(newFolder.length(), i->length()); - if (Zstring(newFolder.c_str(), commonLen).cmpFileName(Zstring(i->c_str(), commonLen)) == 0) //test wheter i begins with newFolder or the other way round + if (cmpFileName(Zstring(newFolder.c_str(), commonLen), Zstring(i->c_str(), commonLen)) == 0) //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") + @@ -497,7 +503,7 @@ bool filesHaveSameContentUpdating(const Zstring& filename1, const Zstring& filen } //inform about the (remaining) processed amount of data - handler->updateProcessedData(0, globalFunctions::convertToSigned(totalBytesToCmp) - bytesComparedLast); + handler->updateProcessedData(0, common::convertToSigned(totalBytesToCmp) - bytesComparedLast); return sameContent; } @@ -515,6 +521,18 @@ struct ToBeRemoved }; +std::set<Zstring> getFolders(const std::vector<FolderPairCfg>& directoryPairsFormatted) +{ + std::set<Zstring> output; + for (std::vector<FolderPairCfg>::const_iterator i = directoryPairsFormatted.begin(); i != directoryPairsFormatted.end(); ++i) + { + output.insert(i->leftDirectory); + output.insert(i->rightDirectory); + } + return output; +} + + class RemoveFilteredDirs { public: @@ -526,7 +544,7 @@ public: HierarchyObject::SubDirMapping& subDirs = hierObj.useSubDirs(); //process subdirs recursively - Utility::Proxy<RemoveFilteredDirs> prx(*this); //grant std::for_each access to private parts of this class + util::ProxyForEach<RemoveFilteredDirs> prx(*this); //grant std::for_each access to private parts of this class std::for_each(subDirs.begin(), subDirs.end(), prx); //remove superfluous directories @@ -536,7 +554,7 @@ public: } private: - friend class Utility::Proxy<RemoveFilteredDirs>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! + friend class util::ProxyForEach<RemoveFilteredDirs>; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! void operator()(DirMapping& dirObj) { @@ -550,9 +568,9 @@ private: void formatPair(FolderPairCfg& input) { - //ensure they end with globalFunctions::FILE_NAME_SEPARATOR and replace macros - input.leftDirectory = FreeFileSync::getFormattedDirectoryName(input.leftDirectory); - input.rightDirectory = FreeFileSync::getFormattedDirectoryName(input.rightDirectory); + //ensure they end with common::FILE_NAME_SEPARATOR and replace macros + input.leftDirectory = ffs3::getFormattedDirectoryName(input.leftDirectory); + input.rightDirectory = ffs3::getFormattedDirectoryName(input.rightDirectory); } } @@ -578,7 +596,7 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc const CompareVariant cmpVar, FolderComparison& output) { -#ifndef __WXDEBUG__ +#ifdef NDEBUG wxLogNull noWxLogs; //hide wxWidgets log messages in release build #endif @@ -587,13 +605,13 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc //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 - //format directory pairs: ensure they end with globalFunctions::FILE_NAME_SEPARATOR and replace macros! + //format directory pairs: ensure they end with common::FILE_NAME_SEPARATOR and replace macros! std::vector<FolderPairCfg> directoryPairsFormatted = directoryPairs; std::for_each(directoryPairsFormatted.begin(), directoryPairsFormatted.end(), formatPair); //-------------------some basic checks:------------------------------------------ - //check if folders are valid + //ensure that folders are valid foldersAreValidForComparison(directoryPairsFormatted, statusUpdater); { @@ -608,6 +626,41 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc try { + //place a lock on all directories before traversing (sync.ffs_lock) + std::map<Zstring, DirLock> lockHolder; + + const std::set<Zstring> folderList = getFolders(directoryPairsFormatted); + for (std::set<Zstring>::const_iterator i = folderList.begin(); i != folderList.end(); ++i) + { + class WaitOnLockHandler : public DirLockCallback + { + public: + WaitOnLockHandler(StatusHandler& statusUpdater) : waitHandler(statusUpdater) {} + + virtual void requestUiRefresh() //allowed to throw exceptions + { + waitHandler.requestUiRefresh(); + } + virtual void updateStatusText(const Zstring& text) + { + waitHandler.updateStatusText(text); + } + private: + StatusHandler& waitHandler; + } callback(*statusUpdater); + + try + { + lockHolder.insert(std::make_pair(*i, DirLock(*i + DefaultStr("Sync.") + LOCK_FILE_ENDING, &callback))); + } + catch (const FileError& e) + { + bool dummy = false; //this warning shall not be shown but logged only + statusUpdater->reportWarning(e.msg(), dummy); + } + } + + //traverse/process folders FolderComparison output_tmp; //write to output not before END of process! switch (cmpVar) { @@ -627,11 +680,8 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc const FolderPairCfg& fpCfg = directoryPairsFormatted[j - output_tmp.begin()]; //attention: some filtered directories are still in the comparison result! (see include filter handling!) - if (!fpCfg.filter->isNull()) //let's filter them now... (and remove those that contain excluded elements only) - { - //filters and removes all excluded directories (but keeps those serving as parent folders) - RemoveFilteredDirs(*fpCfg.filter).execute(*j); - } + if (!fpCfg.filter->isNull()) + RemoveFilteredDirs(*fpCfg.filter).execute(*j); //remove all excluded directories (but keeps those serving as parent folders for not excl. elements) //set initial sync-direction class RedetermineCallback : public DeterminationProblem @@ -650,7 +700,14 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc StatusHandler& statusUpdater_; } redetCallback(m_warnings.warningSyncDatabase, *statusUpdater); - FreeFileSync::redetermineSyncDirection(fpCfg.syncConfiguration, *j, &redetCallback); + ffs3::redetermineSyncDirection(fpCfg.syncConfiguration, *j, &redetCallback); + + + //pass locks to directory structure + std::map<Zstring, DirLock>::const_iterator iter = lockHolder.find(j->getBaseDir<LEFT_SIDE>()); + if (iter != lockHolder.end()) j->holdLock<LEFT_SIDE>(iter->second); + iter = lockHolder.find(j->getBaseDir<RIGHT_SIDE>()); + if (iter != lockHolder.end()) j->holdLock<RIGHT_SIDE>(iter->second); } //only if everything was processed correctly output is written to! @@ -795,6 +852,60 @@ private: }; +void CompareProcess::categorizeSymlinkByTime(SymLinkMapping* linkObj) const +{ + //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 + linkObj->getLinkType<LEFT_SIDE>() == linkObj->getLinkType<RIGHT_SIDE>() && +#endif + !linkObj->getTargetPath<LEFT_SIDE>().empty() && + linkObj->getTargetPath<LEFT_SIDE>() == linkObj->getTargetPath<RIGHT_SIDE>()) + { + linkObj->setCategory<SYMLINK_EQUAL>(); + return; + } + + switch (CmpFileTime(ignoreOneHourDifference, fileTimeTolerance).getResult(linkObj->getLastWriteTime<LEFT_SIDE>(), linkObj->getLastWriteTime<RIGHT_SIDE>())) + { + case CmpFileTime::TIME_EQUAL: + 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>()) //may both be empty if following link failed + linkObj->setCategory<SYMLINK_EQUAL>(); + else + { + wxString conflictMsg = wxString(_("Conflict detected:")) + wxT("\n") + _("Symlinks %x have the same date but a different target!"); + conflictMsg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(linkObj->getRelativeName<LEFT_SIDE>()) + wxT("\"")); + linkObj->setCategoryConflict(conflictMsg); + } + break; + + case CmpFileTime::TIME_LEFT_NEWER: + linkObj->setCategory<SYMLINK_LEFT_NEWER>(); + break; + + case CmpFileTime::TIME_RIGHT_NEWER: + linkObj->setCategory<SYMLINK_RIGHT_NEWER>(); + break; + + case CmpFileTime::TIME_LEFT_INVALID: + linkObj->setCategoryConflict(getConflictInvalidDate(linkObj->getFullName<LEFT_SIDE>(), linkObj->getLastWriteTime<LEFT_SIDE>())); + break; + + case CmpFileTime::TIME_RIGHT_INVALID: + linkObj->setCategoryConflict(getConflictInvalidDate(linkObj->getFullName<RIGHT_SIDE>(), linkObj->getLastWriteTime<RIGHT_SIDE>())); + break; + + case CmpFileTime::TIME_DST_CHANGE_WITHIN_HOUR: + linkObj->setCategoryConflict(getConflictChangeWithinHour(*linkObj)); + break; + } +} + + void CompareProcess::compareByTimeSize(const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output) const { output.reserve(output.size() + directoryPairsFormatted.size()); @@ -808,14 +919,17 @@ void CompareProcess::compareByTimeSize(const std::vector<FolderPairCfg>& directo output.push_back(newEntry); //attention: push_back() copies by value!!! performance: append BEFORE writing values into fileCmp! //do basis scan and retrieve files existing on both sides as "compareCandidates" - std::vector<FileMapping*> compareCandidates; - performBaseComparison(output.back(), compareCandidates); + std::vector<FileMapping*> uncategorizedFiles; + std::vector<SymLinkMapping*> uncategorizedLinks; + performBaseComparison(output.back(), uncategorizedFiles, uncategorizedLinks); - //PERF_START; - const CmpFileTime timeCmp(ignoreOneHourDifference, fileTimeTolerance); + //finish symlink categorization + std::for_each(uncategorizedLinks.begin(), uncategorizedLinks.end(), boost::bind(&CompareProcess::categorizeSymlinkByTime, this, _1)); //categorize files that exist on both sides - for (std::vector<FileMapping*>::iterator i = compareCandidates.begin(); i != compareCandidates.end(); ++i) + const CmpFileTime timeCmp(ignoreOneHourDifference, fileTimeTolerance); + + for (std::vector<FileMapping*>::iterator i = uncategorizedFiles.begin(); i != uncategorizedFiles.end(); ++i) { FileMapping* const line = *i; @@ -864,6 +978,20 @@ wxULongLong getBytesToCompare(const std::vector<FileMapping*>& rowsToCompare) } +void CompareProcess::categorizeSymlinkByContent(SymLinkMapping* linkObj) const +{ + //categorize symlinks that exist on both sides + 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>(); + else + linkObj->setCategory<SYMLINK_DIFFERENT>(); +} + + void CompareProcess::compareByContent(const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output) const { //PERF_START; @@ -880,8 +1008,12 @@ void CompareProcess::compareByContent(const std::vector<FolderPairCfg>& director pair->filter); output.push_back(newEntry); //attention: push_back() copies by value!!! performance: append BEFORE writing values into fileCmp! + std::vector<SymLinkMapping*> uncategorizedLinks; //do basis scan and retrieve candidates for binary comparison (files existing on both sides) - performBaseComparison(output.back(), compareCandidates); + performBaseComparison(output.back(), compareCandidates, uncategorizedLinks); + + //finish symlink categorization + std::for_each(uncategorizedLinks.begin(), uncategorizedLinks.end(), boost::bind(&CompareProcess::categorizeSymlinkByContent, this, _1)); } //finish categorization... @@ -905,7 +1037,7 @@ void CompareProcess::compareByContent(const std::vector<FolderPairCfg>& director const wxULongLong bytesTotal = getBytesToCompare(filesToCompareBytewise); statusUpdater->initNewProcess(static_cast<int>(objectsTotal), - globalFunctions::convertToSigned(bytesTotal), + common::convertToSigned(bytesTotal), StatusHandler::PROCESS_COMPARING_CONTENT); //compare files (that have same size) bytewise... @@ -938,7 +1070,7 @@ void CompareProcess::compareByContent(const std::vector<FolderPairCfg>& director } catch (FileError& error) { - ErrorHandler::Response rv = statusUpdater->reportError(error.show()); + ErrorHandler::Response rv = statusUpdater->reportError(error.msg()); if (rv == ErrorHandler::IGNORE_ERROR) { gridline->setCategoryConflict(wxString(_("Conflict detected:")) + wxT("\n") + _("Comparing files by content failed.")); @@ -1118,62 +1250,8 @@ void MergeSides::execute(const DirContainer& leftSide, const DirContainer& right } -void CompareProcess::categorizeSymlink(SymLinkMapping* linkObj) const -{ - //categorize symlinks that exist on both sides - 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>().empty() && - linkObj->getTargetPath<LEFT_SIDE>() == linkObj->getTargetPath<RIGHT_SIDE>()) - - { - linkObj->setCategory<SYMLINK_EQUAL>(); - return; - } - - switch (CmpFileTime(ignoreOneHourDifference, fileTimeTolerance).getResult(linkObj->getLastWriteTime<LEFT_SIDE>(), linkObj->getLastWriteTime<RIGHT_SIDE>())) - { - case CmpFileTime::TIME_EQUAL: - 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>()) //may both be empty if following link failed - linkObj->setCategory<SYMLINK_EQUAL>(); - else - { - wxString conflictMsg = wxString(_("Conflict detected:")) + wxT("\n") + _("Symlinks %x have the same date but a different target!"); - conflictMsg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(linkObj->getRelativeName<LEFT_SIDE>()) + wxT("\"")); - linkObj->setCategoryConflict(conflictMsg); - } - break; - - case CmpFileTime::TIME_LEFT_NEWER: - linkObj->setCategory<SYMLINK_LEFT_NEWER>(); - break; - - case CmpFileTime::TIME_RIGHT_NEWER: - linkObj->setCategory<SYMLINK_RIGHT_NEWER>(); - break; - - case CmpFileTime::TIME_LEFT_INVALID: - linkObj->setCategoryConflict(getConflictInvalidDate(linkObj->getFullName<LEFT_SIDE>(), linkObj->getLastWriteTime<LEFT_SIDE>())); - break; - - case CmpFileTime::TIME_RIGHT_INVALID: - linkObj->setCategoryConflict(getConflictInvalidDate(linkObj->getFullName<RIGHT_SIDE>(), linkObj->getLastWriteTime<RIGHT_SIDE>())); - break; - - case CmpFileTime::TIME_DST_CHANGE_WITHIN_HOUR: - linkObj->setCategoryConflict(getConflictChangeWithinHour(*linkObj)); - break; - } -} - - -void CompareProcess::performBaseComparison(BaseDirMapping& output, std::vector<FileMapping*>& appendUndefined) const +//undefinedFiles and undefinedLinks are appended only! +void CompareProcess::performBaseComparison(BaseDirMapping& output, std::vector<FileMapping*>& undefinedFiles, std::vector<SymLinkMapping*>& undefinedLinks) const { assert(output.useSubDirs(). empty()); assert(output.useSubLinks().empty()); @@ -1196,9 +1274,5 @@ void CompareProcess::performBaseComparison(BaseDirMapping& output, std::vector<F //PERF_STOP; - std::vector<SymLinkMapping*> undefinedLinks; - MergeSides(appendUndefined, undefinedLinks).execute(directoryLeft, directoryRight, output); - - //finish symlink categorization - std::for_each(undefinedLinks.begin(), undefinedLinks.end(), boost::bind(&CompareProcess::categorizeSymlink, this, _1)); + MergeSides(undefinedFiles, undefinedLinks).execute(directoryLeft, directoryRight, output); } diff --git a/comparison.h b/comparison.h index e6d95d40..ac22104c 100644 --- a/comparison.h +++ b/comparison.h @@ -7,13 +7,13 @@ #ifndef COMPARISON_H_INCLUDED #define COMPARISON_H_INCLUDED -#include "fileHierarchy.h" -#include "library/processXml.h" -#include "library/statusHandler.h" +#include "file_hierarchy.h" +#include "library/process_xml.h" +#include "library/status_handler.h" #include "structures.h" -namespace FreeFileSync +namespace ffs3 { struct FolderPairCfg @@ -55,10 +55,11 @@ private: void compareByTimeSize(const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output) const; void compareByContent( const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output) const; - //create comparison result table and fill category except for files existing on both sides - void performBaseComparison(BaseDirMapping& output, std::vector<FileMapping*>& appendUndefined) const; + //create comparison result table and fill category except for files existing on both sides: undefinedFiles and undefinedLinks are appended! + void performBaseComparison(BaseDirMapping& output, std::vector<FileMapping*>& undefinedFiles, std::vector<SymLinkMapping*>& undefinedLinks) const; - void categorizeSymlink(SymLinkMapping* linkObj) const; + void categorizeSymlinkByTime(SymLinkMapping* linkObj) const; + void categorizeSymlinkByContent(SymLinkMapping* linkObj) const; //buffer accesses to the same directories; useful when multiple folder pairs are used class DirectoryBuffer; diff --git a/fileHierarchy.cpp b/file_hierarchy.cpp index 7b0df8cb..e8cb78f0 100644 --- a/fileHierarchy.cpp +++ b/file_hierarchy.cpp @@ -4,10 +4,10 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "fileHierarchy.h" -#include "shared/buildInfo.h" +#include "file_hierarchy.h" +#include "shared/build_info.h" -using namespace FreeFileSync; +using namespace ffs3; namespace { @@ -187,19 +187,19 @@ SyncOperation FileSystemObject::getSyncOperation(const CompareFilesResult cmpRes } -const Zstring& FreeFileSync::getSyncDBFilename() +const Zstring& ffs3::getSyncDBFilename() { //32 and 64 bit for Linux and Windows builds are binary incompatible! So give them 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(Utility::is64BitBuild ? - DefaultStr("sync.x64.ffs_db") : - DefaultStr("sync.ffs_db")); + static Zstring output = Zstring(util::is64BitBuild ? + DefaultStr("sync.x64.") : + DefaultStr("sync.")) + SYNC_DB_FILE_ENDING; #elif defined FFS_LINUX //files beginning with dots are hidden e.g. in Nautilus - static Zstring output(Utility::is64BitBuild ? - DefaultStr(".sync.x64.ffs_db") : - DefaultStr(".sync.ffs_db")); + static Zstring output = Zstring(util::is64BitBuild ? + DefaultStr(".sync.x64.") : + DefaultStr(".sync.")) + SYNC_DB_FILE_ENDING; #endif return output; } diff --git a/fileHierarchy.h b/file_hierarchy.h index aad0a995..2726d2c2 100644 --- a/fileHierarchy.h +++ b/file_hierarchy.h @@ -8,7 +8,7 @@ #define FILEHIERARCHY_H_INCLUDED #include "shared/zstring.h" -#include "shared/systemConstants.h" +#include "shared/system_constants.h" #include <wx/longlong.h> #include <map> #include <set> @@ -17,18 +17,19 @@ #include <boost/shared_ptr.hpp> #include "shared/guid.h" #include "library/filter.h" -#include "shared/fileID.h" +#include "shared/file_id.h" +#include "library/dir_lock.h" class DirectoryBuffer; -namespace Utility //helper class to allow algorithms like std::for_each access to private parts of a predicate class +namespace util //helper class to grant algorithms like std::for_each access to private parts of a predicate class { template <class T> -class Proxy +class ProxyForEach { public: - Proxy(T& target) : target_(target) {} + ProxyForEach(T& target) : target_(target) {} template <class FS> void operator()(FS& obj) const { target_(obj); @@ -40,20 +41,20 @@ private: } -namespace FreeFileSync +namespace ffs3 { struct FileDescriptor { FileDescriptor(const wxLongLong& lastWriteTimeRawIn, const wxULongLong& fileSizeIn) : - //const Utility::FileID fileId) : + //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; //#warning: what about memory consumption?? (assume large comparisons!!?) - //Utility::FileID fileIdentifier; //unique file identifier, optional: may be NULL! + //util::FileID fileIdentifier; //unique file identifier, optional: may be NULL! }; @@ -103,6 +104,7 @@ DirContainer 1 -----> 0..n FileContainer */ //------------------------------------------------------------------ + class DirContainer { public: @@ -111,14 +113,9 @@ public: DirContainer& addSubDir(const Zstring& shortName); //------------------------------------------------------------------ - struct CmpFilename - { - bool operator()(const Zstring& a, const Zstring& b) const; - }; - - typedef std::map<Zstring, DirContainer, CmpFilename> SubDirList; //key: shortName - typedef std::map<Zstring, FileContainer, CmpFilename> SubFileList; // - typedef std::map<Zstring, SymLinkContainer, CmpFilename> SubLinkList; // + typedef std::map<Zstring, DirContainer, LessFilename> SubDirList; //key: shortName + typedef std::map<Zstring, FileContainer, LessFilename> SubFileList; // + typedef std::map<Zstring, SymLinkContainer, LessFilename> SubLinkList; // //------------------------------------------------------------------ //iterator access: std::map is implementation detail! don't expose @@ -176,6 +173,7 @@ private: //------------------------------------------------------------------ //save/load full directory information const Zstring& getSyncDBFilename(); //get short filename of database file +const Zstring SYNC_DB_FILE_ENDING = DefaultStr("ffs_db"); //------------------------------------------------------------------ /* class hierarchy: @@ -211,9 +209,9 @@ public: const FileDescriptor& right); SymLinkMapping& addSubLink(const LinkDescriptor& left, //link exists on both sides - const Zstring& linkNameShort, - CompareSymlinkResult defaultCmpResult, - const LinkDescriptor& right); + const Zstring& linkNameShort, + CompareSymlinkResult defaultCmpResult, + 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 @@ -236,7 +234,7 @@ public: protected: //constructor used by DirMapping HierarchyObject(const HierarchyObject& parent, const Zstring& shortName) : - relNamePf(parent.getRelativeNamePf() + shortName + globalFunctions::FILE_NAME_SEPARATOR), + relNamePf(parent.getRelativeNamePf() + shortName + common::FILE_NAME_SEPARATOR), baseDirLeft(parent.baseDirLeft), baseDirRight(parent.baseDirRight) {} @@ -552,7 +550,13 @@ public: 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; }; @@ -591,6 +595,8 @@ typedef std::vector<BaseDirMapping> FolderComparison; + + //---------------Inline Implementation--------------------------------------------------- inline //inline virtual... admittedly its use may be limited void FileMapping::accept(FSObjectVisitor& visitor) const @@ -637,19 +643,6 @@ HierarchyObject::ObjectID FileSystemObject::getUniqueId() inline -bool DirContainer::CmpFilename::operator()(const Zstring& a, const Zstring& b) const -{ -// //quick check based on string length -// const size_t aLength = a.data.shortName.length(); -// const size_t bLength = b.data.shortName.length(); -// if (aLength != bLength) -// return aLength < bLength; - - return a.cmpFileName(b) < 0; -} - - -inline DirContainer::SubDirList::const_iterator DirContainer::dirBegin() const { return subDirs.begin(); @@ -917,7 +910,7 @@ const Zstring& FileSystemObject::getObjShortName() const inline const Zstring FileSystemObject::getParentRelativeName() const { - return nameBuffer.parentRelNamePf.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); //returns empty string if char not found + return nameBuffer.parentRelNamePf.BeforeLast(common::FILE_NAME_SEPARATOR); //returns empty string if char not found } @@ -1200,6 +1193,22 @@ Zstring BaseDirMapping::getDBFilename() const } +template <> +inline +void BaseDirMapping::holdLock<LEFT_SIDE>(const DirLock& lock) +{ + leftDirLock.reset(new DirLock(lock)); +} + + +template <> +inline +void BaseDirMapping::holdLock<RIGHT_SIDE>(const DirLock& lock) +{ + rightDirLock.reset(new DirLock(lock)); +} + + inline void FileMapping::swap() { @@ -1272,7 +1281,7 @@ void FileMapping::copyToL() { cmpResult = FILE_EQUAL; dataLeft = dataRight; - //Utility::FileID()); //attention! do not copy FileID! It is retained on file renaming only! + //util::FileID()); //attention! do not copy FileID! It is retained on file renaming only! } @@ -1281,7 +1290,7 @@ void FileMapping::copyToR() { cmpResult = FILE_EQUAL; dataRight = dataLeft; - //Utility::FileID()); //attention! do not copy FileID! It is retained on file renaming only! + //util::FileID()); //attention! do not copy FileID! It is retained on file renaming only! } @@ -1423,6 +1432,7 @@ void SymLinkMapping::swap() cmpResult = SYMLINK_LEFT_NEWER; break; case SYMLINK_EQUAL: + case SYMLINK_DIFFERENT: case SYMLINK_CONFLICT: break; } diff --git a/library/binary.cpp b/library/binary.cpp index 8b8fd2ec..d4d35e92 100644 --- a/library/binary.cpp +++ b/library/binary.cpp @@ -5,7 +5,7 @@ // ************************************************************************** // #include "binary.h" -#include "../shared/fileIO.h" +#include "../shared/file_io.h" #include <vector> #include <wx/stopwatch.h> @@ -13,7 +13,7 @@ inline void setMinSize(std::vector<char>& buffer, size_t minSize) { - if (buffer.size() < minSize) //this is similar to reserve(), but be need a "properly initialized" array here + if (buffer.size() < minSize) //this is similar to reserve(), but we need a "properly initialized" array here buffer.resize(minSize); } @@ -66,7 +66,7 @@ private: } -bool FreeFileSync::filesHaveSameContent(const Zstring& filename1, const Zstring& filename2, CompareCallback& callback) +bool ffs3::filesHaveSameContent(const Zstring& filename1, const Zstring& filename2, CompareCallback& callback) { FileInput file1(filename1); //throw FileError() FileInput file2(filename2); //throw FileError() @@ -124,7 +124,7 @@ bool FreeFileSync::filesHaveSameContent(const Zstring& filename1, const Zstring& } while (!file1.eof()); - if (!file1.eof()) //highly unlikely, but theoretically possible! (but then again, not in this context where both files have same size...) + if (!file2.eof()) //highly unlikely, but theoretically possible! (but then again, not in this context where both files have same size...) return false; return true; diff --git a/library/binary.h b/library/binary.h index e33e46bf..bf477116 100644 --- a/library/binary.h +++ b/library/binary.h @@ -9,9 +9,9 @@ #include "../shared/zstring.h" #include <wx/longlong.h> -#include "../shared/fileError.h" +#include "../shared/file_error.h" -namespace FreeFileSync +namespace ffs3 { //callback functionality for status updates while comparing diff --git a/library/CustomGrid.cpp b/library/custom_grid.cpp index a9846f74..2537f529 100644 --- a/library/CustomGrid.cpp +++ b/library/custom_grid.cpp @@ -4,31 +4,31 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "customGrid.h" -#include "../shared/systemConstants.h" +#include "custom_grid.h" +#include "../shared/system_constants.h" #include "resources.h" #include <wx/dc.h> #include "../shared/util.h" -#include "../shared/stringConv.h" +#include "../shared/string_conv.h" #include "resources.h" #include <typeinfo> -#include "../ui/gridView.h" +#include "../ui/grid_view.h" #include "../synchronization.h" -#include "../shared/customTooltip.h" +#include "../shared/custom_tooltip.h" #include <wx/dcclient.h> -#include "iconBuffer.h" +#include "icon_buffer.h" #include <wx/icon.h> #ifdef FFS_WIN #include <wx/timer.h> -#include "statusHandler.h" +#include "status_handler.h" #include <cmath> #elif defined FFS_LINUX #include <gtk/gtk.h> #endif -using namespace FreeFileSync; +using namespace ffs3; const size_t MIN_ROW_COUNT = 15; @@ -271,7 +271,7 @@ protected: switch (colType_) { case xmlAccess::FULL_PATH: - value = zToWx(fileObj.getFullName<side>().BeforeLast(globalFunctions::FILE_NAME_SEPARATOR)); + value = zToWx(fileObj.getFullName<side>().BeforeLast(common::FILE_NAME_SEPARATOR)); break; case xmlAccess::FILENAME: //filename value = zToWx(fileObj.getShortName<side>()); @@ -283,10 +283,10 @@ protected: value = zToWx(fileObj.getBaseDirPf<side>()); break; case xmlAccess::SIZE: //file size - value = FreeFileSync::numberToStringSep(fileObj.getFileSize<side>()); + value = ffs3::numberToStringSep(fileObj.getFileSize<side>()); break; case xmlAccess::DATE: //date - value = FreeFileSync::utcTimeToLocalString(fileObj.getLastWriteTime<side>()); + value = ffs3::utcTimeToLocalString(fileObj.getLastWriteTime<side>()); break; case xmlAccess::EXTENSION: //file extension value = zToWx(fileObj.getExtension<side>()); @@ -299,7 +299,7 @@ protected: switch (colType_) { case xmlAccess::FULL_PATH: - value = zToWx(linkObj.getFullName<side>().BeforeLast(globalFunctions::FILE_NAME_SEPARATOR)); + value = zToWx(linkObj.getFullName<side>().BeforeLast(common::FILE_NAME_SEPARATOR)); break; case xmlAccess::FILENAME: //filename value = zToWx(linkObj.getShortName<side>()); @@ -314,7 +314,7 @@ protected: value = _("<Symlink>"); break; case xmlAccess::DATE: //date - value = FreeFileSync::utcTimeToLocalString(linkObj.getLastWriteTime<side>()); + value = ffs3::utcTimeToLocalString(linkObj.getLastWriteTime<side>()); break; case xmlAccess::EXTENSION: //file extension value = wxEmptyString; @@ -624,7 +624,7 @@ void CustomGrid::initSettings(CustomGridLeft* gridLeft, } -void CustomGrid::release() //release connection to FreeFileSync::GridView +void CustomGrid::release() //release connection to ffs3::GridView { setGridDataTable(NULL); } @@ -1472,7 +1472,7 @@ void CustomGridRim::getIconsToBeLoaded(std::vector<Zstring>& newLoad) //loads al if (!fileName.empty()) { //test if they are already loaded in buffer: - if (FreeFileSync::IconBuffer::getInstance().requestFileIcon(fileName)) + if (ffs3::IconBuffer::getInstance().requestFileIcon(fileName)) { //exists in buffer: refresh Row for (int k = 0; k < totalCols; ++k) @@ -1520,7 +1520,7 @@ void IconUpdater::loadIconsAsynchronously(wxEvent& event) //loads all (not yet) //merge vectors newLoad.insert(newLoad.end(), iconsLeft.begin(), iconsLeft.end()); - FreeFileSync::IconBuffer::getInstance().setWorkload(newLoad); //attention: newLoad is invalidated after this call!!! + ffs3::IconBuffer::getInstance().setWorkload(newLoad); //attention: newLoad is invalidated after this call!!! //event.Skip(); } @@ -2075,7 +2075,7 @@ void CustomGridMiddle::DrawColLabel(wxDC& dc, int col) } -const wxBitmap& FreeFileSync::getSyncOpImage(SyncOperation syncOp) +const wxBitmap& ffs3::getSyncOpImage(SyncOperation syncOp) { switch (syncOp) //evaluate comparison result and sync direction { diff --git a/library/CustomGrid.h b/library/custom_grid.h index 0cace1a9..6c35ffbe 100644 --- a/library/CustomGrid.h +++ b/library/custom_grid.h @@ -9,7 +9,7 @@ #include <vector> #include <wx/grid.h> -#include "processXml.h" +#include "process_xml.h" #include <map> #include <memory> #include <set> @@ -27,7 +27,7 @@ class CustomGridMiddle; class CustomGridRight; -namespace FreeFileSync +namespace ffs3 { class GridView; @@ -60,12 +60,12 @@ public: virtual ~CustomGrid() {} - void initSettings(CustomGridLeft* gridLeft, //create connection with FreeFileSync::GridView + void initSettings(CustomGridLeft* gridLeft, //create connection with ffs3::GridView CustomGridMiddle* gridMiddle, CustomGridRight* gridRight, - const FreeFileSync::GridView* gridDataView); + const ffs3::GridView* gridDataView); - void release(); //release connection to FreeFileSync::GridView + void release(); //release connection to ffs3::GridView std::set<size_t> getAllSelectedRows() const; @@ -89,7 +89,7 @@ protected: virtual void DrawColLabel(wxDC& dc, int col); private: - virtual void setGridDataTable(const FreeFileSync::GridView* gridDataView) = 0; + virtual void setGridDataTable(const ffs3::GridView* gridDataView) = 0; //this method is called when grid view changes: useful for parallel updating of multiple grids void OnPaintGrid(wxEvent& event); @@ -198,7 +198,7 @@ public: virtual bool CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells); private: - virtual void setGridDataTable(const FreeFileSync::GridView* gridDataView); + virtual void setGridDataTable(const ffs3::GridView* gridDataView); virtual const CustomGridTableRim* getGridDataTable() const; //this method is called when grid view changes: useful for parallel updating of multiple grids @@ -221,7 +221,7 @@ public: virtual bool CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells); private: - virtual void setGridDataTable(const FreeFileSync::GridView* gridDataView); + virtual void setGridDataTable(const ffs3::GridView* gridDataView); virtual const CustomGridTableRim* getGridDataTable() const; //this method is called when grid view changes: useful for parallel updating of multiple grids @@ -257,7 +257,7 @@ private: virtual void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh = true); #endif - virtual void setGridDataTable(const FreeFileSync::GridView* gridDataView); + virtual void setGridDataTable(const ffs3::GridView* gridDataView); //this method is called when grid view changes: useful for parallel updating of multiple grids virtual void alignOtherGrids(CustomGrid* gridLeft, CustomGrid* gridMiddle, CustomGrid* gridRight); @@ -331,7 +331,7 @@ extern const wxEventType FFS_SYNC_DIRECTION_EVENT; //define new event type class FFSSyncDirectionEvent : public wxCommandEvent { public: - FFSSyncDirectionEvent(const int from, const int to, const FreeFileSync::SyncDirection dir) : + FFSSyncDirectionEvent(const int from, const int to, const ffs3::SyncDirection dir) : wxCommandEvent(FFS_SYNC_DIRECTION_EVENT), rowFrom(from), rowTo(to), @@ -344,7 +344,7 @@ public: const int rowFrom; const int rowTo; - const FreeFileSync::SyncDirection direction; + const ffs3::SyncDirection direction; }; typedef void (wxEvtHandler::*FFSSyncDirectionEventFunction)(FFSSyncDirectionEvent&); diff --git a/library/dbFile.cpp b/library/db_file.cpp index 1919dd6d..1daa51f5 100644 --- a/library/dbFile.cpp +++ b/library/db_file.cpp @@ -4,25 +4,25 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "dbFile.h" +#include "db_file.h" #include <wx/wfstream.h> #include <wx/zstream.h> -#include "../shared/globalFunctions.h" -#include "../shared/fileError.h" +#include "../shared/global_func.h" +#include "../shared/file_error.h" #include <wx/intl.h> -#include "../shared/stringConv.h" -#include "../shared/fileHandling.h" +#include "../shared/string_conv.h" +#include "../shared/file_handling.h" #include <wx/mstream.h> #include "../shared/serialize.h" -#include "../shared/fileIO.h" +#include "../shared/file_io.h" #include "../shared/loki/ScopeGuard.h" #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" -#include "../shared/longPathPrefix.h" +#include "../shared/long_path_prefix.h" #endif -using namespace FreeFileSync; +using namespace ffs3; namespace @@ -72,7 +72,7 @@ private: -class ReadDirInfo : public Utility::ReadInputStream +class ReadDirInfo : public util::ReadInputStream { public: ReadDirInfo(wxInputStream& stream, const wxString& errorObjName, DirInformation& dirInfo) : ReadInputStream(stream, errorObjName) @@ -112,7 +112,7 @@ private: const unsigned long sizeHigh = readNumberC<unsigned long>(); const unsigned long sizeLow = readNumberC<unsigned long>(); - //const Utility::FileID fileIdentifier(stream_); + //const util::FileID fileIdentifier(stream_); //check(); dirCont.addSubFile(shortName, @@ -144,9 +144,9 @@ private: }; -typedef boost::shared_ptr<std::vector<char> > MemoryStreamPtr; //byte stream representing DirInformation -typedef std::map<Utility::UniqueId, MemoryStreamPtr> DirectoryTOC; //list of streams ordered by a UUID pointing to their partner database -typedef std::pair<Utility::UniqueId, DirectoryTOC> DbStreamData; //header data: UUID representing this database, item data: list of dir-streams +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 /* Example left side right side --------- ---------- @@ -157,7 +157,7 @@ Partner-ID 567 _/ \_ Partner-ID 123 ... ... */ -class ReadFileStream : public Utility::ReadInputStream +class ReadFileStream : public util::ReadInputStream { public: ReadFileStream(wxInputStream& stream, const wxString& filename, DbStreamData& output) : ReadInputStream(stream, filename) @@ -166,7 +166,7 @@ public: throw FileError(wxString(_("Incompatible synchronization database format:")) + wxT(" \n") + wxT("\"") + filename + wxT("\"")); //read DB id - output.first = Utility::UniqueId(getStream()); + output.first = util::UniqueId(getStream()); check(); DirectoryTOC& dbList = output.second; @@ -175,7 +175,7 @@ public: size_t dbCount = readNumberC<size_t>(); //number of databases: one for each sync-pair while (dbCount-- != 0) { - const Utility::UniqueId partnerID(getStream()); //DB id of partner databases + const util::UniqueId partnerID(getStream()); //DB id of partner databases check(); CharArray buffer = readArrayC(); //read db-entry stream (containing DirInformation) @@ -188,7 +188,7 @@ public: DbStreamData loadFile(const Zstring& filename) //throw (FileError) { - if (!FreeFileSync::fileExists(filename)) + if (!ffs3::fileExists(filename)) throw FileError(wxString(_("Initial synchronization:")) + wxT(" \n\n") + _("One of the FreeFileSync database files is not yet existing:") + wxT(" \n") + wxT("\"") + zToWx(filename) + wxT("\"")); @@ -204,7 +204,7 @@ DbStreamData loadFile(const Zstring& filename) //throw (FileError) } -std::pair<DirInfoPtr, DirInfoPtr> FreeFileSync::loadFromDisk(const BaseDirMapping& baseMapping) //throw (FileError) +std::pair<DirInfoPtr, DirInfoPtr> ffs3::loadFromDisk(const BaseDirMapping& baseMapping) //throw (FileError) { const Zstring fileNameLeft = baseMapping.getDBFilename<LEFT_SIDE>(); const Zstring fileNameRight = baseMapping.getDBFilename<RIGHT_SIDE>(); @@ -259,7 +259,7 @@ struct IsNonEmpty template <SelectedSide side> -class SaveDirInfo : public Utility::WriteOutputStream +class SaveDirInfo : public util::WriteOutputStream { public: SaveDirInfo(const BaseDirMapping& baseMapping, const wxString& errorObjName, wxOutputStream& stream) : WriteOutputStream(errorObjName, stream) @@ -273,11 +273,11 @@ public: } private: - friend class Utility::Proxy<SaveDirInfo<side> >; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! + friend class util::ProxyForEach<SaveDirInfo<side> >; //friend declaration of std::for_each is NOT sufficient as implementation is compiler dependent! void execute(const HierarchyObject& hierObj) { - Utility::Proxy<SaveDirInfo<side> > prx(*this); //grant std::for_each access to private parts of this class + 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 std::for_each(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), prx); @@ -327,7 +327,7 @@ private: }; -class WriteFileStream : public Utility::WriteOutputStream +class WriteFileStream : public util::WriteOutputStream { public: WriteFileStream(const DbStreamData& input, const wxString& filename, wxOutputStream& stream) : WriteOutputStream(filename, stream) @@ -373,26 +373,42 @@ void saveFile(const DbStreamData& dbStream, const Zstring& filename) //throw (Fi } //(try to) hide database file #ifdef FFS_WIN - ::SetFileAttributes(FreeFileSync::applyLongPathPrefix(filename).c_str(), FILE_ATTRIBUTE_HIDDEN); + ::SetFileAttributes(ffs3::applyLongPathPrefix(filename).c_str(), FILE_ATTRIBUTE_HIDDEN); #endif } -void FreeFileSync::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileError) +bool entryExisting(const DirectoryTOC& table, const util::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; + + return newValue->size() == iter->second->size() && std::equal(newValue->begin(), newValue->end(), iter->second->begin()); +} + + +void ffs3::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileError) { //transactional behaviour! write to tmp files first const Zstring fileNameLeftTmp = baseMapping.getDBFilename<LEFT_SIDE>() + DefaultStr(".tmp"); const Zstring fileNameRightTmp = baseMapping.getDBFilename<RIGHT_SIDE>() + DefaultStr(".tmp");; //delete old tmp file, if necessary -> throws if deletion fails! - removeFile(fileNameLeftTmp); - removeFile(fileNameRightTmp); + removeFile(fileNameLeftTmp); // + removeFile(fileNameRightTmp); //throw (FileError) //load old database files... //read file data: db ID + mapping of partner-ID/DirInfo-stream: may throw! DbStreamData dbEntriesLeft; - if (FreeFileSync::fileExists(baseMapping.getDBFilename<LEFT_SIDE>())) + if (ffs3::fileExists(baseMapping.getDBFilename<LEFT_SIDE>())) try { dbEntriesLeft = ::loadFile(baseMapping.getDBFilename<LEFT_SIDE>()); @@ -402,7 +418,7 @@ void FreeFileSync::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileEr //read file data: db ID + mapping of partner-ID/DirInfo-stream: may throw! DbStreamData dbEntriesRight; - if (FreeFileSync::fileExists(baseMapping.getDBFilename<RIGHT_SIDE>())) + if (ffs3::fileExists(baseMapping.getDBFilename<RIGHT_SIDE>())) try { dbEntriesRight = ::loadFile(baseMapping.getDBFilename<RIGHT_SIDE>()); @@ -427,6 +443,14 @@ void FreeFileSync::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileEr } //create/update DirInfo-streams + { + const bool updateRequiredLeft = !entryExisting(dbEntriesLeft. second, dbEntriesRight.first, dbEntryLeft); + const bool updateRequiredRight = !entryExisting(dbEntriesRight.second, dbEntriesLeft. first, dbEntryRight); + //some users monitor the *.ffs_db file with RTS => don't touch the file if it isnt't strictly needed + if (!updateRequiredLeft && !updateRequiredRight) + return; + } + dbEntriesLeft.second[dbEntriesRight.first] = dbEntryLeft; dbEntriesRight.second[dbEntriesLeft.first] = dbEntryRight; @@ -454,9 +478,9 @@ void FreeFileSync::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileEr //if there were no write access, creation of temp files would have failed removeFile(baseMapping.getDBFilename<LEFT_SIDE>()); removeFile(baseMapping.getDBFilename<RIGHT_SIDE>()); - renameFile(fileNameLeftTmp, baseMapping.getDBFilename<LEFT_SIDE>()); //throw (FileError); + renameFile(fileNameLeftTmp, baseMapping.getDBFilename<LEFT_SIDE>()); //throw (FileError); renameFile(fileNameRightTmp, baseMapping.getDBFilename<RIGHT_SIDE>()); //throw (FileError); - guardTempFileLeft.Dismiss(); //no need to delete temp file anymore + guardTempFileLeft. Dismiss(); //no need to delete temp file anymore guardTempFileRight.Dismiss(); // } diff --git a/library/dbFile.h b/library/db_file.h index 9fa49c51..8e1f9c94 100644 --- a/library/dbFile.h +++ b/library/db_file.h @@ -7,9 +7,9 @@ #ifndef DBFILE_H_INCLUDED #define DBFILE_H_INCLUDED -#include "../fileHierarchy.h" +#include "../file_hierarchy.h" -namespace FreeFileSync +namespace ffs3 { void saveToDisk(const BaseDirMapping& baseMapping); //throw (FileError) diff --git a/library/detectRenaming.cpp b/library/detect_renaming.cpp index bd25874b..617a3eba 100644 --- a/library/detectRenaming.cpp +++ b/library/detect_renaming.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "detectRenaming.h" +#include "detect_renaming.h" #include <map> #include <vector> #include <boost/bind.hpp> diff --git a/library/detectRenaming.h b/library/detect_renaming.h index ecfa0344..45bdf59d 100644 --- a/library/detectRenaming.h +++ b/library/detect_renaming.h @@ -7,18 +7,18 @@ #ifndef DETECTRENAMING_H_INCLUDED #define DETECTRENAMING_H_INCLUDED -#include "../fileHierarchy.h" +#include "../file_hierarchy.h" //identify a file "create and delete"-operation as a file renaming! -namespace FreeFileSync +namespace ffs3 { typedef FileMapping* CreateOnLeft; typedef FileMapping* DeleteOnLeft; typedef FileMapping* CreateOnRight; typedef FileMapping* DeleteOnRight; -void getRenameCandidates(FreeFileSync::BaseDirMapping& baseMapping, //in +void getRenameCandidates(ffs3::BaseDirMapping& baseMapping, //in std::vector<std::pair<CreateOnLeft, DeleteOnLeft> >& renameOnLeft, //out std::vector<std::pair<CreateOnRight, DeleteOnRight> >& renameOnRight); //out throw()! } diff --git a/library/dir_lock.cpp b/library/dir_lock.cpp new file mode 100644 index 00000000..c5ea37b1 --- /dev/null +++ b/library/dir_lock.cpp @@ -0,0 +1,448 @@ +#include "dir_lock.h" +#include <wx/intl.h> +#include "../shared/string_conv.h" +#include "../shared/system_func.h" +#include <wx/utils.h> +#include <wx/timer.h> +#include <boost/shared_ptr.hpp> +#include <boost/weak_ptr.hpp> +#include <boost/thread.hpp> +#include "../shared/loki/ScopeGuard.h" +#include <wx/msgdlg.h> +#include "../shared/system_constants.h" +#include "../shared/guid.h" +#include "../shared/file_io.h" +#include <utility> + +#ifdef FFS_WIN +#include <wx/msw/wrapwin.h> //includes "windows.h" +#include "../shared/long_path_prefix.h" + +#elif defined FFS_LINUX +#include <sys/stat.h> +#include <cerrno> +#endif + +using namespace ffs3; +using namespace std::rel_ops; + + +namespace +{ +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] +} + +class LifeSigns +{ +public: + LifeSigns(const Zstring& lockfilename) : //throw()!!! siehe SharedDirLock() + lockfilename_(lockfilename.c_str()) //ref-counting structure is used by thread: make deep copy! + { + threadObj = boost::thread(boost::cref(*this)); //localize all thread logic to this class! + } + + ~LifeSigns() + { + threadObj.interrupt(); //thread lifetime is subset of this instances's life + threadObj.join(); + } + + void operator()() const //thread entry + { + try + { + while (true) + { + boost::thread::sleep(boost::get_system_time() + boost::posix_time::milliseconds(EMIT_LIFE_SIGN_INTERVAL)); //interruption point! + + //actual work + emitLifeSign(); //throw () + } + } + 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); + } + } + + void emitLifeSign() const //try to append one byte...; throw() + { + const char buffer[1] = {' '}; + +#ifdef FFS_WIN + const HANDLE fileHandle = ::CreateFile(applyLongPathPrefix(lockfilename_).c_str(), + FILE_APPEND_DATA, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); + if (fileHandle == INVALID_HANDLE_VALUE) + return; + + Loki::ScopeGuard dummy = Loki::MakeGuard(::CloseHandle, fileHandle); + (void)dummy; //silence warning "unused variable" + + const DWORD fpLow = ::SetFilePointer(fileHandle, 0, NULL, FILE_END); + if (fpLow == INVALID_SET_FILE_POINTER) + return; + + DWORD bytesWritten = 0; + ::WriteFile( + fileHandle, //__in HANDLE hFile, + buffer, //__out LPVOID lpBuffer, + 1, //__in DWORD nNumberOfBytesToRead, + &bytesWritten, //__out_opt LPDWORD lpNumberOfBytesWritten, + NULL); //__inout_opt LPOVERLAPPED lpOverlapped + +#elif defined FFS_LINUX + const int fileHandle = ::open(lockfilename_.c_str(), O_WRONLY | O_APPEND); //O_EXCL contains a race condition on NFS file systems: http://linux.die.net/man/2/open + if (fileHandle == -1) + return; + + Loki::ScopeGuard dummy = Loki::MakeGuard(::close, fileHandle); + (void)dummy; //silence warning "unused variable" + + const ssize_t bytesWritten = ::write(fileHandle, buffer, 1); + (void)bytesWritten; +#endif + } + +private: + LifeSigns(const LifeSigns&); //just be sure this ref-counting Zstring doesn't bite + LifeSigns& operator=(const LifeSigns&); // + + boost::thread threadObj; + const Zstring lockfilename_; //used by worker thread only! Not ref-counted! +}; + + +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 + if (!::DeleteFile(applyLongPathPrefix(filename).c_str())) +#elif defined FFS_LINUX + if (::unlink(filename.c_str()) != 0) +#endif + { + wxString errorMessage = wxString(_("Error deleting file:")) + wxT("\n\"") + zToWx(filename) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + getLastErrorFormatted()); + } +} + + +wxULongLong getLockFileSize(const Zstring& filename) //throw (FileError, ErrorNotExisting) +{ +#ifdef FFS_WIN + WIN32_FIND_DATA fileMetaData; + const HANDLE searchHandle = ::FindFirstFile(applyLongPathPrefix(filename).c_str(), &fileMetaData); + if (searchHandle == INVALID_HANDLE_VALUE) + { + const DWORD lastError = ::GetLastError(); + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(filename) + wxT("\"") + + wxT("\n\n") + getLastErrorFormatted(lastError); + if (lastError == ERROR_FILE_NOT_FOUND) + throw ErrorNotExisting(errorMessage); + else + throw FileError(errorMessage); + } + + ::FindClose(searchHandle); + + return wxULongLong(fileMetaData.nFileSizeHigh, fileMetaData.nFileSizeLow); + +#elif defined FFS_LINUX + struct stat fileInfo; + if (::stat(filename.c_str(), &fileInfo) != 0) //follow symbolic links + { + const int lastError = errno; + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(filename) + wxT("\"") + + wxT("\n\n") + getLastErrorFormatted(lastError); + if (lastError == ENOENT) + throw ErrorNotExisting(errorMessage); + else + throw FileError(errorMessage); + } + + return fileInfo.st_size; +#endif +} + + +Zstring deleteAbandonedLockName(const Zstring& lockfilename) +{ + const size_t pos = lockfilename.Find(common::FILE_NAME_SEPARATOR, true); //search from end + + return pos == Zstring::npos ? DefaultStr("Del.") + lockfilename : + + Zstring(lockfilename.c_str(), pos + 1) + //include path separator + DefaultStr("Del.") + + lockfilename.AfterLast(common::FILE_NAME_SEPARATOR); //returns the whole string if ch not found +} + + +void writeLockId(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.) + FileOutputStream lockFile(lockfilename); //throw FileError() + util::UniqueId().toStream(lockFile); // +} + + +util::UniqueId retrieveLockId(const Zstring& lockfilename) //throw (FileError, ErrorNotExisting) +{ + //read GUID from beginning of file + FileInputStream lockFile(lockfilename); //throw (FileError, ErrorNotExisting) + return util::UniqueId(lockFile); // +} + + +void waitOnDirLock(const Zstring& lockfilename, DirLockCallback* callback) //throw (FileError) +{ + Zstring infoMsg; + infoMsg = wxToZ(_("Waiting while directory is locked (%x)...")); + infoMsg.Replace(DefaultStr("%x"), DefaultStr("\"") + lockfilename + DefaultStr("\"")); + if (callback) callback->updateStatusText(infoMsg); + //--------------------------------------------------------------- + try + { + const util::UniqueId lockId = retrieveLockId(lockfilename); //throw (FileError, ErrorNotExisting) + + wxULongLong fileSizeOld; + wxLongLong lockSilentStart = wxGetLocalTimeMillis(); + + while (true) + { + const wxULongLong fileSizeNew = ::getLockFileSize(lockfilename); //throw (FileError, ErrorNotExisting) + const wxLongLong currentTime = wxGetLocalTimeMillis(); + + if (fileSizeNew != fileSizeOld) + { + //received life sign from lock + fileSizeOld = fileSizeNew; + lockSilentStart = currentTime; + } + else if (currentTime - lockSilentStart > DETECT_EXITUS_INTERVAL) + { + DirLock dummy(deleteAbandonedLockName(lockfilename), callback); //throw (FileError) + + //now that the lock is in place check existence again: meanwhile another process may have deleted and created a new lock! + + if (retrieveLockId(lockfilename) != lockId) //throw (FileError, ErrorNotExisting) + return; //another process has placed a new lock, leave scope: the wait for the old lock is technically over... + + if (getLockFileSize(lockfilename) != fileSizeOld) //throw (FileError, ErrorNotExisting) + continue; //belated lifesign + + //--------------------------------------------------------------- + Zstring infoMsg2 = wxToZ(_("Removing abandoned directory lock (%x)...")); + infoMsg2.Replace(DefaultStr("%x"), DefaultStr("\"") + lockfilename + DefaultStr("\"")); + if (callback) callback->updateStatusText(infoMsg2); + //--------------------------------------------------------------- + + ::deleteLockFile(lockfilename); //throw (FileError) + return; + } + + //wait some time... + const size_t GUI_CALLBACK_INTERVAL = 100; + for (size_t i = 0; i < POLL_LIFE_SIGN_INTERVAL / GUI_CALLBACK_INTERVAL; ++i) + { + if (callback) callback->requestUiRefresh(); + wxMilliSleep(GUI_CALLBACK_INTERVAL); + + //show some countdown on abandoned locks + if (callback) + { + if (currentTime - lockSilentStart > EMIT_LIFE_SIGN_INTERVAL) //one signal missed: it's likely this is an abandoned lock: + { + long remainingSeconds = ((DETECT_EXITUS_INTERVAL - (wxGetLocalTimeMillis() - lockSilentStart)) / 1000).GetLo(); + remainingSeconds = std::max(0L, remainingSeconds); + + Zstring remSecMsg = wxToZ(_("%x sec")); + remSecMsg.Replace(DefaultStr("%x"), numberToZstring(remainingSeconds)); + callback->updateStatusText(infoMsg + DefaultStr(" ") + remSecMsg); + } + else + callback->updateStatusText(infoMsg); //emit a message in any case (might clear other one) + } + } + } + + } + catch (const ErrorNotExisting&) + { + return; //what we are waiting for... + } +} + + +void releaseLock(const Zstring& lockfilename) //throw () +{ + try + { + ::deleteLockFile(lockfilename); + } + catch(...) {} +} + + +bool tryLock(const Zstring& lockfilename) //throw (FileError) +{ +#ifdef FFS_WIN + const HANDLE fileHandle = ::CreateFile(applyLongPathPrefix(lockfilename).c_str(), + GENERIC_WRITE, + FILE_SHARE_READ, + NULL, + CREATE_NEW, + FILE_ATTRIBUTE_NORMAL, + NULL); + if (fileHandle == INVALID_HANDLE_VALUE) + { + if (::GetLastError() == ERROR_FILE_EXISTS) + return false; + else + throw FileError(wxString(_("Error setting directory lock:")) + wxT("\n\"") + zToWx(lockfilename) + wxT("\"") + + wxT("\n\n") + getLastErrorFormatted()); + } + ::CloseHandle(fileHandle); + +#elif defined FFS_LINUX + //O_EXCL contains a race condition on NFS file systems: http://linux.die.net/man/2/open + ::umask(0); //important! + const int fileHandle = ::open(lockfilename.c_str(), O_CREAT | O_WRONLY | O_EXCL, S_IRWXU | S_IRWXG | S_IRWXO); + if (fileHandle == -1) + { + if (errno == EEXIST) + return false; + else + throw FileError(wxString(_("Error setting directory lock:")) + wxT("\n\"") + zToWx(lockfilename) + wxT("\"") + + wxT("\n\n") + getLastErrorFormatted()); + } + ::close(fileHandle); +#endif + + Loki::ScopeGuard guardLockFile = Loki::MakeGuard(::releaseLock, lockfilename); + + //write UUID at the beginning of the file: this ID is a universal identifier for this lock (no matter what the path is, considering symlinks ,etc.) + writeLockId(lockfilename); //throw (FileError) + + guardLockFile.Dismiss(); //lockfile created successfully + return true; +} +} + + +class DirLock::SharedDirLock +{ +public: + SharedDirLock(const Zstring& lockfilename, DirLockCallback* callback = NULL) : //throw (FileError) + lockfilename_(lockfilename) + { + while (!::tryLock(lockfilename)) //throw (FileError) + ::waitOnDirLock(lockfilename, callback); // + + emitLifeSigns.reset(new LifeSigns(lockfilename)); //throw()! ownership of lockfile not yet managed! + } + + ~SharedDirLock() + { + emitLifeSigns.reset(); + + ::releaseLock(lockfilename_); //throw () + } + +private: + SharedDirLock(const DirLock&); + SharedDirLock& operator=(const DirLock&); + + const Zstring lockfilename_; + + std::auto_ptr<LifeSigns> emitLifeSigns; +}; + + +class DirLock::LockAdmin //administrate all locks of this process to avoid deadlock by recursion +{ +public: + static LockAdmin& instance() + { + static LockAdmin inst; + return inst; + } + + //create or retrieve a SharedDirLock + boost::shared_ptr<SharedDirLock> retrieve(const Zstring& lockfilename, DirLockCallback* callback) //throw (FileError) + { + //optimization: check if there is an active(!) lock for "lockfilename" + FileToUuidMap::const_iterator iterUuid = fileToUuid.find(lockfilename); + if (iterUuid != fileToUuid.end()) + { + const boost::shared_ptr<SharedDirLock>& activeLock = findActive(iterUuid->second); //returns null-lock if not found + if (activeLock) + return activeLock; //SharedDirLock is still active -> enlarge circle of shared ownership + } + + 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 boost::shared_ptr<SharedDirLock>& activeLock = findActive(lockId); //returns null-lock if not found + if (activeLock) + { + fileToUuid[lockfilename] = lockId; //perf-optimization: update relation + return activeLock; + } + } + catch (const ErrorNotExisting&) {} //let other FileError(s) propagate! + + //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) + + //update registry + fileToUuid[lockfilename] = newLockId; //throw() + uuidToLock[newLockId] = newLock; // + + return newLock; + } + +private: + LockAdmin() {} + + boost::shared_ptr<SharedDirLock> findActive(const util::UniqueId& lockId) //returns null-lock if not found + { + UuidToLockMap::const_iterator iterLock = uuidToLock.find(lockId); + return iterLock != uuidToLock.end() ? + iterLock->second.lock() : //try to get shared_ptr; throw() + boost::shared_ptr<SharedDirLock>(); + } + + 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 + + FileToUuidMap fileToUuid; //lockname |-> UUID; locks can be referenced by a lockfilename or alternatively a UUID + UuidToLockMap uuidToLock; //UUID |-> "shared lock ownership" +}; + + +DirLock::DirLock(const Zstring& lockfilename, DirLockCallback* callback) : //throw (FileError) + sharedLock(LockAdmin::instance().retrieve(lockfilename, callback)) {} diff --git a/library/dir_lock.h b/library/dir_lock.h new file mode 100644 index 00000000..e3b6597c --- /dev/null +++ b/library/dir_lock.h @@ -0,0 +1,35 @@ +#ifndef DIR_LOCK_H_INCLUDED +#define DIR_LOCK_H_INCLUDED + +#include "../shared/zstring.h" +#include "../shared/file_error.h" +#include <boost/shared_ptr.hpp> + + +struct DirLockCallback //while waiting for the lock +{ + virtual ~DirLockCallback() {} + virtual void requestUiRefresh() = 0; //allowed to throw exceptions + virtual void updateStatusText(const Zstring& text) = 0; +}; + +/* +RAII structure to place a directory lock against other FFS processes: + - recursive locking supported, even with alternate lockfile names, e.g. via symlinks, network mounts etc. + - 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 + - race-free (Windows, almost on Linux) +*/ +class DirLock +{ +public: + DirLock(const Zstring& lockfilename, DirLockCallback* callback = NULL); //throw (FileError) + +private: + class LockAdmin; + class SharedDirLock; + boost::shared_ptr<SharedDirLock> sharedLock; +}; + +#endif // DIR_LOCK_H_INCLUDED diff --git a/library/errorLogging.cpp b/library/error_log.cpp index 7e73f005..9936a2ea 100644 --- a/library/errorLogging.cpp +++ b/library/error_log.cpp @@ -4,12 +4,12 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "errorLogging.h" +#include "error_log.h" #include <wx/datetime.h> #include <wx/intl.h> -using FreeFileSync::ErrorLogging; +using ffs3::ErrorLogging; void ErrorLogging::logInfo(const wxString& infoMessage) diff --git a/library/errorLogging.h b/library/error_log.h index 6b27e1c1..dc3ef580 100644 --- a/library/errorLogging.h +++ b/library/error_log.h @@ -12,7 +12,7 @@ class Zstring; -namespace FreeFileSync +namespace ffs3 { class ErrorLogging { diff --git a/library/filter.cpp b/library/filter.cpp index a64c3a31..c4bc69d7 100644 --- a/library/filter.cpp +++ b/library/filter.cpp @@ -10,14 +10,14 @@ #include <set> #include <stdexcept> #include <vector> -#include "../shared/systemConstants.h" +#include "../shared/system_constants.h" #include "../structures.h" #include <boost/bind.hpp> #include "../shared/loki/LokiTypeInfo.h" #include "../shared/serialize.h" -using FreeFileSync::BaseFilter; -using FreeFileSync::NameFilter; +using ffs3::BaseFilter; +using ffs3::NameFilter; //-------------------------------------------------------------------------------------------------- @@ -46,7 +46,7 @@ bool BaseFilter::operator<(const BaseFilter& other) const void BaseFilter::saveFilter(wxOutputStream& stream) const //serialize derived object { //save type information - Utility::writeString(stream, uniqueClassIdentifier()); + util::writeString(stream, uniqueClassIdentifier()); //save actual object save(stream); @@ -56,7 +56,7 @@ void BaseFilter::saveFilter(wxOutputStream& stream) const //serialize derived ob BaseFilter::FilterRef BaseFilter::loadFilter(wxInputStream& stream) { //read type information - const Zstring uniqueClassId = Utility::readString(stream); + const Zstring uniqueClassId = util::readString(stream); //read actual object if (uniqueClassId == DefaultStr("NullFilter")) @@ -83,17 +83,17 @@ void addFilterEntry(const Zstring& filtername, std::set<Zstring>& fileFilter, st //Linux DOES distinguish between upper/lower-case: nothing to do here #endif - static const Zstring sepAsterisk = Zstring() + globalFunctions::FILE_NAME_SEPARATOR + DefaultChar('*'); - static const Zstring sepQuestionMark = Zstring() + globalFunctions::FILE_NAME_SEPARATOR + DefaultChar('?'); - static const Zstring asteriskSep = Zstring(DefaultStr("*")) + globalFunctions::FILE_NAME_SEPARATOR; - static const Zstring questionMarkSep = Zstring(DefaultStr("?")) + globalFunctions::FILE_NAME_SEPARATOR; + static const Zstring sepAsterisk = Zstring() + common::FILE_NAME_SEPARATOR + DefaultChar('*'); + static const Zstring sepQuestionMark = Zstring() + common::FILE_NAME_SEPARATOR + DefaultChar('?'); + static const Zstring asteriskSep = Zstring(DefaultStr("*")) + common::FILE_NAME_SEPARATOR; + static const Zstring questionMarkSep = Zstring(DefaultStr("?")) + common::FILE_NAME_SEPARATOR; //-------------------------------------------------------------------------------------------------- //add some syntactic sugar: handle beginning of filtername - if (filterFormatted.StartsWith(globalFunctions::FILE_NAME_SEPARATOR)) + if (filterFormatted.StartsWith(common::FILE_NAME_SEPARATOR)) { //remove leading separators (keep BEFORE test for Zstring::empty()!) - filterFormatted = filterFormatted.AfterFirst(globalFunctions::FILE_NAME_SEPARATOR); + filterFormatted = filterFormatted.AfterFirst(common::FILE_NAME_SEPARATOR); } else if (filterFormatted.StartsWith(asteriskSep) || // *\abc filterFormatted.StartsWith(questionMarkSep)) // ?\abc @@ -103,9 +103,9 @@ void addFilterEntry(const Zstring& filtername, std::set<Zstring>& fileFilter, st //-------------------------------------------------------------------------------------------------- //even more syntactic sugar: handle end of filtername - if (filterFormatted.EndsWith(globalFunctions::FILE_NAME_SEPARATOR)) + if (filterFormatted.EndsWith(common::FILE_NAME_SEPARATOR)) { - const Zstring candidate = filterFormatted.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring candidate = filterFormatted.BeforeLast(common::FILE_NAME_SEPARATOR); if (!candidate.empty()) directoryFilter.insert(candidate); //only relevant for directory filtering } @@ -115,7 +115,7 @@ void addFilterEntry(const Zstring& filtername, std::set<Zstring>& fileFilter, st fileFilter.insert( filterFormatted); directoryFilter.insert(filterFormatted); - const Zstring candidate = filterFormatted.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring candidate = filterFormatted.BeforeLast(common::FILE_NAME_SEPARATOR); if (!candidate.empty()) directoryFilter.insert(candidate); //only relevant for directory filtering } @@ -251,7 +251,7 @@ bool NameFilter::passDirFilter(const Zstring& relDirname, bool* subObjMightMatch { if (subObjMightMatch) { - const Zstring& subNameBegin = relDirname + globalFunctions::FILE_NAME_SEPARATOR; //const-ref optimization + const Zstring& subNameBegin = relDirname + common::FILE_NAME_SEPARATOR; //const-ref optimization *subObjMightMatch = matchesFilterBegin(subNameBegin, filterFileIn) || //might match a file in subdirectory matchesFilterBegin(subNameBegin, filterFolderIn); //or another subdirectory @@ -300,15 +300,15 @@ Zstring NameFilter::uniqueClassIdentifier() const void NameFilter::save(wxOutputStream& stream) const { - Utility::writeString(stream, includeFilterTmp); - Utility::writeString(stream, excludeFilterTmp); + util::writeString(stream, includeFilterTmp); + util::writeString(stream, excludeFilterTmp); } BaseFilter::FilterRef NameFilter::load(wxInputStream& stream) //"constructor" { - const Zstring include = Utility::readString(stream); - const Zstring exclude = Utility::readString(stream); + const Zstring include = util::readString(stream); + const Zstring exclude = util::readString(stream); return FilterRef(new NameFilter(include, exclude)); } diff --git a/library/filter.h b/library/filter.h index f27e06e6..9497eb8d 100644 --- a/library/filter.h +++ b/library/filter.h @@ -12,7 +12,7 @@ #include <boost/shared_ptr.hpp> #include <wx/stream.h> -namespace FreeFileSync +namespace ffs3 { //------------------------------------------------------------------ /* class hierarchy: diff --git a/library/iconBuffer.cpp b/library/icon_buffer.cpp index fa0b1673..81d14146 100644 --- a/library/iconBuffer.cpp +++ b/library/icon_buffer.cpp @@ -4,15 +4,12 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "iconBuffer.h" -#include <wx/thread.h> -#include <wx/bitmap.h> +#include "icon_buffer.h" #include <wx/msgdlg.h> -#include <wx/icon.h> #include <map> #include <queue> -#include <stdexcept> #include <set> +#include <boost/thread.hpp> #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" @@ -24,20 +21,11 @@ #endif -using FreeFileSync::IconBuffer; +using ffs3::IconBuffer; namespace { -struct CmpFilename -{ - bool operator()(const Zstring& a, const Zstring& b) const - { - return a.cmpFileName(b) < 0; - } -}; - - #ifdef FFS_WIN Zstring getFileExtension(const Zstring& filename) { @@ -52,7 +40,7 @@ Zstring getFileExtension(const Zstring& filename) //test for extension for icons that physically have to be retrieved from disc bool isPriceyExtension(const Zstring& extension) { - static std::set<Zstring, CmpFilename> exceptions; + static std::set<Zstring, LessFilename> exceptions; static bool isInitalized = false; if (!isInitalized) { @@ -182,7 +170,7 @@ IconBuffer::IconHolder IconBuffer::getAssociatedIcon(const Zstring& filename) //bug report: https://sourceforge.net/tracker/?func=detail&aid=2768004&group_id=234430&atid=1093080 //NOTE: CoInitializeEx()/CoUninitialize() implicitly called by wxWidgets on program startup! - ::SHGetFileInfo(filename.c_str(), //FreeFileSync::removeLongPathPrefix(fileName), //::SHGetFileInfo() can't handle \\?\-prefix! + ::SHGetFileInfo(filename.c_str(), //ffs3::removeLongPathPrefix(fileName), //::SHGetFileInfo() can't handle \\?\-prefix! 0, &fileInfo, sizeof(fileInfo), @@ -224,17 +212,19 @@ IconBuffer::IconHolder IconBuffer::getAssociatedIcon(const Zstring& filename) } catch (const Glib::Error&) {} - - //fallback: icon lookup may fail because some icons are currently not present on system - Glib::RefPtr<Gtk::IconTheme> iconTheme = Gtk::IconTheme::get_default(); - if (iconTheme) + try //fallback: icon lookup may fail because some icons are currently not present on system { - Glib::RefPtr<Gdk::Pixbuf> iconPixbuf = iconTheme->load_icon("misc", ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN); - if (!iconPixbuf) - iconPixbuf = iconTheme->load_icon("text-x-generic", ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN); - if (iconPixbuf) - return IconHolder(iconPixbuf->gobj_copy()); //copy and pass icon ownership (may be 0) + Glib::RefPtr<Gtk::IconTheme> iconTheme = Gtk::IconTheme::get_default(); + if (iconTheme) + { + Glib::RefPtr<Gdk::Pixbuf> iconPixbuf = iconTheme->load_icon("misc", ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN); + if (!iconPixbuf) + iconPixbuf = iconTheme->load_icon("text-x-generic", ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN); + if (iconPixbuf) + return IconHolder(iconPixbuf->gobj_copy()); //copy and pass icon ownership (may be 0) + } } + catch (const Glib::Error&) {} //fallback fallback return IconHolder(); @@ -266,15 +256,15 @@ typedef std::vector<DefaultChar> BasicString; //simple thread safe string class: //--------------------------------------------------------------------------------------------------- -class IconBuffer::WorkerThread : public wxThread +class IconBuffer::WorkerThread { public: - WorkerThread(IconBuffer* iconBuff); + WorkerThread(IconBuffer& iconBuff); + ~WorkerThread(); void setWorkload(const std::vector<Zstring>& load); //(re-)set new workload of icons to be retrieved - void quitThread(); - virtual ExitCode Entry(); + void operator()(); //thread entry private: void doWork(); @@ -282,88 +272,69 @@ private: //---------------------- Shared Data ------------------------- typedef BasicString FileName; - wxCriticalSection lockWorkload; //use for locking shared data - std::vector<FileName> workload; //processes last elements of vector first! - bool threadHasMutex; + struct SharedData + { + std::vector<FileName> workload; //processes last elements of vector first! + boost::mutex mutex; + boost::condition_variable condition; //signal event: data for processing available + } shared; //------------------------------------------------------------ - //signal event: icon buffer(main thread) -> worker thread - wxMutex threadIsListening; - wxCondition continueWork; //wake up thread + IconBuffer& iconBuffer; - IconBuffer* iconBuffer; + boost::thread threadObj; }; -IconBuffer::WorkerThread::WorkerThread(IconBuffer* iconBuff) : - wxThread(wxTHREAD_DETACHED), //we're using the thread encapsulated in a static object => use "detached" to avoid main thread waiting for this thread on exit(which in turn would prevent deletion of static object...ect.) => deadlock! - threadHasMutex(false), - threadIsListening(), - continueWork(threadIsListening), +IconBuffer::WorkerThread::WorkerThread(IconBuffer& iconBuff) : iconBuffer(iconBuff) { - if (Create() != wxTHREAD_NO_ERROR) - throw std::runtime_error("Error creating icon buffer worker thread!"); + threadObj = boost::thread(boost::ref(*this)); //localize all thread logic to this class! +} - if (Run() != wxTHREAD_NO_ERROR) - throw std::runtime_error("Error starting icon buffer worker thread!"); - //wait until thread has aquired mutex - bool hasMutex = false; - while (!hasMutex) - { - wxMilliSleep(5); - wxCriticalSectionLocker dummy(lockWorkload); - hasMutex = threadHasMutex; - } //polling -> it's not nice, but works and is no issue +IconBuffer::WorkerThread::~WorkerThread() +{ + setWorkload(std::vector<Zstring>()); //make sure interruption point is always reached! + threadObj.interrupt(); + threadObj.join(); } void IconBuffer::WorkerThread::setWorkload(const std::vector<Zstring>& load) //(re-)set new workload of icons to be retrieved { - wxCriticalSectionLocker dummy(lockWorkload); - - workload.clear(); - for (std::vector<Zstring>::const_iterator i = load.begin(); i != load.end(); ++i) - workload.push_back(FileName(i->c_str(), i->c_str() + i->length() + 1)); //make DEEP COPY from Zstring (include null-termination)! - - if (!workload.empty()) - continueWork.Signal(); //wake thread IF he is waiting -} + { + boost::lock_guard<boost::mutex> dummy(shared.mutex); + shared.workload.clear(); + for (std::vector<Zstring>::const_iterator i = load.begin(); i != load.end(); ++i) + shared.workload.push_back(FileName(i->c_str(), i->c_str() + i->length() + 1)); //make DEEP COPY from Zstring (include null-termination)! + } -void IconBuffer::WorkerThread::quitThread() -{ - setWorkload(std::vector<Zstring>()); - Delete(); //gracefully terminate a detached thread... + shared.condition.notify_one(); + //condition handling, see: http://www.boost.org/doc/libs/1_43_0/doc/html/thread/synchronization.html#thread.synchronization.condvar_ref } -wxThread::ExitCode IconBuffer::WorkerThread::Entry() +void IconBuffer::WorkerThread::operator()() //thread entry { try { - //this lock needs to be called from WITHIN the thread => calling it from constructor(Main thread) would be useless (signal direction: main -> thread) - wxMutexLocker dummy(threadIsListening); //this mutex STAYS locked all the time except of continueWork.Wait()! - { - wxCriticalSectionLocker dummy2(lockWorkload); - threadHasMutex = true; - } - while (true) { - continueWork.WaitTimeout(100); //waiting for continueWork.Signal(); unlocks Mutex "threadIsListening" - - if (TestDestroy()) - return 0; + { + boost::unique_lock<boost::mutex> dummy(shared.mutex); + while(shared.workload.empty()) + shared.condition.wait(dummy); //interruption point! + //shared.condition.timed_wait(dummy, boost::get_system_time() + boost::posix_time::milliseconds(100)); + } - doWork(); + doWork(); //no need to lock the complete method! } } catch (const std::exception& e) //exceptions must be catched per thread { - wxMessageBox(wxString::FromAscii(e.what()), _("An exception occured!"), wxOK | wxICON_ERROR); - return 0; + wxMessageBox(wxString::FromAscii(e.what()), wxString(_("An exception occurred!")) + wxT("(Icon buffer)"), wxOK | wxICON_ERROR); } } @@ -375,14 +346,14 @@ void IconBuffer::WorkerThread::doWork() { Zstring fileName; { - wxCriticalSectionLocker dummy(lockWorkload); - if (workload.empty()) + boost::lock_guard<boost::mutex> dummy(shared.mutex); + if (shared.workload.empty()) break; //enter waiting state - fileName = &workload.back()[0]; //deep copy (includes NULL-termination) - workload.pop_back(); + fileName = &shared.workload.back()[0]; //deep copy (includes NULL-termination) + shared.workload.pop_back(); } - if (iconBuffer->requestFileIcon(fileName)) //thread safety: Zstring okay, won't be reference-counted in requestIcon() + if (iconBuffer.requestFileIcon(fileName)) //thread safety: Zstring okay, won't be reference-counted in requestIcon() continue; //icon already in buffer: skip #ifdef FFS_WIN @@ -390,16 +361,16 @@ void IconBuffer::WorkerThread::doWork() if (isPriceyExtension(extension)) //"pricey" extensions are stored with fullnames and are read from disk, while cheap ones require just the extension { const IconHolder newIcon = IconBuffer::getAssociatedIcon(fileName); - iconBuffer->insertIntoBuffer(fileName, newIcon); + iconBuffer.insertIntoBuffer(fileName, newIcon); } else //no read-access to disk! determine icon by extension { const IconHolder newIcon = IconBuffer::getAssociatedIconByExt(extension); - iconBuffer->insertIntoBuffer(extension, newIcon); + iconBuffer.insertIntoBuffer(extension, newIcon); } #elif defined FFS_LINUX const IconHolder newIcon = IconBuffer::getAssociatedIcon(fileName); - iconBuffer->insertIntoBuffer(fileName, newIcon); + iconBuffer.insertIntoBuffer(fileName, newIcon); #endif } } @@ -419,22 +390,18 @@ IconBuffer& IconBuffer::getInstance() IconBuffer::IconBuffer() : - lockIconDB( new wxCriticalSection), buffer( new IconDB), bufSequence(new IconDbSequence), - worker( new WorkerThread(this)) //might throw exceptions! + worker( new WorkerThread(*this)) //might throw exceptions! {} -IconBuffer::~IconBuffer() -{ - worker->quitThread(); -} +IconBuffer::~IconBuffer() {} //auto_ptr<>: keep destructor non-inline bool IconBuffer::requestFileIcon(const Zstring& fileName, wxIcon* icon) { - wxCriticalSectionLocker dummy(*lockIconDB); + boost::lock_guard<boost::mutex> dummy(lockIconDB); #ifdef FFS_WIN //"pricey" extensions are stored with fullnames and are read from disk, while cheap ones require just the extension @@ -462,7 +429,7 @@ void IconBuffer::setWorkload(const std::vector<Zstring>& load) void IconBuffer::insertIntoBuffer(const DefaultChar* entryName, const IconHolder& icon) //called by worker thread { - wxCriticalSectionLocker dummy(*lockIconDB); + boost::lock_guard<boost::mutex> dummy(lockIconDB); //thread safety, ref-counting: (implicitly) make deep copy! const Zstring fileNameZ = entryName; diff --git a/library/iconBuffer.h b/library/icon_buffer.h index 4a19af3d..9dc1ee55 100644 --- a/library/iconBuffer.h +++ b/library/icon_buffer.h @@ -10,12 +10,11 @@ #include <vector> #include "../shared/zstring.h" #include <memory> +#include <wx/icon.h> +#include <boost/thread/mutex.hpp> -class wxCriticalSection; -class wxIcon; - -namespace FreeFileSync +namespace ffs3 { class IconBuffer @@ -50,13 +49,13 @@ private: static IconHolder getAssociatedIconByExt(const Zstring& extension); //---------------------- Shared Data ------------------------- - std::auto_ptr<wxCriticalSection> lockIconDB; + boost::mutex lockIconDB; std::auto_ptr<IconDB> buffer; //use synchronisation when accessing this! std::auto_ptr<IconDbSequence> bufSequence; //save sequence of buffer entry to delete oldest elements (implicitly shared by sharing Zstring with IconDB!!!) //------------------------------------------------------------ class WorkerThread; - WorkerThread* worker; //detached thread => destroys itself + std::auto_ptr<WorkerThread> worker; }; } diff --git a/library/pch.h b/library/pch.h index 573ae73f..798319c7 100644 --- a/library/pch.h +++ b/library/pch.h @@ -8,7 +8,7 @@ #define FFS_PRECOMPILED_HEADER //pay attention when using this file: might cause issues! -#ifndef __WXDEBUG__ +#ifdef NDEBUG do NOT use in release build! #endif @@ -102,13 +102,10 @@ do NOT use in release build! //Boost #include <boost/shared_ptr.hpp> -//#include <boost/bind.hpp> <- conflict with #include <boost/lambda/bind.hpp> #include <boost/scoped_array.hpp> -#include <boost/lambda/lambda.hpp> -#ifdef FFS_WIN +#ifdef __WXMSW__ #include <wx/msw/wrapwin.h> //includes "windows.h" -#endif //FFS_WIN -//##################################################### +#endif //__WXMSW__ #endif //FFS_PRECOMPILED_HEADER diff --git a/library/processXml.cpp b/library/process_xml.cpp index c9b641fb..e81fb3f9 100644 --- a/library/processXml.cpp +++ b/library/process_xml.cpp @@ -4,15 +4,15 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "processXml.h" -#include "../shared/xmlBase.h" +#include "process_xml.h" +#include "../shared/xml_base.h" #include <wx/intl.h> #include <wx/filefn.h> -#include "../shared/globalFunctions.h" -#include "../shared/standardPaths.h" -#include "../shared/stringConv.h" +#include "../shared/global_func.h" +#include "../shared/standard_paths.h" +#include "../shared/string_conv.h" -using namespace FreeFileSync; +using namespace ffs3; using namespace xmlAccess; //functionally needed!!! @@ -49,7 +49,7 @@ void writeXmlLocalConfig(const FolderPairEnh& enhPair, TiXmlElement& parent); bool writeXmlMainConfig(const MainConfiguration& mainCfg, TiXmlDocument& doc); -void xmlAccess::readGuiConfig(const wxString& filename, xmlAccess::XmlGuiConfig& config) +void xmlAccess::readConfig(const wxString& filename, xmlAccess::XmlGuiConfig& config) { //load XML if (!wxFileExists(filename)) @@ -61,13 +61,13 @@ void xmlAccess::readGuiConfig(const wxString& filename, xmlAccess::XmlGuiConfig& FfsXmlParser parser(doc.RootElement()); parser.readXmlGuiConfig(config); //read GUI layout configuration - if (parser.errorsOccured()) + if (parser.errorsOccurred()) throw XmlError(wxString(_("Error parsing configuration file:")) + wxT("\n\"") + filename + wxT("\"\n\n") + parser.getErrorMessageFormatted(), XmlError::WARNING); } -void xmlAccess::readBatchConfig(const wxString& filename, xmlAccess::XmlBatchConfig& config) +void xmlAccess::readConfig(const wxString& filename, xmlAccess::XmlBatchConfig& config) { //load XML if (!wxFileExists(filename)) @@ -79,13 +79,13 @@ void xmlAccess::readBatchConfig(const wxString& filename, xmlAccess::XmlBatchCon FfsXmlParser parser(doc.RootElement()); parser.readXmlBatchConfig(config); //read GUI layout configuration - if (parser.errorsOccured()) + if (parser.errorsOccurred()) throw XmlError(wxString(_("Error parsing configuration file:")) + wxT("\n\"") + filename + wxT("\"\n\n") + parser.getErrorMessageFormatted(), XmlError::WARNING); } -void xmlAccess::readGlobalSettings(xmlAccess::XmlGlobalSettings& config) +void xmlAccess::readConfig(xmlAccess::XmlGlobalSettings& config) { //load XML if (!wxFileExists(getGlobalConfigFile())) @@ -97,13 +97,13 @@ void xmlAccess::readGlobalSettings(xmlAccess::XmlGlobalSettings& config) FfsXmlParser parser(doc.RootElement()); parser.readXmlGlobalSettings(config); //read GUI layout configuration - if (parser.errorsOccured()) + if (parser.errorsOccurred()) throw XmlError(wxString(_("Error parsing configuration file:")) + wxT("\n\"") + getGlobalConfigFile() + wxT("\"\n\n") + parser.getErrorMessageFormatted(), XmlError::WARNING); } -void xmlAccess::writeGuiConfig(const XmlGuiConfig& outputCfg, const wxString& filename) +void xmlAccess::writeConfig(const XmlGuiConfig& outputCfg, const wxString& filename) { TiXmlDocument doc; getDefaultXmlDocument(XML_GUI_CONFIG, doc); @@ -116,7 +116,7 @@ void xmlAccess::writeGuiConfig(const XmlGuiConfig& outputCfg, const wxString& fi } -void xmlAccess::writeBatchConfig(const XmlBatchConfig& outputCfg, const wxString& filename) +void xmlAccess::writeConfig(const XmlBatchConfig& outputCfg, const wxString& filename) { TiXmlDocument doc; getDefaultXmlDocument(XML_BATCH_CONFIG, doc); @@ -129,7 +129,7 @@ void xmlAccess::writeBatchConfig(const XmlBatchConfig& outputCfg, const wxString } -void xmlAccess::writeGlobalSettings(const XmlGlobalSettings& outputCfg) +void xmlAccess::writeConfig(const XmlGlobalSettings& outputCfg) { TiXmlDocument doc; getDefaultXmlDocument(XML_GLOBAL_SETTINGS, doc); @@ -148,9 +148,9 @@ bool readXmlElement(const std::string& name, const TiXmlElement* parent, Compare if (xmlAccess::readXmlElement(name, parent, dummy)) { if (dummy == "ByTimeAndSize") - output = FreeFileSync::CMP_BY_TIME_SIZE; + output = ffs3::CMP_BY_TIME_SIZE; else if (dummy == "ByContent") - output = FreeFileSync::CMP_BY_CONTENT; + output = ffs3::CMP_BY_CONTENT; else return false; @@ -199,17 +199,17 @@ bool readXmlElement(const std::string& name, const TiXmlElement* parent, xmlAcce } -bool readXmlElement(const std::string& name, const TiXmlElement* parent , FreeFileSync::DeletionPolicy& output) +bool readXmlElement(const std::string& name, const TiXmlElement* parent , ffs3::DeletionPolicy& output) { std::string dummy; if (xmlAccess::readXmlElement(name, parent, dummy)) { if (dummy == "DeletePermanently") - output = FreeFileSync::DELETE_PERMANENTLY; + output = ffs3::DELETE_PERMANENTLY; else if (dummy == "MoveToRecycleBin") - output = FreeFileSync::MOVE_TO_RECYCLE_BIN; + output = ffs3::MOVE_TO_RECYCLE_BIN; else if (dummy == "MoveToCustomDirectory") - output = FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY; + output = ffs3::MOVE_TO_CUSTOM_DIRECTORY; else return false; @@ -219,17 +219,17 @@ bool readXmlElement(const std::string& name, const TiXmlElement* parent , FreeFi } -bool readXmlElement(const std::string& name, const TiXmlElement* parent , FreeFileSync::SymLinkHandling& output) +bool readXmlElement(const std::string& name, const TiXmlElement* parent , ffs3::SymLinkHandling& output) { std::string dummy; if (xmlAccess::readXmlElement(name, parent, dummy)) { if (dummy == "Ignore") - output = FreeFileSync::SYMLINK_IGNORE; + output = ffs3::SYMLINK_IGNORE; else if (dummy == "UseDirectly") - output = FreeFileSync::SYMLINK_USE_DIRECTLY; + output = ffs3::SYMLINK_USE_DIRECTLY; else if (dummy == "FollowLink") - output = FreeFileSync::SYMLINK_FOLLOW_LINK; + output = ffs3::SYMLINK_FOLLOW_LINK; else return false; @@ -318,9 +318,6 @@ void FfsXmlParser::readXmlMainConfig(MainConfiguration& mainCfg) //read compare variant readXmlElementLogging("Variant", cmpSettings, mainCfg.compareVar); - //max. allowed file time deviation - readXmlElementLogging("FileTimeTolerance", cmpSettings, mainCfg.hidden.fileTimeTolerance); - //include symbolic links at all? readXmlElementLogging("HandleSymlinks", cmpSettings, mainCfg.handleSymlinks); @@ -338,12 +335,6 @@ void FfsXmlParser::readXmlMainConfig(MainConfiguration& mainCfg) readXmlElementLogging("Conflict", syncDirections, mainCfg.syncConfiguration.conflict); //########################################################### - const TiXmlElement* syncConfig = hRoot.FirstChild("MainConfig").FirstChild("Synchronization").ToElement(); - - //verify file copying - readXmlElementLogging("VerifyCopiedFiles", syncConfig, mainCfg.hidden.verifyFileCopy); - -//########################################################### const TiXmlElement* miscSettings = hRoot.FirstChild("MainConfig").FirstChild("Miscellaneous").ToElement(); //misc @@ -430,6 +421,15 @@ void FfsXmlParser::readXmlGlobalSettings(xmlAccess::XmlGlobalSettings& outputCfg //copy locked files using VSS readXmlElementLogging("CopyLockedFiles", global, outputCfg.copyLockedFiles); + //file permissions + readXmlElementLogging("CopyFilePermissions", global, outputCfg.copyFilePermissions); + + //verify file copying + readXmlElementLogging("VerifyCopiedFiles", global, outputCfg.verifyFileCopy); + + //max. allowed file time deviation + readXmlElementLogging("FileTimeTolerance", global, outputCfg.fileTimeTolerance); + const TiXmlElement* optionalDialogs = TiXmlHandleConst(getRoot()).FirstChild("Shared").FirstChild("ShowOptionalDialogs").ToElement(); @@ -559,10 +559,10 @@ void addXmlElement(const std::string& name, const CompareVariant variant, TiXmlE { switch (variant) { - case FreeFileSync::CMP_BY_TIME_SIZE: + case ffs3::CMP_BY_TIME_SIZE: xmlAccess::addXmlElement(name, std::string("ByTimeAndSize"), parent); break; - case FreeFileSync::CMP_BY_CONTENT: + case ffs3::CMP_BY_CONTENT: xmlAccess::addXmlElement(name, std::string("ByContent"), parent); break; } @@ -603,34 +603,34 @@ void addXmlElement(const std::string& name, const xmlAccess::OnError value, TiXm } -void addXmlElement(const std::string& name, const FreeFileSync::DeletionPolicy value, TiXmlElement* parent) +void addXmlElement(const std::string& name, const ffs3::DeletionPolicy value, TiXmlElement* parent) { switch (value) { - case FreeFileSync::DELETE_PERMANENTLY: + case ffs3::DELETE_PERMANENTLY: xmlAccess::addXmlElement(name, std::string("DeletePermanently"), parent); break; - case FreeFileSync::MOVE_TO_RECYCLE_BIN: + case ffs3::MOVE_TO_RECYCLE_BIN: xmlAccess::addXmlElement(name, std::string("MoveToRecycleBin"), parent); break; - case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY: + case ffs3::MOVE_TO_CUSTOM_DIRECTORY: xmlAccess::addXmlElement(name, std::string("MoveToCustomDirectory"), parent); break; } } -void addXmlElement(const std::string& name, const FreeFileSync::SymLinkHandling value, TiXmlElement* parent) +void addXmlElement(const std::string& name, const ffs3::SymLinkHandling value, TiXmlElement* parent) { switch (value) { - case FreeFileSync::SYMLINK_IGNORE: + case ffs3::SYMLINK_IGNORE: xmlAccess::addXmlElement(name, std::string("Ignore"), parent); break; - case FreeFileSync::SYMLINK_USE_DIRECTLY: + case ffs3::SYMLINK_USE_DIRECTLY: xmlAccess::addXmlElement(name, std::string("UseDirectly"), parent); break; - case FreeFileSync::SYMLINK_FOLLOW_LINK: + case ffs3::SYMLINK_FOLLOW_LINK: xmlAccess::addXmlElement(name, std::string("FollowLink"), parent); break; } @@ -704,11 +704,6 @@ void writeXmlLocalConfig(const FolderPairEnh& enhPair, TiXmlElement& parent) bool writeXmlMainConfig(const MainConfiguration& mainCfg, TiXmlDocument& doc) { - //reset hidden settings: we don't want implicit behaviour! Hidden settings are loaded but changes are not saved! - MainConfiguration mainCfgLocal = mainCfg; - mainCfgLocal.hidden = HiddenSettings(); - - TiXmlElement* root = doc.RootElement(); if (!root) return false; @@ -720,34 +715,27 @@ bool writeXmlMainConfig(const MainConfiguration& mainCfg, TiXmlDocument& doc) settings->LinkEndChild(cmpSettings); //write compare algorithm - addXmlElement("Variant", mainCfgLocal.compareVar, cmpSettings); - - //max. allowed file time deviation - addXmlElement("FileTimeTolerance", mainCfgLocal.hidden.fileTimeTolerance, cmpSettings); + addXmlElement("Variant", mainCfg.compareVar, cmpSettings); //include symbolic links at all? - addXmlElement("HandleSymlinks", mainCfgLocal.handleSymlinks, cmpSettings); + addXmlElement("HandleSymlinks", mainCfg.handleSymlinks, cmpSettings); //########################################################### TiXmlElement* syncSettings = new TiXmlElement("Synchronization"); settings->LinkEndChild(syncSettings); //write sync configuration - addXmlElement("Automatic", mainCfgLocal.syncConfiguration.automatic, syncSettings); + addXmlElement("Automatic", mainCfg.syncConfiguration.automatic, syncSettings); TiXmlElement* syncDirections = new TiXmlElement("Directions"); syncSettings->LinkEndChild(syncDirections); - addXmlElement("LeftOnly", mainCfgLocal.syncConfiguration.exLeftSideOnly, syncDirections); - addXmlElement("RightOnly", mainCfgLocal.syncConfiguration.exRightSideOnly, syncDirections); - addXmlElement("LeftNewer", mainCfgLocal.syncConfiguration.leftNewer, syncDirections); - addXmlElement("RightNewer", mainCfgLocal.syncConfiguration.rightNewer, syncDirections); - addXmlElement("Different", mainCfgLocal.syncConfiguration.different, syncDirections); - addXmlElement("Conflict", mainCfgLocal.syncConfiguration.conflict, syncDirections); - -//########################################################### - //verify file copying - addXmlElement("VerifyCopiedFiles", mainCfgLocal.hidden.verifyFileCopy, syncSettings); + addXmlElement("LeftOnly", mainCfg.syncConfiguration.exLeftSideOnly, syncDirections); + addXmlElement("RightOnly", mainCfg.syncConfiguration.exRightSideOnly, syncDirections); + addXmlElement("LeftNewer", mainCfg.syncConfiguration.leftNewer, syncDirections); + addXmlElement("RightNewer", mainCfg.syncConfiguration.rightNewer, syncDirections); + addXmlElement("Different", mainCfg.syncConfiguration.different, syncDirections); + addXmlElement("Conflict", mainCfg.syncConfiguration.conflict, syncDirections); //########################################################### TiXmlElement* miscSettings = new TiXmlElement("Miscellaneous"); @@ -757,22 +745,22 @@ bool writeXmlMainConfig(const MainConfiguration& mainCfg, TiXmlDocument& doc) TiXmlElement* filter = new TiXmlElement("Filter"); miscSettings->LinkEndChild(filter); - addXmlElement("Include", mainCfgLocal.globalFilter.includeFilter, filter); - addXmlElement("Exclude", mainCfgLocal.globalFilter.excludeFilter, filter); + addXmlElement("Include", mainCfg.globalFilter.includeFilter, filter); + addXmlElement("Exclude", mainCfg.globalFilter.excludeFilter, filter); //other - addXmlElement("DeletionPolicy", mainCfgLocal.handleDeletion, miscSettings); - addXmlElement("CustomDeletionFolder", mainCfgLocal.customDeletionDirectory, miscSettings); + addXmlElement("DeletionPolicy", mainCfg.handleDeletion, miscSettings); + addXmlElement("CustomDeletionFolder", mainCfg.customDeletionDirectory, miscSettings); //########################################################### TiXmlElement* pairs = new TiXmlElement("FolderPairs"); settings->LinkEndChild(pairs); //write first folder pair - writeXmlLocalConfig(mainCfgLocal.firstPair, *pairs); + writeXmlLocalConfig(mainCfg.firstPair, *pairs); //write additional folder pairs - for (std::vector<FolderPairEnh>::const_iterator i = mainCfgLocal.additionalPairs.begin(); i != mainCfgLocal.additionalPairs.end(); ++i) + for (std::vector<FolderPairEnh>::const_iterator i = mainCfg.additionalPairs.begin(); i != mainCfg.additionalPairs.end(); ++i) writeXmlLocalConfig(*i, *pairs); return true; @@ -842,6 +830,15 @@ bool writeXmlGlobalSettings(const xmlAccess::XmlGlobalSettings& inputCfg, TiXmlD //copy locked files using VSS addXmlElement("CopyLockedFiles", inputCfg.copyLockedFiles, global); + //file permissions + addXmlElement("CopyFilePermissions", inputCfg.copyFilePermissions, global); + + //verify file copying + addXmlElement("VerifyCopiedFiles", inputCfg.verifyFileCopy, global); + + //max. allowed file time deviation + addXmlElement("FileTimeTolerance", inputCfg.fileTimeTolerance, global); + //optional dialogs TiXmlElement* optionalDialogs = new TiXmlElement("ShowOptionalDialogs"); @@ -984,6 +981,12 @@ int xmlAccess::retrieveSystemLanguage() } +wxString xmlAccess::getGlobalConfigFile() +{ + return ffs3::getConfigDir() + wxT("GlobalSettings.xml"); +} + + void xmlAccess::OptionalDialogs::resetDialogs() { warningDependentFolders = true; @@ -998,40 +1001,137 @@ void xmlAccess::OptionalDialogs::resetDialogs() xmlAccess::XmlGuiConfig xmlAccess::convertBatchToGui(const xmlAccess::XmlBatchConfig& batchCfg) { - xmlAccess::XmlGuiConfig output; + XmlGuiConfig output; output.mainCfg = batchCfg.mainCfg; return output; } -void xmlAccess::readGuiOrBatchConfig(const wxString& filename, XmlGuiConfig& config) //throw (xmlAccess::XmlError); +xmlAccess::XmlBatchConfig xmlAccess::convertGuiToBatch(const xmlAccess::XmlGuiConfig& guiCfg) { - if (xmlAccess::getXmlType(filename) != xmlAccess::XML_BATCH_CONFIG) + XmlBatchConfig output; + output.mainCfg = guiCfg.mainCfg; + + if (guiCfg.ignoreErrors) + output.handleError = xmlAccess::ON_ERROR_IGNORE; + else + output.handleError = xmlAccess::ON_ERROR_POPUP; + + return output; +} + + +xmlAccess::MergeType xmlAccess::getMergeType(const std::vector<wxString>& filenames) //throw () +{ + bool guiCfgExists = false; + bool batchCfgExists = false; + + for (std::vector<wxString>::const_iterator i = filenames.begin(); i != filenames.end(); ++i) { - xmlAccess::readGuiConfig(filename, config); - return; + switch (xmlAccess::getXmlType(*i)) //throw() + { + case XML_GUI_CONFIG: + guiCfgExists = true; + break; + + case XML_BATCH_CONFIG: + batchCfgExists = true; + break; + + case XML_GLOBAL_SETTINGS: + case XML_REAL_CONFIG: + case XML_OTHER: + return MERGE_OTHER; + } } - //convert batch config to gui config - xmlAccess::XmlBatchConfig batchCfg; + if (guiCfgExists && batchCfgExists) + return MERGE_GUI_BATCH; + else if (guiCfgExists && !batchCfgExists) + return MERGE_GUI; + else if (!guiCfgExists && batchCfgExists) + return MERGE_BATCH; + else + return MERGE_OTHER; +} + + +namespace +{ +template <class XmlCfg> +XmlCfg loadCfgImpl(const wxString& filename, std::auto_ptr<xmlAccess::XmlError>& exeption) //throw (xmlAccess::XmlError) +{ + XmlCfg cfg; try { - xmlAccess::readBatchConfig(filename, batchCfg); //throw (xmlAccess::XmlError); + xmlAccess::readConfig(filename, cfg); //throw (xmlAccess::XmlError); } catch (const xmlAccess::XmlError& e) { - if (e.getSeverity() != xmlAccess::XmlError::WARNING) + if (e.getSeverity() == xmlAccess::XmlError::FATAL) throw; + else + exeption.reset(new xmlAccess::XmlError(e)); + } + return cfg; +} + + +template <class XmlCfg> +void mergeConfigFilesImpl(const std::vector<wxString>& filenames, XmlCfg& config) //throw (xmlAccess::XmlError) +{ + using namespace xmlAccess; - config = convertBatchToGui(batchCfg); //do work despite parsing errors, then re-throw - throw; // + assert(!filenames.empty()); + if (filenames.empty()) + return; + + std::vector<ffs3::MainConfiguration> mainCfgs; + std::auto_ptr<XmlError> savedException; + + for (std::vector<wxString>::const_iterator i = filenames.begin(); i != filenames.end(); ++i) + { + switch (getXmlType(*i)) + { + case XML_GUI_CONFIG: + mainCfgs.push_back(loadCfgImpl<XmlGuiConfig>(*i, savedException).mainCfg); //throw (xmlAccess::XmlError) + break; + + case XML_BATCH_CONFIG: + mainCfgs.push_back(loadCfgImpl<XmlBatchConfig>(*i, savedException).mainCfg); //throw (xmlAccess::XmlError) + break; + + case XML_GLOBAL_SETTINGS: + case XML_REAL_CONFIG: + case XML_OTHER: + break; + } } - config = convertBatchToGui(batchCfg); + if (mainCfgs.empty()) + throw XmlError(_("Invalid FreeFileSync config file!")); + + try //...to init all non-"mainCfg" settings with first config file + { + xmlAccess::readConfig(filenames[0], config); //throw (xmlAccess::XmlError); + } + catch (...) {} + + config.mainCfg = merge(mainCfgs); + + if (savedException.get()) //"re-throw" exception + throw *savedException; +} } -wxString xmlAccess::getGlobalConfigFile() +void xmlAccess::convertConfig(const std::vector<wxString>& filenames, XmlGuiConfig& config) //throw (xmlAccess::XmlError) +{ + mergeConfigFilesImpl(filenames, config); //throw (xmlAccess::XmlError) +} + + +void xmlAccess::convertConfig(const std::vector<wxString>& filenames, XmlBatchConfig& config) //throw (xmlAccess::XmlError); { - return FreeFileSync::getConfigDir() + wxT("GlobalSettings.xml"); + mergeConfigFilesImpl(filenames, config); //throw (xmlAccess::XmlError) } diff --git a/library/processXml.h b/library/process_xml.h index b46f0163..22465739 100644 --- a/library/processXml.h +++ b/library/process_xml.h @@ -8,7 +8,7 @@ #define PROCESSXML_H_INCLUDED #include "../structures.h" -#include "../shared/xmlError.h" +#include "../shared/xml_error.h" namespace xmlAccess @@ -54,7 +54,7 @@ struct XmlGuiConfig ignoreErrors(false), syncPreviewEnabled(true) {} //initialize values - FreeFileSync::MainConfiguration mainCfg; + ffs3::MainConfiguration mainCfg; bool hideFilteredElements; bool ignoreErrors; //reaction on error situation during synchronization @@ -79,13 +79,14 @@ struct XmlBatchConfig { XmlBatchConfig() : silent(false), handleError(ON_ERROR_POPUP) {} - FreeFileSync::MainConfiguration mainCfg; + ffs3::MainConfiguration mainCfg; bool silent; wxString logFileDirectory; OnError handleError; //reaction on error situation during synchronization }; + int retrieveSystemLanguage(); @@ -117,12 +118,18 @@ struct XmlGlobalSettings XmlGlobalSettings() : programLanguage(retrieveSystemLanguage()), ignoreOneHourDiff(false), - copyLockedFiles(true) - {} + copyLockedFiles(true), + copyFilePermissions(false), + fileTimeTolerance(2), //default 2s: FAT vs NTFS + verifyFileCopy(false) {} int programLanguage; bool ignoreOneHourDiff; //ignore +/- 1 hour due to DST change bool copyLockedFiles; //VSS usage + bool copyFilePermissions; + + size_t fileTimeTolerance; //max. allowed file time deviation + bool verifyFileCopy; //verify copied files OptionalDialogs optDialogs; @@ -229,16 +236,31 @@ bool sortByPositionAndVisibility(const ColumnAttrib& a, const ColumnAttrib& b) return a.position < b.position; } -void readGuiConfig( const wxString& filename, XmlGuiConfig& config); //throw (xmlAccess::XmlError); -void readBatchConfig(const wxString& filename, XmlBatchConfig& config); //throw (xmlAccess::XmlError); -void readGlobalSettings( XmlGlobalSettings& config); //throw (xmlAccess::XmlError); +void readConfig(const wxString& filename, XmlGuiConfig& config); //throw (xmlAccess::XmlError) +void readConfig(const wxString& filename, XmlBatchConfig& config); //throw (xmlAccess::XmlError) +void readConfig( XmlGlobalSettings& config); //throw (xmlAccess::XmlError) + +void writeConfig(const XmlGuiConfig& outputCfg, const wxString& filename); //throw (xmlAccess::XmlError) +void writeConfig(const XmlBatchConfig& outputCfg, const wxString& filename); //throw (xmlAccess::XmlError) +void writeConfig(const XmlGlobalSettings& outputCfg); //throw (xmlAccess::XmlError) + +//config conversion utilities +XmlGuiConfig convertBatchToGui(const XmlBatchConfig& batchCfg); +XmlBatchConfig convertGuiToBatch(const XmlGuiConfig& guiCfg); -void readGuiOrBatchConfig(const wxString& filename, XmlGuiConfig& config); //throw (xmlAccess::XmlError); -XmlGuiConfig convertBatchToGui(const XmlBatchConfig& batchCfg); -void writeGuiConfig( const XmlGuiConfig& outputCfg, const wxString& filename); //throw (xmlAccess::XmlError); -void writeBatchConfig( const XmlBatchConfig& outputCfg, const wxString& filename); //throw (xmlAccess::XmlError); -void writeGlobalSettings(const XmlGlobalSettings& outputCfg); //throw (xmlAccess::XmlError); +//convert (multiple) *.ffs_gui, *.ffs_batch files or combinations of both into target config structure: +enum MergeType +{ + MERGE_GUI, //pure gui config files + MERGE_BATCH, // " batch " + MERGE_GUI_BATCH, //gui and batch files + MERGE_OTHER +}; +MergeType getMergeType(const std::vector<wxString>& filenames); //throw () + +void convertConfig(const std::vector<wxString>& filenames, XmlGuiConfig& config); //throw (xmlAccess::XmlError) +void convertConfig(const std::vector<wxString>& filenames, XmlBatchConfig& config); //throw (xmlAccess::XmlError) } diff --git a/library/resources.cpp b/library/resources.cpp index 2104efc3..637dfea3 100644 --- a/library/resources.cpp +++ b/library/resources.cpp @@ -10,12 +10,12 @@ #include <wx/image.h> #include <wx/icon.h> #include <wx/mstream.h> -#include "../shared/stringConv.h" -#include "../shared/systemConstants.h" +#include "../shared/string_conv.h" +#include "../shared/system_constants.h" #include <memory> -#include "../shared/standardPaths.h" +#include "../shared/standard_paths.h" -using namespace FreeFileSync; +using namespace ffs3; const GlobalResources& GlobalResources::getInstance() @@ -67,7 +67,7 @@ void loadAnimFromZip(wxZipInputStream& zipInput, wxAnimation* animation) void GlobalResources::load() const { - wxFFileInputStream input(FreeFileSync::getResourceDir() + wxT("Resources.dat")); + wxFFileInputStream input(ffs3::getResourceDir() + wxT("Resources.dat")); if (input.IsOk()) //if not... we don't want to react too harsh here { //activate support for .png files diff --git a/library/softFilter.cpp b/library/soft_filter.cpp index 496c185e..18dcfd54 100644 --- a/library/softFilter.cpp +++ b/library/soft_filter.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "softFilter.h" +#include "soft_filter.h" diff --git a/library/softFilter.h b/library/soft_filter.h index 275aa9bd..dc889245 100644 --- a/library/softFilter.h +++ b/library/soft_filter.h @@ -7,7 +7,7 @@ #ifndef SOFTFILTER_H_INCLUDED #define SOFTFILTER_H_INCLUDED -#include "../fileHierarchy.h" +#include "../file_hierarchy.h" #include <wx/timer.h> /* Semantics of SoftFilter: @@ -18,7 +18,7 @@ Semantics of SoftFilter: -> SoftFilter is equivalent to a user temporarily (de-)selecting rows */ -namespace FreeFileSync +namespace ffs3 { class SoftFilter diff --git a/library/statistics.cpp b/library/statistics.cpp index 3a6970d9..d246a7cc 100644 --- a/library/statistics.cpp +++ b/library/statistics.cpp @@ -7,13 +7,13 @@ #include "statistics.h" #include <wx/ffile.h> -#include "../shared/globalFunctions.h" -#include "statusHandler.h" -//#include "../algorithm.h" +#include "../shared/global_func.h" +#include "status_handler.h" #include "../shared/util.h" #include <wx/intl.h> #include <limits> #include <wx/stopwatch.h> +#include "../shared/assert_static.h" RetrieveStatistics::RetrieveStatistics() : @@ -31,7 +31,7 @@ RetrieveStatistics::~RetrieveStatistics() for (std::vector<statEntry>::const_iterator i = data.begin(); i != data.end(); ++i) { - using globalFunctions::numberToString; + using common::numberToString; outputFile.Write(numberToString(i->time)); outputFile.Write(wxT(";")); outputFile.Write(numberToString(i->objects)); @@ -53,42 +53,42 @@ void RetrieveStatistics::writeEntry(const double value, const int objects) //######################################################################################## - +namespace +{ +template <class T> inline -bool isNull(double number) +bool isNull(T number) { - return globalFunctions::abs(number) < std::numeric_limits<double>::epsilon(); + return common::abs(number) <= std::numeric_limits<T>::epsilon(); //epsilon == 0 for integer types, therefore less-equal(!) +} } inline wxString Statistics::formatRemainingTime(double timeInMs) const { -#ifndef _MSC_VER -#warning adapt units "%x sec" -#endif - bool unitSec = true; double remainingTime = timeInMs / 1000; - wxString unit = _(" sec"); + + wxString output = _("%x sec"); if (remainingTime > 55) { unitSec = false; remainingTime /= 60; - unit = _(" min"); + output = _("%x min"); if (remainingTime > 59) { remainingTime /= 60; - unit = _(" hour(s)"); + output = _("%x hour(s)"); if (remainingTime > 23) { remainingTime /= 24; - unit = _(" day(s)"); + output = _("%x day(s)"); } } } - int formattedTime = globalFunctions::round(remainingTime); + int formattedTime = common::round(remainingTime); //reduce precision to 5 seconds if (unitSec && formattedTime % 5 != 0) @@ -100,7 +100,7 @@ wxString Statistics::formatRemainingTime(double timeInMs) const { if (unitSec) { - formattedTime = globalFunctions::round(remainingTime); + formattedTime = common::round(remainingTime); formattedTime -= formattedTime % 5; //"floor" } else @@ -108,8 +108,10 @@ wxString Statistics::formatRemainingTime(double timeInMs) const } remainingTimeLast = formattedTime; - return globalFunctions::numberToString(formattedTime) + unit; - //+ wxT("(") + globalFunctions::numberToWxString(globalFunctions::round(timeInMs / 1000)) + wxT(")"); + output.Replace(wxT("%x"), common::numberToString(formattedTime)); + + return output; + //+ wxT("(") + common::numberToWxString(common::round(timeInMs / 1000)) + wxT(")"); } @@ -191,7 +193,7 @@ wxString Statistics::getBytesPerSecond() const const double dataDelta = measurements.back().data - frontElement->data; if (!isNull(timeDelta)) - return FreeFileSync::formatFilesizeToShortString(dataDelta * 1000 / timeDelta) + _("/sec"); + return ffs3::formatFilesizeToShortString(dataDelta * 1000 / timeDelta) + _("/sec"); } return wxT("-"); //fallback diff --git a/library/statistics.h b/library/statistics.h index ba9d8afb..26e8c196 100644 --- a/library/statistics.h +++ b/library/statistics.h @@ -11,6 +11,8 @@ #include <list> #include <memory> #include <wx/defs.h> + + #include <wx/string.h> class wxStopWatch; diff --git a/library/statusHandler.cpp b/library/status_handler.cpp index 7ac46134..0f953a32 100644 --- a/library/statusHandler.cpp +++ b/library/status_handler.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "statusHandler.h" +#include "status_handler.h" #include <wx/app.h> #include <wx/timer.h> diff --git a/library/statusHandler.h b/library/status_handler.h index a1226c54..a1226c54 100644 --- a/library/statusHandler.h +++ b/library/status_handler.h diff --git a/resource.rc b/resource.rc index ce3074e7..4abdfbaa 100644 --- a/resource.rc +++ b/resource.rc @@ -19,7 +19,7 @@ BEGIN BLOCK "FFFF04B0" BEGIN VALUE "ProductVersion", VER_FREEFILESYNC_STR - VALUE "FileDescription", "Open Source Synchronization Software\0" + VALUE "FileDescription", "FreeFileSync - Open Source Synchronization Software\0" VALUE "LegalCopyright", "(c) 2008 - 2010 ZenJu\0" VALUE "ProductName", "FreeFileSync\0" END diff --git a/shared/IFileOperation/FileOperation_Vista.vcxproj b/shared/IFileOperation/FileOperation_Vista.vcxproj index 1cbb4a28..9f9a9c28 100644 --- a/shared/IFileOperation/FileOperation_Vista.vcxproj +++ b/shared/IFileOperation/FileOperation_Vista.vcxproj @@ -209,7 +209,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="dllmain.cpp"> + <ClCompile Include="dll_main.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> </PrecompiledHeader> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> @@ -223,10 +223,10 @@ </PrecompiledHeader> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged> </ClCompile> - <ClCompile Include="fileOp.cpp" /> + <ClCompile Include="file_op.cpp" /> </ItemGroup> <ItemGroup> - <ClInclude Include="fileOp.h" /> + <ClInclude Include="file_op.h" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> diff --git a/shared/IFileOperation/dllmain.cpp b/shared/IFileOperation/dll_main.cpp index 8dae897a..142e26a2 100644 --- a/shared/IFileOperation/dllmain.cpp +++ b/shared/IFileOperation/dll_main.cpp @@ -8,20 +8,18 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> - -BOOL APIENTRY DllMain( HMODULE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved - ) +//optional: add init/teardown logic here +BOOL APIENTRY DllMain(HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) { - switch (ul_reason_for_call) + switch (fdwReason) { case DLL_PROCESS_ATTACH: + case DLL_PROCESS_DETACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: break; } return TRUE; } - diff --git a/shared/IFileOperation/fileOp.cpp b/shared/IFileOperation/file_op.cpp index 761ec06d..f37a2e66 100644 --- a/shared/IFileOperation/fileOp.cpp +++ b/shared/IFileOperation/file_op.cpp @@ -4,7 +4,9 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "fileOp.h" +#include "file_op.h" +#include "../com_ptr.h" +#include "../com_error.h" #define WIN32_LEAN_AND_MEAN #include "windows.h" @@ -14,7 +16,7 @@ #include <algorithm> #include <string> #include <cstdio> -#include <comdef.h> +#include <comdef.h> void writeString(const std::wstring& input, wchar_t* output, size_t outputBufferLen) @@ -25,44 +27,6 @@ void writeString(const std::wstring& input, wchar_t* output, size_t outputBuffer } -std::wstring numberToHexString(long number) -{ - wchar_t result[100]; - swprintf(result, 100, L"0x%08x", number); - return std::wstring(result); -} - - -std::wstring generateErrorMsg(const std::wstring& input, HRESULT hr) -{ - std::wstring output(input); - output += L" ("; - output += numberToHexString(hr); - output += L": "; - output += _com_error(hr).ErrorMessage(); - output += L")"; - return output; -} - - -//IShellItem resource management -template <class T> -class ReleaseAtExit -{ -public: - ReleaseAtExit(T*& item) : item_(item) {} - ~ReleaseAtExit() - { - if (item_ != NULL) - item_->Release(); - } -private: - ReleaseAtExit(const ReleaseAtExit&); - ReleaseAtExit& operator=(const ReleaseAtExit&); - T*& item_; -}; - - namespace FileOp { std::wstring lastErrorMessage; @@ -72,15 +36,16 @@ std::wstring lastErrorMessage; bool FileOp::moveToRecycleBin(const wchar_t* fileNames[], size_t fileNo) //size of fileNames array { + using Util::ComPtr; + using Util::generateErrorMsg; HRESULT hr; // Create the IFileOperation interface - IFileOperation* pfo = NULL; - ReleaseAtExit<IFileOperation> dummy(pfo); + ComPtr<IFileOperation> fileOp; hr = CoCreateInstance(CLSID_FileOperation, NULL, CLSCTX_ALL, - IID_PPV_ARGS(&pfo)); + IID_PPV_ARGS(fileOp.init())); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"CoCreateInstance\".", hr); @@ -91,10 +56,10 @@ bool FileOp::moveToRecycleBin(const wchar_t* fileNames[], // from being shown to the user during the // operation. This includes error, confirmation // and progress dialogs. - hr = pfo->SetOperationFlags(FOF_ALLOWUNDO | - FOF_NOCONFIRMATION | - FOF_SILENT | - FOF_NOERRORUI); + hr = fileOp->SetOperationFlags(FOF_ALLOWUNDO | + FOF_NOCONFIRMATION | + FOF_SILENT | + FOF_NOERRORUI); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"SetOperationFlags\".", hr); @@ -104,11 +69,10 @@ bool FileOp::moveToRecycleBin(const wchar_t* fileNames[], for (size_t i = 0; i < fileNo; ++i) { //create file/folder item object - IShellItem* psiFile = NULL; - ReleaseAtExit<IShellItem> dummy2(psiFile); + ComPtr<IShellItem> psiFile; hr = SHCreateItemFromParsingName(fileNames[i], NULL, - IID_PPV_ARGS(&psiFile)); + IID_PPV_ARGS(psiFile.init())); if (FAILED(hr)) { std::wstring message(L"Error calling \"SHCreateItemFromParsingName\" for file:\n"); @@ -118,7 +82,7 @@ bool FileOp::moveToRecycleBin(const wchar_t* fileNames[], return false; } - hr = pfo->DeleteItem(psiFile, NULL); + hr = fileOp->DeleteItem(psiFile.get(), NULL); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"DeleteItem\".", hr); @@ -127,7 +91,7 @@ bool FileOp::moveToRecycleBin(const wchar_t* fileNames[], } //perform actual operations - hr = pfo->PerformOperations(); + hr = fileOp->PerformOperations(); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"PerformOperations\".", hr); @@ -136,7 +100,7 @@ bool FileOp::moveToRecycleBin(const wchar_t* fileNames[], //check if errors occured: if FOFX_EARLYFAILURE is not used, PerformOperations() can return with success despite errors! BOOL pfAnyOperationsAborted = FALSE; - hr = pfo->GetAnyOperationsAborted(&pfAnyOperationsAborted); + hr = fileOp->GetAnyOperationsAborted(&pfAnyOperationsAborted); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"GetAnyOperationsAborted\".", hr); @@ -156,15 +120,17 @@ bool FileOp::moveToRecycleBin(const wchar_t* fileNames[], bool FileOp::copyFile(const wchar_t* sourceFile, const wchar_t* targetFile) { + using Util::ComPtr; + using Util::generateErrorMsg; + HRESULT hr; // Create the IFileOperation interface - IFileOperation* pfo = NULL; - ReleaseAtExit<IFileOperation> dummy(pfo); + ComPtr<IFileOperation> fileOp; hr = CoCreateInstance(CLSID_FileOperation, NULL, CLSCTX_ALL, - IID_PPV_ARGS(&pfo)); + IID_PPV_ARGS(fileOp.init())); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"CoCreateInstance\".", hr); @@ -175,10 +141,10 @@ bool FileOp::copyFile(const wchar_t* sourceFile, // from being shown to the user during the // operation. This includes error, confirmation // and progress dialogs. - hr = pfo->SetOperationFlags(FOF_NOCONFIRMATION | - FOF_SILENT | - FOFX_EARLYFAILURE | - FOF_NOERRORUI); + hr = fileOp->SetOperationFlags(FOF_NOCONFIRMATION | + FOF_SILENT | + FOFX_EARLYFAILURE | + FOF_NOERRORUI); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"SetOperationFlags\".", hr); @@ -186,11 +152,10 @@ bool FileOp::copyFile(const wchar_t* sourceFile, } //create source object - IShellItem* psiSourceFile = NULL; - ReleaseAtExit<IShellItem> dummy2(psiSourceFile); + ComPtr<IShellItem> psiSourceFile; hr = SHCreateItemFromParsingName(sourceFile, NULL, - IID_PPV_ARGS(&psiSourceFile)); + IID_PPV_ARGS(psiSourceFile.init())); if (FAILED(hr)) { std::wstring message(L"Error calling \"SHCreateItemFromParsingName\" for file:\n"); @@ -199,7 +164,7 @@ bool FileOp::copyFile(const wchar_t* sourceFile, return false; } - const size_t pos = std::wstring(targetFile).find_last_of(L'\\'); + const size_t pos = std::wstring(targetFile).find_last_of(L'\\'); if (pos == std::wstring::npos) { lastErrorMessage = L"Target filename does not contain a path separator."; @@ -210,11 +175,10 @@ bool FileOp::copyFile(const wchar_t* sourceFile, const std::wstring targetFileNameShort = targetFile + pos + 1; //create target folder object - IShellItem* psiTargetFolder = NULL; - ReleaseAtExit<IShellItem> dummy3(psiTargetFolder); - hr = SHCreateItemFromParsingName(targetFolder.c_str(), + ComPtr<IShellItem> psiTargetFolder; + hr = SHCreateItemFromParsingName(targetFolder.c_str(), NULL, - IID_PPV_ARGS(&psiTargetFolder)); + IID_PPV_ARGS(psiTargetFolder.init())); if (FAILED(hr)) { std::wstring message(L"Error calling \"SHCreateItemFromParsingName\" for folder:\n"); @@ -224,7 +188,7 @@ bool FileOp::copyFile(const wchar_t* sourceFile, } //schedule file copy operation - hr = pfo->CopyItem(psiSourceFile, psiTargetFolder, targetFileNameShort.c_str(), NULL); + hr = fileOp->CopyItem(psiSourceFile.get(), psiTargetFolder.get(), targetFileNameShort.c_str(), NULL); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"CopyItem\".", hr); @@ -232,7 +196,7 @@ bool FileOp::copyFile(const wchar_t* sourceFile, } //perform actual operations - hr = pfo->PerformOperations(); + hr = fileOp->PerformOperations(); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"PerformOperations\".", hr); @@ -241,14 +205,13 @@ bool FileOp::copyFile(const wchar_t* sourceFile, //check if errors occured: if FOFX_EARLYFAILURE is not used, PerformOperations() can return with success despite errors! BOOL pfAnyOperationsAborted = FALSE; - hr = pfo->GetAnyOperationsAborted(&pfAnyOperationsAborted); + hr = fileOp->GetAnyOperationsAborted(&pfAnyOperationsAborted); if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"GetAnyOperationsAborted\".", hr); return false; } - if (pfAnyOperationsAborted == TRUE) { lastErrorMessage = L"Operation did not complete successfully."; diff --git a/shared/IFileOperation/fileOp.h b/shared/IFileOperation/file_op.h index 8fa6a75b..8fa6a75b 100644 --- a/shared/IFileOperation/fileOp.h +++ b/shared/IFileOperation/file_op.h diff --git a/shared/ShadowCopy/Shadow_2003.vcxproj b/shared/ShadowCopy/Shadow_2003.vcxproj index b7d31ae4..5351cc1d 100644 --- a/shared/ShadowCopy/Shadow_2003.vcxproj +++ b/shared/ShadowCopy/Shadow_2003.vcxproj @@ -210,7 +210,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="dllmain.cpp"> + <ClCompile Include="dll_main.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> </PrecompiledHeader> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> diff --git a/shared/ShadowCopy/Shadow_XP.vcxproj b/shared/ShadowCopy/Shadow_XP.vcxproj index 5c531a27..d096297a 100644 --- a/shared/ShadowCopy/Shadow_XP.vcxproj +++ b/shared/ShadowCopy/Shadow_XP.vcxproj @@ -211,7 +211,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="dllmain.cpp"> + <ClCompile Include="dll_main.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> </PrecompiledHeader> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> diff --git a/shared/ShadowCopy/dllmain.cpp b/shared/ShadowCopy/dll_main.cpp index 8dae897a..142e26a2 100644 --- a/shared/ShadowCopy/dllmain.cpp +++ b/shared/ShadowCopy/dll_main.cpp @@ -8,20 +8,18 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> - -BOOL APIENTRY DllMain( HMODULE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved - ) +//optional: add init/teardown logic here +BOOL APIENTRY DllMain(HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) { - switch (ul_reason_for_call) + switch (fdwReason) { case DLL_PROCESS_ATTACH: + case DLL_PROCESS_DETACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: break; } return TRUE; } - diff --git a/shared/ShadowCopy/shadow.cpp b/shared/ShadowCopy/shadow.cpp index 1fb78769..2e739146 100644 --- a/shared/ShadowCopy/shadow.cpp +++ b/shared/ShadowCopy/shadow.cpp @@ -8,6 +8,8 @@ #define WIN32_LEAN_AND_MEAN #include "windows.h" +#include "../com_ptr.h" +#include "../com_error.h" #ifdef USE_SHADOW_XP #include "xp/inc/vss.h" @@ -15,7 +17,7 @@ #include "xp/inc/vsbackup.h" #elif defined USE_SHADOW_2003 -#include "Server 2003/inc/vss.h" +#include "Server 2003/inc/vss.h" #include "Server 2003/inc/vswriter.h" #include "Server 2003/inc/vsbackup.h" #else @@ -30,79 +32,37 @@ adapt! //typedef GUID VSS_ID; - -//IShellItem resource management: better handled with boost::shared_ptr or CComPtr, but we avoid dependency with boost and ATL in this case -template <class T> -class ItemHolder -{ -public: - ItemHolder(T* item) : item_(item) {} - ~ItemHolder() - { - if (item_) - item_->Release(); - } - - T* release() -{ -T* rv = item_; -item_ = 0; - return rv; - } - - T* operator->() const -{ - return item_; - } -private: - ItemHolder(const ItemHolder&); - ItemHolder& operator=(const ItemHolder&); - T* item_; -}; - - void writeString(const wchar_t* input, wchar_t* output, unsigned int outputBufferLen) { const size_t newSize = min(wcslen(input) + 1, outputBufferLen); //including null-termination memcpy(output, input, newSize * sizeof(wchar_t)); - output[newSize-1] = 0; //if output buffer is too small... -} - - -std::wstring numberToHexString(const long number) -{ - wchar_t result[100]; - swprintf(result, 100, L"0x%08x", number); - return std::wstring(result); + output[newSize-1] = 0; //if output buffer is too small... } void writeErrorMsg(const wchar_t* input, HRESULT hr, wchar_t* output, unsigned int outputBufferLen) { - std::wstring formattedMsg(input); - formattedMsg += L" ("; - formattedMsg += numberToHexString(hr); - formattedMsg += L": "; - formattedMsg += _com_error(hr).ErrorMessage(); - formattedMsg += L")"; - - writeString(formattedMsg.c_str(), output, outputBufferLen); + writeString(Util::generateErrorMsg(input, hr).c_str(), output, outputBufferLen); } -bool Shadow::createShadowCopy(const wchar_t* volumeName, + +bool shadow::createShadowCopy(const wchar_t* volumeName, wchar_t* shadowVolName, unsigned int shadowBufferLen, void** backupHandle, wchar_t* errorMessage, unsigned int errorBufferLen) { + using Util::ComPtr; + using Util::generateErrorMsg; + //MessageBox(0, L"backup err", L"", 0); */ *backupHandle = NULL; HRESULT hr = NULL; - IVssBackupComponents* pBackupPtr = NULL; - if (FAILED(hr = CreateVssBackupComponents(&pBackupPtr))) + ComPtr<IVssBackupComponents> backupComp; + if (FAILED(hr = CreateVssBackupComponents(backupComp.init()))) { if (hr == E_ACCESSDENIED) writeErrorMsg(L"The caller does not have sufficient backup privileges or is not an administrator.", hr, errorMessage, errorBufferLen); @@ -111,97 +71,96 @@ bool Shadow::createShadowCopy(const wchar_t* volumeName, return false; } - ItemHolder<IVssBackupComponents> pBackupComponents(pBackupPtr); - - if (FAILED(hr = pBackupComponents->InitializeForBackup())) + if (FAILED(hr = backupComp->InitializeForBackup())) { writeErrorMsg(L"Error calling \"InitializeForBackup\".", hr, errorMessage, errorBufferLen); return false; } - - if (FAILED(hr = pBackupComponents->SetBackupState(false, false, VSS_BT_FULL))) + if (FAILED(hr = backupComp->SetBackupState(false, false, VSS_BT_FULL))) { writeErrorMsg(L"Error calling \"SetBackupState\".", hr, errorMessage, errorBufferLen); return false; } - - IVssAsync* pWriteMetaData = NULL; - if (FAILED(hr = pBackupComponents->GatherWriterMetadata( &pWriteMetaData ))) - { //this can happen if XP-version of VSS is used on Windows Vista (which needs at least VSS-Server2003 build) + ComPtr<IVssAsync> vssWriters; + if (FAILED(hr = backupComp->GatherWriterMetadata(vssWriters.init()))) + { + //this can happen if XP-version of VSS is used on Windows Vista (which needs at least VSS-Server2003 build) writeErrorMsg(L"Error calling \"GatherWriterMetadata\".", hr, errorMessage, errorBufferLen); return false; } //wait for shadow copy writers to complete - hr = pWriteMetaData->Wait(); - if (SUCCEEDED(hr)) - pWriteMetaData->QueryStatus(&hr, NULL); //check if the async operation succeeded... - - pWriteMetaData->Release(); - if (FAILED(hr)) + if (FAILED(hr = vssWriters->Wait())) { - writeErrorMsg(L"Error calling \"ppWriteMetaData->Wait\".", hr, errorMessage, errorBufferLen); + writeErrorMsg(L"Error calling \"vssWriters->Wait\".", hr, errorMessage, errorBufferLen); return false; } + vssWriters->QueryStatus(&hr, NULL); //check if the async operation succeeded... + if (FAILED(hr)) + { + writeErrorMsg(L"Error calling \"vssWriters->QueryStatus\".", hr, errorMessage, errorBufferLen); + return false; + } VSS_ID snapshotSetId = {0}; - if (FAILED(hr = pBackupComponents->StartSnapshotSet( &snapshotSetId ))) + if (FAILED(hr = backupComp->StartSnapshotSet(&snapshotSetId))) { writeErrorMsg(L"Error calling \"StartSnapshotSet\".", hr, errorMessage, errorBufferLen); return false; } - VSS_ID SnapShotId = {0}; - if (FAILED(hr = pBackupComponents->AddToSnapshotSet(const_cast<wchar_t*>(volumeName), GUID_NULL, &SnapShotId))) + if (FAILED(hr = backupComp->AddToSnapshotSet(const_cast<wchar_t*>(volumeName), GUID_NULL, &SnapShotId))) { writeErrorMsg(L"Error calling \"AddToSnapshotSet\".", hr, errorMessage, errorBufferLen); return false; } - - IVssAsync* pPrepare = NULL; - if (FAILED(hr = pBackupComponents->PrepareForBackup( &pPrepare ))) + ComPtr<IVssAsync> vssPrepare; + if (FAILED(hr = backupComp->PrepareForBackup(vssPrepare.init()))) { writeErrorMsg(L"Error calling \"PrepareForBackup\".", hr, errorMessage, errorBufferLen); return false; } - hr = pPrepare->Wait(); - if (SUCCEEDED(hr)) - pPrepare->QueryStatus(&hr, NULL); //check if the async operation succeeded... + if (FAILED(hr = vssPrepare->Wait())) + { + writeErrorMsg(L"Error calling \"vssPrepare->Wait\".", hr, errorMessage, errorBufferLen); + return false; + } - pPrepare->Release(); + vssPrepare->QueryStatus(&hr, NULL); //check if the async operation succeeded... if (FAILED(hr)) { - writeErrorMsg(L"Error calling \"pPrepare->Wait\".", hr, errorMessage, errorBufferLen); + writeErrorMsg(L"Error calling \"vssPrepare->QueryStatus\".", hr, errorMessage, errorBufferLen); return false; } - - IVssAsync* pDoShadowCopy = NULL; - if (FAILED(hr = pBackupComponents->DoSnapshotSet(&pDoShadowCopy))) + ComPtr<IVssAsync> vssDoShadowCopy; + if (FAILED(hr = backupComp->DoSnapshotSet(vssDoShadowCopy.init()))) { writeErrorMsg(L"Error calling \"DoSnapshotSet\".", hr, errorMessage, errorBufferLen); return false; } - hr = pDoShadowCopy->Wait(); - if (SUCCEEDED(hr)) - pDoShadowCopy->QueryStatus(&hr, NULL); //check if the async operation succeeded... + if (FAILED(hr = vssDoShadowCopy->Wait())) + { + writeErrorMsg(L"Error calling \"vssDoShadowCopy->Wait\".", hr, errorMessage, errorBufferLen); + return false; + } - pDoShadowCopy->Release(); + vssDoShadowCopy->QueryStatus(&hr, NULL); //check if the async operation succeeded... if (FAILED(hr)) { - writeErrorMsg(L"Error calling \"pPrepare->Wait\".", hr, errorMessage, errorBufferLen); + writeErrorMsg(L"Error calling \"vssDoShadowCopy->QueryStatus\".", hr, errorMessage, errorBufferLen); return false; } VSS_SNAPSHOT_PROP props; - if (FAILED(hr = pBackupComponents->GetSnapshotProperties( SnapShotId, &props ))) + if (FAILED(hr = backupComp->GetSnapshotProperties(SnapShotId, &props))) { writeErrorMsg(L"Error calling \"GetSnapshotProperties\".", hr, errorMessage, errorBufferLen); return false; @@ -212,13 +171,13 @@ bool Shadow::createShadowCopy(const wchar_t* volumeName, VssFreeSnapshotProperties(&props); - *backupHandle = pBackupComponents.release(); //release ownership + *backupHandle = backupComp.release(); //release ownership return true; } -void Shadow::releaseShadowCopy(void* backupHandle) +void shadow::releaseShadowCopy(void* backupHandle) { if (backupHandle != NULL) static_cast<IVssBackupComponents*>(backupHandle)->Release(); diff --git a/shared/ShadowCopy/shadow.h b/shared/ShadowCopy/shadow.h index 61d6ae7e..a9120e8a 100644 --- a/shared/ShadowCopy/shadow.h +++ b/shared/ShadowCopy/shadow.h @@ -14,7 +14,7 @@ #endif -namespace Shadow +namespace shadow { //COM needs to be initialized before calling any of these functions! CoInitializeEx/CoUninitialize diff --git a/shared/Taskbar_Seven/Taskbar_Seven.vcxproj b/shared/Taskbar_Seven/Taskbar_Seven.vcxproj index db8b6feb..5b04a98c 100644 --- a/shared/Taskbar_Seven/Taskbar_Seven.vcxproj +++ b/shared/Taskbar_Seven/Taskbar_Seven.vcxproj @@ -208,7 +208,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="dllmain.cpp"> + <ClCompile Include="dll_main.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> </PrecompiledHeader> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> diff --git a/shared/Taskbar_Seven/dllmain.cpp b/shared/Taskbar_Seven/dll_main.cpp index 18bb453d..142e26a2 100644 --- a/shared/Taskbar_Seven/dllmain.cpp +++ b/shared/Taskbar_Seven/dll_main.cpp @@ -7,21 +7,19 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> - -BOOL APIENTRY DllMain( HMODULE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved - ) +//optional: add init/teardown logic here +BOOL APIENTRY DllMain(HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) { - switch (ul_reason_for_call) + switch (fdwReason) { case DLL_PROCESS_ATTACH: + case DLL_PROCESS_DETACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: break; - } + } return TRUE; } - diff --git a/shared/Taskbar_Seven/taskbar.cpp b/shared/Taskbar_Seven/taskbar.cpp index f5249e08..c9a2e7df 100644 --- a/shared/Taskbar_Seven/taskbar.cpp +++ b/shared/Taskbar_Seven/taskbar.cpp @@ -13,7 +13,7 @@ #include <map> #include <string> #include <comdef.h> - +#include "../com_error.h" namespace { @@ -24,27 +24,7 @@ void writeString(const std::wstring& input, wchar_t* output, size_t outputBuffer output[newSize-1] = 0; //if output buffer is too small... } - -std::wstring numberToHexString(const long number) -{ - wchar_t result[100]; - swprintf(result, 100, L"0x%08x", number); - return std::wstring(result); -} - - -std::wstring writeErrorMsg(const wchar_t* input, HRESULT hr) -{ - std::wstring output(input); - output += L" ("; - output += numberToHexString(hr); - output += L": "; - output += _com_error(hr).ErrorMessage(); - output += L")"; - return output; -} - - +using Util::generateErrorMsg; using TaskbarSeven::TBHandle; typedef std::map<TBHandle, ITaskbarList3*> TaskBarHandleMap; @@ -70,7 +50,7 @@ TaskbarSeven::TBHandle TaskbarSeven::init() //call on app initializaiton; return IID_PPV_ARGS(&pto)); if (FAILED(hr)) { - lastErrorMessage = writeErrorMsg(L"Error calling \"CoCreateInstance\".", hr); + lastErrorMessage = generateErrorMsg(L"Error calling \"CoCreateInstance\".", hr); return 0; } @@ -123,7 +103,7 @@ bool TaskbarSeven::setStatus(TBHandle handle, flag); //[in] TBPFLAG tbpFlags if (FAILED(hr)) { - lastErrorMessage = writeErrorMsg(L"Error calling \"SetProgressState\".", hr); + lastErrorMessage = generateErrorMsg(L"Error calling \"SetProgressState\".", hr); return false; } } @@ -146,7 +126,7 @@ bool TaskbarSeven::setProgress(TBHandle handle, total); //[in] ULONGLONG ullTotal if (FAILED(hr)) { - lastErrorMessage = writeErrorMsg(L"Error calling \"SetProgressValue\".", hr); + lastErrorMessage = generateErrorMsg(L"Error calling \"SetProgressValue\".", hr); return false; } } diff --git a/shared/appMain.cpp b/shared/app_main.cpp index bf65e6c8..7225ba62 100644 --- a/shared/appMain.cpp +++ b/shared/app_main.cpp @@ -4,17 +4,17 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "appMain.h" +#include "app_main.h" #include <wx/window.h> #include <wx/app.h> -using namespace FreeFileSync; +using namespace ffs3; bool AppMainWindow::mainWndAct = false; -void FreeFileSync::AppMainWindow::setMainWindow(wxWindow* window) +void ffs3::AppMainWindow::setMainWindow(wxWindow* window) { wxTheApp->SetTopWindow(window); wxTheApp->SetExitOnFrameDelete(true); diff --git a/shared/appMain.h b/shared/app_main.h index a4222a75..d0b76122 100644 --- a/shared/appMain.h +++ b/shared/app_main.h @@ -9,7 +9,7 @@ class wxWindow; -namespace FreeFileSync +namespace ffs3 { //just some wrapper around a global variable representing the (logical) main application window class AppMainWindow diff --git a/shared/assert_static.h b/shared/assert_static.h new file mode 100644 index 00000000..9eb94f3c --- /dev/null +++ b/shared/assert_static.h @@ -0,0 +1,37 @@ +// ************************************************************************** +// * 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) * +// ************************************************************************** +// +#ifndef ASSERTSTATIC_H_INCLUDED +#define ASSERTSTATIC_H_INCLUDED + +//compile time assert based on Loki (http://loki-lib.sourceforge.net) + +#ifdef NDEBUG + +#define assert_static(x) ((void)0) + +#else /* debugging enabled */ +namespace StaticCheckImpl +{ +template<int> +struct CompileTimeError; + +template<> +struct CompileTimeError<true> {}; +} + +#define LOKI_CONCAT( X, Y ) LOKI_CONCAT_SUB( X, Y ) +#define LOKI_CONCAT_SUB( X, Y ) X##Y + +#define assert_static(expr) \ + enum { LOKI_CONCAT(loki_enum_dummy_value, __LINE__) = sizeof(StaticCheckImpl::CompileTimeError<static_cast<bool>(expr) >) } + +/*#define assert_static(expr) \ + { Loki::CompileTimeError<((expr) != 0)> Static_Assert_Has_Failed; (void)Static_Assert_Has_Failed; } */ + +#endif + +#endif //ASSERTSTATIC_H_INCLUDED diff --git a/shared/buildInfo.h b/shared/build_info.h index 3aed3269..945284d2 100644 --- a/shared/buildInfo.h +++ b/shared/build_info.h @@ -7,7 +7,7 @@ #ifndef BUILDINFO_H_INCLUDED #define BUILDINFO_H_INCLUDED -namespace Utility +namespace util { //determine build info //seems to be safer than checking for _WIN64 (defined on windows for 64-bit compilations only) while _WIN32 is always defined (even for x64 compiler!) diff --git a/shared/checkExist.cpp b/shared/checkExist.cpp deleted file mode 100644 index 3f71afb8..00000000 --- a/shared/checkExist.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "checkExist.h" -#include "parallelCall.h" -#include "fileHandling.h" - - -namespace -{ -template <bool (*testExist)(const Zstring&)> -class CheckObjectExists : public Async::Procedure -{ -public: - CheckObjectExists(const Zstring& filename) : - filename_(filename.c_str()), //deep copy: worker thread may run longer than main! Avoid shared data - isExisting(false) {} - - virtual void doWork() - { - isExisting = testExist(filename_); //throw() - } - - bool doesExist() const //retrieve result - { - return isExisting; - } - -private: - const Zstring filename_; //no reference, lifetime not known - bool isExisting; -}; - - -template <bool (*testExist)(const Zstring&)> -inline -Utility::ResultExist objExists(const Zstring& filename, size_t timeout) //timeout in ms -{ - typedef CheckObjectExists<testExist> CheckObjEx; - boost::shared_ptr<CheckObjEx> proc(new CheckObjEx(filename)); - - return Async::execute(proc, timeout) == Async::TIMEOUT ? Utility::EXISTING_TIMEOUT : - (proc->doesExist() ? Utility::EXISTING_TRUE : Utility::EXISTING_FALSE); -} -} - - -Utility::ResultExist Utility::fileExists(const Zstring& filename, size_t timeout) //timeout in ms -{ - return objExists<FreeFileSync::fileExists>(filename, timeout); -} - - -Utility::ResultExist Utility::dirExists(const Zstring& dirname, size_t timeout) //timeout in ms -{ - return objExists<FreeFileSync::dirExists>(dirname, timeout); -} diff --git a/shared/checkExist.h b/shared/checkExist.h deleted file mode 100644 index bae5580c..00000000 --- a/shared/checkExist.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef CHECKEXIST_H_INCLUDED -#define CHECKEXIST_H_INCLUDED - -#include "zstring.h" - -namespace Utility -{ -enum ResultExist -{ - EXISTING_TRUE, - EXISTING_FALSE, - EXISTING_TIMEOUT -}; - -ResultExist fileExists(const Zstring& filename, size_t timeout); //timeout in ms -ResultExist dirExists( const Zstring& dirname, size_t timeout); //timeout in ms -} - -#endif // CHECKEXIST_H_INCLUDED diff --git a/shared/check_exist.cpp b/shared/check_exist.cpp new file mode 100644 index 00000000..fcb865fd --- /dev/null +++ b/shared/check_exist.cpp @@ -0,0 +1,83 @@ +#include "check_exist.h" +#include "file_handling.h" +#include <boost/thread.hpp> +#include <boost/shared_ptr.hpp> + + +#ifdef __MINGW32__ +//oh well, nothing is for free... +//https://svn.boost.org/trac/boost/ticket/4258 +#warning fix this issue at some time... +extern "C" void tss_cleanup_implemented() {} +#endif + + +namespace +{ +template <bool (*testExist)(const Zstring&)> +class ExistenceChecker +{ +public: + ExistenceChecker(const Zstring& filename, const boost::shared_ptr<bool>& isExisting) : + filename_(filename.c_str()), //deep copy: worker thread may run longer than main! avoid shared data + isExisting_(isExisting) {} //not accessed during thread run + + void operator()() + { + *isExisting_ = testExist(filename_); //throw() + } + +private: + const Zstring filename_; //no reference, lifetime not known + boost::shared_ptr<bool> isExisting_; +}; + + +template <bool (*fun)(const Zstring&)> +util::ResultExist checkExistence(const Zstring& objName, size_t timeout) //timeout in ms +{ + using namespace util; + + boost::shared_ptr<bool> isExisting(new bool(false)); + + ExistenceChecker<fun> task(objName, isExisting); + boost::thread worker(task); + + if (worker.timed_join(boost::posix_time::milliseconds(timeout))) + return *isExisting ? EXISTING_TRUE : EXISTING_FALSE; + else + return EXISTING_TIMEOUT; + /* + main/worker thread may access different shared_ptr instances safely (even though they have the same target!) + http://www.boost.org/doc/libs/1_43_0/libs/smart_ptr/shared_ptr.htm?sess=8153b05b34d890e02d48730db1ff7ddc#ThreadSafety + */ + +#ifndef _MSC_VER +#warning migrate this at some time... +#endif + /* + unfortunately packaged_task/future is not mature enough to be used... + boost::packaged_task<bool> pt(boost::bind(fun, objName.c_str())); //attention: Zstring is not thread-safe => make deep copy + boost::unique_future<bool> fut = pt.get_future(); + + boost::thread worker(boost::move(pt)); //launch task on a thread + + if (fut.timed_wait(boost::posix_time::milliseconds(timeout))) + return fut.get() ? EXISTING_TRUE : EXISTING_FALSE; + else + return EXISTING_TIMEOUT; + */ +} +} + + +util::ResultExist util::fileExists(const Zstring& filename, size_t timeout) //timeout in ms +{ + return ::checkExistence<ffs3::fileExists>(filename, timeout); +} + + +util::ResultExist util::dirExists(const Zstring& dirname, size_t timeout) //timeout in ms +{ + return ::checkExistence<ffs3::dirExists>(dirname, timeout); +} diff --git a/shared/check_exist.h b/shared/check_exist.h new file mode 100644 index 00000000..7e9cecd8 --- /dev/null +++ b/shared/check_exist.h @@ -0,0 +1,25 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * +// ************************************************************************** +// +#ifndef CHECKEXIST_H_INCLUDED +#define CHECKEXIST_H_INCLUDED + +#include "zstring.h" + +namespace util +{ +enum ResultExist +{ + EXISTING_TRUE, + EXISTING_FALSE, + EXISTING_TIMEOUT +}; + +ResultExist fileExists(const Zstring& filename, size_t timeout); //timeout in ms +ResultExist dirExists( const Zstring& dirname, size_t timeout); //timeout in ms +} + +#endif // CHECKEXIST_H_INCLUDED diff --git a/shared/com_error.h b/shared/com_error.h new file mode 100644 index 00000000..ab365977 --- /dev/null +++ b/shared/com_error.h @@ -0,0 +1,77 @@ +// ************************************************************************** +// * 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) * +// ************************************************************************** +// +#ifndef COM_ERROR_HEADER +#define COM_ERROR_HEADER + +#include <string> +#include <cstdio> +#include <comdef.h> + +namespace util +{ +std::wstring generateErrorMsg(const std::wstring& input, HRESULT hr); + + +class ComException +{ +public: + ComException(const std::wstring& message, HRESULT hr = NO_ERROR) + : message_(message), hr_(hr) {} + + std::wstring show() const + { + return hr_ != NO_ERROR ? generateErrorMsg(message_, hr_) : message_; + } + +private: + const std::wstring message_; + const HRESULT hr_; +}; + + + + + + + + + + + + + + + + + + + + + +//################# implementation ##################### +inline +std::wstring numberToHexString(long number) +{ + wchar_t result[100]; + swprintf(result, 100, L"0x%08x", number); + return std::wstring(result); +} + + +inline +std::wstring generateErrorMsg(const std::wstring& input, HRESULT hr) +{ + std::wstring output(input); + output += L" ("; + output += numberToHexString(hr); + output += L": "; + output += _com_error(hr).ErrorMessage(); + output += L")"; + return output; +} +} +#endif //COM_ERROR_HEADER
\ No newline at end of file diff --git a/shared/com_ptr.h b/shared/com_ptr.h new file mode 100644 index 00000000..1ce7eae6 --- /dev/null +++ b/shared/com_ptr.h @@ -0,0 +1,186 @@ +// ************************************************************************** +// * 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) * +// ************************************************************************** +// +#ifndef SMART_COM_PTR_H +#define SMART_COM_PTR_H + +#include <Objbase.h> +#include <algorithm> + +namespace util +{ +/* +ComPtr: RAII class handling COM objects + +Example: + -------- + ComPtr<IUPnPDeviceFinder> devFinder; + if (FAILED(::CoCreateInstance(CLSID_UPnPDeviceFinder, + NULL, + CLSCTX_ALL, + IID_PPV_ARGS(devFinder.init())))) + return -1; + + ComPtr<IEnumUnknown> devEnum = com_dynamic_cast<IEnumUnknown>(devColl); + if (!devEnum) + return -1; +*/ + +template <class T> +class ComPtr +{ +public: + ComPtr(); + ComPtr(const ComPtr& rhs); + ComPtr& operator=(const ComPtr& rhs); + ~ComPtr(); + T** init(); //get pointer for use with ::CoCreateInstance() + T* get() const; + T* release(); + void swap(ComPtr& rhs); //throw() + T* operator->() const; + operator bool() const; + +private: + T* ptr; +}; + + +template <class S, class T> +ComPtr<S> com_dynamic_cast(const ComPtr<T>& other); //throw() + + + + + + + + + + + + + + + + + + + + + + + + + +//################# Inline Implementation ############################# + +template <class T> +inline +ComPtr<T>::ComPtr() : ptr(NULL) {} + + +template <class T> +inline +ComPtr<T>::ComPtr(const ComPtr& rhs) : ptr(rhs.ptr) +{ + if (ptr) + ptr->AddRef(); +} + + +template <class T> +inline +ComPtr<T>& ComPtr<T>::operator=(const ComPtr<T>& rhs) +{ + ComPtr(rhs).swap(*this); + return *this; +} + + +template <class T> +inline +ComPtr<T>::~ComPtr() +{ + if (ptr) + ptr->Release(); +} + + +template <class T> +inline +T** ComPtr<T>::init() //get pointer for use with ::CoCreateInstance() +{ + ComPtr<T>().swap(*this); + return &ptr; +} + + +template <class T> +inline +T* ComPtr<T>::get() const +{ + return ptr; +} + + +template <class T> +inline +T* ComPtr<T>::release() //throw() +{ + T* tmp = ptr; + ptr = NULL; + return tmp; +} + + +template <class T> +inline +void ComPtr<T>::swap(ComPtr<T>& rhs) //throw() +{ + std::swap(ptr, rhs.ptr); +} + + +//we cannot specialize std::swap() for a class template and are not allowed to overload it => offer swap in own namespace +template <class T> +inline +void swap(util::ComPtr<T>& lhs, util::ComPtr<T>& rhs) +{ + lhs.swap(rhs); +} + + +template <class T> +inline +T* ComPtr<T>::operator->() const +{ + return ptr; +} + + +template <class T> +inline +ComPtr<T>::operator bool() const +{ + return ptr != NULL; +} + + +template <class S, class T> +inline +ComPtr<S> com_dynamic_cast(const ComPtr<T>& other) //throw() +{ + ComPtr<S> outPtr; + if (other) + other->QueryInterface(IID_PPV_ARGS(outPtr.init())); + return outPtr; +} + +} + + +#endif //SMART_COM_PTR_H
\ No newline at end of file diff --git a/shared/com_util.h b/shared/com_util.h new file mode 100644 index 00000000..bda3c732 --- /dev/null +++ b/shared/com_util.h @@ -0,0 +1,155 @@ +// ************************************************************************** +// * 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) * +// ************************************************************************** +// +#ifndef COM_UTILÎTY_HEADER +#define COM_UTILÎTY_HEADER + +#include "com_ptr.h" +#include <string> +#include <cassert> + + +namespace util +{ +//get an enumeration interface as a std::vector of bound(!) ComPtr(s) +template <class T, class U> +std::vector<ComPtr<T> > convertEnum(const ComPtr<U>& enumObj); //enumObj: must have the "_NewEnum" property that supports the IEnumUnknown interface + +/* +extract text from com object member function returning a single BSTR: HRESULT ComInterface::MemFun([out] BSTR *pbstr); + Example: ComPtr<...> comObj =...; + std::wstring description = getText(comObj, &IUPnPDevice::get_Description); +*/ +template <class T, class MemFun> +std::wstring getText(ComPtr<T> comObj, MemFun memFun); + + +//RAII class handling BSTR +class Bstring +{ +public: + Bstring(const std::wstring& str); + ~Bstring(); + + const BSTR get() const; + +private: + Bstring(const Bstring&); //not implemented + Bstring& operator=(const Bstring&); // + + BSTR str_; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +//############################ inline implemenatation ################################## +template <class T, class U> +inline +std::vector<ComPtr<T> > convertEnum(const ComPtr<U>& enumObj) +{ + std::vector<ComPtr<T> > output; + + if (enumObj) + { + ComPtr<IUnknown> unknown; + enumObj->get__NewEnum(unknown.init()); + ComPtr<IEnumUnknown> enumUnknown = com_dynamic_cast<IEnumUnknown>(unknown); + + assert(enumUnknown); //IEnumUnknown must be supported! + if (enumUnknown) + { + ComPtr<IUnknown> itemTmp; + while (enumUnknown->Next(1, itemTmp.init(), NULL) == S_OK) //returns S_FALSE == 1 when finished! Don't use SUCCEEDED()!!! + { + ComPtr<T> itemNew = com_dynamic_cast<T>(itemTmp); + if (itemNew) + output.push_back(itemNew); + } + } + } + + return output; +} + + +template <class T, class MemFun> +inline +std::wstring getText(ComPtr<T> comObj, MemFun memFun) +{ + std::wstring text; + { + if (!comObj) + return std::wstring(); + + BSTR bstr = NULL; + if (FAILED((comObj.get()->*memFun)(&bstr))) + return std::wstring(); + + if (bstr) //NULL means "no text" + { + text = std::wstring(bstr, ::SysStringLen(bstr)); //correctly copy 0-characters + ::SysFreeString(bstr); + } + } + return text; +} + + +inline +Bstring::Bstring(const std::wstring& str) +{ + str_ = ::SysAllocStringLen(str.data(), str.length()); //string::data() returns unmodified string potentially containing 0-values +} + + +inline +Bstring::~Bstring() +{ + if (str_) + ::SysFreeString(str_); +} + + +inline +const BSTR Bstring::get() const +{ + return str_; +} +} + + +#endif //COM_UTILÎTY_HEADER
\ No newline at end of file diff --git a/shared/customButton.cpp b/shared/custom_button.cpp index 4e897844..fec3b4bb 100644 --- a/shared/customButton.cpp +++ b/shared/custom_button.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "customButton.h" +#include "custom_button.h" #include <wx/dcmemory.h> #include <wx/image.h> diff --git a/shared/customButton.h b/shared/custom_button.h index b50dd4da..b50dd4da 100644 --- a/shared/customButton.h +++ b/shared/custom_button.h diff --git a/shared/customComboBox.cpp b/shared/custom_combo_box.cpp index c27ce505..3c2a118c 100644 --- a/shared/customComboBox.cpp +++ b/shared/custom_combo_box.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "customComboBox.h" +#include "custom_combo_box.h" CustomComboBox::CustomComboBox(wxWindow* parent, diff --git a/shared/customComboBox.h b/shared/custom_combo_box.h index 7db8cecf..7db8cecf 100644 --- a/shared/customComboBox.h +++ b/shared/custom_combo_box.h diff --git a/shared/customTooltip.cpp b/shared/custom_tooltip.cpp index e483f7c7..b915b226 100644 --- a/shared/customTooltip.cpp +++ b/shared/custom_tooltip.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "customTooltip.h" +#include "custom_tooltip.h" #include <wx/stattext.h> #include <wx/sizer.h> #include <wx/statbmp.h> diff --git a/shared/customTooltip.h b/shared/custom_tooltip.h index c6bf6cd6..c6bf6cd6 100644 --- a/shared/customTooltip.h +++ b/shared/custom_tooltip.h diff --git a/shared/debugNew.cpp b/shared/debug_new.cpp index dad0cdd0..f5cd8368 100644 --- a/shared/debugNew.cpp +++ b/shared/debug_new.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "debugNew.h" +#include "debug_new.h" #include <wx/msw/wrapwin.h> //includes "windows.h" #include "DbgHelp.h" diff --git a/shared/debugNew.h b/shared/debug_new.h index 702cf774..c9c3dbf6 100644 --- a/shared/debugNew.h +++ b/shared/debug_new.h @@ -14,9 +14,9 @@ /*all this header does is to globally overwrite "operator new" to give some more detailed error messages and write memory dumps Usage: - - Include everywhere before any other file: $(ProjectDir)\shared\debugNew.h + - Include everywhere before any other file: $(ProjectDir)\shared\debug_new.h For Minidumps: - - Compile "debugNew.cpp" + - Compile "debug_new.cpp" - Include library "Dbghelp.lib" - Compile in Debug build (need Symbols and less restrictive Optimization) */ diff --git a/shared/dllLoader.cpp b/shared/dll_loader.cpp index f5242d83..6aa48fd7 100644 --- a/shared/dllLoader.cpp +++ b/shared/dll_loader.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "dllLoader.h" +#include "dll_loader.h" #include <wx/msw/wrapwin.h> //includes "windows.h" #include <map> #include <cassert> @@ -26,9 +26,9 @@ public: if (foundEntry == handles.end()) { HINSTANCE newHandle = ::LoadLibrary(libraryName.c_str()); - handles.insert(std::make_pair(libraryName, newHandle)); + if (newHandle != NULL) + handles.insert(std::make_pair(libraryName, newHandle)); - assert(handles.find(libraryName) != handles.end()); return newHandle; } else @@ -41,16 +41,16 @@ private: ~DllHandler() { for (HandleMap::const_iterator i = handles.begin(); i != handles.end(); ++i) - if (i->second != NULL) ::FreeLibrary(i->second); + ::FreeLibrary(i->second); } typedef std::map<std::wstring, HINSTANCE> HandleMap; - HandleMap handles; + HandleMap handles; //only valid handles here! }; } -void* Utility::loadSymbol(const std::wstring& libraryName, const std::string& functionName) +void* util::loadSymbol(const std::wstring& libraryName, const std::string& functionName) { const HINSTANCE libHandle = DllHandler::getInstance().getHandle(libraryName); diff --git a/shared/dllLoader.h b/shared/dll_loader.h index 318997d5..86723c68 100644 --- a/shared/dllLoader.h +++ b/shared/dll_loader.h @@ -9,7 +9,7 @@ #include <string> -namespace Utility +namespace util { //load function from a DLL library, e.g. from kernel32.dll diff --git a/shared/dragAndDrop.cpp b/shared/drag_n_drop.cpp index c5919e76..c4fc98f6 100644 --- a/shared/dragAndDrop.cpp +++ b/shared/drag_n_drop.cpp @@ -4,16 +4,16 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "dragAndDrop.h" +#include "drag_n_drop.h" #include <wx/dnd.h> #include <wx/window.h> #include <wx/combobox.h> #include <wx/textctrl.h> #include <wx/filepicker.h> #include <wx/filename.h> -#include "fileHandling.h" -#include "stringConv.h" -#include "checkExist.h" +#include "file_handling.h" +#include "string_conv.h" +#include "check_exist.h" //define new event type @@ -27,17 +27,17 @@ typedef void (wxEvtHandler::*FFSFileDropEventFunction)(FFSFileDropEvent&); class FFSFileDropEvent : public wxCommandEvent { public: - FFSFileDropEvent(const wxString& nameDropped, const wxWindow* dropWindow) : + FFSFileDropEvent(const std::vector<wxString>& filesDropped, const wxWindow* dropWindow) : wxCommandEvent(FFS_DROP_FILE_EVENT), - nameDropped_(nameDropped), + filesDropped_(filesDropped), dropWindow_(dropWindow) {} virtual wxEvent* Clone() const { - return new FFSFileDropEvent(nameDropped_, dropWindow_); + return new FFSFileDropEvent(filesDropped_, dropWindow_); } - const wxString nameDropped_; + const std::vector<wxString> filesDropped_; const wxWindow* dropWindow_; }; @@ -50,15 +50,17 @@ public: WindowDropTarget(wxWindow* dropWindow) : dropWindow_(dropWindow) {} - virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) + virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& fileArray) { - if (!filenames.IsEmpty()) - { - const wxString droppedFileName = filenames[0]; + std::vector<wxString> filenames; + for (size_t i = 0; i < fileArray.GetCount(); ++i) + filenames.push_back(fileArray[i]); + if (!filenames.empty()) + { //create a custom event on drop window: execute event after file dropping is completed! (e.g. after mouse is released) - FFSFileDropEvent evt(droppedFileName, dropWindow_); - dropWindow_->AddPendingEvent(evt); + FFSFileDropEvent evt(filenames, dropWindow_); + dropWindow_->GetEventHandler()->AddPendingEvent(evt); } return false; } @@ -71,7 +73,7 @@ private: //############################################################################################################## -using FreeFileSync::DragDropOnMainDlg; +using ffs3::DragDropOnMainDlg; DragDropOnMainDlg::DragDropOnMainDlg(wxWindow* dropWindow1, wxWindow* dropWindow2, @@ -91,19 +93,22 @@ DragDropOnMainDlg::DragDropOnMainDlg(wxWindow* dropWindow1, dropWindow2->Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DragDropOnMainDlg::OnFilesDropped), NULL, this); //keep dirPicker and dirName synchronous - dirName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DragDropOnMainDlg::OnWriteDirManually ), NULL, this ); - dirPicker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( DragDropOnMainDlg::OnDirSelected ), NULL, this ); + dirName-> Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DragDropOnMainDlg::OnWriteDirManually), NULL, this ); + dirPicker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(DragDropOnMainDlg::OnDirSelected), NULL, this ); } void DragDropOnMainDlg::OnFilesDropped(FFSFileDropEvent& event) { + if (event.filesDropped_.empty()) + return; + if ( this->dropWindow1_ == event.dropWindow_ || //file may be dropped on window 1 or 2 this->dropWindow2_ == event.dropWindow_) { - if (AcceptDrop(event.nameDropped_)) + if (AcceptDrop(event.filesDropped_)) { - wxString fileName = event.nameDropped_; + wxString fileName = event.filesDropped_[0]; if (wxDirExists(fileName)) { dirName_->SetSelection(wxNOT_FOUND); @@ -122,8 +127,6 @@ void DragDropOnMainDlg::OnFilesDropped(FFSFileDropEvent& event) } } } - else //should never be reached - event.Skip(); } @@ -131,7 +134,7 @@ void DragDropOnMainDlg::OnWriteDirManually(wxCommandEvent& event) { const Zstring newDir = getFormattedDirectoryName(wxToZ(event.GetString())); - if (Utility::dirExists(newDir, 100) == Utility::EXISTING_TRUE) //potentially slow network access: wait 100 ms at most + if (util::dirExists(newDir, 100) == util::EXISTING_TRUE) //potentially slow network access: wait 100 ms at most dirPicker_->SetPath(zToWx(newDir)); event.Skip(); @@ -150,7 +153,7 @@ void DragDropOnMainDlg::OnDirSelected(wxFileDirPickerEvent& event) //############################################################################################################## -using FreeFileSync::DragDropOnDlg; +using ffs3::DragDropOnDlg; DragDropOnDlg::DragDropOnDlg(wxWindow* dropWindow, wxDirPickerCtrl* dirPicker, @@ -173,9 +176,12 @@ DragDropOnDlg::DragDropOnDlg(wxWindow* dropWindow, void DragDropOnDlg::OnFilesDropped(FFSFileDropEvent& event) { + if (event.filesDropped_.empty()) + return; + if (this->dropWindow_ == event.dropWindow_) { - wxString fileName = event.nameDropped_; + wxString fileName = event.filesDropped_[0]; if (wxDirExists(fileName)) { dirName_->SetValue(fileName); @@ -191,15 +197,13 @@ void DragDropOnDlg::OnFilesDropped(FFSFileDropEvent& event) } } } - else //should never be reached - event.Skip(); } void DragDropOnDlg::OnWriteDirManually(wxCommandEvent& event) { - const Zstring newDir = FreeFileSync::getFormattedDirectoryName(wxToZ(event.GetString())); - if (Utility::dirExists(newDir, 100) == Utility::EXISTING_TRUE) //potentially slow network access: wait 100 ms at most + const Zstring newDir = ffs3::getFormattedDirectoryName(wxToZ(event.GetString())); + if (util::dirExists(newDir, 100) == util::EXISTING_TRUE) //potentially slow network access: wait 100 ms at most dirPicker_->SetPath(zToWx(newDir)); event.Skip(); diff --git a/shared/dragAndDrop.h b/shared/drag_n_drop.h index 4fc839c0..88bb68c4 100644 --- a/shared/dragAndDrop.h +++ b/shared/drag_n_drop.h @@ -8,6 +8,7 @@ #define DRAGANDDROP_H_INCLUDED #include <wx/event.h> +#include <vector> class wxWindow; class wxDirPickerCtrl; @@ -19,7 +20,7 @@ class wxCommandEvent; class wxFileDirPickerEvent; -namespace FreeFileSync +namespace ffs3 { //add drag and drop functionality, coordinating a wxWindow, wxDirPickerCtrl, and wxComboBox/wxTextCtrl @@ -33,7 +34,7 @@ public: virtual ~DragDropOnMainDlg() {} - virtual bool AcceptDrop(const wxString& dropName) = 0; //return true if drop should be processed + virtual bool AcceptDrop(const std::vector<wxString>& droppedFiles) = 0; //return true if drop should be processed private: void OnFilesDropped(FFSFileDropEvent& event); diff --git a/shared/fileError.h b/shared/file_error.h index 210d1029..2804e337 100644 --- a/shared/fileError.h +++ b/shared/file_error.h @@ -10,7 +10,7 @@ #include <wx/string.h> -namespace FreeFileSync +namespace ffs3 { class FileError //Exception base class used to notify file/directory copy/delete errors { @@ -20,7 +20,7 @@ public: virtual ~FileError() {} - const wxString& show() const + const wxString& msg() const { return errorMessage; } @@ -28,6 +28,13 @@ public: private: const wxString errorMessage; }; + + +class ErrorNotExisting : public FileError +{ +public: + ErrorNotExisting(const wxString& message) : FileError(message) {} +}; } #endif // FILEERROR_H_INCLUDED diff --git a/shared/fileHandling.cpp b/shared/file_handling.cpp index 2a8af46a..3f56abe4 100644 --- a/shared/fileHandling.cpp +++ b/shared/file_handling.cpp @@ -4,38 +4,40 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "fileHandling.h" +#include "file_handling.h" #include <wx/intl.h> -#include "systemFunctions.h" -#include "globalFunctions.h" -#include "systemConstants.h" -#include "fileTraverser.h" +#include "system_func.h" +#include "global_func.h" +#include "system_constants.h" +#include "file_traverser.h" #include <boost/bind.hpp> #include <algorithm> #include <wx/datetime.h> -#include "stringConv.h" +#include "string_conv.h" #include <wx/utils.h> #include <boost/scoped_array.hpp> #include <boost/shared_ptr.hpp> #include <stdexcept> #include "loki/TypeManip.h" #include "loki/ScopeGuard.h" +#include <map> #ifdef FFS_WIN -#include "dllLoader.h" +#include "dll_loader.h" #include <wx/msw/wrapwin.h> //includes "windows.h" -#include "longPathPrefix.h" +#include "long_path_prefix.h" +#include <Aclapi.h> #elif defined FFS_LINUX #include <sys/stat.h> -#include "fileIO.h" +#include "file_io.h" #include <time.h> #include <utime.h> #include <cerrno> #include <sys/time.h> #endif -using FreeFileSync::FileError; +using ffs3::FileError; namespace @@ -80,7 +82,7 @@ bool replaceMacro(wxString& macro) //macro without %-characters, return true if if (macro.CmpNoCase(wxT("time")) == 0) { macro = wxDateTime::Now().FormatISOTime(); - macro.Replace(wxT(":"), wxT("-")); + macro.Replace(wxT(":"), wxT("")); return true; } @@ -90,6 +92,24 @@ bool replaceMacro(wxString& macro) //macro without %-characters, return true if return true; } + if (macro.CmpNoCase(wxT("month")) == 0) + { + macro = wxDateTime::Now().Format(wxT("%B")); + return true; + } + + if (macro.CmpNoCase(wxT("week")) == 0) + { + macro = wxDateTime::Now().Format(wxT("%U")); + return true; + } + + if (macro.CmpNoCase(wxT("year")) == 0) + { + macro = wxDateTime::Now().Format(wxT("%Y")); + return true; + } + //try to apply environment variables wxString envValue; if (wxGetEnv(macro, &envValue)) @@ -143,7 +163,7 @@ void expandMacros(wxString& text) } -Zstring FreeFileSync::getFormattedDirectoryName(const Zstring& dirname) +Zstring ffs3::getFormattedDirectoryName(const Zstring& dirname) { //Formatting is needed since functions expect the directory to end with '\' to be able to split the relative names. //note: don't do directory formatting with wxFileName, as it doesn't respect //?/ - prefix! @@ -170,14 +190,14 @@ Zstring FreeFileSync::getFormattedDirectoryName(const Zstring& dirname) */ dirnameTmp = zToWx(resolveRelativePath(wxToZ(dirnameTmp))); - if (!dirnameTmp.EndsWith(zToWx(globalFunctions::FILE_NAME_SEPARATOR))) - dirnameTmp += zToWx(globalFunctions::FILE_NAME_SEPARATOR); + if (!dirnameTmp.EndsWith(zToWx(common::FILE_NAME_SEPARATOR))) + dirnameTmp += zToWx(common::FILE_NAME_SEPARATOR); return wxToZ(dirnameTmp); } -bool FreeFileSync::fileExists(const Zstring& filename) +bool ffs3::fileExists(const Zstring& filename) { //symbolic links (broken or not) are also treated as existing files! #ifdef FFS_WIN @@ -194,7 +214,7 @@ bool FreeFileSync::fileExists(const Zstring& filename) } -bool FreeFileSync::dirExists(const Zstring& dirname) +bool ffs3::dirExists(const Zstring& dirname) { //symbolic links (broken or not) are also treated as existing directories! #ifdef FFS_WIN @@ -212,7 +232,7 @@ bool FreeFileSync::dirExists(const Zstring& dirname) } -bool FreeFileSync::symlinkExists(const Zstring& objname) +bool ffs3::symlinkExists(const Zstring& objname) { #ifdef FFS_WIN const DWORD ret = ::GetFileAttributes(applyLongPathPrefix(objname).c_str()); @@ -226,7 +246,7 @@ bool FreeFileSync::symlinkExists(const Zstring& objname) } -bool FreeFileSync::somethingExists(const Zstring& objname) //throw() check whether any object with this name exists +bool ffs3::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; @@ -244,7 +264,7 @@ namespace wxULongLong getFileSizeSymlink(const Zstring& linkName) //throw (FileError) { //open handle to target of symbolic link - const HANDLE hFile = ::CreateFile(FreeFileSync::applyLongPathPrefix(linkName).c_str(), + const HANDLE hFile = ::CreateFile(ffs3::applyLongPathPrefix(linkName).c_str(), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, @@ -260,14 +280,14 @@ wxULongLong getFileSizeSymlink(const Zstring& linkName) //throw (FileError) return wxULongLong(fileInfoByHandle.nFileSizeHigh, fileInfoByHandle.nFileSizeLow); } - const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + FreeFileSync::zToWx(linkName) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + ffs3::zToWx(linkName) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } } #endif -wxULongLong FreeFileSync::getFilesize(const Zstring& filename) //throw (FileError) +wxULongLong ffs3::getFilesize(const Zstring& filename) //throw (FileError) { #ifdef FFS_WIN WIN32_FIND_DATA fileMetaData; @@ -275,7 +295,7 @@ wxULongLong FreeFileSync::getFilesize(const Zstring& filename) //throw (FileErro if (searchHandle == INVALID_HANDLE_VALUE) { const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(filename) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } ::FindClose(searchHandle); @@ -290,7 +310,7 @@ wxULongLong FreeFileSync::getFilesize(const Zstring& filename) //throw (FileErro if (::stat(filename.c_str(), &fileInfo) != 0) //follow symbolic links { const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(filename) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } return fileInfo.st_size; @@ -313,8 +333,8 @@ DWORD retrieveVolumeSerial(const Zstring& pathName) //return 0 on error! return 0; Zstring volumePath = buffer.get(); - if (!volumePath.EndsWith(globalFunctions::FILE_NAME_SEPARATOR)) - volumePath += globalFunctions::FILE_NAME_SEPARATOR; + if (!volumePath.EndsWith(common::FILE_NAME_SEPARATOR)) + volumePath += common::FILE_NAME_SEPARATOR; DWORD volumeSerial = 0; if (!::GetVolumeInformation(volumePath.c_str(), //__in_opt LPCTSTR lpRootPathName, @@ -336,13 +356,13 @@ dev_t retrieveVolumeSerial(const Zstring& pathName) //return 0 on error! Zstring volumePathName = pathName; //remove trailing slash - if (volumePathName.size() > 1 && volumePathName.EndsWith(globalFunctions::FILE_NAME_SEPARATOR)) //exception: allow '/' - volumePathName = volumePathName.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + if (volumePathName.size() > 1 && volumePathName.EndsWith(common::FILE_NAME_SEPARATOR)) //exception: allow '/' + volumePathName = volumePathName.BeforeLast(common::FILE_NAME_SEPARATOR); struct stat fileInfo; while (::lstat(volumePathName.c_str(), &fileInfo) != 0) { - volumePathName = volumePathName.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); //returns empty string if ch not found + volumePathName = volumePathName.BeforeLast(common::FILE_NAME_SEPARATOR); //returns empty string if ch not found if (volumePathName.empty()) return 0; //this includes path "/" also! } @@ -353,7 +373,7 @@ dev_t retrieveVolumeSerial(const Zstring& pathName) //return 0 on error! } -FreeFileSync::ResponseSameVol FreeFileSync::onSameVolume(const Zstring& folderLeft, const Zstring& folderRight) //throw() +ffs3::ResponseSameVol ffs3::onSameVolume(const Zstring& folderLeft, const Zstring& folderRight) //throw() { #ifdef FFS_WIN typedef DWORD VolSerial; @@ -369,7 +389,7 @@ FreeFileSync::ResponseSameVol FreeFileSync::onSameVolume(const Zstring& folderLe } -void FreeFileSync::removeFile(const Zstring& filename) //throw (FileError); +void ffs3::removeFile(const Zstring& filename) //throw (FileError); { //no error situation if file is not existing! manual deletion relies on it! if (!somethingExists(filename)) @@ -395,13 +415,13 @@ void FreeFileSync::removeFile(const Zstring& filename) //throw (FileError); } wxString errorMessage = wxString(_("Error deleting file:")) + wxT("\n\"") + zToWx(filename) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } #elif defined FFS_LINUX if (::unlink(filename.c_str()) != 0) { wxString errorMessage = wxString(_("Error deleting file:")) + wxT("\n\"") + zToWx(filename) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } #endif } @@ -409,7 +429,7 @@ void FreeFileSync::removeFile(const Zstring& filename) //throw (FileError); namespace { -struct ErrorDifferentVolume : public FreeFileSync::FileError +struct ErrorDifferentVolume : public ffs3::FileError { ErrorDifferentVolume(const wxString& message) : FileError(message) {} }; @@ -425,7 +445,7 @@ struct ErrorDifferentVolume : public FreeFileSync::FileError //throw (FileError); ErrorDifferentVolume if it is due to moving file to another volume void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw (FileError, ErrorDifferentVolume) { - using namespace FreeFileSync; //for zToWx() + using namespace ffs3; //for zToWx() #ifdef FFS_WIN const Zstring oldNameFmt = applyLongPathPrefix(oldName); @@ -467,7 +487,7 @@ void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw } const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(oldName) + wxT("\" ->\n\"") + zToWx(newName) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted(); + wxT("\n\n") + ffs3::getLastErrorFormatted(); if (::GetLastError() == ERROR_NOT_SAME_DEVICE) throw ErrorDifferentVolume(errorMessage); else @@ -479,7 +499,7 @@ void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw if (::rename(oldName.c_str(), newName.c_str()) != 0) { const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(oldName) + wxT("\" ->\n\"") + zToWx(newName) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted(); + wxT("\n\n") + ffs3::getLastErrorFormatted(); if (errno == EXDEV) throw ErrorDifferentVolume(errorMessage); else @@ -506,7 +526,7 @@ void renameFileInternalNoThrow(const Zstring& oldName, const Zstring& newName) / template <typename Function> Zstring getFilenameFmt(const Zstring& filename, Function fun) //throw(); returns empty string on error { - const Zstring filenameFmt = FreeFileSync::applyLongPathPrefix(filename); + const Zstring filenameFmt = ffs3::applyLongPathPrefix(filename); const DWORD bufferSize = fun(filenameFmt.c_str(), NULL, 0); if (bufferSize == 0) @@ -526,10 +546,10 @@ Zstring getFilenameFmt(const Zstring& filename, Function fun) //throw(); returns Zstring createTemp8Dot3Name(const Zstring& fileName) //find a unique 8.3 short name { - const Zstring pathPrefix = fileName.Find(globalFunctions::FILE_NAME_SEPARATOR) != Zstring::npos ? - (fileName.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR) + globalFunctions::FILE_NAME_SEPARATOR) : Zstring(); + const Zstring pathPrefix = fileName.Find(common::FILE_NAME_SEPARATOR) != Zstring::npos ? + (fileName.BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR) : Zstring(); - Zstring extension = fileName.AfterLast(globalFunctions::FILE_NAME_SEPARATOR).AfterLast(DefaultChar('.')); //extension needn't contain reasonable data + Zstring extension = fileName.AfterLast(common::FILE_NAME_SEPARATOR).AfterLast(DefaultChar('.')); //extension needn't contain reasonable data if (extension.empty()) extension = DefaultStr("FFS"); extension.Truncate(3); @@ -537,7 +557,7 @@ Zstring createTemp8Dot3Name(const Zstring& fileName) //find a unique 8.3 short n for (int index = 0; index < 100000000; ++index) //filename must be representable by <= 8 characters { const Zstring output = pathPrefix + numberToZstring(index) + DefaultChar('.') + extension; - if (!FreeFileSync::somethingExists(output)) //ensure uniqueness + if (!ffs3::somethingExists(output)) //ensure uniqueness return output; } @@ -548,26 +568,26 @@ Zstring createTemp8Dot3Name(const Zstring& fileName) //find a unique 8.3 short n //try to handle issues with already existing short 8.3 file names on Windows 7 bool fix8Dot3NameClash(const Zstring& oldName, const Zstring& newName) //throw (FileError); return "true" if rename operation succeeded { - using namespace FreeFileSync; + using namespace ffs3; - if (newName.Find(globalFunctions::FILE_NAME_SEPARATOR) == Zstring::npos) + if (newName.Find(common::FILE_NAME_SEPARATOR) == Zstring::npos) return false; - if (FreeFileSync::somethingExists(newName)) //name OR directory! + if (ffs3::somethingExists(newName)) //name OR directory! { - const Zstring fileNameOrig = newName.AfterLast(globalFunctions::FILE_NAME_SEPARATOR); //returns the whole string if ch not found - const Zstring fileNameShort = getFilenameFmt(newName, ::GetShortPathName).AfterLast(globalFunctions::FILE_NAME_SEPARATOR); //throw() returns empty string on error - const Zstring fileNameLong = getFilenameFmt(newName, ::GetLongPathName).AfterLast(globalFunctions::FILE_NAME_SEPARATOR); //throw() returns empty string on error + const Zstring fileNameOrig = newName.AfterLast(common::FILE_NAME_SEPARATOR); //returns the whole string if ch not found + const Zstring fileNameShort = getFilenameFmt(newName, ::GetShortPathName).AfterLast(common::FILE_NAME_SEPARATOR); //throw() returns empty string on error + const Zstring fileNameLong = getFilenameFmt(newName, ::GetLongPathName).AfterLast(common::FILE_NAME_SEPARATOR); //throw() returns empty string on error if ( !fileNameShort.empty() && !fileNameLong.empty() && - fileNameOrig.cmpFileName(fileNameShort) == 0 && - fileNameShort.cmpFileName(fileNameLong) != 0) + cmpFileName(fileNameOrig, fileNameShort) == 0 && + cmpFileName(fileNameShort, fileNameLong) != 0) { //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(globalFunctions::FILE_NAME_SEPARATOR) + globalFunctions::FILE_NAME_SEPARATOR + + const Zstring newNameFullPathLong = 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! @@ -575,7 +595,7 @@ bool fix8Dot3NameClash(const Zstring& oldName, const Zstring& newName) //throw //move already existing short name out of the way for now renameFileInternal(newNameFullPathLong, parkedTarget); //throw (FileError, ErrorDifferentVolume); - //DON'T call FreeFileSync::renameFile() to avoid reentrance! + //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 @@ -592,7 +612,7 @@ bool fix8Dot3NameClash(const Zstring& oldName, const Zstring& newName) //throw //rename file: no copying!!! -void FreeFileSync::renameFile(const Zstring& oldName, const Zstring& newName) //throw (FileError, ErrorDifferentVolume); +void ffs3::renameFile(const Zstring& oldName, const Zstring& newName) //throw (FileError, ErrorDifferentVolume); { try { @@ -609,9 +629,9 @@ void FreeFileSync::renameFile(const Zstring& oldName, const Zstring& newName) // } -using FreeFileSync::MoveFileCallback; +using ffs3::MoveFileCallback; -class CopyCallbackImpl : public FreeFileSync::CopyFileCallback //callback functionality +class CopyCallbackImpl : public ffs3::CopyFileCallback //callback functionality { public: CopyCallbackImpl(MoveFileCallback* callback) : moveCallback(callback) {} @@ -634,7 +654,7 @@ private: }; -void FreeFileSync::moveFile(const Zstring& sourceFile, const Zstring& targetFile, MoveFileCallback* callback) //throw (FileError); +void ffs3::moveFile(const Zstring& sourceFile, const Zstring& targetFile, MoveFileCallback* callback) //throw (FileError); { if (somethingExists(targetFile)) //test file existence: e.g. Linux might silently overwrite existing symlinks { @@ -660,6 +680,7 @@ void FreeFileSync::moveFile(const Zstring& sourceFile, const Zstring& targetFile copyFile(sourceFile, targetFile, true, //copy symbolic links + false, //dont copy filesystem permissions #ifdef FFS_WIN NULL, //supply handler for making shadow copies #endif @@ -671,7 +692,7 @@ void FreeFileSync::moveFile(const Zstring& sourceFile, const Zstring& targetFile } -class TraverseOneLevel : public FreeFileSync::TraverseCallback +class TraverseOneLevel : public ffs3::TraverseCallback { public: typedef std::vector<std::pair<Zstring, Zstring> > NamePair; @@ -710,12 +731,12 @@ private: void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExistingDirs, MoveFileCallback* callback) //throw (FileError); { - using namespace FreeFileSync; + using namespace ffs3; //handle symbolic links if (symlinkExists(sourceDir)) { - createDirectory(targetDir, sourceDir, true); //copy symbolic link + createDirectory(targetDir, sourceDir, true, false); //copy symbolic link, don't copy permissions removeDirectory(sourceDir); //if target is already another symlink or directory, sourceDir-symlink is silently deleted return; } @@ -740,7 +761,7 @@ void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool catch (const ErrorDifferentVolume&) {} //create target - createDirectory(targetDir, sourceDir, false); //throw (FileError); + createDirectory(targetDir, sourceDir, false, false); //throw (FileError); don't copy permissions } //call back once per folder @@ -763,13 +784,13 @@ void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool TraverseOneLevel traverseCallback(fileList, dirList); traverseFolder(sourceDir, false, &traverseCallback); //traverse one level, don't follow symlinks - const Zstring targetDirFormatted = targetDir.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? //ends with path separator + const Zstring targetDirFormatted = targetDir.EndsWith(common::FILE_NAME_SEPARATOR) ? //ends with path separator targetDir : - targetDir + globalFunctions::FILE_NAME_SEPARATOR; + targetDir + common::FILE_NAME_SEPARATOR; //move files for (TraverseOneLevel::NamePair::const_iterator i = fileList.begin(); i != fileList.end(); ++i) - FreeFileSync::moveFile(i->second, targetDirFormatted + i->first, callback); + ffs3::moveFile(i->second, targetDirFormatted + i->first, callback); //move directories for (TraverseOneLevel::NamePair::const_iterator i = dirList.begin(); i != dirList.end(); ++i) @@ -782,7 +803,7 @@ void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool } -void FreeFileSync::moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExistingDirs, MoveFileCallback* callback) //throw (FileError); +void ffs3::moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExistingDirs, MoveFileCallback* callback) //throw (FileError); { #ifdef FFS_WIN const Zstring& sourceDirFormatted = sourceDir; @@ -790,12 +811,12 @@ void FreeFileSync::moveDirectory(const Zstring& sourceDir, const Zstring& target #elif defined FFS_LINUX const Zstring sourceDirFormatted = //remove trailing slash - sourceDir.size() > 1 && sourceDir.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? //exception: allow '/' - sourceDir.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR) : + sourceDir.size() > 1 && sourceDir.EndsWith(common::FILE_NAME_SEPARATOR) ? //exception: allow '/' + sourceDir.BeforeLast(common::FILE_NAME_SEPARATOR) : sourceDir; const Zstring targetDirFormatted = //remove trailing slash - targetDir.size() > 1 && targetDir.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? //exception: allow '/' - targetDir.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR) : + targetDir.size() > 1 && targetDir.EndsWith(common::FILE_NAME_SEPARATOR) ? //exception: allow '/' + targetDir.BeforeLast(common::FILE_NAME_SEPARATOR) : targetDir; #endif @@ -803,7 +824,7 @@ void FreeFileSync::moveDirectory(const Zstring& sourceDir, const Zstring& target } -class FilesDirsOnlyTraverser : public FreeFileSync::TraverseCallback +class FilesDirsOnlyTraverser : public ffs3::TraverseCallback { public: FilesDirsOnlyTraverser(std::vector<Zstring>& files, std::vector<Zstring>& dirs) : @@ -837,7 +858,7 @@ private: }; -void FreeFileSync::removeDirectory(const Zstring& directory) +void ffs3::removeDirectory(const Zstring& directory) { //no error situation if directory is not existing! manual deletion relies on it! if (!somethingExists(directory)) @@ -852,7 +873,7 @@ void FreeFileSync::removeDirectory(const Zstring& directory) FILE_ATTRIBUTE_NORMAL)) // attributes to set { wxString errorMessage = wxString(_("Error deleting directory:")) + wxT("\n\"") + directory.c_str() + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } #endif @@ -867,7 +888,7 @@ void FreeFileSync::removeDirectory(const Zstring& directory) #endif { wxString errorMessage = wxString(_("Error deleting directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } return; } @@ -877,7 +898,7 @@ void FreeFileSync::removeDirectory(const Zstring& directory) //get all files and directories from current directory (WITHOUT subdirectories!) FilesDirsOnlyTraverser traverser(fileList, dirList); - FreeFileSync::traverseFolder(directory, false, &traverser); //don't follow symlinks + ffs3::traverseFolder(directory, false, &traverser); //don't follow symlinks //delete files std::for_each(fileList.begin(), fileList.end(), removeFile); @@ -893,13 +914,13 @@ void FreeFileSync::removeDirectory(const Zstring& directory) #endif { wxString errorMessage = wxString(_("Error deleting directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } } //optionally: copy directory last change date, DO NOTHING if something fails -bool FreeFileSync::copyFileTimes(const Zstring& sourceDir, const Zstring& targetDir, bool deRefSymlinks) //throw() +void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, bool deRefSymlinks) //throw (FileError) { #ifdef FFS_WIN FILETIME creationTime = {0}; @@ -908,30 +929,39 @@ bool FreeFileSync::copyFileTimes(const Zstring& sourceDir, const Zstring& target { WIN32_FILE_ATTRIBUTE_DATA sourceAttr; - if (!::GetFileAttributesEx(applyLongPathPrefix(sourceDir).c_str(), //__in LPCTSTR lpFileName, + if (!::GetFileAttributesEx(applyLongPathPrefix(sourceObj).c_str(), //__in LPCTSTR lpFileName, GetFileExInfoStandard, //__in GET_FILEEX_INFO_LEVELS fInfoLevelId, &sourceAttr)) //__out LPVOID lpFileInformation - return false; + { + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceObj) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } if ((sourceAttr.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && deRefSymlinks) //we have a symlink AND need to dereference... { - HANDLE hDirRead = ::CreateFile(applyLongPathPrefix(sourceDir).c_str(), - FILE_READ_ATTRIBUTES, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, //needed to open a directory; no FILE_FLAG_OPEN_REPARSE_POINT => deref symlinks - NULL); - if (hDirRead == INVALID_HANDLE_VALUE) - return false; - - boost::shared_ptr<void> dummy(hDirRead, ::CloseHandle); - - if (!::GetFileTime(hDirRead, //__in HANDLE hFile, + HANDLE hSource = ::CreateFile(applyLongPathPrefix(sourceObj).c_str(), + FILE_READ_ATTRIBUTES, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, //needed to open a directory; no FILE_FLAG_OPEN_REPARSE_POINT => deref symlinks + NULL); + if (hSource == INVALID_HANDLE_VALUE) + { + 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, &creationTime, //__out_opt LPFILETIME lpCreationTime, &lastAccessTime, //__out_opt LPFILETIME lpLastAccessTime, &lastWriteTime)) //__out_opt LPFILETIME lpLastWriteTime - return false; + { + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceObj) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } } else { @@ -941,59 +971,75 @@ bool FreeFileSync::copyFileTimes(const Zstring& sourceDir, const Zstring& target } } + HANDLE hTarget = ::CreateFile(applyLongPathPrefix(targetObj).c_str(), + FILE_WRITE_ATTRIBUTES, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | //needed to open a directory + (deRefSymlinks ? 0 : FILE_FLAG_OPEN_REPARSE_POINT), //process symlinks + NULL); + if (hTarget == INVALID_HANDLE_VALUE) + { + wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetObj) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } - HANDLE hDirWrite = ::CreateFile(applyLongPathPrefix(targetDir).c_str(), - FILE_WRITE_ATTRIBUTES, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS | //needed to open a directory - (deRefSymlinks ? 0 : FILE_FLAG_OPEN_REPARSE_POINT), //process symlinks - NULL); - if (hDirWrite == INVALID_HANDLE_VALUE) - return false; - - boost::shared_ptr<void> dummy(hDirWrite, ::CloseHandle); + boost::shared_ptr<void> dummy(hTarget, ::CloseHandle); - if (!::SetFileTime(hDirWrite, + if (!::SetFileTime(hTarget, &creationTime, &lastAccessTime, &lastWriteTime)) //return value not evalutated! - return false; + { + wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetObj) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } #elif defined FFS_LINUX if (deRefSymlinks) { - struct stat dirInfo; - if (::stat(sourceDir.c_str(), &dirInfo) != 0) //read file attributes from source directory - return false; + struct stat objInfo; + if (::stat(sourceObj.c_str(), &objInfo) != 0) //read file attributes from source directory + { + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceObj) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } struct utimbuf newTimes; - newTimes.actime = dirInfo.st_atime; - newTimes.modtime = dirInfo.st_mtime; + newTimes.actime = objInfo.st_atime; + newTimes.modtime = objInfo.st_mtime; //(try to) set new "last write time" - if (::utime(targetDir.c_str(), &newTimes) != 0) //return value not evalutated! - return false; + if (::utime(targetObj.c_str(), &newTimes) != 0) //return value not evalutated! + { + wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetObj) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } } else { - struct stat dirInfo; - if (::lstat(sourceDir.c_str(), &dirInfo) != 0) //read file attributes from source directory - return false; + struct stat objInfo; + if (::lstat(sourceObj.c_str(), &objInfo) != 0) //read file attributes from source directory + { + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceObj) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } struct timeval newTimes[2]; - newTimes[0].tv_sec = dirInfo.st_atime; /* seconds */ + newTimes[0].tv_sec = objInfo.st_atime; /* seconds */ newTimes[0].tv_usec = 0; /* microseconds */ - newTimes[1].tv_sec = dirInfo.st_mtime; /* seconds */ + newTimes[1].tv_sec = objInfo.st_mtime; /* seconds */ newTimes[1].tv_usec = 0; /* microseconds */ - if (::lutimes(targetDir.c_str(), newTimes) != 0) //return value not evalutated! - return false; + if (::lutimes(targetObj.c_str(), newTimes) != 0) //return value not evalutated! + { + wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetObj) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } } #endif - return true; } @@ -1003,7 +1049,7 @@ namespace Zstring resolveDirectorySymlink(const Zstring& dirLinkName) //get full target path of symbolic link to a directory { //open handle to target of symbolic link - const HANDLE hDir = ::CreateFile(FreeFileSync::applyLongPathPrefix(dirLinkName).c_str(), + const HANDLE hDir = ::CreateFile(ffs3::applyLongPathPrefix(dirLinkName).c_str(), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, @@ -1018,7 +1064,6 @@ Zstring resolveDirectorySymlink(const Zstring& dirLinkName) //get full target pa const size_t BUFFER_SIZE = 10000; TCHAR targetPath[BUFFER_SIZE]; - //dynamically load windows API function typedef DWORD (WINAPI *GetFinalPathNameByHandleWFunc)( HANDLE hFile, @@ -1026,7 +1071,7 @@ Zstring resolveDirectorySymlink(const Zstring& dirLinkName) //get full target pa DWORD cchFilePath, DWORD dwFlags); static const GetFinalPathNameByHandleWFunc getFinalPathNameByHandle = - Utility::loadDllFunction<GetFinalPathNameByHandleWFunc>(L"kernel32.dll", "GetFinalPathNameByHandleW"); + util::loadDllFunction<GetFinalPathNameByHandleWFunc>(L"kernel32.dll", "GetFinalPathNameByHandleW"); if (getFinalPathNameByHandle == NULL) throw FileError(wxString(_("Error loading library function:")) + wxT("\n\"") + wxT("GetFinalPathNameByHandleW") + wxT("\"")); @@ -1042,55 +1087,11 @@ Zstring resolveDirectorySymlink(const Zstring& dirLinkName) //get full target pa return targetPath; } -//#include <aclapi.h> -////optionally: copy additional metadata, DO NOTHING if something fails -//void copyAdditionalMetadata(const Zstring& sourceDir, const Zstring& targetDir) -//{ -// //copy NTFS permissions -// -// PSECURITY_DESCRIPTOR pSD; -// -// PACL pDacl; -// if (::GetNamedSecurityInfo( -// const_cast<DefaultChar*>(sourceDir.c_str()), -// SE_FILE_OBJECT, //file or directory -// DACL_SECURITY_INFORMATION, -// NULL, -// NULL, -// &pDacl, -// NULL, -// &pSD -// ) == ERROR_SUCCESS) -// { -// //(try to) set new security information -// if (::SetNamedSecurityInfo( -// const_cast<DefaultChar*>(targetDir.c_str()), -// SE_FILE_OBJECT, //file or directory -// DACL_SECURITY_INFORMATION, -// NULL, -// NULL, -// pDacl, -// NULL) != ERROR_SUCCESS) //return value not evalutated! -// { -// const wxString errorMessage = wxString(wxT("Error 2:")) + wxT("\n\"") + targetDir.c_str() + wxT("\""); -// throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); -// } -// -//#warning BUG! -// LocalFree(pSD); -// } -// else -// { -// const wxString errorMessage = wxString(wxT("Error 1:")) + wxT("\n\"") + sourceDir.c_str() + wxT("\""); -// throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); -// } -// -//} #elif defined FFS_LINUX -void copySymlinkInternal(const Zstring& sourceLink, const Zstring& targetLink) //throw (FileError) +void copySymlinkInternal(const Zstring& sourceLink, const Zstring& targetLink, bool copyFilePermissions) //throw (FileError) { - using namespace FreeFileSync; + using namespace ffs3; //copy symbolic link const int BUFFER_SIZE = 10000; @@ -1099,7 +1100,7 @@ void copySymlinkInternal(const Zstring& sourceLink, const Zstring& targetLink) / if (bytesWritten < 0 || bytesWritten == BUFFER_SIZE) { wxString errorMessage = wxString(_("Error resolving symbolic link:")) + wxT("\n\"") + zToWx(sourceLink) + wxT("\""); - if (bytesWritten < 0) errorMessage += wxString(wxT("\n\n")) + FreeFileSync::getLastErrorFormatted(); + if (bytesWritten < 0) errorMessage += wxString(wxT("\n\n")) + ffs3::getLastErrorFormatted(); throw FileError(errorMessage); } //set null-terminating char @@ -1108,54 +1109,325 @@ void copySymlinkInternal(const Zstring& sourceLink, const Zstring& targetLink) / if (::symlink(buffer, targetLink.c_str()) != 0) { const wxString errorMessage = wxString(_("Error copying symbolic link:")) + wxT("\n\"") + zToWx(sourceLink) + wxT("\" ->\n\"") + zToWx(targetLink) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } //allow only consistent objects to be created -> don't place before ::symlink, targetLink may already exist Loki::ScopeGuard guardTargetLink = Loki::MakeGuard(::unlink, targetLink); - if (!copyFileTimes(sourceLink, targetLink, false)) + copyFileTimes(sourceLink, targetLink, false); //throw (FileError) + + if (copyFilePermissions) + copyObjectPermissions(sourceLink, targetLink, false); //throw FileError() + + guardTargetLink.Dismiss(); +} +#endif +} + + +namespace ffs3 +{ +#ifdef FFS_WIN +class Privileges +{ +public: + static Privileges& getInstance() { - wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetLink) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + static Privileges instance; + return instance; } - guardTargetLink.Dismiss(); + 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 +} + + +//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 + //enable privilege: required to read/write SACL information + Privileges::getInstance().ensureActive(SE_SECURITY_NAME); //polling allowed... + + //enable privilege: required to copy owner information + Privileges::getInstance().ensureActive(SE_RESTORE_NAME); + + //the following privilege may be required according to http://msdn.microsoft.com/en-us/library/aa364399(VS.85).aspx (although not needed nor active in my tests) + Privileges::getInstance().ensureActive(SE_BACKUP_NAME); + + PSECURITY_DESCRIPTOR buffer = NULL; + PSID owner = NULL; + PSID group = NULL; + PACL dacl = NULL; + PACL sacl = NULL; + + //http://msdn.microsoft.com/en-us/library/aa364399(v=VS.85).aspx + const HANDLE hSource = ::CreateFile(ffs3::applyLongPathPrefix(source).c_str(), + READ_CONTROL | ACCESS_SYSTEM_SECURITY, //ACCESS_SYSTEM_SECURITY required for SACL access + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | (derefSymlinks ? 0 : FILE_FLAG_OPEN_REPARSE_POINT), //FILE_FLAG_BACKUP_SEMANTICS needed to open a directory + NULL); + if (hSource == INVALID_HANDLE_VALUE) + throw FileError(wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(source) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted()); + boost::shared_ptr<void> dummy(hSource, ::CloseHandle); + +// DWORD rc = ::GetNamedSecurityInfo(const_cast<WCHAR*>(applyLongPathPrefix(source).c_str()), -> does NOT dereference symlinks! + DWORD rc = ::GetSecurityInfo( + hSource, //__in LPTSTR pObjectName, + SE_FILE_OBJECT, //__in SE_OBJECT_TYPE ObjectType, + OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION, //__in SECURITY_INFORMATION SecurityInfo, + &owner, //__out_opt PSID *ppsidOwner, + &group, //__out_opt PSID *ppsidGroup, + &dacl, //__out_opt PACL *ppDacl, + &sacl, //__out_opt PACL *ppSacl, + &buffer); //__out_opt PSECURITY_DESCRIPTOR *ppSecurityDescriptor + if (rc != ERROR_SUCCESS) + { + const wxString errorMessage = wxString(_("Error copying file permissions:")) + wxT("\n\"") + zToWx(source) + wxT("\" ->\n\"") + zToWx(target) + wxT("\"") + wxT("\n\n"); + throw FileError(errorMessage + ffs3::getLastErrorFormatted(rc)); + } + boost::shared_ptr<void> dummy2(buffer, ::LocalFree); + + + const Zstring targetFmt = ffs3::applyLongPathPrefix(target); + + //read-only file attribute may cause trouble: temporarily reset it + const DWORD targetAttr = ::GetFileAttributes(targetFmt.c_str()); + Loki::ScopeGuard resetAttributes = Loki::MakeGuard(::SetFileAttributes, targetFmt, targetAttr); + if ( targetAttr != INVALID_FILE_ATTRIBUTES && + (targetAttr & FILE_ATTRIBUTE_READONLY)) + ::SetFileAttributes(targetFmt.c_str(), targetAttr & (~FILE_ATTRIBUTE_READONLY)); //try to... + else + resetAttributes.Dismiss(); + + + 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 + if (hTarget == INVALID_HANDLE_VALUE) + throw FileError(wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(target) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted()); + boost::shared_ptr<void> dummy3(hTarget, ::CloseHandle); + +// rc = ::SetNamedSecurityInfo(const_cast<WCHAR*>(applyLongPathPrefix(target).c_str()), //__in LPTSTR pObjectName, -> does NOT dereference symlinks! + rc = ::SetSecurityInfo( + hTarget, //__in LPTSTR pObjectName, + SE_FILE_OBJECT, //__in SE_OBJECT_TYPE ObjectType, + OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION, //__in SECURITY_INFORMATION SecurityInfo, + owner, //__in_opt PSID psidOwner, + group, //__in_opt PSID psidGroup, + dacl, //__in_opt PACL pDacl, + sacl); //__in_opt PACL pSacl + + if (rc != ERROR_SUCCESS) + { + const wxString errorMessage = wxString(_("Error copying file permissions:")) + wxT("\n\"") + zToWx(source) + wxT("\" ->\n\"") + zToWx(target) + wxT("\"") + wxT("\n\n"); + throw FileError(errorMessage + ffs3::getLastErrorFormatted(rc)); + } + +#elif defined FFS_LINUX + if (derefSymlinks) + { + struct stat fileInfo; + if ( ::stat(source.c_str(), &fileInfo) != 0 || + ::chown(target.c_str(), fileInfo.st_uid, fileInfo.st_gid) != 0 || // may require admin rights! + ::chmod(target.c_str(), fileInfo.st_mode) != 0) + { + const wxString errorMessage = wxString(_("Error copying file permissions:")) + wxT("\n\"") + zToWx(source) + wxT("\" ->\n\"") + zToWx(target) + wxT("\"") + wxT("\n\n"); + throw FileError(errorMessage + ffs3::getLastErrorFormatted()); + } + } + else + { + struct stat fileInfo; + if ( ::lstat(source.c_str(), &fileInfo) != 0 || + ::lchown(target.c_str(), fileInfo.st_uid, fileInfo.st_gid) != 0 || // may require admin rights! + (!symlinkExists(target) && ::chmod(target.c_str(), fileInfo.st_mode) != 0)) //setting access permissions doesn't make sense for symlinks on Linux: there is no lchmod() + { + const wxString errorMessage = wxString(_("Error copying file permissions:")) + wxT("\n\"") + zToWx(source) + wxT("\" ->\n\"") + zToWx(target) + wxT("\"") + wxT("\n\n"); + throw FileError(errorMessage + ffs3::getLastErrorFormatted()); + } + } #endif } -void createDirectoryRecursively(const Zstring& directory, const Zstring& templateDir, const bool copyDirectorySymLinks, const int level) + +void createDirectoryRecursively(const Zstring& directory, const Zstring& templateDir, bool copyDirectorySymLinks, bool copyFilePermissions, int level) { - using namespace FreeFileSync; + using namespace ffs3; - if (FreeFileSync::dirExists(directory)) + if (ffs3::dirExists(directory)) return; if (level == 100) //catch endless recursion return; //try to create parent folders first - const Zstring dirParent = directory.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); - if (!dirParent.empty() && !FreeFileSync::dirExists(dirParent)) + const Zstring dirParent = directory.BeforeLast(common::FILE_NAME_SEPARATOR); + if (!dirParent.empty() && !ffs3::dirExists(dirParent)) { //call function recursively - const Zstring templateParent = templateDir.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); - createDirectoryRecursively(dirParent, templateParent, false, level + 1); //don't create symbolic links in recursion! + const Zstring templateParent = templateDir.BeforeLast(common::FILE_NAME_SEPARATOR); + createDirectoryRecursively(dirParent, templateParent, false, copyFilePermissions, level + 1); //don't create symbolic links in recursion! } + struct TryCleanUp + { + static void tryDeleteDir(const Zstring& linkname) //throw () + { + try + { + removeDirectory(linkname); + } + catch (...) {} + } + }; + //now creation should be possible #ifdef FFS_WIN - const DWORD templateAttr = templateDir.empty() ? - INVALID_FILE_ATTRIBUTES : + const DWORD templateAttr = templateDir.empty() ? INVALID_FILE_ATTRIBUTES : ::GetFileAttributes(applyLongPathPrefix(templateDir).c_str()); //returns successful for broken symlinks if (templateAttr == INVALID_FILE_ATTRIBUTES) //fallback { if (!::CreateDirectory(applyLongPathPrefixCreateDir(directory).c_str(), // pointer to a directory path string - NULL) && level == 0) + NULL)) { + if (level != 0) return; const wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + directory.c_str() + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } } else @@ -1169,22 +1441,18 @@ void createDirectoryRecursively(const Zstring& directory, const Zstring& templat const Zstring linkPath = resolveDirectorySymlink(templateDir); if (linkPath.empty()) { - if (level == 0) - throw FileError(wxString(_("Error resolving symbolic link:")) + wxT("\n\"") + templateDir.c_str() + wxT("\"")); + if (level != 0) return; + throw FileError(wxString(_("Error resolving symbolic link:")) + wxT("\n\"") + templateDir.c_str() + wxT("\"")); } - else - { - if (!::CreateDirectoryEx( // this function automatically copies symbolic links if encountered - applyLongPathPrefix(linkPath).c_str(), // pointer to path string of template directory - applyLongPathPrefixCreateDir(directory).c_str(), // pointer to a directory path string - NULL) && level == 0) - { - const wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + directory.c_str() + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); - } - //(try to) copy additional metadata like last modification time: no measurable performance drawback - //copyAdditionalMetadata(linkPath, directory); + if (!::CreateDirectoryEx( // this function automatically copies symbolic links if encountered + applyLongPathPrefix(linkPath).c_str(), // pointer to path string of template directory + applyLongPathPrefixCreateDir(directory).c_str(), // pointer to a directory path string + NULL)) + { + if (level != 0) return; + const wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + directory.c_str() + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } } else //in all other cases @@ -1192,45 +1460,28 @@ void createDirectoryRecursively(const Zstring& directory, const Zstring& templat if (!::CreateDirectoryEx( // this function automatically copies symbolic links if encountered applyLongPathPrefix(templateDir).c_str(), // pointer to path string of template directory applyLongPathPrefixCreateDir(directory).c_str(), // pointer to a directory path string - NULL) && level == 0) + NULL)) { + if (level != 0) return; const wxString errorMessage = isSymlink ? //give a more meaningful errormessage if copying a symbolic link failed, e.g. "C:\Users\ZenJu\Application Data" (wxString(_("Error copying symbolic link:")) + wxT("\n\"") + templateDir.c_str() + wxT("\" ->\n\"") + directory.c_str() + wxT("\"")) : (wxString(_("Error creating directory:")) + wxT("\n\"") + directory.c_str() + wxT("\"")); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } + } + //ensure cleanup: + Loki::ScopeGuard guardNewDir = Loki::MakeGuard(&TryCleanUp::tryDeleteDir, directory); - if (copyDirectorySymLinks && isSymlink) //we need to copy the Symbolic Link's change date manually - { - struct TryCleanUp - { - static void tryDeleteLink(const Zstring& linkname) //throw () - { - try - { - removeDirectory(linkname); - } - catch (...) {} - } - }; - //allow only consistent objects to be created -> don't place before ::CreateDirectoryEx, targetLink may already exist - Loki::ScopeGuard guardTargetLink = Loki::MakeGuard(&TryCleanUp::tryDeleteLink, directory); - - if (!copyFileTimes(templateDir, directory, false)) - { - wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(directory) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); - } + if (copyDirectorySymLinks && isSymlink) //we need to copy the Symbolic Link's change date manually + copyFileTimes(templateDir, directory, false); //throw (FileError) - guardTargetLink.Dismiss(); - } + if (copyFilePermissions) + copyObjectPermissions(templateDir, directory, !copyDirectorySymLinks); //throw FileError() - //(try to) copy additional metadata like last modification time: no measurable performance drawback - //copyAdditionalMetadata(templateDir, directory); - } + guardNewDir.Dismiss(); //target has been created successfully! } #elif defined FFS_LINUX //symbolic link handling @@ -1238,51 +1489,45 @@ void createDirectoryRecursively(const Zstring& directory, const Zstring& templat !templateDir.empty() && symlinkExists(templateDir)) //there is no directory-type symlink in Linux! => just copy as file - return copySymlinkInternal(templateDir, directory); //throw (FileError) + return copySymlinkInternal(templateDir, directory, copyFilePermissions); //throw (FileError) //default directory creation - if (::mkdir(directory.c_str(), 0755) != 0 && level == 0) + if (::mkdir(directory.c_str(), 0755) != 0) { + if (level != 0) return; wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } -//copy directory permissions: not sure if this is a good idea: if a directory is read-only copying/sync'ing of files will fail... - /* - if (templateDirExists) - { - struct stat fileInfo; - if (stat(templateDir.c_str(), &fileInfo) != 0) //read permissions from template directory - throw FileError(Zstring(_("Error reading file attributes:")) + wxT("\n\"") + templateDir + wxT("\"")); + //ensure cleanup: + Loki::ScopeGuard guardNewDir = Loki::MakeGuard(&TryCleanUp::tryDeleteDir, directory); - // reset the umask as we want to create the directory with exactly the same permissions as the template - wxCHANGE_UMASK(0); + if (!templateDir.empty() && copyFilePermissions) + copyObjectPermissions(templateDir, directory, true); //throw FileError() - if (mkdir(directory.c_str(), fileInfo.st_mode) != 0 && level == 0) - throw FileError(Zstring(_("Error creating directory:")) + wxT("\n\"") + directory + wxT("\"")); - } - else - { - if (mkdir(directory.c_str(), 0777) != 0 && level == 0) - throw FileError(Zstring(_("Error creating directory:")) + wxT("\n\"") + directory + wxT("\"")); - } - */ + guardNewDir.Dismiss(); //target has been created successfully! #endif } -void FreeFileSync::createDirectory(const Zstring& directory, const Zstring& templateDir, bool copyDirectorySymLinks) +void ffs3::createDirectory(const Zstring& directory, const Zstring& templateDir, bool copyDirectorySymLinks, bool copyFilePermissions) { //remove trailing separator - const Zstring dirFormatted = directory.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? - directory.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR) : + const Zstring dirFormatted = directory.EndsWith(common::FILE_NAME_SEPARATOR) ? + directory.BeforeLast(common::FILE_NAME_SEPARATOR) : directory; - const Zstring templateFormatted = templateDir.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? - templateDir.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR) : + const Zstring templateFormatted = templateDir.EndsWith(common::FILE_NAME_SEPARATOR) ? + templateDir.BeforeLast(common::FILE_NAME_SEPARATOR) : templateDir; - createDirectoryRecursively(dirFormatted, templateFormatted, copyDirectorySymLinks, 0); + createDirectoryRecursively(dirFormatted, templateFormatted, copyDirectorySymLinks, copyFilePermissions, 0); +} + + +void ffs3::createDirectory(const Zstring& directory) +{ + ffs3::createDirectory(directory, Zstring(), false, false); } @@ -1290,11 +1535,15 @@ namespace { Zstring createTempName(const Zstring& filename) { - Zstring output = filename + FreeFileSync::TEMP_FILE_ENDING; + Zstring output = filename + ffs3::TEMP_FILE_ENDING; + +#ifndef _MSC_VER +#warning TEMP_FILE_ENDING -> harmonize with other "endings" remove trailing dot +#endif //ensure uniqueness - for (int i = 1; FreeFileSync::somethingExists(output); ++i) - output = filename + DefaultChar('_') + numberToZstring(i) + FreeFileSync::TEMP_FILE_ENDING; + for (int i = 1; ffs3::somethingExists(output); ++i) + output = filename + DefaultChar('_') + numberToZstring(i) + ffs3::TEMP_FILE_ENDING; return output; } @@ -1318,7 +1567,7 @@ DWORD CALLBACK copyCallbackInternal( HANDLE hDestinationFile, LPVOID lpData) { - using FreeFileSync::CopyFileCallback; + using ffs3::CopyFileCallback; //small performance optimization: it seems this callback function is called for every 64 kB (depending on cluster size). static size_t callNr = 0; @@ -1334,15 +1583,20 @@ DWORD CALLBACK copyCallbackInternal( This will then be handled in future versions of FreeFileSync.\n\nThanks -ZenJu"), NULL, 0); - CopyFileCallback* callback = static_cast<CopyFileCallback*>(lpData); - - switch (callback->updateCopyStatus(wxULongLong(totalBytesTransferred.HighPart, totalBytesTransferred.LowPart))) + try { - case CopyFileCallback::CONTINUE: - break; - case CopyFileCallback::CANCEL: - return PROGRESS_CANCEL; + switch (callback->updateCopyStatus(wxULongLong(totalBytesTransferred.HighPart, totalBytesTransferred.LowPart))) + { + case CopyFileCallback::CONTINUE: + break; + case CopyFileCallback::CANCEL: + return PROGRESS_CANCEL; + } + } + catch (...) + { + ::MessageBox(NULL, wxT("Exception in callback ffs3::copyFile! Please contact the author of FFS."), NULL, 0); } } } @@ -1354,7 +1608,7 @@ DWORD CALLBACK copyCallbackInternal( bool supportForSymbolicLinks() { OSVERSIONINFO osvi; - ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); + ::ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); //symbolic links are supported starting with Vista @@ -1377,7 +1631,7 @@ bool supportForNonEncryptedDestination() osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); //encrypted destination is not supported with Windows 2000 - if (GetVersionEx(&osvi)) + if (::GetVersionEx(&osvi)) return osvi.dwMajorVersion > 5 || (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion > 0); //2000 has majorVersion == 5, minorVersion == 0 //overview: http://msdn.microsoft.com/en-us/library/ms724834(VS.85).aspx @@ -1386,16 +1640,16 @@ bool supportForNonEncryptedDestination() } -void FreeFileSync::copyFile(const Zstring& sourceFile, - const Zstring& targetFile, - bool copyFileSymLinks, - FreeFileSync::ShadowCopy* shadowCopyHandler, - FreeFileSync::CopyFileCallback* callback) +void ffs3::copyFile(const Zstring& sourceFile, + const Zstring& targetFile, + bool copyFileSymLinks, + bool copyFilePermissions, + shadow::ShadowCopy* shadowCopyHandler, + ffs3::CopyFileCallback* callback) { - //FreeFileSync::fileExists(targetFile) -> avoid this call, performance; + //ffs3::fileExists(targetFile) -> avoid this call, performance; //if target exists (very unlikely, because sync-algorithm deletes it) renaming below will fail! - DWORD copyFlags = COPY_FILE_FAIL_IF_EXISTS; //copy symbolic links instead of the files pointed at @@ -1442,47 +1696,71 @@ void FreeFileSync::copyFile(const Zstring& sourceFile, lastError == ERROR_LOCK_VIOLATION)) { //shadowFilename already contains prefix: E.g. "\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Program Files\FFS\sample.dat" - const Zstring shadowFilename(shadowCopyHandler->makeShadowCopy(sourceFile)); + + Zstring shadowFilename; + try + { + shadowFilename = shadowCopyHandler->makeShadowCopy(sourceFile); //throw (FileError) + } + catch (const FileError& e) + { + wxString errorMsg = _("Error copying locked file %x!"); + errorMsg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(sourceFile) + wxT("\"")); + errorMsg += wxT("\n\n") + e.msg(); + throw FileError(errorMsg); + } + return copyFile(shadowFilename, //transferred bytes is automatically reset when new file is copied targetFile, copyFileSymLinks, + copyFilePermissions, NULL, callback); } //assemble error message... const wxString errorMessage = wxString(_("Error copying file:")) + wxT("\n\"") + sourceFile.c_str() + wxT("\" ->\n\"") + targetFile.c_str() + wxT("\"") + wxT("\n\n"); - throw FileError(errorMessage + FreeFileSync::getLastErrorFormatted(lastError)); + throw FileError(errorMessage + ffs3::getLastErrorFormatted(lastError)); } //rename temporary file: do not add anything else here (note specific error handing) - FreeFileSync::renameFile(temporary, targetFile); + ffs3::renameFile(temporary, targetFile); guardTempFile.Dismiss(); //no need to delete temp file anymore - //copy creation date (last modification date is redundantly written, too, even for symlinks) - copyFileTimes(sourceFile, targetFile, !copyFileSymLinks); //throw() + Loki::ScopeGuard guardTargetFile = Loki::MakeGuard(&TryCleanUp::tryDeleteFile, targetFile); + + if (copyFilePermissions) + copyObjectPermissions(sourceFile, targetFile, !copyFileSymLinks); //throw FileError() + + //copy creation date (last modification date is REDUNDANTLY written, too, even for symlinks) + copyFileTimes(sourceFile, targetFile, !copyFileSymLinks); //throw (FileError) + + guardTargetFile.Dismiss(); } #elif defined FFS_LINUX -void FreeFileSync::copyFile(const Zstring& sourceFile, - const Zstring& targetFile, - bool copyFileSymLinks, - CopyFileCallback* callback) +void ffs3::copyFile(const Zstring& sourceFile, + const Zstring& targetFile, + bool copyFileSymLinks, + bool copyFilePermissions, + CopyFileCallback* callback) { - using FreeFileSync::CopyFileCallback; + using ffs3::CopyFileCallback; //symbolic link handling if ( copyFileSymLinks && symlinkExists(sourceFile)) - return copySymlinkInternal(sourceFile, targetFile); //throw (FileError) + { + return copySymlinkInternal(sourceFile, targetFile, copyFilePermissions); //throw (FileError) + } //begin of regular file copy struct stat fileInfo; if (::stat(sourceFile.c_str(), &fileInfo) != 0) //read file attributes from source file (resolving symlinks) { const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } //open sourceFile for reading @@ -1528,26 +1806,19 @@ void FreeFileSync::copyFile(const Zstring& sourceFile, //close output stream before changing attributes fileOut.close(); - //adapt file modification time: - if (!copyFileTimes(sourceFile, temporary, true)) //throw() - { - wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); - } - //rename temporary file - FreeFileSync::renameFile(temporary, targetFile); + ffs3::renameFile(temporary, targetFile); guardTempFile.Dismiss(); //ensure cleanup: - Loki::ScopeGuard guardTargetFile = Loki::MakeGuard(::unlink, targetFile.c_str()); //don't use Utility::CleanUp here + Loki::ScopeGuard guardTargetFile = Loki::MakeGuard(::unlink, targetFile.c_str()); - //set file access rights - if (::chmod(targetFile.c_str(), fileInfo.st_mode) != 0) - { - const wxString errorMessage = wxString(_("Error writing file attributes:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); - } + //adapt file modification time: + copyFileTimes(sourceFile, targetFile, true); //throw (FileError) + + //set file permissions + if (copyFilePermissions) + copyObjectPermissions(sourceFile, targetFile, true); //throw FileError() guardTargetFile.Dismiss(); //target has been created successfully! } @@ -1564,11 +1835,11 @@ Zstring getDriveName(const Zstring& directoryName) //GetVolume() doesn't work un if (volumeName.empty()) return Zstring(); - return volumeName + wxFileName::GetVolumeSeparator().c_str() + globalFunctions::FILE_NAME_SEPARATOR; + return volumeName + wxFileName::GetVolumeSeparator().c_str() + common::FILE_NAME_SEPARATOR; } -bool FreeFileSync::isFatDrive(const Zstring& directoryName) +bool ffs3::isFatDrive(const Zstring& directoryName) { const Zstring driveName = getDriveName(directoryName); if (driveName.empty()) diff --git a/shared/fileHandling.h b/shared/file_handling.h index 6c57e8e4..36bf976f 100644 --- a/shared/fileHandling.h +++ b/shared/file_handling.h @@ -8,7 +8,7 @@ #define FILE_HANDLING_H_INCLUDED #include "zstring.h" -#include "fileError.h" +#include "file_error.h" #include <wx/longlong.h> #ifdef FFS_WIN @@ -16,7 +16,7 @@ #endif -namespace FreeFileSync +namespace ffs3 { Zstring getFormattedDirectoryName(const Zstring& dirname); @@ -35,9 +35,11 @@ enum ResponseSameVol }; ResponseSameVol onSameVolume(const Zstring& folderLeft, const Zstring& folderRight); //throw() -//optionally: copy file or directory create/last change date, DOES NOTHING if something fails -//does NOT dereference symlinks! -bool copyFileTimes(const Zstring& sourceDir, const Zstring& targetDir, bool deRefSymlinks); //throw(); returns true on success +//copy file or directory create/last change date, +void copyFileTimes(const Zstring& sourceDir, const Zstring& targetDir, bool derefSymlinks); //throw (FileError) + +//copy filesystem permissions: probably requires admin rights +void copyObjectPermissions(const Zstring& source, const Zstring& target, bool derefSymlinks); //throw FileError(); //symlink handling: always evaluate target wxULongLong getFilesize(const Zstring& filename); //throw (FileError) @@ -71,7 +73,8 @@ void moveFile(const Zstring& sourceFile, const Zstring& targetFile, MoveFileCall void moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExistingDirs, MoveFileCallback* callback = NULL); //throw (FileError); //creates superdirectories automatically: -void createDirectory(const Zstring& directory, const Zstring& templateDir = Zstring(), bool copyDirectorySymLinks = false); //throw (FileError); +void createDirectory(const Zstring& directory, const Zstring& templateDir, bool copyDirectorySymLinks, bool copyFilePermissions); //throw (FileError); +void createDirectory(const Zstring& directory); //throw (FileError); -> function overload avoids default parameter ambiguity issues! struct CopyFileCallback //callback functionality { @@ -85,13 +88,14 @@ struct CopyFileCallback //callback functionality virtual Response updateCopyStatus(const wxULongLong& totalBytesTransferred) = 0; //DON'T throw exceptions here, at least in Windows build! }; -void copyFile(const Zstring& sourceFile, +void copyFile(const Zstring& sourceFile, //throw (FileError); const Zstring& targetFile, bool copyFileSymLinks, + bool copyFilePermissions, #ifdef FFS_WIN - ShadowCopy* shadowCopyHandler = NULL, //supply handler for making shadow copies + shadow::ShadowCopy* shadowCopyHandler, //supply handler for making shadow copies, may be NULL #endif - CopyFileCallback* callback = NULL); //throw (FileError); + CopyFileCallback* callback); //may be NULL //Note: it MAY happen that copyFile() leaves temp files behind, e.g. temporary network drop. // => clean them up at an appropriate time (automatically set sync directions to delete them). They have the following ending: const Zstring TEMP_FILE_ENDING = DefaultStr(".ffs_tmp"); diff --git a/shared/fileID.cpp b/shared/file_id.cpp index 2c608afc..f61108c0 100644 --- a/shared/fileID.cpp +++ b/shared/file_id.cpp @@ -4,12 +4,12 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "fileID.h" +#include "file_id.h" #ifdef FFS_WIN -#include "staticAssert.h" +#include "assert_static.h" #include <wx/msw/wrapwin.h> //includes "windows.h" -#include "longPathPrefix.h" +#include "long_path_prefix.h" #include <boost/shared_ptr.hpp> #elif defined FFS_LINUX @@ -19,15 +19,15 @@ #ifdef FFS_WIN -Utility::FileID Utility::retrieveFileID(const Zstring& filename) +util::FileID util::retrieveFileID(const Zstring& filename) { //ensure our DWORD_FFS really is the same as DWORD - assert_static(sizeof(Utility::FileID::DWORD_FFS) == sizeof(DWORD)); + assert_static(sizeof(util::FileID::DWORD_FFS) == sizeof(DWORD)); //WARNING: CreateFile() is SLOW, while GetFileInformationByHandle() is quite cheap! //http://msdn.microsoft.com/en-us/library/aa363788(VS.85).aspx - const HANDLE hFile = ::CreateFile(FreeFileSync::applyLongPathPrefix(filename).c_str(), + const HANDLE hFile = ::CreateFile(ffs3::applyLongPathPrefix(filename).c_str(), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, @@ -41,31 +41,31 @@ Utility::FileID Utility::retrieveFileID(const Zstring& filename) BY_HANDLE_FILE_INFORMATION info; if (::GetFileInformationByHandle(hFile, &info)) { - return Utility::FileID(info.dwVolumeSerialNumber, + return util::FileID(info.dwVolumeSerialNumber, info.nFileIndexHigh, info.nFileIndexLow); } } - return Utility::FileID(); //empty ID + return util::FileID(); //empty ID } #elif defined FFS_LINUX -Utility::FileID Utility::retrieveFileID(const Zstring& filename) +util::FileID util::retrieveFileID(const Zstring& filename) { struct stat fileInfo; if (::lstat(filename.c_str(), &fileInfo) == 0) //lstat() does not resolve symlinks - return Utility::FileID(fileInfo.st_dev, fileInfo.st_ino); + return util::FileID(fileInfo.st_dev, fileInfo.st_ino); - return Utility::FileID(); //empty ID + return util::FileID(); //empty ID } #endif -bool Utility::sameFileSpecified(const Zstring& file1, const Zstring& file2) +bool util::sameFileSpecified(const Zstring& file1, const Zstring& file2) { - const Utility::FileID id1 = retrieveFileID(file1); - const Utility::FileID id2 = retrieveFileID(file2); + const util::FileID id1 = retrieveFileID(file1); + const util::FileID id2 = retrieveFileID(file2); if (id1 != FileID() && id2 != FileID()) return id1 == id2; diff --git a/shared/fileID.h b/shared/file_id.h index 7b48412a..d00ca20a 100644 --- a/shared/fileID.h +++ b/shared/file_id.h @@ -17,7 +17,7 @@ //unique file identifier -namespace Utility +namespace util { class FileID { @@ -60,7 +60,7 @@ FileID retrieveFileID(const Zstring& filename); //test whether two distinct paths point to the same file or directory: // true: paths point to same files/dirs -// false: error occured OR point to different files/dirs +// false: error occurred OR point to different files/dirs bool sameFileSpecified(const Zstring& file1, const Zstring& file2); } @@ -85,13 +85,13 @@ bool sameFileSpecified(const Zstring& file1, const Zstring& file2); //---------------Inline Implementation--------------------------------------------------- #ifdef FFS_WIN inline -Utility::FileID::FileID() : +util::FileID::FileID() : dwVolumeSerialNumber(0), nFileIndexHigh(0), nFileIndexLow(0) {} inline -Utility::FileID::FileID(DWORD_FFS dwVolumeSN, +util::FileID::FileID(DWORD_FFS dwVolumeSN, DWORD_FFS fileIndexHi, DWORD_FFS fileIndexLo) : dwVolumeSerialNumber(dwVolumeSN), @@ -99,7 +99,7 @@ Utility::FileID::FileID(DWORD_FFS dwVolumeSN, nFileIndexLow(fileIndexLo) {} inline -bool Utility::FileID::isNull() const +bool util::FileID::isNull() const { return dwVolumeSerialNumber == 0 && nFileIndexHigh == 0 && @@ -107,7 +107,7 @@ bool Utility::FileID::isNull() const } inline -bool Utility::FileID::operator==(const FileID& rhs) const +bool util::FileID::operator==(const FileID& rhs) const { return dwVolumeSerialNumber == rhs.dwVolumeSerialNumber && nFileIndexHigh == rhs.nFileIndexHigh && @@ -115,7 +115,7 @@ bool Utility::FileID::operator==(const FileID& rhs) const } inline -bool Utility::FileID::operator<(const FileID& rhs) const +bool util::FileID::operator<(const FileID& rhs) const { if (dwVolumeSerialNumber != rhs.dwVolumeSerialNumber) return dwVolumeSerialNumber < rhs.dwVolumeSerialNumber; @@ -127,7 +127,7 @@ bool Utility::FileID::operator<(const FileID& rhs) const } inline -Utility::FileID::FileID(wxInputStream& stream) //read +util::FileID::FileID(wxInputStream& stream) //read { stream.Read(&dwVolumeSerialNumber, sizeof(dwVolumeSerialNumber)); stream.Read(&nFileIndexHigh, sizeof(nFileIndexHigh)); @@ -135,7 +135,7 @@ Utility::FileID::FileID(wxInputStream& stream) //read } inline -void Utility::FileID::toStream(wxOutputStream& stream) const //write +void util::FileID::toStream(wxOutputStream& stream) const //write { stream.Write(&dwVolumeSerialNumber, sizeof(dwVolumeSerialNumber)); stream.Write(&nFileIndexHigh, sizeof(nFileIndexHigh)); @@ -144,32 +144,32 @@ void Utility::FileID::toStream(wxOutputStream& stream) const //write #elif defined FFS_LINUX inline -Utility::FileID::FileID() : +util::FileID::FileID() : deviceId(0), inodeId(0) {} inline -Utility::FileID::FileID(dev_t devId, +util::FileID::FileID(dev_t devId, ino_t inId) : deviceId(devId), inodeId(inId) {} inline -bool Utility::FileID::isNull() const +bool util::FileID::isNull() const { return deviceId == 0 && inodeId == 0; } inline -bool Utility::FileID::operator==(const FileID& rhs) const +bool util::FileID::operator==(const FileID& rhs) const { return deviceId == rhs.deviceId && inodeId == rhs.inodeId; } inline -bool Utility::FileID::operator<(const FileID& rhs) const +bool util::FileID::operator<(const FileID& rhs) const { if (deviceId != rhs.deviceId) return deviceId < rhs.deviceId; @@ -178,21 +178,21 @@ bool Utility::FileID::operator<(const FileID& rhs) const } inline -Utility::FileID::FileID(wxInputStream& stream) //read +util::FileID::FileID(wxInputStream& stream) //read { stream.Read(&deviceId, sizeof(deviceId)); stream.Read(&inodeId, sizeof(inodeId)); } inline -void Utility::FileID::toStream(wxOutputStream& stream) const //write +void util::FileID::toStream(wxOutputStream& stream) const //write { stream.Write(&deviceId, sizeof(deviceId)); stream.Write(&inodeId, sizeof(inodeId)); } #endif inline -bool Utility::FileID::operator!=(const FileID& rhs) const +bool util::FileID::operator!=(const FileID& rhs) const { return !(*this == rhs); } diff --git a/shared/fileIO.cpp b/shared/file_io.cpp index 92fb7193..345234fd 100644 --- a/shared/fileIO.cpp +++ b/shared/file_io.cpp @@ -4,16 +4,18 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "fileIO.h" +#include "file_io.h" #include <wx/intl.h> -#include "stringConv.h" -#include "systemFunctions.h" +#include "string_conv.h" +#include "system_func.h" #ifdef FFS_WIN -#include "longPathPrefix.h" +#include "long_path_prefix.h" +#elif defined FFS_LINUX +#include <errno.h> #endif -using namespace FreeFileSync; +using namespace ffs3; FileInput::FileInput(const Zstring& filename) : //throw FileError() @@ -23,7 +25,7 @@ FileInput::FileInput(const Zstring& filename) : //throw FileError() filename_(filename) { #ifdef FFS_WIN - fileHandle = ::CreateFile(FreeFileSync::applyLongPathPrefix(filename).c_str(), + fileHandle = ::CreateFile(ffs3::applyLongPathPrefix(filename).c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, //all shared modes are required to read files that are open in other applications NULL, @@ -55,13 +57,25 @@ FileInput::FileInput(const Zstring& filename) : //throw FileError() */ NULL); if (fileHandle == INVALID_HANDLE_VALUE) - throw FileError(wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + { + 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) + throw ErrorNotExisting(errorMessage); + else + throw FileError(errorMessage); + } #elif defined FFS_LINUX fileHandle = ::fopen(filename.c_str(), "rb,type=record,noseek"); //utilize UTF-8 filename - if (!fileHandle) - throw FileError(wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + if (fileHandle == NULL) + { + const int lastError = errno; + const wxString& errorMessage = wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); + if (lastError == ENOENT) + throw ErrorNotExisting(errorMessage); + else + throw FileError(errorMessage); + } #endif } @@ -84,12 +98,12 @@ size_t FileInput::read(void* buffer, size_t bytesToRead) //returns actual number if (!::ReadFile( fileHandle, //__in HANDLE hFile, buffer, //__out LPVOID lpBuffer, - static_cast<DWORD>(bytesToRead), //__in DWORD nNumberOfBytesToRead, + static_cast<DWORD>(bytesToRead), //__in DWORD nNumberOfBytesToRead, &bytesRead, //__out_opt LPDWORD lpNumberOfBytesRead, NULL) //__inout_opt LPOVERLAPPED lpOverlapped || bytesRead > bytesToRead) //must be fulfilled throw FileError(wxString(_("Error reading file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + wxT("\n\n") + ffs3::getLastErrorFormatted()); if (bytesRead < bytesToRead) eofReached = true; @@ -99,7 +113,7 @@ size_t FileInput::read(void* buffer, size_t bytesToRead) //returns actual number const size_t bytesRead = ::fread(buffer, 1, bytesToRead, fileHandle); if (::ferror(fileHandle) != 0) throw FileError(wxString(_("Error reading file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + wxT("\n\n") + ffs3::getLastErrorFormatted()); return bytesRead; #endif } @@ -119,7 +133,7 @@ FileOutput::FileOutput(const Zstring& filename) : //throw FileError() filename_(filename) { #ifdef FFS_WIN - fileHandle = ::CreateFile(FreeFileSync::applyLongPathPrefix(filename).c_str(), + fileHandle = ::CreateFile(ffs3::applyLongPathPrefix(filename).c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, @@ -128,12 +142,12 @@ FileOutput::FileOutput(const Zstring& filename) : //throw FileError() NULL); if (fileHandle == INVALID_HANDLE_VALUE) throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + wxT("\n\n") + ffs3::getLastErrorFormatted()); #elif defined FFS_LINUX fileHandle = ::fopen(filename.c_str(), "wb,type=record,noseek"); //utilize UTF-8 filename if (!fileHandle) throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + wxT("\n\n") + ffs3::getLastErrorFormatted()); #endif } @@ -157,12 +171,12 @@ void FileOutput::write(const void* buffer, size_t bytesToWrite) //throw FileErro NULL) //__inout_opt LPOVERLAPPED lpOverlapped || bytesWritten != bytesToWrite) //must be fulfilled for synchronous writes! throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + wxT("\n\n") + ffs3::getLastErrorFormatted() + wxT(" (w)")); //w -> distinguish from fopen error message! #elif defined FFS_LINUX const size_t bytesWritten = ::fwrite(buffer, 1, bytesToWrite, fileHandle); if (::ferror(fileHandle) != 0 || bytesWritten != bytesToWrite) throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + FreeFileSync::getLastErrorFormatted() + wxT(" (w)")); //w -> distinguish from fopen error message! + wxT("\n\n") + ffs3::getLastErrorFormatted() + wxT(" (w)")); //w -> distinguish from fopen error message! #endif } diff --git a/shared/fileIO.h b/shared/file_io.h index a04d8a0e..c3fb3f65 100644 --- a/shared/fileIO.h +++ b/shared/file_io.h @@ -16,19 +16,19 @@ #endif #include "zstring.h" -#include "fileError.h" +#include "file_error.h" -namespace FreeFileSync +namespace ffs3 { -//file IO optimized for sequential read/write accesses + better error reporting + long path support +//file IO optimized for sequential read/write accesses + better error reporting + long path support (following symlinks) class FileInput { public: - FileInput(const Zstring& filename); //throw FileError() + FileInput(const Zstring& filename); //throw (FileError, ErrorNotExisting) ~FileInput(); - size_t read(void* buffer, size_t bytesToRead); //returns actual number of bytes read; throw FileError() + size_t read(void* buffer, size_t bytesToRead); //throw FileError(); returns actual number of bytes read bool eof(); //end of file reached private: diff --git a/shared/fileTraverser.cpp b/shared/file_traverser.cpp index 465c2f8f..8e9d5f0d 100644 --- a/shared/fileTraverser.cpp +++ b/shared/file_traverser.cpp @@ -4,18 +4,18 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "fileTraverser.h" -#include "systemConstants.h" -#include "systemFunctions.h" +#include "file_traverser.h" +#include "system_constants.h" +#include "system_func.h" #include <wx/intl.h> -#include "stringConv.h" +#include "string_conv.h" #include <boost/shared_ptr.hpp> #include <boost/scoped_array.hpp> #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" #include "WinIoCtl.h" -#include "longPathPrefix.h" +#include "long_path_prefix.h" #elif defined FFS_LINUX #include <sys/stat.h> @@ -29,8 +29,8 @@ //{ //public: // DisableWow64Redirection() : -// wow64DisableWow64FsRedirection(Utility::loadDllFunction<Wow64DisableWow64FsRedirectionFunc>(L"kernel32.dll", "Wow64DisableWow64FsRedirection")), -// wow64RevertWow64FsRedirection(Utility::loadDllFunction<Wow64RevertWow64FsRedirectionFunc>(L"kernel32.dll", "Wow64RevertWow64FsRedirection")), +// wow64DisableWow64FsRedirection(util::loadDllFunction<Wow64DisableWow64FsRedirectionFunc>(L"kernel32.dll", "Wow64DisableWow64FsRedirection")), +// wow64RevertWow64FsRedirection(util::loadDllFunction<Wow64RevertWow64FsRedirectionFunc>(L"kernel32.dll", "Wow64RevertWow64FsRedirection")), // oldValue(NULL) // { // if ( wow64DisableWow64FsRedirection && @@ -164,7 +164,7 @@ inline void setWin32FileInformation(const FILETIME& lastWriteTime, const DWORD fileSizeHigh, const DWORD fileSizeLow, - FreeFileSync::TraverseCallback::FileInfo& output) + ffs3::TraverseCallback::FileInfo& output) { output.lastWriteTimeRaw = getWin32TimeInformation(lastWriteTime); output.fileSize = wxULongLong(fileSizeHigh, fileSizeLow); @@ -172,10 +172,10 @@ void setWin32FileInformation(const FILETIME& lastWriteTime, inline -bool setWin32FileInformationFromSymlink(const Zstring& linkName, FreeFileSync::TraverseCallback::FileInfo& output) +bool setWin32FileInformationFromSymlink(const Zstring& linkName, ffs3::TraverseCallback::FileInfo& output) { //open handle to target of symbolic link - HANDLE hFile = ::CreateFile(FreeFileSync::applyLongPathPrefix(linkName).c_str(), + HANDLE hFile = ::CreateFile(ffs3::applyLongPathPrefix(linkName).c_str(), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, @@ -199,9 +199,9 @@ bool setWin32FileInformationFromSymlink(const Zstring& linkName, FreeFileSync::T template <bool followSymlinks> -void traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* sink, int level) +void traverseDirectory(const Zstring& directory, ffs3::TraverseCallback* sink, int level) { - using namespace FreeFileSync; + using namespace ffs3; if (level == 100) //catch endless recursion { @@ -211,9 +211,9 @@ void traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* #ifdef FFS_WIN //ensure directoryFormatted ends with backslash - const Zstring directoryFormatted = directory.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? + const Zstring directoryFormatted = directory.EndsWith(common::FILE_NAME_SEPARATOR) ? directory : - directory + globalFunctions::FILE_NAME_SEPARATOR; + directory + common::FILE_NAME_SEPARATOR; WIN32_FIND_DATA fileMetaData; HANDLE searchHandle = ::FindFirstFile(applyLongPathPrefix(directoryFormatted + DefaultChar('*')).c_str(), //__in LPCTSTR lpFileName @@ -228,7 +228,7 @@ void traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* //else: we have a problem... report it: const wxString errorMessage = wxString(_("Error traversing directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\"") + wxT("\n\n") + - FreeFileSync::getLastErrorFormatted(lastError); + ffs3::getLastErrorFormatted(lastError); sink->onError(errorMessage); return; @@ -298,7 +298,7 @@ void traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* //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") + FreeFileSync::getLastErrorFormatted(lastError)); + sink->onError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError)); return; #elif defined FFS_LINUX @@ -306,7 +306,7 @@ void traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* if (dirObj == NULL) { const wxString errorMessage = wxString(_("Error traversing directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\"") ; - sink->onError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + sink->onError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); return; } @@ -323,7 +323,7 @@ void traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* //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") + FreeFileSync::getLastErrorFormatted()); + sink->onError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); return; } @@ -334,15 +334,15 @@ void traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* shortName[1] == wxChar('\0'))) continue; - const Zstring fullName = directory.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? //e.g. "/" + const Zstring fullName = directory.EndsWith(common::FILE_NAME_SEPARATOR) ? //e.g. "/" directory + shortName : - directory + globalFunctions::FILE_NAME_SEPARATOR + shortName; + directory + common::FILE_NAME_SEPARATOR + shortName; struct stat fileInfo; if (::lstat(fullName.c_str(), &fileInfo) != 0) //lstat() does not resolve symlinks { const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(fullName) + wxT("\""); - sink->onError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted()); + sink->onError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); continue; } @@ -401,7 +401,7 @@ void traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* } -void FreeFileSync::traverseFolder(const Zstring& directory, +void ffs3::traverseFolder(const Zstring& directory, bool followSymlinks, TraverseCallback* sink) { @@ -409,8 +409,8 @@ void FreeFileSync::traverseFolder(const Zstring& directory, const Zstring& directoryFormatted = directory; #elif defined FFS_LINUX const Zstring directoryFormatted = //remove trailing slash - directory.size() > 1 && directory.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? //exception: allow '/' - directory.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR) : + directory.size() > 1 && directory.EndsWith(common::FILE_NAME_SEPARATOR) ? //exception: allow '/' + directory.BeforeLast(common::FILE_NAME_SEPARATOR) : directory; #endif diff --git a/shared/fileTraverser.h b/shared/file_traverser.h index b9cd3ff1..d61ff1cd 100644 --- a/shared/fileTraverser.h +++ b/shared/file_traverser.h @@ -13,7 +13,7 @@ //advanced file traverser returning metadata and hierarchical information on files and directories -namespace FreeFileSync +namespace ffs3 { class TraverseCallback { @@ -61,7 +61,7 @@ public: void traverseFolder(const Zstring& directory, bool followSymlinks, TraverseCallback* sink); //throw(); //followSymlinks: //"true": Symlinks dereferenced and reported via onFile() and onDir() => onSymlink not used! -//"false": Symlinks directly reported via onSymlink() +//"false": Symlinks directly reported via onSymlink(), directory symlinks are not followed } #endif // FILETRAVERSER_H_INCLUDED diff --git a/shared/globalFunctions.cpp b/shared/global_func.cpp index 63831e1a..d1ab9d2c 100644 --- a/shared/globalFunctions.cpp +++ b/shared/global_func.cpp @@ -4,14 +4,14 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "globalFunctions.h" +#include "global_func.h" #include <wx/msgdlg.h> #include <wx/file.h> #include <wx/stopwatch.h> -#include "systemConstants.h" +#include "system_constants.h" -size_t globalFunctions::getDigitCount(size_t number) //count number of digits +size_t common::getDigitCount(size_t number) //count number of digits { return number == 0 ? 1 : static_cast<size_t>(::log10(static_cast<double>(number))) + 1; } @@ -81,7 +81,7 @@ void DebugLog::write(const wxString& logText) } logFile->Write(wxString(wxT("[")) + wxDateTime::Now().FormatTime() + wxT("] ")); - logFile->Write(logText + globalFunctions::LINE_BREAK); + logFile->Write(logText + common::LINE_BREAK); } //DebugLog logDebugInfo; @@ -89,5 +89,5 @@ void DebugLog::write(const wxString& logText) wxString getCodeLocation(const wxString file, const int line) { - return wxString(file).AfterLast(globalFunctions::FILE_NAME_SEPARATOR) + wxT(", LINE ") + wxLongLong(line).ToString() + wxT(" | "); + return wxString(file).AfterLast(common::FILE_NAME_SEPARATOR) + wxT(", LINE ") + wxLongLong(line).ToString() + wxT(" | "); } diff --git a/shared/globalFunctions.h b/shared/global_func.h index fe65889f..ba455371 100644 --- a/shared/globalFunctions.h +++ b/shared/global_func.h @@ -19,7 +19,7 @@ class wxStopWatch; -namespace globalFunctions +namespace common { //------------------------------------------------ // FUNCTIONS @@ -34,7 +34,7 @@ template <class T> inline T abs(const T& d) //absolute value { - return(d < 0 ? -d : d); + return d < 0 ? -d : d; } @@ -136,7 +136,7 @@ wxString getCodeLocation(const wxString file, const int line); //---------------Inline Implementation--------------------------------------------------- template <class CharType, class T> inline -std::basic_string<CharType> globalFunctions::numberToString(const T& number) //convert number to string the C++ way +std::basic_string<CharType> common::numberToString(const T& number) //convert number to string the C++ way { std::basic_ostringstream<CharType> ss; ss << number; @@ -146,7 +146,7 @@ std::basic_string<CharType> globalFunctions::numberToString(const T& number) //c template <class T, class CharType> inline -T globalFunctions::stringToNumber(const std::basic_string<CharType>& input) //convert number to string the C++ way +T common::stringToNumber(const std::basic_string<CharType>& input) //convert number to string the C++ way { std::basic_istringstream<CharType> ss(input); T number; @@ -157,7 +157,7 @@ T globalFunctions::stringToNumber(const std::basic_string<CharType>& input) //co template <class T> inline -wxString globalFunctions::numberToString(const T& number) +wxString common::numberToString(const T& number) { return numberToString<wxChar, T>(number).c_str(); } @@ -165,16 +165,16 @@ wxString globalFunctions::numberToString(const T& number) template <class T> inline -T globalFunctions::stringToNumber(const wxString& input) +T common::stringToNumber(const wxString& input) { - const std::basic_string<wxChar> inputConv = input.c_str(); + const std::basic_string<wxChar> inputConv(input.c_str()); return stringToNumber<T, wxChar>(inputConv); } //Note: the following lines are a performance optimization for deleting elements from a vector: linear runtime at most! template <class T> -void globalFunctions::removeRowsFromVector(const std::set<size_t>& rowsToRemove, std::vector<T>& grid) +void common::removeRowsFromVector(const std::set<size_t>& rowsToRemove, std::vector<T>& grid) { if (rowsToRemove.empty()) return; @@ -208,7 +208,7 @@ void globalFunctions::removeRowsFromVector(const std::set<size_t>& rowsToRemove, //enhanced binary search template: returns an iterator template <class ForwardIterator, class T, typename Compare> inline -ForwardIterator globalFunctions::custom_binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp) +ForwardIterator common::custom_binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp) { first = lower_bound(first, last, value, comp); if (first != last && !comp(value, *first)) @@ -220,7 +220,7 @@ ForwardIterator globalFunctions::custom_binary_search(ForwardIterator first, For template <class T> inline -T globalFunctions::readNumber(std::istream& stream) +T common::readNumber(std::istream& stream) { T result = 0; stream.read(reinterpret_cast<char*>(&result), sizeof(T)); @@ -230,7 +230,7 @@ T globalFunctions::readNumber(std::istream& stream) template <class T> inline -void globalFunctions::writeNumber(std::ostream& stream, T number) +void common::writeNumber(std::ostream& stream, T number) { stream.write(reinterpret_cast<const char*>(&number), sizeof(T)); } diff --git a/shared/guid.cpp b/shared/guid.cpp index 7a2ec68f..d359c29c 100644 --- a/shared/guid.cpp +++ b/shared/guid.cpp @@ -8,17 +8,17 @@ #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_generators.hpp> #include <cassert> -#include <algorithm> -#include <vector> +#include <algorithm> +#include <vector> + +using namespace util; + -using namespace Utility; - - struct UniqueId::IntData -{ - boost::uuids::uuid nativeRep; +{ + boost::uuids::uuid nativeRep; }; - + UniqueId::UniqueId() : pData(new IntData) { @@ -35,7 +35,7 @@ bool UniqueId::operator==(const UniqueId rhs) const bool UniqueId::operator<(const UniqueId rhs) const { return pData->nativeRep < rhs.pData->nativeRep; -} +} UniqueId::UniqueId(wxInputStream& stream) : //read diff --git a/shared/guid.h b/shared/guid.h index d639fff5..49d2f008 100644 --- a/shared/guid.h +++ b/shared/guid.h @@ -10,7 +10,7 @@ #include <wx/stream.h> #include <boost/shared_ptr.hpp> -namespace Utility +namespace util { class UniqueId { @@ -27,7 +27,6 @@ private: struct IntData; boost::shared_ptr<IntData> pData; }; - } diff --git a/shared/helpProvider.cpp b/shared/help_provider.cpp index 73c71eb1..0110934c 100644 --- a/shared/helpProvider.cpp +++ b/shared/help_provider.cpp @@ -4,9 +4,9 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "helpProvider.h" +#include "help_provider.h" #include <wx/help.h> -#include "standardPaths.h" +#include "standard_paths.h" #include <wx/image.h> namespace @@ -16,7 +16,7 @@ class HelpProvider public: HelpProvider() { - controller.Initialize(FreeFileSync::getResourceDir() + + controller.Initialize(ffs3::getResourceDir() + #ifdef FFS_WIN wxT("FreeFileSync.chm")); #elif defined FFS_LINUX @@ -39,7 +39,7 @@ private: }; } -void FreeFileSync::displayHelpEntry(const wxString& section) +void ffs3::displayHelpEntry(const wxString& section) { static HelpProvider provider; provider.showHelp(section); diff --git a/shared/helpProvider.h b/shared/help_provider.h index 538e151c..b59f47a8 100644 --- a/shared/helpProvider.h +++ b/shared/help_provider.h @@ -9,7 +9,7 @@ #include <wx/string.h> -namespace FreeFileSync +namespace ffs3 { void displayHelpEntry(const wxString& section = wxEmptyString); } diff --git a/shared/localization.cpp b/shared/localization.cpp index 1ff7f6bd..ef3e02d2 100644 --- a/shared/localization.cpp +++ b/shared/localization.cpp @@ -6,15 +6,15 @@ // #include "localization.h" #include <wx/msgdlg.h> -#include "../shared/standardPaths.h" -#include "../shared/stringConv.h" -#include "systemConstants.h" +#include "../shared/standard_paths.h" +#include "../shared/string_conv.h" +#include "system_constants.h" #include <fstream> #include <map> #include <wx/ffile.h> -using FreeFileSync::CustomLocale; -using FreeFileSync::LocalizationInfo; +using ffs3::CustomLocale; +using ffs3::LocalizationInfo; //_("Browse") <- dummy string for wxDirPickerCtrl to be recognized by automatic text extraction! @@ -27,19 +27,19 @@ wxString DECIMAL_POINT = wxT("."); } -wxString FreeFileSync::getThousandsSeparator() +wxString ffs3::getThousandsSeparator() { return THOUSANDS_SEPARATOR; } -wxString FreeFileSync::getDecimalPoint() +wxString ffs3::getDecimalPoint() { return DECIMAL_POINT; } -const std::vector<FreeFileSync::LocInfoLine>& LocalizationInfo::getMapping() +const std::vector<ffs3::LocInfoLine>& LocalizationInfo::getMapping() { static LocalizationInfo instance; return instance.locMapping; @@ -50,7 +50,7 @@ namespace { struct CompareByName { - bool operator()(const FreeFileSync::LocInfoLine& lhs, const FreeFileSync::LocInfoLine& rhs) const + bool operator()(const ffs3::LocInfoLine& lhs, const ffs3::LocInfoLine& rhs) const { return lhs.languageName < rhs.languageName; } @@ -60,7 +60,7 @@ struct CompareByName LocalizationInfo::LocalizationInfo() { - FreeFileSync::LocInfoLine newEntry; + ffs3::LocInfoLine newEntry; newEntry.languageID = wxLANGUAGE_CZECH; newEntry.languageName = wxT("Čeština"); @@ -501,8 +501,8 @@ void CustomLocale::setLanguage(const int language) translationDB->clear(); if (!languageFile.empty()) { - UnicodeFileReader langFile(FreeFileSync::getResourceDir() + wxT("Languages") + - zToWx(globalFunctions::FILE_NAME_SEPARATOR) + languageFile); + UnicodeFileReader langFile(ffs3::getResourceDir() + wxT("Languages") + + zToWx(common::FILE_NAME_SEPARATOR) + languageFile); if (langFile.isOkay()) { int rowNumber = 0; diff --git a/shared/localization.h b/shared/localization.h index 1e4cb6ed..1c1773e9 100644 --- a/shared/localization.h +++ b/shared/localization.h @@ -14,7 +14,7 @@ class Translation; -namespace FreeFileSync +namespace ffs3 { //language independent global variables: just use operating system's default setting! wxString getThousandsSeparator(); diff --git a/shared/lock.cpp b/shared/lock.cpp index e8e027c2..6b3dbcbb 100644 --- a/shared/lock.cpp +++ b/shared/lock.cpp @@ -5,18 +5,18 @@ // ************************************************************************** // #include "lock.h" -#include "fileHandling.h" +#include "file_handling.h" // // -//Utility::LockDirectory::LockDirectory(const Zstring& dirname) +//util::LockDirectory::LockDirectory(const Zstring& dirname) //{ // //} // // -//Utility::LockDirectory::~LockDirectory() +//util::LockDirectory::~LockDirectory() //{ //} // // -//bool Utility::LockDirectoryisLocked(const Zstring& dirname); +//bool util::LockDirectoryisLocked(const Zstring& dirname); diff --git a/shared/longPathPrefix.cpp b/shared/long_path_prefix.cpp index e8b14b90..bc784f70 100644 --- a/shared/longPathPrefix.cpp +++ b/shared/long_path_prefix.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "longPathPrefix.h" +#include "long_path_prefix.h" #include <wx/msw/wrapwin.h> //includes "windows.h" @@ -30,20 +30,20 @@ Zstring applyLongPathPrefixImpl(const Zstring& path) } -Zstring FreeFileSync::applyLongPathPrefix(const Zstring& path) +Zstring ffs3::applyLongPathPrefix(const Zstring& path) { return applyLongPathPrefixImpl<MAX_PATH>(path); } -Zstring FreeFileSync::applyLongPathPrefixCreateDir(const Zstring& path) //throw() +Zstring ffs3::applyLongPathPrefixCreateDir(const Zstring& path) //throw() { //special rule for ::CreateDirectoryEx(): MAX_PATH - 12(=^ 8.3 filename) is threshold return applyLongPathPrefixImpl<MAX_PATH - 12>(path); } -Zstring FreeFileSync::removeLongPathPrefix(const Zstring& path) //throw() +Zstring ffs3::removeLongPathPrefix(const Zstring& path) //throw() { if (path.StartsWith(LONG_PATH_PREFIX)) { diff --git a/shared/longPathPrefix.h b/shared/long_path_prefix.h index 4ebe7a9d..b14a17dc 100644 --- a/shared/longPathPrefix.h +++ b/shared/long_path_prefix.h @@ -13,7 +13,7 @@ use in windows build only! #include "zstring.h" -namespace FreeFileSync +namespace ffs3 { //handle filenames longer-equal 260 (== MAX_PATH) characters by applying \\?\-prefix (Reference: http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath) /* diff --git a/shared/parallelCall.cpp b/shared/parallelCall.cpp deleted file mode 100644 index ce0a3633..00000000 --- a/shared/parallelCall.cpp +++ /dev/null @@ -1,159 +0,0 @@ -// ************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * -// ************************************************************************** -// -#include "parallelCall.h" -#include <wx/thread.h> -#include <stdexcept> -#include <wx/string.h> -#include <wx/msgdlg.h> - -namespace -{ -class WorkerThread : public wxThread -{ -public: - WorkerThread(const Async::AsyncProcess& proc, - const boost::shared_ptr<wxMutex>& mainIsListening, - const boost::shared_ptr<wxCondition>& procHasFinished) : - wxThread(wxTHREAD_DETACHED), - proc_(proc), //copy input data by value - mainIsListening_(mainIsListening), // - procHasFinished_(procHasFinished) // - { - if (Create() != wxTHREAD_NO_ERROR) - throw std::runtime_error("Error creating async worker thread!"); - - if (Run() != wxTHREAD_NO_ERROR) - throw std::runtime_error("Error starting async worker thread!"); - } - - ExitCode Entry() - { - try - { - proc_->doWork(); - - //notify that work is done - wxMutexLocker dummy(*mainIsListening_); - procHasFinished_->Signal(); - } - catch (const std::exception& e) //exceptions must be catched per thread - { - wxMessageBox(wxString::FromAscii(e.what()), _("An exception occured!"), wxOK | wxICON_ERROR); - } - catch (...) //exceptions must be catched per thread - { - wxMessageBox(wxT("Unknown exception in worker thread"), _("An exception occured!"), wxOK | wxICON_ERROR); - } - - return 0; - } - -private: - Async::AsyncProcess proc_; - boost::shared_ptr<wxMutex> mainIsListening_; //shared pointer is safe to use in MT context (same guarantee like builtin types!) - boost::shared_ptr<wxCondition> procHasFinished_; //http://www.boost.org/doc/libs/1_43_0/libs/smart_ptr/shared_ptr.htm#ThreadSafety -}; -} - - -Async::Result Async::execute(AsyncProcess proc, size_t maxWait) //maxWait = max. wait time in milliseconds -{ - boost::shared_ptr<wxMutex> mainIsListening(new wxMutex); - boost::shared_ptr<wxCondition> procHasFinished(new wxCondition(*mainIsListening)); - wxMutexLocker dummy(*mainIsListening); //the mutex should be initially locked (= "main not listening") - - new WorkerThread(proc, mainIsListening, procHasFinished); - - return procHasFinished->WaitTimeout(static_cast<unsigned long>(maxWait)) == wxCOND_NO_ERROR ? WORK_DONE : TIMEOUT; -} - - -// ------------------------------------------------------ -// |Pattern: workload queue and multiple worker threads | -// ------------------------------------------------------ -//typedef std::vector<DirectoryDescrType*> Workload; -// -//class ThreadSorting : public wxThread -//{ -//public: -// ThreadSorting(wxCriticalSection& syncWorkload, Workload& workload) : -// wxThread(wxTHREAD_JOINABLE), -// syncWorkload_(syncWorkload), -// workload_(workload) -// { -// if (Create() != wxTHREAD_NO_ERROR) -// throw RuntimeException(wxString(wxT("Error creating thread for sorting!"))); -// } -// -// ~ThreadSorting() {} -// -// -// ExitCode Entry() -// { -// while (true) -// { -// DirectoryDescrType* descr = NULL; -// { //see if there is work to do... -// wxCriticalSectionLocker dummy(syncWorkload_); -// if (workload_.empty()) -// return 0; -// else -// { -// descr = workload_.back(); -// workload_.pop_back(); -// } -// } -// //do work -// std::sort(descr->begin(), descr->end()); -// } -// } -// -//private: -// wxCriticalSection& syncWorkload_; -// Workload& workload_; -//}; -// -// -//void DirectoryDescrBuffer::preFillBuffers(const std::vector<FolderPairCfg>& fpConfigFormatted) -//{ -// //assemble workload -// ... -// -// //we use binary search when comparing the directory structures: so sort() first -// const int CPUCount = wxThread::GetCPUCount(); -// if (CPUCount >= 2) //do it the multithreaded way: -// { -// wxCriticalSection syncWorkload; -// -// typedef std::vector<boost::shared_ptr<ThreadSorting> > ThreadContainer; -// ThreadContainer sortThreads; -// sortThreads.reserve(CPUCount); -// -// //start CPUCount worker threads -// for (size_t i = 0; i < std::min(static_cast<size_t>(CPUCount), workload.size()); ++i) -// { -// boost::shared_ptr<ThreadSorting> newWorker(new ThreadSorting(syncWorkload, workload)); -// -// if (newWorker->Run() != wxTHREAD_NO_ERROR) -// throw RuntimeException(wxString(wxT("Error starting thread for sorting!"))); -// -// sortThreads.push_back(newWorker); -// } -// -// //wait until all worker are finished -// for (ThreadContainer::iterator i = sortThreads.begin(); i != sortThreads.end(); ++i) -// { -// if ((*i)->Wait() != 0) -// throw RuntimeException(wxString(wxT("Error waiting for thread (sorting)!"))); -// } -// } -// else //single threaded -// { -// for (Workload::iterator i = workload.begin(); i != workload.end(); ++i) -// std::sort((*i)->begin(), (*i)->end()); -// } -//} diff --git a/shared/parallelCall.h b/shared/parallelCall.h deleted file mode 100644 index b6e6b6ca..00000000 --- a/shared/parallelCall.h +++ /dev/null @@ -1,34 +0,0 @@ -// ************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * -// ************************************************************************** -// -#ifndef MULTITHREADING_H_INCLUDED -#define MULTITHREADING_H_INCLUDED - -#include <boost/shared_ptr.hpp> - - -namespace Async -{ -class Procedure -{ -public: - virtual ~Procedure() {} - virtual void doWork() = 0; -}; - -enum Result -{ - TIMEOUT, - WORK_DONE -}; - -typedef boost::shared_ptr<Procedure> AsyncProcess; - -//wait for Procedure to finish in separate thread; shared data (Procedure*) may be accessed after WORK_DONE only! => Beware shared data if TIMEOUT (e.g. ref-counting!) -Result execute(AsyncProcess proc, size_t maxWait); //maxWait = max. wait time in milliseconds -} - -#endif // MULTITHREADING_H_INCLUDED diff --git a/shared/perf.h b/shared/perf.h new file mode 100644 index 00000000..62473259 --- /dev/null +++ b/shared/perf.h @@ -0,0 +1,42 @@ +// ************************************************************************** +// * 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) * +// ************************************************************************** +// +#include <windows.h> +#include <sstream> + +class Performance +{ +public: + Performance() : resultWasShown(false), startTime(::GetTickCount()) {} + + ~Performance() + { + if (!resultWasShown) + showResult(); + } + + void showResult() + { + resultWasShown = true; + + const DWORD currentTime = ::GetTickCount(); + const DWORD delta = currentTime - startTime; + startTime = currentTime; + + std::ostringstream ss; + ss << delta << " ms"; + + ::MessageBoxA(NULL, ss.str().c_str(), "Timer", 0); + } + +private: + bool resultWasShown; + DWORD startTime; +}; + +//two macros for quick performance measurements +#define PERF_START Performance a; +#define PERF_STOP a.showResult(); diff --git a/shared/recycler.cpp b/shared/recycler.cpp index b9f666f8..1a73e105 100644 --- a/shared/recycler.cpp +++ b/shared/recycler.cpp @@ -5,21 +5,21 @@ // ************************************************************************** // #include "recycler.h" -#include "stringConv.h" +#include "string_conv.h" #include <wx/intl.h> #include <stdexcept> #include <iterator> #ifdef FFS_WIN -#include "dllLoader.h" +#include "dll_loader.h" #include <wx/msw/wrapwin.h> //includes "windows.h" -#include "buildInfo.h" -#include "staticAssert.h" +#include "build_info.h" +#include "assert_static.h" #include <algorithm> #include <functional> #include <vector> -#include "longPathPrefix.h" -#include "IFileOperation/fileOp.h" +#include "long_path_prefix.h" +#include "IFileOperation/file_op.h" #elif defined FFS_LINUX #include <sys/stat.h> @@ -33,11 +33,11 @@ namespace const std::wstring& getRecyclerDllName() { static const std::wstring filename( - Utility::is64BitBuild ? + util::is64BitBuild ? L"FileOperation_x64.dll": L"FileOperation_Win32.dll"); - assert_static(Utility::is32BitBuild || Utility::is64BitBuild); + assert_static(util::is32BitBuild || util::is64BitBuild); return filename; } @@ -73,7 +73,7 @@ Nevertheless, let's use IFileOperation for better error reporting! void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw (FileError) { - using FreeFileSync::FileError; + using ffs3::FileError; if (filesToDelete.empty()) return; @@ -82,25 +82,26 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw ( if (useIFileOperation) //new recycle bin usage: available since Vista { + std::vector<const wchar_t*> fileNames; + std::transform(filesToDelete.begin(), filesToDelete.end(), + std::back_inserter(fileNames), std::mem_fun_ref(&Zstring::c_str)); + using namespace FileOp; static const MoveToRecycleBinFct moveToRecycler = - Utility::loadDllFunction<MoveToRecycleBinFct>(getRecyclerDllName().c_str(), moveToRecycleBinFctName); + util::loadDllFunction<MoveToRecycleBinFct>(getRecyclerDllName().c_str(), moveToRecycleBinFctName); static const GetLastErrorFct getLastError = - Utility::loadDllFunction<GetLastErrorFct>(getRecyclerDllName().c_str(), getLastErrorFctName); + util::loadDllFunction<GetLastErrorFct>(getRecyclerDllName().c_str(), getLastErrorFctName); if (moveToRecycler == NULL || getLastError == NULL) - throw FileError(wxString(_("Could not load a required DLL:")) + wxT(" \"") + getRecyclerDllName().c_str() + wxT("\"")); + throw FileError(wxString(_("Error moving to Recycle Bin:")) + wxT("\n\"") + fileNames[0] + wxT("\"\n\n") + //report first file only... better than nothing + wxString(_("Could not load a required DLL:")) + wxT(" \"") + getRecyclerDllName().c_str() + wxT("\"")); //#warning moving long file paths to recycler does not work! clarify! // std::vector<Zstring> temp; // std::transform(filesToDelete.begin(), filesToDelete.end(), -// std::back_inserter(temp), std::ptr_fun(FreeFileSync::removeLongPathPrefix)); //::IFileOperation() can't handle \\?\-prefix! - - std::vector<const wchar_t*> fileNames; - std::transform(filesToDelete.begin(), filesToDelete.end(), - std::back_inserter(fileNames), std::mem_fun_ref(&Zstring::c_str)); +// std::back_inserter(temp), std::ptr_fun(ffs3::removeLongPathPrefix)); //::IFileOperation() can't handle \\?\-prefix! if (!(*moveToRecycler)(&fileNames[0], //array must not be empty fileNames.size())) @@ -143,7 +144,7 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw ( } -void FreeFileSync::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileError) +void ffs3::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileError) { #ifdef FFS_WIN const Zstring filenameFmt = applyLongPathPrefix(fileToDelete); @@ -165,7 +166,8 @@ void FreeFileSync::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileE try { if (!fileObj->trash()) - throw std::runtime_error("Recycle Bin failed but did not provide error information!"); + throw FileError(wxString(_("Error moving to Recycle Bin:")) + wxT("\n\"") + zToWx(fileToDelete) + wxT("\"\n\n") + + wxT("(") + wxT("unknown error") + wxT(")")); } catch (const Glib::Error& errorObj) { @@ -180,7 +182,7 @@ void FreeFileSync::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileE } -bool FreeFileSync::recycleBinExists() +bool ffs3::recycleBinExists() { #ifdef FFS_WIN return true; diff --git a/shared/recycler.h b/shared/recycler.h index 828e26af..7537e875 100644 --- a/shared/recycler.h +++ b/shared/recycler.h @@ -7,10 +7,10 @@ #ifndef RECYCLER_H_INCLUDED #define RECYCLER_H_INCLUDED -#include "fileError.h" +#include "file_error.h" #include "zstring.h" -namespace FreeFileSync +namespace ffs3 { /* -------------------- diff --git a/shared/serialize.cpp b/shared/serialize.cpp index 63e2037f..cf6d96b1 100644 --- a/shared/serialize.cpp +++ b/shared/serialize.cpp @@ -7,12 +7,12 @@ #include "serialize.h" #include <wx/intl.h> -using namespace Utility; +using namespace util; void ReadInputStream::throwReadError() const //throw FileError() { - throw FreeFileSync::FileError(wxString(_("Error reading from synchronization database:")) + wxT(" \n") + + throw ffs3::FileError(wxString(_("Error reading from synchronization database:")) + wxT(" \n") + wxT("\"") + errorObjName_ + wxT("\"")); } @@ -35,7 +35,7 @@ ReadInputStream::CharArray ReadInputStream::readArrayC() const //-------------------------------------------------------------------------------------------------------- void WriteOutputStream::throwWriteError() const //throw FileError() { - throw FreeFileSync::FileError(wxString(_("Error writing to synchronization database:")) + wxT(" \n") + + throw ffs3::FileError(wxString(_("Error writing to synchronization database:")) + wxT(" \n") + wxT("\"") + errorObjName_ + wxT("\"")); } diff --git a/shared/serialize.h b/shared/serialize.h index 88e6054c..99dd83d5 100644 --- a/shared/serialize.h +++ b/shared/serialize.h @@ -9,11 +9,11 @@ #include "zstring.h" #include <wx/stream.h> -#include "fileError.h" +#include "file_error.h" #include <boost/scoped_array.hpp> #include <boost/shared_ptr.hpp> -namespace Utility +namespace util { template <class T> T readNumber(wxInputStream& stream); diff --git a/shared/shadow.cpp b/shared/shadow.cpp index 3909c37b..b38103de 100644 --- a/shared/shadow.cpp +++ b/shared/shadow.cpp @@ -7,16 +7,21 @@ #include "shadow.h" #include <wx/msw/wrapwin.h> //includes "windows.h" #include <wx/intl.h> -#include "systemConstants.h" -#include "dllLoader.h" +#include "system_constants.h" +#include "dll_loader.h" #include <stdexcept> -#include "staticAssert.h" -#include "buildInfo.h" +#include "assert_static.h" +#include "build_info.h" #include "ShadowCopy\shadow.h" +#include "string_conv.h" -using FreeFileSync::ShadowCopy; +using shadow::ShadowCopy; +using shadow::WaitingForShadow; +using ffs3::FileError; +namespace +{ bool newerThanXP() { OSVERSIONINFO osvi; @@ -41,7 +46,7 @@ bool runningWOW64() //test if process is running under WOW64 (reference http://m PBOOL Wow64Process); static const IsWow64ProcessFunc isWow64Process = - Utility::loadDllFunction<IsWow64ProcessFunc>(L"kernel32.dll", "IsWow64Process"); + util::loadDllFunction<IsWow64ProcessFunc>(L"kernel32.dll", "IsWow64Process"); if (isWow64Process) { @@ -54,148 +59,145 @@ bool runningWOW64() //test if process is running under WOW64 (reference http://m } -const wxString& getShadowDllName() +const std::wstring& getShadowDllName() { /* distinguish a bunch of VSS builds: we use XP and Server 2003 implementations... VSS version and compatibility overview: http://msdn.microsoft.com/en-us/library/aa384627(VS.85).aspx */ - static const wxString filename( + assert_static(util::is32BitBuild || util::is64BitBuild); + + static const std::wstring filename( newerThanXP() ? - (Utility::is64BitBuild ? - wxT("Shadow_Server2003_x64.dll") : - wxT("Shadow_Server2003_Win32.dll")) : + (util::is64BitBuild ? + L"Shadow_Server2003_x64.dll" : + L"Shadow_Server2003_Win32.dll") : - (Utility::is64BitBuild ? - wxT("Shadow_XP_x64.dll") : - wxT("Shadow_XP_Win32.dll"))); + (util::is64BitBuild ? + L"Shadow_XP_x64.dll" : + L"Shadow_XP_Win32.dll")); - assert_static(Utility::is32BitBuild || Utility::is64BitBuild); return filename; } - +} //############################################################################################################# -ShadowCopy::ShadowCopy() : - backupHandle(NULL) {} +ShadowCopy::ShadowCopy(WaitingForShadow* callback) : callback_(callback) {} +ShadowCopy::~ShadowCopy() {} //std::auto_ptr: keep non-inline +//############################################################################################################# -ShadowCopy::~ShadowCopy() +class ShadowCopy::ShadowVolume { - if (backupHandle != NULL) +public: + ShadowVolume(const Zstring& volumeNameFormatted) : //throw(FileError) + realVol(volumeNameFormatted), + backupHandle(NULL) { - using namespace Shadow; + using namespace shadow; - static const ReleaseShadowCopyFct releaseShadowCopy = - Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), releaseShadowCopyFctName); + if (!createShadowCopy) + createShadowCopy = util::loadDllFunction<CreateShadowCopyFct>(getShadowDllName(), createShadowCopyFctName); - if (releaseShadowCopy == NULL) - throw std::logic_error("Could not load \"releaseShadowCopy\"!"); //shouldn't arrive here! + if (!releaseShadowCopy) + releaseShadowCopy = util::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName(), releaseShadowCopyFctName); - releaseShadowCopy(backupHandle); - } -} + //check if shadow copy dll was loaded correctly + if ( createShadowCopy == NULL || + releaseShadowCopy == NULL) + throw FileError(wxString(_("Error starting Volume Shadow Copy Service!")) + wxT("\n") + + _("Could not load a required DLL:") + wxT(" \"") + getShadowDllName().c_str() + wxT("\"")); + //VSS does not support running under WOW64 except for Windows XP and Windows Server 2003 + //(Reference: http://msdn.microsoft.com/en-us/library/aa384627(VS.85).aspx) + static const bool wow64Active = runningWOW64(); + if (wow64Active) + throw FileError(wxString(_("Error starting Volume Shadow Copy Service!")) + wxT("\n") + + _("Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.")); -Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile) -{ - using namespace Shadow; +//--------------------------------------------------------------------------------------------------------- + //start shadow volume copy service: + wchar_t shadowVolName[1000]; + wchar_t errorMessage[1000]; + + if (!createShadowCopy( + volumeNameFormatted.c_str(), + shadowVolName, + 1000, + &backupHandle, + errorMessage, + 1000)) + throw FileError(wxString(_("Error starting Volume Shadow Copy Service!")) + wxT("\n") + + wxT("(") + errorMessage + wxT(" Volume: \"") + volumeNameFormatted.c_str() + wxT("\")")); - static const CreateShadowCopyFct createShadowCopy = - Utility::loadDllFunction<CreateShadowCopyFct>(getShadowDllName().c_str(), createShadowCopyFctName); + shadowVol = Zstring(shadowVolName) + common::FILE_NAME_SEPARATOR; //shadowVolName NEVER has a trailing backslash + } - static const ReleaseShadowCopyFct releaseShadowCopy = - Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), releaseShadowCopyFctName); + ~ShadowVolume() + { + releaseShadowCopy(backupHandle); + } - //check if shadow copy dll was loaded correctly - if ( createShadowCopy == NULL || - releaseShadowCopy == NULL) + Zstring getShadowVolume() const //trailing path separator { - wxString errorMsg = _("Error copying locked file %x!"); - errorMsg.Replace(wxT("%x"), wxString(wxT("\"")) + inputFile.c_str() + wxT("\"")); - throw FileError(errorMsg + wxT("\n\n") + _("Error starting Volume Shadow Copy Service!") + wxT("\n") + - _("Could not load a required DLL:") + wxT(" \"") + getShadowDllName() + wxT("\"")); + return shadowVol; } - //VSS does not support running under WOW64 except for Windows XP and Windows Server 2003 - //(Reference: http://msdn.microsoft.com/en-us/library/aa384627(VS.85).aspx) - static const bool wow64Active = runningWOW64(); - if (wow64Active) + Zstring getRealVolume() const //trailing path separator { - wxString errorMsg = _("Error copying locked file %x!"); - errorMsg.Replace(wxT("%x"), wxString(wxT("\"")) + inputFile.c_str() + wxT("\"")); - throw FileError(errorMsg + wxT("\n\n") + _("Error starting Volume Shadow Copy Service!") + wxT("\n") + - _("Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.")); + return realVol; } +private: + ShadowVolume(const ShadowVolume&); + ShadowVolume& operator=(const ShadowVolume&); + + static shadow::CreateShadowCopyFct createShadowCopy; + static shadow::ReleaseShadowCopyFct releaseShadowCopy; + + Zstring shadowVol; + const Zstring realVol; + + void* backupHandle; +}; + + +shadow::CreateShadowCopyFct ShadowCopy::ShadowVolume::createShadowCopy; +shadow::ReleaseShadowCopyFct ShadowCopy::ShadowVolume::releaseShadowCopy; +//############################################################################################################# + + +Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile) +{ + using namespace ffs3; -//--------------------------------------------------------------------------------------------------------- wchar_t volumeNameRaw[1000]; if (!::GetVolumePathName(inputFile.c_str(), //__in LPCTSTR lpszFileName, volumeNameRaw, //__out LPTSTR lpszVolumePathName, 1000)) //__in DWORD cchBufferLength - { - wxString errorMsg = _("Error copying locked file %x!"); - errorMsg.Replace(wxT("%x"), wxString(wxT("\"")) + inputFile.c_str() + wxT("\"")); - throw FileError(errorMsg + wxT("\n\n") + _("Could not determine volume name for file:") + wxT("\n\"") + inputFile.c_str() + wxT("\"")); - } + throw FileError(wxString(_("Could not determine volume name for file:")) + wxT("\n\"") + zToWx(inputFile) + wxT("\"")); Zstring volumeNameFormatted = volumeNameRaw; - if (!volumeNameFormatted.EndsWith(globalFunctions::FILE_NAME_SEPARATOR)) - volumeNameFormatted += globalFunctions::FILE_NAME_SEPARATOR; - - if (volumeNameFormatted != realVolumeLast) - { - //release old shadow copy - if (backupHandle != NULL) - { - releaseShadowCopy(backupHandle); - backupHandle = NULL; - } - realVolumeLast.clear(); //...if next call fails... - shadowVolumeLast.clear(); //...if next call fails... - - //start shadow volume copy service: - wchar_t shadowVolName[1000]; - void* backupHandleTmp = NULL; - wchar_t errorMessage[1000]; - - if (!createShadowCopy( - volumeNameFormatted.c_str(), - shadowVolName, - 1000, - &backupHandleTmp, - errorMessage, - 1000)) - { - wxString errorMsg = _("Error copying locked file %x!"); - errorMsg.Replace(wxT("%x"), Zstring(wxT("\"")) + inputFile + wxT("\"")); - throw FileError(errorMsg + wxT("\n\n") + _("Error starting Volume Shadow Copy Service!") + wxT("\n") + - wxT("(") + errorMessage + wxT(" Volume: \"") + volumeNameFormatted.c_str() + wxT("\")")); - } - - realVolumeLast = volumeNameFormatted; - shadowVolumeLast = Zstring(shadowVolName) + globalFunctions::FILE_NAME_SEPARATOR; //shadowVolName NEVER has a trailing backslash - backupHandle = backupHandleTmp; - } + if (!volumeNameFormatted.EndsWith(common::FILE_NAME_SEPARATOR)) + volumeNameFormatted += common::FILE_NAME_SEPARATOR; //input file is always absolute! directory formatting takes care of this! Therefore volume name can always be found. const size_t pos = inputFile.find(volumeNameFormatted); //inputFile needs NOT to begin with volumeNameFormatted: consider for example \\?\ prefix! if (pos == Zstring::npos) { - wxString errorMsg = _("Error copying locked file %x!"); - errorMsg.Replace(wxT("%x"), Zstring(wxT("\"")) + inputFile + wxT("\"")); - wxString msg = _("Volume name %x not part of filename %y!"); - msg.Replace(wxT("%x"), wxString(wxT("\"")) + volumeNameFormatted.c_str() + wxT("\""), false); - msg.Replace(wxT("%y"), wxString(wxT("\"")) + inputFile.c_str() + wxT("\""), false); - throw FileError(errorMsg + wxT("\n\n") + msg); + msg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(volumeNameFormatted) + wxT("\""), false); + msg.Replace(wxT("%y"), wxString(wxT("\"")) + zToWx(inputFile) + wxT("\""), false); + throw FileError(msg); } + + if (!shadowVol.get() || shadowVol->getRealVolume() != volumeNameFormatted) + shadowVol.reset(new ShadowVolume(volumeNameFormatted)); //throw (FileError) + //return filename alias on shadow copy volume - return shadowVolumeLast + Zstring(inputFile.c_str() + pos + volumeNameFormatted.length()); + return shadowVol->getShadowVolume() + Zstring(inputFile.c_str() + pos + volumeNameFormatted.length()); } - diff --git a/shared/shadow.h b/shared/shadow.h index ca373e40..60d30bbd 100644 --- a/shared/shadow.h +++ b/shared/shadow.h @@ -12,15 +12,24 @@ use in windows build only! #endif #include "zstring.h" -#include "fileError.h" +#include "file_error.h" +#include <memory> -namespace FreeFileSync +namespace shadow { +struct WaitingForShadow +{ + virtual ~WaitingForShadow() {} + virtual void requestUiRefresh() = 0; //allowed to throw exceptions + virtual void updateStatusText(const Zstring& text) = 0; +}; + + class ShadowCopy //buffer access to Windows Volume Shadow Copy Service { public: - ShadowCopy(); + ShadowCopy(WaitingForShadow* callback); ~ShadowCopy(); Zstring makeShadowCopy(const Zstring& inputFile); //throw(FileError); returns filename on shadow copy @@ -29,9 +38,10 @@ private: ShadowCopy(const ShadowCopy&); ShadowCopy& operator=(const ShadowCopy&); - Zstring realVolumeLast; //buffer last volume name - Zstring shadowVolumeLast; //buffer last created shadow volume - void* backupHandle; + WaitingForShadow* callback_; + + class ShadowVolume; + std::auto_ptr<ShadowVolume> shadowVol; }; } diff --git a/shared/signal_processing.h b/shared/signal_processing.h new file mode 100644 index 00000000..857d0b12 --- /dev/null +++ b/shared/signal_processing.h @@ -0,0 +1,166 @@ +// ************************************************************************** +// * 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) * +// ************************************************************************** +// +#include <algorithm> +#include <limits> +#include <numeric> + + +namespace util +{ +template <class T> +T abs(T value); + +int round(double d); //little rounding function + +template <class T> +bool isNull(T number); + +//---------------------------------------------------------------------------------- +// smoothen data ranges through a window around each data point | +//---------------------------------------------------------------------------------- +template <class InputIterator, class OutputIterator> +void smoothen(InputIterator first, InputIterator last, OutputIterator result, size_t windowSize); //default implementation: averaging + +template <class InputIterator, class OutputIterator, class DataProcessor> +void smoothen(InputIterator first, InputIterator last, OutputIterator result, size_t windowSize, DataProcessor proc); +/* +DataProcessor is an abstraction for data evaluation. A valid implementation needs to support three properties: +- add data entry at window front: operator+=(ValueType value) +- remove data entry at window back: operator-=(ValueType value) +- evaluate smoothed middle value: ValueType operator()(size_t windowSize) +*/ +//---------------------------------------------------------------------------------- + + + + + + + + + + + + + + + + + + + + + + +//################# inline implementation ######################### +template <class T> +inline +T abs(T value) +{ + return value < 0 ? -value : value; +} + + +template <class T> +inline +bool isNull(T value) +{ + return abs(number) <= std::numeric_limits<T>::epsilon(); //epsilon == 0 for integer types, therefore less-equal(!) +} + + +inline +int round(double d) +{ + return static_cast<int>(d < 0 ? d - .5 : d + .5); +} + + +template <class InputIterator, class OutputIterator, class DataProcessor> +inline +void smoothen(InputIterator first, InputIterator last, OutputIterator result, size_t windowSize, DataProcessor proc) +{ + windowSize = std::min(windowSize, static_cast<size_t>(last - first)); //std::distance() not used to enforce random access iterator requirement + + if (windowSize <= 1) + { + std::copy(first, last, result); + return; + } + + const size_t firstHalf = windowSize / 2; + const size_t secondHalf = windowSize - firstHalf; + + //preparation + for (InputIterator i = first; i != first + secondHalf; ++i) + proc += *i; + + //beginning + for (InputIterator i = first; i != first + firstHalf; ++i) + { + *result++ = proc(i - first + secondHalf); + proc += *(i + secondHalf); + } + + //main + for (InputIterator i = first + firstHalf; i != last - secondHalf; ++i) + { + *result++ = proc(windowSize); + proc += *(i + secondHalf); + proc -= *(i - firstHalf); + } + + //ending + for (InputIterator i = last - secondHalf; i != last; ++i) + { + *result++ = proc(windowSize - (i - last + secondHalf)); + proc -= *(i - firstHalf); + } +} + + +template <class ValueType> +class ProcessorAverage +{ +public: + ProcessorAverage() : valueAcc() {} + + //add front data entry + ProcessorAverage& operator+=(ValueType value) + { + valueAcc += value; + return *this; + } + + //remove rear data entry + ProcessorAverage& operator-=(ValueType value) + { + valueAcc -= value; + return *this; + } + + //evaluate smoothed value + ValueType operator()(size_t windowSize) const + { + return valueAcc / windowSize; + } + +private: + ValueType valueAcc; //accumulated values +}; + + + +template <class InputIterator, class OutputIterator> +inline +void smoothen(InputIterator first, InputIterator last, OutputIterator result, size_t windowSize) +{ + typedef typename std::iterator_traits<InputIterator>::value_type ValueType; + smoothen(first, last, result, windowSize, ProcessorAverage<ValueType>()); +} + +}
\ No newline at end of file diff --git a/shared/standardPaths.cpp b/shared/standard_paths.cpp index e442c865..2bebe056 100644 --- a/shared/standardPaths.cpp +++ b/shared/standard_paths.cpp @@ -4,33 +4,33 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "standardPaths.h" +#include "standard_paths.h" #include <wx/stdpaths.h> #include <wx/filename.h> -#include "systemConstants.h" -#include "stringConv.h" +#include "system_constants.h" +#include "string_conv.h" -using namespace FreeFileSync; +using namespace ffs3; -bool FreeFileSync::isPortableVersion() +bool ffs3::isPortableVersion() { #ifdef FFS_WIN - static const bool isPortable = !wxFileExists(FreeFileSync::getBinaryDir() + wxT("uninstall.exe")); //this check is a bit lame... + static const bool isPortable = !wxFileExists(ffs3::getBinaryDir() + wxT("uninstall.exe")); //this check is a bit lame... #elif defined FFS_LINUX - static const bool isPortable = !FreeFileSync::getBinaryDir().EndsWith(wxT("/bin/")); //this check is a bit lame... + static const bool isPortable = !ffs3::getBinaryDir().EndsWith(wxT("/bin/")); //this check is a bit lame... #endif return isPortable; } -const wxString& FreeFileSync::getBinaryDir() +const wxString& ffs3::getBinaryDir() { - static wxString instance = wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath() + zToWx(globalFunctions::FILE_NAME_SEPARATOR); + static wxString instance = wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath() + zToWx(common::FILE_NAME_SEPARATOR); return instance; } -const wxString& FreeFileSync::getResourceDir() +const wxString& ffs3::getResourceDir() { #ifdef FFS_WIN return getBinaryDir(); @@ -48,8 +48,8 @@ const wxString& FreeFileSync::getResourceDir() { resourceDir = wxStandardPathsBase::Get().GetResourcesDir(); - if (!resourceDir.EndsWith(zToWx(globalFunctions::FILE_NAME_SEPARATOR))) - resourceDir += zToWx(globalFunctions::FILE_NAME_SEPARATOR); + if (!resourceDir.EndsWith(zToWx(common::FILE_NAME_SEPARATOR))) + resourceDir += zToWx(common::FILE_NAME_SEPARATOR); } } @@ -58,7 +58,7 @@ const wxString& FreeFileSync::getResourceDir() } -const wxString& FreeFileSync::getConfigDir() +const wxString& ffs3::getConfigDir() { static wxString userDirectory; @@ -68,7 +68,7 @@ const wxString& FreeFileSync::getConfigDir() isInitalized = true; if (isPortableVersion()) - //userDirectory = wxString(wxT(".")) + zToWx(globalFunctions::FILE_NAME_SEPARATOR); //use current working directory + //userDirectory = wxString(wxT(".")) + zToWx(common::FILE_NAME_SEPARATOR); //use current working directory userDirectory = getBinaryDir(); //avoid surprises with GlobalSettings.xml being newly created in each working directory else //use OS' standard paths { @@ -77,8 +77,8 @@ const wxString& FreeFileSync::getConfigDir() if (!wxDirExists(userDirectory)) ::wxMkdir(userDirectory); //only top directory needs to be created: no recursion necessary - if (!userDirectory.EndsWith(zToWx(globalFunctions::FILE_NAME_SEPARATOR))) - userDirectory += zToWx(globalFunctions::FILE_NAME_SEPARATOR); + if (!userDirectory.EndsWith(zToWx(common::FILE_NAME_SEPARATOR))) + userDirectory += zToWx(common::FILE_NAME_SEPARATOR); } } diff --git a/shared/standardPaths.h b/shared/standard_paths.h index 0ebeebd2..956cf81c 100644 --- a/shared/standardPaths.h +++ b/shared/standard_paths.h @@ -10,7 +10,7 @@ #include <wx/string.h> -namespace FreeFileSync +namespace ffs3 { //------------------------------------------------------------------------------ //global program directories diff --git a/shared/staticAssert.h b/shared/staticAssert.h deleted file mode 100644 index 14f52221..00000000 --- a/shared/staticAssert.h +++ /dev/null @@ -1,24 +0,0 @@ -// ************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * -// ************************************************************************** -// -#ifndef STATICASSERT_H_INCLUDED -#define STATICASSERT_H_INCLUDED - -//Reference: Compile-Time Assertions, C/C++ Users Journal November, 2004 (http://pera-software.com/articles/compile-time-assertions.pdf) - -#ifdef NDEBUG -//If not debugging, assert does nothing. -#define assert_static(x) ((void)0) - -#else /* debugging enabled */ - -#define assert_static(e) \ -do { \ -enum { assert_static__ = 1/(static_cast<int>(e)) }; \ -} while (0) -#endif - -#endif // STATICASSERT_H_INCLUDED diff --git a/shared/stringConv.h b/shared/string_conv.h index 454a65f7..bbaef713 100644 --- a/shared/stringConv.h +++ b/shared/string_conv.h @@ -10,7 +10,7 @@ #include <wx/string.h> #include "zstring.h" -namespace FreeFileSync +namespace ffs3 { //conversion from Zstring to wxString wxString zToWx(const Zstring& str); diff --git a/shared/systemConstants.h b/shared/system_constants.h index d686ac50..6877f5c7 100644 --- a/shared/systemConstants.h +++ b/shared/system_constants.h @@ -10,7 +10,7 @@ #include "zstring.h" #include <wx/string.h> -namespace globalFunctions +namespace common { //------------------------------------------------ // GLOBALS diff --git a/shared/systemFunctions.cpp b/shared/system_func.cpp index 41ce9377..71335d71 100644 --- a/shared/systemFunctions.cpp +++ b/shared/system_func.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "systemFunctions.h" +#include "system_func.h" #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" @@ -17,7 +17,7 @@ #ifdef FFS_WIN -wxString FreeFileSync::getLastErrorFormatted(unsigned long lastError) //try to get additional Windows error information +wxString ffs3::getLastErrorFormatted(unsigned long lastError) //try to get additional Windows error information { //determine error code if none was specified if (lastError == 0) @@ -28,11 +28,13 @@ wxString FreeFileSync::getLastErrorFormatted(unsigned long lastError) //try to g WCHAR buffer[1001]; if (::FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK, 0, lastError, 0, buffer, 1001, NULL) != 0) output += wxString(wxT(": ")) + buffer; + + ::SetLastError(lastError); //restore last error return output; } #elif defined FFS_LINUX -wxString FreeFileSync::getLastErrorFormatted(int lastError) //try to get additional Linux error information +wxString ffs3::getLastErrorFormatted(int lastError) //try to get additional Linux error information { //determine error code if none was specified if (lastError == 0) @@ -40,6 +42,8 @@ wxString FreeFileSync::getLastErrorFormatted(int lastError) //try to get additio wxString output = wxString(wxT("Linux Error Code ")) + wxString::Format(wxT("%i"), lastError); output += wxString(wxT(": ")) + wxString::FromUTF8(::strerror(lastError)); + + errno = lastError; //restore errno return output; } #endif diff --git a/shared/systemFunctions.h b/shared/system_func.h index d197ceb6..b15f4c0c 100644 --- a/shared/systemFunctions.h +++ b/shared/system_func.h @@ -10,7 +10,7 @@ #include <wx/string.h> -namespace FreeFileSync +namespace ffs3 { //evaluate GetLastError()/errno and assemble specific error message #ifdef FFS_WIN diff --git a/shared/taskbar.cpp b/shared/taskbar.cpp index 47681958..61a1841b 100644 --- a/shared/taskbar.cpp +++ b/shared/taskbar.cpp @@ -6,12 +6,12 @@ // #include "taskbar.h" #include "Taskbar_Seven/taskbar.h" -#include "dllLoader.h" -#include "buildInfo.h" -#include "staticAssert.h" +#include "dll_loader.h" +#include "build_info.h" +#include "assert_static.h" #include <wx/msw/wrapwin.h> //includes "windows.h" -using namespace Utility; +using namespace util; namespace @@ -33,14 +33,14 @@ bool windows7TaskbarAvailable() } -const wxString& getTaskBarDllName() +const std::wstring& getTaskBarDllName() { - static const wxString filename( - Utility::is64BitBuild ? - wxT("Taskbar7_x64.dll") : - wxT("Taskbar7_Win32.dll")); + assert_static(util::is32BitBuild || util::is64BitBuild); - assert_static(Utility::is32BitBuild || Utility::is64BitBuild); + static const std::wstring filename( + util::is64BitBuild ? + L"Taskbar7_x64.dll" : + L"Taskbar7_Win32.dll"); return filename; } @@ -71,10 +71,10 @@ TaskbarProgress::TaskbarProgress(const wxTopLevelWindow& window) : pimpl_(new Pi if (!windows7TaskbarAvailable()) throw TaskbarNotAvailable(); - pimpl_->init_ = Utility::loadDllFunction<TaskbarSeven::initFct>( getTaskBarDllName().c_str(), TaskbarSeven::initFctName); - pimpl_->release_ = Utility::loadDllFunction<TaskbarSeven::releaseFct>( getTaskBarDllName().c_str(), TaskbarSeven::releaseFctName); - pimpl_->setProgress_ = Utility::loadDllFunction<TaskbarSeven::setProgressFct>(getTaskBarDllName().c_str(), TaskbarSeven::setProgressFctName); - pimpl_->setStatus_ = Utility::loadDllFunction<TaskbarSeven::setStatusFct>( getTaskBarDllName().c_str(), TaskbarSeven::setStatusFctName); + pimpl_->init_ = util::loadDllFunction<TaskbarSeven::initFct>( getTaskBarDllName(), TaskbarSeven::initFctName); + pimpl_->release_ = util::loadDllFunction<TaskbarSeven::releaseFct>( getTaskBarDllName(), TaskbarSeven::releaseFctName); + pimpl_->setProgress_ = util::loadDllFunction<TaskbarSeven::setProgressFct>(getTaskBarDllName(), TaskbarSeven::setProgressFctName); + pimpl_->setStatus_ = util::loadDllFunction<TaskbarSeven::setStatusFct>( getTaskBarDllName(), TaskbarSeven::setStatusFctName); if ( !pimpl_->init_ || !pimpl_->release_ || diff --git a/shared/taskbar.h b/shared/taskbar.h index 278aca0e..02d7324d 100644 --- a/shared/taskbar.h +++ b/shared/taskbar.h @@ -15,7 +15,7 @@ use in windows build only! #include <memory> -namespace Utility +namespace util { class TaskbarNotAvailable {}; diff --git a/shared/toggleButton.cpp b/shared/toggle_button.cpp index 6a35a85d..2da64ee4 100644 --- a/shared/toggleButton.cpp +++ b/shared/toggle_button.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "toggleButton.h" +#include "toggle_button.h" void ToggleButton::init(const wxBitmap& activeBmp, const wxString& activeTooltip, diff --git a/shared/toggleButton.h b/shared/toggle_button.h index a67d5fff..a67d5fff 100644 --- a/shared/toggleButton.h +++ b/shared/toggle_button.h diff --git a/shared/util.cpp b/shared/util.cpp index f3013e66..9e0cb9d3 100644 --- a/shared/util.cpp +++ b/shared/util.cpp @@ -10,30 +10,30 @@ #include <wx/combobox.h> #include <wx/filepicker.h> #include "localization.h" -#include "fileHandling.h" -#include "stringConv.h" +#include "file_handling.h" +#include "string_conv.h" #include <stdexcept> -#include "systemFunctions.h" -#include "checkExist.h" +#include "system_func.h" +#include "check_exist.h" #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" #endif -wxString FreeFileSync::formatFilesizeToShortString(const wxLongLong& filesize) +wxString ffs3::formatFilesizeToShortString(const wxLongLong& filesize) { - return FreeFileSync::formatFilesizeToShortString(filesize.ToDouble()); + return ffs3::formatFilesizeToShortString(filesize.ToDouble()); } -wxString FreeFileSync::formatFilesizeToShortString(const wxULongLong& filesize) +wxString ffs3::formatFilesizeToShortString(const wxULongLong& filesize) { - return FreeFileSync::formatFilesizeToShortString(filesize.ToDouble()); + return ffs3::formatFilesizeToShortString(filesize.ToDouble()); } -wxString FreeFileSync::formatFilesizeToShortString(double filesize) +wxString ffs3::formatFilesizeToShortString(double filesize) { if (filesize < 0) return _("Error"); @@ -65,7 +65,7 @@ wxString FreeFileSync::formatFilesizeToShortString(double filesize) } } //print just three significant digits: 0,01 | 0,11 | 1,11 | 11,1 | 111 - const size_t leadDigitCount = globalFunctions::getDigitCount(static_cast<size_t>(filesize)); //number of digits before decimal point + const size_t leadDigitCount = common::getDigitCount(static_cast<size_t>(filesize)); //number of digits before decimal point if (leadDigitCount == 0 || leadDigitCount > 3) return _("Error"); @@ -73,14 +73,14 @@ wxString FreeFileSync::formatFilesizeToShortString(double filesize) } else { - output.Replace(wxT("%x"), globalFunctions::numberToString(static_cast<int>(filesize))); //no decimal places in case of bytes + output.Replace(wxT("%x"), common::numberToString(static_cast<int>(filesize))); //no decimal places in case of bytes } return output; } -wxString FreeFileSync::formatPercentage(const wxLongLong& dividend, const wxLongLong& divisor) +wxString ffs3::formatPercentage(const wxLongLong& dividend, const wxLongLong& divisor) { const double ratio = divisor != 0 ? dividend.ToDouble() * 100 / divisor.ToDouble() : 0; wxString output = _("%x%"); @@ -89,11 +89,11 @@ wxString FreeFileSync::formatPercentage(const wxLongLong& dividend, const wxLong } -wxString FreeFileSync_Impl::includeNumberSeparator(const wxString& number) +wxString ffs_Impl::includeNumberSeparator(const wxString& number) { wxString output(number); for (size_t i = output.size(); i > 3; i -= 3) - output.insert(i - 3, FreeFileSync::getThousandsSeparator()); + output.insert(i - 3, ffs3::getThousandsSeparator()); return output; } @@ -102,30 +102,30 @@ wxString FreeFileSync_Impl::includeNumberSeparator(const wxString& number) template <class T> void setDirectoryNameImpl(const wxString& dirname, T* txtCtrl, wxDirPickerCtrl* dirPicker) { - using namespace FreeFileSync; + using namespace ffs3; txtCtrl->SetValue(dirname); - const Zstring dirFormatted = FreeFileSync::getFormattedDirectoryName(wxToZ(dirname)); + const Zstring dirFormatted = ffs3::getFormattedDirectoryName(wxToZ(dirname)); - if (Utility::dirExists(dirFormatted, 200) == Utility::EXISTING_TRUE) //potentially slow network access: wait 200ms at most + if (util::dirExists(dirFormatted, 200) == util::EXISTING_TRUE) //potentially slow network access: wait 200ms at most dirPicker->SetPath(zToWx(dirFormatted)); } -void FreeFileSync::setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker) +void ffs3::setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker) { setDirectoryNameImpl(dirname, txtCtrl, dirPicker); } -void FreeFileSync::setDirectoryName(const wxString& dirname, wxComboBox* txtCtrl, wxDirPickerCtrl* dirPicker) +void ffs3::setDirectoryName(const wxString& dirname, wxComboBox* txtCtrl, wxDirPickerCtrl* dirPicker) { txtCtrl->SetSelection(wxNOT_FOUND); setDirectoryNameImpl(dirname, txtCtrl, dirPicker); } -void FreeFileSync::scrollToBottom(wxScrolledWindow* scrWindow) +void ffs3::scrollToBottom(wxScrolledWindow* scrWindow) { int height = 0; scrWindow->GetClientSize(NULL, &height); @@ -172,7 +172,7 @@ void writeFourDigitNumber(size_t number, wxString& string) } } -wxString FreeFileSync::utcTimeToLocalString(const wxLongLong& utcTime) +wxString ffs3::utcTimeToLocalString(const wxLongLong& utcTime) { #ifdef FFS_WIN //convert ansi C time to FILETIME diff --git a/shared/util.h b/shared/util.h index 25048132..5023c00b 100644 --- a/shared/util.h +++ b/shared/util.h @@ -10,7 +10,7 @@ #include "../shared/zstring.h" #include <wx/string.h> #include <wx/longlong.h> -#include "../shared/globalFunctions.h" +#include "../shared/global_func.h" class wxComboBox; class wxTextCtrl; @@ -18,7 +18,7 @@ class wxDirPickerCtrl; class wxScrolledWindow; -namespace FreeFileSync +namespace ffs3 { wxString formatFilesizeToShortString(const wxLongLong& filesize); wxString formatFilesizeToShortString(const wxULongLong& filesize); @@ -64,20 +64,20 @@ wxString utcTimeToLocalString(const wxLongLong& utcTime); //throw std::runtime_e //--------------- inline impelementation ------------------------------------------- //helper function! not to be used directly -namespace FreeFileSync_Impl +namespace ffs_Impl { wxString includeNumberSeparator(const wxString& number); } -namespace FreeFileSync +namespace ffs3 { //wxULongLongNative doesn't support operator<<(std::ostream&, wxULongLongNative) template <> inline wxString numberToStringSep(wxULongLongNative number) { - return FreeFileSync_Impl::includeNumberSeparator(number.ToString()); + return ffs_Impl::includeNumberSeparator(number.ToString()); } @@ -85,7 +85,7 @@ template <class NumberType> inline wxString numberToStringSep(NumberType number) { - return FreeFileSync_Impl::includeNumberSeparator(globalFunctions::numberToString(number)); + return ffs_Impl::includeNumberSeparator(common::numberToString(number)); } } diff --git a/shared/xmlBase.cpp b/shared/xml_base.cpp index 42e33016..3213786d 100644 --- a/shared/xmlBase.cpp +++ b/shared/xml_base.cpp @@ -4,15 +4,15 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "xmlBase.h" +#include "xml_base.h" #include <wx/intl.h> -#include "fileIO.h" -#include "stringConv.h" -#include "systemConstants.h" +#include "file_io.h" +#include "string_conv.h" +#include "system_constants.h" #include <boost/scoped_array.hpp> -#include "fileHandling.h" +#include "file_handling.h" -using namespace FreeFileSync; +using namespace ffs3; std::string getTypeName(xmlAccess::XmlType type) @@ -79,7 +79,7 @@ void loadRawXmlDocument(const wxString& filename, TiXmlDocument& document) //thr } catch (const FileError& error) //more detailed error messages than with wxWidgets { - throw XmlError(error.show()); + throw XmlError(error.msg()); } //convert (0xD, 0xA) and (0xD) to (0xA): just like in TiXmlDocument::LoadFile(); not sure if actually needed @@ -163,7 +163,7 @@ bool saveNecessary(const Zstring& filename, const std::string& dataToWrite) //th { try { - if (FreeFileSync::getFilesize(filename) != static_cast<unsigned long>(dataToWrite.size())) //throw FileError(); + if (ffs3::getFilesize(filename) != static_cast<unsigned long>(dataToWrite.size())) //throw FileError(); return true; boost::scoped_array<char> inputBuffer(new char[dataToWrite.size() + 1]); //+ 1 in order to test for end of file! @@ -190,7 +190,7 @@ void xmlAccess::saveXmlDocument(const wxString& filename, const TiXmlDocument& d //convert XML into continuous byte sequence TiXmlPrinter printer; - printer.SetLineBreak(wxString(globalFunctions::LINE_BREAK).ToUTF8()); + printer.SetLineBreak(wxString(common::LINE_BREAK).ToUTF8()); document.Accept(&printer); const std::string buffer = printer.Str(); @@ -203,7 +203,7 @@ void xmlAccess::saveXmlDocument(const wxString& filename, const TiXmlDocument& d } catch (const FileError& error) //more detailed error messages than with wxWidgets { - throw XmlError(error.show()); + throw XmlError(error.msg()); } } } @@ -384,7 +384,7 @@ void XmlParser::logError(const std::string& nodeName) } -bool XmlParser::errorsOccured() const +bool XmlParser::errorsOccurred() const { return !failedNodes.empty(); } diff --git a/shared/xmlBase.h b/shared/xml_base.h index 8f7c4aa7..6d342b48 100644 --- a/shared/xmlBase.h +++ b/shared/xml_base.h @@ -8,11 +8,11 @@ #define XMLBASE_H_INCLUDED #include "tinyxml/tinyxml.h" -#include "globalFunctions.h" +#include "global_func.h" #include <string> #include <vector> #include <wx/string.h> -#include "xmlError.h" +#include "xml_error.h" namespace xmlAccess @@ -72,7 +72,7 @@ public: XmlParser(const TiXmlElement* rootElement) : root(rootElement) {} void logError(const std::string& nodeName); - bool errorsOccured() const; + bool errorsOccurred() const; const wxString getErrorMessageFormatted() const; protected: @@ -172,7 +172,7 @@ bool xmlAccess::readXmlElement(const std::string& name, const TiXmlElement* pare if (!readXmlElement(name, parent, temp)) return false; - output = globalFunctions::stringToNumber<T>(temp); + output = common::stringToNumber<T>(temp); return true; } @@ -181,7 +181,7 @@ template <class T> inline void xmlAccess::addXmlElement(const std::string& name, T value, TiXmlElement* parent) { - addXmlElement(name, globalFunctions::numberToString<std::string::value_type>(value), parent); + addXmlElement(name, common::numberToString<std::string::value_type>(value), parent); } @@ -192,7 +192,7 @@ bool xmlAccess::readXmlAttribute(const std::string& name, const TiXmlElement* no std::string dummy; if (readXmlAttribute(name, node, dummy)) { - output = globalFunctions::stringToNumber<T>(dummy); + output = common::stringToNumber<T>(dummy); return true; } else @@ -204,7 +204,7 @@ template <class T> inline void xmlAccess::addXmlAttribute(const std::string& name, T value, TiXmlElement* node) { - addXmlAttribute(name, globalFunctions::numberToString<std::string::value_type>(value), node); + addXmlAttribute(name, common::numberToString<std::string::value_type>(value), node); } #endif // XMLBASE_H_INCLUDED diff --git a/shared/xmlError.h b/shared/xml_error.h index f5f02c6a..bd5153cb 100644 --- a/shared/xmlError.h +++ b/shared/xml_error.h @@ -24,7 +24,7 @@ public: XmlError(const wxString& message, Severity sev = FATAL) : errorMessage(message), m_severity(sev) {} - const wxString& show() const + const wxString& msg() const { return errorMessage; } diff --git a/shared/zstring.cpp b/shared/zstring.cpp index 6bd0e824..39f1898d 100644 --- a/shared/zstring.cpp +++ b/shared/zstring.cpp @@ -9,16 +9,16 @@ #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" -#include "dllLoader.h" +#include "dll_loader.h" #include <boost/scoped_array.hpp> #endif //FFS_WIN -#ifdef __WXDEBUG__ +#ifndef NDEBUG #include <wx/string.h> #endif -#ifdef __WXDEBUG__ +#ifndef NDEBUG AllocationCount::~AllocationCount() { if (activeStrings.size() > 0) @@ -50,7 +50,7 @@ AllocationCount& AllocationCount::getInstance() static AllocationCount global; return global; } -#endif +#endif //NDEBUG #ifdef FFS_WIN namespace @@ -91,7 +91,7 @@ int compareFilenamesWin32(const wchar_t* a, const wchar_t* b, size_t sizeA, size LPCWSTR lpString2, int cchCount2, BOOL bIgnoreCase); - static const CompareStringOrdinalFunc ordinalCompare = Utility::loadDllFunction<CompareStringOrdinalFunc>(L"kernel32.dll", "CompareStringOrdinal"); + static const CompareStringOrdinalFunc ordinalCompare = util::loadDllFunction<CompareStringOrdinalFunc>(L"kernel32.dll", "CompareStringOrdinal"); if (ordinalCompare != NULL) //this additional test has no noticeable performance impact { @@ -173,22 +173,32 @@ int compareFilenamesWin32(const wchar_t* a, const wchar_t* b, size_t sizeA, size #endif -int Zstring::cmpFileName(const Zstring& other) const +int cmpFileName(const Zstring& lhs, const Zstring& rhs) +{ +#ifdef FFS_WIN + return ::compareFilenamesWin32(lhs.c_str(), rhs.c_str(), lhs.length(), rhs.length()); //way faster than wxString::CmpNoCase() +#elif defined FFS_LINUX + return ::strcmp(lhs.c_str(), rhs.c_str()); +#endif +} + + +int cmpFileName(const Zstring& lhs, const DefaultChar* rhs) { #ifdef FFS_WIN - return ::compareFilenamesWin32(c_str(), other.c_str(), length(), other.length()); //way faster than wxString::CmpNoCase() + return ::compareFilenamesWin32(lhs.c_str(), rhs, lhs.length(), ::wcslen(rhs)); //way faster than wxString::CmpNoCase() #elif defined FFS_LINUX - return defaultCompare(c_str(), other.c_str()); +return ::strcmp(lhs.c_str(), rhs); #endif } -int Zstring::cmpFileName(const DefaultChar* other) const +int cmpFileName(const DefaultChar* lhs, const DefaultChar* rhs) { #ifdef FFS_WIN - return ::compareFilenamesWin32(c_str(), other, length(), ::wcslen(other)); //way faster than wxString::CmpNoCase() + return ::compareFilenamesWin32(lhs, rhs, ::wcslen(lhs), ::wcslen(rhs)); //way faster than wxString::CmpNoCase() #elif defined FFS_LINUX - return defaultCompare(c_str(), other); + return ::strcmp(lhs, rhs); #endif } @@ -569,7 +579,7 @@ void Zstring::reserve(size_t capacityNeeded) //make unshared and check capacity //try to resize the current string (allocate anew if necessary) const size_t newCapacity = getCapacityToAllocate(capacityNeeded); -#ifdef __WXDEBUG__ +#ifndef NDEBUG AllocationCount::getInstance().dec(c_str()); //test Zstring for memory leaks #endif @@ -577,7 +587,7 @@ void Zstring::reserve(size_t capacityNeeded) //make unshared and check capacity if (descr == NULL) throw std::bad_alloc(); -#ifdef __WXDEBUG__ +#ifndef NDEBUG AllocationCount::getInstance().inc(c_str()); //test Zstring for memory leaks #endif diff --git a/shared/zstring.h b/shared/zstring.h index d59126df..7b993fd0 100644 --- a/shared/zstring.h +++ b/shared/zstring.h @@ -13,8 +13,9 @@ #include <vector> #include <sstream> #include <algorithm> //specialize std::swap +#include <functional> -#ifdef __WXDEBUG__ +#ifndef NDEBUG #include <set> #include <wx/thread.h> #endif @@ -40,10 +41,6 @@ public: operator const DefaultChar*() const; //implicit conversion to C string - //Compare filenames: Windows does NOT distinguish between upper/lower-case, while Linux DOES - int cmpFileName(const Zstring& other) const; - int cmpFileName(const DefaultChar* other) const; - //wxWidgets-like functions bool StartsWith(const DefaultChar* begin) const; bool StartsWith(DefaultChar begin) const; @@ -146,6 +143,17 @@ const Zstring operator+(const Zstring& lhs, DefaultChar rhs); template <class T> Zstring numberToZstring(const T& number); //convert number to Zstring +//Compare filenames: Windows does NOT distinguish between upper/lower-case, while Linux DOES +int cmpFileName(const Zstring& lhs, const Zstring& rhs); +int cmpFileName(const Zstring& lhs, const DefaultChar* rhs); +int cmpFileName(const DefaultChar* lhs, const Zstring& rhs); +int cmpFileName(const DefaultChar* lhs, const DefaultChar* rhs); + +struct LessFilename : public std::binary_function<Zstring, Zstring, bool>//case-insensitive on Windows, case-sensitive on Linux +{ + bool operator()(const Zstring& a, const Zstring& b) const; +}; + namespace std { template<> @@ -174,6 +182,15 @@ void swap(Zstring& rhs, Zstring& lhs) + + + + + + + + + //####################################################################################### //begin of implementation @@ -255,8 +272,7 @@ const DefaultChar* Zstring::defaultStrFind(const DefaultChar* str1, const Defaul } //-------------------------------------------------------------------------------------------------- - -#ifdef __WXDEBUG__ +#ifndef NDEBUG class AllocationCount //small test for memory leaks in Zstring { public: @@ -282,7 +298,7 @@ private: wxCriticalSection lockActStrings; std::set<const DefaultChar*> activeStrings; }; -#endif +#endif //NDEBUG inline @@ -307,7 +323,7 @@ Zstring::StringDescriptor* Zstring::allocate(const size_t newLength) newDescr->length = newLength; newDescr->capacity = newCapacity; -#ifdef __WXDEBUG__ +#ifndef NDEBUG AllocationCount::getInstance().inc(reinterpret_cast<DefaultChar*>(newDescr + 1)); //test Zstring for memory leaks #endif return newDescr; @@ -383,7 +399,7 @@ void Zstring::decRef() assert(descr && descr->refCount >= 1); //descr points to the begin of the allocated memory block if (--descr->refCount == 0) { -#ifdef __WXDEBUG__ +#ifndef NDEBUG AllocationCount::getInstance().dec(c_str()); //test Zstring for memory leaks #endif ::free(descr); //beginning of whole memory block @@ -765,4 +781,23 @@ Zstring numberToZstring(const T& number) //convert number to string the C++ way return Zstring(ss.str().c_str()); } + +inline +int cmpFileName(const DefaultChar* lhs, const Zstring& rhs) +{ + return cmpFileName(rhs, lhs); +} + + +inline +bool LessFilename::operator()(const Zstring& a, const Zstring& b) const +{ +// //quick check based on string length +// const size_t aLength = a.data.shortName.length(); +// const size_t bLength = b.data.shortName.length(); +// if (aLength != bLength) +// return aLength < bLength; + return cmpFileName(a, b) < 0; +} + #endif // ZSTRING_H_INCLUDED diff --git a/structures.cpp b/structures.cpp index 177bfa1b..7515a0cc 100644 --- a/structures.cpp +++ b/structures.cpp @@ -6,12 +6,12 @@ // #include "structures.h" #include <wx/intl.h> -#include <stdexcept> +//#include <stdexcept> -using namespace FreeFileSync; +using namespace ffs3; -Zstring FreeFileSync::standardExcludeFilter() +Zstring ffs3::standardExcludeFilter() { #ifdef FFS_WIN static Zstring exclude(wxT("\ @@ -26,7 +26,7 @@ Zstring FreeFileSync::standardExcludeFilter() } -wxString FreeFileSync::getVariantName(CompareVariant var) +wxString ffs3::getVariantName(CompareVariant var) { switch (var) { @@ -41,7 +41,7 @@ wxString FreeFileSync::getVariantName(CompareVariant var) } -wxString FreeFileSync::getVariantName(const SyncConfiguration& syncCfg) +wxString ffs3::getVariantName(const SyncConfiguration& syncCfg) { switch (getVariant(syncCfg)) { @@ -58,7 +58,7 @@ wxString FreeFileSync::getVariantName(const SyncConfiguration& syncCfg) } -void FreeFileSync::setTwoWay(SyncConfiguration& syncCfg) //helper method used by <Automatic> mode fallback to overwrite old with newer files +void ffs3::setTwoWay(SyncConfiguration& syncCfg) //helper method used by <Automatic> mode fallback to overwrite old with newer files { syncCfg.automatic = false; syncCfg.exLeftSideOnly = SYNC_DIR_RIGHT; @@ -70,7 +70,7 @@ void FreeFileSync::setTwoWay(SyncConfiguration& syncCfg) //helper method used by } -SyncConfiguration::Variant FreeFileSync::getVariant(const SyncConfiguration& syncCfg) +SyncConfiguration::Variant ffs3::getVariant(const SyncConfiguration& syncCfg) { if (syncCfg.automatic == true) return SyncConfiguration::AUTOMATIC; //automatic mode @@ -95,7 +95,7 @@ SyncConfiguration::Variant FreeFileSync::getVariant(const SyncConfiguration& syn } -void FreeFileSync::setVariant(SyncConfiguration& syncCfg, const SyncConfiguration::Variant var) +void ffs3::setVariant(SyncConfiguration& syncCfg, const SyncConfiguration::Variant var) { switch (var) { @@ -154,7 +154,7 @@ wxString MainConfiguration::getSyncVariantName() } -wxString FreeFileSync::getDescription(CompareFilesResult cmpRes) +wxString ffs3::getDescription(CompareFilesResult cmpRes) { switch (cmpRes) { @@ -179,7 +179,7 @@ wxString FreeFileSync::getDescription(CompareFilesResult cmpRes) } -wxString FreeFileSync::getSymbol(CompareFilesResult cmpRes) +wxString ffs3::getSymbol(CompareFilesResult cmpRes) { switch (cmpRes) { @@ -204,7 +204,7 @@ wxString FreeFileSync::getSymbol(CompareFilesResult cmpRes) } -wxString FreeFileSync::getDescription(SyncOperation op) +wxString ffs3::getDescription(SyncOperation op) { switch (op) { @@ -233,7 +233,7 @@ wxString FreeFileSync::getDescription(SyncOperation op) } -wxString FreeFileSync::getSymbol(SyncOperation op) +wxString ffs3::getSymbol(SyncOperation op) { switch (op) { @@ -260,3 +260,51 @@ wxString FreeFileSync::getSymbol(SyncOperation op) assert(false); return wxEmptyString; } + + +ffs3::MainConfiguration ffs3::merge(const std::vector<MainConfiguration>& mainCfgs) +{ + assert(!mainCfgs.empty()); + if (mainCfgs.empty()) + return ffs3::MainConfiguration(); + + if (mainCfgs.size() == 1) //mergeConfigFilesImpl relies on this! + return mainCfgs[0]; + + //merge folder pair config + std::vector<FolderPairEnh> fpMerged; + for (std::vector<MainConfiguration>::const_iterator i = mainCfgs.begin(); i != mainCfgs.end(); ++i) + { + std::vector<FolderPairEnh> fpTmp; + fpTmp.push_back(i->firstPair); + fpTmp.insert(fpTmp.end(), i->additionalPairs.begin(), i->additionalPairs.end()); + + //move all configuration to item level + for (std::vector<FolderPairEnh>::iterator fp = fpTmp.begin(); fp != fpTmp.end(); ++fp) + { + if (!fp->altSyncConfig.get()) + fp->altSyncConfig.reset( + new AlternateSyncConfig(i->syncConfiguration, + i->handleDeletion, + i->customDeletionDirectory)); + + //pragmatism: if both global and local include filter contain data, only local filter is preserved + if (fp->localFilter.includeFilter == FilterConfig().includeFilter) + fp->localFilter.includeFilter = i->globalFilter.includeFilter; + + fp->localFilter.excludeFilter.Trim(false); + fp->localFilter.excludeFilter = i->globalFilter.excludeFilter + DefaultStr("\n") + fp->localFilter.excludeFilter; + fp->localFilter.excludeFilter.Trim(false); + } + + fpMerged.insert(fpMerged.end(), fpTmp.begin(), fpTmp.end()); + } + + //final assembly + ffs3::MainConfiguration cfgOut = mainCfgs[0]; + cfgOut.globalFilter = FilterConfig(); //all filtering was moved to item level! + cfgOut.firstPair = fpMerged[0]; + cfgOut.additionalPairs.assign(fpMerged.begin() + 1, fpMerged.end()); + + return cfgOut; +} diff --git a/structures.h b/structures.h index f5a0517c..459cdf1b 100644 --- a/structures.h +++ b/structures.h @@ -10,11 +10,12 @@ #include <wx/string.h> #include <vector> #include "shared/zstring.h" -#include "shared/systemConstants.h" -#include "shared/staticAssert.h" +#include "shared/system_constants.h" +#include "shared/assert_static.h" #include <boost/shared_ptr.hpp> -namespace FreeFileSync + +namespace ffs3 { enum CompareVariant { @@ -43,7 +44,7 @@ enum CompareFilesResult FILE_EQUAL, FILE_CONFLICT }; -//attention make sure these /|\ \|/ two enums match!!! +//attention make sure these /|\ \|/ three enums match!!! enum CompareDirResult { DIR_LEFT_SIDE_ONLY = FILE_LEFT_SIDE_ONLY, @@ -51,13 +52,13 @@ enum CompareDirResult DIR_EQUAL = FILE_EQUAL }; -//attention make sure these /|\ \|/ two enums match!!! enum CompareSymlinkResult { SYMLINK_LEFT_SIDE_ONLY = FILE_LEFT_SIDE_ONLY, SYMLINK_RIGHT_SIDE_ONLY = FILE_RIGHT_SIDE_ONLY, SYMLINK_LEFT_NEWER = FILE_LEFT_NEWER, SYMLINK_RIGHT_NEWER = FILE_RIGHT_NEWER, + SYMLINK_DIFFERENT = FILE_DIFFERENT, SYMLINK_EQUAL = FILE_EQUAL, SYMLINK_CONFLICT = FILE_CONFLICT }; @@ -175,23 +176,6 @@ enum DeletionPolicy }; -struct HiddenSettings -{ - HiddenSettings() : - fileTimeTolerance(2), //default 2s: FAT vs NTFS - verifyFileCopy(false) {} - - size_t fileTimeTolerance; //max. allowed file time deviation - bool verifyFileCopy; //verify copied files - - bool operator==(const HiddenSettings& other) const - { - return fileTimeTolerance == other.fileTimeTolerance && - verifyFileCopy == other.verifyFileCopy; - } -}; - - struct AlternateSyncConfig { AlternateSyncConfig(const SyncConfiguration& syncCfg, @@ -300,15 +284,11 @@ struct MainConfiguration SymLinkHandling handleSymlinks; - //Synchronisation settings - SyncConfiguration syncConfiguration; - //GLOBAL filter settings FilterConfig globalFilter; - //misc options - HiddenSettings hidden; //settings not visible on GUI - + //Synchronisation settings + SyncConfiguration syncConfiguration; DeletionPolicy handleDeletion; //use Recycle, delete permanently or move to user-defined location wxString customDeletionDirectory; @@ -322,11 +302,13 @@ struct MainConfiguration handleSymlinks == other.handleSymlinks && syncConfiguration == other.syncConfiguration && globalFilter == other.globalFilter && - hidden == other.hidden && handleDeletion == other.handleDeletion && customDeletionDirectory == other.customDeletionDirectory; } }; + +//facilitate drag & drop config merge: +MainConfiguration merge(const std::vector<MainConfiguration>& mainCfgs); } #endif // FREEFILESYNC_H_INCLUDED diff --git a/synchronization.cpp b/synchronization.cpp index a071489d..a571d29d 100644 --- a/synchronization.cpp +++ b/synchronization.cpp @@ -9,25 +9,25 @@ #include <wx/intl.h> #include <wx/msgdlg.h> #include <wx/log.h> -#include "shared/stringConv.h" +#include "shared/string_conv.h" #include "shared/util.h" -#include "shared/systemConstants.h" -#include "library/statusHandler.h" -#include "shared/fileHandling.h" +#include "shared/system_constants.h" +#include "library/status_handler.h" +#include "shared/file_handling.h" #include "shared/recycler.h" #include <wx/file.h> #include <boost/bind.hpp> -#include "shared/globalFunctions.h" +#include "shared/global_func.h" #include <boost/scoped_array.hpp> #include <memory> -#include "library/dbFile.h" +#include "library/db_file.h" #ifdef FFS_WIN -#include "shared/longPathPrefix.h" +#include "shared/long_path_prefix.h" #include <boost/scoped_ptr.hpp> #endif -using namespace FreeFileSync; +using namespace ffs3; void SyncStatistics::init() @@ -251,7 +251,7 @@ void SyncStatistics::getDirNumbers(const DirMapping& dirObj) } -std::vector<FreeFileSync::FolderPairSyncCfg> FreeFileSync::extractSyncCfg(const MainConfiguration& mainCfg) +std::vector<ffs3::FolderPairSyncCfg> ffs3::extractSyncCfg(const MainConfiguration& mainCfg) { //merge first and additional pairs std::vector<FolderPairEnh> allPairs; @@ -306,33 +306,33 @@ private: switch (i->getSyncOperation()) //evaluate comparison result and sync direction { case SO_CREATE_NEW_LEFT: - spaceNeededLeft += globalFunctions::convertToSigned(i->getFileSize<RIGHT_SIDE>()); + spaceNeededLeft += common::convertToSigned(i->getFileSize<RIGHT_SIDE>()); break; case SO_CREATE_NEW_RIGHT: - spaceNeededRight += globalFunctions::convertToSigned(i->getFileSize<LEFT_SIDE>()); + spaceNeededRight += common::convertToSigned(i->getFileSize<LEFT_SIDE>()); break; case SO_DELETE_LEFT: if (freeSpaceDelLeft_) - spaceNeededLeft -= globalFunctions::convertToSigned(i->getFileSize<LEFT_SIDE>()); + spaceNeededLeft -= common::convertToSigned(i->getFileSize<LEFT_SIDE>()); break; case SO_DELETE_RIGHT: if (freeSpaceDelRight_) - spaceNeededRight -= globalFunctions::convertToSigned(i->getFileSize<RIGHT_SIDE>()); + spaceNeededRight -= common::convertToSigned(i->getFileSize<RIGHT_SIDE>()); break; case SO_OVERWRITE_LEFT: if (freeSpaceDelLeft_) - spaceNeededLeft -= globalFunctions::convertToSigned(i->getFileSize<LEFT_SIDE>()); - spaceNeededLeft += globalFunctions::convertToSigned(i->getFileSize<RIGHT_SIDE>()); + spaceNeededLeft -= common::convertToSigned(i->getFileSize<LEFT_SIDE>()); + spaceNeededLeft += common::convertToSigned(i->getFileSize<RIGHT_SIDE>()); break; case SO_OVERWRITE_RIGHT: if (freeSpaceDelRight_) - spaceNeededRight -= globalFunctions::convertToSigned(i->getFileSize<RIGHT_SIDE>()); - spaceNeededRight += globalFunctions::convertToSigned(i->getFileSize<LEFT_SIDE>()); + spaceNeededRight -= common::convertToSigned(i->getFileSize<RIGHT_SIDE>()); + spaceNeededRight += common::convertToSigned(i->getFileSize<LEFT_SIDE>()); break; case SO_DO_NOTHING: @@ -368,7 +368,7 @@ bool deletionFreesSpace(const Zstring& baseDir, case MOVE_TO_RECYCLE_BIN: return false; //in general... (unless Recycle Bin is full) case MOVE_TO_CUSTOM_DIRECTORY: - switch (FreeFileSync::onSameVolume(baseDir, custDelFolderFmt)) + switch (ffs3::onSameVolume(baseDir, custDelFolderFmt)) { case VOLUME_SAME: return false; @@ -409,7 +409,7 @@ bool synchronizationNeeded(const SyncStatistics& statisticsTotal) } -bool FreeFileSync::synchronizationNeeded(const FolderComparison& folderCmp) +bool ffs3::synchronizationNeeded(const FolderComparison& folderCmp) { const SyncStatistics statisticsTotal(folderCmp); return ::synchronizationNeeded(statisticsTotal); @@ -444,7 +444,7 @@ FolderPairSyncCfg::FolderPairSyncCfg(bool automaticMode, const Zstring& custDelDir) : inAutomaticMode(automaticMode), handleDeletion(handleDel), - custDelFolder(FreeFileSync::getFormattedDirectoryName(custDelDir)) {} + custDelFolder(ffs3::getFormattedDirectoryName(custDelDir)) {} //----------------------------------------------------------------------------------------------------------- @@ -466,7 +466,7 @@ void tryReportingError(StatusHandler& handler, Function cmd) //linux build: this refresh is not necessary, because user abort triggers an AbortThisProcess() exception without a FileError() handler.requestUiRefresh(true); //may throw! - ErrorHandler::Response rv = handler.reportError(error.show()); //may throw! + ErrorHandler::Response rv = handler.reportError(error.msg()); //may throw! if ( rv == ErrorHandler::IGNORE_ERROR) break; else if (rv == ErrorHandler::RETRY) @@ -487,11 +487,11 @@ Zstring getSessionDeletionDir(const Zstring& deletionDirectory, const Zstring& p if (formattedDir.empty()) return Zstring(); //no valid directory for deletion specified (checked later) - if (!formattedDir.EndsWith(globalFunctions::FILE_NAME_SEPARATOR)) - formattedDir += globalFunctions::FILE_NAME_SEPARATOR; + if (!formattedDir.EndsWith(common::FILE_NAME_SEPARATOR)) + formattedDir += common::FILE_NAME_SEPARATOR; wxString timeNow = wxDateTime::Now().FormatISOTime(); - timeNow.Replace(wxT(":"), wxT("-")); + timeNow.Replace(wxT(":"), wxT("")); const wxString sessionName = wxDateTime::Now().FormatISODate() + wxChar(' ') + timeNow; formattedDir += prefix + wxToZ(sessionName); @@ -501,10 +501,10 @@ Zstring getSessionDeletionDir(const Zstring& deletionDirectory, const Zstring& p Zstring output = formattedDir; //ensure uniqueness - for (int i = 1; FreeFileSync::somethingExists(output); ++i) + for (int i = 1; ffs3::somethingExists(output); ++i) output = formattedDir + DefaultChar('_') + numberToZstring(i); - output += globalFunctions::FILE_NAME_SEPARATOR; + output += common::FILE_NAME_SEPARATOR; return output; } @@ -512,9 +512,11 @@ Zstring getSessionDeletionDir(const Zstring& deletionDirectory, const Zstring& p SyncProcess::SyncProcess(xmlAccess::OptionalDialogs& warnings, bool verifyCopiedFiles, bool copyLockedFiles, + bool copyFilePermissions, StatusHandler& handler) : - m_verifyCopiedFiles(verifyCopiedFiles), + verifyCopiedFiles_(verifyCopiedFiles), copyLockedFiles_(copyLockedFiles), + copyFilePermissions_(copyFilePermissions), m_warnings(warnings), statusUpdater(handler) {} //-------------------------------------------------------------------------------------------------------------- @@ -522,12 +524,12 @@ SyncProcess::SyncProcess(xmlAccess::OptionalDialogs& warnings, namespace { -void ensureExists(const Zstring& dirname, const Zstring& templateDir = Zstring()) //throw (FileError) +void ensureExists(const Zstring& dirname, const Zstring& templateDir = Zstring(), bool copyFilePermissions = false) //throw (FileError) { if (!dirname.empty()) //kind of pathological ? - if (!FreeFileSync::dirExists(dirname)) + if (!ffs3::dirExists(dirname)) //lazy creation of alternate deletion directory (including super-directories of targetFile) - FreeFileSync::createDirectory(dirname, templateDir, false); + ffs3::createDirectory(dirname, templateDir, false, copyFilePermissions); /*symbolic link handling: if "not traversing symlinks": fullName == c:\syncdir<symlinks>\some\dirs\leaf<symlink> => setting irrelevant @@ -550,10 +552,10 @@ public: //clean-up temporary directory (recycler bin optimization) void tryCleanup() const; //throw (FileError) -> call this in non-exceptional coding, i.e. after Sync somewhere! - template <FreeFileSync::SelectedSide side> + template <ffs3::SelectedSide side> void removeFile(const FileSystemObject& fileObj) const; //throw (FileError) - template <FreeFileSync::SelectedSide side> + template <ffs3::SelectedSide side> void removeFolder(const FileSystemObject& dirObj) const; //throw (FileError) const Zstring& getTxtRemovingFile() const; //status text templates @@ -640,14 +642,14 @@ void DeletionHandling::tryCleanup() const //throw(AbortThisProcess) void DeletionHandling::tryCleanupLeft() const //throw (FileError) { if (deletionType == MOVE_TO_RECYCLE_BIN) //clean-up temporary directory (recycle bin) - FreeFileSync::moveToRecycleBin(sessionDelDirLeft.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR)); //throw (FileError) + ffs3::moveToRecycleBin(sessionDelDirLeft.BeforeLast(common::FILE_NAME_SEPARATOR)); //throw (FileError) } void DeletionHandling::tryCleanupRight() const //throw (FileError) { if (deletionType == MOVE_TO_RECYCLE_BIN) //clean-up temporary directory (recycle bin) - FreeFileSync::moveToRecycleBin(sessionDelDirRight.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR)); //throw (FileError) + ffs3::moveToRecycleBin(sessionDelDirRight.BeforeLast(common::FILE_NAME_SEPARATOR)); //throw (FileError) } @@ -709,20 +711,20 @@ private: }; -template <FreeFileSync::SelectedSide side> +template <ffs3::SelectedSide side> void DeletionHandling::removeFile(const FileSystemObject& fileObj) const { switch (deletionType) { - case FreeFileSync::DELETE_PERMANENTLY: - FreeFileSync::removeFile(fileObj.getFullName<side>()); + case ffs3::DELETE_PERMANENTLY: + ffs3::removeFile(fileObj.getFullName<side>()); break; - case FreeFileSync::MOVE_TO_RECYCLE_BIN: - if (FreeFileSync::fileExists(fileObj.getFullName<side>())) + case ffs3::MOVE_TO_RECYCLE_BIN: + if (ffs3::fileExists(fileObj.getFullName<side>())) { const Zstring targetFile = getSessionDir<side>() + fileObj.getRelativeName<side>(); //altDeletionDir ends with path separator - const Zstring targetDir = targetFile.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring targetDir = targetFile.BeforeLast(common::FILE_NAME_SEPARATOR); ensureExists(targetDir); //throw (FileError) @@ -730,46 +732,46 @@ void DeletionHandling::removeFile(const FileSystemObject& fileObj) const { //performance optimization!! Instead of moving each object into recycle bin separately, we rename them ony by one into a //temporary directory and delete this directory only ONCE! - FreeFileSync::renameFile(fileObj.getFullName<side>(), targetFile); //throw (FileError); + ffs3::renameFile(fileObj.getFullName<side>(), targetFile); //throw (FileError); } catch (...) { //if anything went wrong, move to recycle bin the standard way (single file processing: slow) - FreeFileSync::moveToRecycleBin(fileObj.getFullName<side>()); //throw (FileError) + ffs3::moveToRecycleBin(fileObj.getFullName<side>()); //throw (FileError) } } break; - case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY: - if (FreeFileSync::fileExists(fileObj.getFullName<side>())) + case ffs3::MOVE_TO_CUSTOM_DIRECTORY: + if (ffs3::fileExists(fileObj.getFullName<side>())) { const Zstring targetFile = getSessionDir<side>() + fileObj.getRelativeName<side>(); //altDeletionDir ends with path separator - const Zstring targetDir = targetFile.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring targetDir = targetFile.BeforeLast(common::FILE_NAME_SEPARATOR); ensureExists(targetDir); //throw (FileError) MoveFileCallbackImpl callBack(statusUpdater_); //if file needs to be copied we need callback functionality to update screen and offer abort - FreeFileSync::moveFile(fileObj.getFullName<side>(), targetFile, &callBack); + ffs3::moveFile(fileObj.getFullName<side>(), targetFile, &callBack); } break; } } -template <FreeFileSync::SelectedSide side> +template <ffs3::SelectedSide side> void DeletionHandling::removeFolder(const FileSystemObject& dirObj) const { switch (deletionType) { - case FreeFileSync::DELETE_PERMANENTLY: - FreeFileSync::removeDirectory(dirObj.getFullName<side>()); + case ffs3::DELETE_PERMANENTLY: + ffs3::removeDirectory(dirObj.getFullName<side>()); break; - case FreeFileSync::MOVE_TO_RECYCLE_BIN: - if (FreeFileSync::dirExists(dirObj.getFullName<side>())) + case ffs3::MOVE_TO_RECYCLE_BIN: + if (ffs3::dirExists(dirObj.getFullName<side>())) { const Zstring targetDir = getSessionDir<side>() + dirObj.getRelativeName<side>(); - const Zstring targetSuperDir = targetDir.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring targetSuperDir = targetDir.BeforeLast(common::FILE_NAME_SEPARATOR); ensureExists(targetSuperDir); //throw (FileError) @@ -777,27 +779,27 @@ void DeletionHandling::removeFolder(const FileSystemObject& dirObj) const { //performance optimization!! Instead of moving each object into recycle bin separately, we rename them ony by one into a //temporary directory and delete this directory only ONCE! - FreeFileSync::renameFile(dirObj.getFullName<side>(), targetDir); //throw (FileError); + ffs3::renameFile(dirObj.getFullName<side>(), targetDir); //throw (FileError); } catch (...) { //if anything went wrong, move to recycle bin the standard way (single file processing: slow) - FreeFileSync::moveToRecycleBin(dirObj.getFullName<side>()); //throw (FileError) + ffs3::moveToRecycleBin(dirObj.getFullName<side>()); //throw (FileError) } } break; - case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY: - if (FreeFileSync::dirExists(dirObj.getFullName<side>())) + case ffs3::MOVE_TO_CUSTOM_DIRECTORY: + if (ffs3::dirExists(dirObj.getFullName<side>())) { const Zstring targetDir = getSessionDir<side>() + dirObj.getRelativeName<side>(); - const Zstring targetSuperDir = targetDir.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring targetSuperDir = targetDir.BeforeLast(common::FILE_NAME_SEPARATOR); ensureExists(targetSuperDir); //throw (FileError) MoveFileCallbackImpl callBack(statusUpdater_); //if files need to be copied, we need callback functionality to update screen and offer abort - FreeFileSync::moveDirectory(dirObj.getFullName<side>(), targetDir, true, &callBack); + ffs3::moveDirectory(dirObj.getFullName<side>(), targetDir, true, &callBack); } break; } @@ -855,12 +857,12 @@ bool diskSpaceIsReduced(const DirMapping& dirObj) //---------------------------------------------------------------------------------------- -class FreeFileSync::SynchronizeFolderPair +class ffs3::SynchronizeFolderPair { public: SynchronizeFolderPair(const SyncProcess& syncProc, #ifdef FFS_WIN - ShadowCopy* shadowCopyHandler, + shadow::ShadowCopy* shadowCopyHandler, #endif const DeletionHandling& delHandling) : statusUpdater_(syncProc.statusUpdater), @@ -868,7 +870,8 @@ public: shadowCopyHandler_(shadowCopyHandler), #endif delHandling_(delHandling), - verifyCopiedFiles_(syncProc.m_verifyCopiedFiles), + verifyCopiedFiles_(syncProc.verifyCopiedFiles_), + copyFilePermissions_(syncProc.copyFilePermissions_), txtCopyingFile (wxToZ(_("Copying file %x to %y")). Replace(DefaultStr("%x"), DefaultStr("\"%x\""), false).Replace(DefaultStr("%y"), DefaultStr("\n\"%y\""), false)), txtCopyingLink (wxToZ(_("Copying Symbolic Link %x to %y")).Replace(DefaultStr("%x"), DefaultStr("\"%x\""), false).Replace(DefaultStr("%y"), DefaultStr("\n\"%y\""), false)), txtOverwritingFile(wxToZ(_("Copying file %x overwriting %y")). Replace(DefaultStr("%x"), DefaultStr("\"%x\""), false).Replace(DefaultStr("%y"), DefaultStr("\n\"%y\""), false)), @@ -892,7 +895,7 @@ private: void synchronizeFolder(DirMapping& dirObj) const; //more low level helper - template <FreeFileSync::SelectedSide side> + template <ffs3::SelectedSide side> void deleteSymlink(const SymLinkMapping& linkObj) const; void copySymlink(const Zstring& source, const Zstring& target, LinkDescriptor::LinkType type) const; void copyFileUpdating(const Zstring& source, const Zstring& target, const wxULongLong& sourceFileSize) const; @@ -900,11 +903,12 @@ private: StatusHandler& statusUpdater_; #ifdef FFS_WIN - ShadowCopy* shadowCopyHandler_; //optional! + shadow::ShadowCopy* shadowCopyHandler_; //optional! #endif const DeletionHandling& delHandling_; const bool verifyCopiedFiles_; + const bool copyFilePermissions_; //preload status texts const Zstring txtCopyingFile; @@ -916,7 +920,7 @@ private: }; -template <bool reduceDiskSpace> //"true" if files deletion shall happen only +template <bool reduceDiskSpace> //"true" if file deletion happens only void SynchronizeFolderPair::execute(HierarchyObject& hierObj) { //synchronize files: @@ -945,24 +949,28 @@ void SynchronizeFolderPair::execute(HierarchyObject& hierObj) execute<reduceDiskSpace>(*i); //adapt folder modification dates: apply AFTER all subobjects have been synced to preserve folder modification date! - switch (syncOp) + try { - case SO_CREATE_NEW_LEFT: - copyFileTimes(i->getFullName<RIGHT_SIDE>(), i->getFullName<LEFT_SIDE>(), true); //throw() - break; - case SO_CREATE_NEW_RIGHT: - copyFileTimes(i->getFullName<LEFT_SIDE>(), i->getFullName<RIGHT_SIDE>(), true); //throw() - break; - case SO_OVERWRITE_RIGHT: - case SO_OVERWRITE_LEFT: - assert(false); - case SO_UNRESOLVED_CONFLICT: - case SO_DELETE_LEFT: - case SO_DELETE_RIGHT: - case SO_DO_NOTHING: - case SO_EQUAL: - break; + switch (syncOp) + { + case SO_CREATE_NEW_LEFT: + copyFileTimes(i->getFullName<RIGHT_SIDE>(), i->getFullName<LEFT_SIDE>(), true); //throw (FileError) + break; + case SO_CREATE_NEW_RIGHT: + copyFileTimes(i->getFullName<LEFT_SIDE>(), i->getFullName<RIGHT_SIDE>(), true); //throw (FileError) + break; + case SO_OVERWRITE_RIGHT: + case SO_OVERWRITE_LEFT: + assert(false); + case SO_UNRESOLVED_CONFLICT: + case SO_DELETE_LEFT: + case SO_DELETE_RIGHT: + case SO_DO_NOTHING: + case SO_EQUAL: + break; + } } + catch (...) {} } } @@ -979,7 +987,7 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusText = txtCopyingFile; statusText.Replace(DefaultStr("%x"), fileObj.getShortName<RIGHT_SIDE>(), false); - statusText.Replace(DefaultStr("%y"), target.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR), false); + statusText.Replace(DefaultStr("%y"), target.BeforeLast(common::FILE_NAME_SEPARATOR), false); statusUpdater_.updateStatusText(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh @@ -991,7 +999,7 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusText = txtCopyingFile; statusText.Replace(DefaultStr("%x"), fileObj.getShortName<LEFT_SIDE>(), false); - statusText.Replace(DefaultStr("%y"), target.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR), false); + statusText.Replace(DefaultStr("%y"), target.BeforeLast(common::FILE_NAME_SEPARATOR), false); statusUpdater_.updateStatusText(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh @@ -1021,7 +1029,7 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusText = txtOverwritingFile; statusText.Replace(DefaultStr("%x"), fileObj.getShortName<LEFT_SIDE>(), false); - statusText.Replace(DefaultStr("%y"), fileObj.getFullName<RIGHT_SIDE>().BeforeLast(globalFunctions::FILE_NAME_SEPARATOR), false); + statusText.Replace(DefaultStr("%y"), fileObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR), false); statusUpdater_.updateStatusText(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh @@ -1036,7 +1044,7 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusText = txtOverwritingFile; statusText.Replace(DefaultStr("%x"), fileObj.getShortName<RIGHT_SIDE>(), false); - statusText.Replace(DefaultStr("%y"), fileObj.getFullName<LEFT_SIDE>().BeforeLast(globalFunctions::FILE_NAME_SEPARATOR), false); + statusText.Replace(DefaultStr("%y"), fileObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR), false); statusUpdater_.updateStatusText(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh @@ -1073,7 +1081,7 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusText = txtCopyingLink; statusText.Replace(DefaultStr("%x"), linkObj.getShortName<RIGHT_SIDE>(), false); - statusText.Replace(DefaultStr("%y"), target.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR), false); + statusText.Replace(DefaultStr("%y"), target.BeforeLast(common::FILE_NAME_SEPARATOR), false); statusUpdater_.updateStatusText(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh @@ -1085,7 +1093,7 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusText = txtCopyingLink; statusText.Replace(DefaultStr("%x"), linkObj.getShortName<LEFT_SIDE>(), false); - statusText.Replace(DefaultStr("%y"), target.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR), false); + statusText.Replace(DefaultStr("%y"), target.BeforeLast(common::FILE_NAME_SEPARATOR), false); statusUpdater_.updateStatusText(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh @@ -1115,7 +1123,7 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusText = txtOverwritingLink; statusText.Replace(DefaultStr("%x"), linkObj.getShortName<LEFT_SIDE>(), false); - statusText.Replace(DefaultStr("%y"), linkObj.getFullName<RIGHT_SIDE>().BeforeLast(globalFunctions::FILE_NAME_SEPARATOR), false); + statusText.Replace(DefaultStr("%y"), linkObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR), false); statusUpdater_.updateStatusText(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh @@ -1130,7 +1138,7 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusText = txtOverwritingLink; statusText.Replace(DefaultStr("%x"), linkObj.getShortName<RIGHT_SIDE>(), false); - statusText.Replace(DefaultStr("%y"), linkObj.getFullName<LEFT_SIDE>().BeforeLast(globalFunctions::FILE_NAME_SEPARATOR), false); + statusText.Replace(DefaultStr("%y"), linkObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR), false); statusUpdater_.updateStatusText(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh @@ -1172,9 +1180,9 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const statusUpdater_.requestUiRefresh(); //trigger display refresh //some check to catch the error that directory on source has been deleted externally after "compare"... - if (!FreeFileSync::dirExists(dirObj.getFullName<RIGHT_SIDE>())) + if (!ffs3::dirExists(dirObj.getFullName<RIGHT_SIDE>())) throw FileError(wxString(_("Source directory does not exist anymore:")) + wxT("\n\"") + zToWx(dirObj.getFullName<RIGHT_SIDE>()) + wxT("\"")); - createDirectory(target, dirObj.getFullName<RIGHT_SIDE>(), false); //no symlink copying! + createDirectory(target, dirObj.getFullName<RIGHT_SIDE>(), false, copyFilePermissions_); //no symlink copying! break; case SO_CREATE_NEW_RIGHT: @@ -1186,9 +1194,9 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const statusUpdater_.requestUiRefresh(); //trigger display refresh //some check to catch the error that directory on source has been deleted externally after "compare"... - if (!FreeFileSync::dirExists(dirObj.getFullName<LEFT_SIDE>())) + if (!ffs3::dirExists(dirObj.getFullName<LEFT_SIDE>())) throw FileError(wxString(_("Source directory does not exist anymore:")) + wxT("\n\"") + zToWx(dirObj.getFullName<LEFT_SIDE>()) + wxT("\"")); - createDirectory(target, dirObj.getFullName<LEFT_SIDE>(), false); //no symlink copying! + createDirectory(target, dirObj.getFullName<LEFT_SIDE>(), false, copyFilePermissions_); //no symlink copying! break; case SO_DELETE_LEFT: @@ -1252,7 +1260,7 @@ bool dataLossPossible(const Zstring& dirName, const SyncStatistics& folderPairSt { return folderPairStat.getCreate() + folderPairStat.getOverwrite() + folderPairStat.getConflict() == 0 && folderPairStat.getDelete() > 0 && //deletions only... (respect filtered items!) - !dirName.empty() && !FreeFileSync::dirExists(dirName); + !dirName.empty() && !ffs3::dirExists(dirName); } @@ -1269,7 +1277,7 @@ void makeSameLength(wxString& first, wxString& second) void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCfg>& syncConfig, FolderComparison& folderCmp) { -#ifndef __WXDEBUG__ +#ifdef NDEBUG wxLogNull noWxLogs; //prevent wxWidgets logging #endif @@ -1281,7 +1289,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf //keep at beginning so that all gui elements are initialized properly statusUpdater.initNewProcess(statisticsTotal.getCreate() + statisticsTotal.getOverwrite() + statisticsTotal.getDelete(), - globalFunctions::convertToSigned(statisticsTotal.getDataToProcess()), + common::convertToSigned(statisticsTotal.getDataToProcess()), StatusHandler::PROCESS_SYNCHRONIZING); //-------------------some basic checks:------------------------------------------ @@ -1297,13 +1305,13 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf if (statisticsFolderPair.getOverwrite() + statisticsFolderPair.getDelete() > 0) { //test existence of Recycle Bin - if (folderPairCfg.handleDeletion == FreeFileSync::MOVE_TO_RECYCLE_BIN && !FreeFileSync::recycleBinExists()) + if (folderPairCfg.handleDeletion == ffs3::MOVE_TO_RECYCLE_BIN && !ffs3::recycleBinExists()) { statusUpdater.reportFatalError(_("Recycle Bin not yet supported for this system!")); return; //should be obsolete! } - if (folderPairCfg.handleDeletion == FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY) + if (folderPairCfg.handleDeletion == ffs3::MOVE_TO_CUSTOM_DIRECTORY) { //check if user-defined directory for deletion was specified if (folderPairCfg.custDelFolder.empty()) @@ -1394,8 +1402,23 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf //-------------------end of basic checks------------------------------------------ #ifdef FFS_WIN + struct ShadowCallback : public shadow::WaitingForShadow + { + ShadowCallback(StatusHandler& updater) : statusUpdater_(updater) {} + virtual void requestUiRefresh() //allowed to throw exceptions + { + statusUpdater_.requestUiRefresh(); + } + virtual void updateStatusText(const Zstring& text) + { + statusUpdater_.updateStatusText(text); + } + private: + StatusHandler& statusUpdater_; + } shadowCb(statusUpdater); + //shadow copy buffer: per sync-instance, not folder pair - boost::scoped_ptr<ShadowCopy> shadowCopyHandler(copyLockedFiles_ ? new ShadowCopy : NULL); + boost::scoped_ptr<shadow::ShadowCopy> shadowCopyHandler(copyLockedFiles_ ? new shadow::ShadowCopy(&shadowCb) : NULL); #endif try @@ -1464,7 +1487,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf { statusUpdater.updateStatusText(wxToZ(_("Generating database..."))); statusUpdater.forceUiRefresh(); - tryReportingError(statusUpdater, boost::bind(FreeFileSync::saveToDisk, boost::cref(*j))); //these call may throw in error-callback! + tryReportingError(statusUpdater, boost::bind(ffs3::saveToDisk, boost::cref(*j))); //these call may throw in error-callback! } } } @@ -1479,7 +1502,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf //########################################################################################### //callback functionality for smooth progress indicators -class WhileCopying : public FreeFileSync::CopyFileCallback //callback functionality +class WhileCopying : public ffs3::CopyFileCallback //callback functionality { public: @@ -1490,7 +1513,7 @@ public: virtual Response updateCopyStatus(const wxULongLong& totalBytesTransferred) { //convert to signed - const wxLongLong totalBytes = globalFunctions::convertToSigned(totalBytesTransferred); + const wxLongLong totalBytes = common::convertToSigned(totalBytesTransferred); //inform about the (differential) processed amount of data m_statusHandler.updateProcessedData(0, totalBytes - m_bytesTransferredLast); @@ -1516,10 +1539,10 @@ private: void SynchronizeFolderPair::copyFileUpdating(const Zstring& source, const Zstring& target, const wxULongLong& totalBytesToCpy) const { //create folders first (see http://sourceforge.net/tracker/index.php?func=detail&aid=2628943&group_id=234430&atid=1093080) - const Zstring targetDir = target.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); - const Zstring templateDir = source.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring targetDir = target.BeforeLast(common::FILE_NAME_SEPARATOR); + const Zstring templateDir = source.BeforeLast(common::FILE_NAME_SEPARATOR); - ensureExists(targetDir, templateDir); //throw (FileError) + ensureExists(targetDir, templateDir, copyFilePermissions_); //throw (FileError) //start of (possibly) long-running copy process: ensure status updates are performed regularly @@ -1528,13 +1551,14 @@ void SynchronizeFolderPair::copyFileUpdating(const Zstring& source, const Zstrin try { - FreeFileSync::copyFile(source, - target, - false, //type File implicitly means symlinks need to be dereferenced! + ffs3::copyFile(source, + target, + false, //type File implicitly means symlinks need to be dereferenced! + copyFilePermissions_, #ifdef FFS_WIN - shadowCopyHandler_, + shadowCopyHandler_, #endif - &callback); + &callback); if (verifyCopiedFiles_) //verify if data was copied correctly verifyFileCopy(source, target); @@ -1547,7 +1571,7 @@ void SynchronizeFolderPair::copyFileUpdating(const Zstring& source, const Zstrin } //inform about the (remaining) processed amount of data - statusUpdater_.updateProcessedData(0, globalFunctions::convertToSigned(totalBytesToCpy) - totalBytesTransferred); + statusUpdater_.updateProcessedData(0, common::convertToSigned(totalBytesToCpy) - totalBytesTransferred); } @@ -1555,29 +1579,30 @@ void SynchronizeFolderPair::copySymlink(const Zstring& source, const Zstring& ta { //create folders first (see http://sourceforge.net/tracker/index.php?func=detail&aid=2628943&group_id=234430&atid=1093080) - const Zstring targetDir = target.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); - const Zstring templateDir = source.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring targetDir = target.BeforeLast(common::FILE_NAME_SEPARATOR); + const Zstring templateDir = source.BeforeLast(common::FILE_NAME_SEPARATOR); - ensureExists(targetDir, templateDir); //throw (FileError) + ensureExists(targetDir, templateDir, copyFilePermissions_); //throw (FileError) switch (type) { case LinkDescriptor::TYPE_DIR: - FreeFileSync::createDirectory(target, source, true); //copy symlink + ffs3::createDirectory(target, source, true, copyFilePermissions_); //copy symlink break; case LinkDescriptor::TYPE_FILE: //Windows: true file symlink; Linux: file-link or broken link - FreeFileSync::copyFile(source, target, true, //copy symlink + ffs3::copyFile(source, target, true, //copy symlink + copyFilePermissions_, #ifdef FFS_WIN - shadowCopyHandler_, + shadowCopyHandler_, #endif - NULL); + NULL); break; } } -template <FreeFileSync::SelectedSide side> +template <ffs3::SelectedSide side> void SynchronizeFolderPair::deleteSymlink(const SymLinkMapping& linkObj) const { switch (linkObj.getLinkType<side>()) @@ -1596,9 +1621,8 @@ void SynchronizeFolderPair::deleteSymlink(const SymLinkMapping& linkObj) const //--------------------- data verification ------------------------- //callback functionality for status updates while verifying -class VerifyCallback +struct VerifyCallback { -public: virtual ~VerifyCallback() {} virtual void updateStatus() = 0; }; @@ -1611,7 +1635,7 @@ void verifyFiles(const Zstring& source, const Zstring& target, VerifyCallback* c static const boost::scoped_array<char> memory2(new char[BUFFER_SIZE]); #ifdef FFS_WIN - wxFile file1(FreeFileSync::applyLongPathPrefix(source).c_str(), wxFile::read); //don't use buffered file input for verification! + wxFile file1(ffs3::applyLongPathPrefix(source).c_str(), wxFile::read); //don't use buffered file input for verification! #elif defined FFS_LINUX wxFile file1(::open(source.c_str(), O_RDONLY)); //utilize UTF-8 filename #endif @@ -1619,7 +1643,7 @@ void verifyFiles(const Zstring& source, const Zstring& target, VerifyCallback* c throw FileError(wxString(_("Error opening file:")) + wxT(" \"") + zToWx(source) + wxT("\"")); #ifdef FFS_WIN - wxFile file2(FreeFileSync::applyLongPathPrefix(target).c_str(), wxFile::read); //don't use buffered file input for verification! + wxFile file2(ffs3::applyLongPathPrefix(target).c_str(), wxFile::read); //don't use buffered file input for verification! #elif defined FFS_LINUX wxFile file2(::open(target.c_str(), O_RDONLY)); //utilize UTF-8 filename #endif @@ -1675,19 +1699,6 @@ void SynchronizeFolderPair::verifyFileCopy(const Zstring& source, const Zstring& statusUpdater_.requestUiRefresh(); //trigger display refresh VerifyStatusUpdater callback(statusUpdater_); - try - { - verifyFiles(source, target, &callback); - } - catch (FileError& error) - { - switch (statusUpdater_.reportError(error.show())) - { - case ErrorHandler::IGNORE_ERROR: - break; - case ErrorHandler::RETRY: - verifyFileCopy(source, target); - break; - } - } + + tryReportingError(statusUpdater_, boost::bind(&::verifyFiles, boost::ref(source), boost::ref(target), &callback)); } diff --git a/synchronization.h b/synchronization.h index f4b68d8f..afa36dff 100644 --- a/synchronization.h +++ b/synchronization.h @@ -7,13 +7,13 @@ #ifndef SYNCHRONIZATION_H_INCLUDED #define SYNCHRONIZATION_H_INCLUDED -#include "fileHierarchy.h" -#include "library/processXml.h" +#include "file_hierarchy.h" +#include "library/process_xml.h" class StatusHandler; -namespace FreeFileSync +namespace ffs3 { class SyncStatistics @@ -75,6 +75,7 @@ public: SyncProcess(xmlAccess::OptionalDialogs& warnings, bool verifyCopiedFiles, bool copyLockedFiles, + bool copyFilePermissions, StatusHandler& handler); //CONTRACT: syncConfig must have SAME SIZE folderCmp and correspond per row! @@ -83,8 +84,9 @@ public: private: friend class SynchronizeFolderPair; - const bool m_verifyCopiedFiles; + const bool verifyCopiedFiles_; const bool copyLockedFiles_; + const bool copyFilePermissions_; //warnings xmlAccess::OptionalDialogs& m_warnings; diff --git a/ui/batchConfig.cpp b/ui/batch_config.cpp index ef85561e..21a2f2cd 100644 --- a/ui/batchConfig.cpp +++ b/ui/batch_config.cpp @@ -4,18 +4,18 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "batchConfig.h" -#include "../shared/xmlBase.h" -#include "folderPair.h" +#include "batch_config.h" +#include "../shared/xml_base.h" +#include "folder_pair.h" #include <iterator> #include <wx/wupdlock.h> -#include "../shared/helpProvider.h" -#include "../shared/fileHandling.h" -#include "messagePopup.h" +#include "../shared/help_provider.h" +#include "../shared/file_handling.h" +#include "msg_popup.h" #include <wx/dnd.h> #include <wx/msgdlg.h> -using namespace FreeFileSync; +using namespace ffs3; class BatchFileDropEvent : public wxFileDropTarget @@ -24,24 +24,52 @@ public: BatchFileDropEvent(BatchDialog& dlg) : batchDlg(dlg) {} - virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) + virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& fileArray) { - if (!filenames.IsEmpty()) - { - const wxString droppedFileName = filenames[0]; + if (fileArray.IsEmpty()) + return false; + + std::vector<wxString> filenames; + for (size_t i = 0; i < fileArray.GetCount(); ++i) + filenames.push_back(fileArray[i]); - xmlAccess::XmlType fileType = xmlAccess::getXmlType(droppedFileName); - //test if ffs batch file has been dropped - if (fileType == xmlAccess::XML_BATCH_CONFIG) - batchDlg.loadBatchFile(droppedFileName); + switch (xmlAccess::getMergeType(filenames)) //throw () + { + case xmlAccess::MERGE_BATCH: + case xmlAccess::MERGE_GUI: + case xmlAccess::MERGE_GUI_BATCH: + if (filenames.size() == 1) + { + batchDlg.loadBatchFile(filenames[0]); + return false; + } else { - wxString errorMessage = _("%x is not a valid FreeFileSync batch file!"); - errorMessage.Replace(wxT("%x"), wxString(wxT("\"")) + droppedFileName + wxT("\""), false); - wxMessageBox(errorMessage, _("Error"), wxOK | wxICON_ERROR); + xmlAccess::XmlBatchConfig batchCfg; + try + { + convertConfig(filenames, batchCfg); //throw (xmlAccess::XmlError) + } + catch (const xmlAccess::XmlError& error) + { + if (error.getSeverity() == xmlAccess::XmlError::WARNING) + wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); + else + { + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); + return false; + } + } + batchDlg.loadBatchCfg(batchCfg); } + break; + + case xmlAccess::MERGE_OTHER: + wxMessageBox(_("Invalid FreeFileSync config file!"), _("Error"), wxOK | wxICON_ERROR); + break; } + return false; } @@ -251,9 +279,9 @@ void BatchDialog::OnCmpSettings(wxCommandEvent& event) wxPoint windowPos = m_bpButtonCmpConfig->GetScreenPosition(); windowPos.x += m_bpButtonCmpConfig->GetSize().GetWidth() + 5; - if (FreeFileSync::showCompareCfgDialog(windowPos, - localBatchCfg.mainCfg.compareVar, - localBatchCfg.mainCfg.handleSymlinks) == DefaultReturnCode::BUTTON_OKAY) + if (ffs3::showCompareCfgDialog(windowPos, + localBatchCfg.mainCfg.compareVar, + localBatchCfg.mainCfg.handleSymlinks) == DefaultReturnCode::BUTTON_OKAY) { updateGui(); } @@ -343,9 +371,9 @@ void BatchDialog::OnCheckSilent(wxCommandEvent& event) void BatchDialog::OnHelp(wxCommandEvent& event) { #ifdef FFS_WIN - FreeFileSync::displayHelpEntry(wxT("html\\advanced\\ScheduleBatch.html")); + ffs3::displayHelpEntry(wxT("html\\advanced\\ScheduleBatch.html")); #elif defined FFS_LINUX - FreeFileSync::displayHelpEntry(wxT("html/advanced/ScheduleBatch.html")); + ffs3::displayHelpEntry(wxT("html/advanced/ScheduleBatch.html")); #endif } @@ -400,13 +428,18 @@ void BatchDialog::OnCancel(wxCommandEvent& event) void BatchDialog::OnSaveBatchJob(wxCommandEvent& event) { //get a filename - const wxString defaultFileName = proposedBatchFileName.empty() ? wxT("SyncJob.ffs_batch") : proposedBatchFileName; + wxString defaultFileName = proposedBatchFileName.empty() ? wxT("SyncJob.ffs_batch") : proposedBatchFileName; + + //attention: proposedBatchFileName may be an imported *.ffs_gui file! We don't want to overwrite it with a BATCH config! + if (defaultFileName.EndsWith(wxT(".ffs_gui"))) + defaultFileName.Replace(wxT(".ffs_gui"), wxT(".ffs_batch"), false); + wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, defaultFileName, wxString(_("FreeFileSync batch file")) + wxT(" (*.ffs_batch)|*.ffs_batch"), wxFD_SAVE); if (filePicker->ShowModal() == wxID_OK) { const wxString newFileName = filePicker->GetPath(); - if (FreeFileSync::fileExists(wxToZ(newFileName))) + if (ffs3::fileExists(wxToZ(newFileName))) { QuestionDlg* messageDlg = new QuestionDlg(this, QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_CANCEL, @@ -428,7 +461,7 @@ void BatchDialog::OnSaveBatchJob(wxCommandEvent& event) void BatchDialog::OnLoadBatchJob(wxCommandEvent& event) { - wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, wxEmptyString, wxString(_("FreeFileSync batch file")) + wxT(" (*.ffs_batch)|*.ffs_batch"), wxFD_OPEN);; + wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, wxEmptyString, wxString(_("FreeFileSync configuration")) + wxT(" (*.ffs_batch;*.ffs_gui)|*.ffs_batch;*.ffs_gui"), wxFD_OPEN);; if (filePicker->ShowModal() == wxID_OK) loadBatchFile(filePicker->GetPath()); } @@ -479,11 +512,11 @@ bool BatchDialog::saveBatchFile(const wxString& filename) //write config to XML try { - xmlAccess::writeBatchConfig(batchCfg, filename); + xmlAccess::writeConfig(batchCfg, filename); } catch (const xmlAccess::XmlError& error) { - wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg().c_str(), _("Error"), wxOK | wxICON_ERROR); return false; } @@ -500,15 +533,21 @@ void BatchDialog::loadBatchFile(const wxString& filename) xmlAccess::XmlBatchConfig batchCfg; //structure to receive gui settings try { - xmlAccess::readBatchConfig(filename, batchCfg); + //open a *.ffs_gui or *.ffs_batch file! + std::vector<wxString> filenames; + filenames.push_back(filename); + + xmlAccess::convertConfig(filenames, batchCfg); //throw (xmlAccess::XmlError) + + //xmlAccess::readConfig(filename, batchCfg); } catch (const xmlAccess::XmlError& error) { if (error.getSeverity() == xmlAccess::XmlError::WARNING) - wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING); + wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); else { - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); return; } } @@ -635,7 +674,7 @@ void BatchDialog::updateGuiForFolderPair() } -void BatchDialog::addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront) +void BatchDialog::addFolderPair(const std::vector<ffs3::FolderPairEnh>& newPairs, bool addFront) { wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion @@ -643,7 +682,7 @@ void BatchDialog::addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& { //add folder pairs int pairHeight = 0; - for (std::vector<FreeFileSync::FolderPairEnh>::const_iterator i = newPairs.begin(); i != newPairs.end(); ++i) + for (std::vector<ffs3::FolderPairEnh>::const_iterator i = newPairs.begin(); i != newPairs.end(); ++i) { BatchFolderPairPanel* newPair = new BatchFolderPairPanel(m_scrolledWindow6, *this); diff --git a/ui/batchConfig.h b/ui/batch_config.h index 5fcf54a3..b2ff0cc8 100644 --- a/ui/batchConfig.h +++ b/ui/batch_config.h @@ -7,11 +7,11 @@ #ifndef BATCHCONFIG_H_INCLUDED #define BATCHCONFIG_H_INCLUDED -#include "guiGenerated.h" -#include "../library/processXml.h" +#include "gui_generated.h" +#include "../library/process_xml.h" -namespace FreeFileSync +namespace ffs3 { class DragDropOnDlg; } @@ -56,7 +56,7 @@ private: virtual void OnRemoveFolderPair( wxCommandEvent& event); virtual void OnRemoveTopFolderPair(wxCommandEvent& event); - void addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront = false); + void addFolderPair(const std::vector<ffs3::FolderPairEnh>& newPairs, bool addFront = false); void removeAddFolderPair(const int pos); void clearAddFolderPairs(); @@ -90,7 +90,7 @@ private: std::auto_ptr<wxMenu> contextMenu; //add drag & drop support when selecting logfile directory - std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnLogfileDir; + std::auto_ptr<ffs3::DragDropOnDlg> dragDropOnLogfileDir; }; #endif // BATCHCONFIG_H_INCLUDED diff --git a/ui/batchStatusHandler.cpp b/ui/batch_status_handler.cpp index 6914d9f5..e67e4426 100644 --- a/ui/batchStatusHandler.cpp +++ b/ui/batch_status_handler.cpp @@ -4,19 +4,19 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "batchStatusHandler.h" -//#include "smallDialogs.h" -#include "messagePopup.h" +#include "batch_status_handler.h" +//#include "small_dlgs.h" +#include "msg_popup.h" #include <wx/ffile.h> #include <wx/msgdlg.h> -#include "../shared/standardPaths.h" -#include "../shared/fileHandling.h" -#include "../shared/stringConv.h" -#include "../shared/globalFunctions.h" -#include "../shared/appMain.h" +#include "../shared/standard_paths.h" +#include "../shared/file_handling.h" +#include "../shared/string_conv.h" +#include "../shared/global_func.h" +#include "../shared/app_main.h" #include "../shared/util.h" -using namespace FreeFileSync; +using namespace ffs3; class LogFile @@ -68,7 +68,7 @@ public: private: static wxString extractJobName(const wxString& batchFilename) { - using namespace globalFunctions; + using namespace common; const wxString shortName = batchFilename.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 @@ -78,15 +78,15 @@ private: static wxString findUniqueLogname(const wxString& logfileDirectory, const wxString& batchFilename) { - using namespace globalFunctions; + using namespace common; //create logfile directory Zstring logfileDir = logfileDirectory.empty() ? - wxToZ(FreeFileSync::getConfigDir() + wxT("Logs")) : - FreeFileSync::getFormattedDirectoryName(wxToZ(logfileDirectory)); + wxToZ(ffs3::getConfigDir() + wxT("Logs")) : + ffs3::getFormattedDirectoryName(wxToZ(logfileDirectory)); - if (!FreeFileSync::dirExists(logfileDir)) - FreeFileSync::createDirectory(logfileDir); //create recursively if necessary: may throw (FileError&) + if (!ffs3::dirExists(logfileDir)) + ffs3::createDirectory(logfileDir); //create recursively if necessary: may throw (FileError&) //assemble logfile name if (!logfileDir.EndsWith(FILE_NAME_SEPARATOR)) @@ -105,8 +105,8 @@ private: wxString output = logfileName + wxT(".log"); //ensure uniqueness - for (int i = 1; FreeFileSync::somethingExists(wxToZ(output)); ++i) - output = logfileName + wxChar('_') + globalFunctions::numberToString(i) + wxT(".log"); + for (int i = 1; ffs3::somethingExists(wxToZ(output)); ++i) + output = logfileName + wxChar('_') + common::numberToString(i) + wxT(".log"); return output; } @@ -137,11 +137,11 @@ BatchStatusHandler::BatchStatusHandler(bool runSilent, { logFile.reset(new LogFile(*logfileDirectory, batchFilename)); } - catch (FreeFileSync::FileError& error) + catch (ffs3::FileError& error) { - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); returnValue = -7; - throw FreeFileSync::AbortThisProcess(); + throw ffs3::AbortThisProcess(); } } @@ -185,7 +185,7 @@ BatchStatusHandler::~BatchStatusHandler() if (totalErrors > 0) { wxString header(_("Warning: Synchronization failed for %x item(s):")); - header.Replace(wxT("%x"), FreeFileSync::numberToStringSep(totalErrors), false); + header.Replace(wxT("%x"), ffs3::numberToStringSep(totalErrors), false); finalMessage += header + wxT("\n\n"); } @@ -197,7 +197,7 @@ BatchStatusHandler::~BatchStatusHandler() } //notify about (logical) application main window => program won't quit, but stay on this dialog - FreeFileSync::AppMainWindow::setMainWindow(syncStatusFrame.getAsWindow()); + ffs3::AppMainWindow::setMainWindow(syncStatusFrame.getAsWindow()); //notify to syncStatusFrame that current process has ended if (abortIsRequested()) @@ -287,7 +287,7 @@ void BatchStatusHandler::reportWarning(const wxString& warningMessage, bool& war bool dontWarnAgain = false; WarningDlg warningDlg(NULL, WarningDlg::BUTTON_IGNORE | WarningDlg::BUTTON_SWITCH | WarningDlg::BUTTON_ABORT, - warningMessage + wxT("\n\n") + _("Press \"Switch\" to open FreeFileSync GUI modus."), + warningMessage + wxT("\n\n") + _("Press \"Switch\" to open FreeFileSync GUI mode."), dontWarnAgain); warningDlg.Raise(); const WarningDlg::Response rv = static_cast<WarningDlg::Response>(warningDlg.ShowModal()); @@ -298,7 +298,7 @@ void BatchStatusHandler::reportWarning(const wxString& warningMessage, bool& war break; case WarningDlg::BUTTON_SWITCH: - errorLog.logWarning(_("Switching to FreeFileSync GUI modus...")); + errorLog.logWarning(_("Switching to FreeFileSync GUI mode...")); switchToGuiRequested = true; abortThisProcess(); break; @@ -386,5 +386,5 @@ void BatchStatusHandler::forceUiRefresh() void BatchStatusHandler::abortThisProcess() { requestAbortion(); - throw FreeFileSync::AbortThisProcess(); //abort can be triggered by syncStatusFrame + throw ffs3::AbortThisProcess(); //abort can be triggered by syncStatusFrame } diff --git a/ui/batchStatusHandler.h b/ui/batch_status_handler.h index fb37c62a..f5497b0f 100644 --- a/ui/batchStatusHandler.h +++ b/ui/batch_status_handler.h @@ -7,11 +7,11 @@ #ifndef BATCHSTATUSHANDLER_H_INCLUDED #define BATCHSTATUSHANDLER_H_INCLUDED -#include "../library/statusHandler.h" -#include "../library/processXml.h" -#include "../library/errorLogging.h" -#include "progressIndicator.h" -#include "switchToGui.h" +#include "../library/status_handler.h" +#include "../library/process_xml.h" +#include "../library/error_log.h" +#include "progress_indicator.h" +#include "switch_to_gui.h" class LogFile; class SyncStatus; @@ -24,7 +24,7 @@ public: const wxString& batchFilename, const wxString* logfileDirectory, //optional: enable logging if available const xmlAccess::OnError handleError, - const FreeFileSync::SwitchToGui& switchBatchToGui, //functionality to change from batch mode to GUI mode + const ffs3::SwitchToGui& switchBatchToGui, //functionality to change from batch mode to GUI mode int& returnVal); ~BatchStatusHandler(); @@ -41,11 +41,11 @@ public: private: virtual void abortThisProcess(); - const FreeFileSync::SwitchToGui& switchBatchToGui_; //functionality to change from batch mode to GUI mode + const ffs3::SwitchToGui& switchBatchToGui_; //functionality to change from batch mode to GUI mode bool exitWhenFinished; bool switchToGuiRequested; xmlAccess::OnError handleError_; - FreeFileSync::ErrorLogging errorLog; //list of non-resolved errors and warnings + ffs3::ErrorLogging errorLog; //list of non-resolved errors and warnings Process currentProcess; int& returnValue; diff --git a/ui/checkVersion.cpp b/ui/check_version.cpp index 36d609b1..d9f892d9 100644 --- a/ui/checkVersion.cpp +++ b/ui/check_version.cpp @@ -4,16 +4,17 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "checkVersion.h" +#include "check_version.h" #include <wx/msgdlg.h> #include <wx/protocol/http.h> #include <wx/sstream.h> #include "../version/version.h" #include <wx/utils.h> #include <wx/timer.h> -#include "../shared/globalFunctions.h" -#include "messagePopup.h" -#include "../shared/standardPaths.h" +#include "../shared/global_func.h" +#include "msg_popup.h" +#include "../shared/standard_paths.h" +#include <wx/tokenzr.h> class CloseConnectionOnExit @@ -69,33 +70,44 @@ bool getOnlineVersion(wxString& version) } -bool newerVersionExists(const wxString& onlineVersion) -{ - wxString currentVersionCpy = FreeFileSync::currentVersion; - wxString onlineVersionCpy = onlineVersion; +const wxChar VERSION_SEP = wxT('.'); - const wxChar VERSION_SEP = wxT('.'); - using globalFunctions::stringToNumber; +std::vector<size_t> parseVersion(const wxString& version) +{ + std::vector<size_t> output; - while ( currentVersionCpy.Find(VERSION_SEP) != wxNOT_FOUND || - onlineVersionCpy.Find(VERSION_SEP) != wxNOT_FOUND) + wxStringTokenizer tkz(version, VERSION_SEP, wxTOKEN_RET_EMPTY); + while (tkz.HasMoreTokens()) { - const int currentMajor = stringToNumber<int>(currentVersionCpy.BeforeFirst(VERSION_SEP)); //Returns the whole string if VERSION_SEP is not found. - const int onlineMajor = stringToNumber<int>(onlineVersionCpy.BeforeFirst(VERSION_SEP)); //Returns the whole string if VERSION_SEP is not found. + const wxString& token = tkz.GetNextToken(); + output.push_back(common::stringToNumber<size_t>(token)); + } + return output; +} - if (currentMajor != onlineMajor) - return currentMajor < onlineMajor; - currentVersionCpy = currentVersionCpy.AfterFirst(VERSION_SEP); //Returns the empty string if VERSION_SEP is not found. - onlineVersionCpy = onlineVersionCpy.AfterFirst(VERSION_SEP); //Returns the empty string if VERSION_SEP is not found. - } +bool newerVersionExists(const wxString& onlineVersion) +{ + std::vector<size_t> current = parseVersion(ffs3::currentVersion); + std::vector<size_t> online = parseVersion(onlineVersion); + + if (online.empty() || online[0] == 0) //onlineVersion may be "This website has been moved..." In this case better check for an update + return true; + + current.resize(std::max(current.size(), online.size())); + online. resize(std::max(current.size(), online.size())); + + typedef std::vector<size_t>::const_iterator VerIter; + const std::pair<VerIter, VerIter> mm = std::mismatch (current.begin(), current.end(), + online.begin()); - return stringToNumber<int>(currentVersionCpy) < stringToNumber<int>(onlineVersionCpy); + return mm.first == current.end() ? false : //both versions match + *mm.first < *mm.second; } -void FreeFileSync::checkForUpdateNow() +void ffs3::checkForUpdateNow() { wxString onlineVersion; if (!getOnlineVersion(onlineVersion)) @@ -115,10 +127,10 @@ void FreeFileSync::checkForUpdateNow() } -void FreeFileSync::checkForUpdatePeriodically(long& lastUpdateCheck) +void ffs3::checkForUpdatePeriodically(long& lastUpdateCheck) { #ifdef FFS_LINUX - if (!FreeFileSync::isPortableVersion()) //don't check for updates in installer version -> else: handled by .deb + if (!ffs3::isPortableVersion()) //don't check for updates in installer version -> else: handled by .deb return; #endif diff --git a/ui/checkVersion.h b/ui/check_version.h index 5aeaeb3a..023e5023 100644 --- a/ui/checkVersion.h +++ b/ui/check_version.h @@ -8,7 +8,7 @@ #define UPDATEVERSION_H_INCLUDED -namespace FreeFileSync +namespace ffs3 { void checkForUpdateNow(); diff --git a/ui/folderPair.h b/ui/folder_pair.h index 7a027fba..27f3ab29 100644 --- a/ui/folderPair.h +++ b/ui/folder_pair.h @@ -8,16 +8,16 @@ #define FOLDERPAIR_H_INCLUDED #include "../structures.h" -#include "../shared/dragAndDrop.h" +#include "../shared/drag_n_drop.h" #include "../library/resources.h" -#include "smallDialogs.h" -#include "syncConfig.h" +#include "small_dlgs.h" +#include "sync_cfg.h" #include <wx/event.h> -#include "isNullFilter.h" +#include "is_null_filter.h" #include "../shared/util.h" -#include "../shared/stringConv.h" +#include "../shared/string_conv.h" -namespace FreeFileSync +namespace ffs3 { //basic functionality for handling alternate folder pair configuration: change sync-cfg/filter cfg, right-click context menu, button icons... @@ -25,7 +25,7 @@ template <class GuiPanel> class FolderPairPanelBasic : private wxEvtHandler { public: - typedef boost::shared_ptr<const FreeFileSync::AlternateSyncConfig> AltSyncCfgPtr; + typedef boost::shared_ptr<const ffs3::AlternateSyncConfig> AltSyncCfgPtr; Zstring getLeftDir() const @@ -57,8 +57,8 @@ public: localFilter = filter; //insert directory names - FreeFileSync::setDirectoryName(zToWx(leftDir), basicPanel_.m_directoryLeft, basicPanel_.m_dirPickerLeft); - FreeFileSync::setDirectoryName(zToWx(rightDir), basicPanel_.m_directoryRight, basicPanel_.m_dirPickerRight); + ffs3::setDirectoryName(zToWx(leftDir), basicPanel_.m_directoryLeft, basicPanel_.m_dirPickerLeft); + ffs3::setDirectoryName(zToWx(rightDir), basicPanel_.m_directoryRight, basicPanel_.m_dirPickerRight); refreshButtons(); } @@ -69,7 +69,7 @@ public: if (altSyncConfig.get()) { basicPanel_.m_bpButtonAltSyncCfg->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("syncConfigSmall"))); - basicPanel_.m_bpButtonAltSyncCfg->SetToolTip(wxString(_("Select alternate synchronization settings")) + wxT(" ") + globalFunctions::LINE_BREAK + + basicPanel_.m_bpButtonAltSyncCfg->SetToolTip(wxString(_("Select alternate synchronization settings")) + wxT(" ") + common::LINE_BREAK + wxT("(") + getVariantName(altSyncConfig->syncConfiguration) + wxT(")")); } else diff --git a/ui/gridView.cpp b/ui/grid_view.cpp index b3b1f2ae..24e558fc 100644 --- a/ui/gridView.cpp +++ b/ui/grid_view.cpp @@ -4,12 +4,12 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "gridView.h" +#include "grid_view.h" #include "sorting.h" #include "../synchronization.h" #include <boost/bind.hpp> -using namespace FreeFileSync; +using namespace ffs3; GridView::StatusCmpResult::StatusCmpResult() : @@ -336,7 +336,7 @@ public: }; -template <bool ascending, FreeFileSync::SelectedSide side> +template <bool ascending, ffs3::SelectedSide side> class GridView::SortByRelName : public std::binary_function<RefIndex, RefIndex, bool> { public: @@ -364,7 +364,7 @@ private: }; -template <bool ascending, FreeFileSync::SelectedSide side> +template <bool ascending, ffs3::SelectedSide side> class GridView::SortByFileName : public std::binary_function<RefIndex, RefIndex, bool> { public: @@ -386,7 +386,7 @@ private: }; -template <bool ascending, FreeFileSync::SelectedSide side> +template <bool ascending, ffs3::SelectedSide side> class GridView::SortByFileSize : public std::binary_function<RefIndex, RefIndex, bool> { public: @@ -408,7 +408,7 @@ private: }; -template <bool ascending, FreeFileSync::SelectedSide side> +template <bool ascending, ffs3::SelectedSide side> class GridView::SortByDate : public std::binary_function<RefIndex, RefIndex, bool> { public: @@ -430,7 +430,7 @@ private: }; -template <bool ascending, FreeFileSync::SelectedSide side> +template <bool ascending, ffs3::SelectedSide side> class GridView::SortByExtension : public std::binary_function<RefIndex, RefIndex, bool> { public: diff --git a/ui/gridView.h b/ui/grid_view.h index c0639d2e..0307d758 100644 --- a/ui/gridView.h +++ b/ui/grid_view.h @@ -7,10 +7,10 @@ #ifndef GRIDVIEW_H_INCLUDED #define GRIDVIEW_H_INCLUDED -#include "../fileHierarchy.h" +#include "../file_hierarchy.h" -namespace FreeFileSync +namespace ffs3 { //gui view of FolderComparison class GridView @@ -219,14 +219,14 @@ size_t GridView::rowsTotal() const //total number of rows available inline -const FreeFileSync::FileSystemObject* GridView::getReferencedRow(const RefIndex ref) const +const ffs3::FileSystemObject* GridView::getReferencedRow(const RefIndex ref) const { return folderCmp[ref.folderIndex].retrieveById(ref.objId); } inline -FreeFileSync::FileSystemObject* GridView::getReferencedRow(const RefIndex ref) +ffs3::FileSystemObject* GridView::getReferencedRow(const RefIndex ref) { //code re-use of const method: see Meyers Effective C++ return const_cast<FileSystemObject*>(static_cast<const GridView&>(*this).getReferencedRow(ref)); diff --git a/ui/guiGenerated.cpp b/ui/guiGenerated.cpp deleted file mode 100644 index 920484ea..00000000 --- a/ui/guiGenerated.cpp +++ /dev/null @@ -1,3768 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "../library/customGrid.h" -#include "../shared/customButton.h" -#include "../shared/customComboBox.h" -#include "../shared/toggleButton.h" - -#include "guiGenerated.h" - -/////////////////////////////////////////////////////////////////////////// - -MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxSize( 640,400 ), wxDefaultSize ); - - m_menubar1 = new wxMenuBar( 0 ); - m_menuFile = new wxMenu(); - m_menuItem10 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("1. &Compare") ) + wxT('\t') + wxT("ALT-C"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItem10 ); - - m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("ALT-S"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItem11 ); - - m_menuFile->AppendSeparator(); - - m_menuItemSwitchView = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&witch view") ) + wxT('\t') + wxT("ALT-W"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemSwitchView ); - - m_menuFile->AppendSeparator(); - - m_menuItemNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&New") ) + wxT('\t') + wxT("CTRL-N"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemNew ); - - m_menuItemSave = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("CTRL-S"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemSave ); - - m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL-L"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemLoad ); - - 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_menuAdvanced = new wxMenu(); - m_menuLanguages = new wxMenu(); - m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages ); - - m_menuAdvanced->AppendSeparator(); - - m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL ); - m_menuAdvanced->Append( m_menuItemGlobSett ); - - m_menuItem7 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Create batch job...") ) , wxEmptyString, wxITEM_NORMAL ); - m_menuAdvanced->Append( m_menuItem7 ); - - wxMenuItem* m_menuItem5; - m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL ); - m_menuAdvanced->Append( m_menuItem5 ); - - m_menubar1->Append( m_menuAdvanced, _("&Advanced") ); - - m_menuHelp = new wxMenu(); - wxMenuItem* m_menuItemReadme; - m_menuItemReadme = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemReadme ); - - m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemCheckVer ); - - 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 ); - - bSizer1 = new wxBoxSizer( wxVERTICAL ); - - m_panel71 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL ); - bSizer6 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer6->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->Wrap( -1 ); - m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - fgSizer121->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - fgSizer121->Add( 0, 0, 1, 0, 5 ); - - wxBoxSizer* bSizer30; - bSizer30 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonCompare = new wxButtonWithImage( m_panel71, 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->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 ); - - 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->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 ); - - - bSizer6->Add( 0, 0, 1, 0, 5 ); - - wxFlexGridSizer* fgSizer12; - fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer12->SetFlexibleDirection( wxBOTH ); - fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticTextSyncVariant = new wxStaticText( m_panel71, 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->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->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 ); - - - bSizer6->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 ); - - wxBoxSizer* bSizer91; - bSizer91 = new wxBoxSizer( wxHORIZONTAL ); - - m_panelTopLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer92; - bSizer92 = new wxBoxSizer( wxVERTICAL ); - - sbSizer2 = 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 ); - sbSizer2->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new wxDirPickerCtrl( m_panelTopLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLeft->SetToolTip( _("Select a folder") ); - - sbSizer2->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer92->Add( sbSizer2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_panelTopLeft->SetSizer( bSizer92 ); - m_panelTopLeft->Layout(); - bSizer92->Fit( m_panelTopLeft ); - bSizer91->Add( m_panelTopLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelTopMiddle = new wxPanel( this, 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 ); - - wxBoxSizer* bSizer160; - bSizer160 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer160->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer160->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer160->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer160->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer93->Add( bSizer160, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_panelTopMiddle->SetSizer( bSizer93 ); - m_panelTopMiddle->Layout(); - bSizer93->Fit( m_panelTopMiddle ); - bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelTopRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer94; - bSizer94 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer77; - bSizer77 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer3; - sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panelTopRight, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); - - m_bpButtonAddPair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - - sbSizer3->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - sbSizer3->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_directoryRight = new CustomComboBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - sbSizer3->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new wxDirPickerCtrl( m_panelTopRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerRight->SetToolTip( _("Select a folder") ); - - sbSizer3->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer77->Add( sbSizer3, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); - - bSizer94->Add( bSizer77, 0, wxEXPAND|wxLEFT, 3 ); - - m_panelTopRight->SetSizer( bSizer94 ); - m_panelTopRight->Layout(); - bSizer94->Fit( m_panelTopRight ); - bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer1->Add( bSizer91, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_scrolledWindowFolderPairs = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL ); - m_scrolledWindowFolderPairs->SetScrollRate( 5, 5 ); - m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) ); - - bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); - - m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs ); - m_scrolledWindowFolderPairs->Layout(); - bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs ); - bSizer1->Add( m_scrolledWindowFolderPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizerGridHolder = new wxBoxSizer( wxHORIZONTAL ); - - m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - m_gridLeft = new CustomGridLeft( m_panelLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_gridLeft->CreateGrid( 15, 4 ); - m_gridLeft->EnableEditing( false ); - m_gridLeft->EnableGridLines( true ); - m_gridLeft->EnableDragGridSize( true ); - m_gridLeft->SetMargins( 0, 0 ); - - // Columns - m_gridLeft->EnableDragColMove( false ); - m_gridLeft->EnableDragColSize( true ); - m_gridLeft->SetColLabelSize( 20 ); - m_gridLeft->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - - // Rows - m_gridLeft->EnableDragRowSize( false ); - m_gridLeft->SetRowLabelSize( 38 ); - m_gridLeft->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_gridLeft->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - bSizer7->Add( m_gridLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 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 ); - wxBoxSizer* bSizer18; - bSizer18 = new wxBoxSizer( wxVERTICAL ); - - m_gridMiddle = new CustomGridMiddle( m_panelMiddle, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_gridMiddle->CreateGrid( 15, 1 ); - m_gridMiddle->EnableEditing( false ); - m_gridMiddle->EnableGridLines( true ); - m_gridMiddle->EnableDragGridSize( false ); - m_gridMiddle->SetMargins( 0, 0 ); - - // Columns - m_gridMiddle->SetColSize( 0, 60 ); - m_gridMiddle->EnableDragColMove( false ); - m_gridMiddle->EnableDragColSize( false ); - m_gridMiddle->SetColLabelSize( 20 ); - m_gridMiddle->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Rows - m_gridMiddle->EnableDragRowSize( false ); - m_gridMiddle->SetRowLabelSize( 0 ); - m_gridMiddle->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_gridMiddle->SetDefaultCellFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Arial") ) ); - m_gridMiddle->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - bSizer18->Add( m_gridMiddle, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - m_panelMiddle->SetSizer( bSizer18 ); - m_panelMiddle->Layout(); - bSizer18->Fit( m_panelMiddle ); - bSizerGridHolder->Add( m_panelMiddle, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxVERTICAL ); - - m_gridRight = new CustomGridRight( m_panelRight, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_gridRight->CreateGrid( 15, 4 ); - m_gridRight->EnableEditing( false ); - m_gridRight->EnableGridLines( true ); - m_gridRight->EnableDragGridSize( true ); - m_gridRight->SetMargins( 0, 0 ); - - // Columns - m_gridRight->EnableDragColMove( false ); - m_gridRight->EnableDragColSize( true ); - m_gridRight->SetColLabelSize( 20 ); - m_gridRight->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - - // Rows - m_gridRight->EnableDragRowSize( false ); - m_gridRight->SetRowLabelSize( 38 ); - m_gridRight->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_gridRight->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - bSizer10->Add( m_gridRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 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_panelBottom = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizer3 = 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 ); - - m_bpButtonSave = new wxBitmapButton( m_panel30, 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 ); - - m_bpButtonLoad = new wxBitmapButton( m_panel30, 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 ); - - 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)") ); - - bSizer139->Add( m_choiceHistory, 0, 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 ); - wxBoxSizer* bSizer140; - bSizer140 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - bSizer140->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - wxBoxSizer* bSizer23; - bSizer23 = new wxBoxSizer( wxVERTICAL ); - - m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") ); - - bSizer23->Add( m_checkBoxHideFilt, 0, wxEXPAND, 5 ); - - bSizer140->Add( bSizer23, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelFilter->SetSizer( bSizer140 ); - m_panelFilter->Layout(); - bSizer140->Fit( m_panelFilter ); - 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 ); - - 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 ); - - - 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 ); - - 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->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->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlCreate->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - 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->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->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlDelete->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - 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 ); - - 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->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->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlUpdate->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - 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->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->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlData->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - 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 ); - - bSizer121->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelSyncPreview->SetSizer( bSizer121 ); - m_panelSyncPreview->Layout(); - bSizer121->Fit( m_panelSyncPreview ); - bSizerBottomRight->Add( m_panelSyncPreview, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton10 = new wxBitmapButton( m_panelBottom, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW ); - m_bpButton10->Hide(); - m_bpButton10->SetToolTip( _("Quit") ); - - m_bpButton10->Hide(); - m_bpButton10->SetToolTip( _("Quit") ); - - bSizerBottomRight->Add( m_bpButton10, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - - bSizer3->Add( bSizerBottomRight, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); - - m_panelBottom->SetSizer( bSizer3 ); - m_panelBottom->Layout(); - bSizer3->Fit( m_panelBottom ); - bSizer1->Add( m_panelBottom, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_panelStatusBar = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer451; - bSizer451 = new wxBoxSizer( wxHORIZONTAL ); - - bSizer451->SetMinSize( wxSize( -1,22 ) ); - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatusLeft = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeft->Wrap( -1 ); - m_staticTextStatusLeft->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer53->Add( m_staticTextStatusLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer451->Add( bSizer53, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 ); - - - bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusMiddle->Wrap( -1 ); - m_staticTextStatusMiddle->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 ); - - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatusRight = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRight->Wrap( -1 ); - m_staticTextStatusRight->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer52->Add( m_staticTextStatusRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer50; - bSizer50 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer50->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap15 = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); - bSizer50->Add( m_bitmap15, 0, wxALIGN_BOTTOM, 2 ); - - bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); - - bSizer451->Add( bSizer52, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelStatusBar->SetSizer( bSizer451 ); - m_panelStatusBar->Layout(); - bSizer451->Fit( m_panelStatusBar ); - bSizer1->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - this->SetSizer( bSizer1 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); - this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); - this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); - this->Connect( m_menuItemSwitchView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ) ); - this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); - this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); - this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); - this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); - this->Connect( m_menuItemGlobSett->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); - this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); - this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); - this->Connect( m_menuItemReadme->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); - this->Connect( m_menuItemCheckVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); - this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); - m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); - m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); - m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); - m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this ); - m_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); - m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this ); - m_dirPickerRight->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_gridLeft->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnLeftGridDoubleClick ), NULL, this ); - m_gridLeft->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); - m_gridLeft->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortLeftGrid ), NULL, this ); - m_gridLeft->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelLeft ), NULL, this ); - m_gridMiddle->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddle ), NULL, this ); - m_gridMiddle->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortMiddleGrid ), NULL, this ); - m_gridMiddle->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddleLabel ), NULL, this ); - m_gridRight->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnRightGridDoubleClick ), NULL, this ); - m_gridRight->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); - m_gridRight->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortRightGrid ), NULL, this ); - m_gridRight->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this ); - m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); - m_bpButtonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); - m_choiceHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); - m_choiceHistory->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); - m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); - m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this ); - m_bpButtonSyncCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this ); - m_bpButtonSyncDirOverwLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this ); - m_bpButtonSyncDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), NULL, this ); - m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this ); - m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this ); - m_bpButtonEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this ); - m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this ); - m_bpButtonSyncDirNone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this ); - m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this ); - m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this ); - m_bpButtonSyncDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this ); - m_bpButtonSyncDirOverwRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this ); - m_bpButtonSyncCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); - m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); - m_bpButton10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnQuit ), NULL, this ); -} - -MainDialogGenerated::~MainDialogGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); - m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); - m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); - m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); - m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this ); - m_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); - m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this ); - m_dirPickerRight->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_gridLeft->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnLeftGridDoubleClick ), NULL, this ); - m_gridLeft->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); - m_gridLeft->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortLeftGrid ), NULL, this ); - m_gridLeft->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelLeft ), NULL, this ); - m_gridMiddle->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddle ), NULL, this ); - m_gridMiddle->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortMiddleGrid ), NULL, this ); - m_gridMiddle->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddleLabel ), NULL, this ); - m_gridRight->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnRightGridDoubleClick ), NULL, this ); - m_gridRight->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); - m_gridRight->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortRightGrid ), NULL, this ); - m_gridRight->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this ); - m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); - m_bpButtonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); - m_choiceHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); - m_choiceHistory->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); - m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); - m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this ); - m_bpButtonSyncCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this ); - m_bpButtonSyncDirOverwLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this ); - m_bpButtonSyncDeleteLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), NULL, this ); - m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this ); - m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this ); - m_bpButtonEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this ); - m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this ); - m_bpButtonSyncDirNone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this ); - m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this ); - m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this ); - m_bpButtonSyncDeleteRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this ); - m_bpButtonSyncDirOverwRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this ); - m_bpButtonSyncCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); - m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); - m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnQuit ), NULL, this ); -} - -FolderPairGenerated::FolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) -{ - wxBoxSizer* bSizer74; - bSizer74 = new wxBoxSizer( wxHORIZONTAL ); - - m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer134; - bSizer134 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_dirPickerLeft = new wxDirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLeft->SetToolTip( _("Select a folder") ); - - bSizer134->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panelLeft->SetSizer( bSizer134 ); - m_panelLeft->Layout(); - bSizer134->Fit( m_panelLeft ); - bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - 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 ); - - - bSizer96->Add( 0, 0, 1, wxEXPAND, 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 ); - - - bSizer96->Add( 5, 0, 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 ); - - m_panel20->SetSizer( bSizer95 ); - m_panel20->Layout(); - bSizer95->Fit( m_panel20 ); - bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer135; - bSizer135 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - bSizer135->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new wxDirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerRight->SetToolTip( _("Select a folder") ); - - bSizer135->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panelRight->SetSizer( bSizer135 ); - m_panelRight->Layout(); - bSizer135->Fit( m_panelRight ); - bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - this->SetSizer( bSizer74 ); - this->Layout(); - bSizer74->Fit( this ); -} - -FolderPairGenerated::~FolderPairGenerated() -{ -} - -BatchFolderPairGenerated::BatchFolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) -{ - wxBoxSizer* bSizer142; - bSizer142 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer140; - bSizer140 = new wxBoxSizer( wxHORIZONTAL ); - - m_panel32 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER ); - wxBoxSizer* bSizer147; - bSizer147 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer136; - bSizer136 = new wxBoxSizer( wxVERTICAL ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panel32, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - bSizer136->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer147->Add( bSizer136, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer143; - bSizer143 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer145; - bSizer145 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText53 = new wxStaticText( m_panel32, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText53->Wrap( -1 ); - m_staticText53->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer145->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer143->Add( bSizer145, 1, 0, 5 ); - - wxBoxSizer* bSizer146; - bSizer146 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText541 = new wxStaticText( m_panel32, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText541->Wrap( -1 ); - m_staticText541->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer146->Add( m_staticText541, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer143->Add( bSizer146, 1, 0, 5 ); - - bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_panel32->SetSizer( bSizer147 ); - m_panel32->Layout(); - bSizer147->Fit( m_panel32 ); - bSizer140->Add( m_panel32, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer144; - bSizer144 = new wxBoxSizer( wxVERTICAL ); - - m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer114; - bSizer114 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer114->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new wxDirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLeft->SetToolTip( _("Select a folder") ); - - bSizer114->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLocalFilter = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer114->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelLeft->SetSizer( bSizer114 ); - m_panelLeft->Layout(); - bSizer114->Fit( m_panelLeft ); - bSizer144->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer115; - bSizer115 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new wxDirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerRight->SetToolTip( _("Select a folder") ); - - bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer115->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelRight->SetSizer( bSizer115 ); - m_panelRight->Layout(); - bSizer115->Fit( m_panelRight ); - bSizer144->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer140->Add( bSizer144, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer142->Add( bSizer140, 0, wxEXPAND, 5 ); - - - bSizer142->Add( 0, 5, 0, 0, 5 ); - - this->SetSizer( bSizer142 ); - this->Layout(); - bSizer142->Fit( this ); -} - -BatchFolderPairGenerated::~BatchFolderPairGenerated() -{ -} - -BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxSize( 400,420 ), wxDefaultSize ); - - wxBoxSizer* bSizer54; - bSizer54 = new wxBoxSizer( wxVERTICAL ); - - bSizer69 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer87; - bSizer87 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap27 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer87->Add( m_bitmap27, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer87->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer87->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer69->Add( bSizer87, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer69->Add( 0, 5, 0, 0, 5 ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText44 = new wxStaticText( this, wxID_ANY, _("Assemble a batch file for automated synchronization. To start in batch mode simply pass the name of the file to the FreeFileSync executable: FreeFileSync.exe <batchfile>. This can also be scheduled in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText44->Wrap( 500 ); - bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - m_bpButtonHelp->SetToolTip( _("Help") ); - - bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer69->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer69->Add( 0, 5, 0, 0, 5 ); - - m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP, 5 ); - - m_staticText531 = new wxStaticText( this, wxID_ANY, _("Configuration overview:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText531->Wrap( -1 ); - m_staticText531->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Arial Black") ) ); - - bSizer69->Add( m_staticText531, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_notebookSettings = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelOverview = new wxPanel( m_notebookSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer67; - bSizer67 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer120; - bSizer120 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer175; - bSizer175 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer241; - sbSizer241 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Compare") ), wxHORIZONTAL ); - - m_bpButtonCmpConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); - m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); - - m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); - - sbSizer241->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL, 3 ); - - - sbSizer241->Add( 10, 0, 0, 0, 5 ); - - m_staticTextCmpVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCmpVariant->Wrap( -1 ); - m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - sbSizer241->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer175->Add( sbSizer241, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer175->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer26; - sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxVERTICAL ); - - m_bpButtonFilter = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - sbSizer26->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 15 ); - - bSizer175->Add( sbSizer26, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer175->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer252; - sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize...") ), wxHORIZONTAL ); - - m_staticTextSyncVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSyncVariant->Wrap( -1 ); - m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - sbSizer252->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - sbSizer252->Add( 10, 0, 0, 0, 5 ); - - m_bpButtonSyncConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); - m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); - - m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); - - sbSizer252->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL, 3 ); - - bSizer175->Add( sbSizer252, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer120->Add( bSizer175, 0, wxEXPAND, 5 ); - - - bSizer120->Add( 0, 5, 0, 0, 5 ); - - m_scrolledWindow6 = new wxScrolledWindow( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_scrolledWindow6->SetScrollRate( 5, 5 ); - wxBoxSizer* bSizer141; - bSizer141 = new wxBoxSizer( wxVERTICAL ); - - sbSizerMainPair = new wxBoxSizer( wxHORIZONTAL ); - - m_panelMainPair = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER ); - wxBoxSizer* bSizer147; - bSizer147 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer1361; - bSizer1361 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonAddPair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - - bSizer1361->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - bSizer1361->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer147->Add( bSizer1361, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer143; - bSizer143 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer145; - bSizer145 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText532 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText532->Wrap( -1 ); - m_staticText532->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer145->Add( m_staticText532, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer143->Add( bSizer145, 1, 0, 5 ); - - wxBoxSizer* bSizer146; - bSizer146 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText5411 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText5411->Wrap( -1 ); - m_staticText5411->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer146->Add( m_staticText5411, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer143->Add( bSizer146, 1, 0, 5 ); - - bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_panelMainPair->SetSizer( bSizer147 ); - m_panelMainPair->Layout(); - bSizer147->Fit( m_panelMainPair ); - sbSizerMainPair->Add( m_panelMainPair, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer158; - bSizer158 = new wxBoxSizer( wxVERTICAL ); - - m_panelLeft = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1141; - bSizer1141 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer1141->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new wxDirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLeft->SetToolTip( _("Select a folder") ); - - bSizer1141->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLocalFilter = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer1141->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelLeft->SetSizer( bSizer1141 ); - m_panelLeft->Layout(); - bSizer1141->Fit( m_panelLeft ); - bSizer158->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelRight = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer115; - bSizer115 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new wxDirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerRight->SetToolTip( _("Select a folder") ); - - bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer115->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelRight->SetSizer( bSizer115 ); - m_panelRight->Layout(); - bSizer115->Fit( m_panelRight ); - bSizer158->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizerMainPair->Add( bSizer158, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - - bSizer141->Add( sbSizerMainPair, 0, wxEXPAND, 5 ); - - bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); - - bSizer141->Add( bSizerAddFolderPairs, 0, wxEXPAND, 5 ); - - m_scrolledWindow6->SetSizer( bSizer141 ); - m_scrolledWindow6->Layout(); - bSizer141->Fit( m_scrolledWindow6 ); - bSizer120->Add( m_scrolledWindow6, 0, wxEXPAND, 5 ); - - - bSizer120->Add( 0, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxFlexGridSizer* fgSizer15; - fgSizer15 = new wxFlexGridSizer( 1, 2, 10, 10 ); - fgSizer15->SetFlexibleDirection( wxBOTH ); - fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - wxStaticBoxSizer* sbSizer24; - sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Status feedback") ), wxVERTICAL ); - - - sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_checkBoxSilent = new wxCheckBox( m_panelOverview, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxSilent->SetToolTip( _("Run minimized and write status information to a logfile") ); - - sbSizer24->Add( m_checkBoxSilent, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 14 ); - - - sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); - - fgSizer15->Add( sbSizer24, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer25; - sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); - - wxArrayString m_choiceHandleErrorChoices; - m_choiceHandleError = new wxChoice( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); - m_choiceHandleError->SetSelection( 0 ); - sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - fgSizer15->Add( sbSizer25, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer120->Add( fgSizer15, 0, 0, 5 ); - - bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - - m_panelOverview->SetSizer( bSizer67 ); - m_panelOverview->Layout(); - bSizer67->Fit( m_panelOverview ); - m_notebookSettings->AddPage( m_panelOverview, _("Overview"), true ); - m_panelLogging = new wxPanel( m_notebookSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer117; - bSizer117 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer119; - bSizer119 = new wxBoxSizer( wxVERTICAL ); - - m_staticText120 = new wxStaticText( m_panelLogging, wxID_ANY, _("Select logfile directory:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText120->Wrap( -1 ); - bSizer119->Add( m_staticText120, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - wxStaticBoxSizer* sbSizer251; - sbSizer251 = new wxStaticBoxSizer( new wxStaticBox( m_panelLogging, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); - - m_textCtrlLogfileDir = new wxTextCtrl( m_panelLogging, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer251->Add( m_textCtrlLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLogfileDir = new wxDirPickerCtrl( m_panelLogging, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLogfileDir->SetToolTip( _("Select a folder") ); - - sbSizer251->Add( m_dirPickerLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer119->Add( sbSizer251, 1, wxEXPAND, 5 ); - - bSizer117->Add( bSizer119, 0, wxEXPAND|wxALL, 10 ); - - m_panelLogging->SetSizer( bSizer117 ); - m_panelLogging->Layout(); - bSizer117->Fit( m_panelLogging ); - m_notebookSettings->AddPage( m_panelLogging, _("Logging"), false ); - - bSizer69->Add( m_notebookSettings, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer68; - bSizer68 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonSave->SetDefault(); - m_buttonSave->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer68->Add( m_buttonSave, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonLoad = new wxButton( this, wxID_OPEN, _("&Load"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonLoad->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer68->Add( m_buttonLoad, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer68->Add( m_button6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer69->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer54->Add( bSizer69, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); - - this->SetSizer( bSizer54 ); - this->Layout(); - bSizer54->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); - m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this ); - m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this ); - m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this ); - m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this ); - m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this ); - m_checkBoxSilent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), NULL, this ); - m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); - m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); - m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); -} - -BatchDlgGenerated::~BatchDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); - m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this ); - m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this ); - m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this ); - m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this ); - m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this ); - m_checkBoxSilent->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), NULL, this ); - m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); - m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); - m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); -} - -CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) -{ - wxBoxSizer* bSizer40; - bSizer40 = new wxBoxSizer( wxVERTICAL ); - - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer157; - bSizer157 = new wxBoxSizer( wxVERTICAL ); - - bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText321 = new wxStaticText( this, wxID_ANY, _("Elements found:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText321->Wrap( -1 ); - m_staticText321->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextScanned->Wrap( -1 ); - m_staticTextScanned->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 ); - - bSizer157->Add( bSizerFilesFound, 0, 0, 5 ); - - bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText46 = new wxStaticText( this, wxID_ANY, _("Elements remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText46->Wrap( -1 ); - m_staticText46->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 ); - - wxBoxSizer* bSizer154; - bSizer154 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextFilesRemaining->Wrap( -1 ); - m_staticTextFilesRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText117 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText117->Wrap( -1 ); - m_staticText117->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizer154->Add( m_staticText117, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataRemaining->Wrap( -1 ); - m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText118 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText118->Wrap( -1 ); - m_staticText118->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizer154->Add( m_staticText118, 0, wxALIGN_BOTTOM, 5 ); - - bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 ); - - bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 ); - - bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - sSizerSpeed = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText104->Wrap( -1 ); - m_staticText104->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSpeed->Wrap( -1 ); - m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL ); - - m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeRemFixed->Wrap( -1 ); - m_staticTextTimeRemFixed->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeRemaining->Wrap( -1 ); - m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - sSizerTimeRemaining->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticText* m_staticText37; - m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText37->Wrap( -1 ); - m_staticText37->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer48; - bSizer48 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText30->Wrap( -1 ); - m_staticText30->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer48->Add( m_textCtrlStatus, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer40->Add( bSizer48, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH ); - bSizer40->Add( m_gauge2, 0, wxALL|wxEXPAND, 5 ); - - this->SetSizer( bSizer40 ); - this->Layout(); - bSizer40->Fit( this ); -} - -CompareStatusGenerated::~CompareStatusGenerated() -{ -} - -SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer181; - bSizer181 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer29; - bSizer29 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer7; - sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - m_staticText1 = new wxStaticText( this, wxID_ANY, _("Select variant:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1->Wrap( -1 ); - m_staticText1->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - sbSizer7->Add( m_staticText1, 0, wxALL, 5 ); - - wxFlexGridSizer* fgSizer1; - fgSizer1 = new wxFlexGridSizer( 4, 3, 8, 5 ); - fgSizer1->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_radioBtnAutomatic = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnAutomatic->SetValue( true ); - m_radioBtnAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_radioBtnAutomatic, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonAutomatic = new wxButton( this, wxID_ANY, _("<Automatic>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_buttonAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText81 = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText81->Wrap( 300 ); - fgSizer1->Add( m_staticText81, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_radioBtnMirror = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_radioBtnMirror, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonOneWay = new wxButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOneWay->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8->Wrap( 300 ); - fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_radioBtnUpdate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_radioBtnUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonUpdate = new wxButton( this, wxID_ANY, _("Update ->"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_buttonUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText101 = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText101->Wrap( 300 ); - fgSizer1->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_radioBtnCustom = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - m_radioBtnCustom->Enable( false ); - - fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer65; - bSizer65 = new wxBoxSizer( wxVERTICAL ); - - - bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText23 = new wxStaticText( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE|wxSTATIC_BORDER ); - m_staticText23->Wrap( -1 ); - m_staticText23->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - bSizer65->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); - - fgSizer1->Add( bSizer65, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText9->Wrap( 300 ); - fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - sbSizer7->Add( fgSizer1, 0, 0, 5 ); - - bSizer29->Add( sbSizer7, 0, wxEXPAND, 5 ); - - - bSizer29->Add( 0, 5, 1, 0, 5 ); - - bSizer201 = new wxBoxSizer( wxHORIZONTAL ); - - sbSizerErrorHandling = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); - - wxArrayString m_choiceHandleErrorChoices; - m_choiceHandleError = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); - m_choiceHandleError->SetSelection( 0 ); - sbSizerErrorHandling->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer201->Add( sbSizerErrorHandling, 0, wxEXPAND|wxRIGHT, 10 ); - - wxStaticBoxSizer* sbSizer231; - sbSizer231 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Deletion handling") ), wxVERTICAL ); - - wxArrayString m_choiceHandleDeletionChoices; - m_choiceHandleDeletion = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 ); - m_choiceHandleDeletion->SetSelection( 0 ); - sbSizer231->Add( m_choiceHandleDeletion, 0, wxBOTTOM, 5 ); - - m_panelCustomDeletionDir = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1151; - bSizer1151 = new wxBoxSizer( wxHORIZONTAL ); - - m_textCtrlCustomDelFolder = new wxTextCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlCustomDelFolder->SetMinSize( wxSize( 200,-1 ) ); - - bSizer1151->Add( m_textCtrlCustomDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerCustomDelFolder = new wxDirPickerCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer1151->Add( m_dirPickerCustomDelFolder, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelCustomDeletionDir->SetSizer( bSizer1151 ); - m_panelCustomDeletionDir->Layout(); - bSizer1151->Fit( m_panelCustomDeletionDir ); - sbSizer231->Add( m_panelCustomDeletionDir, 0, 0, 5 ); - - bSizer201->Add( sbSizer231, 0, wxEXPAND, 5 ); - - bSizer29->Add( bSizer201, 0, wxTOP|wxBOTTOM, 5 ); - - - bSizer29->Add( 0, 5, 1, 0, 5 ); - - wxBoxSizer* bSizer291; - bSizer291 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonOK->SetDefault(); - m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer291->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer291->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer291->Add( 20, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer29->Add( bSizer291, 0, wxEXPAND, 5 ); - - bSizer181->Add( bSizer29, 0, wxEXPAND, 5 ); - - - bSizer181->Add( 10, 0, 0, 0, 5 ); - - sbSizerSyncDirections = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL ); - - wxGridSizer* gSizer3; - gSizer3 = new wxGridSizer( 1, 2, 0, 5 ); - - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText21->Wrap( -1 ); - m_staticText21->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText31->Wrap( -1 ); - m_staticText31->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizerSyncDirections->Add( gSizer3, 0, wxEXPAND, 5 ); - - m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbSizerSyncDirections->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer121; - bSizer121 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer122; - bSizer122 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapLeftOnly->SetToolTip( _("Files/folders that exist on left side only") ); - - bSizer122->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer122->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer122->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer122, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer123; - bSizer123 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapRightOnly->SetToolTip( _("Files/folders that exist on right side only") ); - - bSizer123->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer123->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer123->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer123, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer124; - bSizer124 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapLeftNewer->SetToolTip( _("Files that exist on both sides, left one is newer") ); - - bSizer124->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer124->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer124->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer124, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer125; - bSizer125 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapRightNewer->SetToolTip( _("Files that exist on both sides, right one is newer") ); - - bSizer125->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer125->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer125->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer125, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer126; - bSizer126 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapDifferent->SetToolTip( _("Files that have different content") ); - - bSizer126->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer126->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer126->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer126, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer127; - bSizer127 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapConflict->SetToolTip( _("Conflicts/files that cannot be categorized") ); - - bSizer127->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer127->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer127->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer127, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer181->Add( sbSizerSyncDirections, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer7->Add( bSizer181, 0, wxALL, 5 ); - - this->SetSizer( bSizer7 ); - this->Layout(); - bSizer7->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) ); - m_radioBtnAutomatic->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); - m_buttonAutomatic->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); - m_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_radioBtnUpdate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); - m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); - m_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this ); - m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this ); - m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); - m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this ); - m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this ); - m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); - m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); - m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); -} - -SyncCfgDlgGenerated::~SyncCfgDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) ); - m_radioBtnAutomatic->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); - m_buttonAutomatic->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); - m_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_radioBtnUpdate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); - m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); - m_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this ); - m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this ); - m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); - m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this ); - m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this ); - m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); - m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); - m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); -} - -CmpCfgDlgGenerated::CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer136; - bSizer136 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer55; - bSizer55 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer6; - sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Compare by...") ), wxHORIZONTAL ); - - wxFlexGridSizer* fgSizer16; - fgSizer16 = new wxFlexGridSizer( 2, 3, 0, 0 ); - fgSizer16->SetFlexibleDirection( wxBOTH ); - fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_radioBtnSizeDate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnSizeDate->SetValue( true ); - m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\nare the same") ); - - fgSizer16->Add( m_radioBtnSizeDate, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapByTime = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapByTime->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\nare the same") ); - - fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_buttonTimeSize = new wxButton( this, wxID_ANY, _("File size and date"), wxDefaultPosition, wxSize( -1,42 ), 0 ); - m_buttonTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - m_buttonTimeSize->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\nare the same") ); - - fgSizer16->Add( m_buttonTimeSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); - - m_radioBtnContent = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); - - fgSizer16->Add( m_radioBtnContent, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapByContent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapByContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); - - fgSizer16->Add( m_bitmapByContent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_buttonContent = new wxButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,42 ), 0 ); - m_buttonContent->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - m_buttonContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); - - fgSizer16->Add( m_buttonContent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - sbSizer6->Add( fgSizer16, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - sbSizer6->Add( m_staticline14, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - m_bpButtonHelp->SetToolTip( _("Help") ); - - sbSizer6->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 ); - - - bSizer55->Add( 0, 4, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer25; - sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Symbolic Link handling") ), wxVERTICAL ); - - wxArrayString m_choiceHandleSymlinksChoices; - m_choiceHandleSymlinks = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleSymlinksChoices, 0 ); - m_choiceHandleSymlinks->SetSelection( 0 ); - sbSizer25->Add( m_choiceHandleSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer55->Add( sbSizer25, 0, wxEXPAND|wxTOP, 5 ); - - wxBoxSizer* bSizer22; - bSizer22 = new wxBoxSizer( wxHORIZONTAL ); - - m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button10->SetDefault(); - m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer22->Add( m_button10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer55->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer136->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - this->SetSizer( bSizer136 ); - this->Layout(); - bSizer136->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) ); - m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); - m_buttonTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); - m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); - m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); - m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); -} - -CmpCfgDlgGenerated::~CmpCfgDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) ); - m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); - m_buttonTimeSize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); - m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); - m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); - m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); -} - -SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxSize( 470,300 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - - wxBoxSizer* bSizer27; - bSizer27 = new wxBoxSizer( wxVERTICAL ); - - - bSizer27->Add( 0, 15, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer37; - bSizer37 = new wxBoxSizer( wxHORIZONTAL ); - - m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( 45,45 )); - bSizer37->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Synchronization status"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer37->Add( m_panel8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer27->Add( bSizer37, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer42; - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bitmapStatus = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); - bSizer42->Add( m_bitmapStatus, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatus->Wrap( -1 ); - m_staticTextStatus->SetFont( wxFont( 14, 70, 93, 90, false, wxEmptyString ) ); - - bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer27->Add( bSizer42, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer31 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer111; - bSizer111 = new wxBoxSizer( wxVERTICAL ); - - bSizerObjectsRemaining = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText25 = new wxStaticText( this, wxID_ANY, _("Elements remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText25->Wrap( -1 ); - m_staticText25->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerObjectsRemaining->Add( m_staticText25, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextRemainingObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_staticTextRemainingObj->Wrap( -1 ); - m_staticTextRemainingObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerObjectsRemaining->Add( m_staticTextRemainingObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticText96 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText96->Wrap( -1 ); - m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsRemaining->Add( m_staticText96, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataRemaining->Wrap( -1 ); - m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsRemaining->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText97 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText97->Wrap( -1 ); - m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsRemaining->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 ); - - bSizer111->Add( bSizerObjectsRemaining, 0, 0, 5 ); - - bSizerObjectsProcessed = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText251 = new wxStaticText( this, wxID_ANY, _("Elements processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText251->Wrap( -1 ); - m_staticText251->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerObjectsProcessed->Add( m_staticText251, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextProcessedObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_staticTextProcessedObj->Wrap( -1 ); - m_staticTextProcessedObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerObjectsProcessed->Add( m_staticTextProcessedObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticText98 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText98->Wrap( -1 ); - m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsProcessed->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticTextDataProcessed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataProcessed->Wrap( -1 ); - m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsProcessed->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText99 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText99->Wrap( -1 ); - m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsProcessed->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 ); - - bSizer111->Add( bSizerObjectsProcessed, 0, 0, 5 ); - - bSizer31->Add( bSizer111, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer114; - bSizer114 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText55 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText55->Wrap( -1 ); - m_staticText55->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer114->Add( m_staticText55, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizer114->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer31->Add( bSizer114, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer27->Add( bSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer27->Add( m_textCtrlInfo, 3, wxEXPAND|wxALL, 5 ); - - m_gauge1 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,20 ), wxGA_HORIZONTAL ); - bSizer27->Add( m_gauge1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer28 = new wxBoxSizer( wxHORIZONTAL ); - - bSizerSpeed = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText108 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText108->Wrap( -1 ); - m_staticText108->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerSpeed->Add( m_staticText108, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSpeed->Wrap( -1 ); - m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer28->Add( bSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer28->Add( 0, 0, 1, 0, 5 ); - - m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - m_buttonOK->Enable( false ); - m_buttonOK->Hide(); - - bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - - bSizer28->Add( 0, 0, 1, 0, 5 ); - - bSizerRemTime = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText21->Wrap( -1 ); - m_staticText21->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerRemTime->Add( m_staticText21, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeRemaining->Wrap( -1 ); - m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerRemTime->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer28->Add( bSizerRemTime, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer27->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 5 ); - - - bSizer27->Add( 0, 5, 0, wxEXPAND, 5 ); - - this->SetSizer( bSizer27 ); - this->Layout(); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); - this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); - m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); -} - -SyncStatusDlgGenerated::~SyncStatusDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); - this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); - m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); -} - -HelpDlgGenerated::HelpDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer20; - bSizer20 = new wxBoxSizer( wxVERTICAL ); - - - bSizer20->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer85; - bSizer85 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap25 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer85->Add( m_bitmap25, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer72->Add( 20, 0, 0, 0, 5 ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer72->Add( 20, 0, 0, 0, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer85->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer85->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer20->Add( bSizer85, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_scrolledWindow1 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); - m_scrolledWindow1->SetScrollRate( 5, 5 ); - m_scrolledWindow1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxVERTICAL ); - - m_staticText59 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("Compare by \"File size and date\""), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText59->Wrap( 500 ); - m_staticText59->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - - bSizer70->Add( m_staticText59, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticText60 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText60->Wrap( 500 ); - bSizer70->Add( m_staticText60, 0, wxALL, 5 ); - - m_staticText61 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("When the comparison is started with this option set the following decision tree is processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText61->Wrap( 500 ); - bSizer70->Add( m_staticText61, 0, wxALL, 5 ); - - m_treeCtrl1 = new wxTreeCtrl( m_scrolledWindow1, wxID_ANY, wxDefaultPosition, wxSize( -1,175 ), wxTR_DEFAULT_STYLE ); - m_treeCtrl1->SetBackgroundColour( wxColour( 237, 236, 235 ) ); - - bSizer70->Add( m_treeCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_staticText63 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText63->Wrap( 500 ); - bSizer70->Add( m_staticText63, 0, wxALL, 5 ); - - m_staticText75 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText75->Wrap( -1 ); - bSizer70->Add( m_staticText75, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText76 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- left newer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText76->Wrap( -1 ); - bSizer70->Add( m_staticText76, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText77 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- right newer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText77->Wrap( -1 ); - bSizer70->Add( m_staticText77, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText79 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText79->Wrap( -1 ); - bSizer70->Add( m_staticText79, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText80 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText80->Wrap( -1 ); - bSizer70->Add( m_staticText80, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText78 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- conflict"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText78->Wrap( -1 ); - bSizer70->Add( m_staticText78, 0, wxRIGHT|wxLEFT, 5 ); - - m_scrolledWindow1->SetSizer( bSizer70 ); - m_scrolledWindow1->Layout(); - bSizer70->Fit( m_scrolledWindow1 ); - m_notebook1->AddPage( m_scrolledWindow1, _("File size and date"), true ); - m_scrolledWindow5 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); - m_scrolledWindow5->SetScrollRate( 5, 5 ); - m_scrolledWindow5->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); - - wxBoxSizer* bSizer74; - bSizer74 = new wxBoxSizer( wxVERTICAL ); - - m_staticText65 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("Compare by \"File content\""), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText65->Wrap( 500 ); - m_staticText65->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - - bSizer74->Add( m_staticText65, 0, wxALL, 5 ); - - m_staticText66 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText66->Wrap( 500 ); - bSizer74->Add( m_staticText66, 0, wxALL, 5 ); - - m_treeCtrl2 = new wxTreeCtrl( m_scrolledWindow5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE ); - m_treeCtrl2->SetBackgroundColour( wxColour( 237, 236, 235 ) ); - m_treeCtrl2->SetMinSize( wxSize( -1,130 ) ); - - bSizer74->Add( m_treeCtrl2, 0, wxALL|wxEXPAND, 5 ); - - m_staticText69 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText69->Wrap( 500 ); - bSizer74->Add( m_staticText69, 0, wxALL, 5 ); - - m_staticText81 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText81->Wrap( -1 ); - bSizer74->Add( m_staticText81, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText82 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- different"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText82->Wrap( -1 ); - bSizer74->Add( m_staticText82, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText83 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText83->Wrap( -1 ); - bSizer74->Add( m_staticText83, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText84 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText84->Wrap( -1 ); - bSizer74->Add( m_staticText84, 0, wxRIGHT|wxLEFT, 5 ); - - m_scrolledWindow5->SetSizer( bSizer74 ); - m_scrolledWindow5->Layout(); - bSizer74->Fit( m_scrolledWindow5 ); - m_notebook1->AddPage( m_scrolledWindow5, _("File content"), false ); - - bSizer20->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 ); - - m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_button8->SetDefault(); - m_button8->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer20->Add( m_button8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer20 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); - m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); -} - -HelpDlgGenerated::~HelpDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); - m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); -} - -AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer31; - bSizer31 = new wxBoxSizer( wxVERTICAL ); - - - bSizer31->Add( 0, 5, 0, 0, 5 ); - - m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel5->SetBackgroundColour( wxColour( 255, 255, 255 ) ); - - wxBoxSizer* bSizer36; - bSizer36 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 404,55 ), 0 ); - bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel5->SetSizer( bSizer36 ); - m_panel5->Layout(); - bSizer36->Fit( m_panel5 ); - bSizer31->Add( m_panel5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_build->Wrap( -1 ); - m_build->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - - bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer31->Add( 0, 10, 0, 0, 5 ); - - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxVERTICAL ); - - m_scrolledWindowCodeInfo = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); - m_scrolledWindowCodeInfo->SetScrollRate( 5, 5 ); - m_scrolledWindowCodeInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - m_scrolledWindowCodeInfo->SetMinSize( wxSize( -1,125 ) ); - - bSizerCodeInfo = new wxBoxSizer( wxVERTICAL ); - - m_staticText72 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _("Source code written completely in C++ utilizing:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText72->Wrap( -1 ); - m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); - - bSizerCodeInfo->Add( m_staticText72, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 ); - - m_staticText73 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _(" MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText73->Wrap( -1 ); - bSizerCodeInfo->Add( m_staticText73, 0, wxALL|wxEXPAND, 5 ); - - m_staticText74 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _("- ZenJu -"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText74->Wrap( -1 ); - m_staticText74->SetFont( wxFont( 10, 74, 93, 92, false, wxT("Segoe Print") ) ); - - bSizerCodeInfo->Add( m_staticText74, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_scrolledWindowCodeInfo->SetSizer( bSizerCodeInfo ); - m_scrolledWindowCodeInfo->Layout(); - bSizerCodeInfo->Fit( m_scrolledWindowCodeInfo ); - bSizer53->Add( m_scrolledWindowCodeInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 10 ); - - m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); - m_scrolledWindowTranslators->SetScrollRate( 5, 5 ); - m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - m_scrolledWindowTranslators->SetMinSize( wxSize( -1,140 ) ); - m_scrolledWindowTranslators->SetMaxSize( wxSize( -1,140 ) ); - - bSizerTranslators = new wxBoxSizer( wxVERTICAL ); - - m_staticText54 = new wxStaticText( m_scrolledWindowTranslators, wxID_ANY, _("Big thanks for localizing FreeFileSync goes out to:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText54->Wrap( -1 ); - m_staticText54->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizerTranslators->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); - - - bSizerTranslators->Add( 0, 5, 0, 0, 5 ); - - fgSizerTranslators = new wxFlexGridSizer( 1, 3, 5, 20 ); - fgSizerTranslators->SetFlexibleDirection( wxBOTH ); - fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - bSizerTranslators->Add( fgSizerTranslators, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_scrolledWindowTranslators->SetSizer( bSizerTranslators ); - m_scrolledWindowTranslators->Layout(); - bSizerTranslators->Fit( m_scrolledWindowTranslators ); - bSizer53->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 5 ); - - bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 25 ); - - m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer31->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - m_staticText131 = new wxStaticText( this, wxID_ANY, _("Feedback and suggestions are welcome at:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText131->Wrap( -1 ); - m_staticText131->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - bSizer31->Add( m_staticText131, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer31->Add( m_staticline12, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer104; - bSizer104 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer103; - bSizer103 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap9->SetToolTip( _("FreeFileSync at Sourceforge") ); - - bSizer103->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Homepage"), wxT("http://sourceforge.net/projects/freefilesync/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink1->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") ); - - bSizer103->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer103->Add( 20, 0, 1, wxEXPAND, 5 ); - - m_hyperlink6 = new wxHyperlinkCtrl( this, wxID_ANY, _("Report translation error"), wxT("http://sourceforge.net/projects/freefilesync/forums/forum/976976"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink6->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - m_hyperlink6->SetToolTip( _("http://sourceforge.net/projects/freefilesync/forums/forum/976976") ); - - bSizer103->Add( m_hyperlink6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer104->Add( bSizer103, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer108; - bSizer108 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap10->SetToolTip( _("Email") ); - - bSizer108->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, _("Email"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink2->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - m_hyperlink2->SetToolTip( _("zhnmju123@gmx.de") ); - - bSizer108->Add( m_hyperlink2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer108->Add( 30, 0, 1, wxEXPAND, 5 ); - - m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation); - m_animationControl1->SetToolTip( _("Donate with PayPal") ); - - bSizer108->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink3 = new wxHyperlinkCtrl( this, wxID_ANY, _("If you like FFS"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink3->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - m_hyperlink3->SetToolTip( _("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8") ); - - bSizer108->Add( m_hyperlink3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer104->Add( bSizer108, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer31->Add( bSizer104, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer31->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxStaticBoxSizer* sbSizer14; - sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Published under the GNU General Public License:") ), wxHORIZONTAL ); - - - sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 88,31 ), 0 ); - sbSizer14->Add( m_bitmap13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - sbSizer14->Add( m_hyperlink5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer31->Add( sbSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer31->Add( m_buttonOkay, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - this->SetSizer( bSizer31 ); - this->Layout(); - bSizer31->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); -} - -AboutDlgGenerated::~AboutDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); - m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); -} - -ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_checkBoxIgnoreErrors = new wxCheckBox( this, wxID_ANY, _("Ignore subsequent errors"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxIgnoreErrors->SetToolTip( _("Hide further error messages during the current process") ); - - bSizer24->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); - - - bSizer24->Add( 0, 5, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonIgnore = new wxButton( this, wxID_OK, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonIgnore->SetDefault(); - m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonRetry->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - - bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); - m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); - m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); -} - -ErrorDlgGenerated::~ErrorDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); - m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); - m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); -} - -WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - - bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); - - - bSizer24->Add( 0, 5, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonIgnore = new wxButton( this, wxID_IGNORE, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonIgnore->SetDefault(); - m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonSwitch = new wxButton( this, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonSwitch->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonSwitch, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - - bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) ); - m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); - m_buttonSwitch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); -} - -WarningDlgGenerated::~WarningDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) ); - m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); - m_buttonSwitch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); -} - -QuestionDlgGenerated::QuestionDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_checkBoxDontAskAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - - bSizer24->Add( m_checkBoxDontAskAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); - - - bSizer24->Add( 0, 5, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonYes = new wxButton( this, wxID_YES, _("&Yes"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonYes->SetDefault(); - m_buttonYes->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonYes, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonNo = new wxButton( this, wxID_NO, _("&No"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonNo->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonNo, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonCancel, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - - bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) ); - m_buttonYes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); - m_buttonNo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); -} - -QuestionDlgGenerated::~QuestionDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) ); - m_buttonYes->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); - m_buttonNo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); -} - -DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer41; - bSizer41 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer41->Add( m_bitmap12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHeader->Wrap( -1 ); - m_staticTextHeader->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer24->Add( bSizer41, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer99; - bSizer99 = new wxBoxSizer( wxHORIZONTAL ); - - m_checkBoxDeleteBothSides = new wxCheckBox( this, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") ); - - bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer99->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxUseRecycler->SetValue(true); - - bSizer99->Add( m_checkBoxUseRecycler, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); - - m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlMessage->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer24->Add( m_textCtrlMessage, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonOK->SetDefault(); - m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonCancel, 0, wxALL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); - m_checkBoxDeleteBothSides->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this ); - m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); -} - -DeleteDlgGenerated::~DeleteDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); - m_checkBoxDeleteBothSides->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this ); - m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); -} - -FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer21; - bSizer21 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer86; - bSizer86 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap26 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer86->Add( m_bitmap26, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticTexHeader = new wxStaticText( m_panel8, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTexHeader->Wrap( -1 ); - m_staticTexHeader->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticTexHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer21->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText44->Wrap( 400 ); - bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - m_bpButtonHelp->SetToolTip( _("Help") ); - - bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); - - - bSizer21->Add( 0, 5, 0, 0, 5 ); - - m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer69; - bSizer69 = new wxBoxSizer( wxVERTICAL ); - - m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxVERTICAL ); - - m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText45->Wrap( -1 ); - m_staticText45->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - - bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 ); - - m_staticText83 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter relative file or directory names separated by ';' or a new line."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText83->Wrap( -1 ); - bSizer52->Add( m_staticText83, 0, 0, 5 ); - - m_staticText84 = new wxStaticText( m_panel13, wxID_ANY, _("2. Use wildcard characters '*' and '?'."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText84->Wrap( -1 ); - bSizer52->Add( m_staticText84, 0, 0, 5 ); - - m_staticText85 = new wxStaticText( m_panel13, wxID_ANY, _("3. Exclude files directly on main grid via context menu."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText85->Wrap( -1 ); - bSizer52->Add( m_staticText85, 0, 0, 5 ); - - bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); - - wxStaticBoxSizer* sbSizer21; - sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxVERTICAL ); - - wxBoxSizer* bSizer66; - bSizer66 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\*"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText181->Wrap( -1 ); - bSizer66->Add( m_staticText181, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\"."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1811->Wrap( 250 ); - m_staticText1811->SetFont( wxFont( 8, 70, 93, 90, false, wxEmptyString ) ); - - bSizer66->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - sbSizer21->Add( bSizer66, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_panel13->SetSizer( bSizer69 ); - m_panel13->Layout(); - bSizer69->Fit( m_panel13 ); - bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer8; - sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - wxFlexGridSizer* fgSizer3; - fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer3->AddGrowableCol( 1 ); - fgSizer3->AddGrowableRow( 1 ); - fgSizer3->SetFlexibleDirection( wxBOTH ); - fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText15 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - m_staticText15->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer3->Add( m_staticText15, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_bitmap8 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - fgSizer3->Add( m_bitmap8, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); - fgSizer3->Add( m_textCtrlInclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - sbSizer8->Add( fgSizer3, 1, wxEXPAND, 5 ); - - wxFlexGridSizer* fgSizer4; - fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer4->AddGrowableCol( 1 ); - fgSizer4->AddGrowableRow( 1 ); - fgSizer4->SetFlexibleDirection( wxBOTH ); - fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer4->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText16 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - m_staticText16->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer4->Add( m_staticText16, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - fgSizer4->Add( m_bitmap9, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); - fgSizer4->Add( m_textCtrlExclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - sbSizer8->Add( fgSizer4, 1, wxEXPAND, 5 ); - - bSizer21->Add( sbSizer8, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - - bSizer21->Add( 0, 0, 0, 0, 5 ); - - wxBoxSizer* bSizer22; - bSizer22 = new wxBoxSizer( wxHORIZONTAL ); - - m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer22->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button10->SetDefault(); - m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer22->Add( m_button10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_button17 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button17->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer22->Add( m_button17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer21->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxEXPAND, 5 ); - - this->SetSizer( bSizer21 ); - this->Layout(); - bSizer21->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); - m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); - m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); - m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); - m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); -} - -FilterDlgGenerated::~FilterDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); - m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); - m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); - m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); - m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); -} - -CustomizeColsDlgGenerated::CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer96; - bSizer96 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer99; - bSizer99 = new wxBoxSizer( wxHORIZONTAL ); - - wxArrayString m_checkListColumnsChoices; - m_checkListColumns = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListColumnsChoices, 0 ); - bSizer99->Add( m_checkListColumns, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer98; - bSizer98 = new wxBoxSizer( wxVERTICAL ); - - m_bpButton29 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButton29->SetToolTip( _("Move column up") ); - - m_bpButton29->SetToolTip( _("Move column up") ); - - bSizer98->Add( m_bpButton29, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_bpButton30 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButton30->SetToolTip( _("Move column down") ); - - m_bpButton30->SetToolTip( _("Move column down") ); - - bSizer98->Add( m_bpButton30, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer99->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer96->Add( bSizer99, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer97; - bSizer97 = new wxBoxSizer( wxHORIZONTAL ); - - m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button9, 0, wxALL, 5 ); - - - bSizer97->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_button28 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button28->SetDefault(); - m_button28->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer97->Add( m_button28, 0, wxALL, 5 ); - - m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button29, 0, wxALL, 5 ); - - bSizer96->Add( bSizer97, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - this->SetSizer( bSizer96 ); - this->Layout(); - bSizer96->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) ); - m_bpButton29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this ); - m_bpButton30->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this ); - m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); - m_button28->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); - m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); -} - -CustomizeColsDlgGenerated::~CustomizeColsDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) ); - m_bpButton29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this ); - m_bpButton30->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this ); - m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); - m_button28->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); - m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); -} - -GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxSize( 280,230 ), wxDefaultSize ); - - wxBoxSizer* bSizer95; - bSizer95 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer86; - bSizer86 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer86->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - - bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer95->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer95->Add( 0, 10, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer23; - sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - m_checkBoxIgnoreOneHour = new wxCheckBox( this, wxID_ANY, _("Ignore 1-hour file time difference"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxIgnoreOneHour->SetToolTip( _("Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes") ); - - sbSizer23->Add( m_checkBoxIgnoreOneHour, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using Volume Shadow Copy Service") ); - - sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbSizer23->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer101; - bSizer101 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText100 = new wxStaticText( this, wxID_ANY, _("Hidden dialogs:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText100->Wrap( -1 ); - bSizer101->Add( m_staticText100, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer101->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_buttonResetDialogs = new wxButtonWithImage( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxSize( 80,-1 ), 0 ); - m_buttonResetDialogs->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - m_buttonResetDialogs->SetToolTip( _("Show hidden dialogs") ); - - bSizer101->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer23->Add( bSizer101, 0, wxEXPAND, 5 ); - - bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - - bSizer95->Add( 0, 10, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer26; - sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("External applications") ), wxHORIZONTAL ); - - - sbSizer26->Add( 5, 0, 0, 0, 5 ); - - m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_gridCustomCommand->CreateGrid( 5, 2 ); - m_gridCustomCommand->EnableEditing( true ); - m_gridCustomCommand->EnableGridLines( true ); - m_gridCustomCommand->EnableDragGridSize( false ); - m_gridCustomCommand->SetMargins( 0, 0 ); - - // Columns - m_gridCustomCommand->SetColSize( 0, 98 ); - m_gridCustomCommand->SetColSize( 1, 179 ); - m_gridCustomCommand->EnableDragColMove( false ); - m_gridCustomCommand->EnableDragColSize( true ); - m_gridCustomCommand->SetColLabelSize( 20 ); - m_gridCustomCommand->SetColLabelValue( 0, _("Description") ); - m_gridCustomCommand->SetColLabelValue( 1, _("Command line") ); - m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Rows - m_gridCustomCommand->EnableDragRowSize( false ); - m_gridCustomCommand->SetRowLabelSize( 0 ); - m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); - sbSizer26->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer157; - bSizer157 = new wxBoxSizer( wxVERTICAL ); - - m_bpButtonAddRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - bSizer157->Add( m_bpButtonAddRow, 0, 0, 5 ); - - m_bpButtonRemoveRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - bSizer157->Add( m_bpButtonRemoveRow, 0, 0, 5 ); - - sbSizer26->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - sbSizer26->Add( 5, 0, 0, 0, 5 ); - - bSizer95->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - wxBoxSizer* bSizer97; - bSizer97 = new wxBoxSizer( wxHORIZONTAL ); - - m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button9, 0, wxALL, 5 ); - - - bSizer97->Add( 0, 0, 1, 0, 5 ); - - m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer97->Add( m_buttonOkay, 0, wxALL, 5 ); - - m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button29, 0, wxALL, 5 ); - - bSizer95->Add( bSizer97, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - this->SetSizer( bSizer95 ); - this->Layout(); - bSizer95->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) ); - m_buttonResetDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this ); - m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this ); - m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this ); - m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); - m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); -} - -GlobalSettingsDlgGenerated::~GlobalSettingsDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) ); - m_buttonResetDialogs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this ); - m_bpButtonAddRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this ); - m_bpButtonRemoveRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this ); - m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); - m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); - m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); -} - -SyncPreviewDlgGenerated::SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer134; - bSizer134 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer158; - bSizer158 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonStartSync = new wxButtonWithImage( this, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 ); - m_buttonStartSync->SetDefault(); - m_buttonStartSync->SetFont( wxFont( 14, 70, 90, 92, false, wxT("Arial Black") ) ); - m_buttonStartSync->SetToolTip( _("Start synchronization") ); - - bSizer158->Add( m_buttonStartSync, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticline16 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer158->Add( m_staticline16, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxStaticBoxSizer* sbSizer28; - sbSizer28 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Variant") ), wxVERTICAL ); - - m_staticTextVariant = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextVariant->Wrap( -1 ); - m_staticTextVariant->SetFont( wxFont( 10, 70, 90, 92, false, wxT("Arial Black") ) ); - - sbSizer28->Add( m_staticTextVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer158->Add( sbSizer28, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer134->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline14, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer141; - bSizer141 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer161; - sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Statistics") ), wxVERTICAL ); - - wxBoxSizer* bSizer157; - bSizer157 = new wxBoxSizer( wxHORIZONTAL ); - - wxFlexGridSizer* fgSizer5; - fgSizer5 = new wxFlexGridSizer( 4, 2, 0, 5 ); - fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer5->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticText94 = new wxStaticText( this, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText94->Wrap( -1 ); - m_staticText94->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer5->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapCreate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlCreateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlCreateL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlCreateL->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlCreateL->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer5->Add( m_textCtrlCreateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapUpdate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlUpdateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlUpdateL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlUpdateL->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlUpdateL->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer5->Add( m_textCtrlUpdateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapDelete = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer5->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlDeleteL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlDeleteL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlDeleteL->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlDeleteL->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer5->Add( m_textCtrlDeleteL, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer157->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - wxFlexGridSizer* fgSizer51; - fgSizer51 = new wxFlexGridSizer( 3, 1, 0, 5 ); - fgSizer51->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText95 = new wxStaticText( this, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText95->Wrap( -1 ); - m_staticText95->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer51->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlCreateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlCreateR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlCreateR->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlCreateR->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer51->Add( m_textCtrlCreateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlUpdateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlUpdateR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlUpdateR->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlUpdateR->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer51->Add( m_textCtrlUpdateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlDeleteR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlDeleteR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlDeleteR->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlDeleteR->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer51->Add( m_textCtrlDeleteR, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer157->Add( fgSizer51, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer161->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - sbSizer161->Add( 0, 10, 0, 0, 5 ); - - wxBoxSizer* bSizer156; - bSizer156 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); - - bSizer156->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); - - - bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlData->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - m_textCtrlData->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); - - bSizer156->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); - - sbSizer161->Add( bSizer156, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - bSizer141->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - bSizer134->Add( bSizer141, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline12, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer142; - bSizer142 = new wxBoxSizer( wxHORIZONTAL ); - - m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - - bSizer142->Add( m_checkBoxDontShowAgain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer142->Add( 10, 0, 1, 0, 5 ); - - m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer142->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer134->Add( bSizer142, 0, wxEXPAND, 5 ); - - this->SetSizer( bSizer134 ); - this->Layout(); - bSizer134->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); - m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); - m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); -} - -SyncPreviewDlgGenerated::~SyncPreviewDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); - m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); - m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); -} - -PopupFrameGenerated1::PopupFrameGenerated1( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - this->SetBackgroundColour( wxColour( 255, 255, 255 ) ); - - wxBoxSizer* bSizer158; - bSizer158 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer158->Add( m_bitmapLeft, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextMain = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMain->Wrap( 600 ); - bSizer158->Add( m_staticTextMain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - this->SetSizer( bSizer158 ); - this->Layout(); - bSizer158->Fit( this ); -} - -PopupFrameGenerated1::~PopupFrameGenerated1() -{ -} - -SearchDialogGenerated::SearchDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer161; - bSizer161 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer166; - bSizer166 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer162; - bSizer162 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText101 = new wxStaticText( this, wxID_ANY, _("Find what:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText101->Wrap( -1 ); - bSizer162->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlSearchTxt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 220,-1 ), 0 ); - bSizer162->Add( m_textCtrlSearchTxt, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer166->Add( bSizer162, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer166->Add( 0, 10, 0, 0, 5 ); - - m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 ); - - bSizer166->Add( m_checkBoxMatchCase, 0, wxALL|wxEXPAND, 5 ); - - bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer97; - bSizer97 = new wxBoxSizer( wxVERTICAL ); - - m_buttonFindNext = new wxButton( this, wxID_OK, _("&Find next"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonFindNext->SetDefault(); - m_buttonFindNext->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer97->Add( m_buttonFindNext, 0, wxALL|wxEXPAND, 5 ); - - m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button29, 0, wxALL|wxEXPAND, 5 ); - - bSizer161->Add( bSizer97, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - this->SetSizer( bSizer161 ); - this->Layout(); - bSizer161->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) ); - m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); - m_buttonFindNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); - m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); -} - -SearchDialogGenerated::~SearchDialogGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) ); - m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); - m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); - m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); -} diff --git a/ui/guiGenerated.h b/ui/guiGenerated.h deleted file mode 100644 index f4793fc6..00000000 --- a/ui/guiGenerated.h +++ /dev/null @@ -1,1443 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __guiGenerated__ -#define __guiGenerated__ - -#include <wx/intl.h> - -class CustomComboBox; -class CustomGridLeft; -class CustomGridMiddle; -class CustomGridRight; -class ToggleButton; -class wxButtonWithImage; - -#include <wx/string.h> -#include <wx/bitmap.h> -#include <wx/image.h> -#include <wx/icon.h> -#include <wx/menu.h> -#include <wx/gdicmn.h> -#include <wx/font.h> -#include <wx/colour.h> -#include <wx/settings.h> -#include <wx/stattext.h> -#include <wx/button.h> -#include <wx/sizer.h> -#include <wx/bmpbuttn.h> -#include <wx/panel.h> -#include <wx/combobox.h> -#include <wx/filepicker.h> -#include <wx/statbox.h> -#include <wx/scrolwin.h> -#include <wx/grid.h> -#include <wx/choice.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/dialog.h> -#include <wx/gauge.h> -#include <wx/radiobut.h> -#include <wx/animate.h> -#include <wx/treectrl.h> -#include <wx/hyperlink.h> -#include <wx/checklst.h> - -/////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////// -/// Class MainDialogGenerated -/////////////////////////////////////////////////////////////////////////////// -class MainDialogGenerated : public wxFrame -{ -private: - -protected: - wxMenuBar* m_menubar1; - wxMenu* m_menuFile; - wxMenuItem* m_menuItem10; - wxMenuItem* m_menuItem11; - wxMenuItem* m_menuItemSwitchView; - wxMenuItem* m_menuItemNew; - wxMenuItem* m_menuItemSave; - wxMenuItem* m_menuItemLoad; - wxMenu* m_menuAdvanced; - wxMenu* m_menuLanguages; - wxMenuItem* m_menuItemGlobSett; - wxMenuItem* m_menuItem7; - wxMenu* m_menuHelp; - wxMenuItem* m_menuItemCheckVer; - wxMenuItem* m_menuItemAbout; - wxBoxSizer* bSizer1; - wxPanel* m_panel71; - wxBoxSizer* bSizer6; - - wxStaticText* m_staticTextCmpVariant; - - wxButtonWithImage* m_buttonCompare; - wxButton* m_buttonAbort; - wxBitmapButton* m_bpButtonCmpConfig; - - - wxStaticText* m_staticTextSyncVariant; - wxBitmapButton* m_bpButtonSyncConfig; - wxButtonWithImage* m_buttonStartSync; - - wxStaticBoxSizer* sbSizer2; - wxPanel* m_panelTopMiddle; - - wxBoxSizer* bSizerMiddle; - wxBitmapButton* m_bpButtonSwapSides; - - - - wxBitmapButton* m_bpButtonAddPair; - wxScrolledWindow* m_scrolledWindowFolderPairs; - wxBoxSizer* bSizerAddFolderPairs; - 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; - wxBitmapButton* m_bpButtonSave; - wxBitmapButton* m_bpButtonLoad; - wxChoice* m_choiceHistory; - wxPanel* m_panelFilter; - wxBitmapButton* m_bpButtonFilter; - wxCheckBox* m_checkBoxHideFilt; - wxPanel* m_panelViewFilter; - - ToggleButton* m_bpButtonSyncCreateLeft; - ToggleButton* m_bpButtonSyncDirOverwLeft; - ToggleButton* m_bpButtonSyncDeleteLeft; - ToggleButton* m_bpButtonLeftOnly; - ToggleButton* m_bpButtonLeftNewer; - ToggleButton* m_bpButtonEqual; - ToggleButton* m_bpButtonDifferent; - ToggleButton* m_bpButtonSyncDirNone; - ToggleButton* m_bpButtonRightNewer; - ToggleButton* m_bpButtonRightOnly; - ToggleButton* m_bpButtonSyncDeleteRight; - ToggleButton* m_bpButtonSyncDirOverwRight; - ToggleButton* m_bpButtonSyncCreateRight; - ToggleButton* m_bpButtonConflict; - - 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; - - wxStaticLine* m_staticline9; - - wxStaticText* m_staticTextStatusMiddle; - - wxStaticLine* m_staticline10; - - wxStaticText* m_staticTextStatusRight; - - wxStaticBitmap* m_bitmap15; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnCompare( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnStartSync( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSwitchView( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnNewConfig( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSaveConfig( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnLoadConfig( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnMenuQuit( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnMenuGlobalSettings( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnMenuBatchJob( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnMenuExportFileList( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnShowHelp( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnMenuCheckVersion( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnMenuAbout( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCmpSettings( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncSettings( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnDirSelected( wxFileDirPickerEvent& event ) - { - event.Skip(); - } - virtual void OnSwapSides( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnAddFolderPair( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnLeftGridDoubleClick( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnContextRim( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnSortLeftGrid( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnContextRimLabelLeft( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnContextMiddle( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnSortMiddleGrid( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnContextMiddleLabel( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnRightGridDoubleClick( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnSortRightGrid( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnContextRimLabelRight( wxGridEvent& event ) - { - event.Skip(); - } - virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ) - { - event.Skip(); - } - virtual void OnLoadFromHistory( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnConfigureFilter( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnHideFilteredButton( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncCreateLeft( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncDirLeft( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncDeleteLeft( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnLeftOnlyFiles( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnLeftNewerFiles( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnEqualFiles( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnDifferentFiles( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncDirNone( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnRightNewerFiles( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnRightOnlyFiles( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncDeleteRight( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncDirRight( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncCreateRight( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnConflictFiles( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnQuit( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - wxPanel* m_panelTopLeft; - CustomComboBox* m_directoryLeft; - wxDirPickerCtrl* m_dirPickerLeft; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonAltSyncCfg; - wxPanel* m_panelTopRight; - wxBitmapButton* m_bpButtonRemovePair; - CustomComboBox* m_directoryRight; - wxDirPickerCtrl* m_dirPickerRight; - wxPanel* m_panelLeft; - wxPanel* m_panelRight; - MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 933,612 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - ~MainDialogGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class FolderPairGenerated -/////////////////////////////////////////////////////////////////////////////// -class FolderPairGenerated : public wxPanel -{ -private: - -protected: - wxPanel* m_panel20; - - - - -public: - wxPanel* m_panelLeft; - wxTextCtrl* m_directoryLeft; - wxDirPickerCtrl* m_dirPickerLeft; - wxPanel* m_panel21; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonAltSyncCfg; - wxPanel* m_panelRight; - wxBitmapButton* m_bpButtonRemovePair; - wxTextCtrl* m_directoryRight; - wxDirPickerCtrl* m_dirPickerRight; - FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); - ~FolderPairGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class BatchFolderPairGenerated -/////////////////////////////////////////////////////////////////////////////// -class BatchFolderPairGenerated : public wxPanel -{ -private: - -protected: - wxPanel* m_panel32; - wxStaticText* m_staticText53; - wxStaticText* m_staticText541; - wxPanel* m_panelLeft; - wxPanel* m_panelRight; - - -public: - wxBitmapButton* m_bpButtonRemovePair; - wxTextCtrl* m_directoryLeft; - wxDirPickerCtrl* m_dirPickerLeft; - wxBitmapButton* m_bpButtonLocalFilter; - wxTextCtrl* m_directoryRight; - wxDirPickerCtrl* m_dirPickerRight; - wxBitmapButton* m_bpButtonAltSyncCfg; - BatchFolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); - ~BatchFolderPairGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class BatchDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class BatchDlgGenerated : public wxDialog -{ -private: - -protected: - wxBoxSizer* bSizer69; - wxStaticBitmap* m_bitmap27; - wxPanel* m_panel8; - wxStaticText* m_staticText56; - - - wxStaticText* m_staticText44; - wxBitmapButton* m_bpButtonHelp; - - wxStaticLine* m_staticline10; - wxStaticText* m_staticText531; - wxNotebook* m_notebookSettings; - wxPanel* m_panelOverview; - wxBitmapButton* m_bpButtonCmpConfig; - - wxStaticText* m_staticTextCmpVariant; - - wxBitmapButton* m_bpButtonFilter; - - wxStaticText* m_staticTextSyncVariant; - - wxBitmapButton* m_bpButtonSyncConfig; - - wxBoxSizer* sbSizerMainPair; - wxPanel* m_panelMainPair; - wxStaticText* m_staticText532; - wxStaticText* m_staticText5411; - wxBoxSizer* bSizerAddFolderPairs; - - - wxCheckBox* m_checkBoxSilent; - - wxChoice* m_choiceHandleError; - wxPanel* m_panelLogging; - wxStaticText* m_staticText120; - wxTextCtrl* m_textCtrlLogfileDir; - wxDirPickerCtrl* m_dirPickerLogfileDir; - wxButton* m_buttonSave; - wxButton* m_buttonLoad; - wxButton* m_button6; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnHelp( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCmpSettings( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnConfigureFilter( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncSettings( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnAddFolderPair( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCheckSilent( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnChangeErrorHandling( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSaveBatchJob( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnLoadBatchJob( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - wxScrolledWindow* m_scrolledWindow6; - wxBitmapButton* m_bpButtonAddPair; - wxBitmapButton* m_bpButtonRemovePair; - wxPanel* m_panelLeft; - wxTextCtrl* m_directoryLeft; - wxDirPickerCtrl* m_dirPickerLeft; - wxBitmapButton* m_bpButtonLocalFilter; - wxPanel* m_panelRight; - wxTextCtrl* m_directoryRight; - wxDirPickerCtrl* m_dirPickerRight; - wxBitmapButton* m_bpButtonAltSyncCfg; - BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create a batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~BatchDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class CompareStatusGenerated -/////////////////////////////////////////////////////////////////////////////// -class CompareStatusGenerated : public wxPanel -{ -private: - -protected: - wxBoxSizer* bSizer42; - wxBoxSizer* bSizerFilesFound; - wxStaticText* m_staticText321; - wxStaticText* m_staticTextScanned; - wxBoxSizer* bSizerFilesRemaining; - wxStaticText* m_staticText46; - wxStaticText* m_staticTextFilesRemaining; - wxStaticText* m_staticText117; - wxStaticText* m_staticTextDataRemaining; - wxStaticText* m_staticText118; - - wxBoxSizer* sSizerSpeed; - wxStaticText* m_staticText104; - wxStaticText* m_staticTextSpeed; - - wxBoxSizer* sSizerTimeRemaining; - wxStaticText* m_staticTextTimeRemFixed; - wxStaticText* m_staticTextTimeRemaining; - - wxBoxSizer* sSizerTimeElapsed; - wxStaticText* m_staticTextTimeElapsed; - wxStaticText* m_staticText30; - wxTextCtrl* m_textCtrlStatus; - wxGauge* m_gauge2; - -public: - CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); - ~CompareStatusGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class SyncCfgDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class SyncCfgDlgGenerated : public wxDialog -{ -private: - -protected: - wxStaticText* m_staticText1; - wxRadioButton* m_radioBtnAutomatic; - wxButton* m_buttonAutomatic; - wxStaticText* m_staticText81; - wxRadioButton* m_radioBtnMirror; - wxButton* m_buttonOneWay; - wxStaticText* m_staticText8; - wxRadioButton* m_radioBtnUpdate; - wxButton* m_buttonUpdate; - wxStaticText* m_staticText101; - wxRadioButton* m_radioBtnCustom; - - wxStaticText* m_staticText23; - - wxStaticText* m_staticText9; - - wxBoxSizer* bSizer201; - wxStaticBoxSizer* sbSizerErrorHandling; - wxChoice* m_choiceHandleError; - wxChoice* m_choiceHandleDeletion; - wxPanel* m_panelCustomDeletionDir; - wxTextCtrl* m_textCtrlCustomDelFolder; - wxDirPickerCtrl* m_dirPickerCustomDelFolder; - - wxButton* m_buttonOK; - wxButton* m_button16; - - - wxStaticBoxSizer* sbSizerSyncDirections; - wxStaticText* m_staticText21; - wxStaticText* m_staticText31; - wxStaticLine* m_staticline3; - wxStaticBitmap* m_bitmapLeftOnly; - - wxBitmapButton* m_bpButtonLeftOnly; - wxStaticBitmap* m_bitmapRightOnly; - - wxBitmapButton* m_bpButtonRightOnly; - wxStaticBitmap* m_bitmapLeftNewer; - - wxBitmapButton* m_bpButtonLeftNewer; - wxStaticBitmap* m_bitmapRightNewer; - - wxBitmapButton* m_bpButtonRightNewer; - wxStaticBitmap* m_bitmapDifferent; - - wxBitmapButton* m_bpButtonDifferent; - wxStaticBitmap* m_bitmapConflict; - - wxBitmapButton* m_bpButtonConflict; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnSyncAutomatic( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncLeftToRight( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncUpdate( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSyncCustom( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnChangeErrorHandling( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnChangeDeletionHandling( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnApply( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnExLeftSideOnly( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnExRightSideOnly( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnLeftNewer( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnRightNewer( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnDifferent( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnConflict( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~SyncCfgDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class CmpCfgDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class CmpCfgDlgGenerated : public wxDialog -{ -private: - -protected: - wxRadioButton* m_radioBtnSizeDate; - wxStaticBitmap* m_bitmapByTime; - wxButton* m_buttonTimeSize; - wxRadioButton* m_radioBtnContent; - wxStaticBitmap* m_bitmapByContent; - wxButton* m_buttonContent; - wxStaticLine* m_staticline14; - wxBitmapButton* m_bpButtonHelp; - - wxChoice* m_choiceHandleSymlinks; - wxButton* m_button10; - wxButton* m_button6; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnTimeSize( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnContent( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnShowHelp( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnChangeErrorHandling( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnOkay( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~CmpCfgDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class SyncStatusDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class SyncStatusDlgGenerated : public wxFrame -{ -private: - -protected: - - wxAnimationCtrl* m_animationControl1; - wxPanel* m_panel8; - wxStaticText* m_staticText56; - - wxStaticBitmap* m_bitmapStatus; - wxStaticText* m_staticTextStatus; - - wxBoxSizer* bSizer31; - wxBoxSizer* bSizerObjectsRemaining; - wxStaticText* m_staticText25; - wxStaticText* m_staticTextRemainingObj; - wxStaticText* m_staticText96; - wxStaticText* m_staticTextDataRemaining; - wxStaticText* m_staticText97; - wxBoxSizer* bSizerObjectsProcessed; - wxStaticText* m_staticText251; - wxStaticText* m_staticTextProcessedObj; - wxStaticText* m_staticText98; - wxStaticText* m_staticTextDataProcessed; - wxStaticText* m_staticText99; - - wxStaticText* m_staticText55; - wxStaticText* m_staticTextTimeElapsed; - wxTextCtrl* m_textCtrlInfo; - wxBoxSizer* bSizer28; - wxBoxSizer* bSizerSpeed; - wxStaticText* m_staticText108; - wxStaticText* m_staticTextSpeed; - - wxButton* m_buttonOK; - wxButton* m_buttonPause; - wxButton* m_buttonAbort; - - wxBoxSizer* bSizerRemTime; - wxStaticText* m_staticText21; - wxStaticText* m_staticTextTimeRemaining; - - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnIconize( wxIconizeEvent& event ) - { - event.Skip(); - } - virtual void OnOkay( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnPause( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnAbort( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - wxGauge* m_gauge1; - SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 638,376 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - ~SyncStatusDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class HelpDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class HelpDlgGenerated : public wxDialog -{ -private: - -protected: - - wxStaticBitmap* m_bitmap25; - wxPanel* m_panel8; - - wxStaticText* m_staticText56; - - - wxNotebook* m_notebook1; - wxScrolledWindow* m_scrolledWindow1; - wxStaticText* m_staticText59; - wxStaticText* m_staticText60; - wxStaticText* m_staticText61; - wxTreeCtrl* m_treeCtrl1; - wxStaticText* m_staticText63; - wxStaticText* m_staticText75; - wxStaticText* m_staticText76; - wxStaticText* m_staticText77; - wxStaticText* m_staticText79; - wxStaticText* m_staticText80; - wxStaticText* m_staticText78; - wxScrolledWindow* m_scrolledWindow5; - wxStaticText* m_staticText65; - wxStaticText* m_staticText66; - wxTreeCtrl* m_treeCtrl2; - wxStaticText* m_staticText69; - wxStaticText* m_staticText81; - wxStaticText* m_staticText82; - wxStaticText* m_staticText83; - wxStaticText* m_staticText84; - wxButton* m_button8; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnOK( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - HelpDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 579,543 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~HelpDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class AboutDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class AboutDlgGenerated : public wxDialog -{ -private: - -protected: - - wxPanel* m_panel5; - wxStaticBitmap* m_bitmap11; - wxStaticText* m_build; - - wxScrolledWindow* m_scrolledWindowCodeInfo; - wxBoxSizer* bSizerCodeInfo; - wxStaticText* m_staticText72; - wxStaticText* m_staticText73; - wxStaticText* m_staticText74; - wxScrolledWindow* m_scrolledWindowTranslators; - wxBoxSizer* bSizerTranslators; - wxStaticText* m_staticText54; - - wxFlexGridSizer* fgSizerTranslators; - wxStaticLine* m_staticline3; - wxStaticText* m_staticText131; - wxStaticLine* m_staticline12; - wxStaticBitmap* m_bitmap9; - wxHyperlinkCtrl* m_hyperlink1; - - wxHyperlinkCtrl* m_hyperlink6; - wxStaticBitmap* m_bitmap10; - wxHyperlinkCtrl* m_hyperlink2; - - wxAnimationCtrl* m_animationControl1; - wxHyperlinkCtrl* m_hyperlink3; - wxStaticLine* m_staticline2; - - wxStaticBitmap* m_bitmap13; - wxHyperlinkCtrl* m_hyperlink5; - - wxButton* m_buttonOkay; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnOK( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~AboutDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class ErrorDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class ErrorDlgGenerated : public wxDialog -{ -private: - -protected: - - wxStaticBitmap* m_bitmap10; - wxTextCtrl* m_textCtrl8; - wxCheckBox* m_checkBoxIgnoreErrors; - - wxButton* m_buttonIgnore; - wxButton* m_buttonRetry; - wxButton* m_buttonAbort; - - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnIgnore( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnRetry( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnAbort( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 421,228 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~ErrorDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class WarningDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class WarningDlgGenerated : public wxDialog -{ -private: - -protected: - - wxTextCtrl* m_textCtrl8; - wxCheckBox* m_checkBoxDontShowAgain; - - wxButton* m_buttonIgnore; - wxButton* m_buttonSwitch; - wxButton* m_buttonAbort; - - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnIgnore( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnSwitch( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnAbort( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - wxStaticBitmap* m_bitmap10; - WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 421,231 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~WarningDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class QuestionDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class QuestionDlgGenerated : public wxDialog -{ -private: - -protected: - - wxStaticBitmap* m_bitmap10; - wxTextCtrl* m_textCtrl8; - wxCheckBox* m_checkBoxDontAskAgain; - - wxButton* m_buttonYes; - wxButton* m_buttonNo; - wxButton* m_buttonCancel; - - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnYes( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnNo( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 420,198 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~QuestionDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class DeleteDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class DeleteDlgGenerated : public wxDialog -{ -private: - -protected: - - - wxStaticBitmap* m_bitmap12; - wxStaticText* m_staticTextHeader; - - wxCheckBox* m_checkBoxDeleteBothSides; - - wxCheckBox* m_checkBoxUseRecycler; - wxTextCtrl* m_textCtrlMessage; - wxButton* m_buttonOK; - wxButton* m_buttonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnDelOnBothSides( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnUseRecycler( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnOK( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DeleteDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class FilterDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class FilterDlgGenerated : public wxDialog -{ -private: - -protected: - wxStaticBitmap* m_bitmap26; - wxPanel* m_panel8; - wxStaticText* m_staticTexHeader; - - wxStaticText* m_staticText44; - wxBitmapButton* m_bpButtonHelp; - - wxPanel* m_panel13; - wxStaticLine* m_staticline10; - wxStaticText* m_staticText45; - wxStaticText* m_staticText83; - wxStaticText* m_staticText84; - wxStaticText* m_staticText85; - wxStaticText* m_staticText181; - wxStaticText* m_staticText1811; - - wxStaticText* m_staticText15; - wxStaticBitmap* m_bitmap8; - wxTextCtrl* m_textCtrlInclude; - - wxStaticText* m_staticText16; - wxStaticBitmap* m_bitmap9; - wxTextCtrl* m_textCtrlExclude; - - wxButton* m_button9; - - wxButton* m_button10; - wxButton* m_button17; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnHelp( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnDefault( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnApply( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~FilterDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class CustomizeColsDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class CustomizeColsDlgGenerated : public wxDialog -{ -private: - -protected: - wxCheckListBox* m_checkListColumns; - wxBitmapButton* m_bpButton29; - wxBitmapButton* m_bpButton30; - wxButton* m_button9; - - wxButton* m_button28; - wxButton* m_button29; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnMoveUp( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnMoveDown( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnDefault( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnOkay( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Customize columns"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~CustomizeColsDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class GlobalSettingsDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class GlobalSettingsDlgGenerated : public wxDialog -{ -private: - -protected: - wxStaticBitmap* m_bitmapSettings; - - wxPanel* m_panel8; - wxStaticText* m_staticText56; - - wxCheckBox* m_checkBoxIgnoreOneHour; - wxCheckBox* m_checkBoxCopyLocked; - wxStaticLine* m_staticline10; - wxStaticText* m_staticText100; - - wxButtonWithImage* m_buttonResetDialogs; - - - wxGrid* m_gridCustomCommand; - wxBitmapButton* m_bpButtonAddRow; - wxBitmapButton* m_bpButtonRemoveRow; - - wxButton* m_button9; - - wxButton* m_buttonOkay; - wxButton* m_button29; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnResetDialogs( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnAddRow( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnRemoveRow( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnDefault( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnOkay( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~GlobalSettingsDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class SyncPreviewDlgGenerated -/////////////////////////////////////////////////////////////////////////////// -class SyncPreviewDlgGenerated : public wxDialog -{ -private: - -protected: - wxButtonWithImage* m_buttonStartSync; - wxStaticLine* m_staticline16; - wxStaticText* m_staticTextVariant; - wxStaticLine* m_staticline14; - - wxStaticText* m_staticText94; - wxStaticBitmap* m_bitmapCreate; - wxTextCtrl* m_textCtrlCreateL; - wxStaticBitmap* m_bitmapUpdate; - wxTextCtrl* m_textCtrlUpdateL; - wxStaticBitmap* m_bitmapDelete; - wxTextCtrl* m_textCtrlDeleteL; - wxStaticText* m_staticText95; - wxTextCtrl* m_textCtrlCreateR; - wxTextCtrl* m_textCtrlUpdateR; - wxTextCtrl* m_textCtrlDeleteR; - - wxStaticBitmap* m_bitmapData; - - wxTextCtrl* m_textCtrlData; - - wxStaticLine* m_staticline12; - wxCheckBox* m_checkBoxDontShowAgain; - - wxButton* m_button16; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnStartSync( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~SyncPreviewDlgGenerated(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class PopupFrameGenerated1 -/////////////////////////////////////////////////////////////////////////////// -class PopupFrameGenerated1 : public wxFrame -{ -private: - -protected: - -public: - wxStaticBitmap* m_bitmapLeft; - wxStaticText* m_staticTextMain; - PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER ); - ~PopupFrameGenerated1(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class SearchDialogGenerated -/////////////////////////////////////////////////////////////////////////////// -class SearchDialogGenerated : public wxDialog -{ -private: - -protected: - wxStaticText* m_staticText101; - wxTextCtrl* m_textCtrlSearchTxt; - - wxCheckBox* m_checkBoxMatchCase; - wxButton* m_buttonFindNext; - wxButton* m_button29; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnText( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnFindNext( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnCancel( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~SearchDialogGenerated(); - -}; - -#endif //__guiGenerated__ diff --git a/ui/gui_generated.cpp b/ui/gui_generated.cpp new file mode 100644 index 00000000..59257708 --- /dev/null +++ b/ui/gui_generated.cpp @@ -0,0 +1,3782 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "../library/custom_grid.h" +#include "../shared/custom_button.h" +#include "../shared/custom_combo_box.h" +#include "../shared/toggle_button.h" + +#include "gui_generated.h" + +/////////////////////////////////////////////////////////////////////////// + +MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( 640,400 ), wxDefaultSize ); + + m_menubar1 = new wxMenuBar( 0 ); + m_menuFile = new wxMenu(); + m_menuItem10 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("1. &Compare") ) + wxT('\t') + wxT("ALT-C"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItem10 ); + + m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("ALT-S"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItem11 ); + + m_menuFile->AppendSeparator(); + + m_menuItemSwitchView = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&witch view") ) + wxT('\t') + wxT("ALT-W"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemSwitchView ); + + m_menuFile->AppendSeparator(); + + m_menuItemNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&New") ) + wxT('\t') + wxT("CTRL-N"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemNew ); + + m_menuItemSave = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("CTRL-S"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemSave ); + + m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL-L"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemLoad ); + + 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_menuAdvanced = new wxMenu(); + m_menuLanguages = new wxMenu(); + m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages ); + + m_menuAdvanced->AppendSeparator(); + + m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuAdvanced->Append( m_menuItemGlobSett ); + + m_menuItem7 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Create batch job...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuAdvanced->Append( m_menuItem7 ); + + wxMenuItem* m_menuItem5; + m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuAdvanced->Append( m_menuItem5 ); + + m_menubar1->Append( m_menuAdvanced, _("&Advanced") ); + + m_menuHelp = new wxMenu(); + wxMenuItem* m_menuItemReadme; + m_menuItemReadme = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemReadme ); + + m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemCheckVer ); + + 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 ); + + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_panel71 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL ); + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer6->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->Wrap( -1 ); + m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + fgSizer121->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + fgSizer121->Add( 0, 0, 1, 0, 5 ); + + wxBoxSizer* bSizer30; + bSizer30 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonCompare = new wxButtonWithImage( m_panel71, 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->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 ); + + 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->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 ); + + + bSizer6->Add( 0, 0, 1, 0, 5 ); + + wxFlexGridSizer* fgSizer12; + fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer12->SetFlexibleDirection( wxBOTH ); + fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticTextSyncVariant = new wxStaticText( m_panel71, 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->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->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 ); + + + bSizer6->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 ); + + wxBoxSizer* bSizer91; + bSizer91 = new wxBoxSizer( wxHORIZONTAL ); + + m_panelTopLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelTopLeft->SetMinSize( wxSize( 1,1 ) ); + + wxBoxSizer* bSizer92; + bSizer92 = new wxBoxSizer( wxVERTICAL ); + + sbSizer2 = 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 ); + sbSizer2->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new wxDirPickerCtrl( m_panelTopLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLeft->SetToolTip( _("Select a folder") ); + + sbSizer2->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer92->Add( sbSizer2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_panelTopLeft->SetSizer( bSizer92 ); + m_panelTopLeft->Layout(); + bSizer92->Fit( m_panelTopLeft ); + bSizer91->Add( m_panelTopLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelTopMiddle = new wxPanel( this, 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 ); + + wxBoxSizer* bSizer160; + bSizer160 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer160->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer160->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer160->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer160->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer93->Add( bSizer160, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_panelTopMiddle->SetSizer( bSizer93 ); + m_panelTopMiddle->Layout(); + bSizer93->Fit( m_panelTopMiddle ); + bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelTopRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelTopRight->SetMinSize( wxSize( 1,1 ) ); + + wxBoxSizer* bSizer94; + bSizer94 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer77; + bSizer77 = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizer3; + sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panelTopRight, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + + m_bpButtonAddPair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + sbSizer3->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + sbSizer3->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_directoryRight = new CustomComboBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + sbSizer3->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new wxDirPickerCtrl( m_panelTopRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + sbSizer3->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer77->Add( sbSizer3, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + bSizer94->Add( bSizer77, 0, wxEXPAND|wxLEFT, 3 ); + + m_panelTopRight->SetSizer( bSizer94 ); + m_panelTopRight->Layout(); + bSizer94->Fit( m_panelTopRight ); + bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + bSizer1->Add( bSizer91, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_scrolledWindowFolderPairs = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL ); + m_scrolledWindowFolderPairs->SetScrollRate( 5, 5 ); + m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) ); + + bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); + + m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs ); + m_scrolledWindowFolderPairs->Layout(); + bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs ); + bSizer1->Add( m_scrolledWindowFolderPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + bSizerGridHolder = new wxBoxSizer( wxHORIZONTAL ); + + m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + m_gridLeft = new CustomGridLeft( m_panelLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridLeft->CreateGrid( 15, 4 ); + m_gridLeft->EnableEditing( false ); + m_gridLeft->EnableGridLines( true ); + m_gridLeft->EnableDragGridSize( true ); + m_gridLeft->SetMargins( 0, 0 ); + + // Columns + m_gridLeft->EnableDragColMove( false ); + m_gridLeft->EnableDragColSize( true ); + m_gridLeft->SetColLabelSize( 20 ); + m_gridLeft->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + + // Rows + m_gridLeft->EnableDragRowSize( false ); + m_gridLeft->SetRowLabelSize( 38 ); + m_gridLeft->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridLeft->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + m_gridLeft->SetMinSize( wxSize( 1,1 ) ); + + bSizer7->Add( m_gridLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 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 ); + wxBoxSizer* bSizer18; + bSizer18 = new wxBoxSizer( wxVERTICAL ); + + m_gridMiddle = new CustomGridMiddle( m_panelMiddle, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridMiddle->CreateGrid( 15, 1 ); + m_gridMiddle->EnableEditing( false ); + m_gridMiddle->EnableGridLines( true ); + m_gridMiddle->EnableDragGridSize( false ); + m_gridMiddle->SetMargins( 0, 0 ); + + // Columns + m_gridMiddle->SetColSize( 0, 60 ); + m_gridMiddle->EnableDragColMove( false ); + m_gridMiddle->EnableDragColSize( false ); + m_gridMiddle->SetColLabelSize( 20 ); + m_gridMiddle->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Rows + m_gridMiddle->EnableDragRowSize( false ); + m_gridMiddle->SetRowLabelSize( 0 ); + m_gridMiddle->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridMiddle->SetDefaultCellFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Arial") ) ); + m_gridMiddle->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + bSizer18->Add( m_gridMiddle, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_panelMiddle->SetSizer( bSizer18 ); + m_panelMiddle->Layout(); + bSizer18->Fit( m_panelMiddle ); + bSizerGridHolder->Add( m_panelMiddle, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxVERTICAL ); + + m_gridRight = new CustomGridRight( m_panelRight, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridRight->CreateGrid( 15, 4 ); + m_gridRight->EnableEditing( false ); + m_gridRight->EnableGridLines( true ); + m_gridRight->EnableDragGridSize( true ); + m_gridRight->SetMargins( 0, 0 ); + + // Columns + m_gridRight->EnableDragColMove( false ); + m_gridRight->EnableDragColSize( true ); + m_gridRight->SetColLabelSize( 20 ); + m_gridRight->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + + // Rows + m_gridRight->EnableDragRowSize( false ); + m_gridRight->SetRowLabelSize( 38 ); + m_gridRight->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridRight->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + m_gridRight->SetMinSize( wxSize( 1,1 ) ); + + bSizer10->Add( m_gridRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 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_panelBottom = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizer3 = 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 ); + + m_bpButtonSave = new wxBitmapButton( m_panel30, 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 ); + + m_bpButtonLoad = new wxBitmapButton( m_panel30, 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 ); + + 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)") ); + + bSizer139->Add( m_choiceHistory, 0, 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 ); + wxBoxSizer* bSizer140; + bSizer140 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + bSizer140->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + wxBoxSizer* bSizer23; + bSizer23 = new wxBoxSizer( wxVERTICAL ); + + m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") ); + + bSizer23->Add( m_checkBoxHideFilt, 0, wxEXPAND, 5 ); + + bSizer140->Add( bSizer23, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelFilter->SetSizer( bSizer140 ); + m_panelFilter->Layout(); + bSizer140->Fit( m_panelFilter ); + 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 ); + + 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 ); + + + 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 ); + + 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->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->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlCreate->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + 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->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->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlDelete->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + 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 ); + + 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->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->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlUpdate->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + 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->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->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlData->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + 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 ); + + bSizer121->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelSyncPreview->SetSizer( bSizer121 ); + m_panelSyncPreview->Layout(); + bSizer121->Fit( m_panelSyncPreview ); + bSizerBottomRight->Add( m_panelSyncPreview, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton10 = new wxBitmapButton( m_panelBottom, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW ); + m_bpButton10->Hide(); + m_bpButton10->SetToolTip( _("Quit") ); + + m_bpButton10->Hide(); + m_bpButton10->SetToolTip( _("Quit") ); + + bSizerBottomRight->Add( m_bpButton10, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + + bSizer3->Add( bSizerBottomRight, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); + + m_panelBottom->SetSizer( bSizer3 ); + m_panelBottom->Layout(); + bSizer3->Fit( m_panelBottom ); + bSizer1->Add( m_panelBottom, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_panelStatusBar = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer451; + bSizer451 = new wxBoxSizer( wxHORIZONTAL ); + + bSizer451->SetMinSize( wxSize( -1,22 ) ); + wxBoxSizer* bSizer53; + bSizer53 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatusLeft = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeft->Wrap( -1 ); + m_staticTextStatusLeft->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer53->Add( m_staticTextStatusLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer451->Add( bSizer53, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 ); + + + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusMiddle->Wrap( -1 ); + m_staticTextStatusMiddle->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 ); + + wxBoxSizer* bSizer52; + bSizer52 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatusRight = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRight->Wrap( -1 ); + m_staticTextStatusRight->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer52->Add( m_staticTextStatusRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer50; + bSizer50 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer50->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap15 = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); + bSizer50->Add( m_bitmap15, 0, wxALIGN_BOTTOM, 2 ); + + bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + + bSizer451->Add( bSizer52, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelStatusBar->SetSizer( bSizer451 ); + m_panelStatusBar->Layout(); + bSizer451->Fit( m_panelStatusBar ); + bSizer1->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); + this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); + this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); + this->Connect( m_menuItemSwitchView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ) ); + this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); + this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); + this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); + this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); + this->Connect( m_menuItemGlobSett->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); + this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); + this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); + this->Connect( m_menuItemReadme->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); + this->Connect( m_menuItemCheckVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); + this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); + m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); + m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); + m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); + m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this ); + m_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); + m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this ); + m_dirPickerRight->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_gridLeft->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnLeftGridDoubleClick ), NULL, this ); + m_gridLeft->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); + m_gridLeft->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortLeftGrid ), NULL, this ); + m_gridLeft->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelLeft ), NULL, this ); + m_gridMiddle->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddle ), NULL, this ); + m_gridMiddle->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortMiddleGrid ), NULL, this ); + m_gridMiddle->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddleLabel ), NULL, this ); + m_gridRight->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnRightGridDoubleClick ), NULL, this ); + m_gridRight->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); + m_gridRight->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortRightGrid ), NULL, this ); + m_gridRight->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this ); + m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); + m_bpButtonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); + m_choiceHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); + m_choiceHistory->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); + m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); + m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this ); + m_bpButtonSyncCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this ); + m_bpButtonSyncDirOverwLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this ); + m_bpButtonSyncDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), NULL, this ); + m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this ); + m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this ); + m_bpButtonEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this ); + m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this ); + m_bpButtonSyncDirNone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this ); + m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this ); + m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this ); + m_bpButtonSyncDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this ); + m_bpButtonSyncDirOverwRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this ); + m_bpButtonSyncCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); + m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); + m_bpButton10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnQuit ), NULL, this ); +} + +MainDialogGenerated::~MainDialogGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); + m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); + m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); + m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); + m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this ); + m_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); + m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this ); + m_dirPickerRight->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_gridLeft->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnLeftGridDoubleClick ), NULL, this ); + m_gridLeft->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); + m_gridLeft->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortLeftGrid ), NULL, this ); + m_gridLeft->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelLeft ), NULL, this ); + m_gridMiddle->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddle ), NULL, this ); + m_gridMiddle->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortMiddleGrid ), NULL, this ); + m_gridMiddle->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddleLabel ), NULL, this ); + m_gridRight->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnRightGridDoubleClick ), NULL, this ); + m_gridRight->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); + m_gridRight->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortRightGrid ), NULL, this ); + m_gridRight->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this ); + m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); + m_bpButtonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); + m_choiceHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); + m_choiceHistory->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); + m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); + m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this ); + m_bpButtonSyncCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this ); + m_bpButtonSyncDirOverwLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this ); + m_bpButtonSyncDeleteLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), NULL, this ); + m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this ); + m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this ); + m_bpButtonEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this ); + m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this ); + m_bpButtonSyncDirNone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this ); + m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this ); + m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this ); + m_bpButtonSyncDeleteRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this ); + m_bpButtonSyncDirOverwRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this ); + m_bpButtonSyncCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); + m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); + m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnQuit ), NULL, this ); +} + +FolderPairGenerated::FolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* bSizer74; + bSizer74 = new wxBoxSizer( wxHORIZONTAL ); + + m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_dirPickerLeft = new wxDirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLeft->SetToolTip( _("Select a folder") ); + + bSizer134->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panelLeft->SetSizer( bSizer134 ); + m_panelLeft->Layout(); + bSizer134->Fit( m_panelLeft ); + bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + 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 ); + + + bSizer96->Add( 0, 0, 1, wxEXPAND, 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 ); + + + bSizer96->Add( 5, 0, 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 ); + + m_panel20->SetSizer( bSizer95 ); + m_panel20->Layout(); + bSizer95->Fit( m_panel20 ); + bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer135; + bSizer135 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer135->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new wxDirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + bSizer135->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panelRight->SetSizer( bSizer135 ); + m_panelRight->Layout(); + bSizer135->Fit( m_panelRight ); + bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bSizer74 ); + this->Layout(); + bSizer74->Fit( this ); +} + +FolderPairGenerated::~FolderPairGenerated() +{ +} + +BatchFolderPairGenerated::BatchFolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* bSizer142; + bSizer142 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer140; + bSizer140 = new wxBoxSizer( wxHORIZONTAL ); + + m_panel32 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER ); + wxBoxSizer* bSizer147; + bSizer147 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer136; + bSizer136 = new wxBoxSizer( wxVERTICAL ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panel32, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer136->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer147->Add( bSizer136, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer143; + bSizer143 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer145; + bSizer145 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText53 = new wxStaticText( m_panel32, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText53->Wrap( -1 ); + m_staticText53->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer145->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer143->Add( bSizer145, 1, 0, 5 ); + + wxBoxSizer* bSizer146; + bSizer146 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText541 = new wxStaticText( m_panel32, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText541->Wrap( -1 ); + m_staticText541->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer146->Add( m_staticText541, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer143->Add( bSizer146, 1, 0, 5 ); + + bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_panel32->SetSizer( bSizer147 ); + m_panel32->Layout(); + bSizer147->Fit( m_panel32 ); + bSizer140->Add( m_panel32, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer144; + bSizer144 = new wxBoxSizer( wxVERTICAL ); + + m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer114; + bSizer114 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer114->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new wxDirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLeft->SetToolTip( _("Select a folder") ); + + bSizer114->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLocalFilter = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer114->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelLeft->SetSizer( bSizer114 ); + m_panelLeft->Layout(); + bSizer114->Fit( m_panelLeft ); + bSizer144->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer115; + bSizer115 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new wxDirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer115->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelRight->SetSizer( bSizer115 ); + m_panelRight->Layout(); + bSizer115->Fit( m_panelRight ); + bSizer144->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer140->Add( bSizer144, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer142->Add( bSizer140, 0, wxEXPAND, 5 ); + + + bSizer142->Add( 0, 5, 0, 0, 5 ); + + this->SetSizer( bSizer142 ); + this->Layout(); + bSizer142->Fit( this ); +} + +BatchFolderPairGenerated::~BatchFolderPairGenerated() +{ +} + +BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( 400,420 ), wxDefaultSize ); + + wxBoxSizer* bSizer54; + bSizer54 = new wxBoxSizer( wxVERTICAL ); + + bSizer69 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer87; + bSizer87 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap27 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer87->Add( m_bitmap27, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); + + bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer87->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer87->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer69->Add( bSizer87, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer69->Add( 0, 5, 0, 0, 5 ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText44 = new wxStaticText( this, wxID_ANY, _("Assemble a batch file for automated synchronization. To start in batch mode simply pass the name of the file to the FreeFileSync executable: FreeFileSync.exe <batchfile>. This can also be scheduled in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText44->Wrap( 500 ); + bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonHelp->SetToolTip( _("Help") ); + + m_bpButtonHelp->SetToolTip( _("Help") ); + + bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer69->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer69->Add( 0, 5, 0, 0, 5 ); + + m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP, 5 ); + + m_staticText531 = new wxStaticText( this, wxID_ANY, _("Configuration overview:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText531->Wrap( -1 ); + m_staticText531->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Arial Black") ) ); + + bSizer69->Add( m_staticText531, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_notebookSettings = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelOverview = new wxPanel( m_notebookSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer67; + bSizer67 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer120; + bSizer120 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer175; + bSizer175 = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizer241; + sbSizer241 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Compare") ), wxHORIZONTAL ); + + m_bpButtonCmpConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); + m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); + + m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); + + sbSizer241->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL, 3 ); + + + sbSizer241->Add( 10, 0, 0, 0, 5 ); + + m_staticTextCmpVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCmpVariant->Wrap( -1 ); + m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + sbSizer241->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer175->Add( sbSizer241, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer175->Add( 0, 0, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer26; + sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxVERTICAL ); + + m_bpButtonFilter = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + sbSizer26->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 15 ); + + bSizer175->Add( sbSizer26, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer175->Add( 0, 0, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer252; + sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize...") ), wxHORIZONTAL ); + + m_staticTextSyncVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSyncVariant->Wrap( -1 ); + m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + sbSizer252->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer252->Add( 10, 0, 0, 0, 5 ); + + m_bpButtonSyncConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); + m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); + + m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); + + sbSizer252->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL, 3 ); + + bSizer175->Add( sbSizer252, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer120->Add( bSizer175, 0, wxEXPAND, 5 ); + + + bSizer120->Add( 0, 5, 0, 0, 5 ); + + m_scrolledWindow6 = new wxScrolledWindow( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledWindow6->SetScrollRate( 5, 5 ); + wxBoxSizer* bSizer141; + bSizer141 = new wxBoxSizer( wxVERTICAL ); + + sbSizerMainPair = new wxBoxSizer( wxHORIZONTAL ); + + m_panelMainPair = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER ); + wxBoxSizer* bSizer147; + bSizer147 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer1361; + bSizer1361 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonAddPair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + bSizer1361->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer1361->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer147->Add( bSizer1361, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer143; + bSizer143 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer145; + bSizer145 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText532 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText532->Wrap( -1 ); + m_staticText532->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer145->Add( m_staticText532, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer143->Add( bSizer145, 1, 0, 5 ); + + wxBoxSizer* bSizer146; + bSizer146 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText5411 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5411->Wrap( -1 ); + m_staticText5411->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer146->Add( m_staticText5411, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer143->Add( bSizer146, 1, 0, 5 ); + + bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_panelMainPair->SetSizer( bSizer147 ); + m_panelMainPair->Layout(); + bSizer147->Fit( m_panelMainPair ); + sbSizerMainPair->Add( m_panelMainPair, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer158; + bSizer158 = new wxBoxSizer( wxVERTICAL ); + + m_panelLeft = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1141; + bSizer1141 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1141->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new wxDirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLeft->SetToolTip( _("Select a folder") ); + + bSizer1141->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLocalFilter = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer1141->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelLeft->SetSizer( bSizer1141 ); + m_panelLeft->Layout(); + bSizer1141->Fit( m_panelLeft ); + bSizer158->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelRight = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer115; + bSizer115 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new wxDirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer115->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelRight->SetSizer( bSizer115 ); + m_panelRight->Layout(); + bSizer115->Fit( m_panelRight ); + bSizer158->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizerMainPair->Add( bSizer158, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + + bSizer141->Add( sbSizerMainPair, 0, wxEXPAND, 5 ); + + bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); + + bSizer141->Add( bSizerAddFolderPairs, 0, wxEXPAND, 5 ); + + m_scrolledWindow6->SetSizer( bSizer141 ); + m_scrolledWindow6->Layout(); + bSizer141->Fit( m_scrolledWindow6 ); + bSizer120->Add( m_scrolledWindow6, 0, wxEXPAND, 5 ); + + + bSizer120->Add( 0, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxFlexGridSizer* fgSizer15; + fgSizer15 = new wxFlexGridSizer( 1, 2, 10, 10 ); + fgSizer15->SetFlexibleDirection( wxBOTH ); + fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + wxStaticBoxSizer* sbSizer24; + sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Status feedback") ), wxVERTICAL ); + + + sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_checkBoxSilent = new wxCheckBox( m_panelOverview, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxSilent->SetToolTip( _("Run minimized and write status information to a logfile") ); + + sbSizer24->Add( m_checkBoxSilent, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 14 ); + + + sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); + + fgSizer15->Add( sbSizer24, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer25; + sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); + + wxArrayString m_choiceHandleErrorChoices; + m_choiceHandleError = new wxChoice( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); + m_choiceHandleError->SetSelection( 0 ); + sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + fgSizer15->Add( sbSizer25, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer120->Add( fgSizer15, 0, 0, 5 ); + + bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + + m_panelOverview->SetSizer( bSizer67 ); + m_panelOverview->Layout(); + bSizer67->Fit( m_panelOverview ); + m_notebookSettings->AddPage( m_panelOverview, _("Overview"), true ); + m_panelLogging = new wxPanel( m_notebookSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer117; + bSizer117 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer119; + bSizer119 = new wxBoxSizer( wxVERTICAL ); + + m_staticText120 = new wxStaticText( m_panelLogging, wxID_ANY, _("Select logfile directory:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText120->Wrap( -1 ); + bSizer119->Add( m_staticText120, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxStaticBoxSizer* sbSizer251; + sbSizer251 = new wxStaticBoxSizer( new wxStaticBox( m_panelLogging, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + + m_textCtrlLogfileDir = new wxTextCtrl( m_panelLogging, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer251->Add( m_textCtrlLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLogfileDir = new wxDirPickerCtrl( m_panelLogging, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLogfileDir->SetToolTip( _("Select a folder") ); + + sbSizer251->Add( m_dirPickerLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer119->Add( sbSizer251, 1, wxEXPAND, 5 ); + + bSizer117->Add( bSizer119, 0, wxEXPAND|wxALL, 10 ); + + m_panelLogging->SetSizer( bSizer117 ); + m_panelLogging->Layout(); + bSizer117->Fit( m_panelLogging ); + m_notebookSettings->AddPage( m_panelLogging, _("Logging"), false ); + + bSizer69->Add( m_notebookSettings, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer68; + bSizer68 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonSave->SetDefault(); + m_buttonSave->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer68->Add( m_buttonSave, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonLoad = new wxButton( this, wxID_OPEN, _("&Load"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonLoad->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer68->Add( m_buttonLoad, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer68->Add( m_button6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer69->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer54->Add( bSizer69, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); + + this->SetSizer( bSizer54 ); + this->Layout(); + bSizer54->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); + m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this ); + m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this ); + m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this ); + m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this ); + m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this ); + m_checkBoxSilent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), NULL, this ); + m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); + m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); + m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); +} + +BatchDlgGenerated::~BatchDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); + m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this ); + m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this ); + m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this ); + m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this ); + m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this ); + m_checkBoxSilent->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), NULL, this ); + m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); + m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); + m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); +} + +CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* bSizer40; + bSizer40 = new wxBoxSizer( wxVERTICAL ); + + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer157; + bSizer157 = new wxBoxSizer( wxVERTICAL ); + + bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText321 = new wxStaticText( this, wxID_ANY, _("Elements found:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText321->Wrap( -1 ); + m_staticText321->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextScanned->Wrap( -1 ); + m_staticTextScanned->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 ); + + bSizer157->Add( bSizerFilesFound, 0, 0, 5 ); + + bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText46 = new wxStaticText( this, wxID_ANY, _("Elements remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText46->Wrap( -1 ); + m_staticText46->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 ); + + wxBoxSizer* bSizer154; + bSizer154 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFilesRemaining->Wrap( -1 ); + m_staticTextFilesRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText117 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText117->Wrap( -1 ); + m_staticText117->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizer154->Add( m_staticText117, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataRemaining->Wrap( -1 ); + m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText118 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText118->Wrap( -1 ); + m_staticText118->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizer154->Add( m_staticText118, 0, wxALIGN_BOTTOM, 5 ); + + bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 ); + + bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 ); + + bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + sSizerSpeed = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText104->Wrap( -1 ); + m_staticText104->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSpeed->Wrap( -1 ); + m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL ); + + m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeRemFixed->Wrap( -1 ); + m_staticTextTimeRemFixed->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeRemaining->Wrap( -1 ); + m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + sSizerTimeRemaining->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticText* m_staticText37; + m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText37->Wrap( -1 ); + m_staticText37->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer48; + bSizer48 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText30->Wrap( -1 ); + m_staticText30->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer48->Add( m_textCtrlStatus, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer40->Add( bSizer48, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH ); + bSizer40->Add( m_gauge2, 0, wxALL|wxEXPAND, 5 ); + + this->SetSizer( bSizer40 ); + this->Layout(); + bSizer40->Fit( this ); +} + +CompareStatusGenerated::~CompareStatusGenerated() +{ +} + +SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer181; + bSizer181 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer29; + bSizer29 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer7; + sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Select variant:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + m_staticText1->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + sbSizer7->Add( m_staticText1, 0, wxALL, 5 ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 4, 3, 8, 5 ); + fgSizer1->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_radioBtnAutomatic = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnAutomatic->SetValue( true ); + m_radioBtnAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_radioBtnAutomatic, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonAutomatic = new wxButton( this, wxID_ANY, _("<Automatic>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_buttonAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText81 = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText81->Wrap( 300 ); + fgSizer1->Add( m_staticText81, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_radioBtnMirror = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_radioBtnMirror, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonOneWay = new wxButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonOneWay->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8->Wrap( 300 ); + fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_radioBtnUpdate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_radioBtnUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonUpdate = new wxButton( this, wxID_ANY, _("Update ->"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_buttonUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText101 = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText101->Wrap( 300 ); + fgSizer1->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_radioBtnCustom = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + m_radioBtnCustom->Enable( false ); + + fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer65; + bSizer65 = new wxBoxSizer( wxVERTICAL ); + + + bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText23 = new wxStaticText( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE|wxSTATIC_BORDER ); + m_staticText23->Wrap( -1 ); + m_staticText23->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + bSizer65->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); + + fgSizer1->Add( bSizer65, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( 300 ); + fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + sbSizer7->Add( fgSizer1, 0, 0, 5 ); + + bSizer29->Add( sbSizer7, 0, wxEXPAND, 5 ); + + + bSizer29->Add( 0, 5, 1, 0, 5 ); + + bSizer201 = new wxBoxSizer( wxHORIZONTAL ); + + sbSizerErrorHandling = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); + + wxArrayString m_choiceHandleErrorChoices; + m_choiceHandleError = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); + m_choiceHandleError->SetSelection( 0 ); + sbSizerErrorHandling->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer201->Add( sbSizerErrorHandling, 0, wxEXPAND|wxRIGHT, 10 ); + + wxStaticBoxSizer* sbSizer231; + sbSizer231 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Deletion handling") ), wxVERTICAL ); + + wxArrayString m_choiceHandleDeletionChoices; + m_choiceHandleDeletion = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 ); + m_choiceHandleDeletion->SetSelection( 0 ); + sbSizer231->Add( m_choiceHandleDeletion, 0, wxBOTTOM, 5 ); + + m_panelCustomDeletionDir = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1151; + bSizer1151 = new wxBoxSizer( wxHORIZONTAL ); + + m_textCtrlCustomDelFolder = new wxTextCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_textCtrlCustomDelFolder->SetMinSize( wxSize( 200,-1 ) ); + + bSizer1151->Add( m_textCtrlCustomDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerCustomDelFolder = new wxDirPickerCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1151->Add( m_dirPickerCustomDelFolder, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelCustomDeletionDir->SetSizer( bSizer1151 ); + m_panelCustomDeletionDir->Layout(); + bSizer1151->Fit( m_panelCustomDeletionDir ); + sbSizer231->Add( m_panelCustomDeletionDir, 0, 0, 5 ); + + bSizer201->Add( sbSizer231, 0, wxEXPAND, 5 ); + + bSizer29->Add( bSizer201, 0, wxTOP|wxBOTTOM, 5 ); + + + bSizer29->Add( 0, 5, 1, 0, 5 ); + + wxBoxSizer* bSizer291; + bSizer291 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOK->SetDefault(); + m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer291->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer291->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer291->Add( 20, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer29->Add( bSizer291, 0, wxEXPAND, 5 ); + + bSizer181->Add( bSizer29, 0, wxEXPAND, 5 ); + + + bSizer181->Add( 10, 0, 0, 0, 5 ); + + sbSizerSyncDirections = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL ); + + wxGridSizer* gSizer3; + gSizer3 = new wxGridSizer( 1, 2, 0, 5 ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + m_staticText21->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText31->Wrap( -1 ); + m_staticText31->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizerSyncDirections->Add( gSizer3, 0, wxEXPAND, 5 ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + sbSizerSyncDirections->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer121; + bSizer121 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer122; + bSizer122 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapLeftOnly->SetToolTip( _("Files/folders that exist on left side only") ); + + bSizer122->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer122->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer122->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer122, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer123; + bSizer123 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapRightOnly->SetToolTip( _("Files/folders that exist on right side only") ); + + bSizer123->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer123->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer123->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer123, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer124; + bSizer124 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapLeftNewer->SetToolTip( _("Files that exist on both sides, left one is newer") ); + + bSizer124->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer124->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer124->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer124, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer125; + bSizer125 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapRightNewer->SetToolTip( _("Files that exist on both sides, right one is newer") ); + + bSizer125->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer125->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer125->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer125, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer126; + bSizer126 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapDifferent->SetToolTip( _("Files that have different content") ); + + bSizer126->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer126->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer126->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer126, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer127; + bSizer127 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapConflict->SetToolTip( _("Conflicts/files that cannot be categorized") ); + + bSizer127->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer127->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer127->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer127, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer181->Add( sbSizerSyncDirections, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer7->Add( bSizer181, 0, wxALL, 5 ); + + this->SetSizer( bSizer7 ); + this->Layout(); + bSizer7->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) ); + m_radioBtnAutomatic->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); + m_buttonAutomatic->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); + m_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_radioBtnUpdate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); + m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); + m_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this ); + m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this ); + m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); + m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this ); + m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this ); + m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); + m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); + m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); +} + +SyncCfgDlgGenerated::~SyncCfgDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) ); + m_radioBtnAutomatic->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); + m_buttonAutomatic->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); + m_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_radioBtnUpdate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); + m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); + m_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this ); + m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this ); + m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); + m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this ); + m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this ); + m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); + m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); + m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); +} + +CmpCfgDlgGenerated::CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer136; + bSizer136 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer55; + bSizer55 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer6; + sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Compare by...") ), wxHORIZONTAL ); + + wxFlexGridSizer* fgSizer16; + fgSizer16 = new wxFlexGridSizer( 2, 3, 0, 0 ); + fgSizer16->SetFlexibleDirection( wxBOTH ); + fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_radioBtnSizeDate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnSizeDate->SetValue( true ); + m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\nare the same") ); + + fgSizer16->Add( m_radioBtnSizeDate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapByTime = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapByTime->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\nare the same") ); + + fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonTimeSize = new wxButton( this, wxID_ANY, _("File size and date"), wxDefaultPosition, wxSize( -1,42 ), 0 ); + m_buttonTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + m_buttonTimeSize->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\nare the same") ); + + fgSizer16->Add( m_buttonTimeSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); + + m_radioBtnContent = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); + + fgSizer16->Add( m_radioBtnContent, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapByContent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapByContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); + + fgSizer16->Add( m_bitmapByContent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonContent = new wxButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,42 ), 0 ); + m_buttonContent->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + m_buttonContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); + + fgSizer16->Add( m_buttonContent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + sbSizer6->Add( fgSizer16, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + sbSizer6->Add( m_staticline14, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonHelp->SetToolTip( _("Help") ); + + m_bpButtonHelp->SetToolTip( _("Help") ); + + sbSizer6->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 ); + + + bSizer55->Add( 0, 4, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer25; + sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Symbolic Link handling") ), wxVERTICAL ); + + wxArrayString m_choiceHandleSymlinksChoices; + m_choiceHandleSymlinks = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleSymlinksChoices, 0 ); + m_choiceHandleSymlinks->SetSelection( 0 ); + sbSizer25->Add( m_choiceHandleSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer55->Add( sbSizer25, 0, wxEXPAND|wxTOP, 5 ); + + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxHORIZONTAL ); + + m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button10->SetDefault(); + m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer22->Add( m_button10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer55->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer136->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + this->SetSizer( bSizer136 ); + this->Layout(); + bSizer136->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) ); + m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); + m_buttonTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); + m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); + m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); + m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); +} + +CmpCfgDlgGenerated::~CmpCfgDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) ); + m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); + m_buttonTimeSize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); + m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); + m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); + m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); +} + +SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( 470,300 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer27; + bSizer27 = new wxBoxSizer( wxVERTICAL ); + + + bSizer27->Add( 0, 15, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer37; + bSizer37 = new wxBoxSizer( wxHORIZONTAL ); + + m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( 45,45 )); + bSizer37->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Synchronization status"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); + + bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer37->Add( m_panel8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer27->Add( bSizer37, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer42; + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bitmapStatus = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); + bSizer42->Add( m_bitmapStatus, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatus->Wrap( -1 ); + m_staticTextStatus->SetFont( wxFont( 14, 70, 93, 90, false, wxEmptyString ) ); + + bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer27->Add( bSizer42, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer31 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer111; + bSizer111 = new wxBoxSizer( wxVERTICAL ); + + bSizerObjectsRemaining = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText25 = new wxStaticText( this, wxID_ANY, _("Elements remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText25->Wrap( -1 ); + m_staticText25->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerObjectsRemaining->Add( m_staticText25, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextRemainingObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextRemainingObj->Wrap( -1 ); + m_staticTextRemainingObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerObjectsRemaining->Add( m_staticTextRemainingObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticText96 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText96->Wrap( -1 ); + m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsRemaining->Add( m_staticText96, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataRemaining->Wrap( -1 ); + m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsRemaining->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText97 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText97->Wrap( -1 ); + m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsRemaining->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 ); + + bSizer111->Add( bSizerObjectsRemaining, 0, 0, 5 ); + + bSizerObjectsProcessed = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText251 = new wxStaticText( this, wxID_ANY, _("Elements processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText251->Wrap( -1 ); + m_staticText251->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerObjectsProcessed->Add( m_staticText251, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextProcessedObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextProcessedObj->Wrap( -1 ); + m_staticTextProcessedObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerObjectsProcessed->Add( m_staticTextProcessedObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticText98 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText98->Wrap( -1 ); + m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsProcessed->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticTextDataProcessed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataProcessed->Wrap( -1 ); + m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsProcessed->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText99 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText99->Wrap( -1 ); + m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsProcessed->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 ); + + bSizer111->Add( bSizerObjectsProcessed, 0, 0, 5 ); + + bSizer31->Add( bSizer111, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer114; + bSizer114 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText55 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText55->Wrap( -1 ); + m_staticText55->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer114->Add( m_staticText55, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizer114->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer31->Add( bSizer114, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer27->Add( bSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer27->Add( m_textCtrlInfo, 3, wxEXPAND|wxALL, 5 ); + + m_gauge1 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,20 ), wxGA_HORIZONTAL ); + bSizer27->Add( m_gauge1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer28 = new wxBoxSizer( wxHORIZONTAL ); + + bSizerSpeed = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText108 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText108->Wrap( -1 ); + m_staticText108->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerSpeed->Add( m_staticText108, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSpeed->Wrap( -1 ); + m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer28->Add( bSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer28->Add( 0, 0, 1, 0, 5 ); + + m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + m_buttonOK->Enable( false ); + m_buttonOK->Hide(); + + bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + + bSizer28->Add( 0, 0, 1, 0, 5 ); + + bSizerRemTime = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + m_staticText21->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerRemTime->Add( m_staticText21, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeRemaining->Wrap( -1 ); + m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerRemTime->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer28->Add( bSizerRemTime, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer27->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 5 ); + + + bSizer27->Add( 0, 5, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer27 ); + this->Layout(); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); + this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); + m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); +} + +SyncStatusDlgGenerated::~SyncStatusDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); + this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); + m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); +} + +HelpDlgGenerated::HelpDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer20; + bSizer20 = new wxBoxSizer( wxVERTICAL ); + + + bSizer20->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer85; + bSizer85 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap25 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer85->Add( m_bitmap25, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer72->Add( 20, 0, 0, 0, 5 ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); + + bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer72->Add( 20, 0, 0, 0, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer85->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer85->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer20->Add( bSizer85, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_scrolledWindow1 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); + m_scrolledWindow1->SetScrollRate( 5, 5 ); + m_scrolledWindow1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxVERTICAL ); + + m_staticText59 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("Compare by \"File size and date\""), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText59->Wrap( 500 ); + m_staticText59->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + + bSizer70->Add( m_staticText59, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText60 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText60->Wrap( 500 ); + bSizer70->Add( m_staticText60, 0, wxALL, 5 ); + + m_staticText61 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("When the comparison is started with this option set the following decision tree is processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText61->Wrap( 500 ); + bSizer70->Add( m_staticText61, 0, wxALL, 5 ); + + m_treeCtrl1 = new wxTreeCtrl( m_scrolledWindow1, wxID_ANY, wxDefaultPosition, wxSize( -1,175 ), wxTR_DEFAULT_STYLE ); + m_treeCtrl1->SetBackgroundColour( wxColour( 237, 236, 235 ) ); + + bSizer70->Add( m_treeCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_staticText63 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText63->Wrap( 500 ); + bSizer70->Add( m_staticText63, 0, wxALL, 5 ); + + m_staticText75 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText75->Wrap( -1 ); + bSizer70->Add( m_staticText75, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText76 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- left newer"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText76->Wrap( -1 ); + bSizer70->Add( m_staticText76, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText77 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- right newer"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText77->Wrap( -1 ); + bSizer70->Add( m_staticText77, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText79 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText79->Wrap( -1 ); + bSizer70->Add( m_staticText79, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText80 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText80->Wrap( -1 ); + bSizer70->Add( m_staticText80, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText78 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- conflict"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText78->Wrap( -1 ); + bSizer70->Add( m_staticText78, 0, wxRIGHT|wxLEFT, 5 ); + + m_scrolledWindow1->SetSizer( bSizer70 ); + m_scrolledWindow1->Layout(); + bSizer70->Fit( m_scrolledWindow1 ); + m_notebook1->AddPage( m_scrolledWindow1, _("File size and date"), true ); + m_scrolledWindow5 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); + m_scrolledWindow5->SetScrollRate( 5, 5 ); + m_scrolledWindow5->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); + + wxBoxSizer* bSizer74; + bSizer74 = new wxBoxSizer( wxVERTICAL ); + + m_staticText65 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("Compare by \"File content\""), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText65->Wrap( 500 ); + m_staticText65->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + + bSizer74->Add( m_staticText65, 0, wxALL, 5 ); + + m_staticText66 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText66->Wrap( 500 ); + bSizer74->Add( m_staticText66, 0, wxALL, 5 ); + + m_treeCtrl2 = new wxTreeCtrl( m_scrolledWindow5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE ); + m_treeCtrl2->SetBackgroundColour( wxColour( 237, 236, 235 ) ); + m_treeCtrl2->SetMinSize( wxSize( -1,130 ) ); + + bSizer74->Add( m_treeCtrl2, 0, wxALL|wxEXPAND, 5 ); + + m_staticText69 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText69->Wrap( 500 ); + bSizer74->Add( m_staticText69, 0, wxALL, 5 ); + + m_staticText81 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText81->Wrap( -1 ); + bSizer74->Add( m_staticText81, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText82 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- different"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText82->Wrap( -1 ); + bSizer74->Add( m_staticText82, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText83 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83->Wrap( -1 ); + bSizer74->Add( m_staticText83, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText84 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText84->Wrap( -1 ); + bSizer74->Add( m_staticText84, 0, wxRIGHT|wxLEFT, 5 ); + + m_scrolledWindow5->SetSizer( bSizer74 ); + m_scrolledWindow5->Layout(); + bSizer74->Fit( m_scrolledWindow5 ); + m_notebook1->AddPage( m_scrolledWindow5, _("File content"), false ); + + bSizer20->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 ); + + m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_button8->SetDefault(); + m_button8->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer20->Add( m_button8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer20 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); + m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); +} + +HelpDlgGenerated::~HelpDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); + m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); +} + +AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer31; + bSizer31 = new wxBoxSizer( wxVERTICAL ); + + + bSizer31->Add( 0, 5, 0, 0, 5 ); + + m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel5->SetBackgroundColour( wxColour( 255, 255, 255 ) ); + + wxBoxSizer* bSizer36; + bSizer36 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 404,55 ), 0 ); + bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel5->SetSizer( bSizer36 ); + m_panel5->Layout(); + bSizer36->Fit( m_panel5 ); + bSizer31->Add( m_panel5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_build->Wrap( -1 ); + m_build->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + + bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer31->Add( 0, 10, 0, 0, 5 ); + + wxBoxSizer* bSizer53; + bSizer53 = new wxBoxSizer( wxVERTICAL ); + + m_scrolledWindowCodeInfo = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); + m_scrolledWindowCodeInfo->SetScrollRate( 5, 5 ); + m_scrolledWindowCodeInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_scrolledWindowCodeInfo->SetMinSize( wxSize( -1,120 ) ); + + bSizerCodeInfo = new wxBoxSizer( wxVERTICAL ); + + m_staticText72 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _("Source code written completely in C++ utilizing:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText72->Wrap( -1 ); + m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + + bSizerCodeInfo->Add( m_staticText72, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 ); + + m_staticText73 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _(" MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText73->Wrap( -1 ); + bSizerCodeInfo->Add( m_staticText73, 0, wxALL|wxEXPAND, 5 ); + + m_hyperlink21 = new wxHyperlinkCtrl( m_scrolledWindowCodeInfo, wxID_ANY, _("- ZenJu -"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink21->SetFont( wxFont( 10, 74, 93, 92, false, wxT("Segoe Print") ) ); + m_hyperlink21->SetToolTip( _("zhnmju123@gmx.de") ); + + bSizerCodeInfo->Add( m_hyperlink21, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_scrolledWindowCodeInfo->SetSizer( bSizerCodeInfo ); + m_scrolledWindowCodeInfo->Layout(); + bSizerCodeInfo->Fit( m_scrolledWindowCodeInfo ); + bSizer53->Add( m_scrolledWindowCodeInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 10 ); + + m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); + m_scrolledWindowTranslators->SetScrollRate( 5, 5 ); + m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_scrolledWindowTranslators->SetMinSize( wxSize( -1,140 ) ); + m_scrolledWindowTranslators->SetMaxSize( wxSize( -1,145 ) ); + + bSizerTranslators = new wxBoxSizer( wxVERTICAL ); + + m_staticText54 = new wxStaticText( m_scrolledWindowTranslators, wxID_ANY, _("Big thanks for localizing FreeFileSync goes out to:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText54->Wrap( -1 ); + m_staticText54->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizerTranslators->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); + + + bSizerTranslators->Add( 0, 5, 0, 0, 5 ); + + fgSizerTranslators = new wxFlexGridSizer( 50, 3, 5, 20 ); + fgSizerTranslators->SetFlexibleDirection( wxBOTH ); + fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + bSizerTranslators->Add( fgSizerTranslators, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_scrolledWindowTranslators->SetSizer( bSizerTranslators ); + m_scrolledWindowTranslators->Layout(); + bSizerTranslators->Fit( m_scrolledWindowTranslators ); + bSizer53->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 5 ); + + bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 25 ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer31->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_staticText131 = new wxStaticText( this, wxID_ANY, _("Feedback and suggestions are welcome at:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText131->Wrap( -1 ); + m_staticText131->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + bSizer31->Add( m_staticText131, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer31->Add( m_staticline12, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer104; + bSizer104 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer103; + bSizer103 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap9->SetToolTip( _("FreeFileSync at Sourceforge") ); + + bSizer103->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Homepage"), wxT("http://sourceforge.net/projects/freefilesync/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink1->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") ); + + bSizer103->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer103->Add( 20, 0, 1, wxEXPAND, 5 ); + + m_hyperlink6 = new wxHyperlinkCtrl( this, wxID_ANY, _("Report translation error"), wxT("http://sourceforge.net/projects/freefilesync/forums/forum/976976"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink6->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + m_hyperlink6->SetToolTip( _("http://sourceforge.net/projects/freefilesync/forums/forum/976976") ); + + bSizer103->Add( m_hyperlink6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer104->Add( bSizer103, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer108; + bSizer108 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap10->SetToolTip( _("Email") ); + + bSizer108->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, _("Email"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink2->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + m_hyperlink2->SetToolTip( _("zhnmju123@gmx.de") ); + + bSizer108->Add( m_hyperlink2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer108->Add( 30, 0, 1, wxEXPAND, 5 ); + + m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation); + m_animationControl1->SetToolTip( _("Donate with PayPal") ); + + bSizer108->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_hyperlink3 = new wxHyperlinkCtrl( this, wxID_ANY, _("If you like FFS"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink3->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + m_hyperlink3->SetToolTip( _("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8") ); + + bSizer108->Add( m_hyperlink3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer104->Add( bSizer108, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + bSizer31->Add( bSizer104, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer31->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxStaticBoxSizer* sbSizer14; + sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Published under the GNU General Public License:") ), wxHORIZONTAL ); + + + sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 88,31 ), 0 ); + sbSizer14->Add( m_bitmap13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + sbSizer14->Add( m_hyperlink5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer31->Add( sbSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer31->Add( m_buttonOkay, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + this->SetSizer( bSizer31 ); + this->Layout(); + bSizer31->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); +} + +AboutDlgGenerated::~AboutDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); + m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); +} + +ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer26; + bSizer26 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_checkBoxIgnoreErrors = new wxCheckBox( this, wxID_ANY, _("Ignore subsequent errors"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxIgnoreErrors->SetToolTip( _("Hide further error messages during the current process") ); + + bSizer24->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); + + + bSizer24->Add( 0, 5, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonIgnore = new wxButton( this, wxID_OK, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonIgnore->SetDefault(); + m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonRetry->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + + bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); + m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); + m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); +} + +ErrorDlgGenerated::~ErrorDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); + m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); + m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); +} + +WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer26; + bSizer26 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); + + + bSizer24->Add( 0, 5, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonIgnore = new wxButton( this, wxID_IGNORE, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonIgnore->SetDefault(); + m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonSwitch = new wxButton( this, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonSwitch->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonSwitch, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + + bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) ); + m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); + m_buttonSwitch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); +} + +WarningDlgGenerated::~WarningDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) ); + m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); + m_buttonSwitch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); +} + +QuestionDlgGenerated::QuestionDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer26; + bSizer26 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_checkBoxDontAskAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer24->Add( m_checkBoxDontAskAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 10 ); + + + bSizer24->Add( 0, 5, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonYes = new wxButton( this, wxID_YES, _("&Yes"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonYes->SetDefault(); + m_buttonYes->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonYes, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonNo = new wxButton( this, wxID_NO, _("&No"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonNo->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonNo, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonCancel, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + + bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) ); + m_buttonYes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); + m_buttonNo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); +} + +QuestionDlgGenerated::~QuestionDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) ); + m_buttonYes->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); + m_buttonNo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); + m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); +} + +DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer41; + bSizer41 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer41->Add( m_bitmap12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader->Wrap( -1 ); + m_staticTextHeader->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer24->Add( bSizer41, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer99; + bSizer99 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkBoxDeleteBothSides = new wxCheckBox( this, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") ); + + bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer99->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxUseRecycler->SetValue(true); + + bSizer99->Add( m_checkBoxUseRecycler, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); + + m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlMessage->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer24->Add( m_textCtrlMessage, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOK->SetDefault(); + m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); + m_checkBoxDeleteBothSides->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this ); + m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); +} + +DeleteDlgGenerated::~DeleteDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); + m_checkBoxDeleteBothSides->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this ); + m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); + m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); +} + +FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer21; + bSizer21 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer86; + bSizer86 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap26 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer86->Add( m_bitmap26, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticTexHeader = new wxStaticText( m_panel8, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTexHeader->Wrap( -1 ); + m_staticTexHeader->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); + + bSizer72->Add( m_staticTexHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer21->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText44->Wrap( 400 ); + bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonHelp->SetToolTip( _("Help") ); + + m_bpButtonHelp->SetToolTip( _("Help") ); + + bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); + + + bSizer21->Add( 0, 5, 0, 0, 5 ); + + m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer69; + bSizer69 = new wxBoxSizer( wxVERTICAL ); + + m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer52; + bSizer52 = new wxBoxSizer( wxVERTICAL ); + + m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText45->Wrap( -1 ); + m_staticText45->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + + bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 ); + + m_staticText83 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter relative file or directory names separated by ';' or a new line."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83->Wrap( -1 ); + bSizer52->Add( m_staticText83, 0, 0, 5 ); + + m_staticText84 = new wxStaticText( m_panel13, wxID_ANY, _("2. Use wildcard characters '*' and '?'."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText84->Wrap( -1 ); + bSizer52->Add( m_staticText84, 0, 0, 5 ); + + m_staticText85 = new wxStaticText( m_panel13, wxID_ANY, _("3. Exclude files directly on main grid via context menu."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText85->Wrap( -1 ); + bSizer52->Add( m_staticText85, 0, 0, 5 ); + + bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); + + wxStaticBoxSizer* sbSizer21; + sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxVERTICAL ); + + wxBoxSizer* bSizer66; + bSizer66 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\*"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText181->Wrap( -1 ); + bSizer66->Add( m_staticText181, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\"."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1811->Wrap( 250 ); + m_staticText1811->SetFont( wxFont( 8, 70, 93, 90, false, wxEmptyString ) ); + + bSizer66->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + sbSizer21->Add( bSizer66, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_panel13->SetSizer( bSizer69 ); + m_panel13->Layout(); + bSizer69->Fit( m_panel13 ); + bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer8; + sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer3; + fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer3->AddGrowableCol( 1 ); + fgSizer3->AddGrowableRow( 1 ); + fgSizer3->SetFlexibleDirection( wxBOTH ); + fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + m_staticText15->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer3->Add( m_staticText15, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_bitmap8 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + fgSizer3->Add( m_bitmap8, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + fgSizer3->Add( m_textCtrlInclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + sbSizer8->Add( fgSizer3, 1, wxEXPAND, 5 ); + + wxFlexGridSizer* fgSizer4; + fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer4->AddGrowableCol( 1 ); + fgSizer4->AddGrowableRow( 1 ); + fgSizer4->SetFlexibleDirection( wxBOTH ); + fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer4->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + m_staticText16->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer4->Add( m_staticText16, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + fgSizer4->Add( m_bitmap9, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + fgSizer4->Add( m_textCtrlExclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + sbSizer8->Add( fgSizer4, 1, wxEXPAND, 5 ); + + bSizer21->Add( sbSizer8, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + bSizer21->Add( 0, 0, 0, 0, 5 ); + + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxHORIZONTAL ); + + m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer22->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button10->SetDefault(); + m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer22->Add( m_button10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_button17 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button17->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer22->Add( m_button17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer21->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxEXPAND, 5 ); + + this->SetSizer( bSizer21 ); + this->Layout(); + bSizer21->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); + m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); + m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); + m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); + m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); +} + +FilterDlgGenerated::~FilterDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); + m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); + m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); + m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); + m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); +} + +CustomizeColsDlgGenerated::CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer96; + bSizer96 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer99; + bSizer99 = new wxBoxSizer( wxHORIZONTAL ); + + wxArrayString m_checkListColumnsChoices; + m_checkListColumns = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListColumnsChoices, 0 ); + bSizer99->Add( m_checkListColumns, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer98; + bSizer98 = new wxBoxSizer( wxVERTICAL ); + + m_bpButton29 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButton29->SetToolTip( _("Move column up") ); + + m_bpButton29->SetToolTip( _("Move column up") ); + + bSizer98->Add( m_bpButton29, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_bpButton30 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButton30->SetToolTip( _("Move column down") ); + + m_bpButton30->SetToolTip( _("Move column down") ); + + bSizer98->Add( m_bpButton30, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer99->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer96->Add( bSizer99, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer97; + bSizer97 = new wxBoxSizer( wxHORIZONTAL ); + + m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button9, 0, wxALL, 5 ); + + + bSizer97->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_button28 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button28->SetDefault(); + m_button28->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer97->Add( m_button28, 0, wxALL, 5 ); + + m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button29, 0, wxALL, 5 ); + + bSizer96->Add( bSizer97, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + this->SetSizer( bSizer96 ); + this->Layout(); + bSizer96->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) ); + m_bpButton29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this ); + m_bpButton30->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this ); + m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); + m_button28->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); + m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); +} + +CustomizeColsDlgGenerated::~CustomizeColsDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) ); + m_bpButton29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this ); + m_bpButton30->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this ); + m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); + m_button28->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); + m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); +} + +GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( 280,230 ), wxDefaultSize ); + + wxBoxSizer* bSizer95; + bSizer95 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer86; + bSizer86 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer86->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + + bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); + + bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer95->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer95->Add( 0, 10, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer23; + sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + m_checkBoxIgnoreOneHour = new wxCheckBox( this, wxID_ANY, _("Ignore 1-hour file time difference"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxIgnoreOneHour->SetToolTip( _("Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes") ); + + sbSizer23->Add( m_checkBoxIgnoreOneHour, 0, wxALL|wxEXPAND, 5 ); + + m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights)") ); + + sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 ); + + m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy filesystem permissions"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxCopyPermissions->SetToolTip( _("Transfer file and directory permissions\n(Requires Administrator rights)") ); + + sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 ); + + m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + sbSizer23->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer101; + bSizer101 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText100 = new wxStaticText( this, wxID_ANY, _("Hidden dialogs:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText100->Wrap( -1 ); + bSizer101->Add( m_staticText100, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer101->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_buttonResetDialogs = new wxButtonWithImage( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxSize( 80,-1 ), 0 ); + m_buttonResetDialogs->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + m_buttonResetDialogs->SetToolTip( _("Show hidden dialogs") ); + + bSizer101->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer23->Add( bSizer101, 0, wxEXPAND, 5 ); + + bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + bSizer95->Add( 0, 10, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer26; + sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("External applications") ), wxHORIZONTAL ); + + + sbSizer26->Add( 5, 0, 0, 0, 5 ); + + m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridCustomCommand->CreateGrid( 5, 2 ); + m_gridCustomCommand->EnableEditing( true ); + m_gridCustomCommand->EnableGridLines( true ); + m_gridCustomCommand->EnableDragGridSize( false ); + m_gridCustomCommand->SetMargins( 0, 0 ); + + // Columns + m_gridCustomCommand->SetColSize( 0, 129 ); + m_gridCustomCommand->SetColSize( 1, 179 ); + m_gridCustomCommand->EnableDragColMove( false ); + m_gridCustomCommand->EnableDragColSize( true ); + m_gridCustomCommand->SetColLabelSize( 20 ); + m_gridCustomCommand->SetColLabelValue( 0, _("Description") ); + m_gridCustomCommand->SetColLabelValue( 1, _("Command line") ); + m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Rows + m_gridCustomCommand->EnableDragRowSize( false ); + m_gridCustomCommand->SetRowLabelSize( 0 ); + m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); + sbSizer26->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer157; + bSizer157 = new wxBoxSizer( wxVERTICAL ); + + m_bpButtonAddRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + bSizer157->Add( m_bpButtonAddRow, 0, 0, 5 ); + + m_bpButtonRemoveRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + bSizer157->Add( m_bpButtonRemoveRow, 0, 0, 5 ); + + sbSizer26->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + sbSizer26->Add( 5, 0, 0, 0, 5 ); + + bSizer95->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + wxBoxSizer* bSizer97; + bSizer97 = new wxBoxSizer( wxHORIZONTAL ); + + m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button9, 0, wxALL, 5 ); + + + bSizer97->Add( 0, 0, 1, 0, 5 ); + + m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer97->Add( m_buttonOkay, 0, wxALL, 5 ); + + m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button29, 0, wxALL, 5 ); + + bSizer95->Add( bSizer97, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + this->SetSizer( bSizer95 ); + this->Layout(); + bSizer95->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) ); + m_buttonResetDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this ); + m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this ); + m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this ); + m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); + m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); +} + +GlobalSettingsDlgGenerated::~GlobalSettingsDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) ); + m_buttonResetDialogs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this ); + m_bpButtonAddRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this ); + m_bpButtonRemoveRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this ); + m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); + m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); + m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); +} + +SyncPreviewDlgGenerated::SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer158; + bSizer158 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonStartSync = new wxButtonWithImage( this, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 ); + m_buttonStartSync->SetDefault(); + m_buttonStartSync->SetFont( wxFont( 14, 70, 90, 92, false, wxT("Arial Black") ) ); + m_buttonStartSync->SetToolTip( _("Start synchronization") ); + + bSizer158->Add( m_buttonStartSync, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline16 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer158->Add( m_staticline16, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer28; + sbSizer28 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Variant") ), wxVERTICAL ); + + m_staticTextVariant = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextVariant->Wrap( -1 ); + m_staticTextVariant->SetFont( wxFont( 10, 70, 90, 92, false, wxT("Arial Black") ) ); + + sbSizer28->Add( m_staticTextVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer158->Add( sbSizer28, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer134->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline14, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer141; + bSizer141 = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizer161; + sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Statistics") ), wxVERTICAL ); + + wxBoxSizer* bSizer157; + bSizer157 = new wxBoxSizer( wxHORIZONTAL ); + + wxFlexGridSizer* fgSizer5; + fgSizer5 = new wxFlexGridSizer( 4, 2, 0, 5 ); + fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer5->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText94 = new wxStaticText( this, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText94->Wrap( -1 ); + m_staticText94->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer5->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapCreate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlCreateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlCreateL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlCreateL->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlCreateL->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer5->Add( m_textCtrlCreateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapUpdate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlUpdateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlUpdateL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlUpdateL->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlUpdateL->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer5->Add( m_textCtrlUpdateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapDelete = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer5->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlDeleteL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlDeleteL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlDeleteL->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlDeleteL->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer5->Add( m_textCtrlDeleteL, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer157->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + wxFlexGridSizer* fgSizer51; + fgSizer51 = new wxFlexGridSizer( 3, 1, 0, 5 ); + fgSizer51->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText95 = new wxStaticText( this, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText95->Wrap( -1 ); + m_staticText95->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer51->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlCreateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlCreateR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlCreateR->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlCreateR->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer51->Add( m_textCtrlCreateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlUpdateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlUpdateR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlUpdateR->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlUpdateR->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer51->Add( m_textCtrlUpdateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlDeleteR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlDeleteR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlDeleteR->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlDeleteR->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer51->Add( m_textCtrlDeleteR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer157->Add( fgSizer51, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer161->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + sbSizer161->Add( 0, 10, 0, 0, 5 ); + + wxBoxSizer* bSizer156; + bSizer156 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); + + bSizer156->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); + + + bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlData->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + m_textCtrlData->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); + + bSizer156->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); + + sbSizer161->Add( bSizer156, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + bSizer141->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + bSizer134->Add( bSizer141, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline12, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer142; + bSizer142 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer142->Add( m_checkBoxDontShowAgain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer142->Add( 10, 0, 1, 0, 5 ); + + m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer142->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer134->Add( bSizer142, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer134 ); + this->Layout(); + bSizer134->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); + m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); + m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); +} + +SyncPreviewDlgGenerated::~SyncPreviewDlgGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); + m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); + m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); +} + +PopupFrameGenerated1::PopupFrameGenerated1( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxColour( 255, 255, 255 ) ); + + wxBoxSizer* bSizer158; + bSizer158 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer158->Add( m_bitmapLeft, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextMain = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMain->Wrap( 600 ); + bSizer158->Add( m_staticTextMain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bSizer158 ); + this->Layout(); + bSizer158->Fit( this ); +} + +PopupFrameGenerated1::~PopupFrameGenerated1() +{ +} + +SearchDialogGenerated::SearchDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer161; + bSizer161 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer166; + bSizer166 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer162; + bSizer162 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText101 = new wxStaticText( this, wxID_ANY, _("Find what:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText101->Wrap( -1 ); + bSizer162->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlSearchTxt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 220,-1 ), 0 ); + bSizer162->Add( m_textCtrlSearchTxt, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer166->Add( bSizer162, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizer166->Add( 0, 10, 0, 0, 5 ); + + m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer166->Add( m_checkBoxMatchCase, 0, wxALL|wxEXPAND, 5 ); + + bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer97; + bSizer97 = new wxBoxSizer( wxVERTICAL ); + + m_buttonFindNext = new wxButton( this, wxID_OK, _("&Find next"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonFindNext->SetDefault(); + m_buttonFindNext->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer97->Add( m_buttonFindNext, 0, wxALL|wxEXPAND, 5 ); + + m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button29, 0, wxALL|wxEXPAND, 5 ); + + bSizer161->Add( bSizer97, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bSizer161 ); + this->Layout(); + bSizer161->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) ); + m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); + m_buttonFindNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); + m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); +} + +SearchDialogGenerated::~SearchDialogGenerated() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) ); + m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); + m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); + m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); +} diff --git a/ui/gui_generated.h b/ui/gui_generated.h new file mode 100644 index 00000000..96ede3c4 --- /dev/null +++ b/ui/gui_generated.h @@ -0,0 +1,1042 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __gui_generated__ +#define __gui_generated__ + +#include <wx/intl.h> + +class CustomComboBox; +class CustomGridLeft; +class CustomGridMiddle; +class CustomGridRight; +class ToggleButton; +class wxButtonWithImage; + +#include <wx/string.h> +#include <wx/bitmap.h> +#include <wx/image.h> +#include <wx/icon.h> +#include <wx/menu.h> +#include <wx/gdicmn.h> +#include <wx/font.h> +#include <wx/colour.h> +#include <wx/settings.h> +#include <wx/stattext.h> +#include <wx/button.h> +#include <wx/sizer.h> +#include <wx/bmpbuttn.h> +#include <wx/panel.h> +#include <wx/combobox.h> +#include <wx/filepicker.h> +#include <wx/statbox.h> +#include <wx/scrolwin.h> +#include <wx/grid.h> +#include <wx/choice.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/dialog.h> +#include <wx/gauge.h> +#include <wx/radiobut.h> +#include <wx/animate.h> +#include <wx/treectrl.h> +#include <wx/hyperlink.h> +#include <wx/checklst.h> + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class MainDialogGenerated +/////////////////////////////////////////////////////////////////////////////// +class MainDialogGenerated : public wxFrame +{ + private: + + protected: + wxMenuBar* m_menubar1; + wxMenu* m_menuFile; + wxMenuItem* m_menuItem10; + wxMenuItem* m_menuItem11; + wxMenuItem* m_menuItemSwitchView; + wxMenuItem* m_menuItemNew; + wxMenuItem* m_menuItemSave; + wxMenuItem* m_menuItemLoad; + wxMenu* m_menuAdvanced; + wxMenu* m_menuLanguages; + wxMenuItem* m_menuItemGlobSett; + wxMenuItem* m_menuItem7; + wxMenu* m_menuHelp; + wxMenuItem* m_menuItemCheckVer; + wxMenuItem* m_menuItemAbout; + wxBoxSizer* bSizer1; + wxPanel* m_panel71; + wxBoxSizer* bSizer6; + + wxStaticText* m_staticTextCmpVariant; + + wxButtonWithImage* m_buttonCompare; + wxButton* m_buttonAbort; + wxBitmapButton* m_bpButtonCmpConfig; + + + wxStaticText* m_staticTextSyncVariant; + wxBitmapButton* m_bpButtonSyncConfig; + wxButtonWithImage* m_buttonStartSync; + + wxStaticBoxSizer* sbSizer2; + wxPanel* m_panelTopMiddle; + + wxBoxSizer* bSizerMiddle; + wxBitmapButton* m_bpButtonSwapSides; + + + + wxBitmapButton* m_bpButtonAddPair; + wxScrolledWindow* m_scrolledWindowFolderPairs; + wxBoxSizer* bSizerAddFolderPairs; + 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; + wxBitmapButton* m_bpButtonSave; + wxBitmapButton* m_bpButtonLoad; + wxChoice* m_choiceHistory; + wxPanel* m_panelFilter; + wxBitmapButton* m_bpButtonFilter; + wxCheckBox* m_checkBoxHideFilt; + wxPanel* m_panelViewFilter; + + ToggleButton* m_bpButtonSyncCreateLeft; + ToggleButton* m_bpButtonSyncDirOverwLeft; + ToggleButton* m_bpButtonSyncDeleteLeft; + ToggleButton* m_bpButtonLeftOnly; + ToggleButton* m_bpButtonLeftNewer; + ToggleButton* m_bpButtonEqual; + ToggleButton* m_bpButtonDifferent; + ToggleButton* m_bpButtonSyncDirNone; + ToggleButton* m_bpButtonRightNewer; + ToggleButton* m_bpButtonRightOnly; + ToggleButton* m_bpButtonSyncDeleteRight; + ToggleButton* m_bpButtonSyncDirOverwRight; + ToggleButton* m_bpButtonSyncCreateRight; + ToggleButton* m_bpButtonConflict; + + 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; + + wxStaticLine* m_staticline9; + + wxStaticText* m_staticTextStatusMiddle; + + wxStaticLine* m_staticline10; + + wxStaticText* m_staticTextStatusRight; + + wxStaticBitmap* m_bitmap15; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnCompare( wxCommandEvent& event ){ event.Skip(); } + virtual void OnStartSync( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSwitchView( wxCommandEvent& event ){ event.Skip(); } + virtual void OnNewConfig( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSaveConfig( wxCommandEvent& event ){ event.Skip(); } + virtual void OnLoadConfig( wxCommandEvent& event ){ event.Skip(); } + virtual void OnMenuQuit( wxCommandEvent& event ){ event.Skip(); } + virtual void OnMenuGlobalSettings( wxCommandEvent& event ){ event.Skip(); } + virtual void OnMenuBatchJob( wxCommandEvent& event ){ event.Skip(); } + virtual void OnMenuExportFileList( wxCommandEvent& event ){ event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ){ event.Skip(); } + virtual void OnMenuCheckVersion( wxCommandEvent& event ){ event.Skip(); } + virtual void OnMenuAbout( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCmpSettings( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncSettings( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDirSelected( wxFileDirPickerEvent& event ){ event.Skip(); } + virtual void OnSwapSides( wxCommandEvent& event ){ event.Skip(); } + virtual void OnAddFolderPair( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRemoveTopFolderPair( wxCommandEvent& event ){ event.Skip(); } + virtual void OnLeftGridDoubleClick( wxGridEvent& event ){ event.Skip(); } + virtual void OnContextRim( wxGridEvent& event ){ event.Skip(); } + virtual void OnSortLeftGrid( wxGridEvent& event ){ event.Skip(); } + virtual void OnContextRimLabelLeft( wxGridEvent& event ){ event.Skip(); } + virtual void OnContextMiddle( wxGridEvent& event ){ event.Skip(); } + virtual void OnSortMiddleGrid( wxGridEvent& event ){ event.Skip(); } + virtual void OnContextMiddleLabel( wxGridEvent& event ){ event.Skip(); } + virtual void OnRightGridDoubleClick( wxGridEvent& event ){ event.Skip(); } + virtual void OnSortRightGrid( wxGridEvent& event ){ event.Skip(); } + virtual void OnContextRimLabelRight( wxGridEvent& event ){ event.Skip(); } + virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ){ event.Skip(); } + virtual void OnLoadFromHistory( wxCommandEvent& event ){ event.Skip(); } + virtual void OnConfigureFilter( wxCommandEvent& event ){ event.Skip(); } + virtual void OnHideFilteredButton( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncCreateLeft( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncDirLeft( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncDeleteLeft( wxCommandEvent& event ){ event.Skip(); } + virtual void OnLeftOnlyFiles( wxCommandEvent& event ){ event.Skip(); } + virtual void OnLeftNewerFiles( wxCommandEvent& event ){ event.Skip(); } + virtual void OnEqualFiles( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDifferentFiles( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncDirNone( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRightNewerFiles( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRightOnlyFiles( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncDeleteRight( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncDirRight( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncCreateRight( wxCommandEvent& event ){ event.Skip(); } + virtual void OnConflictFiles( wxCommandEvent& event ){ event.Skip(); } + virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); } + + + public: + wxPanel* m_panelTopLeft; + CustomComboBox* m_directoryLeft; + wxDirPickerCtrl* m_dirPickerLeft; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonAltSyncCfg; + wxPanel* m_panelTopRight; + wxBitmapButton* m_bpButtonRemovePair; + CustomComboBox* m_directoryRight; + wxDirPickerCtrl* m_dirPickerRight; + wxPanel* m_panelLeft; + wxPanel* m_panelRight; + MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 933,612 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + ~MainDialogGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class FolderPairGenerated +/////////////////////////////////////////////////////////////////////////////// +class FolderPairGenerated : public wxPanel +{ + private: + + protected: + wxPanel* m_panel20; + + + + + public: + wxPanel* m_panelLeft; + wxTextCtrl* m_directoryLeft; + wxDirPickerCtrl* m_dirPickerLeft; + wxPanel* m_panel21; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonAltSyncCfg; + wxPanel* m_panelRight; + wxBitmapButton* m_bpButtonRemovePair; + wxTextCtrl* m_directoryRight; + wxDirPickerCtrl* m_dirPickerRight; + FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~FolderPairGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class BatchFolderPairGenerated +/////////////////////////////////////////////////////////////////////////////// +class BatchFolderPairGenerated : public wxPanel +{ + private: + + protected: + wxPanel* m_panel32; + wxStaticText* m_staticText53; + wxStaticText* m_staticText541; + wxPanel* m_panelLeft; + wxPanel* m_panelRight; + + + public: + wxBitmapButton* m_bpButtonRemovePair; + wxTextCtrl* m_directoryLeft; + wxDirPickerCtrl* m_dirPickerLeft; + wxBitmapButton* m_bpButtonLocalFilter; + wxTextCtrl* m_directoryRight; + wxDirPickerCtrl* m_dirPickerRight; + wxBitmapButton* m_bpButtonAltSyncCfg; + BatchFolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~BatchFolderPairGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class BatchDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class BatchDlgGenerated : public wxDialog +{ + private: + + protected: + wxBoxSizer* bSizer69; + wxStaticBitmap* m_bitmap27; + wxPanel* m_panel8; + wxStaticText* m_staticText56; + + + wxStaticText* m_staticText44; + wxBitmapButton* m_bpButtonHelp; + + wxStaticLine* m_staticline10; + wxStaticText* m_staticText531; + wxNotebook* m_notebookSettings; + wxPanel* m_panelOverview; + wxBitmapButton* m_bpButtonCmpConfig; + + wxStaticText* m_staticTextCmpVariant; + + wxBitmapButton* m_bpButtonFilter; + + wxStaticText* m_staticTextSyncVariant; + + wxBitmapButton* m_bpButtonSyncConfig; + + wxBoxSizer* sbSizerMainPair; + wxPanel* m_panelMainPair; + wxStaticText* m_staticText532; + wxStaticText* m_staticText5411; + wxBoxSizer* bSizerAddFolderPairs; + + + wxCheckBox* m_checkBoxSilent; + + wxChoice* m_choiceHandleError; + wxPanel* m_panelLogging; + wxStaticText* m_staticText120; + wxTextCtrl* m_textCtrlLogfileDir; + wxDirPickerCtrl* m_dirPickerLogfileDir; + wxButton* m_buttonSave; + wxButton* m_buttonLoad; + wxButton* m_button6; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnHelp( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCmpSettings( wxCommandEvent& event ){ event.Skip(); } + virtual void OnConfigureFilter( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncSettings( wxCommandEvent& event ){ event.Skip(); } + virtual void OnAddFolderPair( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRemoveTopFolderPair( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCheckSilent( wxCommandEvent& event ){ event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSaveBatchJob( wxCommandEvent& event ){ event.Skip(); } + virtual void OnLoadBatchJob( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + wxScrolledWindow* m_scrolledWindow6; + wxBitmapButton* m_bpButtonAddPair; + wxBitmapButton* m_bpButtonRemovePair; + wxPanel* m_panelLeft; + wxTextCtrl* m_directoryLeft; + wxDirPickerCtrl* m_dirPickerLeft; + wxBitmapButton* m_bpButtonLocalFilter; + wxPanel* m_panelRight; + wxTextCtrl* m_directoryRight; + wxDirPickerCtrl* m_dirPickerRight; + wxBitmapButton* m_bpButtonAltSyncCfg; + BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create a batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~BatchDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class CompareStatusGenerated +/////////////////////////////////////////////////////////////////////////////// +class CompareStatusGenerated : public wxPanel +{ + private: + + protected: + wxBoxSizer* bSizer42; + wxBoxSizer* bSizerFilesFound; + wxStaticText* m_staticText321; + wxStaticText* m_staticTextScanned; + wxBoxSizer* bSizerFilesRemaining; + wxStaticText* m_staticText46; + wxStaticText* m_staticTextFilesRemaining; + wxStaticText* m_staticText117; + wxStaticText* m_staticTextDataRemaining; + wxStaticText* m_staticText118; + + wxBoxSizer* sSizerSpeed; + wxStaticText* m_staticText104; + wxStaticText* m_staticTextSpeed; + + wxBoxSizer* sSizerTimeRemaining; + wxStaticText* m_staticTextTimeRemFixed; + wxStaticText* m_staticTextTimeRemaining; + + wxBoxSizer* sSizerTimeElapsed; + wxStaticText* m_staticTextTimeElapsed; + wxStaticText* m_staticText30; + wxTextCtrl* m_textCtrlStatus; + wxGauge* m_gauge2; + + public: + CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~CompareStatusGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class SyncCfgDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class SyncCfgDlgGenerated : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText1; + wxRadioButton* m_radioBtnAutomatic; + wxButton* m_buttonAutomatic; + wxStaticText* m_staticText81; + wxRadioButton* m_radioBtnMirror; + wxButton* m_buttonOneWay; + wxStaticText* m_staticText8; + wxRadioButton* m_radioBtnUpdate; + wxButton* m_buttonUpdate; + wxStaticText* m_staticText101; + wxRadioButton* m_radioBtnCustom; + + wxStaticText* m_staticText23; + + wxStaticText* m_staticText9; + + wxBoxSizer* bSizer201; + wxStaticBoxSizer* sbSizerErrorHandling; + wxChoice* m_choiceHandleError; + wxChoice* m_choiceHandleDeletion; + wxPanel* m_panelCustomDeletionDir; + wxTextCtrl* m_textCtrlCustomDelFolder; + wxDirPickerCtrl* m_dirPickerCustomDelFolder; + + wxButton* m_buttonOK; + wxButton* m_button16; + + + wxStaticBoxSizer* sbSizerSyncDirections; + wxStaticText* m_staticText21; + wxStaticText* m_staticText31; + wxStaticLine* m_staticline3; + wxStaticBitmap* m_bitmapLeftOnly; + + wxBitmapButton* m_bpButtonLeftOnly; + wxStaticBitmap* m_bitmapRightOnly; + + wxBitmapButton* m_bpButtonRightOnly; + wxStaticBitmap* m_bitmapLeftNewer; + + wxBitmapButton* m_bpButtonLeftNewer; + wxStaticBitmap* m_bitmapRightNewer; + + wxBitmapButton* m_bpButtonRightNewer; + wxStaticBitmap* m_bitmapDifferent; + + wxBitmapButton* m_bpButtonDifferent; + wxStaticBitmap* m_bitmapConflict; + + wxBitmapButton* m_bpButtonConflict; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnSyncAutomatic( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncLeftToRight( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncUpdate( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSyncCustom( wxCommandEvent& event ){ event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ){ event.Skip(); } + virtual void OnChangeDeletionHandling( wxCommandEvent& event ){ event.Skip(); } + virtual void OnApply( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + virtual void OnExLeftSideOnly( wxCommandEvent& event ){ event.Skip(); } + virtual void OnExRightSideOnly( wxCommandEvent& event ){ event.Skip(); } + virtual void OnLeftNewer( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRightNewer( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDifferent( wxCommandEvent& event ){ event.Skip(); } + virtual void OnConflict( wxCommandEvent& event ){ event.Skip(); } + + + public: + SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~SyncCfgDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class CmpCfgDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class CmpCfgDlgGenerated : public wxDialog +{ + private: + + protected: + wxRadioButton* m_radioBtnSizeDate; + wxStaticBitmap* m_bitmapByTime; + wxButton* m_buttonTimeSize; + wxRadioButton* m_radioBtnContent; + wxStaticBitmap* m_bitmapByContent; + wxButton* m_buttonContent; + wxStaticLine* m_staticline14; + wxBitmapButton* m_bpButtonHelp; + + wxChoice* m_choiceHandleSymlinks; + wxButton* m_button10; + wxButton* m_button6; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnTimeSize( wxCommandEvent& event ){ event.Skip(); } + virtual void OnContent( wxCommandEvent& event ){ event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ){ event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + ~CmpCfgDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class SyncStatusDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class SyncStatusDlgGenerated : public wxFrame +{ + private: + + protected: + + wxAnimationCtrl* m_animationControl1; + wxPanel* m_panel8; + wxStaticText* m_staticText56; + + wxStaticBitmap* m_bitmapStatus; + wxStaticText* m_staticTextStatus; + + wxBoxSizer* bSizer31; + wxBoxSizer* bSizerObjectsRemaining; + wxStaticText* m_staticText25; + wxStaticText* m_staticTextRemainingObj; + wxStaticText* m_staticText96; + wxStaticText* m_staticTextDataRemaining; + wxStaticText* m_staticText97; + wxBoxSizer* bSizerObjectsProcessed; + wxStaticText* m_staticText251; + wxStaticText* m_staticTextProcessedObj; + wxStaticText* m_staticText98; + wxStaticText* m_staticTextDataProcessed; + wxStaticText* m_staticText99; + + wxStaticText* m_staticText55; + wxStaticText* m_staticTextTimeElapsed; + wxTextCtrl* m_textCtrlInfo; + wxBoxSizer* bSizer28; + wxBoxSizer* bSizerSpeed; + wxStaticText* m_staticText108; + wxStaticText* m_staticTextSpeed; + + wxButton* m_buttonOK; + wxButton* m_buttonPause; + wxButton* m_buttonAbort; + + wxBoxSizer* bSizerRemTime; + wxStaticText* m_staticText21; + wxStaticText* m_staticTextTimeRemaining; + + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnIconize( wxIconizeEvent& event ){ event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } + virtual void OnPause( wxCommandEvent& event ){ event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); } + + + public: + wxGauge* m_gauge1; + SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 638,376 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + ~SyncStatusDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class HelpDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class HelpDlgGenerated : public wxDialog +{ + private: + + protected: + + wxStaticBitmap* m_bitmap25; + wxPanel* m_panel8; + + wxStaticText* m_staticText56; + + + wxNotebook* m_notebook1; + wxScrolledWindow* m_scrolledWindow1; + wxStaticText* m_staticText59; + wxStaticText* m_staticText60; + wxStaticText* m_staticText61; + wxTreeCtrl* m_treeCtrl1; + wxStaticText* m_staticText63; + wxStaticText* m_staticText75; + wxStaticText* m_staticText76; + wxStaticText* m_staticText77; + wxStaticText* m_staticText79; + wxStaticText* m_staticText80; + wxStaticText* m_staticText78; + wxScrolledWindow* m_scrolledWindow5; + wxStaticText* m_staticText65; + wxStaticText* m_staticText66; + wxTreeCtrl* m_treeCtrl2; + wxStaticText* m_staticText69; + wxStaticText* m_staticText81; + wxStaticText* m_staticText82; + wxStaticText* m_staticText83; + wxStaticText* m_staticText84; + wxButton* m_button8; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } + + + public: + HelpDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 579,543 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~HelpDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class AboutDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class AboutDlgGenerated : public wxDialog +{ + private: + + protected: + + wxPanel* m_panel5; + wxStaticBitmap* m_bitmap11; + wxStaticText* m_build; + + wxScrolledWindow* m_scrolledWindowCodeInfo; + wxBoxSizer* bSizerCodeInfo; + wxStaticText* m_staticText72; + wxStaticText* m_staticText73; + wxHyperlinkCtrl* m_hyperlink21; + wxScrolledWindow* m_scrolledWindowTranslators; + wxBoxSizer* bSizerTranslators; + wxStaticText* m_staticText54; + + wxFlexGridSizer* fgSizerTranslators; + wxStaticLine* m_staticline3; + wxStaticText* m_staticText131; + wxStaticLine* m_staticline12; + wxStaticBitmap* m_bitmap9; + wxHyperlinkCtrl* m_hyperlink1; + + wxHyperlinkCtrl* m_hyperlink6; + wxStaticBitmap* m_bitmap10; + wxHyperlinkCtrl* m_hyperlink2; + + wxAnimationCtrl* m_animationControl1; + wxHyperlinkCtrl* m_hyperlink3; + wxStaticLine* m_staticline2; + + wxStaticBitmap* m_bitmap13; + wxHyperlinkCtrl* m_hyperlink5; + + wxButton* m_buttonOkay; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } + + + public: + AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~AboutDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class ErrorDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class ErrorDlgGenerated : public wxDialog +{ + private: + + protected: + + wxStaticBitmap* m_bitmap10; + wxTextCtrl* m_textCtrl8; + wxCheckBox* m_checkBoxIgnoreErrors; + + wxButton* m_buttonIgnore; + wxButton* m_buttonRetry; + wxButton* m_buttonAbort; + + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnIgnore( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRetry( wxCommandEvent& event ){ event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); } + + + public: + ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 421,228 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~ErrorDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class WarningDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class WarningDlgGenerated : public wxDialog +{ + private: + + protected: + + wxTextCtrl* m_textCtrl8; + wxCheckBox* m_checkBoxDontShowAgain; + + wxButton* m_buttonIgnore; + wxButton* m_buttonSwitch; + wxButton* m_buttonAbort; + + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnIgnore( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSwitch( wxCommandEvent& event ){ event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); } + + + public: + wxStaticBitmap* m_bitmap10; + WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 421,231 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~WarningDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class QuestionDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class QuestionDlgGenerated : public wxDialog +{ + private: + + protected: + + wxStaticBitmap* m_bitmap10; + wxTextCtrl* m_textCtrl8; + wxCheckBox* m_checkBoxDontAskAgain; + + wxButton* m_buttonYes; + wxButton* m_buttonNo; + wxButton* m_buttonCancel; + + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnYes( wxCommandEvent& event ){ event.Skip(); } + virtual void OnNo( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 420,198 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~QuestionDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class DeleteDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class DeleteDlgGenerated : public wxDialog +{ + private: + + protected: + + + wxStaticBitmap* m_bitmap12; + wxStaticText* m_staticTextHeader; + + wxCheckBox* m_checkBoxDeleteBothSides; + + wxCheckBox* m_checkBoxUseRecycler; + wxTextCtrl* m_textCtrlMessage; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnDelOnBothSides( wxCommandEvent& event ){ event.Skip(); } + virtual void OnUseRecycler( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DeleteDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class FilterDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class FilterDlgGenerated : public wxDialog +{ + private: + + protected: + wxStaticBitmap* m_bitmap26; + wxPanel* m_panel8; + wxStaticText* m_staticTexHeader; + + wxStaticText* m_staticText44; + wxBitmapButton* m_bpButtonHelp; + + wxPanel* m_panel13; + wxStaticLine* m_staticline10; + wxStaticText* m_staticText45; + wxStaticText* m_staticText83; + wxStaticText* m_staticText84; + wxStaticText* m_staticText85; + wxStaticText* m_staticText181; + wxStaticText* m_staticText1811; + + wxStaticText* m_staticText15; + wxStaticBitmap* m_bitmap8; + wxTextCtrl* m_textCtrlInclude; + + wxStaticText* m_staticText16; + wxStaticBitmap* m_bitmap9; + wxTextCtrl* m_textCtrlExclude; + + wxButton* m_button9; + + wxButton* m_button10; + wxButton* m_button17; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnHelp( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); } + virtual void OnApply( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~FilterDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class CustomizeColsDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class CustomizeColsDlgGenerated : public wxDialog +{ + private: + + protected: + wxCheckListBox* m_checkListColumns; + wxBitmapButton* m_bpButton29; + wxBitmapButton* m_bpButton30; + wxButton* m_button9; + + wxButton* m_button28; + wxButton* m_button29; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnMoveUp( wxCommandEvent& event ){ event.Skip(); } + virtual void OnMoveDown( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Customize columns"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + ~CustomizeColsDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class GlobalSettingsDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class GlobalSettingsDlgGenerated : public wxDialog +{ + private: + + protected: + wxStaticBitmap* m_bitmapSettings; + + wxPanel* m_panel8; + wxStaticText* m_staticText56; + + wxCheckBox* m_checkBoxIgnoreOneHour; + wxCheckBox* m_checkBoxCopyLocked; + wxCheckBox* m_checkBoxCopyPermissions; + wxStaticLine* m_staticline10; + wxStaticText* m_staticText100; + + wxButtonWithImage* m_buttonResetDialogs; + + + wxGrid* m_gridCustomCommand; + wxBitmapButton* m_bpButtonAddRow; + wxBitmapButton* m_bpButtonRemoveRow; + + wxButton* m_button9; + + wxButton* m_buttonOkay; + wxButton* m_button29; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnResetDialogs( wxCommandEvent& event ){ event.Skip(); } + virtual void OnAddRow( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRemoveRow( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~GlobalSettingsDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class SyncPreviewDlgGenerated +/////////////////////////////////////////////////////////////////////////////// +class SyncPreviewDlgGenerated : public wxDialog +{ + private: + + protected: + wxButtonWithImage* m_buttonStartSync; + wxStaticLine* m_staticline16; + wxStaticText* m_staticTextVariant; + wxStaticLine* m_staticline14; + + wxStaticText* m_staticText94; + wxStaticBitmap* m_bitmapCreate; + wxTextCtrl* m_textCtrlCreateL; + wxStaticBitmap* m_bitmapUpdate; + wxTextCtrl* m_textCtrlUpdateL; + wxStaticBitmap* m_bitmapDelete; + wxTextCtrl* m_textCtrlDeleteL; + wxStaticText* m_staticText95; + wxTextCtrl* m_textCtrlCreateR; + wxTextCtrl* m_textCtrlUpdateR; + wxTextCtrl* m_textCtrlDeleteR; + + wxStaticBitmap* m_bitmapData; + + wxTextCtrl* m_textCtrlData; + + wxStaticLine* m_staticline12; + wxCheckBox* m_checkBoxDontShowAgain; + + wxButton* m_button16; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnStartSync( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + ~SyncPreviewDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class PopupFrameGenerated1 +/////////////////////////////////////////////////////////////////////////////// +class PopupFrameGenerated1 : public wxFrame +{ + private: + + protected: + + public: + wxStaticBitmap* m_bitmapLeft; + wxStaticText* m_staticTextMain; + PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER ); + ~PopupFrameGenerated1(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class SearchDialogGenerated +/////////////////////////////////////////////////////////////////////////////// +class SearchDialogGenerated : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText101; + wxTextCtrl* m_textCtrlSearchTxt; + + wxCheckBox* m_checkBoxMatchCase; + wxButton* m_buttonFindNext; + wxButton* m_button29; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnText( wxCommandEvent& event ){ event.Skip(); } + virtual void OnFindNext( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~SearchDialogGenerated(); + +}; + +#endif //__gui_generated__ diff --git a/ui/guiStatusHandler.cpp b/ui/gui_status_handler.cpp index 3d91fbe7..052c18bd 100644 --- a/ui/guiStatusHandler.cpp +++ b/ui/gui_status_handler.cpp @@ -4,17 +4,17 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "guiStatusHandler.h" -#include "smallDialogs.h" -#include "messagePopup.h" -#include "../shared/systemConstants.h" -#include "mainDialog.h" +#include "gui_status_handler.h" +#include "small_dlgs.h" +#include "msg_popup.h" +#include "../shared/system_constants.h" +#include "main_dlg.h" #include <wx/wupdlock.h> -#include "../shared/globalFunctions.h" -#include "../shared/stringConv.h" +#include "../shared/global_func.h" +#include "../shared/string_conv.h" #include "../shared/util.h" -using namespace FreeFileSync; +using namespace ffs3; CompareStatusHandler::CompareStatusHandler(MainDialog* dlg) : @@ -217,7 +217,7 @@ void CompareStatusHandler::OnAbortCompare(wxCommandEvent& event) void CompareStatusHandler::abortThisProcess() { requestAbortion(); - throw FreeFileSync::AbortThisProcess(); + throw ffs3::AbortThisProcess(); } //######################################################################################################## @@ -245,7 +245,7 @@ SyncStatusHandler::~SyncStatusHandler() if (totalErrors > 0) { wxString header(_("Warning: Synchronization failed for %x item(s):")); - header.Replace(wxT("%x"), FreeFileSync::numberToStringSep(totalErrors), false); + header.Replace(wxT("%x"), ffs3::numberToStringSep(totalErrors), false); finalMessage += header + wxT("\n\n"); } @@ -393,5 +393,5 @@ void SyncStatusHandler::forceUiRefresh() void SyncStatusHandler::abortThisProcess() { requestAbortion(); - throw FreeFileSync::AbortThisProcess(); //abort can be triggered by syncStatusFrame + throw ffs3::AbortThisProcess(); //abort can be triggered by syncStatusFrame } diff --git a/ui/guiStatusHandler.h b/ui/gui_status_handler.h index 18bbdc10..d519b142 100644 --- a/ui/guiStatusHandler.h +++ b/ui/gui_status_handler.h @@ -7,10 +7,10 @@ #ifndef GUISTATUSHANDLER_H_INCLUDED #define GUISTATUSHANDLER_H_INCLUDED -#include "../library/statusHandler.h" +#include "../library/status_handler.h" #include <wx/event.h> -#include "../library/errorLogging.h" -#include "progressIndicator.h" +#include "../library/error_log.h" +#include "progress_indicator.h" class SyncStatus; class MainDialog; @@ -66,7 +66,7 @@ private: SyncStatus syncStatusFrame; //the window managed by SyncStatus has longer lifetime than this handler! bool ignoreErrors; - FreeFileSync::ErrorLogging errorLog; + ffs3::ErrorLogging errorLog; }; diff --git a/ui/isNullFilter.h b/ui/is_null_filter.h index f68bc65d..aeb72533 100644 --- a/ui/isNullFilter.h +++ b/ui/is_null_filter.h @@ -10,7 +10,7 @@ #include "../structures.h" #include "../library/filter.h" -namespace FreeFileSync +namespace ffs3 { inline diff --git a/ui/MainDialog.cpp b/ui/main_dlg.cpp index ce7129aa..cc9568fb 100644 --- a/ui/MainDialog.cpp +++ b/ui/main_dlg.cpp @@ -4,55 +4,56 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "mainDialog.h" +#include "main_dlg.h" #include <wx/filename.h> #include <stdexcept> -#include "../shared/systemConstants.h" +#include "../shared/system_constants.h" #include <wx/clipbrd.h> #include <wx/dataobj.h> #include <iterator> #include <wx/ffile.h> -#include "../library/customGrid.h" -#include "../shared/customButton.h" -#include "../shared/customComboBox.h" +#include "../library/custom_grid.h" +#include "../shared/custom_button.h" +#include "../shared/custom_combo_box.h" #include <wx/msgdlg.h> #include "../comparison.h" #include "../synchronization.h" #include "../algorithm.h" -#include "../shared/appMain.h" +#include "../shared/app_main.h" #include "../shared/util.h" -#include "checkVersion.h" -#include "guiStatusHandler.h" -#include "syncConfig.h" +#include "check_version.h" +#include "gui_status_handler.h" +#include "sync_cfg.h" #include "../shared/localization.h" -#include "../shared/stringConv.h" -#include "smallDialogs.h" -#include "mouseMoveWindow.h" -#include "progressIndicator.h" -#include "messagePopup.h" -#include "../shared/dragAndDrop.h" +#include "../shared/string_conv.h" +#include "small_dlgs.h" +#include "mouse_move_dlg.h" +#include "progress_indicator.h" +#include "msg_popup.h" +#include "../shared/drag_n_drop.h" #include "../library/filter.h" #include "../structures.h" #include <wx/imaglist.h> #include <wx/wupdlock.h> -#include "gridView.h" +#include "grid_view.h" #include "../library/resources.h" -#include "../shared/fileHandling.h" +#include "../shared/file_handling.h" #include "../shared/recycler.h" -#include "../shared/xmlBase.h" -#include "../shared/standardPaths.h" -#include "../shared/toggleButton.h" -#include "folderPair.h" -#include "../shared/globalFunctions.h" +#include "../shared/xml_base.h" +#include "../shared/standard_paths.h" +#include "../shared/toggle_button.h" +#include "folder_pair.h" +#include "../shared/global_func.h" #include <wx/sound.h> #include "search.h" -#include "../shared/helpProvider.h" -#include "isNullFilter.h" -#include "batchConfig.h" -#include "../shared/checkExist.h" +#include "../shared/help_provider.h" +#include "is_null_filter.h" +#include "batch_config.h" +#include "../shared/check_exist.h" +#include <wx/display.h> -using namespace FreeFileSync; -using FreeFileSync::CustomLocale; +using namespace ffs3; +using ffs3::CustomLocale; class MainFolderDragDrop : public DragDropOnMainDlg @@ -67,25 +68,57 @@ public: DragDropOnMainDlg(dropWindow1, dropWindow2, dirPicker, dirName), mainDlg_(mainDlg) {} - virtual bool AcceptDrop(const wxString& dropName) + virtual bool AcceptDrop(const std::vector<wxString>& droppedFiles) { - const xmlAccess::XmlType fileType = xmlAccess::getXmlType(dropName); + if (droppedFiles.empty()) + return true; - //test if ffs config file has been dropped - if (fileType == xmlAccess::XML_GUI_CONFIG) + switch (xmlAccess::getMergeType(droppedFiles)) //throw () { - mainDlg_.loadConfiguration(dropName); - return false; - } - //...or a ffs batch file - else if (fileType == xmlAccess::XML_BATCH_CONFIG) - { - BatchDialog* batchDlg = new BatchDialog(&mainDlg_, dropName); - if (batchDlg->ShowModal() == BatchDialog::BATCH_FILE_SAVED) - mainDlg_.pushStatusInformation(_("Batch file created successfully!")); - return false; + case xmlAccess::MERGE_BATCH: + if (droppedFiles.size() == 1) + { + BatchDialog* batchDlg = new BatchDialog(&mainDlg_, droppedFiles[0]); + if (batchDlg->ShowModal() == BatchDialog::BATCH_FILE_SAVED) + mainDlg_.pushStatusInformation(_("Batch file created successfully!")); + return false; + } + //fall-through for multiple *.ffs_batch files! + + case xmlAccess::MERGE_GUI: + case xmlAccess::MERGE_GUI_BATCH: + if (droppedFiles.size() == 1) + { + mainDlg_.loadConfiguration(droppedFiles[0]); + return false; + } + else + { + xmlAccess::XmlGuiConfig guiCfg; + try + { + convertConfig(droppedFiles, guiCfg); //throw (xmlAccess::XmlError) + } + catch (const xmlAccess::XmlError& error) + { + if (error.getSeverity() == xmlAccess::XmlError::WARNING) + wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); + else + { + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); + return false; + } + } + mainDlg_.setCurrentConfiguration(guiCfg); + return false; + } + + case xmlAccess::MERGE_OTHER: + //=> return true: change directory selection via drag and drop + break; } + //disable the sync button mainDlg_.syncPreview->enableSynchronization(false); @@ -249,8 +282,8 @@ struct DirNotFound { bool operator()(const FolderPairEnh& fp) const { - return !dirExists(FreeFileSync::getFormattedDirectoryName(fp.leftDirectory)) || - !dirExists(FreeFileSync::getFormattedDirectoryName(fp.rightDirectory)); + return !dirExists(ffs3::getFormattedDirectoryName(fp.leftDirectory)) || + !dirExists(ffs3::getFormattedDirectoryName(fp.rightDirectory)); } }; @@ -261,7 +294,7 @@ MainDialog::MainDialog(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings { xmlAccess::XmlGuiConfig guiCfg; //structure to receive gui settings, already defaulted!! - const wxString actualConfigFile = cfgFileName.empty() ? lastConfigFileName() : cfgFileName; + const wxString currentConfigFile = cfgFileName.empty() ? lastConfigFileName() : cfgFileName; bool loadCfgSuccess = false; if (!cfgFileName.empty() || fileExists(wxToZ(lastConfigFileName()))) @@ -269,15 +302,19 @@ MainDialog::MainDialog(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings //load XML try { - xmlAccess::readGuiOrBatchConfig(actualConfigFile, guiCfg); //allow reading batch configurations also + std::vector<wxString> filenames; + filenames.push_back(currentConfigFile); + + xmlAccess::convertConfig(filenames, guiCfg); //throw (xmlAccess::XmlError) + loadCfgSuccess = true; } catch (const xmlAccess::XmlError& error) { if (error.getSeverity() == xmlAccess::XmlError::WARNING) - wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING); + wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); else - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); } } @@ -285,7 +322,7 @@ MainDialog::MainDialog(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings settings, !cfgFileName.empty() && loadCfgSuccess); - setLastUsedConfig(actualConfigFile, loadCfgSuccess ? guiCfg : xmlAccess::XmlGuiConfig()); //simulate changed config on parsing errors + setLastUsedConfig(currentConfigFile, loadCfgSuccess ? guiCfg : xmlAccess::XmlGuiConfig()); //simulate changed config on parsing errors } @@ -330,7 +367,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, //------------------------------------------------------------------------------------------------------ globalSettings = &settings; - gridDataView.reset(new FreeFileSync::GridView); + 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)); @@ -351,7 +388,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, //notify about (logical) application main window => program won't quit, but stay on this dialog - FreeFileSync::AppMainWindow::setMainWindow(this); + ffs3::AppMainWindow::setMainWindow(this); //init handling of first folder pair firstFolderPair.reset(new FirstFolderPairCfg(*this)); @@ -402,7 +439,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, #endif #ifdef FFS_LINUX - if (!FreeFileSync::isPortableVersion()) //disable update check for Linux installer-based version -> handled by .deb + if (!ffs3::isPortableVersion()) //disable update check for Linux installer-based version -> handled by .deb m_menuItemCheckVer->Enable(false); #endif @@ -471,14 +508,14 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, //some convenience: if FFS is started with a *.ffs_gui file as commandline parameter AND all directories contained exist, comparison shall be started right off if (startComparison) { - const FreeFileSync::MainConfiguration currMainCfg = getCurrentConfiguration().mainCfg; + const ffs3::MainConfiguration currMainCfg = getCurrentConfiguration().mainCfg; const bool allFoldersExist = !DirNotFound()(currMainCfg.firstPair) && std::find_if(currMainCfg.additionalPairs.begin(), currMainCfg.additionalPairs.end(), DirNotFound()) == currMainCfg.additionalPairs.end(); if (allFoldersExist) { wxCommandEvent dummy2(wxEVT_COMMAND_BUTTON_CLICKED); - m_buttonCompare->AddPendingEvent(dummy2); //simulate button click on "compare" + m_buttonCompare->GetEventHandler()->AddPendingEvent(dummy2); //simulate button click on "compare" } } //---------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -517,13 +554,15 @@ void MainDialog::readGlobalSettings() if ( widthNotMaximized != wxDefaultCoord && heightNotMaximized != wxDefaultCoord && posXNotMaximized != wxDefaultCoord && - posYNotMaximized != wxDefaultCoord) + posYNotMaximized != wxDefaultCoord && + wxDisplay::GetFromPoint(wxPoint(posXNotMaximized, posYNotMaximized)) != wxNOT_FOUND) //make sure upper left corner is in visible view SetSize(posXNotMaximized, posYNotMaximized, widthNotMaximized, heightNotMaximized); else Centre(); Maximize(globalSettings->gui.isMaximized); + //set column attributes m_gridLeft->setColumnAttributes(globalSettings->gui.columnAttribLeft); m_gridRight->setColumnAttributes(globalSettings->gui.columnAttribRight); @@ -585,7 +624,7 @@ void MainDialog::writeGlobalSettings() } -void MainDialog::setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const FreeFileSync::SyncDirection dir) +void MainDialog::setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const ffs3::SyncDirection dir) { if (rowsToSetOnUiTable.size() > 0) { @@ -595,7 +634,7 @@ void MainDialog::setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, if (fsObj) { setSyncDirectionRec(dir, *fsObj); //set new direction (recursively) - FreeFileSync::setActiveStatus(true, *fsObj); //works recursively for directories + ffs3::setActiveStatus(true, *fsObj); //works recursively for directories } } @@ -623,7 +662,7 @@ void MainDialog::filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTab gridDataView->getAllFileRef(rowsToFilterOnUiTable, compRef); //everything in compRef is bound for (std::vector<FileSystemObject*>::iterator i = compRef.begin(); i != compRef.end(); ++i) - FreeFileSync::setActiveStatus(newSelection, **i); //works recursively for directories + ffs3::setActiveStatus(newSelection, **i); //works recursively for directories refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts } @@ -734,7 +773,7 @@ public: virtual Response reportError(const wxString& errorMessage) { if (abortRequested) - throw FreeFileSync::AbortThisProcess(); + throw ffs3::AbortThisProcess(); if (ignoreErrors) return DeleteFilesHandler::IGNORE_ERROR; @@ -753,7 +792,7 @@ public: case ErrorDlg::BUTTON_RETRY: return DeleteFilesHandler::RETRY; case ErrorDlg::BUTTON_ABORT: - throw FreeFileSync::AbortThisProcess(); + throw ffs3::AbortThisProcess(); } assert (false); @@ -767,8 +806,8 @@ public: if (updateUiIsAllowed()) //test if specific time span between ui updates is over { wxString statusMessage = _("%x / %y objects deleted successfully"); - statusMessage.Replace(wxT("%x"), FreeFileSync::numberToStringSep(deletionCount), false); - statusMessage.Replace(wxT("%y"), FreeFileSync::numberToStringSep(totalObjToDelete), false); + statusMessage.Replace(wxT("%x"), ffs3::numberToStringSep(deletionCount), false); + statusMessage.Replace(wxT("%y"), ffs3::numberToStringSep(totalObjToDelete), false); mainDlg->m_staticTextStatusMiddle->SetLabel(statusMessage); mainDlg->m_panelStatusBar->Layout(); @@ -777,13 +816,13 @@ public: } if (abortRequested) //test after (implicit) call to wxApp::Yield() - throw FreeFileSync::AbortThisProcess(); + throw ffs3::AbortThisProcess(); } private: void OnAbortCompare(wxCommandEvent& event) //handle abort button click { - abortRequested = true; //don't throw exceptions in a GUI-Callback!!! (throw FreeFileSync::AbortThisProcess()) + abortRequested = true; //don't throw exceptions in a GUI-Callback!!! (throw ffs3::AbortThisProcess()) } MainDialog* const mainDlg; @@ -813,13 +852,13 @@ void MainDialog::deleteSelectedFiles() int totalDeleteCount = 0; - if (FreeFileSync::showDeleteDialog(compRefLeft, - compRefRight, - globalSettings->gui.deleteOnBothSides, - globalSettings->gui.useRecyclerForManualDeletion, - totalDeleteCount) == DefaultReturnCode::BUTTON_OKAY) + if (ffs3::showDeleteDialog(compRefLeft, + compRefRight, + globalSettings->gui.deleteOnBothSides, + globalSettings->gui.useRecyclerForManualDeletion, + totalDeleteCount) == DefaultReturnCode::BUTTON_OKAY) { - if (globalSettings->gui.useRecyclerForManualDeletion && !FreeFileSync::recycleBinExists()) + if (globalSettings->gui.useRecyclerForManualDeletion && !ffs3::recycleBinExists()) { wxMessageBox(_("Recycle Bin not yet supported for this system!")); return; @@ -830,15 +869,15 @@ void MainDialog::deleteSelectedFiles() //handle errors when deleting files/folders ManualDeletionHandler statusHandler(this, totalDeleteCount); - FreeFileSync::deleteFromGridAndHD(gridDataView->getDataTentative(), - compRefLeft, - compRefRight, - globalSettings->gui.deleteOnBothSides, - globalSettings->gui.useRecyclerForManualDeletion, - getCurrentConfiguration().mainCfg, - &statusHandler); + ffs3::deleteFromGridAndHD(gridDataView->getDataTentative(), + compRefLeft, + compRefRight, + globalSettings->gui.deleteOnBothSides, + globalSettings->gui.useRecyclerForManualDeletion, + getCurrentConfiguration().mainCfg, + &statusHandler); } - catch (FreeFileSync::AbortThisProcess&) {} + catch (ffs3::AbortThisProcess&) {} //remove rows that empty: just a beautification, invalid rows shouldn't cause issues gridDataView->removeInvalidRows(); @@ -865,12 +904,12 @@ void exstractNames(const FileSystemObject& fsObj, wxString& name, wxString& dir) virtual void visit(const FileMapping& fileObj) { name_ = zToWx(fileObj.getFullName<side>()); - dir_ = zToWx(fileObj.getFullName<side>().BeforeLast(globalFunctions::FILE_NAME_SEPARATOR)); + dir_ = zToWx(fileObj.getFullName<side>().BeforeLast(common::FILE_NAME_SEPARATOR)); } virtual void visit(const SymLinkMapping& linkObj) { name_ = zToWx(linkObj.getFullName<side>()); - dir_ = zToWx(linkObj.getFullName<side>().BeforeLast(globalFunctions::FILE_NAME_SEPARATOR)); + dir_ = zToWx(linkObj.getFullName<side>().BeforeLast(common::FILE_NAME_SEPARATOR)); } virtual void visit(const DirMapping& dirObj) { @@ -930,8 +969,8 @@ void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const else { //fallback - dir = zToWx(FreeFileSync::getFormattedDirectoryName(firstFolderPair->getLeftDir())); - dirCo = zToWx(FreeFileSync::getFormattedDirectoryName(firstFolderPair->getRightDir())); + dir = zToWx(ffs3::getFormattedDirectoryName(firstFolderPair->getLeftDir())); + dirCo = zToWx(ffs3::getFormattedDirectoryName(firstFolderPair->getRightDir())); if (!leftSide) std::swap(dir, dirCo); @@ -1061,10 +1100,10 @@ void MainDialog::OnResize(wxSizeEvent& event) GetSize(&width, &height); GetPosition(&x, &y); - if (width > 0 && height > 0 && x >= 0 && y >= 0) //test ALL parameters at once, since width/height are invalid if + if (width > 0 && height > 0 && x >= -200 && y >= -200) //test ALL parameters at once, since width/height are invalid if { //the window is minimized (eg x,y == -32000; height = 28, width = 160) - widthNotMaximized = width; + widthNotMaximized = width; //however visible(!) x < 0 and y < 0 are possible with dual monitors heightNotMaximized = height; posXNotMaximized = x; @@ -1108,7 +1147,7 @@ void MainDialog::onGridLeftButtonEvent(wxKeyEvent& event) break; case 'F': //CTRL + F - FreeFileSync::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); + ffs3::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); break; case WXK_NUMPAD_ADD: //CTRL + '+' @@ -1167,7 +1206,7 @@ void MainDialog::onGridLeftButtonEvent(wxKeyEvent& event) case WXK_F3: //F3 case WXK_NUMPAD_F3: // - FreeFileSync::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); + ffs3::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); break; } @@ -1206,7 +1245,7 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event) break; case 'F': //CTRL + F - FreeFileSync::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); + ffs3::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); break; case WXK_NUMPAD_ADD: //CTRL + '+' @@ -1265,7 +1304,7 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event) case WXK_F3: //F3 case WXK_NUMPAD_F3: // - FreeFileSync::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); + ffs3::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); break; } @@ -1437,7 +1476,7 @@ void MainDialog::OnContextRim(wxGridEvent& event) //CONTEXT_EXCLUDE_EXT if (exFilterCandidateObj.size() > 0 && !exFilterCandidateObj[0].isDir) { - const Zstring filename = exFilterCandidateObj[0].relativeName.AfterLast(globalFunctions::FILE_NAME_SEPARATOR); + const Zstring filename = exFilterCandidateObj[0].relativeName.AfterLast(common::FILE_NAME_SEPARATOR); if (filename.Find(wxChar('.'), false) != Zstring::npos) //be careful: AfterLast would return the whole string if '.' were not found! { const Zstring extension = filename.AfterLast(DefaultChar('.')); @@ -1460,7 +1499,7 @@ void MainDialog::OnContextRim(wxGridEvent& event) //CONTEXT_EXCLUDE_OBJ 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(globalFunctions::FILE_NAME_SEPARATOR))); + menuItemExclObj = new wxMenuItem(contextMenu.get(), CONTEXT_EXCLUDE_OBJ, 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>")); @@ -1596,9 +1635,9 @@ void MainDialog::OnContextExcludeObject(wxCommandEvent& event) if (i != objCont->selectedObjects.begin()) newExclude += DefaultStr("\n"); - newExclude += globalFunctions::FILE_NAME_SEPARATOR + i->relativeName; + newExclude += common::FILE_NAME_SEPARATOR + i->relativeName; if (i->isDir) - newExclude += globalFunctions::FILE_NAME_SEPARATOR; + newExclude += common::FILE_NAME_SEPARATOR; } //add to filter config @@ -1662,7 +1701,7 @@ void MainDialog::OnContextSyncDirLeft(wxCommandEvent& event) { //merge selections from left and right grid const std::set<size_t> selection = getSelectedRows(); - setSyncDirManually(selection, FreeFileSync::SYNC_DIR_LEFT); + setSyncDirManually(selection, ffs3::SYNC_DIR_LEFT); } @@ -1670,7 +1709,7 @@ void MainDialog::OnContextSyncDirNone(wxCommandEvent& event) { //merge selections from left and right grid const std::set<size_t> selection = getSelectedRows(); - setSyncDirManually(selection, FreeFileSync::SYNC_DIR_NONE); + setSyncDirManually(selection, ffs3::SYNC_DIR_NONE); } @@ -1678,7 +1717,7 @@ void MainDialog::OnContextSyncDirRight(wxCommandEvent& event) { //merge selections from left and right grid const std::set<size_t> selection = getSelectedRows(); - setSyncDirManually(selection, FreeFileSync::SYNC_DIR_RIGHT); + setSyncDirManually(selection, ffs3::SYNC_DIR_RIGHT); } @@ -1722,7 +1761,7 @@ void MainDialog::OnContextCustColumnLeft(wxCommandEvent& event) { xmlAccess::ColumnAttributes colAttr = m_gridLeft->getColumnAttributes(); - if (FreeFileSync::showCustomizeColsDlg(colAttr) == DefaultReturnCode::BUTTON_OKAY) + if (ffs3::showCustomizeColsDlg(colAttr) == DefaultReturnCode::BUTTON_OKAY) { m_gridLeft->setColumnAttributes(colAttr); @@ -1737,7 +1776,7 @@ void MainDialog::OnContextCustColumnRight(wxCommandEvent& event) { xmlAccess::ColumnAttributes colAttr = m_gridRight->getColumnAttributes(); - if (FreeFileSync::showCustomizeColsDlg(colAttr) == DefaultReturnCode::BUTTON_OKAY) + if (ffs3::showCustomizeColsDlg(colAttr) == DefaultReturnCode::BUTTON_OKAY) { m_gridRight->setColumnAttributes(colAttr); @@ -1806,14 +1845,14 @@ void MainDialog::OnContextMiddleLabel(wxGridEvent& event) void MainDialog::OnContextIncludeAll(wxCommandEvent& event) { - FreeFileSync::setActiveStatus(true, gridDataView->getDataTentative()); + ffs3::setActiveStatus(true, gridDataView->getDataTentative()); refreshGridAfterFilterChange(0); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts break; } void MainDialog::OnContextExcludeAll(wxCommandEvent& event) { - FreeFileSync::setActiveStatus(false, gridDataView->getDataTentative()); + ffs3::setActiveStatus(false, gridDataView->getDataTentative()); refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts } @@ -1862,7 +1901,7 @@ public: bool operator()(const wxString& other) const { - return Utility::sameFileSpecified(m_name, wxToZ(other)); + return util::sameFileSpecified(m_name, wxToZ(other)); } private: @@ -1873,7 +1912,7 @@ private: void MainDialog::addFileToCfgHistory(const wxString& filename) { //only (still) existing files should be included in the list - if (Utility::fileExists(wxToZ(filename), 200) == Utility::EXISTING_FALSE) //potentially slow network access: wait 200ms + 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))); @@ -1887,7 +1926,7 @@ void MainDialog::addFileToCfgHistory(const wxString& filename) cfgFileNames.insert(cfgFileNames.begin(), filename); //the default config file should receive another name on GUI - if (Utility::sameFileSpecified(wxToZ(lastConfigFileName()), wxToZ(filename))) + if (util::sameFileSpecified(wxToZ(lastConfigFileName()), wxToZ(filename))) m_choiceHistory->Insert(_("<Last session>"), 0); //insert at beginning of list else m_choiceHistory->Insert(getFormattedHistoryElement(filename), 0); //insert at beginning of list @@ -1936,7 +1975,7 @@ bool MainDialog::trySaveConfig() //return true if saved successfully { const wxString newFileName = filePicker->GetPath(); - if (FreeFileSync::fileExists(wxToZ(newFileName))) + if (ffs3::fileExists(wxToZ(newFileName))) { QuestionDlg* messageDlg = new QuestionDlg(this, QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_CANCEL, @@ -2103,7 +2142,7 @@ void MainDialog::OnSetSyncDirection(FFSSyncDirectionEvent& event) if (fsObj) { setSyncDirectionRec(event.direction, *fsObj); //set new direction (recursively) - FreeFileSync::setActiveStatus(true, *fsObj); //works recursively for directories + ffs3::setActiveStatus(true, *fsObj); //works recursively for directories } } @@ -2119,16 +2158,21 @@ bool MainDialog::readConfigurationFromXml(const wxString& filename) bool parsingError = true; try { - xmlAccess::readGuiOrBatchConfig(filename, newGuiCfg); //allow reading batch configurations also + //allow reading batch configurations also + std::vector<wxString> filenames; + filenames.push_back(filename); + + xmlAccess::convertConfig(filenames, newGuiCfg); //throw (xmlAccess::XmlError) + parsingError = false; } catch (const xmlAccess::XmlError& error) { if (error.getSeverity() == xmlAccess::XmlError::WARNING) - wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING); + wxMessageBox(error.msg(), _("Warning"), wxOK | wxICON_WARNING); else { - wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg(), _("Error"), wxOK | wxICON_ERROR); return false; } } @@ -2168,11 +2212,11 @@ bool MainDialog::writeConfigurationToXml(const wxString& filename) //write config to XML try { - xmlAccess::writeGuiConfig(guiCfg, filename); + xmlAccess::writeConfig(guiCfg, filename); } catch (const xmlAccess::XmlError& error) { - wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(error.msg().c_str(), _("Error"), wxOK | wxICON_ERROR); return false; } @@ -2267,7 +2311,7 @@ xmlAccess::XmlGuiConfig MainDialog::getCurrentConfiguration() const const wxString& MainDialog::lastConfigFileName() { - static wxString instance = FreeFileSync::getConfigDir() + wxT("LastRun.ffs_gui"); + static wxString instance = ffs3::getConfigDir() + wxT("LastRun.ffs_gui"); return instance; } @@ -2596,24 +2640,24 @@ void MainDialog::OnCompare(wxCommandEvent &event) CompareStatusHandler statusHandler(this); //begin comparison - FreeFileSync::CompareProcess comparison(currentCfg.mainCfg.handleSymlinks, - currentCfg.mainCfg.hidden.fileTimeTolerance, - globalSettings->ignoreOneHourDiff, - globalSettings->optDialogs, - &statusHandler); + ffs3::CompareProcess comparison(currentCfg.mainCfg.handleSymlinks, + globalSettings->fileTimeTolerance, + globalSettings->ignoreOneHourDiff, + globalSettings->optDialogs, + &statusHandler); //technical representation of comparison data - FreeFileSync::FolderComparison newCompareData; + ffs3::FolderComparison newCompareData; comparison.startCompareProcess( - FreeFileSync::extractCompareCfg(getCurrentConfiguration().mainCfg), //call getCurrentCfg() to get current values for directory pairs! + ffs3::extractCompareCfg(getCurrentConfiguration().mainCfg), //call getCurrentCfg() to get current values for directory pairs! currentCfg.mainCfg.compareVar, newCompareData); gridDataView->setData(newCompareData); //newCompareData is invalidated after this call //play (optional) sound notification after sync has completed (GUI and batch mode) - const wxString soundFile = FreeFileSync::getResourceDir() + wxT("Compare_Complete.wav"); + const wxString soundFile = ffs3::getResourceDir() + wxT("Compare_Complete.wav"); if (fileExists(wxToZ(soundFile))) wxSound::Play(soundFile, wxSOUND_ASYNC); } @@ -2683,7 +2727,7 @@ void MainDialog::updateGuiGrid() #elif defined FFS_LINUX const size_t digitWidth = 10; #endif - const size_t nrOfDigits = globalFunctions::getDigitCount(static_cast<size_t>(nrOfRows)); + const size_t nrOfDigits = common::getDigitCount(static_cast<size_t>(nrOfRows)); m_gridLeft ->SetRowLabelSize(static_cast<int>(nrOfDigits * digitWidth + 4)); m_gridRight->SetRowLabelSize(static_cast<int>(nrOfDigits * digitWidth + 4)); } @@ -2707,10 +2751,10 @@ void MainDialog::calculatePreview() { //update preview of bytes to be transferred: const SyncStatistics st(gridDataView->getDataTentative()); - const wxString toCreate = FreeFileSync::numberToStringSep(st.getCreate()); - const wxString toUpdate = FreeFileSync::numberToStringSep(st.getOverwrite()); - const wxString toDelete = FreeFileSync::numberToStringSep(st.getDelete()); - const wxString data = FreeFileSync::formatFilesizeToShortString(st.getDataToProcess()); + const wxString toCreate = ffs3::numberToStringSep(st.getCreate()); + const wxString toUpdate = ffs3::numberToStringSep(st.getOverwrite()); + const wxString toDelete = ffs3::numberToStringSep(st.getDelete()); + const wxString data = ffs3::formatFilesizeToShortString(st.getDataToProcess()); m_textCtrlCreate->SetValue(toCreate); m_textCtrlUpdate->SetValue(toUpdate); @@ -2735,9 +2779,7 @@ void MainDialog::OnSyncSettings(wxCommandEvent& event) currentCfg.mainCfg.customDeletionDirectory, ¤tCfg.ignoreErrors); if (syncDlg->ShowModal() == SyncCfgDialog::BUTTON_APPLY) - { updateSyncConfig(); - } } @@ -2747,9 +2789,9 @@ void MainDialog::OnCmpSettings(wxCommandEvent& event) wxPoint windowPos = m_bpButtonCmpConfig->GetScreenPosition(); windowPos.x += m_bpButtonCmpConfig->GetSize().GetWidth() + 5; - if (FreeFileSync::showCompareCfgDialog(windowPos, - currentCfg.mainCfg.compareVar, - currentCfg.mainCfg.handleSymlinks) == DefaultReturnCode::BUTTON_OKAY) + if (ffs3::showCompareCfgDialog(windowPos, + currentCfg.mainCfg.compareVar, + currentCfg.mainCfg.handleSymlinks) == DefaultReturnCode::BUTTON_OKAY) { //update compare variant name m_staticTextCmpVariant->SetLabel(wxString(wxT("(")) + getVariantName(currentCfg.mainCfg.compareVar) + wxT(")")); @@ -2762,6 +2804,17 @@ void MainDialog::OnCmpSettings(wxCommandEvent& event) gridDataView->clearAllRows(); updateGuiGrid(); + //convenience: change sync view + switch (currentCfg.mainCfg.compareVar) + { + case CMP_BY_TIME_SIZE: + syncPreview->enablePreview(true); + break; + case CMP_BY_CONTENT: + syncPreview->enablePreview(false); + break; + } + m_buttonCompare->SetFocus(); } } @@ -2780,9 +2833,9 @@ void MainDialog::OnStartSync(wxCommandEvent& event) { bool dontShowAgain = false; - if (FreeFileSync::showSyncPreviewDlg( + if (ffs3::showSyncPreviewDlg( getCurrentConfiguration().mainCfg.getSyncVariantName(), - FreeFileSync::SyncStatistics(gridDataView->getDataTentative()), + ffs3::SyncStatistics(gridDataView->getDataTentative()), dontShowAgain) != DefaultReturnCode::BUTTON_OKAY) return; @@ -2804,13 +2857,14 @@ void MainDialog::OnStartSync(wxCommandEvent& event) statusHandler.reportInfo(_("Nothing to synchronize according to configuration!")); //inform about this special case //start synchronization and mark all elements processed - FreeFileSync::SyncProcess synchronization( + ffs3::SyncProcess synchronization( globalSettings->optDialogs, - currentCfg.mainCfg.hidden.verifyFileCopy, + globalSettings->verifyFileCopy, globalSettings->copyLockedFiles, + globalSettings->copyFilePermissions, statusHandler); - const std::vector<FreeFileSync::FolderPairSyncCfg> syncProcessCfg = FreeFileSync::extractSyncCfg(getCurrentConfiguration().mainCfg); + const std::vector<ffs3::FolderPairSyncCfg> syncProcessCfg = ffs3::extractSyncCfg(getCurrentConfiguration().mainCfg); FolderComparison& dataToSync = gridDataView->getDataTentative(); //make sure syncProcessCfg and dataToSync have same size and correspond! @@ -2820,7 +2874,7 @@ void MainDialog::OnStartSync(wxCommandEvent& event) synchronization.startSynchronizationProcess(syncProcessCfg, dataToSync); //play (optional) sound notification after sync has completed (GUI and batch mode) - const wxString soundFile = FreeFileSync::getResourceDir() + wxT("Sync_Complete.wav"); + const wxString soundFile = ffs3::getResourceDir() + wxT("Sync_Complete.wav"); if (fileExists(wxToZ(soundFile))) wxSound::Play(soundFile, wxSOUND_ASYNC); } @@ -3041,7 +3095,7 @@ void MainDialog::OnSwapSides(wxCommandEvent& event) m_bpButtonSyncDirOverwRight->setActive(tmp); //swap grid information - FreeFileSync::swapGrids(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative()); + ffs3::swapGrids(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative()); updateGuiGrid(); } @@ -3185,7 +3239,7 @@ void MainDialog::updateGridViewData() statusLeftNew += _("1 directory"); else { - wxString folderCount = FreeFileSync::numberToStringSep(foldersOnLeftView); + wxString folderCount = ffs3::numberToStringSep(foldersOnLeftView); wxString outputString = _("%x directories"); outputString.Replace(wxT("%x"), folderCount, false); @@ -3202,17 +3256,17 @@ void MainDialog::updateGridViewData() statusLeftNew += _("1 file"); else { - wxString fileCount = FreeFileSync::numberToStringSep(filesOnLeftView); + wxString fileCount = ffs3::numberToStringSep(filesOnLeftView); wxString outputString = _("%x files"); outputString.Replace(wxT("%x"), fileCount, false); statusLeftNew += outputString; } statusLeftNew += wxT(" - "); - statusLeftNew += FreeFileSync::formatFilesizeToShortString(filesizeLeftView); + statusLeftNew += ffs3::formatFilesizeToShortString(filesizeLeftView); } - const wxString objectsView = FreeFileSync::numberToStringSep(gridDataView->rowsOnView()); + const wxString objectsView = ffs3::numberToStringSep(gridDataView->rowsOnView()); if (gridDataView->rowsTotal() == 1) { wxString outputString = _("%x of 1 row in view"); @@ -3221,7 +3275,7 @@ void MainDialog::updateGridViewData() } else { - const wxString objectsTotal = FreeFileSync::numberToStringSep(gridDataView->rowsTotal()); + const wxString objectsTotal = ffs3::numberToStringSep(gridDataView->rowsTotal()); wxString outputString = _("%x of %y rows in view"); outputString.Replace(wxT("%x"), objectsView, false); @@ -3235,7 +3289,7 @@ void MainDialog::updateGridViewData() statusRightNew += _("1 directory"); else { - wxString folderCount = FreeFileSync::numberToStringSep(foldersOnRightView); + wxString folderCount = ffs3::numberToStringSep(foldersOnRightView); wxString outputString = _("%x directories"); outputString.Replace(wxT("%x"), folderCount, false); @@ -3252,7 +3306,7 @@ void MainDialog::updateGridViewData() statusRightNew += _("1 file"); else { - wxString fileCount = FreeFileSync::numberToStringSep(filesOnRightView); + wxString fileCount = ffs3::numberToStringSep(filesOnRightView); wxString outputString = _("%x files"); outputString.Replace(wxT("%x"), fileCount, false); @@ -3260,7 +3314,7 @@ void MainDialog::updateGridViewData() } statusRightNew += wxT(" - "); - statusRightNew += FreeFileSync::formatFilesizeToShortString(filesizeRightView); + statusRightNew += ffs3::formatFilesizeToShortString(filesizeRightView); } @@ -3340,7 +3394,7 @@ void MainDialog::updateSyncConfig() wxWindow* parent_; } redetCallback(globalSettings->optDialogs.warningSyncDatabase, this); - FreeFileSync::redetermineSyncDirection(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative(), &redetCallback); + ffs3::redetermineSyncDirection(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative(), &redetCallback); updateGuiGrid(); } @@ -3530,7 +3584,7 @@ void MainDialog::clearAddFolderPairs() //menu events void MainDialog::OnMenuGlobalSettings(wxCommandEvent& event) { - FreeFileSync::showGlobalSettingsDlg(*globalSettings); + ffs3::showGlobalSettingsDlg(*globalSettings); //event.Skip(); } @@ -3545,7 +3599,7 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) if (filePicker->ShowModal() == wxID_OK) { const wxString newFileName = filePicker->GetPath(); - if (FreeFileSync::fileExists(wxToZ(newFileName))) + if (ffs3::fileExists(wxToZ(newFileName))) { QuestionDlg* messageDlg = new QuestionDlg(this, QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_CANCEL, @@ -3648,15 +3702,9 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) void MainDialog::OnMenuBatchJob(wxCommandEvent& event) { //fill batch config structure - xmlAccess::XmlGuiConfig currCfg = getCurrentConfiguration(); //get UP TO DATE config, with updated values for main and additional folders! + const xmlAccess::XmlGuiConfig currCfg = getCurrentConfiguration(); //get UP TO DATE config, with updated values for main and additional folders! - xmlAccess::XmlBatchConfig batchCfg; - batchCfg.mainCfg = currCfg.mainCfg; - - if (currentCfg.ignoreErrors) - batchCfg.handleError = xmlAccess::ON_ERROR_IGNORE; - else - batchCfg.handleError = xmlAccess::ON_ERROR_POPUP; + const xmlAccess::XmlBatchConfig batchCfg = convertGuiToBatch(currCfg); BatchDialog* batchDlg = new BatchDialog(this, batchCfg); if (batchDlg->ShowModal() == BatchDialog::BATCH_FILE_SAVED) @@ -3666,7 +3714,7 @@ void MainDialog::OnMenuBatchJob(wxCommandEvent& event) void MainDialog::OnMenuCheckVersion(wxCommandEvent& event) { - FreeFileSync::checkForUpdateNow(); + ffs3::checkForUpdateNow(); } @@ -3675,7 +3723,7 @@ void MainDialog::OnRegularUpdateCheck(wxIdleEvent& event) //execute just once per startup! Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), NULL, this); - FreeFileSync::checkForUpdatePeriodically(globalSettings->gui.lastUpdateCheck); + ffs3::checkForUpdatePeriodically(globalSettings->gui.lastUpdateCheck); } @@ -3696,13 +3744,13 @@ void MainDialog::OnLayoutWindowAsync(wxIdleEvent& event) void MainDialog::OnMenuAbout(wxCommandEvent& event) { - FreeFileSync::showAboutDialog(); + ffs3::showAboutDialog(); } void MainDialog::OnShowHelp(wxCommandEvent& event) { - FreeFileSync::displayHelpEntry(); + ffs3::displayHelpEntry(); } diff --git a/ui/MainDialog.h b/ui/main_dlg.h index 744a95da..3e62191f 100644 --- a/ui/MainDialog.h +++ b/ui/main_dlg.h @@ -7,9 +7,9 @@ #ifndef MAINDIALOG_H #define MAINDIALOG_H -#include "guiGenerated.h" +#include "gui_generated.h" #include <stack> -#include "../library/processXml.h" +#include "../library/process_xml.h" #include <memory> #include <map> #include <set> @@ -26,7 +26,7 @@ class FirstFolderPairCfg; class CompareStatus; -namespace FreeFileSync +namespace ffs3 { class CustomLocale; class GridView; @@ -119,7 +119,7 @@ private: void addLeftFolderToHistory(const wxString& leftFolder); void addRightFolderToHistory(const wxString& rightFolder); - void addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront = false); + void addFolderPair(const std::vector<ffs3::FolderPairEnh>& newPairs, bool addFront = false); void removeAddFolderPair(size_t pos); void clearAddFolderPairs(); @@ -132,7 +132,7 @@ private: //context menu functions std::set<size_t> getSelectedRows(const CustomGrid* grid) const; std::set<size_t> getSelectedRows() const; - void setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const FreeFileSync::SyncDirection dir); + void setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const ffs3::SyncDirection dir); void filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTable, int leadingRow); void copySelectionToClipboard(const CustomGrid* selectedGrid); void deleteSelectedFiles(); @@ -268,7 +268,7 @@ private: xmlAccess::XmlGlobalSettings* globalSettings; //always bound //UI view of FolderComparison structure - std::auto_ptr<FreeFileSync::GridView> gridDataView; + std::auto_ptr<ffs3::GridView> gridDataView; //------------------------------------- //functional configuration @@ -311,7 +311,7 @@ private: #ifdef FFS_WIN //enable moving window by clicking on sub-windows instead of header line - std::auto_ptr<FreeFileSync::MouseMoveWindow> moveWholeWindow; + std::auto_ptr<ffs3::MouseMoveWindow> moveWholeWindow; #endif //encapsulation of handling of sync preview diff --git a/ui/mouseMoveWindow.cpp b/ui/mouse_move_dlg.cpp index 86064141..526408d4 100644 --- a/ui/mouseMoveWindow.cpp +++ b/ui/mouse_move_dlg.cpp @@ -4,10 +4,10 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "mouseMoveWindow.h" +#include "mouse_move_dlg.h" #include <wx/msw/wrapwin.h> //includes "windows.h" -using namespace FreeFileSync; +using namespace ffs3; void MouseMoveWindow::connectSourceWindow(wxWindow* sourceWindow) diff --git a/ui/mouseMoveWindow.h b/ui/mouse_move_dlg.h index bc7ee904..9d68845d 100644 --- a/ui/mouseMoveWindow.h +++ b/ui/mouse_move_dlg.h @@ -9,7 +9,7 @@ #include <wx/window.h> -namespace FreeFileSync +namespace ffs3 { //move main dialog by mouse-dragging contained sub-windows: diff --git a/ui/messagePopup.cpp b/ui/msg_popup.cpp index 771df4f3..4024a541 100644 --- a/ui/messagePopup.cpp +++ b/ui/msg_popup.cpp @@ -4,7 +4,7 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "messagePopup.h" +#include "msg_popup.h" #include "../library/resources.h" diff --git a/ui/messagePopup.h b/ui/msg_popup.h index d41594b5..fee3c6ed 100644 --- a/ui/messagePopup.h +++ b/ui/msg_popup.h @@ -7,7 +7,7 @@ #ifndef MESSAGEPOPUP_H_INCLUDED #define MESSAGEPOPUP_H_INCLUDED -#include "guiGenerated.h" +#include "gui_generated.h" class ErrorDlg : public ErrorDlgGenerated diff --git a/ui/progressIndicator.cpp b/ui/progress_indicator.cpp index 8a1f14f8..f41ccc36 100644 --- a/ui/progressIndicator.cpp +++ b/ui/progress_indicator.cpp @@ -4,24 +4,24 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "progressIndicator.h" +#include "progress_indicator.h" #include <memory> -#include "guiGenerated.h" +#include "gui_generated.h" #include <wx/stopwatch.h> #include "../library/resources.h" -#include "../shared/stringConv.h" +#include "../shared/string_conv.h" #include "../shared/util.h" #include "../library/statistics.h" #include <wx/wupdlock.h> -#include "../shared/globalFunctions.h" -#include "trayIcon.h" +#include "../shared/global_func.h" +#include "tray_icon.h" #include <boost/shared_ptr.hpp> #ifdef FFS_WIN #include "../shared/taskbar.h" #endif -using namespace FreeFileSync; +using namespace ffs3; namespace @@ -88,7 +88,7 @@ private: CurrentStatus status; #ifdef FFS_WIN - std::auto_ptr<Utility::TaskbarProgress> taskbar_; + std::auto_ptr<util::TaskbarProgress> taskbar_; #endif //remaining time @@ -172,9 +172,9 @@ void CompareStatus::CompareStatusImpl::init() #ifdef FFS_WIN try //try to get access to Windows 7 Taskbar { - taskbar_.reset(new Utility::TaskbarProgress(parentWindow_)); + taskbar_.reset(new util::TaskbarProgress(parentWindow_)); } - catch (const Utility::TaskbarNotAvailable&) {} + catch (const util::TaskbarNotAvailable&) {} #endif status = SCANNING; @@ -279,7 +279,7 @@ void CompareStatus::CompareStatusImpl::showProgressExternally(const wxString& pr //show progress on Windows 7 taskbar #ifdef FFS_WIN - using namespace Utility; + using namespace util; if (taskbar_.get()) { @@ -344,7 +344,7 @@ void CompareStatus::CompareStatusImpl::updateStatusPanelNow() setNewText(filesToCompareTmp, *m_staticTextFilesRemaining, updateLayout); //remaining bytes left for file comparison - const wxString remainingBytesTmp = FreeFileSync::formatFilesizeToShortString(totalData - currentData); + const wxString remainingBytesTmp = ffs3::formatFilesizeToShortString(totalData - currentData); setNewText(remainingBytesTmp, *m_staticTextDataRemaining, updateLayout); if (statistics.get()) @@ -429,7 +429,7 @@ private: SyncStatus::SyncStatusID currentStatus; #ifdef FFS_WIN - std::auto_ptr<Utility::TaskbarProgress> taskbar_; + std::auto_ptr<util::TaskbarProgress> taskbar_; #endif //remaining time @@ -553,9 +553,9 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWin #ifdef FFS_WIN try //try to get access to Windows 7 Taskbar { - taskbar_.reset(new Utility::TaskbarProgress(mainDialog != NULL ? *mainDialog : *this)); + taskbar_.reset(new util::TaskbarProgress(mainDialog != NULL ? *mainDialog : *this)); } - catch (const Utility::TaskbarNotAvailable&) {} + catch (const util::TaskbarNotAvailable&) {} #endif //hide "processed" statistics until end of process @@ -654,7 +654,7 @@ void SyncStatus::SyncStatusImpl::showProgressExternally(const wxString& progress } #ifdef FFS_WIN - using namespace Utility; + using namespace util; //show progress on Windows 7 taskbar if (taskbar_.get()) @@ -729,7 +729,7 @@ void SyncStatus::SyncStatusImpl::updateStatusDialogNow() if (currentStatus == SyncStatus::SCANNING) m_gauge1->Pulse(); else - m_gauge1->SetValue(globalFunctions::round(currentData.ToDouble() * scalingFactor)); + m_gauge1->SetValue(common::round(currentData.ToDouble() * scalingFactor)); //status text const wxString statusTxt = zToWx(currentStatusText); @@ -741,7 +741,7 @@ void SyncStatus::SyncStatusImpl::updateStatusDialogNow() setNewText(remainingObjTmp, *m_staticTextRemainingObj, updateLayout); //remaining bytes left for copy - const wxString remainingBytesTmp = FreeFileSync::formatFilesizeToShortString(totalData - currentData); + const wxString remainingBytesTmp = ffs3::formatFilesizeToShortString(totalData - currentData); setNewText(remainingBytesTmp, *m_staticTextDataRemaining, updateLayout); if (statistics.get()) @@ -875,7 +875,7 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncStatus::SyncStatusID id, bSizerObjectsProcessed->Show(true); m_staticTextProcessedObj->SetLabel(numberToStringSep(currentObjects)); - m_staticTextDataProcessed->SetLabel(FreeFileSync::formatFilesizeToShortString(currentData)); + m_staticTextDataProcessed->SetLabel(ffs3::formatFilesizeToShortString(currentData)); } updateStatusDialogNow(); //keep this sequence to avoid display distortion, if e.g. only 1 item is sync'ed @@ -953,7 +953,7 @@ void SyncStatus::SyncStatusImpl::OnClose(wxCloseEvent& event) void SyncStatus::SyncStatusImpl::OnIconize(wxIconizeEvent& event) { - if (event.Iconized()) //ATTENTION: iconize event is also triggered on "Restore"! (at least under Linux) + if (event.IsIconized()) //ATTENTION: iconize event is also triggered on "Restore"! (at least under Linux) minimizeToTray(); } diff --git a/ui/progressIndicator.h b/ui/progress_indicator.h index b6964fe6..4bd9861b 100644 --- a/ui/progressIndicator.h +++ b/ui/progress_indicator.h @@ -9,7 +9,7 @@ #include "../shared/zstring.h" #include <wx/toplevel.h> -#include "../library/statusHandler.h" +#include "../library/status_handler.h" class CompareStatus diff --git a/ui/search.cpp b/ui/search.cpp index 03a2e23b..3fdb4d8b 100644 --- a/ui/search.cpp +++ b/ui/search.cpp @@ -5,7 +5,7 @@ // ************************************************************************** // #include "search.h" -#include "guiGenerated.h" +#include "gui_generated.h" #include <wx/msgdlg.h> #include <wx/utils.h> #include <utility> @@ -259,13 +259,13 @@ void executeSearch(bool forceShowDialog, //########################################################################################### -void FreeFileSync::startFind(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase) //Strg + F +void ffs3::startFind(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase) //Strg + F { executeSearch(true, respectCase, parentWindow, leftGrid, rightGrid); } -void FreeFileSync::findNext(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase) //F3 +void ffs3::findNext(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase) //F3 { executeSearch(false, respectCase, parentWindow, leftGrid, rightGrid); } diff --git a/ui/search.h b/ui/search.h index 51604b8d..22ef9bc9 100644 --- a/ui/search.h +++ b/ui/search.h @@ -11,7 +11,7 @@ class wxGrid; class wxWindow; -namespace FreeFileSync +namespace ffs3 { void startFind(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase); //Strg + F void findNext( wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase); //F3 diff --git a/ui/SmallDialogs.cpp b/ui/small_dlgs.cpp index aa858454..785dd793 100644 --- a/ui/SmallDialogs.cpp +++ b/ui/small_dlgs.cpp @@ -4,23 +4,23 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "guiGenerated.h" -#include "smallDialogs.h" -#include "messagePopup.h" +#include "gui_generated.h" +#include "small_dlgs.h" +#include "msg_popup.h" #include "../library/resources.h" #include "../algorithm.h" -#include "../shared/stringConv.h" +#include "../shared/string_conv.h" #include "../shared/util.h" #include "../synchronization.h" -#include "../library/customGrid.h" -#include "../shared/customButton.h" +#include "../library/custom_grid.h" +#include "../shared/custom_button.h" #include "../shared/localization.h" -#include "../shared/globalFunctions.h" -#include "../shared/buildInfo.h" +#include "../shared/global_func.h" +#include "../shared/build_info.h" #include <wx/wupdlock.h> #include <wx/msgdlg.h> -using namespace FreeFileSync; +using namespace ffs3; class AboutDlg : public AboutDlgGenerated @@ -71,11 +71,11 @@ AboutDlg::AboutDlg(wxWindow* window) : AboutDlgGenerated(window) #endif //wxUSE_UNICODE //compile time info about 32/64-bit build - if (Utility::is64BitBuild) + if (util::is64BitBuild) build += wxT(" x64"); else build += wxT(" x86"); - assert_static(Utility::is32BitBuild || Utility::is64BitBuild); + assert_static(util::is32BitBuild || util::is64BitBuild); wxString buildFormatted = _("(Build: %x)"); buildFormatted.Replace(wxT("%x"), build); @@ -102,7 +102,7 @@ void AboutDlg::OnOK(wxCommandEvent& event) } -void FreeFileSync::showAboutDialog() +void ffs3::showAboutDialog() { AboutDlg* aboutDlg = new AboutDlg(NULL); aboutDlg->ShowModal(); @@ -172,7 +172,7 @@ void HelpDlg::OnOK(wxCommandEvent& event) } -void FreeFileSync::showHelpDialog() +void ffs3::showHelpDialog() { HelpDlg* helpDlg = new HelpDlg(NULL); helpDlg->ShowModal(); @@ -294,7 +294,7 @@ void FilterDlg::OnClose(wxCloseEvent& event) -DefaultReturnCode::Response FreeFileSync::showFilterDialog(bool isGlobalFilter, +DefaultReturnCode::Response ffs3::showFilterDialog(bool isGlobalFilter, Zstring& filterIncl, Zstring& filterExcl) { @@ -316,8 +316,8 @@ class DeleteDialog : public DeleteDlgGenerated { public: DeleteDialog(wxWindow* main, - const std::vector<FreeFileSync::FileSystemObject*>& rowsOnLeft, - const std::vector<FreeFileSync::FileSystemObject*>& rowsOnRight, + const std::vector<ffs3::FileSystemObject*>& rowsOnLeft, + const std::vector<ffs3::FileSystemObject*>& rowsOnRight, bool& deleteOnBothSides, bool& useRecycleBin, int& totalDeleteCount); @@ -337,8 +337,8 @@ private: void updateTexts(); - const std::vector<FreeFileSync::FileSystemObject*>& rowsToDeleteOnLeft; - const std::vector<FreeFileSync::FileSystemObject*>& rowsToDeleteOnRight; + const std::vector<ffs3::FileSystemObject*>& rowsToDeleteOnLeft; + const std::vector<ffs3::FileSystemObject*>& rowsToDeleteOnRight; bool& m_deleteOnBothSides; bool& m_useRecycleBin; int& totalDelCount; @@ -379,7 +379,7 @@ void DeleteDialog::updateTexts() m_bitmap12->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("deleteFile"))); } - const std::pair<wxString, int> delInfo = FreeFileSync::deleteFromGridAndHDPreview( + const std::pair<wxString, int> delInfo = ffs3::deleteFromGridAndHDPreview( rowsToDeleteOnLeft, rowsToDeleteOnRight, m_checkBoxDeleteBothSides->GetValue()); @@ -421,8 +421,8 @@ void DeleteDialog::OnUseRecycler(wxCommandEvent& event) } -DefaultReturnCode::Response FreeFileSync::showDeleteDialog(const std::vector<FreeFileSync::FileSystemObject*>& rowsOnLeft, - const std::vector<FreeFileSync::FileSystemObject*>& rowsOnRight, +DefaultReturnCode::Response ffs3::showDeleteDialog(const std::vector<ffs3::FileSystemObject*>& rowsOnLeft, + const std::vector<ffs3::FileSystemObject*>& rowsOnRight, bool& deleteOnBothSides, bool& useRecycleBin, int& totalDeleteCount) @@ -568,7 +568,7 @@ void CustomizeColsDlg::OnMoveDown(wxCommandEvent& event) } -DefaultReturnCode::Response FreeFileSync::showCustomizeColsDlg(xmlAccess::ColumnAttributes& attr) +DefaultReturnCode::Response ffs3::showCustomizeColsDlg(xmlAccess::ColumnAttributes& attr) { DefaultReturnCode::Response rv = DefaultReturnCode::BUTTON_CANCEL; @@ -587,7 +587,7 @@ class SyncPreviewDlg : public SyncPreviewDlgGenerated public: SyncPreviewDlg(wxWindow* parentWindow, const wxString& variantName, - const FreeFileSync::SyncStatistics& statistics, + const ffs3::SyncStatistics& statistics, bool& dontShowAgain); enum { @@ -607,12 +607,12 @@ private: SyncPreviewDlg::SyncPreviewDlg(wxWindow* parentWindow, const wxString& variantName, - const FreeFileSync::SyncStatistics& statistics, + const ffs3::SyncStatistics& statistics, bool& dontShowAgain) : SyncPreviewDlgGenerated(parentWindow), m_dontShowAgain(dontShowAgain) { - using FreeFileSync::numberToStringSep; + using ffs3::numberToStringSep; m_buttonStartSync->setBitmapFront(GlobalResources::getInstance().getImageByName(wxT("startSync"))); m_bitmapCreate->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("create"))); @@ -621,7 +621,7 @@ SyncPreviewDlg::SyncPreviewDlg(wxWindow* parentWindow, m_bitmapData->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("data"))); m_staticTextVariant->SetLabel(variantName); - m_textCtrlData->SetValue(FreeFileSync::formatFilesizeToShortString(statistics.getDataToProcess())); + m_textCtrlData->SetValue(ffs3::formatFilesizeToShortString(statistics.getDataToProcess())); m_textCtrlCreateL->SetValue(numberToStringSep(statistics.getCreate( true, false))); m_textCtrlUpdateL->SetValue(numberToStringSep(statistics.getOverwrite(true, false))); @@ -657,9 +657,9 @@ void SyncPreviewDlg::OnStartSync(wxCommandEvent& event) } -DefaultReturnCode::Response FreeFileSync::showSyncPreviewDlg( +DefaultReturnCode::Response ffs3::showSyncPreviewDlg( const wxString& variantName, - const FreeFileSync::SyncStatistics& statistics, + const ffs3::SyncStatistics& statistics, bool& dontShowAgain) { DefaultReturnCode::Response rv = DefaultReturnCode::BUTTON_CANCEL; @@ -684,7 +684,7 @@ class CompareCfgDialog : public CmpCfgDlgGenerated public: CompareCfgDialog(wxWindow* parentWindow, const wxPoint& position, - FreeFileSync::CompareVariant& cmpVar, + ffs3::CompareVariant& cmpVar, SymLinkHandling& handleSymlinks); enum @@ -702,14 +702,14 @@ private: void updateView(); - FreeFileSync::CompareVariant& cmpVarOut; + ffs3::CompareVariant& cmpVarOut; SymLinkHandling& handleSymlinksOut; }; namespace { -void setValue(wxChoice& choiceCtrl, FreeFileSync::SymLinkHandling value) +void setValue(wxChoice& choiceCtrl, ffs3::SymLinkHandling value) { choiceCtrl.Clear(); choiceCtrl.Append(_("Ignore")); @@ -721,32 +721,32 @@ void setValue(wxChoice& choiceCtrl, FreeFileSync::SymLinkHandling value) switch (value) { - case FreeFileSync::SYMLINK_IGNORE: + case ffs3::SYMLINK_IGNORE: choiceCtrl.SetSelection(0); break; - case FreeFileSync::SYMLINK_USE_DIRECTLY: + case ffs3::SYMLINK_USE_DIRECTLY: choiceCtrl.SetSelection(1); break; - case FreeFileSync::SYMLINK_FOLLOW_LINK: + case ffs3::SYMLINK_FOLLOW_LINK: choiceCtrl.SetSelection(2); break; } } -FreeFileSync::SymLinkHandling getValue(const wxChoice& choiceCtrl) +ffs3::SymLinkHandling getValue(const wxChoice& choiceCtrl) { switch (choiceCtrl.GetSelection()) { case 0: - return FreeFileSync::SYMLINK_IGNORE; + return ffs3::SYMLINK_IGNORE; case 1: - return FreeFileSync::SYMLINK_USE_DIRECTLY; + return ffs3::SYMLINK_USE_DIRECTLY; case 2: - return FreeFileSync::SYMLINK_FOLLOW_LINK; + return ffs3::SYMLINK_FOLLOW_LINK; default: assert(false); - return FreeFileSync::SYMLINK_IGNORE; + return ffs3::SYMLINK_IGNORE; } } } @@ -835,7 +835,7 @@ void CompareCfgDialog::OnShowHelp(wxCommandEvent& event) } -DefaultReturnCode::Response FreeFileSync::showCompareCfgDialog( +DefaultReturnCode::Response ffs3::showCompareCfgDialog( const wxPoint& position, CompareVariant& cmpVar, SymLinkHandling& handleSymlinks) @@ -886,6 +886,7 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* window, xmlAccess::XmlGlobalSetti m_checkBoxIgnoreOneHour->SetValue(globalSettings.ignoreOneHourDiff); m_checkBoxCopyLocked->SetValue(globalSettings.copyLockedFiles); + m_checkBoxCopyPermissions->SetValue(globalSettings.copyFilePermissions); #ifndef FFS_WIN m_checkBoxCopyLocked->Hide(); @@ -911,9 +912,9 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* window, xmlAccess::XmlGlobalSetti void GlobalSettingsDlg::OnOkay(wxCommandEvent& event) { //write global settings only when okay-button is pressed! - settings.ignoreOneHourDiff = m_checkBoxIgnoreOneHour->GetValue(); - settings.copyLockedFiles = m_checkBoxCopyLocked->GetValue(); - + settings.ignoreOneHourDiff = m_checkBoxIgnoreOneHour->GetValue(); + settings.copyLockedFiles = m_checkBoxCopyLocked->GetValue(); + settings.copyFilePermissions = m_checkBoxCopyPermissions->GetValue(); settings.gui.externelApplications = getExtApp(); EndModal(BUTTON_OKAY); @@ -935,8 +936,9 @@ void GlobalSettingsDlg::OnDefault(wxCommandEvent& event) { xmlAccess::XmlGlobalSettings defaultCfg; - m_checkBoxIgnoreOneHour->SetValue(defaultCfg.ignoreOneHourDiff); - m_checkBoxCopyLocked->SetValue(defaultCfg.copyLockedFiles); + m_checkBoxIgnoreOneHour-> SetValue(defaultCfg.ignoreOneHourDiff); + m_checkBoxCopyLocked-> SetValue(defaultCfg.copyLockedFiles); + m_checkBoxCopyPermissions->SetValue(defaultCfg.copyFilePermissions); set(defaultCfg.gui.externelApplications); } @@ -1012,7 +1014,7 @@ void GlobalSettingsDlg::OnRemoveRow(wxCommandEvent& event) } -DefaultReturnCode::Response FreeFileSync::showGlobalSettingsDlg(xmlAccess::XmlGlobalSettings& globalSettings) +DefaultReturnCode::Response ffs3::showGlobalSettingsDlg(xmlAccess::XmlGlobalSettings& globalSettings) { DefaultReturnCode::Response rv = DefaultReturnCode::BUTTON_CANCEL; diff --git a/ui/SmallDialogs.h b/ui/small_dlgs.h index acc69aa3..57a5f542 100644 --- a/ui/SmallDialogs.h +++ b/ui/small_dlgs.h @@ -7,10 +7,10 @@ #ifndef SMALLDIALOGS_H_INCLUDED #define SMALLDIALOGS_H_INCLUDED -#include "../fileHierarchy.h" -#include "../library/processXml.h" +#include "../file_hierarchy.h" +#include "../library/process_xml.h" -namespace FreeFileSync +namespace ffs3 { class SyncStatistics; diff --git a/ui/sorting.h b/ui/sorting.h index 1a77ff02..94ac6f6d 100644 --- a/ui/sorting.h +++ b/ui/sorting.h @@ -7,13 +7,13 @@ #ifndef SORTING_H_INCLUDED #define SORTING_H_INCLUDED -#include "../fileHierarchy.h" -#include "../shared/systemConstants.h" +#include "../file_hierarchy.h" +#include "../shared/system_constants.h" #include "../synchronization.h" -#include "../shared/staticAssert.h" +#include "../shared/assert_static.h" -namespace FreeFileSync +namespace ffs3 { namespace { @@ -31,12 +31,6 @@ bool isDirectoryMapping(const FileSystemObject& fsObj) return dynamic_cast<const DirMapping*>(&fsObj) != NULL; } -inline -int compareString(const Zstring& stringA, const Zstring& stringB) -{ - return stringA.cmpFileName(stringB); -} - template <bool ascending> struct Compare @@ -60,13 +54,6 @@ struct Compare<false> }; -inline -bool stringSmallerThan(const Zstring& stringA, const Zstring& stringB) -{ - return compareString(stringA, stringB) < 0; -} - - template <bool ascending, SelectedSide side> inline bool sortByFileName(const FileSystemObject& a, const FileSystemObject& b) @@ -81,7 +68,7 @@ bool sortByFileName(const FileSystemObject& a, const FileSystemObject& b) if (isDirectoryMapping(a)) //sort directories by relative name { if (isDirectoryMapping(b)) - return stringSmallerThan(a.getRelativeName<side>(), b.getRelativeName<side>()); + return cmpFileName(a.getRelativeName<side>(), b.getRelativeName<side>()) < 0; else return false; } @@ -91,7 +78,7 @@ bool sortByFileName(const FileSystemObject& a, const FileSystemObject& b) return true; else return Compare<ascending>().isSmallerThan( - compareString(a.getShortName<side>(), b.getShortName<side>()), 0); + cmpFileName(a.getShortName<side>(), b.getShortName<side>()), 0); } } @@ -116,7 +103,7 @@ bool sortByRelativeName(const FileSystemObject& a, const FileSystemObject& b) //compare relative names without filenames first - const int rv = compareString(relDirNameA, relDirNameB); + const int rv = cmpFileName(relDirNameA, relDirNameB); if (rv != 0) return Compare<ascending>().isSmallerThan(rv, 0); else //compare the filenames @@ -126,7 +113,7 @@ bool sortByRelativeName(const FileSystemObject& a, const FileSystemObject& b) else if (isDirectoryA) return true; - return stringSmallerThan(a.getShortName<side>(), b.getShortName<side>()); + return cmpFileName(a.getShortName<side>(), b.getShortName<side>()) < 0; } } @@ -135,18 +122,29 @@ template <bool ascending, SelectedSide side> inline bool sortByFileSize(const FileSystemObject& a, const FileSystemObject& b) { + //empty rows always last if (a.isEmpty<side>()) - return false; //empty rows always last + return false; else if (b.isEmpty<side>()) - return true; //empty rows always last + return true; + + const bool isDirA = dynamic_cast<const DirMapping*>(&a) != NULL; + const bool isDirB = dynamic_cast<const DirMapping*>(&b) != NULL; + + //directories second last + if (isDirA) + return false; + else if (isDirB) + return true; const FileMapping* fileObjA = dynamic_cast<const FileMapping*>(&a); const FileMapping* fileObjB = dynamic_cast<const FileMapping*>(&b); + //then symlinks if (fileObjA == NULL) - return false; //directories last + return false; else if (fileObjB == NULL) - return true; //directories last + return true; //return list beginning with largest files first return Compare<ascending>().isSmallerThan(fileObjA->getFileSize<side>(), fileObjB->getFileSize<side>()); diff --git a/ui/switchToGui.cpp b/ui/switch_to_gui.cpp index ed678dd1..121047e6 100644 --- a/ui/switchToGui.cpp +++ b/ui/switch_to_gui.cpp @@ -4,10 +4,10 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "switchToGui.h" -#include "mainDialog.h" +#include "switch_to_gui.h" +#include "main_dlg.h" -using FreeFileSync::SwitchToGui; +using ffs3::SwitchToGui; SwitchToGui::SwitchToGui(const xmlAccess::XmlBatchConfig& batchCfg, diff --git a/ui/switchToGui.h b/ui/switch_to_gui.h index 7970534a..b39354f8 100644 --- a/ui/switchToGui.h +++ b/ui/switch_to_gui.h @@ -7,10 +7,10 @@ #ifndef SWITCHTOGUI_H_INCLUDED #define SWITCHTOGUI_H_INCLUDED -#include "../library/processXml.h" +#include "../library/process_xml.h" -namespace FreeFileSync +namespace ffs3 { //switch from FreeFileSync Batch to GUI modus: opens a new FreeFileSync GUI session asynchronously diff --git a/ui/syncConfig.cpp b/ui/sync_cfg.cpp index a2d821ff..c7dd58a5 100644 --- a/ui/syncConfig.cpp +++ b/ui/sync_cfg.cpp @@ -4,13 +4,13 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "syncConfig.h" +#include "sync_cfg.h" #include "../library/resources.h" -#include "../shared/dragAndDrop.h" +#include "../shared/drag_n_drop.h" #include <wx/wupdlock.h> -using namespace FreeFileSync; +using namespace ffs3; SyncCfgDialog::SyncCfgDialog(wxWindow* window, @@ -63,7 +63,7 @@ SyncCfgDialog::SyncCfgDialog(wxWindow* window, SyncCfgDialog::~SyncCfgDialog() {} //non-inline destructor for std::auto_ptr to work with forward declaration -void SyncCfgDialog::updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, const FreeFileSync::SyncConfiguration& syncConfig) +void SyncCfgDialog::updateConfigIcons(const ffs3::CompareVariant cmpVar, const ffs3::SyncConfiguration& syncConfig) { //wxWindowUpdateLocker dummy(this); //avoid display distortion wxWindowUpdateLocker dummy2(m_panelCustomDeletionDir); //avoid display distortion @@ -92,7 +92,7 @@ void SyncCfgDialog::updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, sbSizerSyncDirections); //set radiobuttons -> have no parameter-ownership at all! - switch (FreeFileSync::getVariant(currentSyncConfig)) + switch (ffs3::getVariant(currentSyncConfig)) { case SyncConfiguration::AUTOMATIC: m_radioBtnAutomatic->SetValue(true); //automatic mode @@ -328,21 +328,21 @@ void SyncCfgDialog::OnChangeErrorHandling(wxCommandEvent& event) //------------------- -void updateToolTipDeletionHandling(wxChoice* choiceHandleError, wxPanel* customDir, const FreeFileSync::DeletionPolicy value) +void updateToolTipDeletionHandling(wxChoice* choiceHandleError, wxPanel* customDir, const ffs3::DeletionPolicy value) { customDir->Disable(); switch (value) { - case FreeFileSync::DELETE_PERMANENTLY: + case ffs3::DELETE_PERMANENTLY: choiceHandleError->SetToolTip(_("Delete or overwrite files permanently")); break; - case FreeFileSync::MOVE_TO_RECYCLE_BIN: + case ffs3::MOVE_TO_RECYCLE_BIN: choiceHandleError->SetToolTip(_("Use Recycle Bin when deleting or overwriting files")); break; - case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY: + case ffs3::MOVE_TO_CUSTOM_DIRECTORY: choiceHandleError->SetToolTip(_("Move files into a time-stamped subdirectory")); customDir->Enable(); break; @@ -350,24 +350,24 @@ void updateToolTipDeletionHandling(wxChoice* choiceHandleError, wxPanel* customD } -FreeFileSync::DeletionPolicy SyncCfgDialog::getDeletionHandling() +ffs3::DeletionPolicy SyncCfgDialog::getDeletionHandling() { switch (m_choiceHandleDeletion->GetSelection()) { case 0: - return FreeFileSync::DELETE_PERMANENTLY; + return ffs3::DELETE_PERMANENTLY; case 1: - return FreeFileSync::MOVE_TO_RECYCLE_BIN; + return ffs3::MOVE_TO_RECYCLE_BIN; case 2: - return FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY; + return ffs3::MOVE_TO_CUSTOM_DIRECTORY; default: assert(false); - return FreeFileSync::MOVE_TO_RECYCLE_BIN; + return ffs3::MOVE_TO_RECYCLE_BIN; } } -void SyncCfgDialog::setDeletionHandling(FreeFileSync::DeletionPolicy newValue) +void SyncCfgDialog::setDeletionHandling(ffs3::DeletionPolicy newValue) { m_choiceHandleDeletion->Clear(); m_choiceHandleDeletion->Append(_("Delete permanently")); @@ -376,13 +376,13 @@ void SyncCfgDialog::setDeletionHandling(FreeFileSync::DeletionPolicy newValue) switch (newValue) { - case FreeFileSync::DELETE_PERMANENTLY: + case ffs3::DELETE_PERMANENTLY: m_choiceHandleDeletion->SetSelection(0); break; - case FreeFileSync::MOVE_TO_RECYCLE_BIN: + case ffs3::MOVE_TO_RECYCLE_BIN: m_choiceHandleDeletion->SetSelection(1); break; - case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY: + case ffs3::MOVE_TO_CUSTOM_DIRECTORY: m_choiceHandleDeletion->SetSelection(2); break; } @@ -399,21 +399,21 @@ void SyncCfgDialog::OnChangeDeletionHandling(wxCommandEvent& event) void SyncCfgDialog::OnSyncAutomatic(wxCommandEvent& event) { - FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::AUTOMATIC); + ffs3::setVariant(currentSyncConfig, SyncConfiguration::AUTOMATIC); updateConfigIcons(cmpVariant, currentSyncConfig); } void SyncCfgDialog::OnSyncLeftToRight(wxCommandEvent& event) { - FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::MIRROR); + ffs3::setVariant(currentSyncConfig, SyncConfiguration::MIRROR); updateConfigIcons(cmpVariant, currentSyncConfig); } void SyncCfgDialog::OnSyncUpdate(wxCommandEvent& event) { - FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::UPDATE); + ffs3::setVariant(currentSyncConfig, SyncConfiguration::UPDATE); updateConfigIcons(cmpVariant, currentSyncConfig); } diff --git a/ui/syncConfig.h b/ui/sync_cfg.h index dc76325c..b738111a 100644 --- a/ui/syncConfig.h +++ b/ui/sync_cfg.h @@ -8,11 +8,11 @@ #define SYNCCONFIG_H_INCLUDED #include <memory> -#include "guiGenerated.h" +#include "gui_generated.h" #include "../structures.h" -namespace FreeFileSync +namespace ffs3 { class DragDropOnDlg; } @@ -22,9 +22,9 @@ class SyncCfgDialog : public SyncCfgDlgGenerated { public: SyncCfgDialog(wxWindow* window, - const FreeFileSync::CompareVariant compareVar, - FreeFileSync::SyncConfiguration& syncConfiguration, - FreeFileSync::DeletionPolicy& handleDeletion, + const ffs3::CompareVariant compareVar, + ffs3::SyncConfiguration& syncConfiguration, + ffs3::DeletionPolicy& handleDeletion, wxString& customDeletionDirectory, bool* ignoreErrors); //optional input parameter @@ -35,8 +35,8 @@ public: BUTTON_APPLY = 10 }; - static void updateConfigIcons(const FreeFileSync::CompareVariant compareVar, - const FreeFileSync::SyncConfiguration& syncConfig, + static void updateConfigIcons(const ffs3::CompareVariant compareVar, + const ffs3::SyncConfiguration& syncConfig, wxBitmapButton* buttonLeftOnly, wxBitmapButton* buttonRightOnly, wxBitmapButton* buttonLeftNewer, @@ -51,7 +51,7 @@ public: wxStaticBitmap* bitmapConflict, wxSizer* syncDirections); //some syntax relaxation - void updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, const FreeFileSync::SyncConfiguration& syncConfig); + void updateConfigIcons(const ffs3::CompareVariant cmpVar, const ffs3::SyncConfiguration& syncConfig); private: virtual void OnSyncAutomatic( wxCommandEvent& event); @@ -78,22 +78,22 @@ private: void OnChangeErrorHandling(wxCommandEvent& event); //deletion handling - FreeFileSync::DeletionPolicy getDeletionHandling(); - void setDeletionHandling(FreeFileSync::DeletionPolicy newValue); + ffs3::DeletionPolicy getDeletionHandling(); + void setDeletionHandling(ffs3::DeletionPolicy newValue); void OnChangeDeletionHandling(wxCommandEvent& event); - const FreeFileSync::CompareVariant cmpVariant; + const ffs3::CompareVariant cmpVariant; //temporal copy of maindialog.cfg.syncConfiguration - FreeFileSync::SyncConfiguration currentSyncConfig; + ffs3::SyncConfiguration currentSyncConfig; //changing data - FreeFileSync::SyncConfiguration& refSyncConfiguration; - FreeFileSync::DeletionPolicy& refHandleDeletion; + ffs3::SyncConfiguration& refSyncConfiguration; + ffs3::DeletionPolicy& refHandleDeletion; wxString& refCustomDeletionDirectory; bool* refIgnoreErrors; - std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropCustomDelFolder; + std::auto_ptr<ffs3::DragDropOnDlg> dragDropCustomDelFolder; }; #endif // SYNCCONFIG_H_INCLUDED diff --git a/ui/trayIcon.cpp b/ui/tray_icon.cpp index 554309ca..464bf7ef 100644 --- a/ui/trayIcon.cpp +++ b/ui/tray_icon.cpp @@ -4,9 +4,9 @@ // * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "trayIcon.h" +#include "tray_icon.h" #include "../library/resources.h" -#include "smallDialogs.h" +#include "small_dlgs.h" #include <wx/taskbar.h> #include <cmath> #include <wx/image.h> @@ -198,7 +198,7 @@ void MinimizeToTray::OnContextMenuSelection(wxCommandEvent& event) switch (eventId) { case CONTEXT_ABOUT: - FreeFileSync::showAboutDialog(); + ffs3::showAboutDialog(); break; case CONTEXT_RESTORE: resumeFromTray(); diff --git a/ui/trayIcon.h b/ui/tray_icon.h index b351dfc8..b351dfc8 100644 --- a/ui/trayIcon.h +++ b/ui/tray_icon.h diff --git a/version/version.h b/version/version.h index b02ed1e0..50c34666 100644 --- a/version/version.h +++ b/version/version.h @@ -1,6 +1,6 @@ #include <wx/string.h> -namespace FreeFileSync +namespace ffs3 { - const wxString currentVersion = wxT("3.8"); //internal linkage! + const wxString currentVersion = wxT("3.9"); //internal linkage! } diff --git a/version/version.rc b/version/version.rc index 2f3df9da..72779244 100644 --- a/version/version.rc +++ b/version/version.rc @@ -1,2 +1,2 @@ -#define VER_FREEFILESYNC 3,8,0,0 -#define VER_FREEFILESYNC_STR "3.8\0" +#define VER_FREEFILESYNC 3,9,0,0 +#define VER_FREEFILESYNC_STR "3.9\0" |