From 3ac113857071fc1f225b2e1b42547269e568c6b7 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Tue, 11 Aug 2020 22:35:12 +0100 Subject: New upstream version 2.2.4.4 --- plugins/CopyEngine/README.md | 0 plugins/CopyEngine/Random/CopyEngine.cpp | 253 ++ plugins/CopyEngine/Random/CopyEngine.h | 128 ++ plugins/CopyEngine/Random/CopyEngine.pro | 26 + plugins/CopyEngine/Random/CopyEngineFactory.cpp | 78 + plugins/CopyEngine/Random/CopyEngineFactory.h | 58 + plugins/CopyEngine/Random/README.md | 3 + plugins/CopyEngine/Random/informations.xml | 24 + plugins/CopyEngine/Random/plugin.json | 1 + plugins/CopyEngine/Rsync/CopyEngine.pro | 2 + plugins/CopyEngine/Rsync/README.md | 0 plugins/CopyEngine/Rsync/Rsync.pro | 0 plugins/CopyEngine/Rsync/informations.xml | 2 +- .../Ultracopier-Spec/CallBackEventLoop.h | 15 + plugins/CopyEngine/Ultracopier-Spec/CompilerInfo.h | 1 + .../CopyEngine-collision-and-error.cpp | 719 ++++++ plugins/CopyEngine/Ultracopier-Spec/CopyEngine.cpp | 1129 +++++++++ plugins/CopyEngine/Ultracopier-Spec/CopyEngine.h | 356 +++ plugins/CopyEngine/Ultracopier-Spec/CopyEngine.pro | 115 + .../Ultracopier-Spec/CopyEngineFactory.cpp | 654 ++++++ .../Ultracopier-Spec/CopyEngineFactory.h | 127 + .../CopyEngineUltracopier-SpecVariable.h | 43 + .../CopyEngine/Ultracopier-Spec/DebugDialog.cpp | 63 + plugins/CopyEngine/Ultracopier-Spec/DebugDialog.h | 48 + .../CopyEngine/Ultracopier-Spec/DebugEngineMacro.h | 28 + plugins/CopyEngine/Ultracopier-Spec/DiskSpace.cpp | 53 + plugins/CopyEngine/Ultracopier-Spec/DiskSpace.h | 29 + plugins/CopyEngine/Ultracopier-Spec/DiskSpace.ui | 68 + .../Ultracopier-Spec/DriveManagement.cpp | 180 ++ .../CopyEngine/Ultracopier-Spec/DriveManagement.h | 34 + plugins/CopyEngine/Ultracopier-Spec/Environment.h | 11 + plugins/CopyEngine/Ultracopier-Spec/EventLoop.cpp | 71 + plugins/CopyEngine/Ultracopier-Spec/EventLoop.h | 30 + .../Ultracopier-Spec/FileErrorDialog.cpp | 209 ++ .../CopyEngine/Ultracopier-Spec/FileErrorDialog.h | 56 + .../Ultracopier-Spec/FileExistsDialog.cpp | 313 +++ .../CopyEngine/Ultracopier-Spec/FileExistsDialog.h | 68 + .../Ultracopier-Spec/FileIsSameDialog.cpp | 226 ++ .../CopyEngine/Ultracopier-Spec/FileIsSameDialog.h | 63 + .../CopyEngine/Ultracopier-Spec/FilterRules.cpp | 199 ++ plugins/CopyEngine/Ultracopier-Spec/FilterRules.h | 47 + plugins/CopyEngine/Ultracopier-Spec/FilterRules.ui | 162 ++ plugins/CopyEngine/Ultracopier-Spec/Filters.cpp | 464 ++++ plugins/CopyEngine/Ultracopier-Spec/Filters.h | 45 + plugins/CopyEngine/Ultracopier-Spec/Filters.ui | 221 ++ .../Ultracopier-Spec/FolderExistsDialog.cpp | 252 ++ .../Ultracopier-Spec/FolderExistsDialog.h | 60 + .../Ultracopier-Spec/Languages/ar/translation.qm | Bin 0 -> 20287 bytes .../Ultracopier-Spec/Languages/ar/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/de/translation.qm | Bin 0 -> 19546 bytes .../Ultracopier-Spec/Languages/de/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/el/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/el/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/en/translation.qm | Bin 0 -> 334 bytes .../Ultracopier-Spec/Languages/en/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/es/translation.qm | Bin 0 -> 23560 bytes .../Ultracopier-Spec/Languages/es/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/fr/translation.qm | Bin 0 -> 23074 bytes .../Ultracopier-Spec/Languages/fr/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/hi/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/hi/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/hu/translation.qm | Bin 0 -> 15971 bytes .../Ultracopier-Spec/Languages/hu/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/id/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/id/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/it/translation.qm | Bin 0 -> 23932 bytes .../Ultracopier-Spec/Languages/it/translation.ts | 1150 +++++++++ .../Ultracopier-Spec/Languages/ja/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/ja/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/ko/translation.qm | Bin 0 -> 2785 bytes .../Ultracopier-Spec/Languages/ko/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/nl/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/nl/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/no/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/no/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/pl/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/pl/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/pt/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/pt/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/ru/translation.qm | Bin 0 -> 6529 bytes .../Ultracopier-Spec/Languages/ru/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/th/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/th/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/tr/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/tr/translation.ts | 1147 +++++++++ .../Ultracopier-Spec/Languages/zh/translation.qm | Bin 0 -> 327 bytes .../Ultracopier-Spec/Languages/zh/translation.ts | 1147 +++++++++ plugins/CopyEngine/Ultracopier-Spec/ListThread.cpp | 1235 ++++++++++ plugins/CopyEngine/Ultracopier-Spec/ListThread.h | 437 ++++ .../Ultracopier-Spec/ListThreadActions.cpp | 129 ++ .../Ultracopier-Spec/ListThreadListChange.cpp | 423 ++++ .../Ultracopier-Spec/ListThreadMedia.cpp | 169 ++ .../CopyEngine/Ultracopier-Spec/ListThreadNew.cpp | 104 + .../Ultracopier-Spec/ListThreadOptions.cpp | 296 +++ .../CopyEngine/Ultracopier-Spec/ListThreadScan.cpp | 97 + .../CopyEngine/Ultracopier-Spec/ListThreadStat.cpp | 184 ++ .../Ultracopier-Spec/ListThread_InodeAction.cpp | 91 + plugins/CopyEngine/Ultracopier-Spec/MkPath.cpp | 676 ++++++ plugins/CopyEngine/Ultracopier-Spec/MkPath.h | 100 + plugins/CopyEngine/Ultracopier-Spec/README.md | 3 + .../CopyEngine/Ultracopier-Spec/RenamingRules.cpp | 96 + .../CopyEngine/Ultracopier-Spec/RenamingRules.h | 34 + .../CopyEngine/Ultracopier-Spec/RenamingRules.ui | 134 ++ .../Ultracopier-Spec/ScanFileOrFolder.cpp | 953 ++++++++ .../CopyEngine/Ultracopier-Spec/ScanFileOrFolder.h | 118 + .../Ultracopier-Spec/StructEnumDefinition.h | 1 + .../StructEnumDefinition_CopyEngine.h | 118 + .../CopyEngine/Ultracopier-Spec/TransferThread.cpp | 1547 +++++++++++++ .../CopyEngine/Ultracopier-Spec/TransferThread.h | 265 +++ .../Ultracopier-Spec/async/ReadThread.cpp | 883 +++++++ .../CopyEngine/Ultracopier-Spec/async/ReadThread.h | 163 ++ .../Ultracopier-Spec/async/TransferThreadAsync.cpp | 1442 ++++++++++++ .../Ultracopier-Spec/async/TransferThreadAsync.h | 153 ++ .../Ultracopier-Spec/async/WriteThread.cpp | 1164 ++++++++++ .../Ultracopier-Spec/async/WriteThread.h | 181 ++ .../Ultracopier-Spec/copyEngineOptions.ui | 602 +++++ .../Ultracopier-Spec/copyEngineResources.qrc | 8 + plugins/CopyEngine/Ultracopier-Spec/debugDialog.ui | 120 + .../CopyEngine/Ultracopier-Spec/documentation.dox | 39 + .../CopyEngine/Ultracopier-Spec/fileErrorDialog.ui | 264 +++ .../Ultracopier-Spec/fileExistsDialog.ui | 428 ++++ .../Ultracopier-Spec/fileIsSameDialog.ui | 214 ++ .../Ultracopier-Spec/folderExistsDialog.ui | 309 +++ .../CopyEngine/Ultracopier-Spec/informations.xml | 26 + plugins/CopyEngine/Ultracopier-Spec/plugin.json | 1 + plugins/CopyEngine/Ultracopier-Spec/ports.h | 6 + .../CopyEngine/Ultracopier-Spec/resources/add.png | Bin 0 -> 552 bytes .../CopyEngine/Ultracopier-Spec/resources/edit.png | Bin 0 -> 623 bytes .../Ultracopier-Spec/resources/filter.png | Bin 0 -> 685 bytes .../Ultracopier-Spec/resources/remove.png | Bin 0 -> 683 bytes plugins/CopyEngine/Ultracopier/AvancedQFile.cpp | 208 -- plugins/CopyEngine/Ultracopier/AvancedQFile.h | 45 - plugins/CopyEngine/Ultracopier/CompilerInfo.h | 1 - .../Ultracopier/CopyEngine-collision-and-error.cpp | 568 ----- plugins/CopyEngine/Ultracopier/CopyEngine.cpp | 1253 ---------- plugins/CopyEngine/Ultracopier/CopyEngine.h | 382 --- plugins/CopyEngine/Ultracopier/CopyEngine.pro | 106 - .../CopyEngine/Ultracopier/CopyEngineFactory.cpp | 709 ------ plugins/CopyEngine/Ultracopier/CopyEngineFactory.h | 133 -- plugins/CopyEngine/Ultracopier/DebugDialog.cpp | 54 - plugins/CopyEngine/Ultracopier/DebugDialog.h | 39 - plugins/CopyEngine/Ultracopier/DebugEngineMacro.h | 28 - plugins/CopyEngine/Ultracopier/DiskSpace.cpp | 53 - plugins/CopyEngine/Ultracopier/DiskSpace.h | 29 - plugins/CopyEngine/Ultracopier/DiskSpace.ui | 68 - plugins/CopyEngine/Ultracopier/DriveManagement.cpp | 105 - plugins/CopyEngine/Ultracopier/DriveManagement.h | 34 - plugins/CopyEngine/Ultracopier/Environment.h | 11 - plugins/CopyEngine/Ultracopier/FileErrorDialog.cpp | 163 -- plugins/CopyEngine/Ultracopier/FileErrorDialog.h | 51 - .../CopyEngine/Ultracopier/FileExistsDialog.cpp | 240 -- plugins/CopyEngine/Ultracopier/FileExistsDialog.h | 60 - .../CopyEngine/Ultracopier/FileIsSameDialog.cpp | 190 -- plugins/CopyEngine/Ultracopier/FileIsSameDialog.h | 57 - plugins/CopyEngine/Ultracopier/FilterRules.cpp | 193 -- plugins/CopyEngine/Ultracopier/FilterRules.h | 46 - plugins/CopyEngine/Ultracopier/FilterRules.ui | 162 -- plugins/CopyEngine/Ultracopier/Filters.cpp | 460 ---- plugins/CopyEngine/Ultracopier/Filters.h | 45 - plugins/CopyEngine/Ultracopier/Filters.ui | 194 -- .../CopyEngine/Ultracopier/FolderExistsDialog.cpp | 202 -- .../CopyEngine/Ultracopier/FolderExistsDialog.h | 57 - .../Ultracopier/Languages/ar/translation.ts | 1291 ----------- .../Ultracopier/Languages/de/translation.ts | 1292 ----------- .../Ultracopier/Languages/el/translation.ts | 1291 ----------- .../Ultracopier/Languages/en/translation.ts | 1291 ----------- .../Ultracopier/Languages/es/translation.ts | 1291 ----------- .../Ultracopier/Languages/fr/translation.ts | 1292 ----------- .../Ultracopier/Languages/hi/translation.ts | 1291 ----------- .../Ultracopier/Languages/hu/translation.ts | 1291 ----------- .../Ultracopier/Languages/id/translation.ts | 1291 ----------- .../Ultracopier/Languages/it/translation.ts | 1297 ----------- .../Ultracopier/Languages/ja/translation.ts | 1291 ----------- .../Ultracopier/Languages/ko/translation.ts | 1291 ----------- .../Ultracopier/Languages/nl/translation.ts | 1291 ----------- .../Ultracopier/Languages/no/translation.ts | 1291 ----------- .../Ultracopier/Languages/pl/translation.ts | 1291 ----------- .../Ultracopier/Languages/pt/translation.ts | 1291 ----------- .../Ultracopier/Languages/ru/translation.ts | 1291 ----------- .../Ultracopier/Languages/th/translation.ts | 1291 ----------- .../Ultracopier/Languages/tr/translation.ts | 1291 ----------- .../Ultracopier/Languages/zh/translation.ts | 1291 ----------- plugins/CopyEngine/Ultracopier/ListThread.cpp | 2429 -------------------- plugins/CopyEngine/Ultracopier/ListThread.h | 432 ---- .../Ultracopier/ListThread_InodeAction.cpp | 64 - plugins/CopyEngine/Ultracopier/MkPath.cpp | 517 ----- plugins/CopyEngine/Ultracopier/MkPath.h | 106 - plugins/CopyEngine/Ultracopier/README.md | 3 - plugins/CopyEngine/Ultracopier/ReadThread.cpp | 699 ------ plugins/CopyEngine/Ultracopier/ReadThread.h | 147 -- plugins/CopyEngine/Ultracopier/RenamingRules.cpp | 85 - plugins/CopyEngine/Ultracopier/RenamingRules.h | 34 - plugins/CopyEngine/Ultracopier/RenamingRules.ui | 134 -- .../CopyEngine/Ultracopier/ScanFileOrFolder.cpp | 680 ------ plugins/CopyEngine/Ultracopier/ScanFileOrFolder.h | 108 - .../CopyEngine/Ultracopier/StructEnumDefinition.h | 1 - .../Ultracopier/StructEnumDefinition_CopyEngine.h | 124 - plugins/CopyEngine/Ultracopier/TransferThread.cpp | 2101 ----------------- plugins/CopyEngine/Ultracopier/TransferThread.h | 292 --- plugins/CopyEngine/Ultracopier/Variable.h | 45 - plugins/CopyEngine/Ultracopier/WriteThread.cpp | 976 -------- plugins/CopyEngine/Ultracopier/WriteThread.h | 160 -- .../CopyEngine/Ultracopier/copyEngineOptions.ui | 771 ------- .../CopyEngine/Ultracopier/copyEngineResources.qrc | 8 - plugins/CopyEngine/Ultracopier/debugDialog.ui | 98 - plugins/CopyEngine/Ultracopier/documentation.dox | 39 - plugins/CopyEngine/Ultracopier/fileErrorDialog.ui | 264 --- plugins/CopyEngine/Ultracopier/fileExistsDialog.ui | 412 ---- plugins/CopyEngine/Ultracopier/fileIsSameDialog.ui | 214 -- .../CopyEngine/Ultracopier/folderExistsDialog.ui | 309 --- plugins/CopyEngine/Ultracopier/informations.xml | 26 - plugins/CopyEngine/Ultracopier/plugin.json | 1 - plugins/CopyEngine/Ultracopier/resources/add.png | Bin 552 -> 0 bytes plugins/CopyEngine/Ultracopier/resources/edit.png | Bin 623 -> 0 bytes .../CopyEngine/Ultracopier/resources/filter.png | Bin 685 -> 0 bytes .../CopyEngine/Ultracopier/resources/remove.png | Bin 683 -> 0 bytes plugins/Languages/README.md | 0 plugins/Languages/ar/flag.png | Bin plugins/Languages/ar/informations.xml | 6 +- plugins/Languages/ar/translation.qm | Bin 0 -> 28595 bytes plugins/Languages/ar/translation.ts | 1857 +++++++-------- plugins/Languages/de/informations.xml | 2 +- plugins/Languages/de/translation.qm | Bin 0 -> 30785 bytes plugins/Languages/de/translation.ts | 1444 ++++++------ plugins/Languages/el/flag.png | Bin plugins/Languages/el/informations.xml | 2 +- plugins/Languages/el/translation.qm | Bin 0 -> 327 bytes plugins/Languages/el/translation.ts | 1287 +++++------ plugins/Languages/en/translation.qm | 1 + plugins/Languages/es/flag.png | Bin plugins/Languages/es/informations.xml | 2 +- plugins/Languages/es/translation.qm | Bin 0 -> 31962 bytes plugins/Languages/es/translation.ts | 1343 +++++------ plugins/Languages/fr/flag.png | Bin plugins/Languages/fr/informations.xml | 2 +- plugins/Languages/fr/translation.qm | Bin 0 -> 32564 bytes plugins/Languages/fr/translation.ts | 1299 +++++------ plugins/Languages/hi/flag.png | Bin plugins/Languages/hi/informations.xml | 2 +- plugins/Languages/hi/translation.qm | Bin 0 -> 334 bytes plugins/Languages/hi/translation.ts | 1287 +++++------ plugins/Languages/hu/flag.png | Bin plugins/Languages/hu/informations.xml | 2 +- plugins/Languages/hu/translation.qm | Bin 0 -> 23508 bytes plugins/Languages/hu/translation.ts | 1292 +++++------ plugins/Languages/id/flag.png | Bin plugins/Languages/id/informations.xml | 2 +- plugins/Languages/id/translation.qm | Bin 0 -> 327 bytes plugins/Languages/id/translation.ts | 1287 +++++------ plugins/Languages/it/informations.xml | 2 +- plugins/Languages/it/translation.qm | Bin 0 -> 32517 bytes plugins/Languages/it/translation.ts | 1574 ++++++------- plugins/Languages/ja/flag.png | Bin plugins/Languages/ja/informations.xml | 2 +- plugins/Languages/ja/translation.qm | Bin 0 -> 327 bytes plugins/Languages/ja/translation.ts | 1287 +++++------ plugins/Languages/ko/flag.png | Bin plugins/Languages/ko/informations.xml | 2 +- plugins/Languages/ko/translation.qm | Bin 0 -> 8248 bytes plugins/Languages/ko/translation.ts | 1289 +++++------ plugins/Languages/nl/flag.png | Bin plugins/Languages/nl/informations.xml | 2 +- plugins/Languages/nl/translation.qm | Bin 0 -> 327 bytes plugins/Languages/nl/translation.ts | 1287 +++++------ plugins/Languages/no/flag.png | Bin plugins/Languages/no/informations.xml | 2 +- plugins/Languages/no/translation.qm | Bin 0 -> 327 bytes plugins/Languages/no/translation.ts | 1287 +++++------ plugins/Languages/pl/flag.png | Bin plugins/Languages/pl/informations.xml | 2 +- plugins/Languages/pl/translation.qm | Bin 0 -> 327 bytes plugins/Languages/pl/translation.ts | 1287 +++++------ plugins/Languages/pt/flag.png | Bin plugins/Languages/pt/informations.xml | 2 +- plugins/Languages/pt/translation.qm | Bin 0 -> 327 bytes plugins/Languages/pt/translation.ts | 1287 +++++------ plugins/Languages/ru/flag.png | Bin plugins/Languages/ru/informations.xml | 2 +- plugins/Languages/ru/translation.qm | Bin 0 -> 15940 bytes plugins/Languages/ru/translation.ts | 1287 +++++------ plugins/Languages/th/flag.png | Bin plugins/Languages/th/informations.xml | 2 +- plugins/Languages/th/translation.qm | Bin 0 -> 327 bytes plugins/Languages/th/translation.ts | 1287 +++++------ plugins/Languages/tr/flag.png | Bin plugins/Languages/tr/informations.xml | 2 +- plugins/Languages/tr/translation.qm | Bin 0 -> 327 bytes plugins/Languages/tr/translation.ts | 1287 +++++------ plugins/Languages/zh/flag.png | Bin plugins/Languages/zh/informations.xml | 2 +- plugins/Languages/zh/translation.qm | Bin 0 -> 412 bytes plugins/Languages/zh/translation.ts | 1424 +++++------- plugins/Languages/zh_TW/flag.png | Bin plugins/Languages/zh_TW/informations.xml | 2 +- plugins/Languages/zh_TW/translation.qm | Bin 0 -> 2444 bytes plugins/Languages/zh_TW/translation.ts | 1287 +++++------ plugins/Listener/README.md | 0 .../Listener/catchcopy-v0002/DebugEngineMacro.h | 0 plugins/Listener/catchcopy-v0002/Environment.h | 2 +- .../Listenercatchcopy-v0002Variable.h | 15 + plugins/Listener/catchcopy-v0002/README.md | 0 .../catchcopy-v0002/StructEnumDefinition.h | 0 plugins/Listener/catchcopy-v0002/Variable.h | 15 - .../catchcopy-api-0002/ClientCatchcopy.cpp | 0 .../catchcopy-api-0002/ClientCatchcopy.h | 0 .../catchcopy-api-0002/ExtraSocketCatchcopy.cpp | 0 .../catchcopy-api-0002/ExtraSocketCatchcopy.h | 0 .../catchcopy-api-0002/ServerCatchcopy.cpp | 0 .../catchcopy-api-0002/ServerCatchcopy.h | 0 .../catchcopy-api-0002/VariablesCatchcopy.h | 0 plugins/Listener/catchcopy-v0002/documentation.dox | 0 plugins/Listener/catchcopy-v0002/informations.xml | 2 +- plugins/Listener/catchcopy-v0002/listener.cpp | 0 plugins/Listener/catchcopy-v0002/listener.h | 18 +- plugins/Listener/catchcopy-v0002/listener.pro | 2 +- plugins/Listener/catchcopy-v0002/plugin.json | 0 plugins/PluginLoader/README.md | 0 .../catchcopy-v0002/DebugEngineMacro.h | 0 plugins/PluginLoader/catchcopy-v0002/Environment.h | 2 +- .../catchcopy-v0002/Languages/ar/translation.qm | Bin 0 -> 1059 bytes .../catchcopy-v0002/Languages/ar/translation.ts | 8 +- .../catchcopy-v0002/Languages/de/translation.qm | Bin 0 -> 1136 bytes .../catchcopy-v0002/Languages/de/translation.ts | 4 +- .../catchcopy-v0002/Languages/el/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/el/translation.ts | 0 .../catchcopy-v0002/Languages/en/translation.qm | Bin 0 -> 334 bytes .../catchcopy-v0002/Languages/en/translation.ts | 0 .../catchcopy-v0002/Languages/es/translation.qm | Bin 0 -> 487 bytes .../catchcopy-v0002/Languages/es/translation.ts | 0 .../catchcopy-v0002/Languages/fr/translation.qm | Bin 0 -> 1246 bytes .../catchcopy-v0002/Languages/fr/translation.ts | 0 .../catchcopy-v0002/Languages/hi/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/hi/translation.ts | 0 .../catchcopy-v0002/Languages/hu/translation.qm | Bin 0 -> 989 bytes .../catchcopy-v0002/Languages/hu/translation.ts | 0 .../catchcopy-v0002/Languages/id/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/id/translation.ts | 0 .../catchcopy-v0002/Languages/it/translation.qm | Bin 0 -> 1300 bytes .../catchcopy-v0002/Languages/it/translation.ts | 6 +- .../catchcopy-v0002/Languages/ja/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/ja/translation.ts | 0 .../catchcopy-v0002/Languages/ko/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/ko/translation.ts | 0 .../catchcopy-v0002/Languages/nl/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/nl/translation.ts | 0 .../catchcopy-v0002/Languages/no/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/no/translation.ts | 0 .../catchcopy-v0002/Languages/pl/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/pl/translation.ts | 0 .../catchcopy-v0002/Languages/pt/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/pt/translation.ts | 0 .../catchcopy-v0002/Languages/ru/translation.qm | Bin 0 -> 498 bytes .../catchcopy-v0002/Languages/ru/translation.ts | 0 .../catchcopy-v0002/Languages/th/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/th/translation.ts | 0 .../catchcopy-v0002/Languages/tr/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/tr/translation.ts | 0 .../catchcopy-v0002/Languages/zh/translation.qm | Bin 0 -> 327 bytes .../catchcopy-v0002/Languages/zh/translation.ts | 0 .../PluginLoader/catchcopy-v0002/OptionsWidget.cpp | 0 .../PluginLoader/catchcopy-v0002/OptionsWidget.h | 0 .../PluginLoader/catchcopy-v0002/OptionsWidget.ui | 0 .../PluginLoader/catchcopy-v0002/PlatformMacro.h | 0 .../PluginLoadercatchcopy-v0002Variable.h | 16 + plugins/PluginLoader/catchcopy-v0002/README.md | 0 .../catchcopy-v0002/StructEnumDefinition.h | 0 plugins/PluginLoader/catchcopy-v0002/Variable.h | 16 - .../PluginLoader/catchcopy-v0002/documentation.dox | 0 .../PluginLoader/catchcopy-v0002/informations.xml | 2 +- plugins/PluginLoader/catchcopy-v0002/plugin.json | 0 .../PluginLoader/catchcopy-v0002/pluginLoader.cpp | 0 .../PluginLoader/catchcopy-v0002/pluginLoader.h | 8 +- .../PluginLoader/catchcopy-v0002/pluginLoader.pro | 2 +- plugins/README.md | 0 plugins/SessionLoader/README.md | 0 plugins/SessionLoader/Windows/DebugEngineMacro.h | 0 plugins/SessionLoader/Windows/Environment.h | 2 +- plugins/SessionLoader/Windows/README.md | 0 .../Windows/SessionLoaderWindowsVariable.h | 15 + .../SessionLoader/Windows/StructEnumDefinition.h | 0 plugins/SessionLoader/Windows/Variable.h | 15 - plugins/SessionLoader/Windows/documentation.dox | 0 plugins/SessionLoader/Windows/informations.xml | 2 +- plugins/SessionLoader/Windows/plugin.json | 0 plugins/SessionLoader/Windows/sessionLoader.cpp | 0 plugins/SessionLoader/Windows/sessionLoader.h | 0 plugins/SessionLoader/Windows/sessionLoader.pro | 2 +- .../Windows/sessionLoader.pro.user.4.8-pre1 | 333 +++ .../sessionLoader.pro.user.74ab603.4.8-pre1 | 333 +++ plugins/Themes/Oxygen/DebugEngineMacro.h | 0 plugins/Themes/Oxygen/Environment.h | 2 +- plugins/Themes/Oxygen/Languages/ar/translation.qm | Bin 0 -> 5785 bytes plugins/Themes/Oxygen/Languages/ar/translation.ts | 166 +- plugins/Themes/Oxygen/Languages/de/translation.qm | Bin 0 -> 6711 bytes plugins/Themes/Oxygen/Languages/de/translation.ts | 50 +- plugins/Themes/Oxygen/Languages/el/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/el/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/en/translation.qm | Bin 0 -> 334 bytes plugins/Themes/Oxygen/Languages/en/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/es/translation.qm | Bin 0 -> 6167 bytes plugins/Themes/Oxygen/Languages/es/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/fr/translation.qm | Bin 0 -> 6346 bytes plugins/Themes/Oxygen/Languages/fr/translation.ts | 16 +- plugins/Themes/Oxygen/Languages/hi/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/hi/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/hu/translation.qm | Bin 0 -> 5951 bytes plugins/Themes/Oxygen/Languages/hu/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/id/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/id/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/it/translation.qm | Bin 0 -> 6445 bytes plugins/Themes/Oxygen/Languages/it/translation.ts | 128 +- plugins/Themes/Oxygen/Languages/ja/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/ja/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/ko/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/ko/translation.ts | 16 +- plugins/Themes/Oxygen/Languages/nl/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/nl/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/no/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/no/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/pl/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/pl/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/pt/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/pt/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/ru/translation.qm | Bin 0 -> 1630 bytes plugins/Themes/Oxygen/Languages/ru/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/th/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/th/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/tr/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/tr/translation.ts | 40 +- plugins/Themes/Oxygen/Languages/zh/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen/Languages/zh/translation.ts | 40 +- plugins/Themes/Oxygen/OxygenVariable.h | 18 + plugins/Themes/Oxygen/README.md | 0 plugins/Themes/Oxygen/StructEnumDefinition.h | 0 plugins/Themes/Oxygen/ThemesFactory.cpp | 0 plugins/Themes/Oxygen/ThemesFactory.h | 0 plugins/Themes/Oxygen/TransferModel.cpp | 0 plugins/Themes/Oxygen/TransferModel.h | 0 plugins/Themes/Oxygen/Variable.h | 18 - plugins/Themes/Oxygen/documentation.dox | 0 plugins/Themes/Oxygen/informations.xml | 2 +- plugins/Themes/Oxygen/interface.cpp | 48 +- plugins/Themes/Oxygen/interface.h | 5 + plugins/Themes/Oxygen/interface.pro | 2 + plugins/Themes/Oxygen/interface.ui | 0 plugins/Themes/Oxygen/interfaceInclude.pri | 4 +- plugins/Themes/Oxygen/interfaceResources.qrc | 0 plugins/Themes/Oxygen/interfaceResources_unix.qrc | 0 .../Themes/Oxygen/interfaceResources_windows.qrc | 0 plugins/Themes/Oxygen/options.ui | 0 plugins/Themes/Oxygen/plugin.json | 0 .../Themes/Oxygen/resources/SystemTrayIcon/add.png | Bin .../Oxygen/resources/SystemTrayIcon/exit.png | Bin .../resources/SystemTrayIcon/informations.png | Bin .../Oxygen/resources/SystemTrayIcon/options.png | Bin .../SystemTrayIcon/systray_Caught_Unix.png | Bin .../SystemTrayIcon/systray_Caught_Windows.png | Bin .../SystemTrayIcon/systray_Semiuncaught_Unix.png | Bin .../systray_Semiuncaught_Windows.png | Bin .../SystemTrayIcon/systray_Uncaught_Unix.png | Bin .../SystemTrayIcon/systray_Uncaught_Windows.png | Bin plugins/Themes/Oxygen/resources/add.png | Bin plugins/Themes/Oxygen/resources/cancel.png | Bin .../Oxygen/resources/export-transfer-list.png | Bin .../Oxygen/resources/import-transfer-list.png | Bin plugins/Themes/Oxygen/resources/main.png | Bin plugins/Themes/Oxygen/resources/moveDown.png | Bin plugins/Themes/Oxygen/resources/moveUp.png | Bin plugins/Themes/Oxygen/resources/player_end.png | Bin plugins/Themes/Oxygen/resources/player_pause.png | Bin plugins/Themes/Oxygen/resources/player_play.png | Bin plugins/Themes/Oxygen/resources/putOnBottom.png | Bin plugins/Themes/Oxygen/resources/putOnTop.png | Bin plugins/Themes/Oxygen/resources/remove.png | Bin plugins/Themes/Oxygen/resources/search.png | Bin plugins/Themes/Oxygen/themesOptions.ui | 0 plugins/Themes/Oxygen2/DarkButton.cpp | 99 + plugins/Themes/Oxygen2/DarkButton.h | 22 + plugins/Themes/Oxygen2/DebugEngineMacro.h | 28 + plugins/Themes/Oxygen2/Environment.h | 10 + plugins/Themes/Oxygen2/Languages/ar/translation.qm | Bin 0 -> 6338 bytes plugins/Themes/Oxygen2/Languages/ar/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/de/translation.qm | Bin 0 -> 7079 bytes plugins/Themes/Oxygen2/Languages/de/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/el/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/el/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/en/translation.qm | Bin 0 -> 334 bytes plugins/Themes/Oxygen2/Languages/en/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/es/translation.qm | Bin 0 -> 6112 bytes plugins/Themes/Oxygen2/Languages/es/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/fr/translation.qm | Bin 0 -> 6702 bytes plugins/Themes/Oxygen2/Languages/fr/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/hi/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/hi/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/hu/translation.qm | Bin 0 -> 5898 bytes plugins/Themes/Oxygen2/Languages/hu/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/id/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/id/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/it/translation.qm | Bin 0 -> 7360 bytes plugins/Themes/Oxygen2/Languages/it/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/ja/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/ja/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/ko/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/ko/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/nl/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/nl/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/no/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/no/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/pl/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/pl/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/pt/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/pt/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/ru/translation.qm | Bin 0 -> 1581 bytes plugins/Themes/Oxygen2/Languages/ru/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/th/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/th/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/tr/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/tr/translation.ts | 382 +++ plugins/Themes/Oxygen2/Languages/zh/translation.qm | Bin 0 -> 327 bytes plugins/Themes/Oxygen2/Languages/zh/translation.ts | 382 +++ plugins/Themes/Oxygen2/Oxygen2Environment.h | 10 + plugins/Themes/Oxygen2/Oxygen2Variable.h | 18 + plugins/Themes/Oxygen2/ProgressBarDark.cpp | 69 + plugins/Themes/Oxygen2/ProgressBarDark.h | 17 + plugins/Themes/Oxygen2/README.md | 4 + plugins/Themes/Oxygen2/StructEnumDefinition.h | 1 + plugins/Themes/Oxygen2/ThemesFactory.cpp | 573 +++++ plugins/Themes/Oxygen2/ThemesFactory.h | 89 + plugins/Themes/Oxygen2/TransferModel.cpp | 755 ++++++ plugins/Themes/Oxygen2/TransferModel.h | 106 + plugins/Themes/Oxygen2/VerticalLabel.cpp | 44 + plugins/Themes/Oxygen2/VerticalLabel.h | 21 + plugins/Themes/Oxygen2/chartarea.cpp | 117 + plugins/Themes/Oxygen2/chartarea.h | 31 + plugins/Themes/Oxygen2/documentation.dox | 31 + plugins/Themes/Oxygen2/fileTree.cpp | 149 ++ plugins/Themes/Oxygen2/fileTree.h | 133 ++ plugins/Themes/Oxygen2/informations.xml | 26 + plugins/Themes/Oxygen2/interface.cpp | 1995 ++++++++++++++++ plugins/Themes/Oxygen2/interface.h | 259 +++ plugins/Themes/Oxygen2/interface.pro | 8 + plugins/Themes/Oxygen2/interface.ui | 1098 +++++++++ plugins/Themes/Oxygen2/interfaceInclude.pri | 73 + plugins/Themes/Oxygen2/interfaceResources.qrc | 36 + plugins/Themes/Oxygen2/interfaceResources_unix.qrc | 7 + .../Themes/Oxygen2/interfaceResources_windows.qrc | 7 + plugins/Themes/Oxygen2/options.ui | 280 +++ plugins/Themes/Oxygen2/plugin.json | 1 + plugins/Themes/Oxygen2/radialMap/labels.cpp | 338 +++ plugins/Themes/Oxygen2/radialMap/map.cpp | 421 ++++ plugins/Themes/Oxygen2/radialMap/map.h | 85 + plugins/Themes/Oxygen2/radialMap/radialMap.h | 109 + plugins/Themes/Oxygen2/radialMap/widget.cpp | 211 ++ plugins/Themes/Oxygen2/radialMap/widget.h | 118 + plugins/Themes/Oxygen2/radialMap/widgetEvents.cpp | 254 ++ .../Oxygen2/resources/SystemTrayIcon/add.png | Bin 0 -> 552 bytes .../Oxygen2/resources/SystemTrayIcon/exit.png | Bin 0 -> 874 bytes .../resources/SystemTrayIcon/informations.png | Bin 0 -> 841 bytes .../Oxygen2/resources/SystemTrayIcon/options.png | Bin 0 -> 624 bytes .../SystemTrayIcon/systray_Caught_Unix.png | Bin 0 -> 1093 bytes .../SystemTrayIcon/systray_Caught_Windows.png | Bin 0 -> 623 bytes .../SystemTrayIcon/systray_Semiuncaught_Unix.png | Bin 0 -> 1174 bytes .../systray_Semiuncaught_Windows.png | Bin 0 -> 677 bytes .../SystemTrayIcon/systray_Uncaught_Unix.png | Bin 0 -> 665 bytes .../SystemTrayIcon/systray_Uncaught_Windows.png | Bin 0 -> 439 bytes plugins/Themes/Oxygen2/resources/add.png | Bin 0 -> 552 bytes plugins/Themes/Oxygen2/resources/cancel.png | Bin 0 -> 874 bytes plugins/Themes/Oxygen2/resources/cancelDarkD.png | Bin 0 -> 151 bytes plugins/Themes/Oxygen2/resources/cancelDarkE.png | Bin 0 -> 473 bytes plugins/Themes/Oxygen2/resources/click.opus | Bin 0 -> 632 bytes plugins/Themes/Oxygen2/resources/darkButton.png | Bin 0 -> 3632 bytes .../Themes/Oxygen2/resources/darkButtonOver.png | Bin 0 -> 4286 bytes .../Themes/Oxygen2/resources/darkButtonPushed.png | Bin 0 -> 3541 bytes plugins/Themes/Oxygen2/resources/darkmoveDown.png | Bin 0 -> 1349 bytes plugins/Themes/Oxygen2/resources/darkmoveUp.png | Bin 0 -> 1530 bytes .../Themes/Oxygen2/resources/darkplayer_end.png | Bin 0 -> 1153 bytes .../Themes/Oxygen2/resources/darkplayer_pause.png | Bin 0 -> 1059 bytes .../Themes/Oxygen2/resources/darkplayer_play.png | Bin 0 -> 1166 bytes .../Oxygen2/resources/export-transfer-list.png | Bin 0 -> 455 bytes .../Oxygen2/resources/import-transfer-list.png | Bin 0 -> 454 bytes plugins/Themes/Oxygen2/resources/main.png | Bin 0 -> 623 bytes plugins/Themes/Oxygen2/resources/moveDown.png | Bin 0 -> 466 bytes plugins/Themes/Oxygen2/resources/moveUp.png | Bin 0 -> 466 bytes plugins/Themes/Oxygen2/resources/over.opus | Bin 0 -> 527 bytes plugins/Themes/Oxygen2/resources/player_end.png | Bin 0 -> 696 bytes plugins/Themes/Oxygen2/resources/player_pause.png | Bin 0 -> 640 bytes plugins/Themes/Oxygen2/resources/player_play.png | Bin 0 -> 673 bytes plugins/Themes/Oxygen2/resources/progressBarin.png | Bin 0 -> 4487 bytes .../Themes/Oxygen2/resources/progressBarout.png | Bin 0 -> 1287 bytes plugins/Themes/Oxygen2/resources/putOnBottom.png | Bin 0 -> 676 bytes plugins/Themes/Oxygen2/resources/putOnTop.png | Bin 0 -> 681 bytes plugins/Themes/Oxygen2/resources/remove.png | Bin 0 -> 683 bytes plugins/Themes/Oxygen2/resources/search.png | Bin 0 -> 781 bytes plugins/Themes/Oxygen2/themesOptions.ui | 466 ++++ plugins/Themes/README.md | 0 plugins/Themes/Supercopier/README.md | 0 plugins/Themes/Supercopier/informations.xml | 2 +- plugins/Themes/Supercopier/interface.pro | 2 + .../Themes/Supercopier/interface.pro.user.4.8-pre1 | 328 +++ plugins/Themes/Supercopier/interfaceResources.qrc | 0 .../Themes/Supercopier/interfaceResources_unix.qrc | 0 .../Supercopier/interfaceResources_windows.qrc | 0 .../Supercopier/resources/SystemTrayIcon/add.png | Bin .../Supercopier/resources/SystemTrayIcon/exit.png | Bin .../resources/SystemTrayIcon/informations.png | Bin .../resources/SystemTrayIcon/options.png | Bin .../SystemTrayIcon/systray_Caught_Unix.png | Bin .../SystemTrayIcon/systray_Caught_Windows.png | Bin .../SystemTrayIcon/systray_Semiuncaught_Unix.png | Bin .../systray_Semiuncaught_Windows.png | Bin .../SystemTrayIcon/systray_Uncaught_Unix.png | Bin .../SystemTrayIcon/systray_Uncaught_Windows.png | Bin plugins/Themes/Supercopier/resources/add.png | Bin plugins/Themes/Supercopier/resources/cancel.png | Bin .../Supercopier/resources/export-transfer-list.png | Bin .../Supercopier/resources/import-transfer-list.png | Bin plugins/Themes/Supercopier/resources/main.png | Bin plugins/Themes/Supercopier/resources/moveDown.png | Bin plugins/Themes/Supercopier/resources/moveUp.png | Bin .../Themes/Supercopier/resources/player_end.png | Bin .../Themes/Supercopier/resources/player_pause.png | Bin .../Themes/Supercopier/resources/player_play.png | Bin .../Supercopier/resources/progressbarleft.png | Bin .../Supercopier/resources/progressbarright.png | Bin .../Themes/Supercopier/resources/putOnBottom.png | Bin plugins/Themes/Supercopier/resources/putOnTop.png | Bin plugins/Themes/Supercopier/resources/remove.png | Bin plugins/Themes/Supercopier/resources/search.png | Bin plugins/static-plugins-oxygen.qrc | 3 +- plugins/static-plugins-windows.qrc | 1 - plugins/static-plugins.qrc | 9 +- 631 files changed, 72312 insertions(+), 58641 deletions(-) mode change 100644 => 100755 plugins/CopyEngine/README.md create mode 100755 plugins/CopyEngine/Random/CopyEngine.cpp create mode 100755 plugins/CopyEngine/Random/CopyEngine.h create mode 100755 plugins/CopyEngine/Random/CopyEngine.pro create mode 100755 plugins/CopyEngine/Random/CopyEngineFactory.cpp create mode 100755 plugins/CopyEngine/Random/CopyEngineFactory.h create mode 100755 plugins/CopyEngine/Random/README.md create mode 100755 plugins/CopyEngine/Random/informations.xml create mode 100755 plugins/CopyEngine/Random/plugin.json create mode 100755 plugins/CopyEngine/Rsync/CopyEngine.pro mode change 100644 => 100755 plugins/CopyEngine/Rsync/README.md mode change 100644 => 100755 plugins/CopyEngine/Rsync/Rsync.pro mode change 100644 => 100755 plugins/CopyEngine/Rsync/informations.xml create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CallBackEventLoop.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CompilerInfo.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CopyEngine-collision-and-error.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CopyEngine.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CopyEngine.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CopyEngine.pro create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/CopyEngineUltracopier-SpecVariable.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/DebugDialog.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/DebugDialog.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/DebugEngineMacro.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/DiskSpace.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/DiskSpace.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/DiskSpace.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/DriveManagement.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/DriveManagement.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Environment.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/EventLoop.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/EventLoop.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FilterRules.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FilterRules.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FilterRules.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Filters.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Filters.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Filters.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.qm create mode 100644 plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.qm create mode 100755 plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.ts create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThread.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThread.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThreadActions.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThreadListChange.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThreadMedia.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThreadNew.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThreadOptions.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThreadScan.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThreadStat.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ListThread_InodeAction.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/MkPath.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/MkPath.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/README.md create mode 100755 plugins/CopyEngine/Ultracopier-Spec/RenamingRules.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/RenamingRules.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/RenamingRules.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition_CopyEngine.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/TransferThread.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/TransferThread.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.cpp create mode 100755 plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/copyEngineOptions.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/copyEngineResources.qrc create mode 100755 plugins/CopyEngine/Ultracopier-Spec/debugDialog.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/documentation.dox create mode 100755 plugins/CopyEngine/Ultracopier-Spec/fileErrorDialog.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/fileExistsDialog.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/fileIsSameDialog.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/folderExistsDialog.ui create mode 100755 plugins/CopyEngine/Ultracopier-Spec/informations.xml create mode 100755 plugins/CopyEngine/Ultracopier-Spec/plugin.json create mode 100755 plugins/CopyEngine/Ultracopier-Spec/ports.h create mode 100755 plugins/CopyEngine/Ultracopier-Spec/resources/add.png create mode 100755 plugins/CopyEngine/Ultracopier-Spec/resources/edit.png create mode 100755 plugins/CopyEngine/Ultracopier-Spec/resources/filter.png create mode 100755 plugins/CopyEngine/Ultracopier-Spec/resources/remove.png delete mode 100644 plugins/CopyEngine/Ultracopier/AvancedQFile.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/AvancedQFile.h delete mode 100644 plugins/CopyEngine/Ultracopier/CompilerInfo.h delete mode 100644 plugins/CopyEngine/Ultracopier/CopyEngine-collision-and-error.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/CopyEngine.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/CopyEngine.h delete mode 100644 plugins/CopyEngine/Ultracopier/CopyEngine.pro delete mode 100644 plugins/CopyEngine/Ultracopier/CopyEngineFactory.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/CopyEngineFactory.h delete mode 100644 plugins/CopyEngine/Ultracopier/DebugDialog.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/DebugDialog.h delete mode 100644 plugins/CopyEngine/Ultracopier/DebugEngineMacro.h delete mode 100644 plugins/CopyEngine/Ultracopier/DiskSpace.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/DiskSpace.h delete mode 100644 plugins/CopyEngine/Ultracopier/DiskSpace.ui delete mode 100644 plugins/CopyEngine/Ultracopier/DriveManagement.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/DriveManagement.h delete mode 100644 plugins/CopyEngine/Ultracopier/Environment.h delete mode 100644 plugins/CopyEngine/Ultracopier/FileErrorDialog.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/FileErrorDialog.h delete mode 100644 plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/FileExistsDialog.h delete mode 100644 plugins/CopyEngine/Ultracopier/FileIsSameDialog.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/FileIsSameDialog.h delete mode 100644 plugins/CopyEngine/Ultracopier/FilterRules.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/FilterRules.h delete mode 100644 plugins/CopyEngine/Ultracopier/FilterRules.ui delete mode 100644 plugins/CopyEngine/Ultracopier/Filters.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/Filters.h delete mode 100644 plugins/CopyEngine/Ultracopier/Filters.ui delete mode 100644 plugins/CopyEngine/Ultracopier/FolderExistsDialog.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/FolderExistsDialog.h delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/ar/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/de/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/el/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/en/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/es/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/fr/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/hi/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/hu/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/id/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/it/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/ja/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/ko/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/nl/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/no/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/pl/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/pt/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/ru/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/th/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/tr/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/Languages/zh/translation.ts delete mode 100644 plugins/CopyEngine/Ultracopier/ListThread.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/ListThread.h delete mode 100644 plugins/CopyEngine/Ultracopier/ListThread_InodeAction.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/MkPath.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/MkPath.h delete mode 100644 plugins/CopyEngine/Ultracopier/README.md delete mode 100644 plugins/CopyEngine/Ultracopier/ReadThread.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/ReadThread.h delete mode 100644 plugins/CopyEngine/Ultracopier/RenamingRules.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/RenamingRules.h delete mode 100644 plugins/CopyEngine/Ultracopier/RenamingRules.ui delete mode 100644 plugins/CopyEngine/Ultracopier/ScanFileOrFolder.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/ScanFileOrFolder.h delete mode 100644 plugins/CopyEngine/Ultracopier/StructEnumDefinition.h delete mode 100644 plugins/CopyEngine/Ultracopier/StructEnumDefinition_CopyEngine.h delete mode 100644 plugins/CopyEngine/Ultracopier/TransferThread.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/TransferThread.h delete mode 100644 plugins/CopyEngine/Ultracopier/Variable.h delete mode 100644 plugins/CopyEngine/Ultracopier/WriteThread.cpp delete mode 100644 plugins/CopyEngine/Ultracopier/WriteThread.h delete mode 100644 plugins/CopyEngine/Ultracopier/copyEngineOptions.ui delete mode 100644 plugins/CopyEngine/Ultracopier/copyEngineResources.qrc delete mode 100644 plugins/CopyEngine/Ultracopier/debugDialog.ui delete mode 100644 plugins/CopyEngine/Ultracopier/documentation.dox delete mode 100644 plugins/CopyEngine/Ultracopier/fileErrorDialog.ui delete mode 100644 plugins/CopyEngine/Ultracopier/fileExistsDialog.ui delete mode 100644 plugins/CopyEngine/Ultracopier/fileIsSameDialog.ui delete mode 100644 plugins/CopyEngine/Ultracopier/folderExistsDialog.ui delete mode 100644 plugins/CopyEngine/Ultracopier/informations.xml delete mode 100644 plugins/CopyEngine/Ultracopier/plugin.json delete mode 100644 plugins/CopyEngine/Ultracopier/resources/add.png delete mode 100644 plugins/CopyEngine/Ultracopier/resources/edit.png delete mode 100644 plugins/CopyEngine/Ultracopier/resources/filter.png delete mode 100644 plugins/CopyEngine/Ultracopier/resources/remove.png mode change 100644 => 100755 plugins/Languages/README.md mode change 100644 => 100755 plugins/Languages/ar/flag.png create mode 100755 plugins/Languages/ar/translation.qm create mode 100755 plugins/Languages/de/translation.qm mode change 100644 => 100755 plugins/Languages/el/flag.png mode change 100644 => 100755 plugins/Languages/el/informations.xml create mode 100755 plugins/Languages/el/translation.qm mode change 100644 => 100755 plugins/Languages/el/translation.ts create mode 100755 plugins/Languages/en/translation.qm mode change 100644 => 100755 plugins/Languages/es/flag.png mode change 100644 => 100755 plugins/Languages/es/informations.xml create mode 100755 plugins/Languages/es/translation.qm mode change 100644 => 100755 plugins/Languages/es/translation.ts mode change 100644 => 100755 plugins/Languages/fr/flag.png mode change 100644 => 100755 plugins/Languages/fr/informations.xml create mode 100755 plugins/Languages/fr/translation.qm mode change 100644 => 100755 plugins/Languages/fr/translation.ts mode change 100644 => 100755 plugins/Languages/hi/flag.png mode change 100644 => 100755 plugins/Languages/hi/informations.xml create mode 100755 plugins/Languages/hi/translation.qm mode change 100644 => 100755 plugins/Languages/hi/translation.ts mode change 100644 => 100755 plugins/Languages/hu/flag.png mode change 100644 => 100755 plugins/Languages/hu/informations.xml create mode 100755 plugins/Languages/hu/translation.qm mode change 100644 => 100755 plugins/Languages/hu/translation.ts mode change 100644 => 100755 plugins/Languages/id/flag.png mode change 100644 => 100755 plugins/Languages/id/informations.xml create mode 100755 plugins/Languages/id/translation.qm mode change 100644 => 100755 plugins/Languages/id/translation.ts create mode 100755 plugins/Languages/it/translation.qm mode change 100644 => 100755 plugins/Languages/ja/flag.png mode change 100644 => 100755 plugins/Languages/ja/informations.xml create mode 100755 plugins/Languages/ja/translation.qm mode change 100644 => 100755 plugins/Languages/ja/translation.ts mode change 100644 => 100755 plugins/Languages/ko/flag.png mode change 100644 => 100755 plugins/Languages/ko/informations.xml create mode 100755 plugins/Languages/ko/translation.qm mode change 100644 => 100755 plugins/Languages/ko/translation.ts mode change 100644 => 100755 plugins/Languages/nl/flag.png mode change 100644 => 100755 plugins/Languages/nl/informations.xml create mode 100755 plugins/Languages/nl/translation.qm mode change 100644 => 100755 plugins/Languages/nl/translation.ts mode change 100644 => 100755 plugins/Languages/no/flag.png mode change 100644 => 100755 plugins/Languages/no/informations.xml create mode 100755 plugins/Languages/no/translation.qm mode change 100644 => 100755 plugins/Languages/no/translation.ts mode change 100644 => 100755 plugins/Languages/pl/flag.png mode change 100644 => 100755 plugins/Languages/pl/informations.xml create mode 100755 plugins/Languages/pl/translation.qm mode change 100644 => 100755 plugins/Languages/pl/translation.ts mode change 100644 => 100755 plugins/Languages/pt/flag.png mode change 100644 => 100755 plugins/Languages/pt/informations.xml create mode 100755 plugins/Languages/pt/translation.qm mode change 100644 => 100755 plugins/Languages/pt/translation.ts mode change 100644 => 100755 plugins/Languages/ru/flag.png mode change 100644 => 100755 plugins/Languages/ru/informations.xml create mode 100755 plugins/Languages/ru/translation.qm mode change 100644 => 100755 plugins/Languages/ru/translation.ts mode change 100644 => 100755 plugins/Languages/th/flag.png mode change 100644 => 100755 plugins/Languages/th/informations.xml create mode 100755 plugins/Languages/th/translation.qm mode change 100644 => 100755 plugins/Languages/th/translation.ts mode change 100644 => 100755 plugins/Languages/tr/flag.png mode change 100644 => 100755 plugins/Languages/tr/informations.xml create mode 100755 plugins/Languages/tr/translation.qm mode change 100644 => 100755 plugins/Languages/tr/translation.ts mode change 100644 => 100755 plugins/Languages/zh/flag.png mode change 100644 => 100755 plugins/Languages/zh/informations.xml create mode 100755 plugins/Languages/zh/translation.qm mode change 100644 => 100755 plugins/Languages/zh/translation.ts mode change 100644 => 100755 plugins/Languages/zh_TW/flag.png mode change 100644 => 100755 plugins/Languages/zh_TW/informations.xml create mode 100755 plugins/Languages/zh_TW/translation.qm mode change 100644 => 100755 plugins/Languages/zh_TW/translation.ts mode change 100644 => 100755 plugins/Listener/README.md mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/DebugEngineMacro.h mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/Environment.h create mode 100755 plugins/Listener/catchcopy-v0002/Listenercatchcopy-v0002Variable.h mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/README.md mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/StructEnumDefinition.h delete mode 100644 plugins/Listener/catchcopy-v0002/Variable.h mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ClientCatchcopy.cpp mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ClientCatchcopy.h mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ExtraSocketCatchcopy.cpp mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ExtraSocketCatchcopy.h mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ServerCatchcopy.cpp mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ServerCatchcopy.h mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/catchcopy-api-0002/VariablesCatchcopy.h mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/documentation.dox mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/informations.xml mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/listener.cpp mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/listener.h mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/listener.pro mode change 100644 => 100755 plugins/Listener/catchcopy-v0002/plugin.json mode change 100644 => 100755 plugins/PluginLoader/README.md mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/DebugEngineMacro.h mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Environment.h create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.qm create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.qm create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.qm create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.ts create mode 100755 plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.qm mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.ts mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/OptionsWidget.cpp mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/OptionsWidget.h mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/OptionsWidget.ui mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/PlatformMacro.h create mode 100755 plugins/PluginLoader/catchcopy-v0002/PluginLoadercatchcopy-v0002Variable.h mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/README.md mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/StructEnumDefinition.h delete mode 100644 plugins/PluginLoader/catchcopy-v0002/Variable.h mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/documentation.dox mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/informations.xml mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/plugin.json mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/pluginLoader.cpp mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/pluginLoader.h mode change 100644 => 100755 plugins/PluginLoader/catchcopy-v0002/pluginLoader.pro mode change 100644 => 100755 plugins/README.md mode change 100644 => 100755 plugins/SessionLoader/README.md mode change 100644 => 100755 plugins/SessionLoader/Windows/DebugEngineMacro.h mode change 100644 => 100755 plugins/SessionLoader/Windows/Environment.h mode change 100644 => 100755 plugins/SessionLoader/Windows/README.md create mode 100755 plugins/SessionLoader/Windows/SessionLoaderWindowsVariable.h mode change 100644 => 100755 plugins/SessionLoader/Windows/StructEnumDefinition.h delete mode 100644 plugins/SessionLoader/Windows/Variable.h mode change 100644 => 100755 plugins/SessionLoader/Windows/documentation.dox mode change 100644 => 100755 plugins/SessionLoader/Windows/informations.xml mode change 100644 => 100755 plugins/SessionLoader/Windows/plugin.json mode change 100644 => 100755 plugins/SessionLoader/Windows/sessionLoader.cpp mode change 100644 => 100755 plugins/SessionLoader/Windows/sessionLoader.h mode change 100644 => 100755 plugins/SessionLoader/Windows/sessionLoader.pro create mode 100755 plugins/SessionLoader/Windows/sessionLoader.pro.user.4.8-pre1 create mode 100755 plugins/SessionLoader/Windows/sessionLoader.pro.user.74ab603.4.8-pre1 mode change 100644 => 100755 plugins/Themes/Oxygen/DebugEngineMacro.h mode change 100644 => 100755 plugins/Themes/Oxygen/Environment.h create mode 100755 plugins/Themes/Oxygen/Languages/ar/translation.qm create mode 100755 plugins/Themes/Oxygen/Languages/de/translation.qm create mode 100755 plugins/Themes/Oxygen/Languages/el/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/el/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/en/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/en/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/es/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/es/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/fr/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/fr/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/hi/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/hi/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/hu/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/hu/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/id/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/id/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/it/translation.qm create mode 100755 plugins/Themes/Oxygen/Languages/ja/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/ja/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/ko/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/ko/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/nl/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/nl/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/no/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/no/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/pl/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/pl/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/pt/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/pt/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/ru/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/ru/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/th/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/th/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/tr/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/tr/translation.ts create mode 100755 plugins/Themes/Oxygen/Languages/zh/translation.qm mode change 100644 => 100755 plugins/Themes/Oxygen/Languages/zh/translation.ts create mode 100755 plugins/Themes/Oxygen/OxygenVariable.h mode change 100644 => 100755 plugins/Themes/Oxygen/README.md mode change 100644 => 100755 plugins/Themes/Oxygen/StructEnumDefinition.h mode change 100644 => 100755 plugins/Themes/Oxygen/ThemesFactory.cpp mode change 100644 => 100755 plugins/Themes/Oxygen/ThemesFactory.h mode change 100644 => 100755 plugins/Themes/Oxygen/TransferModel.cpp mode change 100644 => 100755 plugins/Themes/Oxygen/TransferModel.h delete mode 100644 plugins/Themes/Oxygen/Variable.h mode change 100644 => 100755 plugins/Themes/Oxygen/documentation.dox mode change 100644 => 100755 plugins/Themes/Oxygen/informations.xml mode change 100644 => 100755 plugins/Themes/Oxygen/interface.cpp mode change 100644 => 100755 plugins/Themes/Oxygen/interface.h mode change 100644 => 100755 plugins/Themes/Oxygen/interface.pro mode change 100644 => 100755 plugins/Themes/Oxygen/interface.ui mode change 100644 => 100755 plugins/Themes/Oxygen/interfaceInclude.pri mode change 100644 => 100755 plugins/Themes/Oxygen/interfaceResources.qrc mode change 100644 => 100755 plugins/Themes/Oxygen/interfaceResources_unix.qrc mode change 100644 => 100755 plugins/Themes/Oxygen/interfaceResources_windows.qrc mode change 100644 => 100755 plugins/Themes/Oxygen/options.ui mode change 100644 => 100755 plugins/Themes/Oxygen/plugin.json mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/add.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/exit.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/informations.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/options.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Caught_Unix.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Caught_Windows.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Uncaught_Unix.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Uncaught_Windows.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/add.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/cancel.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/export-transfer-list.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/import-transfer-list.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/main.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/moveDown.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/moveUp.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/player_end.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/player_pause.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/player_play.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/putOnBottom.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/putOnTop.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/remove.png mode change 100644 => 100755 plugins/Themes/Oxygen/resources/search.png mode change 100644 => 100755 plugins/Themes/Oxygen/themesOptions.ui create mode 100755 plugins/Themes/Oxygen2/DarkButton.cpp create mode 100755 plugins/Themes/Oxygen2/DarkButton.h create mode 100755 plugins/Themes/Oxygen2/DebugEngineMacro.h create mode 100755 plugins/Themes/Oxygen2/Environment.h create mode 100755 plugins/Themes/Oxygen2/Languages/ar/translation.qm create mode 100644 plugins/Themes/Oxygen2/Languages/ar/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/de/translation.qm create mode 100644 plugins/Themes/Oxygen2/Languages/de/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/el/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/el/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/en/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/en/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/es/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/es/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/fr/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/fr/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/hi/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/hi/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/hu/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/hu/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/id/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/id/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/it/translation.qm create mode 100644 plugins/Themes/Oxygen2/Languages/it/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/ja/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/ja/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/ko/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/ko/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/nl/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/nl/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/no/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/no/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/pl/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/pl/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/pt/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/pt/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/ru/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/ru/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/th/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/th/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/tr/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/tr/translation.ts create mode 100755 plugins/Themes/Oxygen2/Languages/zh/translation.qm create mode 100755 plugins/Themes/Oxygen2/Languages/zh/translation.ts create mode 100755 plugins/Themes/Oxygen2/Oxygen2Environment.h create mode 100755 plugins/Themes/Oxygen2/Oxygen2Variable.h create mode 100755 plugins/Themes/Oxygen2/ProgressBarDark.cpp create mode 100755 plugins/Themes/Oxygen2/ProgressBarDark.h create mode 100755 plugins/Themes/Oxygen2/README.md create mode 100755 plugins/Themes/Oxygen2/StructEnumDefinition.h create mode 100755 plugins/Themes/Oxygen2/ThemesFactory.cpp create mode 100755 plugins/Themes/Oxygen2/ThemesFactory.h create mode 100755 plugins/Themes/Oxygen2/TransferModel.cpp create mode 100755 plugins/Themes/Oxygen2/TransferModel.h create mode 100755 plugins/Themes/Oxygen2/VerticalLabel.cpp create mode 100755 plugins/Themes/Oxygen2/VerticalLabel.h create mode 100755 plugins/Themes/Oxygen2/chartarea.cpp create mode 100755 plugins/Themes/Oxygen2/chartarea.h create mode 100755 plugins/Themes/Oxygen2/documentation.dox create mode 100755 plugins/Themes/Oxygen2/fileTree.cpp create mode 100755 plugins/Themes/Oxygen2/fileTree.h create mode 100755 plugins/Themes/Oxygen2/informations.xml create mode 100755 plugins/Themes/Oxygen2/interface.cpp create mode 100755 plugins/Themes/Oxygen2/interface.h create mode 100755 plugins/Themes/Oxygen2/interface.pro create mode 100755 plugins/Themes/Oxygen2/interface.ui create mode 100755 plugins/Themes/Oxygen2/interfaceInclude.pri create mode 100755 plugins/Themes/Oxygen2/interfaceResources.qrc create mode 100755 plugins/Themes/Oxygen2/interfaceResources_unix.qrc create mode 100755 plugins/Themes/Oxygen2/interfaceResources_windows.qrc create mode 100755 plugins/Themes/Oxygen2/options.ui create mode 100755 plugins/Themes/Oxygen2/plugin.json create mode 100755 plugins/Themes/Oxygen2/radialMap/labels.cpp create mode 100755 plugins/Themes/Oxygen2/radialMap/map.cpp create mode 100755 plugins/Themes/Oxygen2/radialMap/map.h create mode 100755 plugins/Themes/Oxygen2/radialMap/radialMap.h create mode 100755 plugins/Themes/Oxygen2/radialMap/widget.cpp create mode 100755 plugins/Themes/Oxygen2/radialMap/widget.h create mode 100755 plugins/Themes/Oxygen2/radialMap/widgetEvents.cpp create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/add.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/exit.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/informations.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/options.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Caught_Unix.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Caught_Windows.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Uncaught_Unix.png create mode 100755 plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Uncaught_Windows.png create mode 100755 plugins/Themes/Oxygen2/resources/add.png create mode 100755 plugins/Themes/Oxygen2/resources/cancel.png create mode 100755 plugins/Themes/Oxygen2/resources/cancelDarkD.png create mode 100755 plugins/Themes/Oxygen2/resources/cancelDarkE.png create mode 100755 plugins/Themes/Oxygen2/resources/click.opus create mode 100755 plugins/Themes/Oxygen2/resources/darkButton.png create mode 100755 plugins/Themes/Oxygen2/resources/darkButtonOver.png create mode 100755 plugins/Themes/Oxygen2/resources/darkButtonPushed.png create mode 100755 plugins/Themes/Oxygen2/resources/darkmoveDown.png create mode 100755 plugins/Themes/Oxygen2/resources/darkmoveUp.png create mode 100755 plugins/Themes/Oxygen2/resources/darkplayer_end.png create mode 100755 plugins/Themes/Oxygen2/resources/darkplayer_pause.png create mode 100755 plugins/Themes/Oxygen2/resources/darkplayer_play.png create mode 100755 plugins/Themes/Oxygen2/resources/export-transfer-list.png create mode 100755 plugins/Themes/Oxygen2/resources/import-transfer-list.png create mode 100755 plugins/Themes/Oxygen2/resources/main.png create mode 100755 plugins/Themes/Oxygen2/resources/moveDown.png create mode 100755 plugins/Themes/Oxygen2/resources/moveUp.png create mode 100755 plugins/Themes/Oxygen2/resources/over.opus create mode 100755 plugins/Themes/Oxygen2/resources/player_end.png create mode 100755 plugins/Themes/Oxygen2/resources/player_pause.png create mode 100755 plugins/Themes/Oxygen2/resources/player_play.png create mode 100755 plugins/Themes/Oxygen2/resources/progressBarin.png create mode 100755 plugins/Themes/Oxygen2/resources/progressBarout.png create mode 100755 plugins/Themes/Oxygen2/resources/putOnBottom.png create mode 100755 plugins/Themes/Oxygen2/resources/putOnTop.png create mode 100755 plugins/Themes/Oxygen2/resources/remove.png create mode 100755 plugins/Themes/Oxygen2/resources/search.png create mode 100755 plugins/Themes/Oxygen2/themesOptions.ui mode change 100644 => 100755 plugins/Themes/README.md mode change 100644 => 100755 plugins/Themes/Supercopier/README.md mode change 100644 => 100755 plugins/Themes/Supercopier/informations.xml mode change 100644 => 100755 plugins/Themes/Supercopier/interface.pro create mode 100755 plugins/Themes/Supercopier/interface.pro.user.4.8-pre1 mode change 100644 => 100755 plugins/Themes/Supercopier/interfaceResources.qrc mode change 100644 => 100755 plugins/Themes/Supercopier/interfaceResources_unix.qrc mode change 100644 => 100755 plugins/Themes/Supercopier/interfaceResources_windows.qrc mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/add.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/exit.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/informations.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/options.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Unix.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Windows.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Unix.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Windows.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/add.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/cancel.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/export-transfer-list.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/import-transfer-list.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/main.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/moveDown.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/moveUp.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/player_end.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/player_pause.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/player_play.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/progressbarleft.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/progressbarright.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/putOnBottom.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/putOnTop.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/remove.png mode change 100644 => 100755 plugins/Themes/Supercopier/resources/search.png mode change 100644 => 100755 plugins/static-plugins-oxygen.qrc mode change 100644 => 100755 plugins/static-plugins-windows.qrc mode change 100644 => 100755 plugins/static-plugins.qrc (limited to 'plugins') diff --git a/plugins/CopyEngine/README.md b/plugins/CopyEngine/README.md old mode 100644 new mode 100755 diff --git a/plugins/CopyEngine/Random/CopyEngine.cpp b/plugins/CopyEngine/Random/CopyEngine.cpp new file mode 100755 index 0000000..662fb5b --- /dev/null +++ b/plugins/CopyEngine/Random/CopyEngine.cpp @@ -0,0 +1,253 @@ +/** \file copyEngine.cpp +\brief Define the copy engine +\author alpha_one_x86 */ + +#include "CopyEngine.h" +#include "../../../interface/PluginInterface_CopyEngine.h" +#include + +CopyEngine::CopyEngine() +{ + timer=new QTimer(); + connect(timer,&QTimer::timeout,this,&CopyEngine::timerSlot); + timer->start(1000); + send=false; +} + +CopyEngine::~CopyEngine() +{ +} + +//to send the options panel +bool CopyEngine::getOptionsEngine(QWidget * tempWidget) +{ + (void)tempWidget; + return true; +} + +//to have interface widget to do modal dialog +void CopyEngine::setInterfacePointer(QWidget * uiinterface) +{ + (void)uiinterface; + syncTransferList(); +} + +bool CopyEngine::haveSameSource(const std::vector &) +{ + return false; +} + +bool CopyEngine::haveSameDestination(const std::string &) +{ + return false; +} + +bool CopyEngine::newCopy(const std::vector &sources) +{ + (void)sources; + return true; +} + +bool CopyEngine::newCopy(const std::vector &sources,const std::string &destination) +{ + (void)sources; + (void)destination; + return true; +} + +bool CopyEngine::newMove(const std::vector &sources) +{ + (void)sources; + return true; +} + +bool CopyEngine::newMove(const std::vector &sources,const std::string &destination) +{ + (void)sources; + (void)destination; + return true; +} + +void CopyEngine::newTransferList(const std::string &file) +{ + (void)file; +} + +//because direct access to list thread into the main thread can't be do +uint64_t CopyEngine::realByteTransfered() +{ + return rand()%200000000; +} + +void CopyEngine::timerSlot() +{ + emit pushGeneralProgression(rand()%200000000,200000000); + + { + std::vector > progressionList; + progressionList.push_back(std::pair(100, 2)); + progressionList.push_back(std::pair(1000, 2)); + progressionList.push_back(std::pair(10000, 2+ rand()%2)); + progressionList.push_back(std::pair(100000, 5+ rand()%3)); + progressionList.push_back(std::pair(1000000, 15+ rand()%3)); + progressionList.push_back(std::pair(10000000, 50+ rand()%10)); + progressionList.push_back(std::pair(100000000, 800+ rand()%100)); + progressionList.push_back(std::pair(1000000000, 6000+ rand()%500)); + progressionList.push_back(std::pair(10000000000, 50000+ rand()%1000)); + emit doneTime(progressionList); + } + + { + std::vector progressionList; + Ultracopier::ProgressionItem entry; + entry.currentRead=60*1024*1024+rand()%20*1024*1024; + entry.currentWrite=40*1024*1024+rand()%20*1024*1024; + entry.id=1; + entry.total=100*1024*1024; + progressionList.push_back(entry); + emit pushFileProgression(progressionList); + } +} + +//speed limitation +bool CopyEngine::supportSpeedLimitation() const +{ + return false; +} + +/** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ +void CopyEngine::syncTransferList() +{ + emit syncReady(); + if(send) + return; + send=true; + + emit actionInProgess(Ultracopier::Copying); + + std::vector actionsList; + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type = Ultracopier::AddingItem; + + newAction.addAction.id = 1; + newAction.addAction.sourceFullPath = "/folder1/file.iso"; + newAction.addAction.sourceFileName = "file.iso"; + newAction.addAction.destinationFullPath = "/dest/folder1/file.iso"; + newAction.addAction.destinationFileName = "file.iso"; + newAction.addAction.size = 100*1024*1024; + newAction.addAction.mode = Ultracopier::CopyMode::Copy; + actionsList.push_back(newAction); + + newAction.addAction.id = 2; + newAction.addAction.sourceFullPath = "/file.mp3"; + newAction.addAction.sourceFileName = "file.mp3"; + newAction.addAction.destinationFullPath = "/dest/file.mp3"; + newAction.addAction.destinationFileName = "file.mp3"; + newAction.addAction.size = 10*1024*1024; + newAction.addAction.mode = Ultracopier::CopyMode::Copy; + actionsList.push_back(newAction); + + newAction.addAction.id = 3; + newAction.addAction.sourceFullPath = "/file.mp4"; + newAction.addAction.sourceFileName = "file.mp4"; + newAction.addAction.destinationFullPath = "/dest/file.mp4"; + newAction.addAction.destinationFileName = "file.mp4"; + newAction.addAction.size = 50*1024*1024; + newAction.addAction.mode = Ultracopier::CopyMode::Copy; + actionsList.push_back(newAction); + + newAction.addAction.id = 1; + newAction.addAction.sourceFullPath = "/folder1/file.iso"; + newAction.addAction.sourceFileName = "file.iso"; + newAction.addAction.destinationFullPath = "/dest/folder1/file.iso"; + newAction.addAction.destinationFileName = "file.iso"; + newAction.addAction.size = 100*1024*1024; + newAction.addAction.mode = Ultracopier::CopyMode::Copy; + newAction.type = Ultracopier::PreOperation; + actionsList.push_back(newAction); + newAction.type = Ultracopier::Transfer; + actionsList.push_back(newAction); + + emit newActionOnList(actionsList); +} + +bool CopyEngine::userAddFolder(const Ultracopier::CopyMode &mode) +{ + (void)mode; + return true; +} + +bool CopyEngine::userAddFile(const Ultracopier::CopyMode &mode) +{ + (void)mode; + return true; +} + +void CopyEngine::pause() +{ +} + +void CopyEngine::resume() +{ +} + +void CopyEngine::skip(const uint64_t &id) +{ + (void)id; +} + +void CopyEngine::cancel() +{ + emit canBeDeleted(); +} + +void CopyEngine::removeItems(const std::vector &ids) +{ + (void)ids; +} + +void CopyEngine::moveItemsOnTop(const std::vector &ids) +{ + (void)ids; +} + +void CopyEngine::moveItemsUp(const std::vector &ids) +{ + (void)ids; +} + +void CopyEngine::moveItemsDown(const std::vector &ids) +{ + (void)ids; +} + +void CopyEngine::moveItemsOnBottom(const std::vector &ids) +{ + (void)ids; +} + +/** \brief give the forced mode, to export/import transfer list */ +void CopyEngine::forceMode(const Ultracopier::CopyMode &mode) +{ + (void)mode; +} + +void CopyEngine::exportTransferList() +{ +} + +void CopyEngine::importTransferList() +{ +} + +bool CopyEngine::setSpeedLimitation(const int64_t &speedLimitation) +{ + (void)speedLimitation; + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"maxSpeed: "+std::to_string(speedLimitation)); + return false; +} + +void CopyEngine::exportErrorIntoTransferList() +{ +} diff --git a/plugins/CopyEngine/Random/CopyEngine.h b/plugins/CopyEngine/Random/CopyEngine.h new file mode 100755 index 0000000..2da5da5 --- /dev/null +++ b/plugins/CopyEngine/Random/CopyEngine.h @@ -0,0 +1,128 @@ +/** \file copyEngine.h +\brief Define the copy engine +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include "../../../interface/PluginInterface_CopyEngine.h" + +#ifndef COPY_ENGINE_H +#define COPY_ENGINE_H + +#include + +namespace Ui { + class copyEngineOptions; +} + +/// \brief the implementation of copy engine plugin, manage directly few stuff, else pass to ListThread class. +class CopyEngine : public PluginInterface_CopyEngine +{ + Q_OBJECT +public: + CopyEngine(); + ~CopyEngine(); + void exportErrorIntoTransferList() override; +public: + /** \brief to send the options panel + * \return return false if have not the options + * \param tempWidget the widget to generate on it the options */ + bool getOptionsEngine(QWidget * tempWidget) override; + /** \brief to have interface widget to do modal dialog + * \param interface to have the widget of the interface, useful for modal dialog */ + void setInterfacePointer(QWidget * uiinterface) override; + //return empty if multiple + /** \brief compare the current sources of the copy, with the passed arguments + * \param sources the sources list to compares with the current sources list + * \return true if have same sources, else false (or empty) */ + bool haveSameSource(const std::vector &sources) override; + /** \brief compare the current destination of the copy, with the passed arguments + * \param destination the destination to compares with the current destination + * \return true if have same destination, else false (or empty) */ + bool haveSameDestination(const std::string &destination) override; + //external soft like file browser have send copy/move list to do + /** \brief send copy without destination, ask the destination + * \param sources the sources list to copy + * \return true if the copy have been accepted */ + bool newCopy(const std::vector &sources) override; + /** \brief send copy with destination + * \param sources the sources list to copy + * \param destination the destination to copy + * \return true if the copy have been accepted */ + bool newCopy(const std::vector &sources,const std::string &destination) override; + /** \brief send move without destination, ask the destination + * \param sources the sources list to move + * \return true if the move have been accepted */ + bool newMove(const std::vector &sources) override; + /** \brief send move without destination, ask the destination + * \param sources the sources list to move + * \param destination the destination to move + * \return true if the move have been accepted */ + bool newMove(const std::vector &sources,const std::string &destination) override; + /** \brief send the new transfer list + * \param file the transfer list */ + void newTransferList(const std::string &file) override; + + /** \brief to get byte read, use by Ultracopier for the speed calculation + * real size transfered to right speed calculation */ + uint64_t realByteTransfered() override; + /** \brief support speed limitation */ + bool supportSpeedLimitation() const override; + + /** \brief to set drives detected + * specific to this copy engine */ + + /** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ + void syncTransferList() override; +public slots: + //user ask ask to add folder (add it with interface ask source/destination) + /** \brief add folder called on the interface + * Used by manual adding */ + bool userAddFolder(const Ultracopier::CopyMode &mode) override; + /** \brief add file called on the interface + * Used by manual adding */ + bool userAddFile(const Ultracopier::CopyMode &mode) override; + //action on the copy + /// \brief put the transfer in pause + void pause() override; + /// \brief resume the transfer + void resume() override; + /** \brief skip one transfer entry + * \param id id of the file to remove */ + void skip(const uint64_t &id) override; + /// \brief cancel all the transfer + void cancel() override; + //edit the transfer list + /** \brief remove the selected item + * \param ids ids is the id list of the selected items */ + void removeItems(const std::vector &ids) override; + /** \brief move on top of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnTop(const std::vector &ids) override; + /** \brief move up the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsUp(const std::vector &ids) override; + /** \brief move down the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsDown(const std::vector &ids) override; + /** \brief move on bottom of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnBottom(const std::vector &ids) override; + + /** \brief give the forced mode, to export/import transfer list */ + void forceMode(const Ultracopier::CopyMode &mode) override; + /// \brief export the transfer list into a file + void exportTransferList() override; + /// \brief import the transfer list into a file + void importTransferList() override; + + /** \brief to set the speed limitation + * -1 if not able, 0 if disabled */ + bool setSpeedLimitation(const int64_t &speedLimitation) override; +private: + bool send; + QTimer *timer; + void timerSlot(); +}; + +#endif // COPY_ENGINE_H diff --git a/plugins/CopyEngine/Random/CopyEngine.pro b/plugins/CopyEngine/Random/CopyEngine.pro new file mode 100755 index 0000000..f65ce88 --- /dev/null +++ b/plugins/CopyEngine/Random/CopyEngine.pro @@ -0,0 +1,26 @@ +CONFIG += c++11 +QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" +mac:QMAKE_CXXFLAGS+="-stdlib=libc++" + +QT += widgets xml +DEFINES += UNICODE _UNICODE +TEMPLATE = lib +CONFIG += plugin + +HEADERS += \ + $$PWD/../../../interface/PluginInterface_CopyEngine.h \ + $$PWD/../../../interface/OptionInterface.h \ + $$PWD/../../../interface/FacilityInterface.h \ + $$PWD/../../../cpp11addition.h \ + $$PWD/CopyEngine.h \ + $$PWD/CopyEngineFactory.h +SOURCES += \ + $$PWD/../../../cpp11addition.cpp \ + $$PWD/../../../cpp11additionstringtointcpp.cpp \ + $$PWD/CopyEngine.cpp \ + $$PWD/CopyEngineFactory.cpp +TARGET = $$qtLibraryTarget(copyEngine) + +win32 { + LIBS += -ladvapi32 +} diff --git a/plugins/CopyEngine/Random/CopyEngineFactory.cpp b/plugins/CopyEngine/Random/CopyEngineFactory.cpp new file mode 100755 index 0000000..8fe5ad6 --- /dev/null +++ b/plugins/CopyEngine/Random/CopyEngineFactory.cpp @@ -0,0 +1,78 @@ +/** \file factory.cpp +\brief Define the factory to create new instance +\author alpha_one_x86 */ + +#include "../../../cpp11addition.h" +#include "CopyEngineFactory.h" + +CopyEngineFactory::CopyEngineFactory() +{ +} + +CopyEngineFactory::~CopyEngineFactory() +{ +} + +PluginInterface_CopyEngine * CopyEngineFactory::getInstance() +{ + CopyEngine *realObject=new CopyEngine(); + return realObject; +} + +void CopyEngineFactory::setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath, + FacilityInterface * facilityInterface,const bool &portableVersion) +{ + (void)options; + (void)writePath; + (void)pluginPath; + (void)facilityInterface; + (void)portableVersion; +} + +std::vector CopyEngineFactory::supportedProtocolsForTheSource() const +{ + std::vector l; + l.push_back("file"); + return l; +} + +std::vector CopyEngineFactory::supportedProtocolsForTheDestination() const +{ + std::vector l; + l.push_back("file"); + return l; +} + +Ultracopier::CopyType CopyEngineFactory::getCopyType() +{ + return Ultracopier::FileAndFolder; +} + +Ultracopier::TransferListOperation CopyEngineFactory::getTransferListOperation() +{ + return Ultracopier::TransferListOperation_ImportExport; +} + +bool CopyEngineFactory::canDoOnlyCopy() const +{ + return false; +} + +void CopyEngineFactory::resetOptions() +{ +} + +QWidget * CopyEngineFactory::options() +{ + return nullptr; +} + +/// \brief to get if have pause +bool CopyEngineFactory::havePause() +{ + return false; +} + +void CopyEngineFactory::newLanguageLoaded() +{ +} diff --git a/plugins/CopyEngine/Random/CopyEngineFactory.h b/plugins/CopyEngine/Random/CopyEngineFactory.h new file mode 100755 index 0000000..b1bad6a --- /dev/null +++ b/plugins/CopyEngine/Random/CopyEngineFactory.h @@ -0,0 +1,58 @@ +/** \file factory.h +\brief Define the factory to create new instance +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include +#include +#include +#include +#include + +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "CopyEngine.h" + +#ifndef FACTORY_H +#define FACTORY_H + +namespace Ui { + class copyEngineOptions; +} + +/** \brief to generate copy engine instance */ +class CopyEngineFactory : public PluginInterface_CopyEngineFactory +{ + Q_OBJECT + #ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.CopyEngineFactory/2.0.0.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_CopyEngineFactory) + #endif +public: + CopyEngineFactory(); + ~CopyEngineFactory(); + /// \brief to return the instance of the copy engine + PluginInterface_CopyEngine * getInstance(); + /// \brief set the resources, to store options, to have facilityInterface + void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion) override; + //get mode allowed + /// \brief define if can copy file, folder or both + Ultracopier::CopyType getCopyType() override; + /// \brief to return which kind of transfer list operation is supported + Ultracopier::TransferListOperation getTransferListOperation() override; + /// \brief define if can only copy, or copy and move + bool canDoOnlyCopy() const override; + /// \brief to get the supported protocols for the source + std::vector supportedProtocolsForTheSource() const override; + /// \brief to get the supported protocols for the destination + std::vector supportedProtocolsForTheDestination() const override; + /// \brief to get the options of the copy engine + QWidget * options() override; + /// \brief to get if have pause + bool havePause() override; +public slots: + void resetOptions() override; + void newLanguageLoaded() override; +}; + +#endif // FACTORY_H diff --git a/plugins/CopyEngine/Random/README.md b/plugins/CopyEngine/Random/README.md new file mode 100755 index 0000000..a15b943 --- /dev/null +++ b/plugins/CopyEngine/Random/README.md @@ -0,0 +1,3 @@ +# Copy Engine: Ultracopier + +This is the default copy engine. diff --git a/plugins/CopyEngine/Random/informations.xml b/plugins/CopyEngine/Random/informations.xml new file mode 100755 index 0000000..490980f --- /dev/null +++ b/plugins/CopyEngine/Random/informations.xml @@ -0,0 +1,24 @@ + + + <![CDATA[Random copy engine]]> + + CopyEngine + + + + + + + 1287496800 + + windows-x86 + + + + 2.2.4.4 + + Random + + + diff --git a/plugins/CopyEngine/Random/plugin.json b/plugins/CopyEngine/Random/plugin.json new file mode 100755 index 0000000..9e26dfe --- /dev/null +++ b/plugins/CopyEngine/Random/plugin.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins/CopyEngine/Rsync/CopyEngine.pro b/plugins/CopyEngine/Rsync/CopyEngine.pro new file mode 100755 index 0000000..9728dc0 --- /dev/null +++ b/plugins/CopyEngine/Rsync/CopyEngine.pro @@ -0,0 +1,2 @@ +include($$PWD/../Ultracopier/Ultracopier.pro) +DEFINES += ULTRACOPIER_PLUGIN_RSYNC diff --git a/plugins/CopyEngine/Rsync/README.md b/plugins/CopyEngine/Rsync/README.md old mode 100644 new mode 100755 diff --git a/plugins/CopyEngine/Rsync/Rsync.pro b/plugins/CopyEngine/Rsync/Rsync.pro old mode 100644 new mode 100755 diff --git a/plugins/CopyEngine/Rsync/informations.xml b/plugins/CopyEngine/Rsync/informations.xml old mode 100644 new mode 100755 index 990809e..5ded350 --- a/plugins/CopyEngine/Rsync/informations.xml +++ b/plugins/CopyEngine/Rsync/informations.xml @@ -17,7 +17,7 @@ - 1.6.1.3 + 2.2.4.4 Rsync diff --git a/plugins/CopyEngine/Ultracopier-Spec/CallBackEventLoop.h b/plugins/CopyEngine/Ultracopier-Spec/CallBackEventLoop.h new file mode 100755 index 0000000..811bf86 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CallBackEventLoop.h @@ -0,0 +1,15 @@ +#ifndef CALLBACKEVENTLOOP_H +#define CALLBACKEVENTLOOP_H + +#include +#include "Variable.h" + +#ifdef POSIXFILEMANIP +class CallBackEventLoop +{ +public: + virtual void callBack() = 0; +}; +#endif + +#endif // CALLBACKEVENTLOOP_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/CompilerInfo.h b/plugins/CopyEngine/Ultracopier-Spec/CompilerInfo.h new file mode 100755 index 0000000..84625b9 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CompilerInfo.h @@ -0,0 +1 @@ +#include "../../../CompilerInfo.h" diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngine-collision-and-error.cpp b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine-collision-and-error.cpp new file mode 100755 index 0000000..fcf43ff --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine-collision-and-error.cpp @@ -0,0 +1,719 @@ +/** \file copyEngine.cpp +\brief Define the copy engine +\author alpha_one_x86 */ + +#include "CopyEngine.h" +#include "FolderExistsDialog.h" +#include "DiskSpace.h" + +//dialog message +/// \note Can be call without queue because all call will be serialized +void CopyEngine::fileAlreadyExistsSlot(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,TransferThreadAsync * thread) +{ + fileAlreadyExists(source,destination,isSame,thread); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::errorOnFileSlot(INTERNALTYPEPATH fileInfo,std::string errorString,TransferThreadAsync * thread,const ErrorType &errorType) +{ + errorOnFile(fileInfo,errorString,thread,errorType); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::folderAlreadyExistsSlot(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,ScanFileOrFolder * thread) +{ + folderAlreadyExists(source,destination,isSame,thread); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::errorOnFolderSlot(INTERNALTYPEPATH fileInfo,std::string errorString,ScanFileOrFolder * thread,ErrorType errorType) +{ + errorOnFolder(fileInfo,errorString,thread,errorType); +} + +//mkpath event +void CopyEngine::mkPathErrorOnFolderSlot(INTERNALTYPEPATH folder,std::string error,ErrorType errorType) +{ + mkPathErrorOnFolder(folder,error,errorType); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::fileAlreadyExists(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,TransferThreadAsync * thread,bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + if(thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); + return; + } + //load the action + if(isSame) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file is same: "+TransferThread::internalStringTostring(source)); + FileExistsAction tempFileExistsAction=alwaysDoThisActionForFileExists; + if(tempFileExistsAction==FileExists_Overwrite || tempFileExistsAction==FileExists_OverwriteIfNewer || tempFileExistsAction==FileExists_OverwriteIfNotSameMdate || tempFileExistsAction==FileExists_OverwriteIfOlder) + tempFileExistsAction=FileExists_NotSet; + switch(tempFileExistsAction) + { + case FileExists_Skip: + case FileExists_Rename: + thread->setFileExistsAction(tempFileExistsAction); + break; + default: + if(dialogIsOpen) + { + alreadyExistsQueueItem newItem; + newItem.source=source; + newItem.destination=destination; + newItem.isSame=isSame; + newItem.transfer=thread; + newItem.scan=NULL; + alreadyExistsQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + FileIsSameDialog dialog(uiinterface,source,firstRenamingRule,otherRenamingRule,facilityEngine); + emit isInPause(true); + dialog.exec();/// \bug crash when external close + FileExistsAction newAction=dialog.getAction(); + emit isInPause(false); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileExists_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileExists) + { + alwaysDoThisActionForFileExists=newAction; + listThread->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + if(uiIsInstalled) + switch(newAction) + { + default: + case FileExists_Skip: + ui->comboBoxFileCollision->setCurrentIndex(1); + break; + case FileExists_Rename: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + } + } + if(dialog.getAlways() || newAction!=FileExists_Rename) + thread->setFileExistsAction(newAction); + else + thread->setFileRename(dialog.getNewName()); + dialogIsOpen=false; + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file already exists: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + FileExistsAction tempFileExistsAction=alwaysDoThisActionForFileExists; + switch(tempFileExistsAction) + { + case FileExists_Skip: + case FileExists_Rename: + case FileExists_Overwrite: + case FileExists_OverwriteIfNewer: + case FileExists_OverwriteIfOlder: + case FileExists_OverwriteIfNotSameMdate: + case FileExists_OverwriteIfNotSameSize: + case FileExists_OverwriteIfNotSameSizeAndDate: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"always do this action: "+std::to_string(tempFileExistsAction)); + thread->setFileExistsAction(tempFileExistsAction); + break; + default: + if(dialogIsOpen) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"dialog open, put in queue: "+ + TransferThread::internalStringTostring(source)+" "+ + TransferThread::internalStringTostring(destination) + ); + alreadyExistsQueueItem newItem; + newItem.source=source; + newItem.destination=destination; + newItem.isSame=isSame; + newItem.transfer=thread; + newItem.scan=NULL; + alreadyExistsQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + FileExistsDialog dialog(uiinterface,source,destination,firstRenamingRule,otherRenamingRule,facilityEngine); + emit isInPause(true); + dialog.exec();/// \bug crash when external close + FileExistsAction newAction=dialog.getAction(); + emit isInPause(false); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileExists_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileExists) + { + alwaysDoThisActionForFileExists=newAction; + listThread->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + if(uiIsInstalled) + switch(newAction) + { + default: + case FileExists_Skip: + ui->comboBoxFileCollision->setCurrentIndex(1); + break; + case FileExists_Rename: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + case FileExists_Overwrite: + ui->comboBoxFileCollision->setCurrentIndex(2); + break; + case FileExists_OverwriteIfNotSameMdate: + ui->comboBoxFileCollision->setCurrentIndex(3); + break; + case FileExists_OverwriteIfNewer: + ui->comboBoxFileCollision->setCurrentIndex(4); + break; + case FileExists_OverwriteIfOlder: + ui->comboBoxFileCollision->setCurrentIndex(5); + break; + case FileExists_OverwriteIfNotSameSize: + ui->comboBoxFileCollision->setCurrentIndex(7); + break; + case FileExists_OverwriteIfNotSameSizeAndDate: + ui->comboBoxFileCollision->setCurrentIndex(8); + break; + } + } + if(dialog.getAlways() || newAction!=FileExists_Rename) + thread->setFileExistsAction(newAction); + else + thread->setFileRename(dialog.getNewName()); + dialogIsOpen=false; + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +void CopyEngine::haveNeedPutAtBottom(bool needPutAtBottom, const INTERNALTYPEPATH &fileInfo, const std::string &errorString,TransferThreadAsync *thread,const ErrorType &errorType) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(!needPutAtBottom) + { + alwaysDoThisActionForFileError=FileError_NotSet; + if(uiIsInstalled) + ui->comboBoxFileError->setCurrentIndex(0); + errorQueueItem newItem; + newItem.errorString=errorString; + newItem.inode=fileInfo; + newItem.mkPath=false; + newItem.rmPath=false; + newItem.scan=NULL; + newItem.transfer=thread; + newItem.errorType=errorType; + errorQueue.push_back(newItem); + showOneNewDialog(); + } +} + +void CopyEngine::missingDiskSpace(std::vector list) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + DiskSpace dialog(facilityEngine,list,uiinterface); + emit isInPause(true); + dialog.exec();/// \bug crash when external close + bool ok=dialog.getAction(); + emit isInPause(false); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"cancel: "+std::to_string(ok)); + if(!ok) + emit cancelAll(); + else + listThread->autoStartIfNeeded(); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::errorOnFile(INTERNALTYPEPATH fileInfo,std::string errorString,TransferThreadAsync * thread,const ErrorType &errorType,bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+TransferThread::internalStringTostring(fileInfo)+ + ", error: "+errorString); + if(thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); + return; + } + //load the action + FileErrorAction tempFileErrorAction=alwaysDoThisActionForFileError; + switch(tempFileErrorAction) + { + case FileError_Skip: + thread->skip(); + return; + case FileError_Retry: + thread->retryAfterError(); + return; + case FileError_PutToEndOfTheList: + errorPutAtEnd++; + emit getNeedPutAtBottom(fileInfo,errorString,thread,errorType); + if(errorPutAtEnd>listThread->actionToDoListInode.size() || listThread->actionToDoListInode.size()==0) + { + alwaysDoThisActionForFileError=FileError_NotSet; + errorPutAtEnd=0; + } + return; + case FileError_Cancel: + return; + default: + if(dialogIsOpen) + { + errorQueueItem newItem; + newItem.errorString=errorString; + newItem.inode=fileInfo; + newItem.mkPath=false; + newItem.rmPath=false; + newItem.scan=NULL; + newItem.transfer=thread; + newItem.errorType=errorType; + errorQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + + uint64_t size=0; + uint64_t mdate=0; + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(fileInfo.c_str(),GetFileExInfoStandard,&sourceW)) + { + mdate=sourceW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=sourceW.ftLastWriteTime.dwLowDateTime; + size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; + } + #else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + mdate=source_statbuf.st_mtimespec.tv_sec; + #else + mdate=*reinterpret_cast(&source_statbuf.st_mtim); + #endif + #else + mdate=*reinterpret_cast(&source_statbuf.st_mtime); + #endif + size=source_statbuf.st_size; + } + #endif + + emit error(TransferThread::internalStringTostring(fileInfo),size,mdate,errorString); + FileErrorDialog dialog(uiinterface,fileInfo,errorString,errorType,facilityEngine); + emit isInPause(true); + dialog.exec();/// \bug crash when external close + FileErrorAction newAction=dialog.getAction(); + emit isInPause(false); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileError_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) + { + alwaysDoThisActionForFileError=newAction; + if(uiIsInstalled) + switch(newAction) + { + default: + case FileError_Skip: + ui->comboBoxFileError->setCurrentIndex(1); + break; + case FileError_PutToEndOfTheList: + ui->comboBoxFileError->setCurrentIndex(2); + break; + } + } + switch(newAction) + { + case FileError_Skip: + thread->skip(); + break; + case FileError_Retry: + thread->retryAfterError(); + break; + case FileError_PutToEndOfTheList: + errorPutAtEnd++; + thread->putAtBottom(); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"file error action wrong"); + break; + } + dialogIsOpen=false; + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"isCalledByShowOneNewDialog==true then not show other dial"); + return; + break; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::folderAlreadyExists(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,ScanFileOrFolder * thread,bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"folder already exists: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + if(thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); + return; + } + //load the always action + FolderExistsAction tempFolderExistsAction=alwaysDoThisActionForFolderExists; + switch(tempFolderExistsAction) + { + case FolderExists_Skip: + case FolderExists_Rename: + case FolderExists_Merge: + thread->setFolderExistsAction(tempFolderExistsAction); + break; + default: + if(dialogIsOpen) + { + alreadyExistsQueueItem newItem; + newItem.source=source; + newItem.destination=destination; + newItem.isSame=isSame; + newItem.transfer=NULL; + newItem.scan=thread; + alreadyExistsQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + FolderExistsDialog dialog(uiinterface,source,isSame,destination,firstRenamingRule,otherRenamingRule); + dialog.exec();/// \bug crash when external close + FolderExistsAction newAction=dialog.getAction(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FolderExists_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFolderExists) + setComboBoxFolderCollision(newAction); + if(!dialog.getAlways() && newAction==FolderExists_Rename) + thread->setFolderExistsAction(newAction,dialog.getNewName()); + else + thread->setFolderExistsAction(newAction); + dialogIsOpen=false; + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } +} + +/// \note Can be call without queue because all call will be serialized +/// \todo all this part +void CopyEngine::errorOnFolder(INTERNALTYPEPATH fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType, bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+TransferThread::internalStringTostring(fileInfo)+", error: "+errorString); + if(thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); + return; + } + //load the always action + FileErrorAction tempFileErrorAction=alwaysDoThisActionForFolderError; + switch(tempFileErrorAction) + { + case FileError_Skip: + case FileError_Retry: + case FileError_PutToEndOfTheList: + thread->setFolderErrorAction(tempFileErrorAction); + break; + default: + if(dialogIsOpen) + { + errorQueueItem newItem; + newItem.errorString=errorString; + newItem.inode=fileInfo; + newItem.mkPath=false; + newItem.rmPath=false; + newItem.scan=thread; + newItem.transfer=NULL; + newItem.errorType=errorType; + errorQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + + uint64_t size=0; + uint64_t mdate=0; + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(fileInfo.c_str(),GetFileExInfoStandard,&sourceW)) + { + mdate=sourceW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=sourceW.ftLastWriteTime.dwLowDateTime; + size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; + } + #else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + mdate=source_statbuf.st_mtimespec.tv_sec; + #else + mdate=*reinterpret_cast(&source_statbuf.st_mtim); + #endif + #else + mdate=*reinterpret_cast(&source_statbuf.st_mtime); + #endif + size=source_statbuf.st_size; + } + #endif + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + emit error(TransferThread::internalStringTostring(fileInfo),size,mdate,errorString); + FileErrorDialog dialog(uiinterface,fileInfo,errorString,errorType,facilityEngine); + dialog.exec();/// \bug crash when external close + FileErrorAction newAction=dialog.getAction(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileError_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) + { + setComboBoxFolderError(newAction); + alwaysDoThisActionForFolderError=newAction; + } + dialogIsOpen=false; + thread->setFolderErrorAction(newAction); + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +// ----------------------------------------------------- + +//mkpath event +void CopyEngine::mkPathErrorOnFolder(INTERNALTYPEPATH folder, std::string errorString, const ErrorType &errorType, bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+TransferThread::internalStringTostring(folder)+", error: "+errorString); + //load the always action + FileErrorAction tempFileErrorAction=alwaysDoThisActionForFolderError; + switch(tempFileErrorAction) + { + case FileError_Skip: + listThread->mkPathQueue.skip(); + return; + case FileError_Retry: + listThread->mkPathQueue.retry(); + return; + default: + if(dialogIsOpen) + { + errorQueueItem newItem; + newItem.errorString=errorString; + newItem.inode=folder; + newItem.mkPath=true; + newItem.rmPath=false; + newItem.scan=NULL; + newItem.transfer=NULL; + newItem.errorType=errorType; + errorQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + + uint64_t size=0; + uint64_t mdate=0; + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(folder.c_str(),GetFileExInfoStandard,&sourceW)) + { + mdate=sourceW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=sourceW.ftLastWriteTime.dwLowDateTime; + size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; + } + #else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(folder).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(folder).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + mdate=source_statbuf.st_mtimespec.tv_sec; + #else + mdate=*reinterpret_cast(&source_statbuf.st_mtim); + #endif + #else + mdate=*reinterpret_cast(&source_statbuf.st_mtime); + #endif + size=source_statbuf.st_size; + } + #endif + + emit error(TransferThread::internalStringTostring(folder),size,mdate,errorString); + FileErrorDialog dialog(uiinterface,folder,errorString,errorType,facilityEngine); + dialog.exec();/// \bug crash when external close + FileErrorAction newAction=dialog.getAction(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileError_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) + { + setComboBoxFolderError(newAction); + alwaysDoThisActionForFolderError=newAction; + } + dialogIsOpen=false; + switch(newAction) + { + case FileError_Skip: + listThread->mkPathQueue.skip(); + break; + case FileError_Retry: + listThread->mkPathQueue.retry(); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unknow switch case: "+std::to_string(newAction)); + break; + } + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +//show one new dialog if needed +void CopyEngine::showOneNewDialog() +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"alreadyExistsQueue.size(): "+std::to_string(alreadyExistsQueue.size())); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"errorQueue.size(): "+std::to_string(errorQueue.size())); + //reset to always show the dialog + dialogIsOpen=false; + int loop_size=alreadyExistsQueue.size(); + while(loop_size>0) + { + if(alreadyExistsQueue.front().transfer!=NULL) + { + fileAlreadyExists(alreadyExistsQueue.front().source, + alreadyExistsQueue.front().destination, + alreadyExistsQueue.front().isSame, + alreadyExistsQueue.front().transfer, + true); + } + else if(alreadyExistsQueue.front().scan!=NULL) + folderAlreadyExists(alreadyExistsQueue.front().source, + alreadyExistsQueue.front().destination, + alreadyExistsQueue.front().isSame, + alreadyExistsQueue.front().scan, + true); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"bug, no thread actived"); + alreadyExistsQueue.erase(alreadyExistsQueue.cbegin()); + loop_size--; + } + loop_size=errorQueue.size(); + while(errorQueue.size()>0 && loop_size>0) + { + if(errorQueue.front().transfer!=NULL) + errorOnFile(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().transfer,errorQueue.front().errorType,true); + else if(errorQueue.front().scan!=NULL) + errorOnFolder(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().scan,errorQueue.front().errorType,true); + else if(errorQueue.front().mkPath) + mkPathErrorOnFolder(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().errorType,true); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"bug, no thread actived"); + errorQueue.erase(errorQueue.cbegin()); + loop_size--; + } + //no more to show then reset + dialogIsOpen=false; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.cpp b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.cpp new file mode 100755 index 0000000..8ec21e1 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.cpp @@ -0,0 +1,1129 @@ +/** \file copyEngine.cpp +\brief Define the copy engine +\author alpha_one_x86 */ + +#include +#include +#include + +#include "CopyEngine.h" +#include "FolderExistsDialog.h" +#include "../../../interface/PluginInterface_CopyEngine.h" + +// The cmath header from MSVC does not contain round() +#if (defined(_WIN64) || defined(_WIN32)) && defined(_MSC_VER) +inline double round(double d) { + return floor( d + 0.5 ); +} +#endif + +CopyEngine::CopyEngine(FacilityInterface * facilityEngine) : + listThread(NULL), + tempWidget(NULL), + ui(new Ui::copyEngineOptions()), + uiIsInstalled(false), + uiinterface(NULL), + filters(NULL), + renamingRules(NULL), + facilityEngine(NULL), + doRightTransfer(false), + keepDate(false), + followTheStrictOrder(false), + deletePartiallyTransferredFiles(false), + inodeThreads(0), + renameTheOriginalDestination(false), + moveTheWholeFolder(false), + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync(false), + #endif + checkDestinationFolderExists(false), + mkFullPath(false), + checksum(false), + alwaysDoThisActionForFileExists(FileExistsAction::FileExists_NotSet), + alwaysDoThisActionForFileError(FileErrorAction::FileError_NotSet), + alwaysDoThisActionForFolderError(FileErrorAction::FileError_NotSet), + alwaysDoThisActionForFolderExists(FolderExistsAction::FolderExists_NotSet), + dialogIsOpen(false), + stopIt(false), + size_for_speed(0), + mode(Ultracopier::CopyMode::Copy), + forcedMode(false), + checkDiskSpace(false), + osBufferLimit(0), + errorPutAtEnd(0), + putAtBottom(0) +{ + listThread=new ListThread(facilityEngine); + this->facilityEngine = facilityEngine; + filters = NULL; + renamingRules = NULL; + + uiinterface = NULL; + tempWidget = NULL; + uiIsInstalled = false; + dialogIsOpen = false; + renameTheOriginalDestination = false; + alwaysDoThisActionForFileExists = FileExists_NotSet; + alwaysDoThisActionForFileError = FileError_NotSet; + checkDestinationFolderExists = false; + stopIt = false; + size_for_speed = 0; + putAtBottom = 0; + forcedMode = false; + followTheStrictOrder = false; + deletePartiallyTransferredFiles = true; + inodeThreads = 16; + moveTheWholeFolder = true; + + //implement the SingleShot in this class + //timerActionDone.setSingleShot(true); + timerActionDone.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_TRASNFER_LIST); + //timerProgression.setSingleShot(true); + timerProgression.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_PROGRESSION); + + timerUpdateMount.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_MOUNT_MS); +} + +CopyEngine::~CopyEngine() +{ + /*if(filters!=NULL) + delete filters; + if(renamingRules!=NULL) + delete renamingRules; + destroyed by the widget parent, here the interface + */ + stopIt=true; + delete listThread; + delete ui; +} + +void CopyEngine::connectTheSignalsSlots() +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + debugDialogWindow.show(); + debugDialogWindow.copyEngine=this; + #endif + if(!connect(listThread,&ListThread::isInPause, this,&CopyEngine::isInPause, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect isInPause()"); + if(!connect(listThread,&ListThread::actionInProgess, this,&CopyEngine::actionInProgess, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect actionInProgess()"); + if(!connect(listThread,&ListThread::actionInProgess, this,&CopyEngine::newActionInProgess, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect actionInProgess() to slot"); + if(!connect(listThread,&ListThread::newFolderListing, this,&CopyEngine::newFolderListing, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect newFolderListing()"); + if(!connect(listThread,&ListThread::error, this,&CopyEngine::error, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect error()"); + if(!connect(listThread,&ListThread::rmPath, this,&CopyEngine::rmPath, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect rmPath()"); + if(!connect(listThread,&ListThread::mkPath, this,&CopyEngine::mkPath, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect mkPath()"); + if(!connect(listThread,&ListThread::newActionOnList, this,&CopyEngine::newActionOnList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect newActionOnList()"); + if(!connect(listThread,&ListThread::doneTime, this,&CopyEngine::doneTime, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect doneTime()"); + if(!connect(listThread,&ListThread::pushFileProgression, this,&CopyEngine::pushFileProgression, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect pushFileProgression()"); + if(!connect(listThread,&ListThread::pushGeneralProgression, this,&CopyEngine::pushGeneralProgression, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect pushGeneralProgression()"); + if(!connect(listThread,&ListThread::syncReady, this,&CopyEngine::syncReady, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect syncReady()"); + if(!connect(listThread,&ListThread::canBeDeleted, this,&CopyEngine::canBeDeleted, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect canBeDeleted()"); + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + if(!connect(listThread,&ListThread::debugInformation, this,&CopyEngine::debugInformation, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect debugInformation()"); + #endif + + if(!connect(listThread,&ListThread::send_fileAlreadyExists, this,&CopyEngine::fileAlreadyExistsSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_fileAlreadyExists()"); + if(!connect(listThread,&ListThread::send_errorOnFile, this,&CopyEngine::errorOnFileSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_errorOnFile()"); + if(!connect(listThread,&ListThread::send_folderAlreadyExists, this,&CopyEngine::folderAlreadyExistsSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_folderAlreadyExists()"); + if(!connect(listThread,&ListThread::send_errorOnFolder, this,&CopyEngine::errorOnFolderSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_errorOnFolder()"); + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + if(!connect(listThread,&ListThread::updateTheDebugInfo, this,&CopyEngine::updateTheDebugInfo, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect updateTheDebugInfo()"); + #endif + if(!connect(listThread,&ListThread::errorTransferList, this,&CopyEngine::errorTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect errorTransferList()"); + if(!connect(listThread,&ListThread::warningTransferList, this,&CopyEngine::warningTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect warningTransferList()"); + if(!connect(listThread,&ListThread::mkPathErrorOnFolder, this,&CopyEngine::mkPathErrorOnFolderSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect mkPathErrorOnFolder()"); + if(!connect(listThread,&ListThread::send_realBytesTransfered, this,&CopyEngine::get_realBytesTransfered, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_realBytesTransfered()"); + + if(!connect(this,&CopyEngine::tryCancel, listThread,&ListThread::cancel, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect tryCancel()"); + if(!connect(this,&CopyEngine::getNeedPutAtBottom, listThread,&ListThread::getNeedPutAtBottom, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect getNeedPutAtBottom()"); + if(!connect(listThread,&ListThread::haveNeedPutAtBottom, this,&CopyEngine::haveNeedPutAtBottom, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect haveNeedPutAtBottom()"); + + + if(!connect(this,&CopyEngine::signal_pause, listThread,&ListThread::pause, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_pause()"); + if(!connect(this,&CopyEngine::signal_setSpeedLimitation, listThread,&ListThread::setSpeedLimitation, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setSpeedLimitation()"); + if(!connect(this,&CopyEngine::signal_exportErrorIntoTransferList,listThread,&ListThread::exportErrorIntoTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_exportErrorIntoTransferList()"); + if(!connect(this,&CopyEngine::signal_resume, listThread,&ListThread::resume, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_resume()"); + if(!connect(this,&CopyEngine::signal_skip, listThread,&ListThread::skip, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_skip()"); + if(!connect(this,&CopyEngine::signal_setCollisionAction, listThread,&ListThread::setAlwaysFileExistsAction, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_setCollisionAction()"); + if(!connect(this,&CopyEngine::signal_setFolderCollision, listThread,&ListThread::setFolderCollision, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_setFolderCollision()"); + if(!connect(this,&CopyEngine::signal_removeItems, listThread,&ListThread::removeItems, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_removeItems()"); + if(!connect(this,&CopyEngine::signal_moveItemsOnTop, listThread,&ListThread::moveItemsOnTop, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsOnTop()"); + if(!connect(this,&CopyEngine::signal_moveItemsUp, listThread,&ListThread::moveItemsUp, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsUp()"); + if(!connect(this,&CopyEngine::signal_moveItemsDown, listThread,&ListThread::moveItemsDown, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsDown()"); + if(!connect(this,&CopyEngine::signal_moveItemsOnBottom, listThread,&ListThread::moveItemsOnBottom, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsOnBottom()"); + if(!connect(this,&CopyEngine::signal_exportTransferList, listThread,&ListThread::exportTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_exportTransferList()"); + if(!connect(this,&CopyEngine::signal_importTransferList, listThread,&ListThread::importTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_importTransferList()"); + if(!connect(this,&CopyEngine::signal_forceMode, listThread,&ListThread::forceMode, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_forceMode()"); + if(!connect(this,&CopyEngine::send_moveTheWholeFolder, listThread,&ListThread::setMoveTheWholeFolder, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect moveTheWholeFolder()"); + if(!connect(this,&CopyEngine::send_deletePartiallyTransferredFiles, listThread,&ListThread::setDeletePartiallyTransferredFiles, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect deletePartiallyTransferredFiles()"); + if(!connect(this,&CopyEngine::send_setRenameTheOriginalDestination, listThread,&ListThread::setRenameTheOriginalDestination, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setRenameTheOriginalDestination()"); + if(!connect(this,&CopyEngine::send_setInodeThreads, listThread,&ListThread::setInodeThreads, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setInodeThreads()"); + if(!connect(this,&CopyEngine::send_followTheStrictOrder, listThread,&ListThread::setFollowTheStrictOrder, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect followTheStrictOrder()"); + if(!connect(this,&CopyEngine::send_setFilters,listThread,&ListThread::set_setFilters, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_setFilters()"); + if(!connect(this,&CopyEngine::send_sendNewRenamingRules,listThread,&ListThread::set_sendNewRenamingRules, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_sendNewRenamingRules()"); + if(!connect(&timerActionDone,&QTimer::timeout, listThread,&ListThread::sendActionDone)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerActionDone"); + if(!connect(&timerProgression,&QTimer::timeout, listThread,&ListThread::sendProgression)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerProgression"); + if(!connect(listThread,&ListThread::missingDiskSpace, this,&CopyEngine::missingDiskSpace,Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerProgression"); + + if(!connect(this,&CopyEngine::queryOneNewDialog,this,&CopyEngine::showOneNewDialog,Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect queryOneNewDialog()"); + if(!connect(listThread,&ListThread::errorToRetry,this,&CopyEngine::errorToRetry,Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect errorToRetry()"); + + if(!connect(&timerUpdateMount,&QTimer::timeout,listThread,&ListThread::set_updateMount, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect set_updateMount()"); +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW +void CopyEngine::updateTheDebugInfo(const std::vector &newList, const std::vector &newList2, const int &numberOfInodeOperation) +{ + debugDialogWindow.setTransferThreadList(newList); + debugDialogWindow.setTransferList(newList2); + debugDialogWindow.setInodeUsage(numberOfInodeOperation); +} +#endif + +//to send the options panel +bool CopyEngine::getOptionsEngine(QWidget * tempWidget) +{ + this->tempWidget=tempWidget; + ui->setupUi(tempWidget); + ui->toolBox->setCurrentIndex(0); + connect(tempWidget, &QWidget::destroyed, this, &CopyEngine::resetTempWidget); + + //here else, the default settings can't be loaded + uiIsInstalled=true; + + #ifdef ULTRACOPIER_PLUGIN_RSYNC + setRsync(rsync); + #else + ui->label_rsync->setVisible(false); + ui->rsync->setVisible(false); + #endif + setAutoStart(autoStart); + setCheckDestinationFolderExists(checkDestinationFolderExists); + setMkFullPath(mkFullPath); + setChecksum(checksum); + setRightTransfer(doRightTransfer); + setKeepDate(keepDate); + setOsSpecFlags(os_spec_flags); + setNativeCopy(native_copy); + setFollowTheStrictOrder(followTheStrictOrder); + setDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); + setInodeThreads(inodeThreads); + setRenameTheOriginalDestination(renameTheOriginalDestination); + setMoveTheWholeFolder(moveTheWholeFolder); + setCheckDiskSpace(checkDiskSpace); + setDefaultDestinationFolder(defaultDestinationFolder); + + switch(alwaysDoThisActionForFileExists) + { + case FileExists_NotSet: + ui->comboBoxFileCollision->setCurrentIndex(0); + break; + case FileExists_Skip: + ui->comboBoxFileCollision->setCurrentIndex(1); + break; + case FileExists_Overwrite: + ui->comboBoxFileCollision->setCurrentIndex(2); + break; + case FileExists_OverwriteIfNotSameMdate: + ui->comboBoxFileCollision->setCurrentIndex(3); + break; + case FileExists_OverwriteIfNewer: + ui->comboBoxFileCollision->setCurrentIndex(4); + break; + case FileExists_OverwriteIfOlder: + ui->comboBoxFileCollision->setCurrentIndex(5); + break; + case FileExists_Rename: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + case FileExists_OverwriteIfNotSameSize: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + case FileExists_OverwriteIfNotSameSizeAndDate: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + ui->comboBoxFileCollision->setCurrentIndex(0); + break; + } + switch(alwaysDoThisActionForFileError) + { + case FileError_NotSet: + ui->comboBoxFileError->setCurrentIndex(0); + break; + case FileError_Skip: + ui->comboBoxFileError->setCurrentIndex(1); + break; + case FileError_PutToEndOfTheList: + ui->comboBoxFileError->setCurrentIndex(2); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + ui->comboBoxFileError->setCurrentIndex(0); + break; + } + switch(alwaysDoThisActionForFolderExists) + { + case FolderExists_NotSet: + ui->comboBoxFolderCollision->setCurrentIndex(0); + break; + case FolderExists_Merge: + ui->comboBoxFolderCollision->setCurrentIndex(1); + break; + case FolderExists_Skip: + ui->comboBoxFolderCollision->setCurrentIndex(2); + break; + case FolderExists_Rename: + ui->comboBoxFolderCollision->setCurrentIndex(3); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + ui->comboBoxFolderCollision->setCurrentIndex(0); + break; + } + switch(alwaysDoThisActionForFolderError) + { + case FileError_NotSet: + ui->comboBoxFolderError->setCurrentIndex(0); + break; + case FileError_Skip: + ui->comboBoxFolderError->setCurrentIndex(1); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored: "+std::to_string(alwaysDoThisActionForFolderError)); + ui->comboBoxFolderError->setCurrentIndex(0); + break; + } + return true; +} + +//to have interface widget to do modal dialog +void CopyEngine::setInterfacePointer(QWidget * uiinterface) +{ + this->uiinterface=uiinterface; + if(filters==NULL) + filters=new Filters(tempWidget); + if(renamingRules==NULL) + renamingRules=new RenamingRules(tempWidget); + + if(uiIsInstalled) + { + connect(ui->autoStart, &QCheckBox::toggled, this,&CopyEngine::setAutoStart); + connect(ui->doRightTransfer, &QCheckBox::toggled, this,&CopyEngine::setRightTransfer); + connect(ui->keepDate, &QCheckBox::toggled, this,&CopyEngine::setKeepDate); + connect(ui->os_spec_flags, &QCheckBox::toggled, this,&CopyEngine::setOsSpecFlags); + connect(ui->native_copy, &QCheckBox::toggled, this,&CopyEngine::setNativeCopy); + connect(ui->moveTheWholeFolder, &QCheckBox::toggled, this,&CopyEngine::setMoveTheWholeFolder); + connect(ui->deletePartiallyTransferredFiles, &QCheckBox::toggled, this,&CopyEngine::setDeletePartiallyTransferredFiles); + connect(ui->followTheStrictOrder, &QCheckBox::toggled, this,&CopyEngine::setFollowTheStrictOrder); + connect(ui->checkBoxDestinationFolderExists, &QCheckBox::toggled, this,&CopyEngine::setCheckDestinationFolderExists); + connect(ui->mkpath, &QCheckBox::toggled, this,&CopyEngine::setMkFullPath); + connect(ui->checksum, &QCheckBox::toggled, this,&CopyEngine::setChecksum); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + connect(ui->rsync, &QCheckBox::toggled, this,&CopyEngine::setRsync); + #endif + connect(ui->renameTheOriginalDestination, &QCheckBox::toggled, this,&CopyEngine::setRenameTheOriginalDestination); + connect(filters, &Filters::haveNewFilters, this,&CopyEngine::sendNewFilters); + connect(ui->filters, &QPushButton::clicked, this,&CopyEngine::showFilterDialog); + connect(ui->inodeThreads, &QSpinBox::editingFinished, this,&CopyEngine::inodeThreadsFinished); + connect(ui->inodeThreads, static_cast(&QSpinBox::valueChanged), this,&CopyEngine::setInodeThreads); + connect(ui->defaultDestinationFolderBrowse, &QPushButton::clicked, this,&CopyEngine::defaultDestinationFolderBrowse); + + connect(ui->comboBoxFolderError, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setFolderError); + connect(ui->comboBoxFolderCollision, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setFolderCollision); + connect(ui->comboBoxFileError, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setFileError); + connect(ui->comboBoxFileCollision, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setFileCollision); + + if(!connect(renamingRules,&RenamingRules::sendNewRenamingRules,this,&CopyEngine::sendNewRenamingRules)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect sendNewRenamingRules()"); + if(!connect(ui->renamingRules,&QPushButton::clicked,this,&CopyEngine::showRenamingRules)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect renamingRules.clicked()"); + } + + if(!filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions)) + { + includeStrings.clear(); + includeOptions.clear(); + excludeStrings.clear(); + excludeOptions.clear(); + set_setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); + } + + renamingRules->setRenamingRules(firstRenamingRule,otherRenamingRule); + emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +bool CopyEngine::haveSameSource(const std::vector &sources) +{ + return listThread->haveSameSource(sources); +} + +bool CopyEngine::haveSameDestination(const std::string &destination) +{ + return listThread->haveSameDestination(destination); +} + +std::string CopyEngine::stringimplode(const std::vector& elems, const std::string &delim) +{ + std::string newString; + for (std::vector::const_iterator ii = elems.begin(); ii != elems.cend(); ++ii) + { + newString += (*ii); + if ( ii + 1 != elems.end() ) { + newString += delim; + } + } + return newString; +} + +bool CopyEngine::newCopy(const std::vector &sources) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,stringimplode(sources,", ")); + if(forcedMode && mode!=Ultracopier::Copy) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to move, you can't copy with it"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to move, you can't copy with it")); + return false; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + std::string destination; + if(!defaultDestinationFolder.empty() && QDir(QString::fromStdString(defaultDestinationFolder)).exists()) + destination = defaultDestinationFolder; + else + destination = askDestination(); + if(destination.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); + return false; + } + return listThread->newCopy(sources,destination); +} + +bool CopyEngine::newCopy(const std::vector &sources,const std::string &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,stringimplode(sources,", ")+" "+destination); + if(forcedMode && mode!=Ultracopier::Copy) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to move, you can't copy with it"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to move, you can't copy with it")); + return false; + } + return listThread->newCopy(sources,destination); +} + +bool CopyEngine::newMove(const std::vector &sources) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,stringimplode(sources,", ")); + if(forcedMode && mode!=Ultracopier::Move) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to copy, you can't move with it"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to copy, you can't move with it")); + return false; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + std::string destination; + if(!ui->defaultDestinationFolder->text().isEmpty() && QDir(ui->defaultDestinationFolder->text()).exists()) + destination = ui->defaultDestinationFolder->text().toStdString(); + else + destination = askDestination(); + if(destination.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); + return false; + } + return listThread->newMove(sources,destination); +} + +bool CopyEngine::newMove(const std::vector &sources,const std::string &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,stringimplode(sources,", ")+" "+destination); + if(forcedMode && mode!=Ultracopier::Move) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to copy, you can't move with it"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to copy, you can't move with it")); + return false; + } + return listThread->newMove(sources,destination); +} + +void CopyEngine::defaultDestinationFolderBrowse() +{ + std::string destination = askDestination(); + if(destination.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(uiIsInstalled) + ui->defaultDestinationFolder->setText(QString::fromStdString(destination)); +} + +std::string CopyEngine::askDestination() +{ + std::string destination = listThread->getUniqueDestinationFolder(); + if(!destination.empty()) + { + QMessageBox::StandardButton button=QMessageBox::question(uiinterface,tr("Destination"),tr("Use the actual destination \"%1\"?") + .arg(QString::fromStdString(destination)), + QMessageBox::Yes | QMessageBox::No,QMessageBox::Yes); + if(button==QMessageBox::Yes) + return destination; + } + destination=QFileDialog::getExistingDirectory(uiinterface,QString::fromStdString(facilityEngine->translateText("Select destination directory")),QStringLiteral(""),QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toStdString(); + return destination; +} + +void CopyEngine::newTransferList(const std::string &file) +{ + emit signal_importTransferList(file); +} + +//because direct access to list thread into the main thread can't be do +uint64_t CopyEngine::realByteTransfered() +{ + return size_for_speed; +} + +//speed limitation +bool CopyEngine::supportSpeedLimitation() const +{ + return true; +} + +/** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ +void CopyEngine::syncTransferList() +{ + listThread->syncTransferList(); +} + +void CopyEngine::set_setFilters(std::vector includeStrings,std::vector includeOptions,std::vector excludeStrings,std::vector excludeOptions) +{ + if(filters==NULL) + filters=new Filters(); + if(filters!=NULL) + { + if(!filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions)) + { + includeStrings.clear(); + includeOptions.clear(); + excludeStrings.clear(); + excludeOptions.clear(); + } + emit send_setFilters(filters->getInclude(),filters->getExclude()); + listThread->set_setFilters(filters->getInclude(),filters->getExclude()); + } + this->includeStrings=includeStrings; + this->includeOptions=includeOptions; + this->excludeStrings=excludeStrings; + this->excludeOptions=excludeOptions; +} + +void CopyEngine::setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) +{ + sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +bool CopyEngine::userAddFolder(const Ultracopier::CopyMode &mode) +{ + std::string source = QFileDialog::getExistingDirectory(uiinterface,QString::fromStdString(facilityEngine->translateText("Select source directory")), + QStringLiteral(""), + QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toStdString(); + if(source.empty() || source=="") + return false; + std::vector sources; + sources.push_back(source); + if(mode==Ultracopier::Copy) + return newCopy(sources); + else + return newMove(sources); +} + +bool CopyEngine::userAddFile(const Ultracopier::CopyMode &mode) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QStringList sources = QFileDialog::getOpenFileNames( + uiinterface, + QString::fromStdString(facilityEngine->translateText("Select one or more files to open")), + QStringLiteral(""), + QString::fromStdString(facilityEngine->translateText("All files"))+QStringLiteral(" (*)")); + + std::vector sourcesstd; + unsigned int index=0; + while(index<(unsigned int)sources.size()) + { + sourcesstd.push_back(sources.at(index).toStdString()); + index++; + } + + if(sourcesstd.empty()) + return false; + if(mode==Ultracopier::Copy) + return newCopy(sourcesstd); + else + return newMove(sourcesstd); +} + +void CopyEngine::pause() +{ + emit signal_pause(); +} + +void CopyEngine::resume() +{ + emit signal_resume(); +} + +void CopyEngine::skip(const uint64_t &id) +{ + emit signal_skip(id); +} + +void CopyEngine::cancel() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + stopIt=true; + timerProgression.stop(); + timerActionDone.stop(); + emit tryCancel(); +} + +void CopyEngine::removeItems(const std::vector &ids) +{ + emit signal_removeItems(ids); +} + +void CopyEngine::moveItemsOnTop(const std::vector &ids) +{ + emit signal_moveItemsOnTop(ids); +} + +void CopyEngine::moveItemsUp(const std::vector &ids) +{ + emit signal_moveItemsUp(ids); +} + +void CopyEngine::moveItemsDown(const std::vector &ids) +{ + emit signal_moveItemsDown(ids); +} + +void CopyEngine::moveItemsOnBottom(const std::vector &ids) +{ + emit signal_moveItemsOnBottom(ids); +} + +/** \brief give the forced mode, to export/import transfer list */ +void CopyEngine::forceMode(const Ultracopier::CopyMode &mode) +{ + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(mode==Ultracopier::Move) + { + listThread->setRsync(false); + rsync=false; + } + if(uiIsInstalled) + ui->rsync->setEnabled(mode==Ultracopier::Copy); + #endif + if(forcedMode) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Mode forced previously"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The mode has been forced previously. This is an internal error, please report it")); + return; + } + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(mode==Ultracopier::Move) + rsync=false; + #endif + if(mode==Ultracopier::Copy) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to copy"); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to move"); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(uiIsInstalled) + ui->rsync->setEnabled(mode==Ultracopier::Copy); + #endif + this->mode=mode; + forcedMode=true; + emit signal_forceMode(mode); +} + +void CopyEngine::exportTransferList() +{ + std::string fileName = QFileDialog::getSaveFileName(uiinterface,QString::fromStdString(facilityEngine->translateText("Save transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); + if(fileName.empty()) + return; + emit signal_exportTransferList(fileName); +} + +void CopyEngine::importTransferList() +{ + std::string fileName = QFileDialog::getOpenFileName(uiinterface,QString::fromStdString(facilityEngine->translateText("Open transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); + if(fileName.empty()) + return; + emit signal_importTransferList(fileName); +} + +void CopyEngine::warningTransferList(const std::string &warning) +{ + QMessageBox::warning(uiinterface,QString::fromStdString(facilityEngine->translateText("Error")),QString::fromStdString(warning)); +} + +void CopyEngine::errorTransferList(const std::string &error) +{ + QMessageBox::critical(uiinterface,QString::fromStdString(facilityEngine->translateText("Error")),QString::fromStdString(error)); +} + +bool CopyEngine::setSpeedLimitation(const int64_t &speedLimitation) +{ + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"maxSpeed: "+std::to_string(speedLimitation)); + emit signal_setSpeedLimitation(speedLimitation); + return false; +} + +void CopyEngine::setFileCollision(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(uiIsInstalled) + if(index!=ui->comboBoxFileCollision->currentIndex()) + ui->comboBoxFileCollision->setCurrentIndex(index); + switch(index) + { + case 0: + alwaysDoThisActionForFileExists=FileExists_NotSet; + break; + case 1: + alwaysDoThisActionForFileExists=FileExists_Skip; + break; + case 2: + alwaysDoThisActionForFileExists=FileExists_Overwrite; + break; + case 3: + alwaysDoThisActionForFileExists=FileExists_OverwriteIfNotSameMdate; + break; + case 4: + alwaysDoThisActionForFileExists=FileExists_OverwriteIfNewer; + break; + case 5: + alwaysDoThisActionForFileExists=FileExists_OverwriteIfOlder; + break; + case 6: + alwaysDoThisActionForFileExists=FileExists_Rename; + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + alwaysDoThisActionForFileExists=FileExists_NotSet; + break; + } + emit signal_setCollisionAction(alwaysDoThisActionForFileExists); +} + +void CopyEngine::setFileError(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(uiIsInstalled) + if(index!=ui->comboBoxFileError->currentIndex()) + ui->comboBoxFileError->setCurrentIndex(index); + switch(index) + { + case 0: + alwaysDoThisActionForFileError=FileError_NotSet; + break; + case 1: + alwaysDoThisActionForFileError=FileError_Skip; + break; + case 2: + alwaysDoThisActionForFileError=FileError_PutToEndOfTheList; + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + alwaysDoThisActionForFileError=FileError_NotSet; + break; + } + //emit signal_setCollisionAction(alwaysDoThisActionForFileExists); +} + +void CopyEngine::setRightTransfer(const bool doRightTransfer) +{ + this->doRightTransfer=doRightTransfer; + if(uiIsInstalled) + ui->doRightTransfer->setChecked(doRightTransfer); + listThread->setRightTransfer(doRightTransfer); +} + +//set keep date +void CopyEngine::setKeepDate(const bool keepDate) +{ + this->keepDate=keepDate; + if(uiIsInstalled) + ui->keepDate->setChecked(keepDate); + listThread->setKeepDate(keepDate); +} + +void CopyEngine::setOsSpecFlags(const bool os_spec_flags) +{ + this->os_spec_flags=os_spec_flags; + if(uiIsInstalled) + ui->os_spec_flags->setChecked(os_spec_flags); + listThread->setOsSpecFlags(os_spec_flags); +} + +void CopyEngine::setNativeCopy(const bool native_copy) +{ + this->native_copy=native_copy; + if(uiIsInstalled) + ui->native_copy->setChecked(native_copy); + listThread->setNativeCopy(native_copy); +} + +void CopyEngine::setMoveTheWholeFolder(const bool &moveTheWholeFolder) +{ + this->moveTheWholeFolder=moveTheWholeFolder; + if(uiIsInstalled) + ui->moveTheWholeFolder->setChecked(moveTheWholeFolder); + emit send_moveTheWholeFolder(moveTheWholeFolder); +} + +void CopyEngine::setFollowTheStrictOrder(const bool &followTheStrictOrder) +{ + this->followTheStrictOrder=followTheStrictOrder; + if(uiIsInstalled) + ui->followTheStrictOrder->setChecked(followTheStrictOrder); + listThread->setFollowTheStrictOrder(followTheStrictOrder); + emit send_followTheStrictOrder(followTheStrictOrder); +} + +void CopyEngine::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) +{ + this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; + if(uiIsInstalled) + ui->deletePartiallyTransferredFiles->setChecked(deletePartiallyTransferredFiles); + emit send_deletePartiallyTransferredFiles(deletePartiallyTransferredFiles); +} + +void CopyEngine::setInodeThreads(const int &inodeThreads) +{ + this->inodeThreads=inodeThreads; + if(uiIsInstalled) + ui->inodeThreads->setValue(inodeThreads); + emit send_setInodeThreads(inodeThreads); +} + +void CopyEngine::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) +{ + this->renameTheOriginalDestination=renameTheOriginalDestination; + if(uiIsInstalled) + ui->renameTheOriginalDestination->setChecked(renameTheOriginalDestination); + emit send_setRenameTheOriginalDestination(renameTheOriginalDestination); +} + +void CopyEngine::inodeThreadsFinished() +{ + this->inodeThreads=ui->inodeThreads->value(); + emit send_setInodeThreads(inodeThreads); +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void CopyEngine::setRsync(const bool rsync) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); + this->rsync=rsync; + if(uiIsInstalled) + { + ui->rsync->setChecked(rsync); + ui->rsync->setEnabled(forcedMode && mode==Ultracopier::Copy); + ui->label_rsync->setEnabled(forcedMode && mode==Ultracopier::Copy); + } + listThread->setRsync(rsync); +} +#endif + +//set check destination folder +void CopyEngine::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) +{ + this->checkDestinationFolderExists=checkDestinationFolderExists; + if(uiIsInstalled) + ui->checkBoxDestinationFolderExists->setChecked(checkDestinationFolderExists); + listThread->setCheckDestinationFolderExists(checkDestinationFolderExists); +} + +void CopyEngine::setMkFullPath(const bool mkFullPath) +{ + this->mkFullPath=mkFullPath; + if(uiIsInstalled) + ui->mkpath->setChecked(mkFullPath); + listThread->setMkFullPath(mkFullPath); +} + +void CopyEngine::setChecksum(const bool checksum) +{ + this->checksum=checksum; + if(uiIsInstalled) + ui->checksum->setChecked(checksum); +} + +//reset widget +void CopyEngine::resetTempWidget() +{ + uiIsInstalled=false; + tempWidget=NULL; +} + +void CopyEngine::setFolderCollision(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(uiIsInstalled) + if(index!=ui->comboBoxFolderCollision->currentIndex()) + ui->comboBoxFolderCollision->setCurrentIndex(index); + switch(index) + { + case 0: + setComboBoxFolderCollision(FolderExists_NotSet,false); + break; + case 1: + setComboBoxFolderCollision(FolderExists_Merge,false); + break; + case 2: + setComboBoxFolderCollision(FolderExists_Skip,false); + break; + case 3: + setComboBoxFolderCollision(FolderExists_Rename,false); + break; + } + emit signal_setFolderCollision(alwaysDoThisActionForFolderExists); +} + +void CopyEngine::setFolderError(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(uiIsInstalled) + if(index!=ui->comboBoxFolderError->currentIndex()) + ui->comboBoxFolderError->setCurrentIndex(index); + switch(index) + { + case 0: + setComboBoxFolderError(FileError_NotSet,false); + break; + case 1: + setComboBoxFolderError(FileError_Skip,false); + break; + } + emit signal_setCollisionAction(alwaysDoThisActionForFileExists); +} + +//set the translate +void CopyEngine::newLanguageLoaded() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, retranslate the widget options"); + if(tempWidget!=NULL) + { + ui->retranslateUi(tempWidget); + ui->comboBoxFolderError->setItemText(0,tr("Ask")); + ui->comboBoxFolderError->setItemText(1,tr("Skip")); + + ui->comboBoxFolderCollision->setItemText(0,tr("Ask")); + ui->comboBoxFolderCollision->setItemText(1,tr("Merge")); + ui->comboBoxFolderCollision->setItemText(2,tr("Skip")); + ui->comboBoxFolderCollision->setItemText(3,tr("Rename")); + + ui->comboBoxFileError->setItemText(0,tr("Ask")); + ui->comboBoxFileError->setItemText(1,tr("Skip")); + ui->comboBoxFileError->setItemText(2,tr("Put at the end")); + + ui->comboBoxFileCollision->setItemText(0,tr("Ask")); + ui->comboBoxFileCollision->setItemText(1,tr("Skip")); + ui->comboBoxFileCollision->setItemText(2,tr("Overwrite")); + ui->comboBoxFileCollision->setItemText(3,tr("Overwrite if different")); + ui->comboBoxFileCollision->setItemText(4,tr("Overwrite if newer")); + ui->comboBoxFileCollision->setItemText(5,tr("Overwrite if older")); + ui->comboBoxFileCollision->setItemText(6,tr("Rename")); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"ui not loaded!"); +} + +void CopyEngine::setComboBoxFolderCollision(FolderExistsAction action,bool changeComboBox) +{ + alwaysDoThisActionForFolderExists=action; + emit signal_setFolderCollision(alwaysDoThisActionForFolderExists); + if(!changeComboBox || !uiIsInstalled) + return; + switch(action) + { + case FolderExists_Merge: + ui->comboBoxFolderCollision->setCurrentIndex(1); + break; + case FolderExists_Skip: + ui->comboBoxFolderCollision->setCurrentIndex(2); + break; + case FolderExists_Rename: + ui->comboBoxFolderCollision->setCurrentIndex(3); + break; + default: + ui->comboBoxFolderCollision->setCurrentIndex(0); + break; + } +} + +void CopyEngine::setComboBoxFolderError(FileErrorAction action,bool changeComboBox) +{ + alwaysDoThisActionForFolderError=action; + if(!changeComboBox || !uiIsInstalled) + return; + switch(action) + { + case FileError_Skip: + ui->comboBoxFolderError->setCurrentIndex(1); + break; + default: + ui->comboBoxFolderError->setCurrentIndex(0); + break; + } +} + + +void CopyEngine::showFilterDialog() +{ + if(filters!=NULL) + filters->exec(); +} + +void CopyEngine::sendNewFilters() +{ + if(filters!=NULL) + emit send_setFilters(filters->getInclude(),filters->getExclude()); +} + +void CopyEngine::sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +void CopyEngine::showRenamingRules() +{ + if(renamingRules==NULL) + { + QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded. Unable to access the filters")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); + return; + } + renamingRules->exec(); +} + +void CopyEngine::get_realBytesTransfered(quint64 realBytesTransfered) +{ + size_for_speed=realBytesTransfered; +} + +void CopyEngine::newActionInProgess(Ultracopier::EngineActionInProgress action) +{ + if(action==Ultracopier::Idle) + { + timerProgression.stop(); + timerActionDone.stop(); + } + else + { + timerProgression.start(); + timerActionDone.start(); + } +} + +void CopyEngine::setCheckDiskSpace(const bool &checkDiskSpace) +{ + this->checkDiskSpace=checkDiskSpace; + if(uiIsInstalled) + ui->checkDiskSpace->setChecked(checkDiskSpace); + listThread->setCheckDiskSpace(checkDiskSpace); +} + +void CopyEngine::setBuffer(const bool &buffer) +{ + this->buffer=buffer; + if(uiIsInstalled) + ui->buffer->setChecked(buffer); + listThread->setBuffer(buffer); +} + +void CopyEngine::setDefaultDestinationFolder(const std::string &defaultDestinationFolder) +{ + this->defaultDestinationFolder=defaultDestinationFolder; + if(uiIsInstalled) + ui->defaultDestinationFolder->setText(QString::fromStdString(defaultDestinationFolder)); +} + +void CopyEngine::exportErrorIntoTransferList() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"exportErrorIntoTransferList"); + std::string fileName = QFileDialog::getSaveFileName(uiinterface,QString::fromStdString(facilityEngine->translateText("Save transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); + if(fileName.empty()) + return; + emit signal_exportErrorIntoTransferList(fileName); +} + +//set auto start +void CopyEngine::setAutoStart(const bool autoStart) +{ + this->autoStart=autoStart; + if(uiIsInstalled) + ui->autoStart->setChecked(autoStart); + listThread->setAutoStart(autoStart); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.h b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.h new file mode 100755 index 0000000..caba5b5 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.h @@ -0,0 +1,356 @@ +/** \file copyEngine.h +\brief Define the copy engine +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "FileErrorDialog.h" +#include "FileExistsDialog.h" +#include "FolderExistsDialog.h" +#include "FileIsSameDialog.h" +#include "ui_copyEngineOptions.h" +#include "Environment.h" +#include "ListThread.h" +#include "Filters.h" +#include "RenamingRules.h" + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW +#include "DebugDialog.h" +#include +#endif + +#ifndef COPY_ENGINE_H +#define COPY_ENGINE_H + +namespace Ui { + class copyEngineOptions; +} + +/// \brief the implementation of copy engine plugin, manage directly few stuff, else pass to ListThread class. +class CopyEngine : public PluginInterface_CopyEngine +{ + Q_OBJECT +public: + CopyEngine(FacilityInterface * facilityEngine); + ~CopyEngine(); + void connectTheSignalsSlots(); +private: + ListThread * listThread; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + DebugDialog debugDialogWindow; + #endif + QWidget * tempWidget; + Ui::copyEngineOptions * ui; + bool uiIsInstalled; + QWidget * uiinterface; + Filters * filters; + RenamingRules * renamingRules; + FacilityInterface * facilityEngine; + bool doRightTransfer; + bool keepDate; + bool os_spec_flags; + bool native_copy; + bool followTheStrictOrder; + bool deletePartiallyTransferredFiles; + int inodeThreads; + bool renameTheOriginalDestination; + bool moveTheWholeFolder; + bool autoStart; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + bool rsync; + #endif + bool checkDestinationFolderExists; + bool mkFullPath; + bool checksum; + FileExistsAction alwaysDoThisActionForFileExists; + FileErrorAction alwaysDoThisActionForFileError; + FileErrorAction alwaysDoThisActionForFolderError; + FolderExistsAction alwaysDoThisActionForFolderExists; + bool dialogIsOpen; + volatile bool stopIt; + std::string defaultDestinationFolder; + /// \brief error queue + struct errorQueueItem + { + TransferThreadAsync * transfer; ///< NULL if send by scan thread + ScanFileOrFolder * scan; ///< NULL if send by transfer thread + bool mkPath; + bool rmPath; + INTERNALTYPEPATH inode; + std::string errorString; + ErrorType errorType; + }; + std::vector errorQueue; + /// \brief already exists queue + struct alreadyExistsQueueItem + { + TransferThreadAsync * transfer; ///< NULL if send by scan thread + ScanFileOrFolder * scan; ///< NULL if send by transfer thread + INTERNALTYPEPATH source; + INTERNALTYPEPATH destination; + bool isSame; + }; + std::vector alreadyExistsQueue; + uint64_t size_for_speed;//because direct access to list thread into the main thread can't be do + Ultracopier::CopyMode mode; + bool forcedMode; + + bool checkDiskSpace; + bool buffer; + unsigned int osBufferLimit; + std::vector includeStrings,includeOptions,excludeStrings,excludeOptions; + std::string firstRenamingRule; + std::string otherRenamingRule; + uint64_t errorPutAtEnd; + + //send action done timer + QTimer timerActionDone; + //send progression timer + QTimer timerProgression; + + QTimer timerUpdateMount; + int putAtBottom;//to keep how many automatic put at bottom have been used +private slots: + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + void updateTheDebugInfo(const std::vector &newList, const std::vector &newList2, const int &numberOfInodeOperation); + friend class DebugDialog; + #endif + + /************* External call ********************/ + //dialog message + /// \note Can be call without queue because all call will be serialized + void fileAlreadyExistsSlot(INTERNALTYPEPATH source, INTERNALTYPEPATH destination, bool isSame, TransferThreadAsync * thread); + /// \note Can be call without queue because all call will be serialized + void errorOnFileSlot(INTERNALTYPEPATH fileInfo, std::string errorString, TransferThreadAsync * thread, const ErrorType &errorType); + /// \note Can be call without queue because all call will be serialized + void folderAlreadyExistsSlot(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,ScanFileOrFolder * thread); + /// \note Can be call without queue because all call will be serialized + void errorOnFolderSlot(INTERNALTYPEPATH fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType); + //mkpath event + void mkPathErrorOnFolderSlot(INTERNALTYPEPATH, std::string, ErrorType errorType); + + //dialog message + /// \note Can be call without queue because all call will be serialized + void fileAlreadyExists(INTERNALTYPEPATH source, INTERNALTYPEPATH destination, bool isSame, TransferThreadAsync * thread, bool isCalledByShowOneNewDialog=false); + /// \note Can be call without queue because all call will be serialized + void errorOnFile(INTERNALTYPEPATH fileInfo, std::string errorString, TransferThreadAsync * thread, const ErrorType &errorType, bool isCalledByShowOneNewDialog=false); + /// \note Can be call without queue because all call will be serialized + void folderAlreadyExists(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,ScanFileOrFolder * thread,bool isCalledByShowOneNewDialog=false); + /// \note Can be call without queue because all call will be serialized + void errorOnFolder(INTERNALTYPEPATH fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType, bool isCalledByShowOneNewDialog=false); + //mkpath event + void mkPathErrorOnFolder(INTERNALTYPEPATH, std::string, const ErrorType &errorType, bool isCalledByShowOneNewDialog=false); + + //show one new dialog if needed + void showOneNewDialog(); + void sendNewFilters(); + + void showFilterDialog(); + void sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule); + void showRenamingRules(); + void get_realBytesTransfered(quint64 realBytesTransfered); + void newActionInProgess(Ultracopier::EngineActionInProgress); + void haveNeedPutAtBottom(bool needPutAtBottom, const INTERNALTYPEPATH &fileInfo, const std::string &errorString, TransferThreadAsync *thread, const ErrorType &errorType); + void missingDiskSpace(std::vector list); + void exportErrorIntoTransferList() override; +public: + /** \brief to send the options panel + * \return return false if have not the options + * \param tempWidget the widget to generate on it the options */ + bool getOptionsEngine(QWidget * tempWidget) override; + /** \brief to have interface widget to do modal dialog + * \param interface to have the widget of the interface, useful for modal dialog */ + void setInterfacePointer(QWidget * uiinterface) override; + //return empty if multiple + /** \brief compare the current sources of the copy, with the passed arguments + * \param sources the sources list to compares with the current sources list + * \return true if have same sources, else false (or empty) */ + bool haveSameSource(const std::vector &sources) override; + /** \brief compare the current destination of the copy, with the passed arguments + * \param destination the destination to compares with the current destination + * \return true if have same destination, else false (or empty) */ + bool haveSameDestination(const std::string &destination) override; + //external soft like file browser have send copy/move list to do + /** \brief send copy without destination, ask the destination + * \param sources the sources list to copy + * \return true if the copy have been accepted */ + bool newCopy(const std::vector &sources) override; + /** \brief send copy with destination + * \param sources the sources list to copy + * \param destination the destination to copy + * \return true if the copy have been accepted */ + bool newCopy(const std::vector &sources,const std::string &destination) override; + /** \brief send move without destination, ask the destination + * \param sources the sources list to move + * \return true if the move have been accepted */ + bool newMove(const std::vector &sources) override; + /** \brief send move without destination, ask the destination + * \param sources the sources list to move + * \param destination the destination to move + * \return true if the move have been accepted */ + bool newMove(const std::vector &sources,const std::string &destination) override; + /** \brief send the new transfer list + * \param file the transfer list */ + void newTransferList(const std::string &file) override; + + /** \brief to get byte read, use by Ultracopier for the speed calculation + * real size transfered to right speed calculation */ + uint64_t realByteTransfered() override; + /** \brief support speed limitation */ + bool supportSpeedLimitation() const override; + + /** \brief to set drives detected + * specific to this copy engine */ + + /** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ + void syncTransferList() override; + + void set_setFilters(std::vector includeStrings,std::vector includeOptions,std::vector excludeStrings,std::vector excludeOptions); + void setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void setRsync(const bool rsync); + #endif + void setCheckDiskSpace(const bool &checkDiskSpace); + void setDefaultDestinationFolder(const std::string &defaultDestinationFolder); + void defaultDestinationFolderBrowse(); + std::string askDestination(); + static std::string stringimplode(const std::vector& elems, const std::string &delim); + void setBuffer(const bool &buffer); +public slots: + //user ask ask to add folder (add it with interface ask source/destination) + /** \brief add folder called on the interface + * Used by manual adding */ + bool userAddFolder(const Ultracopier::CopyMode &mode) override; + /** \brief add file called on the interface + * Used by manual adding */ + bool userAddFile(const Ultracopier::CopyMode &mode) override; + //action on the copy + /// \brief put the transfer in pause + void pause() override; + /// \brief resume the transfer + void resume() override; + /** \brief skip one transfer entry + * \param id id of the file to remove */ + void skip(const uint64_t &id) override; + /// \brief cancel all the transfer + void cancel() override; + //edit the transfer list + /** \brief remove the selected item + * \param ids ids is the id list of the selected items */ + void removeItems(const std::vector &ids) override; + /** \brief move on top of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnTop(const std::vector &ids) override; + /** \brief move up the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsUp(const std::vector &ids) override; + /** \brief move down the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsDown(const std::vector &ids) override; + /** \brief move on bottom of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnBottom(const std::vector &ids) override; + + /** \brief give the forced mode, to export/import transfer list */ + void forceMode(const Ultracopier::CopyMode &mode) override; + /// \brief export the transfer list into a file + void exportTransferList() override; + /// \brief import the transfer list into a file + void importTransferList() override; + + /** \brief to set the speed limitation + * -1 if not able, 0 if disabled */ + bool setSpeedLimitation(const int64_t &speedLimitation) override; + + // specific to this copy engine + + /// \brief set if the rights shoul be keep + void setRightTransfer(const bool doRightTransfer); + /// \brief set keep date + void setKeepDate(const bool keepDate); + void setOsSpecFlags(bool os_spec_flags); + void setNativeCopy(bool native_copy); + + void setMoveTheWholeFolder(const bool &moveTheWholeFolder); + void setFollowTheStrictOrder(const bool &followTheStrictOrder); + void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); + void setInodeThreads(const int &inodeThreads); + void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); + void inodeThreadsFinished(); + + /// \brief set auto start + void setAutoStart(const bool autoStart); + /// \brief set if need check if the destination folder exists + void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); + void setMkFullPath(const bool mkFullPath); + void setChecksum(const bool checksum); + /// \brief reset widget + void resetTempWidget(); + //autoconnect + void setFolderCollision(int index); + void setFolderError(int index); + void setFileCollision(int index); + void setFileError(int index); + /// \brief need retranslate the insterface + void newLanguageLoaded(); +private slots: + void setComboBoxFolderCollision(FolderExistsAction action,bool changeComboBox=true); + void setComboBoxFolderError(FileErrorAction action,bool changeComboBox=true); + void warningTransferList(const std::string &warning); + void errorTransferList(const std::string &error); +signals: + //action on the copy + void signal_pause() const; + void signal_resume() const; + void signal_skip(const uint64_t &id) const; + void signal_setSpeedLimitation(const int64_t &speedLimitation); + + //edit the transfer list + void signal_removeItems(const std::vector &ids) const; + void signal_moveItemsOnTop(const std::vector &ids) const; + void signal_moveItemsUp(const std::vector &ids) const; + void signal_moveItemsDown(const std::vector &ids) const; + void signal_moveItemsOnBottom(const std::vector &ids) const; + + void signal_forceMode(const Ultracopier::CopyMode &mode) const; + void signal_exportTransferList(const std::string &fileName) const; + void signal_importTransferList(const std::string &fileName) const; + void signal_exportErrorIntoTransferList(const std::string &fileName) const; + + //action + void signal_setCollisionAction(FileExistsAction alwaysDoThisActionForFileExists) const; + //void signal_setComboBoxFolderCollision(FolderExistsAction action) const;// -> duplicate with signal_setFolderCollision ? + void signal_setFolderCollision(FolderExistsAction action) const; + + //internal cancel + void tryCancel() const; + void getNeedPutAtBottom(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,TransferThreadAsync * thread,const ErrorType &errorType) const; + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; + #endif + + //other signals + void queryOneNewDialog() const; + + void send_setFilters(const std::vector &include,const std::vector &exclude) const; + void send_sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) const; + void send_followTheStrictOrder(const bool &followTheStrictOrder) const; + void send_deletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) const; + void send_setInodeThreads(const int &inodeThreads) const; + void send_moveTheWholeFolder(const bool &moveTheWholeFolder) const; + void send_setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) const; +}; + +#endif // COPY_ENGINE_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.pro b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.pro new file mode 100755 index 0000000..c7b7651 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.pro @@ -0,0 +1,115 @@ +CONFIG += c++11 +QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" +mac:QMAKE_CXXFLAGS+="-stdlib=libc++" + +QT += widgets xml +DEFINES += _FILE_OFFSET_BITS=64 UNICODE _UNICODE WIDESTRING _LARGE_FILE_SOURCE=1 +TEMPLATE = lib +CONFIG += plugin + +HEADERS += \ + $$PWD/StructEnumDefinition.h \ + $$PWD/StructEnumDefinition_CopyEngine.h \ + $$PWD/DebugEngineMacro.h \ + $$PWD/CopyEngineUltracopier-SpecVariable.h \ + $$PWD/TransferThread.h \ + $$PWD/MkPath.h \ + $$PWD/ListThread.h \ + $$PWD/../../../interface/PluginInterface_CopyEngine.h \ + $$PWD/../../../interface/OptionInterface.h \ + $$PWD/../../../interface/FacilityInterface.h \ + $$PWD/../../../cpp11addition.h \ + $$PWD/Filters.h \ + $$PWD/FilterRules.h \ + $$PWD/RenamingRules.h \ + $$PWD/DriveManagement.h \ + $$PWD/CopyEngine.h \ + $$PWD/DebugDialog.h \ + $$PWD/CopyEngineFactory.h \ + $$PWD/FileErrorDialog.h \ + $$PWD/FileExistsDialog.h \ + $$PWD/FileIsSameDialog.h \ + $$PWD/FolderExistsDialog.h \ + $$PWD/ScanFileOrFolder.h \ + $$PWD/DiskSpace.h \ + async/ReadThread.h \ + async/WriteThread.h +SOURCES += \ + $$PWD/TransferThread.cpp \ + $$PWD/MkPath.cpp \ + $$PWD/ListThread.cpp \ + $$PWD/../../../cpp11addition.cpp \ + $$PWD/../../../cpp11additionstringtointcpp.cpp \ + $$PWD/Filters.cpp \ + $$PWD/FilterRules.cpp \ + $$PWD/RenamingRules.cpp \ + $$PWD/ListThread_InodeAction.cpp \ + $$PWD/DriveManagement.cpp \ + $$PWD/CopyEngine-collision-and-error.cpp \ + $$PWD/CopyEngine.cpp \ + $$PWD/DebugDialog.cpp \ + $$PWD/CopyEngineFactory.cpp \ + $$PWD/FileErrorDialog.cpp \ + $$PWD/FileExistsDialog.cpp \ + $$PWD/FileIsSameDialog.cpp \ + $$PWD/FolderExistsDialog.cpp \ + $$PWD/ScanFileOrFolder.cpp \ + $$PWD/DiskSpace.cpp \ + ListThreadActions.cpp \ + ListThreadListChange.cpp \ + ListThreadMedia.cpp \ + ListThreadNew.cpp \ + ListThreadOptions.cpp \ + ListThreadScan.cpp \ + ListThreadStat.cpp \ + async/ReadThread.cpp \ + async/WriteThread.cpp +TARGET = $$qtLibraryTarget(copyEngine) +TRANSLATIONS += \ + $$PWD/Languages/ar/translation.ts \ + $$PWD/Languages/de/translation.ts \ + $$PWD/Languages/el/translation.ts \ + $$PWD/Languages/en/translation.ts \ + $$PWD/Languages/es/translation.ts \ + $$PWD/Languages/fr/translation.ts \ + $$PWD/Languages/hi/translation.ts \ + $$PWD/Languages/hu/translation.ts \ + $$PWD/Languages/id/translation.ts \ + $$PWD/Languages/it/translation.ts \ + $$PWD/Languages/ja/translation.ts \ + $$PWD/Languages/ko/translation.ts \ + $$PWD/Languages/nl/translation.ts \ + $$PWD/Languages/no/translation.ts \ + $$PWD/Languages/pl/translation.ts \ + $$PWD/Languages/pt/translation.ts \ + $$PWD/Languages/ru/translation.ts \ + $$PWD/Languages/th/translation.ts \ + $$PWD/Languages/tr/translation.ts \ + $$PWD/Languages/zh/translation.ts + +FORMS += \ + $$PWD/fileErrorDialog.ui \ + $$PWD/fileExistsDialog.ui \ + $$PWD/fileIsSameDialog.ui \ + $$PWD/debugDialog.ui \ + $$PWD/folderExistsDialog.ui \ + $$PWD/Filters.ui \ + $$PWD/FilterRules.ui \ + $$PWD/RenamingRules.ui \ + $$PWD/copyEngineOptions.ui \ + $$PWD/DiskSpace.ui + +OTHER_FILES += \ + $$PWD/informations.xml + +!CONFIG(static) { +RESOURCES += \ + $$PWD/copyEngineResources.qrc +} + +win32 { + LIBS += -ladvapi32 + DEFINES += WIDESTRING +} +HEADERS += $$PWD/async/TransferThreadAsync.h +SOURCES += $$PWD/async/TransferThreadAsync.cpp diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.cpp b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.cpp new file mode 100755 index 0000000..9dc9bc2 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.cpp @@ -0,0 +1,654 @@ +/** \file factory.cpp +\brief Define the factory to create new instance +\author alpha_one_x86 */ + +#include +#include +#include +#include +#include + +#include "../../../cpp11addition.h" +#include "CopyEngineFactory.h" +#include "TransferThread.h" +#ifdef Q_OS_LINUX +#include +#endif +#ifdef Q_OS_WIN32 +#include +#endif + +// The cmath header from MSVC does not contain round() +#if (defined(_WIN64) || defined(_WIN32)) && defined(_MSC_VER) +inline double round(double d) { + return floor( d + 0.5 ); +} +#endif + +CopyEngineFactory::CopyEngineFactory() : + ui(new Ui::copyEngineOptions()) +{ + qRegisterMetaType("FolderExistsAction"); + qRegisterMetaType("FileExistsAction"); + qRegisterMetaType >("std::vector"); + qRegisterMetaType("TransferStat"); + qRegisterMetaType("ActionType"); + qRegisterMetaType("ErrorType"); + qRegisterMetaType("Diskspace"); + qRegisterMetaType >("std::vector"); + qRegisterMetaType("Ultracopier::CopyMode"); + qRegisterMetaType("TransferThread::dirent_uc"); + #ifdef WIDESTRING + qRegisterMetaType("std::wstring"); + qRegisterMetaType("wchar_t *"); + #endif + + tempWidget=new QWidget(); + ui->setupUi(tempWidget); + ui->toolBox->setCurrentIndex(0); + errorFound=false; + optionsEngine=NULL; + filters=new Filters(tempWidget); + renamingRules=new RenamingRules(tempWidget); + + connect(ui->doRightTransfer, &QCheckBox::toggled, this,&CopyEngineFactory::setDoRightTransfer); + connect(ui->keepDate, &QCheckBox::toggled, this,&CopyEngineFactory::setKeepDate); + connect(ui->native_copy, &QCheckBox::toggled, this,&CopyEngineFactory::setNativeCopy); + connect(ui->os_spec_flags, &QCheckBox::toggled, this,&CopyEngineFactory::setOsSpecFlags); + connect(ui->inodeThreads, static_cast(&QSpinBox::valueChanged), this,&CopyEngineFactory::on_inodeThreads_editingFinished); + connect(ui->autoStart, &QCheckBox::toggled, this,&CopyEngineFactory::setAutoStart); + connect(ui->comboBoxFolderError, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFolderError); + connect(ui->comboBoxFolderCollision, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFolderCollision); + connect(ui->comboBoxFileError, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFileError); + connect(ui->comboBoxFileCollision, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFileCollision); + connect(ui->checkBoxDestinationFolderExists, &QCheckBox::toggled, this,&CopyEngineFactory::setCheckDestinationFolder); + connect(ui->mkpath, &QCheckBox::toggled, this,&CopyEngineFactory::setMkFullPath); + connect(ui->checksum, &QCheckBox::toggled, this,&CopyEngineFactory::setChecksum); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + connect(ui->rsync, &QCheckBox::toggled, this,&CopyEngineFactory::setRsync); + #endif + connect(ui->inodeThreads, &QSpinBox::editingFinished, this,&CopyEngineFactory::on_inodeThreads_editingFinished); + connect(ui->moveTheWholeFolder, &QCheckBox::toggled, this,&CopyEngineFactory::moveTheWholeFolder); + connect(ui->followTheStrictOrder, &QCheckBox::toggled, this,&CopyEngineFactory::followTheStrictOrder); + connect(ui->deletePartiallyTransferredFiles,&QCheckBox::toggled, this,&CopyEngineFactory::deletePartiallyTransferredFiles); + connect(ui->renameTheOriginalDestination,&QCheckBox::toggled, this,&CopyEngineFactory::renameTheOriginalDestination); + connect(ui->checkDiskSpace, &QCheckBox::toggled, this,&CopyEngineFactory::checkDiskSpace); + connect(ui->buffer, &QCheckBox::toggled, this,&CopyEngineFactory::setBuffer); + connect(ui->defaultDestinationFolderBrowse,&QPushButton::clicked, this,&CopyEngineFactory::defaultDestinationFolderBrowse); + connect(ui->defaultDestinationFolder,&QLineEdit::editingFinished, this,&CopyEngineFactory::defaultDestinationFolder); + + connect(filters,&Filters::sendNewFilters,this,&CopyEngineFactory::sendNewFilters); + connect(ui->filters,&QPushButton::clicked,this,&CopyEngineFactory::showFilterDialog); + connect(renamingRules,&RenamingRules::sendNewRenamingRules,this,&CopyEngineFactory::sendNewRenamingRules); + connect(ui->renamingRules,&QPushButton::clicked,this,&CopyEngineFactory::showRenamingRules); + + lunchInitFunction.setInterval(0); + lunchInitFunction.setSingleShot(true); + connect(&lunchInitFunction,&QTimer::timeout,this,&CopyEngineFactory::init,Qt::QueuedConnection); + lunchInitFunction.start(); +} + +CopyEngineFactory::~CopyEngineFactory() +{ + delete renamingRules; + delete filters; + delete ui; +} + +void CopyEngineFactory::init() +{ +} + +PluginInterface_CopyEngine * CopyEngineFactory::getInstance() +{ + CopyEngine *realObject=new CopyEngine(facilityEngine); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(realObject,&CopyEngine::debugInformation,this,&CopyEngineFactory::debugInformation); + #endif + realObject->connectTheSignalsSlots(); + PluginInterface_CopyEngine * newTransferEngine=realObject; + connect(this,&CopyEngineFactory::reloadLanguage,realObject,&CopyEngine::newLanguageLoaded); + realObject->setRightTransfer(ui->doRightTransfer->isChecked()); + realObject->setKeepDate(ui->keepDate->isChecked()); + realObject->setOsSpecFlags(ui->os_spec_flags->isChecked()); + realObject->setNativeCopy(ui->native_copy->isChecked()); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + realObject->setRsync(ui->rsync->isChecked()); + #endif + realObject->setAutoStart(ui->autoStart->isChecked()); + realObject->setFolderCollision(ui->comboBoxFolderCollision->currentIndex()); + realObject->setFolderError(ui->comboBoxFolderError->currentIndex()); + realObject->setFileCollision(ui->comboBoxFileCollision->currentIndex()); + realObject->setFileError(ui->comboBoxFileError->currentIndex()); + realObject->setCheckDestinationFolderExists(ui->checkBoxDestinationFolderExists->isChecked()); + realObject->setMkFullPath(ui->mkpath->isChecked()); + realObject->setChecksum(ui->checksum->isChecked()); + realObject->set_setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); + realObject->setRenamingRules(firstRenamingRule,otherRenamingRule); + realObject->setMoveTheWholeFolder(ui->moveTheWholeFolder->isChecked()); + realObject->setFollowTheStrictOrder(ui->followTheStrictOrder->isChecked()); + realObject->setDeletePartiallyTransferredFiles(ui->deletePartiallyTransferredFiles->isChecked()); + realObject->setInodeThreads(ui->inodeThreads->value()); + realObject->setRenameTheOriginalDestination(ui->renameTheOriginalDestination->isChecked()); + realObject->setCheckDiskSpace(ui->checkDiskSpace->isChecked()); + realObject->setDefaultDestinationFolder(ui->defaultDestinationFolder->text().toStdString()); + realObject->setBuffer(ui->buffer->isChecked()); + return newTransferEngine; +} + +void CopyEngineFactory::setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath, + FacilityInterface * facilityInterface,const bool &portableVersion) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath:"+pluginPath); + this->facilityEngine=facilityInterface; + Q_UNUSED(portableVersion); + #ifndef ULTRACOPIER_PLUGIN_DEBUG + Q_UNUSED(writePath); + Q_UNUSED(pluginPath); + #endif + #if ! defined (Q_CC_GNU) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("Unable to change date time of files, only gcc is supported")); + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,COMPILERINFO); + #if defined (UNICODE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"UNICODE set"); + #endif + #if defined (_FILE_OFFSET_BITS) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"_FILE_OFFSET_BITS set to "+std::to_string(_FILE_OFFSET_BITS)); + #endif + #if defined (WIDESTRING) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"WIDESTRING set"); + #endif + #if defined (_LARGE_FILE_SOURCE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"_LARGE_FILE_SOURCE set to "+std::to_string(_LARGE_FILE_SOURCE)); + #endif + #if defined (ULTRACOPIER_PLUGIN_CHECKLISTTYPE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"CHECK LIST TYPE set"); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"CHECK LIST TYPE not set"); + #endif + #ifdef Q_OS_WIN32 + MEMORYSTATUSEX memoryStatus; + if(GlobalMemoryStatusEx(&memoryStatus)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Detected Memory MB Windows: "+std::to_string(memoryStatus.ullTotalPhys/1024)); + #endif + #ifdef Q_OS_LINUX + struct sysinfo info; + if(sysinfo(&info)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Detected Memory MB Linux: "+std::to_string(info.totalhigh*info.mem_unit/1024/1024)); + #endif + if(options!=NULL) + { + //load the options + std::vector > KeysList; + KeysList.push_back(std::pair("doRightTransfer","true")); + #ifndef Q_OS_LINUX + KeysList.push_back(std::pair("keepDate","false")); + #else + KeysList.push_back(std::pair("keepDate","true")); + #endif + KeysList.push_back(std::pair("native_copy","false")); + KeysList.push_back(std::pair("os_spec_flags","true")); + KeysList.push_back(std::pair("blockSize",std::to_string(ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE))); + //to prevent swap and other bad effect, only under windows and unix for now + #if defined(Q_OS_WIN32) or (defined(Q_OS_LINUX) and defined(_SC_PHYS_PAGES)) + size_t max_memory=getTotalSystemMemory()/1024; + if(max_memory>2147483648) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("detected memory: %1MB").arg(max_memory/1024).toStdString()); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("detected memory: %1GB").arg(max_memory/(1024*1024)).toStdString()); + #endif + KeysList.push_back(std::pair("parallelizeIfSmallerThan",std::to_string(128)));//128KB, better for modern hardware: Multiple queue en linux, SSD, ... + KeysList.push_back(std::pair("autoStart","true")); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + KeysList.push_back(std::pair("rsync","true")); + #endif + KeysList.push_back(std::pair("folderError",std::to_string(0))); + KeysList.push_back(std::pair("folderCollision",std::to_string(0))); + KeysList.push_back(std::pair("fileError",std::to_string(2))); + KeysList.push_back(std::pair("fileCollision",std::to_string(0))); + KeysList.push_back(std::pair("transferAlgorithm",std::to_string(0))); + KeysList.push_back(std::pair("checkDestinationFolder","true")); + KeysList.push_back(std::pair("mkpath","true")); + KeysList.push_back(std::pair("checksum","false")); + KeysList.push_back(std::pair("includeStrings","")); + KeysList.push_back(std::pair("includeOptions","")); + KeysList.push_back(std::pair("excludeStrings","")); + KeysList.push_back(std::pair("excludeOptions","")); + KeysList.push_back(std::pair("checksumIgnoreIfImpossible","true")); + KeysList.push_back(std::pair("checksumOnlyOnError","true")); + KeysList.push_back(std::pair("firstRenamingRule","")); + KeysList.push_back(std::pair("otherRenamingRule","")); + KeysList.push_back(std::pair("osBufferLimited","false")); + KeysList.push_back(std::pair("osBufferLimit",std::to_string(512))); + KeysList.push_back(std::pair("deletePartiallyTransferredFiles","true")); + KeysList.push_back(std::pair("moveTheWholeFolder","true")); + KeysList.push_back(std::pair("followTheStrictOrder","true")); + KeysList.push_back(std::pair("renameTheOriginalDestination","false")); + KeysList.push_back(std::pair("checkDiskSpace","true")); + KeysList.push_back(std::pair("defaultDestinationFolder","")); + KeysList.push_back(std::pair("inodeThreads",std::to_string(16))); + #ifdef Q_OS_WIN32 + //un Windows, without buffer the write seam should be aligned and full block, Ultracopier not support this + KeysList.push_back(std::pair("osBuffer","true")); + KeysList.push_back(std::pair("buffer","true")); + #else + KeysList.push_back(std::pair("osBuffer","false")); + KeysList.push_back(std::pair("buffer","false")); + #endif + options->addOptionGroup(KeysList); + + optionsEngine=options; + resetOptions(); + + std::string firstRenamingRule=options->getOptionValue("firstRenamingRule"); + if(firstRenamingRule.find("%name%")==std::string::npos || firstRenamingRule.find("%suffix%")==std::string::npos) + options->setOptionValue("firstRenamingRule",""); + std::string otherRenamingRule=options->getOptionValue("otherRenamingRule"); + if(otherRenamingRule.find("%name%")==std::string::npos || otherRenamingRule.find("%suffix%")==std::string::npos + || otherRenamingRule.find("%number%")==std::string::npos) + options->setOptionValue("otherRenamingRule",""); + } +} + +std::vector CopyEngineFactory::supportedProtocolsForTheSource() const +{ + std::vector l; + l.push_back("file"); + return l; +} + +std::vector CopyEngineFactory::supportedProtocolsForTheDestination() const +{ + std::vector l; + l.push_back("file"); + return l; +} + +Ultracopier::CopyType CopyEngineFactory::getCopyType() +{ + return Ultracopier::FileAndFolder; +} + +Ultracopier::TransferListOperation CopyEngineFactory::getTransferListOperation() +{ + return Ultracopier::TransferListOperation_ImportExport; +} + +bool CopyEngineFactory::canDoOnlyCopy() const +{ + return false; +} + +/// \brief to get if have pause +bool CopyEngineFactory::havePause() +{ + return true; +} + +void CopyEngineFactory::resetOptions() +{ + auto options=optionsEngine; + optionsEngine=NULL; + #if ! defined (Q_CC_GNU) + ui->keepDate->setEnabled(false); + ui->keepDate->setToolTip(QStringLiteral("Not supported with this compiler")); + #endif + ui->doRightTransfer->setChecked(stringtobool(options->getOptionValue("doRightTransfer"))); + ui->keepDate->setChecked(stringtobool(options->getOptionValue("keepDate"))); + ui->os_spec_flags->setChecked(stringtobool(options->getOptionValue("os_spec_flags"))); + ui->native_copy->setChecked(stringtobool(options->getOptionValue("native_copy"))); + #ifdef Q_OS_WIN32 + ui->native_copy->setEnabled(false); + ui->native_copy->setToolTip(tr("Supported only on Windows")); + #endif + ui->autoStart->setChecked(stringtobool(options->getOptionValue("autoStart"))); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + ui->rsync->setChecked(stringtobool(options->getOptionValue("rsync"))); + #else + ui->label_rsync->setVisible(false); + ui->rsync->setVisible(false); + #endif + ui->comboBoxFolderError->setCurrentIndex(stringtouint32(options->getOptionValue("folderError"))); + ui->comboBoxFolderCollision->setCurrentIndex(stringtouint32(options->getOptionValue("folderCollision"))); + ui->comboBoxFileError->setCurrentIndex(stringtouint32(options->getOptionValue("fileError"))); + ui->comboBoxFileCollision->setCurrentIndex(stringtouint32(options->getOptionValue("fileCollision"))); + ui->checkBoxDestinationFolderExists->setChecked(stringtobool(options->getOptionValue("checkDestinationFolder"))); + ui->mkpath->setChecked(stringtobool(options->getOptionValue("mkpath"))); + ui->checksum->setChecked(stringtobool(options->getOptionValue("checksum"))); + ui->deletePartiallyTransferredFiles->setChecked(stringtobool(options->getOptionValue("deletePartiallyTransferredFiles"))); + ui->moveTheWholeFolder->setChecked(stringtobool(options->getOptionValue("moveTheWholeFolder"))); + ui->followTheStrictOrder->setChecked(stringtobool(options->getOptionValue("followTheStrictOrder"))); + ui->inodeThreads->setValue(stringtouint32(options->getOptionValue("inodeThreads"))); + ui->renameTheOriginalDestination->setChecked(stringtobool(options->getOptionValue("renameTheOriginalDestination"))); + ui->checkDiskSpace->setChecked(stringtobool(options->getOptionValue("checkDiskSpace"))); + ui->defaultDestinationFolder->setText(QString::fromStdString(options->getOptionValue("defaultDestinationFolder"))); + ui->buffer->setChecked(stringtobool(options->getOptionValue("buffer"))); + + //ui->autoStart->setChecked(options->getOptionValue("autoStart").toBool());//moved from options(), wrong previous place + std::string s; + s=options->getOptionValue("includeStrings"); + includeStrings=stringtostringlist(s); + s=options->getOptionValue("includeOptions"); + includeOptions=stringtostringlist(s); + s=options->getOptionValue("excludeStrings"); + excludeStrings=stringtostringlist(s); + s=options->getOptionValue("excludeOptions"); + excludeOptions=stringtostringlist(s); + if(!filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions)) + { + includeStrings.clear(); + includeOptions.clear(); + excludeStrings.clear(); + excludeOptions.clear(); + options->setOptionValue("includeStrings",""); + options->setOptionValue("includeOptions",""); + options->setOptionValue("excludeStrings",""); + options->setOptionValue("excludeOptions",""); + } + firstRenamingRule=options->getOptionValue("firstRenamingRule"); + otherRenamingRule=options->getOptionValue("otherRenamingRule"); + renamingRules->setRenamingRules(firstRenamingRule,otherRenamingRule); + + optionsEngine=options; +} + +QWidget * CopyEngineFactory::options() +{ + return tempWidget; +} + +void CopyEngineFactory::setDoRightTransfer(bool doRightTransfer) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("doRightTransfer",booltostring(doRightTransfer)); +} + +void CopyEngineFactory::setKeepDate(bool keepDate) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("keepDate",booltostring(keepDate)); +} + +void CopyEngineFactory::setOsSpecFlags(bool os_spec_flags) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("os_spec_flags",booltostring(os_spec_flags)); +} + +void CopyEngineFactory::setNativeCopy(bool native_copy) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("native_copy",booltostring(native_copy)); +} + +void CopyEngineFactory::setFolderCollision(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("folderCollision",std::to_string(index)); +} + +void CopyEngineFactory::setFolderError(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("folderError",std::to_string(index)); +} + +void CopyEngineFactory::setCheckDestinationFolder() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("checkDestinationFolder",booltostring(ui->checkBoxDestinationFolderExists->isChecked())); +} + +void CopyEngineFactory::setMkFullPath() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("mkpath",booltostring(ui->mkpath->isChecked())); +} + +void CopyEngineFactory::setChecksum() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("checksum",booltostring(ui->checksum->isChecked())); +} + +void CopyEngineFactory::newLanguageLoaded() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, retranslate the widget options"); + OptionInterface * optionsEngine=this->optionsEngine; + this->optionsEngine=NULL; + ui->retranslateUi(tempWidget); + ui->comboBoxFolderError->setItemText(0,tr("Ask")); + ui->comboBoxFolderError->setItemText(1,tr("Skip")); + + ui->comboBoxFolderCollision->setItemText(0,tr("Ask")); + ui->comboBoxFolderCollision->setItemText(1,tr("Merge")); + ui->comboBoxFolderCollision->setItemText(2,tr("Skip")); + ui->comboBoxFolderCollision->setItemText(3,tr("Rename")); + + ui->comboBoxFileError->setItemText(0,tr("Ask")); + ui->comboBoxFileError->setItemText(1,tr("Skip")); + ui->comboBoxFileError->setItemText(2,tr("Put at the end")); + + ui->comboBoxFileCollision->setItemText(0,tr("Ask")); + ui->comboBoxFileCollision->setItemText(1,tr("Skip")); + ui->comboBoxFileCollision->setItemText(2,tr("Overwrite")); + ui->comboBoxFileCollision->setItemText(3,tr("Overwrite if different")); + ui->comboBoxFileCollision->setItemText(4,tr("Overwrite if newer")); + ui->comboBoxFileCollision->setItemText(5,tr("Overwrite if older")); + ui->comboBoxFileCollision->setItemText(6,tr("Rename")); + + if(optionsEngine!=NULL) + { + filters->newLanguageLoaded(); + renamingRules->newLanguageLoaded(); + } + emit reloadLanguage(); + this->optionsEngine=optionsEngine; +} + +void CopyEngineFactory::showFilterDialog() +{ + if(optionsEngine==NULL) + { + QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded. Unable to access the filters")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); + return; + } + filters->exec(); +} + +void CopyEngineFactory::sendNewFilters(const std::vector &includeStrings,const std::vector &includeOptions,const std::vector &excludeStrings,const std::vector &excludeOptions) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); + this->includeStrings=includeStrings; + this->includeOptions=includeOptions; + this->excludeStrings=excludeStrings; + this->excludeOptions=excludeOptions; + if(optionsEngine!=NULL) + { + optionsEngine->setOptionValue("includeStrings",stringlisttostring(includeStrings)); + optionsEngine->setOptionValue("includeOptions",stringlisttostring(includeOptions)); + optionsEngine->setOptionValue("excludeStrings",stringlisttostring(excludeStrings)); + optionsEngine->setOptionValue("excludeOptions",stringlisttostring(excludeOptions)); + } +} + +void CopyEngineFactory::sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + if(optionsEngine!=NULL) + { + optionsEngine->setOptionValue("firstRenamingRule",firstRenamingRule); + optionsEngine->setOptionValue("otherRenamingRule",otherRenamingRule); + } +} + +void CopyEngineFactory::showRenamingRules() +{ + if(optionsEngine==NULL) + { + QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded, can't access to the filters")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); + return; + } + renamingRules->exec(); +} + +void CopyEngineFactory::setFileCollision(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(optionsEngine==NULL) + return; + switch(index) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + optionsEngine->setOptionValue("fileCollision",std::to_string(index)); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + break; + } +} + +void CopyEngineFactory::setFileError(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(optionsEngine==NULL) + return; + switch(index) + { + case 0: + case 1: + case 2: + optionsEngine->setOptionValue("fileError",std::to_string(index)); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + break; + } +} + +void CopyEngineFactory::deletePartiallyTransferredFiles(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("deletePartiallyTransferredFiles",booltostring(checked)); +} + +void CopyEngineFactory::renameTheOriginalDestination(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("renameTheOriginalDestination",booltostring(checked)); +} + +void CopyEngineFactory::checkDiskSpace(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("checkDiskSpace",booltostring(checked)); +} + +void CopyEngineFactory::defaultDestinationFolderBrowse() +{ + QString destination = QFileDialog::getExistingDirectory(ui->defaultDestinationFolder, + QString::fromStdString(facilityEngine->translateText("Select destination directory")), + "",QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + if(destination.isEmpty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + ui->defaultDestinationFolder->setText(destination); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("defaultDestinationFolder",destination.toStdString()); +} + +void CopyEngineFactory::defaultDestinationFolder() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("defaultDestinationFolder",ui->defaultDestinationFolder->text().toStdString()); +} + +void CopyEngineFactory::followTheStrictOrder(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("followTheStrictOrder",booltostring(checked)); +} + +void CopyEngineFactory::moveTheWholeFolder(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("moveTheWholeFolder",booltostring(checked)); +} + +void CopyEngineFactory::on_inodeThreads_editingFinished() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the spinbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("inodeThreads",std::to_string(ui->inodeThreads->value())); +} + +#ifdef Q_OS_WIN32 +size_t CopyEngineFactory::getTotalSystemMemory() +{ + MEMORYSTATUSEX status; + status.dwLength = sizeof(status); + GlobalMemoryStatusEx(&status); + return status.ullTotalPhys; +} +#endif + +#ifdef Q_OS_LINUX +size_t CopyEngineFactory::getTotalSystemMemory() +{ + long pages = sysconf(_SC_PHYS_PAGES); + long page_size = sysconf(_SC_PAGE_SIZE); + return pages * page_size; +} +#endif + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +void CopyEngineFactory::setRsync(bool rsync) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("rsync",std::to_string(rsync)); +} +#endif + +void CopyEngineFactory::setBuffer(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("buffer",booltostring(checked)); +} + +void CopyEngineFactory::setAutoStart(bool autoStart) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("autoStart",booltostring(autoStart)); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.h b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.h new file mode 100755 index 0000000..810af80 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.h @@ -0,0 +1,127 @@ +/** \file factory.h +\brief Define the factory to create new instance +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include "StructEnumDefinition_CopyEngine.h" + +#include +#include +#include +#include +#include +#include + +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "qstorageinfo.h" +#include "StructEnumDefinition.h" +#include "ui_copyEngineOptions.h" +#include "CopyEngine.h" +#include "Environment.h" +#include "Filters.h" +#include "RenamingRules.h" + +#ifdef Q_OS_WIN32 + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include +#endif +#ifdef Q_OS_LINUX + #include +#endif + +#ifndef FACTORY_H +#define FACTORY_H + +namespace Ui { + class copyEngineOptions; +} + +/** \brief to generate copy engine instance */ +class CopyEngineFactory : public PluginInterface_CopyEngineFactory +{ + Q_OBJECT + #ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.CopyEngineFactory/1.0.0.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_CopyEngineFactory) + #endif +public: + CopyEngineFactory(); + ~CopyEngineFactory(); + /// \brief to return the instance of the copy engine + PluginInterface_CopyEngine * getInstance() override; + /// \brief set the resources, to store options, to have facilityInterface + void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath, + FacilityInterface * facilityInterface,const bool &portableVersion) override; + //get mode allowed + /// \brief define if can copy file, folder or both + Ultracopier::CopyType getCopyType() override; + /// \brief to return which kind of transfer list operation is supported + Ultracopier::TransferListOperation getTransferListOperation() override; + /// \brief define if can only copy, or copy and move + bool canDoOnlyCopy() const override; + /// \brief to get the supported protocols for the source + std::vector supportedProtocolsForTheSource() const override; + /// \brief to get the supported protocols for the destination + std::vector supportedProtocolsForTheDestination() const override; + /// \brief to get the options of the copy engine + QWidget * options() override; + /// \brief to get if have pause + bool havePause() override; + +private: + Ui::copyEngineOptions *ui; + QWidget* tempWidget; + OptionInterface * optionsEngine; + bool errorFound; + FacilityInterface * facilityEngine; + Filters *filters; + RenamingRules *renamingRules; + QStorageInfo storageInfo; + QTimer lunchInitFunction; + std::vector includeStrings,includeOptions,excludeStrings,excludeOptions; + std::string firstRenamingRule,otherRenamingRule; + +#if defined(Q_OS_WIN32) || (defined(Q_OS_LINUX) && defined(_SC_PHYS_PAGES)) + static size_t getTotalSystemMemory(); +#endif +private slots: + void init(); + void setDoRightTransfer(bool doRightTransfer); + void setKeepDate(bool keepDate); + void setOsSpecFlags(bool os_spec_flags); + void setNativeCopy(bool native_copy); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void setRsync(bool rsync); + #endif + void setFolderCollision(int index); + void setFolderError(int index); + void setCheckDestinationFolder(); + void setMkFullPath(); + void setChecksum(); + void showFilterDialog(); + void sendNewFilters(const std::vector &includeStrings,const std::vector &includeOptions, + const std::vector &excludeStrings,const std::vector &excludeOptions); + void sendNewRenamingRules(const std::string &firstRenamingRule, const std::string &otherRenamingRule); + void showRenamingRules(); + void setFileCollision(int index); + void setFileError(int index); + void deletePartiallyTransferredFiles(bool checked); + void renameTheOriginalDestination(bool checked); + void checkDiskSpace(bool checked); + void defaultDestinationFolderBrowse(); + void defaultDestinationFolder(); + void followTheStrictOrder(bool checked); + void moveTheWholeFolder(bool checked); + void on_inodeThreads_editingFinished(); + void setBuffer(bool checked); + void setAutoStart(bool autoStart); +public slots: + void resetOptions() override; + void newLanguageLoaded() override; +signals: + void reloadLanguage() const; +}; + +#endif // FACTORY_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngineUltracopier-SpecVariable.h b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineUltracopier-SpecVariable.h new file mode 100755 index 0000000..247680c --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineUltracopier-SpecVariable.h @@ -0,0 +1,43 @@ +/** \file Variable.h +\brief Define the environment variable +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef VARIABLE_H +#define VARIABLE_H + +//Un-comment this next line to put ultracopier plugin in debug mode +#ifndef ULTRACOPIER_NODEBUG +//#define ULTRACOPIER_PLUGIN_DEBUG +//#define ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER +//#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW +#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW_TIMER 150 +#endif + +#define ULTRACOPIER_PLUGIN_MINTIMERINTERVAL 50 +#define ULTRACOPIER_PLUGIN_MAXTIMERINTERVAL 100 +#define ULTRACOPIER_PLUGIN_NUMSEMSPEEDMANAGEMENT 2 +#define ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER 1 +#define ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS 788965200//1995 +#define ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE 256 //in KB +#define ULTRACOPIER_PLUGIN_DEFAULT_SEQUENTIAL_NUMBER_OF_BLOCK 512 +#define ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK 128 +#define ULTRACOPIER_PLUGIN_MAX_BLOCK_SIZE 16*1024 //in KB +#define ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK 2048 +#define ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK 128 //in KB + +//if set, check the inode type at scanFileOrFolder, deprecated into the new algorithm and not used +#define ULTRACOPIER_PLUGIN_CHECKLISTTYPE +#define ULTRACOPIER_PLUGIN_SPEED_SUPPORT + +//#define ULTRACOPIER_PLUGIN_RIGHTS + +/** \brief Need be greater than 2, but greater than 20 to be efficient */ +#define ULTRACOPIER_PLUGIN_TIME_UPDATE_TRASNFER_LIST 40 +#define ULTRACOPIER_PLUGIN_TIME_UPDATE_PROGRESSION 200 +#define ULTRACOPIER_PLUGIN_TIME_UPDATE_MOUNT_MS 60*1000 + +#endif // VARIABLE_H + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.cpp new file mode 100755 index 0000000..79e1088 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.cpp @@ -0,0 +1,63 @@ +/** \file debugDialog.cpp +\brief Define the dialog to have debug information +\author alpha_one_x86 */ + +#include "DebugDialog.h" +#include "ui_debugDialog.h" +#include "CopyEngine.h" + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + +DebugDialog::DebugDialog(QWidget *parent) : + QWidget(parent), + ui(new Ui::debugDialog) +{ + ui->setupUi(this); + connect(&timer,&QTimer::timeout,this,&DebugDialog::updateOnTimer); + timer.start(200); +} + +DebugDialog::~DebugDialog() +{ + delete ui; +} + +void DebugDialog::setTransferList(const std::vector &list) +{ + ui->tranferList->clear(); + unsigned int index=0; + while(indextranferList->addItem(QString::fromStdString(list.at(index))); + index++; + } +} + +void DebugDialog::setActiveTransfer(const int &activeTransfer) +{ + ui->spinBoxActiveTransfer->setValue(activeTransfer); +} + +void DebugDialog::setInodeUsage(const int &inodeUsage) +{ + ui->spinBoxNumberOfInode->setValue(inodeUsage); +} + +void DebugDialog::setTransferThreadList(const std::vector &list) +{ + ui->transferThreadList->clear(); + unsigned int index=0; + while(indextransferThreadList->addItem(QString::fromStdString(list.at(index))); + index++; + } +} + +void DebugDialog::updateOnTimer() +{ + ui->alreadyExistsQueue->setValue(copyEngine->alreadyExistsQueue.size()); + ui->errorQueue->setValue(copyEngine->errorQueue.size()); +} + +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.h b/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.h new file mode 100755 index 0000000..0da388e --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.h @@ -0,0 +1,48 @@ +/** \file debugDialog.h +\brief Define the dialog to have debug information +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef DEBUGDAILOG_H +#define DEBUGDAILOG_H + +#include "Environment.h" + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW +#include +#include + +namespace Ui { + class debugDialog; +} + +class CopyEngine; + +/// \brief class to the dialog to have debug information +class DebugDialog : public QWidget +{ + Q_OBJECT +public: + explicit DebugDialog(QWidget *parent = 0); + ~DebugDialog(); + /// \brief to set the transfer list, limited in result to not slow down the application + void setTransferList(const std::vector &list); + /// \brief show the transfer thread, it show be a thread pool in normal time + void setTransferThreadList(const std::vector &list); + /// \brief show how many transfer is active + void setActiveTransfer(const int &activeTransfer); + /// \brief show many many inode is manipulated + void setInodeUsage(const int &inodeUsage); + + CopyEngine *copyEngine; +private: + Ui::debugDialog *ui; + QTimer timer; + +private slots: + void updateOnTimer(); +}; + +#endif // ULTRACOPIER_PLUGIN_DEBUG_WINDOW + +#endif // DEBUGDAILOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/DebugEngineMacro.h b/plugins/CopyEngine/Ultracopier-Spec/DebugEngineMacro.h new file mode 100755 index 0000000..f9b5349 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DebugEngineMacro.h @@ -0,0 +1,28 @@ +/** \file DebugEngineMacro.h +\brief Define the macro for the debug +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef DEBUGENGINEMACRO_H +#define DEBUGENGINEMACRO_H + +#ifdef WIN32 +# define __func__ __FUNCTION__ +#endif + +/// \brief Macro for the debug log +#ifdef ULTRACOPIER_PLUGIN_DEBUG + #if defined (__FILE__) && defined (__LINE__) + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b,__FILE__,__LINE__) + #else + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b) + #endif +#else // ULTRACOPIER_PLUGIN_DEBUG + #define ULTRACOPIER_DEBUGCONSOLE(a,b) void() +#endif // ULTRACOPIER_PLUGIN_DEBUG + +#endif // DEBUGENGINEMACRO_H + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.cpp b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.cpp new file mode 100755 index 0000000..e9b996d --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.cpp @@ -0,0 +1,53 @@ +#include "DiskSpace.h" +#include "ui_DiskSpace.h" +#include "StructEnumDefinition_CopyEngine.h" + +DiskSpace::DiskSpace(FacilityInterface * facilityEngine,std::vector list,QWidget *parent) : + QDialog(parent), + ui(new Ui::DiskSpace) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + ok=false; + int index=0; + int size=list.size(); + QString drives; + while(indexsizeToString(list.at(index).freeSpace))) + .arg(QString::fromStdString(facilityEngine->sizeToString(list.at(index).requiredSpace))); + drives+=QStringLiteral("
"); + index++; + } + ui->drives->setText(drives); +} + +DiskSpace::~DiskSpace() +{ + delete ui; +} + +void DiskSpace::on_ok_clicked() +{ + ok=true; + close(); +} + +void DiskSpace::on_cancel_clicked() +{ + ok=false; + close(); +} + +bool DiskSpace::getAction() const +{ + return ok; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.h b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.h new file mode 100755 index 0000000..5a923ab --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.h @@ -0,0 +1,29 @@ +#ifndef DISKSPACE_H +#define DISKSPACE_H + +#include +#include +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "StructEnumDefinition_CopyEngine.h" + +namespace Ui { +class DiskSpace; +} + +class DiskSpace : public QDialog +{ + Q_OBJECT + +public: + explicit DiskSpace(FacilityInterface * facilityEngine,std::vector list,QWidget *parent = 0); + ~DiskSpace(); + bool getAction() const; +private slots: + void on_ok_clicked(); + void on_cancel_clicked(); +private: + Ui::DiskSpace *ui; + bool ok; +}; + +#endif // DISKSPACE_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.ui b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.ui new file mode 100755 index 0000000..ebf380f --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.ui @@ -0,0 +1,68 @@ + + + DiskSpace + + + + 0 + 0 + 367 + 146 + + + + Disk space + + + + :/CopyEngine/Ultracopier-Spec/resources/remove.png:/CopyEngine/Ultracopier-Spec/resources/remove.png + + + + + + You need more space on this drive to finish this transfer + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Continue + + + + + + + Cancel + + + + + + + + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.cpp b/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.cpp new file mode 100755 index 0000000..148eabb --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.cpp @@ -0,0 +1,180 @@ +#include "DriveManagement.h" + +#include +#include +#include + +#include "../../../cpp11addition.h" + +DriveManagement::DriveManagement() +{ + tryUpdate(); + #ifdef Q_OS_WIN32 + reg3=std::regex("^[a-zA-Z]:[\\\\/].*"); + reg4=std::regex("^([a-zA-Z]:[\\\\/]).*$"); + #endif + /// \warn ULTRACOPIER_DEBUGCONSOLE() don't work here because the sinal slot is not connected! +} + +//get drive of an file or folder +/// \todo do network drive support for windows +std::string DriveManagement::getDrive(const std::string &fileOrFolder) const +{ + const std::string &inode=fileOrFolder; + Q_UNUSED(inode); + #ifdef Q_OS_WIN32 + //optimized to windows version: + if(fileOrFolder.size()>=3) + { + if(fileOrFolder.at(1)==L':' && (fileOrFolder.at(2)==L'\\' || fileOrFolder.at(2)==L'/')) + { + char driveLetter=toupper(fileOrFolder.at(0)); + return driveLetter+std::string(":/"); + } + } + + if(fileOrFolder.size()>=5) + { + char f1=fileOrFolder.at(0); + char f2=fileOrFolder.at(1); + if(f1=='/' || f1=='\\') + if(f2=='/' || f2=='\\') + { + bool postSeparador=false; + std::string post; + unsigned int index=2; + unsigned int s=2; + while(index > temp; + const QList mountedVolumesList=QStorageInfo::mountedVolumes(); + int index=0; + while(index(mountSysPoint,driveType)); + index++; + } + /*sort larger to small mount point, to correctly detect it: /mnt, / + then /mnt/folder/file will be detected as /mnt + then /folder/file will be detected as / */ + std::sort(temp.begin(), temp.end(), []( + std::pair a, + std::pair b) { + return a.first.size() > b.first.size(); + }); + for(const std::pair &a : temp) { + mountSysPoint.push_back(a.first); + driveType.push_back(a.second); + } +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.h b/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.h new file mode 100755 index 0000000..24c8af6 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.h @@ -0,0 +1,34 @@ +#ifndef DRIVEMANAGEMENT_H +#define DRIVEMANAGEMENT_H + +#include +#include +#include +#include +#include +#include + +#include "Environment.h" + +class DriveManagement : public QObject +{ + Q_OBJECT +public: + explicit DriveManagement(); + bool isSameDrive(const std::string &file1, const std::string &file2) const; + /// \brief get drive of an file or folder + std::string getDrive(const std::string &fileOrFolder) const; + std::string getDriveType(const std::string &drive) const; + void tryUpdate(); +protected: + std::vector mountSysPoint; + std::vector driveType; + #ifdef Q_OS_WIN32 + std::regex reg3,reg4; + #endif +signals: + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; +}; + +#endif // DRIVEMANAGEMENT_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/Environment.h b/plugins/CopyEngine/Ultracopier-Spec/Environment.h new file mode 100755 index 0000000..9cb5732 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Environment.h @@ -0,0 +1,11 @@ +/** \file Environment.h +\brief Define the environment variable and global function +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include "CopyEngineUltracopier-SpecVariable.h" +/// \brief The global include +#include "StructEnumDefinition.h" +#include "StructEnumDefinition_CopyEngine.h" +#include "DebugEngineMacro.h" +#include "CompilerInfo.h" diff --git a/plugins/CopyEngine/Ultracopier-Spec/EventLoop.cpp b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.cpp new file mode 100755 index 0000000..c2e237a --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.cpp @@ -0,0 +1,71 @@ +#include "EventLoop.h" +#include "CallBackEventLoop.h" + +#ifdef ASYNCFILEMANIP + +#ifdef Q_OS_LINUX +#include +#include +#endif + +EventLoop EventLoop::eventLoop; + +EventLoop::EventLoop() +{ + int efd = epoll_create1(0); + if(efd==-1) + { + fprintf(stderr,"%s, errno %i\n", strerror(errno), errno); + abort(); + } + //start();->put cpu at 100% + stopIt=false; +} + +EventLoop::~EventLoop() +{ + stop(); + QThread::wait(); +} + +void EventLoop::stop() +{ + stopIt=true; +} + +void EventLoop::run() +{ + while(!stopIt) + { + int number_of_events = epoll_wait(efd, events, MAXEVENTS, -1); + if (-1 == number_of_events && EINTR == errno) + return; + for(int i = 0; i < number_of_events; i++) + static_cast(events[i].data.ptr)->callBack(); + } +} + +void EventLoop::watchSource(CallBackEventLoop * const object,const int &fd) +{ + epoll_event event; + event.events = EPOLLIN | EPOLLPRI | EPOLLERR | EPOLLET; + event.data.ptr = object; + if(epoll_ctl(efd, EPOLL_CTL_ADD, fd, &event)!=0) + { + printf("%s, errno %i\n", strerror(errno), errno); + //abort(); + } +} + +void EventLoop::watchDestination(CallBackEventLoop * const object,const int &fd) +{ + epoll_event event; + event.events = EPOLLOUT | EPOLLPRI | EPOLLERR | EPOLLET; + event.data.ptr = object; + if(epoll_ctl(efd, EPOLL_CTL_ADD, fd, &event)!=0) + { + printf("%s, errno %i\n", strerror(errno), errno); + //abort(); + } +} +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h new file mode 100755 index 0000000..3d68ce2 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h @@ -0,0 +1,30 @@ +#ifndef EVENTLOOP_H +#define EVENTLOOP_H + +#include "Variable.h" + +#ifdef ASYNCFILEMANIP +#include +#include "CallBackEventLoop.h" +#include +#define MAXEVENTS 64 + +class EventLoop : public QThread +{ +public: + EventLoop(); + ~EventLoop(); + static EventLoop eventLoop; + void watchSource(CallBackEventLoop * const object,const int &fd); + void watchDestination(CallBackEventLoop * const object,const int &fd); +protected: + void run(); + void stop(); +private: + epoll_event events[MAXEVENTS]; + int efd; + bool stopIt; +}; +#endif + +#endif // EVENTLOOP_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.cpp new file mode 100755 index 0000000..587a889 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.cpp @@ -0,0 +1,209 @@ +#include "FileErrorDialog.h" +#include "ui_fileErrorDialog.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#include + +bool FileErrorDialog::isInAdmin=false; + +FileErrorDialog::FileErrorDialog(QWidget *parent, INTERNALTYPEPATH fileInfo, std::string errorString, const ErrorType &errorType,FacilityInterface * facilityEngine) : + QDialog(parent), + ui(new Ui::fileErrorDialog) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + action=FileError_Cancel; + ui->label_error->setText(QString::fromStdString(errorString)); +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfoW; + if(GetFileAttributesExW(fileInfo.c_str(),GetFileExInfoStandard,&fileInfoW)) + { + uint64_t mdate=fileInfoW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=fileInfoW.ftLastWriteTime.dwLowDateTime; + uint64_t size=fileInfoW.nFileSizeHigh; + size<<=32; + size|=fileInfoW.nFileSizeLow; +#else + struct stat p_statbuf; + if(stat(TransferThread::internalStringTostring(fileInfo).c_str(), &p_statbuf)==0) + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + uint64_t mdate=p_statbuf.st_mtimespec.tv_sec; + #else + uint64_t mdate=*reinterpret_cast(&p_statbuf.st_mtim); + #endif + #else + uint64_t mdate=*reinterpret_cast(&p_statbuf.st_mtime); + #endif + const uint64_t size=p_statbuf.st_size; +#endif + ui->label_content_file_name->setText( + QString::fromStdString( + TransferThread::resolvedName( + TransferThread::internalStringTostring(fileInfo) + ) + ) + ); + if(ui->label_content_file_name->text().isEmpty()) + { + ui->label_content_file_name->setText(QString::fromStdString(TransferThread::internalStringTostring(fileInfo))); + ui->label_folder->setVisible(false); + ui->label_content_folder->setVisible(false); + } + else + { + std::string folder=TransferThread::internalStringTostring(fileInfo); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_folder->setText(QString::fromStdString(FSabsolutePath(TransferThread::internalStringTostring(fileInfo)))); + } + ui->label_content_size->setText(QString::fromStdString(facilityEngine->sizeToString(size))); + if(ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPSlabel_modified->setVisible(true); + ui->label_content_modified->setVisible(true); + ui->label_content_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + { + ui->label_modified->setVisible(false); + ui->label_content_modified->setVisible(false); + } + #ifdef Q_OS_WIN32 + if(fileInfoW.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + #else + if(S_ISDIR(p_statbuf.st_mode)) + #endif + { + this->setWindowTitle(tr("Error on folder")); + ui->label_size->hide(); + ui->label_content_size->hide(); + ui->label_file_name->setText(tr("Folder name")); + } + #ifdef Q_OS_UNIX + ui->label_file_destination->setVisible(p_statbuf.st_mode==S_IFLNK); + ui->label_content_file_destination->setVisible(p_statbuf.st_mode==S_IFLNK); + if(S_ISLNK(p_statbuf.st_mode)) + { + char buf[1024]; + ssize_t len; + if ((len = readlink(TransferThread::internalStringTostring(fileInfo).c_str(), buf, sizeof(buf)-1)) != -1) + { + buf[len] = '\0'; + ui->label_content_file_destination->setText(buf); + } + } + #else + ui->label_file_destination->setVisible(false); + ui->label_content_file_destination->setVisible(false); + #endif + } + else + { + ui->label_content_file_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(fileInfo)))); + if(ui->label_content_file_name->text().isEmpty()) + { + ui->label_content_file_name->setText(QString::fromStdString(TransferThread::internalStringTostring(fileInfo))); + ui->label_folder->setVisible(false); + ui->label_content_folder->setVisible(false); + } + else + ui->label_content_folder->setText(QString::fromStdString(FSabsolutePath(TransferThread::internalStringTostring(fileInfo)))); + + ui->label_file_destination->hide(); + ui->label_content_file_destination->hide(); + ui->label_size->hide(); + ui->label_content_size->hide(); + ui->label_modified->hide(); + ui->label_content_modified->hide(); + } + if(errorType==ErrorType_Folder || errorType==ErrorType_FolderWithRety) + ui->PutToBottom->hide(); + if(errorType==ErrorType_Folder) + ui->Retry->hide(); + + ui->Rights->hide(); + #ifdef ULTRACOPIER_PLUGIN_RIGHTS + if(isInAdmin) + ui->Rights->hide(); + #ifdef Q_OS_WIN32 + if(errorType!=ErrorType_Rights) + ui->Rights->hide(); + #else + ui->Rights->hide(); + #endif + #else + ui->Rights->hide(); + #endif +} + +FileErrorDialog::~FileErrorDialog() +{ + delete ui; +} + +void FileErrorDialog::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void FileErrorDialog::on_PutToBottom_clicked() +{ + action=FileError_PutToEndOfTheList; + this->close(); +} + +void FileErrorDialog::on_Retry_clicked() +{ + action=FileError_Retry; + this->close(); +} + +void FileErrorDialog::on_Skip_clicked() +{ + action=FileError_Skip; + this->close(); +} + +void FileErrorDialog::on_Cancel_clicked() +{ + action=FileError_Cancel; + this->close(); +} + +bool FileErrorDialog::getAlways() +{ + return ui->checkBoxAlways->isChecked(); +} + +FileErrorAction FileErrorDialog::getAction() +{ + return action; +} + +void FileErrorDialog::on_checkBoxAlways_clicked() +{ + ui->Rights->setEnabled(!ui->checkBoxAlways->isChecked()); +} + +#ifdef ULTRACOPIER_PLUGIN_RIGHTS +void FileErrorDialog::on_Rights_clicked() +{ +} +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.h b/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.h new file mode 100755 index 0000000..635eebc --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.h @@ -0,0 +1,56 @@ +/** \file fileErrorDialog.h +\brief Define the dialog error on the file +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include +#include +#include +#include +#include "Environment.h" +#include "../../../interface/FacilityInterface.h" + +#ifndef FILEERRORDIALOG_H +#define FILEERRORDIALOG_H + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +namespace Ui { + class fileErrorDialog; +} + +/// \brief to show error dialog, and ask what do +class FileErrorDialog : public QDialog +{ + Q_OBJECT +public: + /// \brief create the object and pass all the informations to it + explicit FileErrorDialog(QWidget *parent, INTERNALTYPEPATH fileInfo, std::string errorString, const ErrorType &errorType, FacilityInterface *facilityEngine); + ~FileErrorDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FileErrorAction getAction(); +protected: + void changeEvent(QEvent *e); + static bool isInAdmin; +private slots: + void on_PutToBottom_clicked(); + void on_Retry_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void on_checkBoxAlways_clicked(); + #ifdef ULTRACOPIER_PLUGIN_RIGHTS + void on_Rights_clicked(); + #endif +private: + Ui::fileErrorDialog *ui; + FileErrorAction action; +}; + +#endif // FILEERRORDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.cpp new file mode 100755 index 0000000..e0d841e --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.cpp @@ -0,0 +1,313 @@ +#include "FileExistsDialog.h" +#include "ui_fileExistsDialog.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 +#define CURRENTSEPARATOR "\\" +#else +#define CURRENTSEPARATOR "/" +#endif + +#include + +FileExistsDialog::FileExistsDialog(QWidget *parent, INTERNALTYPEPATH source, + INTERNALTYPEPATH destination, std::string firstRenamingRule, + std::string otherRenamingRule,FacilityInterface * facilityEngine) : + QDialog(parent), + ui(new Ui::fileExistsDialog) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + action=FileExists_Cancel; + destinationInfo=TransferThread::internalStringTostring(destination); + oldName=TransferThread::resolvedName(TransferThread::internalStringTostring(destination)); + ui->lineEditNewName->setText(QString::fromStdString(oldName)); + ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); + + ui->Overwrite->addAction(ui->actionOverwrite_if_newer); + ui->Overwrite->addAction(ui->actionOverwrite_if_older); + ui->Overwrite->addAction(ui->actionOverwrite_if_not_same_modification_date); + ui->Overwrite->addAction(ui->actionOverwrite_if_not_same_size); + ui->Overwrite->addAction(ui->actionOverwrite_if_not_same_size_and_date); + + ui->label_content_source_file_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(source)))); + std::string folder=TransferThread::internalStringTostring(FSabsolutePath(source)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_source_folder->setText(QString::fromStdString(folder)); + ui->label_content_destination_file_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(destination)))); + folder=TransferThread::internalStringTostring(FSabsolutePath(destination)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_destination_folder->setText(QString::fromStdString(folder)); + //QDateTime maxTime(QDate(ULTRACOPIER_PLUGIN_MINIMALYEAR,1,1)); +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(source.c_str(),GetFileExInfoStandard,&sourceW)) + { + uint64_t mdate=sourceW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=sourceW.ftLastWriteTime.dwLowDateTime; + uint64_t size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; +#else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(source).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(source).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=source_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast(&source_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast(&source_statbuf.st_mtime); + #endif + const uint64_t size=source_statbuf.st_size; +#endif + ui->label_source_modified->setVisible(true); + ui->label_content_source_size->setVisible(true); + ui->label_content_source_size->setText(QString::fromStdString(facilityEngine->sizeToString(size))); + ui->label_content_source_modified->setVisible(true); + ui->label_content_source_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + { + ui->label_content_source_size->setVisible(false); + ui->label_source_size->setVisible(false); + ui->label_source_modified->setVisible(false); + ui->label_content_source_modified->setVisible(false); + ui->label_source_modified->setVisible(false); + ui->label_content_source_modified->setVisible(false); + } +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA destinationW; + if(GetFileAttributesExW(destination.c_str(),GetFileExInfoStandard,&destinationW)) + { + uint64_t mdate=destinationW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=destinationW.ftLastWriteTime.dwLowDateTime; + uint64_t size=destinationW.nFileSizeHigh; + size<<=32; + size|=destinationW.nFileSizeLow; +#else + struct stat destination_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(destination).c_str(), &destination_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(destination).c_str(), &destination_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=destination_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast(&destination_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast(&destination_statbuf.st_mtime); + #endif + const uint64_t size=destination_statbuf.st_size; +#endif + ui->label_destination_modified->setVisible(true); + ui->label_content_destination_size->setVisible(true); + ui->label_content_destination_size->setText(QString::fromStdString(facilityEngine->sizeToString(size))); + ui->label_content_destination_modified->setVisible(true); + ui->label_content_destination_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + { + ui->label_destination_modified->setVisible(false); + ui->label_content_destination_modified->setVisible(false); + ui->label_content_destination_size->setVisible(false); + ui->label_destination_size->setVisible(false); + ui->label_destination_modified->setVisible(false); + ui->label_content_destination_modified->setVisible(false); + } + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + on_SuggestNewName_clicked(); +} + +FileExistsDialog::~FileExistsDialog() +{ + delete ui; +} + +void FileExistsDialog::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +std::string FileExistsDialog::getNewName() +{ + if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) + return oldName; + else + return ui->lineEditNewName->text().toStdString(); +} + +void FileExistsDialog::on_SuggestNewName_clicked() +{ + std::string destinationInfo=this->destinationInfo; + QString absolutePath=QString::fromStdString(FSabsolutePath(destinationInfo)); + QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); + QString suffix=""; + QString destination; + QString newFileName; + //resolv the suffix + if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) + { + suffix=fileName; + suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); + fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); + } + //resolv the new name + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + newFileName=tr("%name% - copy%suffix%"); + else + newFileName=QString::fromStdString(firstRenamingRule); + } + else + { + if(otherRenamingRule.empty()) + newFileName=tr("%name% - copy (%number%)%suffix%"); + else + newFileName=QString::fromStdString(otherRenamingRule); + newFileName.replace(QStringLiteral("%number%"),QString::number(num)); + } + newFileName.replace(QStringLiteral("%name%"),fileName); + newFileName.replace(QStringLiteral("%suffix%"),suffix); + destination=absolutePath; + if(!destination.endsWith('/') + #ifdef Q_OS_WIN32 + && !destination.endsWith('\\') + #endif + ) + destination+=CURRENTSEPARATOR; + destination+=newFileName; + destinationInfo=destination.toStdString(); + num++; + } + while(TransferThread::exists(destinationInfo.c_str())); + ui->lineEditNewName->setText(newFileName); +} + +void FileExistsDialog::on_Rename_clicked() +{ + action=FileExists_Rename; + this->close(); +} + +void FileExistsDialog::on_Overwrite_clicked() +{ + action=FileExists_Overwrite; + this->close(); +} + +void FileExistsDialog::on_Skip_clicked() +{ + action=FileExists_Skip; + this->close(); +} + +void FileExistsDialog::on_Cancel_clicked() +{ + action=FileExists_Cancel; + this->close(); +} + +void FileExistsDialog::on_actionOverwrite_if_newer_triggered() +{ + action=FileExists_OverwriteIfNewer; + this->close(); +} + +void FileExistsDialog::on_actionOverwrite_if_not_same_modification_date_triggered() +{ + action=FileExists_OverwriteIfNotSameMdate; + this->close(); +} + +FileExistsAction FileExistsDialog::getAction() +{ + return action; +} + +bool FileExistsDialog::getAlways() +{ + return ui->checkBoxAlways->isChecked(); +} + +void FileExistsDialog::updateRenameButton() +{ + ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); +} + +void FileExistsDialog::on_checkBoxAlways_toggled(bool checked) +{ + Q_UNUSED(checked); + updateRenameButton(); +} + +void FileExistsDialog::on_lineEditNewName_textChanged(const QString &arg1) +{ + Q_UNUSED(arg1); + updateRenameButton(); +} + +void FileExistsDialog::on_lineEditNewName_returnPressed() +{ + updateRenameButton(); + if(ui->Rename->isEnabled()) + on_Rename_clicked(); + else + QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); +} + +void FileExistsDialog::on_actionOverwrite_if_older_triggered() +{ + action=FileExists_OverwriteIfOlder; + this->close(); +} + +void FileExistsDialog::on_lineEditNewName_editingFinished() +{ + updateRenameButton(); +} + +void FileExistsDialog::on_actionOverwrite_if_not_same_size_triggered() +{ + action=FileExists_OverwriteIfNotSameSize; + this->close(); +} + +void FileExistsDialog::on_actionOverwrite_if_not_same_size_and_date_triggered() +{ + action=FileExists_OverwriteIfNotSameSizeAndDate; + this->close(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.h b/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.h new file mode 100755 index 0000000..ae3e02b --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.h @@ -0,0 +1,68 @@ +/** \file fileExistsDialog.h +\brief Define the dialog when file already exists +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include +#include +#include +#include +#include "Environment.h" +#include "../../../interface/FacilityInterface.h" + +#ifndef FILEEXISTSDIALOG_H +#define FILEEXISTSDIALOG_H + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +namespace Ui { + class fileExistsDialog; +} + +/// \brief to show file exists dialog, and ask what do +class FileExistsDialog : public QDialog +{ + Q_OBJECT +public: + /// \brief create the object and pass all the informations to it + explicit FileExistsDialog(QWidget *parent, INTERNALTYPEPATH source, INTERNALTYPEPATH destination, std::string firstRenamingRule, std::string otherRenamingRule, FacilityInterface *facilityEngine); + ~FileExistsDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FileExistsAction getAction(); + /// \brief return the new rename is case in manual renaming + std::string getNewName(); +protected: + void changeEvent(QEvent *e); +private slots: + void on_SuggestNewName_clicked(); + void on_Rename_clicked(); + void on_Overwrite_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void on_actionOverwrite_if_newer_triggered(); + void on_actionOverwrite_if_not_same_modification_date_triggered(); + void updateRenameButton(); + void on_checkBoxAlways_toggled(bool checked); + void on_lineEditNewName_textChanged(const QString &arg1); + void on_lineEditNewName_returnPressed(); + void on_actionOverwrite_if_older_triggered(); + void on_lineEditNewName_editingFinished(); + void on_actionOverwrite_if_not_same_size_triggered(); + void on_actionOverwrite_if_not_same_size_and_date_triggered(); +private: + Ui::fileExistsDialog *ui; + FileExistsAction action; + std::string oldName; + std::string destinationInfo; + std::string firstRenamingRule; + std::string otherRenamingRule; +}; + +#endif // FILEEXISTSDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.cpp new file mode 100755 index 0000000..69d63d0 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.cpp @@ -0,0 +1,226 @@ +#include "FileIsSameDialog.h" +#include "ui_fileIsSameDialog.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 +#define CURRENTSEPARATOR "\\" +#else +#define CURRENTSEPARATOR "/" +#endif + +#include + +FileIsSameDialog::FileIsSameDialog(QWidget *parent, INTERNALTYPEPATH fileInfo, + std::string firstRenamingRule, std::string otherRenamingRule,FacilityInterface * facilityEngine) : + QDialog(parent), + ui(new Ui::fileIsSameDialog) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + action=FileExists_Cancel; + oldName=TransferThread::resolvedName(TransferThread::internalStringTostring(fileInfo)); + destinationInfo=TransferThread::internalStringTostring(fileInfo); + ui->lineEditNewName->setText(QString::fromStdString(oldName)); + ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); + ui->label_content_file_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(fileInfo)))); + std::string folder=FSabsolutePath(TransferThread::internalStringTostring(fileInfo)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_folder->setText(QString::fromStdString(folder)); + updateRenameButton(); +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfoW; + if(GetFileAttributesExW(fileInfo.c_str(),GetFileExInfoStandard,&fileInfoW)) + { + uint64_t mdate=fileInfoW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=fileInfoW.ftLastWriteTime.dwLowDateTime; + uint64_t size=fileInfoW.nFileSizeHigh; + size<<=32; + size|=fileInfoW.nFileSizeLow; +#else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=source_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast(&source_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast(&source_statbuf.st_mtime); + #endif + const uint64_t size=source_statbuf.st_size; +#endif + ui->label_content_size->setText(QString::fromStdString(facilityEngine->sizeToString(size))); + ui->label_content_size->setVisible(true); + if(ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPSlabel_modified->setVisible(true); + ui->label_content_modified->setVisible(true); + ui->label_content_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + { + ui->label_modified->setVisible(false); + ui->label_content_modified->setVisible(false); + } + } + else + { + ui->label_content_size->setVisible(false); + ui->label_size->setVisible(false); + ui->label_modified->setVisible(false); + ui->label_content_modified->setVisible(false); + } + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + on_SuggestNewName_clicked(); +} + +FileIsSameDialog::~FileIsSameDialog() +{ + delete ui; +} + +void FileIsSameDialog::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +std::string FileIsSameDialog::getNewName() +{ + if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) + return oldName; + else + return ui->lineEditNewName->text().toStdString(); +} + +void FileIsSameDialog::on_SuggestNewName_clicked() +{ + std::string destinationInfo=this->destinationInfo; + QString absolutePath=QString::fromStdString(FSabsolutePath(destinationInfo)); + QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); + QString suffix=""; + QString destination; + QString newFileName; + //resolv the suffix + if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) + { + suffix=fileName; + suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); + fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); + } + //resolv the new name + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + newFileName=tr("%name% - copy%suffix%"); + else + newFileName=QString::fromStdString(firstRenamingRule); + } + else + { + if(otherRenamingRule.empty()) + newFileName=tr("%name% - copy (%number%)%suffix%"); + else + newFileName=QString::fromStdString(otherRenamingRule); + newFileName.replace(QStringLiteral("%number%"),QString::number(num)); + } + newFileName.replace(QStringLiteral("%name%"),fileName); + newFileName.replace(QStringLiteral("%suffix%"),suffix); + destination=absolutePath; + if(!destination.endsWith('/') + #ifdef Q_OS_WIN32 + && !destination.endsWith('\\') + #endif + ) + destination+=CURRENTSEPARATOR; + destination+=newFileName; + destinationInfo=destination.toStdString(); + num++; + } + while(TransferThread::exists(destinationInfo.c_str())); + ui->lineEditNewName->setText(newFileName); +} + +void FileIsSameDialog::on_Rename_clicked() +{ + action=FileExists_Rename; + this->close(); +} + +void FileIsSameDialog::on_Skip_clicked() +{ + action=FileExists_Skip; + this->close(); +} + +void FileIsSameDialog::on_Cancel_clicked() +{ + action=FileExists_Cancel; + this->close(); +} + +FileExistsAction FileIsSameDialog::getAction() +{ + return action; +} + +bool FileIsSameDialog::getAlways() +{ + return ui->checkBoxAlways->isChecked(); +} + +void FileIsSameDialog::updateRenameButton() +{ + ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); +} + +void FileIsSameDialog::on_lineEditNewName_textChanged(const QString &arg1) +{ + Q_UNUSED(arg1); + updateRenameButton(); +} + +void FileIsSameDialog::on_checkBoxAlways_toggled(bool checked) +{ + Q_UNUSED(checked); + updateRenameButton(); +} + +void FileIsSameDialog::on_lineEditNewName_returnPressed() +{ + updateRenameButton(); + if(ui->Rename->isEnabled()) + on_Rename_clicked(); + else + QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); +} + +void FileIsSameDialog::on_lineEditNewName_editingFinished() +{ + updateRenameButton(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.h b/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.h new file mode 100755 index 0000000..25a43b9 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.h @@ -0,0 +1,63 @@ +/** \file fileIsSameDialog.h +\brief Define the dialog when file is same +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include +#include +#include +#include +#include "Environment.h" +#include "../../../interface/FacilityInterface.h" + +#ifndef FILEISSAMEDIALOG_H +#define FILEISSAMEDIALOG_H + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +namespace Ui { + class fileIsSameDialog; +} + +/// \brief to show file is same dialog, and ask what do +class FileIsSameDialog : public QDialog +{ + Q_OBJECT +public: + /// \brief create the object and pass all the informations to it + explicit FileIsSameDialog(QWidget *parent, INTERNALTYPEPATH fileInfo, std::string firstRenamingRule, std::string otherRenamingRule, FacilityInterface *facilityEngine); + ~FileIsSameDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FileExistsAction getAction(); + /// \brief return the new rename is case in manual renaming + std::string getNewName(); +protected: + void changeEvent(QEvent *e); +private slots: + void on_SuggestNewName_clicked(); + void on_Rename_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void updateRenameButton(); + void on_lineEditNewName_textChanged(const QString &arg1); + void on_checkBoxAlways_toggled(bool checked); + void on_lineEditNewName_returnPressed(); + void on_lineEditNewName_editingFinished(); +private: + Ui::fileIsSameDialog *ui; + FileExistsAction action; + std::string oldName; + std::string destinationInfo; + std::string firstRenamingRule; + std::string otherRenamingRule; + +}; + +#endif // FILEISSAMEDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FilterRules.cpp b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.cpp new file mode 100755 index 0000000..965f5f3 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.cpp @@ -0,0 +1,199 @@ +#include "FilterRules.h" +#include "ui_FilterRules.h" + +#include + +FilterRules::FilterRules(QWidget *parent) : + QDialog(parent), + ui(new Ui::FilterRules) +{ + ui->setupUi(this); + updateChecking(); + haveBeenValided=false; +} + +FilterRules::~FilterRules() +{ + delete ui; +} + +bool FilterRules::getIsValid() +{ + return isValid && haveBeenValided; +} + +std::string FilterRules::get_search_text() +{ + return ui->search->text().toStdString(); +} + +SearchType FilterRules::get_search_type() +{ + switch(ui->search_type->currentIndex()) + { + case 0: + return SearchType_rawText; + case 1: + return SearchType_simpleRegex; + case 2: + return SearchType_perlRegex; + } + return SearchType_simpleRegex; +} + +ApplyOn FilterRules::get_apply_on() +{ + switch(ui->apply_on->currentIndex()) + { + case 0: + return ApplyOn_file; + case 2: + return ApplyOn_fileAndFolder; + case 1: + return ApplyOn_folder; + } + return ApplyOn_fileAndFolder; +} + +bool FilterRules::get_need_match_all() +{ + return ui->need_match_all->isChecked(); +} + +void FilterRules::set_search_text(std::string search_text) +{ + ui->search->setText(QString::fromStdString(search_text)); +} + +void FilterRules::set_search_type(SearchType search_type) +{ + switch(search_type) + { + case SearchType_rawText: + ui->search_type->setCurrentIndex(0); + break; + case SearchType_simpleRegex: + ui->search_type->setCurrentIndex(1); + break; + case SearchType_perlRegex: + ui->search_type->setCurrentIndex(2); + break; + } +} + +void FilterRules::set_apply_on(ApplyOn apply_on) +{ + switch(apply_on) + { + case ApplyOn_file: + ui->apply_on->setCurrentIndex(0); + break; + case ApplyOn_fileAndFolder: + ui->apply_on->setCurrentIndex(2); + break; + case ApplyOn_folder: + ui->apply_on->setCurrentIndex(1); + break; + } +} + +void FilterRules::set_need_match_all(bool need_match_all) +{ + ui->need_match_all->setChecked(need_match_all); +} + +void FilterRules::on_search_textChanged(const std::string &arg1) +{ + Q_UNUSED(arg1); + updateChecking(); +} + +void FilterRules::updateChecking() +{ + QRegularExpression regex; + isValid=!ui->search->text().isEmpty(); + if(isValid) + { + QString tempString; + if(ui->search_type->currentIndex()==0) + { + //tempString=QRegularExpression::escape(ui->search->text()); -> generate bug because escape contains slash + if(tempString.contains('/') || tempString.contains('\\')) + isValid=false; + } + else if(ui->search_type->currentIndex()==1) + { + tempString=QRegularExpression::escape(ui->search->text()); + tempString.replace(QStringLiteral("\\*"),QStringLiteral("[^\\\\/]*")); + } + else if(ui->search_type->currentIndex()==2) + { + tempString=ui->search->text(); + if(tempString.startsWith('^') && tempString.endsWith('$')) + { + ui->need_match_all->setChecked(true); + tempString.remove(QRegularExpression(QStringLiteral("^\\^"))); + tempString.remove(QRegularExpression(QStringLiteral("\\$$"))); + ui->search->setText(tempString); + } + } + if(isValid) + { + if(ui->need_match_all->isChecked()) + tempString=QStringLiteral("^")+tempString+QStringLiteral("$"); + regex=QRegularExpression(tempString); + isValid=regex.isValid(); + } + } + + ui->isValid->setChecked(isValid); + ui->testString->setEnabled(isValid); + ui->label_test_string->setEnabled(isValid); + ui->matched->setEnabled(isValid); + ui->matched->setChecked(isValid && ui->testString->text().contains(regex)); + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isValid); +} + +void FilterRules::on_isValid_clicked() +{ + updateChecking(); +} + +void FilterRules::on_testString_textChanged(const std::string &arg1) +{ + Q_UNUSED(arg1); + updateChecking(); +} + +void FilterRules::on_matched_clicked() +{ + updateChecking(); +} + +void FilterRules::on_search_type_currentIndexChanged(int index) +{ + Q_UNUSED(index); + updateChecking(); +} + +void FilterRules::on_need_match_all_clicked() +{ + updateChecking(); +} + +void FilterRules::on_buttonBox_clicked(QAbstractButton *button) +{ + if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) + reject(); + else + { + haveBeenValided=true; + accept(); + } +} + +void FilterRules::on_search_textChanged(const QString &arg1) +{ + Q_UNUSED(arg1); + updateChecking(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/FilterRules.h b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.h new file mode 100755 index 0000000..e57ea97 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.h @@ -0,0 +1,47 @@ +#ifndef FILTERRULES_H +#define FILTERRULES_H + +#include +#include +#include + +#include "StructEnumDefinition_CopyEngine.h" + +namespace Ui { +class FilterRules; +} + +/** All the filter rules to include/exclude some file during the listing */ +class FilterRules : public QDialog +{ + Q_OBJECT + +public: + explicit FilterRules(QWidget *parent = 0); + ~FilterRules(); + bool getIsValid(); + std::string get_search_text(); + SearchType get_search_type(); + ApplyOn get_apply_on(); + bool get_need_match_all(); + void set_search_text(std::string search_text); + void set_search_type(SearchType search_type); + void set_apply_on(ApplyOn apply_on); + void set_need_match_all(bool need_match_all); +private slots: + void on_search_textChanged(const std::string &arg1); + void on_isValid_clicked(); + void on_testString_textChanged(const std::string &arg1); + void on_matched_clicked(); + void on_search_type_currentIndexChanged(int index); + void on_need_match_all_clicked(); + void on_buttonBox_clicked(QAbstractButton *button); + void on_search_textChanged(const QString &arg1); +private: + Ui::FilterRules *ui; + void updateChecking(); + bool isValid; + bool haveBeenValided; +}; + +#endif // FILTERRULES_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FilterRules.ui b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.ui new file mode 100755 index 0000000..a4006fe --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.ui @@ -0,0 +1,162 @@ + + + FilterRules + + + Qt::WindowModal + + + + 0 + 0 + 289 + 231 + + + + Filters dialog + + + + :/CopyEngine/resources/resources/filter.png:/CopyEngine/resources/resources/filter.png + + + + 1 + + + 1 + + + + + Search: + + + + + + + + + + Search type: + + + + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + + + + Apply on: + + + + + + + + File + + + + + Folder + + + + + File and folder + + + + + + + + Whole string must match + + + + + + + Checking + + + + + + The regex is valid + + + + + + + Test string: + + + + + + + + + + The test string matches with the regex + + + + + + + + + + + + Qt::Horizontal + + + + 68 + 20 + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Filters.cpp b/plugins/CopyEngine/Ultracopier-Spec/Filters.cpp new file mode 100755 index 0000000..214896c --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Filters.cpp @@ -0,0 +1,464 @@ +#include "Filters.h" +#include "ui_Filters.h" +#include "../../../cpp11addition.h" + +#include + +Filters::Filters(QWidget *parent) : + QDialog(parent), + ui(new Ui::Filters) +{ + ui->setupUi(this); +} + +Filters::~Filters() +{ + delete ui; +} + +bool Filters::setFilters(std::vector includeStrings,std::vector includeOptions,std::vector excludeStrings,std::vector excludeOptions) +{ + if(includeStrings.size()!=includeOptions.size() || excludeStrings.size()!=excludeOptions.size()) + return false; + Filters_rules new_item; + + include.clear(); + unsigned int index=0; + while(index<(unsigned int)includeStrings.size()) + { + new_item.search_text=includeStrings.at(index); + std::vector options=stringsplit(includeOptions.at(index),';'); + new_item.need_match_all=false; + new_item.search_type=SearchType_rawText; + new_item.apply_on=ApplyOn_fileAndFolder; + + if(vectorcontainsAtLeastOne(options,std::string("SearchType_simpleRegex"))) + new_item.search_type=SearchType_simpleRegex; + if(vectorcontainsAtLeastOne(options,std::string("SearchType_perlRegex"))) + new_item.search_type=SearchType_perlRegex; + if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_file"))) + new_item.apply_on=ApplyOn_file; + if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_folder"))) + new_item.apply_on=ApplyOn_folder; + if(vectorcontainsAtLeastOne(options,std::string("need_match_all"))) + new_item.need_match_all=true; + + if(convertToRegex(new_item)) + include.push_back(new_item); + + index++; + } + + exclude.clear(); + index=0; + while(index options=stringsplit(excludeOptions.at(index),';'); + new_item.need_match_all=false; + new_item.search_type=SearchType_rawText; + new_item.apply_on=ApplyOn_fileAndFolder; + + if(vectorcontainsAtLeastOne(options,std::string("SearchType_simpleRegex"))) + new_item.search_type=SearchType_simpleRegex; + if(vectorcontainsAtLeastOne(options,std::string("SearchType_perlRegex"))) + new_item.search_type=SearchType_perlRegex; + if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_file"))) + new_item.apply_on=ApplyOn_file; + if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_folder"))) + new_item.apply_on=ApplyOn_folder; + if(vectorcontainsAtLeastOne(options,std::string("need_match_all"))) + new_item.need_match_all=true; + + if(convertToRegex(new_item)) + exclude.push_back(new_item); + + index++; + } + + reShowAll(); + return true; +} + +void Filters::reShowAll() +{ + ui->inclusion->clear(); + unsigned int index=0; + while(index<(unsigned int)include.size()) + { + std::string entryShow=include.at(index).search_text+" ("; + std::vector optionsToShow; + switch(include.at(index).search_type) + { + case SearchType_rawText: + optionsToShow.push_back(tr("Raw text").toStdString()); + break; + case SearchType_simpleRegex: + optionsToShow.push_back(tr("Simplified regex").toStdString()); + break; + case SearchType_perlRegex: + optionsToShow.push_back(tr("Perl's regex").toStdString()); + break; + default: + break; + } + switch(include.at(index).apply_on) + { + case ApplyOn_file: + optionsToShow.push_back(tr("Only on file").toStdString()); + break; + case ApplyOn_folder: + optionsToShow.push_back(tr("Only on folder").toStdString()); + break; + default: + break; + } + if(include.at(index).need_match_all) + optionsToShow.push_back(tr("Full match").toStdString()); + entryShow+=stringimplode(optionsToShow,","); + entryShow+=")"; + ui->inclusion->addItem(new QListWidgetItem(QString::fromStdString(entryShow))); + index++; + } + ui->exclusion->clear(); + index=0; + while(index<(unsigned int)exclude.size()) + { + std::string entryShow=exclude.at(index).search_text+" ("; + std::vector optionsToShow; + switch(exclude.at(index).search_type) + { + case SearchType_rawText: + optionsToShow.push_back(tr("Raw text").toStdString()); + break; + case SearchType_simpleRegex: + optionsToShow.push_back(tr("Simplified regex").toStdString()); + break; + case SearchType_perlRegex: + optionsToShow.push_back(tr("Perl's regex").toStdString()); + break; + default: + break; + } + switch(exclude.at(index).apply_on) + { + case ApplyOn_file: + optionsToShow.push_back(tr("Only on file").toStdString()); + break; + case ApplyOn_folder: + optionsToShow.push_back(tr("Only on folder").toStdString()); + break; + default: + break; + } + if(exclude.at(index).need_match_all) + optionsToShow.push_back(tr("Full match").toStdString()); + entryShow+=stringimplode(optionsToShow,","); + entryShow+=")"; + ui->exclusion->addItem(new QListWidgetItem(QString::fromStdString(entryShow))); + index++; + } +} + +std::vector Filters::getInclude() const +{ + return include; +} + +std::vector Filters::getExclude() const +{ + return exclude; +} + +void Filters::newLanguageLoaded() +{ + ui->retranslateUi(this); + reShowAll(); +} + +void Filters::updateFilters() +{ + std::vector includeStrings,includeOptions,excludeStrings,excludeOptions; + unsigned int index=0; + while(index<(unsigned int)include.size()) + { + includeStrings.push_back(include.at(index).search_text); + std::vector optionsToShow; + + switch(include.at(index).search_type) + { + case SearchType_rawText: + optionsToShow.push_back("SearchType_rawText"); + break; + case SearchType_simpleRegex: + optionsToShow.push_back("SearchType_simpleRegex"); + break; + case SearchType_perlRegex: + optionsToShow.push_back("SearchType_perlRegex"); + break; + default: + break; + } + switch(include.at(index).apply_on) + { + case ApplyOn_file: + optionsToShow.push_back("ApplyOn_file"); + break; + case ApplyOn_fileAndFolder: + optionsToShow.push_back("ApplyOn_fileAndFolder"); + break; + case ApplyOn_folder: + optionsToShow.push_back("ApplyOn_folder"); + break; + default: + break; + } + if(include.at(index).need_match_all) + optionsToShow.push_back(tr("Full match").toStdString()); + includeOptions.push_back(stringimplode(optionsToShow,";")); + index++; + } + index=0; + while(index<(unsigned int)exclude.size()) + { + excludeStrings.push_back(exclude.at(index).search_text); + std::vector optionsToShow; + + switch(exclude.at(index).search_type) + { + case SearchType_rawText: + optionsToShow.push_back("SearchType_rawText"); + break; + case SearchType_simpleRegex: + optionsToShow.push_back("SearchType_simpleRegex"); + break; + case SearchType_perlRegex: + optionsToShow.push_back("SearchType_perlRegex"); + break; + default: + break; + } + switch(exclude.at(index).apply_on) + { + case ApplyOn_file: + optionsToShow.push_back("ApplyOn_file"); + break; + case ApplyOn_fileAndFolder: + optionsToShow.push_back("ApplyOn_fileAndFolder"); + break; + case ApplyOn_folder: + optionsToShow.push_back("ApplyOn_folder"); + break; + default: + break; + } + if(exclude.at(index).need_match_all) + optionsToShow.push_back(tr("Full match").toStdString()); + excludeOptions.push_back(stringimplode(optionsToShow,";")); + index++; + } + emit sendNewFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); + emit haveNewFilters(); +} + +bool Filters::convertToRegex(Filters_rules &item) +{ + bool isValid=!item.search_text.empty(); + if(isValid) + { + std::regex regex; + std::string tempString; + if(item.search_type==SearchType_rawText) + { + //here to validate below the regex + tempString=QRegularExpression::escape(QString::fromStdString(item.search_text)).toStdString(); + //do search on string only on file or file and folder, QRegularExpression::escape() introduce \ on special char + if(item.apply_on!=ApplyOn::ApplyOn_folder) + if(item.search_text.find('/') != std::string::npos || item.search_text.find('\\') != std::string::npos) + isValid=false; + } + else if(item.search_type==SearchType_simpleRegex) + { + tempString=QRegularExpression::escape(QString::fromStdString(item.search_text)).toStdString(); + stringreplaceAll(tempString,"\\*","[^\\\\/]*"); + } + else if(item.search_type==SearchType_perlRegex) + { + tempString=item.search_text; + if(stringStartWith(tempString,'^') && stringEndsWith(tempString,'$')) + { + item.need_match_all=true; + if(stringStartWith(tempString,'^')) + tempString=tempString.substr(1,tempString.size()-1); + if(stringEndsWith(tempString,'$')) + tempString=tempString.substr(0,tempString.size()-1); + item.search_text=tempString; + } + } + if(isValid) + { + if(item.need_match_all==true) + tempString="^"+tempString+"$"; + regex=std::regex(tempString); + //isValid=regex.isValid(); + item.regex=regex; + return true; + } + else + return false; + } + return false; +} + +void Filters::on_remove_exclusion_clicked() +{ + bool removedEntry=false; + int index=0; + while(indexexclusion->count()) + { + if(ui->exclusion->item(index)->isSelected()) + { + delete ui->exclusion->item(index); + exclude.erase(exclude.cbegin()+index); + removedEntry=true; + } + else + index++; + } + if(removedEntry) + { + reShowAll(); + updateFilters(); + } +} + +void Filters::on_remove_inclusion_clicked() +{ + bool removedEntry=false; + int index=0; + while(indexinclusion->count()) + { + if(ui->inclusion->item(index)->isSelected()) + { + delete ui->inclusion->item(index); + include.erase(include.cbegin()+index); + removedEntry=true; + } + else + index++; + } + if(removedEntry) + { + reShowAll(); + updateFilters(); + } +} + +void Filters::on_add_exclusion_clicked() +{ + FilterRules dialog(this); + dialog.exec(); + if(dialog.getIsValid()) + { + Filters_rules new_item; + new_item.apply_on=dialog.get_apply_on(); + new_item.need_match_all=dialog.get_need_match_all(); + new_item.search_text=dialog.get_search_text(); + new_item.search_type=dialog.get_search_type(); + exclude.push_back(new_item); + reShowAll(); + updateFilters(); + } +} + +void Filters::on_buttonBox_clicked(QAbstractButton *button) +{ + if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) + reject(); +} + +void Filters::on_add_inclusion_clicked() +{ + FilterRules dialog(this); + dialog.exec(); + if(dialog.getIsValid()) + { + Filters_rules new_item; + new_item.apply_on=dialog.get_apply_on(); + new_item.need_match_all=dialog.get_need_match_all(); + new_item.search_text=dialog.get_search_text(); + new_item.search_type=dialog.get_search_type(); + if(convertToRegex(new_item)) + include.push_back(new_item); + reShowAll(); + updateFilters(); + } +} + +void Filters::on_edit_exclusion_clicked() +{ + bool editedEntry=false; + int index=0; + while(indexexclusion->count()) + { + if(ui->exclusion->item(index)->isSelected()) + { + FilterRules dialog(this); + dialog.set_apply_on(exclude.at(index).apply_on); + dialog.set_need_match_all(exclude.at(index).need_match_all); + dialog.set_search_text(exclude.at(index).search_text); + dialog.set_search_type(exclude.at(index).search_type); + dialog.exec(); + if(dialog.getIsValid()) + { + exclude[index].apply_on=dialog.get_apply_on(); + exclude[index].need_match_all=dialog.get_need_match_all(); + exclude[index].search_text=dialog.get_search_text(); + exclude[index].search_type=dialog.get_search_type(); + if(!convertToRegex(exclude[index])) + exclude.erase(exclude.cbegin()+index); + editedEntry=true; + } + } + index++; + } + if(editedEntry) + { + reShowAll(); + updateFilters(); + } +} + +void Filters::on_edit_inclusion_clicked() +{ + bool editedEntry=false; + int index=0; + while(indexinclusion->count()) + { + if(ui->inclusion->item(index)->isSelected()) + { + FilterRules dialog(this); + dialog.set_apply_on(exclude.at(index).apply_on); + dialog.set_need_match_all(exclude.at(index).need_match_all); + dialog.set_search_text(exclude.at(index).search_text); + dialog.set_search_type(exclude.at(index).search_type); + dialog.exec(); + if(dialog.getIsValid()) + { + exclude[index].apply_on=dialog.get_apply_on(); + exclude[index].need_match_all=dialog.get_need_match_all(); + exclude[index].search_text=dialog.get_search_text(); + exclude[index].search_type=dialog.get_search_type(); + if(!convertToRegex(exclude[index])) + exclude.erase(exclude.cbegin()+index); + editedEntry=true; + } + } + index++; + } + if(editedEntry) + { + reShowAll(); + updateFilters(); + } +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/Filters.h b/plugins/CopyEngine/Ultracopier-Spec/Filters.h new file mode 100755 index 0000000..60e2277 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Filters.h @@ -0,0 +1,45 @@ +#ifndef FILTERS_H +#define FILTERS_H + +#include +#include + +#include "FilterRules.h" +#include "StructEnumDefinition_CopyEngine.h" + +namespace Ui { +class Filters; +} + +/** To add/edit one filter rules */ +class Filters : public QDialog +{ + Q_OBJECT +public: + explicit Filters(QWidget *parent = 0); + ~Filters(); + bool setFilters(std::vector includeStrings, std::vector includeOptions, std::vector excludeStrings, std::vector excludeOptions); + void reShowAll(); + std::vector getInclude() const; + std::vector getExclude() const; + void newLanguageLoaded(); +private: + Ui::Filters *ui; + std::vector include; + std::vector exclude; + void updateFilters(); + bool convertToRegex(Filters_rules &item); +signals: + void sendNewFilters(const std::vector &includeStrings,const std::vector &includeOptions,const std::vector &excludeStrings,const std::vector &excludeOptions) const; + void haveNewFilters() const; +private slots: + void on_remove_exclusion_clicked(); + void on_remove_inclusion_clicked(); + void on_add_exclusion_clicked(); + void on_buttonBox_clicked(QAbstractButton *button); + void on_add_inclusion_clicked(); + void on_edit_exclusion_clicked(); + void on_edit_inclusion_clicked(); +}; + +#endif // FILTERS_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/Filters.ui b/plugins/CopyEngine/Ultracopier-Spec/Filters.ui new file mode 100755 index 0000000..ed6a0a2 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Filters.ui @@ -0,0 +1,221 @@ + + + Filters + + + + 0 + 0 + 507 + 502 + + + + Filters + + + + :/CopyEngine/Ultracopier-Spec/resources/filter.png:/CopyEngine/Ultracopier-Spec/resources/filter.png + + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + Exclusion filters + + + + 1 + + + 2 + + + 2 + + + 2 + + + 2 + + + + + QAbstractItemView::MultiSelection + + + + + + + + + + :/CopyEngine/Ultracopier-Spec/resources/add.png:/CopyEngine/Ultracopier-Spec/resources/add.png + + + + + + + + :/CopyEngine/Ultracopier-Spec/resources/edit.png:/CopyEngine/Ultracopier-Spec/resources/edit.png + + + + + + + + :/CopyEngine/Ultracopier-Spec/resources/remove.png:/CopyEngine/Ultracopier-Spec/resources/remove.png + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + Inclusion filters + + + + 1 + + + 2 + + + 2 + + + 2 + + + 2 + + + + + None = Include all + + + + + + + + + QAbstractItemView::MultiSelection + + + + + + + + + + :/CopyEngine/Ultracopier-Spec/resources/add.png:/CopyEngine/Ultracopier-Spec/resources/add.png + + + + + + + + :/CopyEngine/Ultracopier-Spec/resources/edit.png:/CopyEngine/Ultracopier-Spec/resources/edit.png + + + + + + + + :/CopyEngine/Ultracopier-Spec/resources/remove.png:/CopyEngine/Ultracopier-Spec/resources/remove.png + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QDialogButtonBox::Cancel + + + + + + + + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.cpp new file mode 100755 index 0000000..f37acd1 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.cpp @@ -0,0 +1,252 @@ +#include "FolderExistsDialog.h" +#include "ui_folderExistsDialog.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 +#define CURRENTSEPARATOR "\\" +#else +#define CURRENTSEPARATOR "/" +#endif + +#include + +FolderExistsDialog::FolderExistsDialog(QWidget *parent, INTERNALTYPEPATH source, bool isSame, INTERNALTYPEPATH destination, + std::string firstRenamingRule, std::string otherRenamingRule) : + QDialog(parent), + ui(new Ui::folderExistsDialog) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + action=FolderExists_Cancel; + oldName=TransferThread::resolvedName(TransferThread::internalStringTostring(destination)); + ui->lineEditNewName->setText(QString::fromStdString(oldName)); + ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfoW; + if(GetFileAttributesExW(source.c_str(),GetFileExInfoStandard,&fileInfoW)) + { + uint64_t mdate=fileInfoW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=fileInfoW.ftLastWriteTime.dwLowDateTime; + uint64_t size=fileInfoW.nFileSizeHigh; + size<<=32; + size|=fileInfoW.nFileSizeLow; +#else + struct stat source_statbuf; + if(TransferThread::exists(source)) + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=source_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast(&source_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast(&source_statbuf.st_mtime); + #endif +#endif + ui->label_content_source_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + ui->label_content_source_modified->hide(); + ui->label_content_source_folder_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(source)))); + std::string folder=TransferThread::internalStringTostring(FSabsolutePath(source)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_source_folder->setText(QString::fromStdString(folder)); + if(ui->label_content_source_folder_name->text().isEmpty()) + { + ui->label_source_folder_name->hide(); + ui->label_content_source_folder_name->hide(); + } + if(isSame) + { + this->destinationInfo=TransferThread::internalStringTostring(source); + ui->label_source->hide(); + ui->label_destination->hide(); + ui->label_destination_modified->hide(); + ui->label_destination_folder_name->hide(); + ui->label_destination_folder->hide(); + ui->label_content_destination_modified->hide(); + ui->label_content_destination_folder_name->hide(); + ui->label_content_destination_folder->hide(); + } + else + { + this->destinationInfo=TransferThread::internalStringTostring(destination); + this->setWindowTitle(tr("Folder already exists")); + struct stat destination_statbuf; + if(TransferThread::exists(destination)) + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=destination_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast(&destination_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast(&destination_statbuf.st_mtime); + #endif + ui->label_content_destination_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + ui->label_content_destination_modified->hide(); + ui->label_content_destination_folder_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(destination)))); + std::string folder=TransferThread::internalStringTostring(FSabsolutePath(destination)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_destination_folder->setText(QString::fromStdString(folder)); + if(ui->label_content_destination_folder_name->text().isEmpty()) + { + ui->label_destination_folder_name->hide(); + ui->label_content_destination_folder_name->hide(); + } + } + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + on_SuggestNewName_clicked(); +} + +FolderExistsDialog::~FolderExistsDialog() +{ + delete ui; +} + +void FolderExistsDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +std::string FolderExistsDialog::getNewName() +{ + if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) + return ""; + else + return ui->lineEditNewName->text().toStdString(); +} + +void FolderExistsDialog::on_SuggestNewName_clicked() +{ + std::string destinationInfo=this->destinationInfo; + QString absolutePath=QString::fromStdString(FSabsolutePath(destinationInfo)); + QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); + QString suffix; + QString destination; + QString newFileName; + //resolv the suffix + if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) + { + suffix=fileName; + suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); + fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); + } + //resolv the new name + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + newFileName=tr("%name% - copy%suffix%"); + else + { + newFileName=QString::fromStdString(firstRenamingRule); + } + } + else + { + if(otherRenamingRule.empty()) + newFileName=tr("%name% - copy (%number%)%suffix%"); + else + newFileName=QString::fromStdString(otherRenamingRule); + newFileName.replace(QStringLiteral("%number%"),QString::number(num)); + } + newFileName.replace(QStringLiteral("%name%"),fileName); + newFileName.replace(QStringLiteral("%suffix%"),suffix); + destination=absolutePath; + if(!destination.endsWith('/') + #ifdef Q_OS_WIN32 + && !destination.endsWith('\\') + #endif + ) + destination+=CURRENTSEPARATOR; + destination+=newFileName; + destinationInfo=destination.toStdString(); + num++; + } + while(TransferThread::exists(destinationInfo.c_str())); + ui->lineEditNewName->setText(newFileName); +} + +void FolderExistsDialog::on_Rename_clicked() +{ + action=FolderExists_Rename; + this->close(); +} + +void FolderExistsDialog::on_Skip_clicked() +{ + action=FolderExists_Skip; + this->close(); +} + +void FolderExistsDialog::on_Cancel_clicked() +{ + action=FolderExists_Cancel; + this->close(); +} + +FolderExistsAction FolderExistsDialog::getAction() +{ + return action; +} + +bool FolderExistsDialog::getAlways() +{ + return ui->checkBoxAlways->isChecked(); +} + +void FolderExistsDialog::on_Merge_clicked() +{ + action=FolderExists_Merge; + this->close(); +} + +void FolderExistsDialog::on_lineEditNewName_editingFinished() +{ + updateRenameButton(); +} + +void FolderExistsDialog::on_lineEditNewName_returnPressed() +{ + updateRenameButton(); + if(ui->Rename->isEnabled()) + on_Rename_clicked(); + else + QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); +} + +void FolderExistsDialog::on_lineEditNewName_textChanged(const QString &arg1) +{ + Q_UNUSED(arg1); + updateRenameButton(); +} + +void FolderExistsDialog::updateRenameButton() +{ + ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.h b/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.h new file mode 100755 index 0000000..8681ba6 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.h @@ -0,0 +1,60 @@ +/** \file folderExistsDialog.h +\brief Define the dialog when file exists +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef FOLDERISSAMEDIALOG_H +#define FOLDERISSAMEDIALOG_H + +#include +#include + +#include "Environment.h" + +namespace Ui { + class folderExistsDialog; +} + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +/// \brief to show file exists dialog, and ask what do +class FolderExistsDialog : public QDialog +{ + Q_OBJECT + +public: + /// \brief create the object and pass all the informations to it + explicit FolderExistsDialog(QWidget *parent,INTERNALTYPEPATH source,bool isSame,INTERNALTYPEPATH destination,std::string firstRenamingRule,std::string otherRenamingRule); + ~FolderExistsDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FolderExistsAction getAction(); + /// \brief return the new rename is case in manual renaming + std::string getNewName(); +protected: + void changeEvent(QEvent *e); +private slots: + void updateRenameButton(); + void on_SuggestNewName_clicked(); + void on_Rename_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void on_Merge_clicked(); + void on_lineEditNewName_editingFinished(); + void on_lineEditNewName_returnPressed(); + void on_lineEditNewName_textChanged(const QString &arg1); +private: + Ui::folderExistsDialog *ui; + FolderExistsAction action; + std::string oldName; + std::string firstRenamingRule; + std::string otherRenamingRule; + std::string destinationInfo; +}; + +#endif // FOLDERISSAMEDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.qm new file mode 100755 index 0000000..a48b608 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.ts new file mode 100755 index 0000000..a94fa18 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + تم إجبار المحرك على الحركة ، لا يمكنك نسخه + + + + + The engine is forced to copy, you can't move with it + تم إجبار المحرك على النسخ ، لا يمكنك التحرك معه + + + + Destination + الوجهه + + + + Use the actual destination "%1"? + استخدام الوجهة الفعلية "%1" ؟ + + + + The mode has been forced previously. This is an internal error, please report it + تم فرض الوضع مسبقا. هذا خطا داخلي ، الرجاء الإبلاغ عنه + + + + + + + Ask + اسال + + + + + + + Skip + تخطي + + + + Merge + دمج + + + + + Rename + اعاده تسميه + + + + Put at the end + وضع في نهاية + + + + Overwrite + الكتابة فوق + + + + Overwrite if different + الكتابة فوق إذا كان مختلفا + + + + Overwrite if newer + الكتابة فوق إذا كان أحدث + + + + Overwrite if older + الكتابة فوق إذا كان أقدم + + + + Options error + خطا في الخيارات + + + + Options engine is not loaded. Unable to access the filters + لم يتم تحميل محرك الخيارات. غير قادر علي الوصول إلى الفلاتر + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + اسال + + + + + + + Skip + تخطي + + + + Merge + دمج + + + + + Rename + اعاده تسميه + + + + Put at the end + وضع في نهاية + + + + Overwrite + الكتابة فوق + + + + Overwrite if different + الكتابة فوق إذا كان مختلفا + + + + Overwrite if newer + الكتابة فوق إذا كان أحدث + + + + Overwrite if older + الكتابة فوق إذا كان أقدم + + + + + Options error + خطا في الخيارات + + + + Options engine is not loaded. Unable to access the filters + لم يتم تحميل محرك الخيارات. غير قادر علي الوصول إلى الفلاتر + + + + Options engine is not loaded, can't access to the filters + لم يتم تحميل محرك الخيارات. غير قادر علي الوصول إلى الفلاتر + + + + DiskSpace + + + Disk space + مساحة القرص + + + + You need more space on this drive to finish this transfer + تحتاج مساحة أكبر على محرك الاقراص هذا لإنهاء هذا النقل + + + + Continue + مواصله + + + + Cancel + إلغاء الأمر + + + + Drives %1 have %2 available but need %3 + تتوفر %2 محركات الاقراص %1 ولكن تحتاج %3 + + + + FileErrorDialog + + + Error on folder + خطأ في المجلد + + + + Folder name + اسم المجلد + + + + FileExistsDialog + + + %name% - copy%suffix% + % اسم%-نسخ% لاحقه% + + + + %name% - copy (%number%)%suffix% + (% الاسم%-النسخ (% العدد%% اللاحق +ه% + + + + Error + الخطا + + + + Try rename with using special characters + حاول أعاده تسميه باستخدام أحرف خاصه + + + + FileIsSameDialog + + + %name% - copy%suffix% + % اسم%-نسخ% لاحقه% + + + + %name% - copy (%number%)%suffix% + (% الاسم%-النسخ (% العدد%% اللاحق +ه% + + + + Error + الخطا + + + + Try rename with using special characters + حاول أعاده تسميه باستخدام أحرف خاصه + + + + FilterRules + + + Search: + بحث: + + + + Search type: + نوع البحث: + + + + Raw text + نص خام + + + + Simplified regex + Simplified regex + + + + Perl's regex + Perl's regex + + + + Apply on: + تنطبق على: + + + + File + ملف + + + + Folder + مجلد + + + + File and folder + ملف ومجلد + + + + The test string matches with the regex + سلسله اختبار يطابق مع regex + + + + Checking + التحقق + + + + Test string: + سلسله الاختبار: + + + + Filters dialog + حوار الفلاتر + + + + Whole string must match + يجب ان تتطابق السلسلة الكاملة + + + + The regex is valid + regex صالحة + + + + Filters + + + Filters + فلاتر + + + + Exclusion filters + فلاتر الاستبعاد + + + + Inclusion filters + فلاتر مدرجة + + + + None = Include all + بلا = تضمين الكل + + + + + Raw text + نص خام + + + + + Simplified regex + المبسطة regex + + + + + Perl's regex + Perl's regex + + + + + Only on file + فقط في الملف + + + + + Only on folder + فقط في المجلد + + + + + + + Full match + تطابق كامل + + + + FolderExistsDialog + + + Folder already exists + المجلد موجود بالفعل + + + + %name% - copy%suffix% + % اسم%-نسخ% لاحقه% + + + + %name% - copy (%number%)%suffix% + (% الاسم%-النسخ (% العدد%% اللاحق +ه% + + + + Error + الخطا + + + + Try rename with using special characters + حاول أعاده التسميه باستخدام أحرف خاصه + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + غير قادر علي القيام بنقل المادة أو نسخه إلى وضع إجباري غير صحيح: %1 + + + + + Unable to save the transfer list: %1 + غير قادر على حفظ قائمه النقل: %1 + + + + Problem reading file, or file-size is 0 + مشكلة في قراءة الملف ، أو حجم الملف هو 0 + + + + Wrong header: "%1" + العنوان الرأسي الخاطئ: "%1" + + + + The transfer list is in mixed mode, but this instance is not in this mode + قائمة النقل في الوضع المختلط ، ولكن هذا المثيل ليس في هذا الوضع + + + + The transfer list is in copy mode, but this instance is not in this mode + قائمه النقل في وضع النسخ ولكن هذا المثيل غير في هذا الوضع + + + + The transfer list is in move mode, but this instance is not in this mode + قائمه النقل في وضع النقل ، ولكن هذا المثيل ليس في هذا الوضع + + + + Some errors have been found during the line parsing + عثر على بعض الأخطاء اثناء تحليل الخط + + + + Unable to open the transfer list: %1 + غير قادر على فتح قائمه النقل: %1 + + + + MkPath + + + + Unable to create the folder + غير قادر على إنشاء المجلد + + + + The source folder don't exists + مجلد المصدر غير موجود + + + + Unable to temporary rename the folder + غير قادر على أعاده تسميه المجلد المؤقت + + + + Unable to do the final real move the folder + غير قادر على القيام بالخطوة الحقيقية النهائية المجلد + + + + Unable to move the folder + غير قادر على نقل المجلد + + + + Unable to move the folder: errno: %1 + errno: %1 :غير قادر على نقل المجلد + + + + + Unable to remove + غير قادر على أزاله + + + + ReadThread + + + Internal error, please report it! + خطا داخلي ، يرجى الإبلاغ عن ذلك! + + + + Unable to read the source file: + غير قادر على قراءه الملف المصدر: + + + + File truncated during the read, possible data change + تم اقتطاع الملف اثناء القراءة ، وتغيير البيانات المحتملة + + + + RenamingRules + + + First renaming + أعاده التسمية الاولي + + + + %name% - copy%suffix% + %name% should not be translated + % اسم%-نسخ% لاحقه% + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + % الاسم%-النسخ (% العدد%% اللاحق +ه%) + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + </p></body></html>لاحقه الملف</span>%لاحقه%<span style=" font-weight:600;">للعدد الإضافي ،</span>%عدد%<span style=" font-weight:600;">لاسم الملف الأصلي ،</span>%اسم%<span style=" font-weight:600;">المتغيرات: <html><head/><body><p> + + + + Second renaming + أعاده تسميه ثانيه + + + + Renaming rules + أعاده تسميه القواعد + + + + + %1 - copy%2 + %1 - نسخ (%2) + + + + + %1 - copy (%2)%3 + %1-نسخ (%2) %3 + + + + ScanFileOrFolder + + + + %1 - copy + %1-نسخ + + + + + %1 - copy (%2) + %1 - نسخ (%2) + + + + + %name% - copy + %اسم% - نسخ + + + + + %name% - copy (%number%) + % الاسم%-النسخة (% العدد%) + + + + + Problem with folder read + مشكله في قراءه المجلد + + + + TransferThread + + + %name% - copy%suffix% + % اسم%-نسخ% لاحقه% + + + + %name% - copy (%number%)%suffix% + (% الاسم%-النسخ (% العدد%% اللاحق +ه% + + + + + File not found + الملف غير موجود + + + + + Unable to change the date + غير قادر على تغيير التاريخ + + + + Try rename with using special characters + حاول أعاده تسميه باستخدام أحرف خاصه + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + تاريخ تعديل خاطئ أو غير قادر علي الحصول عليه ، يمكنك تعطيل نقل الوقت للقيام بذلك + + + + + Unable to create the destination folder: + غير قادر على إنشاء مجلد الوجهة: + + + + + Unable to create the destination folder, errno: %1 + errno: %1 غير قادر علي إنشاء المجلد الوجهة + + + + WriteThread + + + Path resolution error (Empty path) + (خطأ في دقة المسار (مسار فارغ + + + + + Unable to create the destination folder: + غير قادر على إنشاء مجلد الوجهة: + + + + + Unable to create the destination folder, errno: %1 + errno: %1 غير قادر علي إنشاء المجلد الوجهة + + + + Internal error, please report it! + خطا داخلي ، يرجى الإبلاغ عن ذلك! + + + + copyEngineOptions + + + Transfer + نقل + + + + Move the whole folder + نقل المجلد بأكمله + + + + Transfer the file rights + نقل حقوق الملف + + + + Keep the file date + الاحتفاظ بتاريخ الملف + + + + Create full path if not exists + إنشاء مسار كامل إذا لم يكن موجودا + + + + Checksum + اختباري + + + + Auto start + البدء التلقائي + + + + Error and collision + الخطا والاصطدام + + + + When folder error + عند خطا في المجلد + + + + When file error + عند خطا في الملف + + + + When file collision + عندما تتضارب الملفات + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + الكتابة فوق إذا اختلف تاريخ التعديل + + + + When folder collision + عندما يتضارب المجلد + + + + Check if destination folder exists + تحقق مما إذا كان مجلد الوجهة موجودا + + + + Renaming rules + أعاده تسميه القواعد + + + + Delete partially transferred files + حذف الملفات المنقولة جزئيا + + + + Rename the original destination + أعاده تسميه الوجهة الاصليه + + + + Performance + الاداء + + + + Inode threads + Inode threads + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + متفرقات + + + + Check the disk space + تحقق من مساحة القرص + + + + Use this folder when destination is not set + استخدم هذا المجلد عندما لا يتم تعيين الوجهة + + + + Browse + استعراض + + + + Filters + فلاتر + + + + fileErrorDialog + + + Error with file + خطا في الملف + + + + Error + الخطا + + + + Size + حجم + + + + Modified + معدل + + + + File name + اسم الملف + + + + Destination + الوجهه + + + + Folder + مجلد + + + + &Always perform this action + & تنفيذ هذا الاجراء دوما + + + + Try in with elevated privileges + جرب مع الامتيازات المرتفعة + + + + Put to bottom + وضع إلى أسفل + + + + Retry + اعاده المحاوله + + + + &Skip + &تخطي + + + + &Cancel + &الغاء الامر + + + + fileExistsDialog + + + The file exists + الملف موجود + + + + Source + المصدر + + + + Destination + الوجهه + + + + + Size + حجم + + + + + Modified + معدل + + + + + File name + اسم الملف + + + + + Folder + مجلد + + + + Suggest new &name + اقتراح &اسم جديد + + + + &Always perform this action + & تنفيذ هذا الاجراء دوما + + + + + Overwrite if modification date differs + الكتابة فوق إذا اختلف تاريخ التعديل + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + &اعاده تسميه + + + + &Overwrite + &الكتابة فوق + + + + &Skip + &تخطي + + + + &Cancel + &الغاء الامر + + + + Overwrite if newer + الكتابة فوق إذا كان أحدث + + + + + Overwrite if older + الكتابة فوق إذا كان أقدم + + + + fileIsSameDialog + + + Size + حجم + + + + Modified + معدل + + + + File name + اسم الملف + + + + The source and destination are same + المصدر والوجهة متشابهان + + + + Folder + مجلد + + + + Suggest new &name + اقتراح &اسم جديد + + + + &Always perform this action + & تنفيذ هذا الاجراء دوما + + + + &Rename + &اعاده تسميه + + + + &Skip + &تخطي + + + + &Cancel + &الغاء الامر + + + + folderExistsDialog + + + Source + المصدر + + + + Destination + الوجهه + + + + The source and destination is identical + المصدر والوجهة متطابقان + + + + + Modified + معدل + + + + + Folder name + اسم المجلد + + + + + Folder + مجلد + + + + Suggest new &name + اقتراح &اسم جديد + + + + &Always perform this action + & تنفيذ هذا الاجراء دوما + + + + &Rename + &اعاده تسميه + + + + Merge + دمج + + + + Skip + تخطي + + + + &Cancel + &الغاء الامر + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.qm new file mode 100755 index 0000000..10475cf Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.ts new file mode 100755 index 0000000..dc9f497 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + Verschiebemodus - Sie können nicht kopieren + + + + + The engine is forced to copy, you can't move with it + Kopiermodus - Sie können nicht verschieben + + + + Destination + Ziel + + + + Use the actual destination "%1"? + Aktuelles Ziel: "%1" benutzen? + + + + The mode has been forced previously. This is an internal error, please report it + Der Modus wurde vorher erzwungen. Interner Fehler - Bitte bei mir melden + + + + + + + Ask + Fragen + + + + + + + Skip + Überspringen + + + + Merge + Fusionieren + + + + + Rename + Umbenennen + + + + Put at the end + Ans Ende verschieben + + + + Overwrite + Überschreiben + + + + Overwrite if different + Überschreiben, falls verschieden + + + + Overwrite if newer + Überschreiben, falls neuer + + + + Overwrite if older + Überschreiben, falls älter + + + + Options error + Fehlerhafte Optionen + + + + Options engine is not loaded. Unable to access the filters + Optionen nicht geladen - Kein Zugriff auf Filter + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + Fragen + + + + + + + Skip + Überspringen + + + + Merge + Fusionieren + + + + + Rename + Umbenennen + + + + Put at the end + Ans Ende verschieben + + + + Overwrite + Überschreiben + + + + Overwrite if different + Überschreiben, falls verschieden + + + + Overwrite if newer + Überschreiben, falls neuer + + + + Overwrite if older + Überschreiben, falls älter + + + + + Options error + Fehlerhafte Optionen + + + + Options engine is not loaded. Unable to access the filters + Option nicht geladen - Kein Zugriff auf Filter + + + + Options engine is not loaded, can't access to the filters + Option nicht geladen - Kann nicht auf Filter zugreifen + + + + DiskSpace + + + Disk space + Speicherplatz + + + + You need more space on this drive to finish this transfer + Zu wenig Speicherplatz auf diesem Laufwerk + + + + Continue + Fortsetzen + + + + Cancel + Abbrechen + + + + Drives %1 have %2 available but need %3 + Laufwerk %1: %2 verfügbar %3 benötigt + + + + FileErrorDialog + + + Error on folder + Ordnerfehler + + + + Folder name + Ordnername + + + + FileExistsDialog + + + %name% - copy%suffix% + %name% - Kopie%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - Kopie% (%number%)%suffix% + + + + Error + Fehler + + + + Try rename with using special characters + Versuche Umbenennung mit Sonderzeichen + + + + FileIsSameDialog + + + %name% - copy%suffix% + %name% - Kopie%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - Kopie% (%number%)%suffix% + + + + Error + Fehler + + + + Try rename with using special characters + Versuche Umbenennung mit Sonderzeichen + + + + FilterRules + + + Search: + Suche: + + + + Search type: + Suche (Typ): + + + + Raw text + Roh-Text + + + + Simplified regex + Vereinfachte RegEx + + + + Perl's regex + Perls RegEx + + + + Apply on: + Anwenden auf: + + + + File + Datei + + + + Folder + Ordner + + + + File and folder + Datei und Ordner + + + + The test string matches with the regex + Die Test-Zeichenfolge stimmt mit RegEx überein + + + + Checking + Überprüfen + + + + Test string: + Test-Zeichenfolge: + + + + Filters dialog + Filter-Dialog + + + + Whole string must match + Ganze Zeichenfolge muss übereinstimmen + + + + The regex is valid + Die RegEx ist gültig + + + + Filters + + + Filters + Filter + + + + Exclusion filters + Ausschließungs-Filter + + + + Inclusion filters + Einschließungs-Filter + + + + None = Include all + Keiner = Alle einschließen + + + + + Raw text + Roh-Text + + + + + Simplified regex + Vereinfachte RegEx + + + + + Perl's regex + Perls RegEx + + + + + Only on file + Nur auf Datei + + + + + Only on folder + Nur auf Ordner + + + + + + + Full match + Volle Übereinstimmung + + + + FolderExistsDialog + + + Folder already exists + Ordner existiert bereits + + + + %name% - copy%suffix% + %name% - Kopie%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - Kopie% (%number%)%suffix% + + + + Error + Fehler + + + + Try rename with using special characters + Versuche Umbenennung mit Sonderzeichen + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + Falscher Modus: %1 - Kann Element nicht verschieben oder kopieren + + + + + Unable to save the transfer list: %1 + Konnte die Transferliste: %1 nicht speichern + + + + Problem reading file, or file-size is 0 + Lesefehler, oder Dateigröße=0 + + + + Wrong header: "%1" + Falscher Header: "%1" + + + + The transfer list is in mixed mode, but this instance is not in this mode + Die Transferliste ist im gemischten Modus, aber diese Instanz ist nicht im selben Modus + + + + The transfer list is in copy mode, but this instance is not in this mode + Die Transferliste ist im Kopiermodus, aber diese Instanz ist nicht im selben Modus + + + + The transfer list is in move mode, but this instance is not in this mode + Die Transferliste ist im Verschiebe-Modus, aber diese Instanz ist nicht im selben Modus + + + + Some errors have been found during the line parsing + Bei der Zeilenanalyse sind Fehler aufgetreten + + + + Unable to open the transfer list: %1 + Transferliste: %1 kann nicht geöffnet werden + + + + MkPath + + + + Unable to create the folder + Der Ordner kann nicht erstellt werden + + + + The source folder don't exists + Quell-Ordner existiert nicht + + + + Unable to temporary rename the folder + Kann den Ordner nicht temporär umbenennen + + + + Unable to do the final real move the folder + Kann den Ordner nicht endgültig verschieben + + + + Unable to move the folder + Kann den Ordner nicht verschieben + + + + Unable to move the folder: errno: %1 + Kann Ordner nicht verschieben: Fehler Nummer: %1 + + + + + Unable to remove + Kann nicht löschen + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + Erste Umbenennung + + + + %name% - copy%suffix% + %name% should not be translated + %name% - Kopie%suffix% + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + %name% - Kopie% (%number%)%suffix% + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> für den originalen Dateinamen, <span style=" font-weight:600;">%number%</span> für die extra Nummer, <span style=" font-weight:600;">%suffix%</span> Datei suffix</p></body></html> + + + + Second renaming + Zweite Umbenennung + + + + Renaming rules + Umbennungsregeln + + + + + %1 - copy%2 + %1 - Kopie%2 + + + + + %1 - copy (%2)%3 + %1 - Kopie (%2) {1 ?} {2)%3?} + + + + ScanFileOrFolder + + + + %1 - copy + %1 - Kopie + + + + + %1 - copy (%2) + %1 - Kopie (%2) + + + + + %name% - copy + %name% - Kopie + + + + + %name% - copy (%number%) + %name% - Kopie (%number%) + + + + + Problem with folder read + Problem beim Lesen des Ordners + + + + TransferThread + + + %name% - copy%suffix% + %name% - Kopie%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - Kopie% (%number%)%suffix% + + + + + File not found + Datei nicht gefunden + + + + + Unable to change the date + Kann Datum nicht ändern + + + + Try rename with using special characters + Versuche Umbenennung mit Sonderzeichen + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + Falsches Änderungsdatum oder Fehler beim Auslesen, Sie können die Übertragung des Zeitstempels deaktivieren + + + + + Unable to create the destination folder: + Zielordner konnte nicht erstellt werden: + + + + + Unable to create the destination folder, errno: %1 + Zielordner konnte nicht erstellt werden, Fehler Nummer: %1 + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + Zielordner konnte nicht erstellt werden: + + + + + Unable to create the destination folder, errno: %1 + Zielordner konnte nicht erstellt werden, Fehler Nummer: %1 + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + Übertragung + + + + Move the whole folder + Verschiebe den ganzen Ordner + + + + Transfer the file rights + Übertrage die Dateirechte + + + + Keep the file date + Datum der Dateien beibehalten + + + + Create full path if not exists + Vollen Pfad erstellen, wenn nicht vorhanden + + + + Checksum + + + + + Auto start + + + + + Error and collision + Fehler und Kollision + + + + When folder error + Bei Ordnerfehler + + + + When file error + Bei Dateifehler + + + + When file collision + Bei Dateikollision + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + Überschreiben, falls Änderungsdatum verschieden + + + + When folder collision + Bei Ordnerkollision + + + + Check if destination folder exists + Prüfen ob Zielordner vorhanden ist + + + + Renaming rules + Umbennungsregeln + + + + Delete partially transferred files + Unvollständig übertragene Dateien löschen + + + + Rename the original destination + Original-Ziel umbenennen + + + + Performance + Leistung + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + Verschiedenes + + + + Check the disk space + Auf freien Speicherplatz überprüfen + + + + Use this folder when destination is not set + Diesen Ordner benutzen, wenn kein Ziel definiert wurde + + + + Browse + Wählen + + + + Filters + Filter + + + + fileErrorDialog + + + Error with file + Dateifehler + + + + Error + Fehler + + + + Size + Größe + + + + Modified + Geändert + + + + File name + Dateiname + + + + Destination + Ziel + + + + Folder + Ordner + + + + &Always perform this action + &Aktion immer ausführen + + + + Try in with elevated privileges + Mit erweiterten Rechten versuchen + + + + Put to bottom + Ans Ende verschieben + + + + Retry + Wiederholen + + + + &Skip + Über&springen + + + + &Cancel + Abbrechen (&C) + + + + fileExistsDialog + + + The file exists + Die Datei existiert + + + + Source + Quelle + + + + Destination + Ziel + + + + + Size + Größe + + + + + Modified + Geändert + + + + + File name + Dateiname + + + + + Folder + Ordner + + + + Suggest new &name + Neuen &Namen vorschlagen + + + + &Always perform this action + &Aktion immer ausführen + + + + + Overwrite if modification date differs + Überschreiben, falls Änderungsdatum verschieden + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + Umbenennen (&R) + + + + &Overwrite + Überschreiben (&O) + + + + &Skip + Über&springen + + + + &Cancel + Abbrechen (&C) + + + + Overwrite if newer + Überschreiben, falls neuer + + + + + Overwrite if older + Überschreiben, falls älter + + + + fileIsSameDialog + + + Size + Größe + + + + Modified + Geändert + + + + File name + Dateiname + + + + The source and destination are same + Quelle und Ziel sind gleich + + + + Folder + Ordner + + + + Suggest new &name + Neuen &Namen vorschlagen + + + + &Always perform this action + &Aktion immer ausführen + + + + &Rename + Umbenennen (&R) + + + + &Skip + Über&springen + + + + &Cancel + Abbrechen (&C) + + + + folderExistsDialog + + + Source + Quelle + + + + Destination + Ziel + + + + The source and destination is identical + Quelle und Ziel sind identisch + + + + + Modified + Geändert + + + + + Folder name + Ordnername + + + + + Folder + Ordner + + + + Suggest new &name + Neuen &Namen vorschlagen + + + + &Always perform this action + &Aktion immer ausführen + + + + &Rename + Umbenennen (&R) + + + + Merge + Fusionieren + + + + Skip + Überspringen + + + + &Cancel + Abbrechen (&C) + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.qm new file mode 100755 index 0000000..d925dd6 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.ts new file mode 100755 index 0000000..4a444fe --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Filters dialog + + + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + Whole string must match + + + + + The test string matches with the regex + + + + + Checking + + + + + The regex is valid + + + + + Test string: + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + Renaming rules + + + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.qm new file mode 100755 index 0000000..feaf1fc Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.ts new file mode 100755 index 0000000..aad6412 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + El motor se ve obligado a moverse, no se puede copiar con ella + + + + + The engine is forced to copy, you can't move with it + El motor se ve obligado a copiar, no te puedes mover con él + + + + Destination + Destino + + + + Use the actual destination "%1"? + Utilice el destino "%1" actual? + + + + The mode has been forced previously. This is an internal error, please report it + El modo se ha visto obligado previamente. Este es un error interno, por favor repórtelo + + + + + + + Ask + Pedir + + + + + + + Skip + Omitir + + + + Merge + Unir + + + + + Rename + Cambiar el nombre + + + + Put at the end + Ponga al final + + + + Overwrite + Sobrescribir + + + + Overwrite if different + Sobrescribir si es diferente + + + + Overwrite if newer + Sobrescribir si nuevo + + + + Overwrite if older + Sobrescribir si es mayor + + + + Options error + error Opciones + + + + Options engine is not loaded. Unable to access the filters + Opciones del motor no está cargado. No es posible acceder a los filtros + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + Pedir + + + + + + + Skip + Omitir + + + + Merge + Unir + + + + + Rename + Cambiar el nombre + + + + Put at the end + Ponga al final + + + + Overwrite + Sobrescribir + + + + Overwrite if different + Sobrescribir si es diferente + + + + Overwrite if newer + Sobrescribir si nuevo + + + + Overwrite if older + Sobrescribir si es mayor + + + + + Options error + error Opciones + + + + Options engine is not loaded. Unable to access the filters + Opciones del motor no está cargado. No es posible acceder a los filtros + + + + Options engine is not loaded, can't access to the filters + Opciones del motor no está cargado, no se puede acceder a los filtros + + + + DiskSpace + + + Disk space + Espacio en disco + + + + You need more space on this drive to finish this transfer + Necesita más espacio en esta unidad para terminar esta transferencia + + + + Continue + Continuar + + + + Cancel + Cancelar + + + + Drives %1 have %2 available but need %3 + Drives %1 tienen %2 disponible, pero necesitan %3 + + + + FileErrorDialog + + + Error on folder + Error en la carpeta + + + + Folder name + Nombre de la carpeta + + + + FileExistsDialog + + + %name% - copy%suffix% + %name% - copia%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - copia (%number%)%suffix% + + + + Error + Error + + + + Try rename with using special characters + Trate de cambiar el nombre con el uso de caracteres especiales + + + + FileIsSameDialog + + + %name% - copy%suffix% + %name% - copia%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - copia (%number%)%suffix% + + + + Error + Error + + + + Try rename with using special characters + Trate de cambiar el nombre con el uso de caracteres especiales + + + + FilterRules + + + Search: + Buscar: + + + + Search type: + Tipo de búsqueda: + + + + Raw text + texto Fuente + + + + Simplified regex + Regex simplificado + + + + Perl's regex + Perl's regex + + + + Apply on: + Aplicar sobre: + + + + File + Archivos + + + + Folder + Carpeta + + + + File and folder + Archivos y carpeta + + + + The test string matches with the regex + La cadena de prueba coincide con la expresión regular + + + + Checking + Verification + + + + Test string: + Prueba de la cuerda: + + + + Filters dialog + Filtros de diálogo + + + + Whole string must match + Todo cadena debe coincidir + + + + The regex is valid + La expresión regular es válido + + + + Filters + + + Filters + Filtros + + + + Exclusion filters + Filtros de exclusión + + + + Inclusion filters + Filtros de inclusión + + + + None = Include all + Ninguno = Incluya todos los + + + + + Raw text + texto Fuente + + + + + Simplified regex + Simplificado regex + + + + + Perl's regex + Perl's regex + + + + + Only on file + Sólo en el archivo + + + + + Only on folder + Sólo en la carpeta + + + + + + + Full match + Partido completo + + + + FolderExistsDialog + + + Folder already exists + Carpeta ya existe + + + + %name% - copy%suffix% + %name% - copia%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - copia (%number%)%suffix% + + + + Error + Error + + + + Try rename with using special characters + Trate de cambiar el nombre con el uso de caracteres especiales + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + No se puede hacer para mover o copiar elemento en modo incorrecto obligado: %1 + + + + + Unable to save the transfer list: %1 + No se puede guardar la lista de transferencias: %1 + + + + Problem reading file, or file-size is 0 + Problema al leer el archivo o archivos de tamaño es 0 + + + + Wrong header: "%1" + Encabezado incorrecto: "%1" + + + + The transfer list is in mixed mode, but this instance is not in this mode + La lista de transferencia está en modo mixto, pero este caso no es de este modo + + + + The transfer list is in copy mode, but this instance is not in this mode + La lista de transferencia está en el modo de copia, pero esta instancia no está en este modo + + + + The transfer list is in move mode, but this instance is not in this mode + La lista de transferencia es el modo de desplazamiento, pero esta instancia no está en este modo + + + + Some errors have been found during the line parsing + Algunos errores han sido encontrados durante el análisis de línea + + + + Unable to open the transfer list: %1 + No se puede abrir la lista de transferencias: %1 + + + + MkPath + + + + Unable to create the folder + No se puede crear la carpeta + + + + The source folder don't exists + La carpeta de origen no existe + + + + Unable to temporary rename the folder + No es posible cambiar el nombre de la carpeta temporal + + + + Unable to do the final real move the folder + No se puede hacer el movimiento final real de la carpeta + + + + Unable to move the folder + No se puede mover la carpeta + + + + Unable to move the folder: errno: %1 + No se puede mover la carpeta: errno: %1 + + + + + Unable to remove + No se puede eliminar + + + + ReadThread + + + Internal error, please report it! + ¡Error interno, por favor repórtelo! + + + + Unable to read the source file: + No se puede leer el archivo fuente: + + + + File truncated during the read, possible data change + Archivo truncado durante la lectura, posible cambio de datos + + + + RenamingRules + + + First renaming + En primer lugar el cambio de nombre + + + + %name% - copy%suffix% + %name% should not be translated + %name% - copia%suffix% + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + %name% - copia (%number%)%suffix% + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> para el nombre del archivo original, <span style=" font-weight:600;">%number%</span> para el número extra, <span style=" font-weight:600;">%suffix%</span> sufijo de archivo</p></body></html> + + + + Second renaming + En segundo lugar el cambio de nombre + + + + Renaming rules + Reglas de Cambio de nombre + + + + + %1 - copy%2 + %1 - copia%2 + + + + + %1 - copy (%2)%3 + %1 - copia (%2)%3 + + + + ScanFileOrFolder + + + + %1 - copy + %1 - copia + + + + + %1 - copy (%2) + %1 - copia (%2) + + + + + %name% - copy + %name% - copia + + + + + %name% - copy (%number%) + %name% - copia (%number%) + + + + + Problem with folder read + Problema con la carpeta leída + + + + TransferThread + + + %name% - copy%suffix% + %name% - copia%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - copia (%number%)%suffix% + + + + + File not found + Archivo no encontrado + + + + + Unable to change the date + No se puede cambiar la fecha + + + + Try rename with using special characters + Trate de cambiar el nombre con el uso de caracteres especiales + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + Fecha de modificación incorrecta o incapaz de obtenerla, puede desactivar la transferencia de tiempo para hacerlo + + + + + Unable to create the destination folder: + No se puede crear la carpeta de destino: + + + + + Unable to create the destination folder, errno: %1 + No se puede crear la carpeta de destino, errno: %1 + + + + WriteThread + + + Path resolution error (Empty path) + Error de resolución de ruta (ruta vacía) + + + + + Unable to create the destination folder: + No se puede crear la carpeta de destino: + + + + + Unable to create the destination folder, errno: %1 + No se puede crear la carpeta de destino, errno: %1 + + + + Internal error, please report it! + ¡Error interno, por favor repórtelo! + + + + copyEngineOptions + + + Transfer + Transferencia + + + + Move the whole folder + Mueva la carpeta completa + + + + Transfer the file rights + Transferencia de los derechos de archivo + + + + Keep the file date + Mantener la fecha de archivo + + + + Create full path if not exists + Crear ruta completa si no existe + + + + Checksum + Suma de comprobación + + + + Auto start + Inicio automático + + + + Error and collision + Error y de la colisión + + + + When folder error + Cuando el error carpeta + + + + When file error + Cuando archivo error + + + + When file collision + Cuando archivo colisión + + + + Overwrite if not same size + Sobrescribir si no es del mismo tamaño + + + + Overwrite if modification date differs + Sobrescribir si la fecha de modificación difiere + + + + When folder collision + Cuando la colisión carpeta + + + + Check if destination folder exists + Compruebe si existe la carpeta de destino + + + + Renaming rules + Reglas de Cambio de nombre + + + + Delete partially transferred files + Eliminar archivos parcialmente transferidos + + + + Rename the original destination + Cambie el nombre del destino original + + + + Performance + Rendimiento + + + + Inode threads + Inode threads + + + + + MB + + + + + Uncheck this under Windows create problem + Desmarca esto en Windows crear problema + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + Misc + + + + Check the disk space + Compruebe el espacio en disco + + + + Use this folder when destination is not set + Use esta carpeta cuando el destino no esté configurado + + + + Browse + Busque + + + + Filters + Filtros + + + + fileErrorDialog + + + Error with file + Error con el archivo + + + + Error + Error + + + + Size + Tamaño + + + + Modified + Modificado + + + + File name + Nombre de archivo + + + + Destination + Destino + + + + Folder + Carpeta + + + + &Always perform this action + &Siempre realice esta acción + + + + Try in with elevated privileges + Pruebe con privilegios elevados + + + + Put to bottom + Ponga a abajo + + + + Retry + Reintentar + + + + &Skip + &Omitir + + + + &Cancel + Cancelar + + + + fileExistsDialog + + + The file exists + El archivo ya existe + + + + Source + Fuente + + + + Destination + Destino + + + + + Size + Tamaño + + + + + Modified + Modificado + + + + + File name + Nombre de archivo + + + + + Folder + Carpeta + + + + Suggest new &name + Sugerir nuevo &nombre + + + + &Always perform this action + &Siempre realice esta acción + + + + + Overwrite if modification date differs + Sobrescribir si la fecha de modificación difiere + + + + + Overwrite if not same size + Sobrescribir si no es del mismo tamaño + + + + + Overwrite if not same size and date + Sobrescribir si no es del mismo tamaño y fecha + + + + &Rename + &Cambiar el nombre + + + + &Overwrite + &Sobrescribir + + + + &Skip + &Omitir + + + + &Cancel + Ca&ncelar + + + + Overwrite if newer + Sobrescribir si nuevo + + + + + Overwrite if older + Sobrescribir si es mayor + + + + fileIsSameDialog + + + Size + Tamaño + + + + Modified + Modificado + + + + File name + Nombre de archivo + + + + The source and destination are same + El origen y el destino son los mismos + + + + Folder + Carpeta + + + + Suggest new &name + Sugerir nuevo nombre + + + + &Always perform this action + &Siempre realice esta acción + + + + &Rename + Cambiar el nombre + + + + &Skip + Omitir + + + + &Cancel + Cancelar + + + + folderExistsDialog + + + Source + Fuente + + + + Destination + Destino + + + + The source and destination is identical + La fuente y el destino es idéntica + + + + + Modified + Modificado + + + + + Folder name + Nombre de la carpeta + + + + + Folder + Carpeta + + + + Suggest new &name + Sugerir nuevo nombre + + + + &Always perform this action + &Siempre realice esta acción + + + + &Rename + Cambiar el nombre + + + + Merge + Unir + + + + Skip + Omitir + + + + &Cancel + Cancelar + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.qm new file mode 100755 index 0000000..c538b95 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.ts new file mode 100755 index 0000000..6bec60f --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + Le moteur est forcé en déplacement, vous ne pouvez pas copier avec + + + + + The engine is forced to copy, you can't move with it + Le moteur est forcé en copie, vous ne pouvez pas déplacer avec + + + + Destination + Destination + + + + Use the actual destination "%1"? + Utiliser la destination actuelle "%1"? + + + + The mode has been forced previously. This is an internal error, please report it + Le mode a été forcé. C'est une erreur interne, merci de la repporter + + + + + + + Ask + Demander + + + + + + + Skip + Passer + + + + Merge + Fusionner + + + + + Rename + Renommer + + + + Put at the end + Mettre à la fin + + + + Overwrite + Écraser + + + + Overwrite if different + Écraser si différent + + + + Overwrite if newer + Écraser si plus récent + + + + Overwrite if older + Écraser si plus vieux + + + + Options error + Erreur d'options + + + + Options engine is not loaded. Unable to access the filters + Le moteur d'options n'est pas chargé. Impossible d'accédé aux filtres + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + Demander + + + + + + + Skip + Passer + + + + Merge + Fusionner + + + + + Rename + Renommer + + + + Put at the end + Mettre à la fin + + + + Overwrite + Écraser + + + + Overwrite if different + Écraser si différent + + + + Overwrite if newer + Écraser si plus récent + + + + Overwrite if older + Écraser si plus vieux + + + + + Options error + Erreur d'options + + + + Options engine is not loaded. Unable to access the filters + Le moteur d'options n'est pas chargé. Impossible d'accédé aux filtres + + + + Options engine is not loaded, can't access to the filters + Moteur d'options non chargé, impossible d'accéder aux filtres + + + + DiskSpace + + + Disk space + Espace disque + + + + You need more space on this drive to finish this transfer + Vous avez besoin de plus d'espace pour finir ce transfert + + + + Continue + Continuer + + + + Cancel + Annuler + + + + Drives %1 have %2 available but need %3 + Lecteur %1 as %2 disponible mais à besoin de %3 + + + + FileErrorDialog + + + Error on folder + Erreur sur un dossier + + + + Folder name + Nom de répertoire + + + + FileExistsDialog + + + %name% - copy%suffix% + %name% - copie%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - copie (%number%)%suffix% + + + + Error + Erreur + + + + Try rename with using special characters + Essaie de renommage avec caratéres interdits + + + + FileIsSameDialog + + + %name% - copy%suffix% + %name% - copie%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - copie (%number%)%suffix% + + + + Error + Erreur + + + + Try rename with using special characters + Essaie de renommage avec caratéres interdits + + + + FilterRules + + + Search: + Recherche: + + + + Search type: + Type de recherche: + + + + Raw text + Texte brut + + + + Simplified regex + Regex simplifiée + + + + Perl's regex + Regex perl + + + + Apply on: + Appliquer sur: + + + + File + Fichier + + + + Folder + Dossier + + + + File and folder + Fichier et dossier + + + + The test string matches with the regex + La chaine de texte corresponds avec la regex + + + + Checking + Vérification + + + + Test string: + Chaine de test: + + + + Filters dialog + Dialogue des filtres + + + + Whole string must match + Toute la chaine doit correspondre + + + + The regex is valid + La regex est valid + + + + Filters + + + Filters + Filtres + + + + Exclusion filters + Filtres d'exclusion + + + + Inclusion filters + Filtres d'inclusion + + + + None = Include all + Aucun = tout inclure + + + + + Raw text + Texte brute + + + + + Simplified regex + Regex simplifié + + + + + Perl's regex + Regex perl + + + + + Only on file + Appliquer sur fichier + + + + + Only on folder + Appliquer sur dossier + + + + + + + Full match + Correspondance totale + + + + FolderExistsDialog + + + Folder already exists + Dossier déjà existant + + + + %name% - copy%suffix% + %name% - copie%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - copie (%number%)%suffix% + + + + Error + Erreur + + + + Try rename with using special characters + Essaie de renommage avec caratéres interdits + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + Impossible de faire un déplacement ou une copie dans le mauvais mode forcé: %1 + + + + + Unable to save the transfer list: %1 + Impossible de sauvegarder la liste de transfert: %1 + + + + Problem reading file, or file-size is 0 + Problem durant la lecture, ou taille de fichier est 0 + + + + Wrong header: "%1" + Mauvais en-tête: "%1" + + + + The transfer list is in mixed mode, but this instance is not in this mode + La liste de transfert est en mode mixte, mais l'instance n'est pas dans ce mode + + + + The transfer list is in copy mode, but this instance is not in this mode + La liste de transfert est en mode copie, mais l'instance n'est pas dans ce mode + + + + The transfer list is in move mode, but this instance is not in this mode + La liste de transfert est en mode déplacement, mais l'instance n'est pas dans ce mode + + + + Some errors have been found during the line parsing + Certaine erreur ont été trouvé durant l'analise de la line + + + + Unable to open the transfer list: %1 + Impossible d'ouvrir la list de transfert: %1 + + + + MkPath + + + + Unable to create the folder + Impossible de créer le répertoire + + + + The source folder don't exists + Le dossier source n'éxiste pas + + + + Unable to temporary rename the folder + Impossible de renommer le dossier + + + + Unable to do the final real move the folder + Impossible de faire le déplacement final du dossier + + + + Unable to move the folder + Impossible de déplacer le dossier + + + + Unable to move the folder: errno: %1 + Impossible de déplacer le dossier: errno: %1 + + + + + Unable to remove + Impossible de supprimer + + + + ReadThread + + + Internal error, please report it! + Erreur interne, veuillez la signaler! + + + + Unable to read the source file: + Impossible de lire le fichier source: + + + + File truncated during the read, possible data change + Fichier tronqué lors de la lecture, modification possible des données + + + + RenamingRules + + + First renaming + Premier renommage + + + + %name% - copy%suffix% + %name% should not be translated + %name% - copie%suffix% + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + %name% - copie (%number%)%suffix% + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> pour le nom original, <span style=" font-weight:600;">%number%</span> pour le numero extra, <span style=" font-weight:600;">%suffix%</span> suffix</p></body></html> + + + + Second renaming + Second renommage + + + + Renaming rules + Règles de renommage + + + + + %1 - copy%2 + %1 - copie%2 + + + + + %1 - copy (%2)%3 + %1 - copie (%2) {1 ?} {2)%3?} + + + + ScanFileOrFolder + + + + %1 - copy + %1 - copie + + + + + %1 - copy (%2) + %1 - copie (%2) + + + + + %name% - copy + %name% - copie + + + + + %name% - copy (%number%) + %name% - copie (%number%) + + + + + Problem with folder read + Probléme avec la lecture du dossier + + + + TransferThread + + + %name% - copy%suffix% + %name% - copie%suffix% + + + + %name% - copy (%number%)%suffix% + %name% - copie (%number%)%suffix% + + + + + File not found + Fichier non trouvé + + + + Try rename with using special characters + Essaie de renommage avec caratéres interdits + + + + + Unable to change the date + Impossible de changer la date + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + Mauvaise date de modification ou impossible de l'avoir, vous pouvez désactiver le transfert de celui-ci + + + + + Unable to create the destination folder: + Impossible de créer le dossier de destination: + + + + + Unable to create the destination folder, errno: %1 + Impossible de créer le dossier de destination, errno: %1 + + + + WriteThread + + + Path resolution error (Empty path) + Erreur de résolution de chemin (chemin vide) + + + + + Unable to create the destination folder: + Impossible de créer le dossier de destination: + + + + + Unable to create the destination folder, errno: %1 + Impossible de créer le dossier de destination, errno: %1 + + + + Internal error, please report it! + Erreur interne, veuillez la signaler! + + + + copyEngineOptions + + + Transfer + Transfert + + + + Move the whole folder + Déplacer le dossier complet + + + + Transfer the file rights + Transférer les droits des fichiers + + + + Keep the file date + Garder la date du fichier + + + + Create full path if not exists + Créer le dossier complet si il n'existe pas + + + + Checksum + Somme de contrôle + + + + Auto start + Démarrage automatique + + + + Error and collision + Erreur et collision + + + + When folder error + En cas d'erreur de répertoire + + + + When file error + En cas d'erreur de fichier + + + + When file collision + En cas de collision de fichier + + + + Overwrite if not same size + Écraser si pas la même taille + + + + Overwrite if modification date differs + Écraser si les dates différes + + + + When folder collision + Lors d'une collision de dossier + + + + Check if destination folder exists + Vérifier si le répertoire de destination existe + + + + Renaming rules + Règles de renommage + + + + Delete partially transferred files + Supprimer les transferts partiels + + + + Rename the original destination + Renommer la destination originale + + + + Performance + Performance + + + + Inode threads + Threads d'inodes + + + + + MB + + + + + Uncheck this under Windows create problem + Décochez ceci sous Windows créer un problème + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + Divers + + + + Check the disk space + Vérifier l'espace disque + + + + Use this folder when destination is not set + Utiliser ce dossier quand la destination n'est pas défini + + + + Browse + Parcourir + + + + Filters + Filtres + + + + fileErrorDialog + + + Error with file + Erreur avec un fichier + + + + Error + Erreur + + + + Size + Taille + + + + Modified + Modifié + + + + File name + Nom de fichier + + + + Destination + Destination + + + + Folder + Dossier + + + + &Always perform this action + &Toujours faire cette action + + + + Try in with elevated privileges + Essayer avec des priviléges suppérieurs + + + + Put to bottom + Mettre à la fin + + + + Retry + Réessayer + + + + &Skip + &Passer + + + + &Cancel + &Annuler + + + + fileExistsDialog + + + The file exists + Le fichier existe + + + + Source + Source + + + + Destination + Destination + + + + + Size + Taille + + + + + Modified + Modifié + + + + + File name + Nom de fichier + + + + + Folder + Dossier + + + + Suggest new &name + Suggérer un &nouveau nom + + + + &Always perform this action + &Toujours faire cette action + + + + + Overwrite if modification date differs + Écraser si les dates différes + + + + + Overwrite if not same size + Écraser si pas la même taille + + + + + Overwrite if not same size and date + Remplacer si ce n'est pas la même taille et la même date + + + + &Rename + &Renommer + + + + &Overwrite + &Écraser + + + + &Skip + &Passer + + + + &Cancel + &Annuler + + + + Overwrite if newer + Écraser si plus récent + + + + + Overwrite if older + Écraser si plus vieux + + + + fileIsSameDialog + + + Size + Taille + + + + Modified + Modifié + + + + File name + Nom de fichier + + + + The source and destination are same + La source et la destination sont identique + + + + Folder + Dossier + + + + Suggest new &name + Suggérer un &nouveau nom + + + + &Always perform this action + &Toujours faire cette action + + + + &Rename + &Renommer + + + + &Skip + &Passer + + + + &Cancel + &Annuler + + + + folderExistsDialog + + + Source + Source + + + + Destination + Destination + + + + The source and destination is identical + La source et la destination sont identique + + + + + Modified + Modifié + + + + + Folder name + Nom de répertoire + + + + + Folder + Dossier + + + + Suggest new &name + Suggérer un &nouveau nom + + + + &Always perform this action + &Toujours faire cette action + + + + &Rename + &Renommer + + + + Merge + Fusionner + + + + Skip + Passer + + + + &Cancel + &Annuler + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.qm new file mode 100755 index 0000000..6b6a991 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.ts new file mode 100755 index 0000000..b7dde65 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + A motort mozgatásra kényszerítik, nem másolhatsz vele + + + + + The engine is forced to copy, you can't move with it + A motort másolásra kényszerítik, nem mozgathatsz vele + + + + Destination + Cél + + + + Use the actual destination "%1"? + Használja a jelenlegi célt: "%1"? + + + + The mode has been forced previously. This is an internal error, please report it + Ezt a módot már korábban kényszerítették. Belső hiba történt, kérlek jelentsd be + + + + + + + Ask + Kérdezzen rá + + + + + + + Skip + Kihagy + + + + Merge + Összeolvaszt + + + + + Rename + Nevezze át + + + + Put at the end + Helyezze a végére + + + + Overwrite + Felülír + + + + Overwrite if different + Felülír, ha különbözik + + + + Overwrite if newer + Felülír, ha újabb + + + + Overwrite if older + Felülír, ha régebbi + + + + Options error + Beállítási hiba + + + + Options engine is not loaded. Unable to access the filters + A beállítási motor nincs betöltve. A szűrők elérése nem lehetséges + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + Kérdezzen rá + + + + + + + Skip + Kihagy + + + + Merge + Összeolvaszt + + + + + Rename + Nevezze át + + + + Put at the end + Helyezze a végére + + + + Overwrite + Felülír + + + + Overwrite if different + Felülír, ha különbözik + + + + Overwrite if newer + Felülír, ha újabb + + + + Overwrite if older + Felülír, ha régebbi + + + + + Options error + Beállítási hiba + + + + Options engine is not loaded. Unable to access the filters + A beállítási motor nincs betöltve. A szűrők elérése nem lehetséges + + + + Options engine is not loaded, can't access to the filters + A beállítási motor nincs betöltve, a szűrők elérése nem lehetséges + + + + DiskSpace + + + Disk space + Lemezterület + + + + You need more space on this drive to finish this transfer + Több szabad helyre van szükséged ezen a lemezen az átvitel befejezéséhez + + + + Continue + Folytatás + + + + Cancel + Mégse + + + + Drives %1 have %2 available but need %3 + %1 meghajtón %2 hely van, de %3 szükséges + + + + FileErrorDialog + + + Error on folder + Hiba a mappával + + + + Folder name + Mappa neve + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + Hiba + + + + Try rename with using special characters + Átnevezés speciális karakterek használatával + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + Hiba + + + + Try rename with using special characters + Átnevezés speciális karakterek használatával + + + + FilterRules + + + Filters dialog + Szűrők üzenet + + + + Search: + Keresés: + + + + Search type: + Keresés típusa: + + + + Raw text + Nyers szöveg + + + + Simplified regex + Egyszerűsített regex + + + + Perl's regex + Perl regex + + + + Apply on: + Alkalmazás ezen: + + + + File + Fájl + + + + Folder + Mappa + + + + File and folder + Fájl és mappa + + + + Whole string must match + A teljes szövegnek egyeznie kell + + + + The test string matches with the regex + A tesztszöveg megegyezik a regexszel + + + + Checking + Ellenőrzés + + + + The regex is valid + A regex érvényes + + + + Test string: + Próbaszöveg: + + + + Filters + + + Filters + Szűrők + + + + Exclusion filters + Kizáró szűrők + + + + Inclusion filters + Használt szűrők + + + + None = Include all + Nincs = Mindet használ + + + + + Raw text + Nyers szöveg + + + + + Simplified regex + Egyszerűsített regex + + + + + Perl's regex + Perl regex + + + + + Only on file + Csak fájlon + + + + + Only on folder + Csak mappán + + + + + + + Full match + Teljes egyezés + + + + FolderExistsDialog + + + Folder already exists + Mappa már létezik + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + Hiba + + + + Try rename with using special characters + Átnevezés speciális karakterek használatával + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + Elem másolása vagy mozgatás nem lehetséges a hibás kényszerített módban: %1 + + + + + Unable to save the transfer list: %1 + Átviteli lista mentése nem lehetséges: %1 + + + + Problem reading file, or file-size is 0 + Hiba a fájl olvasásánál vagy a fálméret 0 + + + + Wrong header: "%1" + Hibás fejléc: "%1" + + + + The transfer list is in mixed mode, but this instance is not in this mode + Az átviteli lista kevert módban van, de ez a példány nincs + + + + The transfer list is in copy mode, but this instance is not in this mode + Az átviteli lista másolás módban van, de ez a példány nincs + + + + The transfer list is in move mode, but this instance is not in this mode + Az átviteli lista mozgatás módban van, de ez a példány nincs + + + + Some errors have been found during the line parsing + Néhány hiba történt a sorelemzés során + + + + Unable to open the transfer list: %1 + Az átviteli lista megnyitása nem lehetséges: %1 + + + + MkPath + + + + Unable to create the folder + Mappa létrehozása nem lehetséges + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + Eltávolítás nem lehetséges + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + Renaming rules + Átnevezési szabályok + + + + First renaming + Első átnevezés + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + Második átnevezés + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + %1 - másolás (%2) {1 ?} {2)%3?} + + + + ScanFileOrFolder + + + + %1 - copy + %1 - másolás + + + + + %1 - copy (%2) + %1 - másolás (%2) + + + + + %name% - copy + %name% - másolás + + + + + %name% - copy (%number%) + %name% - másolás (%number%) + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + Fájl nem található + + + + Try rename with using special characters + Átnevezés speciális karakterek használatával + + + + + Unable to change the date + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + Átvitel + + + + Move the whole folder + Mozgassa át az egész mappát + + + + Transfer the file rights + Fájljogok átadása + + + + Keep the file date + Fájl dátumának megtartása + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + Hiba és ütközés + + + + When folder error + Mappa hiba esetén + + + + When file error + Fájl hiba esetén + + + + When file collision + Fájl ütközés esetén + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + Felülír, ha a módosítás dátuma különbözik + + + + When folder collision + Mappa ütközés esetén + + + + Check if destination folder exists + Célmappa létezésének ellenőrzése + + + + Renaming rules + Átnevezési szabályok + + + + Delete partially transferred files + Részben átvitt fájlok törlése + + + + Rename the original destination + Eredeti cél átnevezése + + + + Performance + Teljesítmény + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + Egyéb + + + + Check the disk space + Lemezterület ellenőrzése + + + + Use this folder when destination is not set + + + + + Browse + Tallózás + + + + Filters + Szűrők + + + + fileErrorDialog + + + Error with file + Hiba a fájllal + + + + Error + Hiba + + + + Size + Méret + + + + Modified + Módosítva + + + + File name + Fájlnév + + + + Destination + Cél + + + + Folder + Mappa + + + + &Always perform this action + &Mindig hajtsa végre ezt a műveletet + + + + Try in with elevated privileges + Próbálja meg emelt jogosultsággal + + + + Put to bottom + Tegye legalulra + + + + Retry + Újra + + + + &Skip + &Kihagy + + + + &Cancel + M&égse + + + + fileExistsDialog + + + The file exists + A fájl létezik + + + + Source + Forrás + + + + Destination + Cél + + + + + Size + Méret + + + + + Modified + Módosítva + + + + + File name + Fájlnév + + + + + Folder + Mappa + + + + Suggest new &name + Új &név ajánlása + + + + &Always perform this action + &Mindig hajtsa végre ezt a műveletet + + + + + Overwrite if modification date differs + Felülír, ha a módosítás dátuma különbözik + + + + + Overwrite if older + Felülír, ha régebbi + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + &Átnevez + + + + &Overwrite + &Felülír + + + + &Skip + &Kihagy + + + + &Cancel + &Mégse + + + + Overwrite if newer + Felülír, ha újabb + + + + fileIsSameDialog + + + Size + Méret + + + + Modified + Módosítva + + + + File name + Fájlnév + + + + The source and destination are same + A forrás és a cél megegyezik + + + + Folder + Mappa + + + + Suggest new &name + Új &név javasolása + + + + &Always perform this action + &Mindig hajtsa végre ezt a műveletet + + + + &Rename + &Átnevez + + + + &Skip + &Kihagy + + + + &Cancel + M&égse + + + + folderExistsDialog + + + Source + Forrás + + + + Destination + Cél + + + + + Modified + Módosítva + + + + + Folder name + Mappa neve + + + + Suggest new &name + Új &név javasolása + + + + The source and destination is identical + A forrás és a cél megegyezik + + + + + Folder + Mappa + + + + &Always perform this action + &Mindig hajtsa végre ezt a műveletet + + + + &Rename + &Átnevez + + + + Merge + Összeolvaszt + + + + Skip + Kihagy + + + + &Cancel + M&égse + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.qm new file mode 100755 index 0000000..5090866 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.ts new file mode 100644 index 0000000..bedc49e --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.ts @@ -0,0 +1,1150 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + Impossibile copiare, il motore di copia forzerà lo spostamento + + + + + The engine is forced to copy, you can't move with it + Impossibile effettuare lo spostamento, il motore di copia forzerà la copia + + + + Destination + Percorso di destinazione + + + + Use the actual destination "%1"? + Usare l'attuale destinazione? "%1" + + + + The mode has been forced previously. This is an internal error, please report it + La modalità è stata forzata precedentemente. Questo è un errore interno, si prega di riportatelo + + + + + + + Ask + Chiedi + + + + + + + Skip + Salta + + + + Merge + Unisci + + + + + Rename + Rinomina + + + + Put at the end + Metti in coda + + + + Overwrite + Sovrascrivi + + + + Overwrite if different + Sovrascrivi se differente + + + + Overwrite if newer + Sovrascrivi se più recente + + + + Overwrite if older + Sovrascrivi se meno recente + + + + Options error + Errore opzioni + + + + Options engine is not loaded. Unable to access the filters + Motore delle opzioni non caricato. Impossibile accedere ai filtri + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + Chiedi + + + + + + + Skip + Salta + + + + Merge + Unisci + + + + + Rename + Rinomina + + + + Put at the end + Metti in coda + + + + Overwrite + Sovrascrivi + + + + Overwrite if different + Sovrascrivi se differente + + + + Overwrite if newer + Sovrascrivi se più recente + + + + Overwrite if older + Sovrascrivi se meno recente + + + + + Options error + Errore opzioni + + + + Options engine is not loaded. Unable to access the filters + Motore delle opzioni non caricato. Impossibile accedere ai filtri + + + + Options engine is not loaded, can't access to the filters + Le opzioni del motore di copia non sono state caricate. Impossibile accedere ai filtri + + + + DiskSpace + + + Disk space + Spazio su disco + + + + You need more space on this drive to finish this transfer + Hai bisogno di più spazio su questo disco per finire il trasferimento + + + + Continue + Continua + + + + Cancel + Annulla + + + + Drives %1 have %2 available but need %3 + L'unità %1 ha %2 disponibili, ma necessita di %3 + + + + FileErrorDialog + + + Error on folder + Errore con la cartella + + + + Folder name + Nome cartella + + + + FileExistsDialog + + + %name% - copy%suffix% + Copia di %name% %suffix% + + + + %name% - copy (%number%)%suffix% + Copia di %name% (%number%) %suffix% + + + + Error + Errore + + + + Try rename with using special characters + Tenta ridenominazione usando caratteri speciali + + + + FileIsSameDialog + + + %name% - copy%suffix% + Copia di %name% %suffix% + + + + %name% - copy (%number%)%suffix% + Copia di %name% (%number%) %suffix% + + + + Error + Errore + + + + Try rename with using special characters + Tenta ridenominazione usando caratteri speciali + + + + FilterRules + + + Search: + Cerca: + + + + Search type: + Cerca tipologia: + + + + Raw text + Testo nudo + + + + Simplified regex + Espressione regolare semplificata + + + + Perl's regex + Espressione regolare in Perl + + + + Apply on: + Applicare a: + + + + File + File + + + + Folder + Cartella + + + + File and folder + File e cartelle + + + + The test string matches with the regex + La stringa di prova combacia con l'espressione regolare + + + + Checking + Verifica + + + + Test string: + Stringa di verifica: + + + + Filters dialog + Finestra dialogo dei filtri + + + + Whole string must match + L'intera stringa deve combaciare + + + + The regex is valid + L'espressione regolare è valida + + + + Filters + + + Filters + Filtri + + + + Exclusion filters + Filtri di esclusione + + + + Inclusion filters + Filtri di inclusione + + + + None = Include all + Nessuno = Includi tutti + + + + + Raw text + Testo nudo + + + + + Simplified regex + Espressione regolare semplificata + + + + + Perl's regex + Espressione regolare in Perl + + + + + Only on file + Solamente su file + + + + + Only on folder + Solamente su cartella + + + + + + + Full match + Corrispondenza completa + + + + FolderExistsDialog + + + Folder already exists + Cartella già presente + + + + %name% - copy%suffix% + Copia di %name% %suffix% + + + + %name% - copy (%number%)%suffix% + Copia di %name% (%number%) %suffix% + + + + Error + Errore + + + + Try rename with using special characters + Tenta ridenominazione usando caratteri speciali + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + Impossibile spostare o copiare elementi in modalità forzata anomala: %1 + + + + + Unable to save the transfer list: %1 + Impossibile salvare la lista di trasferimento %1 + + + + Problem reading file, or file-size is 0 + Problema durante la lettura del file o dimensione file nulla + + + + Wrong header: "%1" + Intestazione errata: "%1" + + + + The transfer list is in mixed mode, but this instance is not in this mode + La lista di trasferimento è in modalità mista ma questa istanza non lo è + + + + The transfer list is in copy mode, but this instance is not in this mode + La lista di trasferimento è in modalità copia ma questa istanza non lo è + + + + The transfer list is in move mode, but this instance is not in this mode + La lista di trasferimento è in modalità spostamento ma questa istanza non lo è + + + + Some errors have been found during the line parsing + Alcuni errori rilevati durante l'analisi di linea + + + + Unable to open the transfer list: %1 + Impossibile aprire lista di trasferimento %1 + + + + MkPath + + + + Unable to create the folder + Impossibile creare la cartella + + + + The source folder don't exists + La cartella di origine non esiste + + + + Unable to temporary rename the folder + Impossibile ridenominare temporaneamente la cartella + + + + Unable to do the final real move the folder + Impossibile fare il vero spostamento finale della cartella + + + + Unable to move the folder + Impossibile spostare la cartella + + + + Unable to move the folder: errno: %1 + Impossibile spostare la cartella: errore %1 + + + + + Unable to remove + Impossibile eliminare + + + + ReadThread + + + Internal error, please report it! + Errore interno, si prega di riportarlo! + + + + Unable to read the source file: + Impossibile leggere file di origine: + + + + File truncated during the read, possible data change + File troncato durante la lettura. Possibile cambio dati + + + + RenamingRules + + + First renaming + Prima ridenominazione + + + + %name% - copy%suffix% + %name% should not be translated + %name% non dovrà essere tradotto + Copia di %name% %suffix% + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + %name%, %number% non dovranno essere tradotti + Copia di %name% (%number%) %suffix% + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + %name%, %number% non dovranno essere tradotti + <html><head/><body><p>Variabili: <span style=" font-weight:600;">%name%</span> per il nome file originale, <span style=" font-weight:600;">%number%</span> per il numero extra, <span style=" font-weight:600;">%suffix%</span> Suffisso file</p></body></html> + + + + Second renaming + Seconda ridenominazione + + + + Renaming rules + Regole di ridenominazione + + + + + %1 - copy%2 + Copia di %1 %2 + + + + + %1 - copy (%2)%3 + Copia di %1 (%2) %3 + + + + ScanFileOrFolder + + + + %1 - copy + Copia di %1 + + + + + %1 - copy (%2) + Copia di %1 (%2) + + + + + %name% - copy + Copia di %name% + + + + + %name% - copy (%number%) + Copia di %name% (%number%) + + + + + Problem with folder read + Problema con la lettura della cartella + + + + TransferThread + + + %name% - copy%suffix% + Copia di %name% %suffix% + + + + %name% - copy (%number%)%suffix% + Copia di %name% (%number%) %suffix% + + + + + File not found + File non trovato + + + + Try rename with using special characters + Tenta ridenominazione usando caratteri speciali + + + + + Unable to change the date + Impossibile cambiare data + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + Data di modifica sbagliata o impossibile ottenerla, potete disabilitare l'orario di trasferimento per procedere + + + + + Unable to create the destination folder: + Impossibile creare cartella di destinazione: + + + + + Unable to create the destination folder, errno: %1 + Impossibile creare cartella di destinazione, error %1 + + + + WriteThread + + + Path resolution error (Empty path) + Errore di risoluzione percorso (vuoto) + + + + + Unable to create the destination folder: + Impossibile creare cartella di destinazione: + + + + + Unable to create the destination folder, errno: %1 + Impossibile creare cartella di destinazione, errore %1 + + + + Internal error, please report it! + Errore interno, si prega di riportarlo! + + + + copyEngineOptions + + + Transfer + Trasferimento + + + + Move the whole folder + Spostare intera cartella + + + + Transfer the file rights + Trasferire autorizzazioni dei file + + + + Keep the file date + Mantenere date dei file + + + + Create full path if not exists + Creare percorso completo se non esistente + + + + Checksum + Checksum + + + + Auto start + Avvio automatico + + + + Error and collision + Errori di coincidenze + + + + When folder error + Quando si verifica errore nelle cartelle + + + + When file error + Quando si verifica errore nei file + + + + When file collision + Quando i file coincidono + + + + Overwrite if not same size + Sovrascrivere se dimensione differisce + + + + Overwrite if modification date differs + Sovrascrivere se data di modifica differisce + + + + When folder collision + Quando le cartelle coincidono + + + + Check if destination folder exists + Controllare esistenza cartella di destinazione + + + + Renaming rules + Regole di ridenominazione + + + + Delete partially transferred files + Eliminare i file parzialmente trasferiti + + + + Rename the original destination + Ridenominare destinazione all'origine + + + + Performance + Prestazioni + + + + Inode threads + Numero thread inode + + + + + MB + + + + + Uncheck this under Windows create problem + Deselezionare ciò su Windows causa problemi + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + Varie + + + + Check the disk space + Controllare spazio su disco + + + + Use this folder when destination is not set + Usare questa cartella quando la destinazione non è impostata + + + + Browse + Sfoglia + + + + Filters + Filtri + + + + fileErrorDialog + + + Error with file + Errore con file + + + + Error + Errore + + + + Size + Dimensione + + + + Modified + Modificato + + + + File name + Nome file + + + + Destination + Destinazione + + + + Folder + Cartelle + + + + &Always perform this action + Esegui sempre questa azione + + + + Try in with elevated privileges + Tenta con privilegi superiori + + + + Put to bottom + Metti in coda + + + + Retry + Riprova + + + + &Skip + Salta + + + + &Cancel + Annulla + + + + fileExistsDialog + + + The file exists + File è già presente + + + + Source + Origine + + + + Destination + Destinazione + + + + + Size + Dimensione + + + + + Modified + Modificato + + + + + File name + Nome file + + + + + Folder + Cartelle + + + + Suggest new &name + Suggerisci nuovo nome + + + + &Always perform this action + Esegui sempre questa azione + + + + + Overwrite if modification date differs + Sovrascrivere se data di modifica differisce + + + + + Overwrite if not same size + Sovrascrivere se dimensione differisce + + + + + Overwrite if not same size and date + Sovrascrivere se dimensione e data differiscono + + + + &Rename + Rinomina + + + + &Overwrite + Sovrascrivi + + + + &Skip + Salta + + + + &Cancel + Annulla + + + + Overwrite if newer + Sovrascrivi se più recente + + + + + Overwrite if older + Sovrascrivi se meno recente + + + + fileIsSameDialog + + + Size + Dimensione + + + + Modified + Modificato + + + + File name + Nome file + + + + The source and destination are same + Origine e destinazioni sono identiche + + + + Folder + Cartelle + + + + Suggest new &name + Suggerisci nuovo nome + + + + &Always perform this action + Esegui sempre questa azione + + + + &Rename + Rinomina + + + + &Skip + Salta + + + + &Cancel + Annulla + + + + folderExistsDialog + + + Source + Origine + + + + Destination + Destinazione + + + + The source and destination is identical + Origine e destinazioni sono identiche + + + + + Modified + Modificato + + + + + Folder name + Nome cartella + + + + + Folder + Cartelle + + + + Suggest new &name + Suggerisci nuovo nome + + + + &Always perform this action + Esegui sempre questa azione + + + + &Rename + Rinomina + + + + Merge + Unisci + + + + Skip + Salta + + + + &Cancel + Annulla + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.ts new file mode 100755 index 0000000..a771060 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Filters dialog + + + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + Whole string must match + + + + + The test string matches with the regex + + + + + Checking + + + + + The regex is valid + + + + + Test string: + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + Renaming rules + + + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.qm new file mode 100755 index 0000000..5bec6b9 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.ts new file mode 100755 index 0000000..f8a23f8 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + 대상 + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + 확인 + + + + + + + Skip + 건너뛰기 + + + + Merge + 합치기 + + + + + Rename + 이름 바꾸기 + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + 더 최신이면 덮어씌우기 + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + 확인 + + + + + + + Skip + 건너뛰기 + + + + Merge + 합치기 + + + + + Rename + 이름 바꾸기 + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + 더 최신이면 덮어씌우기 + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + 폴더 이름 + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + 오류 + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + 오류 + + + + Try rename with using special characters + + + + + FilterRules + + + Filters dialog + + + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + Whole string must match + + + + + The test string matches with the regex + + + + + Checking + + + + + The regex is valid + + + + + Test string: + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + 오류 + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + 폴더를 생성할 수 없습니다 + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + Renaming rules + + + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + 파일 권한 전송 + + + + Keep the file date + 파일 날짜 보존 + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + 폴더 오류시 + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + 폴더 충돌시 + + + + Check if destination folder exists + 대상 폴드 존재시 확인 + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + 오류 + + + + Size + 크기 + + + + Modified + 수정 날짜 + + + + File name + 파일 이름 + + + + Destination + 대상 + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + 아래에 놓기 + + + + Retry + 재시도 + + + + &Skip + &건너뛰기 + + + + &Cancel + &취소 + + + + fileExistsDialog + + + The file exists + 파일이 존재합니다 + + + + Source + 원본 + + + + Destination + 대상 + + + + + Size + 크기 + + + + + Modified + 수정 날짜 + + + + + File name + 파일 이름 + + + + + Folder + + + + + Suggest new &name + 새 &이름 제안 + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + &이름 바꾸기 + + + + &Overwrite + &덮어씌우기 + + + + &Skip + &건너뛰기 + + + + &Cancel + &취소 + + + + Overwrite if newer + 더 최신이면 덮어씌우기 + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + 크기 + + + + Modified + 수정 날짜 + + + + File name + 파일 이름 + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + 새 &이름 제안 + + + + &Always perform this action + + + + + &Rename + &이름 바꾸기 + + + + &Skip + &건너뛰기 + + + + &Cancel + &취소 + + + + folderExistsDialog + + + Source + 원본 + + + + Destination + 대상 + + + + The source and destination is identical + + + + + + Modified + 수정 날짜 + + + + + Folder name + 폴더 이름 + + + + + Folder + + + + + Suggest new &name + 새 &이름 제안 + + + + &Always perform this action + + + + + &Rename + &이름 바꾸기 + + + + Merge + 합치기 + + + + Skip + 건너뛰기 + + + + &Cancel + &취소 + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.qm new file mode 100755 index 0000000..a1f6180 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.ts new file mode 100755 index 0000000..2115820 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + Двигатель вынуждены покинуть свои дома, вы не можете скопировать с ним + + + + + The engine is forced to copy, you can't move with it + Двигатель вынужден копии, вы не можете двигаться вместе с ним + + + + Destination + назначение + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + просить + + + + + + + Skip + пропускать + + + + Merge + слияние + + + + + Rename + переименовать + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + Заменить, если новее + + + + Overwrite if older + + + + + Options error + Опции ошибке + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + просить + + + + + + + Skip + пропускать + + + + Merge + слияние + + + + + Rename + переименовать + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + Заменить, если новее + + + + Overwrite if older + + + + + + Options error + Опции ошибке + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + Параметры двигателя не загружается, не может получить доступ к фильтрам + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + Ошибка в папку + + + + Folder name + имя папки + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + ошибка + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + ошибка + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + Поиск по сайту: + + + + Search type: + Тип поиска: + + + + Raw text + Сырой текст + + + + Simplified regex + упрощенный regex + + + + Perl's regex + Perl's regex + + + + Apply on: + Нанесите на: + + + + File + файл + + + + Folder + папка + + + + File and folder + Файлов и папок + + + + The test string matches with the regex + + + + + Checking + контроль + + + + Test string: + Испытание строки: + + + + Filters dialog + Фильтры диалогового + + + + Whole string must match + + + + + The regex is valid + Регулярное действует + + + + Filters + + + Filters + Фильтры + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + Ни = Включить все + + + + + Raw text + Сырой текст + + + + + Simplified regex + Упрощенная регулярных выражений + + + + + Perl's regex + Perl's regex + + + + + Only on file + Только на файл + + + + + Only on folder + Только на папку + + + + + + + Full match + Полный матч + + + + FolderExistsDialog + + + Folder already exists + Папка уже существует + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + ошибка + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + Невозможно сделать, чтобы скопировать или переместить элемент в неправильном форсированном режиме: %1 + + + + + Unable to save the transfer list: %1 + Невозможно сохранить трансфер: %1 + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + Неправильный заголовок: "%1" + + + + The transfer list is in mixed mode, but this instance is not in this mode + Трансфер в смешанном режиме, но этот экземпляр не в этом режиме + + + + The transfer list is in copy mode, but this instance is not in this mode + Передача списка в режиме копирования, но этот экземпляр не в этом режиме + + + + The transfer list is in move mode, but this instance is not in this mode + Трансфер в режим перемещения, но этот экземпляр не в этом режиме + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + Не удается открыть трансфер: %1 + + + + MkPath + + + + Unable to create the folder + Невозможно создать папку + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + Первое переименование + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + Второе переименование + + + + Renaming rules + Переименование правила + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + %1 - копия (%2) {1 ?} {2)%3?} + + + + ScanFileOrFolder + + + + %1 - copy + %1 - копия + + + + + %1 - copy (%2) + %1 - копия (%2) + + + + + %name% - copy + %name% - копия + + + + + %name% - copy (%number%) + %name% - копия (%number%) + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + Передача файлов прав + + + + Keep the file date + Держите дату файла + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + Когда папка ошибка + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + Когда папка столкновения + + + + Check if destination folder exists + Убедитесь, что папка существует + + + + Renaming rules + Переименование правила + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + Фильтры + + + + fileErrorDialog + + + Error with file + + + + + Error + ошибка + + + + Size + размер + + + + Modified + модифицированный + + + + File name + имя файла + + + + Destination + назначение + + + + Folder + папка + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + Положить в нижней + + + + Retry + Повторить + + + + &Skip + пропускать + + + + &Cancel + отменить + + + + fileExistsDialog + + + The file exists + Файл существует + + + + Source + источник + + + + Destination + назначение + + + + + Size + размер + + + + + Modified + модифицированный + + + + + File name + имя файла + + + + + Folder + папка + + + + Suggest new &name + Предложить новое имя + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + переименовать + + + + &Overwrite + переписывать + + + + &Skip + пропускать + + + + &Cancel + отменить + + + + Overwrite if newer + Заменить, если новее + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + размер + + + + Modified + модифицированный + + + + File name + имя файла + + + + The source and destination are same + + + + + Folder + папка + + + + Suggest new &name + Предложить новое имя + + + + &Always perform this action + + + + + &Rename + переименовать + + + + &Skip + пропускать + + + + &Cancel + отменить + + + + folderExistsDialog + + + Source + источник + + + + Destination + назначение + + + + The source and destination is identical + + + + + + Modified + модифицированный + + + + + Folder name + имя папки + + + + + Folder + папка + + + + Suggest new &name + Предложить новое имя + + + + &Always perform this action + + + + + &Rename + переименовать + + + + Merge + слияние + + + + Skip + пропускать + + + + &Cancel + отменить + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + The test string matches with the regex + + + + + Checking + + + + + Test string: + + + + + Filters dialog + + + + + Whole string must match + + + + + The regex is valid + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + Renaming rules + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.qm differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.ts new file mode 100755 index 0000000..a771060 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.ts @@ -0,0 +1,1147 @@ + + + + + CopyEngine + + + + The engine is forced to move, you can't copy with it + + + + + + The engine is forced to copy, you can't move with it + + + + + Destination + + + + + Use the actual destination "%1"? + + + + + The mode has been forced previously. This is an internal error, please report it + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + CopyEngineFactory + + + Supported only on Windows + + + + + + + + Ask + + + + + + + + Skip + + + + + Merge + + + + + + Rename + + + + + Put at the end + + + + + Overwrite + + + + + Overwrite if different + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + + Options error + + + + + Options engine is not loaded. Unable to access the filters + + + + + Options engine is not loaded, can't access to the filters + + + + + DiskSpace + + + Disk space + + + + + You need more space on this drive to finish this transfer + + + + + Continue + + + + + Cancel + + + + + Drives %1 have %2 available but need %3 + + + + + FileErrorDialog + + + Error on folder + + + + + Folder name + + + + + FileExistsDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FileIsSameDialog + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + FilterRules + + + Filters dialog + + + + + Search: + + + + + Search type: + + + + + Raw text + + + + + Simplified regex + + + + + Perl's regex + + + + + Apply on: + + + + + File + + + + + Folder + + + + + File and folder + + + + + Whole string must match + + + + + The test string matches with the regex + + + + + Checking + + + + + The regex is valid + + + + + Test string: + + + + + Filters + + + Filters + + + + + Exclusion filters + + + + + Inclusion filters + + + + + None = Include all + + + + + + Raw text + + + + + + Simplified regex + + + + + + Perl's regex + + + + + + Only on file + + + + + + Only on folder + + + + + + + + Full match + + + + + FolderExistsDialog + + + Folder already exists + + + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + Error + + + + + Try rename with using special characters + + + + + ListThread + + + + Unable do to move or copy item into wrong forced mode: %1 + + + + + + Unable to save the transfer list: %1 + + + + + Problem reading file, or file-size is 0 + + + + + Wrong header: "%1" + + + + + The transfer list is in mixed mode, but this instance is not in this mode + + + + + The transfer list is in copy mode, but this instance is not in this mode + + + + + The transfer list is in move mode, but this instance is not in this mode + + + + + Some errors have been found during the line parsing + + + + + Unable to open the transfer list: %1 + + + + + MkPath + + + + Unable to create the folder + + + + + The source folder don't exists + + + + + Unable to temporary rename the folder + + + + + Unable to do the final real move the folder + + + + + Unable to move the folder + + + + + Unable to move the folder: errno: %1 + + + + + + Unable to remove + + + + + ReadThread + + + Internal error, please report it! + + + + + Unable to read the source file: + + + + + File truncated during the read, possible data change + + + + + RenamingRules + + + Renaming rules + + + + + First renaming + + + + + %name% - copy%suffix% + %name% should not be translated + + + + + %name% - copy (%number%)%suffix% + %name%, %number% should not be translated + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + %name%, %number% should not be translated + + + + + Second renaming + + + + + + %1 - copy%2 + + + + + + %1 - copy (%2)%3 + + + + + ScanFileOrFolder + + + + %1 - copy + + + + + + %1 - copy (%2) + + + + + + %name% - copy + + + + + + %name% - copy (%number%) + + + + + + Problem with folder read + + + + + TransferThread + + + %name% - copy%suffix% + + + + + %name% - copy (%number%)%suffix% + + + + + + File not found + + + + + + Unable to change the date + + + + + Try rename with using special characters + + + + + TransferThreadAsync + + + Wrong modification date or unable to get it, you can disable time transfer to do it + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + WriteThread + + + Path resolution error (Empty path) + + + + + + Unable to create the destination folder: + + + + + + Unable to create the destination folder, errno: %1 + + + + + Internal error, please report it! + + + + + copyEngineOptions + + + Transfer + + + + + Move the whole folder + + + + + Transfer the file rights + + + + + Keep the file date + + + + + Create full path if not exists + + + + + Checksum + + + + + Auto start + + + + + Error and collision + + + + + When folder error + + + + + When file error + + + + + When file collision + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + When folder collision + + + + + Check if destination folder exists + + + + + Renaming rules + + + + + Delete partially transferred files + + + + + Rename the original destination + + + + + Performance + + + + + Inode threads + + + + + + MB + + + + + Uncheck this under Windows create problem + + + + + OS Buffer + + + + + Disable parallel transfer when are different devices + + + + + Buffer for different device + + + + + OS FLags + + + + + Buffer for same device + + + + + OS native copy (disable speed limitation) + + + + + Misc + + + + + Check the disk space + + + + + Use this folder when destination is not set + + + + + Browse + + + + + Filters + + + + + fileErrorDialog + + + Error with file + + + + + Error + + + + + Size + + + + + Modified + + + + + File name + + + + + Destination + + + + + Folder + + + + + &Always perform this action + + + + + Try in with elevated privileges + + + + + Put to bottom + + + + + Retry + + + + + &Skip + + + + + &Cancel + + + + + fileExistsDialog + + + The file exists + + + + + Source + + + + + Destination + + + + + + Size + + + + + + Modified + + + + + + File name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + + Overwrite if modification date differs + + + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + + + + &Rename + + + + + &Overwrite + + + + + &Skip + + + + + &Cancel + + + + + Overwrite if newer + + + + + + Overwrite if older + + + + + fileIsSameDialog + + + Size + + + + + Modified + + + + + File name + + + + + The source and destination are same + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + &Skip + + + + + &Cancel + + + + + folderExistsDialog + + + Source + + + + + Destination + + + + + The source and destination is identical + + + + + + Modified + + + + + + Folder name + + + + + + Folder + + + + + Suggest new &name + + + + + &Always perform this action + + + + + &Rename + + + + + Merge + + + + + Skip + + + + + &Cancel + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThread.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThread.cpp new file mode 100755 index 0000000..9c5e8f8 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThread.cpp @@ -0,0 +1,1235 @@ +#include "ListThread.h" +#include +#include +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" +#ifdef Q_OS_LINUX +#include +#endif +#ifdef Q_OS_WIN32 +#include +#endif + +ListThread::ListThread(FacilityInterface * facilityInterface) : + numberOfInodeOperation(0), + sourceDriveMultiple(false), + destinationDriveMultiple(false), + destinationFolderMultiple(false), + stopIt(false), + numberOfTransferIntoToDoList(0), + bytesToTransfer(0), + bytesTransfered(0), + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync(false), + #endif + idIncrementNumber(1), + actualRealByteTransfered(0), + checkDestinationFolderExists(false), + parallelizeIfSmallerThan(1024), + moveTheWholeFolder(false), + deletePartiallyTransferredFiles(true), + inodeThreads(1), + renameTheOriginalDestination(false), + checkDiskSpace(true), + buffer(false), + followTheStrictOrder(true), + mode(Ultracopier::CopyMode::Copy), + forcedMode(false), + actionToDoListTransfer_count(0), + actionToDoListInode_count(0), + doTransfer(false), + doInode(false), + oversize(0), + currentProgression(0), + copiedSize(0), + totalSize(0), + localOverSize(0), + doRightTransfer(false), + keepDate(false), + os_spec_flags(true), + native_copy(false), + mkFullPath(false), + alwaysDoThisActionForFileExists(FileExists_NotSet), + speedLimitation(0), + returnBoolToCopyEngine(true) +{ + moveToThread(this); + start(HighPriority); + this->facilityInterface=facilityInterface; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + clockForTheCopySpeed = NULL; + multiForBigSpeed = 0; + blockSize = 65536; + blockSizeAfterSpeedLimitation = blockSize; + #endif + putInPause = false; + autoStart=true; + + //can't be static into WriteThread, linked by instance then by ListThread + writeFileList=new QMultiHash(); + writeFileListMutex=new QMutex(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + if(!connect(&timerUpdateDebugDialog,&QTimer::timeout,this,&ListThread::timedUpdateDebugDialog)) + abort(); + timerUpdateDebugDialog.start(ULTRACOPIER_PLUGIN_DEBUG_WINDOW_TIMER); + #endif + if(!connect(this, &ListThread::tryCancel, this,&ListThread::cancel, Qt::QueuedConnection)) + abort(); + if(!connect(this, &ListThread::askNewTransferThread, this,&ListThread::createTransferThread, Qt::QueuedConnection)) + abort(); + if(!connect(&mkPathQueue, &MkPath::firstFolderFinish, this,&ListThread::mkPathFirstFolderFinish, Qt::QueuedConnection)) + abort(); + if(!connect(&mkPathQueue, &MkPath::errorOnFolder, this,&ListThread::mkPathErrorOnFolder, Qt::QueuedConnection)) + abort(); + if(!connect(this, &ListThread::send_syncTransferList, this,&ListThread::syncTransferList_internal, Qt::QueuedConnection)) + abort(); + if(!connect(this, &ListThread::exportTransferListSend, this,&ListThread::exportTransferListInternal, Qt::QueuedConnection)) + abort(); + if(!connect(this, &ListThread::importTransferListSend, this,&ListThread::importTransferListInternal, Qt::QueuedConnection)) + abort(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(&mkPathQueue, &MkPath::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection)) + abort(); + if(!connect(&driveManagement,&DriveManagement::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection)) + abort(); + #endif // ULTRACOPIER_PLUGIN_DEBUG + + emit askNewTransferThread(); + mkpathTransfer.release(); + + int64_t MBMem=100; + #ifdef Q_OS_WIN32 + MEMORYSTATUSEX memoryStatus; + if(GlobalMemoryStatusEx(&memoryStatus)) + MBMem=memoryStatus.ullTotalPhys/1024; + #endif + #ifdef Q_OS_LINUX + struct sysinfo info; + if(sysinfo(&info)==0) + MBMem=info.totalhigh*info.mem_unit/1024/1024; + #endif + if(MBMem<1024) + WriteThread::numberOfBlock=4+MBMem*0.12; + else + WriteThread::numberOfBlock=ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; +} + +ListThread::~ListThread() +{ + emit tryCancel(); + waitCancel.acquire(); + quit(); + wait(); +} + +//transfer is finished +void ListThread::transferInodeIsClosed() +{ + if(stopIt) + { + checkIfReadyToCancel(); + return; + } + numberOfInodeOperation--; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); + #endif + TransferThreadAsync *temp_transfer_thread=qobject_cast(QObject::sender()); + if(temp_transfer_thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); + return; + } + if(overCheckUsedThread.find(temp_transfer_thread)==overCheckUsedThread.cend()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located in overcheck"); + else + overCheckUsedThread.erase(temp_transfer_thread); + if(putAtBottomAfterError.find(temp_transfer_thread)!=putAtBottomAfterError.cend()) + { + doNewActions_inode_manipulation(); + doNewActions_start_transfer(); + return; + } + bool isFound=false; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + int countLocalParse=0; + #endif + if(temp_transfer_thread->getStat()!=TransferStat_Idle) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not idle!"); + return; + } + unsigned int int_for_internal_loop=0; + while(int_for_internal_looptransferId) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[%1] have finish, put at idle; for id: %2").arg(int_for_internal_loop).arg(temp_transfer_thread->transferId).toStdString()); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::RemoveItem; + newAction.userAction.moveAt=0; + newAction.addAction=actionToDoTransferToItemOfCopyList(actionToDoListTransfer.at(int_for_internal_loop)); + newAction.userAction.position=int_for_internal_loop; + actionDone.push_back(newAction); + /// \todo check if item is at the right thread + const int64_t transferTime=temp_transfer_thread->transferTime(); + if(transferTime>=0 && temp_transfer_thread->haveStartTime) + { + timeToTransfer.push_back(std::pair(temp_transfer_thread->transferSize,transferTime)); + temp_transfer_thread->haveStartTime=false; + } + actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+int_for_internal_loop); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, actionToDoListInode: %2, actionToDoListInode_afterTheTransfer: %3").arg(actionToDoListTransfer.size()).arg(actionToDoListInode.size()).arg(actionToDoListInode_afterTheTransfer.size()).toStdString()); + if(actionToDoListTransfer.empty() && actionToDoListInode.empty() && actionToDoListInode_afterTheTransfer.empty()) + updateTheStatus(); + + //add the current size of file, to general size because it's finish + copiedSize=temp_transfer_thread->copiedSize(); + if(copiedSize>(qint64)temp_transfer_thread->transferSize) + { + oversize=copiedSize-temp_transfer_thread->transferSize; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"add oversize of: "+std::to_string(oversize)); + bytesToTransfer+=oversize; + bytesTransfered+=oversize; + } + bytesTransfered+=temp_transfer_thread->transferSize; + + temp_transfer_thread->transferId=0; + temp_transfer_thread->transferSize=0; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + countLocalParse++; + #endif + isFound=true; + if(actionToDoListTransfer.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionToDoListTransfer==0"); + actionToDoListInode.insert(actionToDoListInode.cbegin(),actionToDoListInode_afterTheTransfer.cbegin(),actionToDoListInode_afterTheTransfer.cend()); + actionToDoListInode_afterTheTransfer.clear(); + doNewActions_inode_manipulation(); + doNewActions_start_transfer(); + } + break; + } + int_for_internal_loop++; + } + if(isFound) + deleteTransferThread(); + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("unable to found item into the todo list, id: %1, index: %2").arg(temp_transfer_thread->transferId).arg(int_for_internal_loop).toStdString()); + temp_transfer_thread->transferId=0; + temp_transfer_thread->transferSize=0; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("countLocalParse: %1, actionToDoList.size(): %2").arg(countLocalParse).arg(actionToDoListTransfer.size()).toStdString()); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(countLocalParse!=1) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"countLocalParse != 1"); + #endif + doNewActions_inode_manipulation(); + doNewActions_start_transfer(); +} + +/** \brief put the current file at bottom in case of error +\note ONLY IN CASE OF ERROR + +transferInodeIsClosed() will be call after, then will do: + +BUT + +this function call transfer->skip(); +not put at bottom, remove from to do list +*/ +void ListThread::transferPutAtBottom() +{ + TransferThreadAsync *transfer=qobject_cast(QObject::sender()); + if(transfer==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); + return; + } + bool isFound=false; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + int countLocalParse=0; + #endif + unsigned int indexAction=0; + while(indexActiontransferId) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Put at the end: "+std::to_string(transfer->transferId)); + //push for interface at the end + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::MoveItem; + newAction.addAction.id=transfer->transferId; + newAction.userAction.position=0; + newAction.userAction.moveAt=actionToDoListTransfer.size()-1; + actionDone.push_back(newAction); + //do the wait stat + actionToDoListTransfer[indexAction].isRunning=false; + //move at the end + actionToDoListTransfer.push_back(actionToDoListTransfer.at(indexAction)); + actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+indexAction); + transfer->transferId=0; + transfer->transferSize=0; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + countLocalParse++; + #endif + isFound=true; + putAtBottomAfterError.insert(transfer); + break; + } + indexAction++; + } + if(!isFound) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("unable to found item into the todo list, id: %1, index: %2").arg(transfer->transferId).toStdString()); + transfer->transferId=0; + transfer->transferSize=0; + putAtBottomAfterError.insert(transfer); + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"countLocalParse: "+std::to_string(countLocalParse)); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(countLocalParse!=1) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"countLocalParse != 1"); + #endif + transfer->skip(); +} + +void ListThread::fileTransfer(const INTERNALTYPEPATH &sourceFileInfo,const INTERNALTYPEPATH &destinationFileInfo,const Ultracopier::CopyMode &mode) +{ + if(stopIt) + return; + addToTransfer(sourceFileInfo,destinationFileInfo,mode); +} + +void ListThread::fileTransferWithInode(const INTERNALTYPEPATH &sourceFileInfo,const INTERNALTYPEPATH &destinationFileInfo, + const Ultracopier::CopyMode &mode,const TransferThread::dirent_uc &inode) +{ + if(stopIt) + return; + #ifdef Q_OS_WIN32 + addToTransfer(sourceFileInfo,destinationFileInfo,mode,inode.size); + #else + (void)inode; + addToTransfer(sourceFileInfo,destinationFileInfo,mode); + #endif +} + +void ListThread::autoStartAndCheckSpace() +{ + if(needMoreSpace()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Need more space"); + return; + } + autoStartIfNeeded(); +} + +void ListThread::autoStartIfNeeded() +{ + if(autoStart) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Auto start the copy"); + startGeneralTransfer(); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Put the copy engine in pause"); + putInPause=true; + emit isInPause(true); + } +} + +//set auto start +void ListThread::setAutoStart(const bool autoStart) +{ + this->autoStart=autoStart; +} + +void ListThread::startGeneralTransfer() +{ + doNewActions_inode_manipulation(); +} + +/** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ +void ListThread::syncTransferList() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit send_syncTransferList(); +} + +bool ListThread::getReturnBoolToCopyEngine() const +{ + return returnBoolToCopyEngine; +} + +std::pair ListThread::getReturnPairQuint64ToCopyEngine() const +{ + return returnPairQuint64ToCopyEngine; +} + +Ultracopier::ItemOfCopyList ListThread::getReturnItemOfCopyListToCopyEngine() const +{ + return returnItemOfCopyListToCopyEngine; +} + +void ListThread::realByteTransfered() +{ + quint64 totalRealByteTransfered=0; + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(indexrealByteTransfered(); + index++; + } + emit send_realBytesTransfered(totalRealByteTransfered); +} + +void ListThread::checkIfReadyToCancel() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(!stopIt) + return; + int index=0; + int loop_size=transferThreadList.size(); + while(indextransferId!=0) + return; + //need wait a clean stop (and then destination remove) + if(transferThreadList.at(index)->getStat()!=TransferStat_Idle) + return; + delete transferThreadList.at(index);//->deleteLayer(); + transferThreadList[index]=NULL; + transferThreadList.erase(transferThreadList.cbegin()+index); + loop_size=transferThreadList.size(); + index--; + } + index++; + } + actionToDoListTransfer.clear(); + actionToDoListInode.clear(); + actionToDoListInode_afterTheTransfer.clear(); + actionDone.clear(); + progressionList.clear(); + returnListItemOfCopyListToCopyEngine.clear(); + quit(); + waitCancel.release(); + emit canBeDeleted(); +} + +void ListThread::updateTheStatus() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + sendActionDone(); + bool updateTheStatus_listing=scanFileOrFolderThreadsPool.size()>0; + bool updateTheStatus_copying=actionToDoListTransfer.size()>0 || actionToDoListInode.size()>0 || actionToDoListInode_afterTheTransfer.size()>0; + Ultracopier::EngineActionInProgress updateTheStatus_action_in_progress; + if(updateTheStatus_copying && updateTheStatus_listing) + updateTheStatus_action_in_progress=Ultracopier::CopyingAndListing; + else if(updateTheStatus_listing) + updateTheStatus_action_in_progress=Ultracopier::Listing; + else if(updateTheStatus_copying) + updateTheStatus_action_in_progress=Ultracopier::Copying; + else + updateTheStatus_action_in_progress=Ultracopier::Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit actionInProgess("+std::to_string(updateTheStatus_action_in_progress)+")"); + emit actionInProgess(updateTheStatus_action_in_progress); +} + +//mk path to do +uint64_t ListThread::addToMkPath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inode) +{ + if(stopIt) + return 0; + if(inode!=0 && (!keepDate && !doRightTransfer)) + return 0; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + ActionToDoInode temp; + temp.type = ActionType_MkPath; + temp.id = generateIdNumber(); + temp.source = source; + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); + return temp.id; +} + +//add path to do +void ListThread::addToMovePath(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const int& inodeToRemove) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)+", inodeToRemove: "+std::to_string(inodeToRemove)); + ActionToDoInode temp; + temp.type = ActionType_MovePath; + temp.id = generateIdNumber(); + temp.size = inodeToRemove; + temp.source = source; + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); +} + +void ListThread::addToKeepAttributePath(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const int& inodeToRemove) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)+", inodeToRemove: "+std::to_string(inodeToRemove)); + ActionToDoInode temp; + temp.type = ActionType_SyncDate; + temp.id = generateIdNumber(); + temp.size = inodeToRemove; + temp.source = source; + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); +} + +void ListThread::addToRealMove(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + ActionToDoInode temp; + temp.type = ActionType_RealMove; + temp.id = generateIdNumber(); + temp.size = 0; + temp.source = source; + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +//rsync rm +void ListThread::addToRmForRsync(const std::string& destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inode: "+destination); + ActionToDoInode temp; + temp.type = ActionType_RmSync; + temp.id = generateIdNumber(); + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); +} +#endif + +//send the progression, after full reset of the interface (then all is empty) +void ListThread::syncTransferList_internal() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit syncReady(); + actionDone.clear(); + //do list operation + TransferThreadAsync *transferThread; + const int &loop_size=actionToDoListTransfer.size(); + int loop_sub_size=transferThreadList.size(); + //this loop to have at max inodeThreads*inodeThreads, not inodeThreads*transferThreadList.size() + int int_for_internal_loop; + for(int int_for_loop=0; int_for_loopgetStat()!=TransferStat_PreOperation) + { + Ultracopier::ReturnActionOnCopyList newAction; + switch(transferThread->getStat()) + { + case TransferStat_Transfer: + newAction.type=Ultracopier::Transfer; + break; + /*case TransferStat_PostTransfer: + newAction.type=Ultracopier::PostOperation; + break;*/ + case TransferStat_PostOperation: + newAction.type=Ultracopier::PostOperation; + break; + default: + break; + } + newAction.addAction.id = item.id; + actionDone.push_back(newAction); + } + } + } + } +} + +//add file transfer to do +uint64_t ListThread::addToTransfer(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const Ultracopier::CopyMode& mode, const int64_t sendedsize) +{ + if(stopIt) + return 0; + //add to transfer list + numberOfTransferIntoToDoList++; + uint64_t size=0; + if(sendedsize>=0) + size=sendedsize; + else + { + const int64_t tempSize=TransferThread::file_stat_size(source); + if(tempSize>=0) + size=tempSize; + } + const std::string &drive=driveManagement.getDrive(TransferThread::internalStringTostring(destination)); + if(!drive.empty())//can be a network drive + if(mode!=Ultracopier::Move || drive!=driveManagement.getDrive(TransferThread::internalStringTostring(source))) + { + if(requiredSpace.find(drive)!=requiredSpace.cend()) + { + requiredSpace[drive]+=size; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("space needed add: %1, space needed: %2, on: %3").arg(size).arg(requiredSpace.at(drive)).arg(QString::fromStdString(drive)).toStdString()); + } + else + { + requiredSpace[drive]=size; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("set space %1 needed, on: %2").arg(size).arg(QString::fromStdString(drive)).toStdString()); + } + } + bytesToTransfer+= size; + ActionToDoTransfer temp; + temp.id = generateIdNumber(); + temp.size = size; + temp.source = source; + temp.destination= destination; + temp.mode = mode; + temp.isRunning = false; + actionToDoListTransfer.push_back(temp); + //push the new transfer to interface + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type = Ultracopier::AddingItem; + newAction.addAction=actionToDoTransferToItemOfCopyList(temp); + actionDone.push_back(newAction); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)+", add entry: "+std::to_string(temp.id)+", size: "+ + std::to_string(temp.size)+", size2: "+std::to_string(size)+", isSymLink: "+std::to_string(TransferThread::is_symlink(source))); + return temp.id; +} + +Ultracopier::ItemOfCopyList ListThread::actionToDoTransferToItemOfCopyList(const ListThread::ActionToDoTransfer &actionToDoTransfer) +{ + Ultracopier::ItemOfCopyList itemOfCopyList; + itemOfCopyList.id = actionToDoTransfer.id; + const size_t sourceIndex=actionToDoTransfer.source.rfind('/'); + if(sourceIndex == std::string::npos) + { + itemOfCopyList.sourceFullPath = TransferThread::internalStringTostring(actionToDoTransfer.source); + itemOfCopyList.sourceFileName = TransferThread::internalStringTostring(actionToDoTransfer.source); + } + else + { + itemOfCopyList.sourceFullPath = TransferThread::internalStringTostring(actionToDoTransfer.source); + itemOfCopyList.sourceFileName = TransferThread::internalStringTostring(actionToDoTransfer.source.substr(sourceIndex+1)); + } + const size_t destinationIndex=actionToDoTransfer.destination.rfind('/'); + if(destinationIndex == std::string::npos) + { + itemOfCopyList.destinationFullPath = TransferThread::internalStringTostring(actionToDoTransfer.destination); + itemOfCopyList.destinationFileName = TransferThread::internalStringTostring(actionToDoTransfer.destination); + } + else + { + itemOfCopyList.destinationFullPath = TransferThread::internalStringTostring(actionToDoTransfer.destination); + itemOfCopyList.destinationFileName = TransferThread::internalStringTostring(actionToDoTransfer.destination.substr(destinationIndex+1)); + } + itemOfCopyList.size = actionToDoTransfer.size; + itemOfCopyList.mode = actionToDoTransfer.mode; + return itemOfCopyList; +} + +//generate id number +uint64_t ListThread::generateIdNumber() +{ + idIncrementNumber++; + if(idIncrementNumber>(((quint64)1024*1024)*1024*1024*2)) + idIncrementNumber=0; + return idIncrementNumber; +} + +//do new actions +void ListThread::doNewActions_start_transfer() +{ + /*ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, numberOfTranferRuning: %2") + .arg(actionToDoListTransfer.size()).arg(getNumberOfTranferRuning()).toStdString());*/ + if(stopIt || putInPause) + return; + int numberOfTranferRuning=getNumberOfTranferRuning(); + const int &loop_size=transferThreadList.size(); + //lunch the transfer in WaitForTheTransfer + //high priority + int int_for_loop=0; + while(int_for_loopgetStat()==TransferStat_WaitForTheTransfer/*ready to start the transfer*/ && transferThread->transferId!=0) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + if(transferThread->transferSize>=parallelizeIfSmallerThan) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + if(numberOfTranferRuningstartTheTransfer(); + numberOfTranferRuning++; + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)+ + ", start in parallele beacuase size is "+std::to_string(transferThread->transferSize)); + transferThread->startTheTransfer(); + numberOfTranferRuning++; + } + } + int_for_loop++; + } + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + + //low priority + int_for_loop=0; + while(int_for_loopgetStat()==TransferStat_PreOperation/*wait user dialog action*/) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + if(transferThread->transferSize>=parallelizeIfSmallerThan) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + if(numberOfTranferRuningstartTheTransfer(); + numberOfTranferRuning++; + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + transferThread->startTheTransfer(); + numberOfTranferRuning++; + } + } + int_for_loop++; + } + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); +} + +/** \brief lunch the pre-op or inode op + 1) locate the next next item to do into the both list + 1a) optimisation posible on the mkpath/rmpath + 2) determine what need be lunched + 3) lunch it, rerun the 2) + */ +void ListThread::doNewActions_inode_manipulation() +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionToDoList.size(): "+std::to_string(actionToDoListTransfer.size())); + #endif + if(stopIt) + checkIfReadyToCancel(); + if(stopIt || putInPause) + return; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + #endif + //lunch the pre-op or inode op + TransferThreadAsync *currentTransferThread; + int int_for_loop=0; + int int_for_internal_loop=0; + int int_for_transfer_thread_search=0; + actionToDoListTransfer_count=actionToDoListTransfer.size(); + actionToDoListInode_count=actionToDoListInode.size(); + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + //search the next transfer action to do + while(int_for_looptransferId==0) /!\ important! + Because the other thread can have call doNewAction before than this thread have the finish event parsed! + I this case it lose all data + */ + currentTransferThread=transferThreadList.at(int_for_transfer_thread_search); + if(currentTransferThread->getStat()==TransferStat_Idle && currentTransferThread->transferId==0 && + overCheckUsedThread.find(currentTransferThread)==overCheckUsedThread.cend()) // /!\ important! + { + overCheckUsedThread.insert(currentTransferThread); + + std::string drive=driveManagement.getDrive(TransferThread::internalStringTostring(currentActionToDoTransfer.destination)); + if(requiredSpace.find(drive)!=requiredSpace.cend() && + (currentActionToDoTransfer.mode!=Ultracopier::Move || + drive!=driveManagement.getDrive(TransferThread::internalStringTostring(currentActionToDoTransfer.source)))) + { + requiredSpace[drive]-=currentActionToDoTransfer.size; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("space needed removed: %1, space needed: %2, on: %3").arg( + currentActionToDoTransfer.size).arg(requiredSpace.at(drive)).arg(QString::fromStdString(drive)).toStdString()); + } + currentTransferThread->transferId=currentActionToDoTransfer.id; + currentTransferThread->transferSize=currentActionToDoTransfer.size; + putAtBottomAfterError.erase(currentTransferThread); + if(!currentTransferThread->setFiles( + currentActionToDoTransfer.source, + currentActionToDoTransfer.size, + currentActionToDoTransfer.destination, + currentActionToDoTransfer.mode + )) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(int_for_loop)+"] id: "+ + std::to_string(currentTransferThread->transferId)+ + " is idle, but seam busy at set name: "+TransferThread::internalStringTostring(currentActionToDoTransfer.destination) + ); + break; + } + currentActionToDoTransfer.isRunning=true; + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(int_for_loop)+"] id: "+ + std::to_string(currentTransferThread->transferId)+ + " is idle, use it for "+TransferThread::internalStringTostring(currentActionToDoTransfer.destination) + ); + + /// \note wrong position? Else write why it's here + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type = Ultracopier::PreOperation; + newAction.addAction.id = currentActionToDoTransfer.id; + const size_t sourceIndex=currentActionToDoTransfer.source.rfind('/'); + if(sourceIndex == std::string::npos) + { + newAction.addAction.sourceFullPath = '/'; + newAction.addAction.sourceFileName = TransferThread::internalStringTostring(currentActionToDoTransfer.source); + } + else + { + newAction.addAction.sourceFullPath = TransferThread::internalStringTostring(currentActionToDoTransfer.source); + newAction.addAction.sourceFileName = TransferThread::internalStringTostring(currentActionToDoTransfer.source.substr(sourceIndex+1)); + } + const size_t destinationIndex=currentActionToDoTransfer.destination.rfind('/'); + if(destinationIndex == std::string::npos) + { + newAction.addAction.destinationFullPath = '/'; + newAction.addAction.destinationFileName = TransferThread::internalStringTostring(currentActionToDoTransfer.destination); + } + else + { + newAction.addAction.destinationFullPath = TransferThread::internalStringTostring(currentActionToDoTransfer.destination); + newAction.addAction.destinationFileName = TransferThread::internalStringTostring(currentActionToDoTransfer.destination.substr(destinationIndex+1)); + } + newAction.addAction.size = currentActionToDoTransfer.size; + newAction.addAction.mode = currentActionToDoTransfer.mode; + actionDone.push_back(newAction); + int_for_transfer_thread_search++; + numberOfInodeOperation++; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); + #endif + break; + } + int_for_transfer_thread_search++; + } + if(int_for_internal_loop==loop_sub_size_transfer_thread_search) + { + /// \note Can be normal when all thread is not initialized + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"unable to found free thread to do the transfer"); + #endif + break; + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); + #endif + if(numberOfInodeOperation>=inodeThreads) + break; + if(followTheStrictOrder) + break; + } + int_for_loop++; + } + //search the next inode action to do + int_for_internal_loop=0; + while(int_for_internal_loopinodeThreads) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("The index have been detected as out of max range: %1>%2").arg(actionToDoListInode_count).arg(inodeThreads).toStdString()); + return; + } +} + +//restart transfer if it can +void ListThread::restartTransferIfItCan() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + TransferThreadAsync *transfer=qobject_cast(QObject::sender()); + if(transfer==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); + return; + } + int numberOfTranferRuning=getNumberOfTranferRuning(); + if(numberOfTranferRuninggetStat()==TransferStat_WaitForTheTransfer) + transfer->startTheTransfer(); + doNewActions_start_transfer(); +} + + +void ListThread::set_setFilters(const std::vector &include,const std::vector &exclude) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("include.size(): %1, exclude.size(): %2").arg(include.size()).arg(exclude.size()).toStdString()); + this->include=include; + this->exclude=exclude; + unsigned int index=0; + while(indexsetFilters(include,exclude); + index++; + } +} + +void ListThread::set_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) +{ + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +void ListThread::set_updateMount() +{ + driveManagement.tryUpdate(); + emit send_updateMount(); +} + +void ListThread::mkPathFirstFolderFinish() +{ + int int_for_loop=0; + const int &loop_size=actionToDoListInode.size(); + while(int_for_loop(sender())); +} + +/// \note Can be call without queue because all call will be serialized +void ListThread::errorOnFile(const INTERNALTYPEPATH &fileInfo, const std::string &errorString, const ErrorType &errorType) +{ + TransferThreadAsync * transferThread=qobject_cast(sender()); + if(transferThread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Thread locating error"); + return; + } + ErrorLogEntry errorLogEntry; + errorLogEntry.source=TransferThread::internalStringTostring(transferThread->getSourcePath()); + errorLogEntry.destination=TransferThread::internalStringTostring(transferThread->getDestinationPath()); + errorLogEntry.mode=transferThread->getMode(); + errorLogEntry.error=errorString; + errorLog.push_back(errorLogEntry); + emit errorToRetry(TransferThread::internalStringTostring(transferThread->getSourcePath()), + TransferThread::internalStringTostring(transferThread->getDestinationPath()), + errorString); + emit send_errorOnFile(fileInfo,errorString,transferThread,errorType); +} + +/// \note Can be call without queue because all call will be serialized +void ListThread::folderAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame) +{ + emit send_folderAlreadyExists(source,destination,isSame,qobject_cast(sender())); +} + +/// \note Can be call without queue because all call will be serialized +/// \todo all this part +void ListThread::errorOnFolder(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,const ErrorType &errorType) +{ + emit send_errorOnFolder(fileInfo,errorString,qobject_cast(sender()),errorType); +} + +//to run the thread +void ListThread::run() +{ + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + clockForTheCopySpeed=new QTimer(); + #endif + exec(); +} + +void ListThread::getNeedPutAtBottom(const INTERNALTYPEPATH &fileInfo, const std::string &errorString, TransferThreadAsync *thread, + const ErrorType &errorType) +{ + (void)fileInfo; + (void)errorString; + (void)errorType; + thread->putAtBottom(); +} + +/// \to create transfer thread +void ListThread::createTransferThread() +{ + if(stopIt) + return; + if(transferThreadList.size()>=(unsigned int)inodeThreads) + return; + transferThreadList.push_back(new TransferThreadAsync()); + TransferThreadAsync * last=transferThreadList.back(); + last->transferId=0; + last->transferSize=0; + last->setRightTransfer(doRightTransfer); + last->setKeepDate(keepDate); + last->setOsSpecFlags(os_spec_flags); + last->setNativeCopy(native_copy); + last->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + if(!last->setBlockSize(blockSizeAfterSpeedLimitation)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the block size: "+std::to_string(blockSizeAfterSpeedLimitation)); + #endif + last->setDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); + last->setBuffer(buffer); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + last->setRsync(rsync); + #endif + + last->writeThread.writeFileList=new QMultiHash(); + last->writeThread.writeFileListMutex=new QMutex(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(last,&TransferThread::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection)) + abort(); + #endif // ULTRACOPIER_PLUGIN_DEBUG + if(!connect(last,&TransferThread::errorOnFile, this,&ListThread::errorOnFile, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::fileAlreadyExists, this,&ListThread::fileAlreadyExists, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::tryPutAtBottom, this,&ListThread::transferPutAtBottom, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::readStopped, this,&ListThread::doNewActions_start_transfer, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::preOperationStopped, this,&ListThread::doNewActions_start_transfer, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::postOperationStopped, this,&ListThread::transferInodeIsClosed, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::checkIfItCanBeResumed, this,&ListThread::restartTransferIfItCan, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::pushStat, this,&ListThread::newTransferStat, Qt::QueuedConnection)) + abort(); + + if(!connect(this,&ListThread::send_sendNewRenamingRules, last,&TransferThread::setRenamingRules, Qt::QueuedConnection)) + abort(); + + if(!connect(this,&ListThread::send_updateMount, last,&TransferThread::set_updateMount, Qt::QueuedConnection)) + abort(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + last->setMultiForBigSpeed(multiForBigSpeed); + //speed limitation + connect(clockForTheCopySpeed, &QTimer::timeout, last, &TransferThreadAsync::timeOfTheBlockCopyFinished, Qt::QueuedConnection); + #endif + + last->setObjectName(QStringLiteral("transfer %1").arg(transferThreadList.size()-1)); + last->readThread.setObjectName(QStringLiteral("read %1").arg(transferThreadList.size()-1)); + last->writeThread.setObjectName(QStringLiteral("write %1").arg(transferThreadList.size()-1)); + last->setRenamingRules(firstRenamingRule,otherRenamingRule); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + last->setId(transferThreadList.size()-1); + #endif + if(transferThreadList.size()>=(unsigned int)inodeThreads) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"create the last of the "+std::to_string(inodeThreads)+" transferThread"); + return; + } + if(stopIt) + return; + doNewActions_inode_manipulation(); + emit askNewTransferThread(); +} + +void ListThread::deleteTransferThread() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + int loop_size=transferThreadList.size(); + if(loop_size>inodeThreads) + { + int index=0; + while(indexinodeThreads) + { + if(transferThreadList.at(index)->getStat()==TransferStat_Idle && transferThreadList.at(index)->transferId==0) + { + transferThreadList.at(index)->stop(); + delete transferThreadList.at(index);//->deleteLayer(); + transferThreadList[index]=NULL; + transferThreadList.erase(transferThreadList.cbegin()+index); + loop_size--; + } + else + index++; + } + if(loop_size==inodeThreads) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inodeThreads is lowered to the right value: "+std::to_string(inodeThreads)); + } +} + +void ListThread::setMkFullPath(const bool mkFullPath) +{ + this->mkFullPath=mkFullPath; + mkPathQueue.setMkFullPath(mkFullPath); + unsigned int index=0; + while(indexsetMkFullPath(mkFullPath); + index++; + } +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThread.h b/plugins/CopyEngine/Ultracopier-Spec/ListThread.h new file mode 100755 index 0000000..361f65c --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThread.h @@ -0,0 +1,437 @@ +/** \file ListThread.h +\brief Define the list thread, and management to the action to do +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef LISTTHREAD_H +#define LISTTHREAD_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "ScanFileOrFolder.h" +#include "MkPath.h" +#include "Environment.h" +#include "DriveManagement.h" +#include "async/TransferThreadAsync.h" + +/// \brief Define the list thread, and management to the action to do +class ListThread : public QThread +{ + Q_OBJECT +public: + explicit ListThread(FacilityInterface * facilityInterface); + ~ListThread(); + + //duplication copy detection + /** \brief compare the current sources of the copy, with the passed arguments + * \param sources the sources list to compares with the current sources list + * \return true if have same sources, else false (or empty) */ + bool haveSameSource(const std::vector &sources); + /** \brief compare the current destination of the copy, with the passed arguments + * \param destination the destination to compares with the current destination + * \return true if have same destination, else false (or empty) */ + bool haveSameDestination(const std::string &destination); + /// \return empty if multiple or no destination + std::string getUniqueDestinationFolder() const; + //external soft like file browser have send copy/move list to do + /** \brief send copy with destination + * \param sources the sources list to copy + * \param destination the destination to copy + * \return true if the copy have been accepted */ + bool newCopy(const std::vector &sources,const std::string &destination); + /** \brief send move without destination, ask the destination + * \param sources the sources list to move + * \param destination the destination to move + * \return true if the move have been accepted */ + bool newMove(const std::vector &sources,const std::string &destination); + /** \brief to set drives detected + * specific to this copy engine */ + /// \brief to set the collision action + void setCollisionAction(const FileExistsAction &alwaysDoThisActionForFileExists); + /** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ + void syncTransferList(); + /// \brief to store one action to do + struct ActionToDoTransfer + { + uint64_t id; + uint64_t size;///< Used to set: used in case of transfer or remainingInode for drop folder + #ifdef WIDESTRING + std::wstring source;///< Used to set: source for transfer, folder to create, folder to drop + std::wstring destination; + #else + std::string source;///< Used to set: source for transfer, folder to create, folder to drop + std::string destination; + #endif + Ultracopier::CopyMode mode; + bool isRunning;///< store if the action si running + //TTHREAD * transfer; // -> see transferThreadList + }; + std::vector actionToDoListTransfer; + /// \brief to store one action to do + struct ActionToDoInode + { + ActionType type;///< \see ActionType + uint64_t id; + int64_t size;///< Used to set: used in case of transfer or remainingInode for drop folder + #ifdef WIDESTRING + std::wstring source;///< Keep to copy the right/date, to remove (for move) + std::wstring destination;///< Used to set: folder to create, folder to drop + #else + std::string source;///< Keep to copy the right/date, to remove (for move) + std::string destination;///< Used to set: folder to create, folder to drop + #endif + bool isRunning;///< store if the action si running + }; + std::vector actionToDoListInode; + std::vector actionToDoListInode_afterTheTransfer; + int numberOfInodeOperation; + struct ErrorLogEntry + { + std::string source; + std::string destination; + std::string error; + Ultracopier::CopyMode mode; + }; + std::vector errorLog; + //dir operation thread queue + MkPath mkPathQueue; + //to get the return value from copyEngine + bool getReturnBoolToCopyEngine() const; + std::pair getReturnPairQuint64ToCopyEngine() const; + Ultracopier::ItemOfCopyList getReturnItemOfCopyListToCopyEngine() const; + void setMkFullPath(const bool mkFullPath); + std::unordered_set overCheckUsedThread; + + void autoStartIfNeeded(); + /// \brief set auto start + void setAutoStart(const bool autoStart); +public slots: + //action on the copy + /// \brief put the transfer in pause + void pause(); + /// \brief resume the transfer + void resume(); + /** \brief skip one transfer entry + * \param id id of the file to remove */ + void skip(const uint64_t &id); + /** \brief skip as interanl one transfer entry + * \param id id of the file to remove */ + bool skipInternal(const uint64_t &id); + /// \brief cancel all the transfer + void cancel(); + //edit the transfer list + /** \brief remove the selected item + * \param ids ids is the id list of the selected items */ + void removeItems(const std::vector &ids); + /** \brief move on top of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnTop(std::vector ids); + /** \brief move up the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsUp(std::vector ids); + /** \brief move down the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsDown(std::vector ids); + /** \brief move on bottom of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnBottom(std::vector ids); + + /** \brief give the forced mode, to export/import transfer list */ + void forceMode(const Ultracopier::CopyMode &mode); + /// \brief export the transfer list into a file + void exportTransferList(const std::string &fileName); + /// \brief import the transfer list into a file + void importTransferList(const std::string &fileName); + + /// \brief set the folder local collision + void setFolderCollision(const FolderExistsAction &alwaysDoThisActionForFolderExists); + /** \brief to set the speed limitation + * -1 if not able, 0 if disabled */ + bool setSpeedLimitation(const int64_t &speedLimitation); + /// \brief set the copy info and options before runing + void setRightTransfer(const bool doRightTransfer); + /// \brief set keep date + void setKeepDate(const bool keepDate); + void setOsSpecFlags(bool os_spec_flags); + void setNativeCopy(bool native_copy); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + /// \brief set rsync + void setRsync(const bool rsync); + #endif + /// \brief set check destination folder + void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); + /// \brief set data local to the thread + void setAlwaysFileExistsAction(const FileExistsAction &alwaysDoThisActionForFileExists); + /// \brief do new actions, start transfer + void doNewActions_start_transfer(); + /** \brief lunch the pre-op or inode op + 1) locate the next next item to do into the both list + 1a) optimisation posible on the mkpath/rmpath + 2) determine what need be lunched + 3) lunch it, rerun the 2) + */ + void doNewActions_inode_manipulation(); + /// \brief restart transfer if it can + void restartTransferIfItCan(); + void getNeedPutAtBottom(const INTERNALTYPEPATH &fileInfo, const std::string &errorString, TransferThreadAsync *thread, const ErrorType &errorType); + + /// \brief update the transfer stat + void newTransferStat(const TransferStat &stat,const quint64 &id); + + void set_setFilters(const std::vector &include,const std::vector &exclude); + void set_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); + void set_updateMount(); + + //send action done + void sendActionDone(); + //send progression + void sendProgression(); + + void setMoveTheWholeFolder(const bool &moveTheWholeFolder); + void setFollowTheStrictOrder(const bool &followTheStrictOrder); + void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); + void setInodeThreads(const int &inodeThreads); + void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); + void setCheckDiskSpace(const bool &checkDiskSpace); + void setBuffer(const bool &buffer); + void exportErrorIntoTransferList(const std::string &fileName); +private: + //can't be static into WriteThread, linked by instance then by ListThread + QMultiHash *writeFileList; + QMutex *writeFileListMutex; + + QSemaphore mkpathTransfer; + std::string sourceDrive; + bool sourceDriveMultiple; + std::string destinationDrive; + INTERNALTYPEPATH destinationFolder; + bool destinationDriveMultiple; + bool destinationFolderMultiple; + DriveManagement driveManagement; + + bool stopIt; + std::vector scanFileOrFolderThreadsPool; + int numberOfTransferIntoToDoList; + std::vector transferThreadList; + ScanFileOrFolder * newScanThread(Ultracopier::CopyMode mode); + uint64_t bytesToTransfer; + uint64_t bytesTransfered; + bool autoStart; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + bool rsync; + #endif + std::vector actionDone;///< to action to send to the interface + uint64_t idIncrementNumber;///< to store the last id returned + int64_t actualRealByteTransfered; + FolderExistsAction alwaysDoThisActionForFolderExists; + bool checkDestinationFolderExists; + unsigned int parallelizeIfSmallerThan; + bool moveTheWholeFolder; + bool deletePartiallyTransferredFiles; + int inodeThreads; + bool renameTheOriginalDestination; + bool checkDiskSpace; + bool buffer; + bool followTheStrictOrder; + std::unordered_set putAtBottomAfterError; + std::unordered_map requiredSpace; + std::vector > timeToTransfer; + //unsigned int putAtBottom;//why here? more correct into CopyEngine(), then translated to CopyEngine + std::vector include,exclude; + Ultracopier::CopyMode mode; + bool forcedMode; + std::string firstRenamingRule; + std::string otherRenamingRule; + /* here to prevent: + QObject::killTimer: timers cannot be stopped from another thread + QObject::startTimer: timers cannot be started from another thread */ + + static Ultracopier::ItemOfCopyList actionToDoTransferToItemOfCopyList(const ActionToDoTransfer &actionToDoTransfer); + //add file transfer to do + uint64_t addToTransfer(const INTERNALTYPEPATH& source, const INTERNALTYPEPATH& destination, const Ultracopier::CopyMode& mode, const int64_t sendedsize=-1); + //generate id number + uint64_t generateIdNumber(); + //warning the first entry is accessible will copy + bool removeSingleItem(const uint64_t &id); + //put on top + bool moveOnTopItem(const uint64_t &id); + //move up + bool moveUpItem(const uint64_t &id); + //move down + bool moveDownItem(const uint64_t &id); + //put on bottom + bool moveOnBottomItem(const uint64_t &id); + //general transfer + void startGeneralTransfer(); + //debug windows if needed + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + QTimer timerUpdateDebugDialog; + #endif + void detectDrivesOfCurrentTransfer(const std::vector &sources, const INTERNALTYPEPATH &destination); + FacilityInterface * facilityInterface; + QSemaphore waitConstructor,waitCancel; + int actionToDoListTransfer_count,actionToDoListInode_count; + bool doTransfer,doInode; + int64_t oversize;//used as temp variable + int64_t currentProgression; + int64_t copiedSize,totalSize,localOverSize; + std::vector progressionList; + //memory variable for transfer thread creation + bool doRightTransfer; + bool keepDate; + bool os_spec_flags; + bool native_copy; + bool mkFullPath; + std::vector drives; + FileExistsAction alwaysDoThisActionForFileExists; + int speedLimitation; + //to return value to the copyEngine + bool returnBoolToCopyEngine; + std::pair returnPairQuint64ToCopyEngine; + std::vector returnListItemOfCopyListToCopyEngine; + Ultracopier::ItemOfCopyList returnItemOfCopyListToCopyEngine; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + QTimer *clockForTheCopySpeed; + int blockSizeAfterSpeedLimitation;//in Bytes + int multiForBigSpeed; + int blockSize; + #endif + bool putInPause; + + void realByteTransfered(); + int getNumberOfTranferRuning() const; + bool needMoreSpace() const; +private slots: + void exportTransferListInternal(const std::string &fileName); + void importTransferListInternal(const std::string &fileName); + + void scanThreadHaveFinishSlot(); + void scanThreadHaveFinish(bool skipFirstRemove=false); + void autoStartAndCheckSpace(); + void updateTheStatus(); + void fileTransfer(const INTERNALTYPEPATH &sourceFileInfo, const INTERNALTYPEPATH &destinationFileInfo, + const Ultracopier::CopyMode &mode); + void fileTransferWithInode(const INTERNALTYPEPATH &sourceFileInfo, const INTERNALTYPEPATH &destinationFileInfo, + const Ultracopier::CopyMode &mode, const TransferThread::dirent_uc &inode); + //mkpath event + void mkPathFirstFolderFinish(); + /** \brief put the current file at bottom in case of error + \note ONLY IN CASE OF ERROR */ + void transferPutAtBottom(); + //transfer is finished + void transferInodeIsClosed(); + //debug windows if needed + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + void timedUpdateDebugDialog(); + #endif + //dialog message + /// \note Can be call without queue because all call will be serialized + void fileAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame); + /// \note Can be call without queue because all call will be serialized + void errorOnFile(const INTERNALTYPEPATH &fileInfo,const std::string &errorString, const ErrorType &errorType); + /// \note Can be call without queue because all call will be serialized + void folderAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame); + /// \note Can be call without queue because all call will be serialized + void errorOnFolder(const INTERNALTYPEPATH &fileInfo, const std::string &errorString, const ErrorType &errorType); + //to run the thread + void run(); + /// \to create transfer thread + void createTransferThread(); + void deleteTransferThread(); + //mk path to do + uint64_t addToMkPath(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const int &inode); + //add path to do + void addToMovePath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inodeToRemove); + void addToKeepAttributePath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inodeToRemove); + //add to real move + void addToRealMove(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + //rsync rm + void addToRmForRsync(const std::string& destination); + #endif + //send the progression, after full reset of the interface (then all is empty) + void syncTransferList_internal(); + + void checkIfReadyToCancel(); +signals: + //send information about the copy + void actionInProgess(const Ultracopier::EngineActionInProgress &) const; //should update interface information on this event + + void newActionOnList(const std::vector &) const;///very important, need be temporized to group the modification to do and not flood the interface + void syncReady() const; + void doneTime(const std::vector >&) const; + + /** \brief to get the progression for a specific file + * \param id the id of the transfer, id send during population the transfer list + * first = current transfered byte, second = byte to transfer */ + void pushFileProgression(const std::vector &progressionList) const; + //get information about the copy + /** \brief to get the general progression + * first = current transfered byte, second = byte to transfer */ + void pushGeneralProgression(const uint64_t &,const uint64_t &) const; + + void newFolderListing(const std::string &path) const; + + //when can be deleted + void canBeDeleted() const; + void haveNeedPutAtBottom(bool needPutAtBottom,const INTERNALTYPEPATH &fileInfo,const std::string &errorString,TransferThreadAsync * thread,const ErrorType &errorType) const; + + //send error occurred + void error(const std::string &path,const uint64_t &size,const uint64_t &mtime,const std::string &error) const; + void errorToRetry(const std::string &source,const std::string &destination,const std::string &error) const; + //for the extra logging + void rmPath(const std::string &path) const; + void mkPath(const std::string &path) const; + /// \brief To debug source + #ifdef ULTRACOPIER_PLUGIN_DEBUG + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; + #endif + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + void updateTheDebugInfo(const std::vector &,const std::vector&,const int &) const; + #endif + + //other signal + /// \note Can be call without queue because all call will be serialized + void send_fileAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame,TransferThreadAsync * thread) const; + /// \note Can be call without queue because all call will be serialized + void send_errorOnFile(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,TransferThreadAsync * thread, const ErrorType &errorType) const; + /// \note Can be call without queue because all call will be serialized + void send_folderAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame,ScanFileOrFolder * thread) const; + /// \note Can be call without queue because all call will be serialized + void send_errorOnFolder(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,ScanFileOrFolder * thread, const ErrorType &errorType) const; + //send the progression + void send_syncTransferList() const; + //mkpath error event + void mkPathErrorOnFolder(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,const ErrorType &errorType) const; + //to close + void tryCancel() const; + //to ask new transfer thread + void askNewTransferThread() const; + + void warningTransferList(const std::string &warning) const; + void errorTransferList(const std::string &error) const; + void send_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) const; + void send_realBytesTransfered(const uint64_t &) const; + + void send_parallelizeIfSmallerThan(const int ¶llelizeIfSmallerThan) const; + void send_updateMount(); + void missingDiskSpace(std::vector list) const; + void isInPause(const bool &) const; + + void exportTransferListSend(const std::string &fileName); + void importTransferListSend(const std::string &fileName); +}; + +#endif // LISTTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadActions.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadActions.cpp new file mode 100755 index 0000000..85b3113 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadActions.cpp @@ -0,0 +1,129 @@ +#include "ListThread.h" +#include +#include +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +void ListThread::pause() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Seam already in pause!"); + return; + } + putInPause=true; + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(indexpause(); + index++; + } + emit isInPause(true); +} + +void ListThread::resume() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(!putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Seam already resumed!"); + return; + } + putInPause=false; + startGeneralTransfer(); + doNewActions_start_transfer(); + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(indexresume(); + index++; + } + emit isInPause(false); +} + +void ListThread::skip(const uint64_t &id) +{ + skipInternal(id); +} + +bool ListThread::skipInternal(const uint64_t &id) +{ + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(indextransferId==id) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"skip one transfer: "+std::to_string(id)); + transferThreadList.at(index)->skip(); + return true; + } + index++; + } + int int_for_internal_loop=0; + const int &loop_size=actionToDoListTransfer.size(); + while(int_for_internal_loopstop(); + transferThreadList.at(index)->transferId=0; + index++; + } + index=0; + loop_size=scanFileOrFolderThreadsPool.size(); + while(indexstop(); + delete scanFileOrFolderThreadsPool.at(index);//->deleteLayer(); + scanFileOrFolderThreadsPool[index]=NULL; + index++; + } + scanFileOrFolderThreadsPool.clear(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + if(clockForTheCopySpeed!=NULL) + { + clockForTheCopySpeed->stop(); + delete clockForTheCopySpeed; + clockForTheCopySpeed=NULL; + } + #endif + checkIfReadyToCancel(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadListChange.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadListChange.cpp new file mode 100755 index 0000000..6927caa --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadListChange.cpp @@ -0,0 +1,423 @@ +#include "ListThread.h" +#include +#include +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +//warning the first entry is accessible will copy +void ListThread::removeItems(const std::vector &ids) +{ + for(unsigned int i=0;i ids) +{ + if(actionToDoListTransfer.size()<=1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //do list operation + int indexToMove=0; + for (unsigned int i=0; i ids) +{ + if(actionToDoListTransfer.size()<=1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //do list operation + int lastGoodPositionReal=0; + bool haveGoodPosition=false; + for (unsigned int i=0; i ids) +{ + if(actionToDoListTransfer.size()<=1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //do list operation + int lastGoodPositionReal=0; + bool haveGoodPosition=false; + for (int i=actionToDoListTransfer.size()-1; i>=0; --i) { + if(vectorcontainsAtLeastOne(ids,actionToDoListTransfer.at(i).id)) + { + if(haveGoodPosition) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"move item "+std::to_string(i)+" to "+std::to_string(i+1)); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::MoveItem; + newAction.addAction.id=actionToDoListTransfer.at(i).id; + newAction.userAction.moveAt=lastGoodPositionReal; + newAction.userAction.position=i; + actionDone.push_back(newAction); + ActionToDoTransfer temp1=actionToDoListTransfer.at(i); + ActionToDoTransfer temp2=actionToDoListTransfer.at(lastGoodPositionReal); + actionToDoListTransfer[i]=temp2; + actionToDoListTransfer[lastGoodPositionReal]=temp1; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Try move up false, item "+std::to_string(i)); + } + vectorremoveOne(ids,actionToDoListTransfer.at(i).id); + if(ids.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop with return"); + return; + } + } + else + { + lastGoodPositionReal=i; + haveGoodPosition=true; + } + } + sendActionDone(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +//put on bottom +void ListThread::moveItemsOnBottom(std::vector ids) +{ + if(actionToDoListTransfer.size()<=1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //do list operation + int lastGoodPositionReal=actionToDoListTransfer.size()-1; + for (int i=lastGoodPositionReal; i>=0; --i) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Check action on item "+std::to_string(i)); + if(vectorcontainsAtLeastOne(ids,actionToDoListTransfer.at(i).id)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"move item "+std::to_string(i)+" to "+std::to_string(lastGoodPositionReal)); + vectorremoveOne(ids,actionToDoListTransfer.at(i).id); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::MoveItem; + newAction.addAction.id=actionToDoListTransfer.at(i).id; + newAction.userAction.moveAt=lastGoodPositionReal; + newAction.userAction.position=i; + actionDone.push_back(newAction); + ActionToDoTransfer temp=actionToDoListTransfer.at(i); + actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+i); + actionToDoListTransfer.insert(actionToDoListTransfer.cbegin()+lastGoodPositionReal,temp); + lastGoodPositionReal--; + if(ids.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop with return"); + return; + } + } + } + sendActionDone(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +void ListThread::exportTransferList(const std::string &fileName) +{ + emit exportTransferListSend(fileName); +} + +void ListThread::exportTransferListInternal(const std::string &fileName) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QFile transferFile(QString::fromStdString(fileName)); + if(transferFile.open(QIODevice::WriteOnly|QIODevice::Truncate)) + { + transferFile.write(QStringLiteral("Ultracopier;Transfer-list;").toUtf8()); + if(!forcedMode) + transferFile.write(QStringLiteral("Transfer;").toUtf8()); + else + { + if(mode==Ultracopier::Copy) + transferFile.write(QStringLiteral("Copy;").toUtf8()); + else + transferFile.write(QStringLiteral("Move;").toUtf8()); + } + transferFile.write(QStringLiteral("Ultracopier\n").toUtf8()); + bool haveError=false; + int size=actionToDoListTransfer.size(); + for (int index=0;index0 || actionToDoListInode.size()>0 || actionToDoListInode_afterTheTransfer.size()>0; + Ultracopier::EngineActionInProgress updateTheStatus_action_in_progress; + if(updateTheStatus_copying) + updateTheStatus_action_in_progress=Ultracopier::CopyingAndListing; + else + updateTheStatus_action_in_progress=Ultracopier::Listing; + emit actionInProgess(updateTheStatus_action_in_progress); + + bool errorFound=false; + std::regex correctLine; + if(transferListMixedMode) + correctLine=std::regex("^(Copy|Move);[^;]+;[^;]+[\n\r]*$"); + else + correctLine=std::regex("^[^;]+;[^;]+[\n\r]*$"); + std::vector args; + Ultracopier::CopyMode tempMode; + do + { + data=transferFile.readLine(65535*2); + if(data.size()>0) + { + content=std::string(data.constData(),data.size()); + //do the import here + if(std::regex_match(content,correctLine)) + { + stringreplaceAll(content,"\n",""); + args=stringsplit(content,';'); + if(forcedMode) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("New data to import in forced mode: %2,%3") + .arg(QString::fromStdString(args.at(0))) + .arg(QString::fromStdString(args.at(1))) + .toStdString()); + addToTransfer(TransferThread::stringToInternalString(args.at(0)), + TransferThread::stringToInternalString(args.at(1)),mode); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("New data to import: %1,%2,%3") + .arg(QString::fromStdString(args.at(0))) + .arg(QString::fromStdString(args.at(1))) + .arg(QString::fromStdString(args.at(2))) + .toStdString()); + if(args.at(0)=="Copy") + tempMode=Ultracopier::Copy; + else + tempMode=Ultracopier::Move; + addToTransfer(TransferThread::stringToInternalString(args.at(1)),TransferThread::stringToInternalString(args.at(2)),tempMode); + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Wrong line syntax: "+content); + errorFound=true; + } + } + } + while(data.size()>0); + transferFile.close(); + if(errorFound) + emit warningTransferList(tr("Some errors have been found during the line parsing").toStdString()); + + updateTheStatus();//->sendActionDone(); into this + autoStartAndCheckSpace(); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("Unable to open the transfer list: %1").arg(transferFile.errorString()).toStdString()); + emit errorTransferList(tr("Unable to open the transfer list: %1").arg(transferFile.errorString()).toStdString()); + return; + } +} + +void ListThread::exportErrorIntoTransferList(const std::string &fileName) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QFile transferFile(QString::fromStdString(fileName)); + if(transferFile.open(QIODevice::WriteOnly|QIODevice::Truncate)) + { + transferFile.write(QStringLiteral("Ultracopier;Transfer-list;").toUtf8()); + if(!forcedMode) + transferFile.write(QStringLiteral("Transfer;").toUtf8()); + else + { + if(mode==Ultracopier::Copy) + transferFile.write(QStringLiteral("Copy;").toUtf8()); + else + transferFile.write(QStringLiteral("Move;").toUtf8()); + } + transferFile.write(QStringLiteral("Ultracopier\n").toUtf8()); + bool haveError=false; + int size=errorLog.size(); + for (int index=0;index +#include +#include "../../../cpp11addition.h" +#include "async/TransferThreadAsync.h" + +// -> add thread safe, by Qt::BlockingQueuedConnection +bool ListThread::haveSameSource(const std::vector &sources) +{ + if(stopIt) + return false; + if(sourceDriveMultiple) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourceDriveMultiple"); + return false; + } + if(sourceDrive.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourceDrive.isEmpty()"); + return true; + } + unsigned int index=0; + while(index add thread safe, by Qt::BlockingQueuedConnection +bool ListThread::haveSameDestination(const std::string &destination) +{ + if(stopIt) + return false; + if(destinationDriveMultiple) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDriveMultiple"); + return false; + } + if(destinationDrive.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDrive.isEmpty()"); + return true; + } + if(driveManagement.getDrive(destination)!=destinationDrive) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination!=destinationDrive"); + return false; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"seam have same destination"); + return true; +} + +/// \return empty if multiple or no destination +std::string ListThread::getUniqueDestinationFolder() const +{ + if(stopIt) + return std::string(); + if(destinationFolderMultiple) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDriveMultiple"); + return std::string(); + } + return TransferThread::internalStringTostring(destinationFolder); +} + +void ListThread::detectDrivesOfCurrentTransfer(const std::vector &sources,const INTERNALTYPEPATH &destination) +{ + /* code to detect volume/mount point to group by windows */ + if(!sourceDriveMultiple) + { + unsigned int index=0; + while(index diskspace_list; + for( auto& spaceDrive : requiredSpace ) { + const QString &drive=QString::fromStdString(spaceDrive.first); + #ifdef Q_OS_WIN32 + if(spaceDrive.first!="A:\\" && spaceDrive.first!="A:/" && spaceDrive.first!="A:" && spaceDrive.first!="A" && spaceDrive.first!="a:\\" && spaceDrive.first!="a:/" && spaceDrive.first!="a:" && spaceDrive.first!="a") + { + #endif + QStorageInfo storageInfo(drive); + storageInfo.refresh(); + const qint64 &availableSpace=storageInfo.bytesAvailable(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + const qint64 &bytesFree=storageInfo.bytesFree(); + #endif + + if(availableSpace<0 || + //workaround for all 0 value in case of bug from Qt + (availableSpace==0 && storageInfo.bytesTotal()==0) + ) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("availableSpace: %1, space needed: %2, on: %3, bytesFree: %4").arg(availableSpace).arg(spaceDrive.second).arg(drive).arg(bytesFree).toStdString()); + } + else if(spaceDrive.second>(quint64)availableSpace) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("availableSpace: %1, space needed: %2, on: %3, bytesFree: %4").arg(availableSpace).arg(spaceDrive.second).arg(drive).arg(bytesFree).toStdString()); + #ifdef Q_OS_WIN32 + //if(drive.contains(QRegularExpression("^[a-zA-Z]:[\\\\/]"))) + if(drive.contains(QRegularExpression("^[a-zA-Z]:"))) + #endif + { + Diskspace diskspace; + diskspace.drive=spaceDrive.first; + diskspace.freeSpace=availableSpace; + diskspace.requiredSpace=spaceDrive.second; + diskspace_list.push_back(diskspace); + } + #ifdef Q_OS_WIN32 + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"not local drive"); + #endif + } + #ifdef Q_OS_WIN32 + } + #endif + } + if(!diskspace_list.empty()) + emit missingDiskSpace(diskspace_list); + return ! diskspace_list.empty(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadNew.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadNew.cpp new file mode 100755 index 0000000..f4a1857 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadNew.cpp @@ -0,0 +1,104 @@ +#include "ListThread.h" +#include +#include +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +// -> add thread safe, by Qt::BlockingQueuedConnection +bool ListThread::newCopy(const std::vector &sources,const std::string &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start: "+stringimplode(sources,";")+", destination: "+destination); + ScanFileOrFolder * scanFileOrFolderThread=newScanThread(Ultracopier::Copy); + if(scanFileOrFolderThread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get new thread"); + return false; + } + std::regex base_regex("^[a-z][a-z][a-z]*:/.*"); + std::smatch base_match; + std::vector sourcesClean; + unsigned int index=0; + while(index "+source); + } + index++; + sourcesClean.push_back(TransferThread::stringToInternalString(source)); + } + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourcesClean: "+stringimplode(sourcesClean,";")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination: "+destination); + const INTERNALTYPEPATH &Wdest=TransferThread::stringToInternalString(destination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination: "+TransferThread::internalStringTostring(Wdest)); + scanFileOrFolderThread->addToList(sourcesClean,Wdest); + scanThreadHaveFinish(true); + detectDrivesOfCurrentTransfer(sourcesClean,TransferThread::stringToInternalString(destination)); + return true; +} + +// -> add thread safe, by Qt::BlockingQueuedConnection +bool ListThread::newMove(const std::vector &sources,const std::string &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + ScanFileOrFolder * scanFileOrFolderThread = newScanThread(Ultracopier::Move); + if(scanFileOrFolderThread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get new thread"); + return false; + } + std::regex base_regex("^[a-z][a-z][a-z]*:/.*"); + std::smatch base_match; + std::vector sourcesClean; + unsigned int index=0; + while(index "+source); + index++; + sourcesClean.push_back(TransferThread::stringToInternalString(source)); + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination: "+destination); + const INTERNALTYPEPATH &Wdest=TransferThread::stringToInternalString(destination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination: "+TransferThread::internalStringTostring(Wdest)); + scanFileOrFolderThread->addToList(sourcesClean,Wdest); + scanThreadHaveFinish(true); + detectDrivesOfCurrentTransfer(sourcesClean,TransferThread::stringToInternalString(destination)); + return true; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadOptions.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadOptions.cpp new file mode 100755 index 0000000..25d710f --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadOptions.cpp @@ -0,0 +1,296 @@ +#include "ListThread.h" +#include +#include +#include "../../../cpp11addition.h" +#include "async/TransferThreadAsync.h" + +//set the copy info and options before runing +void ListThread::setRightTransfer(const bool doRightTransfer) +{ + mkPathQueue.setRightTransfer(doRightTransfer); + this->doRightTransfer=doRightTransfer; + unsigned int index=0; + while(indexsetRightTransfer(doRightTransfer); + index++; + } +} + +//set keep date +void ListThread::setKeepDate(const bool keepDate) +{ + mkPathQueue.setKeepDate(keepDate); + this->keepDate=keepDate; + unsigned int index=0; + while(indexsetKeepDate(keepDate); + index++; + } +} + +void ListThread::setOsSpecFlags(bool os_spec_flags) +{ + this->os_spec_flags=os_spec_flags; + unsigned int index=0; + while(indexsetOsSpecFlags(os_spec_flags); + index++; + } +} + +void ListThread::setNativeCopy(bool native_copy) +{ + this->native_copy=native_copy; + unsigned int index=0; + while(indexsetNativeCopy(native_copy); + index++; + } +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void ListThread::setRsync(const bool rsync) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); + this->rsync=rsync; + unsigned int index=0; + while(indexsetRsync(rsync); + index++; + } + for(unsigned int i=0;isetRsync(rsync); +} +#endif + +//set check destination folder +void ListThread::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) +{ + this->checkDestinationFolderExists=checkDestinationFolderExists; + for(unsigned int i=0;isetCheckDestinationFolderExists(checkDestinationFolderExists && alwaysDoThisActionForFolderExists!=FolderExists_Merge); +} + +void ListThread::setCollisionAction(const FileExistsAction &alwaysDoThisActionForFileExists) +{ + this->alwaysDoThisActionForFileExists=alwaysDoThisActionForFileExists; + unsigned int index=0; + while(indexsetAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + index++; + } +} + +//set the folder local collision +void ListThread::setFolderCollision(const FolderExistsAction &alwaysDoThisActionForFolderExists) +{ + this->alwaysDoThisActionForFolderExists=alwaysDoThisActionForFolderExists; +} + +//speedLimitation in KB/s +bool ListThread::setSpeedLimitation(const int64_t &speedLimitation) +{ + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"maxSpeed in KB/s: "+std::to_string(speedLimitation)); + + if(speedLimitation>1024*1024) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"speedLimitation out of range"); + return false; + } + this->speedLimitation=speedLimitation; + + multiForBigSpeed=0; + if(speedLimitation>0) + { + blockSizeAfterSpeedLimitation=blockSize; + + //try resolv the interval + int newInterval;//in ms + do + { + multiForBigSpeed++; + //at max speed, is out of range for int, it's why quint64 is used + newInterval=(((quint64)blockSize*(quint64)multiForBigSpeed*1000/* *1000 because interval is into ms, not s*/)/((quint64)speedLimitation*(quint64)1024)); + if(newInterval<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"calculated newInterval wrong"); + return false; + } + } + while(newIntervalULTRACOPIER_PLUGIN_MAXTIMERINTERVAL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"wait time too big, then shrink the block size and set interval to max size"); + newInterval=ULTRACOPIER_PLUGIN_MAXTIMERINTERVAL; + multiForBigSpeed=1; + blockSizeAfterSpeedLimitation=(this->speedLimitation*1024*newInterval)/1000; + + if(blockSizeAfterSpeedLimitation<10) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"calculated block size wrong"); + return false; + } + + //set the new block size into the thread + const int &loop_size=transferThreadList.size(); + int int_for_loop=0; + while(int_for_loopsetBlockSize(blockSizeAfterSpeedLimitation)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the block size"); + int_for_loop++; + } + } + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("fixed speed with new block size and new interval in BlockSize: %1, multiForBigSpeed: %2, newInterval: %3, maxSpeed: %4") + .arg(blockSizeAfterSpeedLimitation) + .arg(multiForBigSpeed) + .arg(newInterval) + .arg(speedLimitation) + .toStdString() + ); + + clockForTheCopySpeed->setInterval(newInterval); + if(clockForTheCopySpeed!=NULL) + clockForTheCopySpeed->start(); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"clockForTheCopySpeed == NULL at this point"); + } + else + { + if(clockForTheCopySpeed!=NULL) + clockForTheCopySpeed->stop(); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"clockForTheCopySpeed == NULL at this point"); + int int_for_loop=0; + const int &loop_size=transferThreadList.size(); + while(int_for_loopsetBlockSize(blockSize); + int_for_loop++; + } + } + int int_for_loop=0; + const int &loop_size=transferThreadList.size(); + while(int_for_loopsetMultiForBigSpeed(multiForBigSpeed); + int_for_loop++; + } + + return true; + #else + Q_UNUSED(speedLimitation); + return false; + #endif +} + +//set data local to the thread +void ListThread::setAlwaysFileExistsAction(const FileExistsAction &alwaysDoThisActionForFileExists) +{ + this->alwaysDoThisActionForFileExists=alwaysDoThisActionForFileExists; + unsigned int int_for_loop=0; + while(int_for_loopsetAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + int_for_loop++; + } +} + +/** \brief give the forced mode, to export/import transfer list */ +void ListThread::forceMode(const Ultracopier::CopyMode &mode) +{ + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(mode==Ultracopier::Move) + setRsync(false); + #endif + if(mode==Ultracopier::Copy) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to copy"); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to move"); + this->mode=mode; + forcedMode=true; +} + +void ListThread::setMoveTheWholeFolder(const bool &moveTheWholeFolder) +{ + for(unsigned int i=0;isetMoveTheWholeFolder(moveTheWholeFolder); + this->moveTheWholeFolder=moveTheWholeFolder; +} + +void ListThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) +{ + this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; + unsigned int index=0; + while(indexsetDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); + index++; + } +} + +void ListThread::setInodeThreads(const int &inodeThreads) +{ + if(inodeThreads<1 || inodeThreads>32) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"inodeThreads is out of ranges: "+std::to_string(inodeThreads)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inodeThreads: "+std::to_string(inodeThreads)); + this->inodeThreads=inodeThreads; + createTransferThread(); + deleteTransferThread(); +} + +void ListThread::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"renameTheOriginalDestination: "+std::to_string(renameTheOriginalDestination)); + this->renameTheOriginalDestination=renameTheOriginalDestination; + unsigned int index=0; + while(indexsetRenameTheOriginalDestination(renameTheOriginalDestination); + index++; + } +} + +void ListThread::setCheckDiskSpace(const bool &checkDiskSpace) +{ + this->checkDiskSpace=checkDiskSpace; +} + +void ListThread::setBuffer(const bool &buffer) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"setBuffer: "+std::to_string(buffer)); + this->buffer=buffer; + unsigned int index=0; + while(indexsetBuffer(buffer); + index++; + } +} + +void ListThread::setFollowTheStrictOrder(const bool &order) +{ + this->followTheStrictOrder=order; + for(unsigned int i=0;isetFollowTheStrictOrder(this->followTheStrictOrder); +} + diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadScan.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadScan.cpp new file mode 100755 index 0000000..48cc444 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadScan.cpp @@ -0,0 +1,97 @@ +#include "ListThread.h" +#include +#include +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +ScanFileOrFolder * ListThread::newScanThread(Ultracopier::CopyMode mode) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start with: "+std::to_string(mode)); + + //create new thread because is auto-detroyed + scanFileOrFolderThreadsPool.push_back(new ScanFileOrFolder(mode)); + ScanFileOrFolder * scanFileOrFolderThreads=scanFileOrFolderThreadsPool.back(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::finishedTheListing, this,&ListThread::scanThreadHaveFinishSlot, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::fileTransfer, this,&ListThread::fileTransfer, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::fileTransferWithInode, this,&ListThread::fileTransferWithInode, Qt::QueuedConnection)) + abort(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection)) + abort(); + #endif + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::newFolderListing, this,&ListThread::newFolderListing)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToMovePath, this,&ListThread::addToMovePath, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToKeepAttributePath, this,&ListThread::addToKeepAttributePath, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToRealMove, this,&ListThread::addToRealMove, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToMkPath, this,&ListThread::addToMkPath, Qt::QueuedConnection)) + abort(); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToRmForRsync, this,&ListThread::addToRmForRsync, Qt::QueuedConnection)) + abort(); + #endif + + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::errorOnFolder, this,&ListThread::errorOnFolder, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::folderAlreadyExists, this,&ListThread::folderAlreadyExists, Qt::QueuedConnection)) + abort(); + + if(!connect(this,&ListThread::send_updateMount, scanFileOrFolderThreads,&ScanFileOrFolder::set_updateMount, Qt::QueuedConnection)) + abort(); + + scanFileOrFolderThreads->setFilters(include,exclude); + scanFileOrFolderThreads->setCheckDestinationFolderExists(checkDestinationFolderExists && alwaysDoThisActionForFolderExists!=FolderExists_Merge); + scanFileOrFolderThreads->setMoveTheWholeFolder(moveTheWholeFolder); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + scanFileOrFolderThreads->setRsync(rsync); + #endif + if(scanFileOrFolderThreadsPool.size()==1) + updateTheStatus(); + scanFileOrFolderThreads->setRenamingRules(firstRenamingRule,otherRenamingRule); + scanFileOrFolderThreads->setFollowTheStrictOrder(followTheStrictOrder); + return scanFileOrFolderThreads; +} + +void ListThread::scanThreadHaveFinishSlot() +{ + scanThreadHaveFinish(); +} + +void ListThread::scanThreadHaveFinish(bool skipFirstRemove) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"listing thread have finish, skipFirstRemove: "+std::to_string(skipFirstRemove)); + if(!skipFirstRemove) + { + ScanFileOrFolder * senderThread = qobject_cast(QObject::sender()); + if(senderThread==NULL) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"sender pointer null (plugin copy engine)"); + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start the next thread, scanFileOrFolderThreadsPool.size(): "+std::to_string(scanFileOrFolderThreadsPool.size())); + delete senderThread; + vectorremoveOne(scanFileOrFolderThreadsPool,senderThread); + if(scanFileOrFolderThreadsPool.empty()) + updateTheStatus(); + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start the next thread, scanFileOrFolderThreadsPool.size(): "+std::to_string(scanFileOrFolderThreadsPool.size())); + if(scanFileOrFolderThreadsPool.size()>0) + { + //then start the next listing threads + if(scanFileOrFolderThreadsPool.front()->isFinished()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Start listing thread"); + scanFileOrFolderThreadsPool.front()->start(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"The listing thread is already running"); + } + else + autoStartAndCheckSpace(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadStat.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadStat.cpp new file mode 100755 index 0000000..bbba3ee --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadStat.cpp @@ -0,0 +1,184 @@ +#include "ListThread.h" +#include +#include +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +/// \brief update the transfer stat +void ListThread::newTransferStat(const TransferStat &stat,const quint64 &id) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferStat: "+std::to_string(stat)); + Ultracopier::ReturnActionOnCopyList newAction; + switch(stat) + { + case TransferStat_Idle: + return; + break; + case TransferStat_PreOperation: + return; + break; + case TransferStat_WaitForTheTransfer: + return; + break; + case TransferStat_Transfer: + newAction.type=Ultracopier::Transfer; + break; + case TransferStat_PostTransfer: + case TransferStat_PostOperation: + newAction.type=Ultracopier::PostOperation; + break; + default: + return; + break; + } + newAction.addAction.id = id; + actionDone.push_back(newAction); +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW +void ListThread::timedUpdateDebugDialog() +{ + std::vector newList; + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(indexgetStat()) + { + case TransferStat_Idle: + stat="Idle"; + break; + case TransferStat_PreOperation: + stat="PreOperation"; + break; + case TransferStat_WaitForTheTransfer: + stat="WaitForTheTransfer"; + break; + case TransferStat_Transfer: + stat="Transfer"; + break; + case TransferStat_PostOperation: + stat="PostOperation"; + break; + case TransferStat_PostTransfer: + stat="PostTransfer"; + break; + default: + stat=QStringLiteral("??? (%1)").arg(transferThreadList.at(index)->getStat()); + break; + } + newList.push_back(QStringLiteral("%1) (%3,%4) %2") + .arg(index) + .arg(stat) + .arg(transferThreadList.at(index)->readingLetter()) + .arg(transferThreadList.at(index)->writingLetter()) + .toStdString() + ); + index++; + } + std::vector newList2; + index=0; + const int &loop_size=actionToDoListTransfer.size(); + while(index((inodeThreads+ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER)*2+1)) + { + newList2.push_back("..."); + break; + } + index++; + } + emit updateTheDebugInfo(newList,newList2,numberOfInodeOperation); +} +#endif + +int ListThread::getNumberOfTranferRuning() const +{ + int numberOfTranferRuning=0; + const int &loop_size=transferThreadList.size(); + //lunch the transfer in WaitForTheTransfer + int int_for_loop=0; + while(int_for_loopgetStat()==TransferStat_Transfer && transferThreadList.at(int_for_loop)->transferId!=0 && transferThreadList.at(int_for_loop)->transferSize>=parallelizeIfSmallerThan) + numberOfTranferRuning++; + int_for_loop++; + } + return numberOfTranferRuning; +} + +//send action done +void ListThread::sendActionDone() +{ + if(!actionDone.empty()) + { + emit newActionOnList(actionDone); + actionDone.clear(); + } + if(!timeToTransfer.empty()) + { + emit doneTime(timeToTransfer); + timeToTransfer.clear(); + } +} + +//send progression +void ListThread::sendProgression() +{ + if(actionToDoListTransfer.empty()) + return; + oversize=0; + currentProgression=0; + int int_for_loop=0; + const int &loop_size=transferThreadList.size(); + while(int_for_loopgetStat()) + { + case TransferStat_Transfer: + case TransferStat_PostTransfer: + case TransferStat_PostOperation: + { + copiedSize=temp_transfer_thread->copiedSize(); + + //for the general progression + currentProgression+=copiedSize; + + //the oversize (when the file is bigger after/during the copy then what was during the listing) + if(copiedSize>(qint64)temp_transfer_thread->transferSize) + localOverSize=copiedSize-temp_transfer_thread->transferSize; + else + localOverSize=0; + + //the current size copied + totalSize=temp_transfer_thread->transferSize+localOverSize; + std::pair progression=temp_transfer_thread->progression(); + Ultracopier::ProgressionItem tempItem; + tempItem.currentRead=progression.first; + tempItem.currentWrite=progression.second; + tempItem.id=temp_transfer_thread->transferId; + tempItem.total=totalSize; + progressionList.push_back(tempItem); + + //add the oversize to the general progression + oversize+=localOverSize; + } + break; + default: + break; + } + int_for_loop++; + } + emit pushFileProgression(progressionList); + progressionList.clear(); + emit pushGeneralProgression(bytesTransfered+currentProgression,bytesToTransfer+oversize); + realByteTransfered(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThread_InodeAction.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThread_InodeAction.cpp new file mode 100755 index 0000000..b26cb35 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThread_InodeAction.cpp @@ -0,0 +1,91 @@ +/** \file ListThread_InodeAction.cpp +\brief To be included into ListThread.cpp, to optimize and prevent code duplication +\see ListThread.cpp */ + +#ifdef LISTTHREAD_H + +//do the inode action +ActionToDoInode& currentActionToDoInode=actionToDoListInode[int_for_internal_loop]; +switch(currentActionToDoInode.type) +{ + case ActionType_RealMove: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch real move, source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.source,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + break; + case ActionType_MkPath: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch mkpath, source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.source,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + break; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + case ActionType_RmSync: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch rmsync, source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.destination,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + break; + #endif + case ActionType_MovePath: + //then empty (no file), can try remove it + if(currentActionToDoInode.size==0 || actionToDoListTransfer.empty())//don't put afterTheTransfer because actionToDoListInode_afterTheTransfer -> already afterTheTransfer + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch rmpath: source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.source,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + } + else //have do the destination, put the remove to after + { + currentActionToDoInode.size=0;//why just not do .size--? + actionToDoListInode_afterTheTransfer.push_back(currentActionToDoInode); + actionToDoListInode.erase(actionToDoListInode.cbegin()+int_for_internal_loop); + int_for_internal_loop--; + actionToDoListInode_count--; + if(numberOfInodeOperation>=inodeThreads) + return; + } + break; + case ActionType_SyncDate: + //then empty (no file), can try remove it + if(currentActionToDoInode.size==0 || actionToDoListTransfer.empty())//don't put afterTheTransfer because actionToDoListInode_afterTheTransfer -> already afterTheTransfer + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch rmpath: source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.source,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + } + else //have do the destination, put the remove to after + { + currentActionToDoInode.size=0;//why just not do .size--? + actionToDoListInode_afterTheTransfer.push_back(currentActionToDoInode); + actionToDoListInode.erase(actionToDoListInode.cbegin()+int_for_internal_loop); + int_for_internal_loop--; + actionToDoListInode_count--; + if(numberOfInodeOperation>=inodeThreads) + return; + } + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Wrong type at inode action"); + return; +} + +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/MkPath.cpp b/plugins/CopyEngine/Ultracopier-Spec/MkPath.cpp new file mode 100755 index 0000000..3d6729c --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/MkPath.cpp @@ -0,0 +1,676 @@ +#include "MkPath.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 +#include +#include +#endif + +#ifdef Q_OS_WIN32 + #ifndef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include + #endif +#endif + +#ifdef WIDESTRING +INTERNALTYPEPATH MkPath::text_slash=L"/"; +#else +INTERNALTYPEPATH MkPath::text_slash="/"; +#endif + +MkPath::MkPath() : + waitAction(false), + stopIt(false), + doRightTransfer(false), + keepDate(false), + mkFullPath(false), + doTheDateTransfer(false) +{ + setObjectName("MkPath"); + moveToThread(this); + start(); +} + +MkPath::~MkPath() +{ + stopIt=true; + quit(); + wait(); +} + +void MkPath::addPath(const INTERNALTYPEPATH& source, const INTERNALTYPEPATH& destination, const ActionType &actionType) +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG + #ifdef WIDESTRING + if(destination.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #else + if(destination.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + if(stopIt) + return; + emit internalStartAddPath(source,destination,actionType); +} + +void MkPath::skip() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit internalStartSkip(); +} + +void MkPath::retry() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit internalStartRetry(); +} + +void MkPath::run() +{ + connect(this,&MkPath::internalStartAddPath, this,&MkPath::internalAddPath,Qt::QueuedConnection); + connect(this,&MkPath::internalStartDoThisPath, this,&MkPath::internalDoThisPath,Qt::QueuedConnection); + connect(this,&MkPath::internalStartSkip, this,&MkPath::internalSkip,Qt::QueuedConnection); + connect(this,&MkPath::internalStartRetry, this,&MkPath::internalRetry,Qt::QueuedConnection); + exec(); +} + +void MkPath::internalDoThisPath() +{ + if(waitAction || pathList.empty()) + return; + const Item &item=pathList.front(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(item.destination.find(TransferThread::stringToInternalString("//")) != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(item.source.find(TransferThread::stringToInternalString("//")) != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(item.source)+ + ", destination: "+TransferThread::internalStringTostring(item.destination)+ + ", move: "+std::to_string(item.actionType)); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(item.actionType==ActionType_RmSync) + { + if(item.destination.isFile()) + { + QFile removedFile(item.destination.absoluteFilePath()); + if(!removedFile.remove()) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the inode: "+item.destination+", error: "+removedFile.errorString().toStdString()); + emit errorOnFolder(item.destination,removedFile.errorString().toStdString()); + return; + } + } + else if(!rmpath(item.destination.absoluteFilePath())) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the inode: "+item.destination); + emit errorOnFolder(item.destination,tr("Unable to remove").toStdString()); + return; + } + pathList.removeFirst(); + emit firstFolderFinish(); + checkIfCanDoTheNext(); + return; + } + #endif + doTheDateTransfer=false; + if(keepDate) + { + const int64_t &sourceLastModified=TransferThread::readFileMDateTime(item.source); + if(!TransferThread::exists(item.source)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"the sources not exists: "+TransferThread::internalStringTostring(item.source)); + doTheDateTransfer=false; + } + else if(ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS>=sourceLastModified) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"the sources is older to copy the time: "+TransferThread::internalStringTostring(item.source)+ + ": "+QDateTime::fromMSecsSinceEpoch((uint64_t)ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS*(uint64_t)1000).toString("dd.MM.yyyy hh:mm:ss.zzz").toStdString()+ + ">="+QDateTime::fromMSecsSinceEpoch((uint64_t)sourceLastModified*(uint64_t)1000).toString("dd.MM.yyyy hh:mm:ss.zzz").toStdString()); + doTheDateTransfer=false; + } + else + { + doTheDateTransfer=readFileDateTime(item.source); + /*if(!doTheDateTransfer) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to get source folder time: "+item.source.absoluteFilePath()); + emit errorOnFolder(item.source,tr("Unable to get time")); + return; + }*/ + } + } + if(TransferThread::is_dir(item.destination) && item.actionType==ActionType_RealMove) + pathList.front().actionType=ActionType_MovePath; + if(item.actionType!=ActionType_RealMove) + { + if(!TransferThread::is_dir(item.destination)) + { + if(mkFullPath) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferThread::mkpath: "+TransferThread::internalStringTostring(item.destination)); + if(!TransferThread::mkpath(item.destination)) + { + if(!TransferThread::is_dir(item.destination)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+ + TransferThread::internalStringTostring(item.destination)+ + #ifdef Q_OS_WIN32 + ", LastError: "+TransferThread::GetLastErrorStdStr() + #else + ", errno: "+std::to_string(errno) + #endif + ); + emit errorOnFolder(item.destination,tr("Unable to create the folder").toStdString()); + return; + } + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferThread::mkdir: "+TransferThread::internalStringTostring(item.destination)); + if(!TransferThread::mkdir(item.destination)) + { + if(!TransferThread::is_dir(item.destination)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+ + TransferThread::internalStringTostring(item.destination)+ + #ifdef Q_OS_WIN32 + ", LastError: "+TransferThread::GetLastErrorStdStr() + #else + ", errno: "+std::to_string(errno) + #endif + ); + emit errorOnFolder(item.destination,tr("Unable to create the folder").toStdString()); + return; + } + } + } + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferThread::mkpath ignore exists: "+TransferThread::internalStringTostring(item.destination)); + } + else + { + if(!TransferThread::is_dir(item.source)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The source folder don't exists: "+TransferThread::internalStringTostring(item.source)); + emit errorOnFolder(item.destination,tr("The source folder don't exists").toStdString()); + return; + } + if(!TransferThread::is_dir(item.source))//it's really an error? + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The source is not a folder: "+TransferThread::internalStringTostring(item.source)); + /*if(stopIt) + return; + waitAction=true; + emit errorOnFolder(item.destination,tr("The source is not a folder")); + return;*/ + } + if(stringStartWith(item.destination,(item.source+text_slash))) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"move into it self: "+TransferThread::internalStringTostring(item.destination)); + int random=rand(); + INTERNALTYPEPATH tempFolder=FSabsolutePath(item.source)+text_slash+TransferThread::stringToInternalString(std::to_string(random)); + while(TransferThread::is_dir(tempFolder)) + { + random=rand(); + tempFolder=FSabsolutePath(item.source)+text_slash+TransferThread::stringToInternalString(std::to_string(random)); + } + if(!TransferThread::rename(item.source,tempFolder)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to temporary rename the folder: "+TransferThread::internalStringTostring(item.destination)); + emit errorOnFolder(item.destination,tr("Unable to temporary rename the folder").toStdString()); + return; + } + /* http://doc.qt.io/qt-5/qdir.html#rename + * On most file systems, rename() fails only if oldName does not exist, or if a file with the new name already exists. + if(!dir.mkpath(FSabsolutePath(item.destination))) + { + if(!dir.exists(FSabsolutePath(item.destination))) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+item.destination.absoluteFilePath()); + emit errorOnFolder(item.destination,tr("Unable to create the folder")); + return; + } + }*/ + if(!TransferThread::rename(tempFolder,item.destination)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to do the final real move the folder: "+TransferThread::internalStringTostring(item.destination)); + emit errorOnFolder(item.destination,tr("Unable to do the final real move the folder").toStdString()); + return; + } + } + else + { + /* http://doc.qt.io/qt-5/qdir.html#rename + * On most file systems, rename() fails only if oldName does not exist, or if a file with the new name already exists. + if(!dir.mkpath(FSabsolutePath(item.destination))) + { + if(!dir.exists(FSabsolutePath(item.destination))) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+item.destination.absoluteFilePath()); + emit errorOnFolder(item.destination,tr("Unable to create the folder")); + return; + } + }*/ + if(!TransferThread::rename(item.source,item.destination)!=0) + { + if(stopIt) + return; + waitAction=true; + #ifdef Q_OS_WIN32 + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: from: "+TransferThread::internalStringTostring(item.source)+", soruce exists: "+ + std::to_string(TransferThread::is_dir(item.source))+", to: "+TransferThread::internalStringTostring(item.destination) + +", destination exist: "+std::to_string(TransferThread::is_dir(item.destination))+": "+strError + ); + emit errorOnFolder(item.destination,tr("Unable to move the folder").toStdString()+": "+strError); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: from: "+TransferThread::internalStringTostring(item.source)+", soruce exists: "+ + std::to_string(TransferThread::is_dir(item.source))+", to: "+TransferThread::internalStringTostring(item.destination) + +", destination exist: "+std::to_string(TransferThread::is_dir(item.destination))+": "+std::to_string(errno) + ); + emit errorOnFolder(item.destination,tr("Unable to move the folder: errno: %1").arg(errno).toStdString()); + #endif + return; + } + } + } + if(doTheDateTransfer) + if(!writeFileDateTime(item.destination)) + { + if(!TransferThread::exists(item.destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time (not exists): "+TransferThread::internalStringTostring(item.destination)); + else if(!TransferThread::is_dir(item.destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time (not a dir): "+TransferThread::internalStringTostring(item.destination)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time: "+TransferThread::internalStringTostring(item.destination)); + /*if(stopIt) + return; + waitAction=true; + + emit errorOnFolder(item.source,tr("Unable to set time")); + return;*/ + } + if(doRightTransfer && item.actionType!=ActionType_RealMove) + { + #ifdef Q_OS_UNIX + struct stat permissions; + if(stat(TransferThread::internalStringTostring(item.source).c_str(), &permissions)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to get the right: "+TransferThread::internalStringTostring(item.destination)); + else + { + if(chmod(TransferThread::internalStringTostring(item.destination).c_str(), permissions.st_mode)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to chmod the right: "+TransferThread::internalStringTostring(item.destination)); + if(chown(TransferThread::internalStringTostring(item.destination).c_str(), permissions.st_uid, permissions.st_gid)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to chown the right: "+TransferThread::internalStringTostring(item.destination)); + } + #else + PSECURITY_DESCRIPTOR PSecurityD; + PACL dacl; + + HANDLE hFile = CreateFileW(item.source.c_str(), GENERIC_READ , + FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hFile == INVALID_HANDLE_VALUE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning, + std::string("CreateFile() failed. Error: INVALID_HANDLE_VALUE ")+TransferThread::internalStringTostring(item.source).c_str()+", GetLastError(): "+std::to_string(GetLastError()) + ); + else + { + DWORD lasterror = GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, + NULL, NULL, &dacl, NULL, &PSecurityD); + CloseHandle(hFile); + if (lasterror != ERROR_SUCCESS) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"GetSecurityInfo() failed. Error"+std::to_string(lasterror)); + else + { + hFile = CreateFileW(item.destination.c_str(),READ_CONTROL | WRITE_OWNER | WRITE_DAC | ACCESS_SYSTEM_SECURITY , + 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hFile == INVALID_HANDLE_VALUE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"CreateFile() failed. Error: INVALID_HANDLE_VALUE"); + else + { + lasterror = SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION , NULL, NULL, dacl, NULL); + if (lasterror != ERROR_SUCCESS) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"GetSecurityInfo() failed. Error"+std::to_string(lasterror)); + } + //free(dacl); + //free(PSecurityD); + CloseHandle(hFile); + } + } + #endif + } + if(item.actionType==ActionType_MovePath) + { + if(!rmpath(item.source)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the source folder: "+TransferThread::internalStringTostring(item.destination)); + emit errorOnFolder(item.source,tr("Unable to remove").toStdString()); + return; + } + } + pathList.erase(pathList.cbegin()); + emit firstFolderFinish(); + checkIfCanDoTheNext(); +} + +void MkPath::internalAddPath(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const ActionType &actionType) +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG + #ifdef WIDESTRING + if(destination.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #else + if(destination.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + Item tempPath; + tempPath.source=source; + tempPath.destination=destination; + tempPath.actionType=actionType; + pathList.push_back(tempPath); + if(!waitAction) + checkIfCanDoTheNext(); +} + +void MkPath::checkIfCanDoTheNext() +{ + if(!waitAction && !stopIt && pathList.size()>0) + emit internalStartDoThisPath(); +} + +void MkPath::internalSkip() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + waitAction=false; + pathList.erase(pathList.cbegin()); + emit firstFolderFinish(); + checkIfCanDoTheNext(); +} + +void MkPath::internalRetry() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + waitAction=false; + checkIfCanDoTheNext(); +} + +void MkPath::setRightTransfer(const bool doRightTransfer) +{ + this->doRightTransfer=doRightTransfer; +} + +void MkPath::setKeepDate(const bool keepDate) +{ + this->keepDate=keepDate; +} + +void MkPath::setMkFullPath(const bool mkFullPath) +{ + this->mkFullPath=mkFullPath; +} + +bool MkPath::rmpath(const INTERNALTYPEPATH &dir + #ifdef ULTRACOPIER_PLUGIN_RSYNC + ,const bool &toSync + #endif + ) +{ + if(!TransferThread::is_dir(dir)) + return false; + bool allHaveWork=true; + #ifdef Q_OS_UNIX + std::vector list; + if(!TransferThread::entryInfoList(dir,list)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"folder list error: "+TransferThread::internalStringTostring(dir)+", errno: "+std::to_string(errno)); + return false; + } + for (unsigned int i = 0; i < list.size(); ++i) + { + TransferThread::dirent_uc fileInfo=list.at(i); + if(!fileInfo.isFolder) + { + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(toSync) + { + QFile file(fileInfo.absoluteFilePath()); + if(!file.remove()) + { + QFile file(fileInfo.absoluteFilePath()); + if(!file.remove()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to remove a file: "+fileInfo+", due to: "+file.errorString().toStdString()); + allHaveWork=false; + } + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+fileInfo.fileName().toStdString()); + allHaveWork=false; + } + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+TransferThread::internalStringTostring(fileInfo.d_name)); + allHaveWork=false; + #endif + } + else + { + //return the fonction for scan the new folder + if(!rmpath(FSabsolutePath(dir)+TransferThread::stringToInternalString("/")+fileInfo.d_name+TransferThread::stringToInternalString("/"))) + allHaveWork=false; + } + } + #else + HANDLE hFind = NULL; + allHaveWork=true; + WIN32_FIND_DATAW fdFile; + if((hFind = FindFirstFileW((TransferThread::toFinalPath(dir)+L"\\*").c_str(), &fdFile)) == INVALID_HANDLE_VALUE) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"folder list error: "+TransferThread::internalStringTostring(dir)+", errno: "+std::to_string(errno)); + return false; + } + + if(allHaveWork) + do + { + #ifdef WIDESTRING + if(wcscmp(fdFile.cFileName, L".")!=0 && wcscmp(fdFile.cFileName, L"..")!=0) + #else + if(strcmp(fdFile.cFileName, ".")!=0 && strcmp(fdFile.cFileName, "..")!=0) + #endif + { + if(fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + //return the fonction for scan the new folder + #ifdef WIDESTRING + if(!rmpath(dir+L'\\'+fdFile.cFileName+L'/')) + #else + if(!rmpath(dir+'\\'+fdFile.cFileName+'/')) + #endif + allHaveWork=false; + } + else + { + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(toSync) + { + QFile file(fileInfo.absoluteFilePath()); + if(!file.remove()) + { + QFile file(fileInfo.absoluteFilePath()); + if(!file.remove()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to remove a file: "+fileInfo+", due to: "+file.errorString().toStdString()); + allHaveWork=false; + } + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+fileInfo.fileName().toStdString()); + allHaveWork=false; + } + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+TransferThread::internalStringTostring(fdFile.cFileName)); + allHaveWork=false; + #endif + } + } + } + while(FindNextFileW(hFind, &fdFile)); + FindClose(hFind); + #endif + if(!allHaveWork) + return false; + allHaveWork=TransferThread::rmdir(dir); + if(!allHaveWork) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to remove the folder: "+TransferThread::internalStringTostring(FSabsolutePath(dir))); + return allHaveWork; +} + +//fonction to edit the file date time +bool MkPath::readFileDateTime(const INTERNALTYPEPATH &source) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"readFileDateTime("+TransferThread::internalStringTostring(source)+")"); + /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ + #ifdef Q_OS_UNIX + struct stat info; + if(stat(TransferThread::internalStringTostring(source).c_str(),&info)!=0) + return false; + #ifdef Q_OS_MAC + time_t ctime=info.st_ctimespec.tv_sec; + time_t actime=info.st_atimespec.tv_sec; + time_t modtime=info.st_mtimespec.tv_sec; + //this function avalaible on unix and mingw + butime.actime=actime; + butime.modtime=modtime; + #else + time_t ctime=info.st_ctim.tv_sec; + time_t actime=info.st_atim.tv_sec; + time_t modtime=info.st_mtim.tv_sec; + //this function avalaible on unix and mingw + butime.actime=actime; + butime.modtime=modtime; + #endif + Q_UNUSED(ctime); + return true; + #else + #ifdef Q_OS_WIN32 + HANDLE hFileSouce = CreateFileW(TransferThread::toFinalPath(source).c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY | FILE_FLAG_BACKUP_SEMANTICS, NULL); + if(hFileSouce == INVALID_HANDLE_VALUE) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"open failed to read: "+TransferThread::internalStringTostring(source)+", error: "+std::to_string(GetLastError())); + return false; + } + FILETIME ftCreate, ftAccess, ftWrite; + if(!GetFileTime(hFileSouce, &ftCreate, &ftAccess, &ftWrite)) + { + CloseHandle(hFileSouce); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get the file time"); + return false; + } + this->ftCreate=ftCreate; + this->ftAccess=ftAccess; + this->ftWrite=ftWrite; + CloseHandle(hFileSouce); + return true; + #else + return false; + #endif + #endif + return false; +} + +bool MkPath::writeFileDateTime(const INTERNALTYPEPATH &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"writeFileDateTime("+TransferThread::internalStringTostring(destination)+")"); + /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ + #ifdef Q_OS_UNIX + #ifdef Q_OS_LINUX + return utime(TransferThread::internalStringTostring(destination).c_str(),&butime)==0; + #else //mainly for mac + return utime(TransferThread::internalStringTostring(destination).c_str(),&butime)==0; + #endif + #else + #ifdef Q_OS_WIN32 + HANDLE hFileDestination = CreateFileW(TransferThread::toFinalPath(destination).c_str(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if(hFileDestination == INVALID_HANDLE_VALUE) + { + #ifdef ULTRACOPIER_PLUGIN_DEBUG + wchar_t filePath[65535]; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"open failed to write: "+QString::fromWCharArray(filePath).toStdString()+", error: "+std::to_string(GetLastError())); + #endif + return false; + } + FILETIME ftCreate, ftAccess, ftWrite; + ftCreate=this->ftCreate; + ftAccess=this->ftAccess; + ftWrite=this->ftWrite; + if(!SetFileTime(hFileDestination, &ftCreate, &ftAccess, &ftWrite)) + { + CloseHandle(hFileDestination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the file time"); + return false; + } + CloseHandle(hFileDestination); + return true; + #else + return false; + #endif + #endif + return false; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/MkPath.h b/plugins/CopyEngine/Ultracopier-Spec/MkPath.h new file mode 100755 index 0000000..1b3a674 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/MkPath.h @@ -0,0 +1,100 @@ +/** \file MkPath.h +\brief Make the path given as queued mkpath +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef MKPATH_H +#define MKPATH_H + +#include +#include +#include +#include +#include +#include + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +#include "Environment.h" + +#ifdef Q_OS_UNIX + #include + #include + #include + #include +#else + #ifdef Q_OS_WIN32 + #include + #endif +#endif + +/// \brief Make the path given as queued mkpath +class MkPath : public QThread +{ + Q_OBJECT +public: + explicit MkPath(); + ~MkPath(); + /// \brief add path to make + void addPath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination,const ActionType &actionType); + void setRightTransfer(const bool doRightTransfer); + void setKeepDate(const bool keepDate); + void setMkFullPath(const bool mkFullPath); +signals: + void errorOnFolder(const INTERNALTYPEPATH &,const std::string &,const ErrorType &errorType=ErrorType_FolderWithRety) const; + void firstFolderFinish(); + void internalStartAddPath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const ActionType &actionType) const; + void internalStartDoThisPath() const; + void internalStartSkip() const; + void internalStartRetry() const; + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; +public slots: + /// \brief skip after creation error + void skip(); + /// \brief retry after creation error + void retry(); +private: + void run(); + bool waitAction; + bool stopIt; + bool skipIt; + struct Item + { + INTERNALTYPEPATH source; + INTERNALTYPEPATH destination; + ActionType actionType; + }; + std::vector pathList; + void checkIfCanDoTheNext(); + bool doRightTransfer; + bool keepDate; + bool mkFullPath; + bool doTheDateTransfer; + #ifdef Q_OS_UNIX + utimbuf butime; + #else + #ifdef Q_OS_WIN32 + FILETIME ftCreate, ftAccess, ftWrite; + #endif + #endif + //fonction to edit the file date time + bool readFileDateTime(const INTERNALTYPEPATH &source); + bool writeFileDateTime(const INTERNALTYPEPATH &destination); + static INTERNALTYPEPATH text_slash; +private slots: + void internalDoThisPath(); + void internalAddPath(const INTERNALTYPEPATH& source, const INTERNALTYPEPATH& destination,const ActionType &actionType); + void internalSkip(); + void internalRetry(); + bool rmpath(const INTERNALTYPEPATH &dir + #ifdef ULTRACOPIER_PLUGIN_RSYNC + , const bool &toSync=false + #endif + ); +}; + +#endif // MKPATH_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/README.md b/plugins/CopyEngine/Ultracopier-Spec/README.md new file mode 100755 index 0000000..a15b943 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/README.md @@ -0,0 +1,3 @@ +# Copy Engine: Ultracopier + +This is the default copy engine. diff --git a/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.cpp b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.cpp new file mode 100755 index 0000000..8c0d698 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.cpp @@ -0,0 +1,96 @@ +#include "RenamingRules.h" +#include "ui_RenamingRules.h" + +#include + +RenamingRules::RenamingRules(QWidget *parent) : + QDialog(parent), + ui(new Ui::RenamingRules) +{ + ui->setupUi(this); + connectUI(); + setRenamingRules("",""); +} + +RenamingRules::~RenamingRules() +{ + delete ui; +} + +void RenamingRules::on_buttonBox_clicked(QAbstractButton *button) +{ + if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) + reject(); + if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::ResetRole) + { + setRenamingRules("",""); + emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); + } +} + +void RenamingRules::setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) +{ + disconnectUI(); + if(firstRenamingRule.find("%name%")==std::string::npos || firstRenamingRule.find("%suffix%")==std::string::npos) + firstRenamingRule.clear(); + if(otherRenamingRule.find("%name%")==std::string::npos || otherRenamingRule.find("%suffix%")==std::string::npos + || otherRenamingRule.find("%number%")==std::string::npos) + otherRenamingRule.clear(); + + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + + if(!firstRenamingRule.empty()) + ui->firstRenamingRule->setText(QString::fromStdString(firstRenamingRule)); + else + ui->firstRenamingRule->setText(tr("%1 - copy%2").arg(QStringLiteral("%name%")).arg(QStringLiteral("%suffix%"))); + if(!otherRenamingRule.empty()) + ui->otherRenamingRule->setText(QString::fromStdString(otherRenamingRule)); + else + ui->otherRenamingRule->setText(tr("%1 - copy (%2)%3").arg(QStringLiteral("%name%")).arg(QStringLiteral("%number%")).arg(QStringLiteral("%suffix%"))); + connectUI(); +} + +void RenamingRules::connectUI() +{ + connect(ui->firstRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::firstRenamingRule_haveChanged); + connect(ui->otherRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::otherRenamingRule_haveChanged); +} + +void RenamingRules::disconnectUI() +{ + disconnect(ui->firstRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::firstRenamingRule_haveChanged); + disconnect(ui->otherRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::otherRenamingRule_haveChanged); +} + +void RenamingRules::firstRenamingRule_haveChanged() +{ + QString newValue=ui->firstRenamingRule->text(); + if(!newValue.contains("%name%") || !newValue.contains("%suffix%")) + newValue.clear(); + if(newValue==tr("%1 - copy%2").arg(QStringLiteral("%name%")).arg(QStringLiteral("%name%"))) + newValue=QStringLiteral(""); + if(newValue.toStdString()==firstRenamingRule) + return; + firstRenamingRule=newValue.toStdString(); + emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +void RenamingRules::otherRenamingRule_haveChanged() +{ + QString newValue=ui->otherRenamingRule->text(); + if(!newValue.contains("%name%") || !newValue.contains("%suffix%") || !newValue.contains("%number%")) + newValue.clear(); + if(newValue==tr("%1 - copy (%2)%3").arg(QStringLiteral("%name%")).arg(QStringLiteral("%number%")).arg(QStringLiteral("%name%"))) + newValue=QStringLiteral(""); + if(newValue.toStdString()==otherRenamingRule) + return; + otherRenamingRule=newValue.toStdString(); + emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +void RenamingRules::newLanguageLoaded() +{ + ui->retranslateUi(this); + setRenamingRules(firstRenamingRule,otherRenamingRule); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.h b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.h new file mode 100755 index 0000000..b2e9d02 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.h @@ -0,0 +1,34 @@ +#ifndef RENAMINGRULES_H +#define RENAMINGRULES_H + +#include +#include + +namespace Ui { +class RenamingRules; +} + +/** Define rules for renaming */ +class RenamingRules : public QDialog +{ + Q_OBJECT +public: + explicit RenamingRules(QWidget *parent = 0); + ~RenamingRules(); + void setRenamingRules(std::string firstRenamingRule, std::string otherRenamingRule); + void newLanguageLoaded(); +private: + Ui::RenamingRules *ui; + void connectUI(); + void disconnectUI(); + std::string firstRenamingRule; + std::string otherRenamingRule; +private slots: + void on_buttonBox_clicked(QAbstractButton *button); + void firstRenamingRule_haveChanged(); + void otherRenamingRule_haveChanged(); +signals: + void sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) const; +}; + +#endif // RENAMINGRULES_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.ui b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.ui new file mode 100755 index 0000000..0219249 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.ui @@ -0,0 +1,134 @@ + + + RenamingRules + + + + 0 + 0 + 491 + 293 + + + + Renaming rules + + + + 2 + + + 2 + + + 2 + + + 2 + + + 2 + + + + + First renaming + + + + + + %name% - copy%suffix% + + + + + + + + + + Second renaming + + + + + + %name% - copy (%number%)%suffix% + + + + + + + + + + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> + + + true + + + + + + + Qt::Vertical + + + + 20 + 1 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::RestoreDefaults + + + + + + + + + buttonBox + accepted() + RenamingRules + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + RenamingRules + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.cpp b/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.cpp new file mode 100755 index 0000000..014585d --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.cpp @@ -0,0 +1,953 @@ +#include "ScanFileOrFolder.h" +#include "TransferThread.h" +#include +#include +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include +#endif + +#ifdef WIDESTRING +std::wstring ScanFileOrFolder::text_slash=L"/"; +std::wstring ScanFileOrFolder::text_antislash=L"\\"; +std::wstring ScanFileOrFolder::text_dot=L"."; +#else +std::string ScanFileOrFolder::text_slash="/"; +std::string ScanFileOrFolder::text_antislash="\\"; +std::string ScanFileOrFolder::text_dot="."; +#endif + +ScanFileOrFolder::ScanFileOrFolder(const Ultracopier::CopyMode &mode) : + moveTheWholeFolder(false), + stopIt(false), + stopped(false), + folderExistsAction(FolderExistsAction::FolderExists_NotSet), + fileErrorAction(FileErrorAction::FileError_NotSet), + checkDestinationExists(false), + copyListOrder(false), + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync(false), + #endif + mode(Ultracopier::CopyMode::Copy), + reloadTheNewFilters(false), + haveFilters(false) +{ + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync = false; + #endif + moveTheWholeFolder = true; + stopped = true; + stopIt = false; + this->mode = mode; + folder_isolation = std::regex("^(.*/)?([^/]+)/$"); + setObjectName(QStringLiteral("ScanFileOrFolder")); + /*#ifdef Q_OS_WIN32 + QString userName; + DWORD size=255; + WCHAR * userNameW=new WCHAR[size]; + if(GetUserNameW(userNameW,&size)) + { + userName=QString::fromWCharArray(userNameW,size-1); + blackList.push_back(QFileInfo(QStringLiteral("C:/Users/%1/AppData/Roaming/").arg(userName))); + } + delete userNameW; + #endif*/ +} + +ScanFileOrFolder::~ScanFileOrFolder() +{ + stop(); + quit(); + wait(); +} + +bool ScanFileOrFolder::isFinished() const +{ + return stopped; +} + +void ScanFileOrFolder::addToList(const std::vector& sources,const INTERNALTYPEPATH& destination) +{ + stopIt=false; + this->sources=parseWildcardSources(sources); + this->destination=destination; + #ifdef WIDESTRING + QFileInfo destinationInfo(QString::fromStdWString(this->destination)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"check symblink: "+destinationInfo.absoluteFilePath().toStdString()+", destination: "+TransferThread::internalStringTostring(destination)); + #ifdef WIDESTRING + while(TransferThread::is_symlink(destinationInfo.absoluteFilePath().toStdWString())) + #else + while(TransferThread::is_symlink(destinationInfo.absoluteFilePath().toStdString())) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"resolv destination to: "+destinationInfo.symLinkTarget().toStdString()); + if(QFileInfo(destinationInfo.symLinkTarget()).isAbsolute()) + this->destination=destinationInfo.symLinkTarget().toStdWString(); + else + this->destination=destinationInfo.absolutePath().toStdWString()+text_slash+destinationInfo.symLinkTarget().toStdWString(); + destinationInfo.setFile(QString::fromStdWString(this->destination)); + } + if(sources.size()>1 || QFileInfo(QString::fromStdWString(destination)).isDir()) + /* Disabled because the separator transformation product bug + * if(!destination.endsWith(QDir::separator())) + this->destination+=QDir::separator();*/ + if(!stringEndsWith(destination,'/') && !stringEndsWith(destination,'\\')) + this->destination+=text_slash;//put unix separator because it's transformed into that's under windows too + #else + QFileInfo destinationInfo(QString::fromStdString(this->destination)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"check symblink: "+destinationInfo.absoluteFilePath().toStdString()); + while(destinationInfo.isSymLink()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"resolv destination to: "+destinationInfo.symLinkTarget().toStdString()); + if(QFileInfo(destinationInfo.symLinkTarget()).isAbsolute()) + this->destination=destinationInfo.symLinkTarget().toStdString(); + else + this->destination=destinationInfo.absolutePath().toStdString()+text_slash+destinationInfo.symLinkTarget().toStdString(); + destinationInfo.setFile(QString::fromStdString(this->destination)); + } + if(sources.size()>1 || QFileInfo(QString::fromStdString(destination)).isDir()) + /* Disabled because the separator transformation product bug + * if(!destination.endsWith(QDir::separator())) + this->destination+=QDir::separator();*/ + if(!stringEndsWith(destination,'/') && !stringEndsWith(destination,'\\')) + this->destination+=text_slash;//put unix separator because it's transformed into that's under windows too + #endif + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"addToList("+stringimplode(sources,";")+","+this->destination+")"); +} + + +std::vector ScanFileOrFolder::parseWildcardSources(const std::vector &sources) const +{ + std::regex splitFolder("[/\\\\]"); + std::vector returnList; + unsigned int index=0; + while(index<(unsigned int)sources.size()) + { + std::string sourceAt=TransferThread::internalStringTostring(sources.at(index)); + if(sourceAt.find("*") != std::string::npos) + { + std::vector toParse=stringregexsplit(sourceAt,splitFolder); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"before wildcard parse: "+sourceAt+", toParse: "+stringimplode(toParse,", ")); + std::vector > recomposedSource; + { + std::vector t; + t.push_back(""); + recomposedSource.push_back(t); + } + while(toParse.size()>0) + { + if(toParse.front().find("*") != std::string::npos) + { + std::string toParseFirst=toParse.front(); + if(toParseFirst.empty()) + toParseFirst=TransferThread::internalStringTostring(text_slash); + std::vector > newRecomposedSource; + stringreplaceAll(toParseFirst,"*","[^/\\\\]*"); + std::regex toResolv=std::regex(toParseFirst); + unsigned int index_recomposedSource=0; + while(index_recomposedSource list; + + if(TransferThread::is_dir(fileInfo.c_str())) + { + if(TransferThread::entryInfoList(TransferThread::stringToInternalString(fileInfo),list)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list the folder: "+fileInfo+", with the wildcard: "+toParseFirst); + unsigned int index_fileList=0; + while(index_fileList tempList=recomposedSource.at(index_recomposedSource); + tempList.push_back(fileName); + newRecomposedSource.push_back(tempList); + } + index_fileList++; + } + } + } + index_recomposedSource++; + } + recomposedSource=newRecomposedSource; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"add toParse: "+stringimplode(toParse,TransferThread::internalStringTostring(text_slash))); + unsigned int index_recomposedSource=0; + while(index_recomposedSource &include, const std::vector &exclude) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QMutexLocker lock(&filtersMutex); + this->include_send=include; + this->exclude_send=exclude; + reloadTheNewFilters=true; + haveFilters=include_send.size()>0 || exclude_send.size()>0; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"haveFilters: "+std::to_string(haveFilters)+", include_send.size(): "+std::to_string(include_send.size())+", exclude_send.size(): "+std::to_string(exclude_send.size())); +} + +//set action if Folder are same or exists +void ScanFileOrFolder::setFolderExistsAction(const FolderExistsAction &action, const std::string &newName) +{ + this->newName=TransferThread::stringToInternalString(newName); + folderExistsAction=action; + waitOneAction.release(); +} + +//set action if error +void ScanFileOrFolder::setFolderErrorAction(const FileErrorAction &action) +{ + fileErrorAction=action; + waitOneAction.release(); +} + +void ScanFileOrFolder::stop() +{ + stopIt=true; + waitOneAction.release(); +} + +void ScanFileOrFolder::run() +{ + stopped=false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice, + "start the listing with destination: "+TransferThread::internalStringTostring(destination)+", mode: "+std::to_string(mode)); + #ifdef Q_OS_UNIX + destination=resolvDestination(destination); + #endif + #ifdef WIDESTRING + stringreplaceAll(destination,L"\\",L"/"); + #else + stringreplaceAll(destination,"\\","/"); + #endif + if(stopIt) + { + stopped=true; + return; + } + if(fileErrorAction==FileError_Skip) + { + stopped=true; + return; + } + unsigned int sourceIndex=0; + while(sourceIndex entryList; + do + { + fileErrorAction=FileError_NotSet; + if(!TransferThread::entryInfoList(source,entryList)) + { + #ifdef Q_OS_UNIX + int saveerrno=errno; + const std::string &errorStr=strerror(saveerrno); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Problem with the folder "+TransferThread::internalStringTostring(source)+" to read: "+std::to_string(saveerrno)); + emit errorOnFolder(source,tr("Problem with folder read").toStdString()+": "+errorStr); + #else + const std::string &errorStr=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Problem with the folder "+TransferThread::internalStringTostring(source)+" to read: "+errorStr); + emit errorOnFolder(source,tr("Problem with folder read").toStdString()+": "+errorStr); + #endif + waitOneAction.acquire(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionNum: "+std::to_string(fileErrorAction)); + } + } while(fileErrorAction==FileError_Retry); + + if(copyListOrder) + std::sort(entryList.begin(), entryList.end(), [](TransferThread::dirent_uc a, TransferThread::dirent_uc b) { + return a.d_nameinclude=this->include_send; + this->exclude=this->exclude_send; + } + const INTERNALTYPEPATH &fileName=fileInfo.d_name; + if(fileInfo.isFolder) + { + bool excluded=false,included=(include.size()==0); + unsigned int filters_index=0; + while(filters_indexcheckDestinationExists=checkDestinationFolderExists; +} + +void ScanFileOrFolder::setRenamingRules(const std::string &firstRenamingRule, const std::string &otherRenamingRule) +{ + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; +} + +void ScanFileOrFolder::setMoveTheWholeFolder(const bool &moveTheWholeFolder) +{ + this->moveTheWholeFolder=moveTheWholeFolder; +} + +void ScanFileOrFolder::setFollowTheStrictOrder(const bool &order) +{ + this->copyListOrder=order; +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void ScanFileOrFolder::setRsync(const bool rsync) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); + this->rsync=rsync; +} +#endif + +void ScanFileOrFolder::set_updateMount() +{ + driveManagement.tryUpdate(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.h b/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.h new file mode 100755 index 0000000..f74d355 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.h @@ -0,0 +1,118 @@ +/** \file scanFileOrFolder.h +\brief Thread changed to list recursively the folder +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Environment.h" +#include "DriveManagement.h" +#include "TransferThread.h" + +#ifndef SCANFILEORFOLDER_H +#define SCANFILEORFOLDER_H + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +/// \brief Thread changed to list recursively the folder +class ScanFileOrFolder : public QThread +{ + Q_OBJECT +public: + explicit ScanFileOrFolder(const Ultracopier::CopyMode &mode); + ~ScanFileOrFolder(); + /// \brief to the a folder listing + void stop(); + /// \brief to get if is finished + bool isFinished() const; + /// \brief set action if Folder are same or exists + void setFolderExistsAction(const FolderExistsAction &action, const std::string &newName=std::string()); + /// \brief set action if error + void setFolderErrorAction(const FileErrorAction &action); + /// \brief set if need check if the destination exists + void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); + void setRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); + void setMoveTheWholeFolder(const bool &moveTheWholeFolder); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void setRsync(const bool rsync); + #endif +signals: + void fileTransfer(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const Ultracopier::CopyMode &mode) const; + void fileTransferWithInode(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const Ultracopier::CopyMode &mode,const TransferThread::dirent_uc &inode) const; + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; + void folderAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame) const; + void errorOnFolder(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,const ErrorType &errorType=ErrorType_FolderWithRety) const; + void finishedTheListing() const; + + void newFolderListing(const std::string &path) const; + void addToMkPath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inode) const; + void addToMovePath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inodeToRemove) const; + void addToKeepAttributePath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inodeToRemove) const; + void addToRealMove(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination) const; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void addToRmForRsync(const INTERNALTYPEPATH& destination) const; + #endif +public slots: + void addToList(const std::vector& sources,const INTERNALTYPEPATH& destination); + void setFilters(const std::vector &include,const std::vector &exclude); + void setFollowTheStrictOrder(const bool &order); + void set_updateMount(); +protected: + void run(); +private: + DriveManagement driveManagement; + bool moveTheWholeFolder; + std::vector sources; + INTERNALTYPEPATH destination; + volatile bool stopIt; + void listFolder(INTERNALTYPEPATH source, INTERNALTYPEPATH destination); + #ifdef Q_OS_UNIX + INTERNALTYPEPATH resolvDestination(const INTERNALTYPEPATH &destination); + #endif + volatile bool stopped; + QSemaphore waitOneAction; + FolderExistsAction folderExistsAction; + FileErrorAction fileErrorAction; + volatile bool checkDestinationExists; + INTERNALTYPEPATH newName; + bool copyListOrder; + std::regex folder_isolation; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + bool rsync; + #endif + Ultracopier::CopyMode mode; + std::vector include,exclude; + std::vector include_send,exclude_send; + bool reloadTheNewFilters; + bool haveFilters; + QMutex filtersMutex; + std::string firstRenamingRule; + std::string otherRenamingRule; + //std::vector blackList; + /** Parse the multiple wildcard source, it allow resolv multiple wildcard with Qt into their path + * The string: /toto/f*a/yy*a/toto.mp3 + * Will give: /toto/f1a/yy*a/toto.mp3, /toto/f2a/yy*a/toto.mp3 + * Will give: /toto/f2a/yy1a/toto.mp3, /toto/f2a/yy2a/toto.mp3 + */ + std::vector parseWildcardSources(const std::vector &sources) const; + + static INTERNALTYPEPATH text_slash; + static INTERNALTYPEPATH text_antislash; + static INTERNALTYPEPATH text_dot; +}; + +#endif // SCANFILEORFOLDER_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition.h b/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition.h new file mode 100755 index 0000000..c1758f4 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition.h @@ -0,0 +1 @@ +#include "../../../StructEnumDefinition.h" diff --git a/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition_CopyEngine.h b/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition_CopyEngine.h new file mode 100755 index 0000000..5898e5a --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition_CopyEngine.h @@ -0,0 +1,118 @@ +/** \file StructEnumDefinition_CopyEngine.h +\brief Define the structure and enumeration used in the copy engine +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include + +#ifndef STRUCTDEF_COPYENGINE_H +#define STRUCTDEF_COPYENGINE_H + +/// \brief Define action if file exists +enum FileExistsAction +{ + FileExists_NotSet=0, + FileExists_Cancel=1, + FileExists_Skip=2, + FileExists_Overwrite=3, + FileExists_OverwriteIfNotSameMdate=4, + FileExists_OverwriteIfNewer=5, + FileExists_OverwriteIfOlder=6, + FileExists_OverwriteIfNotSameSize=7, + FileExists_OverwriteIfNotSameSizeAndDate=8, + FileExists_Rename=9 +}; + +/// \brief Define action if file error +enum FileErrorAction +{ + FileError_NotSet=1, + FileError_Cancel=2, + FileError_Skip=3, + FileError_Retry=4, + FileError_PutToEndOfTheList=5 +}; + +/// \brief to have the transfer status +enum TransferStat +{ + TransferStat_Idle=0, + TransferStat_PreOperation=1, + TransferStat_WaitForTheTransfer=2, + TransferStat_Transfer=3, + TransferStat_PostTransfer=5, + TransferStat_PostOperation=6 +}; + +/// \brief Define overwrite mode +/*enum OverwriteMode +{ + OverwriteMode_None, + OverwriteMode_Overwrite, + OverwriteMode_OverwriteIfNewer, + OverwriteMode_OverwriteIfNotSameModificationDate +};*/ + +/// \brief Define action if file exists +enum FolderExistsAction +{ + FolderExists_NotSet=0, + FolderExists_Cancel=1, + FolderExists_Merge=2, + FolderExists_Skip=3, + FolderExists_Rename=4 +}; + +enum ErrorType +{ + ErrorType_Normal=0, + ErrorType_Folder=1, + ErrorType_FolderWithRety=2, + ErrorType_Rights=3 +}; + +enum SearchType +{ + SearchType_rawText=0, + SearchType_simpleRegex=1, + SearchType_perlRegex=2 +}; + +enum ApplyOn +{ + ApplyOn_file=0, + ApplyOn_fileAndFolder=1, + ApplyOn_folder=2 +}; + +/** to store into different way the filter rules to be exported */ +struct Filters_rules +{ + std::string search_text; + SearchType search_type; + ApplyOn apply_on; + bool need_match_all; + std::regex regex; +}; + +/// \brief get action type +enum ActionType +{ + ActionType_MkPath=1, + ActionType_MovePath=2, + ActionType_RealMove=3, + #ifdef ULTRACOPIER_PLUGIN_RSYNC + ActionType_RmSync=4, + #endif + ActionType_SyncDate=5 +}; + +struct Diskspace +{ + std::string drive; + uint64_t requiredSpace; + uint64_t freeSpace; +}; + +#endif // STRUCTDEF_COPYENGINE_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/TransferThread.cpp b/plugins/CopyEngine/Ultracopier-Spec/TransferThread.cpp new file mode 100755 index 0000000..9cbad5a --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/TransferThread.cpp @@ -0,0 +1,1547 @@ +//presume bug linked as multple paralelle inode to resume after "overwrite" +//then do overwrite node function to not re-set the file name + +#include "TransferThread.h" +#include +#include +#include +#ifdef WIDESTRING +#include +//#include +#endif + +#ifdef Q_OS_WIN32 +#include +#include +#endif + +#include "../../../cpp11addition.h" + +TransferThread::TransferThread() : + mode(Ultracopier::CopyMode::Copy), + transfer_stat (TransferStat_Idle), + doRightTransfer (false), + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync (false), + #endif + keepDate (false), + mkFullPath (false), + stopIt (false), + fileExistsAction (FileExists_NotSet), + alwaysDoFileExistsAction (FileExists_NotSet), + needSkip (false), + needRemove (false), + deletePartiallyTransferredFiles (true), + renameTheOriginalDestination (false), + writeError (false), + readError (false), + havePermission (false), + haveTransferTime (false) +{ + id=0; + renameRegex=std::regex("^(.*)(\\.[a-zA-Z0-9]+)$"); + #ifdef Q_OS_WIN32 + regRead=std::regex("^[a-zA-Z]:"); + #endif + transferSize = 0;//external set by ListThread + + #ifndef Q_OS_UNIX + PSecurityD=NULL; + dacl=NULL; + #endif + #ifdef Q_OS_Win32 + stopItWin=0; + #endif + //if not QThread + run(); +} + +TransferThread::~TransferThread() +{ + #ifdef Q_OS_WIN32 + stopItWin=1; + #endif + stopIt=true; + //else cash without this disconnect + //disconnect(&readThread); + //disconnect(&writeThread); + #ifndef Q_OS_UNIX + if(PSecurityD!=NULL) + { + free(PSecurityD); + PSecurityD=NULL; + } + if(dacl!=NULL) + { + //free(dacl); + dacl=NULL; + } + #endif +} + +void TransferThread::run() +{ + moveToThread(this); + + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+QStringLiteral("] start: ")+QString::number((qint64)QThread::currentThreadId()))); + transfer_stat = TransferStat_Idle; + stopIt = false; + fileExistsAction = FileExists_NotSet; + alwaysDoFileExistsAction= FileExists_NotSet; + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(&driveManagement,&DriveManagement::debugInformation,this, &TransferThread::debugInformation, Qt::QueuedConnection)) + abort(); + #endif +} + +TransferStat TransferThread::getStat() const +{ + return transfer_stat; +} + +#ifdef WIDESTRING +INTERNALTYPEPATH TransferThread::stringToInternalString(const std::string& utf8) +{ + /* buggy on MXE + std::wstring_convert> converter; + return converter.from_bytes(utf8);*/ + return QString::fromUtf8(utf8.data(),utf8.size()).toStdWString(); + //return widen(utf8); +} + +std::string TransferThread::internalStringTostring(const INTERNALTYPEPATH& utf16) +{ + /* buggy on MXE + std::wstring_convert> conv1; + return conv1.to_bytes(utf16);*/ + const QByteArray &data=QString::fromStdWString(utf16).toUtf8(); + return std::string(data.constData(),data.size()); + //return narrow(utf16); +} +#else +std::string TransferThread::stringToInternalString(const std::string& utf8) +{ + return utf8; +} + +std::string TransferThread::internalStringTostring(const std::string& utf16) +{ + return utf16; +} +#endif + +bool TransferThread::setFiles(const INTERNALTYPEPATH& source, const int64_t &size, const INTERNALTYPEPATH& destination, const Ultracopier::CopyMode &mode) +{ + if(transfer_stat!=TransferStat_Idle) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+ + TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + return false; + } + //to prevent multiple file alocation into ListThread::doNewActions_inode_manipulation() + transfer_stat = TransferStat_PreOperation; + //emit pushStat(stat,transferId); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start, source: "+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + this->source = source; + this->destination = destination; + this->mode = mode; + this->size = size; + stopIt = false; + #ifdef Q_OS_WIN32 + stopItWin=0; + #endif + fileExistsAction = FileExists_NotSet; + canStartTransfer = false; + sended_state_preOperationStopped= false; + fileContentError = false; + writeError = false; + readError = false; + haveTransferTime = false; + canStartTransfer = false; + resetExtraVariable(); + emit internalStartPreOperation(); + startTransferTime.restart(); + return true; +} + +void TransferThread::setFileRename(const std::string &nameForRename) +{ + if(transfer_stat!=TransferStat_PreOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+ + TransferThread::internalStringTostring(source)+(", destination: ")+TransferThread::internalStringTostring(destination)); + return; + } + if(QString::fromStdString(nameForRename).contains(QRegularExpression(QStringLiteral("[/\\\\\\*]")))) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't use this kind of name, internal error")); + emit errorOnFile(destination,tr("Try rename with using special characters").toStdString()); + return; + } + #ifdef WIDESTRING + std::string::size_type n=destination.rfind(L'/'); + #else + std::string::size_type n=destination.rfind('/'); + #endif + #ifdef Q_OS_WIN32 + const std::wstring::size_type n2=destination.rfind(L'\\'); + if(n2>n && (n2!=std::wstring::npos || n==std::wstring::npos)) + n=n2; + #endif + #ifdef WIDESTRING + if(n != std::wstring::npos) + #else + if(n != std::string::npos) + #endif + { + INTERNALTYPEPATH destinationPath=destination.substr(0,n);//+1 + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] nameForRename: "+nameForRename+", destinationPath: "+internalStringTostring(destinationPath)); + if(stringEndsWith(destinationPath,'/') + #ifdef Q_OS_WIN32 + || stringEndsWith(destinationPath,'\\') + #endif + ) + destination=destinationPath+TransferThread::stringToInternalString(nameForRename); + else + destination=destinationPath+TransferThread::stringToInternalString("/")+TransferThread::stringToInternalString(nameForRename); + } + else + destination=TransferThread::stringToInternalString(nameForRename); + + /*why all this code? + if(!renameTheOriginalDestination) + destination=destination+TransferThread::stringToInternalString("/")+TransferThread::stringToInternalString(nameForRename); + else + { + //INTERNALTYPEPATH tempDestination=destination; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] rename "+TransferThread::internalStringTostring(destination)+ + ": to: "+TransferThread::internalStringTostring(destination)+"/"+nameForRename); + if(!rename(destination,(destination+TransferThread::stringToInternalString("/")+TransferThread::stringToInternalString(nameForRename)))) + { + if(!is_file(destination)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] source not exists "+TransferThread::internalStringTostring(destination)+ + ": destination: "+TransferThread::internalStringTostring(destination)+", error: "+std::to_string(errno)); + emit errorOnFile(destination,tr("File not found").toStdString()); + return; + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to do real move "+TransferThread::internalStringTostring(destination)+ + ": "+TransferThread::internalStringTostring(destination)+", error: "+std::to_string(errno)); + emit errorOnFile(destination,"errno: "+std::string(strerror(errno))); + return; + } + if(source==destination) + source=destination+TransferThread::stringToInternalString("/")+TransferThread::stringToInternalString(nameForRename); + destination=tempDestination; + }*/ + fileExistsAction = FileExists_NotSet; + resetExtraVariable(); + emit internalStartPreOperation(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] destination is: "+TransferThread::internalStringTostring(destination)); +} + +bool TransferThread::rename(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination) +{ + #ifdef Q_OS_WIN32 + return MoveFileExW( + TransferThread::toFinalPath(source).c_str(), + TransferThread::toFinalPath(destination).c_str(), + MOVEFILE_REPLACE_EXISTING); + #else + return ::rename(TransferThread::internalStringTostring(source).c_str(), + TransferThread::internalStringTostring(destination).c_str())==0; + #endif +} + +void TransferThread::setAlwaysFileExistsAction(const FileExistsAction &action) +{ + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+QStringLiteral("] action to do always: ")+QString::number(action))); + alwaysDoFileExistsAction=action; +} + +void TransferThread::resetExtraVariable() +{ + sended_state_preOperationStopped=false; + writeError = false; + readError = false; + needRemove = false; + needSkip = false; + retry = false; + havePermission = false; +} + +bool TransferThread::isSame() +{ + //check if source and destination is not the same + //source.absoluteFilePath()==destination.absoluteFilePath() not work is source don't exists + if(source==destination) + { + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!is_file(destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start source: "+TransferThread::internalStringTostring(source)+" not exists"); + if(is_symlink(source)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start source: "+TransferThread::internalStringTostring(source)+" isSymLink"); + if(is_symlink(destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start destination: "+TransferThread::internalStringTostring(destination)+" isSymLink"); + #endif + if(fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_Skip) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] is same but skip"); + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle"); + emit postOperationStopped(); + //quit + return true; + } + if(checkAlwaysRename()) + return false; + emit fileAlreadyExists(source,destination,true); + return true; + } + return false; +} + +bool TransferThread::destinationExists() +{ + //check if destination exists + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+QStringLiteral("overwrite: %1, alwaysDoFileExistsAction: %2, readError: %3, writeError: %4") + .arg(fileExistsAction) + .arg(alwaysDoFileExistsAction) + .arg(readError) + .arg(writeError) + .toStdString() + ); + if(alwaysDoFileExistsAction==FileExists_Overwrite || readError || writeError + #ifdef ULTRACOPIER_PLUGIN_RSYNC + || rsync + #endif + ) + return false; + + bool destinationExists=false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] time to first FS access"); + destinationExists=is_file(destination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] finish first FS access: "+std::to_string(destinationExists)); + if(destinationExists) + { + if(fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_Skip) + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle"); + emit postOperationStopped(); + //quit + return true; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(checkAlwaysRename()) + return false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(is_file(source)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(fileExistsAction==FileExists_OverwriteIfNewer || (fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_OverwriteIfNewer)) + { + const int64_t &sm=readFileMDateTime(source); + const int64_t &sd=readFileMDateTime(destination); + if(sm==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(source,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(source,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + if(sd==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(destination,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(destination,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(source): "+std::to_string(sm)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(destination): "+std::to_string(sd)); + if(sm>sd || sm==-1 || sd==-1) + return false; + else + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle;"); + emit postOperationStopped(); + return true; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(fileExistsAction==FileExists_OverwriteIfOlder || (fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_OverwriteIfOlder)) + { + const int64_t &sm=readFileMDateTime(source); + const int64_t &sd=readFileMDateTime(destination); + if(sm==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(source,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(source,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + if(sd==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(destination,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(destination,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(source): "+std::to_string(sm)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(destination): "+std::to_string(sd)); + if(sm file + * /file -> file + * /dir1/dir2/ -> dir2 + * /dir1/ -> dir1 + * / -> root */ +#ifdef Q_OS_WIN32 +std::string TransferThread::resolvedName(std::string inode) +#else +std::string TransferThread::resolvedName(const std::string &inode) +#endif +{ + #ifdef Q_OS_WIN32 + stringreplaceAll(inode,"\\","/"); + #endif + const std::string::size_type &lastPos=inode.rfind('/'); + if(lastPos == std::string::npos || (lastPos==0 && inode.size()==1)) + return "root"; + if((lastPos+1)!=inode.size()) + return inode.substr(lastPos+1); + if(inode.size()==1) + return "root"; + const std::string::size_type &previousLastPos=inode.rfind('/',inode.size()-2); + if((lastPos-2)==previousLastPos || previousLastPos == std::string::npos) + return "root"; + return inode.substr(previousLastPos+1,lastPos-previousLastPos-1); +} + +#ifdef Q_OS_WIN32 +std::wstring TransferThread::resolvedName(std::wstring inode) +#else +std::wstring TransferThread::resolvedName(const std::wstring &inode) +#endif +{ + #ifdef Q_OS_WIN32 + stringreplaceAll(inode,L"\\",L"/"); + #endif + const std::wstring::size_type &lastPos=inode.rfind(L'/'); + if(lastPos == std::wstring::npos || (lastPos==0 && inode.size()==1)) + return L"root"; + if((lastPos+1)!=inode.size()) + return inode.substr(lastPos+1); + if(inode.size()==1) + return L"root"; + const std::wstring::size_type &previousLastPos=inode.rfind(L'/',inode.size()-2); + if((lastPos-2)==previousLastPos || previousLastPos == std::wstring::npos) + return L"root"; + return inode.substr(previousLastPos+1,lastPos-previousLastPos-1); +} + +INTERNALTYPEPATH TransferThread::getSourcePath() const +{ + return source; +} + +INTERNALTYPEPATH TransferThread::getDestinationPath() const +{ + return destination; +} + +Ultracopier::CopyMode TransferThread::getMode() const +{ + return mode; +} + +//return true if has been renamed +bool TransferThread::checkAlwaysRename() +{ + if(alwaysDoFileExistsAction==FileExists_Rename) + { + INTERNALTYPEPATH newDestination=destination; + std::string fileName=resolvedName(TransferThread::internalStringTostring(newDestination)); + std::string suffix; + std::string newFileName; + //resolv the suffix + if(std::regex_match(fileName,renameRegex)) + { + suffix=fileName; + suffix=std::regex_replace(suffix,renameRegex,"$2"); + fileName=std::regex_replace(fileName,renameRegex,"$1"); + } + //resolv the new name + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + newFileName=tr("%name% - copy%suffix%").toStdString(); + else + newFileName=firstRenamingRule; + } + else + { + if(otherRenamingRule.empty()) + newFileName=tr("%name% - copy (%number%)%suffix%").toStdString(); + else + newFileName=otherRenamingRule; + stringreplaceAll(newFileName,"%number%",std::to_string(num)); + } + stringreplaceAll(newFileName,"%name%",fileName); + stringreplaceAll(newFileName,"%suffix%",suffix); + newDestination=FSabsolutePath(newDestination); + if(!stringEndsWith(newDestination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + newDestination+=TransferThread::stringToInternalString("/"); + newDestination+=TransferThread::stringToInternalString(newFileName); + num++; + } + while(is_file(newDestination)); + if(!renameTheOriginalDestination) + destination=newDestination; + else + { + if(rename(destination.c_str(),newDestination.c_str())!=0) + { + if(!is_file(destination)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] source not exists "+TransferThread::internalStringTostring(destination)+ + ": destination: "+TransferThread::internalStringTostring(newDestination)+", error: "+std::to_string(errno)); + emit errorOnFile(destination,tr("File not found").toStdString()); + readError=true; + return true; + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to do real move "+TransferThread::internalStringTostring(destination)+ + ": "+TransferThread::internalStringTostring(newDestination)+", error: "+std::to_string(errno)); + readError=true; + emit errorOnFile(destination,std::string(strerror(errno))+", errno: "+std::string(strerror(errno))); + return true; + } + } + return true; + } + return false; +} + +/// \warning not check if path have double //, if have do bug return failed +/// \warning check mkpath() call should not exists because only existing dest is allowed now +#ifdef Q_OS_UNIX +bool TransferThread::mkpath(const INTERNALTYPEPATH &path, const mode_t &mode) +#else +bool TransferThread::mkpath(const INTERNALTYPEPATH &path) +#endif +{ + #ifdef Q_OS_WIN32 + if(!mkdir(path)) + if(errno==EEXIST) + return true; + + printf("%i",errno); + #ifndef WIDESTRING + #error if windows, WIDESTRING need be enabled + #endif + //use reverse method to performance, more complex to code but less system call/fs call + std::wstring::size_type previouspos=path.size(); + std::wstring::size_type lastpos=std::string::npos; + + const wchar_t *pathC=path.c_str(); + wchar_t pathCedit[32000]; + wcscpy(pathCedit,pathC); + std::vector pathSplit; + pathSplit.push_back(path.size()); + do + { + lastpos=path.rfind(L'/',previouspos-1); + if(lastpos == std::wstring::npos) + return false; + + while(pathC[lastpos-1]==L'/') + if(lastpos>0) + lastpos--; + else + return false; + + //buggy case? + #ifdef Q_OS_UNIX + if(lastpos<2) + return false; + #else + if(lastpos<4) + return false; + #endif + + pathCedit[lastpos]=L'\0'; + previouspos=lastpos; + + errno=0; + if(!mkdir(pathCedit)) + if(errno!=EEXIST && errno!=ENOENT) + return false; + //here errno can be: EEXIST, ENOENT, 0 + if(errno==ENOENT) + pathSplit.push_back(lastpos); + } while(lastpos>0 && errno==ENOENT); + + do + { + wcscpy(pathCedit,pathC); + lastpos=pathSplit.back(); + pathSplit.pop_back(); + pathCedit[lastpos]=L'\0'; + #ifdef Q_OS_UNIX + if(mkdir(pathCedit, mode)==-1) + #else + if(!mkdir(pathCedit)) + #endif + if(errno!=EEXIST) + return false; + } while(!pathSplit.empty()); + return true; + #else + char pathC[PATH_MAX]; + strcpy(pathC,TransferThread::internalStringTostring(path).c_str()); + if(!mkdir(path)) + if(errno==EEXIST) + return true; + + printf("%i",errno); + //use reverse method to performance, more complex to code but less system call/fs call + std::string::size_type previouspos=path.size(); + std::string::size_type lastpos=std::string::npos; + + char pathCedit[PATH_MAX]; + strcpy(pathCedit,pathC); + std::vector pathSplit; + pathSplit.push_back(path.size()); + do + { + lastpos=path.rfind('/',previouspos-1); + if(lastpos == std::string::npos) + return false; + + while(pathC[lastpos-1]=='/') + if(lastpos>0) + lastpos--; + else + return false; + + //buggy case? + #ifdef Q_OS_UNIX + if(lastpos<2) + return false; + #else + if(lastpos<4) + return false; + #endif + + pathCedit[lastpos]='\0'; + previouspos=lastpos; + + errno=0; + #ifdef Q_OS_UNIX + if(::mkdir(pathCedit, mode)==-1) + #else + if(::mkdir(pathCedit)==-1) + #endif + if(errno!=EEXIST && errno!=ENOENT) + return false; + //here errno can be: EEXIST, ENOENT, 0 + if(errno==ENOENT) + pathSplit.push_back(lastpos); + } while(lastpos>0 && errno==ENOENT); + + do + { + strcpy(pathCedit,pathC); + lastpos=pathSplit.back(); + pathSplit.pop_back(); + pathCedit[lastpos]='\0'; + #ifdef Q_OS_UNIX + if(::mkdir(pathCedit, mode)==-1) + #else + if(::mkdir(pathCedit)==-1) + #endif + if(errno!=EEXIST) + return false; + } while(!pathSplit.empty()); + return true; + #endif +} + +#ifdef Q_OS_UNIX +bool TransferThread::mkdir(const INTERNALTYPEPATH &file_path, const mode_t &mode) +#else +bool TransferThread::mkdir(const INTERNALTYPEPATH &file_path) +#endif +{ +#ifdef Q_OS_WIN32 + const bool r = CreateDirectory(TransferThread::toFinalPath(file_path).c_str(),NULL); + const DWORD &t=GetLastError(); + if(!r) + { + if(t==183/*is_dir(file_path) performance impact*/) + errno=EEXIST; + else if(t==3/*is_dir(file_path) performance impact*/) + errno=ENOENT; + else + errno=t; + } + return r; +#else + #ifdef Q_OS_UNIX + return ::mkdir(TransferThread::internalStringTostring(file_path).c_str(),mode)==0; + #else + return ::mkdir(TransferThread::internalStringTostring(file_path).c_str())==0; + #endif +#endif +} + +bool TransferThread::canBeMovedDirectly() const +{ + if(mode!=Ultracopier::Move) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] mode!=Ultracopier::Move"); + return false; + } + return is_symlink(source) || driveManagement.isSameDrive( + TransferThread::internalStringTostring(destination), + TransferThread::internalStringTostring(source) + ); +} + +bool TransferThread::canBeCopiedDirectly() const +{ + return is_symlink(source); +} + +//set the copy info and options before runing +void TransferThread::setRightTransfer(const bool doRightTransfer) +{ + this->doRightTransfer=doRightTransfer; +} + +/// \brief set buffer +void TransferThread::setBuffer(const bool buffer) +{ + Q_UNUSED(buffer); +} + +/*void TransferThread::setBufferSize(const int parallelBuffer,const int serialBuffer) +{ + writeThread->setBufferSize(const int parallelBuffer,const int serialBuffer); +}*/ + +//set keep date +void TransferThread::setKeepDate(const bool keepDate) +{ + this->keepDate=keepDate; +} + +bool TransferThread::doFilePostOperation() +{ + //do operation needed by copy + //set the time if no write thread used + + if(/*not implied by is_symlink, exist can be false because symlink dest not exists*/ + !exists(destination) && !is_symlink(destination)) + { + if(!stopIt) + if(/*true when the destination have been remove but not the symlink:*/!is_symlink(source)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date: File not found"); + emit errorOnFile(destination,tr("Unable to change the date").toStdString()+": "+tr("File not found").toStdString()); + return false; + } + } + else + { + if(doRightTransfer) + { + //should be never used but... + /*source.refresh(); + if(source.exists())*/ + if(havePermission) + { + if(!writeDestinationFilePermissions(destination)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to set the destination file permission"); + //emit errorOnFile(destination,tr("Unable to set the destination file permission")); + //return false; + } + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Try doRightTransfer when source not exists"); + } + //date at end because previous change can touch the file + if(doTheDateTransfer) + { + if(!writeDestinationFileDateTime(destination)) + { + if(!is_file(destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date (is not a file)"); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date"); + /* error with virtual folder under windows */ + #ifndef Q_OS_WIN32 + if(keepDate) + { + emit errorOnFile(destination,tr("Unable to change the date").toStdString()); + return false; + } + #endif + } + /*else -> need be done at source m time read + { + #ifndef Q_OS_WIN32 + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] read the destination time: "+destination.lastModified().toString().toStdString()); + if(destination.lastModified()ftCreate=ftCreate; + this->ftAccess=ftAccess; + this->ftWrite=ftWrite; + CloseHandle(hFileSouce); + const uint64_t modtime=(uint64_t)ftWrite.dwLowDateTime + ((uint64_t)2^32 * (uint64_t)ftWrite.dwHighDateTime); + if(modtimeftCreate; + ftAccess=this->ftAccess; + ftWrite=this->ftWrite; + if(!SetFileTime(hFileDestination, &ftCreate, &ftAccess, &ftWrite)) + { + CloseHandle(hFileDestination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to set the file time"); + return false; + } + CloseHandle(hFileDestination); + return true; + #else + return false; + #endif + #endif + return false; +} + +bool TransferThread::readSourceFilePermissions(const INTERNALTYPEPATH &source) +{ + #ifdef Q_OS_UNIX + if(stat(TransferThread::internalStringTostring(source).c_str(), &permissions)!=0) + return false; + else + return true; + #else + HANDLE hFile = CreateFileW(source.c_str(), GENERIC_READ , + FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hFile == INVALID_HANDLE_VALUE) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] CreateFile() failed. Error: INVALID_HANDLE_VALUE: "+TransferThread::GetLastErrorStdStr()); + return false; + } + DWORD lasterror = GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, + NULL, NULL, &dacl, NULL, &PSecurityD); + if (lasterror != ERROR_SUCCESS) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] GetSecurityInfo() failed. Error"+std::to_string(lasterror)); + return false; + } + CloseHandle(hFile); + return true; + #endif +} + +bool TransferThread::writeDestinationFilePermissions(const INTERNALTYPEPATH &destination) +{ + #ifdef Q_OS_UNIX + if(chmod(TransferThread::internalStringTostring(destination).c_str(), permissions.st_mode)!=0) + return false; + if(chown(TransferThread::internalStringTostring(destination).c_str(), permissions.st_uid, permissions.st_gid)!=0) + return false; + return true; + #else + HANDLE hFile = CreateFileW(destination.c_str(),READ_CONTROL | WRITE_OWNER | WRITE_DAC | ACCESS_SYSTEM_SECURITY,0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hFile == INVALID_HANDLE_VALUE) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] CreateFile() failed. Error: INVALID_HANDLE_VALUE: "+TransferThread::GetLastErrorStdStr()); + return false; + } + DWORD lasterror = SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION , NULL, NULL, dacl, NULL); + if (lasterror != ERROR_SUCCESS) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] SetSecurityInfo() failed. Error"+std::to_string(lasterror)); + return false; + } + CloseHandle(hFile); + if(PSecurityD!=NULL) + { + //free(PSecurityD);//crash on some NAS, it's why is commented, http://forum-ultracopier.first-world.info/viewtopic.php?f=8&t=903&p=3689#p3689 + PSecurityD=NULL; + } + if(dacl!=NULL) + { + //free(dacl); + dacl=NULL; + } + return true; + #endif +} + +//retry after error +void TransferThread::putAtBottom() +{ + emit tryPutAtBottom(); +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void TransferThread::setRsync(const bool rsync) +{ + this->rsync=rsync; +} +#endif + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//to set the id +void TransferThread::setId(int id) +{ + this->id=id; +} +#endif + +void TransferThread::setRenamingRules(const std::string &firstRenamingRule, const std::string &otherRenamingRule) +{ + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; +} + +void TransferThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) +{ + this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; +} + +void TransferThread::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) +{ + this->renameTheOriginalDestination=renameTheOriginalDestination; +} + +void TransferThread::set_updateMount() +{ + driveManagement.tryUpdate(); +} + +bool TransferThread::is_symlink(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExW(TransferThread::toFinalPath(filename).c_str(), GetFileExInfoStandard, &fileInfo); + if(r != FALSE) + { + return fileInfo.dwFileAttributes != INVALID_FILE_ATTRIBUTES && + (fileInfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT); + } + else + return false; + #else + return is_symlink(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +bool TransferThread::is_symlink(const char * const filename) +{ + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExA(TransferThread::toFinalPath(filename).c_str(), GetFileExInfoStandard, &fileInfo); + if(r != FALSE) + { + return fileInfo.dwFileAttributes != INVALID_FILE_ATTRIBUTES && + (fileInfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT); + } + else + return false; + #else + struct stat p_statbuf; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return false; + if (S_ISLNK(p_statbuf.st_mode)) + return true; + #endif + return false; +} + +bool TransferThread::is_file(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesW(TransferThread::toFinalPath(filename).c_str()); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + (dwAttrib & FILE_ATTRIBUTE_NORMAL || dwAttrib & FILE_ATTRIBUTE_ARCHIVE) + ); + #else + return is_file(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +bool TransferThread::is_file(const char * const filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesA(TransferThread::toFinalPath(filename).c_str()); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + (dwAttrib & FILE_ATTRIBUTE_DIRECTORY)); + #else + struct stat p_statbuf; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return false; + if (S_ISREG(p_statbuf.st_mode)) + return true; + return false; + #endif +} + +bool TransferThread::is_dir(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesW(TransferThread::toFinalPath(filename).c_str()); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + (dwAttrib & FILE_ATTRIBUTE_DIRECTORY) && + !(dwAttrib & FILE_ATTRIBUTE_REPARSE_POINT)); + #else + return is_dir(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +bool TransferThread::is_dir(const char * const filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesA(TransferThread::toFinalPath(filename).c_str()); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + (dwAttrib & FILE_ATTRIBUTE_DIRECTORY) && + !(dwAttrib & FILE_ATTRIBUTE_REPARSE_POINT)); + #else + struct stat p_statbuf; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return false; + if (S_ISDIR(p_statbuf.st_mode)) + return true; + return false; + #endif +} + +bool TransferThread::exists(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesW(TransferThread::toFinalPath(filename).c_str()); + return dwAttrib != INVALID_FILE_ATTRIBUTES; + #else + return exists(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +bool TransferThread::exists(const char * const filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesA(TransferThread::toFinalPath(filename).c_str()); + return dwAttrib != INVALID_FILE_ATTRIBUTES; + #else + struct stat p_statbuf; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return false; + #endif + return true; +} + +int64_t TransferThread::file_stat_size(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExW(TransferThread::toFinalPath(filename).c_str(), GetFileExInfoStandard, &fileInfo); + if(r == FALSE) + return -1; + int64_t size=fileInfo.nFileSizeHigh; + size<<=32; + size|=fileInfo.nFileSizeLow; + return size; + #else + return file_stat_size(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +int64_t TransferThread::file_stat_size(const char * const filename) +{ + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExA(TransferThread::toFinalPath(filename).c_str(), GetFileExInfoStandard, &fileInfo); + if(r == FALSE) + return -1; + int64_t size=fileInfo.nFileSizeHigh; + size<<=32; + size|=fileInfo.nFileSizeLow; + return size; + #else + struct stat p_statbuf; + if (stat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return -1; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return -1; + return p_statbuf.st_size; + #endif +} + +bool TransferThread::entryInfoList(const INTERNALTYPEPATH &path,std::vector &list) +{ + std::vector listTemp; + if(!TransferThread::entryInfoList(path,listTemp)) + return false; + for(const dirent_uc &u : listTemp) + list.push_back(u.d_name); + return true; +} + +bool TransferThread::rmdir(const INTERNALTYPEPATH &path) +{ + #ifdef Q_OS_WIN32 + return RemoveDirectoryW(TransferThread::toFinalPath(path).c_str()); + #else + return ::rmdir(TransferThread::internalStringTostring(path).c_str())==0; + #endif +} + +#ifdef Q_OS_UNIX +bool TransferThread::entryInfoList(const INTERNALTYPEPATH &path,std::vector &list) +{ + DIR *dp; + struct dirent *ep; + dp=opendir(TransferThread::internalStringTostring(path).c_str()); + if(dp!=NULL) + { + do { + ep=readdir(dp); + if(ep!=NULL) + { + const std::string name(ep->d_name); + if(name!="." && name!="..") + { + dirent_uc tempValue; + #if defined(__HAIKU__) + struct stat sp; + memset(&sp,0,sizeof(sp)); + if(stat((TransferThread::internalStringTostring(path)+"/"+name).c_str(), &sp)==0) + tempValue.isFolder=S_ISDIR(sp.st_mode); + else + return false; + #else + tempValue.isFolder=ep->d_type==DT_DIR; + #endif + tempValue.d_name=TransferThread::stringToInternalString(ep->d_name); + list.push_back(tempValue); + } + } + } while(ep!=NULL); + (void) closedir(dp); + return true; + } + return false; +} +#else +bool TransferThread::entryInfoList(const INTERNALTYPEPATH &path,std::vector &list) +{ + HANDLE hFind = NULL; + #ifdef WIDESTRING + WIN32_FIND_DATAW fdFile; + if((hFind = FindFirstFileW((TransferThread::toFinalPath(path)+L"\\*").c_str(), &fdFile)) == INVALID_HANDLE_VALUE) + #else + WIN32_FIND_DATAA fdFile; + char finalpath[MAX_PATH]; + strcpy(finalpath,path.c_str()); + strcat(finalpath,"\\*"); + if((hFind = FindFirstFileW(finalpath, &fdFile)) == INVALID_HANDLE_VALUE) + #endif + return false; + do + { + #ifdef WIDESTRING + if(wcscmp(fdFile.cFileName, L".")!=0 && wcscmp(fdFile.cFileName, L"..")!=0) + #else + if(strcmp(fdFile.cFileName, ".")!=0 && strcmp(fdFile.cFileName, "..")!=0) + #endif + { + dirent_uc tempValue; + tempValue.isFolder= + (fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && + !(fdFile.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) + ; + tempValue.d_name=fdFile.cFileName; + tempValue.size=fdFile.nFileSizeHigh; + tempValue.size<<=32; + tempValue.size|=fdFile.nFileSizeLow; + list.push_back(tempValue); + } + } + while(FindNextFileW(hFind, &fdFile)); + FindClose(hFind); + return true; +} +#endif + +void TransferThread::setMkFullPath(const bool mkFullPath) +{ + this->mkFullPath=mkFullPath; +} + +/*int TransferThread::fseeko64(FILE *__stream, uint64_t __off, int __whence) +{ + #if defined(__HAIKU__) || defined(Q_OS_MAC) || defined(ANDROID) || defined(__ANDROID_API__) + return ::fseeko(__stream,__off,__whence); + #else + return ::fseeko64(__stream,__off,__whence); + #endif +} + +int TransferThread::ftruncate64(int __fd, uint64_t __length) +{ + #if defined(__HAIKU__) || defined(Q_OS_MAC) || defined(ANDROID) || defined(__ANDROID_API__) + return ::ftruncate(__fd,__length); + #else + //return ::ftruncate64(__fd,__length); + return ::ftruncate(__fd,__length); + #endif +}*/ + +int64_t TransferThread::transferTime() const +{ + return startTransferTime.elapsed(); +} + +#ifdef Q_OS_WIN32 +std::wstring TransferThread::toFinalPath(std::wstring path) +{ + if(path.size()==2 && path.at(1)==L':') + path+=L"\\"; + stringreplaceAll(path,L"/",L"\\"); + std::wstring pathW; + if(path.size()>2 && path.substr(0,2)==L"\\\\")//nas + pathW=L"\\\\?\\UNC\\"+path.substr(2); + else + pathW=L"\\\\?\\"+path; + return pathW; +} + +std::string TransferThread::toFinalPath(std::string path) +{ + if(path.size()==2 && path.at(1)==':') + path+="\\"; + stringreplaceAll(path,"/","\\"); + std::string pathW; + if(path.size()>2 && path.substr(0,2)=="\\\\")//nas + pathW="\\\\?\\UNC\\"+path.substr(2); + else + pathW="\\\\?\\"+path; + return pathW; +} + +bool TransferThread::unlink(const std::wstring &path) +{ + return DeleteFileW(TransferThread::toFinalPath(path).c_str()) || RemoveDirectoryW(TransferThread::toFinalPath(path).c_str()); +} + +std::string TransferThread::GetLastErrorStdStr() +{ + DWORD error = GetLastError(); + if (error) + { + LPVOID lpMsgBuf; + DWORD bufLen = FormatMessageA( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + error, + MAKELANGID(LANG_SYSTEM_DEFAULT, SUBLANG_DEFAULT), + (LPSTR) &lpMsgBuf, + 0, NULL ); + if (bufLen) + { + std::string result((char *)lpMsgBuf, (int)bufLen); + LocalFree(lpMsgBuf); + return result+" ("+std::to_string(error)+")"; + } + return "1: "+std::to_string(error); + } + return "2: "+std::to_string(error); +} +#else +bool TransferThread::unlink(const INTERNALTYPEPATH &path) +{ + return ::unlink(internalStringTostring(path).c_str())==0; +} +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/TransferThread.h b/plugins/CopyEngine/Ultracopier-Spec/TransferThread.h new file mode 100755 index 0000000..42db854 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/TransferThread.h @@ -0,0 +1,265 @@ +/** \file TransferThread.h +\brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#define INTERNALTYPECHAR wchar_t +#else +#define INTERNALTYPEPATH std::string +#define INTERNALTYPECHAR char +#endif + +//defore the next define +#include "CopyEngineUltracopier-SpecVariable.h" + +#ifdef Q_OS_UNIX + #include + #include + #include + #include +#endif +#ifdef Q_OS_WIN32 + #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY + #include + #include + #include + #include + #endif +#endif + +#ifdef Q_OS_WIN32 +#include +#endif + +#include "Environment.h" +#include "DriveManagement.h" +#include "StructEnumDefinition_CopyEngine.h" + +#ifndef TRANSFERTHREAD_H +#define TRANSFERTHREAD_H + +/// \brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations +class TransferThread : public QThread +{ + Q_OBJECT +public: + explicit TransferThread(); + ~TransferThread(); + /// \brief get transfer stat + TransferStat getStat() const; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief to set the id + void setId(int id); + #endif + /// \brief get the transfer time in ms + int64_t transferTime() const; + /// \brief to store the transfer id + std::atomic transferId; + /// \brief to store the transfer size + uint64_t transferSize; + + //not copied size, ... + #ifdef Q_OS_WIN32 + static std::string resolvedName(std::string inode); + static std::wstring resolvedName(std::wstring inode); + #else + static std::string resolvedName(const std::string &inode); + static std::wstring resolvedName(const std::wstring &inode); + #endif + INTERNALTYPEPATH getSourcePath() const; + INTERNALTYPEPATH getDestinationPath() const; + Ultracopier::CopyMode getMode() const; + // \warning check mkpath() call should not exists because only existing dest is allowed now + #ifdef Q_OS_UNIX + static bool mkpath(const INTERNALTYPEPATH &file_path, const mode_t &mode=0755); + static bool mkdir(const INTERNALTYPEPATH &file_path, const mode_t &mode=0755); + #else + static bool mkpath(const INTERNALTYPEPATH &file_path); + static bool mkdir(const INTERNALTYPEPATH &file_path); + #endif + #ifdef WIDESTRING + static INTERNALTYPEPATH stringToInternalString(const std::string& utf8); + static std::string internalStringTostring(const INTERNALTYPEPATH& utf16); + #else + static std::string stringToInternalString(const std::string& utf8); + static std::string internalStringTostring(const std::string& utf16); + #endif + #ifdef Q_OS_WIN32 + static std::wstring toFinalPath(std::wstring path); + static std::string toFinalPath(std::string path); + static bool unlink(const std::wstring &path); + static std::string GetLastErrorStdStr(); + #else + static bool unlink(const INTERNALTYPEPATH &path);//return true if sucess + #endif + + static int64_t readFileMDateTime(const INTERNALTYPEPATH &source); + static bool is_symlink(const char * const filename); + static bool is_symlink(const INTERNALTYPEPATH &filename); + static bool is_file(const char * const filename); + static bool is_file(const INTERNALTYPEPATH &filename); + static bool is_dir(const char * const filename); + static bool is_dir(const INTERNALTYPEPATH &filename); + static bool exists(const char * const filename); + static bool exists(const INTERNALTYPEPATH &filename); + static int64_t file_stat_size(const INTERNALTYPEPATH &filename); + static int64_t file_stat_size(const char * const filename); + static bool entryInfoList(const INTERNALTYPEPATH &path, std::vector &list); + static bool rmdir(const INTERNALTYPEPATH &path); + struct dirent_uc + { + #ifdef Q_OS_WIN32 + int64_t size; + #endif + INTERNALTYPEPATH d_name; + bool isFolder; + }; + static bool entryInfoList(const INTERNALTYPEPATH &path, std::vector &list); + void setMkFullPath(const bool mkFullPath); + /*static int fseeko64(FILE *__stream, uint64_t __off, int __whence); + static int ftruncate64(int __fd, uint64_t __length);*/ + static bool rename(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination); +protected: + void run(); + virtual void resetExtraVariable(); + bool isSame(); + bool destinationExists(); + + //different pre-operation + bool checkAlwaysRename();///< return true if has been renamed + bool canBeMovedDirectly() const; + bool canBeCopiedDirectly() const; + + //fonction to edit the file date time + bool readSourceFileDateTime(const INTERNALTYPEPATH &source); + bool writeDestinationFileDateTime(const INTERNALTYPEPATH &destination); + bool readSourceFilePermissions(const INTERNALTYPEPATH &source); + bool writeDestinationFilePermissions(const INTERNALTYPEPATH &destination); +signals: + //internal signal + void internalStartPostOperation() const; + void internalStartPreOperation() const; + //force into the right thread + void internalTryStartTheTransfer() const; + //to send state + void preOperationStopped() const; + void checkIfItCanBeResumed() const; + //void transferStarted();//not sended (and not used then) + void readStopped() const; + void writeStopped() const; + void postOperationStopped() const; + //get dialog + void fileAlreadyExists(const INTERNALTYPEPATH &info,const INTERNALTYPEPATH &info2,const bool &isSame) const; + void errorOnFile(const INTERNALTYPEPATH &info,const std::string &string,const ErrorType &errorType=ErrorType_Normal) const; + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; + void tryPutAtBottom() const; + /// \brief update the transfer stat + void pushStat(const TransferStat &stat,const uint64_t &pos) const; +public slots: + /// \brief to set files to transfer + virtual bool setFiles(const INTERNALTYPEPATH& source,const int64_t &size,const INTERNALTYPEPATH& destination,const Ultracopier::CopyMode &mode); + /// \brief to set the new name of the destination + void setFileRename(const std::string &nameForRename); + /// \brief to start the transfer of data + void setAlwaysFileExistsAction(const FileExistsAction &action); + /// \brief set the copy info and options before runing + void setRightTransfer(const bool doRightTransfer); + /// \brief set buffer + virtual void setBuffer(const bool buffer); + /// \brief set keep date + void setKeepDate(const bool keepDate); + /// \brief put the current file at bottom + void putAtBottom(); + + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void setRsync(const bool rsync); + #endif + + void setRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); + + void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); + void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); + void set_updateMount(); +protected: + enum MoveReturn + { + MoveReturn_skip=0, + MoveReturn_moved=1, + MoveReturn_error=2 + }; + + Ultracopier::CopyMode mode; + std::atomic transfer_stat; + bool doRightTransfer; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + bool rsync; + #endif + bool keepDate; + bool mkFullPath; + volatile bool stopIt; + #ifdef Q_OS_WIN32 + int stopItWin; + #endif + DriveManagement driveManagement; + volatile bool canStartTransfer; + bool retry; + INTERNALTYPEPATH source; + INTERNALTYPEPATH destination; + int64_t size; + FileExistsAction fileExistsAction; + FileExistsAction alwaysDoFileExistsAction; + bool needSkip,needRemove; + int id; + bool deletePartiallyTransferredFiles; + std::string firstRenamingRule; + std::string otherRenamingRule; + //error management + bool renameTheOriginalDestination; + bool fileContentError; + bool doTheDateTransfer; + int parallelizeIfSmallerThan; + //error management + bool writeError; + bool readError; + std::regex renameRegex; + #ifdef Q_OS_UNIX + utimbuf butime; + #else + #ifdef Q_OS_WIN32 + FILETIME ftCreate, ftAccess, ftWrite; + std::regex regRead; + #else + #error Not unix, not windows, fix this + #endif + #endif + #ifdef Q_OS_UNIX + struct stat permissions; + #else + PSECURITY_DESCRIPTOR PSecurityD; + PACL dacl; + #endif + bool havePermission; + //to send state + bool sended_state_preOperationStopped; + //different post-operation + bool doFilePostOperation(); +protected: + QTime startTransferTime; + bool haveTransferTime; +}; + +#endif // TRANSFERTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.cpp b/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.cpp new file mode 100755 index 0000000..d83e8ff --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.cpp @@ -0,0 +1,883 @@ +#include "ReadThread.h" +#include "../TransferThread.h" + +#ifdef Q_OS_LINUX +#include +#endif + +#ifdef Q_OS_UNIX +#include +#include +#include +#include +#endif +#include + +ReadThread::ReadThread() +{ + start(); + moveToThread(this); + stopIt=false; + putInPause=false; + blockSize=ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*1024; + setObjectName(QStringLiteral("read")); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + isInReadLoop=false; + tryStartRead=false; + lastGoodPosition=0; + isOpen.release(); + + #ifdef Q_OS_UNIX + from=-1; + #else + from=nullptr; + #endif +} + +ReadThread::~ReadThread() +{ + stopIt=true; + //disconnect(this);//-> do into ~TransferThread() + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + #endif + pauseMutex.release(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + #endif + pauseMutex.release(); + //if(isOpen.available()<=0) + emit internalStartClose(); + isOpen.acquire(); + exit(); + wait(); +} + +void ReadThread::run() +{ + if(!connect(this,&ReadThread::internalStartOpen, this,&ReadThread::internalOpenSlot, Qt::QueuedConnection)) + abort(); + if(!connect(this,&ReadThread::internalStartReopen, this,&ReadThread::internalReopen, Qt::QueuedConnection)) + abort(); + if(!connect(this,&ReadThread::internalStartRead, this,&ReadThread::internalRead, Qt::QueuedConnection)) + abort(); + if(!connect(this,&ReadThread::internalStartClose, this,&ReadThread::internalCloseSlot, Qt::QueuedConnection)) + abort(); + if(!connect(this,&ReadThread::checkIfIsWait, this,&ReadThread::isInWait, Qt::QueuedConnection)) + abort(); + exec(); +} + +void ReadThread::openRead(const INTERNALTYPEPATH &file, const Ultracopier::CopyMode &mode) +{ + if(!isRunning()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] the thread not running to open destination"+TransferThread::internalStringTostring(file)); + errorString_internal=tr("Internal error, please report it!").toStdString(); + emit error(); + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] open source: "+TransferThread::internalStringTostring(file)); + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + if(file==this->file) + { + std::cerr << "["+std::to_string(id)+"] Try reopen already opened same file: " << TransferThread::internalStringTostring(file) << std::endl; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Try reopen already opened same file: "+TransferThread::internalStringTostring(file)); + } + else + { + std::cerr << "["+std::to_string(id)+"] previous file is already open: "+TransferThread::internalStringTostring(this->file) << ", can't open " << TransferThread::internalStringTostring(file) << std::endl; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already open: "+TransferThread::internalStringTostring(this->file)); + } + internalCloseSlot(); + /* try bypass the bug + return;//better than hard shutdown + abort(); + emit internalStartClose();*/ + isOpen.acquire(); + isOpen.release(); + } + if(isInReadLoop) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already readding: "+TransferThread::internalStringTostring(file)); + return; + } + if(tryStartRead) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already try read: "+TransferThread::internalStringTostring(file)); + return; + } + stopIt=false; + fakeMode=false; + lastGoodPosition=0; + this->file=file; + this->mode=mode; + emit internalStartOpen(); +} + +std::string ReadThread::errorString() const +{ + return errorString_internal; +} + +void ReadThread::stop() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop()"); + stopIt=true; + pauseMutex.release(); + pauseMutex.release(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + #endif + //if(isOpen.available()<=0 || from>=0) + emit internalStartClose(); +} + +void ReadThread::pause() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] try put read thread in pause"); + if(stopIt) + return; + pauseMutex.tryAcquire(pauseMutex.available()); + putInPause=true; +} + +void ReadThread::resume() +{ + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + putInPause=false; + stopIt=false; + } + else + return; + #ifdef Q_OS_UNIX + if(from<0) + #else + if(from==NULL) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file is not open"); + return; + } + pauseMutex.release(); +} + +bool ReadThread::seek(const int64_t &position) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start with: "+std::to_string(position)); + if((int64_t)position>size()) + return false; + + #ifdef Q_OS_UNIX + if(from<0) + abort();//internal failure + return lseek(from,position,SEEK_SET)==position; + #else + if(from==NULL) + abort();//internal failure + LARGE_INTEGER liSize; + liSize.QuadPart=position; + return SetFilePointerEx(from,liSize,NULL,FILE_BEGIN); + #endif +} + +int64_t ReadThread::size() const +{ + #ifdef Q_OS_UNIX + struct stat st; + if(fstat(from, &st)==0) + return st.st_size; + else + { + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(file).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(file).c_str(), &source_statbuf)==0) + #endif + return source_statbuf.st_size; + else + return -1; + } + #else + LARGE_INTEGER lpFileSize; + if(!GetFileSizeEx(from,&lpFileSize)) + { + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(file.c_str(),GetFileExInfoStandard,&sourceW)) + { + uint64_t size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; + return size; + } + else + return -1; + } + else + return lpFileSize.QuadPart; + #endif +} + +void ReadThread::postOperation() +{ + emit internalStartClose(); +} + +bool ReadThread::internalOpenSlot() +{ + return internalOpen(); +} + +bool ReadThread::internalOpen(bool resetLastGoodPosition) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] internalOpen source: "+ + TransferThread::internalStringTostring(file)+", open in write because move: "+std::to_string(mode==Ultracopier::Move)); + if(stopIt) + { + emit closed(); + return false; + } + putInPause=false; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=InodeOperation; + #endif + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] this file is already open: "+TransferThread::internalStringTostring(file)); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + emit closed(); + return false; + } + /*can have permision to remove but not write + * if(mode==Ultracopier::Move) + openMode=QIODevice::ReadWrite;*/ + seekToZero=false; + #ifdef Q_OS_UNIX + from = ::open(TransferThread::internalStringTostring(file).c_str(), O_RDONLY); + #else + DWORD flags=FILE_ATTRIBUTE_NORMAL; + if(os_spec_flags) + flags|=FILE_FLAG_SEQUENTIAL_SCAN; + from=CreateFileW(file.c_str(),GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,flags,NULL); + #endif + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=INVALID_HANDLE_VALUE) + #endif + { + if(stopIt) + { + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + emit closed(); + return false; + } + pauseMutex.tryAcquire(pauseMutex.available()); + #ifdef Q_OS_LINUX + if(os_spec_flags) + { + posix_fadvise(from, 0, 0, POSIX_FADV_WILLNEED); + posix_fadvise(from, 0, 0, POSIX_FADV_SEQUENTIAL); + posix_fadvise(from, 0, 0, POSIX_FADV_NOREUSE); + } + #endif + if(stopIt) + { + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + emit closed(); + return false; + } + + //do one at same time + #ifdef Q_OS_UNIX + { + struct stat st; + fstat(from, &st); + size_at_open=st.st_size; + #ifdef Q_OS_MAC + mtime_at_open=st.st_mtimespec.tv_sec; + #else + mtime_at_open=st.st_mtim.tv_sec; + #endif + } + #else + { + LARGE_INTEGER lpFileSize; + GetFileSizeEx(from,&lpFileSize); + size_at_open=lpFileSize.QuadPart; + FILETIME LastWriteTime; + GetFileTime(from,NULL,NULL,&LastWriteTime); + mtime_at_open=LastWriteTime; + } + #endif + + putInPause=false; + if(resetLastGoodPosition) + lastGoodPosition=0; + if(!seek(lastGoodPosition)) + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } + isOpen.acquire(); + emit opened(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return true; + } + else + { + #ifdef Q_OS_WIN32 + from=NULL; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + DWORD e = GetLastError(); + #endif + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(e)+")" + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } +} + +void ReadThread::internalRead() +{ + if(writeThread==nullptr) + abort(); + isInReadLoop=true; + tryStartRead=false; + if(stopIt) + { + if(seekToZero && + #ifdef Q_OS_WIN32 + from!=NULL + #else + from>=0 + #endif + ) + { + stopIt=false; + lastGoodPosition=0; + seek(0); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose(); + return; + } + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=InodeOperation; + #endif + int sizeReaden=0; + #ifdef Q_OS_WIN32 + if(from==NULL) + #else + if(from<0) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] is not open!"); + isInReadLoop=false; + return; + } + char * data=NULL; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + numberOfBlockCopied=0; + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start the copy"); + emit readIsStarted(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose(); + return; + } + do + { + //read one block + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] read put in pause"); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose(); + return; + } + pauseMutex.acquire(); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose(); + return; + } + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Read; + #endif + data=(char *)malloc(blockSize); + if(data==NULL) + { + errorString_internal="Out of memory"; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to read the source file: "+TransferThread::internalStringTostring(file)+ + ", error: "+"Out of memory" + ); + isInReadLoop=false; + emit error(); + return; + } + #ifdef Q_OS_WIN32 + DWORD lpNumberOfBytesRead=0; + const BOOL retRead=ReadFile(from,data,blockSize, + &lpNumberOfBytesRead,NULL); + sizeReaden=lpNumberOfBytesRead; + #else + sizeReaden=::read(from,data,blockSize); + #endif + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + + #ifdef Q_OS_WIN32 + if(retRead==FALSE) + #else + if(sizeReaden<0) + #endif + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to read the source file: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=tr("Unable to read the source file: ").toStdString()+strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to read the source file: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + isInReadLoop=false; + emit error(); + return; + } + if(sizeReaden>0) + { + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=WaitWritePipe; + #endif + if(!writeThread->write(data,sizeReaden))//speed limitation here + { + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + if(!stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopped because the write is stopped: "+std::to_string(lastGoodPosition)); + stopIt=true; + } + } + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose();//need re-open the destination and then the source + return; + } + lastGoodPosition+=sizeReaden; + } + /* + if(lastGoodPosition>16*1024) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("[")+QString::number(id)+QStringLiteral("] ")+QStringLiteral("Test error in reading: %1 (%2)").arg(file.errorString()).arg(file.error())); + errorString_internal=QStringLiteral("Test error in reading: %1 (%2)").arg(file.errorString()).arg(file.error()); + isInReadLoop=false; + emit error(); + return; + } + */ + } + while(sizeReaden>0 && !stopIt); + if(lastGoodPosition>size()) + { + errorString_internal=tr("File truncated during the read, possible data change").toStdString(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Source truncated during the read"); + isInReadLoop=false; + emit error(); + return; + } + isInReadLoop=false; + if(stopIt) + { + stopIt=false; + return; + } + postOperation(); + emit readIsStopped();//will product by signal connection writeThread->endIsDetected(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop the read"); +} + +void ReadThread::startRead() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + if(tryStartRead) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] already in try start"); + return; + } + if(isInReadLoop) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); + else + { + tryStartRead=true; + emit internalStartRead(); + } +} + +void ReadThread::internalCloseSlot() +{ + internalClose(); +} + +void ReadThread::internalClose(bool callByTheDestructor) +{ + /// \note never send signal here, because it's called by the destructor + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[")+QString::number(id)+QStringLiteral("] start")); + bool closeTheFile=false; + if(!fakeMode) + { + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + closeTheFile=true; + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + isInReadLoop=false; + } + } + if(!callByTheDestructor) + emit closed(); + + /// \note always the last of this function + if(closeTheFile) + isOpen.release(); +} + +/** \brief set block size +\param block the new block size in B +\return Return true if succes */ +bool ReadThread::setBlockSize(const int blockSize) +{ + //can be smaller than min block size to do correct speed limitation + if(blockSize>1 && blockSizeblockSize=blockSize; + //set the new max speed because the timer have changed + return true; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"block size out of range: "+std::to_string(blockSize)); + return false; + } +} + +#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT +/*! \brief Set the max speed +\param tempMaxSpeed Set the max speed in KB/s, 0 for no limit */ +void ReadThread::setMultiForBigSpeed(const int &multiForBigSpeed) +{ + this->multiForBigSpeed=multiForBigSpeed; + waitNewClockForSpeed.release(); +} + +/// \brief For give timer every X ms +void ReadThread::timeOfTheBlockCopyFinished() +{ + /* this is the old way to limit the speed, it product blocking + *if(waitNewClockForSpeed.available()maxSpeed>0)*/ + if(waitNewClockForSpeed.available()<=1) + waitNewClockForSpeed.release(); +} +#endif + +/// \brief do the fake open +void ReadThread::fakeOpen() +{ + fakeMode=true; + emit opened(); +} + +/// \brief do the fake writeIsStarted +void ReadThread::fakeReadIsStarted() +{ + emit readIsStarted(); +} + +/// \brief do the fake writeIsStopped +void ReadThread::fakeReadIsStopped() +{ + postOperation(); + emit readIsStopped(); +} + +int64_t ReadThread::getLastGoodPosition() const +{ + /*if(lastGoodPosition>file.size()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("[")+QString::number(id)+QStringLiteral("] Bug, the lastGoodPosition is greater than the file size!")); + return file.size(); + } + else*/ + return lastGoodPosition; +} + +//reopen after an error +void ReadThread::reopen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + if(isInReadLoop) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] try reopen where read is not finish"); + return; + } + stopIt=true; + emit internalStartReopen(); +} + +bool ReadThread::internalReopen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + stopIt=false; + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + isOpen.release(); + } + int64_t temp_size=-1; + #ifdef Q_OS_UNIX + uint64_t temp_mtime=0; + { + struct stat st; + if(::stat(TransferThread::internalStringTostring(file).c_str(), &st)!=-1) + { + temp_size=st.st_size; + #ifdef Q_OS_MAC + temp_mtime=st.st_mtimespec.tv_sec; + #else + temp_mtime=st.st_mtim.tv_sec; + #endif + } + } + if(size_at_open!=temp_size || mtime_at_open!=temp_mtime) + #else + FILETIME temp_mtime; + { + LARGE_INTEGER FileSize; + GetFileSizeEx(from,&FileSize); + temp_size=FileSize.QuadPart; + GetFileTime(from,NULL,NULL,&temp_mtime); + } + if(size_at_open!=temp_size || mtime_at_open.dwLowDateTime!=temp_mtime.dwLowDateTime || mtime_at_open.dwHighDateTime!=temp_mtime.dwHighDateTime) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] source file have changed since the last open, restart all"); + //fix this function like the close function + if(internalOpen(true)) + { + emit resumeAfterErrorByRestartAll(); + return true; + } + else + return false; + } + else + { + //fix this function like the close function + if(internalOpen(false)) + { + emit resumeAfterErrorByRestartAtTheLastPosition(); + return true; + } + else + return false; + } + return false; +} + +//set the write thread +void ReadThread::setWriteThread(WriteThread * writeThread) +{ + this->writeThread=writeThread; +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//to set the id +void ReadThread::setId(int id) +{ + this->id=id; +} +#endif + +void ReadThread::seekToZeroAndWait() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + stopIt=true; + seekToZero=true; + emit checkIfIsWait(); +} + +void ReadThread::isInWait() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + if(seekToZero) + { + stopIt=false; + seekToZero=false; + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + lastGoodPosition=0; + seek(0); + } + else + internalOpen(true); + emit isSeekToZeroAndWait(); + } +} + +bool ReadThread::isReading() const +{ + return isInReadLoop; +} + +void ReadThread::setOsSpecFlags(bool os_spec_flags) +{ + this->os_spec_flags=os_spec_flags; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.h b/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.h new file mode 100755 index 0000000..4de0129 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.h @@ -0,0 +1,163 @@ +/** \file ReadThread.h +\brief Thread changed to open/close and read the source file +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef READTHREAD_H +#define READTHREAD_H + +#include +#include +#include +#include + +#ifdef Q_OS_WIN32 +#include +#endif + +#include "WriteThread.h" +#include "../Environment.h" +#include "../StructEnumDefinition_CopyEngine.h" +#include "../CopyEngineUltracopier-SpecVariable.h" + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#define INTERNALTYPECHAR wchar_t +#else +#define INTERNALTYPEPATH std::string +#define INTERNALTYPECHAR char +#endif + +/// \brief Thread changed to open/close and read the source file +class ReadThread : public QThread +{ + Q_OBJECT +public: + explicit ReadThread(); + ~ReadThread(); +protected: + void run(); +public: + /// \brief open with the name and copy mode + void openRead(const INTERNALTYPEPATH &file, const Ultracopier::CopyMode &mode); + /// \brief return the error string + std::string errorString() const; + //QByteArray read(qint64 position,qint64 maxSize); + /// \brief stop the copy + void stop(); + /// \brief put the copy in pause + void pause(); + /// \brief resume the copy + void resume(); + /// \brief get the size of the source file + int64_t size() const; + /// \brief get the last good position + int64_t getLastGoodPosition() const; + /// \brief start the reading of the source file + void startRead(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + /// \brief set the current max speed in KB/s + void setMultiForBigSpeed(const int &multiForBigSpeed); + #endif + /// \brief set block size in KB mostly for speed + bool setBlockSize(const int blockSize); + /// \brief reopen after an error + void reopen(); + /// \brief set the write thread + void setWriteThread(WriteThread * writeThread); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief to set the id + void setId(int id); + /// \brief stat + enum ReadStat + { + Idle=0, + InodeOperation=1, + Read=2, + WaitWritePipe=3 + }; + ReadStat status; + #endif + /// \brief return if it's reading + bool isReading() const; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + /// \brief executed at regular interval to do a speed throling + void timeOfTheBlockCopyFinished(); + #endif + /// \brief do the fake open + void fakeOpen(); + /// \brief do the fake readIsStarted + void fakeReadIsStarted(); + /// \brief do the fake readIsStopped + void fakeReadIsStopped(); + + void setOsSpecFlags(bool os_spec_flags); +public slots: + /// \brief to reset the copy, and put at the same state when it just open + void seekToZeroAndWait(); + void postOperation(); +signals: + void error() const; + void opened() const; + void readIsStarted() const; + void readIsStopped() const; + void closed() const; + void isSeekToZeroAndWait() const; + void checkIfIsWait() const; + void resumeAfterErrorByRestartAll() const; + void resumeAfterErrorByRestartAtTheLastPosition() const; + // internal signals + void internalStartOpen() const; + void internalStartReopen() const; + void internalStartRead() const; + void internalStartClose() const; + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; + +private: + std::string errorString_internal; + volatile bool stopIt; + Ultracopier::CopyMode mode; + bool os_spec_flags; + int64_t lastGoodPosition; + volatile int blockSize;//in Bytes + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + QSemaphore waitNewClockForSpeed; + volatile int numberOfBlockCopied; ///< Multiple for count the number of block copied + volatile int multiForBigSpeed; ///< Multiple for count the number of block needed + #endif + WriteThread* writeThread; + int id; + QSemaphore isOpen; + QSemaphore pauseMutex; + volatile bool putInPause; + volatile bool isInReadLoop; + volatile bool seekToZero; + volatile bool tryStartRead; + int64_t size_at_open; + #ifdef Q_OS_UNIX + uint64_t mtime_at_open; + #else + FILETIME mtime_at_open; + #endif + bool fakeMode; + //internal function + bool seek(const int64_t &position);/// \todo search if is use full + + #ifdef Q_OS_UNIX + int from; + #else + HANDLE from; + #endif + INTERNALTYPEPATH file; +private slots: + bool internalOpen(bool resetLastGoodPosition=true); + bool internalOpenSlot(); + bool internalReopen(); + void internalRead(); + void internalClose(bool callByTheDestructor=false); + void internalCloseSlot(); + void isInWait(); +}; + +#endif // READTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.cpp b/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.cpp new file mode 100755 index 0000000..b5af928 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.cpp @@ -0,0 +1,1442 @@ +//presume bug linked as multple paralelle inode to resume after "overwrite" +//then do overwrite node function to not re-set the file name + +#include "TransferThreadAsync.h" +#include +#include + +#ifdef Q_OS_WIN32 +#include +#include +#include + +#define REPARSE_MOUNTPOINT_HEADER_SIZE 8 + +typedef struct _REPARSE_DATA_BUFFER { + ULONG ReparseTag; + USHORT ReparseDataLength; + USHORT Reserved; + union { + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + ULONG Flags; + WCHAR PathBuffer[1]; + } SymbolicLinkReparseBuffer; + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + WCHAR PathBuffer[1]; + } MountPointReparseBuffer; + struct { + UCHAR DataBuffer[1]; + } GenericReparseBuffer; + } DUMMYUNIONNAME; +} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; + +/*memo> HANDLE hToken = NULL; +TOKEN_PRIVILEGES tp; +try { + if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) throw ::GetLastError(); + if (!::LookupPrivilegeValue(NULL, SE_RESTORE_NAME, &tp.Privileges[0].Luid)) throw ::GetLastError(); + tp.PrivilegeCount = 1; + tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + if (!::AdjustTokenPrivileges(hToken, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), NULL, NULL)) throw ::GetLastError(); +} +catch (DWORD) { + ok=false; +} +if (hToken) + ::CloseHandle(hToken);*/ +#endif + +#include "../../../../cpp11addition.h" + +#ifndef Q_OS_WIN32 +#include +#include +#include +#endif + +TransferThreadAsync::TransferThreadAsync() : + transferProgression(0) +{ + haveStartTime=false; + #ifndef Q_OS_UNIX + PSecurityD=NULL; + dacl=NULL; + #endif + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+QStringLiteral("] start: ")+QString::number((qint64)QThread::currentThreadId()))); + //the error push + readThread.setWriteThread(&writeThread); + + TransferThread::run(); + if(!connect(this,&TransferThreadAsync::internalStartPostOperation, this, &TransferThreadAsync::doFilePostOperation, Qt::QueuedConnection)) + abort(); + + //the thread change operation + if(!connect(this,&TransferThread::internalStartPreOperation, this, &TransferThreadAsync::preOperation, Qt::QueuedConnection)) + abort(); + if(!connect(this,&TransferThread::internalStartPostOperation, this, &TransferThreadAsync::postOperation, Qt::QueuedConnection)) + abort(); + if(!connect(this,&TransferThread::internalTryStartTheTransfer, this, &TransferThreadAsync::internalStartTheTransfer, Qt::QueuedConnection)) + abort(); + + //the error push + if(!connect(&readThread,&ReadThread::error, this, &TransferThreadAsync::read_error, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::error, this, &TransferThreadAsync::write_error, Qt::QueuedConnection)) + abort(); + //the state change operation + if(!connect(&readThread,&ReadThread::readIsStopped, this, &TransferThreadAsync::read_readIsStopped, Qt::QueuedConnection)) + abort(); + if(!connect(&readThread,&ReadThread::readIsStopped, &writeThread, &WriteThread::endIsDetected, Qt::QueuedConnection)) + abort(); + if(!connect(&readThread,&ReadThread::closed, this, &TransferThreadAsync::read_closed, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::closed, this, &TransferThreadAsync::write_closed, Qt::QueuedConnection)) + abort(); + + if(!connect(this, &TransferThreadAsync::openRead,&readThread,&ReadThread::openRead, Qt::QueuedConnection)) + abort(); + if(!connect(this, &TransferThreadAsync::openWrite,&writeThread,&WriteThread::openWrite, Qt::QueuedConnection)) + abort(); + + //when both is ready, startRead() + if(!connect(&readThread,&ReadThread::opened, this, &TransferThreadAsync::read_opened, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::opened, this, &TransferThreadAsync::write_opened, Qt::QueuedConnection)) + abort(); + + //error management +/* if(!connect(&readThread,&ReadThread::isSeekToZeroAndWait, this, &TransferThreadAsync::readThreadIsSeekToZeroAndWait, Qt::QueuedConnection)) + abort(); + if(!connect(&readThread,&ReadThread::resumeAfterErrorByRestartAtTheLastPosition,this, &TransferThreadAsync::readThreadResumeAfterError, Qt::QueuedConnection)) + abort(); + if(!connect(&readThread,&ReadThread::resumeAfterErrorByRestartAll,&writeThread, &WriteThread::flushAndSeekToZero, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::flushedAndSeekedToZero, this, &TransferThread::readThreadResumeAfterError, Qt::QueuedConnection)) + abort();*/ + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(&readThread,&ReadThread::debugInformation, this, &TransferThreadAsync::debugInformation, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::debugInformation, this, &TransferThreadAsync::debugInformation, Qt::QueuedConnection)) + abort(); + if(!connect(&driveManagement,&DriveManagement::debugInformation,this, &TransferThreadAsync::debugInformation, Qt::QueuedConnection)) + abort(); + #endif + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start: "+std::to_string((int64_t)QThread::currentThreadId())); + start(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop: "+std::to_string((int64_t)QThread::currentThreadId())); +} + +TransferThreadAsync::~TransferThreadAsync() +{ + #ifdef Q_OS_WIN32 + stopItWin=1; + #endif + stopIt=true; + readThread.stop(); + readThread.exit(); + readThread.wait(); + writeThread.stop(); + writeThread.exit(); + writeThread.wait(); + exit(0); + wait(); + //else cash without this disconnect + //disconnect(&readThread); + //disconnect(&writeThread); + #ifndef Q_OS_UNIX + if(PSecurityD!=NULL) + { + //free(PSecurityD); + PSecurityD=NULL; + } + if(dacl!=NULL) + { + //free(dacl); + dacl=NULL; + } + #endif +} + +void TransferThreadAsync::run() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start: "+std::to_string((int64_t)QThread::currentThreadId())); + moveToThread(this); + exec(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop: "+std::to_string((int64_t)QThread::currentThreadId())); +} + +void TransferThreadAsync::startTheTransfer() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(transferId==0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert if transferId==0")); + return; + } + startTransferTime.restart(); + haveTransferTime=true; + emit internalTryStartTheTransfer(); +} + +void TransferThreadAsync::internalStartTheTransfer() +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(QThread::currentThread()!=this) + abort(); + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(transfer_stat==TransferStat_Idle) + { + if(mode!=Ultracopier::Move) + { + /// \bug can pass here because in case of direct move on same media, it return to idle stat directly + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at idle")); + } + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(transfer_stat==TransferStat_PostOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at PostOperation")); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(transfer_stat==TransferStat_Transfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at Transfer")); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(canStartTransfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] canStartTransfer is already set to true")); + // call for second time, first time was not ready, if blocked in preop why? + //ifCanStartTransfer(); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] check how start the transfer")); + canStartTransfer=true; + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start directly the transfer")); + ifCanStartTransfer(); +} + +bool TransferThreadAsync::setFiles(const INTERNALTYPEPATH& source, const int64_t &size, const INTERNALTYPEPATH& destination, const Ultracopier::CopyMode &mode) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start, source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + if(transfer_stat!=TransferStat_Idle) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + return false; + } + if(!isRunning()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] The current thread is not running"); + if(!TransferThread::setFiles(source,size,destination,mode)) + return false; + transferProgression=0; + //transferSize=0;//set by ListThread at currentTransferThread->transferSize=currentActionToDoTransfer.size; very important to do parallel small file + sended_state_readStopped=false; + readIsClosedVariable=false; + writeIsClosedVariable=false; + readIsOpenVariable=false; + writeIsOpenVariable=false; + realMove=false; + return true; +} + +void TransferThreadAsync::resetExtraVariable() +{ + transferProgression=0; + readIsOpenVariable=false; + writeIsOpenVariable=false; + TransferThread::resetExtraVariable(); +} + +bool TransferThreadAsync::remainFileOpen() const +{ + return remainSourceOpen() || remainDestinationOpen(); +} + +bool TransferThreadAsync::remainSourceOpen() const +{ + return !readIsClosedVariable; +} + +bool TransferThreadAsync::remainDestinationOpen() const +{ + return !writeIsClosedVariable; +} + +void TransferThreadAsync::preOperation() +{ + if(transfer_stat!=TransferStat_PreOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+ + TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination) + +" transfer_stat: "+std::to_string(transfer_stat)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start: source: "+ + TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + haveStartTime=true; + needRemove=false; + if(isSame()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] is same "+ + TransferThread::internalStringTostring(source)+" than "+TransferThread::internalStringTostring(destination)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after is same"); + /*Why this code? + if(readError) + { + readError=false; + return; + }*/ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before destination exists"); + if(destinationExists()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] destination exists: "+TransferThread::internalStringTostring(destination)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after destination exists"); + /*Why this code? + if(readError) + { + readError=false; + return; + }*/ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before keep date"); + #ifdef Q_OS_WIN32 + doTheDateTransfer=!is_symlink(source); + #else + doTheDateTransfer=true; + #endif + if(doTheDateTransfer) + { + doTheDateTransfer=readSourceFileDateTime(source); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after keep date"); + #ifdef Q_OS_MAC + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] read the source time: "+std::to_string(butime.modtime)); + #endif + if(!doTheDateTransfer) + { + //will have the real error at source open + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unable to read the source time: "+TransferThread::internalStringTostring(source)); + if(keepDate) + { + emit errorOnFile(source,tr("Wrong modification date or unable to get it, you can disable time transfer to do it").toStdString()); + return; + } + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before perm"); + if(doRightTransfer) + havePermission=readSourceFilePermissions(source); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after perm"); + transfer_stat=TransferStat_WaitForTheTransfer; + ifCanStartTransfer(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit preOperationStopped()"); + emit preOperationStopped(); +} + +void TransferThreadAsync::postOperation() +{ + doFilePostOperation(); +} + +#ifdef Q_OS_WIN32 +DWORD CALLBACK progressRoutine( + LARGE_INTEGER TotalFileSize, + LARGE_INTEGER TotalBytesTransferred, + LARGE_INTEGER StreamSize, + LARGE_INTEGER StreamBytesTransferred, + DWORD dwStreamNumber, + DWORD dwCallbackReason, + HANDLE hSourceFile, + HANDLE hDestinationFile, + LPVOID lpData +) +{ + (void)TotalFileSize; + (void)TotalBytesTransferred; + (void)StreamSize; + (void)StreamBytesTransferred; + (void)dwStreamNumber; + (void)dwCallbackReason; + (void)hSourceFile; + (void)hDestinationFile; + (void)lpData; + + static_cast(lpData)->setProgression(TotalBytesTransferred.QuadPart,TotalFileSize.QuadPart); + return PROGRESS_CONTINUE; +} + +void TransferThreadAsync::setProgression(const uint64_t &pos, const uint64_t &size) +{ + if(transfer_stat==TransferStat_Transfer) + { + if(pos==size) + emit readStopped(); + transferProgression=pos; + } +} +#endif + +/// \brief set buffer +void TransferThreadAsync::setBuffer(const bool buffer) +{ + writeThread.buffer=buffer; +} + +void TransferThreadAsync::ifCanStartTransfer() +{ + realMove=false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start "+internalStringTostring(source)+"->"+internalStringTostring(destination)); + if(transfer_stat!=TransferStat_WaitForTheTransfer /*wait preoperation*/ || !canStartTransfer/*wait start call*/) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+ + "] transfer_stat:"+std::to_string(transfer_stat)+ + ", canStartTransfer: "+std::to_string(canStartTransfer)); + //preOperationStopped();//tiger to seam maybe is can be started, maybe this generate a bug + return; + } + transfer_stat=TransferStat_Transfer; + + #ifdef WIDESTRING + const size_t destinationIndex=destination.rfind(L'/'); + if(destinationIndex!=std::string::npos && destinationIndex"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=false; + emit errorOnFile(source,strError); + return; + } + } + else + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=false; + emit errorOnFile(source,strError); + return; + } + if(isJunction)//junction + { + std::wstring cleanPath(ReparseBuffer.MountPointReparseBuffer.PathBuffer); + if(cleanPath.substr(0,4)==L"\\??\\") + cleanPath=cleanPath.substr(4); + successFull=TransferThreadAsync::mkJunction( + TransferThread::toFinalPath(destination).c_str(), + cleanPath.c_str() + ); + if(successFull==FALSE) + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=true; + emit errorOnFile(destination,strError); + } + } + else//symlink or symlinkD + { + successFull=CopyFileExW(TransferThread::toFinalPath(source).c_str(),TransferThread::toFinalPath(destination).c_str(), + (LPPROGRESS_ROUTINE)progressRoutine,this,&stopItWin,COPY_FILE_ALLOW_DECRYPTED_DESTINATION | 0x00000800);//0x00000800 is COPY_FILE_COPY_SYMLINK + if(successFull==FALSE) + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=true; + emit errorOnFile(destination,strError); + } + } + } + else + #else + if(TransferThread::is_symlink(source)) + { + realMove=true; + bool isFileOrSymlink=false; + { + struct stat p_statbuf; + if (lstat(TransferThread::internalStringTostring(destination).c_str(), &p_statbuf) < 0) + {} + else if (S_ISLNK(p_statbuf.st_mode)) + isFileOrSymlink=true; + else if (S_ISREG(p_statbuf.st_mode)) + isFileOrSymlink=true; + } + if(isFileOrSymlink) + if(!unlink(destination)) + { + const int terr=errno; + if(terr!=2) + { + const std::string &strError=strerror(terr); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error "+ + TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError+"("+std::to_string(terr)+")" + ); + readError=false; + writeError=true; + emit errorOnFile(destination,strError); + return; + } + } + char buf[PATH_MAX]; + const ssize_t s=readlink(TransferThread::internalStringTostring(source).c_str(),buf,sizeof(buf)); + buf[s]=0x00; + if(s<0) + { + const int terr=errno; + const std::string &strError=strerror(terr); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error "+ + TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError+"("+std::to_string(terr)+")" + ); + readError=true; + writeError=false; + emit errorOnFile(source,strError); + return; + } + else + { + if(symlink(buf,TransferThread::internalStringTostring(destination).c_str())!=0) + { + const int terr=errno; + const std::string &strError=strerror(terr); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error "+ + buf+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError+"("+std::to_string(terr)+")" + ); + readError=true; + writeError=false; + emit errorOnFile(destination,strError); + return; + } + } + successFull=true; + } + else + #endif + { + #ifdef Q_OS_WIN32 + if(native_copy) + { + successFull=CopyFileExW(TransferThread::toFinalPath(source).c_str(),TransferThread::toFinalPath(destination).c_str(), + (LPPROGRESS_ROUTINE)progressRoutine,this,&stopItWin,COPY_FILE_ALLOW_DECRYPTED_DESTINATION | 0x00000800);//0x00000800 is COPY_FILE_COPY_SYMLINK + if(successFull==FALSE) + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=true; + emit errorOnFile(destination,strError); + } + } + else + #endif + { + openRead(source,mode); + openWrite(destination,0); + return; + } + } + } + if(!successFull) + { + #ifdef Q_OS_WIN32 + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + #else + const int terr=errno; + const std::string &strError=strerror(terr); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error "+ + TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError+"("+std::to_string(terr)+")" + ); + #endif + if(stopIt) + { + if(!source.empty()) + if(exists(source) && source!=destination) + unlink(destination); + resetExtraVariable(); + return;//and reset? + } + #ifdef Q_OS_WIN32 + readError=true; + writeError=true; + emit errorOnFile(destination,strError); + #else + if(readError) + emit errorOnFile(source,strError); + else + emit errorOnFile(destination,strError); + #endif + return; + } + readIsClosedVariable=true; + writeIsClosedVariable=true; + checkIfAllIsClosedAndDoOperations(); +} + +void TransferThreadAsync::checkIfAllIsClosedAndDoOperations() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop copy"); + if((readError || writeError) && !needSkip && !stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] resolve error before progress"); + return; + } + if(remainFileOpen()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] remainFileOpen()"); + return; + } + if(!source.empty() && needRemove && (stopIt || needSkip)) + if(is_file(source) && source!=destination) + unlink(destination); + transfer_stat=TransferStat_Idle; + + transferSize=readThread.getLastGoodPosition(); + + if(mode==Ultracopier::Move && !realMove) + if(exists(destination)) + if(!unlink(source)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] move and unable to remove: "+ + TransferThread::internalStringTostring(source)+ + #ifdef Q_OS_WIN32 + GetLastErrorStdStr() + #else + strerror(errno) + #endif + ); + transfer_stat=TransferStat_PostTransfer; + emit pushStat(transfer_stat,transferId); + transfer_stat=TransferStat_PostOperation; + emit pushStat(transfer_stat,transferId); + doFilePostOperation(); + + source.clear(); + destination.clear(); + resetExtraVariable(); + //don't need remove because have correctly finish (it's not in: have started) + needRemove=false; + needSkip=false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit postOperationStopped() transfer_stat=TransferStat_Idle"); + transfer_stat=TransferStat_Idle; + emit postOperationStopped(); +} + +//stop the current copy +void TransferThreadAsync::stop() +{ + #ifdef Q_OS_WIN32 + stopItWin=1; + #endif + stopIt=true; + haveStartTime=false; + if(transfer_stat==TransferStat_Idle) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] transfer_stat==TransferStat_Idle"); + return; + } + if(transfer_stat==TransferStat_PreOperation) + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] transfer_stat==TransferStat_PreOperation"); + return; + } + if(realMove) + { + if(readError || writeError) + transfer_stat=TransferStat_Idle; + return; + } + readThread.stop(); + writeThread.stop(); +} + +//retry after error +void TransferThreadAsync::retryAfterError() +{ + /// \warning skip the resetExtraVariable(); to be more exact and resolv some bug + if(transfer_stat==TransferStat_Idle) + { + if(transferId==0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+ + ("] seam have bug, source: ")+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+ + "] restart all, source: "+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + readError=false; + //writeError=false; + emit internalStartPreOperation(); + return; + } + //opening error + if(transfer_stat==TransferStat_PreOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+ + "] is not idle, source: "+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)+ + ", stat: "+std::to_string(transfer_stat)); + readError=false; + //writeError=false; + emit internalStartPreOperation(); + //tryOpen();-> recheck all, because can be an error into isSame(), rename(), ... + return; + } + //data streaming error + if(transfer_stat!=TransferStat_PostOperation && transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] is not in right stat, source: ")+ + TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)+", stat: "+std::to_string(transfer_stat)); + return; + } + if(transfer_stat==TransferStat_PostOperation) + { + emit internalStartPostOperation(); + return; + } + emit internalTryStartTheTransfer(); +} + +//skip the copy +void TransferThreadAsync::skip() +{ + #ifdef Q_OS_WIN32 + stopItWin=1; + #endif + stopIt=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start with stat: "+std::to_string(transfer_stat)); + switch(static_cast(transfer_stat)) + { + case TransferStat_WaitForTheTransfer: + //needRemove=true;never put that's here, can product destruction of the file + case TransferStat_PreOperation: + if(needSkip) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); + return; + } + needSkip=true; + //check if all is source and destination is closed + if(remainFileOpen()) + { + if(remainSourceOpen()) + readThread.stop(); + if(remainDestinationOpen()) + writeThread.stop(); + } + else // wait nothing, just quit + { + transfer_stat=TransferStat_PostOperation; + emit internalStartPostOperation(); + } + resetExtraVariable(); + break; + case TransferStat_Transfer: + if(needSkip) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); + return; + } + //needRemove=true;never put that's here, can product destruction of the file + needSkip=true; + if(realMove) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+ + "] Do the direct FS fake close, realMove: "+std::to_string(realMove)); + /*readThread.fakeReadIsStarted(); + writeThread.fakeWriteIsStarted(); + readThread.fakeReadIsStopped(); + writeThread.fakeWriteIsStopped();*/ + emit readStopped(); + emit postOperationStopped(); + transfer_stat=TransferStat_Idle; + emit pushStat(transfer_stat,transferId); + return; + } + writeThread.flushBuffer(); + if(remainFileOpen()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] remainFileOpen"); + if(remainSourceOpen()) + readThread.stop(); + if(remainDestinationOpen()) + writeThread.stop(); + } + else // wait nothing, just quit + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] wait nothing, just quit"); + transfer_stat=TransferStat_PostOperation; + emit internalStartPostOperation(); + } + if(!source.empty() && needRemove) + if(exists(source) && source!=destination) + unlink(destination); + break; + case TransferStat_PostTransfer: + if(needSkip) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); + return; + } + //needRemove=true;never put that's here, can product destruction of the file + needSkip=true; + if(realMove) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] Do the direct FS fake close, realMove: "+std::to_string(realMove)); + readThread.fakeReadIsStarted(); + writeThread.fakeWriteIsStarted(); + readThread.fakeReadIsStopped(); + writeThread.fakeWriteIsStopped(); + return; + } + writeThread.flushBuffer(); + if(remainFileOpen()) + { + if(remainSourceOpen()) + readThread.stop(); + if(remainDestinationOpen()) + writeThread.stop(); + } + else // wait nothing, just quit + { + transfer_stat=TransferStat_PostOperation; + emit internalStartPostOperation(); + } + break; + case TransferStat_PostOperation: + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] can skip in this state: "+std::to_string(transfer_stat)); + return; + } + //can be reset + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle"); + transfer_stat=TransferStat_Idle; + //emit to manager with List Thread + emit postOperationStopped(); +} + +//return info about the copied size +int64_t TransferThreadAsync::copiedSize() +{ + switch(static_cast(transfer_stat)) + { + case TransferStat_Transfer: + case TransferStat_PostOperation: + case TransferStat_PostTransfer: + return (readThread.getLastGoodPosition()+writeThread.getLastGoodPosition())/2; + default: + return 0; + } +} + +//retry after error +void TransferThreadAsync::putAtBottom() +{ + emit tryPutAtBottom(); +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void TransferThreadAsync::setRsync(const bool rsync) +{ + this->rsync=rsync; +} +#endif + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//to set the id +void TransferThreadAsync::setId(int id) +{ + TransferThread::setId(id); +} + +char TransferThreadAsync::readingLetter() const +{ + switch(static_cast(readThread.status)) + { + case TransferStat_Idle: + return '_'; + break; + case TransferStat_PreOperation: + return 'I'; + break; + case TransferStat_WaitForTheTransfer: + return 'W'; + break; + case TransferStat_Transfer: + return 'C'; + break; + case TransferStat_PostTransfer: + return 'R'; + break; + case TransferStat_PostOperation: + return 'P'; + break; + default: + return '?'; + } +} + +char TransferThreadAsync::writingLetter() const +{ + switch(static_cast(writeThread.status)) + { + case TransferStat_Idle: + return '_'; + break; + case TransferStat_PreOperation: + return 'I'; + break; + case TransferStat_WaitForTheTransfer: + return 'W'; + break; + case TransferStat_Transfer: + return 'C'; + break; + case TransferStat_PostTransfer: + return 'R'; + break; + case TransferStat_PostOperation: + return 'P'; + break; + default: + return '?'; + } +} +#endif + +//not copied size, ... +uint64_t TransferThreadAsync::realByteTransfered() const +{ + const uint64_t &l=readThread.getLastGoodPosition(); + switch(static_cast(transfer_stat)) + { + case TransferStat_Transfer: + case TransferStat_PostTransfer: + return l; + case TransferStat_PostOperation: + return l; + default: + return 0; + } +} + +//first is read, second is write +std::pair TransferThreadAsync::progression() const +{ + std::pair returnVar; + switch(static_cast(transfer_stat)) + { + case TransferStat_Transfer: + returnVar.first=readThread.getLastGoodPosition(); + returnVar.second=writeThread.getLastGoodPosition(); + /*if(returnVar.first 0) + { + if(stopIt) + { + close(fd_to); + close(fd_from); + return false; + } + char *out_ptr = buf; + ssize_t nwritten; + + do { + nwritten = write(fd_to, out_ptr, nread); + if(stopIt) + { + close(fd_to); + close(fd_from); + return false; + } + + if (nwritten >= 0) + { + nread -= nwritten; + out_ptr += nwritten; + transferProgression += nwritten; + } + else if (errno != EINTR) + { + writeError=true; + goto out_error; + } + } while (nread > 0); + } + + if (nread == 0) + { + ftruncate(fd_to,transferProgression); + if (close(fd_to) < 0) + { + fd_to = -1; + readError=true; + goto out_error; + } + if (close(fd_from) < 0) + return -1; + if(stopIt) + return -1; + + emit readStopped(); + return true; + } + + out_error: + saved_errno = errno; + + close(fd_from); + if (fd_to >= 0) + close(fd_to); + + errno = saved_errno; + return false; +}*/ +#endif + +//implemente to connect async +void TransferThreadAsync::read_error() +{ + if(readError) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already in read error!"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + fileContentError = true; + readError = true; + //writeIsReadyVariable = false;//wrong because write can be ready here + if(!writeError)//already display error for the write + emit errorOnFile(source,readThread.errorString()); +} + +void TransferThreadAsync::read_readIsStopped() +{ + if(realMove) + return; + if(!sended_state_readStopped) + { + sended_state_readStopped=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit readIsStopped()"); + emit readStopped(); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] drop dual read stopped"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + canStartTransfer=false; + //check here if need start checksuming or not + transfer_stat=TransferStat_PostTransfer; + emit pushStat(transfer_stat,transferId); +} + +void TransferThreadAsync::read_closed() +{ + if(realMove) + return; + if(readIsClosedVariable) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] double event dropped")); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + readIsClosedVariable=true; + checkIfAllIsClosedAndDoOperations(); +} + +void TransferThreadAsync::write_error() +{ + if(writeError) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already in write error!"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + fileContentError = true; + writeError = true; + if(!readError)//already display error for the read + emit errorOnFile(destination,writeThread.errorString()); +} + +void TransferThreadAsync::write_closed() +{ + if(realMove) + return; + if(writeIsClosedVariable) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] double event dropped"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + writeIsClosedVariable=true; + if(stopIt && needRemove && source!=destination) + { + if(is_file(source)) + unlink(destination); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] try destroy the destination when the source don't exists")); + } + checkIfAllIsClosedAndDoOperations(); +} + +#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + + +//set block size in Bytes for speed limitation +bool TransferThreadAsync::setBlockSize(const unsigned int blockSize) +{ + bool read=readThread.setBlockSize(blockSize); + bool write=writeThread.setBlockSize(blockSize); + return (read && write); +} + +//set the current max speed in KB/s +void TransferThreadAsync::setMultiForBigSpeed(const int &multiForBigSpeed) +{ + readThread.setMultiForBigSpeed(multiForBigSpeed); + writeThread.setMultiForBigSpeed(multiForBigSpeed); +} + +void TransferThreadAsync::timeOfTheBlockCopyFinished() +{ + readThread.timeOfTheBlockCopyFinished(); + writeThread.timeOfTheBlockCopyFinished(); +} +#endif + +//pause the copy +void TransferThreadAsync::pause() +{ + //only pause/resume during the transfer of file data + //from transfer_stat!=TransferStat_Idle because it resume at wrong order + if(transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] wrong stat to put in pause"); + return; + } + haveStartTime=false; + readThread.pause(); + writeThread.pause(); +} + +//resume the copy +void TransferThreadAsync::resume() +{ + //only pause/resume during the transfer of file data + //from transfer_stat!=TransferStat_Idle because it resume at wrong order + if(transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] wrong stat to put in pause"); + return; + } + readThread.resume(); + writeThread.resume(); +} + +//when both is ready, startRead() +void TransferThreadAsync::read_opened() +{ + if(readIsOpenVariable) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already readIsOpenVariable=true"); + return; + } + readIsOpenVariable=true; + transferSize=readThread.size(); + if(writeIsOpenVariable) + readThread.startRead(); +} + +void TransferThreadAsync::write_opened() +{ + if(writeIsOpenVariable) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already writeIsOpenVariable=true"); + return; + } + writeIsOpenVariable=true; + if(readIsOpenVariable) + readThread.startRead(); +} + +#ifdef Q_OS_WIN32 +bool TransferThreadAsync::mkJunction(LPCWSTR szJunction, LPCWSTR szPath) +{ + BYTE buf[sizeof(REPARSE_DATA_BUFFER) + MAX_PATH * sizeof(WCHAR)]; + REPARSE_DATA_BUFFER& ReparseBuffer = (REPARSE_DATA_BUFFER&)buf; + + if (!::CreateDirectoryW(szJunction, NULL)) + return false; + HANDLE hDir = ::CreateFileW(szJunction, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hDir == INVALID_HANDLE_VALUE) + return false; + + memset(buf, 0, sizeof(buf)); + ReparseBuffer.ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; + int len = wcslen(szPath)+1; + ReparseBuffer.MountPointReparseBuffer.PrintNameOffset = (len--) * sizeof(WCHAR); + ReparseBuffer.MountPointReparseBuffer.SubstituteNameLength = len * sizeof(WCHAR); + ReparseBuffer.ReparseDataLength = ReparseBuffer.MountPointReparseBuffer.SubstituteNameLength + 12; + wcscpy(ReparseBuffer.MountPointReparseBuffer.PathBuffer, szPath); + + DWORD dwRet; + if (!::DeviceIoControl(hDir, FSCTL_SET_REPARSE_POINT, &ReparseBuffer, + ReparseBuffer.ReparseDataLength+REPARSE_MOUNTPOINT_HEADER_SIZE, NULL, 0, &dwRet, NULL)) + { + ::CloseHandle(hDir); + ::RemoveDirectoryW(szJunction); + return false; + } + + ::CloseHandle(hDir); + return true; +} +#endif + +void TransferThreadAsync::setOsSpecFlags(bool os_spec_flags) +{ + readThread.setOsSpecFlags(os_spec_flags); + writeThread.setOsSpecFlags(os_spec_flags); +} + +void TransferThreadAsync::setNativeCopy(bool native_copy) +{ + this->native_copy=native_copy; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.h b/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.h new file mode 100755 index 0000000..83ddb91 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.h @@ -0,0 +1,153 @@ +/** \file TransferThreadAsync.h +\brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include + +#include +#include +#include +#include +#include + +//defore the next define +#include "../CopyEngineUltracopier-SpecVariable.h" + +#include "ReadThread.h" +#include "WriteThread.h" + +#ifdef Q_OS_UNIX + #include + #include + #include + #include +#endif +#ifdef Q_OS_WIN32 + #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY + #include + #include + #include + #include + #endif +#endif + +#ifdef Q_OS_WIN32 +#include +#endif + +#include "../TransferThread.h" +#include "../Environment.h" +#include "../DriveManagement.h" +#include "../StructEnumDefinition_CopyEngine.h" + +#ifndef TransferThreadAsync_H +#define TransferThreadAsync_H + +/// \brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations +class TransferThreadAsync : public TransferThread +{ + Q_OBJECT +public: + explicit TransferThreadAsync(); + ~TransferThreadAsync(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief to set the id + void setId(int id); + /// \brief get the reading letter + char readingLetter() const; + /// \brief get the writing letter + char writingLetter() const; + #endif + + //not copied size, ... + uint64_t realByteTransfered() const; + std::pair progression() const; + /** \brief to set the speed limitation + * -1 if not able, 0 if disabled */ + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + //set block size in Bytes for speed limitation + bool setBlockSize(const unsigned int blockSize); + void setMultiForBigSpeed(const int &multiForBigSpeed); + void timeOfTheBlockCopyFinished(); + void setOsSpecFlags(bool os_spec_flags); + void setNativeCopy(bool native_copy); + #endif + /// \brief pause the copy + void pause(); + /// \brief resume the copy + void resume(); + + bool haveStartTime; + ReadThread readThread; + WriteThread writeThread; + bool native_copy; + void setBuffer(const bool buffer); + + #ifdef Q_OS_WIN32 + static bool mkJunction(LPCWSTR szJunction, LPCWSTR szPath); + #endif +protected: + void run(); +private slots: + void preOperation(); + void postOperation(); + //force into the right thread + void internalStartTheTransfer(); + + //implemente to connect async + void read_error(); + void read_readIsStopped(); + void read_closed(); + void write_error(); + void write_closed(); + void read_opened(); + void write_opened(); +signals: + //internal signal + void internalStartResumeAfterErrorAndSeek() const; + void internalStartPostOperation() const; + //async due to tread conflict on from, if(from>=0) {do something, abort() -> on abort from =-1} + void openRead(const INTERNALTYPEPATH &file, const Ultracopier::CopyMode &mode); + //async due to tread conflict on to, if(to>=0) {do something, abort() -> on abort to =-1} + void openWrite(const INTERNALTYPEPATH &file,const uint64_t &startSize); +public slots: + /// \brief to start the transfer of data + void startTheTransfer(); + /// \brief stop the copy + void stop(); + /// \brief skip the copy + void skip(); + /// \brief retry after error + void retryAfterError(); + /// \brief return info about the copied size + int64_t copiedSize(); + /// \brief put the current file at bottom + void putAtBottom(); + /// \brief to set files to transfer + bool setFiles(const INTERNALTYPEPATH &source, const int64_t &size, const INTERNALTYPEPATH &destination, const Ultracopier::CopyMode &mode); + /// \brief to set file exists action to do + void setFileExistsAction(const FileExistsAction &action); + #ifdef Q_OS_WIN32 + void setProgression(const uint64_t &pos,const uint64_t &size); + #endif +private: + //ready = open + ready to operation (no error to resolv) + bool transferIsReadyVariable; + uint64_t transferProgression; + bool sended_state_readStopped; + bool readIsClosedVariable; + bool writeIsClosedVariable; + bool readIsOpenVariable; + bool writeIsOpenVariable; + bool realMove; + bool remainFileOpen() const; + bool remainSourceOpen() const; + bool remainDestinationOpen() const; + void resetExtraVariable(); + void ifCanStartTransfer(); + void checkIfAllIsClosedAndDoOperations(); +}; + +#endif // TransferThreadAsync_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.cpp b/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.cpp new file mode 100755 index 0000000..2d6748e --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.cpp @@ -0,0 +1,1164 @@ +#include "WriteThread.h" + +#ifdef Q_OS_LINUX +#include +#endif +#include "../TransferThread.h" + +#ifdef Q_OS_UNIX +#include +#include +#include +#include +#endif + +unsigned int WriteThread::numberOfBlock=ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; + +WriteThread::WriteThread() +{ + deletePartiallyTransferredFiles = true; + lastGoodPosition = 0; + stopIt = false; + isOpen.release(); + moveToThread(this); + setObjectName(QStringLiteral("write")); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status = Idle; + #endif + putInPause = false; + needRemoveTheFile = false; + start(); + + #ifdef Q_OS_UNIX + to=-1; + #else + to=nullptr; + #endif +} + +WriteThread::~WriteThread() +{ + stopIt=true; + needRemoveTheFile=true; + pauseMutex.release(); + writeFull.release(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + waitNewClockForSpeed2.release(); + #endif + writeFull.release(); + pauseMutex.release(); + // useless because stopIt will close all thread, but if thread not runing run it + //endIsDetected(); + emit internalStartClose(); + isOpen.acquire(); + if(!file.empty()) + resumeNotStarted(); + //disconnect(this);//-> do into ~TransferThread() + quit(); + wait(); +} + +void WriteThread::run() +{ + if(!connect(this,&WriteThread::internalStartOpen, this,&WriteThread::internalOpen, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartReopen, this,&WriteThread::internalReopen, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartWrite, this,&WriteThread::internalWrite, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartClose, this,&WriteThread::internalCloseSlot, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartEndOfFile, this,&WriteThread::internalEndOfFile, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartFlushAndSeekToZero, this,&WriteThread::internalFlushAndSeekToZero, Qt::QueuedConnection)) + abort(); + exec(); +} + +//internal function +bool WriteThread::seek(const int64_t &position)/// \todo search if is use full +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start with: "+std::to_string(position)); + if((int64_t)position>size()) + return false; + + #ifdef Q_OS_UNIX + if(to<0) + abort();//internal failure + return lseek(to,position,SEEK_SET)==position; + #else + if(to==NULL) + abort();//internal failure + LARGE_INTEGER liSize; + liSize.QuadPart=position; + return SetFilePointerEx(to,liSize,NULL,FILE_BEGIN); + #endif +} + +int64_t WriteThread::size() const +{ + #ifdef Q_OS_UNIX + struct stat st; + fstat(to, &st); + return st.st_size; + #else + LARGE_INTEGER lpFileSize; + if(!GetFileSizeEx(to,&lpFileSize)) + return -1; + else + return lpFileSize.QuadPart; + #endif +} + +bool WriteThread::internalOpen() +{ + //do a bug + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] internalOpen destination: "+TransferThread::internalStringTostring(file)); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + emit closed(); + return false; + } + #ifdef Q_OS_UNIX + if(to>=0) + #else + if(to!=NULL) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already open! destination: "+TransferThread::internalStringTostring(file)); + return false; + } + if(file.empty()) + { + errorString_internal=tr("Path resolution error (Empty path)").toStdString(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+"Unable to open: "+TransferThread::internalStringTostring(file)+", error: Empty path"); + emit error(); + return false; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before the mutex"); + //set to LISTBLOCKSIZE + while(writeFull.available()<(int)numberOfBlock) + writeFull.release(); + if(writeFull.available()>(int)numberOfBlock) + writeFull.acquire(writeFull.available()-numberOfBlock); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the mutex"); + stopIt=false; + endDetected=false; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=InodeOperation; + #endif + //mkpath check if exists and return true if already exists + { + INTERNALTYPEPATH destination=file; + #ifdef WIDESTRING + const size_t destinationIndex=destination.rfind(L'/'); + if(destinationIndex!=std::string::npos && destinationIndexcount(qtFile,this)==0) + { + writeFileList->insert(qtFile,this); + if(writeFileList->count(qtFile)>1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] in waiting because same file is found"); + return false; + } + } + } + bool fileWasExists=TransferThread::is_file(file); + #ifdef Q_OS_UNIX + // The last parameter (0755) does nothing. It is simply accepted for compatibility with the UNIX "open" function. + // Needed for major build compatibility + to = ::open(TransferThread::internalStringTostring(file).c_str(), O_WRONLY | O_CREAT, 0755); + #else + DWORD flags=FILE_ATTRIBUTE_NORMAL; + if(os_spec_flags) + flags|=FILE_FLAG_SEQUENTIAL_SCAN; + /*if(!buffer) + //FILE_FLAG_NO_BUFFERING Under Windows 10 do The parameter is incorrect. (87) + flags|=FILE_FLAG_NO_BUFFERING;//FILE_FLAG_WRITE_THROUGH |*/ + to=CreateFileW(file.c_str(),GENERIC_WRITE,0,NULL,CREATE_ALWAYS, + flags,NULL); + #endif + #ifdef Q_OS_UNIX + if(to>=0) + #else + if(to!=INVALID_HANDLE_VALUE) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the open"); + { + QMutexLocker lock_mutex(&accessList); + if(!theBlockList.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] General file corruption detected"); + stopIt=true; + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + return false; + } + } + pauseMutex.tryAcquire(pauseMutex.available()); + #ifdef Q_OS_LINUX + if(os_spec_flags) + { + posix_fadvise(to, 0, 0, POSIX_FADV_NOREUSE); + posix_fadvise(to, 0, 0, POSIX_FADV_SEQUENTIAL); + } + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the pause mutex"); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + emit closed(); + return false; + } + if(destTruncate(startSize)!=0) + { + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after resize: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after resize: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + emit closed(); + return false; + } + if(!seek(0)) + { + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + emit closed(); + return false; + } + isOpen.acquire(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit opened()"); + emit opened(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + needRemoveTheFile=false; + postOperationRequested=false; + return true; + } + else + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + #else + int t=errno; + #endif + if(!fileWasExists && TransferThread::is_file(file)) + if(unlink(TransferThread::internalStringTostring(file).c_str())!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file created but can't be removed"); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + resumeNotStarted(); + this->file.clear(); + emit closed(); + return false; + } + #ifdef Q_OS_WIN32 + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } +} + +void WriteThread::openWrite(const INTERNALTYPEPATH &file, const uint64_t &startSize) +{ + if(!isRunning()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] the thread not running to open destination: "+TransferThread::internalStringTostring(file)+", numberOfBlock: "+std::to_string(numberOfBlock)); + errorString_internal=tr("Internal error, please report it!").toStdString(); + emit error(); + return; + } + #ifdef Q_OS_WIN32 + if(to!=NULL) + #else + if(to>=0) + #endif + { + if(file==this->file) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Try reopen already opened same file: "+TransferThread::internalStringTostring(file)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already open: "+TransferThread::internalStringTostring(file)); + //emit internalStartClose(); + internalCloseSlot(); + isOpen.acquire(); + isOpen.release(); + } + if(numberOfBlock<1 || (numberOfBlock>ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK && numberOfBlock>ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] numberOfBlock wrong, set to default"); + this->numberOfBlock=ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; + } + /*else + this->numberOfBlock=numberOfBlock;*/ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+"open destination: "+TransferThread::internalStringTostring(file)); + stopIt=false; + fakeMode=false; + lastGoodPosition=0; + this->file=file; + this->startSize=startSize; + endDetected=false; + writeFullBlocked=false; + emit internalStartOpen(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + numberOfBlockCopied=0; + #endif +} + +void WriteThread::endIsDetected() +{ + if(endDetected) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); + return; + } + endDetected=true; + pauseMutex.release(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + emit internalStartEndOfFile(); +} + +std::string WriteThread::errorString() const +{ + return errorString_internal; +} + +void WriteThread::stop() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop()"); + needRemoveTheFile=true; + stopIt=true; + if(isOpen.available()>0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] isOpen.available()>0"); + + #ifdef Q_OS_WIN32 + if(to!=NULL) + #else + if(to>=0) + #endif + { + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + } + + return; + } + writeFull.release(); + pauseMutex.release(); + pauseMutex.release(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + waitNewClockForSpeed2.release(); + #endif + // useless because stopIt will close all thread, but if thread not runing run it + endIsDetected(); + //for the stop for skip: void TransferThread::skip() + emit internalStartClose(); +} + +void WriteThread::flushBuffer() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + writeFull.release(); + writeFull.acquire(); + pauseMutex.release(); + { + QMutexLocker lock_mutex(&accessList); + while(!theBlockList.empty()) + { + free(theBlockList.front().data); + theBlockList.pop(); + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop"); +} + +/// \brief buffer is empty +bool WriteThread::bufferIsEmpty() +{ + bool returnVal; + { + QMutexLocker lock_mutex(&accessList); + returnVal=theBlockList.empty(); + } + return returnVal; +} + +void WriteThread::internalEndOfFile() +{ + if(!bufferIsEmpty()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] buffer is not empty!"); + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] writeIsStopped"); + postOperation(); + emit writeIsStopped(); + } +} + +#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT +/*! \brief Set the max speed +\param tempMaxSpeed Set the max speed in KB/s, 0 for no limit */ +void WriteThread::setMultiForBigSpeed(const int &multiForBigSpeed) +{ + this->multiForBigSpeed=multiForBigSpeed; + waitNewClockForSpeed.release(); + waitNewClockForSpeed2.release(); +} + +/// \brief For give timer every X ms +void WriteThread::timeOfTheBlockCopyFinished() +{ + /* this is the old way to limit the speed, it product blocking + *if(waitNewClockForSpeed.available()maxSpeed>0)*/ + if(waitNewClockForSpeed.available()<=1) + waitNewClockForSpeed.release(); + if(waitNewClockForSpeed2.available()<=1) + waitNewClockForSpeed2.release(); +} +#endif + +void WriteThread::resumeNotStarted() +{ + QMutexLocker lock_mutex(writeFileListMutex); + #ifdef WIDESTRING + QString qtFile=QString::fromStdWString(file); + #else + QString qtFile=QString::fromStdString(file); + #endif + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!writeFileList->contains(qtFile)) + { + /*ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] file: \""+ + TransferThread::internalStringTostring(file)+ + "\" for similar inode is not located into the list of "+ + std::to_string(writeFileList.size())+" items!");*/ + return; + } + #endif + writeFileList->remove(qtFile,this); + if(writeFileList->contains(qtFile)) + { + QList writeList=writeFileList->values(qtFile); + if(!writeList.isEmpty()) + writeList.first()->reemitStartOpen(); + return; + } +} + +void WriteThread::pause() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] try put read thread in pause"); + pauseMutex.tryAcquire(pauseMutex.available()); + putInPause=true; + return; +} + +void WriteThread::resume() +{ + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + putInPause=false; + stopIt=false; + } + else + return; + #ifdef Q_OS_WIN32 + if(to==NULL) + #else + if(to<0) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file is not open"); + return; + } + pauseMutex.release(); +} + +void WriteThread::reemitStartOpen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] start"); + emit internalStartOpen(); +} + +void WriteThread::postOperation() +{ + if(postOperationRequested) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] double event dropped"); + return; + } + postOperationRequested=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + emit internalStartClose(); +} + +void WriteThread::internalCloseSlot() +{ + internalClose(); +} + +void WriteThread::internalClose(bool emitSignal) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close for file: "+TransferThread::internalStringTostring(file)); + /// \note never send signal here, because it's called by the destructor + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Close; + #endif + bool emit_closed=false; + if(!fakeMode) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] !fakeMode: "+TransferThread::internalStringTostring(file)); + #ifdef Q_OS_WIN32 + if(to!=NULL) + #else + if(to>=0) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] to>=0: "+TransferThread::internalStringTostring(file)); + if(!needRemoveTheFile) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] !needRemoveTheFile: "+TransferThread::internalStringTostring(file)); + if(startSize!=lastGoodPosition) + if(destTruncate(lastGoodPosition)!=0) + { + if(emitSignal) + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to resize: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to resize: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + } + else + needRemoveTheFile=true; + } + } + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + this->file.clear(); + if(needRemoveTheFile || stopIt) + { + if(deletePartiallyTransferredFiles) + { + if(unlink(TransferThread::internalStringTostring(file).c_str())!=0) + if(emitSignal) + { + #ifdef Q_OS_UNIX + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unable to remove the destination file: "+std::to_string(errno)); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unable to remove the destination file: "+TransferThread::GetLastErrorStdStr()); + #endif + } + } + } + //here and not after, because the transferThread don't need try close if not open + if(emitSignal) + emit_closed=true; + } + } + else + { + //here and not after, because the transferThread don't need try close if not open + + if(emitSignal) + emit_closed=true; + } + needRemoveTheFile=false; + resumeNotStarted(); + this->file.clear(); + if(emit_closed) + emit closed(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + + /// \note always the last of this function + if(!fakeMode) + isOpen.release(); +} + +void WriteThread::internalReopen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + INTERNALTYPEPATH tempFile=file; + internalClose(false); + flushBuffer(); + stopIt=false; + lastGoodPosition=0; + file=tempFile; + if(internalOpen()) + emit reopened(); +} + +void WriteThread::reopen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + stopIt=true; + endDetected=false; + emit internalStartReopen(); +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//to set the id +void WriteThread::setId(int id) +{ + this->id=id; +} +#endif + +/// \brief do the fake open +void WriteThread::fakeOpen() +{ + fakeMode=true; + postOperationRequested=false; + emit opened(); +} + +/// \brief do the fake writeIsStarted +void WriteThread::fakeWriteIsStarted() +{ + emit writeIsStarted(); +} + +/// \brief do the fake writeIsStopped +void WriteThread::fakeWriteIsStopped() +{ + postOperation(); + emit writeIsStopped(); +} + +/** \brief set block size +\param block the new block size in B +\return Return true if succes */ +bool WriteThread::setBlockSize(const int blockSize) +{ + //can be smaller than min block size to do correct speed limitation + if(blockSize>1 && blockSizeblockSize=blockSize; + return true; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"block size out of range: "+std::to_string(blockSize)); + return false; + } +} + +/// \brief get the last good position +int64_t WriteThread::getLastGoodPosition() const +{ + return lastGoodPosition; +} + +void WriteThread::flushAndSeekToZero() +{ + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"flushAndSeekToZero: "+std::to_string(blockSize)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"flushAndSeekToZero"); + stopIt=true; + emit internalStartFlushAndSeekToZero(); +} + +void WriteThread::internalFlushAndSeekToZero() +{ + flushBuffer(); + if(!seek(0)) + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + return; + } + stopIt=false; + emit flushedAndSeekedToZero(); +} + +void WriteThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) +{ + this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; +} + +bool WriteThread::write(char * data, const unsigned int size) +{ + if(stopIt) + return false; + bool atMax; + if(stopIt) + return false; + { + QMutexLocker lock_mutex(&accessList); + DataBlock d; + d.data=data; + d.size=size; + theBlockList.push(d); + atMax=(theBlockList.size()>=numberOfBlock); + } + emit internalStartWrite(); + if(atMax) + { + writeFullBlocked=true; + writeFull.acquire(); + writeFullBlocked=false; + } + if(stopIt) + return false; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + //wait for limitation speed if stop not query + if(multiForBigSpeed>0) + { + numberOfBlockCopied2++; + if(numberOfBlockCopied2>=multiForBigSpeed) + { + numberOfBlockCopied2=0; + waitNewClockForSpeed2.acquire(); + } + } + #endif + if(stopIt) + return false; + return true; +} + +void WriteThread::internalWrite() +{ + bool haveBlock; + do + { + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] write put in pause"); + if(stopIt) + return; + pauseMutex.acquire(); + if(stopIt) + return; + } + if(stopIt) + { +// ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt"); + return; + } + if(stopIt) + return; + //read one block + { + QMutexLocker lock_mutex(&accessList); + if(theBlockList.empty()) + haveBlock=false; + else + { + blockArray=theBlockList.front(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + if(multiForBigSpeed>0) + { + theBlockList.pop(); + //if remove one block + writeFull.release(); + } + else + #endif + { + theBlockList.pop(); + //if remove one block + writeFull.release(); + } + haveBlock=true; + } + } + if(stopIt) + { + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + return; + } + if(!haveBlock) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] End detected of the file"); + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + return; + } + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + //wait for limitation speed if stop not query + if(multiForBigSpeed>0) + { + numberOfBlockCopied++; + if(writeFullBlocked) + { + if(numberOfBlockCopied>=(multiForBigSpeed*2)) + { + numberOfBlockCopied=0; + waitNewClockForSpeed.acquire(); + if(stopIt) + { + free(blockArray.data); + break; + } + } + } + else + { + if(numberOfBlockCopied>=multiForBigSpeed) + { + numberOfBlockCopied=0; + waitNewClockForSpeed.acquire(); + if(stopIt) + { + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + break; + } + } + } + } + #endif + if(stopIt) + { + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + return; + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Write; + #endif + + #ifdef Q_OS_WIN32 + BOOL retRead=TRUE; + #endif + if(blockArray.size<=0) + bytesWriten=0; + else + { + #ifdef Q_OS_WIN32 + DWORD lpNumberOfBytesWrite=0; + retRead=WriteFile(to,blockArray.data,blockArray.size, + &lpNumberOfBytesWrite,NULL); + bytesWriten=lpNumberOfBytesWrite; + #else + bytesWriten=::write(to,blockArray.data,blockArray.size); + #endif + } + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + //mutex for stream this data + if(lastGoodPosition==0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit writeIsStarted()"); + emit writeIsStarted(); + } + if(stopIt) + return; + #ifdef Q_OS_WIN32 + if(retRead==FALSE) + #else + if(bytesWriten<0) + #endif + { + #ifdef Q_OS_WIN32 + #ifdef ULTRACOPIER_PLUGIN_DEBUG + DWORD e = GetLastError(); + #endif + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to write: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(e)+") to write "+std::to_string(blockArray.size)+"B at "+std::to_string(lastGoodPosition)+"B" + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to write: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+") to write "+std::to_string(blockArray.size)+"B at "+std::to_string(lastGoodPosition)+"B" + ); + #endif + stopIt=true; + emit error(); + return; + } + if(bytesWriten!=blockArray.size) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Error in writing, bytesWriten: %1, blockArray.size(): %2").arg(bytesWriten).arg(blockArray.size).toStdString()); + errorString_internal=QStringLiteral("Error in writing, bytesWriten: %1, blockArray.size(): %2").arg(bytesWriten).arg(blockArray.size).toStdString(); + stopIt=true; + emit error(); + return; + } + lastGoodPosition+=bytesWriten; + } while(true); +} + +//return 0 if sucess +int WriteThread::destTruncate(const uint64_t &startSize) +{ + #ifdef Q_OS_WIN32 + if(to==NULL) + abort(); + seek(startSize); + if(SetEndOfFile(to)!=0) + return 0; + else + return 1; + #else + if(to<0) + abort(); + return ::ftruncate(to,startSize); + #endif +} + +void WriteThread::setOsSpecFlags(bool os_spec_flags) +{ + this->os_spec_flags=os_spec_flags; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.h b/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.h new file mode 100755 index 0000000..5e0b265 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.h @@ -0,0 +1,181 @@ +/** \file WriteThread.h +\brief Thread changed to open/close and write the destination file +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef WRITETHREAD_H +#define WRITETHREAD_H + +#include +#include +#include +#include +#include +#include + +#ifdef Q_OS_WIN32 +#include +#endif + +#include "../Environment.h" +#include "../StructEnumDefinition_CopyEngine.h" +#include "../CopyEngineUltracopier-SpecVariable.h" + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#define INTERNALTYPECHAR wchar_t +#else +#define INTERNALTYPEPATH std::string +#define INTERNALTYPECHAR char +#endif + +/// \brief Thread changed to open/close and write the destination file +class WriteThread : public QThread +{ + Q_OBJECT +public: + explicit WriteThread(); + ~WriteThread(); + //internal function + bool seek(const int64_t &position);/// \todo search if is use full + /// \brief get the size of the destination file + int64_t size() const; + + //can't be static into WriteThread, linked by instance then by ListThread + QMultiHash *writeFileList; + QMutex *writeFileListMutex; + bool buffer; + static unsigned int numberOfBlock; +protected: + void run(); +public: + /// \brief open the destination to open it + void openWrite(const INTERNALTYPEPATH &file,const uint64_t &startSize); + /// \brief to return the error string + std::string errorString() const; + /// \brief to stop all + void stop(); + /// \brief to write data + bool write(char *data, const unsigned int size); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief to set the id + void setId(int id); + /// \brief get the write stat + enum WriteStat + { + Idle=0, + InodeOperation=1, + Write=2, + Close=3, + Read=5 + }; + WriteStat status; + #endif + /// \brief do the fake open + void fakeOpen(); + /// \brief do the fake writeIsStarted + void fakeWriteIsStarted(); + /// \brief do the fake writeIsStopped + void fakeWriteIsStopped(); + /// \brief set block size in KB mostly for speed + bool setBlockSize(const int blockSize); + /// \brief get the last good position + int64_t getLastGoodPosition() const; + /// \brief buffer is empty + bool bufferIsEmpty(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + /// \brief set the current max speed in KB/s + void setMultiForBigSpeed(const int &multiForBigSpeed); + #endif + void pause(); + void resume(); + void reemitStartOpen(); + //return 0 if sucess + int destTruncate(const uint64_t &startSize); + void setOsSpecFlags(bool os_spec_flags); +public slots: + /// \brief start the operation + void postOperation(); + /// \brief flush buffer + void flushBuffer(); + /// \brief set the end is detected + void endIsDetected(); + /// \brief reopen the file + void reopen(); + /// \brief flush and seek to zero + void flushAndSeekToZero(); + void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); + /// \brief executed at regular interval to do a speed throling + void timeOfTheBlockCopyFinished(); + + void resumeNotStarted(); +signals: + void error() const; + void opened() const; + void reopened() const; + void writeIsStarted() const; + void writeIsStopped() const; + void flushedAndSeekedToZero() const; + void closed() const; + //internal signals + void internalStartOpen() const; + void internalStartReopen() const; + void internalStartWrite() const; + void internalStartClose() const; + void internalStartEndOfFile() const; + void internalStartFlushAndSeekToZero() const; + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; +private: + struct DataBlock + { + char * data; + unsigned int size; + }; + std::string errorString_internal; + volatile bool stopIt; + volatile bool postOperationRequested; + bool os_spec_flags; + QMutex accessList; ///< For use the list + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + QSemaphore waitNewClockForSpeed,waitNewClockForSpeed2; + volatile int numberOfBlockCopied,numberOfBlockCopied2; ///< Multiple for count the number of block copied + volatile int multiplicatorForBigSpeed; ///< Multiple for count the number of block needed + volatile int MultiForBigSpeed; + #endif + QSemaphore writeFull; + volatile bool writeFullBlocked; + QSemaphore isOpen; + QSemaphore pauseMutex; + volatile bool putInPause; + std::queue theBlockList; ///< Store the block list + uint64_t lastGoodPosition; + DataBlock blockArray; ///< temp data for block writing, the data + int64_t bytesWriten; ///< temp data for block writing, the bytes writen + int id; + volatile bool endDetected; + uint64_t startSize; + bool fakeMode; + bool needRemoveTheFile; + bool deletePartiallyTransferredFiles; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + volatile int multiForBigSpeed; ///< Multiple for count the number of block needed + #endif + + #ifdef Q_OS_UNIX + int to; + #else + HANDLE to; + #endif + INTERNALTYPEPATH file; +private slots: + bool internalOpen(); + void internalWrite(); + void internalCloseSlot(); + void internalClose(bool emitSignal=true); + void internalReopen(); + void internalEndOfFile(); + void internalFlushAndSeekToZero(); +}; + +#endif // WRITETHREAD_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/copyEngineOptions.ui b/plugins/CopyEngine/Ultracopier-Spec/copyEngineOptions.ui new file mode 100755 index 0000000..e646a2d --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/copyEngineOptions.ui @@ -0,0 +1,602 @@ + + + copyEngineOptions + + + + 0 + 0 + 801 + 504 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 2 + + + + + 0 + 0 + 801 + 376 + + + + Transfer + + + + + + Qt::Vertical + + + + 20 + 278 + + + + + + + + Move the whole folder + + + + + + + + + + + + + Keep the file date + + + + + + + Auto start + + + + + + + + + + + + + + Transfer the file rights + + + + + + + + + + + + + + + + + Create full path if not exists + + + + + + + Rsync + + + + + + + + + + + + + + + + + Checksum + + + + + + + + + 0 + 0 + 801 + 376 + + + + Error and collision + + + + + + When folder error + + + + + + + + + + When file error + + + + + + + + Ask + + + + + Skip + + + + + Put at the end + + + + + + + + When file collision + + + + + + + + Ask + + + + + Skip + + + + + Overwrite + + + + + Overwrite if not same size and date + + + + + Overwrite if newer + + + + + Overwrite if older + + + + + Rename + + + + + Overwrite if not same size + + + + + Overwrite if modification date differs + + + + + + + + + Ask + + + + + Skip + + + + + + + + When folder collision + + + + + + + + Ask + + + + + Merge + + + + + Skip + + + + + Rename + + + + + + + + Check if destination folder exists + + + + + + + Renaming rules + + + + + + + Qt::Vertical + + + + 20 + 193 + + + + + + + + Delete partially transferred files + + + + + + + + + + + + + Rename the original destination + + + + + label_12 + label_13 + label_6 + label_7 + label_8 + comboBoxFileError + comboBoxFileCollision + comboBoxFolderError + comboBoxFolderCollision + checkBoxDestinationFolderExists + renamingRules + label_20 + deletePartiallyTransferredFiles + renameTheOriginalDestination + label_22 + + + + + 0 + 0 + 801 + 376 + + + + Performance + + + + + + 1 + + + 32 + + + 16 + + + + + + + Inode threads + + + + + + + + + + MB + + + 1 + + + 1024 + + + 300 + + + + + + + MB + + + 1 + + + 1024 + + + 100 + + + + + + + Uncheck this under Windows create problem + + + + + + + OS Buffer + + + + + + + Qt::Vertical + + + + 20 + 197 + + + + + + + + Disable parallel transfer when are different devices + + + + + + + Buffer for different device + + + + + + + OS FLags + + + + + + + Buffer for same device + + + + + + + OS native copy (disable speed limitation) + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 801 + 376 + + + + Misc + + + + + + Check the disk space + + + + + + + + + + Use this folder when destination is not set + + + + + + + + + + + + Browse + + + + + + + + + Qt::Horizontal + + + + 353 + 20 + + + + + + + + Filters + + + + + + + Qt::Horizontal + + + + 352 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 159 + + + + + + + + + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/copyEngineResources.qrc b/plugins/CopyEngine/Ultracopier-Spec/copyEngineResources.qrc new file mode 100755 index 0000000..7ae0fdc --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/copyEngineResources.qrc @@ -0,0 +1,8 @@ + + + resources/add.png + resources/edit.png + resources/remove.png + resources/filter.png + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/debugDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/debugDialog.ui new file mode 100755 index 0000000..5803f99 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/debugDialog.ui @@ -0,0 +1,120 @@ + + + debugDialog + + + + 0 + 0 + 665 + 392 + + + + Monitor + + + + + + + + Transfer thread + + + + + + true + + + + + + + + + + Transfer list + + + + + + true + + + + + + + + + + + + Variables + + + + + + Active transfer: + + + + + + + + + + true + + + 9999 + + + + + + + true + + + 9999 + + + + + + + Number of inode manipuled: + + + + + + + + + + alreadyExistsQueueItem: + + + + + + + errorQueueItem: + + + + + + + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/documentation.dox b/plugins/CopyEngine/Ultracopier-Spec/documentation.dox new file mode 100755 index 0000000..5a0fbf6 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/documentation.dox @@ -0,0 +1,39 @@ +/* -*- mode: C++ ; c-file-style: "stroustrup" -*- **/ + +/* + This file contains NO source code, just some documentation for doxygen to + parse. +*/ + +/*! + \mainpage Copy engine + + \section mainpage_overview Overview + + The default copy engine for Ultracopier. Support file/folder, copy/move, ...\n + More informations on the wiki of ultracopier. + + \section mainpage_platforms Platforms + + This plugin might be usable in all environments where you find Qt 5, but Gcc is requiered for some part. You need qtsystem modules for QtSystemInfo\n + This plugin requires Qt 5.0 or newer. Tested on Qt 5.0.\n + + \section mainpage_downloads Downloads + + You can find the link on Ultracopier project page, via git, snapshot sources, ... + + \section mainpage_algorithm Algorithm + + Like say previously you will have more informations on the wiki.\n + Then file transfer is done via pipe mecamism system:\n +
    +
  • push at no blocking into table up to the table is full, after is blocked up to one entry is free
  • +
  • Other thread read the table up to have no more data, then is blocked
  • +
+ The transfer thread do listing of the folder, removing folder, make folder is one thread for each.\n + The transfer list, have thread pool to do the inode operation (open, close, set date, ...). Do all inode operation in parallele, but transfer the data as sequential. + + \section license GPL Version 3 + The code source is under GPL3. The image is extacted from Oxygen icon pack of KDE4. + +*/ diff --git a/plugins/CopyEngine/Ultracopier-Spec/fileErrorDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/fileErrorDialog.ui new file mode 100755 index 0000000..b603924 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/fileErrorDialog.ui @@ -0,0 +1,264 @@ + + + fileErrorDialog + + + + 0 + 0 + 723 + 185 + + + + Error with file + + + + + + Error + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QFormLayout::ExpandingFieldsGrow + + + + + false + + + Size + + + + + + + 0 KiB + + + + + + + false + + + Modified + + + + + + + Today + + + + + + + false + + + File name + + + + + + + source.txt + + + + + + + false + + + Destination + + + + + + + ../toto.txt + + + + + + + false + + + Folder + + + + + + + /folder/ + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + &Always perform this action + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Try in with elevated privileges + + + + + + + Put to bottom + + + + + + + Retry + + + + + + + &Skip + + + + + + + &Cancel + + + + + + + + + + + checkBoxAlways + toggled(bool) + Cancel + setDisabled(bool) + + + 112 + 131 + + + 438 + 142 + + + + + checkBoxAlways + toggled(bool) + Retry + setDisabled(bool) + + + 155 + 131 + + + 309 + 134 + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/fileExistsDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/fileExistsDialog.ui new file mode 100755 index 0000000..2ca480b --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/fileExistsDialog.ui @@ -0,0 +1,428 @@ + + + fileExistsDialog + + + + 0 + 0 + 615 + 222 + + + + The file exists + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Source + + + Qt::AlignCenter + + + + + + + + 75 + true + + + + Destination + + + Qt::AlignCenter + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + false + + + Size + + + + + + + 0 KiB + + + + + + + false + + + Modified + + + + + + + Today + + + + + + + false + + + File name + + + + + + + source.txt + + + + + + + false + + + Folder + + + + + + + /source/ + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QFormLayout::ExpandingFieldsGrow + + + + + false + + + Size + + + + + + + 0 KiB + + + + + + + false + + + Modified + + + + + + + Today + + + + + + + false + + + File name + + + + + + + destination.txt + + + + + + + false + + + Folder + + + + + + + /destination/ + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + + + + Suggest new &name + + + + + + + + + + + &Always perform this action + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + &Rename + + + + + + + &Overwrite + + + QToolButton::MenuButtonPopup + + + + + + + &Skip + + + + + + + &Cancel + + + + + + + + + Overwrite if newer + + + + + Overwrite if modification date differs + + + Overwrite if modification date differs + + + + + Overwrite if older + + + Overwrite if older + + + + + Overwrite if not same size + + + Overwrite if not same size + + + + + Overwrite if not same size and date + + + Overwrite if not same size and date + + + + + + + checkBoxAlways + toggled(bool) + Cancel + setDisabled(bool) + + + 115 + 130 + + + 440 + 129 + + + + + checkBoxAlways + toggled(bool) + lineEditNewName + setDisabled(bool) + + + 62 + 129 + + + 108 + 93 + + + + + checkBoxAlways + toggled(bool) + SuggestNewName + setDisabled(bool) + + + 144 + 138 + + + 326 + 98 + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/fileIsSameDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/fileIsSameDialog.ui new file mode 100755 index 0000000..c019a63 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/fileIsSameDialog.ui @@ -0,0 +1,214 @@ + + + fileIsSameDialog + + + + 0 + 0 + 411 + 142 + + + + The source and destination are same + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + false + + + Size + + + + + + + 0 KiB + + + Qt::PlainText + + + + + + + Today + + + Qt::PlainText + + + + + + + false + + + File name + + + + + + + source.txt + + + Qt::PlainText + + + + + + + false + + + Folder + + + + + + + /toto/ + + + Qt::PlainText + + + + + + + false + + + Modified + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + + + + Suggest new &name + + + + + + + + + + + &Always perform this action + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + &Rename + + + + + + + &Skip + + + + + + + &Cancel + + + + + + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/folderExistsDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/folderExistsDialog.ui new file mode 100755 index 0000000..440b5ca --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/folderExistsDialog.ui @@ -0,0 +1,309 @@ + + + folderExistsDialog + + + + 0 + 0 + 476 + 140 + + + + The source and destination is identical + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Source + + + Qt::AlignCenter + + + + + + + + 75 + true + + + + Destination + + + Qt::AlignCenter + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + false + + + Modified + + + + + + + Today + + + + + + + false + + + Folder name + + + + + + + folder + + + + + + + false + + + Folder + + + + + + + /source/ + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + false + + + Modified + + + + + + + false + + + Folder name + + + + + + + Today + + + + + + + folder + + + + + + + false + + + Folder + + + + + + + /destination/ + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + + + Suggest new &name + + + + + + + + + + + &Always perform this action + + + + + + + &Rename + + + + + + + Merge + + + + + + + Skip + + + + + + + &Cancel + + + + + + + + + + + checkBoxAlways + clicked(bool) + lineEditNewName + setDisabled(bool) + + + 132 + 126 + + + 135 + 101 + + + + + checkBoxAlways + clicked(bool) + SuggestNewName + setDisabled(bool) + + + 113 + 129 + + + 304 + 100 + + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/informations.xml b/plugins/CopyEngine/Ultracopier-Spec/informations.xml new file mode 100755 index 0000000..7281da3 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/informations.xml @@ -0,0 +1,26 @@ + + + <![CDATA[Copy engine OS Specific of Ultracopier]]> + <![CDATA[Moteur de copie spécifique à l'OS d'ultracopier]]> + + CopyEngine + + + + + + + 1287496800 + + windows-x86 + + + + + 2.2.4.4 + + Ultracopier Spec + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/plugin.json b/plugins/CopyEngine/Ultracopier-Spec/plugin.json new file mode 100755 index 0000000..9e26dfe --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/plugin.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins/CopyEngine/Ultracopier-Spec/ports.h b/plugins/CopyEngine/Ultracopier-Spec/ports.h new file mode 100755 index 0000000..f888794 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ports.h @@ -0,0 +1,6 @@ +#if defined(PLATFORM_MAC) || defined(PLATFORM_HAIKU) + #define fseeko64 stat + #define ftruncate64 ftruncate + #define off64_t off_t + #define O_LARGEFILE 0 +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/resources/add.png b/plugins/CopyEngine/Ultracopier-Spec/resources/add.png new file mode 100755 index 0000000..7932127 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/resources/add.png differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/resources/edit.png b/plugins/CopyEngine/Ultracopier-Spec/resources/edit.png new file mode 100755 index 0000000..5464856 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/resources/edit.png differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/resources/filter.png b/plugins/CopyEngine/Ultracopier-Spec/resources/filter.png new file mode 100755 index 0000000..9bb3164 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/resources/filter.png differ diff --git a/plugins/CopyEngine/Ultracopier-Spec/resources/remove.png b/plugins/CopyEngine/Ultracopier-Spec/resources/remove.png new file mode 100755 index 0000000..b711740 Binary files /dev/null and b/plugins/CopyEngine/Ultracopier-Spec/resources/remove.png differ diff --git a/plugins/CopyEngine/Ultracopier/AvancedQFile.cpp b/plugins/CopyEngine/Ultracopier/AvancedQFile.cpp deleted file mode 100644 index 3d867fb..0000000 --- a/plugins/CopyEngine/Ultracopier/AvancedQFile.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/** \file AvancedQFile.cpp -\brief Define the QFile herited class to set file date/time -\author alpha_one_x86 */ - -#include "AvancedQFile.h" - -#ifdef Q_CC_GNU -//this next header is needed to change file time/date under gcc -#include -#include -#endif - -//source -//hSrc=CreateFile(pData->pfiSrcFile->GetFullFilePath(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | (bNoBuffer ? FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH : 0), NULL); -//destination -//hDst=CreateFile(pData->strDstFile, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | (bNoBuffer ? FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH : 0), NULL); - -bool AvancedQFile::setCreated(const QDateTime &time) -{ - time_t ctime=time.toTime_t(); - #ifdef Q_CC_GNU - //creation time not exists into unix world - Q_UNUSED(ctime) - return true; - #else - setErrorString(tr("Not supported on this platform")); - return false; - #endif -} - -bool AvancedQFile::setLastModified(const QDateTime &time) -{ - time_t actime=QFileInfo(*this).lastRead().toTime_t(); - //protect to wrong actime - if(actime<0) - actime=0; - time_t modtime=time.toTime_t(); - if(modtime<0) - { - setErrorString(tr("Last modified date is wrong")); - return false; - } - #ifdef Q_CC_GNU - //this function avalaible on unix and mingw - utimbuf butime; - butime.actime=actime; - butime.modtime=modtime; - int returnVal=utime(this->fileName().toLocal8Bit().data(),&butime); - if(returnVal==0) - return true; - else - { - setErrorString(strerror(errno)); - return false; - } - #else - setErrorString(tr("Not supported on this platform")); - return false; - #endif -} - -bool AvancedQFile::setLastRead(const QDateTime &time) -{ - time_t modtime=QFileInfo(*this).lastModified().toTime_t(); - //protect to wrong actime - if(modtime<0) - modtime=0; - time_t actime=time.toTime_t(); - if(actime<0) - { - setErrorString(tr("Last access date is wrong")); - return false; - } - #ifdef Q_CC_GNU - //this function avalaible on unix and mingw - utimbuf butime; - butime.actime=actime; - butime.modtime=modtime; - int returnVal=utime(this->fileName().toLocal8Bit().data(),&butime); - if(returnVal==0) - return true; - else - { - setErrorString(strerror(errno)); - return false; - } - #else - setErrorString(tr("Not supported on this platform")); - return false; - #endif -} - -#ifdef ULTRACOPIER_OVERLAPPED_FILE -AvancedQFile::avancedQFile() -{ - handle=INVALID_HANDLE_VALUE; - fileError=QFileDevice::NoError; - fileErrorString.clear(); -} - -AvancedQFile::~avancedQFile() -{ - close(); -} - -QString AvancedQFile::getLastWindowsError() -{ - WCHAR ErrorStringW[65535]; - DWORD dw = GetLastError(); - - int size=FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - dw, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - ErrorStringW, - 0, NULL ); - if(size<0) - tr("Unknown error: %1").arg(dw); - return QString::fromWCharArray(ErrorStringW,size); -} - -bool AvancedQFile::open(OpenMode mode) -{ - fileError=QFileDevice::NoError; - fileErrorString.clear(); - WCHAR fileNameW[fileName().size()+1]; - if(QDir::toNativeSeparators("\\\\?\\"+fileName()).toWCharArray(fileNameW)!=fileName().size()) - { - fileError=QFileDevice::OpenError; - fileErrorString=tr("Path conversion error"); - return false; - } - fileNameW[fileName().size()]='\0'; - - DWORD dwDesiredAccess=0; - if(mode & QIODevice::ReadOnly) - dwDesiredAccess|=GENERIC_READ; - if(mode & QIODevice::WriteOnly) - dwDesiredAccess|=GENERIC_Write; - - DWORD dwCreationDisposition; - if(mode & QIODevice::WriteOnly) - dwCreationDisposition=CREATE_ALWAYS; - else - dwCreationDisposition=OPEN_EXISTING; - - handle=CreateFile( - fileNameW, - dwDesiredAccess, - 0, - 0, - dwCreationDisposition, - FILE_FLAG_WRITE_THROUGH | FILE_FLAG_SEQUENTIAL_SCAN, - 0 - ); - if(handle==INVALID_HANDLE_VALUE) - { - fileError=QFileDevice::OpenError; - fileErrorString=getLastWindowsError(); - } - return (handle!=INVALID_HANDLE_VALUE); -} - -void AvancedQFile::close() -{ - if(handle==INVALID_HANDLE_VALUE) - return; - CloseHandle(handle); -} - -bool AvancedQFile::seek(qint64 pos) -{ - toto -} - -bool AvancedQFile::resize(qint64 size) -{ - toto -} - -QString AvancedQFile::errorString() const -{ - if(fileErrorString.isEmpty()) - return tr("Unknown error"); - return fileErrorString; -} - -bool AvancedQFile::isOpen() const -{ - return (handle!=INVALID_HANDLE_VALUE); -} - -qint64 AvancedQFile::write(const QByteArray &data) -{ -} - -QByteArray AvancedQFile::read(qint64 maxlen) -{ -} - -QFileDevice::FileError AvancedQFile::error() const -{ - return fileError; -} -#endif diff --git a/plugins/CopyEngine/Ultracopier/AvancedQFile.h b/plugins/CopyEngine/Ultracopier/AvancedQFile.h deleted file mode 100644 index 8c3dc4a..0000000 --- a/plugins/CopyEngine/Ultracopier/AvancedQFile.h +++ /dev/null @@ -1,45 +0,0 @@ -/** \file AvancedQFile.h -\brief Define the QFile herited class to set file date/time -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef AVANCEDQFILE_H -#define AVANCEDQFILE_H - -#include -#include -#include - -/// \brief devired class from QFile to set time/date on file -class AvancedQFile : public QFile -{ - Q_OBJECT -public: - /// \brief set created date, not exists in unix world - bool setCreated(const QDateTime &time); - /// \brief set last modification date - bool setLastModified(const QDateTime &time); - /// \brief set last read date - bool setLastRead(const QDateTime &time); - - #ifdef ULTRACOPIER_OVERLAPPED_FILE - explicit AvancedQFile(); - ~AvancedQFile(); - bool open(OpenMode mode); - void close(); - bool seek(qint64 pos); - bool resize(qint64 size); - QString errorString() const; - bool isOpen() const; - qint64 write(const QByteArray &data); - QByteArray read(qint64 maxlen); - FileError error() const; - QString getLastWindowsError(); -private: - HANDLE handle; - FileError fileError; - QString fileErrorString; - #endif -}; - -#endif // AVANCEDQFILE_H diff --git a/plugins/CopyEngine/Ultracopier/CompilerInfo.h b/plugins/CopyEngine/Ultracopier/CompilerInfo.h deleted file mode 100644 index 84625b9..0000000 --- a/plugins/CopyEngine/Ultracopier/CompilerInfo.h +++ /dev/null @@ -1 +0,0 @@ -#include "../../../CompilerInfo.h" diff --git a/plugins/CopyEngine/Ultracopier/CopyEngine-collision-and-error.cpp b/plugins/CopyEngine/Ultracopier/CopyEngine-collision-and-error.cpp deleted file mode 100644 index 16c36ae..0000000 --- a/plugins/CopyEngine/Ultracopier/CopyEngine-collision-and-error.cpp +++ /dev/null @@ -1,568 +0,0 @@ -/** \file copyEngine.cpp -\brief Define the copy engine -\author alpha_one_x86 */ - -#include "CopyEngine.h" -#include "FolderExistsDialog.h" -#include "DiskSpace.h" - -//dialog message -/// \note Can be call without queue because all call will be serialized -void CopyEngine::fileAlreadyExistsSlot(QFileInfo source,QFileInfo destination,bool isSame,TransferThread * thread) -{ - fileAlreadyExists(source,destination,isSame,thread); -} - -/// \note Can be call without queue because all call will be serialized -void CopyEngine::errorOnFileSlot(QFileInfo fileInfo,std::string errorString,TransferThread * thread,const ErrorType &errorType) -{ - errorOnFile(fileInfo,errorString,thread,errorType); -} - -/// \note Can be call without queue because all call will be serialized -void CopyEngine::folderAlreadyExistsSlot(QFileInfo source,QFileInfo destination,bool isSame,ScanFileOrFolder * thread) -{ - folderAlreadyExists(source,destination,isSame,thread); -} - -/// \note Can be call without queue because all call will be serialized -void CopyEngine::errorOnFolderSlot(QFileInfo fileInfo,std::string errorString,ScanFileOrFolder * thread,ErrorType errorType) -{ - errorOnFolder(fileInfo,errorString,thread,errorType); -} - -//mkpath event -void CopyEngine::mkPathErrorOnFolderSlot(QFileInfo folder,std::string error,ErrorType errorType) -{ - mkPathErrorOnFolder(folder,error,errorType); -} - -/// \note Can be call without queue because all call will be serialized -void CopyEngine::fileAlreadyExists(QFileInfo source,QFileInfo destination,bool isSame,TransferThread * thread,bool isCalledByShowOneNewDialog) -{ - if(stopIt) - return; - if(thread==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); - return; - } - //load the action - if(isSame) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file is same: "+source.absoluteFilePath().toStdString()); - FileExistsAction tempFileExistsAction=alwaysDoThisActionForFileExists; - if(tempFileExistsAction==FileExists_Overwrite || tempFileExistsAction==FileExists_OverwriteIfNewer || tempFileExistsAction==FileExists_OverwriteIfNotSame || tempFileExistsAction==FileExists_OverwriteIfOlder) - tempFileExistsAction=FileExists_NotSet; - switch(tempFileExistsAction) - { - case FileExists_Skip: - case FileExists_Rename: - thread->setFileExistsAction(tempFileExistsAction); - break; - default: - if(dialogIsOpen) - { - alreadyExistsQueueItem newItem; - newItem.source=source; - newItem.destination=destination; - newItem.isSame=isSame; - newItem.transfer=thread; - newItem.scan=NULL; - alreadyExistsQueue.push_back(newItem); - return; - } - dialogIsOpen=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); - FileIsSameDialog dialog(interface,source,firstRenamingRule,otherRenamingRule); - emit isInPause(true); - dialog.exec();/// \bug crash when external close - FileExistsAction newAction=dialog.getAction(); - emit isInPause(false); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); - if(newAction==FileExists_Cancel) - { - emit cancelAll(); - return; - } - if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileExists) - { - alwaysDoThisActionForFileExists=newAction; - listThread->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); - if(uiIsInstalled) - switch(newAction) - { - default: - case FileExists_Skip: - ui->comboBoxFileCollision->setCurrentIndex(1); - break; - case FileExists_Rename: - ui->comboBoxFileCollision->setCurrentIndex(6); - break; - } - } - if(dialog.getAlways() || newAction!=FileExists_Rename) - thread->setFileExistsAction(newAction); - else - thread->setFileRename(dialog.getNewName()); - dialogIsOpen=false; - if(!isCalledByShowOneNewDialog) - emit queryOneNewDialog(); - return; - break; - } - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file already exists: "+source.absoluteFilePath().toStdString()+", destination: "+destination.absoluteFilePath().toStdString()); - FileExistsAction tempFileExistsAction=alwaysDoThisActionForFileExists; - switch(tempFileExistsAction) - { - case FileExists_Skip: - case FileExists_Rename: - case FileExists_Overwrite: - case FileExists_OverwriteIfNewer: - case FileExists_OverwriteIfOlder: - case FileExists_OverwriteIfNotSame: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"always do this action: "+std::to_string(tempFileExistsAction)); - thread->setFileExistsAction(tempFileExistsAction); - break; - default: - if(dialogIsOpen) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("dialog open, put in queue: %1 %2") - .arg(source.absoluteFilePath()) - .arg(destination.absoluteFilePath()) - .toStdString() - ); - alreadyExistsQueueItem newItem; - newItem.source=source; - newItem.destination=destination; - newItem.isSame=isSame; - newItem.transfer=thread; - newItem.scan=NULL; - alreadyExistsQueue.push_back(newItem); - return; - } - dialogIsOpen=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); - FileExistsDialog dialog(interface,source,destination,firstRenamingRule,otherRenamingRule); - emit isInPause(true); - dialog.exec();/// \bug crash when external close - FileExistsAction newAction=dialog.getAction(); - emit isInPause(false); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); - if(newAction==FileExists_Cancel) - { - emit cancelAll(); - return; - } - if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileExists) - { - alwaysDoThisActionForFileExists=newAction; - listThread->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); - if(uiIsInstalled) - switch(newAction) - { - default: - case FileExists_Skip: - ui->comboBoxFileCollision->setCurrentIndex(1); - break; - case FileExists_Rename: - ui->comboBoxFileCollision->setCurrentIndex(6); - break; - case FileExists_Overwrite: - ui->comboBoxFileCollision->setCurrentIndex(2); - break; - case FileExists_OverwriteIfNotSame: - ui->comboBoxFileCollision->setCurrentIndex(3); - break; - case FileExists_OverwriteIfNewer: - ui->comboBoxFileCollision->setCurrentIndex(4); - break; - case FileExists_OverwriteIfOlder: - ui->comboBoxFileCollision->setCurrentIndex(5); - break; - } - } - if(dialog.getAlways() || newAction!=FileExists_Rename) - thread->setFileExistsAction(newAction); - else - thread->setFileRename(dialog.getNewName()); - dialogIsOpen=false; - if(!isCalledByShowOneNewDialog) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); - emit queryOneNewDialog(); - } - return; - break; - } - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); -} - -void CopyEngine::haveNeedPutAtBottom(bool needPutAtBottom, const QFileInfo &fileInfo, const std::string &errorString,TransferThread *thread,const ErrorType &errorType) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - if(!needPutAtBottom) - { - alwaysDoThisActionForFileError=FileError_NotSet; - if(uiIsInstalled) - ui->comboBoxFileError->setCurrentIndex(0); - errorQueueItem newItem; - newItem.errorString=errorString; - newItem.inode=fileInfo; - newItem.mkPath=false; - newItem.rmPath=false; - newItem.scan=NULL; - newItem.transfer=thread; - newItem.errorType=errorType; - errorQueue.push_back(newItem); - showOneNewDialog(); - } -} - -void CopyEngine::missingDiskSpace(std::vector list) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); - DiskSpace dialog(facilityEngine,list,interface); - emit isInPause(true); - dialog.exec();/// \bug crash when external close - bool ok=dialog.getAction(); - emit isInPause(false); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"cancel: "+std::to_string(ok)); - if(!ok) - emit cancelAll(); - else - listThread->autoStartIfNeeded(); -} - -/// \note Can be call without queue because all call will be serialized -void CopyEngine::errorOnFile(QFileInfo fileInfo,std::string errorString,TransferThread * thread,const ErrorType &errorType,bool isCalledByShowOneNewDialog) -{ - if(stopIt) - return; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+fileInfo.absoluteFilePath().toStdString()+", error: "+errorString); - if(thread==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); - return; - } - //load the action - FileErrorAction tempFileErrorAction=alwaysDoThisActionForFileError; - switch(tempFileErrorAction) - { - case FileError_Skip: - thread->skip(); - return; - case FileError_Retry: - thread->retryAfterError(); - return; - case FileError_PutToEndOfTheList: - emit getNeedPutAtBottom(fileInfo,errorString,thread,errorType); - return; - case FileError_Cancel: - return; - default: - if(dialogIsOpen) - { - errorQueueItem newItem; - newItem.errorString=errorString; - newItem.inode=fileInfo; - newItem.mkPath=false; - newItem.rmPath=false; - newItem.scan=NULL; - newItem.transfer=thread; - newItem.errorType=errorType; - errorQueue.push_back(newItem); - return; - } - dialogIsOpen=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); - emit error(fileInfo.absoluteFilePath().toStdString(),fileInfo.size(),fileInfo.lastModified().toMSecsSinceEpoch()/1000,errorString); - FileErrorDialog dialog(interface,fileInfo,errorString,errorType); - emit isInPause(true); - dialog.exec();/// \bug crash when external close - FileErrorAction newAction=dialog.getAction(); - emit isInPause(false); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); - if(newAction==FileError_Cancel) - { - emit cancelAll(); - return; - } - if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) - { - alwaysDoThisActionForFileError=newAction; - if(uiIsInstalled) - switch(newAction) - { - default: - case FileError_Skip: - ui->comboBoxFileError->setCurrentIndex(1); - break; - case FileError_PutToEndOfTheList: - ui->comboBoxFileError->setCurrentIndex(2); - break; - } - } - switch(newAction) - { - case FileError_Skip: - thread->skip(); - break; - case FileError_Retry: - thread->retryAfterError(); - break; - case FileError_PutToEndOfTheList: - thread->putAtBottom(); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"file error action wrong"); - break; - } - dialogIsOpen=false; - if(!isCalledByShowOneNewDialog) - emit queryOneNewDialog(); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"isCalledByShowOneNewDialog==true then not show other dial"); - return; - break; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); -} - -/// \note Can be call without queue because all call will be serialized -void CopyEngine::folderAlreadyExists(QFileInfo source,QFileInfo destination,bool isSame,ScanFileOrFolder * thread,bool isCalledByShowOneNewDialog) -{ - if(stopIt) - return; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"folder already exists: "+source.absoluteFilePath().toStdString()+", destination: "+destination.absoluteFilePath().toStdString()); - if(thread==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); - return; - } - //load the always action - FolderExistsAction tempFolderExistsAction=alwaysDoThisActionForFolderExists; - switch(tempFolderExistsAction) - { - case FolderExists_Skip: - case FolderExists_Rename: - case FolderExists_Merge: - thread->setFolderExistsAction(tempFolderExistsAction); - break; - default: - if(dialogIsOpen) - { - alreadyExistsQueueItem newItem; - newItem.source=source; - newItem.destination=destination; - newItem.isSame=isSame; - newItem.transfer=NULL; - newItem.scan=thread; - alreadyExistsQueue.push_back(newItem); - return; - } - dialogIsOpen=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); - FolderExistsDialog dialog(interface,source,isSame,destination,firstRenamingRule,otherRenamingRule); - dialog.exec();/// \bug crash when external close - FolderExistsAction newAction=dialog.getAction(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); - if(newAction==FolderExists_Cancel) - { - emit cancelAll(); - return; - } - if(dialog.getAlways() && newAction!=alwaysDoThisActionForFolderExists) - setComboBoxFolderCollision(newAction); - if(!dialog.getAlways() && newAction==FolderExists_Rename) - thread->setFolderExistsAction(newAction,dialog.getNewName()); - else - thread->setFolderExistsAction(newAction); - dialogIsOpen=false; - if(!isCalledByShowOneNewDialog) - emit queryOneNewDialog(); - return; - break; - } -} - -/// \note Can be call without queue because all call will be serialized -/// \todo all this part -void CopyEngine::errorOnFolder(QFileInfo fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType, bool isCalledByShowOneNewDialog) -{ - if(stopIt) - return; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+fileInfo.absoluteFilePath().toStdString()+", error: "+errorString); - if(thread==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); - return; - } - //load the always action - FileErrorAction tempFileErrorAction=alwaysDoThisActionForFolderError; - switch(tempFileErrorAction) - { - case FileError_Skip: - case FileError_Retry: - case FileError_PutToEndOfTheList: - thread->setFolderErrorAction(tempFileErrorAction); - break; - default: - if(dialogIsOpen) - { - errorQueueItem newItem; - newItem.errorString=errorString; - newItem.inode=fileInfo; - newItem.mkPath=false; - newItem.rmPath=false; - newItem.scan=thread; - newItem.transfer=NULL; - newItem.errorType=errorType; - errorQueue.push_back(newItem); - return; - } - dialogIsOpen=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); - emit error(fileInfo.absoluteFilePath().toStdString(),fileInfo.size(),fileInfo.lastModified().toMSecsSinceEpoch()/1000,errorString); - FileErrorDialog dialog(interface,fileInfo,errorString,errorType); - dialog.exec();/// \bug crash when external close - FileErrorAction newAction=dialog.getAction(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); - if(newAction==FileError_Cancel) - { - emit cancelAll(); - return; - } - if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) - { - setComboBoxFolderError(newAction); - alwaysDoThisActionForFolderError=newAction; - } - dialogIsOpen=false; - thread->setFolderErrorAction(newAction); - if(!isCalledByShowOneNewDialog) - emit queryOneNewDialog(); - return; - break; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); -} - -// ----------------------------------------------------- - -//mkpath event -void CopyEngine::mkPathErrorOnFolder(QFileInfo folder,std::string errorString,const ErrorType &errorType,bool isCalledByShowOneNewDialog) -{ - if(stopIt) - return; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+folder.absoluteFilePath().toStdString()+", error: "+errorString); - //load the always action - FileErrorAction tempFileErrorAction=alwaysDoThisActionForFolderError; - switch(tempFileErrorAction) - { - case FileError_Skip: - listThread->mkPathQueue.skip(); - return; - case FileError_Retry: - listThread->mkPathQueue.retry(); - return; - default: - if(dialogIsOpen) - { - errorQueueItem newItem; - newItem.errorString=errorString; - newItem.inode=folder; - newItem.mkPath=true; - newItem.rmPath=false; - newItem.scan=NULL; - newItem.transfer=NULL; - newItem.errorType=errorType; - errorQueue.push_back(newItem); - return; - } - dialogIsOpen=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); - emit error(folder.absoluteFilePath().toStdString(),folder.size(),folder.lastModified().toMSecsSinceEpoch()/1000,errorString); - FileErrorDialog dialog(interface,folder,errorString,errorType); - dialog.exec();/// \bug crash when external close - FileErrorAction newAction=dialog.getAction(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); - if(newAction==FileError_Cancel) - { - emit cancelAll(); - return; - } - if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) - { - setComboBoxFolderError(newAction); - alwaysDoThisActionForFolderError=newAction; - } - dialogIsOpen=false; - switch(newAction) - { - case FileError_Skip: - listThread->mkPathQueue.skip(); - break; - case FileError_Retry: - listThread->mkPathQueue.retry(); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unknow switch case: "+std::to_string(newAction)); - break; - } - if(!isCalledByShowOneNewDialog) - emit queryOneNewDialog(); - return; - break; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); -} - -//show one new dialog if needed -void CopyEngine::showOneNewDialog() -{ - if(stopIt) - return; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"alreadyExistsQueue.size(): "+std::to_string(alreadyExistsQueue.size())); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"errorQueue.size(): "+std::to_string(errorQueue.size())); - int loop_size=alreadyExistsQueue.size(); - while(loop_size>0) - { - if(alreadyExistsQueue.front().transfer!=NULL) - { - fileAlreadyExists(alreadyExistsQueue.front().source, - alreadyExistsQueue.front().destination, - alreadyExistsQueue.front().isSame, - alreadyExistsQueue.front().transfer, - true); - } - else if(alreadyExistsQueue.front().scan!=NULL) - folderAlreadyExists(alreadyExistsQueue.front().source, - alreadyExistsQueue.front().destination, - alreadyExistsQueue.front().isSame, - alreadyExistsQueue.front().scan, - true); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"bug, no thread actived"); - alreadyExistsQueue.erase(alreadyExistsQueue.cbegin()); - loop_size--; - } - loop_size=errorQueue.size(); - while(errorQueue.size()>0 && loop_size>0) - { - if(errorQueue.front().transfer!=NULL) - errorOnFile(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().transfer,errorQueue.front().errorType,true); - else if(errorQueue.front().scan!=NULL) - errorOnFolder(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().scan,errorQueue.front().errorType,true); - else if(errorQueue.front().mkPath) - mkPathErrorOnFolder(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().errorType,true); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"bug, no thread actived"); - errorQueue.erase(errorQueue.cbegin()); - loop_size--; - } -} diff --git a/plugins/CopyEngine/Ultracopier/CopyEngine.cpp b/plugins/CopyEngine/Ultracopier/CopyEngine.cpp deleted file mode 100644 index f3d6e04..0000000 --- a/plugins/CopyEngine/Ultracopier/CopyEngine.cpp +++ /dev/null @@ -1,1253 +0,0 @@ -/** \file copyEngine.cpp -\brief Define the copy engine -\author alpha_one_x86 */ - -#include -#include -#include - -#include "CopyEngine.h" -#include "FolderExistsDialog.h" -#include "../../../interface/PluginInterface_CopyEngine.h" - -// The cmath header from MSVC does not contain round() -#if (defined(_WIN64) || defined(_WIN32)) && defined(_MSC_VER) -inline double round(double d) { - return floor( d + 0.5 ); -} -#endif - -CopyEngine::CopyEngine(FacilityInterface * facilityEngine) : - ui(new Ui::copyEngineOptions()) -{ - listThread=new ListThread(facilityEngine); - this->facilityEngine = facilityEngine; - filters = NULL; - renamingRules = NULL; - - blockSize = ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE; - sequentialBuffer = ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*ULTRACOPIER_PLUGIN_DEFAULT_SEQUENTIAL_NUMBER_OF_BLOCK; - parallelBuffer = ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; - interface = NULL; - tempWidget = NULL; - uiIsInstalled = false; - dialogIsOpen = false; - renameTheOriginalDestination = false; - maxSpeed = 0; - alwaysDoThisActionForFileExists = FileExists_NotSet; - alwaysDoThisActionForFileError = FileError_NotSet; - checkDestinationFolderExists = false; - stopIt = false; - size_for_speed = 0; - putAtBottom = 0; - forcedMode = false; - followTheStrictOrder = false; - deletePartiallyTransferredFiles = true; - inodeThreads = 16; - moveTheWholeFolder = true; - - //implement the SingleShot in this class - //timerActionDone.setSingleShot(true); - timerActionDone.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_TRASNFER_LIST); - //timerProgression.setSingleShot(true); - timerProgression.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_PROGRESSION); - - timerUpdateMount.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_MOUNT_MS); -} - -CopyEngine::~CopyEngine() -{ - /*if(filters!=NULL) - delete filters; - if(renamingRules!=NULL) - delete renamingRules; - destroyed by the widget parent, here the interface - */ - stopIt=true; - delete listThread; - delete ui; -} - -void CopyEngine::connectTheSignalsSlots() -{ - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - debugDialogWindow.show(); - #endif - if(!connect(listThread,&ListThread::actionInProgess, this,&CopyEngine::actionInProgess, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect actionInProgess()"); - if(!connect(listThread,&ListThread::actionInProgess, this,&CopyEngine::newActionInProgess, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect actionInProgess() to slot"); - if(!connect(listThread,&ListThread::newFolderListing, this,&CopyEngine::newFolderListing, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect newFolderListing()"); - if(!connect(listThread,&ListThread::isInPause, this,&CopyEngine::isInPause, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect isInPause()"); - if(!connect(listThread,&ListThread::error, this,&CopyEngine::error, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect error()"); - if(!connect(listThread,&ListThread::rmPath, this,&CopyEngine::rmPath, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect rmPath()"); - if(!connect(listThread,&ListThread::mkPath, this,&CopyEngine::mkPath, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect mkPath()"); - if(!connect(listThread,&ListThread::newActionOnList, this,&CopyEngine::newActionOnList, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect newActionOnList()"); - if(!connect(listThread,&ListThread::doneTime, this,&CopyEngine::doneTime, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect doneTime()"); - if(!connect(listThread,&ListThread::pushFileProgression, this,&CopyEngine::pushFileProgression, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect pushFileProgression()"); - if(!connect(listThread,&ListThread::pushGeneralProgression, this,&CopyEngine::pushGeneralProgression, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect pushGeneralProgression()"); - if(!connect(listThread,&ListThread::syncReady, this,&CopyEngine::syncReady, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect syncReady()"); - if(!connect(listThread,&ListThread::canBeDeleted, this,&CopyEngine::canBeDeleted, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect canBeDeleted()"); - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - if(!connect(listThread,&ListThread::debugInformation, this,&CopyEngine::debugInformation, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect debugInformation()"); - #endif - - if(!connect(listThread,&ListThread::send_fileAlreadyExists, this,&CopyEngine::fileAlreadyExistsSlot, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_fileAlreadyExists()"); - if(!connect(listThread,&ListThread::send_errorOnFile, this,&CopyEngine::errorOnFileSlot, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_errorOnFile()"); - if(!connect(listThread,&ListThread::send_folderAlreadyExists, this,&CopyEngine::folderAlreadyExistsSlot, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_folderAlreadyExists()"); - if(!connect(listThread,&ListThread::send_errorOnFolder, this,&CopyEngine::errorOnFolderSlot, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_errorOnFolder()"); - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - if(!connect(listThread,&ListThread::updateTheDebugInfo, this,&CopyEngine::updateTheDebugInfo, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect updateTheDebugInfo()"); - #endif - if(!connect(listThread,&ListThread::errorTransferList, this,&CopyEngine::errorTransferList, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect errorTransferList()"); - if(!connect(listThread,&ListThread::warningTransferList, this,&CopyEngine::warningTransferList, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect warningTransferList()"); - if(!connect(listThread,&ListThread::mkPathErrorOnFolder, this,&CopyEngine::mkPathErrorOnFolderSlot, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect mkPathErrorOnFolder()"); - if(!connect(listThread,&ListThread::send_realBytesTransfered, this,&CopyEngine::get_realBytesTransfered, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_realBytesTransfered()"); - - if(!connect(this,&CopyEngine::tryCancel, listThread,&ListThread::cancel, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect tryCancel()"); - if(!connect(this,&CopyEngine::getNeedPutAtBottom, listThread,&ListThread::getNeedPutAtBottom, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect getNeedPutAtBottom()"); - if(!connect(listThread,&ListThread::haveNeedPutAtBottom, this,&CopyEngine::haveNeedPutAtBottom, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect haveNeedPutAtBottom()"); - - - if(!connect(this,&CopyEngine::signal_pause, listThread,&ListThread::pause, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_pause()"); - if(!connect(this,&CopyEngine::signal_exportErrorIntoTransferList,listThread,&ListThread::exportErrorIntoTransferList, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_exportErrorIntoTransferList()"); - if(!connect(this,&CopyEngine::signal_resume, listThread,&ListThread::resume, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_resume()"); - if(!connect(this,&CopyEngine::signal_skip, listThread,&ListThread::skip, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_skip()"); - if(!connect(this,&CopyEngine::signal_setCollisionAction, listThread,&ListThread::setAlwaysFileExistsAction, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_setCollisionAction()"); - if(!connect(this,&CopyEngine::signal_setTransferAlgorithm, listThread,&ListThread::setTransferAlgorithm, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_setCollisionAction()"); - if(!connect(this,&CopyEngine::signal_setFolderCollision, listThread,&ListThread::setFolderCollision, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_setFolderCollision()"); - if(!connect(this,&CopyEngine::signal_removeItems, listThread,&ListThread::removeItems, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_removeItems()"); - if(!connect(this,&CopyEngine::signal_moveItemsOnTop, listThread,&ListThread::moveItemsOnTop, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsOnTop()"); - if(!connect(this,&CopyEngine::signal_moveItemsUp, listThread,&ListThread::moveItemsUp, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsUp()"); - if(!connect(this,&CopyEngine::signal_moveItemsDown, listThread,&ListThread::moveItemsDown, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsDown()"); - if(!connect(this,&CopyEngine::signal_moveItemsOnBottom, listThread,&ListThread::moveItemsOnBottom, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsOnBottom()"); - if(!connect(this,&CopyEngine::signal_exportTransferList, listThread,&ListThread::exportTransferList, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_exportTransferList()"); - if(!connect(this,&CopyEngine::signal_importTransferList, listThread,&ListThread::importTransferList, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_importTransferList()"); - if(!connect(this,&CopyEngine::signal_forceMode, listThread,&ListThread::forceMode, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_forceMode()"); - if(!connect(this,&CopyEngine::send_osBufferLimit, listThread,&ListThread::set_osBufferLimit, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_osBufferLimit()"); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - if(!connect(this,&CopyEngine::send_speedLimitation, listThread,&ListThread::setSpeedLimitation, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_speedLimitation()"); - #endif - if(!connect(this,&CopyEngine::send_blockSize, listThread,&ListThread::setBlockSize, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_blockSize()"); - if(!connect(this,&CopyEngine::send_parallelBuffer, listThread,&ListThread::setParallelBuffer, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setParallelBuffer()"); - if(!connect(this,&CopyEngine::send_sequentialBuffer, listThread,&ListThread::setSequentialBuffer, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setSequentialBuffer()"); - if(!connect(this,&CopyEngine::send_parallelizeIfSmallerThan, listThread,&ListThread::setParallelizeIfSmallerThan, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setParallelizeIfSmallerThan()"); - if(!connect(this,&CopyEngine::send_moveTheWholeFolder, listThread,&ListThread::setMoveTheWholeFolder, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect moveTheWholeFolder()"); - if(!connect(this,&CopyEngine::send_deletePartiallyTransferredFiles, listThread,&ListThread::setDeletePartiallyTransferredFiles, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect deletePartiallyTransferredFiles()"); - if(!connect(this,&CopyEngine::send_setRenameTheOriginalDestination, listThread,&ListThread::setRenameTheOriginalDestination, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setRenameTheOriginalDestination()"); - if(!connect(this,&CopyEngine::send_setInodeThreads, listThread,&ListThread::setInodeThreads, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setInodeThreads()"); - if(!connect(this,&CopyEngine::send_followTheStrictOrder, listThread,&ListThread::setFollowTheStrictOrder, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect followTheStrictOrder()"); - if(!connect(this,&CopyEngine::send_setFilters,listThread,&ListThread::set_setFilters, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_setFilters()"); - if(!connect(this,&CopyEngine::send_sendNewRenamingRules,listThread,&ListThread::set_sendNewRenamingRules, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_sendNewRenamingRules()"); - if(!connect(&timerActionDone,&QTimer::timeout, listThread,&ListThread::sendActionDone)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerActionDone"); - if(!connect(&timerProgression,&QTimer::timeout, listThread,&ListThread::sendProgression)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerProgression"); - if(!connect(listThread,&ListThread::missingDiskSpace, this,&CopyEngine::missingDiskSpace,Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerProgression"); - - if(!connect(this,&CopyEngine::queryOneNewDialog,this,&CopyEngine::showOneNewDialog,Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect queryOneNewDialog()"); - if(!connect(listThread,&ListThread::errorToRetry,this,&CopyEngine::errorToRetry,Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect errorToRetry()"); - - if(!connect(&timerUpdateMount,&QTimer::timeout,listThread,&ListThread::set_updateMount, Qt::QueuedConnection)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect set_updateMount()"); -} - -#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW -void CopyEngine::updateTheDebugInfo(const std::vector &newList, const std::vector &newList2, const int &numberOfInodeOperation) -{ - debugDialogWindow.setTransferThreadList(newList); - debugDialogWindow.setTransferList(newList2); - debugDialogWindow.setInodeUsage(numberOfInodeOperation); -} -#endif - -//to send the options panel -bool CopyEngine::getOptionsEngine(QWidget * tempWidget) -{ - this->tempWidget=tempWidget; - ui->setupUi(tempWidget); - ui->toolBox->setCurrentIndex(0); - ui->blockSize->setMaximum(ULTRACOPIER_PLUGIN_MAX_BLOCK_SIZE); - connect(tempWidget, &QWidget::destroyed, this, &CopyEngine::resetTempWidget); - //conect the ui widget - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - if(!setSpeedLimitation(maxSpeed)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the speed limitation"); - #endif - - //here else, the default settings can't be loaded - uiIsInstalled=true; - - setBlockSize(blockSize); - setSequentialBuffer(sequentialBuffer); - setParallelBuffer(parallelBuffer); - setAutoStart(autoStart); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - setRsync(rsync); - #else - ui->label_rsync->setVisible(false); - ui->rsync->setVisible(false); - #endif - setCheckDestinationFolderExists(checkDestinationFolderExists); - set_doChecksum(doChecksum); - set_checksumIgnoreIfImpossible(checksumIgnoreIfImpossible); - set_checksumOnlyOnError(checksumOnlyOnError); - set_osBuffer(osBuffer); - set_osBufferLimited(osBufferLimited); - set_osBufferLimit(osBufferLimit); - setRightTransfer(doRightTransfer); - setKeepDate(keepDate); - setParallelizeIfSmallerThan(parallelizeIfSmallerThan); - setFollowTheStrictOrder(followTheStrictOrder); - setDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); - setInodeThreads(inodeThreads); - setRenameTheOriginalDestination(renameTheOriginalDestination); - setMoveTheWholeFolder(moveTheWholeFolder); - setCheckDiskSpace(checkDiskSpace); - setDefaultDestinationFolder(defaultDestinationFolder); - - switch(alwaysDoThisActionForFileExists) - { - case FileExists_NotSet: - ui->comboBoxFileCollision->setCurrentIndex(0); - break; - case FileExists_Skip: - ui->comboBoxFileCollision->setCurrentIndex(1); - break; - case FileExists_Overwrite: - ui->comboBoxFileCollision->setCurrentIndex(2); - break; - case FileExists_OverwriteIfNotSame: - ui->comboBoxFileCollision->setCurrentIndex(3); - break; - case FileExists_OverwriteIfNewer: - ui->comboBoxFileCollision->setCurrentIndex(4); - break; - case FileExists_OverwriteIfOlder: - ui->comboBoxFileCollision->setCurrentIndex(5); - break; - case FileExists_Rename: - ui->comboBoxFileCollision->setCurrentIndex(6); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - ui->comboBoxFileCollision->setCurrentIndex(0); - break; - } - switch(alwaysDoThisActionForFileError) - { - case FileError_NotSet: - ui->comboBoxFileError->setCurrentIndex(0); - break; - case FileError_Skip: - ui->comboBoxFileError->setCurrentIndex(1); - break; - case FileError_PutToEndOfTheList: - ui->comboBoxFileError->setCurrentIndex(2); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - ui->comboBoxFileError->setCurrentIndex(0); - break; - } - switch(alwaysDoThisActionForFolderExists) - { - case FolderExists_NotSet: - ui->comboBoxFolderCollision->setCurrentIndex(0); - break; - case FolderExists_Merge: - ui->comboBoxFolderCollision->setCurrentIndex(1); - break; - case FolderExists_Skip: - ui->comboBoxFolderCollision->setCurrentIndex(2); - break; - case FolderExists_Rename: - ui->comboBoxFolderCollision->setCurrentIndex(3); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - ui->comboBoxFolderCollision->setCurrentIndex(0); - break; - } - switch(alwaysDoThisActionForFolderError) - { - case FileError_NotSet: - ui->comboBoxFolderError->setCurrentIndex(0); - break; - case FileError_Skip: - ui->comboBoxFolderError->setCurrentIndex(1); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored: "+std::to_string(alwaysDoThisActionForFolderError)); - ui->comboBoxFolderError->setCurrentIndex(0); - break; - } - switch(transferAlgorithm) - { - case TransferAlgorithm_Automatic: - ui->transferAlgorithm->setCurrentIndex(0); - break; - case TransferAlgorithm_Sequential: - ui->transferAlgorithm->setCurrentIndex(1); - break; - case TransferAlgorithm_Parallel: - ui->transferAlgorithm->setCurrentIndex(2); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - ui->transferAlgorithm->setCurrentIndex(0); - break; - } - return true; -} - -//to have interface widget to do modal dialog -void CopyEngine::setInterfacePointer(QWidget * interface) -{ - this->interface=interface; - filters=new Filters(tempWidget); - renamingRules=new RenamingRules(tempWidget); - - if(uiIsInstalled) - { - connect(ui->doRightTransfer, &QCheckBox::toggled, this,&CopyEngine::setRightTransfer); - connect(ui->keepDate, &QCheckBox::toggled, this,&CopyEngine::setKeepDate); - connect(ui->blockSize, static_cast(&QSpinBox::valueChanged), this,&CopyEngine::setBlockSize); - connect(ui->autoStart, &QCheckBox::toggled, this,&CopyEngine::setAutoStart); - connect(ui->doChecksum, &QCheckBox::toggled, this,&CopyEngine::doChecksum_toggled); - connect(ui->checksumIgnoreIfImpossible, &QCheckBox::toggled, this,&CopyEngine::checksumIgnoreIfImpossible_toggled); - connect(ui->checksumOnlyOnError, &QCheckBox::toggled, this,&CopyEngine::checksumOnlyOnError_toggled); - connect(ui->osBuffer, &QCheckBox::toggled, this,&CopyEngine::osBuffer_toggled); - connect(ui->osBufferLimited, &QCheckBox::toggled, this,&CopyEngine::osBufferLimited_toggled); - connect(ui->osBufferLimit, &QSpinBox::editingFinished, this,&CopyEngine::osBufferLimit_editingFinished); - connect(ui->moveTheWholeFolder, &QCheckBox::toggled, this,&CopyEngine::setMoveTheWholeFolder); - connect(ui->deletePartiallyTransferredFiles, &QCheckBox::toggled, this,&CopyEngine::setDeletePartiallyTransferredFiles); - connect(ui->followTheStrictOrder, &QCheckBox::toggled, this,&CopyEngine::setFollowTheStrictOrder); - connect(ui->checkBoxDestinationFolderExists, &QCheckBox::toggled, this,&CopyEngine::setCheckDestinationFolderExists); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - connect(ui->rsync, &QCheckBox::toggled, this,&CopyEngine::setRsync); - #endif - connect(ui->renameTheOriginalDestination, &QCheckBox::toggled, this,&CopyEngine::setRenameTheOriginalDestination); - connect(filters, &Filters::haveNewFilters, this,&CopyEngine::sendNewFilters); - connect(ui->filters, &QPushButton::clicked, this,&CopyEngine::showFilterDialog); - connect(ui->inodeThreads, &QSpinBox::editingFinished, this,&CopyEngine::inodeThreadsFinished); - connect(ui->inodeThreads, static_cast(&QSpinBox::valueChanged), this,&CopyEngine::setInodeThreads); - connect(ui->defaultDestinationFolderBrowse, &QPushButton::clicked, this,&CopyEngine::defaultDestinationFolderBrowse); - - connect(ui->sequentialBuffer, static_cast(&QSpinBox::valueChanged), this,&CopyEngine::setSequentialBuffer); - connect(ui->parallelBuffer, static_cast(&QSpinBox::valueChanged), this,&CopyEngine::setParallelBuffer); - connect(ui->parallelizeIfSmallerThan, static_cast(&QSpinBox::valueChanged), this,&CopyEngine::setParallelizeIfSmallerThan); - connect(ui->comboBoxFolderError, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setFolderError); - connect(ui->comboBoxFolderCollision, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setFolderCollision); - connect(ui->comboBoxFileError, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setFileError); - connect(ui->comboBoxFileCollision, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setFileCollision); - connect(ui->transferAlgorithm, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngine::setTransferAlgorithm); - - if(!connect(renamingRules,&RenamingRules::sendNewRenamingRules,this,&CopyEngine::sendNewRenamingRules)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect sendNewRenamingRules()"); - if(!connect(ui->renamingRules,&QPushButton::clicked,this,&CopyEngine::showRenamingRules)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect renamingRules.clicked()"); - } - - filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); - set_setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); - - renamingRules->setRenamingRules(firstRenamingRule,otherRenamingRule); - emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); -} - -bool CopyEngine::haveSameSource(const std::vector &sources) -{ - return listThread->haveSameSource(sources); -} - -bool CopyEngine::haveSameDestination(const std::string &destination) -{ - return listThread->haveSameDestination(destination); -} - -bool CopyEngine::newCopy(const std::vector &sources) -{ - if(forcedMode && mode!=Ultracopier::Copy) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to move, you can't copy with it"); - QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to move, you can't copy with it")); - return false; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - std::string destination; - if(!defaultDestinationFolder.empty() && QDir(QString::fromStdString(defaultDestinationFolder)).exists()) - destination = defaultDestinationFolder; - else - destination = askDestination(); - if(destination.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); - return false; - } - return listThread->newCopy(sources,destination); -} - -bool CopyEngine::newCopy(const std::vector &sources,const std::string &destination) -{ - if(forcedMode && mode!=Ultracopier::Copy) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to move, you can't copy with it"); - QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to move, you can't copy with it")); - return false; - } - return listThread->newCopy(sources,destination); -} - -bool CopyEngine::newMove(const std::vector &sources) -{ - if(forcedMode && mode!=Ultracopier::Move) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to copy, you can't move with it"); - QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to copy, you can't move with it")); - return false; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - std::string destination; - if(!ui->defaultDestinationFolder->text().isEmpty() && QDir(ui->defaultDestinationFolder->text()).exists()) - destination = ui->defaultDestinationFolder->text().toStdString(); - else - destination = askDestination(); - if(destination.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); - return false; - } - return listThread->newMove(sources,destination); -} - -bool CopyEngine::newMove(const std::vector &sources,const std::string &destination) -{ - if(forcedMode && mode!=Ultracopier::Move) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to copy, you can't move with it"); - QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to copy, you can't move with it")); - return false; - } - return listThread->newMove(sources,destination); -} - -void CopyEngine::defaultDestinationFolderBrowse() -{ - std::string destination = askDestination(); - if(destination.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(uiIsInstalled) - ui->defaultDestinationFolder->setText(QString::fromStdString(destination)); -} - -std::string CopyEngine::askDestination() -{ - std::string destination = listThread->getUniqueDestinationFolder(); - if(!destination.empty()) - { - QMessageBox::StandardButton button=QMessageBox::question(interface,tr("Destination"),tr("Use the actual destination \"%1\"?") - .arg(QString::fromStdString(destination)), - QMessageBox::Yes | QMessageBox::No,QMessageBox::Yes); - if(button==QMessageBox::Yes) - return destination; - } - destination=QFileDialog::getExistingDirectory(interface,QString::fromStdString(facilityEngine->translateText("Select destination directory")),QStringLiteral(""),QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toStdString(); - return destination; -} - -void CopyEngine::newTransferList(const std::string &file) -{ - emit signal_importTransferList(file); -} - -//because direct access to list thread into the main thread can't be do -uint64_t CopyEngine::realByteTransfered() -{ - return size_for_speed; -} - -//speed limitation -bool CopyEngine::supportSpeedLimitation() const -{ - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - return true; - #else - return false; - #endif -} - -/** \brief to sync the transfer list - * Used when the interface is changed, useful to minimize the memory size */ -void CopyEngine::syncTransferList() -{ - listThread->syncTransferList(); -} - -void CopyEngine::set_doChecksum(bool doChecksum) -{ - listThread->set_doChecksum(doChecksum); - if(uiIsInstalled) - { - ui->doChecksum->setChecked(doChecksum); - ui->checksumOnlyOnError->setEnabled(ui->doChecksum->isChecked()); - ui->checksumIgnoreIfImpossible->setEnabled(ui->doChecksum->isChecked()); - } - this->doChecksum=doChecksum; -} - -void CopyEngine::set_checksumIgnoreIfImpossible(bool checksumIgnoreIfImpossible) -{ - listThread->set_checksumIgnoreIfImpossible(checksumIgnoreIfImpossible); - if(uiIsInstalled) - ui->checksumIgnoreIfImpossible->setChecked(checksumIgnoreIfImpossible); - this->checksumIgnoreIfImpossible=checksumIgnoreIfImpossible; -} - -void CopyEngine::set_checksumOnlyOnError(bool checksumOnlyOnError) -{ - listThread->set_checksumOnlyOnError(checksumOnlyOnError); - if(uiIsInstalled) - ui->checksumOnlyOnError->setChecked(checksumOnlyOnError); - this->checksumOnlyOnError=checksumOnlyOnError; -} - -void CopyEngine::set_osBuffer(bool osBuffer) -{ - listThread->set_osBuffer(osBuffer); - if(uiIsInstalled) - { - ui->osBuffer->setChecked(osBuffer); - updateBufferCheckbox(); - } - this->osBuffer=osBuffer; -} - -void CopyEngine::set_osBufferLimited(bool osBufferLimited) -{ - listThread->set_osBufferLimited(osBufferLimited); - if(uiIsInstalled) - { - ui->osBufferLimited->setChecked(osBufferLimited); - updateBufferCheckbox(); - } - this->osBufferLimited=osBufferLimited; -} - -void CopyEngine::set_osBufferLimit(unsigned int osBufferLimit) -{ - emit send_osBufferLimit(osBufferLimit); - if(uiIsInstalled) - ui->osBufferLimit->setValue(osBufferLimit); - this->osBufferLimit=osBufferLimit; -} - -void CopyEngine::updateBufferCheckbox() -{ - ui->osBufferLimited->setEnabled(ui->osBuffer->isChecked()); - ui->osBufferLimit->setEnabled(ui->osBuffer->isChecked() && ui->osBufferLimited->isChecked()); -} - -void CopyEngine::set_setFilters(std::vector includeStrings,std::vector includeOptions,std::vector excludeStrings,std::vector excludeOptions) -{ - if(filters!=NULL) - { - filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); - emit send_setFilters(filters->getInclude(),filters->getExclude()); - } - this->includeStrings=includeStrings; - this->includeOptions=includeOptions; - this->excludeStrings=excludeStrings; - this->excludeOptions=excludeOptions; -} - -void CopyEngine::setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) -{ - sendNewRenamingRules(firstRenamingRule,otherRenamingRule); -} - -bool CopyEngine::userAddFolder(const Ultracopier::CopyMode &mode) -{ - std::string source = QFileDialog::getExistingDirectory(interface,QString::fromStdString(facilityEngine->translateText("Select source directory")), - QStringLiteral(""), - QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toStdString(); - if(source.empty() || source=="") - return false; - std::vector sources; - sources.push_back(source); - if(mode==Ultracopier::Copy) - return newCopy(sources); - else - return newMove(sources); -} - -bool CopyEngine::userAddFile(const Ultracopier::CopyMode &mode) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - QStringList sources = QFileDialog::getOpenFileNames( - interface, - QString::fromStdString(facilityEngine->translateText("Select one or more files to open")), - QStringLiteral(""), - QString::fromStdString(facilityEngine->translateText("All files"))+QStringLiteral(" (*)")); - - std::vector sourcesstd; - unsigned int index=0; - while(index<(unsigned int)sources.size()) - { - sourcesstd.push_back(sources.at(index).toStdString()); - index++; - } - - if(sourcesstd.empty()) - return false; - if(mode==Ultracopier::Copy) - return newCopy(sourcesstd); - else - return newMove(sourcesstd); -} - -void CopyEngine::pause() -{ - emit signal_pause(); -} - -void CopyEngine::resume() -{ - emit signal_resume(); -} - -void CopyEngine::skip(const uint64_t &id) -{ - emit signal_skip(id); -} - -void CopyEngine::cancel() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - stopIt=true; - timerProgression.stop(); - timerActionDone.stop(); - emit tryCancel(); -} - -void CopyEngine::removeItems(const std::vector &ids) -{ - emit signal_removeItems(ids); -} - -void CopyEngine::moveItemsOnTop(const std::vector &ids) -{ - emit signal_moveItemsOnTop(ids); -} - -void CopyEngine::moveItemsUp(const std::vector &ids) -{ - emit signal_moveItemsUp(ids); -} - -void CopyEngine::moveItemsDown(const std::vector &ids) -{ - emit signal_moveItemsDown(ids); -} - -void CopyEngine::moveItemsOnBottom(const std::vector &ids) -{ - emit signal_moveItemsOnBottom(ids); -} - -/** \brief give the forced mode, to export/import transfer list */ -void CopyEngine::forceMode(const Ultracopier::CopyMode &mode) -{ - #ifdef ULTRACOPIER_PLUGIN_RSYNC - if(mode==Ultracopier::Move) - { - listThread->setRsync(false); - rsync=false; - } - if(uiIsInstalled) - ui->rsync->setEnabled(mode==Ultracopier::Copy); - #endif - if(forcedMode) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Mode forced previously"); - QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The mode has been forced previously. This is an internal error, please report it")); - return; - } - #ifdef ULTRACOPIER_PLUGIN_RSYNC - if(mode==Ultracopier::Move) - rsync=false; - #endif - if(mode==Ultracopier::Copy) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to copy"); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to move"); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - if(uiIsInstalled) - ui->rsync->setEnabled(mode==Ultracopier::Copy); - #endif - this->mode=mode; - forcedMode=true; - emit signal_forceMode(mode); -} - -void CopyEngine::exportTransferList() -{ - std::string fileName = QFileDialog::getSaveFileName(interface,QString::fromStdString(facilityEngine->translateText("Save transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); - if(fileName.empty()) - return; - emit signal_exportTransferList(fileName); -} - -void CopyEngine::importTransferList() -{ - std::string fileName = QFileDialog::getOpenFileName(interface,QString::fromStdString(facilityEngine->translateText("Open transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); - if(fileName.empty()) - return; - emit signal_importTransferList(fileName); -} - -void CopyEngine::warningTransferList(const std::string &warning) -{ - QMessageBox::warning(interface,QString::fromStdString(facilityEngine->translateText("Error")),QString::fromStdString(warning)); -} - -void CopyEngine::errorTransferList(const std::string &error) -{ - QMessageBox::critical(interface,QString::fromStdString(facilityEngine->translateText("Error")),QString::fromStdString(error)); -} - -bool CopyEngine::setSpeedLimitation(const int64_t &speedLimitation) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"maxSpeed: "+std::to_string(speedLimitation)); - maxSpeed=speedLimitation; - emit send_speedLimitation(speedLimitation); - return true; -} - -void CopyEngine::setFileCollision(int index) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); - if(uiIsInstalled) - if(index!=ui->comboBoxFileCollision->currentIndex()) - ui->comboBoxFileCollision->setCurrentIndex(index); - switch(index) - { - case 0: - alwaysDoThisActionForFileExists=FileExists_NotSet; - break; - case 1: - alwaysDoThisActionForFileExists=FileExists_Skip; - break; - case 2: - alwaysDoThisActionForFileExists=FileExists_Overwrite; - break; - case 3: - alwaysDoThisActionForFileExists=FileExists_OverwriteIfNotSame; - break; - case 4: - alwaysDoThisActionForFileExists=FileExists_OverwriteIfNewer; - break; - case 5: - alwaysDoThisActionForFileExists=FileExists_OverwriteIfOlder; - break; - case 6: - alwaysDoThisActionForFileExists=FileExists_Rename; - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - alwaysDoThisActionForFileExists=FileExists_NotSet; - break; - } - emit signal_setCollisionAction(alwaysDoThisActionForFileExists); -} - -void CopyEngine::setFileError(int index) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); - if(uiIsInstalled) - if(index!=ui->comboBoxFileError->currentIndex()) - ui->comboBoxFileError->setCurrentIndex(index); - switch(index) - { - case 0: - alwaysDoThisActionForFileError=FileError_NotSet; - break; - case 1: - alwaysDoThisActionForFileError=FileError_Skip; - break; - case 2: - alwaysDoThisActionForFileError=FileError_PutToEndOfTheList; - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - alwaysDoThisActionForFileError=FileError_NotSet; - break; - } - emit signal_setCollisionAction(alwaysDoThisActionForFileExists); -} - -void CopyEngine::setTransferAlgorithm(int index) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); - if(uiIsInstalled) - if(index!=ui->transferAlgorithm->currentIndex()) - ui->transferAlgorithm->setCurrentIndex(index); - switch(index) - { - case 0: - transferAlgorithm=TransferAlgorithm_Automatic; - break; - case 1: - transferAlgorithm=TransferAlgorithm_Sequential; - break; - case 2: - transferAlgorithm=TransferAlgorithm_Parallel; - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - transferAlgorithm=TransferAlgorithm_Automatic; - break; - } - if(transferAlgorithm==TransferAlgorithm_Sequential) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"transferAlgorithm==TransferAlgorithm_Sequential"); - else if(transferAlgorithm==TransferAlgorithm_Automatic) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"transferAlgorithm==TransferAlgorithm_Automatic"); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"transferAlgorithm==TransferAlgorithm_Parallel"); - emit signal_setTransferAlgorithm(transferAlgorithm); -} - -void CopyEngine::setRightTransfer(const bool doRightTransfer) -{ - this->doRightTransfer=doRightTransfer; - if(uiIsInstalled) - ui->doRightTransfer->setChecked(doRightTransfer); - listThread->setRightTransfer(doRightTransfer); -} - -//set keep date -void CopyEngine::setKeepDate(const bool keepDate) -{ - this->keepDate=keepDate; - if(uiIsInstalled) - ui->keepDate->setChecked(keepDate); - listThread->setKeepDate(keepDate); -} - -//set block size in KB -void CopyEngine::setBlockSize(const int blockSize) -{ - this->blockSize=blockSize; - if(uiIsInstalled) - { - ui->blockSize->setValue(blockSize); - ui->sequentialBuffer->setSingleStep(blockSize); - ui->parallelBuffer->setSingleStep(blockSize); - } - emit send_blockSize(blockSize); - updatedBlockSize(); -} - -void CopyEngine::setParallelBuffer(int parallelBuffer) -{ - parallelBuffer=round((float)parallelBuffer/(float)blockSize)*blockSize; - this->parallelBuffer=parallelBuffer; - if(uiIsInstalled) - ui->parallelBuffer->setValue(parallelBuffer); - emit send_parallelBuffer(parallelBuffer/blockSize); -} - -void CopyEngine::setSequentialBuffer(int sequentialBuffer) -{ - sequentialBuffer=round((float)sequentialBuffer/(float)blockSize)*blockSize; - this->sequentialBuffer=sequentialBuffer; - if(uiIsInstalled) - ui->sequentialBuffer->setValue(sequentialBuffer); - emit send_sequentialBuffer(sequentialBuffer/blockSize); -} - -void CopyEngine::setParallelizeIfSmallerThan(int parallelizeIfSmallerThan) -{ - this->parallelizeIfSmallerThan=parallelizeIfSmallerThan; - if(uiIsInstalled) - ui->parallelizeIfSmallerThan->setValue(parallelizeIfSmallerThan); - emit send_parallelizeIfSmallerThan(parallelizeIfSmallerThan*1024); -} - -void CopyEngine::setMoveTheWholeFolder(const bool &moveTheWholeFolder) -{ - this->moveTheWholeFolder=moveTheWholeFolder; - if(uiIsInstalled) - ui->moveTheWholeFolder->setChecked(moveTheWholeFolder); - emit send_moveTheWholeFolder(moveTheWholeFolder); -} - -void CopyEngine::setFollowTheStrictOrder(const bool &followTheStrictOrder) -{ - this->followTheStrictOrder=followTheStrictOrder; - if(uiIsInstalled) - ui->followTheStrictOrder->setChecked(followTheStrictOrder); - emit send_followTheStrictOrder(followTheStrictOrder); -} - -void CopyEngine::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) -{ - this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; - if(uiIsInstalled) - ui->deletePartiallyTransferredFiles->setChecked(deletePartiallyTransferredFiles); - emit send_deletePartiallyTransferredFiles(deletePartiallyTransferredFiles); -} - -void CopyEngine::setInodeThreads(const int &inodeThreads) -{ - this->inodeThreads=inodeThreads; - if(uiIsInstalled) - ui->inodeThreads->setValue(inodeThreads); - emit send_setInodeThreads(inodeThreads); -} - -void CopyEngine::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) -{ - this->renameTheOriginalDestination=renameTheOriginalDestination; - if(uiIsInstalled) - ui->renameTheOriginalDestination->setChecked(renameTheOriginalDestination); - emit send_setRenameTheOriginalDestination(renameTheOriginalDestination); -} - -void CopyEngine::inodeThreadsFinished() -{ - this->inodeThreads=ui->inodeThreads->value(); - emit send_setInodeThreads(inodeThreads); -} - -//set auto start -void CopyEngine::setAutoStart(const bool autoStart) -{ - this->autoStart=autoStart; - if(uiIsInstalled) - ui->autoStart->setChecked(autoStart); - listThread->setAutoStart(autoStart); -} - -#ifdef ULTRACOPIER_PLUGIN_RSYNC -/// \brief set rsync -void CopyEngine::setRsync(const bool rsync) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); - this->rsync=rsync; - if(uiIsInstalled) - { - ui->rsync->setChecked(rsync); - ui->rsync->setEnabled(forcedMode && mode==Ultracopier::Copy); - ui->label_rsync->setEnabled(forcedMode && mode==Ultracopier::Copy); - } - listThread->setRsync(rsync); -} -#endif - -//set check destination folder -void CopyEngine::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) -{ - this->checkDestinationFolderExists=checkDestinationFolderExists; - if(uiIsInstalled) - ui->checkBoxDestinationFolderExists->setChecked(checkDestinationFolderExists); - listThread->setCheckDestinationFolderExists(checkDestinationFolderExists); -} - -//reset widget -void CopyEngine::resetTempWidget() -{ - uiIsInstalled=false; - tempWidget=NULL; -} - -void CopyEngine::setFolderCollision(int index) -{ - switch(index) - { - case 0: - setComboBoxFolderCollision(FolderExists_NotSet,false); - break; - case 1: - setComboBoxFolderCollision(FolderExists_Merge,false); - break; - case 2: - setComboBoxFolderCollision(FolderExists_Skip,false); - break; - case 3: - setComboBoxFolderCollision(FolderExists_Rename,false); - break; - } -} - -void CopyEngine::setFolderError(int index) -{ - switch(index) - { - case 0: - setComboBoxFolderError(FileError_NotSet,false); - break; - case 1: - setComboBoxFolderError(FileError_Skip,false); - break; - } -} - -//set the translate -void CopyEngine::newLanguageLoaded() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, retranslate the widget options"); - if(tempWidget!=NULL) - { - ui->retranslateUi(tempWidget); - ui->comboBoxFolderError->setItemText(0,tr("Ask")); - ui->comboBoxFolderError->setItemText(1,tr("Skip")); - - ui->comboBoxFolderCollision->setItemText(0,tr("Ask")); - ui->comboBoxFolderCollision->setItemText(1,tr("Merge")); - ui->comboBoxFolderCollision->setItemText(2,tr("Skip")); - ui->comboBoxFolderCollision->setItemText(3,tr("Rename")); - - ui->comboBoxFileError->setItemText(0,tr("Ask")); - ui->comboBoxFileError->setItemText(1,tr("Skip")); - ui->comboBoxFileError->setItemText(2,tr("Put at the end")); - - ui->comboBoxFileCollision->setItemText(0,tr("Ask")); - ui->comboBoxFileCollision->setItemText(1,tr("Skip")); - ui->comboBoxFileCollision->setItemText(2,tr("Overwrite")); - ui->comboBoxFileCollision->setItemText(3,tr("Overwrite if different")); - ui->comboBoxFileCollision->setItemText(4,tr("Overwrite if newer")); - ui->comboBoxFileCollision->setItemText(5,tr("Overwrite if older")); - ui->comboBoxFileCollision->setItemText(6,tr("Rename")); - - ui->transferAlgorithm->setItemText(0,tr("Automatic")); - ui->transferAlgorithm->setItemText(1,tr("Sequential")); - ui->transferAlgorithm->setItemText(2,tr("Parallel")); - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"ui not loaded!"); -} - -void CopyEngine::setComboBoxFolderCollision(FolderExistsAction action,bool changeComboBox) -{ - alwaysDoThisActionForFolderExists=action; - emit signal_setFolderCollision(alwaysDoThisActionForFolderExists); - if(!changeComboBox || !uiIsInstalled) - return; - switch(action) - { - case FolderExists_Merge: - ui->comboBoxFolderCollision->setCurrentIndex(1); - break; - case FolderExists_Skip: - ui->comboBoxFolderCollision->setCurrentIndex(2); - break; - case FolderExists_Rename: - ui->comboBoxFolderCollision->setCurrentIndex(3); - break; - default: - ui->comboBoxFolderCollision->setCurrentIndex(0); - break; - } -} - -void CopyEngine::setComboBoxFolderError(FileErrorAction action,bool changeComboBox) -{ - alwaysDoThisActionForFileError=action; - if(!changeComboBox || !uiIsInstalled) - return; - switch(action) - { - case FileError_Skip: - ui->comboBoxFolderError->setCurrentIndex(1); - break; - default: - ui->comboBoxFolderError->setCurrentIndex(0); - break; - } -} - -void CopyEngine::doChecksum_toggled(bool doChecksum) -{ - listThread->set_doChecksum(doChecksum); -} - -void CopyEngine::checksumOnlyOnError_toggled(bool checksumOnlyOnError) -{ - listThread->set_checksumOnlyOnError(checksumOnlyOnError); -} - -void CopyEngine::checksumIgnoreIfImpossible_toggled(bool checksumIgnoreIfImpossible) -{ - listThread->set_checksumIgnoreIfImpossible(checksumIgnoreIfImpossible); -} - -void CopyEngine::osBuffer_toggled(bool osBuffer) -{ - listThread->set_osBuffer(osBuffer); - updateBufferCheckbox(); -} - -void CopyEngine::osBufferLimited_toggled(bool osBufferLimited) -{ - listThread->set_osBufferLimited(osBufferLimited); - updateBufferCheckbox(); -} - -void CopyEngine::osBufferLimit_editingFinished() -{ - emit send_osBufferLimit(ui->osBufferLimit->value()); -} - -void CopyEngine::showFilterDialog() -{ - if(filters!=NULL) - filters->exec(); -} - -void CopyEngine::sendNewFilters() -{ - if(filters!=NULL) - emit send_setFilters(filters->getInclude(),filters->getExclude()); -} - -void CopyEngine::sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); - this->firstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; - emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); -} - -void CopyEngine::showRenamingRules() -{ - if(renamingRules==NULL) - { - QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded. Unable to access the filters")); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); - return; - } - renamingRules->exec(); -} - -void CopyEngine::get_realBytesTransfered(quint64 realBytesTransfered) -{ - size_for_speed=realBytesTransfered; -} - -void CopyEngine::newActionInProgess(Ultracopier::EngineActionInProgress action) -{ - if(action==Ultracopier::Idle) - { - timerProgression.stop(); - timerActionDone.stop(); - } - else - { - timerProgression.start(); - timerActionDone.start(); - } -} - -void CopyEngine::updatedBlockSize() -{ - if(uiIsInstalled) - { - ui->sequentialBuffer->setMinimum(ui->blockSize->value()); - ui->sequentialBuffer->setSingleStep(ui->blockSize->value()); - ui->sequentialBuffer->setMaximum(ui->blockSize->value()*ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK); - ui->parallelBuffer->setMinimum(ui->blockSize->value()); - ui->parallelBuffer->setSingleStep(ui->blockSize->value()); - ui->parallelBuffer->setMaximum(ui->blockSize->value()*ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK); - } - setParallelBuffer(parallelBuffer); - setSequentialBuffer(sequentialBuffer); -} - -void CopyEngine::setCheckDiskSpace(const bool &checkDiskSpace) -{ - this->checkDiskSpace=checkDiskSpace; - if(uiIsInstalled) - ui->checkDiskSpace->setChecked(checkDiskSpace); - listThread->setCheckDiskSpace(checkDiskSpace); -} - -void CopyEngine::setDefaultDestinationFolder(const std::string &defaultDestinationFolder) -{ - this->defaultDestinationFolder=defaultDestinationFolder; - if(uiIsInstalled) - ui->defaultDestinationFolder->setText(QString::fromStdString(defaultDestinationFolder)); -} - -void CopyEngine::setCopyListOrder(const bool &order) -{ - listThread->setCopyListOrder(order); -} - -void CopyEngine::exportErrorIntoTransferList() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"exportErrorIntoTransferList"); - std::string fileName = QFileDialog::getSaveFileName(interface,QString::fromStdString(facilityEngine->translateText("Save transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); - if(fileName.empty()) - return; - emit signal_exportErrorIntoTransferList(fileName); -} diff --git a/plugins/CopyEngine/Ultracopier/CopyEngine.h b/plugins/CopyEngine/Ultracopier/CopyEngine.h deleted file mode 100644 index e5311d8..0000000 --- a/plugins/CopyEngine/Ultracopier/CopyEngine.h +++ /dev/null @@ -1,382 +0,0 @@ -/** \file copyEngine.h -\brief Define the copy engine -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../../../interface/PluginInterface_CopyEngine.h" -#include "FileErrorDialog.h" -#include "FileExistsDialog.h" -#include "FolderExistsDialog.h" -#include "FileIsSameDialog.h" -#include "ui_copyEngineOptions.h" -#include "Environment.h" -#include "ListThread.h" -#include "Filters.h" -#include "RenamingRules.h" - -#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW -#include "DebugDialog.h" -#include -#endif - -#ifndef COPY_ENGINE_H -#define COPY_ENGINE_H - -namespace Ui { - class copyEngineOptions; -} - -/// \brief the implementation of copy engine plugin, manage directly few stuff, else pass to ListThread class. -class CopyEngine : public PluginInterface_CopyEngine -{ - Q_OBJECT -public: - CopyEngine(FacilityInterface * facilityEngine); - ~CopyEngine(); - void connectTheSignalsSlots(); -private: - ListThread * listThread; - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - DebugDialog debugDialogWindow; - #endif - QWidget * tempWidget; - Ui::copyEngineOptions * ui; - bool uiIsInstalled; - QWidget * interface; - Filters * filters; - RenamingRules * renamingRules; - FacilityInterface * facilityEngine; - uint32_t maxSpeed; - bool doRightTransfer; - bool keepDate; - int blockSize; - int parallelBuffer; - int sequentialBuffer; - int parallelizeIfSmallerThan; - bool followTheStrictOrder; - bool deletePartiallyTransferredFiles; - int inodeThreads; - bool renameTheOriginalDestination; - bool moveTheWholeFolder; - bool autoStart; - #ifdef ULTRACOPIER_PLUGIN_RSYNC - bool rsync; - #endif - bool checkDestinationFolderExists; - FileExistsAction alwaysDoThisActionForFileExists; - FileErrorAction alwaysDoThisActionForFileError; - FileErrorAction alwaysDoThisActionForFolderError; - FolderExistsAction alwaysDoThisActionForFolderExists; - TransferAlgorithm transferAlgorithm; - bool dialogIsOpen; - volatile bool stopIt; - std::string defaultDestinationFolder; - /// \brief error queue - struct errorQueueItem - { - TransferThread * transfer; ///< NULL if send by scan thread - ScanFileOrFolder * scan; ///< NULL if send by transfer thread - bool mkPath; - bool rmPath; - QFileInfo inode; - std::string errorString; - ErrorType errorType; - }; - std::vector errorQueue; - /// \brief already exists queue - struct alreadyExistsQueueItem - { - TransferThread * transfer; ///< NULL if send by scan thread - ScanFileOrFolder * scan; ///< NULL if send by transfer thread - QFileInfo source; - QFileInfo destination; - bool isSame; - }; - std::vector alreadyExistsQueue; - uint64_t size_for_speed;//because direct access to list thread into the main thread can't be do - Ultracopier::CopyMode mode; - bool forcedMode; - - bool doChecksum; - bool checksumIgnoreIfImpossible; - bool checksumOnlyOnError; - bool osBuffer; - bool osBufferLimited; - bool checkDiskSpace; - unsigned int osBufferLimit; - std::vector includeStrings,includeOptions,excludeStrings,excludeOptions; - std::string firstRenamingRule; - std::string otherRenamingRule; - - //send action done timer - QTimer timerActionDone; - //send progression timer - QTimer timerProgression; - - QTimer timerUpdateMount; - int putAtBottom;//to keep how many automatic put at bottom have been used -private slots: - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - void updateTheDebugInfo(const std::vector &newList, const std::vector &newList2, const int &numberOfInodeOperation); - #endif - - /************* External call ********************/ - //dialog message - /// \note Can be call without queue because all call will be serialized - void fileAlreadyExistsSlot(QFileInfo source,QFileInfo destination,bool isSame,TransferThread * thread); - /// \note Can be call without queue because all call will be serialized - void errorOnFileSlot(QFileInfo fileInfo, std::string errorString, TransferThread * thread, const ErrorType &errorType); - /// \note Can be call without queue because all call will be serialized - void folderAlreadyExistsSlot(QFileInfo source,QFileInfo destination,bool isSame,ScanFileOrFolder * thread); - /// \note Can be call without queue because all call will be serialized - void errorOnFolderSlot(QFileInfo fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType); - //mkpath event - void mkPathErrorOnFolderSlot(QFileInfo, std::string, ErrorType errorType); - - //dialog message - /// \note Can be call without queue because all call will be serialized - void fileAlreadyExists(QFileInfo source,QFileInfo destination,bool isSame,TransferThread * thread,bool isCalledByShowOneNewDialog=false); - /// \note Can be call without queue because all call will be serialized - void errorOnFile(QFileInfo fileInfo, std::string errorString, TransferThread * thread, const ErrorType &errorType, bool isCalledByShowOneNewDialog=false); - /// \note Can be call without queue because all call will be serialized - void folderAlreadyExists(QFileInfo source,QFileInfo destination,bool isSame,ScanFileOrFolder * thread,bool isCalledByShowOneNewDialog=false); - /// \note Can be call without queue because all call will be serialized - void errorOnFolder(QFileInfo fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType, bool isCalledByShowOneNewDialog=false); - //mkpath event - void mkPathErrorOnFolder(QFileInfo, std::string, const ErrorType &errorType, bool isCalledByShowOneNewDialog=false); - - //show one new dialog if needed - void showOneNewDialog(); - void sendNewFilters(); - - void doChecksum_toggled(bool); - void checksumOnlyOnError_toggled(bool); - void checksumIgnoreIfImpossible_toggled(bool); - void osBuffer_toggled(bool); - void osBufferLimited_toggled(bool); - void osBufferLimit_editingFinished(); - void showFilterDialog(); - void sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule); - void showRenamingRules(); - void get_realBytesTransfered(quint64 realBytesTransfered); - void newActionInProgess(Ultracopier::EngineActionInProgress); - void updatedBlockSize(); - void updateBufferCheckbox(); - void haveNeedPutAtBottom(bool needPutAtBottom, const QFileInfo &fileInfo, const std::string &errorString, TransferThread *thread, const ErrorType &errorType); - void missingDiskSpace(std::vector list); - void exportErrorIntoTransferList(); -public: - /** \brief to send the options panel - * \return return false if have not the options - * \param tempWidget the widget to generate on it the options */ - bool getOptionsEngine(QWidget * tempWidget); - /** \brief to have interface widget to do modal dialog - * \param interface to have the widget of the interface, useful for modal dialog */ - void setInterfacePointer(QWidget * interface); - //return empty if multiple - /** \brief compare the current sources of the copy, with the passed arguments - * \param sources the sources list to compares with the current sources list - * \return true if have same sources, else false (or empty) */ - bool haveSameSource(const std::vector &sources); - /** \brief compare the current destination of the copy, with the passed arguments - * \param destination the destination to compares with the current destination - * \return true if have same destination, else false (or empty) */ - bool haveSameDestination(const std::string &destination); - //external soft like file browser have send copy/move list to do - /** \brief send copy without destination, ask the destination - * \param sources the sources list to copy - * \return true if the copy have been accepted */ - bool newCopy(const std::vector &sources); - /** \brief send copy with destination - * \param sources the sources list to copy - * \param destination the destination to copy - * \return true if the copy have been accepted */ - bool newCopy(const std::vector &sources,const std::string &destination); - /** \brief send move without destination, ask the destination - * \param sources the sources list to move - * \return true if the move have been accepted */ - bool newMove(const std::vector &sources); - /** \brief send move without destination, ask the destination - * \param sources the sources list to move - * \param destination the destination to move - * \return true if the move have been accepted */ - bool newMove(const std::vector &sources,const std::string &destination); - /** \brief send the new transfer list - * \param file the transfer list */ - void newTransferList(const std::string &file); - - /** \brief to get byte read, use by Ultracopier for the speed calculation - * real size transfered to right speed calculation */ - uint64_t realByteTransfered(); - /** \brief support speed limitation */ - bool supportSpeedLimitation() const; - - /** \brief to set drives detected - * specific to this copy engine */ - - /** \brief to sync the transfer list - * Used when the interface is changed, useful to minimize the memory size */ - void syncTransferList(); - - void set_doChecksum(bool doChecksum); - void set_checksumIgnoreIfImpossible(bool checksumIgnoreIfImpossible); - void set_checksumOnlyOnError(bool checksumOnlyOnError); - void set_osBuffer(bool osBuffer); - void set_osBufferLimited(bool osBufferLimited); - void set_osBufferLimit(unsigned int osBufferLimit); - void set_setFilters(std::vector includeStrings,std::vector includeOptions,std::vector excludeStrings,std::vector excludeOptions); - void setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - void setRsync(const bool rsync); - #endif - void setCheckDiskSpace(const bool &checkDiskSpace); - void setDefaultDestinationFolder(const std::string &defaultDestinationFolder); - void setCopyListOrder(const bool &order); - void defaultDestinationFolderBrowse(); - std::string askDestination(); -public slots: - //user ask ask to add folder (add it with interface ask source/destination) - /** \brief add folder called on the interface - * Used by manual adding */ - bool userAddFolder(const Ultracopier::CopyMode &mode); - /** \brief add file called on the interface - * Used by manual adding */ - bool userAddFile(const Ultracopier::CopyMode &mode); - //action on the copy - /// \brief put the transfer in pause - void pause(); - /// \brief resume the transfer - void resume(); - /** \brief skip one transfer entry - * \param id id of the file to remove */ - void skip(const uint64_t &id); - /// \brief cancel all the transfer - void cancel(); - //edit the transfer list - /** \brief remove the selected item - * \param ids ids is the id list of the selected items */ - void removeItems(const std::vector &ids); - /** \brief move on top of the list the selected item - * \param ids ids is the id list of the selected items */ - void moveItemsOnTop(const std::vector &ids); - /** \brief move up the list the selected item - * \param ids ids is the id list of the selected items */ - void moveItemsUp(const std::vector &ids); - /** \brief move down the list the selected item - * \param ids ids is the id list of the selected items */ - void moveItemsDown(const std::vector &ids); - /** \brief move on bottom of the list the selected item - * \param ids ids is the id list of the selected items */ - void moveItemsOnBottom(const std::vector &ids); - - /** \brief give the forced mode, to export/import transfer list */ - void forceMode(const Ultracopier::CopyMode &mode); - /// \brief export the transfer list into a file - void exportTransferList(); - /// \brief import the transfer list into a file - void importTransferList(); - - /** \brief to set the speed limitation - * -1 if not able, 0 if disabled */ - bool setSpeedLimitation(const int64_t &speedLimitation); - - // specific to this copy engine - - /// \brief set if the rights shoul be keep - void setRightTransfer(const bool doRightTransfer); - /// \brief set keep date - void setKeepDate(const bool keepDate); - /// \brief set block size in KB - void setBlockSize(const int blockSize); - - void setParallelBuffer(int parallelBuffer); - void setSequentialBuffer(int sequentialBuffer); - void setParallelizeIfSmallerThan(int parallelizeIfSmallerThan); - void setMoveTheWholeFolder(const bool &moveTheWholeFolder); - void setFollowTheStrictOrder(const bool &followTheStrictOrder); - void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); - void setInodeThreads(const int &inodeThreads); - void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); - void inodeThreadsFinished(); - - /// \brief set auto start - void setAutoStart(const bool autoStart); - /// \brief set if need check if the destination folder exists - void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); - /// \brief reset widget - void resetTempWidget(); - //autoconnect - void setFolderCollision(int index); - void setFolderError(int index); - void setFileCollision(int index); - void setFileError(int index); - void setTransferAlgorithm(int index); - /// \brief need retranslate the insterface - void newLanguageLoaded(); -private slots: - void setComboBoxFolderCollision(FolderExistsAction action,bool changeComboBox=true); - void setComboBoxFolderError(FileErrorAction action,bool changeComboBox=true); - void warningTransferList(const std::string &warning); - void errorTransferList(const std::string &error); -signals: - //action on the copy - void signal_pause() const; - void signal_resume() const; - void signal_skip(const uint64_t &id) const; - - //edit the transfer list - void signal_removeItems(const std::vector &ids) const; - void signal_moveItemsOnTop(const std::vector &ids) const; - void signal_moveItemsUp(const std::vector &ids) const; - void signal_moveItemsDown(const std::vector &ids) const; - void signal_moveItemsOnBottom(const std::vector &ids) const; - - void signal_forceMode(const Ultracopier::CopyMode &mode) const; - void signal_exportTransferList(const std::string &fileName) const; - void signal_importTransferList(const std::string &fileName) const; - void signal_exportErrorIntoTransferList(const std::string &fileName) const; - - //action - void signal_setTransferAlgorithm(TransferAlgorithm transferAlgorithm) const; - void signal_setCollisionAction(FileExistsAction alwaysDoThisActionForFileExists) const; - void signal_setComboBoxFolderCollision(FolderExistsAction action) const; - void signal_setFolderCollision(FolderExistsAction action) const; - - //internal cancel - void tryCancel() const; - void getNeedPutAtBottom(const QFileInfo &fileInfo,const std::string &errorString,TransferThread * thread,const ErrorType &errorType) const; - - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; - #endif - - //other signals - void queryOneNewDialog() const; - - void send_speedLimitation(const uint64_t &speedLimitation) const; - void send_blockSize(const int &blockSize) const; - void send_osBufferLimit(const unsigned int &osBufferLimit) const; - void send_setFilters(const std::vector &include,const std::vector &exclude) const; - void send_sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) const; - void send_parallelBuffer(const int ¶llelBuffer) const; - void send_sequentialBuffer(const int &sequentialBuffer) const; - void send_parallelizeIfSmallerThan(const int ¶llelizeIfSmallerThan) const; - void send_followTheStrictOrder(const bool &followTheStrictOrder) const; - void send_deletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) const; - void send_setInodeThreads(const int &inodeThreads) const; - void send_moveTheWholeFolder(const bool &moveTheWholeFolder) const; - void send_setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) const; -}; - -#endif // COPY_ENGINE_H diff --git a/plugins/CopyEngine/Ultracopier/CopyEngine.pro b/plugins/CopyEngine/Ultracopier/CopyEngine.pro deleted file mode 100644 index 112e999..0000000 --- a/plugins/CopyEngine/Ultracopier/CopyEngine.pro +++ /dev/null @@ -1,106 +0,0 @@ -CONFIG += c++11 -QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" -mac:QMAKE_CXXFLAGS+="-stdlib=libc++" - -QT += widgets xml -DEFINES += UNICODE _UNICODE -TEMPLATE = lib -CONFIG += plugin -win32 { - LIBS += -ladvapi32 -} - -HEADERS = \ - $$PWD/StructEnumDefinition.h \ - $$PWD/StructEnumDefinition_CopyEngine.h \ - $$PWD/DebugEngineMacro.h \ - $$PWD/Variable.h \ - $$PWD/TransferThread.h \ - $$PWD/ReadThread.h \ - $$PWD/WriteThread.h \ - $$PWD/MkPath.h \ - $$PWD/AvancedQFile.h \ - $$PWD/ListThread.h \ - $$PWD/../../../interface/PluginInterface_CopyEngine.h \ - $$PWD/../../../interface/OptionInterface.h \ - $$PWD/../../../interface/FacilityInterface.h \ - $$PWD/../../../cpp11addition.h \ - $$PWD/Filters.h \ - $$PWD/FilterRules.h \ - $$PWD/RenamingRules.h \ - $$PWD/DriveManagement.h \ - $$PWD/CopyEngine.h \ - $$PWD/DebugDialog.h \ - $$PWD/CopyEngineFactory.h \ - $$PWD/FileErrorDialog.h \ - $$PWD/FileExistsDialog.h \ - $$PWD/FileIsSameDialog.h \ - $$PWD/FolderExistsDialog.h \ - $$PWD/ScanFileOrFolder.h \ - $$PWD/DiskSpace.h -SOURCES = \ - $$PWD/TransferThread.cpp \ - $$PWD/ReadThread.cpp \ - $$PWD/WriteThread.cpp \ - $$PWD/MkPath.cpp \ - $$PWD/AvancedQFile.cpp \ - $$PWD/ListThread.cpp \ - $$PWD/../../../cpp11addition.cpp \ - $$PWD/../../../cpp11additionstringtointcpp.cpp \ - $$PWD/Filters.cpp \ - $$PWD/FilterRules.cpp \ - $$PWD/RenamingRules.cpp \ - $$PWD/ListThread_InodeAction.cpp \ - $$PWD/DriveManagement.cpp \ - $$PWD/CopyEngine-collision-and-error.cpp \ - $$PWD/CopyEngine.cpp \ - $$PWD/DebugDialog.cpp \ - $$PWD/CopyEngineFactory.cpp \ - $$PWD/FileErrorDialog.cpp \ - $$PWD/FileExistsDialog.cpp \ - $$PWD/FileIsSameDialog.cpp \ - $$PWD/FolderExistsDialog.cpp \ - $$PWD/ScanFileOrFolder.cpp \ - $$PWD/DiskSpace.cpp -TARGET = $$qtLibraryTarget(copyEngine) -TRANSLATIONS += \ - $$PWD/Languages/ar/translation.ts \ - $$PWD/Languages/de/translation.ts \ - $$PWD/Languages/el/translation.ts \ - $$PWD/Languages/en/translation.ts \ - $$PWD/Languages/es/translation.ts \ - $$PWD/Languages/fr/translation.ts \ - $$PWD/Languages/hi/translation.ts \ - $$PWD/Languages/hu/translation.ts \ - $$PWD/Languages/id/translation.ts \ - $$PWD/Languages/it/translation.ts \ - $$PWD/Languages/ja/translation.ts \ - $$PWD/Languages/ko/translation.ts \ - $$PWD/Languages/nl/translation.ts \ - $$PWD/Languages/no/translation.ts \ - $$PWD/Languages/pl/translation.ts \ - $$PWD/Languages/pt/translation.ts \ - $$PWD/Languages/ru/translation.ts \ - $$PWD/Languages/th/translation.ts \ - $$PWD/Languages/tr/translation.ts \ - $$PWD/Languages/zh/translation.ts - -FORMS += \ - $$PWD/fileErrorDialog.ui \ - $$PWD/fileExistsDialog.ui \ - $$PWD/fileIsSameDialog.ui \ - $$PWD/debugDialog.ui \ - $$PWD/folderExistsDialog.ui \ - $$PWD/Filters.ui \ - $$PWD/FilterRules.ui \ - $$PWD/RenamingRules.ui \ - $$PWD/copyEngineOptions.ui \ - $$PWD/DiskSpace.ui - -OTHER_FILES += \ - $$PWD/informations.xml - -!CONFIG(static) { -RESOURCES += \ - $$PWD/copyEngineResources.qrc -} diff --git a/plugins/CopyEngine/Ultracopier/CopyEngineFactory.cpp b/plugins/CopyEngine/Ultracopier/CopyEngineFactory.cpp deleted file mode 100644 index ce86c94..0000000 --- a/plugins/CopyEngine/Ultracopier/CopyEngineFactory.cpp +++ /dev/null @@ -1,709 +0,0 @@ -/** \file factory.cpp -\brief Define the factory to create new instance -\author alpha_one_x86 */ - -#include -#include -#include -#include -#include - -#include "../../../cpp11addition.h" -#include "CopyEngineFactory.h" - -// The cmath header from MSVC does not contain round() -#if (defined(_WIN64) || defined(_WIN32)) && defined(_MSC_VER) -inline double round(double d) { - return floor( d + 0.5 ); -} -#endif - -CopyEngineFactory::CopyEngineFactory() : - ui(new Ui::copyEngineOptions()) -{ - qRegisterMetaType("FolderExistsAction"); - qRegisterMetaType("FileExistsAction"); - qRegisterMetaType >("QList"); - qRegisterMetaType("TransferStat"); - qRegisterMetaType >("QList"); - qRegisterMetaType("TransferAlgorithm"); - qRegisterMetaType("ActionType"); - qRegisterMetaType("ErrorType"); - qRegisterMetaType("Diskspace"); - qRegisterMetaType >("QList"); - qRegisterMetaType("QFileInfo"); - qRegisterMetaType("Ultracopier::CopyMode"); - qRegisterMetaType >("std::vector"); - - tempWidget=new QWidget(); - ui->setupUi(tempWidget); - ui->toolBox->setCurrentIndex(0); - ui->blockSize->setMaximum(ULTRACOPIER_PLUGIN_MAX_BLOCK_SIZE); - errorFound=false; - optionsEngine=NULL; - filters=new Filters(tempWidget); - renamingRules=new RenamingRules(tempWidget); - - connect(ui->doRightTransfer, &QCheckBox::toggled, this,&CopyEngineFactory::setDoRightTransfer); - connect(ui->keepDate, &QCheckBox::toggled, this,&CopyEngineFactory::setKeepDate); - connect(ui->blockSize, static_cast(&QSpinBox::valueChanged), this,&CopyEngineFactory::setBlockSize); - connect(ui->sequentialBuffer, static_cast(&QSpinBox::valueChanged), this,&CopyEngineFactory::setSequentialBuffer); - connect(ui->parallelBuffer, static_cast(&QSpinBox::valueChanged), this,&CopyEngineFactory::setParallelBuffer); - connect(ui->parallelizeIfSmallerThan, static_cast(&QSpinBox::valueChanged), this,&CopyEngineFactory::setParallelizeIfSmallerThan); - connect(ui->inodeThreads, static_cast(&QSpinBox::valueChanged), this,&CopyEngineFactory::on_inodeThreads_editingFinished); - connect(ui->autoStart, &QCheckBox::toggled, this,&CopyEngineFactory::setAutoStart); - connect(ui->doChecksum, &QCheckBox::toggled, this,&CopyEngineFactory::doChecksum_toggled); - connect(ui->comboBoxFolderError, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFolderError); - connect(ui->comboBoxFolderCollision, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFolderCollision); - connect(ui->comboBoxFileError, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFileError); - connect(ui->comboBoxFileCollision, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFileCollision); - connect(ui->transferAlgorithm, static_cast(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setTransferAlgorithm); - connect(ui->checkBoxDestinationFolderExists, &QCheckBox::toggled, this,&CopyEngineFactory::setCheckDestinationFolder); - connect(ui->checksumIgnoreIfImpossible, &QCheckBox::toggled, this,&CopyEngineFactory::checksumIgnoreIfImpossible_toggled); - connect(ui->checksumOnlyOnError, &QCheckBox::toggled, this,&CopyEngineFactory::checksumOnlyOnError_toggled); - connect(ui->osBuffer, &QCheckBox::toggled, this,&CopyEngineFactory::osBuffer_toggled); - connect(ui->osBufferLimited, &QCheckBox::toggled, this,&CopyEngineFactory::osBufferLimited_toggled); - connect(ui->osBufferLimit, &QSpinBox::editingFinished, this,&CopyEngineFactory::osBufferLimit_editingFinished); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - connect(ui->rsync, &QCheckBox::toggled, this,&CopyEngineFactory::setRsync); - #endif - connect(ui->inodeThreads, &QSpinBox::editingFinished, this,&CopyEngineFactory::on_inodeThreads_editingFinished); - connect(ui->osBufferLimited, &QAbstractButton::toggled, this,&CopyEngineFactory::updateBufferCheckbox); - connect(ui->osBuffer, &QAbstractButton::toggled, this,&CopyEngineFactory::updateBufferCheckbox); - connect(ui->moveTheWholeFolder, &QCheckBox::toggled, this,&CopyEngineFactory::moveTheWholeFolder); - connect(ui->followTheStrictOrder, &QCheckBox::toggled, this,&CopyEngineFactory::followTheStrictOrder); - connect(ui->deletePartiallyTransferredFiles,&QCheckBox::toggled, this,&CopyEngineFactory::deletePartiallyTransferredFiles); - connect(ui->renameTheOriginalDestination,&QCheckBox::toggled, this,&CopyEngineFactory::renameTheOriginalDestination); - connect(ui->checkDiskSpace, &QCheckBox::toggled, this,&CopyEngineFactory::checkDiskSpace); - connect(ui->defaultDestinationFolderBrowse,&QPushButton::clicked, this,&CopyEngineFactory::defaultDestinationFolderBrowse); - connect(ui->defaultDestinationFolder,&QLineEdit::editingFinished, this,&CopyEngineFactory::defaultDestinationFolder); - connect(ui->copyListOrder, &QCheckBox::toggled, this,&CopyEngineFactory::copyListOrder); - - connect(filters,&Filters::sendNewFilters,this,&CopyEngineFactory::sendNewFilters); - connect(ui->filters,&QPushButton::clicked,this,&CopyEngineFactory::showFilterDialog); - connect(renamingRules,&RenamingRules::sendNewRenamingRules,this,&CopyEngineFactory::sendNewRenamingRules); - connect(ui->renamingRules,&QPushButton::clicked,this,&CopyEngineFactory::showRenamingRules); - - lunchInitFunction.setInterval(0); - lunchInitFunction.setSingleShot(true); - connect(&lunchInitFunction,&QTimer::timeout,this,&CopyEngineFactory::init,Qt::QueuedConnection); - lunchInitFunction.start(); -} - -CopyEngineFactory::~CopyEngineFactory() -{ - delete renamingRules; - delete filters; - delete ui; -} - -void CopyEngineFactory::init() -{ -} - -PluginInterface_CopyEngine * CopyEngineFactory::getInstance() -{ - CopyEngine *realObject=new CopyEngine(facilityEngine); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - connect(realObject,&CopyEngine::debugInformation,this,&CopyEngineFactory::debugInformation); - #endif - realObject->connectTheSignalsSlots(); - PluginInterface_CopyEngine * newTransferEngine=realObject; - connect(this,&CopyEngineFactory::reloadLanguage,realObject,&CopyEngine::newLanguageLoaded); - realObject->setRightTransfer(ui->doRightTransfer->isChecked()); - realObject->setKeepDate(ui->keepDate->isChecked()); - realObject->setBlockSize(ui->blockSize->value()); - realObject->setAutoStart(ui->autoStart->isChecked()); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - realObject->setRsync(ui->rsync->isChecked()); - #endif - realObject->setFolderCollision(ui->comboBoxFolderCollision->currentIndex()); - realObject->setFolderError(ui->comboBoxFolderError->currentIndex()); - realObject->setFileCollision(ui->comboBoxFileCollision->currentIndex()); - realObject->setFileError(ui->comboBoxFileError->currentIndex()); - realObject->setTransferAlgorithm(ui->transferAlgorithm->currentIndex()); - realObject->setCheckDestinationFolderExists(ui->checkBoxDestinationFolderExists->isChecked()); - realObject->set_doChecksum(ui->doChecksum->isChecked()); - realObject->set_checksumIgnoreIfImpossible(ui->checksumIgnoreIfImpossible->isChecked()); - realObject->set_checksumOnlyOnError(ui->checksumOnlyOnError->isChecked()); - realObject->set_osBuffer(ui->osBuffer->isChecked()); - realObject->set_osBufferLimited(ui->osBufferLimited->isChecked()); - realObject->set_osBufferLimit(ui->osBufferLimit->value()); - realObject->set_setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); - realObject->setRenamingRules(firstRenamingRule,otherRenamingRule); - realObject->setSequentialBuffer(ui->sequentialBuffer->value()); - realObject->setParallelBuffer(ui->parallelBuffer->value()); - realObject->setParallelizeIfSmallerThan(ui->parallelizeIfSmallerThan->value()); - realObject->setMoveTheWholeFolder(ui->moveTheWholeFolder->isChecked()); - realObject->setFollowTheStrictOrder(ui->followTheStrictOrder->isChecked()); - realObject->setDeletePartiallyTransferredFiles(ui->deletePartiallyTransferredFiles->isChecked()); - realObject->setInodeThreads(ui->inodeThreads->value()); - realObject->setRenameTheOriginalDestination(ui->renameTheOriginalDestination->isChecked()); - realObject->setCheckDiskSpace(ui->checkDiskSpace->isChecked()); - realObject->setDefaultDestinationFolder(ui->defaultDestinationFolder->text().toStdString()); - realObject->setCopyListOrder(ui->copyListOrder->isChecked()); - return newTransferEngine; -} - -void CopyEngineFactory::setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath, - FacilityInterface * facilityInterface,const bool &portableVersion) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath:"+pluginPath); - this->facilityEngine=facilityInterface; - Q_UNUSED(portableVersion); - #ifndef ULTRACOPIER_PLUGIN_DEBUG - Q_UNUSED(writePath); - Q_UNUSED(pluginPath); - #endif - #if ! defined (Q_CC_GNU) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("Unable to change date time of files, only gcc is supported")); - #endif - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,COMPILERINFO); - #if defined (ULTRACOPIER_PLUGIN_CHECKLISTTYPE) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"CHECK LIST TYPE set"); - #else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"CHECK LIST TYPE not set"); - #endif - if(options!=NULL) - { - //load the options - std::vector > KeysList; - KeysList.push_back(std::pair("doRightTransfer","true")); - #ifndef Q_OS_LINUX - KeysList.push_back(std::pair("keepDate","false")); - #else - KeysList.push_back(std::pair("keepDate","true")); - #endif - KeysList.push_back(std::pair("blockSize",std::to_string(ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE))); - uint32_t sequentialBuffer=ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*ULTRACOPIER_PLUGIN_DEFAULT_SEQUENTIAL_NUMBER_OF_BLOCK; - uint32_t parallelBuffer=ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; - //to prevent swap and other bad effect, only under windows and unix for now - #if defined(Q_OS_WIN32) or (defined(Q_OS_LINUX) and defined(_SC_PHYS_PAGES)) - size_t max_memory=getTotalSystemMemory()/1024; - if(max_memory>0) - { - if(max_memory>2147483648) - max_memory=2147483648; - if(sequentialBuffer>(max_memory/10)) - sequentialBuffer=max_memory/10; - if(parallelBuffer>(max_memory/100)) - parallelBuffer=max_memory/100; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("detected memory: %1MB").arg(max_memory/1024).toStdString()); - #endif - KeysList.push_back(std::pair("sequentialBuffer",std::to_string(sequentialBuffer))); - KeysList.push_back(std::pair("parallelBuffer",std::to_string(parallelBuffer))); - KeysList.push_back(std::pair("parallelizeIfSmallerThan",std::to_string(128)));//128KB, better for modern hardware: Multiple queue en linux, SSD, ... - KeysList.push_back(std::pair("autoStart","true")); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - KeysList.push_back(std::pair("rsync","true")); - #endif - KeysList.push_back(std::pair("folderError",std::to_string(0))); - KeysList.push_back(std::pair("folderCollision",std::to_string(0))); - KeysList.push_back(std::pair("fileError",std::to_string(2))); - KeysList.push_back(std::pair("fileCollision",std::to_string(0))); - KeysList.push_back(std::pair("transferAlgorithm",std::to_string(0))); - KeysList.push_back(std::pair("checkDestinationFolder","true")); - KeysList.push_back(std::pair("includeStrings","")); - KeysList.push_back(std::pair("includeOptions","")); - KeysList.push_back(std::pair("excludeStrings","")); - KeysList.push_back(std::pair("excludeOptions","")); - KeysList.push_back(std::pair("doChecksum","false")); - KeysList.push_back(std::pair("checksumIgnoreIfImpossible","true")); - KeysList.push_back(std::pair("checksumOnlyOnError","true")); - KeysList.push_back(std::pair("osBuffer","false")); - KeysList.push_back(std::pair("firstRenamingRule","")); - KeysList.push_back(std::pair("otherRenamingRule","")); - KeysList.push_back(std::pair("osBufferLimited","false")); - KeysList.push_back(std::pair("osBufferLimit",std::to_string(512))); - KeysList.push_back(std::pair("deletePartiallyTransferredFiles","true")); - KeysList.push_back(std::pair("moveTheWholeFolder","true")); - KeysList.push_back(std::pair("followTheStrictOrder","false")); - KeysList.push_back(std::pair("renameTheOriginalDestination","false")); - KeysList.push_back(std::pair("checkDiskSpace","true")); - KeysList.push_back(std::pair("defaultDestinationFolder","")); - KeysList.push_back(std::pair("inodeThreads",std::to_string(1))); - KeysList.push_back(std::pair("copyListOrder","false")); - options->addOptionGroup(KeysList); - - optionsEngine=options; - resetOptions(); - - updateBufferCheckbox(); - - updatedBlockSize(); - } -} - -std::vector CopyEngineFactory::supportedProtocolsForTheSource() const -{ - std::vector l; - l.push_back("file"); - return l; -} - -std::vector CopyEngineFactory::supportedProtocolsForTheDestination() const -{ - std::vector l; - l.push_back("file"); - return l; -} - -Ultracopier::CopyType CopyEngineFactory::getCopyType() -{ - return Ultracopier::FileAndFolder; -} - -Ultracopier::TransferListOperation CopyEngineFactory::getTransferListOperation() -{ - return Ultracopier::TransferListOperation_ImportExport; -} - -bool CopyEngineFactory::canDoOnlyCopy() const -{ - return false; -} - -void CopyEngineFactory::resetOptions() -{ - auto options=optionsEngine; - optionsEngine=NULL; - #if ! defined (Q_CC_GNU) - ui->keepDate->setEnabled(false); - ui->keepDate->setToolTip(QStringLiteral("Not supported with this compiler")); - #endif - ui->doRightTransfer->setChecked(stringtobool(options->getOptionValue("doRightTransfer"))); - ui->keepDate->setChecked(stringtobool(options->getOptionValue("keepDate"))); - ui->blockSize->setValue(stringtouint32(options->getOptionValue("blockSize")));//keep before sequentialBuffer and parallelBuffer - ui->autoStart->setChecked(stringtobool(options->getOptionValue("autoStart"))); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - ui->rsync->setChecked(stringtobool(options->getOptionValue("rsync"))); - #else - ui->label_rsync->setVisible(false); - ui->rsync->setVisible(false); - #endif - ui->comboBoxFolderError->setCurrentIndex(stringtouint32(options->getOptionValue("folderError"))); - ui->comboBoxFolderCollision->setCurrentIndex(stringtouint32(options->getOptionValue("folderCollision"))); - ui->comboBoxFileError->setCurrentIndex(stringtouint32(options->getOptionValue("fileError"))); - ui->comboBoxFileCollision->setCurrentIndex(stringtouint32(options->getOptionValue("fileCollision"))); - ui->transferAlgorithm->setCurrentIndex(stringtouint32(options->getOptionValue("transferAlgorithm"))); - ui->checkBoxDestinationFolderExists->setChecked(stringtobool(options->getOptionValue("checkDestinationFolder"))); - ui->parallelizeIfSmallerThan->setValue(stringtouint32(options->getOptionValue("parallelizeIfSmallerThan"))); - ui->sequentialBuffer->setValue(stringtouint32(options->getOptionValue("sequentialBuffer"))); - ui->parallelBuffer->setValue(stringtouint32(options->getOptionValue("parallelBuffer"))); - ui->sequentialBuffer->setSingleStep(ui->blockSize->value()); - ui->parallelBuffer->setSingleStep(ui->blockSize->value()); - ui->deletePartiallyTransferredFiles->setChecked(stringtobool(options->getOptionValue("deletePartiallyTransferredFiles"))); - ui->moveTheWholeFolder->setChecked(stringtobool(options->getOptionValue("moveTheWholeFolder"))); - ui->followTheStrictOrder->setChecked(stringtobool(options->getOptionValue("followTheStrictOrder"))); - ui->inodeThreads->setValue(stringtouint32(options->getOptionValue("inodeThreads"))); - ui->renameTheOriginalDestination->setChecked(stringtobool(options->getOptionValue("renameTheOriginalDestination"))); - ui->checkDiskSpace->setChecked(stringtobool(options->getOptionValue("checkDiskSpace"))); - ui->defaultDestinationFolder->setText(QString::fromStdString(options->getOptionValue("defaultDestinationFolder"))); - - ui->doChecksum->setChecked(stringtobool(options->getOptionValue("doChecksum"))); - ui->checksumIgnoreIfImpossible->setChecked(stringtobool(options->getOptionValue("checksumIgnoreIfImpossible"))); - ui->checksumOnlyOnError->setChecked(stringtobool(options->getOptionValue("checksumOnlyOnError"))); - - ui->osBuffer->setChecked(stringtobool(options->getOptionValue("osBuffer"))); - ui->osBufferLimited->setChecked(stringtobool(options->getOptionValue("osBufferLimited"))); - ui->osBufferLimit->setValue(stringtouint32(options->getOptionValue("osBufferLimit"))); - //ui->autoStart->setChecked(options->getOptionValue("autoStart").toBool());//moved from options(), wrong previous place - includeStrings=stringtostringlist(options->getOptionValue("includeStrings")); - includeOptions=stringtostringlist(options->getOptionValue("includeOptions")); - excludeStrings=stringtostringlist(options->getOptionValue("excludeStrings")); - excludeOptions=stringtostringlist(options->getOptionValue("excludeOptions")); - filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); - firstRenamingRule=options->getOptionValue("firstRenamingRule"); - otherRenamingRule=options->getOptionValue("otherRenamingRule"); - renamingRules->setRenamingRules(firstRenamingRule,otherRenamingRule); - - ui->checksumOnlyOnError->setEnabled(ui->doChecksum->isChecked()); - ui->checksumIgnoreIfImpossible->setEnabled(ui->doChecksum->isChecked()); - ui->copyListOrder->setChecked(stringtobool(options->getOptionValue("copyListOrder"))); - - optionsEngine=options; -} - -QWidget * CopyEngineFactory::options() -{ - return tempWidget; -} - -void CopyEngineFactory::setDoRightTransfer(bool doRightTransfer) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("doRightTransfer",booltostring(doRightTransfer)); -} - -void CopyEngineFactory::setKeepDate(bool keepDate) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("keepDate",booltostring(keepDate)); -} - -void CopyEngineFactory::setBlockSize(int blockSize) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("blockSize",std::to_string(blockSize)); - updatedBlockSize(); -} - -void CopyEngineFactory::setParallelBuffer(int parallelBuffer) -{ - if(optionsEngine!=NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - parallelBuffer=round((float)parallelBuffer/(float)ui->blockSize->value())*ui->blockSize->value(); - ui->parallelBuffer->setValue(parallelBuffer); - optionsEngine->setOptionValue("parallelBuffer",std::to_string(parallelBuffer)); - } -} - -void CopyEngineFactory::setSequentialBuffer(int sequentialBuffer) -{ - if(optionsEngine!=NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - sequentialBuffer=round((float)sequentialBuffer/(float)ui->blockSize->value())*ui->blockSize->value(); - ui->sequentialBuffer->setValue(sequentialBuffer); - optionsEngine->setOptionValue("sequentialBuffer",std::to_string(sequentialBuffer)); - } -} - -void CopyEngineFactory::setParallelizeIfSmallerThan(int parallelizeIfSmallerThan) -{ - if(optionsEngine!=NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - optionsEngine->setOptionValue("parallelizeIfSmallerThan",std::to_string(parallelizeIfSmallerThan)); - } -} - -void CopyEngineFactory::setAutoStart(bool autoStart) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("autoStart",booltostring(autoStart)); -} - -void CopyEngineFactory::setFolderCollision(int index) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("folderCollision",std::to_string(index)); -} - -void CopyEngineFactory::setFolderError(int index) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("folderError",std::to_string(index)); -} - -void CopyEngineFactory::setTransferAlgorithm(int index) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("transferAlgorithm",std::to_string(index)); -} - -void CopyEngineFactory::setCheckDestinationFolder() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("checkDestinationFolder",booltostring(ui->checkBoxDestinationFolderExists->isChecked())); -} - -void CopyEngineFactory::newLanguageLoaded() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, retranslate the widget options"); - OptionInterface * optionsEngine=this->optionsEngine; - this->optionsEngine=NULL; - ui->retranslateUi(tempWidget); - ui->comboBoxFolderError->setItemText(0,tr("Ask")); - ui->comboBoxFolderError->setItemText(1,tr("Skip")); - - ui->comboBoxFolderCollision->setItemText(0,tr("Ask")); - ui->comboBoxFolderCollision->setItemText(1,tr("Merge")); - ui->comboBoxFolderCollision->setItemText(2,tr("Skip")); - ui->comboBoxFolderCollision->setItemText(3,tr("Rename")); - - ui->comboBoxFileError->setItemText(0,tr("Ask")); - ui->comboBoxFileError->setItemText(1,tr("Skip")); - ui->comboBoxFileError->setItemText(2,tr("Put at the end")); - - ui->comboBoxFileCollision->setItemText(0,tr("Ask")); - ui->comboBoxFileCollision->setItemText(1,tr("Skip")); - ui->comboBoxFileCollision->setItemText(2,tr("Overwrite")); - ui->comboBoxFileCollision->setItemText(3,tr("Overwrite if different")); - ui->comboBoxFileCollision->setItemText(4,tr("Overwrite if newer")); - ui->comboBoxFileCollision->setItemText(5,tr("Overwrite if older")); - ui->comboBoxFileCollision->setItemText(6,tr("Rename")); - - ui->transferAlgorithm->setItemText(0,tr("Automatic")); - ui->transferAlgorithm->setItemText(1,tr("Sequential")); - ui->transferAlgorithm->setItemText(2,tr("Parallel")); - if(optionsEngine!=NULL) - { - filters->newLanguageLoaded(); - renamingRules->newLanguageLoaded(); - } - emit reloadLanguage(); - this->optionsEngine=optionsEngine; -} - -void CopyEngineFactory::doChecksum_toggled(bool doChecksum) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("doChecksum",booltostring(doChecksum)); -} - -void CopyEngineFactory::checksumOnlyOnError_toggled(bool checksumOnlyOnError) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("checksumOnlyOnError",booltostring(checksumOnlyOnError)); -} - -void CopyEngineFactory::osBuffer_toggled(bool osBuffer) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("osBuffer",booltostring(osBuffer)); - ui->osBufferLimit->setEnabled(ui->osBuffer->isChecked() && ui->osBufferLimited->isChecked()); -} - -void CopyEngineFactory::osBufferLimited_toggled(bool osBufferLimited) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("osBufferLimited",booltostring(osBufferLimited)); - ui->osBufferLimit->setEnabled(ui->osBuffer->isChecked() && ui->osBufferLimited->isChecked()); -} - -void CopyEngineFactory::osBufferLimit_editingFinished() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the spinbox have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("osBufferLimit",std::to_string(ui->osBufferLimit->value())); -} - -void CopyEngineFactory::showFilterDialog() -{ - if(optionsEngine==NULL) - { - QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded. Unable to access the filters")); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); - return; - } - filters->exec(); -} - -void CopyEngineFactory::sendNewFilters(const std::vector &includeStrings,const std::vector &includeOptions,const std::vector &excludeStrings,const std::vector &excludeOptions) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); - this->includeStrings=includeStrings; - this->includeOptions=includeOptions; - this->excludeStrings=excludeStrings; - this->excludeOptions=excludeOptions; - if(optionsEngine!=NULL) - { - optionsEngine->setOptionValue("includeStrings",stringlisttostring(includeStrings)); - optionsEngine->setOptionValue("includeOptions",stringlisttostring(includeOptions)); - optionsEngine->setOptionValue("excludeStrings",stringlisttostring(excludeStrings)); - optionsEngine->setOptionValue("excludeOptions",stringlisttostring(excludeOptions)); - } -} - -void CopyEngineFactory::sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); - this->firstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; - if(optionsEngine!=NULL) - { - optionsEngine->setOptionValue("firstRenamingRule",firstRenamingRule); - optionsEngine->setOptionValue("otherRenamingRule",otherRenamingRule); - } -} - -void CopyEngineFactory::showRenamingRules() -{ - if(optionsEngine==NULL) - { - QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded, can't access to the filters")); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); - return; - } - renamingRules->exec(); -} - -void CopyEngineFactory::updateBufferCheckbox() -{ - ui->osBufferLimited->setEnabled(ui->osBuffer->isChecked()); - ui->osBufferLimit->setEnabled(ui->osBuffer->isChecked() && ui->osBufferLimited->isChecked()); -} - -void CopyEngineFactory::checksumIgnoreIfImpossible_toggled(bool checksumIgnoreIfImpossible) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("checksumIgnoreIfImpossible",booltostring(checksumIgnoreIfImpossible)); -} - -void CopyEngineFactory::setFileCollision(int index) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); - if(optionsEngine==NULL) - return; - switch(index) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - optionsEngine->setOptionValue("fileCollision",std::to_string(index)); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - break; - } -} - -void CopyEngineFactory::setFileError(int index) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); - if(optionsEngine==NULL) - return; - switch(index) - { - case 0: - case 1: - case 2: - optionsEngine->setOptionValue("fileError",std::to_string(index)); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); - break; - } -} - -void CopyEngineFactory::updatedBlockSize() -{ - ui->sequentialBuffer->setMinimum(ui->blockSize->value()); - ui->sequentialBuffer->setSingleStep(ui->blockSize->value()); - ui->sequentialBuffer->setMaximum(ui->blockSize->value()*ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK); - ui->parallelBuffer->setMinimum(ui->blockSize->value()); - ui->parallelBuffer->setSingleStep(ui->blockSize->value()); - ui->parallelBuffer->setMaximum(ui->blockSize->value()*ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK); - setParallelBuffer(ui->parallelBuffer->value()); - setSequentialBuffer(ui->sequentialBuffer->value()); -} - -void CopyEngineFactory::deletePartiallyTransferredFiles(bool checked) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("deletePartiallyTransferredFiles",booltostring(checked)); -} - -void CopyEngineFactory::renameTheOriginalDestination(bool checked) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("renameTheOriginalDestination",booltostring(checked)); -} - -void CopyEngineFactory::checkDiskSpace(bool checked) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("checkDiskSpace",booltostring(checked)); -} - -void CopyEngineFactory::defaultDestinationFolderBrowse() -{ - QString destination = QFileDialog::getExistingDirectory(ui->defaultDestinationFolder, - QString::fromStdString(facilityEngine->translateText("Select destination directory")), - "",QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); - if(destination.isEmpty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - ui->defaultDestinationFolder->setText(destination); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("defaultDestinationFolder",destination.toStdString()); -} - -void CopyEngineFactory::defaultDestinationFolder() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("defaultDestinationFolder",ui->defaultDestinationFolder->text().toStdString()); -} - -void CopyEngineFactory::followTheStrictOrder(bool checked) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("followTheStrictOrder",booltostring(checked)); -} - -void CopyEngineFactory::moveTheWholeFolder(bool checked) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("moveTheWholeFolder",booltostring(checked)); -} - -void CopyEngineFactory::on_inodeThreads_editingFinished() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the spinbox have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("inodeThreads",std::to_string(ui->inodeThreads->value())); -} - -#ifdef Q_OS_WIN32 -size_t CopyEngineFactory::getTotalSystemMemory() -{ - MEMORYSTATUSEX status; - status.dwLength = sizeof(status); - GlobalMemoryStatusEx(&status); - return status.ullTotalPhys; -} -#endif - -#ifdef Q_OS_LINUX -size_t CopyEngineFactory::getTotalSystemMemory() -{ - long pages = sysconf(_SC_PHYS_PAGES); - long page_size = sysconf(_SC_PAGE_SIZE); - return pages * page_size; -} -#endif - -#ifdef ULTRACOPIER_PLUGIN_RSYNC -void CopyEngineFactory::setRsync(bool rsync) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("rsync",std::to_string(rsync)); -} -#endif - -void CopyEngineFactory::copyListOrder(bool checked) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); - if(optionsEngine!=NULL) - optionsEngine->setOptionValue("copyListOrder",booltostring(checked)); -} diff --git a/plugins/CopyEngine/Ultracopier/CopyEngineFactory.h b/plugins/CopyEngine/Ultracopier/CopyEngineFactory.h deleted file mode 100644 index 59c4208..0000000 --- a/plugins/CopyEngine/Ultracopier/CopyEngineFactory.h +++ /dev/null @@ -1,133 +0,0 @@ -/** \file factory.h -\brief Define the factory to create new instance -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#include "StructEnumDefinition_CopyEngine.h" - -#include -#include -#include -#include -#include -#include - -#include "../../../interface/PluginInterface_CopyEngine.h" -#include "qstorageinfo.h" -#include "StructEnumDefinition.h" -#include "ui_copyEngineOptions.h" -#include "CopyEngine.h" -#include "Environment.h" -#include "Filters.h" -#include "RenamingRules.h" - -#ifdef Q_OS_WIN32 - #ifndef NOMINMAX - #define NOMINMAX - #endif - #include -#endif -#ifdef Q_OS_LINUX - #include -#endif - -#ifndef FACTORY_H -#define FACTORY_H - -namespace Ui { - class copyEngineOptions; -} - -/** \brief to generate copy engine instance */ -class CopyEngineFactory : public PluginInterface_CopyEngineFactory -{ - Q_OBJECT - #ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT - Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.CopyEngineFactory/1.0.0.0" FILE "plugin.json") - Q_INTERFACES(PluginInterface_CopyEngineFactory) - #endif -public: - CopyEngineFactory(); - ~CopyEngineFactory(); - /// \brief to return the instance of the copy engine - PluginInterface_CopyEngine * getInstance(); - /// \brief set the resources, to store options, to have facilityInterface - void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion); - //get mode allowed - /// \brief define if can copy file, folder or both - Ultracopier::CopyType getCopyType(); - /// \brief to return which kind of transfer list operation is supported - Ultracopier::TransferListOperation getTransferListOperation(); - /// \brief define if can only copy, or copy and move - bool canDoOnlyCopy() const; - /// \brief to get the supported protocols for the source - std::vector supportedProtocolsForTheSource() const; - /// \brief to get the supported protocols for the destination - std::vector supportedProtocolsForTheDestination() const; - /// \brief to get the options of the copy engine - QWidget * options(); - -private: - Ui::copyEngineOptions *ui; - QWidget* tempWidget; - OptionInterface * optionsEngine; - bool errorFound; - FacilityInterface * facilityEngine; - Filters *filters; - RenamingRules *renamingRules; - QStorageInfo storageInfo; - QTimer lunchInitFunction; - std::vector includeStrings,includeOptions,excludeStrings,excludeOptions; - std::string firstRenamingRule,otherRenamingRule; - -#if defined(Q_OS_WIN32) || (defined(Q_OS_LINUX) && defined(_SC_PHYS_PAGES)) - static size_t getTotalSystemMemory(); -#endif -private slots: - void init(); - void setDoRightTransfer(bool doRightTransfer); - void setKeepDate(bool keepDate); - void setBlockSize(int blockSize); - void setParallelBuffer(int parallelBuffer); - void setSequentialBuffer(int sequentialBuffer); - void setParallelizeIfSmallerThan(int parallelizeIfSmallerThan); - void setAutoStart(bool autoStart); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - void setRsync(bool rsync); - #endif - void setFolderCollision(int index); - void setFolderError(int index); - void setTransferAlgorithm(int index); - void setCheckDestinationFolder(); - void showFilterDialog(); - void sendNewFilters(const std::vector &includeStrings,const std::vector &includeOptions, - const std::vector &excludeStrings,const std::vector &excludeOptions); - void doChecksum_toggled(bool); - void checksumOnlyOnError_toggled(bool); - void osBuffer_toggled(bool); - void osBufferLimited_toggled(bool); - void osBufferLimit_editingFinished(); - void checksumIgnoreIfImpossible_toggled(bool); - void sendNewRenamingRules(const std::string &firstRenamingRule, const std::string &otherRenamingRule); - void showRenamingRules(); - void updateBufferCheckbox(); - void setFileCollision(int index); - void setFileError(int index); - void updatedBlockSize(); - void deletePartiallyTransferredFiles(bool checked); - void renameTheOriginalDestination(bool checked); - void checkDiskSpace(bool checked); - void defaultDestinationFolderBrowse(); - void defaultDestinationFolder(); - void followTheStrictOrder(bool checked); - void moveTheWholeFolder(bool checked); - void on_inodeThreads_editingFinished(); - void copyListOrder(bool checked); -public slots: - void resetOptions(); - void newLanguageLoaded(); -signals: - void reloadLanguage() const; -}; - -#endif // FACTORY_H diff --git a/plugins/CopyEngine/Ultracopier/DebugDialog.cpp b/plugins/CopyEngine/Ultracopier/DebugDialog.cpp deleted file mode 100644 index 0b3fec4..0000000 --- a/plugins/CopyEngine/Ultracopier/DebugDialog.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/** \file debugDialog.cpp -\brief Define the dialog to have debug information -\author alpha_one_x86 */ - -#include "DebugDialog.h" -#include "ui_debugDialog.h" - -#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - -DebugDialog::DebugDialog(QWidget *parent) : - QWidget(parent), - ui(new Ui::debugDialog) -{ - ui->setupUi(this); -} - -DebugDialog::~DebugDialog() -{ - delete ui; -} - -void DebugDialog::setTransferList(const std::vector &list) -{ - ui->tranferList->clear(); - unsigned int index=0; - while(indextranferList->addItem(QString::fromStdString(list.at(index))); - index++; - } -} - -void DebugDialog::setActiveTransfer(const int &activeTransfer) -{ - ui->spinBoxActiveTransfer->setValue(activeTransfer); -} - -void DebugDialog::setInodeUsage(const int &inodeUsage) -{ - ui->spinBoxNumberOfInode->setValue(inodeUsage); -} - -void DebugDialog::setTransferThreadList(const std::vector &list) -{ - ui->transferThreadList->clear(); - unsigned int index=0; - while(indextransferThreadList->addItem(QString::fromStdString(list.at(index))); - index++; - } -} - -#endif diff --git a/plugins/CopyEngine/Ultracopier/DebugDialog.h b/plugins/CopyEngine/Ultracopier/DebugDialog.h deleted file mode 100644 index c84cfaa..0000000 --- a/plugins/CopyEngine/Ultracopier/DebugDialog.h +++ /dev/null @@ -1,39 +0,0 @@ -/** \file debugDialog.h -\brief Define the dialog to have debug information -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef DEBUGDAILOG_H -#define DEBUGDAILOG_H - -#include "Environment.h" - -#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW -#include - -namespace Ui { - class debugDialog; -} - -/// \brief class to the dialog to have debug information -class DebugDialog : public QWidget -{ - Q_OBJECT -public: - explicit DebugDialog(QWidget *parent = 0); - ~DebugDialog(); - /// \brief to set the transfer list, limited in result to not slow down the application - void setTransferList(const std::vector &list); - /// \brief show the transfer thread, it show be a thread pool in normal time - void setTransferThreadList(const std::vector &list); - /// \brief show how many transfer is active - void setActiveTransfer(const int &activeTransfer); - /// \brief show many many inode is manipulated - void setInodeUsage(const int &inodeUsage); -private: - Ui::debugDialog *ui; -}; - -#endif // ULTRACOPIER_PLUGIN_DEBUG_WINDOW - -#endif // DEBUGDAILOG_H diff --git a/plugins/CopyEngine/Ultracopier/DebugEngineMacro.h b/plugins/CopyEngine/Ultracopier/DebugEngineMacro.h deleted file mode 100644 index f9b5349..0000000 --- a/plugins/CopyEngine/Ultracopier/DebugEngineMacro.h +++ /dev/null @@ -1,28 +0,0 @@ -/** \file DebugEngineMacro.h -\brief Define the macro for the debug -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef DEBUGENGINEMACRO_H -#define DEBUGENGINEMACRO_H - -#ifdef WIN32 -# define __func__ __FUNCTION__ -#endif - -/// \brief Macro for the debug log -#ifdef ULTRACOPIER_PLUGIN_DEBUG - #if defined (__FILE__) && defined (__LINE__) - #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b,__FILE__,__LINE__) - #else - #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b) - #endif -#else // ULTRACOPIER_PLUGIN_DEBUG - #define ULTRACOPIER_DEBUGCONSOLE(a,b) void() -#endif // ULTRACOPIER_PLUGIN_DEBUG - -#endif // DEBUGENGINEMACRO_H - - - - diff --git a/plugins/CopyEngine/Ultracopier/DiskSpace.cpp b/plugins/CopyEngine/Ultracopier/DiskSpace.cpp deleted file mode 100644 index e9b996d..0000000 --- a/plugins/CopyEngine/Ultracopier/DiskSpace.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "DiskSpace.h" -#include "ui_DiskSpace.h" -#include "StructEnumDefinition_CopyEngine.h" - -DiskSpace::DiskSpace(FacilityInterface * facilityEngine,std::vector list,QWidget *parent) : - QDialog(parent), - ui(new Ui::DiskSpace) -{ - Qt::WindowFlags flags = windowFlags(); - #ifdef Q_OS_LINUX - flags=flags & ~Qt::X11BypassWindowManagerHint; - #endif - flags=flags | Qt::WindowStaysOnTopHint; - setWindowFlags(flags); - - ui->setupUi(this); - ok=false; - int index=0; - int size=list.size(); - QString drives; - while(indexsizeToString(list.at(index).freeSpace))) - .arg(QString::fromStdString(facilityEngine->sizeToString(list.at(index).requiredSpace))); - drives+=QStringLiteral("
"); - index++; - } - ui->drives->setText(drives); -} - -DiskSpace::~DiskSpace() -{ - delete ui; -} - -void DiskSpace::on_ok_clicked() -{ - ok=true; - close(); -} - -void DiskSpace::on_cancel_clicked() -{ - ok=false; - close(); -} - -bool DiskSpace::getAction() const -{ - return ok; -} diff --git a/plugins/CopyEngine/Ultracopier/DiskSpace.h b/plugins/CopyEngine/Ultracopier/DiskSpace.h deleted file mode 100644 index 5a923ab..0000000 --- a/plugins/CopyEngine/Ultracopier/DiskSpace.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef DISKSPACE_H -#define DISKSPACE_H - -#include -#include -#include "../../../interface/PluginInterface_CopyEngine.h" -#include "StructEnumDefinition_CopyEngine.h" - -namespace Ui { -class DiskSpace; -} - -class DiskSpace : public QDialog -{ - Q_OBJECT - -public: - explicit DiskSpace(FacilityInterface * facilityEngine,std::vector list,QWidget *parent = 0); - ~DiskSpace(); - bool getAction() const; -private slots: - void on_ok_clicked(); - void on_cancel_clicked(); -private: - Ui::DiskSpace *ui; - bool ok; -}; - -#endif // DISKSPACE_H diff --git a/plugins/CopyEngine/Ultracopier/DiskSpace.ui b/plugins/CopyEngine/Ultracopier/DiskSpace.ui deleted file mode 100644 index 10b5c69..0000000 --- a/plugins/CopyEngine/Ultracopier/DiskSpace.ui +++ /dev/null @@ -1,68 +0,0 @@ - - - DiskSpace - - - - 0 - 0 - 367 - 146 - - - - Disk space - - - - :/CopyEngine/Ultracopier/resources/remove.png:/CopyEngine/Ultracopier/resources/remove.png - - - - - - You need more space on this drive to finish this transfer - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Continue - - - - - - - Cancel - - - - - - - - - - - - diff --git a/plugins/CopyEngine/Ultracopier/DriveManagement.cpp b/plugins/CopyEngine/Ultracopier/DriveManagement.cpp deleted file mode 100644 index 27fc9cb..0000000 --- a/plugins/CopyEngine/Ultracopier/DriveManagement.cpp +++ /dev/null @@ -1,105 +0,0 @@ -#include "DriveManagement.h" - -#include -#include -#include - -#include "../../../cpp11addition.h" - -DriveManagement::DriveManagement() -{ - tryUpdate(); - #ifdef Q_OS_WIN32 - reg1=std::regex("^(\\\\\\\\|//)[^\\\\\\\\/]+(\\\\|/)[^\\\\\\\\/]+.*"); - reg2=std::regex("^((\\\\\\\\|//)[^\\\\\\\\/]+(\\\\|/)[^\\\\\\\\/]+).*$"); - reg3=std::regex("^[a-zA-Z]:[\\\\/].*"); - reg4=std::regex("^([a-zA-Z]:[\\\\/]).*$"); - #endif - /// \warn ULTRACOPIER_DEBUGCONSOLE() don't work here because the sinal slot is not connected! -} - -//get drive of an file or folder -/// \todo do network drive support for windows -std::string DriveManagement::getDrive(const std::string &fileOrFolder) const -{ - const std::string &inode=QDir::toNativeSeparators(QString::fromStdString(fileOrFolder)).toStdString(); - int size=mountSysPoint.size(); - for (int i = 0; i < size; ++i) { - if(stringStartWith(inode,mountSysPoint.at(i))) - return QDir::toNativeSeparators(QString::fromStdString(mountSysPoint.at(i))).toStdString(); - } - #ifdef Q_OS_WIN32 - if(std::regex_match(fileOrFolder,reg1)) - { - std::string returnString=fileOrFolder; - std::regex_replace(returnString,reg2,"$1"); - return returnString; - } - //due to lack of WMI support into mingw, the new drive event is never called, this is a workaround - if(std::regex_match(fileOrFolder,reg3)) - { - std::string returnString=fileOrFolder; - std::regex_replace(returnString,reg4,"$1"); - return QDir::toNativeSeparators(QString::fromStdString(returnString)).toUpper().toStdString(); - } - #endif - //if unable to locate the right mount point - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"unable to locate the right mount point for: "+inode+", mount point: "+stringimplode(mountSysPoint,";")); - return std::string(); -} - -QByteArray DriveManagement::getDriveType(const std::string &drive) const -{ - int index=vectorindexOf(mountSysPoint,drive); - if(index!=-1) - return driveType.at(index); - return QByteArray(); -} - -bool DriveManagement::isSameDrive(const std::string &file1,const std::string &file2) const -{ - if(mountSysPoint.size()==0) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"no mount point found"); - return false; - } - const std::string &drive1=getDrive(file1); - if(drive1.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"drive for the file1 not found: "+file1); - return false; - } - const std::string &drive2=getDrive(file2); - if(drive2.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"drive for the file2 not found: "+file2); - return false; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,drive1+" is egal to "+drive2); - if(drive1==drive2) - return true; - else - return false; -} - -void DriveManagement::tryUpdate() -{ - mountSysPoint.clear(); - driveType.clear(); - const QList mountedVolumesList=QStorageInfo::mountedVolumes(); - int index=0; - while(index -#include -#include -#include -#include -#include - -#include "Environment.h" - -class DriveManagement : public QObject -{ - Q_OBJECT -public: - explicit DriveManagement(); - bool isSameDrive(const std::string &file1, const std::string &file2) const; - /// \brief get drive of an file or folder - std::string getDrive(const std::string &fileOrFolder) const; - QByteArray getDriveType(const std::string &drive) const; - void tryUpdate(); -protected: - std::vector mountSysPoint; - std::vector driveType; - #ifdef Q_OS_WIN32 - std::regex reg1,reg2,reg3,reg4; - #endif -signals: - /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; -}; - -#endif // DRIVEMANAGEMENT_H diff --git a/plugins/CopyEngine/Ultracopier/Environment.h b/plugins/CopyEngine/Ultracopier/Environment.h deleted file mode 100644 index 34db2a2..0000000 --- a/plugins/CopyEngine/Ultracopier/Environment.h +++ /dev/null @@ -1,11 +0,0 @@ -/** \file Environment.h -\brief Define the environment variable and global function -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#include "Variable.h" -/// \brief The global include -#include "StructEnumDefinition.h" -#include "StructEnumDefinition_CopyEngine.h" -#include "DebugEngineMacro.h" -#include "CompilerInfo.h" diff --git a/plugins/CopyEngine/Ultracopier/FileErrorDialog.cpp b/plugins/CopyEngine/Ultracopier/FileErrorDialog.cpp deleted file mode 100644 index d88fb90..0000000 --- a/plugins/CopyEngine/Ultracopier/FileErrorDialog.cpp +++ /dev/null @@ -1,163 +0,0 @@ -#include "FileErrorDialog.h" -#include "ui_fileErrorDialog.h" -#include "TransferThread.h" - -#include - -bool FileErrorDialog::isInAdmin=false; - -FileErrorDialog::FileErrorDialog(QWidget *parent, QFileInfo fileInfo, std::string errorString, const ErrorType &errorType) : - QDialog(parent), - ui(new Ui::fileErrorDialog) -{ - Qt::WindowFlags flags = windowFlags(); - #ifdef Q_OS_LINUX - flags=flags & ~Qt::X11BypassWindowManagerHint; - #endif - flags=flags | Qt::WindowStaysOnTopHint; - setWindowFlags(flags); - - ui->setupUi(this); - action=FileError_Cancel; - ui->label_error->setText(QString::fromStdString(errorString)); - if(fileInfo.exists()) - { - ui->label_content_file_name->setText(QString::fromStdString(TransferThread::resolvedName(fileInfo))); - if(ui->label_content_file_name->text().isEmpty()) - { - ui->label_content_file_name->setText(fileInfo.absoluteFilePath()); - ui->label_folder->setVisible(false); - ui->label_content_folder->setVisible(false); - } - else - { - QString folder=fileInfo.absolutePath(); - if(folder.size()>80) - folder=folder.mid(0,38)+"..."+folder.mid(folder.size()-38); - ui->label_content_folder->setText(fileInfo.absolutePath()); - } - ui->label_content_size->setText(QString::number(fileInfo.size())); - QDateTime maxTime(QDate(ULTRACOPIER_PLUGIN_MINIMALYEAR,1,1)); - if(maxTimelabel_modified->setVisible(true); - ui->label_content_modified->setVisible(true); - ui->label_content_modified->setText(fileInfo.lastModified().toString()); - } - else - { - ui->label_modified->setVisible(false); - ui->label_content_modified->setVisible(false); - } - if(fileInfo.isDir()) - { - this->setWindowTitle(tr("Error on folder")); - ui->label_size->hide(); - ui->label_content_size->hide(); - ui->label_file_name->setText(tr("Folder name")); - } - ui->label_file_destination->setVisible(fileInfo.isSymLink()); - ui->label_content_file_destination->setVisible(fileInfo.isSymLink()); - if(fileInfo.isSymLink()) - ui->label_content_file_destination->setText(fileInfo.symLinkTarget()); - } - else - { - ui->label_content_file_name->setText(QString::fromStdString(TransferThread::resolvedName(fileInfo))); - if(ui->label_content_file_name->text().isEmpty()) - { - ui->label_content_file_name->setText(fileInfo.absoluteFilePath()); - ui->label_folder->setVisible(false); - ui->label_content_folder->setVisible(false); - } - else - ui->label_content_folder->setText(fileInfo.absolutePath()); - - ui->label_file_destination->hide(); - ui->label_content_file_destination->hide(); - ui->label_size->hide(); - ui->label_content_size->hide(); - ui->label_modified->hide(); - ui->label_content_modified->hide(); - } - if(errorType==ErrorType_Folder || errorType==ErrorType_FolderWithRety) - ui->PutToBottom->hide(); - if(errorType==ErrorType_Folder) - ui->Retry->hide(); - - ui->Rights->hide(); - #ifdef ULTRACOPIER_PLUGIN_RIGHTS - if(isInAdmin) - ui->Rights->hide(); - #ifdef Q_OS_WIN32 - if(errorType!=ErrorType_Rights) - ui->Rights->hide(); - #else - ui->Rights->hide(); - #endif - #else - ui->Rights->hide(); - #endif -} - -FileErrorDialog::~FileErrorDialog() -{ - delete ui; -} - -void FileErrorDialog::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -void FileErrorDialog::on_PutToBottom_clicked() -{ - action=FileError_PutToEndOfTheList; - this->close(); -} - -void FileErrorDialog::on_Retry_clicked() -{ - action=FileError_Retry; - this->close(); -} - -void FileErrorDialog::on_Skip_clicked() -{ - action=FileError_Skip; - this->close(); -} - -void FileErrorDialog::on_Cancel_clicked() -{ - action=FileError_Cancel; - this->close(); -} - -bool FileErrorDialog::getAlways() -{ - return ui->checkBoxAlways->isChecked(); -} - -FileErrorAction FileErrorDialog::getAction() -{ - return action; -} - -void FileErrorDialog::on_checkBoxAlways_clicked() -{ - ui->Rights->setEnabled(!ui->checkBoxAlways->isChecked()); -} - -#ifdef ULTRACOPIER_PLUGIN_RIGHTS -void FileErrorDialog::on_Rights_clicked() -{ -} -#endif diff --git a/plugins/CopyEngine/Ultracopier/FileErrorDialog.h b/plugins/CopyEngine/Ultracopier/FileErrorDialog.h deleted file mode 100644 index 133a8b0..0000000 --- a/plugins/CopyEngine/Ultracopier/FileErrorDialog.h +++ /dev/null @@ -1,51 +0,0 @@ -/** \file fileErrorDialog.h -\brief Define the dialog error on the file -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#include -#include -#include -#include -#include -#include "Environment.h" - -#ifndef FILEERRORDIALOG_H -#define FILEERRORDIALOG_H - - - -namespace Ui { - class fileErrorDialog; -} - -/// \brief to show error dialog, and ask what do -class FileErrorDialog : public QDialog -{ - Q_OBJECT -public: - /// \brief create the object and pass all the informations to it - explicit FileErrorDialog(QWidget *parent,QFileInfo fileInfo,std::string errorString,const ErrorType &errorType); - ~FileErrorDialog(); - /// \brief return the the always checkbox is checked - bool getAlways(); - /// \brief return the action clicked - FileErrorAction getAction(); -protected: - void changeEvent(QEvent *e); - static bool isInAdmin; -private slots: - void on_PutToBottom_clicked(); - void on_Retry_clicked(); - void on_Skip_clicked(); - void on_Cancel_clicked(); - void on_checkBoxAlways_clicked(); - #ifdef ULTRACOPIER_PLUGIN_RIGHTS - void on_Rights_clicked(); - #endif -private: - Ui::fileErrorDialog *ui; - FileErrorAction action; -}; - -#endif // FILEERRORDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp b/plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp deleted file mode 100644 index 10b8543..0000000 --- a/plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp +++ /dev/null @@ -1,240 +0,0 @@ -#include "FileExistsDialog.h" -#include "ui_fileExistsDialog.h" -#include "TransferThread.h" - -#ifdef Q_OS_WIN32 -#define CURRENTSEPARATOR "\\" -#else -#define CURRENTSEPARATOR "/" -#endif - -#include -#include -#include - -FileExistsDialog::FileExistsDialog(QWidget *parent, QFileInfo source, QFileInfo destination, std::string firstRenamingRule, std::string otherRenamingRule) : - QDialog(parent), - ui(new Ui::fileExistsDialog) -{ - Qt::WindowFlags flags = windowFlags(); - #ifdef Q_OS_LINUX - flags=flags & ~Qt::X11BypassWindowManagerHint; - #endif - flags=flags | Qt::WindowStaysOnTopHint; - setWindowFlags(flags); - - ui->setupUi(this); - action=FileExists_Cancel; - destinationInfo=destination; - oldName=TransferThread::resolvedName(destination); - ui->lineEditNewName->setText(QString::fromStdString(oldName)); - ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); - ui->Overwrite->addAction(ui->actionOverwrite_if_newer); - ui->Overwrite->addAction(ui->actionOverwrite_if_not_same_modification_date); - ui->label_content_source_size->setText(QString::number(source.size())); - ui->label_content_source_modified->setText(source.lastModified().toString()); - ui->label_content_source_file_name->setText(QString::fromStdString(TransferThread::resolvedName(source))); - QString folder=source.absolutePath(); - if(folder.size()>80) - folder=folder.mid(0,38)+"..."+folder.mid(folder.size()-38); - ui->label_content_source_folder->setText(folder); - ui->label_content_destination_size->setText(QString::number(destination.size())); - ui->label_content_destination_modified->setText(destination.lastModified().toString()); - ui->label_content_destination_file_name->setText(QString::fromStdString(TransferThread::resolvedName(destination))); - folder=destination.absolutePath(); - if(folder.size()>80) - folder=folder.mid(0,38)+"..."+folder.mid(folder.size()-38); - ui->label_content_destination_folder->setText(folder); - QDateTime maxTime(QDate(ULTRACOPIER_PLUGIN_MINIMALYEAR,1,1)); - if(maxTimelabel_source_modified->setVisible(true); - ui->label_content_source_modified->setVisible(true); - ui->label_content_source_modified->setText(source.lastModified().toString()); - } - else - { - ui->label_source_modified->setVisible(false); - ui->label_content_source_modified->setVisible(false); - } - if(maxTimelabel_destination_modified->setVisible(true); - ui->label_content_destination_modified->setVisible(true); - ui->label_content_destination_modified->setText(destination.lastModified().toString()); - } - else - { - ui->label_destination_modified->setVisible(false); - ui->label_content_destination_modified->setVisible(false); - } - if(!source.exists()) - { - ui->label_content_source_size->setVisible(false); - ui->label_source_size->setVisible(false); - ui->label_source_modified->setVisible(false); - ui->label_content_source_modified->setVisible(false); - } - if(!destination.exists()) - { - ui->label_content_destination_size->setVisible(false); - ui->label_destination_size->setVisible(false); - ui->label_destination_modified->setVisible(false); - ui->label_content_destination_modified->setVisible(false); - } - this->firstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; - on_SuggestNewName_clicked(); -} - -FileExistsDialog::~FileExistsDialog() -{ - delete ui; -} - -void FileExistsDialog::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -std::string FileExistsDialog::getNewName() -{ - if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) - return oldName; - else - return ui->lineEditNewName->text().toStdString(); -} - -void FileExistsDialog::on_SuggestNewName_clicked() -{ - QFileInfo destinationInfo=this->destinationInfo; - QString absolutePath=destinationInfo.absolutePath(); - QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); - QString suffix=""; - QString destination; - QString newFileName; - //resolv the suffix - if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) - { - suffix=fileName; - suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); - fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); - } - //resolv the new name - int num=1; - do - { - if(num==1) - { - if(firstRenamingRule.empty()) - newFileName=tr("%name% - copy%suffix%"); - else - newFileName=QString::fromStdString(firstRenamingRule); - } - else - { - if(otherRenamingRule.empty()) - newFileName=tr("%name% - copy (%number%)%suffix%"); - else - newFileName=QString::fromStdString(otherRenamingRule); - newFileName.replace(QStringLiteral("%number%"),QString::number(num)); - } - newFileName.replace(QStringLiteral("%name%"),fileName); - newFileName.replace(QStringLiteral("%suffix%"),suffix); - destination=absolutePath+CURRENTSEPARATOR+newFileName; - destinationInfo.setFile(destination); - num++; - } - while(destinationInfo.exists()); - ui->lineEditNewName->setText(newFileName); -} - -void FileExistsDialog::on_Rename_clicked() -{ - action=FileExists_Rename; - this->close(); -} - -void FileExistsDialog::on_Overwrite_clicked() -{ - action=FileExists_Overwrite; - this->close(); -} - -void FileExistsDialog::on_Skip_clicked() -{ - action=FileExists_Skip; - this->close(); -} - -void FileExistsDialog::on_Cancel_clicked() -{ - action=FileExists_Cancel; - this->close(); -} - -void FileExistsDialog::on_actionOverwrite_if_newer_triggered() -{ - action=FileExists_OverwriteIfNewer; - this->close(); -} - -void FileExistsDialog::on_actionOverwrite_if_not_same_modification_date_triggered() -{ - action=FileExists_OverwriteIfNotSame; - this->close(); -} - -FileExistsAction FileExistsDialog::getAction() -{ - return action; -} - -bool FileExistsDialog::getAlways() -{ - return ui->checkBoxAlways->isChecked(); -} - -void FileExistsDialog::updateRenameButton() -{ - ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); -} - -void FileExistsDialog::on_checkBoxAlways_toggled(bool checked) -{ - Q_UNUSED(checked); - updateRenameButton(); -} - -void FileExistsDialog::on_lineEditNewName_textChanged(const QString &arg1) -{ - Q_UNUSED(arg1); - updateRenameButton(); -} - -void FileExistsDialog::on_lineEditNewName_returnPressed() -{ - updateRenameButton(); - if(ui->Rename->isEnabled()) - on_Rename_clicked(); - else - QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); -} - -void FileExistsDialog::on_actionOverwrite_if_older_triggered() -{ - action=FileExists_OverwriteIfOlder; - this->close(); -} - -void FileExistsDialog::on_lineEditNewName_editingFinished() -{ - updateRenameButton(); -} diff --git a/plugins/CopyEngine/Ultracopier/FileExistsDialog.h b/plugins/CopyEngine/Ultracopier/FileExistsDialog.h deleted file mode 100644 index 05ff7e0..0000000 --- a/plugins/CopyEngine/Ultracopier/FileExistsDialog.h +++ /dev/null @@ -1,60 +0,0 @@ -/** \file fileExistsDialog.h -\brief Define the dialog when file already exists -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#include -#include -#include -#include -#include -#include -#include "Environment.h" - -#ifndef FILEEXISTSDIALOG_H -#define FILEEXISTSDIALOG_H - -namespace Ui { - class fileExistsDialog; -} - -/// \brief to show file exists dialog, and ask what do -class FileExistsDialog : public QDialog -{ - Q_OBJECT -public: - /// \brief create the object and pass all the informations to it - explicit FileExistsDialog(QWidget *parent,QFileInfo source,QFileInfo destination,std::string firstRenamingRule,std::string otherRenamingRule); - ~FileExistsDialog(); - /// \brief return the the always checkbox is checked - bool getAlways(); - /// \brief return the action clicked - FileExistsAction getAction(); - /// \brief return the new rename is case in manual renaming - std::string getNewName(); -protected: - void changeEvent(QEvent *e); -private slots: - void on_SuggestNewName_clicked(); - void on_Rename_clicked(); - void on_Overwrite_clicked(); - void on_Skip_clicked(); - void on_Cancel_clicked(); - void on_actionOverwrite_if_newer_triggered(); - void on_actionOverwrite_if_not_same_modification_date_triggered(); - void updateRenameButton(); - void on_checkBoxAlways_toggled(bool checked); - void on_lineEditNewName_textChanged(const QString &arg1); - void on_lineEditNewName_returnPressed(); - void on_actionOverwrite_if_older_triggered(); - void on_lineEditNewName_editingFinished(); -private: - Ui::fileExistsDialog *ui; - FileExistsAction action; - std::string oldName; - QFileInfo destinationInfo; - std::string firstRenamingRule; - std::string otherRenamingRule; -}; - -#endif // FILEEXISTSDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier/FileIsSameDialog.cpp b/plugins/CopyEngine/Ultracopier/FileIsSameDialog.cpp deleted file mode 100644 index 7683d1d..0000000 --- a/plugins/CopyEngine/Ultracopier/FileIsSameDialog.cpp +++ /dev/null @@ -1,190 +0,0 @@ -#include "FileIsSameDialog.h" -#include "ui_fileIsSameDialog.h" -#include "TransferThread.h" - -#ifdef Q_OS_WIN32 -#define CURRENTSEPARATOR "\\" -#else -#define CURRENTSEPARATOR "/" -#endif - -#include -#include -#include - -FileIsSameDialog::FileIsSameDialog(QWidget *parent, QFileInfo fileInfo, std::string firstRenamingRule, std::string otherRenamingRule) : - QDialog(parent), - ui(new Ui::fileIsSameDialog) -{ - Qt::WindowFlags flags = windowFlags(); - #ifdef Q_OS_LINUX - flags=flags & ~Qt::X11BypassWindowManagerHint; - #endif - flags=flags | Qt::WindowStaysOnTopHint; - setWindowFlags(flags); - - ui->setupUi(this); - action=FileExists_Cancel; - oldName=TransferThread::resolvedName(fileInfo); - destinationInfo=fileInfo; - ui->lineEditNewName->setText(QString::fromStdString(oldName)); - ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); - ui->label_content_size->setText(QString::number(fileInfo.size())); - ui->label_content_modified->setText(fileInfo.lastModified().toString()); - ui->label_content_file_name->setText(QString::fromStdString(TransferThread::resolvedName(fileInfo))); - QString folder=fileInfo.absolutePath(); - if(folder.size()>80) - folder=folder.mid(0,38)+"..."+folder.mid(folder.size()-38); - ui->label_content_folder->setText(folder); - updateRenameButton(); - QDateTime maxTime(QDate(ULTRACOPIER_PLUGIN_MINIMALYEAR,1,1)); - if(maxTimelabel_modified->setVisible(true); - ui->label_content_modified->setVisible(true); - ui->label_content_modified->setText(fileInfo.lastModified().toString()); - } - else - { - ui->label_modified->setVisible(false); - ui->label_content_modified->setVisible(false); - } - if(!fileInfo.exists()) - { - ui->label_content_size->setVisible(false); - ui->label_size->setVisible(false); - ui->label_modified->setVisible(false); - ui->label_content_modified->setVisible(false); - } - this->firstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; - on_SuggestNewName_clicked(); -} - -FileIsSameDialog::~FileIsSameDialog() -{ - delete ui; -} - -void FileIsSameDialog::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -std::string FileIsSameDialog::getNewName() -{ - if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) - return oldName; - else - return ui->lineEditNewName->text().toStdString(); -} - -void FileIsSameDialog::on_SuggestNewName_clicked() -{ - QFileInfo destinationInfo=this->destinationInfo; - QString absolutePath=destinationInfo.absolutePath(); - QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); - QString suffix=""; - QString destination; - QString newFileName; - //resolv the suffix - if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) - { - suffix=fileName; - suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); - fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); - } - //resolv the new name - int num=1; - do - { - if(num==1) - { - if(firstRenamingRule.empty()) - newFileName=tr("%name% - copy"); - else - newFileName=QString::fromStdString(firstRenamingRule); - } - else - { - if(otherRenamingRule.empty()) - newFileName=tr("%name% - copy (%number%)"); - else - newFileName=QString::fromStdString(otherRenamingRule); - newFileName.replace(QStringLiteral("%number%"),QString::number(num)); - } - newFileName.replace(QStringLiteral("%name%"),fileName); - newFileName.replace(QStringLiteral("%suffix%"),suffix); - destination=absolutePath+CURRENTSEPARATOR+newFileName+suffix; - destinationInfo.setFile(destination); - num++; - } - while(destinationInfo.exists()); - ui->lineEditNewName->setText(newFileName); -} - -void FileIsSameDialog::on_Rename_clicked() -{ - action=FileExists_Rename; - this->close(); -} - -void FileIsSameDialog::on_Skip_clicked() -{ - action=FileExists_Skip; - this->close(); -} - -void FileIsSameDialog::on_Cancel_clicked() -{ - action=FileExists_Cancel; - this->close(); -} - -FileExistsAction FileIsSameDialog::getAction() -{ - return action; -} - -bool FileIsSameDialog::getAlways() -{ - return ui->checkBoxAlways->isChecked(); -} - -void FileIsSameDialog::updateRenameButton() -{ - ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); -} - -void FileIsSameDialog::on_lineEditNewName_textChanged(const QString &arg1) -{ - Q_UNUSED(arg1); - updateRenameButton(); -} - -void FileIsSameDialog::on_checkBoxAlways_toggled(bool checked) -{ - Q_UNUSED(checked); - updateRenameButton(); -} - -void FileIsSameDialog::on_lineEditNewName_returnPressed() -{ - updateRenameButton(); - if(ui->Rename->isEnabled()) - on_Rename_clicked(); - else - QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); -} - -void FileIsSameDialog::on_lineEditNewName_editingFinished() -{ - updateRenameButton(); -} diff --git a/plugins/CopyEngine/Ultracopier/FileIsSameDialog.h b/plugins/CopyEngine/Ultracopier/FileIsSameDialog.h deleted file mode 100644 index 5dc0067..0000000 --- a/plugins/CopyEngine/Ultracopier/FileIsSameDialog.h +++ /dev/null @@ -1,57 +0,0 @@ -/** \file fileIsSameDialog.h -\brief Define the dialog when file is same -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#include -#include -#include -#include -#include -#include -#include "Environment.h" - -#ifndef FILEISSAMEDIALOG_H -#define FILEISSAMEDIALOG_H - -namespace Ui { - class fileIsSameDialog; -} - -/// \brief to show file is same dialog, and ask what do -class FileIsSameDialog : public QDialog -{ - Q_OBJECT -public: - /// \brief create the object and pass all the informations to it - explicit FileIsSameDialog(QWidget *parent,QFileInfo fileInfo,std::string firstRenamingRule,std::string otherRenamingRule); - ~FileIsSameDialog(); - /// \brief return the the always checkbox is checked - bool getAlways(); - /// \brief return the action clicked - FileExistsAction getAction(); - /// \brief return the new rename is case in manual renaming - std::string getNewName(); -protected: - void changeEvent(QEvent *e); -private slots: - void on_SuggestNewName_clicked(); - void on_Rename_clicked(); - void on_Skip_clicked(); - void on_Cancel_clicked(); - void updateRenameButton(); - void on_lineEditNewName_textChanged(const QString &arg1); - void on_checkBoxAlways_toggled(bool checked); - void on_lineEditNewName_returnPressed(); - void on_lineEditNewName_editingFinished(); -private: - Ui::fileIsSameDialog *ui; - FileExistsAction action; - std::string oldName; - QFileInfo destinationInfo; - std::string firstRenamingRule; - std::string otherRenamingRule; - -}; - -#endif // FILEISSAMEDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier/FilterRules.cpp b/plugins/CopyEngine/Ultracopier/FilterRules.cpp deleted file mode 100644 index 0f6bf2c..0000000 --- a/plugins/CopyEngine/Ultracopier/FilterRules.cpp +++ /dev/null @@ -1,193 +0,0 @@ -#include "FilterRules.h" -#include "ui_FilterRules.h" - -#include - -FilterRules::FilterRules(QWidget *parent) : - QDialog(parent), - ui(new Ui::FilterRules) -{ - ui->setupUi(this); - updateChecking(); - haveBeenValided=false; -} - -FilterRules::~FilterRules() -{ - delete ui; -} - -bool FilterRules::getIsValid() -{ - return isValid && haveBeenValided; -} - -std::string FilterRules::get_search_text() -{ - return ui->search->text().toStdString(); -} - -SearchType FilterRules::get_search_type() -{ - switch(ui->search_type->currentIndex()) - { - case 0: - return SearchType_rawText; - case 1: - return SearchType_simpleRegex; - case 2: - return SearchType_perlRegex; - } - return SearchType_simpleRegex; -} - -ApplyOn FilterRules::get_apply_on() -{ - switch(ui->apply_on->currentIndex()) - { - case 0: - return ApplyOn_file; - case 1: - return ApplyOn_fileAndFolder; - case 2: - return ApplyOn_folder; - } - return ApplyOn_fileAndFolder; -} - -bool FilterRules::get_need_match_all() -{ - return ui->need_match_all->isChecked(); -} - -void FilterRules::set_search_text(std::string search_text) -{ - ui->search->setText(QString::fromStdString(search_text)); -} - -void FilterRules::set_search_type(SearchType search_type) -{ - switch(search_type) - { - case SearchType_rawText: - ui->search_type->setCurrentIndex(0); - break; - case SearchType_simpleRegex: - ui->search_type->setCurrentIndex(1); - break; - case SearchType_perlRegex: - ui->search_type->setCurrentIndex(2); - break; - } -} - -void FilterRules::set_apply_on(ApplyOn apply_on) -{ - switch(apply_on) - { - case ApplyOn_file: - ui->apply_on->setCurrentIndex(0); - break; - case ApplyOn_fileAndFolder: - ui->apply_on->setCurrentIndex(1); - break; - case ApplyOn_folder: - ui->apply_on->setCurrentIndex(2); - break; - } -} - -void FilterRules::set_need_match_all(bool need_match_all) -{ - ui->need_match_all->setChecked(need_match_all); -} - -void FilterRules::on_search_textChanged(const std::string &arg1) -{ - Q_UNUSED(arg1); - updateChecking(); -} - -void FilterRules::updateChecking() -{ - QRegularExpression regex; - isValid=!ui->search->text().isEmpty(); - if(isValid) - { - QString tempString; - if(ui->search_type->currentIndex()==0) - { - tempString=QRegularExpression::escape(ui->search->text()); - if(tempString.contains('/') || tempString.contains('\\')) - isValid=false; - } - else if(ui->search_type->currentIndex()==1) - { - tempString=QRegularExpression::escape(ui->search->text()); - tempString.replace(QStringLiteral("\\*"),QStringLiteral("[^\\\\/]*")); - } - else if(ui->search_type->currentIndex()==2) - { - tempString=ui->search->text(); - if(tempString.startsWith('^') && tempString.endsWith('$')) - { - ui->need_match_all->setChecked(true); - tempString.remove(QRegularExpression(QStringLiteral("^\\^"))); - tempString.remove(QRegularExpression(QStringLiteral("\\$$"))); - ui->search->setText(tempString); - } - } - if(isValid) - { - if(ui->need_match_all->isChecked()) - tempString=QStringLiteral("^")+tempString+QStringLiteral("$"); - regex=QRegularExpression(tempString); - isValid=regex.isValid(); - } - } - - ui->isValid->setChecked(isValid); - ui->testString->setEnabled(isValid); - ui->label_test_string->setEnabled(isValid); - ui->matched->setEnabled(isValid); - ui->matched->setChecked(isValid && ui->testString->text().contains(regex)); - ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isValid); -} - -void FilterRules::on_isValid_clicked() -{ - updateChecking(); -} - -void FilterRules::on_testString_textChanged(const std::string &arg1) -{ - Q_UNUSED(arg1); - updateChecking(); -} - -void FilterRules::on_matched_clicked() -{ - updateChecking(); -} - -void FilterRules::on_search_type_currentIndexChanged(int index) -{ - Q_UNUSED(index); - updateChecking(); -} - -void FilterRules::on_need_match_all_clicked() -{ - updateChecking(); -} - -void FilterRules::on_buttonBox_clicked(QAbstractButton *button) -{ - if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) - reject(); - else - { - haveBeenValided=true; - accept(); - } -} diff --git a/plugins/CopyEngine/Ultracopier/FilterRules.h b/plugins/CopyEngine/Ultracopier/FilterRules.h deleted file mode 100644 index 0838792..0000000 --- a/plugins/CopyEngine/Ultracopier/FilterRules.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef FILTERRULES_H -#define FILTERRULES_H - -#include -#include -#include - -#include "StructEnumDefinition_CopyEngine.h" - -namespace Ui { -class FilterRules; -} - -/** All the filter rules to include/exclude some file during the listing */ -class FilterRules : public QDialog -{ - Q_OBJECT - -public: - explicit FilterRules(QWidget *parent = 0); - ~FilterRules(); - bool getIsValid(); - std::string get_search_text(); - SearchType get_search_type(); - ApplyOn get_apply_on(); - bool get_need_match_all(); - void set_search_text(std::string search_text); - void set_search_type(SearchType search_type); - void set_apply_on(ApplyOn apply_on); - void set_need_match_all(bool need_match_all); -private slots: - void on_search_textChanged(const std::string &arg1); - void on_isValid_clicked(); - void on_testString_textChanged(const std::string &arg1); - void on_matched_clicked(); - void on_search_type_currentIndexChanged(int index); - void on_need_match_all_clicked(); - void on_buttonBox_clicked(QAbstractButton *button); -private: - Ui::FilterRules *ui; - void updateChecking(); - bool isValid; - bool haveBeenValided; -}; - -#endif // FILTERRULES_H diff --git a/plugins/CopyEngine/Ultracopier/FilterRules.ui b/plugins/CopyEngine/Ultracopier/FilterRules.ui deleted file mode 100644 index a4006fe..0000000 --- a/plugins/CopyEngine/Ultracopier/FilterRules.ui +++ /dev/null @@ -1,162 +0,0 @@ - - - FilterRules - - - Qt::WindowModal - - - - 0 - 0 - 289 - 231 - - - - Filters dialog - - - - :/CopyEngine/resources/resources/filter.png:/CopyEngine/resources/resources/filter.png - - - - 1 - - - 1 - - - - - Search: - - - - - - - - - - Search type: - - - - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - - - - Apply on: - - - - - - - - File - - - - - Folder - - - - - File and folder - - - - - - - - Whole string must match - - - - - - - Checking - - - - - - The regex is valid - - - - - - - Test string: - - - - - - - - - - The test string matches with the regex - - - - - - - - - - - - Qt::Horizontal - - - - 68 - 20 - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - - diff --git a/plugins/CopyEngine/Ultracopier/Filters.cpp b/plugins/CopyEngine/Ultracopier/Filters.cpp deleted file mode 100644 index c7b1526..0000000 --- a/plugins/CopyEngine/Ultracopier/Filters.cpp +++ /dev/null @@ -1,460 +0,0 @@ -#include "Filters.h" -#include "ui_Filters.h" -#include "../../../cpp11addition.h" - -#include - -Filters::Filters(QWidget *parent) : - QDialog(parent), - ui(new Ui::Filters) -{ - ui->setupUi(this); -} - -Filters::~Filters() -{ - delete ui; -} - -void Filters::setFilters(std::vector includeStrings,std::vector includeOptions,std::vector excludeStrings,std::vector excludeOptions) -{ - if(includeStrings.size()!=includeOptions.size() || excludeStrings.size()!=excludeOptions.size()) - return; - Filters_rules new_item; - - include.clear(); - unsigned int index=0; - while(index<(unsigned int)includeStrings.size()) - { - new_item.search_text=includeStrings.at(index); - std::vector options=stringsplit(includeOptions.at(index),';'); - new_item.need_match_all=false; - new_item.search_type=SearchType_rawText; - new_item.apply_on=ApplyOn_fileAndFolder; - - if(vectorcontainsAtLeastOne(options,std::string("SearchType_simpleRegex"))) - new_item.search_type=SearchType_simpleRegex; - if(vectorcontainsAtLeastOne(options,std::string("SearchType_perlRegex"))) - new_item.search_type=SearchType_perlRegex; - if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_file"))) - new_item.apply_on=ApplyOn_file; - if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_folder"))) - new_item.apply_on=ApplyOn_folder; - if(vectorcontainsAtLeastOne(options,std::string("need_match_all"))) - new_item.need_match_all=true; - - if(convertToRegex(new_item)) - include.push_back(new_item); - - index++; - } - - exclude.clear(); - index=0; - while(index options=stringsplit(excludeOptions.at(index),';'); - new_item.need_match_all=false; - new_item.search_type=SearchType_rawText; - new_item.apply_on=ApplyOn_fileAndFolder; - - if(vectorcontainsAtLeastOne(options,std::string("SearchType_simpleRegex"))) - new_item.search_type=SearchType_simpleRegex; - if(vectorcontainsAtLeastOne(options,std::string("SearchType_perlRegex"))) - new_item.search_type=SearchType_perlRegex; - if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_file"))) - new_item.apply_on=ApplyOn_file; - if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_folder"))) - new_item.apply_on=ApplyOn_folder; - if(vectorcontainsAtLeastOne(options,std::string("need_match_all"))) - new_item.need_match_all=true; - - if(convertToRegex(new_item)) - exclude.push_back(new_item); - - index++; - } - - reShowAll(); -} - -void Filters::reShowAll() -{ - ui->inclusion->clear(); - unsigned int index=0; - while(index<(unsigned int)include.size()) - { - std::string entryShow=include.at(index).search_text+" ("; - std::vector optionsToShow; - switch(include.at(index).search_type) - { - case SearchType_rawText: - optionsToShow.push_back(tr("Raw text").toStdString()); - break; - case SearchType_simpleRegex: - optionsToShow.push_back(tr("Simplified regex").toStdString()); - break; - case SearchType_perlRegex: - optionsToShow.push_back(tr("Perl's regex").toStdString()); - break; - default: - break; - } - switch(include.at(index).apply_on) - { - case ApplyOn_file: - optionsToShow.push_back(tr("Only on file").toStdString()); - break; - case ApplyOn_folder: - optionsToShow.push_back(tr("Only on folder").toStdString()); - break; - default: - break; - } - if(include.at(index).need_match_all) - optionsToShow.push_back(tr("Full match").toStdString()); - entryShow+=stringimplode(optionsToShow,","); - entryShow+=")"; - ui->inclusion->addItem(new QListWidgetItem(QString::fromStdString(entryShow))); - index++; - } - ui->exclusion->clear(); - index=0; - while(index<(unsigned int)exclude.size()) - { - std::string entryShow=exclude.at(index).search_text+" ("; - std::vector optionsToShow; - switch(exclude.at(index).search_type) - { - case SearchType_rawText: - optionsToShow.push_back(tr("Raw text").toStdString()); - break; - case SearchType_simpleRegex: - optionsToShow.push_back(tr("Simplified regex").toStdString()); - break; - case SearchType_perlRegex: - optionsToShow.push_back(tr("Perl's regex").toStdString()); - break; - default: - break; - } - switch(exclude.at(index).apply_on) - { - case ApplyOn_file: - optionsToShow.push_back(tr("Only on file").toStdString()); - break; - case ApplyOn_folder: - optionsToShow.push_back(tr("Only on folder").toStdString()); - break; - default: - break; - } - if(exclude.at(index).need_match_all) - optionsToShow.push_back(tr("Full match").toStdString()); - entryShow+=stringimplode(optionsToShow,","); - entryShow+=")"; - ui->exclusion->addItem(new QListWidgetItem(QString::fromStdString(entryShow))); - index++; - } -} - -std::vector Filters::getInclude() const -{ - return include; -} - -std::vector Filters::getExclude() const -{ - return exclude; -} - -void Filters::newLanguageLoaded() -{ - ui->retranslateUi(this); - reShowAll(); -} - -void Filters::updateFilters() -{ - std::vector includeStrings,includeOptions,excludeStrings,excludeOptions; - unsigned int index=0; - while(index<(unsigned int)include.size()) - { - includeStrings.push_back(include.at(index).search_text); - std::vector optionsToShow; - - switch(include.at(index).search_type) - { - case SearchType_rawText: - optionsToShow.push_back("SearchType_rawText"); - break; - case SearchType_simpleRegex: - optionsToShow.push_back("SearchType_simpleRegex"); - break; - case SearchType_perlRegex: - optionsToShow.push_back("SearchType_perlRegex"); - break; - default: - break; - } - switch(include.at(index).apply_on) - { - case ApplyOn_file: - optionsToShow.push_back("ApplyOn_file"); - break; - case ApplyOn_fileAndFolder: - optionsToShow.push_back("ApplyOn_fileAndFolder"); - break; - case ApplyOn_folder: - optionsToShow.push_back("ApplyOn_folder"); - break; - default: - break; - } - if(include.at(index).need_match_all) - optionsToShow.push_back(tr("Full match").toStdString()); - includeOptions.push_back(stringimplode(optionsToShow,";")); - index++; - } - index=0; - while(index<(unsigned int)exclude.size()) - { - excludeStrings.push_back(exclude.at(index).search_text); - std::vector optionsToShow; - - switch(exclude.at(index).search_type) - { - case SearchType_rawText: - optionsToShow.push_back("SearchType_rawText"); - break; - case SearchType_simpleRegex: - optionsToShow.push_back("SearchType_simpleRegex"); - break; - case SearchType_perlRegex: - optionsToShow.push_back("SearchType_perlRegex"); - break; - default: - break; - } - switch(exclude.at(index).apply_on) - { - case ApplyOn_file: - optionsToShow.push_back("ApplyOn_file"); - break; - case ApplyOn_fileAndFolder: - optionsToShow.push_back("ApplyOn_fileAndFolder"); - break; - case ApplyOn_folder: - optionsToShow.push_back("ApplyOn_folder"); - break; - default: - break; - } - if(exclude.at(index).need_match_all) - optionsToShow.push_back(tr("Full match").toStdString()); - excludeOptions.push_back(stringimplode(optionsToShow,";")); - index++; - } - emit sendNewFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); - emit haveNewFilters(); -} - -bool Filters::convertToRegex(Filters_rules &item) -{ - bool isValid=!item.search_text.empty(); - if(isValid) - { - std::regex regex; - std::string tempString; - if(item.search_type==SearchType_rawText) - { - tempString=QRegularExpression::escape(QString::fromStdString(item.search_text)).toStdString(); - if(tempString.find('/') != std::string::npos || tempString.find('\\') != std::string::npos) - isValid=false; - } - else if(item.search_type==SearchType_simpleRegex) - { - tempString=QRegularExpression::escape(QString::fromStdString(item.search_text)).toStdString(); - stringreplaceAll(tempString,"\\*","[^\\\\/]*"); - } - else if(item.search_type==SearchType_perlRegex) - { - tempString=item.search_text; - if(stringStartWith(tempString,'^') && stringEndsWith(tempString,'$')) - { - item.need_match_all=true; - if(stringStartWith(tempString,'^')) - tempString=tempString.substr(1,tempString.size()-1); - if(stringEndsWith(tempString,'$')) - tempString=tempString.substr(0,tempString.size()-1); - item.search_text=tempString; - } - } - if(isValid) - { - if(item.need_match_all==true) - tempString="^"+tempString+"$"; - regex=std::regex(tempString); - //isValid=regex.isValid(); - item.regex=regex; - return true; - } - else - return false; - } - return false; -} - -void Filters::on_remove_exclusion_clicked() -{ - bool removedEntry=false; - int index=0; - while(indexexclusion->count()) - { - if(ui->exclusion->item(index)->isSelected()) - { - delete ui->exclusion->item(index); - exclude.erase(exclude.cbegin()+index); - removedEntry=true; - } - else - index++; - } - if(removedEntry) - { - reShowAll(); - updateFilters(); - } -} - -void Filters::on_remove_inclusion_clicked() -{ - bool removedEntry=false; - int index=0; - while(indexinclusion->count()) - { - if(ui->inclusion->item(index)->isSelected()) - { - delete ui->inclusion->item(index); - include.erase(include.cbegin()+index); - removedEntry=true; - } - else - index++; - } - if(removedEntry) - { - reShowAll(); - updateFilters(); - } -} - -void Filters::on_add_exclusion_clicked() -{ - FilterRules dialog(this); - dialog.exec(); - if(dialog.getIsValid()) - { - Filters_rules new_item; - new_item.apply_on=dialog.get_apply_on(); - new_item.need_match_all=dialog.get_need_match_all(); - new_item.search_text=dialog.get_search_text(); - new_item.search_type=dialog.get_search_type(); - exclude.push_back(new_item); - reShowAll(); - updateFilters(); - } -} - -void Filters::on_buttonBox_clicked(QAbstractButton *button) -{ - if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) - reject(); -} - -void Filters::on_add_inclusion_clicked() -{ - FilterRules dialog(this); - dialog.exec(); - if(dialog.getIsValid()) - { - Filters_rules new_item; - new_item.apply_on=dialog.get_apply_on(); - new_item.need_match_all=dialog.get_need_match_all(); - new_item.search_text=dialog.get_search_text(); - new_item.search_type=dialog.get_search_type(); - if(convertToRegex(new_item)) - include.push_back(new_item); - reShowAll(); - updateFilters(); - } -} - -void Filters::on_edit_exclusion_clicked() -{ - bool editedEntry=false; - int index=0; - while(indexexclusion->count()) - { - if(ui->exclusion->item(index)->isSelected()) - { - FilterRules dialog(this); - dialog.set_apply_on(exclude.at(index).apply_on); - dialog.set_need_match_all(exclude.at(index).need_match_all); - dialog.set_search_text(exclude.at(index).search_text); - dialog.set_search_type(exclude.at(index).search_type); - dialog.exec(); - if(dialog.getIsValid()) - { - exclude[index].apply_on=dialog.get_apply_on(); - exclude[index].need_match_all=dialog.get_need_match_all(); - exclude[index].search_text=dialog.get_search_text(); - exclude[index].search_type=dialog.get_search_type(); - if(!convertToRegex(exclude[index])) - exclude.erase(exclude.cbegin()+index); - editedEntry=true; - } - } - index++; - } - if(editedEntry) - { - reShowAll(); - updateFilters(); - } -} - -void Filters::on_edit_inclusion_clicked() -{ - bool editedEntry=false; - int index=0; - while(indexinclusion->count()) - { - if(ui->inclusion->item(index)->isSelected()) - { - FilterRules dialog(this); - dialog.set_apply_on(exclude.at(index).apply_on); - dialog.set_need_match_all(exclude.at(index).need_match_all); - dialog.set_search_text(exclude.at(index).search_text); - dialog.set_search_type(exclude.at(index).search_type); - dialog.exec(); - if(dialog.getIsValid()) - { - exclude[index].apply_on=dialog.get_apply_on(); - exclude[index].need_match_all=dialog.get_need_match_all(); - exclude[index].search_text=dialog.get_search_text(); - exclude[index].search_type=dialog.get_search_type(); - if(!convertToRegex(exclude[index])) - exclude.erase(exclude.cbegin()+index); - editedEntry=true; - } - } - index++; - } - if(editedEntry) - { - reShowAll(); - updateFilters(); - } -} diff --git a/plugins/CopyEngine/Ultracopier/Filters.h b/plugins/CopyEngine/Ultracopier/Filters.h deleted file mode 100644 index 6645afc..0000000 --- a/plugins/CopyEngine/Ultracopier/Filters.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef FILTERS_H -#define FILTERS_H - -#include -#include - -#include "FilterRules.h" -#include "StructEnumDefinition_CopyEngine.h" - -namespace Ui { -class Filters; -} - -/** To add/edit one filter rules */ -class Filters : public QDialog -{ - Q_OBJECT -public: - explicit Filters(QWidget *parent = 0); - ~Filters(); - void setFilters(std::vector includeStrings, std::vector includeOptions, std::vector excludeStrings, std::vector excludeOptions); - void reShowAll(); - std::vector getInclude() const; - std::vector getExclude() const; - void newLanguageLoaded(); -private: - Ui::Filters *ui; - std::vector include; - std::vector exclude; - void updateFilters(); - bool convertToRegex(Filters_rules &item); -signals: - void sendNewFilters(const std::vector &includeStrings,const std::vector &includeOptions,const std::vector &excludeStrings,const std::vector &excludeOptions) const; - void haveNewFilters() const; -private slots: - void on_remove_exclusion_clicked(); - void on_remove_inclusion_clicked(); - void on_add_exclusion_clicked(); - void on_buttonBox_clicked(QAbstractButton *button); - void on_add_inclusion_clicked(); - void on_edit_exclusion_clicked(); - void on_edit_inclusion_clicked(); -}; - -#endif // FILTERS_H diff --git a/plugins/CopyEngine/Ultracopier/Filters.ui b/plugins/CopyEngine/Ultracopier/Filters.ui deleted file mode 100644 index 33822af..0000000 --- a/plugins/CopyEngine/Ultracopier/Filters.ui +++ /dev/null @@ -1,194 +0,0 @@ - - - Filters - - - - 0 - 0 - 507 - 502 - - - - Filters - - - - :/CopyEngine/Ultracopier/resources/filter.png:/CopyEngine/Ultracopier/resources/filter.png - - - - 1 - - - 1 - - - - - Exclusion filters - - - - 1 - - - 2 - - - - - QAbstractItemView::MultiSelection - - - - - - - - - - :/CopyEngine/Ultracopier/resources/add.png:/CopyEngine/Ultracopier/resources/add.png - - - - - - - - :/CopyEngine/Ultracopier/resources/edit.png:/CopyEngine/Ultracopier/resources/edit.png - - - - - - - - :/CopyEngine/Ultracopier/resources/remove.png:/CopyEngine/Ultracopier/resources/remove.png - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - Inclusion filters - - - - 1 - - - 2 - - - - - None = Include all - - - - - - - - - QAbstractItemView::MultiSelection - - - - - - - - - - :/CopyEngine/Ultracopier/resources/add.png:/CopyEngine/Ultracopier/resources/add.png - - - - - - - - :/CopyEngine/Ultracopier/resources/edit.png:/CopyEngine/Ultracopier/resources/edit.png - - - - - - - - :/CopyEngine/Ultracopier/resources/remove.png:/CopyEngine/Ultracopier/resources/remove.png - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QDialogButtonBox::Cancel - - - - - - - - - - - - diff --git a/plugins/CopyEngine/Ultracopier/FolderExistsDialog.cpp b/plugins/CopyEngine/Ultracopier/FolderExistsDialog.cpp deleted file mode 100644 index 59466ed..0000000 --- a/plugins/CopyEngine/Ultracopier/FolderExistsDialog.cpp +++ /dev/null @@ -1,202 +0,0 @@ -#include "FolderExistsDialog.h" -#include "ui_folderExistsDialog.h" -#include "TransferThread.h" - -#ifdef Q_OS_WIN32 -#define CURRENTSEPARATOR "\\" -#else -#define CURRENTSEPARATOR "/" -#endif - -#include -#include -#include - -FolderExistsDialog::FolderExistsDialog(QWidget *parent, QFileInfo source, bool isSame, QFileInfo destination, std::string firstRenamingRule, std::string otherRenamingRule) : - QDialog(parent), - ui(new Ui::folderExistsDialog) -{ - Qt::WindowFlags flags = windowFlags(); - #ifdef Q_OS_LINUX - flags=flags & ~Qt::X11BypassWindowManagerHint; - #endif - flags=flags | Qt::WindowStaysOnTopHint; - setWindowFlags(flags); - - ui->setupUi(this); - action=FolderExists_Cancel; - oldName=TransferThread::resolvedName(destination); - ui->lineEditNewName->setText(QString::fromStdString(oldName)); - ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); - ui->label_content_source_modified->setText(source.lastModified().toString()); - ui->label_content_source_folder_name->setText(source.fileName()); - QString folder=source.absolutePath(); - if(folder.size()>80) - folder=folder.mid(0,38)+"..."+folder.mid(folder.size()-38); - ui->label_content_source_folder->setText(folder); - if(ui->label_content_source_folder_name->text().isEmpty()) - { - ui->label_source_folder_name->hide(); - ui->label_content_source_folder_name->hide(); - } - if(isSame) - { - this->destinationInfo=source; - ui->label_source->hide(); - ui->label_destination->hide(); - ui->label_destination_modified->hide(); - ui->label_destination_folder_name->hide(); - ui->label_destination_folder->hide(); - ui->label_content_destination_modified->hide(); - ui->label_content_destination_folder_name->hide(); - ui->label_content_destination_folder->hide(); - } - else - { - this->destinationInfo=destination; - this->setWindowTitle(tr("Folder already exists")); - ui->label_content_destination_modified->setText(destination.lastModified().toString()); - ui->label_content_destination_folder_name->setText(destination.fileName()); - QString folder=destination.absolutePath(); - if(folder.size()>80) - folder=folder.mid(0,38)+"..."+folder.mid(folder.size()-38); - ui->label_content_destination_folder->setText(folder); - if(ui->label_content_destination_folder_name->text().isEmpty()) - { - ui->label_destination_folder_name->hide(); - ui->label_content_destination_folder_name->hide(); - } - } - this->firstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; - on_SuggestNewName_clicked(); -} - -FolderExistsDialog::~FolderExistsDialog() -{ - delete ui; -} - -void FolderExistsDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -std::string FolderExistsDialog::getNewName() -{ - if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) - return ""; - else - return ui->lineEditNewName->text().toStdString(); -} - -void FolderExistsDialog::on_SuggestNewName_clicked() -{ - QFileInfo destinationInfo=this->destinationInfo; - QString absolutePath=destinationInfo.absolutePath(); - QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); - QString suffix; - QString destination; - QString newFileName; - //resolv the suffix - if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) - { - suffix=fileName; - suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); - fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); - } - //resolv the new name - int num=1; - do - { - if(num==1) - { - if(firstRenamingRule.empty()) - newFileName=tr("%name% - copy"); - else - { - newFileName=QString::fromStdString(firstRenamingRule); - } - } - else - { - if(otherRenamingRule.empty()) - newFileName=tr("%name% - copy (%number%)"); - else - newFileName=QString::fromStdString(otherRenamingRule); - newFileName.replace(QStringLiteral("%number%"),QString::number(num)); - } - newFileName.replace(QStringLiteral("%name%"),fileName); - destination=absolutePath+CURRENTSEPARATOR+newFileName+suffix; - destinationInfo.setFile(destination); - num++; - } - while(destinationInfo.exists()); - ui->lineEditNewName->setText(newFileName); -} - -void FolderExistsDialog::on_Rename_clicked() -{ - action=FolderExists_Rename; - this->close(); -} - -void FolderExistsDialog::on_Skip_clicked() -{ - action=FolderExists_Skip; - this->close(); -} - -void FolderExistsDialog::on_Cancel_clicked() -{ - action=FolderExists_Cancel; - this->close(); -} - -FolderExistsAction FolderExistsDialog::getAction() -{ - return action; -} - -bool FolderExistsDialog::getAlways() -{ - return ui->checkBoxAlways->isChecked(); -} - -void FolderExistsDialog::on_Merge_clicked() -{ - action=FolderExists_Merge; - this->close(); -} - -void FolderExistsDialog::on_lineEditNewName_editingFinished() -{ - updateRenameButton(); -} - -void FolderExistsDialog::on_lineEditNewName_returnPressed() -{ - updateRenameButton(); - if(ui->Rename->isEnabled()) - on_Rename_clicked(); - else - QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); -} - -void FolderExistsDialog::on_lineEditNewName_textChanged(const std::string &arg1) -{ - Q_UNUSED(arg1); - updateRenameButton(); -} - -void FolderExistsDialog::updateRenameButton() -{ - ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); -} diff --git a/plugins/CopyEngine/Ultracopier/FolderExistsDialog.h b/plugins/CopyEngine/Ultracopier/FolderExistsDialog.h deleted file mode 100644 index a3bcf67..0000000 --- a/plugins/CopyEngine/Ultracopier/FolderExistsDialog.h +++ /dev/null @@ -1,57 +0,0 @@ -/** \file folderExistsDialog.h -\brief Define the dialog when file exists -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef FOLDERISSAMEDIALOG_H -#define FOLDERISSAMEDIALOG_H - -#include -#include -#include -#include -#include - -#include "Environment.h" - -namespace Ui { - class folderExistsDialog; -} - -/// \brief to show file exists dialog, and ask what do -class FolderExistsDialog : public QDialog -{ - Q_OBJECT - -public: - /// \brief create the object and pass all the informations to it - explicit FolderExistsDialog(QWidget *parent,QFileInfo source,bool isSame,QFileInfo destination,std::string firstRenamingRule,std::string otherRenamingRule); - ~FolderExistsDialog(); - /// \brief return the the always checkbox is checked - bool getAlways(); - /// \brief return the action clicked - FolderExistsAction getAction(); - /// \brief return the new rename is case in manual renaming - std::string getNewName(); -protected: - void changeEvent(QEvent *e); -private slots: - void updateRenameButton(); - void on_SuggestNewName_clicked(); - void on_Rename_clicked(); - void on_Skip_clicked(); - void on_Cancel_clicked(); - void on_Merge_clicked(); - void on_lineEditNewName_editingFinished(); - void on_lineEditNewName_returnPressed(); - void on_lineEditNewName_textChanged(const std::string &arg1); -private: - Ui::folderExistsDialog *ui; - FolderExistsAction action; - std::string oldName; - std::string firstRenamingRule; - std::string otherRenamingRule; - QFileInfo destinationInfo; -}; - -#endif // FOLDERISSAMEDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier/Languages/ar/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/ar/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/ar/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/de/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/de/translation.ts deleted file mode 100644 index fb6408e..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/de/translation.ts +++ /dev/null @@ -1,1292 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - Auf dieser Plattform nicht unterstützt - - - - Last modified date is wrong - Datum der letzten Änderung ist falsch - - - - Last access date is wrong - - Datum des letzten Zugriffs ist falsch - - - - Unknown error: %1 - Unbekannter Fehler: %1 - - - - Unknown error - Unbekannter Fehler - - - - Path conversion error - Pfad Konvertierungsfehler - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - Verschiebemodus - Sie können nicht kopieren - - - - - The engine is forced to copy, you can't move with it - Kopiermodus - Sie können nicht verschieben - - - - Destination - Ziel - - - - Use the actual destination "%1"? - Aktuelles Ziel: "%1" benutzen? - - - - The mode has been forced previously. This is an internal error, please report it - Der Modus wurde vorher erzwungen. Interner Fehler - Bitte bei mir melden! - - - - - - - Ask - Fragen - - - - - - - Skip - Überspringen - - - - Merge - Fusionieren - - - - - Rename - Umbenennen - - - - Put at the end - Ans Ende verschieben - - - - Overwrite - Überschreiben - - - - Overwrite if different - Überschreiben, falls verschieden - - - - Overwrite if newer - Überschreiben, falls neuer - - - - Overwrite if older - Überschreiben, falls älter - - - - Automatic - Automatisch - - - - Sequential - Sequentiell - - - - Parallel - Parallel - - - - Options error - Fehlerhafte Optionen - - - - Options engine is not loaded. Unable to access the filters - Optionen nicht geladen - Kein Zugriff auf Filter - - - - CopyEngineFactory - - - - - - Ask - Fragen - - - - - - - Skip - Überspringen - - - - Merge - Fusionieren - - - - - Rename - Umbenennen - - - - Put at the end - Ans Ende verschieben - - - - Overwrite - Überschreiben - - - - Overwrite if different - Überschreiben, falls verschieden - - - - Overwrite if newer - Überschreiben, falls neuer - - - - Overwrite if older - Überschreiben, falls älter - - - - Automatic - Automatisch - - - - Sequential - Sequentiell - - - - Parallel - Parallel - - - - - Options error - Fehlerhafte Optionen - - - - Options engine is not loaded. Unable to access the filters - Option nicht geladen - Kein Zugriff auf Filter - - - - Options engine is not loaded, can't access to the filters - Option nicht geladen - Kann nicht auf Filter zugreifen - - - - DiskSpace - - - Disk space - Speicherplatz - - - - You need more space on this drive to finish this transfer - Zu wenig Speicherplatz auf diesem Laufwerk - - - - Continue - Fortsetzen - - - - Cancel - Abbrechen - - - - Drives %1 have %2 available but need %3 - Laufwerk %1: %2 verfügbar %3 benötigt - - - - FileErrorDialog - - - Error on folder - Ordnerfehler - - - - Folder name - Ordnername - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - Fehler - - - - Try rename with using special characters - Versuche Umbenennung mit Sonderzeichen - - - - FileIsSameDialog - - - %name% - copy - %name% - Kopie - - - - %name% - copy (%number%) - %name% - Kopie (%number%) - - - - Error - Fehler - - - - Try rename with using special characters - Versuche Umbenennung mit Sonderzeichen - - - - FilterRules - - - Search: - Suche: - - - - Search type: - Suche (Typ): - - - - Raw text - Roh-Text - - - - Simplified regex - Vereinfachte RegEx - - - - Perl's regex - Perls RegEx - - - - Apply on: - Anwenden auf: - - - - File - Datei - - - - Folder - Ordner - - - - File and folder - Datei und Ordner - - - - The test string matches with the regex - Die Test-Zeichenfolge stimmt mit RegEx überein - - - - Checking - Überprüfen - - - - Test string: - Test-Zeichenfolge: - - - - Filters dialog - Filter-Dialog - - - - Whole string must match - Ganze Zeichenfolge muss übereinstimmen - - - - The regex is valid - Die RegEx ist gültig - - - - Filters - - - Filters - Filter - - - - Exclusion filters - Ausschließungs-Filter - - - - Inclusion filters - Einschließungs-Filter - - - - None = Include all - Keiner = Alle einschließen - - - - - Raw text - Roh-Text - - - - - Simplified regex - Vereinfachte RegEx - - - - - Perl's regex - Perls RegEx - - - - - Only on file - Nur auf Datei - - - - - Only on folder - Nur auf Ordner - - - - - - - Full match - Volle Übereinstimmung - - - - FolderExistsDialog - - - Folder already exists - Ordner existiert bereits - - - - %name% - copy - %name% - Kopie - - - - %name% - copy (%number%) - %name% - Kopie (%number%) - - - - Error - Fehler - - - - Try rename with using special characters - Versuche Umbenennung mit Sonderzeichen - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - Falscher Modus: %1 - Kann Element nicht verschieben oder kopieren - - - - - Unable to save the transfer list: %1 - Konnte die Transferliste: %1 nicht speichern - - - - Problem reading file, or file-size is 0 - Lesefehler, oder Dateigröße=0 - - - - Wrong header: "%1" - Falscher Header: "%1" - - - - The transfer list is in mixed mode, but this instance is not in this mode - Die Transferliste ist im gemischten Modus, aber diese Instanz ist nicht im selben Modus - - - - The transfer list is in copy mode, but this instance is not in this mode - Die Transferliste ist im Kopiermodus, aber diese Instanz ist nicht im selben Modus - - - - The transfer list is in move mode, but this instance is not in this mode - Die Transferliste ist im Verschiebe-Modus, aber diese Instanz ist nicht im selben Modus - - - - Some errors have been found during the line parsing - Bei der Zeilenanalyse sind Fehler aufgetreten - - - - Unable to open the transfer list: %1 - Transferliste: %1 kann nicht geöffnet werden - - - - MkPath - - - Unable to create the folder - Der Ordner kann nicht erstellt werden - - - - The source folder don't exists - Quell-Ordner existiert nicht - - - - Unable to temporary rename the folder - Kann den Ordner nicht temporär umbenennen - - - - Unable to do the final real move the folder - Kann den Ordner nicht endgültig verschieben - - - - Unable to move the folder - Kann den Ordner nicht verschieben - - - - - Unable to remove - Kann nicht löschen - - - - ReadThread - - - Internal error, please report it! - Interner Fehler - Bitte bei mir melden! - - - - Internal error reading the source file:block size out of range - Interner Fehler beim Lesen der Quelldatei: Blockgröße außerhalb des zulässigen Bereichs - - - - - Unable to read the source file: - Die Quelldatei kann nicht gelesen werden: - - - - - File truncated during the read, possible data change - Datei während des Lesevorgangs abgeschnitten, Daten wurden möglicherweise verändert - - - - RenamingRules - - - First renaming - Erste Umbenennung - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - Zweite Umbenennung - - - - - %1 - copy - %1 - Kopie - - - - - %1 - copy (%2) - %1 - Kopie (%2) - - - - Renaming rules - Umbennungsregeln - - - - ScanFileOrFolder - - - Blacklisted folder - Ordner der schwarzen Liste - - - - %1 - copy - %1 - Kopie - - - - %1 - copy (%2) - %1 - Kopie (%2) - - - - %name% - copy - %name% - Kopie - - - - %name% - copy (%number%) - %name% - Kopie (%number%) - - - - This is not a folder - Dies ist kein Ordner - - - - The folder does exists - Ordner existiert bereits - - - - The folder is not readable - Der Ordner kann nicht gelesen werden - - - - Problem with name encoding - Problem mit der Namen-Encodierung - - - - TransferThread - - - - - - File not found - Datei nicht gefunden - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - Interner Fehler: Bereits geöffnet - - - - Drive %1 - Laufwerk %1 - - - - Unknown folder - Unbekannter Ordner - - - - root - Stammverzeichnis - - - - The source doesn't exist - Quelle existiert nicht - - - - - - Unable to change the date - - - - - - The source file doesn't exist - Quelldatei existiert nicht - - - - The checksums do not match - Prüfsummen sind verschieden - - - - Internal error: The size transfered doesn't match - Interner Fehler: Ubertragene Größe ungleich - - - - - Unable to do the folder - Ordner kann nicht erstellt werden - - - - Try rename with using special characters - Versuche Umbenennung mit Sonderzeichen - - - - %name% - copy - %name% - Kopie - - - - %name% - copy (%number%) - %name% - Kopie (%number%) - - - - Another file exists at same place - Andere Datei befindet sich am selben Ort - - - - Internal error: The destination is not closed - Interner Fehler: Ziel ist nicht geschlossen - - - - Internal error: The buffer is not empty - Interner Fehler: Puffer ist nicht leer - - - - WriteThread - - - Path resolution error (Empty path) - Pfad-Auflösungsfehler (leerer Pfad) - - - - Internal error, please report it! - Interner Fehler - Bitte bei mir melden! - - - - Unable to read the source file: - Quelldatei kann nicht gelesen werden: - - - - File truncated during read, possible data change - Datenabbruch beim Lesen, Daten wurden möglicherweise verändert - - - - copyEngineOptions - - - Transfer - Übertragung - - - - Move the whole folder - Verschiebe den ganzen Ordner - - - - Transfer the file rights - Übertrage die Dateirechte - - - - Keep the file date - Datum der Dateien beibehalten - - - - Autostart the transfer - Übertragung automatisch starten - - - - - Less performance if checked - Leistung drosseln - - - - Follow the strict order - Genau nach Reihenfolge - - - - Error and collision - Fehler und Kollision - - - - When folder error - Bei Ordnerfehlern: - - - - When file error - Bei Dateifehlern: - - - - When file collision - Bei Dateikollisionen: - - - - When folder collision - Bei Ordnerkollisionen: - - - - Check if destination folder exists - Prüfen ob Zielordner vorhanden ist - - - - Renaming rules - Umbennungsregeln - - - - Delete partially transferred files - Unvollständig übertragene Dateien löschen - - - - Rename the original destination - Original-Ziel umbenennen - - - - Control - Überprüfung - - - - Checksum - Prüfsumme - - - - Only after error - Nur nach einem Fehler - - - - Ignore if impossible - Ignorieren falls unmöglich - - - - Verify checksums - Prüfsummen vergleichen - - - - Performance - Leistung - - - - Parallel buffer - Paralleler Puffer - - - - - - - - KB - KB - - - - Block size - Blockgröße - - - - Sequential buffer - Sequentieller Puffer - - - - Enable OS buffer - OS-Puffer aktivieren - - - - OS buffer only if smaller than - OS-Puffer nur verwenden, wenn kleiner als - - - - Transfer algorithm - Übertragungs-Algorithmus - - - - Parallelize if smaller than - Parallelisieren wenn kleiner als - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - Verschiedenes - - - - Check the disk space - Auf freien Speicherplatz überprüfen - - - - Use this folder when destination is not set - - - - - Browse - Wählen - - - - Filters - Filter - - - - fileErrorDialog - - - Error with file - Dateifehler - - - - Error - Fehler - - - - Size - Größe - - - - Modified - Geändert - - - - File name - Dateiname - - - - Destination - Ziel - - - - Folder - Ordner - - - - &Always perform this action - &Aktion immer ausführen - - - - Try in with elevated privileges - Mit erweiterten Rechten versuchen - - - - Put to bottom - Ans Ende verschieben - - - - Retry - Wiederholen - - - - &Skip - Über&springen - - - - &Cancel - Abbrechen (&C) - - - - fileExistsDialog - - - The file exists - Die Datei existiert - - - - Source - Quelle - - - - Destination - Ziel - - - - - Size - Größe - - - - - Modified - Geändert - - - - - File name - Dateiname - - - - - Folder - Ordner - - - - Suggest new &name - Neuen &Namen vorschlagen - - - - &Always perform this action - &Aktion immer ausführen - - - - - Overwrite if modification date differs - Überschreiben, falls Änderungsdatum verschieden - - - - &Rename - Umbenennen (&R) - - - - &Overwrite - Überschreiben (&O) - - - - &Skip - Über&springen - - - - &Cancel - Abbrechen (&C) - - - - Overwrite if newer - Überschreiben, falls neuer - - - - - Overwrite if older - Überschreiben, falls älter - - - - fileIsSameDialog - - - Size - Größe - - - - Modified - Geändert - - - - File name - Dateiname - - - - The source and destination are same - Quelle und Ziel sind gleich - - - - Folder - Ordner - - - - Suggest new &name - Neuen &Namen vorschlagen - - - - &Always perform this action - &Aktion immer ausführen - - - - &Rename - Umbenennen (&R) - - - - &Skip - Über&springen - - - - &Cancel - Abbrechen (&C) - - - - folderExistsDialog - - - Source - Quelle - - - - Destination - Ziel - - - - The source and destination is identical - Quelle und Ziel sind identisch - - - - - Modified - Geändert - - - - - Folder name - Ordnername - - - - - Folder - Ordner - - - - Suggest new &name - Neuen &Namen vorschlagen - - - - &Always perform this action - &Aktion immer ausführen - - - - &Rename - Umbenennen (&R) - - - - Merge - Fusionieren - - - - Skip - Überspringen - - - - &Cancel - Abbrechen (&C) - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/el/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/el/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/el/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/en/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/en/translation.ts deleted file mode 100644 index 223e40a..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/en/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Filters dialog - - - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - Whole string must match - - - - - The test string matches with the regex - - - - - Checking - - - - - The regex is valid - - - - - Test string: - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - Renaming rules - - - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/es/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/es/translation.ts deleted file mode 100644 index d69e5eb..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/es/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - No es compatible con esta plataforma - - - - Last modified date is wrong - Fecha de última modificación es incorrecto - - - - Last access date is wrong - Fecha de último acceso es incorrecto - - - - Unknown error: %1 - Error desconocido: %1 - - - - Unknown error - Error desconocido - - - - Path conversion error - Error de conversión de Sendero - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - El motor se ve obligado a moverse, no se puede copiar con ella - - - - - The engine is forced to copy, you can't move with it - El motor se ve obligado a copiar, no te puedes mover con él - - - - Destination - Destino - - - - Use the actual destination "%1"? - Utilice el destino "%1" actual? - - - - The mode has been forced previously. This is an internal error, please report it - El modo se ha visto obligado previamente. Este es un error interno, por favor repórtelo - - - - - - - Ask - Pedir - - - - - - - Skip - Omitir - - - - Merge - Unir - - - - - Rename - Cambiar el nombre - - - - Put at the end - Ponga al final - - - - Overwrite - Sobrescribir - - - - Overwrite if different - Sobrescribir si es diferente - - - - Overwrite if newer - Sobrescribir si nuevo - - - - Overwrite if older - Sobrescribir si es mayor - - - - Automatic - Automático - - - - Sequential - Secuencial - - - - Parallel - Paralelo - - - - Options error - error Opciones - - - - Options engine is not loaded. Unable to access the filters - Opciones del motor no está cargado. No es posible acceder a los filtros - - - - CopyEngineFactory - - - - - - Ask - Pedir - - - - - - - Skip - Omitir - - - - Merge - Unir - - - - - Rename - Cambiar el nombre - - - - Put at the end - Ponga al final - - - - Overwrite - Sobrescribir - - - - Overwrite if different - Sobrescribir si es diferente - - - - Overwrite if newer - Sobrescribir si nuevo - - - - Overwrite if older - Sobrescribir si es mayor - - - - Automatic - Automático - - - - Sequential - Secuencial - - - - Parallel - Paralelo - - - - - Options error - error Opciones - - - - Options engine is not loaded. Unable to access the filters - Opciones del motor no está cargado. No es posible acceder a los filtros - - - - Options engine is not loaded, can't access to the filters - Opciones del motor no está cargado, no se puede acceder a los filtros - - - - DiskSpace - - - Disk space - Espacio en disco - - - - You need more space on this drive to finish this transfer - Necesita más espacio en esta unidad para terminar esta transferencia - - - - Continue - Continuar - - - - Cancel - Cancelar - - - - Drives %1 have %2 available but need %3 - Drives %1 tienen %2 disponible, pero necesitan %3 - - - - FileErrorDialog - - - Error on folder - Error en la carpeta - - - - Folder name - Nombre de la carpeta - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - Error - - - - Try rename with using special characters - Trate de cambiar el nombre con el uso de caracteres especiales - - - - FileIsSameDialog - - - %name% - copy - %name% - copia - - - - %name% - copy (%number%) - %name% - copia (%number%) - - - - Error - Error - - - - Try rename with using special characters - Trate de cambiar el nombre con el uso de caracteres especiales - - - - FilterRules - - - Search: - Buscar: - - - - Search type: - Tipo de búsqueda: - - - - Raw text - texto Fuente - - - - Simplified regex - Regex simplificado - - - - Perl's regex - Perl's regex - - - - Apply on: - Aplicar sobre: - - - - File - Archivos - - - - Folder - Carpeta - - - - File and folder - Archivos y carpeta - - - - The test string matches with the regex - La cadena de prueba coincide con la expresión regular - - - - Checking - Verification - - - - Test string: - Prueba de la cuerda: - - - - Filters dialog - Filtros de diálogo - - - - Whole string must match - Todo cadena debe coincidir - - - - The regex is valid - La expresión regular es válido - - - - Filters - - - Filters - Filtros - - - - Exclusion filters - Filtros de exclusión - - - - Inclusion filters - Filtros de inclusión - - - - None = Include all - Ninguno = Incluya todos los - - - - - Raw text - texto Fuente - - - - - Simplified regex - Simplificado regex - - - - - Perl's regex - Perl's regex - - - - - Only on file - Sólo en el archivo - - - - - Only on folder - Sólo en la carpeta - - - - - - - Full match - Partido completo - - - - FolderExistsDialog - - - Folder already exists - Carpeta ya existe - - - - %name% - copy - %name% - copia - - - - %name% - copy (%number%) - %name% - copia (%number%) - - - - Error - Error - - - - Try rename with using special characters - Trate de cambiar el nombre con el uso de caracteres especiales - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - No se puede hacer para mover o copiar elemento en modo incorrecto obligado: %1 - - - - - Unable to save the transfer list: %1 - No se puede guardar la lista de transferencias: %1 - - - - Problem reading file, or file-size is 0 - Problema al leer el archivo o archivos de tamaño es 0 - - - - Wrong header: "%1" - Encabezado incorrecto: "%1" - - - - The transfer list is in mixed mode, but this instance is not in this mode - La lista de transferencia está en modo mixto, pero este caso no es de este modo - - - - The transfer list is in copy mode, but this instance is not in this mode - La lista de transferencia está en el modo de copia, pero esta instancia no está en este modo - - - - The transfer list is in move mode, but this instance is not in this mode - La lista de transferencia es el modo de desplazamiento, pero esta instancia no está en este modo - - - - Some errors have been found during the line parsing - Algunos errores han sido encontrados durante el análisis de línea - - - - Unable to open the transfer list: %1 - No se puede abrir la lista de transferencias: %1 - - - - MkPath - - - Unable to create the folder - No se puede crear la carpeta - - - - The source folder don't exists - La carpeta de origen no existe - - - - Unable to temporary rename the folder - No es posible cambiar el nombre de la carpeta temporal - - - - Unable to do the final real move the folder - No se puede hacer el movimiento final real de la carpeta - - - - Unable to move the folder - No se puede mover la carpeta - - - - - Unable to remove - No se puede eliminar - - - - ReadThread - - - Internal error, please report it! - Error interno, por favor informe de ello! - - - - Internal error reading the source file:block size out of range - Error interno de leer el archivo de origen: tamaño de bloque fuera de rango - - - - - Unable to read the source file: - No se puede leer el archivo de origen: - - - - - File truncated during the read, possible data change - Archivo truncada durante el cambio de lectura, los datos posibles - - - - RenamingRules - - - First renaming - En primer lugar el cambio de nombre - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - En segundo lugar el cambio de nombre - - - - - %1 - copy - %1 - copia - - - - - %1 - copy (%2) - %1 - copia (%2) - - - - Renaming rules - Reglas de Cambio de nombre - - - - ScanFileOrFolder - - - Blacklisted folder - Carpeta de la lista negra - - - - %1 - copy - %1 - copia - - - - %1 - copy (%2) - %1 - copia (%2) - - - - %name% - copy - %name% - copia - - - - %name% - copy (%number%) - %name% - copia (%number%) - - - - This is not a folder - Esto no es una carpeta - - - - The folder does exists - La carpeta no existe - - - - The folder is not readable - La carpeta no se puede leer - - - - Problem with name encoding - Problema con codificación de nombres - - - - TransferThread - - - - - - File not found - Archivo no encontrado - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - Error interno: Ya la apertura - - - - Drive %1 - Drive %1 - - - - Unknown folder - Desconocido carpeta - - - - root - raíz - - - - The source doesn't exist - La fuente no existe - - - - - - Unable to change the date - - - - - - The source file doesn't exist - El archivo de origen no existe - - - - The checksums do not match - Las sumas de comprobación no coinciden - - - - Internal error: The size transfered doesn't match - Error interno: El tamaño transferido no coincide - - - - - Unable to do the folder - Incapaz de hacer la carpeta - - - - Try rename with using special characters - Trate de cambiar el nombre con el uso de caracteres especiales - - - - %name% - copy - %name% - copia - - - - %name% - copy (%number%) - %name% - copia (%number%) - - - - Another file exists at same place - Otro archivo existe en el mismo lugar - - - - Internal error: The destination is not closed - Error interno: El destino no está cerrado - - - - Internal error: The buffer is not empty - Error interno: El buffer no está vacío - - - - WriteThread - - - Path resolution error (Empty path) - Error de resolución de ruta (camino vacío) - - - - Internal error, please report it! - Error interno, por favor informe de ello! - - - - Unable to read the source file: - No se puede leer el archivo de origen: - - - - File truncated during read, possible data change - Archivo truncado durante lectura, posible cambio de datos - - - - copyEngineOptions - - - Transfer - Transferencia - - - - Move the whole folder - Mueva la carpeta completa - - - - Transfer the file rights - Transferencia de los derechos de archivo - - - - Keep the file date - Mantener la fecha de archivo - - - - Autostart the transfer - Inicio automático de la transferencia - - - - - Less performance if checked - Si comprueba Menos rendimiento - - - - Follow the strict order - Siga el orden estricto - - - - Error and collision - Error y de la colisión - - - - When folder error - Cuando el error carpeta - - - - When file error - Cuando archivo error - - - - When file collision - Cuando archivo colisión - - - - When folder collision - Cuando la colisión carpeta - - - - Check if destination folder exists - Compruebe si existe la carpeta de destino - - - - Renaming rules - Reglas de Cambio de nombre - - - - Delete partially transferred files - Eliminar archivos parcialmente transferidos - - - - Rename the original destination - Cambie el nombre del destino original - - - - Control - Controlar - - - - Checksum - Suma de comprobación - - - - Only after error - Sólo después de un error - - - - Ignore if impossible - No haga caso si no es posible - - - - Verify checksums - Verifique checksums - - - - Performance - Rendimiento - - - - Parallel buffer - Búfer paralelo - - - - - - - - KB - KB - - - - Block size - Tamaño del bloque - - - - Sequential buffer - Tampón secuencial - - - - Enable OS buffer - Habilitar el OS de amortiguación - - - - OS buffer only if smaller than - OS de amortiguación sólo si menor que - - - - Transfer algorithm - Algoritmo de transferencia - - - - Parallelize if smaller than - Paralelice si más pequeño que - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - Misc - - - - Check the disk space - Compruebe el espacio en disco - - - - Use this folder when destination is not set - - - - - Browse - Busque - - - - Filters - Filtros - - - - fileErrorDialog - - - Error with file - Error con el archivo - - - - Error - Error - - - - Size - Tamaño - - - - Modified - Modificado - - - - File name - Nombre de archivo - - - - Destination - Destino - - - - Folder - Carpeta - - - - &Always perform this action - &Siempre realice esta acción - - - - Try in with elevated privileges - Pruebe con privilegios elevados - - - - Put to bottom - Ponga a abajo - - - - Retry - Reintentar - - - - &Skip - &Omitir - - - - &Cancel - Cancelar - - - - fileExistsDialog - - - The file exists - El archivo ya existe - - - - Source - Fuente - - - - Destination - Destino - - - - - Size - Tamaño - - - - - Modified - Modificado - - - - - File name - Nombre de archivo - - - - - Folder - Carpeta - - - - Suggest new &name - Sugerir nuevo &nombre - - - - &Always perform this action - &Siempre realice esta acción - - - - - Overwrite if modification date differs - Sobrescribir si la fecha de modificación difiere - - - - &Rename - &Cambiar el nombre - - - - &Overwrite - &Sobrescribir - - - - &Skip - &Omitir - - - - &Cancel - Ca&ncelar - - - - Overwrite if newer - Sobrescribir si nuevo - - - - - Overwrite if older - Sobrescribir si es mayor - - - - fileIsSameDialog - - - Size - Tamaño - - - - Modified - Modificado - - - - File name - Nombre de archivo - - - - The source and destination are same - El origen y el destino son los mismos - - - - Folder - Carpeta - - - - Suggest new &name - Sugerir nuevo nombre - - - - &Always perform this action - &Siempre realice esta acción - - - - &Rename - Cambiar el nombre - - - - &Skip - Omitir - - - - &Cancel - Cancelar - - - - folderExistsDialog - - - Source - Fuente - - - - Destination - Destino - - - - The source and destination is identical - La fuente y el destino es idéntica - - - - - Modified - Modificado - - - - - Folder name - Nombre de la carpeta - - - - - Folder - Carpeta - - - - Suggest new &name - Sugerir nuevo nombre - - - - &Always perform this action - &Siempre realice esta acción - - - - &Rename - Cambiar el nombre - - - - Merge - Unir - - - - Skip - Omitir - - - - &Cancel - Cancelar - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/fr/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/fr/translation.ts deleted file mode 100644 index 1eeef1b..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/fr/translation.ts +++ /dev/null @@ -1,1292 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - Non supporté sur cette plateforme - - - - Last modified date is wrong - Date de dernière modification du fichier incorrecte - - - - Last access date is wrong - Date du dernier accès au fichier incorrecte - - - - Unknown error: %1 - Erreur inconnue: %1 - - - - Unknown error - Erreur inconnue - - - - Path conversion error - Erreur de conversion de chemain - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - Le moteur est forcé en déplacement, vous ne pouvez pas copier avec - - - - - The engine is forced to copy, you can't move with it - Le moteur est forcé en copie, vous ne pouvez pas déplacer avec - - - - Destination - Destination - - - - Use the actual destination "%1"? - Utiliser la destination actuelle "%1"? - - - - The mode has been forced previously. This is an internal error, please report it - Le mode a été forcé. C'est une erreur interne, merci de la repporter - - - - - - - Ask - Demander - - - - - - - Skip - Passer - - - - Merge - Fusionner - - - - - Rename - Renommer - - - - Put at the end - Mettre à la fin - - - - Overwrite - Écraser - - - - Overwrite if different - Écraser si différent - - - - Overwrite if newer - Écraser si plus récent - - - - Overwrite if older - Écraser si plus vieux - - - - Automatic - Automatique - - - - Sequential - Séquentiel - - - - Parallel - Parallèle - - - - Options error - Erreur d'options - - - - Options engine is not loaded. Unable to access the filters - Le moteur d'options n'est pas chargé. Impossible d'accédé aux filtres - - - - CopyEngineFactory - - - - - - Ask - Demander - - - - - - - Skip - Passer - - - - Merge - Fusionner - - - - - Rename - Renommer - - - - Put at the end - Mettre à la fin - - - - Overwrite - Écraser - - - - Overwrite if different - Écraser si différent - - - - Overwrite if newer - Écraser si plus récent - - - - Overwrite if older - Écraser si plus vieux - - - - Automatic - Automatique - - - - Sequential - Séquentiel - - - - Parallel - Parallèle - - - - - Options error - Erreur d'options - - - - Options engine is not loaded. Unable to access the filters - Le moteur d'options n'est pas chargé. Impossible d'accédé aux filtres - - - - Options engine is not loaded, can't access to the filters - Moteur d'options non chargé, impossible d'accéder aux filtres - - - - DiskSpace - - - Disk space - Espace disque - - - - You need more space on this drive to finish this transfer - Vous avez besoin de plus d'espace pour finir ce transfert - - - - Continue - Continuer - - - - Cancel - Annuler - - - - Drives %1 have %2 available but need %3 - Lecteur %1 as %2 disponible mais à besoin de %3 - - - - FileErrorDialog - - - Error on folder - Erreur sur un dossier - - - - Folder name - Nom de répertoire - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - Erreur - - - - Try rename with using special characters - Essaie de renommage avec caratéres interdits - - - - FileIsSameDialog - - - %name% - copy - %name% - copie - - - - %name% - copy (%number%) - %name% - copie (%number%) - - - - Error - Erreur - - - - Try rename with using special characters - Essaie de renommage avec caratéres interdits - - - - FilterRules - - - Search: - Recherche: - - - - Search type: - Type de recherche: - - - - Raw text - Texte brut - - - - Simplified regex - Regex simplifiée - - - - Perl's regex - Regex perl - - - - Apply on: - Appliquer sur: - - - - File - Fichier - - - - Folder - Dossier - - - - File and folder - Fichier et dossier - - - - The test string matches with the regex - La chaine de texte corresponds avec la regex - - - - Checking - Vérification - - - - Test string: - Chaine de test: - - - - Filters dialog - Dialogue des filtres - - - - Whole string must match - Toute la chaine doit correspondre - - - - The regex is valid - La regex est valid - - - - Filters - - - Filters - Filtres - - - - Exclusion filters - Filtres d'exclusion - - - - Inclusion filters - Filtres d'inclusion - - - - None = Include all - Aucun = tout inclure - - - - - Raw text - Texte brute - - - - - Simplified regex - Regex simplifié - - - - - Perl's regex - Regex perl - - - - - Only on file - Appliquer sur fichier - - - - - Only on folder - Appliquer sur dossier - - - - - - - Full match - Correspondance totale - - - - FolderExistsDialog - - - Folder already exists - Dossier déjà existant - - - - %name% - copy - %name% - copie - - - - %name% - copy (%number%) - %name% - copie (%number%) - - - - Error - Erreur - - - - Try rename with using special characters - Essaie de renommage avec caratéres interdits - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - Impossible de faire un déplacement ou une copie dans le mauvais mode forcé: %1 - - - - - Unable to save the transfer list: %1 - Impossible de sauvegarder la liste de transfert: %1 - - - - Problem reading file, or file-size is 0 - Problem durant la lecture, ou taille de fichier est 0 - - - - Wrong header: "%1" - Mauvais en-tête: "%1" - - - - The transfer list is in mixed mode, but this instance is not in this mode - La liste de transfert est en mode mixte, mais l'instance n'est pas dans ce mode - - - - The transfer list is in copy mode, but this instance is not in this mode - La liste de transfert est en mode copie, mais l'instance n'est pas dans ce mode - - - - The transfer list is in move mode, but this instance is not in this mode - La liste de transfert est en mode déplacement, mais l'instance n'est pas dans ce mode - - - - Some errors have been found during the line parsing - Certaine erreur ont été trouvé durant l'analise de la line - - - - Unable to open the transfer list: %1 - Impossible d'ouvrir la list de transfert: %1 - - - - MkPath - - - Unable to create the folder - Impossible de créer le répertoire - - - - The source folder don't exists - Le dossier source n'éxiste pas - - - - Unable to temporary rename the folder - Impossible de renommer le dossier - - - - Unable to do the final real move the folder - Impossible de faire le déplacement final du dossier - - - - Unable to move the folder - Impossible de déplacer le dossier - - - - - Unable to remove - Impossible de supprimer - - - - ReadThread - - - Internal error, please report it! - Erreur interne, merci de la reporter! - - - - Internal error reading the source file:block size out of range - Erreur interne lisant le fichier source: taille de block hors de la plage - - - - - Unable to read the source file: - Impossible de lire le fichier source: - - - - - File truncated during the read, possible data change - La taille du fichier a diminué durant -> changé le texte original - Fichier a diminué durant la lecture, possible changement de données - - - - RenamingRules - - - First renaming - Premier renommage - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - Second renommage - - - - - %1 - copy - %1 - copie - - - - - %1 - copy (%2) - %1 - copie (%2) - - - - Renaming rules - Règles de renommage - - - - ScanFileOrFolder - - - Blacklisted folder - Dossier banis - - - - %1 - copy - %1 - copie - - - - %1 - copy (%2) - %1 - copie (%2) - - - - %name% - copy - %name% - copie - - - - %name% - copy (%number%) - %name% - copie (%number%) - - - - This is not a folder - N'est pas un dossier - - - - The folder does exists - Le répertoire n'existe pas - - - - The folder is not readable - Le répertoire n'est pas lisible - - - - Problem with name encoding - Problém d'encodage - - - - TransferThread - - - - - - File not found - Fichier non trouvé - - - - Drive %1 - Lecteur %1 - - - - Unknown folder - Dossier inconnu - - - - root - racine - - - - The source doesn't exist - La source n'existe pas - - - - - The source file doesn't exist - Le fichier source n'existe pas - - - - The checksums do not match - Les sommes de controle ne correspondent pas - - - - Internal error: The size transfered doesn't match - Erreur interne: La taille transféré ne corresponds pas - - - - - Unable to do the folder - Impossible de créer le dossier - - - - Try rename with using special characters - Essaie de renommage avec caratéres interdits - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - Mauvaise date de modification ou impossible de l'avoir, vous pouvez désactiver le transfert de celui-ci - - - - - Internal error: Already opening - Erreur interne: Déjà ouvert - - - - %name% - copy - %name% - copie - - - - %name% - copy (%number%) - %name% - copie (%number%) - - - - Another file exists at same place - Un autre fichier exists à la même place - - - - Internal error: The destination is not closed - Erreur interne: La destination n'est pas fermé - - - - Internal error: The buffer is not empty - Erreur interne: Le buffer n'est pas vide - - - - - - Unable to change the date - Impossible de changer la date - - - - WriteThread - - - Path resolution error (Empty path) - Erreur de résolution de chemain (chemain vide) - - - - Internal error, please report it! - Erreur interne, merci de la reporter! - - - - Unable to read the source file: - Impossible de lire le fichier source: - - - - File truncated during read, possible data change - Fichier rétréci pendant la lecture, possible changement de données - - - - copyEngineOptions - - - Transfer - Transfert - - - - Move the whole folder - Déplacer le dossier complet - - - - Transfer the file rights - Transférer les droits des fichiers - - - - Keep the file date - Garder la date du fichier - - - - Autostart the transfer - Démarrer automatiquement le transfert - - - - - Less performance if checked - Moins de performance si coché - - - - Follow the strict order - Suivre l'ordre strict - - - - Error and collision - Erreur et collision - - - - When folder error - En cas d'erreur de répertoire - - - - When file error - En cas d'erreur de fichier - - - - When file collision - En cas de collision de fichier - - - - When folder collision - Lors d'une collision de dossier - - - - Check if destination folder exists - Vérifier si le répertoire de destination existe - - - - Renaming rules - Règles de renommage - - - - Delete partially transferred files - Supprimer les transferts partiels - - - - Rename the original destination - Renommer la destination originale - - - - Control - Controle - - - - Checksum - Somme de contrôle - - - - Only after error - Seulement après erreur - - - - Ignore if impossible - Ignorer si impossible - - - - Verify checksums - Vérifier les sommes de contrôles - - - - Performance - Performance - - - - Parallel buffer - Buffer paralléle - - - - - - - - KB - Ko - - - - Block size - Taille de bloc - - - - Sequential buffer - Buffer séquentiel - - - - Enable OS buffer - Activer le tampon de l'OS - - - - OS buffer only if smaller than - Tampon de l'OS seulement si plus petit que - - - - Transfer algorithm - Algorithme de transfert - - - - Parallelize if smaller than - Parallèlise si plus petit que - - - - Inode threads (unsafe > 1) - Inode threads (non sécurisé> 1) - - - - - More cpu, but better organisation on the disk - Plus de cpu mais meilleur organisation sur le disque - - - - Order the list - Ordonner la liste - - - - Misc - Divers - - - - Check the disk space - Vérifier l'espace disque - - - - Use this folder when destination is not set - Utiliser ce dossier quand la destination n'est pas défini - - - - Browse - Parcourir - - - - Filters - Filtres - - - - fileErrorDialog - - - Error with file - Erreur avec un fichier - - - - Error - Erreur - - - - Size - Taille - - - - Modified - Modifié - - - - File name - Nom de fichier - - - - Destination - Destination - - - - Folder - Dossier - - - - &Always perform this action - &Toujours faire cette action - - - - Try in with elevated privileges - Essayer avec des priviléges suppérieurs - - - - Put to bottom - Mettre à la fin - - - - Retry - Réessayer - - - - &Skip - &Passer - - - - &Cancel - &Annuler - - - - fileExistsDialog - - - The file exists - Le fichier existe - - - - Source - Source - - - - Destination - Destination - - - - - Size - Taille - - - - - Modified - Modifié - - - - - File name - Nom de fichier - - - - - Folder - Dossier - - - - Suggest new &name - Suggérer un &nouveau nom - - - - &Always perform this action - &Toujours faire cette action - - - - - Overwrite if modification date differs - Écraser si les dates différes - - - - &Rename - &Renommer - - - - &Overwrite - &Écraser - - - - &Skip - &Passer - - - - &Cancel - &Annuler - - - - Overwrite if newer - Écraser si plus récent - - - - - Overwrite if older - Écraser si plus vieux - - - - fileIsSameDialog - - - Size - Taille - - - - Modified - Modifié - - - - File name - Nom de fichier - - - - The source and destination are same - La source et la destination sont identique - - - - Folder - Dossier - - - - Suggest new &name - Suggérer un &nouveau nom - - - - &Always perform this action - &Toujours faire cette action - - - - &Rename - &Renommer - - - - &Skip - &Passer - - - - &Cancel - &Annuler - - - - folderExistsDialog - - - Source - Source - - - - Destination - Destination - - - - The source and destination is identical - La source et la destination sont identique - - - - - Modified - Modifié - - - - - Folder name - Nom de répertoire - - - - - Folder - Dossier - - - - Suggest new &name - Suggérer un &nouveau nom - - - - &Always perform this action - &Toujours faire cette action - - - - &Rename - &Renommer - - - - Merge - Fusionner - - - - Skip - Passer - - - - &Cancel - &Annuler - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/hi/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/hi/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/hi/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/hu/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/hu/translation.ts deleted file mode 100644 index ca0151e..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/hu/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - Nem támogatott ezen a platformon - - - - Last modified date is wrong - A módosítás utolsó dátuma hibás - - - - Last access date is wrong - A hozzáférés utolsó dátuma hibása - - - - Unknown error: %1 - Ismeretlen hiba: %1 - - - - Path conversion error - Útvonal konvertálási hiba - - - - Unknown error - Ismeretlen hiba - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - A motort mozgatásra kényszerítik, nem másolhatsz vele - - - - - The engine is forced to copy, you can't move with it - A motort másolásra kényszerítik, nem mozgathatsz vele - - - - Destination - Cél - - - - Use the actual destination "%1"? - Használja a jelenlegi célt: "%1"? - - - - The mode has been forced previously. This is an internal error, please report it - Ezt a módot már korábban kényszerítették. Belső hiba történt, kérlek jelentsd be - - - - - - - Ask - Kérdezzen rá - - - - - - - Skip - Kihagy - - - - Merge - Összeolvaszt - - - - - Rename - Nevezze át - - - - Put at the end - Helyezze a végére - - - - Overwrite - Felülír - - - - Overwrite if different - Felülír, ha különbözik - - - - Overwrite if newer - Felülír, ha újabb - - - - Overwrite if older - Felülír, ha régebbi - - - - Automatic - Automatikus - - - - Sequential - Szekvenciális - - - - Parallel - Párhuzamos - - - - Options error - Beállítási hiba - - - - Options engine is not loaded. Unable to access the filters - A beállítási motor nincs betöltve. A szűrők elérése nem lehetséges - - - - CopyEngineFactory - - - - - - Ask - Kérdezzen rá - - - - - - - Skip - Kihagy - - - - Merge - Összeolvaszt - - - - - Rename - Nevezze át - - - - Put at the end - Helyezze a végére - - - - Overwrite - Felülír - - - - Overwrite if different - Felülír, ha különbözik - - - - Overwrite if newer - Felülír, ha újabb - - - - Overwrite if older - Felülír, ha régebbi - - - - Automatic - Automatikus - - - - Sequential - Szekvenciális - - - - Parallel - Párhuzamos - - - - - Options error - Beállítási hiba - - - - Options engine is not loaded. Unable to access the filters - A beállítási motor nincs betöltve. A szűrők elérése nem lehetséges - - - - Options engine is not loaded, can't access to the filters - A beállítási motor nincs betöltve, a szűrők elérése nem lehetséges - - - - DiskSpace - - - Disk space - Lemezterület - - - - You need more space on this drive to finish this transfer - Több szabad helyre van szükséged ezen a lemezen az átvitel befejezéséhez - - - - Continue - Folytatás - - - - Cancel - Mégse - - - - Drives %1 have %2 available but need %3 - %1 meghajtón %2 hely van, de %3 szükséges - - - - FileErrorDialog - - - Error on folder - Hiba a mappával - - - - Folder name - Mappa neve - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - Hiba - - - - Try rename with using special characters - Átnevezés speciális karakterek használatával - - - - FileIsSameDialog - - - %name% - copy - %name% - másolás - - - - %name% - copy (%number%) - %name% - másolás (%number%) - - - - Error - Hiba - - - - Try rename with using special characters - Átnevezés speciális karakterek használatával - - - - FilterRules - - - Filters dialog - Szűrők üzenet - - - - Search: - Keresés: - - - - Search type: - Keresés típusa: - - - - Raw text - Nyers szöveg - - - - Simplified regex - Egyszerűsített regex - - - - Perl's regex - Perl regex - - - - Apply on: - Alkalmazás ezen: - - - - File - Fájl - - - - Folder - Mappa - - - - File and folder - Fájl és mappa - - - - Whole string must match - A teljes szövegnek egyeznie kell - - - - The test string matches with the regex - A tesztszöveg megegyezik a regexszel - - - - Checking - Ellenőrzés - - - - The regex is valid - A regex érvényes - - - - Test string: - Próbaszöveg: - - - - Filters - - - Filters - Szűrők - - - - Exclusion filters - Kizáró szűrők - - - - Inclusion filters - Használt szűrők - - - - None = Include all - Nincs = Mindet használ - - - - - Raw text - Nyers szöveg - - - - - Simplified regex - Egyszerűsített regex - - - - - Perl's regex - Perl regex - - - - - Only on file - Csak fájlon - - - - - Only on folder - Csak mappán - - - - - - - Full match - Teljes egyezés - - - - FolderExistsDialog - - - Folder already exists - Mappa már létezik - - - - %name% - copy - %name% - másolás - - - - %name% - copy (%number%) - %name% - másolás (%number%) - - - - Error - Hiba - - - - Try rename with using special characters - Átnevezés speciális karakterek használatával - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - Elem másolása vagy mozgatás nem lehetséges a hibás kényszerített módban: %1 - - - - - Unable to save the transfer list: %1 - Átviteli lista mentése nem lehetséges: %1 - - - - Problem reading file, or file-size is 0 - Hiba a fájl olvasásánál vagy a fálméret 0 - - - - Wrong header: "%1" - Hibás fejléc: "%1" - - - - The transfer list is in mixed mode, but this instance is not in this mode - Az átviteli lista kevert módban van, de ez a példány nincs - - - - The transfer list is in copy mode, but this instance is not in this mode - Az átviteli lista másolás módban van, de ez a példány nincs - - - - The transfer list is in move mode, but this instance is not in this mode - Az átviteli lista mozgatás módban van, de ez a példány nincs - - - - Some errors have been found during the line parsing - Néhány hiba történt a sorelemzés során - - - - Unable to open the transfer list: %1 - Az átviteli lista megnyitása nem lehetséges: %1 - - - - MkPath - - - Unable to create the folder - Mappa létrehozása nem lehetséges - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - Eltávolítás nem lehetséges - - - - ReadThread - - - Internal error, please report it! - Belső hiba, kérlek jelentsd! - - - - Internal error reading the source file:block size out of range - Belső hiba történt a forrásfájl olvasásakor: a blokkméret tartományon kívüli - - - - - Unable to read the source file: - A forrásfájl olvasása nem lehetséges: - - - - - File truncated during the read, possible data change - A fájl olvasás során megcsonkult, valószínűleg adatváltozás miatt - - - - RenamingRules - - - Renaming rules - Átnevezési szabályok - - - - First renaming - Első átnevezés - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - Második átnevezés - - - - - %1 - copy - %1 - másolás - - - - - %1 - copy (%2) - %1 - másolás (%2) - - - - ScanFileOrFolder - - - Blacklisted folder - Feketelistás mappa - - - - %1 - copy - %1 - másolás - - - - %1 - copy (%2) - %1 - másolás (%2) - - - - %name% - copy - %name% - másolás - - - - %name% - copy (%number%) - %name% - másolás (%number%) - - - - This is not a folder - Ez nem mappa - - - - The folder does exists - A mappa létezik - - - - The folder is not readable - A mappa nem olvasható - - - - Problem with name encoding - Probléma a névkódolással - - - - TransferThread - - - - - - File not found - Fájl nem található - - - - Drive %1 - %1 meghajtó - - - - Unknown folder - Ismeretlen mappa - - - - root - gyökér - - - - The source doesn't exist - A forrás nem létezik - - - - - Unable to do the folder - Mappaművelet nem lehetséges - - - - Try rename with using special characters - Átnevezés speciális karakterek használatával - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - %name% - copy - %name% - másolás - - - - %name% - copy (%number%) - %name% - másolás (%number%) - - - - - The source file doesn't exist - A forrásfájl nem létezik - - - - Another file exists at same place - Egy másik fájl létezik ugyanazon a helyen - - - - The checksums do not match - A checksumok nem egyeznek meg - - - - Internal error: The destination is not closed - Belső hiba: a cél nincs bezárva - - - - Internal error: The size transfered doesn't match - Belső hiba: az átvitt méret nem egyezik meg - - - - Internal error: The buffer is not empty - Belső hiba: a puffer nem üres - - - - - - Unable to change the date - - - - - WriteThread - - - Path resolution error (Empty path) - Útvonal feloldási hiba (Üres útvonal) - - - - Internal error, please report it! - Belső hiba, kérlek jelentsd! - - - - Unable to read the source file: - A forrásfájl olvasása nem lehetséges: - - - - File truncated during read, possible data change - Fájl megsérült az olvasás közben, valószínűleg adatváltozás - - - - copyEngineOptions - - - Transfer - Átvitel - - - - Move the whole folder - Mozgassa át az egész mappát - - - - Transfer the file rights - Fájljogok átadása - - - - Keep the file date - Fájl dátumának megtartása - - - - Autostart the transfer - Átvitel automatikus indítása - - - - - Less performance if checked - Kisebb teljesítmény, ha be van jelölve - - - - Follow the strict order - Kövesse a szigorú sorrendet - - - - Error and collision - Hiba és ütközés - - - - When folder error - Mappa hiba esetén - - - - When file error - Fájl hiba esetén - - - - When file collision - Fájl ütközés esetén - - - - When folder collision - Mappa ütközés esetén - - - - Check if destination folder exists - Célmappa létezésének ellenőrzése - - - - Renaming rules - Átnevezési szabályok - - - - Delete partially transferred files - Részben átvitt fájlok törlése - - - - Rename the original destination - Eredeti cél átnevezése - - - - Control - Irányítás - - - - Checksum - Checksum - - - - Only after error - Csak hiba után - - - - Ignore if impossible - Hagyja ki, ha nem lehetséges - - - - Verify checksums - Checksumok ellenőrzése - - - - Performance - Teljesítmény - - - - Parallel buffer - Párhuzamos puffer - - - - - - - - KB - KB - - - - Block size - Blokkméret - - - - Sequential buffer - Szekvenciális puffer - - - - Enable OS buffer - OS puffer engedélyezése - - - - OS buffer only if smaller than - OS buffer csak akkor, ha kisebb mint - - - - Transfer algorithm - Átviteli algoritmus - - - - Parallelize if smaller than - Párhuzamosítás, ha kisebb mint - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - Egyéb - - - - Check the disk space - Lemezterület ellenőrzése - - - - Use this folder when destination is not set - - - - - Browse - Tallózás - - - - Filters - Szűrők - - - - fileErrorDialog - - - Error with file - Hiba a fájllal - - - - Error - Hiba - - - - Size - Méret - - - - Modified - Módosítva - - - - File name - Fájlnév - - - - Destination - Cél - - - - Folder - Mappa - - - - &Always perform this action - &Mindig hajtsa végre ezt a műveletet - - - - Try in with elevated privileges - Próbálja meg emelt jogosultsággal - - - - Put to bottom - Tegye legalulra - - - - Retry - Újra - - - - &Skip - &Kihagy - - - - &Cancel - M&égse - - - - fileExistsDialog - - - The file exists - A fájl létezik - - - - Source - Forrás - - - - Destination - Cél - - - - - Size - Méret - - - - - Modified - Módosítva - - - - - File name - Fájlnév - - - - - Folder - Mappa - - - - Suggest new &name - Új &név ajánlása - - - - &Always perform this action - &Mindig hajtsa végre ezt a műveletet - - - - - Overwrite if modification date differs - Felülír, ha a módosítás dátuma különbözik - - - - - Overwrite if older - Felülír, ha régebbi - - - - &Rename - &Átnevez - - - - &Overwrite - &Felülír - - - - &Skip - &Kihagy - - - - &Cancel - &Mégse - - - - Overwrite if newer - Felülír, ha újabb - - - - fileIsSameDialog - - - Size - Méret - - - - Modified - Módosítva - - - - File name - Fájlnév - - - - The source and destination are same - A forrás és a cél megegyezik - - - - Folder - Mappa - - - - Suggest new &name - Új &név javasolása - - - - &Always perform this action - &Mindig hajtsa végre ezt a műveletet - - - - &Rename - &Átnevez - - - - &Skip - &Kihagy - - - - &Cancel - M&égse - - - - folderExistsDialog - - - Source - Forrás - - - - Destination - Cél - - - - - Modified - Módosítva - - - - - Folder name - Mappa neve - - - - Suggest new &name - Új &név javasolása - - - - The source and destination is identical - A forrás és a cél megegyezik - - - - - Folder - Mappa - - - - &Always perform this action - &Mindig hajtsa végre ezt a műveletet - - - - &Rename - &Átnevez - - - - Merge - Összeolvaszt - - - - Skip - Kihagy - - - - &Cancel - M&égse - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/id/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/id/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/id/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/it/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/it/translation.ts deleted file mode 100644 index cba024c..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/it/translation.ts +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - Non supportato su questa piattaforma - - - - Last modified date is wrong - La data dell'ultima modifica è errata - - - - Last access date is wrong - La data dell'ultimo accesso è errata - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - Percorso dell'errore di conversione - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - Impossibile copiare, il motore per la copia forzerà lo spostamento - - - - - The engine is forced to copy, you can't move with it - Impossibile effettuare lo spostamento, il motore per la copia forzerà la copia - - - - Destination - Cartella di destinazione - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - Chiedi - - - - - - - Skip - Salta - - - - Merge - Unisci - - - - - Rename - Rinomina - - - - Put at the end - Metti in coda - - - - Overwrite - Sovrascrivi - - - - Overwrite if different - Sovrascrivi se differente - - - - Overwrite if newer - Sovrascrivi se più recente - - - - Overwrite if older - Sovrascrivi se meno recente - - - - Automatic - Automatico - - - - Sequential - Sequenziale - - - - Parallel - Parallelo - - - - Options error - Opzioni di errore - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - Chiedi - - - - - - - Skip - Salta - - - - Merge - Unisci - - - - - Rename - Rinomina - - - - Put at the end - Metti in coda - - - - Overwrite - Sovrascrivi - - - - Overwrite if different - Sovrascrivi se differente - - - - Overwrite if newer - Sovrascrivi se più recente - - - - Overwrite if older - Sovrascrivi se meno recente - - - - Automatic - Automatico - - - - Sequential - Sequenziale - - - - Parallel - Parallelo - - - - - Options error - Opzioni di errore - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - Le opzioni del motore per la copia non vengono caricate, impossibile accedere ai filtri - - - - DiskSpace - - - Disk space - Spazio su disco - - - - You need more space on this drive to finish this transfer - - - - - Continue - Continua - - - - Cancel - Annulla - - - - Drives %1 have %2 available but need %3 - L'unità %1 ha %2 disponibili, ma necessita di %3 - - - - FileErrorDialog - - - Error on folder - Errore nella cartella - - - - Folder name - Nome della cartella - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - Errore - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - Copia di %name% - - - - %name% - copy (%number%) - Copia di %name% (%number%) - - - - Error - Errore - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - Cerca: - - - - Search type: - Tipo di ricerca: - - - - Raw text - Testo raw - - - - Simplified regex - Regex semplificato - - - - Perl's regex - Regex in Perl - - - - Apply on: - Applicare su: - - - - File - File - - - - Folder - Cartelle - - - - File and folder - File e cartelle - - - - The test string matches with the regex - - - - - Checking - Verifica - - - - Test string: - Stringa di verifica: - - - - Filters dialog - Finestra dei filtri - - - - Whole string must match - - - - - The regex is valid - La regex è valida - - - - Filters - - - Filters - Filtri - - - - Exclusion filters - Filtri di esclusione - - - - Inclusion filters - o filtri per l'inserimento? - Filtri di inclusione - - - - None = Include all - o Nessuno = Includi tutti oppure Nessuno = Inserisci tutti oppure bisogna lasiare none? - Nessuno = Tutti inclusi - - - - - Raw text - Testo raw - - - - - Simplified regex - Regex semplificato - - - - - Perl's regex - Regex in Perl - - - - - Only on file - Solo su file - - - - - Only on folder - o cartella al singolare? - Solo su cartelle - - - - - - - Full match - Corrispondenza completa - - - - FolderExistsDialog - - - Folder already exists - Cartella già presente - - - - %name% - copy - Copia di %name% - - - - %name% - copy (%number%) - Copia di %name% (%number%) - - - - Error - Errore - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - Impossibile spostare o copiare elementi in modalità forzata anomala: %1 - - - - - Unable to save the transfer list: %1 - Impossibile salvare la lista dei trasferimenti: %1 - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - Header si riferisce all'intestazione? - Intestazione sbagliata: "%1" - - - - The transfer list is in mixed mode, but this instance is not in this mode - La lista dei trasferimenti è in modalità mista, ma questa istanza non è in questa modalità - - - - The transfer list is in copy mode, but this instance is not in this mode - La lista dei trasferimenti è in modalità di copia, ma questa istanza non è in questa modalità - - - - The transfer list is in move mode, but this instance is not in this mode - La lista dei trasferimenti è in modalità di spostamento, ma questa istanza non è in questa modalità - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - Impossibile aprire la lista dei trasferimenti: %1 - - - - MkPath - - - Unable to create the folder - Impossibile creare la cartella - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - Impossibile eliminare - - - - ReadThread - - - Internal error, please report it! - Errore interno, pregasi di segnalarlo! - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - Impossibile leggere il file di origine: - - - - - File truncated during the read, possible data change - File troncato durante la lettura, possibili variazioni di dati - - - - RenamingRules - - - First renaming - o Prima ridenominazione? - Prima rinomina - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - o Seconda ridenominazione? - Seconda rinomina - - - - - %1 - copy - %1 - copia - - - - - %1 - copy (%2) - %1 - copia (%2) - - - - Renaming rules - Regole di rinomina - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - %1 - copia - - - - %1 - copy (%2) - %1 - copia (%2) - - - - %name% - copy - Copia di %name% - - - - %name% - copy (%number%) - Copia di %name% (%number%) - - - - This is not a folder - Questa non è una cartella - - - - The folder does exists - - - - - The folder is not readable - La cartella non è leggibile - - - - Problem with name encoding - Problema con la codifica del nome - - - - TransferThread - - - - - - File not found - File non trovato - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - Unità %1 - - - - Unknown folder - - - - - root - root - - - - - The source file doesn't exist - - - - - - Unable to do the folder - Impossibile creare la cartella - - - - Try rename with using special characters - - - - - %name% - copy - Copia di %name% - - - - %name% - copy (%number%) - Copia di %name% (%number%) - - - - The source doesn't exist - - - - - Another file exists at same place - Nello stesso percorso è presente un altro file - - - - The checksums do not match - - - - - Internal error: The destination is not closed - Errore interno: la cartella di destinazione non è chiusa - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - Errore interno: il buffer non è vuoto - - - - - - Unable to change the date - Impossibile cambiare la data - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - Errore interno, pregasi di segnalarlo! - - - - Unable to read the source file: - Impossibile leggere il file di origine: - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - Trasferisci - - - - Move the whole folder - Spostare l'intera cartella - - - - Transfer the file rights - Trasferire le autorizzazioni dei file - - - - Keep the file date - Mantenere la data del file - - - - Autostart the transfer - - - - - - Less performance if checked - Se selezionato si avranno prestazioni ridotte - - - - Follow the strict order - Seguire rigorosamente l'ordine - - - - Error and collision - Errori di coincidenze - - - - When folder error - Quando si verifica un errore nelle cartelle - - - - When file error - Quando si verifica un errore nei file - - - - When file collision - Quando i file coincidono - - - - When folder collision - Quando le cartelle coincidono - - - - Check if destination folder exists - Controllare se la cartella di destinazione esiste - - - - Renaming rules - Regole di rinomina - - - - Delete partially transferred files - Eliminare i file parzialmente trasferiti - - - - Rename the original destination - Rinominare la destinazione all'origine - - - - Control - Controllare - - - - Checksum - Codice di controllo (Checksum) - - - - Only after error - Solo dopo l'errore - - - - Ignore if impossible - Ignora se non corrisponde - - - - Verify checksums - - - - - Performance - Prestazioni - - - - Parallel buffer - Buffer parallelo - - - - - - - - KB - KB - - - - Block size - Dimensione del blocco - - - - Sequential buffer - Buffer sequenziale - - - - Enable OS buffer - Attivare il buffer del sistema operativo - - - - OS buffer only if smaller than - Buffer del sistema operativo solo se inferiore a - - - - Transfer algorithm - Algoritmo di trasferimento - - - - Parallelize if smaller than - Affiancare se inferiore a - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - Varie - - - - Check the disk space - Controllare lo spazio su disco - - - - Use this folder when destination is not set - - - - - Browse - Sfoglia - - - - Filters - Filtri - - - - fileErrorDialog - - - Error with file - - - - - Error - Errore - - - - Size - Dimensione - - - - Modified - Modificato - - - - File name - Nome del file - - - - Destination - Cartella di destinazione - - - - Folder - Cartelle - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - Mettere in coda - - - - Retry - Riprova - - - - &Skip - &Salta - - - - &Cancel - &Annulla - - - - fileExistsDialog - - - The file exists - Il file è già presente - - - - Source - Cartella di origine - - - - Destination - Cartella di destinazione - - - - - Size - Dimensione - - - - - Modified - Modificato - - - - - File name - Nome del file - - - - - Folder - Cartelle - - - - Suggest new &name - Suggerisci un nuovo &nome - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - &Rinomina - - - - &Overwrite - &Sovrascrivi - - - - &Skip - &Salta - - - - &Cancel - &Annulla - - - - Overwrite if newer - Sovrascrivi se più recente - - - - - Overwrite if older - Sovrascrivi se meno recente - - - - fileIsSameDialog - - - Size - Dimensione - - - - Modified - Modificato - - - - File name - Nome del file - - - - The source and destination are same - - - - - Folder - Cartelle - - - - Suggest new &name - Suggerisci nuovo &nome - - - - &Always perform this action - - - - - &Rename - &Rinomina - - - - &Skip - &Salta - - - - &Cancel - &Annulla - - - - folderExistsDialog - - - Source - Cartella di origine - - - - Destination - Cartella di destinazione - - - - The source and destination is identical - - - - - - Modified - Modificato - - - - - Folder name - Nome della cartella - - - - - Folder - Cartelle - - - - Suggest new &name - Suggerisci nuovo &nome - - - - &Always perform this action - - - - - &Rename - &Rinomina - - - - Merge - Unisci - - - - Skip - Salta - - - - &Cancel - &Annulla - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/ja/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/ja/translation.ts deleted file mode 100644 index 19bfabd..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/ja/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Filters dialog - - - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - Whole string must match - - - - - The test string matches with the regex - - - - - Checking - - - - - The regex is valid - - - - - Test string: - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - Renaming rules - - - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/ko/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/ko/translation.ts deleted file mode 100644 index 7698857..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/ko/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - 이 플랫폼에서 지원되지 않습니다 - - - - Last modified date is wrong - 마지막 수정 날짜가 잘못되었습니다 - - - - Last access date is wrong - 마지막 엑세스 날짜가 잘못되었습니다 - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - 대상 - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - 확인 - - - - - - - Skip - 건너뛰기 - - - - Merge - 합치기 - - - - - Rename - 이름 바꾸기 - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - 더 최신이면 덮어씌우기 - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - 확인 - - - - - - - Skip - 건너뛰기 - - - - Merge - 합치기 - - - - - Rename - 이름 바꾸기 - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - 더 최신이면 덮어씌우기 - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - 폴더 이름 - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - 오류 - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - 오류 - - - - Try rename with using special characters - - - - - FilterRules - - - Filters dialog - - - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - Whole string must match - - - - - The test string matches with the regex - - - - - Checking - - - - - The regex is valid - - - - - Test string: - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - 오류 - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - 폴더를 생성할 수 없습니다 - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - 원본 파일 읽기 불가: - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - Renaming rules - - - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - 폴더를 읽을 수 없습니다 - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - 원본 파일 읽기 불가: - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - 파일 권한 전송 - - - - Keep the file date - 파일 날짜 보존 - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - 폴더 오류시 - - - - When file error - - - - - When file collision - - - - - When folder collision - 폴더 충돌시 - - - - Check if destination folder exists - 대상 폴드 존재시 확인 - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - KB - - - - Block size - 블럭 크기 - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - 오류 - - - - Size - 크기 - - - - Modified - 수정 날짜 - - - - File name - 파일 이름 - - - - Destination - 대상 - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - 아래에 놓기 - - - - Retry - 재시도 - - - - &Skip - &건너뛰기 - - - - &Cancel - &취소 - - - - fileExistsDialog - - - The file exists - 파일이 존재합니다 - - - - Source - 원본 - - - - Destination - 대상 - - - - - Size - 크기 - - - - - Modified - 수정 날짜 - - - - - File name - 파일 이름 - - - - - Folder - - - - - Suggest new &name - 새 &이름 제안 - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - &이름 바꾸기 - - - - &Overwrite - &덮어씌우기 - - - - &Skip - &건너뛰기 - - - - &Cancel - &취소 - - - - Overwrite if newer - 더 최신이면 덮어씌우기 - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - 크기 - - - - Modified - 수정 날짜 - - - - File name - 파일 이름 - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - 새 &이름 제안 - - - - &Always perform this action - - - - - &Rename - &이름 바꾸기 - - - - &Skip - &건너뛰기 - - - - &Cancel - &취소 - - - - folderExistsDialog - - - Source - 원본 - - - - Destination - 대상 - - - - The source and destination is identical - - - - - - Modified - 수정 날짜 - - - - - Folder name - 폴더 이름 - - - - - Folder - - - - - Suggest new &name - 새 &이름 제안 - - - - &Always perform this action - - - - - &Rename - &이름 바꾸기 - - - - Merge - 합치기 - - - - Skip - 건너뛰기 - - - - &Cancel - &취소 - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/nl/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/nl/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/nl/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/no/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/no/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/no/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/pl/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/pl/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/pl/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/pt/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/pt/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/pt/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/ru/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/ru/translation.ts deleted file mode 100644 index 3b103c5..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/ru/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - Не поддерживается на этой платформе - - - - Last modified date is wrong - Дата обновления неправильно - - - - Last access date is wrong - Дата последнего доступа не так - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - Двигатель вынуждены покинуть свои дома, вы не можете скопировать с ним - - - - - The engine is forced to copy, you can't move with it - Двигатель вынужден копии, вы не можете двигаться вместе с ним - - - - Destination - назначение - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - просить - - - - - - - Skip - пропускать - - - - Merge - слияние - - - - - Rename - переименовать - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - Заменить, если новее - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - Опции ошибке - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - просить - - - - - - - Skip - пропускать - - - - Merge - слияние - - - - - Rename - переименовать - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - Заменить, если новее - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - Опции ошибке - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - Параметры двигателя не загружается, не может получить доступ к фильтрам - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - Ошибка в папку - - - - Folder name - имя папки - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - ошибка - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - %name% - копия - - - - %name% - copy (%number%) - %name% - копия (%number%) - - - - Error - ошибка - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - Поиск по сайту: - - - - Search type: - Тип поиска: - - - - Raw text - Сырой текст - - - - Simplified regex - упрощенный regex - - - - Perl's regex - Perl's regex - - - - Apply on: - Нанесите на: - - - - File - файл - - - - Folder - папка - - - - File and folder - Файлов и папок - - - - The test string matches with the regex - - - - - Checking - контроль - - - - Test string: - Испытание строки: - - - - Filters dialog - Фильтры диалогового - - - - Whole string must match - - - - - The regex is valid - Регулярное действует - - - - Filters - - - Filters - Фильтры - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - Ни = Включить все - - - - - Raw text - Сырой текст - - - - - Simplified regex - Упрощенная регулярных выражений - - - - - Perl's regex - Perl's regex - - - - - Only on file - Только на файл - - - - - Only on folder - Только на папку - - - - - - - Full match - Полный матч - - - - FolderExistsDialog - - - Folder already exists - Папка уже существует - - - - %name% - copy - %name% - копия - - - - %name% - copy (%number%) - %name% - копия (%number%) - - - - Error - ошибка - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - Невозможно сделать, чтобы скопировать или переместить элемент в неправильном форсированном режиме: %1 - - - - - Unable to save the transfer list: %1 - Невозможно сохранить трансфер: %1 - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - Неправильный заголовок: "%1" - - - - The transfer list is in mixed mode, but this instance is not in this mode - Трансфер в смешанном режиме, но этот экземпляр не в этом режиме - - - - The transfer list is in copy mode, but this instance is not in this mode - Передача списка в режиме копирования, но этот экземпляр не в этом режиме - - - - The transfer list is in move mode, but this instance is not in this mode - Трансфер в режим перемещения, но этот экземпляр не в этом режиме - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - Не удается открыть трансфер: %1 - - - - MkPath - - - Unable to create the folder - Невозможно создать папку - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - Невозможно прочитать исходный файл: - - - - - File truncated during the read, possible data change - Файл усечены во время чтения, возможность изменения данных - - - - RenamingRules - - - First renaming - Первое переименование - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - Второе переименование - - - - - %1 - copy - %1 - копия - - - - - %1 - copy (%2) - %1 - копия (%2) - - - - Renaming rules - Переименование правила - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - %1 - копия - - - - %1 - copy (%2) - %1 - копия (%2) - - - - %name% - copy - %name% - копия - - - - %name% - copy (%number%) - %name% - копия (%number%) - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - Папки не читается - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - %name% - копия - - - - %name% - copy (%number%) - %name% - копия (%number%) - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - Невозможно прочитать исходный файл: - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - Передача файлов прав - - - - Keep the file date - Держите дату файла - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - Когда папка ошибка - - - - When file error - - - - - When file collision - - - - - When folder collision - Когда папка столкновения - - - - Check if destination folder exists - Убедитесь, что папка существует - - - - Renaming rules - Переименование правила - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - Контрольная - - - - Only after error - Только после того, как ошибка - - - - Ignore if impossible - Игнорировать, если невозможно - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - KB - - - - Block size - размер блока - - - - Sequential buffer - - - - - Enable OS buffer - Включить OS буфер - - - - OS buffer only if smaller than - ОС буфер, только если меньше - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - Фильтры - - - - fileErrorDialog - - - Error with file - - - - - Error - ошибка - - - - Size - размер - - - - Modified - модифицированный - - - - File name - имя файла - - - - Destination - назначение - - - - Folder - папка - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - Положить в нижней - - - - Retry - Повторить - - - - &Skip - пропускать - - - - &Cancel - отменить - - - - fileExistsDialog - - - The file exists - Файл существует - - - - Source - источник - - - - Destination - назначение - - - - - Size - размер - - - - - Modified - модифицированный - - - - - File name - имя файла - - - - - Folder - папка - - - - Suggest new &name - Предложить новое имя - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - переименовать - - - - &Overwrite - переписывать - - - - &Skip - пропускать - - - - &Cancel - отменить - - - - Overwrite if newer - Заменить, если новее - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - размер - - - - Modified - модифицированный - - - - File name - имя файла - - - - The source and destination are same - - - - - Folder - папка - - - - Suggest new &name - Предложить новое имя - - - - &Always perform this action - - - - - &Rename - переименовать - - - - &Skip - пропускать - - - - &Cancel - отменить - - - - folderExistsDialog - - - Source - источник - - - - Destination - назначение - - - - The source and destination is identical - - - - - - Modified - модифицированный - - - - - Folder name - имя папки - - - - - Folder - папка - - - - Suggest new &name - Предложить новое имя - - - - &Always perform this action - - - - - &Rename - переименовать - - - - Merge - слияние - - - - Skip - пропускать - - - - &Cancel - отменить - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/th/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/th/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/th/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/tr/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/tr/translation.ts deleted file mode 100644 index e17b3f2..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/tr/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - The test string matches with the regex - - - - - Checking - - - - - Test string: - - - - - Filters dialog - - - - - Whole string must match - - - - - The regex is valid - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - Renaming rules - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/Languages/zh/translation.ts b/plugins/CopyEngine/Ultracopier/Languages/zh/translation.ts deleted file mode 100644 index 19bfabd..0000000 --- a/plugins/CopyEngine/Ultracopier/Languages/zh/translation.ts +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Unknown error - - - - - Path conversion error - - - - - CopyEngine - - - - The engine is forced to move, you can't copy with it - - - - - - The engine is forced to copy, you can't move with it - - - - - Destination - - - - - Use the actual destination "%1"? - - - - - The mode has been forced previously. This is an internal error, please report it - - - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - CopyEngineFactory - - - - - - Ask - - - - - - - - Skip - - - - - Merge - - - - - - Rename - - - - - Put at the end - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - Options error - - - - - Options engine is not loaded. Unable to access the filters - - - - - Options engine is not loaded, can't access to the filters - - - - - DiskSpace - - - Disk space - - - - - You need more space on this drive to finish this transfer - - - - - Continue - - - - - Cancel - - - - - Drives %1 have %2 available but need %3 - - - - - FileErrorDialog - - - Error on folder - - - - - Folder name - - - - - FileExistsDialog - - - %name% - copy%suffix% - - - - - %name% - copy (%number%)%suffix% - - - - - Error - - - - - Try rename with using special characters - - - - - FileIsSameDialog - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - FilterRules - - - Filters dialog - - - - - Search: - - - - - Search type: - - - - - Raw text - - - - - Simplified regex - - - - - Perl's regex - - - - - Apply on: - - - - - File - - - - - Folder - - - - - File and folder - - - - - Whole string must match - - - - - The test string matches with the regex - - - - - Checking - - - - - The regex is valid - - - - - Test string: - - - - - Filters - - - Filters - - - - - Exclusion filters - - - - - Inclusion filters - - - - - None = Include all - - - - - - Raw text - - - - - - Simplified regex - - - - - - Perl's regex - - - - - - Only on file - - - - - - Only on folder - - - - - - - - Full match - - - - - FolderExistsDialog - - - Folder already exists - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - Error - - - - - Try rename with using special characters - - - - - ListThread - - - - Unable do to move or copy item into wrong forced mode: %1 - - - - - - Unable to save the transfer list: %1 - - - - - Problem reading file, or file-size is 0 - - - - - Wrong header: "%1" - - - - - The transfer list is in mixed mode, but this instance is not in this mode - - - - - The transfer list is in copy mode, but this instance is not in this mode - - - - - The transfer list is in move mode, but this instance is not in this mode - - - - - Some errors have been found during the line parsing - - - - - Unable to open the transfer list: %1 - - - - - MkPath - - - Unable to create the folder - - - - - The source folder don't exists - - - - - Unable to temporary rename the folder - - - - - Unable to do the final real move the folder - - - - - Unable to move the folder - - - - - - Unable to remove - - - - - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - - - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change - - - - - RenamingRules - - - Renaming rules - - - - - First renaming - - - - - %name% - copy%suffix% - %name% should not be translated - - - - - %name% - copy (%number%)%suffix% - %name%, %number% should not be translated - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - %name%, %number% should not be translated - - - - - Second renaming - - - - - - %1 - copy - - - - - - %1 - copy (%2) - - - - - ScanFileOrFolder - - - Blacklisted folder - - - - - %1 - copy - - - - - %1 - copy (%2) - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding - - - - - TransferThread - - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed - - - - - Internal error: The size transfered doesn't match - - - - - Internal error: The buffer is not empty - - - - - - - Unable to change the date - - - - - Try rename with using special characters - - - - - WriteThread - - - Path resolution error (Empty path) - - - - - Internal error, please report it! - - - - - Unable to read the source file: - - - - - File truncated during read, possible data change - - - - - copyEngineOptions - - - Transfer - - - - - Move the whole folder - - - - - Transfer the file rights - - - - - Keep the file date - - - - - Autostart the transfer - - - - - - Less performance if checked - - - - - Follow the strict order - - - - - Error and collision - - - - - When folder error - - - - - When file error - - - - - When file collision - - - - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination - - - - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - - Performance - - - - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk - - - - - Order the list - - - - - Misc - - - - - Check the disk space - - - - - Use this folder when destination is not set - - - - - Browse - - - - - Filters - - - - - fileErrorDialog - - - Error with file - - - - - Error - - - - - Size - - - - - Modified - - - - - File name - - - - - Destination - - - - - Folder - - - - - &Always perform this action - - - - - Try in with elevated privileges - - - - - Put to bottom - - - - - Retry - - - - - &Skip - - - - - &Cancel - - - - - fileExistsDialog - - - The file exists - - - - - Source - - - - - Destination - - - - - - Size - - - - - - Modified - - - - - - File name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - - Overwrite if modification date differs - - - - - &Rename - - - - - &Overwrite - - - - - &Skip - - - - - &Cancel - - - - - Overwrite if newer - - - - - - Overwrite if older - - - - - fileIsSameDialog - - - Size - - - - - Modified - - - - - File name - - - - - The source and destination are same - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - &Skip - - - - - &Cancel - - - - - folderExistsDialog - - - Source - - - - - Destination - - - - - The source and destination is identical - - - - - - Modified - - - - - - Folder name - - - - - - Folder - - - - - Suggest new &name - - - - - &Always perform this action - - - - - &Rename - - - - - Merge - - - - - Skip - - - - - &Cancel - - - - diff --git a/plugins/CopyEngine/Ultracopier/ListThread.cpp b/plugins/CopyEngine/Ultracopier/ListThread.cpp deleted file mode 100644 index bb0bce6..0000000 --- a/plugins/CopyEngine/Ultracopier/ListThread.cpp +++ /dev/null @@ -1,2429 +0,0 @@ -#include "ListThread.h" -#include -#include -#include -#include "../../../cpp11addition.h" - -ListThread::ListThread(FacilityInterface * facilityInterface) -{ - moveToThread(this); - start(HighPriority); - this->facilityInterface = facilityInterface; - putInPause = false; - sourceDriveMultiple = false; - destinationDriveMultiple = false; - destinationFolderMultiple = false; - stopIt = false; - bytesToTransfer = 0; - bytesTransfered = 0; - idIncrementNumber = 1; - actualRealByteTransfered = 0; - numberOfTransferIntoToDoList = 0; - numberOfInodeOperation = 0; - putAtBottom = 0; - maxSpeed = 0; - inodeThreads = 1; - renameTheOriginalDestination = false; - doRightTransfer = false; - #ifdef ULTRACOPIER_PLUGIN_RSYNC - rsync = false; - #endif - keepDate = false; - checkDiskSpace = true; - blockSize = ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*1024; - sequentialBuffer = ULTRACOPIER_PLUGIN_DEFAULT_SEQUENTIAL_NUMBER_OF_BLOCK; - parallelBuffer = ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - blockSizeAfterSpeedLimitation = blockSize; - #endif - osBufferLimit = 512; - alwaysDoThisActionForFileExists = FileExists_NotSet; - doChecksum = false; - checksumIgnoreIfImpossible = true; - checksumOnlyOnError = true; - osBuffer = false; - osBufferLimited = false; - forcedMode = false; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - clockForTheCopySpeed = NULL; - multiForBigSpeed = 0; - #endif - - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - connect(&timerUpdateDebugDialog,&QTimer::timeout,this,&ListThread::timedUpdateDebugDialog); - timerUpdateDebugDialog.start(ULTRACOPIER_PLUGIN_DEBUG_WINDOW_TIMER); - #endif - connect(this, &ListThread::tryCancel, this,&ListThread::cancel, Qt::QueuedConnection); - connect(this, &ListThread::askNewTransferThread, this,&ListThread::createTransferThread, Qt::QueuedConnection); - connect(&mkPathQueue, &MkPath::firstFolderFinish, this,&ListThread::mkPathFirstFolderFinish, Qt::QueuedConnection); - connect(&mkPathQueue, &MkPath::errorOnFolder, this,&ListThread::mkPathErrorOnFolder, Qt::QueuedConnection); - connect(this, &ListThread::send_syncTransferList, this,&ListThread::syncTransferList_internal, Qt::QueuedConnection); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - connect(&mkPathQueue, &MkPath::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection); - connect(&driveManagement,&DriveManagement::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection); - #endif // ULTRACOPIER_PLUGIN_DEBUG - - emit askNewTransferThread(); - mkpathTransfer.release(); -} - -ListThread::~ListThread() -{ - emit tryCancel(); - waitCancel.acquire(); - quit(); - wait(); -} - -//transfer is finished -void ListThread::transferInodeIsClosed() -{ - numberOfInodeOperation--; - #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); - #endif - TransferThread *temp_transfer_thread=qobject_cast(QObject::sender()); - if(temp_transfer_thread==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); - return; - } - bool isFound=false; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - int countLocalParse=0; - #endif - if(temp_transfer_thread->getStat()!=TransferStat_Idle) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not idle!"); - return; - } - int int_for_internal_loop=0; - const int &loop_size=actionToDoListTransfer.size(); - while(int_for_internal_looptransferId) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[%1] have finish, put at idle; for id: %2").arg(int_for_internal_loop).arg(temp_transfer_thread->transferId).toStdString()); - Ultracopier::ReturnActionOnCopyList newAction; - newAction.type=Ultracopier::RemoveItem; - newAction.userAction.moveAt=0; - newAction.addAction=actionToDoTransferToItemOfCopyList(actionToDoListTransfer.at(int_for_internal_loop)); - newAction.userAction.position=int_for_internal_loop; - actionDone.push_back(newAction); - /// \todo check if item is at the right thread - actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+int_for_internal_loop); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, actionToDoListInode: %2, actionToDoListInode_afterTheTransfer: %3").arg(actionToDoListTransfer.size()).arg(actionToDoListInode.size()).arg(actionToDoListInode_afterTheTransfer.size()).toStdString()); - if(actionToDoListTransfer.empty() && actionToDoListInode.empty() && actionToDoListInode_afterTheTransfer.empty()) - updateTheStatus(); - - //add the current size of file, to general size because it's finish - copiedSize=temp_transfer_thread->copiedSize(); - if(copiedSize>(qint64)temp_transfer_thread->transferSize) - { - oversize=copiedSize-temp_transfer_thread->transferSize; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"add oversize of: "+std::to_string(oversize)); - bytesToTransfer+=oversize; - bytesTransfered+=oversize; - } - bytesTransfered+=temp_transfer_thread->transferSize; - - if(temp_transfer_thread->haveStartTime) - { - timeToTransfer.push_back(std::pair(temp_transfer_thread->transferSize,temp_transfer_thread->startTransferTime.elapsed())); - temp_transfer_thread->haveStartTime=false; - } - temp_transfer_thread->transferId=0; - temp_transfer_thread->transferSize=0; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - countLocalParse++; - #endif - isFound=true; - if(actionToDoListTransfer.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionToDoListTransfer==0"); - actionToDoListInode.insert(actionToDoListInode.cbegin(),actionToDoListInode_afterTheTransfer.cbegin(),actionToDoListInode_afterTheTransfer.cend()); - actionToDoListInode_afterTheTransfer.clear(); - doNewActions_inode_manipulation(); - } - break; - } - int_for_internal_loop++; - } - if(isFound) - deleteTransferThread(); - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("unable to found item into the todo list, id: %1, index: %2").arg(temp_transfer_thread->transferId).arg(int_for_internal_loop).toStdString()); - temp_transfer_thread->transferId=0; - temp_transfer_thread->transferSize=0; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("countLocalParse: %1, actionToDoList.size(): %2").arg(countLocalParse).arg(actionToDoListTransfer.size()).toStdString()); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - if(countLocalParse!=1) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"countLocalParse != 1"); - #endif - doNewActions_inode_manipulation(); -} - -/** \brief put the current file at bottom in case of error -\note ONLY IN CASE OF ERROR */ -void ListThread::transferPutAtBottom() -{ - TransferThread *transfer=qobject_cast(QObject::sender()); - if(transfer==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); - return; - } - bool isFound=false; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - int countLocalParse=0; - #endif - unsigned int indexAction=0; - while(indexActiontransferId) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Put at the end: "+std::to_string(transfer->transferId)); - //push for interface at the end - Ultracopier::ReturnActionOnCopyList newAction; - newAction.type=Ultracopier::MoveItem; - newAction.addAction.id=transfer->transferId; - newAction.userAction.position=actionToDoListTransfer.size()-1; - actionDone.push_back(newAction); - //do the wait stat - actionToDoListTransfer[indexAction].isRunning=false; - //move at the end - actionToDoListTransfer.push_back(actionToDoListTransfer.at(indexAction)); - actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+indexAction); - //reset the thread list stat - transfer->transferId=0; - transfer->transferSize=0; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - countLocalParse++; - #endif - isFound=true; - break; - } - indexAction++; - } - if(!isFound) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("unable to found item into the todo list, id: %1, index: %2").arg(transfer->transferId).toStdString()); - transfer->transferId=0; - transfer->transferSize=0; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"countLocalParse: "+std::to_string(countLocalParse)); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - if(countLocalParse!=1) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"countLocalParse != 1"); - #endif - transfer->skip(); -} - -//set the copy info and options before runing -void ListThread::setRightTransfer(const bool doRightTransfer) -{ - mkPathQueue.setRightTransfer(doRightTransfer); - this->doRightTransfer=doRightTransfer; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexsetRightTransfer(doRightTransfer); - index++; - } -} - -//set keep date -void ListThread::setKeepDate(const bool keepDate) -{ - mkPathQueue.setKeepDate(keepDate); - this->keepDate=keepDate; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexsetKeepDate(keepDate); - index++; - } -} - -//set block size in KB -void ListThread::setBlockSize(const int blockSize) -{ - this->blockSize=blockSize*1024; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexsetBlockSize(this->blockSize); - index++; - } - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - setSpeedLimitation(maxSpeed); - #endif -} - -//set auto start -void ListThread::setAutoStart(const bool autoStart) -{ - this->autoStart=autoStart; -} - -#ifdef ULTRACOPIER_PLUGIN_RSYNC -/// \brief set rsync -void ListThread::setRsync(const bool rsync) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); - this->rsync=rsync; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexsetRsync(rsync); - index++; - } - for(unsigned int i=0;isetRsync(rsync); -} -#endif - -//set check destination folder -void ListThread::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) -{ - this->checkDestinationFolderExists=checkDestinationFolderExists; - for(unsigned int i=0;isetCheckDestinationFolderExists(checkDestinationFolderExists && alwaysDoThisActionForFolderExists!=FolderExists_Merge); -} - -void ListThread::fileTransfer(const QFileInfo &sourceFileInfo,const QFileInfo &destinationFileInfo,const Ultracopier::CopyMode &mode) -{ - if(stopIt) - return; - addToTransfer(sourceFileInfo,destinationFileInfo,mode); -} - -// -> add thread safe, by Qt::BlockingQueuedConnection -bool ListThread::haveSameSource(const std::vector &sources) -{ - if(stopIt) - return false; - if(sourceDriveMultiple) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourceDriveMultiple"); - return false; - } - if(sourceDrive.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourceDrive.isEmpty()"); - return true; - } - unsigned int index=0; - while(index add thread safe, by Qt::BlockingQueuedConnection -bool ListThread::haveSameDestination(const std::string &destination) -{ - if(stopIt) - return false; - if(destinationDriveMultiple) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDriveMultiple"); - return false; - } - if(destinationDrive.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDrive.isEmpty()"); - return true; - } - if(driveManagement.getDrive(destination)!=destinationDrive) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination!=destinationDrive"); - return false; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"seam have same destination"); - return true; -} - -/// \return empty if multiple or no destination -std::string ListThread::getUniqueDestinationFolder() const -{ - if(stopIt) - return std::string(); - if(destinationFolderMultiple) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDriveMultiple"); - return std::string(); - } - return destinationFolder; -} - -ScanFileOrFolder * ListThread::newScanThread(Ultracopier::CopyMode mode) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start with: "+std::to_string(mode)); - - //create new thread because is auto-detroyed - scanFileOrFolderThreadsPool.push_back(new ScanFileOrFolder(mode)); - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::finishedTheListing, this,&ListThread::scanThreadHaveFinishSlot, Qt::QueuedConnection); - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::fileTransfer, this,&ListThread::fileTransfer, Qt::QueuedConnection); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection); - #endif - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::newFolderListing, this,&ListThread::newFolderListing); - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::addToMovePath, this,&ListThread::addToMovePath, Qt::QueuedConnection); - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::addToRealMove, this,&ListThread::addToRealMove, Qt::QueuedConnection); - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::addToMkPath, this,&ListThread::addToMkPath, Qt::QueuedConnection); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::addToRmForRsync, this,&ListThread::addToRmForRsync, Qt::QueuedConnection); - #endif - - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::errorOnFolder, this,&ListThread::errorOnFolder, Qt::QueuedConnection); - connect(scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::folderAlreadyExists, this,&ListThread::folderAlreadyExists, Qt::QueuedConnection); - - connect(this,&ListThread::send_updateMount, scanFileOrFolderThreadsPool.back(),&ScanFileOrFolder::set_updateMount, Qt::QueuedConnection); - - scanFileOrFolderThreadsPool.back()->setFilters(include,exclude); - scanFileOrFolderThreadsPool.back()->setCheckDestinationFolderExists(checkDestinationFolderExists && alwaysDoThisActionForFolderExists!=FolderExists_Merge); - scanFileOrFolderThreadsPool.back()->setMoveTheWholeFolder(moveTheWholeFolder); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - scanFileOrFolderThreadsPool.back()->setRsync(rsync); - #endif - if(scanFileOrFolderThreadsPool.size()==1) - updateTheStatus(); - scanFileOrFolderThreadsPool.back()->setRenamingRules(firstRenamingRule,otherRenamingRule); - return scanFileOrFolderThreadsPool.back(); -} - -void ListThread::scanThreadHaveFinishSlot() -{ - scanThreadHaveFinish(); -} - -void ListThread::scanThreadHaveFinish(bool skipFirstRemove) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"listing thread have finish, skipFirstRemove: "+std::to_string(skipFirstRemove)); - if(!skipFirstRemove) - { - ScanFileOrFolder * senderThread = qobject_cast(QObject::sender()); - if(senderThread==NULL) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"sender pointer null (plugin copy engine)"); - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start the next thread, scanFileOrFolderThreadsPool.size(): "+std::to_string(scanFileOrFolderThreadsPool.size())); - delete senderThread; - vectorremoveOne(scanFileOrFolderThreadsPool,senderThread); - if(scanFileOrFolderThreadsPool.empty()) - updateTheStatus(); - } - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start the next thread, scanFileOrFolderThreadsPool.size(): "+std::to_string(scanFileOrFolderThreadsPool.size())); - if(scanFileOrFolderThreadsPool.size()>0) - { - //then start the next listing threads - if(scanFileOrFolderThreadsPool.front()->isFinished()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Start listing thread"); - scanFileOrFolderThreadsPool.front()->start(); - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"The listing thread is already running"); - } - else - autoStartAndCheckSpace(); -} - -void ListThread::autoStartAndCheckSpace() -{ - if(needMoreSpace()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Need more space"); - return; - } - autoStartIfNeeded(); -} - -void ListThread::autoStartIfNeeded() -{ - if(autoStart) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Auto start the copy"); - startGeneralTransfer(); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Put the copy engine in pause"); - putInPause=true; - emit isInPause(true); - } -} - -void ListThread::startGeneralTransfer() -{ - doNewActions_inode_manipulation(); -} - -// -> add thread safe, by Qt::BlockingQueuedConnection -bool ListThread::newCopy(const std::vector &sources,const std::string &destination) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start: "+stringimplode(sources,";")+", destination: "+destination); - ScanFileOrFolder * scanFileOrFolderThread = newScanThread(Ultracopier::Copy); - if(scanFileOrFolderThread==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get new thread"); - return false; - } - std::regex base_regex("^[a-z][a-z][a-z]*:/.*"); - std::smatch base_match; - std::vector sourcesClean; - unsigned int index=0; - while(index "+source); - index++; - sourcesClean.push_back(source); - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourcesClean: "+stringimplode(sourcesClean,";")); - scanFileOrFolderThread->addToList(sourcesClean,destination); - scanThreadHaveFinish(true); - detectDrivesOfCurrentTransfer(sourcesClean,destination); - return true; -} - -// -> add thread safe, by Qt::BlockingQueuedConnection -bool ListThread::newMove(const std::vector &sources,const std::string &destination) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - ScanFileOrFolder * scanFileOrFolderThread = newScanThread(Ultracopier::Move); - if(scanFileOrFolderThread==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get new thread"); - return false; - } - scanFileOrFolderThread->addToList(sources,destination); - scanThreadHaveFinish(true); - detectDrivesOfCurrentTransfer(sources,destination); - return true; -} - -void ListThread::detectDrivesOfCurrentTransfer(const std::vector &sources,const std::string &destination) -{ - /* code to detect volume/mount point to group by windows */ - if(!sourceDriveMultiple) - { - unsigned int index=0; - while(indexalwaysDoThisActionForFileExists=alwaysDoThisActionForFileExists; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexsetAlwaysFileExistsAction(alwaysDoThisActionForFileExists); - index++; - } -} - -/** \brief to sync the transfer list - * Used when the interface is changed, useful to minimize the memory size */ -void ListThread::syncTransferList() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - emit send_syncTransferList(); -} - -//set the folder local collision -void ListThread::setFolderCollision(const FolderExistsAction &alwaysDoThisActionForFolderExists) -{ - this->alwaysDoThisActionForFolderExists=alwaysDoThisActionForFolderExists; -} - -bool ListThread::getReturnBoolToCopyEngine() const -{ - return returnBoolToCopyEngine; -} - -std::pair ListThread::getReturnPairQuint64ToCopyEngine() const -{ - return returnPairQuint64ToCopyEngine; -} - -Ultracopier::ItemOfCopyList ListThread::getReturnItemOfCopyListToCopyEngine() const -{ - return returnItemOfCopyListToCopyEngine; -} - -void ListThread::set_doChecksum(bool doChecksum) -{ - this->doChecksum=doChecksum; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexset_doChecksum(doChecksum); - index++; - } -} - -void ListThread::set_checksumIgnoreIfImpossible(bool checksumIgnoreIfImpossible) -{ - this->checksumIgnoreIfImpossible=checksumIgnoreIfImpossible; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexset_checksumIgnoreIfImpossible(checksumIgnoreIfImpossible); - index++; - } -} - -void ListThread::set_checksumOnlyOnError(bool checksumOnlyOnError) -{ - this->checksumOnlyOnError=checksumOnlyOnError; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexset_checksumOnlyOnError(checksumOnlyOnError); - index++; - } -} - -void ListThread::set_osBuffer(bool osBuffer) -{ - this->osBuffer=osBuffer; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexset_osBuffer(osBuffer); - index++; - } -} - -void ListThread::set_osBufferLimited(bool osBufferLimited) -{ - this->osBufferLimited=osBufferLimited; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexset_osBufferLimited(osBufferLimited); - index++; - } -} - -void ListThread::realByteTransfered() -{ - quint64 totalRealByteTransfered=0; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexrealByteTransfered(); - index++; - } - emit send_realBytesTransfered(totalRealByteTransfered); -} - -void ListThread::pause() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - if(putInPause) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Seam already in pause!"); - return; - } - putInPause=true; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexpause(); - index++; - } - emit isInPause(true); -} - -void ListThread::resume() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - if(!putInPause) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Seam already resumed!"); - return; - } - putInPause=false; - startGeneralTransfer(); - doNewActions_start_transfer(); - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexresume(); - index++; - } - emit isInPause(false); -} - -void ListThread::skip(const uint64_t &id) -{ - skipInternal(id); -} - -bool ListThread::skipInternal(const uint64_t &id) -{ - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indextransferId==id) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"skip one transfer: "+std::to_string(id)); - transferThreadList.at(index)->skip(); - return true; - } - index++; - } - int int_for_internal_loop=0; - const int &loop_size=actionToDoListTransfer.size(); - while(int_for_internal_loopstop(); - index++; - } - index=0; - loop_size=scanFileOrFolderThreadsPool.size(); - while(indexstop(); - delete scanFileOrFolderThreadsPool.at(index);//->deleteLayer(); - scanFileOrFolderThreadsPool[index]=NULL; - index++; - } - scanFileOrFolderThreadsPool.clear(); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - if(clockForTheCopySpeed!=NULL) - { - clockForTheCopySpeed->stop(); - delete clockForTheCopySpeed; - clockForTheCopySpeed=NULL; - } - #endif - checkIfReadyToCancel(); -} - -void ListThread::checkIfReadyToCancel() -{ - if(!stopIt) - return; - int index=0; - int loop_size=transferThreadList.size(); - while(indextransferId!=0) - return; - delete transferThreadList.at(index);//->deleteLayer(); - transferThreadList[index]=NULL; - transferThreadList.erase(transferThreadList.cbegin()+index); - loop_size=transferThreadList.size(); - index--; - } - index++; - } - actionToDoListTransfer.clear(); - actionToDoListInode.clear(); - actionToDoListInode_afterTheTransfer.clear(); - actionDone.clear(); - progressionList.clear(); - returnListItemOfCopyListToCopyEngine.clear(); - quit(); - waitCancel.release(); - emit canBeDeleted(); -} - -//speedLimitation in KB/s -bool ListThread::setSpeedLimitation(const int64_t &speedLimitation) -{ - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"maxSpeed in KB/s: "+std::to_string(speedLimitation)); - - if(speedLimitation>1024*1024) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"speedLimitation out of range"); - return false; - } - maxSpeed=speedLimitation; - - multiForBigSpeed=0; - if(maxSpeed>0) - { - blockSizeAfterSpeedLimitation=blockSize; - - //try resolv the interval - int newInterval;//in ms - do - { - multiForBigSpeed++; - //at max speed, is out of range for int, it's why quint64 is used - newInterval=(((quint64)blockSize*(quint64)multiForBigSpeed*1000/* *1000 because interval is into ms, not s*/)/((quint64)maxSpeed*(quint64)1024)); - if(newInterval<0) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"calculated newInterval wrong"); - return false; - } - } - while(newIntervalULTRACOPIER_PLUGIN_MAXTIMERINTERVAL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"wait time too big, then shrink the block size and set interval to max size"); - newInterval=ULTRACOPIER_PLUGIN_MAXTIMERINTERVAL; - multiForBigSpeed=1; - blockSizeAfterSpeedLimitation=(this->maxSpeed*1024*newInterval)/1000; - - if(blockSizeAfterSpeedLimitation<10) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"calculated block size wrong"); - return false; - } - - //set the new block size into the thread - const int &loop_size=transferThreadList.size(); - int int_for_loop=0; - while(int_for_loopsetBlockSize(blockSizeAfterSpeedLimitation)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the block size"); - int_for_loop++; - } - } - - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("fixed speed with new block size and new interval in BlockSize: %1, multiForBigSpeed: %2, newInterval: %3, maxSpeed: %4") - .arg(blockSizeAfterSpeedLimitation) - .arg(multiForBigSpeed) - .arg(newInterval) - .arg(maxSpeed) - .toStdString() - ); - - clockForTheCopySpeed->setInterval(newInterval); - if(clockForTheCopySpeed!=NULL) - clockForTheCopySpeed->start(); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"clockForTheCopySpeed == NULL at this point"); - } - else - { - if(clockForTheCopySpeed!=NULL) - clockForTheCopySpeed->stop(); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"clockForTheCopySpeed == NULL at this point"); - int int_for_loop=0; - const int &loop_size=transferThreadList.size(); - while(int_for_loopsetBlockSize(blockSize); - int_for_loop++; - } - } - int int_for_loop=0; - const int &loop_size=transferThreadList.size(); - while(int_for_loopsetMultiForBigSpeed(multiForBigSpeed); - int_for_loop++; - } - - return true; - #else - Q_UNUSED(speedLimitation); - return false; - #endif -} - -void ListThread::updateTheStatus() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - sendActionDone(); - bool updateTheStatus_listing=scanFileOrFolderThreadsPool.size()>0; - bool updateTheStatus_copying=actionToDoListTransfer.size()>0 || actionToDoListInode.size()>0 || actionToDoListInode_afterTheTransfer.size()>0; - Ultracopier::EngineActionInProgress updateTheStatus_action_in_progress; - if(updateTheStatus_copying && updateTheStatus_listing) - updateTheStatus_action_in_progress=Ultracopier::CopyingAndListing; - else if(updateTheStatus_listing) - updateTheStatus_action_in_progress=Ultracopier::Listing; - else if(updateTheStatus_copying) - updateTheStatus_action_in_progress=Ultracopier::Copying; - else - updateTheStatus_action_in_progress=Ultracopier::Idle; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit actionInProgess("+std::to_string(updateTheStatus_action_in_progress)+")"); - emit actionInProgess(updateTheStatus_action_in_progress); -} - -//set data local to the thread -void ListThread::setAlwaysFileExistsAction(const FileExistsAction &alwaysDoThisActionForFileExists) -{ - this->alwaysDoThisActionForFileExists=alwaysDoThisActionForFileExists; - int int_for_loop=0; - const int &loop_size=transferThreadList.size(); - while(int_for_loopsetAlwaysFileExistsAction(alwaysDoThisActionForFileExists); - int_for_loop++; - } -} - -//mk path to do -uint64_t ListThread::addToMkPath(const QFileInfo& source,const QFileInfo& destination, const int& inode) -{ - if(stopIt) - return 0; - if(inode!=0 && (!keepDate && !doRightTransfer)) - return 0; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("source: %1, destination: %2").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).toStdString()); - ActionToDoInode temp; - temp.type = ActionType_MkPath; - temp.id = generateIdNumber(); - temp.source = source; - temp.destination= destination; - temp.isRunning = false; - actionToDoListInode.push_back(temp); - return temp.id; -} - -//add rm path to do -void ListThread::addToMovePath(const QFileInfo& source, const QFileInfo &destination, const int& inodeToRemove) -{ - if(stopIt) - return; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("source: %1, destination: %2, inodeToRemove: %3").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).arg(inodeToRemove).toStdString()); - ActionToDoInode temp; - temp.type = ActionType_MovePath; - temp.id = generateIdNumber(); - temp.size = inodeToRemove; - temp.source = source; - temp.destination= destination; - temp.isRunning = false; - actionToDoListInode.push_back(temp); -} - -void ListThread::addToRealMove(const QFileInfo& source,const QFileInfo& destination) -{ - if(stopIt) - return; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("source: %1, destination: %2").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).toStdString()); - ActionToDoInode temp; - temp.type = ActionType_RealMove; - temp.id = generateIdNumber(); - temp.size = 0; - temp.source = source; - temp.destination= destination; - temp.isRunning = false; - actionToDoListInode.push_back(temp); -} - -#ifdef ULTRACOPIER_PLUGIN_RSYNC -//rsync rm -void ListThread::addToRmForRsync(const QFileInfo& destination) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inode: "+destination.absoluteFilePath().toStdString()); - ActionToDoInode temp; - temp.type = ActionType_RmSync; - temp.id = generateIdNumber(); - temp.destination= destination; - temp.isRunning = false; - actionToDoListInode.push_back(temp); -} -#endif - -//send action done -void ListThread::sendActionDone() -{ - if(!actionDone.empty()) - { - emit newActionOnList(actionDone); - actionDone.clear(); - } - if(!timeToTransfer.empty()) - { - emit doneTime(timeToTransfer); - timeToTransfer.clear(); - } -} - -//send progression -void ListThread::sendProgression() -{ - if(actionToDoListTransfer.empty()) - return; - oversize=0; - currentProgression=0; - int int_for_loop=0; - const int &loop_size=transferThreadList.size(); - while(int_for_loopgetStat()) - { - case TransferStat_Transfer: - case TransferStat_PostTransfer: - case TransferStat_Checksum: - case TransferStat_PostOperation: - { - copiedSize=temp_transfer_thread->copiedSize(); - - //for the general progression - currentProgression+=copiedSize; - - //the oversize (when the file is bigger after/during the copy then what was during the listing) - if(copiedSize>(qint64)temp_transfer_thread->transferSize) - localOverSize=copiedSize-temp_transfer_thread->transferSize; - else - localOverSize=0; - - //the current size copied - totalSize=temp_transfer_thread->transferSize+localOverSize; - std::pair progression=temp_transfer_thread->progression(); - tempItem.currentRead=progression.first; - tempItem.currentWrite=progression.second; - tempItem.id=temp_transfer_thread->transferId; - tempItem.total=totalSize; - progressionList.push_back(tempItem); - - //add the oversize to the general progression - oversize+=localOverSize; - } - break; - default: - break; - } - int_for_loop++; - } - emit pushFileProgression(progressionList); - progressionList.clear(); - emit pushGeneralProgression(bytesTransfered+currentProgression,bytesToTransfer+oversize); - realByteTransfered(); -} - -//send the progression, after full reset of the interface (then all is empty) -void ListThread::syncTransferList_internal() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - emit syncReady(); - actionDone.clear(); - //do list operation - TransferThread *transferThread; - const int &loop_size=actionToDoListTransfer.size(); - int loop_sub_size=transferThreadList.size(); - //this loop to have at max inodeThreads*inodeThreads, not inodeThreads*transferThreadList.size() - int int_for_internal_loop; - for(int int_for_loop=0; int_for_loopgetStat()!=TransferStat_PreOperation) - { - Ultracopier::ReturnActionOnCopyList newAction; - switch(transferThread->getStat()) - { - case TransferStat_Transfer: - newAction.type=Ultracopier::Transfer; - break; - /*case TransferStat_PostTransfer: - newAction.type=Ultracopier::PostOperation; - break;*/ - case TransferStat_PostOperation: - newAction.type=Ultracopier::PostOperation; - break; - default: - break; - } - newAction.addAction.id = item.id; - actionDone.push_back(newAction); - } - } - } - } -} - -//add file transfer to do -uint64_t ListThread::addToTransfer(const QFileInfo& source,const QFileInfo& destination,const Ultracopier::CopyMode& mode) -{ - if(stopIt) - return 0; - //add to transfer list - numberOfTransferIntoToDoList++; - quint64 size=0; - if(!source.isSymLink()) - size=source.size(); - const std::string &drive=driveManagement.getDrive(destination.absoluteFilePath().toStdString()); - if(!drive.empty())//can be a network drive - if(mode!=Ultracopier::Move || drive!=driveManagement.getDrive(source.absoluteFilePath().toStdString())) - { - if(requiredSpace.find(drive)!=requiredSpace.cend()) - { - requiredSpace[drive]+=size; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("space needed add: %1, space needed: %2, on: %3").arg(size).arg(requiredSpace.at(drive)).arg(QString::fromStdString(drive)).toStdString()); - } - else - { - requiredSpace[drive]=size; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("set space %1 needed, on: %2").arg(size).arg(QString::fromStdString(drive)).toStdString()); - } - } - bytesToTransfer+= size; - ActionToDoTransfer temp; - temp.id = generateIdNumber(); - temp.size = size; - temp.source = source; - temp.destination= destination; - temp.mode = mode; - temp.isRunning = false; - actionToDoListTransfer.push_back(temp); - //push the new transfer to interface - Ultracopier::ReturnActionOnCopyList newAction; - newAction.type = Ultracopier::AddingItem; - newAction.addAction=actionToDoTransferToItemOfCopyList(temp); - actionDone.push_back(newAction); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("source: %1, destination: %2, add entry: %3, size: %4, size2: %5, isSymLink: %6").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).arg(temp.id).arg(temp.size).arg(size).arg(source.isSymLink()).toStdString()); - return temp.id; -} - -Ultracopier::ItemOfCopyList ListThread::actionToDoTransferToItemOfCopyList(const ListThread::ActionToDoTransfer &actionToDoTransfer) -{ - Ultracopier::ItemOfCopyList itemOfCopyList; - itemOfCopyList.id = actionToDoTransfer.id; - itemOfCopyList.sourceFullPath = actionToDoTransfer.source.absoluteFilePath().toStdString(); - itemOfCopyList.sourceFileName = actionToDoTransfer.source.fileName().toStdString(); - itemOfCopyList.destinationFullPath = actionToDoTransfer.destination.absoluteFilePath().toStdString(); - itemOfCopyList.destinationFileName = actionToDoTransfer.destination.fileName().toStdString(); - itemOfCopyList.size = actionToDoTransfer.size; - itemOfCopyList.mode = actionToDoTransfer.mode; - return itemOfCopyList; -} - -//generate id number -uint64_t ListThread::generateIdNumber() -{ - idIncrementNumber++; - if(idIncrementNumber>(((quint64)1024*1024)*1024*1024*2)) - idIncrementNumber=0; - return idIncrementNumber; -} - -//warning the first entry is accessible will copy -void ListThread::removeItems(const std::vector &ids) -{ - for(unsigned int i=0;i ids) -{ - if(actionToDoListTransfer.size()<=1) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - //do list operation - int indexToMove=0; - for (unsigned int i=0; i ids) -{ - if(actionToDoListTransfer.size()<=1) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - //do list operation - int lastGoodPositionReal=0; - bool haveGoodPosition=false; - for (unsigned int i=0; i ids) -{ - if(actionToDoListTransfer.size()<=1) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - //do list operation - int lastGoodPositionReal=0; - bool haveGoodPosition=false; - for (int i=actionToDoListTransfer.size()-1; i>=0; --i) { - if(vectorcontainsAtLeastOne(ids,actionToDoListTransfer.at(i).id)) - { - if(haveGoodPosition) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"move item "+std::to_string(i)+" to "+std::to_string(i+1)); - Ultracopier::ReturnActionOnCopyList newAction; - newAction.type=Ultracopier::MoveItem; - newAction.addAction.id=actionToDoListTransfer.at(i).id; - newAction.userAction.moveAt=lastGoodPositionReal; - newAction.userAction.position=i; - actionDone.push_back(newAction); - ActionToDoTransfer temp1=actionToDoListTransfer.at(i); - ActionToDoTransfer temp2=actionToDoListTransfer.at(lastGoodPositionReal); - actionToDoListTransfer[i]=temp2; - actionToDoListTransfer[lastGoodPositionReal]=temp1; - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Try move up false, item "+std::to_string(i)); - } - vectorremoveOne(ids,actionToDoListTransfer.at(i).id); - if(ids.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop with return"); - return; - } - } - else - { - lastGoodPositionReal=i; - haveGoodPosition=true; - } - } - sendActionDone(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); -} - -//put on bottom -void ListThread::moveItemsOnBottom(std::vector ids) -{ - if(actionToDoListTransfer.size()<=1) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - //do list operation - int lastGoodPositionReal=actionToDoListTransfer.size()-1; - for (int i=lastGoodPositionReal; i>=0; --i) { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Check action on item "+std::to_string(i)); - if(vectorcontainsAtLeastOne(ids,actionToDoListTransfer.at(i).id)) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"move item "+std::to_string(i)+" to "+std::to_string(lastGoodPositionReal)); - vectorremoveOne(ids,actionToDoListTransfer.at(i).id); - Ultracopier::ReturnActionOnCopyList newAction; - newAction.type=Ultracopier::MoveItem; - newAction.addAction.id=actionToDoListTransfer.at(i).id; - newAction.userAction.moveAt=lastGoodPositionReal; - newAction.userAction.position=i; - actionDone.push_back(newAction); - ActionToDoTransfer temp=actionToDoListTransfer.at(i); - actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+i); - actionToDoListTransfer.insert(actionToDoListTransfer.cbegin()+lastGoodPositionReal,temp); - lastGoodPositionReal--; - if(ids.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop with return"); - return; - } - } - } - sendActionDone(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); -} - -/** \brief give the forced mode, to export/import transfer list */ -void ListThread::forceMode(const Ultracopier::CopyMode &mode) -{ - #ifdef ULTRACOPIER_PLUGIN_RSYNC - if(mode==Ultracopier::Move) - setRsync(false); - #endif - if(mode==Ultracopier::Copy) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to copy"); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to move"); - this->mode=mode; - forcedMode=true; -} - -void ListThread::exportTransferList(const std::string &fileName) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - QFile transferFile(QString::fromStdString(fileName)); - if(transferFile.open(QIODevice::WriteOnly|QIODevice::Truncate)) - { - transferFile.write(QStringLiteral("Ultracopier;Transfer-list;").toUtf8()); - if(!forcedMode) - transferFile.write(QStringLiteral("Transfer;").toUtf8()); - else - { - if(mode==Ultracopier::Copy) - transferFile.write(QStringLiteral("Copy;").toUtf8()); - else - transferFile.write(QStringLiteral("Move;").toUtf8()); - } - transferFile.write(QStringLiteral("Ultracopier\n").toUtf8()); - bool haveError=false; - int size=actionToDoListTransfer.size(); - for (int index=0;index0 || actionToDoListInode.size()>0 || actionToDoListInode_afterTheTransfer.size()>0; - Ultracopier::EngineActionInProgress updateTheStatus_action_in_progress; - if(updateTheStatus_copying) - updateTheStatus_action_in_progress=Ultracopier::CopyingAndListing; - else - updateTheStatus_action_in_progress=Ultracopier::Listing; - emit actionInProgess(updateTheStatus_action_in_progress); - - bool errorFound=false; - std::regex correctLine; - if(transferListMixedMode) - correctLine=std::regex("^(Copy|Move);[^;]+;[^;]+[\n\r]*$"); - else - correctLine=std::regex("^[^;]+;[^;]+[\n\r]*$"); - std::vector args; - Ultracopier::CopyMode tempMode; - do - { - data=transferFile.readLine(65535*2); - if(data.size()>0) - { - content=std::string(data.constData(),data.size()); - //do the import here - if(std::regex_match(content,correctLine)) - { - stringreplaceAll(content,"\n",""); - args=stringsplit(content,';'); - if(forcedMode) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("New data to import in forced mode: %2,%3") - .arg(QString::fromStdString(args.at(0))) - .arg(QString::fromStdString(args.at(1))) - .toStdString()); - addToTransfer(QFileInfo(QString::fromStdString(args.at(0))),QFileInfo(QString::fromStdString(args.at(1))),mode); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("New data to import: %1,%2,%3") - .arg(QString::fromStdString(args.at(0))) - .arg(QString::fromStdString(args.at(1))) - .arg(QString::fromStdString(args.at(2))) - .toStdString()); - if(args.at(0)=="Copy") - tempMode=Ultracopier::Copy; - else - tempMode=Ultracopier::Move; - addToTransfer(QFileInfo(QString::fromStdString(args.at(1))),QFileInfo(QString::fromStdString(args.at(2))),tempMode); - } - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Wrong line syntax: "+content); - errorFound=true; - } - } - } - while(data.size()>0); - transferFile.close(); - if(errorFound) - emit warningTransferList(tr("Some errors have been found during the line parsing").toStdString()); - - updateTheStatus();//->sendActionDone(); into this - autoStartAndCheckSpace(); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("Unable to open the transfer list: %1").arg(transferFile.errorString()).toStdString()); - emit errorTransferList(tr("Unable to open the transfer list: %1").arg(transferFile.errorString()).toStdString()); - return; - } -} - -int ListThread::getNumberOfTranferRuning() const -{ - int numberOfTranferRuning=0; - const int &loop_size=transferThreadList.size(); - //lunch the transfer in WaitForTheTransfer - int int_for_loop=0; - while(int_for_loopgetStat()==TransferStat_Transfer && transferThreadList.at(int_for_loop)->transferId!=0 && transferThreadList.at(int_for_loop)->transferSize>=parallelizeIfSmallerThan) - numberOfTranferRuning++; - int_for_loop++; - } - return numberOfTranferRuning; -} - -//return -bool ListThread::needMoreSpace() const -{ - if(!checkDiskSpace) - return false; - std::vector diskspace_list; - for( auto& spaceDrive : requiredSpace ) { - const QString &drive=QString::fromStdString(spaceDrive.first); - #ifdef Q_OS_WIN32 - if(spaceDrive.first!="A:\\" && spaceDrive.first!="A:/" && spaceDrive.first!="A:" && spaceDrive.first!="A" && spaceDrive.first!="a:\\" && spaceDrive.first!="a:/" && spaceDrive.first!="a:" && spaceDrive.first!="a") - { - #endif - QStorageInfo storageInfo(drive); - storageInfo.refresh(); - const qint64 &availableSpace=storageInfo.bytesAvailable(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - const qint64 &bytesFree=storageInfo.bytesFree(); - #endif - - if(availableSpace<0 || - //workaround for all 0 value in case of bug from Qt - (availableSpace==0 && storageInfo.bytesTotal()==0) - ) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("availableSpace: %1, space needed: %2, on: %3, bytesFree: %4").arg(availableSpace).arg(spaceDrive.second).arg(drive).arg(bytesFree).toStdString()); - } - else if(spaceDrive.second>(quint64)availableSpace) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("availableSpace: %1, space needed: %2, on: %3, bytesFree: %4").arg(availableSpace).arg(spaceDrive.second).arg(drive).arg(bytesFree).toStdString()); - #ifdef Q_OS_WIN32 - //if(drive.contains(QRegularExpression("^[a-zA-Z]:[\\\\/]"))) - if(drive.contains(QRegularExpression("^[a-zA-Z]:"))) - #endif - { - Diskspace diskspace; - diskspace.drive=spaceDrive.first; - diskspace.freeSpace=availableSpace; - diskspace.requiredSpace=spaceDrive.second; - diskspace_list.push_back(diskspace); - } - #ifdef Q_OS_WIN32 - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"not local drive"); - #endif - } - #ifdef Q_OS_WIN32 - } - #endif - } - if(!diskspace_list.empty()) - emit missingDiskSpace(diskspace_list); - return ! diskspace_list.empty(); -} - -//do new actions -void ListThread::doNewActions_start_transfer() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, numberOfTranferRuning: %2").arg(actionToDoListTransfer.size()).arg(getNumberOfTranferRuning()).toStdString()); - if(stopIt || putInPause) - return; - int numberOfTranferRuning=getNumberOfTranferRuning(); - const int &loop_size=transferThreadList.size(); - //lunch the transfer in WaitForTheTransfer - int int_for_loop=0; - while(int_for_loopgetStat()==TransferStat_WaitForTheTransfer) - { - if(transferThreadList.at(int_for_loop)->transferSize>=parallelizeIfSmallerThan) - { - if(numberOfTranferRuningstartTheTransfer(); - numberOfTranferRuning++; - } - } - else - transferThreadList.at(int_for_loop)->startTheTransfer(); - } - int_for_loop++; - } - int_for_loop=0; - while(int_for_loopgetStat()==TransferStat_PreOperation) - { - if(transferThreadList.at(int_for_loop)->transferSize>=parallelizeIfSmallerThan) - { - if(numberOfTranferRuningstartTheTransfer(); - numberOfTranferRuning++; - } - } - else - transferThreadList.at(int_for_loop)->startTheTransfer(); - } - int_for_loop++; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); -} - -/** \brief lunch the pre-op or inode op - 1) locate the next next item to do into the both list - 1a) optimisation posible on the mkpath/rmpath - 2) determine what need be lunched - 3) lunch it, rerun the 2) - */ -void ListThread::doNewActions_inode_manipulation() -{ - #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionToDoList.size(): "+std::to_string(actionToDoListTransfer.size())); - #endif - if(stopIt) - checkIfReadyToCancel(); - if(stopIt || putInPause) - return; - #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - #endif - //lunch the pre-op or inode op - TransferThread *currentTransferThread; - int int_for_loop=0; - int int_for_internal_loop=0; - int int_for_transfer_thread_search=0; - actionToDoListTransfer_count=actionToDoListTransfer.size(); - actionToDoListInode_count=actionToDoListInode.size(); - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - //search the next transfer action to do - while(int_for_looptransferId==0) /!\ important! - Because the other thread can have call doNewAction before than this thread have the finish event parsed! - I this case it lose all data - */ - currentTransferThread=transferThreadList.at(int_for_transfer_thread_search); - if(currentTransferThread->getStat()==TransferStat_Idle && currentTransferThread->transferId==0) // /!\ important! - { - std::string drive=driveManagement.getDrive(actionToDoListTransfer.at(int_for_internal_loop).destination.absoluteFilePath().toStdString()); - if(requiredSpace.find(drive)!=requiredSpace.cend() && (actionToDoListTransfer.at(int_for_internal_loop).mode!=Ultracopier::Move || drive!=driveManagement.getDrive(actionToDoListTransfer.at(int_for_internal_loop).source.absoluteFilePath().toStdString()))) - { - requiredSpace[drive]-=actionToDoListTransfer.at(int_for_internal_loop).size; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("space needed removed: %1, space needed: %2, on: %3").arg(actionToDoListTransfer.at(int_for_internal_loop).size).arg(requiredSpace.at(drive)).arg(QString::fromStdString(drive)).toStdString()); - } - currentTransferThread->transferId=currentActionToDoTransfer.id; - currentTransferThread->transferSize=currentActionToDoTransfer.size; - if(!currentTransferThread->setFiles( - currentActionToDoTransfer.source, - currentActionToDoTransfer.size, - currentActionToDoTransfer.destination, - currentActionToDoTransfer.mode - )) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[%1] id: %2 is idle, but seam busy at set name: %3").arg(int_for_loop).arg(currentTransferThread->transferId).arg(currentActionToDoTransfer.destination.absoluteFilePath()).toStdString()); - break; - } - currentActionToDoTransfer.isRunning=true; - - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[%1] id: %2 is idle, use it for %3").arg(int_for_loop).arg(currentTransferThread->transferId).arg(currentActionToDoTransfer.destination.absoluteFilePath()).toStdString()); - - /// \note wrong position? Else write why it's here - Ultracopier::ReturnActionOnCopyList newAction; - newAction.type = Ultracopier::PreOperation; - newAction.addAction.id = currentActionToDoTransfer.id; - newAction.addAction.sourceFullPath = currentActionToDoTransfer.source.absoluteFilePath().toStdString(); - newAction.addAction.sourceFileName = currentActionToDoTransfer.source.fileName().toStdString(); - newAction.addAction.destinationFullPath = currentActionToDoTransfer.destination.absoluteFilePath().toStdString(); - newAction.addAction.destinationFileName = currentActionToDoTransfer.destination.fileName().toStdString(); - newAction.addAction.size = currentActionToDoTransfer.size; - newAction.addAction.mode = currentActionToDoTransfer.mode; - actionDone.push_back(newAction); - int_for_transfer_thread_search++; - numberOfInodeOperation++; - #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); - #endif - break; - } - int_for_transfer_thread_search++; - } - if(int_for_internal_loop==loop_sub_size_transfer_thread_search) - { - /// \note Can be normal when all thread is not initialized - #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"unable to found free thread to do the transfer"); - #endif - break; - } - #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); - #endif - if(numberOfInodeOperation>=inodeThreads) - break; - if(followTheStrictOrder) - break; - } - int_for_loop++; - } - //search the next inode action to do - int_for_internal_loop=0; - while(int_for_internal_loopinodeThreads) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("The index have been detected as out of max range: %1>%2").arg(actionToDoListInode_count).arg(inodeThreads).toStdString()); - return; - } -} - -//restart transfer if it can -void ListThread::restartTransferIfItCan() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - TransferThread *transfer=qobject_cast(QObject::sender()); - if(transfer==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); - return; - } - int numberOfTranferRuning=getNumberOfTranferRuning(); - if(numberOfTranferRuninggetStat()==TransferStat_WaitForTheTransfer) - transfer->startTheTransfer(); - doNewActions_start_transfer(); -} - -/// \brief update the transfer stat -void ListThread::newTransferStat(const TransferStat &stat,const quint64 &id) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferStat: "+std::to_string(stat)); - Ultracopier::ReturnActionOnCopyList newAction; - switch(stat) - { - case TransferStat_Idle: - return; - break; - case TransferStat_PreOperation: - return; - break; - case TransferStat_WaitForTheTransfer: - return; - break; - case TransferStat_Transfer: - newAction.type=Ultracopier::Transfer; - break; - case TransferStat_PostTransfer: - case TransferStat_PostOperation: - newAction.type=Ultracopier::PostOperation; - break; - case TransferStat_Checksum: - newAction.type=Ultracopier::CustomOperation; - break; - default: - return; - break; - } - newAction.addAction.id = id; - actionDone.push_back(newAction); -} - -void ListThread::set_osBufferLimit(const unsigned int &osBufferLimit) -{ - this->osBufferLimit=osBufferLimit; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexset_osBufferLimit(osBufferLimit); - index++; - } -} - -void ListThread::set_setFilters(const std::vector &include,const std::vector &exclude) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("include.size(): %1, exclude.size(): %2").arg(include.size()).arg(exclude.size()).toStdString()); - this->include=include; - this->exclude=exclude; - unsigned int index=0; - while(indexsetFilters(include,exclude); - index++; - } -} - -void ListThread::set_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) -{ - this->firstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; - emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); -} - -void ListThread::set_updateMount() -{ - driveManagement.tryUpdate(); - emit send_updateMount(); -} - -void ListThread::mkPathFirstFolderFinish() -{ - int int_for_loop=0; - const int &loop_size=actionToDoListInode.size(); - while(int_for_loop newList; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexgetStat()) - { - case TransferStat_Idle: - stat="Idle"; - break; - case TransferStat_PreOperation: - stat="PreOperation"; - break; - case TransferStat_WaitForTheTransfer: - stat="WaitForTheTransfer"; - break; - case TransferStat_Transfer: - stat="Transfer"; - break; - case TransferStat_PostOperation: - stat="PostOperation"; - break; - case TransferStat_PostTransfer: - stat="PostTransfer"; - break; - case TransferStat_Checksum: - stat="Checksum"; - break; - default: - stat=QStringLiteral("??? (%1)").arg(transferThreadList.at(index)->getStat()); - break; - } - newList.push_back(QStringLiteral("%1) (%3,%4) %2") - .arg(index) - .arg(stat) - .arg(transferThreadList.at(index)->readingLetter()) - .arg(transferThreadList.at(index)->writingLetter()) - .toStdString() - ); - index++; - } - std::vector newList2; - index=0; - const int &loop_size=actionToDoListTransfer.size(); - while(index((inodeThreads+ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER)*2+1)) - { - newList2.push_back("..."); - break; - } - index++; - } - emit updateTheDebugInfo(newList,newList2,numberOfInodeOperation); -} - -#endif - -/// \note Can be call without queue because all call will be serialized -void ListThread::fileAlreadyExists(const QFileInfo &source,const QFileInfo &destination,const bool &isSame) -{ - emit send_fileAlreadyExists(source,destination,isSame,qobject_cast(sender())); -} - -/// \note Can be call without queue because all call will be serialized -void ListThread::errorOnFile(const QFileInfo &fileInfo, const std::string &errorString, const ErrorType &errorType) -{ - TransferThread * transferThread=qobject_cast(sender()); - if(transferThread==NULL) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Thread locating error"); - return; - } - ErrorLogEntry errorLogEntry; - errorLogEntry.source=transferThread->getSourceInode(); - errorLogEntry.destination=transferThread->getDestinationInode(); - errorLogEntry.mode=transferThread->getMode(); - errorLogEntry.error=errorString; - errorLog.push_back(errorLogEntry); - emit errorToRetry(transferThread->getSourcePath(),transferThread->getDestinationPath(),errorString); - emit send_errorOnFile(fileInfo,errorString,transferThread,errorType); -} - -/// \note Can be call without queue because all call will be serialized -void ListThread::folderAlreadyExists(const QFileInfo &source,const QFileInfo &destination,const bool &isSame) -{ - emit send_folderAlreadyExists(source,destination,isSame,qobject_cast(sender())); -} - -/// \note Can be call without queue because all call will be serialized -/// \todo all this part -void ListThread::errorOnFolder(const QFileInfo &fileInfo,const std::string &errorString,const ErrorType &errorType) -{ - emit send_errorOnFolder(fileInfo,errorString,qobject_cast(sender()),errorType); -} - -//to run the thread -void ListThread::run() -{ - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - clockForTheCopySpeed=new QTimer(); - #endif - - exec(); -} - -void ListThread::getNeedPutAtBottom(const QFileInfo &fileInfo, const std::string &errorString, TransferThread *thread, const ErrorType &errorType) -{ - if(actionToDoListTransfer.empty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"can't try put at bottom if empty"); - this->alwaysDoThisActionForFileExists=FileExists_NotSet; - putAtBottom=0; - emit haveNeedPutAtBottom(false,fileInfo,errorString,thread,errorType); - return; - } - bool needPutAtBottom=(putAtBottom<(quint32)actionToDoListTransfer.size()); - if(!needPutAtBottom) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Reset put at bottom"); - this->alwaysDoThisActionForFileExists=FileExists_NotSet; - putAtBottom=0; - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Put at bottom for later try"); - thread->putAtBottom(); - putAtBottom++; - return; - } - emit haveNeedPutAtBottom(needPutAtBottom,fileInfo,errorString,thread,errorType); -} - -/// \to create transfer thread -void ListThread::createTransferThread() -{ - if(stopIt) - return; - if(transferThreadList.size()>=(unsigned int)inodeThreads) - return; - transferThreadList.push_back(new TransferThread()); - TransferThread * last=transferThreadList.back(); - last->transferId=0; - last->transferSize=0; - last->setRightTransfer(doRightTransfer); - last->setKeepDate(keepDate); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - if(!last->setBlockSize(blockSizeAfterSpeedLimitation)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the block size: "+std::to_string(blockSizeAfterSpeedLimitation)); - #else - if(!last->setBlockSize(blockSize)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the block size: "+std::to_string(blockSize)); - #endif - if(!last->setSequentialBuffer(sequentialBuffer)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the sequentialBuffer: "+std::to_string(sequentialBuffer)); - if(!last->setBlockSize(parallelBuffer)) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the parallelBuffer: "+std::to_string(parallelBuffer)); - last->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - last->setMultiForBigSpeed(multiForBigSpeed); - #endif - last->set_doChecksum(doChecksum); - last->set_checksumIgnoreIfImpossible(checksumIgnoreIfImpossible); - last->set_checksumOnlyOnError(checksumOnlyOnError); - last->set_osBuffer(osBuffer); - last->set_osBufferLimited(osBufferLimited); - last->set_osBufferLimit(osBufferLimit); - last->setDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - last->setRsync(rsync); - #endif - - #ifdef ULTRACOPIER_PLUGIN_DEBUG - connect(last,&TransferThread::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection); - #endif // ULTRACOPIER_PLUGIN_DEBUG - connect(last,&TransferThread::errorOnFile, this,&ListThread::errorOnFile, Qt::QueuedConnection); - connect(last,&TransferThread::fileAlreadyExists, this,&ListThread::fileAlreadyExists, Qt::QueuedConnection); - connect(last,&TransferThread::tryPutAtBottom, this,&ListThread::transferPutAtBottom, Qt::QueuedConnection); - connect(last,&TransferThread::readStopped, this,&ListThread::doNewActions_start_transfer, Qt::QueuedConnection); - connect(last,&TransferThread::preOperationStopped, this,&ListThread::doNewActions_start_transfer, Qt::QueuedConnection); - connect(last,&TransferThread::postOperationStopped, this,&ListThread::transferInodeIsClosed, Qt::QueuedConnection); - connect(last,&TransferThread::checkIfItCanBeResumed, this,&ListThread::restartTransferIfItCan, Qt::QueuedConnection); - connect(last,&TransferThread::pushStat, this,&ListThread::newTransferStat, Qt::QueuedConnection); - - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - //speed limitation - connect(clockForTheCopySpeed, &QTimer::timeout, last, &TransferThread::timeOfTheBlockCopyFinished, Qt::QueuedConnection); - #endif - - connect(this,&ListThread::send_sendNewRenamingRules, last,&TransferThread::setRenamingRules, Qt::QueuedConnection); - - connect(this,&ListThread::send_setTransferAlgorithm, last,&TransferThread::setTransferAlgorithm, Qt::QueuedConnection); - connect(this,&ListThread::send_parallelBuffer, last,&TransferThread::setParallelBuffer, Qt::QueuedConnection); - connect(this,&ListThread::send_sequentialBuffer, last,&TransferThread::setSequentialBuffer, Qt::QueuedConnection); - connect(this,&ListThread::send_updateMount, last,&TransferThread::set_updateMount, Qt::QueuedConnection); - - last->start(); - last->setObjectName(QStringLiteral("transfer %1").arg(transferThreadList.size()-1)); - last->setMkpathTransfer(&mkpathTransfer); - last->setRenamingRules(firstRenamingRule,otherRenamingRule); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - last->setId(transferThreadList.size()-1); - #endif - if(transferThreadList.size()>=(unsigned int)inodeThreads) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"create the last of the "+std::to_string(inodeThreads)+" transferThread"); - return; - } - if(stopIt) - return; - doNewActions_inode_manipulation(); - emit askNewTransferThread(); -} - -void ListThread::deleteTransferThread() -{ - int loop_size=transferThreadList.size(); - if(loop_size>inodeThreads) - { - int index=0; - while(indexinodeThreads) - { - if(transferThreadList.at(index)->getStat()==TransferStat_Idle && transferThreadList.at(index)->transferId==0) - { - transferThreadList.at(index)->stop(); - delete transferThreadList.at(index);//->deleteLayer(); - transferThreadList[index]=NULL; - transferThreadList.erase(transferThreadList.cbegin()+index); - loop_size--; - } - else - index++; - } - if(loop_size==inodeThreads) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inodeThreads is lowered to the right value: "+std::to_string(inodeThreads)); - } -} - -void ListThread::setTransferAlgorithm(const TransferAlgorithm &transferAlgorithm) -{ - if(transferAlgorithm==TransferAlgorithm_Sequential) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"transferAlgorithm==TransferAlgorithm_Sequential"); - else if(transferAlgorithm==TransferAlgorithm_Automatic) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"transferAlgorithm==TransferAlgorithm_Automatic"); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"transferAlgorithm==TransferAlgorithm_Parallel"); - emit send_setTransferAlgorithm(transferAlgorithm); -} - -void ListThread::setParallelBuffer(int parallelBuffer) -{ - if(parallelBuffer<1 || parallelBuffer>ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"wrong number of block: "+std::to_string(parallelBuffer)); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"in number of block: "+std::to_string(parallelBuffer)); - this->parallelBuffer=parallelBuffer; - emit send_parallelBuffer(parallelBuffer); -} - -void ListThread::setSequentialBuffer(int sequentialBuffer) -{ - if(sequentialBuffer<1 || sequentialBuffer>ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"wrong number of block: "+std::to_string(sequentialBuffer)); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"in number of block: "+std::to_string(sequentialBuffer)); - this->sequentialBuffer=sequentialBuffer; - emit send_sequentialBuffer(sequentialBuffer); -} - -void ListThread::setParallelizeIfSmallerThan(const unsigned int ¶llelizeIfSmallerThan) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"parallelizeIfSmallerThan in Bytes: "+std::to_string(parallelizeIfSmallerThan)); - this->parallelizeIfSmallerThan=parallelizeIfSmallerThan; -} - -void ListThread::setMoveTheWholeFolder(const bool &moveTheWholeFolder) -{ - for(unsigned int i=0;isetMoveTheWholeFolder(moveTheWholeFolder); - this->moveTheWholeFolder=moveTheWholeFolder; -} - -void ListThread::setFollowTheStrictOrder(const bool &followTheStrictOrder) -{ - this->followTheStrictOrder=followTheStrictOrder; -} - -void ListThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) -{ - this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexsetDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); - index++; - } -} - -void ListThread::setInodeThreads(const int &inodeThreads) -{ - if(inodeThreads<1 || inodeThreads>32) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"inodeThreads is out of ranges: "+std::to_string(inodeThreads)); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inodeThreads: "+std::to_string(inodeThreads)); - this->inodeThreads=inodeThreads; - createTransferThread(); - deleteTransferThread(); -} - -void ListThread::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"renameTheOriginalDestination: "+std::to_string(renameTheOriginalDestination)); - this->renameTheOriginalDestination=renameTheOriginalDestination; - int index=0; - int loop_sub_size_transfer_thread_search=transferThreadList.size(); - while(indexsetRenameTheOriginalDestination(renameTheOriginalDestination); - index++; - } -} - -void ListThread::setCheckDiskSpace(const bool &checkDiskSpace) -{ - this->checkDiskSpace=checkDiskSpace; -} - -void ListThread::setCopyListOrder(const bool &order) -{ - this->copyListOrder=order; - for(unsigned int i=0;isetCopyListOrder(this->copyListOrder); -} - -void ListThread::exportErrorIntoTransferList(const std::string &fileName) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - QFile transferFile(QString::fromStdString(fileName)); - if(transferFile.open(QIODevice::WriteOnly|QIODevice::Truncate)) - { - transferFile.write(QStringLiteral("Ultracopier;Transfer-list;").toUtf8()); - if(!forcedMode) - transferFile.write(QStringLiteral("Transfer;").toUtf8()); - else - { - if(mode==Ultracopier::Copy) - transferFile.write(QStringLiteral("Copy;").toUtf8()); - else - transferFile.write(QStringLiteral("Move;").toUtf8()); - } - transferFile.write(QStringLiteral("Ultracopier\n").toUtf8()); - bool haveError=false; - int size=errorLog.size(); - for (int index=0;index -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../../../interface/PluginInterface_CopyEngine.h" -#include "ScanFileOrFolder.h" -#include "TransferThread.h" -#include "MkPath.h" -#include "Environment.h" -#include "DriveManagement.h" - -/// \brief Define the list thread, and management to the action to do -class ListThread : public QThread -{ - Q_OBJECT -public: - explicit ListThread(FacilityInterface * facilityInterface); - ~ListThread(); - - //duplication copy detection - /** \brief compare the current sources of the copy, with the passed arguments - * \param sources the sources list to compares with the current sources list - * \return true if have same sources, else false (or empty) */ - bool haveSameSource(const std::vector &sources); - /** \brief compare the current destination of the copy, with the passed arguments - * \param destination the destination to compares with the current destination - * \return true if have same destination, else false (or empty) */ - bool haveSameDestination(const std::string &destination); - /// \return empty if multiple or no destination - std::string getUniqueDestinationFolder() const; - //external soft like file browser have send copy/move list to do - /** \brief send copy with destination - * \param sources the sources list to copy - * \param destination the destination to copy - * \return true if the copy have been accepted */ - bool newCopy(const std::vector &sources,const std::string &destination); - /** \brief send move without destination, ask the destination - * \param sources the sources list to move - * \param destination the destination to move - * \return true if the move have been accepted */ - bool newMove(const std::vector &sources,const std::string &destination); - /** \brief to set drives detected - * specific to this copy engine */ - /// \brief to set the collision action - void setCollisionAction(const FileExistsAction &alwaysDoThisActionForFileExists); - /** \brief to sync the transfer list - * Used when the interface is changed, useful to minimize the memory size */ - void syncTransferList(); - /// \brief to store one action to do - struct ActionToDoTransfer - { - uint64_t id; - uint64_t size;///< Used to set: used in case of transfer or remainingInode for drop folder - QFileInfo source;///< Used to set: source for transfer, folder to create, folder to drop - QFileInfo destination; - Ultracopier::CopyMode mode; - bool isRunning;///< store if the action si running - //TransferThread * transfer; // -> see transferThreadList - }; - std::vector actionToDoListTransfer; - /// \brief to store one action to do - struct ActionToDoInode - { - ActionType type;///< \see ActionType - uint64_t id; - int64_t size;///< Used to set: used in case of transfer or remainingInode for drop folder - QFileInfo source;///< Keep to copy the right/date, to remove (for move) - QFileInfo destination;///< Used to set: folder to create, folder to drop - bool isRunning;///< store if the action si running - }; - std::vector actionToDoListInode; - std::vector actionToDoListInode_afterTheTransfer; - int numberOfInodeOperation; - struct ErrorLogEntry - { - QFileInfo source; - QFileInfo destination; - std::string error; - Ultracopier::CopyMode mode; - }; - std::vector errorLog; - //dir operation thread queue - MkPath mkPathQueue; - //to get the return value from copyEngine - bool getReturnBoolToCopyEngine() const; - std::pair getReturnPairQuint64ToCopyEngine() const; - Ultracopier::ItemOfCopyList getReturnItemOfCopyListToCopyEngine() const; - - void set_doChecksum(bool doChecksum); - void set_checksumIgnoreIfImpossible(bool checksumIgnoreIfImpossible); - void set_checksumOnlyOnError(bool checksumOnlyOnError); - void set_osBuffer(bool osBuffer); - void set_osBufferLimited(bool osBufferLimited); - void autoStartIfNeeded(); -public slots: - //action on the copy - /// \brief put the transfer in pause - void pause(); - /// \brief resume the transfer - void resume(); - /** \brief skip one transfer entry - * \param id id of the file to remove */ - void skip(const uint64_t &id); - /** \brief skip as interanl one transfer entry - * \param id id of the file to remove */ - bool skipInternal(const uint64_t &id); - /// \brief cancel all the transfer - void cancel(); - //edit the transfer list - /** \brief remove the selected item - * \param ids ids is the id list of the selected items */ - void removeItems(const std::vector &ids); - /** \brief move on top of the list the selected item - * \param ids ids is the id list of the selected items */ - void moveItemsOnTop(std::vector ids); - /** \brief move up the list the selected item - * \param ids ids is the id list of the selected items */ - void moveItemsUp(std::vector ids); - /** \brief move down the list the selected item - * \param ids ids is the id list of the selected items */ - void moveItemsDown(std::vector ids); - /** \brief move on bottom of the list the selected item - * \param ids ids is the id list of the selected items */ - void moveItemsOnBottom(std::vector ids); - - /** \brief give the forced mode, to export/import transfer list */ - void forceMode(const Ultracopier::CopyMode &mode); - /// \brief export the transfer list into a file - void exportTransferList(const std::string &fileName); - /// \brief import the transfer list into a file - void importTransferList(const std::string &fileName); - - /// \brief set the folder local collision - void setFolderCollision(const FolderExistsAction &alwaysDoThisActionForFolderExists); - /** \brief to set the speed limitation - * -1 if not able, 0 if disabled */ - bool setSpeedLimitation(const int64_t &speedLimitation); - /// \brief set the copy info and options before runing - void setRightTransfer(const bool doRightTransfer); - /// \brief set keep date - void setKeepDate(const bool keepDate); - /// \brief set block size in KB - void setBlockSize(const int blockSize); - /// \brief set auto start - void setAutoStart(const bool autoStart); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - /// \brief set rsync - void setRsync(const bool rsync); - #endif - /// \brief set check destination folder - void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); - /// \brief set data local to the thread - void setAlwaysFileExistsAction(const FileExistsAction &alwaysDoThisActionForFileExists); - /// \brief do new actions, start transfer - void doNewActions_start_transfer(); - /** \brief lunch the pre-op or inode op - 1) locate the next next item to do into the both list - 1a) optimisation posible on the mkpath/rmpath - 2) determine what need be lunched - 3) lunch it, rerun the 2) - */ - void doNewActions_inode_manipulation(); - /// \brief restart transfer if it can - void restartTransferIfItCan(); - void getNeedPutAtBottom(const QFileInfo &fileInfo, const std::string &errorString, TransferThread *thread,const ErrorType &errorType); - - /// \brief update the transfer stat - void newTransferStat(const TransferStat &stat,const quint64 &id); - - void set_osBufferLimit(const unsigned int &osBufferLimit); - void set_setFilters(const std::vector &include,const std::vector &exclude); - void set_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); - void set_updateMount(); - - //send action done - void sendActionDone(); - //send progression - void sendProgression(); - - void setTransferAlgorithm(const TransferAlgorithm &transferAlgorithm); - void setParallelBuffer(int parallelBuffer); - void setSequentialBuffer(int sequentialBuffer); - void setParallelizeIfSmallerThan(const unsigned int ¶llelizeIfSmallerThan); - void setMoveTheWholeFolder(const bool &moveTheWholeFolder); - void setFollowTheStrictOrder(const bool &followTheStrictOrder); - void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); - void setInodeThreads(const int &inodeThreads); - void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); - void setCheckDiskSpace(const bool &checkDiskSpace); - void setCopyListOrder(const bool &order); - void exportErrorIntoTransferList(const std::string &fileName); -private: - QSemaphore mkpathTransfer; - std::string sourceDrive; - bool sourceDriveMultiple; - std::string destinationDrive; - std::string destinationFolder; - bool destinationDriveMultiple; - bool destinationFolderMultiple; - DriveManagement driveManagement; - - bool stopIt; - std::vector scanFileOrFolderThreadsPool; - int numberOfTransferIntoToDoList; - std::vector transferThreadList; - ScanFileOrFolder * newScanThread(Ultracopier::CopyMode mode); - uint64_t bytesToTransfer; - uint64_t bytesTransfered; - bool autoStart; - #ifdef ULTRACOPIER_PLUGIN_RSYNC - bool rsync; - #endif - bool putInPause; - std::vector actionDone;///< to action to send to the interface - uint64_t idIncrementNumber;///< to store the last id returned - int64_t actualRealByteTransfered; - int maxSpeed;///< in KB/s, assume as 0KB/s as default like every where - FolderExistsAction alwaysDoThisActionForFolderExists; - bool checkDestinationFolderExists; - bool doChecksum; - bool checksumIgnoreIfImpossible; - bool checksumOnlyOnError; - bool osBuffer; - bool osBufferLimited; - unsigned int parallelizeIfSmallerThan; - bool moveTheWholeFolder; - bool followTheStrictOrder; - bool deletePartiallyTransferredFiles; - int sequentialBuffer; - int parallelBuffer; - int inodeThreads; - bool renameTheOriginalDestination; - bool checkDiskSpace; - bool copyListOrder; - std::unordered_map requiredSpace; - std::vector > timeToTransfer; - unsigned int putAtBottom; - unsigned int osBufferLimit; - std::vector include,exclude; - Ultracopier::CopyMode mode; - bool forcedMode; - std::string firstRenamingRule; - std::string otherRenamingRule; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - int multiForBigSpeed; - #endif - /* here to prevent: - QObject::killTimer: timers cannot be stopped from another thread - QObject::startTimer: timers cannot be started from another thread */ - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - QTimer *clockForTheCopySpeed; ///< For the speed throttling - #endif - - inline static Ultracopier::ItemOfCopyList actionToDoTransferToItemOfCopyList(const ActionToDoTransfer &actionToDoTransfer); - //add file transfer to do - uint64_t addToTransfer(const QFileInfo& source,const QFileInfo& destination,const Ultracopier::CopyMode& mode); - //generate id number - uint64_t generateIdNumber(); - //warning the first entry is accessible will copy - bool removeSingleItem(const uint64_t &id); - //put on top - bool moveOnTopItem(const uint64_t &id); - //move up - bool moveUpItem(const uint64_t &id); - //move down - bool moveDownItem(const uint64_t &id); - //put on bottom - bool moveOnBottomItem(const uint64_t &id); - //general transfer - void startGeneralTransfer(); - //debug windows if needed - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - QTimer timerUpdateDebugDialog; - #endif - void detectDrivesOfCurrentTransfer(const std::vector &sources,const std::string &destination); - FacilityInterface * facilityInterface; - QSemaphore waitConstructor,waitCancel; - int actionToDoListTransfer_count,actionToDoListInode_count; - bool doTransfer,doInode; - int64_t oversize;//used as temp variable - int64_t currentProgression; - int64_t copiedSize,totalSize,localOverSize; - std::vector progressionList; - //memory variable for transfer thread creation - bool doRightTransfer; - bool keepDate; - int blockSize;//in Bytes - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - int blockSizeAfterSpeedLimitation;//in Bytes - #endif - std::vector drives; - FileExistsAction alwaysDoThisActionForFileExists; - //to return value to the copyEngine - bool returnBoolToCopyEngine; - std::pair returnPairQuint64ToCopyEngine; - std::vector returnListItemOfCopyListToCopyEngine; - Ultracopier::ItemOfCopyList returnItemOfCopyListToCopyEngine; - Ultracopier::ProgressionItem tempItem; - - void realByteTransfered(); - int getNumberOfTranferRuning() const; - bool needMoreSpace() const; -private slots: - void scanThreadHaveFinishSlot(); - void scanThreadHaveFinish(bool skipFirstRemove=false); - void autoStartAndCheckSpace(); - void updateTheStatus(); - void fileTransfer(const QFileInfo &sourceFileInfo,const QFileInfo &destinationFileInfo,const Ultracopier::CopyMode &mode); - //mkpath event - void mkPathFirstFolderFinish(); - /** \brief put the current file at bottom in case of error - \note ONLY IN CASE OF ERROR */ - void transferPutAtBottom(); - //transfer is finished - void transferInodeIsClosed(); - //debug windows if needed - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - void timedUpdateDebugDialog(); - #endif - //dialog message - /// \note Can be call without queue because all call will be serialized - void fileAlreadyExists(const QFileInfo &source,const QFileInfo &destination,const bool &isSame); - /// \note Can be call without queue because all call will be serialized - void errorOnFile(const QFileInfo &fileInfo,const std::string &errorString, const ErrorType &errorType); - /// \note Can be call without queue because all call will be serialized - void folderAlreadyExists(const QFileInfo &source,const QFileInfo &destination,const bool &isSame); - /// \note Can be call without queue because all call will be serialized - void errorOnFolder(const QFileInfo &fileInfo, const std::string &errorString, const ErrorType &errorType); - //to run the thread - void run(); - /// \to create transfer thread - void createTransferThread(); - void deleteTransferThread(); - //mk path to do - uint64_t addToMkPath(const QFileInfo& source, const QFileInfo& destination, const int &inode); - //add rm path to do - void addToMovePath(const QFileInfo& source,const QFileInfo& destination, const int& inodeToRemove); - //add to real move - void addToRealMove(const QFileInfo& source,const QFileInfo& destination); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - //rsync rm - void addToRmForRsync(const QFileInfo& destination); - #endif - //send the progression, after full reset of the interface (then all is empty) - void syncTransferList_internal(); - - void checkIfReadyToCancel(); -signals: - //send information about the copy - void actionInProgess(const Ultracopier::EngineActionInProgress &) const; //should update interface information on this event - - void newActionOnList(const std::vector &) const;///very important, need be temporized to group the modification to do and not flood the interface - void syncReady() const; - void doneTime(const std::vector >&) const; - - /** \brief to get the progression for a specific file - * \param id the id of the transfer, id send during population the transfer list - * first = current transfered byte, second = byte to transfer */ - void pushFileProgression(const std::vector &progressionList) const; - //get information about the copy - /** \brief to get the general progression - * first = current transfered byte, second = byte to transfer */ - void pushGeneralProgression(const uint64_t &,const uint64_t &) const; - - void newFolderListing(const std::string &path) const; - void isInPause(const bool &) const; - - //when can be deleted - void canBeDeleted() const; - void haveNeedPutAtBottom(bool needPutAtBottom,const QFileInfo &fileInfo,const std::string &errorString,TransferThread * thread,const ErrorType &errorType) const; - - //send error occurred - void error(const std::string &path,const uint64_t &size,const uint64_t &mtime,const std::string &error) const; - void errorToRetry(const std::string &source,const std::string &destination,const std::string &error) const; - //for the extra logging - void rmPath(const std::string &path) const; - void mkPath(const std::string &path) const; - /// \brief To debug source - #ifdef ULTRACOPIER_PLUGIN_DEBUG - void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; - #endif - #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW - void updateTheDebugInfo(const std::vector &,const std::vector&,const int &) const; - #endif - - //other signal - /// \note Can be call without queue because all call will be serialized - void send_fileAlreadyExists(const QFileInfo &source,const QFileInfo &destination,const bool &isSame,TransferThread * thread) const; - /// \note Can be call without queue because all call will be serialized - void send_errorOnFile(const QFileInfo &fileInfo,const std::string &errorString,TransferThread * thread, const ErrorType &errorType) const; - /// \note Can be call without queue because all call will be serialized - void send_folderAlreadyExists(const QFileInfo &source,const QFileInfo &destination,const bool &isSame,ScanFileOrFolder * thread) const; - /// \note Can be call without queue because all call will be serialized - void send_errorOnFolder(const QFileInfo &fileInfo,const std::string &errorString,ScanFileOrFolder * thread, const ErrorType &errorType) const; - //send the progression - void send_syncTransferList() const; - //mkpath error event - void mkPathErrorOnFolder(const QFileInfo &fileInfo,const std::string &errorString,const ErrorType &errorType) const; - //to close - void tryCancel() const; - //to ask new transfer thread - void askNewTransferThread() const; - - void warningTransferList(const std::string &warning) const; - void errorTransferList(const std::string &error) const; - void send_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) const; - void send_realBytesTransfered(const uint64_t &) const; - - void send_setTransferAlgorithm(TransferAlgorithm transferAlgorithm) const; - void send_parallelBuffer(const int ¶llelBuffer) const; - void send_sequentialBuffer(const int &sequentialBuffer) const; - void send_parallelizeIfSmallerThan(const int ¶llelizeIfSmallerThan) const; - void send_updateMount(); - void missingDiskSpace(std::vector list) const; -}; - -#endif // LISTTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier/ListThread_InodeAction.cpp b/plugins/CopyEngine/Ultracopier/ListThread_InodeAction.cpp deleted file mode 100644 index 12421f2..0000000 --- a/plugins/CopyEngine/Ultracopier/ListThread_InodeAction.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/** \file ListThread_InodeAction.cpp -\brief To be included into ListThread.cpp, to optimize and prevent code duplication -\see ListThread.cpp */ - -#ifdef LISTTHREAD_H - -//do the inode action -ActionToDoInode& currentActionToDoInode=actionToDoListInode[int_for_internal_loop]; -switch(currentActionToDoInode.type) -{ - case ActionType_RealMove: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("launch real move, source: %1, destination: %2").arg(currentActionToDoInode.source.absoluteFilePath()).arg(currentActionToDoInode.destination.absoluteFilePath()).toStdString()); - mkPathQueue.addPath(currentActionToDoInode.source.absoluteFilePath(),currentActionToDoInode.destination.absoluteFilePath(),currentActionToDoInode.type); - currentActionToDoInode.isRunning=true; - numberOfInodeOperation++; - if(numberOfInodeOperation>=inodeThreads) - return; - break; - case ActionType_MkPath: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("launch mkpath, source: %1, destination: %2").arg(currentActionToDoInode.source.absoluteFilePath()).arg(currentActionToDoInode.destination.absoluteFilePath()).toStdString()); - mkPathQueue.addPath(currentActionToDoInode.source.absoluteFilePath(),currentActionToDoInode.destination.absoluteFilePath(),currentActionToDoInode.type); - currentActionToDoInode.isRunning=true; - numberOfInodeOperation++; - if(numberOfInodeOperation>=inodeThreads) - return; - break; - #ifdef ULTRACOPIER_PLUGIN_RSYNC - case ActionType_RmSync: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QString("launch rmsync, destination: %1").arg(currentActionToDoInode.destination.absoluteFilePath()).toStdString()); - mkPathQueue.addPath(currentActionToDoInode.destination.absoluteFilePath(),currentActionToDoInode.destination.absoluteFilePath(),currentActionToDoInode.type); - currentActionToDoInode.isRunning=true; - numberOfInodeOperation++; - if(numberOfInodeOperation>=inodeThreads) - return; - break; - #endif - case ActionType_MovePath: - //then empty (no file), can try remove it - if(currentActionToDoInode.size==0 || actionToDoListTransfer.empty())//don't put afterTheTransfer because actionToDoListInode_afterTheTransfer -> already afterTheTransfer - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("launch rmpath: %1").arg(currentActionToDoInode.source.absoluteFilePath()).toStdString()); - mkPathQueue.addPath(currentActionToDoInode.source.absoluteFilePath(),currentActionToDoInode.destination.absoluteFilePath(),currentActionToDoInode.type); - currentActionToDoInode.isRunning=true; - numberOfInodeOperation++; - if(numberOfInodeOperation>=inodeThreads) - return; - } - else //have do the destination, put the remove to after - { - currentActionToDoInode.size=0; - actionToDoListInode_afterTheTransfer.push_back(currentActionToDoInode); - actionToDoListInode.erase(actionToDoListInode.cbegin()+int_for_internal_loop); - int_for_internal_loop--; - actionToDoListInode_count--; - if(numberOfInodeOperation>=inodeThreads) - return; - } - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Wrong type at inode action"); - return; -} - -#endif diff --git a/plugins/CopyEngine/Ultracopier/MkPath.cpp b/plugins/CopyEngine/Ultracopier/MkPath.cpp deleted file mode 100644 index e4ac9cf..0000000 --- a/plugins/CopyEngine/Ultracopier/MkPath.cpp +++ /dev/null @@ -1,517 +0,0 @@ -#include "MkPath.h" - -#ifdef Q_OS_WIN32 - #ifndef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - #ifndef NOMINMAX - #define NOMINMAX - #endif - #include - #endif -#endif - -std::string MkPath::text_slash="/"; - -MkPath::MkPath() -{ - stopIt=false; - waitAction=false; - doRightTransfer=false; - maxTime=QDateTime(QDate(ULTRACOPIER_PLUGIN_MINIMALYEAR,1,1)); - setObjectName("MkPath"); - moveToThread(this); - start(); - #ifdef Q_OS_WIN32 - #ifndef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - regRead=std::regex("^[a-zA-Z]:"); - #endif - #endif -} - -MkPath::~MkPath() -{ - stopIt=true; - quit(); - wait(); -} - -void MkPath::addPath(const QFileInfo& source, const QFileInfo& destination, const ActionType &actionType) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("source: %1, destination: %2").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).toStdString()); - if(stopIt) - return; - emit internalStartAddPath(source,destination,actionType); -} - -void MkPath::skip() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - emit internalStartSkip(); -} - -void MkPath::retry() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - emit internalStartRetry(); -} - -void MkPath::run() -{ - connect(this,&MkPath::internalStartAddPath, this,&MkPath::internalAddPath,Qt::QueuedConnection); - connect(this,&MkPath::internalStartDoThisPath, this,&MkPath::internalDoThisPath,Qt::QueuedConnection); - connect(this,&MkPath::internalStartSkip, this,&MkPath::internalSkip,Qt::QueuedConnection); - connect(this,&MkPath::internalStartRetry, this,&MkPath::internalRetry,Qt::QueuedConnection); - exec(); -} - -void MkPath::internalDoThisPath() -{ - if(waitAction || pathList.isEmpty()) - return; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("source: %1, destination: %2, move: %3").arg(pathList.first().source.absoluteFilePath()).arg(pathList.first().destination.absoluteFilePath()).arg(pathList.first().actionType).toStdString()); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - if(pathList.first().actionType==ActionType_RmSync) - { - if(pathList.first().destination.isFile()) - { - QFile removedFile(pathList.first().destination.absoluteFilePath()); - if(!removedFile.remove()) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the inode: "+pathList.first().destination.absoluteFilePath().toStdString()+", error: "+removedFile.errorString().toStdString()); - emit errorOnFolder(pathList.first().destination,removedFile.errorString().toStdString()); - return; - } - } - else if(!rmpath(pathList.first().destination.absoluteFilePath())) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the inode: "+pathList.first().destination.absoluteFilePath().toStdString()); - emit errorOnFolder(pathList.first().destination,tr("Unable to remove").toStdString()); - return; - } - pathList.removeFirst(); - emit firstFolderFinish(); - checkIfCanDoTheNext(); - return; - } - #endif - doTheDateTransfer=false; - if(keepDate) - { - if(!pathList.first().source.exists()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"the sources not exists: "+pathList.first().source.absoluteFilePath().toStdString()); - doTheDateTransfer=false; - } - else if(maxTime>=pathList.first().source.lastModified()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"the sources is older to copy the time: "+pathList.first().source.absoluteFilePath().toStdString()+": "+maxTime.toString("dd.MM.yyyy hh:mm:ss.zzz").toStdString()+">="+pathList.first().source.lastModified().toString("dd.MM.yyyy hh:mm:ss.zzz").toStdString()); - doTheDateTransfer=false; - } - else - { - doTheDateTransfer=readFileDateTime(pathList.first().source); - /*if(!doTheDateTransfer) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to get source folder time: "+pathList.first().source.absoluteFilePath()); - emit errorOnFolder(pathList.first().source,tr("Unable to get time")); - return; - }*/ - } - } - if(dir.exists(pathList.first().destination.absoluteFilePath()) && pathList.first().actionType==ActionType_RealMove) - pathList.first().actionType=ActionType_MovePath; - if(pathList.first().actionType!=ActionType_RealMove) - { - if(!dir.exists(pathList.first().destination.absoluteFilePath())) - if(!dir.mkpath(pathList.first().destination.absoluteFilePath())) - { - if(!dir.exists(pathList.first().destination.absoluteFilePath())) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+pathList.first().destination.absoluteFilePath().toStdString()); - emit errorOnFolder(pathList.first().destination,tr("Unable to create the folder").toStdString()); - return; - } - } - } - else - { - if(!pathList.first().source.exists()) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The source folder don't exists: "+pathList.first().source.absoluteFilePath().toStdString()); - emit errorOnFolder(pathList.first().destination,tr("The source folder don't exists").toStdString()); - return; - } - if(!pathList.first().source.isDir())//it's really an error? - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The source is not a folder: "+pathList.first().source.absoluteFilePath().toStdString()); - /*if(stopIt) - return; - waitAction=true; - emit errorOnFolder(pathList.first().destination,tr("The source is not a folder")); - return;*/ - } - if(pathList.first().destination.absoluteFilePath().startsWith(pathList.first().source.absoluteFilePath()+QString::fromStdString(text_slash))) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"move into it self: "+pathList.first().destination.absoluteFilePath().toStdString()); - int random=rand(); - QFileInfo tempFolder=pathList.first().source.absolutePath()+QString::fromStdString(text_slash)+QString::number(random); - while(tempFolder.exists()) - { - random=rand(); - tempFolder=pathList.first().source.absolutePath()+QString::fromStdString(text_slash)+QString::number(random); - } - if(!dir.rename(pathList.first().source.absoluteFilePath(),tempFolder.absoluteFilePath())) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to temporary rename the folder: "+pathList.first().destination.absoluteFilePath().toStdString()); - emit errorOnFolder(pathList.first().destination,tr("Unable to temporary rename the folder").toStdString()); - return; - } - /* http://doc.qt.io/qt-5/qdir.html#rename - * On most file systems, rename() fails only if oldName does not exist, or if a file with the new name already exists. - if(!dir.mkpath(pathList.first().destination.absolutePath())) - { - if(!dir.exists(pathList.first().destination.absolutePath())) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+pathList.first().destination.absoluteFilePath()); - emit errorOnFolder(pathList.first().destination,tr("Unable to create the folder")); - return; - } - }*/ - if(!dir.rename(tempFolder.absoluteFilePath(),pathList.first().destination.absoluteFilePath())) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to do the final real move the folder: "+pathList.first().destination.absoluteFilePath().toStdString()); - emit errorOnFolder(pathList.first().destination,tr("Unable to do the final real move the folder").toStdString()); - return; - } - } - else - { - /* http://doc.qt.io/qt-5/qdir.html#rename - * On most file systems, rename() fails only if oldName does not exist, or if a file with the new name already exists. - if(!dir.mkpath(pathList.first().destination.absolutePath())) - { - if(!dir.exists(pathList.first().destination.absolutePath())) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+pathList.first().destination.absoluteFilePath()); - emit errorOnFolder(pathList.first().destination,tr("Unable to create the folder")); - return; - } - }*/ - if(!dir.rename(pathList.first().source.absoluteFilePath(),pathList.first().destination.absoluteFilePath())) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: from: "+pathList.first().source.absoluteFilePath().toStdString()+", soruce exists: "+std::to_string(QDir(pathList.first().source.absoluteFilePath()).exists())+", to: "+pathList.first().destination.absoluteFilePath().toStdString() - +", destination exist: "+std::to_string(QDir(pathList.first().destination.absoluteFilePath()).exists())); - emit errorOnFolder(pathList.first().destination,tr("Unable to move the folder").toStdString()); - return; - } - } - } - if(doTheDateTransfer) - if(!writeFileDateTime(pathList.first().destination)) - { - if(!pathList.first().destination.exists()) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time (not exists): "+pathList.first().destination.absoluteFilePath().toStdString()); - else if(!pathList.first().destination.isDir()) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time (not a dir): "+pathList.first().destination.absoluteFilePath().toStdString()); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time: "+pathList.first().destination.absoluteFilePath().toStdString()); - /*if(stopIt) - return; - waitAction=true; - - emit errorOnFolder(pathList.first().source,tr("Unable to set time")); - return;*/ - } - if(doRightTransfer && pathList.first().actionType!=ActionType_RealMove) - { - QFile source(pathList.first().source.absoluteFilePath()); - QFile destination(pathList.first().destination.absoluteFilePath()); - if(!destination.setPermissions(source.permissions())) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set the right: "+pathList.first().destination.absoluteFilePath().toStdString()); - /*if(stopIt) - return; - waitAction=true; - emit errorOnFolder(pathList.first().source,tr("Unable to set the access-right")); - return;*/ - } - } - if(pathList.first().actionType==ActionType_MovePath) - { - if(!rmpath(pathList.first().source.absoluteFilePath())) - { - if(stopIt) - return; - waitAction=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the source folder: "+pathList.first().destination.absoluteFilePath().toStdString()); - emit errorOnFolder(pathList.first().source,tr("Unable to remove").toStdString()); - return; - } - } - pathList.removeFirst(); - emit firstFolderFinish(); - checkIfCanDoTheNext(); -} - -void MkPath::internalAddPath(const QFileInfo& source, const QFileInfo& destination, const ActionType &actionType) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("source: %1, destination: %2").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).toStdString()); - Item tempPath; - tempPath.source=source; - tempPath.destination=destination; - tempPath.actionType=actionType; - pathList << tempPath; - if(!waitAction) - checkIfCanDoTheNext(); -} - -void MkPath::checkIfCanDoTheNext() -{ - if(!waitAction && !stopIt && pathList.size()>0) - emit internalStartDoThisPath(); -} - -void MkPath::internalSkip() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - waitAction=false; - pathList.removeFirst(); - emit firstFolderFinish(); - checkIfCanDoTheNext(); -} - -void MkPath::internalRetry() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - waitAction=false; - checkIfCanDoTheNext(); -} - -void MkPath::setRightTransfer(const bool doRightTransfer) -{ - this->doRightTransfer=doRightTransfer; -} - -void MkPath::setKeepDate(const bool keepDate) -{ - this->keepDate=keepDate; -} - -bool MkPath::rmpath(const QDir &dir - #ifdef ULTRACOPIER_PLUGIN_RSYNC - ,const bool &toSync - #endif - ) -{ - if(!dir.exists()) - return true; - bool allHaveWork=true; - QFileInfoList list = dir.entryInfoList(QDir::AllEntries|QDir::NoDotAndDotDot|QDir::Hidden|QDir::System,QDir::DirsFirst); - for (int i = 0; i < list.size(); ++i) - { - QFileInfo fileInfo(list.at(i)); - if(!fileInfo.isDir()) - { - #ifdef ULTRACOPIER_PLUGIN_RSYNC - if(toSync) - { - QFile file(fileInfo.absoluteFilePath()); - if(!file.remove()) - { - if(toSync) - { - QFile file(fileInfo.absoluteFilePath()); - if(!file.remove()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to remove a file: "+fileInfo.absoluteFilePath().toStdString()+", due to: "+file.errorString().toStdString()); - allHaveWork=false; - } - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+fileInfo.fileName().toStdString()); - allHaveWork=false; - } - } - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+fileInfo.fileName().toStdString()); - allHaveWork=false; - } - #else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+fileInfo.fileName().toStdString()); - allHaveWork=false; - #endif - } - else - { - //return the fonction for scan the new folder - if(!rmpath(dir.absolutePath()+'/'+fileInfo.fileName()+'/')) - allHaveWork=false; - } - } - if(!allHaveWork) - return false; - allHaveWork=dir.rmdir(dir.absolutePath()); - if(!allHaveWork) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to remove the folder: "+dir.absolutePath().toStdString()); - return allHaveWork; -} - -//fonction to edit the file date time -bool MkPath::readFileDateTime(const QFileInfo &source) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"readFileDateTime("+source.absoluteFilePath().toStdString()+")"); - /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ - #ifdef Q_OS_UNIX - #ifdef Q_OS_LINUX - struct stat info; - if(stat(source.absoluteFilePath().toLatin1().data(),&info)!=0) - return false; - time_t ctime=info.st_ctim.tv_sec; - time_t actime=info.st_atim.tv_sec; - time_t modtime=info.st_mtim.tv_sec; - //this function avalaible on unix and mingw - butime.actime=actime; - butime.modtime=modtime; - Q_UNUSED(ctime); - return true; - #else //mainly for mac - QFileInfo fileInfo(source); - time_t ctime=fileInfo.created().toTime_t(); - time_t actime=fileInfo.lastRead().toTime_t(); - time_t modtime=fileInfo.lastModified().toTime_t(); - //this function avalaible on unix and mingw - utimbuf butime; - butime.actime=actime; - butime.modtime=modtime; - Q_UNUSED(ctime); - return true; - #endif - #else - #ifdef Q_OS_WIN32 - #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - struct stat info; - if(stat(source.toLatin1().data(),&info)!=0) - return false; - time_t ctime=info.st_ctim.tv_sec; - time_t actime=info.st_atim.tv_sec; - time_t modtime=info.st_mtim.tv_sec; - //this function avalaible on unix and mingw - butime.actime=actime; - butime.modtime=modtime; - Q_UNUSED(ctime); - return true; - #else - wchar_t filePath[65535]; - if(std::regex_match(source.absoluteFilePath().toStdString(),regRead)) - filePath[QDir::toNativeSeparators(QStringLiteral("\\\\?\\")+source.absoluteFilePath()).toWCharArray(filePath)]=L'\0'; - else - filePath[QDir::toNativeSeparators(source.absoluteFilePath()).toWCharArray(filePath)]=L'\0'; - HANDLE hFileSouce = CreateFileW(filePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY | FILE_FLAG_BACKUP_SEMANTICS, NULL); - if(hFileSouce == INVALID_HANDLE_VALUE) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"open failed to read: "+QString::fromWCharArray(filePath).toStdString()+", error: "+std::to_string(GetLastError())); - return false; - } - FILETIME ftCreate, ftAccess, ftWrite; - if(!GetFileTime(hFileSouce, &ftCreate, &ftAccess, &ftWrite)) - { - CloseHandle(hFileSouce); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get the file time"); - return false; - } - this->ftCreateL=ftCreate.dwLowDateTime; - this->ftCreateH=ftCreate.dwHighDateTime; - this->ftAccessL=ftAccess.dwLowDateTime; - this->ftAccessH=ftAccess.dwHighDateTime; - this->ftWriteL=ftWrite.dwLowDateTime; - this->ftWriteH=ftWrite.dwHighDateTime; - CloseHandle(hFileSouce); - return true; - #endif - #else - return false; - #endif - #endif - return false; -} - -bool MkPath::writeFileDateTime(const QFileInfo &destination) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"writeFileDateTime("+destination.absoluteFilePath().toStdString()+")"); - /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ - #ifdef Q_OS_UNIX - #ifdef Q_OS_LINUX - return utime(destination.absoluteFilePath().toLatin1().data(),&butime)==0; - #else //mainly for mac - return utime(destination.absoluteFilePath().toLatin1().data(),&butime)==0; - #endif - #else - #ifdef Q_OS_WIN32 - #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - return utime(destination.toLatin1().data(),&butime)==0; - #else - wchar_t filePath[65535]; - if(std::regex_match(destination.absoluteFilePath().toStdString(),regRead)) - filePath[QDir::toNativeSeparators(QStringLiteral("\\\\?\\")+destination.absoluteFilePath()).toWCharArray(filePath)]=L'\0'; - else - filePath[QDir::toNativeSeparators(destination.absoluteFilePath()).toWCharArray(filePath)]=L'\0'; - HANDLE hFileDestination = CreateFileW(filePath, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); - if(hFileDestination == INVALID_HANDLE_VALUE) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"open failed to write: "+QString::fromWCharArray(filePath).toStdString()+", error: "+std::to_string(GetLastError())); - return false; - } - FILETIME ftCreate, ftAccess, ftWrite; - ftCreate.dwLowDateTime=this->ftCreateL; - ftCreate.dwHighDateTime=this->ftCreateH; - ftAccess.dwLowDateTime=this->ftAccessL; - ftAccess.dwHighDateTime=this->ftAccessH; - ftWrite.dwLowDateTime=this->ftWriteL; - ftWrite.dwHighDateTime=this->ftWriteH; - if(!SetFileTime(hFileDestination, &ftCreate, &ftAccess, &ftWrite)) - { - CloseHandle(hFileDestination); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the file time"); - return false; - } - CloseHandle(hFileDestination); - return true; - #endif - #else - return false; - #endif - #endif - return false; -} diff --git a/plugins/CopyEngine/Ultracopier/MkPath.h b/plugins/CopyEngine/Ultracopier/MkPath.h deleted file mode 100644 index 2bbebcc..0000000 --- a/plugins/CopyEngine/Ultracopier/MkPath.h +++ /dev/null @@ -1,106 +0,0 @@ -/** \file MkPath.h -\brief Make the path given as queued mkpath -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef MKPATH_H -#define MKPATH_H - -#include -#include -#include -#include -#include -#include -#include - -#include "Environment.h" - -#ifdef Q_OS_UNIX - #include - #include - #include - #include -#else - #ifdef Q_OS_WIN32 - #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - #include - #include - #include - #include - #endif - #endif -#endif - -/// \brief Make the path given as queued mkpath -class MkPath : public QThread -{ - Q_OBJECT -public: - explicit MkPath(); - ~MkPath(); - /// \brief add path to make - void addPath(const QFileInfo& source,const QFileInfo& destination,const ActionType &actionType); - void setRightTransfer(const bool doRightTransfer); - void setKeepDate(const bool keepDate); -signals: - void errorOnFolder(const QFileInfo &,const std::string &,const ErrorType &errorType=ErrorType_FolderWithRety) const; - void firstFolderFinish(); - void internalStartAddPath(const QFileInfo& source,const QFileInfo& destination, const ActionType &actionType) const; - void internalStartDoThisPath() const; - void internalStartSkip() const; - void internalStartRetry() const; - void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; -public slots: - /// \brief skip after creation error - void skip(); - /// \brief retry after creation error - void retry(); -private: - void run(); - bool waitAction; - bool stopIt; - bool skipIt; - QDateTime maxTime; - struct Item - { - QFileInfo source; - QFileInfo destination; - ActionType actionType; - }; - QList pathList; - void checkIfCanDoTheNext(); - QDir dir; - bool doRightTransfer; - bool keepDate; - bool doTheDateTransfer; - #ifdef Q_OS_UNIX - utimbuf butime; - #else - #ifdef Q_OS_WIN32 - #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - utimbuf butime; - #else - uint64_t ftCreateL, ftAccessL, ftWriteL; - uint64_t ftCreateH, ftAccessH, ftWriteH; - std::regex regRead; - #endif - #endif - #endif - //fonction to edit the file date time - bool readFileDateTime(const QFileInfo &source); - bool writeFileDateTime(const QFileInfo &destination); - static std::string text_slash; -private slots: - void internalDoThisPath(); - void internalAddPath(const QFileInfo& source, const QFileInfo& destination,const ActionType &actionType); - void internalSkip(); - void internalRetry(); - bool rmpath(const QDir &dir - #ifdef ULTRACOPIER_PLUGIN_RSYNC - , const bool &toSync=false - #endif - ); -}; - -#endif // MKPATH_H diff --git a/plugins/CopyEngine/Ultracopier/README.md b/plugins/CopyEngine/Ultracopier/README.md deleted file mode 100644 index a15b943..0000000 --- a/plugins/CopyEngine/Ultracopier/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Copy Engine: Ultracopier - -This is the default copy engine. diff --git a/plugins/CopyEngine/Ultracopier/ReadThread.cpp b/plugins/CopyEngine/Ultracopier/ReadThread.cpp deleted file mode 100644 index 7bdb60c..0000000 --- a/plugins/CopyEngine/Ultracopier/ReadThread.cpp +++ /dev/null @@ -1,699 +0,0 @@ -#include "ReadThread.h" - -#ifdef Q_OS_LINUX -#include -#endif - -ReadThread::ReadThread() -{ - start(); - moveToThread(this); - stopIt=false; - putInPause=false; - blockSize=ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*1024; - setObjectName(QStringLiteral("read")); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - isInReadLoop=false; - tryStartRead=false; - lastGoodPosition=0; - isOpen.release(); -} - -ReadThread::~ReadThread() -{ - stopIt=true; - //disconnect(this);//-> do into ~TransferThread() - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - waitNewClockForSpeed.release(); - #endif - pauseMutex.release(); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - waitNewClockForSpeed.release(); - #endif - pauseMutex.release(); - //if(isOpen.available()<=0) - emit internalStartClose(); - isOpen.acquire(); - exit(); - wait(); -} - -void ReadThread::run() -{ - connect(this,&ReadThread::internalStartOpen, this,&ReadThread::internalOpenSlot, Qt::QueuedConnection); - connect(this,&ReadThread::internalStartReopen, this,&ReadThread::internalReopen, Qt::QueuedConnection); - connect(this,&ReadThread::internalStartRead, this,&ReadThread::internalRead, Qt::QueuedConnection); - connect(this,&ReadThread::internalStartClose, this,&ReadThread::internalCloseSlot, Qt::QueuedConnection); - connect(this,&ReadThread::checkIfIsWait, this,&ReadThread::isInWait, Qt::QueuedConnection); - connect(this,&ReadThread::internalStartChecksum, this,&ReadThread::checkSum, Qt::QueuedConnection); - exec(); -} - -void ReadThread::open(const QFileInfo &file, const Ultracopier::CopyMode &mode) -{ - if(!isRunning()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] the thread not running to open destination: "+file.absoluteFilePath().toStdString()); - errorString_internal=tr("Internal error, please report it!").toStdString(); - emit error(); - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] open source: "+file.absoluteFilePath().toStdString()); - if(this->file.isOpen()) - { - if(file.absoluteFilePath()==this->file.fileName()) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Try reopen already opened same file: "+file.absoluteFilePath().toStdString()); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already open: "+file.absoluteFilePath().toStdString()); - emit internalStartClose(); - isOpen.acquire(); - isOpen.release(); - } - if(isInReadLoop) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already readding: "+file.absoluteFilePath().toStdString()); - return; - } - if(tryStartRead) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already try read: "+file.absoluteFilePath().toStdString()); - return; - } - stopIt=false; - fakeMode=false; - lastGoodPosition=0; - this->file.setFileName(file.absoluteFilePath()); - this->mode=mode; - emit internalStartOpen(); -} - -std::string ReadThread::errorString() const -{ - return errorString_internal; -} - -void ReadThread::stop() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop()"); - stopIt=true; - pauseMutex.release(); - pauseMutex.release(); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - waitNewClockForSpeed.release(); - #endif - if(isOpen.available()<=0) - emit internalStartClose(); -} - -void ReadThread::pause() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] try put read thread in pause"); - if(stopIt) - return; - pauseMutex.tryAcquire(pauseMutex.available()); - putInPause=true; -} - -void ReadThread::resume() -{ - if(putInPause) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - putInPause=false; - stopIt=false; - } - else - return; - if(!file.isOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file is not open"); - return; - } - pauseMutex.release(); -} - -bool ReadThread::seek(const int64_t &position) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start with: "+std::to_string(position)); - if(position>file.size()) - return false; - return file.seek(position); -} - -int64_t ReadThread::size() const -{ - return file.size(); -} - -void ReadThread::postOperation() -{ - emit internalStartClose(); -} - -void ReadThread::checkSum() -{ - QByteArray blockArray; - QCryptographicHash hash(QCryptographicHash::Sha1); - isInReadLoop=true; - lastGoodPosition=0; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - numberOfBlockCopied=0; - #endif - seek(0); - int sizeReaden=0; - do - { - //read one block - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Read; - #endif - if(putInPause) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] read put in pause"); - if(stopIt) - return; - pauseMutex.acquire(); - if(stopIt) - return; - } - blockArray=file.read(blockSize); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - - //can be smaller than min block size to do correct speed limitation - if(blockArray.size()>ULTRACOPIER_PLUGIN_MAX_BLOCK_SIZE*1024) - { - errorString_internal=tr("Internal error reading the source file:block size out of range").toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Internal error reading the source file:block size out of range"); - emit error(); - isInReadLoop=false; - return; - } - if(file.error()!=QFile::NoError) - { - errorString_internal=tr("Unable to read the source file: ").toStdString()+file.errorString().toStdString()+" ("+std::to_string(file.error())+")"; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("file.error()!=QFile::NoError: %1, error: ").arg(QString::number(file.error())).toStdString()+errorString_internal); - emit error(); - isInReadLoop=false; - return; - } - sizeReaden=blockArray.size(); - if(sizeReaden>0) - { - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Checksum; - #endif - hash.addData(blockArray); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - - if(stopIt) - break; - - lastGoodPosition+=blockArray.size(); - - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - //wait for limitation speed if stop not query - if(multiForBigSpeed>0) - { - numberOfBlockCopied++; - if(numberOfBlockCopied>=multiForBigSpeed) - { - numberOfBlockCopied=0; - waitNewClockForSpeed.acquire(); - if(stopIt) - break; - } - } - #endif - } - } - while(sizeReaden>0 && !stopIt); - if(lastGoodPosition>file.size()) - { - errorString_internal=tr("File truncated during the read, possible data change").toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Source truncated during the read: %1 (%2)").arg(file.errorString()).arg(QString::number(file.error())).toStdString()); - emit error(); - isInReadLoop=false; - return; - } - isInReadLoop=false; - if(stopIt) - { - stopIt=false; - return; - } - emit checksumFinish(hash.result()); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop the read"); -} - -bool ReadThread::internalOpenSlot() -{ - return internalOpen(); -} - -bool ReadThread::internalOpen(bool resetLastGoodPosition) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] internalOpen source: "+file.fileName().toStdString()+", open in write because move: "+std::to_string(mode==Ultracopier::Move)); - if(stopIt) - { - emit closed(); - return false; - } - putInPause=false; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=InodeOperation; - #endif - if(file.isOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] this file is already open: "+file.fileName().toStdString()); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - emit closed(); - return false; - } - QIODevice::OpenMode openMode=QIODevice::ReadOnly; - /*can have permision to remove but not write - * if(mode==Ultracopier::Move) - openMode=QIODevice::ReadWrite;*/ - seekToZero=false; - if(file.open(openMode)) - { - if(stopIt) - { - file.close(); - emit closed(); - return false; - } - pauseMutex.tryAcquire(pauseMutex.available()); - #ifdef Q_OS_LINUX - const int intfd=file.handle(); - if(intfd!=-1) - { - posix_fadvise(intfd, 0, 0, POSIX_FADV_WILLNEED); - posix_fadvise(intfd, 0, 0, POSIX_FADV_SEQUENTIAL); - } - #endif - if(stopIt) - { - file.close(); - emit closed(); - return false; - } - size_at_open=file.size(); - mtime_at_open=QFileInfo(file).lastModified().toMSecsSinceEpoch()/1000; - putInPause=false; - if(resetLastGoodPosition) - lastGoodPosition=0; - if(!seek(lastGoodPosition)) - { - file.close(); - errorString_internal=file.errorString().toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to seek after open: %1, error: %2").arg(file.fileName()).toStdString()+errorString_internal); - emit error(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - return false; - } - isOpen.acquire(); - emit opened(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - return true; - } - else - { - errorString_internal=file.errorString().toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to open: %1, error: ").arg(file.fileName()).toStdString()+errorString_internal); - emit error(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - return false; - } -} - -void ReadThread::internalRead() -{ - isInReadLoop=true; - tryStartRead=false; - if(stopIt) - { - if(seekToZero && file.isOpen()) - { - stopIt=false; - lastGoodPosition=0; - file.seek(0); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); - isInReadLoop=false; - internalClose(); - return; - } - } - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=InodeOperation; - #endif - int sizeReaden=0; - if(!file.isOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] is not open!"); - isInReadLoop=false; - return; - } - QByteArray blockArray; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - numberOfBlockCopied=0; - #endif - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start the copy"); - emit readIsStarted(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); - isInReadLoop=false; - internalClose(); - return; - } - do - { - //read one block - if(putInPause) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] read put in pause"); - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); - isInReadLoop=false; - internalClose(); - return; - } - pauseMutex.acquire(); - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); - isInReadLoop=false; - internalClose(); - return; - } - } - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Read; - #endif - blockArray=file.read(blockSize); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - - if(file.error()!=QFile::NoError) - { - errorString_internal=tr("Unable to read the source file: ").toStdString()+file.errorString().toStdString()+" ("+std::to_string(file.error())+")"; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("file.error()!=QFile::NoError: %1, error: ").arg(QString::number(file.error())).toStdString()+errorString_internal); - isInReadLoop=false; - emit error(); - return; - } - sizeReaden=blockArray.size(); - if(sizeReaden>0) - { - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=WaitWritePipe; - #endif - if(!writeThread->write(blockArray))//speed limitation here - { - if(!stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopped because the write is stopped: "+std::to_string(lastGoodPosition)); - stopIt=true; - } - } - - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); - isInReadLoop=false; - internalClose();//need re-open the destination and then the source - return; - } - lastGoodPosition+=blockArray.size(); - } - /* - if(lastGoodPosition>16*1024) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("[")+QString::number(id)+QStringLiteral("] ")+QStringLiteral("Test error in reading: %1 (%2)").arg(file.errorString()).arg(file.error())); - errorString_internal=QStringLiteral("Test error in reading: %1 (%2)").arg(file.errorString()).arg(file.error()); - isInReadLoop=false; - emit error(); - return; - } - */ - } - while(sizeReaden>0 && !stopIt); - if(lastGoodPosition>file.size()) - { - errorString_internal=tr("File truncated during the read, possible data change").toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Source truncated during the read: %1 (%2)").arg(file.errorString()).arg(QString::number(file.error())).toStdString()); - isInReadLoop=false; - emit error(); - return; - } - isInReadLoop=false; - if(stopIt) - { - stopIt=false; - return; - } - emit readIsStopped();//will product by signal connection writeThread->endIsDetected(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop the read"); -} - -void ReadThread::startRead() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - if(tryStartRead) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] already in try start"); - return; - } - if(isInReadLoop) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); - else - { - tryStartRead=true; - emit internalStartRead(); - } -} - -void ReadThread::internalCloseSlot() -{ - internalClose(); -} - -void ReadThread::internalClose(bool callByTheDestructor) -{ - /// \note never send signal here, because it's called by the destructor - //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[")+QString::number(id)+QStringLiteral("] start")); - bool closeTheFile=false; - if(!fakeMode) - { - if(file.isOpen()) - { - closeTheFile=true; - file.close(); - isInReadLoop=false; - } - } - if(!callByTheDestructor) - emit closed(); - - /// \note always the last of this function - if(closeTheFile) - isOpen.release(); -} - -/** \brief set block size -\param block the new block size in B -\return Return true if succes */ -bool ReadThread::setBlockSize(const int blockSize) -{ - //can be smaller than min block size to do correct speed limitation - if(blockSize>1 && blockSizeblockSize=blockSize; - //set the new max speed because the timer have changed - return true; - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"block size out of range: "+std::to_string(blockSize)); - return false; - } -} - -#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT -/*! \brief Set the max speed -\param tempMaxSpeed Set the max speed in KB/s, 0 for no limit */ -void ReadThread::setMultiForBigSpeed(const int &multiForBigSpeed) -{ - this->multiForBigSpeed=multiForBigSpeed; - waitNewClockForSpeed.release(); -} - -/// \brief For give timer every X ms -void ReadThread::timeOfTheBlockCopyFinished() -{ - /* this is the old way to limit the speed, it product blocking - *if(waitNewClockForSpeed.available()maxSpeed>0)*/ - if(waitNewClockForSpeed.available()<=1) - waitNewClockForSpeed.release(); -} -#endif - -/// \brief do the fake open -void ReadThread::fakeOpen() -{ - fakeMode=true; - emit opened(); -} - -/// \brief do the fake writeIsStarted -void ReadThread::fakeReadIsStarted() -{ - emit readIsStarted(); -} - -/// \brief do the fake writeIsStopped -void ReadThread::fakeReadIsStopped() -{ - emit readIsStopped(); -} - -/// do the checksum -void ReadThread::startCheckSum() -{ - emit internalStartChecksum(); -} - -int64_t ReadThread::getLastGoodPosition() const -{ - /*if(lastGoodPosition>file.size()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("[")+QString::number(id)+QStringLiteral("] Bug, the lastGoodPosition is greater than the file size!")); - return file.size(); - } - else*/ - return lastGoodPosition; -} - -//reopen after an error -void ReadThread::reopen() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - if(isInReadLoop) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] try reopen where read is not finish"); - return; - } - stopIt=true; - emit internalStartReopen(); -} - -bool ReadThread::internalReopen() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - stopIt=false; - if(file.isOpen()) - { - file.close(); - isOpen.release(); - } - if(size_at_open!=file.size() && mtime_at_open!=(uint64_t)QFileInfo(file).lastModified().toMSecsSinceEpoch()/1000) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] source file have changed since the last open, restart all"); - //fix this function like the close function - if(internalOpen(true)) - { - emit resumeAfterErrorByRestartAll(); - return true; - } - else - return false; - } - else - { - //fix this function like the close function - if(internalOpen(false)) - { - emit resumeAfterErrorByRestartAtTheLastPosition(); - return true; - } - else - return false; - } -} - -//set the write thread -void ReadThread::setWriteThread(WriteThread * writeThread) -{ - this->writeThread=writeThread; -} - -#ifdef ULTRACOPIER_PLUGIN_DEBUG -//to set the id -void ReadThread::setId(int id) -{ - this->id=id; -} -#endif - -void ReadThread::seekToZeroAndWait() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - stopIt=true; - seekToZero=true; - emit checkIfIsWait(); -} - -void ReadThread::isInWait() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - if(seekToZero) - { - stopIt=false; - seekToZero=false; - if(file.isOpen()) - { - lastGoodPosition=0; - seek(0); - } - else - internalOpen(true); - emit isSeekToZeroAndWait(); - } -} - -bool ReadThread::isReading() const -{ - return isInReadLoop; -} - diff --git a/plugins/CopyEngine/Ultracopier/ReadThread.h b/plugins/CopyEngine/Ultracopier/ReadThread.h deleted file mode 100644 index f817e35..0000000 --- a/plugins/CopyEngine/Ultracopier/ReadThread.h +++ /dev/null @@ -1,147 +0,0 @@ -/** \file ReadThread.h -\brief Thread changed to open/close and read the source file -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef READTHREAD_H -#define READTHREAD_H - -#include -#include -#include -#include -#include -#include - -#include "WriteThread.h" -#include "Environment.h" -#include "StructEnumDefinition_CopyEngine.h" -#include "AvancedQFile.h" - -/// \brief Thread changed to open/close and read the source file -class ReadThread : public QThread -{ - Q_OBJECT -public: - explicit ReadThread(); - ~ReadThread(); -protected: - void run(); -public: - /// \brief open with the name and copy mode - void open(const QFileInfo &file, const Ultracopier::CopyMode &mode); - /// \brief return the error string - std::string errorString() const; - //QByteArray read(qint64 position,qint64 maxSize); - /// \brief stop the copy - void stop(); - /// \brief put the copy in pause - void pause(); - /// \brief resume the copy - void resume(); - /// \brief get the size of the source file - int64_t size() const; - /// \brief get the last good position - int64_t getLastGoodPosition() const; - /// \brief start the reading of the source file - void startRead(); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - /// \brief set the current max speed in KB/s - void setMultiForBigSpeed(const int &multiForBigSpeed); - #endif - /// \brief set block size in KB - bool setBlockSize(const int blockSize); - /// \brief reopen after an error - void reopen(); - /// \brief set the write thread - void setWriteThread(WriteThread * writeThread); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief to set the id - void setId(int id); - /// \brief stat - enum ReadStat - { - Idle=0, - InodeOperation=1, - Read=2, - WaitWritePipe=3, - Checksum=4 - }; - ReadStat stat; - #endif - /// \brief return if it's reading - bool isReading() const; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - /// \brief executed at regular interval to do a speed throling - void timeOfTheBlockCopyFinished(); - #endif - /// \brief do the fake open - void fakeOpen(); - /// \brief do the fake readIsStarted - void fakeReadIsStarted(); - /// \brief do the fake readIsStopped - void fakeReadIsStopped(); - /// do the checksum - void startCheckSum(); -public slots: - /// \brief to reset the copy, and put at the same state when it just open - void seekToZeroAndWait(); - void postOperation(); - /// do the checksum - void checkSum(); -signals: - void error() const; - void opened() const; - void readIsStarted() const; - void readIsStopped() const; - void closed() const; - void isSeekToZeroAndWait() const; - void checkIfIsWait() const; - void resumeAfterErrorByRestartAll() const; - void resumeAfterErrorByRestartAtTheLastPosition() const; - void checksumFinish(const QByteArray&) const; - // internal signals - void internalStartOpen() const; - void internalStartChecksum() const; - void internalStartReopen() const; - void internalStartRead() const; - void internalStartClose() const; - /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; - -private: - std::string errorString_internal; - AvancedQFile file; - volatile bool stopIt; - Ultracopier::CopyMode mode; - int64_t lastGoodPosition; - volatile int blockSize;//in Bytes - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - QSemaphore waitNewClockForSpeed; - volatile int numberOfBlockCopied; ///< Multiple for count the number of block copied - volatile int multiForBigSpeed; ///< Multiple for count the number of block needed - #endif - WriteThread* writeThread; - int id; - QSemaphore isOpen; - QSemaphore pauseMutex; - volatile bool putInPause; - volatile bool isInReadLoop; - volatile bool seekToZero; - volatile bool tryStartRead; - int64_t size_at_open; - uint64_t mtime_at_open; - bool fakeMode; - //internal function - bool seek(const int64_t &position);/// \todo search if is use full -private slots: - bool internalOpen(bool resetLastGoodPosition=true); - bool internalOpenSlot(); - bool internalReopen(); - void internalRead(); - void internalClose(bool callByTheDestructor=false); - void internalCloseSlot(); - void isInWait(); -}; - -#endif // READTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier/RenamingRules.cpp b/plugins/CopyEngine/Ultracopier/RenamingRules.cpp deleted file mode 100644 index 4ae23b8..0000000 --- a/plugins/CopyEngine/Ultracopier/RenamingRules.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include "RenamingRules.h" -#include "ui_RenamingRules.h" - -#include - -RenamingRules::RenamingRules(QWidget *parent) : - QDialog(parent), - ui(new Ui::RenamingRules) -{ - ui->setupUi(this); - connectUI(); - setRenamingRules("",""); -} - -RenamingRules::~RenamingRules() -{ - delete ui; -} - -void RenamingRules::on_buttonBox_clicked(QAbstractButton *button) -{ - if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) - reject(); - if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::ResetRole) - { - setRenamingRules("",""); - emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); - } -} - -void RenamingRules::setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) -{ - disconnectUI(); - this->firstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; - if(!firstRenamingRule.empty()) - ui->firstRenamingRule->setText(QString::fromStdString(firstRenamingRule)); - else - ui->firstRenamingRule->setText(tr("%1 - copy").arg(QStringLiteral("%name%"))); - if(!otherRenamingRule.empty()) - ui->otherRenamingRule->setText(QString::fromStdString(otherRenamingRule)); - else - ui->otherRenamingRule->setText(tr("%1 - copy (%2)").arg(QStringLiteral("%name%")).arg(QStringLiteral("%number%"))); - connectUI(); -} - -void RenamingRules::connectUI() -{ - connect(ui->firstRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::firstRenamingRule_haveChanged); - connect(ui->otherRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::otherRenamingRule_haveChanged); -} - -void RenamingRules::disconnectUI() -{ - disconnect(ui->firstRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::firstRenamingRule_haveChanged); - disconnect(ui->otherRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::otherRenamingRule_haveChanged); -} - -void RenamingRules::firstRenamingRule_haveChanged() -{ - QString newValue=ui->firstRenamingRule->text(); - if(newValue==tr("%1 - copy").arg(QStringLiteral("%name%"))) - newValue=QStringLiteral(""); - if(newValue.toStdString()==firstRenamingRule) - return; - firstRenamingRule=newValue.toStdString(); - emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); -} - -void RenamingRules::otherRenamingRule_haveChanged() -{ - QString newValue=ui->otherRenamingRule->text(); - if(newValue==tr("%1 - copy (%2)").arg(QStringLiteral("%name%")).arg(QStringLiteral("%number%"))) - newValue=QStringLiteral(""); - if(newValue.toStdString()==otherRenamingRule) - return; - otherRenamingRule=newValue.toStdString(); - emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); -} - -void RenamingRules::newLanguageLoaded() -{ - ui->retranslateUi(this); - setRenamingRules(firstRenamingRule,otherRenamingRule); -} diff --git a/plugins/CopyEngine/Ultracopier/RenamingRules.h b/plugins/CopyEngine/Ultracopier/RenamingRules.h deleted file mode 100644 index b2e9d02..0000000 --- a/plugins/CopyEngine/Ultracopier/RenamingRules.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef RENAMINGRULES_H -#define RENAMINGRULES_H - -#include -#include - -namespace Ui { -class RenamingRules; -} - -/** Define rules for renaming */ -class RenamingRules : public QDialog -{ - Q_OBJECT -public: - explicit RenamingRules(QWidget *parent = 0); - ~RenamingRules(); - void setRenamingRules(std::string firstRenamingRule, std::string otherRenamingRule); - void newLanguageLoaded(); -private: - Ui::RenamingRules *ui; - void connectUI(); - void disconnectUI(); - std::string firstRenamingRule; - std::string otherRenamingRule; -private slots: - void on_buttonBox_clicked(QAbstractButton *button); - void firstRenamingRule_haveChanged(); - void otherRenamingRule_haveChanged(); -signals: - void sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) const; -}; - -#endif // RENAMINGRULES_H diff --git a/plugins/CopyEngine/Ultracopier/RenamingRules.ui b/plugins/CopyEngine/Ultracopier/RenamingRules.ui deleted file mode 100644 index 0219249..0000000 --- a/plugins/CopyEngine/Ultracopier/RenamingRules.ui +++ /dev/null @@ -1,134 +0,0 @@ - - - RenamingRules - - - - 0 - 0 - 491 - 293 - - - - Renaming rules - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - First renaming - - - - - - %name% - copy%suffix% - - - - - - - - - - Second renaming - - - - - - %name% - copy (%number%)%suffix% - - - - - - - - - - <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> - - - true - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Close|QDialogButtonBox::RestoreDefaults - - - - - - - - - buttonBox - accepted() - RenamingRules - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - RenamingRules - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/plugins/CopyEngine/Ultracopier/ScanFileOrFolder.cpp b/plugins/CopyEngine/Ultracopier/ScanFileOrFolder.cpp deleted file mode 100644 index 9dd48f3..0000000 --- a/plugins/CopyEngine/Ultracopier/ScanFileOrFolder.cpp +++ /dev/null @@ -1,680 +0,0 @@ -#include "ScanFileOrFolder.h" -#include "TransferThread.h" -#include -#include -#include -#include "../../../cpp11addition.h" - -#ifdef Q_OS_WIN32 - #ifndef NOMINMAX - #define NOMINMAX - #endif - #include -#endif - -std::string ScanFileOrFolder::text_slash="/"; -std::string ScanFileOrFolder::text_antislash="\\"; -std::string ScanFileOrFolder::text_dot="."; - -ScanFileOrFolder::ScanFileOrFolder(const Ultracopier::CopyMode &mode) -{ - #ifdef ULTRACOPIER_PLUGIN_RSYNC - rsync = false; - #endif - moveTheWholeFolder = true; - stopped = true; - stopIt = false; - this->mode = mode; - folder_isolation = std::regex("^(.*/)?([^/]+)/$"); - setObjectName(QStringLiteral("ScanFileOrFolder")); - #ifdef Q_OS_WIN32 - QString userName; - DWORD size=255; - WCHAR * userNameW=new WCHAR[size]; - if(GetUserNameW(userNameW,&size)) - { - userName=QString::fromWCharArray(userNameW,size-1); - blackList.push_back(QFileInfo(QStringLiteral("C:/Users/%1/AppData/Roaming/").arg(userName)).absoluteFilePath().toStdString()); - } - delete userNameW; - #endif -} - -ScanFileOrFolder::~ScanFileOrFolder() -{ - stop(); - quit(); - wait(); -} - -bool ScanFileOrFolder::isFinished() const -{ - return stopped; -} - -void ScanFileOrFolder::addToList(const std::vector& sources,const std::string& destination) -{ - stopIt=false; - this->sources=parseWildcardSources(sources); - this->destination=destination; - QFileInfo destinationInfo(QString::fromStdString(this->destination)); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"check symblink: "+destinationInfo.absoluteFilePath().toStdString()); - while(destinationInfo.isSymLink()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"resolv destination to: "+destinationInfo.symLinkTarget().toStdString()); - if(QFileInfo(destinationInfo.symLinkTarget()).isAbsolute()) - this->destination=destinationInfo.symLinkTarget().toStdString(); - else - this->destination=destinationInfo.absolutePath().toStdString()+text_slash+destinationInfo.symLinkTarget().toStdString(); - destinationInfo.setFile(QString::fromStdString(this->destination)); - } - if(sources.size()>1 || QFileInfo(QString::fromStdString(destination)).isDir()) - /* Disabled because the separator transformation product bug - * if(!destination.endsWith(QDir::separator())) - this->destination+=QDir::separator();*/ - if(!stringEndsWith(destination,'/') && !stringEndsWith(destination,'\\')) - this->destination+=text_slash;//put unix separator because it's transformed into that's under windows too - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"addToList("+stringimplode(sources,";")+","+this->destination+")"); -} - - -std::vector ScanFileOrFolder::parseWildcardSources(const std::vector &sources) const -{ - std::regex splitFolder("[/\\\\]"); - std::vector returnList; - unsigned int index=0; - while(index<(unsigned int)sources.size()) - { - if(sources.at(index).find("*") != std::string::npos) - { - std::vector toParse=stringregexsplit(sources.at(index),splitFolder); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"before wildcard parse: "+sources.at(index)+", toParse: "+stringimplode(toParse,", ")); - std::vector > recomposedSource; - { - std::vector t; - t.push_back(""); - recomposedSource.push_back(t); - } - while(toParse.size()>0) - { - if(toParse.front().find("*") != std::string::npos) - { - std::string toParseFirst=toParse.front(); - if(toParseFirst.empty()) - toParseFirst=text_slash; - std::vector > newRecomposedSource; - stringreplaceAll(toParseFirst,"*","[^/\\\\]*"); - std::regex toResolv=std::regex(toParseFirst); - unsigned int index_recomposedSource=0; - while(index_recomposedSource tempList=recomposedSource.at(index_recomposedSource); - tempList.push_back(fileName); - newRecomposedSource.push_back(tempList); - } - index_fileList++; - } - } - index_recomposedSource++; - } - recomposedSource=newRecomposedSource; - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"add toParse: "+stringimplode(toParse,text_slash)); - unsigned int index_recomposedSource=0; - while(index_recomposedSource &include, const std::vector &exclude) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - QMutexLocker lock(&filtersMutex); - this->include_send=include; - this->exclude_send=exclude; - reloadTheNewFilters=true; - haveFilters=include_send.size()>0 || exclude_send.size()>0; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"haveFilters: "+std::to_string(haveFilters)+", include_send.size(): "+std::to_string(include_send.size())+", exclude_send.size(): "+std::to_string(exclude_send.size())); -} - -//set action if Folder are same or exists -void ScanFileOrFolder::setFolderExistsAction(const FolderExistsAction &action, const std::string &newName) -{ - this->newName=newName; - folderExistsAction=action; - waitOneAction.release(); -} - -//set action if error -void ScanFileOrFolder::setFolderErrorAction(const FileErrorAction &action) -{ - fileErrorAction=action; - waitOneAction.release(); -} - -void ScanFileOrFolder::stop() -{ - stopIt=true; - waitOneAction.release(); -} - -void ScanFileOrFolder::run() -{ - stopped=false; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start the listing with destination: "+destination+", mode: "+std::to_string(mode)); - destination=resolvDestination(QString::fromStdString(destination)).absoluteFilePath().toStdString(); - if(stopIt) - { - stopped=true; - return; - } - if(fileErrorAction==FileError_Skip) - { - stopped=true; - return; - } - unsigned int sourceIndex=0; - while(sourceIndexinclude=this->include_send; - this->exclude=this->exclude_send; - } - std::string fileName=fileInfo.fileName().toStdString(); - if(fileInfo.isDir() && !fileInfo.isSymLink()) - { - bool excluded=false,included=(include.size()==0); - unsigned int filters_index=0; - while(filters_indexcheckDestinationExists=checkDestinationFolderExists; -} - -void ScanFileOrFolder::setRenamingRules(const std::string &firstRenamingRule, const std::string &otherRenamingRule) -{ - this->firstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; -} - -void ScanFileOrFolder::setMoveTheWholeFolder(const bool &moveTheWholeFolder) -{ - this->moveTheWholeFolder=moveTheWholeFolder; -} - -void ScanFileOrFolder::setCopyListOrder(const bool &order) -{ - this->copyListOrder=order; -} - -#ifdef ULTRACOPIER_PLUGIN_RSYNC -/// \brief set rsync -void ScanFileOrFolder::setRsync(const bool rsync) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); - this->rsync=rsync; -} -#endif - -void ScanFileOrFolder::set_updateMount() -{ - driveManagement.tryUpdate(); -} diff --git a/plugins/CopyEngine/Ultracopier/ScanFileOrFolder.h b/plugins/CopyEngine/Ultracopier/ScanFileOrFolder.h deleted file mode 100644 index 0c625e9..0000000 --- a/plugins/CopyEngine/Ultracopier/ScanFileOrFolder.h +++ /dev/null @@ -1,108 +0,0 @@ -/** \file scanFileOrFolder.h -\brief Thread changed to list recursively the folder -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "Environment.h" -#include "DriveManagement.h" - -#ifndef SCANFILEORFOLDER_H -#define SCANFILEORFOLDER_H - -/// \brief Thread changed to list recursively the folder -class ScanFileOrFolder : public QThread -{ - Q_OBJECT -public: - explicit ScanFileOrFolder(const Ultracopier::CopyMode &mode); - ~ScanFileOrFolder(); - /// \brief to the a folder listing - void stop(); - /// \brief to get if is finished - bool isFinished() const; - /// \brief set action if Folder are same or exists - void setFolderExistsAction(const FolderExistsAction &action, const std::string &newName=""); - /// \brief set action if error - void setFolderErrorAction(const FileErrorAction &action); - /// \brief set if need check if the destination exists - void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); - void setRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); - void setMoveTheWholeFolder(const bool &moveTheWholeFolder); - #ifdef ULTRACOPIER_PLUGIN_RSYNC - void setRsync(const bool rsync); - #endif -signals: - void fileTransfer(const QFileInfo &source,const QFileInfo &destination,const Ultracopier::CopyMode &mode) const; - /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; - void folderAlreadyExists(const QFileInfo &source,const QFileInfo &destination,const bool &isSame) const; - void errorOnFolder(const QFileInfo &fileInfo,const std::string &errorString,const ErrorType &errorType=ErrorType_FolderWithRety) const; - void finishedTheListing() const; - - void newFolderListing(const std::string &path) const; - void addToMkPath(const QFileInfo& source,const QFileInfo& destination, const int& inode) const; - void addToMovePath(const QFileInfo& source,const QFileInfo& destination, const int& inodeToRemove) const; - void addToRealMove(const QFileInfo& source,const QFileInfo& destination) const; - #ifdef ULTRACOPIER_PLUGIN_RSYNC - void addToRmForRsync(const QFileInfo& destination) const; - #endif -public slots: - void addToList(const std::vector& sources,const std::string& destination); - void setFilters(const std::vector &include,const std::vector &exclude); - void setCopyListOrder(const bool &order); - void set_updateMount(); -protected: - void run(); -private: - DriveManagement driveManagement; - bool moveTheWholeFolder; - std::vector sources; - std::string destination; - volatile bool stopIt; - void listFolder(QFileInfo source, QFileInfo destination); - bool isBlackListed(const QFileInfo &destination); - QFileInfo resolvDestination(const QFileInfo &destination); - volatile bool stopped; - QSemaphore waitOneAction; - FolderExistsAction folderExistsAction; - FileErrorAction fileErrorAction; - volatile bool checkDestinationExists; - std::string newName; - bool copyListOrder; - std::regex folder_isolation; - #ifdef ULTRACOPIER_PLUGIN_RSYNC - bool rsync; - #endif - Ultracopier::CopyMode mode; - std::vector include,exclude; - std::vector include_send,exclude_send; - bool reloadTheNewFilters; - bool haveFilters; - QMutex filtersMutex; - std::string firstRenamingRule; - std::string otherRenamingRule; - std::vector blackList; - /** Parse the multiple wildcard source, it allow resolv multiple wildcard with Qt into their path - * The string: /toto/f*a/yy*a/toto.mp3 - * Will give: /toto/f1a/yy*a/toto.mp3, /toto/f2a/yy*a/toto.mp3 - * Will give: /toto/f2a/yy1a/toto.mp3, /toto/f2a/yy2a/toto.mp3 - */ - std::vector parseWildcardSources(const std::vector &sources) const; - - static std::string text_slash; - static std::string text_antislash; - static std::string text_dot; -}; - -#endif // SCANFILEORFOLDER_H diff --git a/plugins/CopyEngine/Ultracopier/StructEnumDefinition.h b/plugins/CopyEngine/Ultracopier/StructEnumDefinition.h deleted file mode 100644 index c1758f4..0000000 --- a/plugins/CopyEngine/Ultracopier/StructEnumDefinition.h +++ /dev/null @@ -1 +0,0 @@ -#include "../../../StructEnumDefinition.h" diff --git a/plugins/CopyEngine/Ultracopier/StructEnumDefinition_CopyEngine.h b/plugins/CopyEngine/Ultracopier/StructEnumDefinition_CopyEngine.h deleted file mode 100644 index 036803c..0000000 --- a/plugins/CopyEngine/Ultracopier/StructEnumDefinition_CopyEngine.h +++ /dev/null @@ -1,124 +0,0 @@ -/** \file StructEnumDefinition_CopyEngine.h -\brief Define the structure and enumeration used in the copy engine -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#include -#include - -#ifndef STRUCTDEF_COPYENGINE_H -#define STRUCTDEF_COPYENGINE_H - -/// \brief Define action if file exists -enum FileExistsAction -{ - FileExists_NotSet=0, - FileExists_Cancel=1, - FileExists_Skip=2, - FileExists_Overwrite=3, - FileExists_OverwriteIfNotSame=4, - FileExists_OverwriteIfNewer=5, - FileExists_OverwriteIfOlder=6, - FileExists_Rename=7 -}; - -/// \brief Define action if file error -enum FileErrorAction -{ - FileError_NotSet=1, - FileError_Cancel=2, - FileError_Skip=3, - FileError_Retry=4, - FileError_PutToEndOfTheList=5 -}; - -enum TransferAlgorithm -{ - TransferAlgorithm_Automatic=0, - TransferAlgorithm_Sequential=1, - TransferAlgorithm_Parallel=2 -}; - -/// \brief to have the transfer status -enum TransferStat -{ - TransferStat_Idle=0, - TransferStat_PreOperation=1, - TransferStat_WaitForTheTransfer=2, - TransferStat_Transfer=3, - TransferStat_Checksum=4, - TransferStat_PostTransfer=5, - TransferStat_PostOperation=6 -}; - -/// \brief Define overwrite mode -/*enum OverwriteMode -{ - OverwriteMode_None, - OverwriteMode_Overwrite, - OverwriteMode_OverwriteIfNewer, - OverwriteMode_OverwriteIfNotSameModificationDate -};*/ - -/// \brief Define action if file exists -enum FolderExistsAction -{ - FolderExists_NotSet=0, - FolderExists_Cancel=1, - FolderExists_Merge=2, - FolderExists_Skip=3, - FolderExists_Rename=4 -}; - -enum ErrorType -{ - ErrorType_Normal=0, - ErrorType_Folder=1, - ErrorType_FolderWithRety=2, - ErrorType_Rights=3 -}; - -enum SearchType -{ - SearchType_rawText=0, - SearchType_simpleRegex=1, - SearchType_perlRegex=2 -}; - -enum ApplyOn -{ - ApplyOn_file=0, - ApplyOn_fileAndFolder=1, - ApplyOn_folder=2 -}; - -/** to store into different way the filter rules to be exported */ -struct Filters_rules -{ - std::string search_text; - SearchType search_type; - ApplyOn apply_on; - bool need_match_all; - std::regex regex; -}; - -/// \brief get action type -enum ActionType -{ - ActionType_MkPath=1, - ActionType_MovePath=2, - ActionType_RealMove=3 - #ifdef ULTRACOPIER_PLUGIN_RSYNC - , - ActionType_RmSync=4 - #endif -}; - -struct Diskspace -{ - std::string drive; - uint64_t requiredSpace; - uint64_t freeSpace; -}; - -#endif // STRUCTDEF_COPYENGINE_H diff --git a/plugins/CopyEngine/Ultracopier/TransferThread.cpp b/plugins/CopyEngine/Ultracopier/TransferThread.cpp deleted file mode 100644 index 210c221..0000000 --- a/plugins/CopyEngine/Ultracopier/TransferThread.cpp +++ /dev/null @@ -1,2101 +0,0 @@ -//presume bug linked as multple paralelle inode to resume after "overwrite" -//then do overwrite node function to not re-set the file name - -#include "TransferThread.h" -#ifdef Q_OS_WIN32 -#include -#endif - -#ifdef Q_OS_WIN32 - #ifndef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - #ifndef NOMINMAX - #define NOMINMAX - #endif - #include - #endif -#endif - -#ifdef Q_OS_WIN32 -#define CURRENTSEPARATOR "\\" -#else -#define CURRENTSEPARATOR "/" -#endif - -#include "../../../cpp11addition.h" - -TransferThread::TransferThread() : - haveStartTime (false), - transfer_stat (TransferStat_Idle), - doRightTransfer (false), - #ifdef ULTRACOPIER_PLUGIN_RSYNC - rsync (false), - #endif - stopIt (false), - fileExistsAction (FileExists_NotSet), - alwaysDoFileExistsAction (FileExists_NotSet), - needSkip (false), - needRemove (false), - deletePartiallyTransferredFiles (true), - writeError (false), - readError (false), - renameTheOriginalDestination (false), - havePermission (false) -{ - start(); - moveToThread(this); - readThread.setWriteThread(&writeThread); - source.setCaching(false); - destination.setCaching(false); - renameRegex=std::regex("^(.*)(\\.[a-zA-Z0-9]+)$"); - #ifdef Q_OS_WIN32 - #ifndef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - regRead=std::regex("^[a-zA-Z]:"); - #endif - #endif - - minTime=QDateTime(QDate(ULTRACOPIER_PLUGIN_MINIMALYEAR,1,1)); -} - -TransferThread::~TransferThread() -{ - stopIt=true; - readThread.exit(); - readThread.wait(); - writeThread.exit(); - writeThread.wait(); - exit(); - //else cash without this disconnect - //disconnect(&readThread); - //disconnect(&writeThread); - wait(); -} - -void TransferThread::run() -{ - //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+QStringLiteral("] start: ")+QString::number((qint64)QThread::currentThreadId()))); - transfer_stat = TransferStat_Idle; - stopIt = false; - fileExistsAction = FileExists_NotSet; - alwaysDoFileExistsAction= FileExists_NotSet; - //the error push - connect(&readThread,&ReadThread::error, this, &TransferThread::getReadError, Qt::QueuedConnection); - connect(&writeThread,&WriteThread::error, this, &TransferThread::getWriteError, Qt::QueuedConnection); - //the thread change operation - connect(this,&TransferThread::internalStartPreOperation, this, &TransferThread::preOperation, Qt::QueuedConnection); - connect(this,&TransferThread::internalStartPostOperation, this, &TransferThread::postOperation, Qt::QueuedConnection); - //the state change operation - connect(&readThread,&ReadThread::opened, this, &TransferThread::readIsReady, Qt::QueuedConnection); - connect(&writeThread,&WriteThread::opened, this, &TransferThread::writeIsReady, Qt::QueuedConnection); - connect(&readThread,&ReadThread::readIsStopped, this, &TransferThread::readIsStopped, Qt::QueuedConnection); - connect(&writeThread,&WriteThread::writeIsStopped, this, &TransferThread::writeIsStopped, Qt::QueuedConnection); - connect(&readThread,&ReadThread::readIsStopped, &writeThread, &WriteThread::endIsDetected, Qt::QueuedConnection); - connect(&readThread,&ReadThread::closed, this, &TransferThread::readIsClosed, Qt::QueuedConnection); - connect(&writeThread,&WriteThread::closed, this, &TransferThread::writeIsClosed, Qt::QueuedConnection); - connect(&writeThread,&WriteThread::reopened, this, &TransferThread::writeThreadIsReopened, Qt::QueuedConnection); - connect(&readThread,&ReadThread::checksumFinish, this, &TransferThread::readChecksumFinish, Qt::QueuedConnection); - connect(&writeThread,&WriteThread::checksumFinish, this, &TransferThread::writeChecksumFinish, Qt::QueuedConnection); - //error management - connect(&readThread,&ReadThread::isSeekToZeroAndWait, this, &TransferThread::readThreadIsSeekToZeroAndWait, Qt::QueuedConnection); - connect(&readThread,&ReadThread::resumeAfterErrorByRestartAtTheLastPosition,this, &TransferThread::readThreadResumeAfterError, Qt::QueuedConnection); - connect(&readThread,&ReadThread::resumeAfterErrorByRestartAll,&writeThread, &WriteThread::flushAndSeekToZero, Qt::QueuedConnection); - connect(&writeThread,&WriteThread::flushedAndSeekedToZero, this, &TransferThread::readThreadResumeAfterError, Qt::QueuedConnection); - connect(this,&TransferThread::internalTryStartTheTransfer, this, &TransferThread::internalStartTheTransfer, Qt::QueuedConnection); - - #ifdef ULTRACOPIER_PLUGIN_DEBUG - connect(&readThread,&ReadThread::debugInformation, this, &TransferThread::debugInformation, Qt::QueuedConnection); - connect(&writeThread,&WriteThread::debugInformation, this, &TransferThread::debugInformation, Qt::QueuedConnection); - connect(&driveManagement,&DriveManagement::debugInformation,this, &TransferThread::debugInformation, Qt::QueuedConnection); - #endif - - exec(); -} - -TransferStat TransferThread::getStat() const -{ - return transfer_stat; -} - -void TransferThread::startTheTransfer() -{ - emit internalTryStartTheTransfer(); -} - -void TransferThread::internalStartTheTransfer() -{ - if(transfer_stat==TransferStat_Idle) - { - if(mode!=Ultracopier::Move) - { - /// \bug can pass here because in case of direct move on same media, it return to idle stat directly - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at idle")); - } - return; - } - if(transfer_stat==TransferStat_PostOperation) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at PostOperation")); - return; - } - if(transfer_stat==TransferStat_Transfer) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at Transfer")); - return; - } - if(canStartTransfer) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] canStartTransfer is already set to true")); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] check how start the transfer")); - canStartTransfer=true; - if(readIsReadyVariable && writeIsReadyVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start directly the transfer")); - ifCanStartTransfer(); - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start the transfer as delayed")); -} - -bool TransferThread::setFiles(const QFileInfo& source, const int64_t &size, const QFileInfo& destination, const Ultracopier::CopyMode &mode) -{ - if(transfer_stat!=TransferStat_Idle) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+source.absoluteFilePath().toStdString()+", destination: "+destination.absoluteFilePath().toStdString()); - return false; - } - //to prevent multiple file alocation into ListThread::doNewActions_inode_manipulation() - transfer_stat = TransferStat_PreOperation; - //emit pushStat(stat,transferId); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start, source: "+source.absoluteFilePath().toStdString()+", destination: "+destination.absoluteFilePath().toStdString()); - this->source = source; - this->destination = destination; - this->mode = mode; - this->size = size; - stopIt = false; - fileExistsAction = FileExists_NotSet; - canStartTransfer = false; - sended_state_preOperationStopped= false; - canBeMovedDirectlyVariable = false; - canBeCopiedDirectlyVariable = false; - fileContentError = false; - real_doChecksum = false; - writeError = false; - writeError_source_seeked = false; - writeError_destination_reopened = false; - readError = false; - fileContentError = false; - resetExtraVariable(); - emit internalStartPreOperation(); - return true; -} - -void TransferThread::setFileExistsAction(const FileExistsAction &action) -{ - if(transfer_stat!=TransferStat_PreOperation) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+source.absoluteFilePath().toStdString()+(", destination: ")+destination.absoluteFilePath().toStdString()); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] action: ")+std::to_string(action)); - if(action!=FileExists_Rename) - fileExistsAction = action; - else - { - //always rename pass here - fileExistsAction = action; - alwaysDoFileExistsAction=action; - } - if(action==FileExists_Skip) - { - skip(); - return; - } - resetExtraVariable(); - emit internalStartPreOperation(); -} - -void TransferThread::setFileRename(const std::string &nameForRename) -{ - if(transfer_stat!=TransferStat_PreOperation) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+source.absoluteFilePath().toStdString()+(", destination: ")+destination.absoluteFilePath().toStdString()); - return; - } - if(QString::fromStdString(nameForRename).contains(QRegularExpression(QStringLiteral("[/\\\\\\*]")))) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't use this kind of name, internal error")); - emit errorOnFile(destination,tr("Try rename with using special characters").toStdString()); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] nameForRename: "+nameForRename); - if(!renameTheOriginalDestination) - destination.setFile(destination.absolutePath()+CURRENTSEPARATOR+QString::fromStdString(nameForRename)); - else - { - QString tempDestination=destination.absoluteFilePath(); - QFile destinationFile(tempDestination); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] "+QStringLiteral("rename %1: to: %2").arg(destination.absoluteFilePath()).arg(destination.absolutePath()+CURRENTSEPARATOR+QString::fromStdString(nameForRename)).toStdString()); - if(!destinationFile.rename(destination.absolutePath()+CURRENTSEPARATOR+QString::fromStdString(nameForRename))) - { - if(!destinationFile.exists()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("source not exists %1: destination: %2, error: %3").arg(destinationFile.fileName()).arg(destinationFile.fileName()).arg(destinationFile.errorString()).toStdString()); - emit errorOnFile(destinationFile,tr("File not found").toStdString()); - return; - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("unable to do real move %1: %2, error: %3").arg(destinationFile.fileName()).arg(destinationFile.fileName()).arg(destinationFile.errorString()).toStdString()); - emit errorOnFile(destinationFile,destinationFile.errorString().toStdString()); - return; - } - if(source.absoluteFilePath()==destination.absoluteFilePath()) - source.setFile(destination.absolutePath()+CURRENTSEPARATOR+QString::fromStdString(nameForRename)); - destination.setFile(tempDestination); - destination.refresh(); - } - fileExistsAction = FileExists_NotSet; - resetExtraVariable(); - emit internalStartPreOperation(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] destination is: "+destination.absoluteFilePath().toStdString()); -} - -void TransferThread::setAlwaysFileExistsAction(const FileExistsAction &action) -{ - //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+QStringLiteral("] action to do always: ")+QString::number(action))); - alwaysDoFileExistsAction=action; -} - -void TransferThread::resetExtraVariable() -{ - sended_state_preOperationStopped=false; - sended_state_readStopped = false; - sended_state_writeStopped = false; - writeError = false; - readError = false; - readIsReadyVariable = false; - writeIsReadyVariable = false; - readIsFinishVariable = false; - writeIsFinishVariable = false; - readIsClosedVariable = false; - writeIsClosedVariable = false; - needRemove = false; - needSkip = false; - retry = false; - readIsOpenVariable = false; - writeIsOpenVariable = false; - readIsOpeningVariable = false; - writeIsOpeningVariable = false; - havePermission = false; -} - -void TransferThread::preOperation() -{ - if(transfer_stat!=TransferStat_PreOperation) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+source.absoluteFilePath().toStdString()+", destination: "+destination.absoluteFilePath().toStdString()); - return; - } - haveStartTime=true; - startTransferTime.restart(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start: source: "+source.absoluteFilePath().toStdString()+", destination: "+destination.absoluteFilePath().toStdString()); - needRemove=false; - if(isSame()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] is same "+source.absoluteFilePath().toStdString()+" than "+destination.absoluteFilePath().toStdString()); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after is same"); - /*Why this code? - if(readError) - { - readError=false; - return; - }*/ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before destination exists"); - if(destinationExists()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] destination exists: "+destination.absoluteFilePath().toStdString()); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after destination exists"); - /*Why this code? - if(readError) - { - readError=false; - return; - }*/ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before keep date"); - #ifdef Q_OS_WIN32 - doTheDateTransfer=!source.isSymLink(); - #else - doTheDateTransfer=true; - #endif - if(doTheDateTransfer) - { - if(source.lastModified()="+source.lastModified().toString(QStringLiteral("dd.MM.yyyy hh:mm:ss.zzz")).toStdString()); - doTheDateTransfer=false; - if(keepDate) - { - emit errorOnFile(source,tr("Wrong modification date or unable to get it, you can disable time transfer to do it").toStdString()); - return; - } - } - } - else - { - doTheDateTransfer=readFileDateTime(source); - #ifdef Q_OS_MAC - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] read the source time: "+std::to_string(butime.modtime)); - #endif - if(!doTheDateTransfer) - { - //will have the real error at source open - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unable to read the source time: "+source.absoluteFilePath().toStdString()); - if(keepDate) - { - emit errorOnFile(source,tr("Wrong modification date or unable to get it, you can disable time transfer to do it").toStdString()); - return; - } - } - } - } - if(canBeMovedDirectly()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+QStringLiteral("need moved directly: %1 to %2").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).toStdString()); - canBeMovedDirectlyVariable=true; - readThread.fakeOpen(); - writeThread.fakeOpen(); - return; - } - if(canBeCopiedDirectly()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+QStringLiteral("need copied directly: %1 to %2").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).toStdString()); - canBeCopiedDirectlyVariable=true; - readThread.fakeOpen(); - writeThread.fakeOpen(); - return; - } - tryOpen(); -} - -void TransferThread::tryOpen() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start source and destination: "+source.absoluteFilePath().toStdString()+" and "+destination.absoluteFilePath().toStdString()); - TransferAlgorithm transferAlgorithm=this->transferAlgorithm; - if(transferAlgorithm==TransferAlgorithm_Automatic) - { - #ifdef Q_OS_LINUX - if(driveManagement.isSameDrive(destination.absoluteFilePath().toStdString(),source.absoluteFilePath().toStdString())) - { - const QByteArray &type=driveManagement.getDriveType(driveManagement.getDrive(source.absoluteFilePath().toStdString())); - if(type=="nfs" || type=="smb") - transferAlgorithm=TransferAlgorithm_Parallel; - else - transferAlgorithm=TransferAlgorithm_Sequential; - } - else - #endif - transferAlgorithm=TransferAlgorithm_Parallel; - } - if(!readIsOpenVariable) - { - if(!readIsOpeningVariable) - { - readError=false; - readThread.open(source.absoluteFilePath(),mode); - readIsOpeningVariable=true; - - if(doRightTransfer) - havePermission=readFilePermissions(QFile(source.absoluteFilePath())); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] readIsOpeningVariable is true when try open"); - emit errorOnFile(source,tr("Internal error: Already opening").toStdString()); - readError=true; - return; - } - } - if(!writeIsOpenVariable) - { - if(!writeIsOpeningVariable) - { - if(transferAlgorithm==TransferAlgorithm_Sequential) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transferAlgorithm==TransferAlgorithm_Sequential"); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transferAlgorithm==TransferAlgorithm_Parallel"); - writeError=false; - if(transferAlgorithm==TransferAlgorithm_Sequential) - writeThread.open(destination.absoluteFilePath(),size,osBuffer && (!osBufferLimited || (osBufferLimited && sizesource.lastModified()) - return false; - else - { - transfer_stat=TransferStat_Idle; - emit postOperationStopped(); - return true; - } - } - if(fileExistsAction==FileExists_OverwriteIfNotSame || (fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_OverwriteIfNotSame)) - { - if(destination.lastModified()!=source.lastModified() || destination.size()!=source.size()) - return false; - else - { - transfer_stat=TransferStat_Idle; - emit postOperationStopped(); - return true; - } - } - } - else - { - if(fileExistsAction!=FileExists_NotSet) - { - transfer_stat=TransferStat_Idle; - emit postOperationStopped(); - return true; - } - } - if(fileExistsAction==FileExists_NotSet) - { - emit fileAlreadyExists(source,destination,false); - return true; - } - } - return false; -} - -std::string TransferThread::resolvedName(const QFileInfo &inode) -{ - QString fileName=inode.fileName(); - if(fileName.isEmpty()) - { - QDir absoluteDir=inode.absoluteDir(); - fileName=absoluteDir.dirName(); - if(fileName.isEmpty()) - { - fileName=absoluteDir.cdUp(); - fileName=absoluteDir.dirName(); - } - } - #ifdef Q_OS_WIN32 - if(fileName.isEmpty()) - { - fileName=inode.absolutePath(); - fileName.replace(QRegularExpression(QStringLiteral("^([a-zA-Z]+):.*$")),QStringLiteral("\\1")); - if(inode.absolutePath().contains(QRegularExpression(QStringLiteral("^[a-zA-Z]+:[/\\\\]?$")))) - fileName=tr("Drive %1").arg(fileName); - else - fileName=tr("Unknown folder"); - } - #else - if(fileName.isEmpty()) - fileName=tr("root"); - #endif - return fileName.toStdString(); -} - -std::string TransferThread::getSourcePath() const -{ - return source.absoluteFilePath().toStdString(); -} - -std::string TransferThread::getDestinationPath() const -{ - return destination.absoluteFilePath().toStdString(); -} - -QFileInfo TransferThread::getSourceInode() const -{ - return source; -} - -QFileInfo TransferThread::getDestinationInode() const -{ - return destination; -} - -Ultracopier::CopyMode TransferThread::getMode() const -{ - return mode; -} - -//return true if has been renamed -bool TransferThread::checkAlwaysRename() -{ - if(alwaysDoFileExistsAction==FileExists_Rename) - { - QFileInfo newDestination=destination; - std::string fileName=resolvedName(newDestination); - std::string suffix; - std::string newFileName; - //resolv the suffix - if(std::regex_match(fileName,renameRegex)) - { - suffix=fileName; - suffix=std::regex_replace(suffix,renameRegex,"$2"); - fileName=std::regex_replace(fileName,renameRegex,"$1"); - } - //resolv the new name - int num=1; - do - { - if(num==1) - { - if(firstRenamingRule.empty()) - newFileName=tr("%name% - copy").toStdString(); - else - newFileName=firstRenamingRule; - } - else - { - if(otherRenamingRule.empty()) - newFileName=tr("%name% - copy (%number%)").toStdString(); - else - newFileName=otherRenamingRule; - stringreplaceAll(newFileName,"%number%",std::to_string(num)); - } - stringreplaceAll(newFileName,"%name%",fileName); - stringreplaceAll(newFileName,"%suffix%",suffix); - newDestination.setFile(newDestination.absolutePath()+CURRENTSEPARATOR+QString::fromStdString(newFileName)); - num++; - } - while(newDestination.exists()); - if(!renameTheOriginalDestination) - destination=newDestination; - else - { - QFile destinationFile(destination.absoluteFilePath()); - if(!destinationFile.rename(newDestination.absoluteFilePath())) - { - if(!destinationFile.exists()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("source not exists %1: destination: %2, error: %3").arg(destinationFile.fileName()).arg(destinationFile.fileName()).arg(destinationFile.errorString()).toStdString()); - emit errorOnFile(destinationFile,tr("File not found").toStdString()); - readError=true; - return true; - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("unable to do real move %1: %2, error: %3").arg(destinationFile.fileName()).arg(destinationFile.fileName()).arg(destinationFile.errorString()).toStdString()); - readError=true; - emit errorOnFile(destinationFile,destinationFile.errorString().toStdString()); - return true; - } - } - return true; - } - return false; -} - -void TransferThread::tryMoveDirectly() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+QStringLiteral("need moved directly: %1 to %2").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).toStdString()); - - sended_state_readStopped = false; - sended_state_writeStopped = false; - writeError = false; - readError = false; - readIsFinishVariable = false; - writeIsFinishVariable = false; - readIsClosedVariable = false; - writeIsClosedVariable = false; - //move if on same mount point - QFile sourceFile(source.absoluteFilePath()); - QFile destinationFile(destination.absoluteFilePath()); - #ifndef Q_OS_WIN32 - if(destinationFile.exists() || destination.isSymLink()) - { - if(!sourceFile.exists() && !source.isSymLink()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+destinationFile.fileName().toStdString()+", source not exists"); - readError=true; - emit errorOnFile(destination,tr("The source file doesn't exist").toStdString()); - return; - } - else if(!destinationFile.remove()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+destinationFile.fileName().toStdString()+", error: "+destinationFile.errorString().toStdString()); - readError=true; - emit errorOnFile(destination,destinationFile.errorString().toStdString()); - return; - } - } - #endif - QDir dir(destination.absolutePath()); - { - mkpathTransfer->acquire(); - if(!dir.exists()) - dir.mkpath(destination.absolutePath()); - mkpathTransfer->release(); - } - #ifdef Q_OS_WIN32 - //if(!sourceFile.copy(destinationFile.fileName())) - if(MoveFileEx( - reinterpret_cast(sourceFile.fileName().utf16()), - reinterpret_cast(destinationFile.fileName().utf16()), - MOVEFILE_COPY_ALLOWED|MOVEFILE_REPLACE_EXISTING - )==0) - #else - if(!sourceFile.rename(destinationFile.fileName())) - #endif - { - readError=true; - if(!sourceFile.exists() && !source.isSymLink()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("source not exists %1: destination: %2, error: %3").arg(sourceFile.fileName()).arg(destinationFile.fileName()).arg(sourceFile.errorString()).toStdString()); - emit errorOnFile(sourceFile,tr("File not found").toStdString()); - return; - } - else if(!dir.exists()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("destination folder not exists %1: %2, error: %3").arg(sourceFile.fileName()).arg(destinationFile.fileName()).arg(sourceFile.errorString()).toStdString()); - emit errorOnFile(destination.absolutePath(),tr("Unable to do the folder").toStdString()); - return; - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("unable to do real move %1: %2, error: %3").arg(sourceFile.fileName()).arg(destinationFile.fileName()).arg(sourceFile.errorString()).toStdString()); - emit errorOnFile(sourceFile,sourceFile.errorString().toStdString()); - return; - } - readThread.fakeReadIsStarted(); - writeThread.fakeWriteIsStarted(); - readThread.fakeReadIsStopped(); - writeThread.fakeWriteIsStopped(); -} - -void TransferThread::tryCopyDirectly() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+QStringLiteral("need copied directly: %1 to %2").arg(source.absoluteFilePath()).arg(destination.absoluteFilePath()).toStdString()); - - sended_state_readStopped = false; - sended_state_writeStopped = false; - writeError = false; - readError = false; - readIsFinishVariable = false; - writeIsFinishVariable = false; - readIsClosedVariable = false; - writeIsClosedVariable = false; - //move if on same mount point - QFile sourceFile(source.absoluteFilePath()); - QFile destinationFile(destination.absoluteFilePath()); - #ifndef Q_OS_WIN32 - if(destinationFile.exists() || destination.isSymLink()) - { - if(!sourceFile.exists() && !source.isSymLink()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+destinationFile.fileName().toStdString()+", source not exists"); - readError=true; - emit errorOnFile(destination,tr("The source doesn't exist").toStdString()); - return; - } - else if(!destinationFile.remove()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+destinationFile.fileName().toStdString()+", error: "+destinationFile.errorString().toStdString()); - readError=true; - emit errorOnFile(destination,destinationFile.errorString().toStdString()); - return; - } - } - #endif - QDir dir(destination.absolutePath()); - { - mkpathTransfer->acquire(); - if(!dir.exists()) - dir.mkpath(destination.absolutePath()); - mkpathTransfer->release(); - } - /** on windows, symLink is normal file, can be copied - * on unix not, should be created **/ - #ifdef Q_OS_WIN32 - //if(!sourceFile.copy(destinationFile.fileName())) - if(CopyFileEx( - reinterpret_cast(sourceFile.fileName().utf16()), - reinterpret_cast(destinationFile.fileName().utf16()), - NULL, - NULL, - FALSE, - 0 - )==0) - #else - if(!QFile::link(sourceFile.symLinkTarget(),destinationFile.fileName())) - #endif - { - readError=true; - if(!sourceFile.exists() && !source.isSymLink()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("source not exists %1 -> %4: %2, error: %3").arg(sourceFile.fileName()).arg(destinationFile.fileName()).arg(sourceFile.errorString()).arg(sourceFile.symLinkTarget()).toStdString()); - emit errorOnFile(sourceFile,tr("The source file doesn't exist").toStdString()); - return; - } - else if(destinationFile.exists() || destination.isSymLink()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("destination already exists %1 -> %4: %2, error: %3").arg(sourceFile.fileName()).arg(destinationFile.fileName()).arg(sourceFile.errorString()).arg(sourceFile.symLinkTarget()).toStdString()); - emit errorOnFile(sourceFile,tr("Another file exists at same place").toStdString()); - return; - } - else if(!dir.exists()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("destination folder not exists %1 -> %4: %2, error: %3").arg(sourceFile.fileName()).arg(destinationFile.fileName()).arg(sourceFile.errorString()).arg(sourceFile.symLinkTarget()).toStdString()); - emit errorOnFile(sourceFile,tr("Unable to do the folder").toStdString()); - return; - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("unable to do sym link copy %1 -> %4: %2, error: %3").arg(sourceFile.fileName()).arg(destinationFile.fileName()).arg(sourceFile.errorString()).arg(sourceFile.symLinkTarget()).toStdString()); - emit errorOnFile(sourceFile,sourceFile.errorString().toStdString()); - return; - } - readThread.fakeReadIsStarted(); - writeThread.fakeWriteIsStarted(); - readThread.fakeReadIsStopped(); - writeThread.fakeWriteIsStopped(); -} - -bool TransferThread::canBeMovedDirectly() const -{ - if(mode!=Ultracopier::Move) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] mode!=Ultracopier::Move"); - return false; - } - return source.isSymLink() || driveManagement.isSameDrive(destination.absoluteFilePath().toStdString(),source.absoluteFilePath().toStdString()); -} - -bool TransferThread::canBeCopiedDirectly() const -{ - return source.isSymLink(); -} - -void TransferThread::readIsReady() -{ - if(readIsReadyVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - readIsReadyVariable=true; - readIsOpenVariable=true; - readIsClosedVariable=false; - readIsOpeningVariable=false; - ifCanStartTransfer(); -} - -void TransferThread::ifCanStartTransfer() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readIsReadyVariable: "+std::to_string(readIsReadyVariable)+", writeIsReadyVariable: "+std::to_string(writeIsReadyVariable)); - if(readIsReadyVariable && writeIsReadyVariable) - { - transfer_stat=TransferStat_WaitForTheTransfer; - sended_state_readStopped = false; - sended_state_writeStopped = false; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stat=WaitForTheTransfer"); - if(!sended_state_preOperationStopped) - { - sended_state_preOperationStopped=true; - emit preOperationStopped(); - } - if(canStartTransfer) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stat=Transfer, "+QStringLiteral("canBeMovedDirectlyVariable: %1, canBeCopiedDirectlyVariable: %2").arg(canBeMovedDirectlyVariable).arg(canBeCopiedDirectlyVariable).toStdString()); - transfer_stat=TransferStat_Transfer; - if(canBeMovedDirectlyVariable) - tryMoveDirectly(); - else if(canBeCopiedDirectlyVariable) - tryCopyDirectly(); - else - { - needRemove=deletePartiallyTransferredFiles; - readThread.startRead(); - } - emit pushStat(transfer_stat,transferId); - } - //else - //emit pushStat(stat,transferId); - } -} - -void TransferThread::writeIsReady() -{ - if(writeIsReadyVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - writeIsReadyVariable=true; - writeIsOpenVariable=true; - writeIsClosedVariable=false; - writeIsOpeningVariable=false; - ifCanStartTransfer(); -} - - -//set the copy info and options before runing -void TransferThread::setRightTransfer(const bool doRightTransfer) -{ - this->doRightTransfer=doRightTransfer; -} - -//set keep date -void TransferThread::setKeepDate(const bool keepDate) -{ - this->keepDate=keepDate; -} - -#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT -//set the current max speed in KB/s -void TransferThread::setMultiForBigSpeed(const int &multiForBigSpeed) -{ - readThread.setMultiForBigSpeed(multiForBigSpeed); - writeThread.setMultiForBigSpeed(multiForBigSpeed); -} -#endif - -//set block size in Bytes -bool TransferThread::setBlockSize(const unsigned int blockSize) -{ - bool read=readThread.setBlockSize(blockSize); - bool write=writeThread.setBlockSize(blockSize); - return (read && write); -} - -//pause the copy -void TransferThread::pause() -{ - //only pause/resume during the transfer of file data - //from transfer_stat!=TransferStat_Idle because it resume at wrong order - if(transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer && transfer_stat!=TransferStat_Checksum) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] wrong stat to put in pause"); - return; - } - haveStartTime=false; - readThread.pause(); - writeThread.pause(); -} - -//resume the copy -void TransferThread::resume() -{ - //only pause/resume during the transfer of file data - //from transfer_stat!=TransferStat_Idle because it resume at wrong order - if(transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer && transfer_stat!=TransferStat_Checksum) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] wrong stat to put in pause"); - return; - } - readThread.resume(); - writeThread.resume(); -} - -//stop the current copy -void TransferThread::stop() -{ - stopIt=true; - haveStartTime=false; - if(transfer_stat==TransferStat_Idle) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"transfer_stat==TransferStat_Idle"); - return; - } - if(remainSourceOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"remainSourceOpen()"); - readThread.stop(); - } - if(remainDestinationOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"remainDestinationOpen()"); - writeThread.stop(); - } - if(!remainFileOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"transfer_stat==TransferStat_Idle"); - if(needRemove && source.absoluteFilePath()!=destination.absoluteFilePath()) - { - if(source.exists()) - QFile(destination.absoluteFilePath()).remove(); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] try destroy the destination when the source don't exists")); - } - transfer_stat=TransferStat_PostOperation; - emit internalStartPostOperation(); - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("transfer_stat==%1 && remainFileOpen()").arg(transfer_stat).toStdString()); -} - -bool TransferThread::remainFileOpen() const -{ - return remainSourceOpen() || remainDestinationOpen(); -} - -bool TransferThread::remainSourceOpen() const -{ - return (readIsOpenVariable || readIsOpeningVariable) && !readIsClosedVariable; -} - -bool TransferThread::remainDestinationOpen() const -{ - return (writeIsOpenVariable || writeIsOpeningVariable) && !writeIsClosedVariable; -} - -void TransferThread::readIsFinish() -{ - if(readIsFinishVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] double event dropped")); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - readIsFinishVariable=true; - canStartTransfer=false; - //check here if need start checksuming or not - real_doChecksum=doChecksum && (!checksumOnlyOnError || fileContentError) && (!canBeMovedDirectlyVariable && !canBeCopiedDirectlyVariable); - if(real_doChecksum) - { - readIsFinishVariable=false; - transfer_stat=TransferStat_Checksum; - sourceChecksum=QByteArray(); - destinationChecksum=QByteArray(); - readThread.startCheckSum(); - } - else - { - transfer_stat=TransferStat_PostTransfer; - if(!needSkip || (canBeCopiedDirectlyVariable || canBeMovedDirectlyVariable))//if skip, stop call, then readIsClosed() already call - readThread.postOperation(); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] in skip, don't start postOperation"); - } - emit pushStat(transfer_stat,transferId); -} - -void TransferThread::writeIsFinish() -{ - if(writeIsFinishVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] double event dropped"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - writeIsFinishVariable=true; - //check here if need start checksuming or not - if(real_doChecksum) - { - writeIsFinishVariable=false; - transfer_stat=TransferStat_Checksum; - writeThread.startCheckSum(); - } - else - { - if(!needSkip || (canBeCopiedDirectlyVariable || canBeMovedDirectlyVariable))//if skip, stop call, then writeIsClosed() already call - writeThread.postOperation(); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] in skip, don't start postOperation"); - } -} - -void TransferThread::readChecksumFinish(const QByteArray& checksum) -{ - sourceChecksum=checksum; - compareChecksum(); -} - -void TransferThread::writeChecksumFinish(const QByteArray& checksum) -{ - destinationChecksum=checksum; - compareChecksum(); -} - -void TransferThread::compareChecksum() -{ - if(sourceChecksum.size()==0) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] the checksum of source is missing"); - return; - } - if(destinationChecksum.size()==0) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] the checksum of destination is missing"); - return; - } - if(sourceChecksum==destinationChecksum) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] the checksum match"); - readThread.postOperation(); - writeThread.postOperation(); - transfer_stat=TransferStat_PostTransfer; - emit pushStat(transfer_stat,transferId); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] the checksum not match")); - //emit error here, and wait to resume - emit errorOnFile(destination,tr("The checksums do not match").toStdString()); - } -} - -void TransferThread::readIsClosed() -{ - if(readIsClosedVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] double event dropped")); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - readIsClosedVariable=true; - readIsOpeningVariable=false; - checkIfAllIsClosedAndDoOperations(); -} - -void TransferThread::writeIsClosed() -{ - if(writeIsClosedVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] double event dropped"); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - writeIsClosedVariable=true; - writeIsOpeningVariable=false; - if(stopIt && needRemove && source.absoluteFilePath()!=destination.absoluteFilePath()) - { - if(source.exists()) - QFile(destination.absoluteFilePath()).remove(); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] try destroy the destination when the source don't exists")); - } - checkIfAllIsClosedAndDoOperations(); -} - -// return true if all is closed, and do some operations, don't use into condition to check if is closed! -bool TransferThread::checkIfAllIsClosedAndDoOperations() -{ - if((readError || writeError) && !needSkip && !stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] resolve error before progress"); - return false; - } - if(!remainFileOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit internalStartPostOperation() to do the real post operation"); - transfer_stat=TransferStat_PostOperation; - //emit pushStat(stat,transferId); - emit internalStartPostOperation(); - return true; - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+QStringLiteral("wait self close: readIsReadyVariable: %1, readIsClosedVariable: %2, writeIsReadyVariable: %3, writeIsClosedVariable: %4") - .arg(readIsReadyVariable) - .arg(readIsClosedVariable) - .arg(writeIsReadyVariable) - .arg(writeIsClosedVariable) - .toStdString() - ); - return false; - } -} - -/// \todo found way to retry that's -/// \todo the rights copy -void TransferThread::postOperation() -{ - if(transfer_stat!=TransferStat_PostOperation) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] need be in transfer, source: "+source.absoluteFilePath().toStdString()+", destination: "+destination.absoluteFilePath().toStdString()+", stat:"+std::to_string(transfer_stat)); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - //all except closing - if((readError || writeError) && !needSkip && !stopIt)//normally useless by checkIfAllIsFinish() - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] resume after error"); - return; - } - - if(!needSkip && !stopIt) - { - if(!canBeCopiedDirectlyVariable && !canBeMovedDirectlyVariable) - { - if(writeIsOpenVariable && !writeIsClosedVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't pass in post operation if write is not closed")); - emit errorOnFile(destination,tr("Internal error: The destination is not closed").toStdString()); - needSkip=false; - if(deletePartiallyTransferredFiles) - needRemove=true; - writeError=true; - return; - } - if(readThread.getLastGoodPosition()!=writeThread.getLastGoodPosition()) - { - writeThread.flushBuffer(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+QString("] readThread.getLastGoodPosition(%1)!=writeThread.getLastGoodPosition(%2)") - .arg(readThread.getLastGoodPosition()) - .arg(writeThread.getLastGoodPosition()) - .toStdString() - ); - emit errorOnFile(destination,tr("Internal error: The size transfered doesn't match").toStdString()); - needSkip=false; - if(deletePartiallyTransferredFiles) - needRemove=true; - writeError=true; - return; - } - if(!writeThread.bufferIsEmpty()) - { - writeThread.flushBuffer(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] buffer is not empty")); - emit errorOnFile(destination,tr("Internal error: The buffer is not empty").toStdString()); - needSkip=false; - if(deletePartiallyTransferredFiles) - needRemove=true; - writeError=true; - return; - } - //in normal mode, without copy/move syscall - if(!doFilePostOperation()) - return; - } - - //remove source in moving mode - if(mode==Ultracopier::Move && !canBeMovedDirectlyVariable) - { - if(destination.exists() && destination.isFile()) - { - QFile sourceFile(source.absoluteFilePath()); - if(!sourceFile.remove()) - { - needSkip=false; - emit errorOnFile(source,sourceFile.errorString().toStdString()); - return; - } - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] try remove source but destination not exists!")); - } - } - else//do difference skip a file and skip this error case - { - if(needRemove && destination.exists() && source.exists() && source.absoluteFilePath()!=destination.absoluteFilePath() && destination.isFile()) - { - QFile destinationFile(destination.absoluteFilePath()); - if(!destinationFile.remove()) - { - //emit errorOnFile(source,destinationFile.errorString()); - //return; - } - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] try remove destination but not exists!"); - } - source.setFile(QStringLiteral("")); - destination.setFile(QStringLiteral("")); - //don't need remove because have correctly finish (it's not in: have started) - needRemove=false; - needSkip=false; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit postOperationStopped()"); - transfer_stat=TransferStat_Idle; - emit postOperationStopped(); -} - -bool TransferThread::doFilePostOperation() -{ - //do operation needed by copy - //set the time if no write thread used - - destination.refresh(); - if(!destination.exists() && !destination.isSymLink()) - { - if(!stopIt) - if(/*true when the destination have been remove but not the symlink:*/!source.isSymLink()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date: File not found"); - emit errorOnFile(destination,tr("Unable to change the date").toStdString()+": "+tr("File not found").toStdString()); - return false; - } - } - else - { - if(doTheDateTransfer) - { - if(!writeFileDateTime(destination)) - { - if(!destination.isFile()) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date (is not a file)"); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date"); - /* error with virtual folder under windows */ - #ifndef Q_OS_WIN32 - if(keepDate) - { - emit errorOnFile(destination,tr("Unable to change the date").toStdString()); - return false; - } - #endif - } - else - { - #ifndef Q_OS_WIN32 - destination.refresh(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] read the destination time: "+destination.lastModified().toString().toStdString()); - if(destination.lastModified() recheck all, because can be an error into isSame(), rename(), ... - return; - } - //data streaming error - if(transfer_stat!=TransferStat_PostOperation && transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer && transfer_stat!=TransferStat_Checksum) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] is not in right stat, source: ")+source.absoluteFilePath().toStdString()+", destination: "+destination.absoluteFilePath().toStdString()+", stat: "+std::to_string(transfer_stat)); - return; - } - if(transfer_stat==TransferStat_PostOperation) - { - if(readError || writeError) - { - readError=false; - //writeError=false; - resumeTransferAfterWriteError(); - writeThread.flushBuffer(); - transfer_stat=TransferStat_PreOperation; - emit internalStartPreOperation(); - return; - } - emit internalStartPostOperation(); - return; - } - if(canBeMovedDirectlyVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] retry the system move"); - tryMoveDirectly(); - return; - } - if(canBeCopiedDirectlyVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] retry the copy directly"); - tryCopyDirectly(); - return; - } - if(transfer_stat==TransferStat_Checksum) - { - if(writeError) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start and resume the write error"); - writeThread.reopen(); - } - else if(readError) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start and resume the read error"); - readThread.reopen(); - } - else //only checksum difference - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] retry all the transfer"); - canStartTransfer=true; - ifCanStartTransfer(); - } - return; - } - //can have error on source and destination at the same time - if(writeError) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start and resume the write error: "+std::to_string(readError)); - if(readError) - readThread.reopen(); - else - { - readIsClosedVariable=false; - readThread.seekToZeroAndWait(); - } - writeThread.reopen(); - } - if(readError) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start and resume the read error"); - readThread.reopen(); - } - if(!writeError && !readError) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unknow error resume"); -} - -void TransferThread::writeThreadIsReopened() -{ - if(writeError_destination_reopened) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); - return; - } - writeError_destination_reopened=true; - if(transfer_stat==TransferStat_Checksum) - { - writeThread.startCheckSum(); - return; - } - if(writeError_source_seeked && writeError_destination_reopened) - resumeTransferAfterWriteError(); -} - -void TransferThread::readThreadIsSeekToZeroAndWait() -{ - if(writeError_source_seeked) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); - return; - } - writeError_source_seeked=true; - if(writeError_source_seeked && writeError_destination_reopened) - resumeTransferAfterWriteError(); -} - -void TransferThread::resumeTransferAfterWriteError() -{ - writeError=false; -/******************************** - if(canStartTransfer) - readThread.startRead(); -useless, because the open destination event -will restart the transfer as normal -*********************************/ -/********************************* -if(!canStartTransfer) - stat=WaitForTheTransfer; -useless because already do at open event -**********************************/ - //if is in wait - if(!canStartTransfer) - emit checkIfItCanBeResumed(); -} - -void TransferThread::readThreadResumeAfterError() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - readError=false; - writeIsReady(); - readIsReady(); -} - -////////////////////////////////////////////////////////////////// -///////////////////////// Normal event /////////////////////////// -////////////////////////////////////////////////////////////////// - -void TransferThread::readIsStopped() -{ - if(!sended_state_readStopped) - { - sended_state_readStopped=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit readIsStopped()"); - emit readStopped(); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] drop dual read stopped"); - return; - } - readIsFinish(); -} - -void TransferThread::writeIsStopped() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - if(!sended_state_writeStopped) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit writeStopped()"); - sended_state_writeStopped=true; - emit writeStopped(); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); - return; - } - writeIsFinish(); -} - -#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT -void TransferThread::timeOfTheBlockCopyFinished() -{ - readThread.timeOfTheBlockCopyFinished(); - writeThread.timeOfTheBlockCopyFinished(); -} -#endif - -bool TransferThread::setParallelBuffer(const int ¶llelBuffer) -{ - if(parallelBuffer<1 || parallelBuffer>ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] wrong parallelBuffer: "+std::to_string(parallelBuffer)); - return false; - } - else - { - this->parallelBuffer=parallelBuffer; - return true; - } -} - -bool TransferThread::setSequentialBuffer(const int &sequentialBuffer) -{ - if(sequentialBuffer<1 || sequentialBuffer>ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] wrong sequentialBuffer: "+std::to_string(sequentialBuffer)); - return false; - } - else - { - this->sequentialBuffer=sequentialBuffer; - return true; - } -} - -void TransferThread::setTransferAlgorithm(const TransferAlgorithm &transferAlgorithm) -{ - this->transferAlgorithm=transferAlgorithm; - if(transferAlgorithm==TransferAlgorithm_Sequential) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transferAlgorithm==TransferAlgorithm_Sequential"); - else if(transferAlgorithm==TransferAlgorithm_Automatic) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transferAlgorithm==TransferAlgorithm_Automatic"); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transferAlgorithm==TransferAlgorithm_Parallel"); -} - -//fonction to read the file date time -bool TransferThread::readFileDateTime(const QFileInfo &source) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileDateTime("+source.absoluteFilePath().toStdString()+")"); - if(source.lastModified()ftCreateL=ftCreate.dwLowDateTime; - this->ftCreateH=ftCreate.dwHighDateTime; - this->ftAccessL=ftAccess.dwLowDateTime; - this->ftAccessH=ftAccess.dwHighDateTime; - this->ftWriteL=ftWrite.dwLowDateTime; - this->ftWriteH=ftWrite.dwHighDateTime; - CloseHandle(hFileSouce); - return true; - #endif - #else - return false; - #endif - #endif - return false; -} - -bool TransferThread::writeFileDateTime(const QFileInfo &destination) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] writeFileDateTime("+destination.absoluteFilePath().toStdString()+")"); - /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ - #ifdef Q_OS_UNIX - #ifdef Q_OS_LINUX - return utime(destination.absoluteFilePath().toLatin1().data(),&butime)==0; - #else //mainly for mac - return utime(destination.absoluteFilePath().toLatin1().data(),&butime)==0; - #endif - #else - #ifdef Q_OS_WIN32 - #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - return utime(destination.toLatin1().data(),&butime)==0; - #else - wchar_t filePath[65535]; - if(std::regex_match(destination.absoluteFilePath().toStdString(),regRead)) - filePath[QDir::toNativeSeparators(QStringLiteral("\\\\?\\")+destination.absoluteFilePath()).toWCharArray(filePath)]=L'\0'; - else - filePath[QDir::toNativeSeparators(destination.absoluteFilePath()).toWCharArray(filePath)]=L'\0'; - HANDLE hFileDestination = CreateFileW(filePath, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - if(hFileDestination == INVALID_HANDLE_VALUE) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] open failed to write: "+QString::fromWCharArray(filePath).toStdString()+", error: "+std::to_string(GetLastError())); - return false; - } - FILETIME ftCreate, ftAccess, ftWrite; - ftCreate.dwLowDateTime=this->ftCreateL; - ftCreate.dwHighDateTime=this->ftCreateH; - ftAccess.dwLowDateTime=this->ftAccessL; - ftAccess.dwHighDateTime=this->ftAccessH; - ftWrite.dwLowDateTime=this->ftWriteL; - ftWrite.dwHighDateTime=this->ftWriteH; - if(!SetFileTime(hFileDestination, &ftCreate, &ftAccess, &ftWrite)) - { - CloseHandle(hFileDestination); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to set the file time"); - return false; - } - CloseHandle(hFileDestination); - return true; - #endif - #else - return false; - #endif - #endif - return false; -} - -bool TransferThread::readFilePermissions(const QFile &source) -{ - this->permissions=source.permissions(); - return true; -} - -bool TransferThread::writeFilePermissions(QFile &destination) -{ - return destination.setPermissions(this->permissions); -} - -//skip the copy -void TransferThread::skip() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start with stat: "+std::to_string(transfer_stat)); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readIsOpeningVariable: "+std::to_string(readIsOpeningVariable)+", readIsOpenVariable: "+std::to_string(readIsOpenVariable)+", readIsReadyVariable: "+std::to_string(readIsReadyVariable)+", readIsFinishVariable: "+std::to_string(readIsFinishVariable)+", readIsClosedVariable: "+std::to_string(readIsClosedVariable)); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] writeIsOpeningVariable: "+std::to_string(writeIsOpeningVariable)+", writeIsOpenVariable: "+std::to_string(writeIsOpenVariable)+", writeIsReadyVariable: "+std::to_string(writeIsReadyVariable)+", writeIsFinishVariable: "+std::to_string(writeIsFinishVariable)+", writeIsClosedVariable: "+std::to_string(writeIsClosedVariable)); - switch(transfer_stat) - { - case TransferStat_WaitForTheTransfer: - //needRemove=true;never put that's here, can product destruction of the file - case TransferStat_PreOperation: - if(needSkip) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); - return; - } - needSkip=true; - //check if all is source and destination is closed - if(remainFileOpen()) - { - if(remainSourceOpen()) - readThread.stop(); - if(remainDestinationOpen()) - writeThread.stop(); - } - else // wait nothing, just quit - { - transfer_stat=TransferStat_PostOperation; - emit internalStartPostOperation(); - } - break; - case TransferStat_Transfer: - case TransferStat_PostTransfer: - if(needSkip) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); - return; - } - //needRemove=true;never put that's here, can product destruction of the file - needSkip=true; - if(canBeMovedDirectlyVariable || canBeCopiedDirectlyVariable) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] Do the direct FS fake close, canBeMovedDirectlyVariable: "+std::to_string(canBeMovedDirectlyVariable)+", canBeCopiedDirectlyVariable: "+std::to_string(canBeCopiedDirectlyVariable)); - readThread.fakeReadIsStarted(); - writeThread.fakeWriteIsStarted(); - readThread.fakeReadIsStopped(); - writeThread.fakeWriteIsStopped(); - return; - } - writeThread.flushBuffer(); - if(remainFileOpen()) - { - if(remainSourceOpen()) - readThread.stop(); - if(remainDestinationOpen()) - writeThread.stop(); - } - else // wait nothing, just quit - { - transfer_stat=TransferStat_PostOperation; - emit internalStartPostOperation(); - } - break; - case TransferStat_Checksum: - if(needSkip) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); - return; - } - //needRemove=true;never put that's here, can product destruction of the file - needSkip=true; - if(remainFileOpen()) - { - if(remainSourceOpen()) - readThread.stop(); - if(remainDestinationOpen()) - writeThread.stop(); - } - else // wait nothing, just quit - { - transfer_stat=TransferStat_PostOperation; - emit internalStartPostOperation(); - } - break; - case TransferStat_PostOperation: - if(needSkip) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); - return; - } - //needRemove=true;never put that's here, can product destruction of the file - needSkip=true; - writeThread.flushBuffer(); - emit internalStartPostOperation(); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] can skip in this state: "+std::to_string(transfer_stat)); - return; - } -} - -//return info about the copied size -int64_t TransferThread::copiedSize() -{ - switch(transfer_stat) - { - case TransferStat_Transfer: - case TransferStat_PostOperation: - case TransferStat_PostTransfer: - return (readThread.getLastGoodPosition()+writeThread.getLastGoodPosition())/2; - case TransferStat_Checksum: - return transferSize; - default: - return 0; - } -} - -//retry after error -void TransferThread::putAtBottom() -{ - emit tryPutAtBottom(); -} - -#ifdef ULTRACOPIER_PLUGIN_RSYNC -/// \brief set rsync -void TransferThread::setRsync(const bool rsync) -{ - this->rsync=rsync; -} -#endif - -void TransferThread::set_osBufferLimit(const unsigned int &osBufferLimit) -{ - this->osBufferLimit=osBufferLimit; -} - -#ifdef ULTRACOPIER_PLUGIN_DEBUG -//to set the id -void TransferThread::setId(int id) -{ - this->id=id; - readThread.setId(id); - writeThread.setId(id); -} - -char TransferThread::readingLetter() const -{ - switch(readThread.stat) - { - case ReadThread::Idle: - return '_'; - break; - case ReadThread::InodeOperation: - return 'I'; - break; - case ReadThread::Read: - return 'R'; - break; - case ReadThread::WaitWritePipe: - return 'W'; - break; - case ReadThread::Checksum: - return 'S'; - break; - default: - return '?'; - } -} - -char TransferThread::writingLetter() const -{ - switch(writeThread.stat) - { - case WriteThread::Idle: - return '_'; - break; - case WriteThread::InodeOperation: - return 'I'; - break; - case WriteThread::Write: - return 'W'; - break; - case WriteThread::Close: - return 'C'; - break; - case WriteThread::Read: - return 'R'; - break; - case WriteThread::Checksum: - return 'S'; - break; - default: - return '?'; - } -} - -#endif - -void TransferThread::setMkpathTransfer(QSemaphore *mkpathTransfer) -{ - this->mkpathTransfer=mkpathTransfer; - writeThread.setMkpathTransfer(mkpathTransfer); -} - -void TransferThread::set_doChecksum(bool doChecksum) -{ - this->doChecksum=doChecksum; -} - -void TransferThread::set_checksumIgnoreIfImpossible(bool checksumIgnoreIfImpossible) -{ - this->checksumIgnoreIfImpossible=checksumIgnoreIfImpossible; -} - -void TransferThread::set_checksumOnlyOnError(bool checksumOnlyOnError) -{ - this->checksumOnlyOnError=checksumOnlyOnError; -} - -void TransferThread::set_osBuffer(bool osBuffer) -{ - this->osBuffer=osBuffer; -} - -void TransferThread::set_osBufferLimited(bool osBufferLimited) -{ - this->osBufferLimited=osBufferLimited; -} - -//not copied size, because that's count to the checksum, ... -uint64_t TransferThread::realByteTransfered() const -{ - switch(transfer_stat) - { - case TransferStat_Transfer: - case TransferStat_Checksum: - return (readThread.getLastGoodPosition()+writeThread.getLastGoodPosition())/2; - case TransferStat_PostTransfer: - return (readThread.getLastGoodPosition()+writeThread.getLastGoodPosition())/2; - case TransferStat_PostOperation: - return transferSize; - default: - return 0; - } -} - -//first is read, second is write -std::pair TransferThread::progression() const -{ - std::pair returnVar; - switch(transfer_stat) - { - case TransferStat_Transfer: - returnVar.first=readThread.getLastGoodPosition(); - returnVar.second=writeThread.getLastGoodPosition(); - /*if(returnVar.firstfirstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; -} - -void TransferThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) -{ - this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; -} - -void TransferThread::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) -{ - this->renameTheOriginalDestination=renameTheOriginalDestination; -} - -void TransferThread::set_updateMount() -{ - driveManagement.tryUpdate(); -} diff --git a/plugins/CopyEngine/Ultracopier/TransferThread.h b/plugins/CopyEngine/Ultracopier/TransferThread.h deleted file mode 100644 index fb64d6a..0000000 --- a/plugins/CopyEngine/Ultracopier/TransferThread.h +++ /dev/null @@ -1,292 +0,0 @@ -/** \file TransferThread.h -\brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef TRANSFERTHREAD_H -#define TRANSFERTHREAD_H - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_OS_UNIX - #include - #include - #include - #include -#else - #ifdef Q_OS_WIN32 - #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - #include - #include - #include - #include - #endif - #endif -#endif - -#include "ReadThread.h" -#include "WriteThread.h" -#include "Environment.h" -#include "DriveManagement.h" -#include "StructEnumDefinition_CopyEngine.h" - -/// \brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations -class TransferThread : public QThread -{ - Q_OBJECT -public: - explicit TransferThread(); - ~TransferThread(); - /// \brief get transfer stat - TransferStat getStat() const; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief to set the id - void setId(int id); - /// \brief get the reading letter - char readingLetter() const; - /// \brief get the writing letter - char writingLetter() const; - #endif - /// \brief to have semaphore, and try create just one by one - void setMkpathTransfer(QSemaphore *mkpathTransfer); - /// \brief to store the transfer id - uint64_t transferId; - /// \brief to store the transfer size - uint64_t transferSize; - bool haveStartTime; - QTime startTransferTime; - - void set_doChecksum(bool doChecksum); - void set_checksumIgnoreIfImpossible(bool checksumIgnoreIfImpossible); - void set_checksumOnlyOnError(bool checksumOnlyOnError); - void set_osBuffer(bool osBuffer); - void set_osBufferLimited(bool osBufferLimited); - - //not copied size, because that's count to the checksum, ... - uint64_t realByteTransfered() const; - std::pair progression() const; - static std::string resolvedName(const QFileInfo &inode); - std::string getSourcePath() const; - std::string getDestinationPath() const; - QFileInfo getSourceInode() const; - QFileInfo getDestinationInode() const; - Ultracopier::CopyMode getMode() const; -protected: - void run(); -signals: - //to send state - void preOperationStopped() const; - void checkIfItCanBeResumed() const; - //void transferStarted();//not sended (and not used then) - void readStopped() const; - void writeStopped() const; - void postOperationStopped() const; - //get dialog - void fileAlreadyExists(const QFileInfo &info,const QFileInfo &info2,const bool &isSame) const; - void errorOnFile(const QFileInfo &info,const std::string &string,const ErrorType &errorType=ErrorType_Normal) const; - //internal signal - void internalStartPostOperation() const; - void internalStartPreOperation() const; - void internalStartResumeAfterErrorAndSeek() const; - /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; - void tryPutAtBottom() const; - //force into the right thread - void internalTryStartTheTransfer() const; - /// \brief update the transfer stat - void pushStat(const TransferStat &stat,const uint64_t &pos) const; -public slots: - /// \brief to start the transfer of data - void startTheTransfer(); - /// \brief to set files to transfer - bool setFiles(const QFileInfo& source,const int64_t &size,const QFileInfo& destination,const Ultracopier::CopyMode &mode); - /// \brief to set file exists action to do - void setFileExistsAction(const FileExistsAction &action); - /// \brief to set the new name of the destination - void setFileRename(const std::string &nameForRename); - /// \brief to start the transfer of data - void setAlwaysFileExistsAction(const FileExistsAction &action); - /// \brief set the copy info and options before runing - void setRightTransfer(const bool doRightTransfer); - /// \brief set keep date - void setKeepDate(const bool keepDate); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - /// \brief set the current max speed in KB/s - void setMultiForBigSpeed(const int &maxSpeed); - #endif - /// \brief set block size in KB - bool setBlockSize(const unsigned int blockSize); - /// \brief pause the copy - void pause(); - /// \brief resume the copy - void resume(); - /// \brief stop the copy - void stop(); - /// \brief skip the copy - void skip(); - /// \brief retry after error - void retryAfterError(); - /// \brief return info about the copied size - int64_t copiedSize(); - /// \brief put the current file at bottom - void putAtBottom(); - - #ifdef ULTRACOPIER_PLUGIN_RSYNC - void setRsync(const bool rsync); - #endif - - void set_osBufferLimit(const unsigned int &osBufferLimit); - void setRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - //speed limitation - void timeOfTheBlockCopyFinished(); - #endif - - bool setParallelBuffer(const int ¶llelBuffer); - bool setSequentialBuffer(const int &sequentialBuffer); - void setTransferAlgorithm(const TransferAlgorithm &transferAlgorithm); - void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); - void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); - void set_updateMount(); -private slots: - void preOperation(); - void readIsReady(); - void writeIsReady(); - void readIsFinish(); - void writeIsFinish(); - void readIsClosed(); - void writeIsClosed(); - void postOperation(); - void getWriteError(); - void getReadError(); - void readChecksumFinish(const QByteArray&); - void writeChecksumFinish(const QByteArray&); - void compareChecksum(); - //void syncAfterErrorAndReadFinish(); - void readThreadIsSeekToZeroAndWait(); - void writeThreadIsReopened(); - void readThreadResumeAfterError(); - //to filter the emition of signal - void readIsStopped(); - void writeIsStopped(); - //force into the right thread - void internalStartTheTransfer(); -private: - enum MoveReturn - { - MoveReturn_skip=0, - MoveReturn_moved=1, - MoveReturn_error=2 - }; - TransferStat transfer_stat; - ReadThread readThread; - WriteThread writeThread; - /*QString source; - QString destination;*/ - Ultracopier::CopyMode mode; - bool doRightTransfer; - #ifdef ULTRACOPIER_PLUGIN_RSYNC - bool rsync; - #endif - bool keepDate; - //ready = open + ready to operation (no error to resolv) - bool readIsReadyVariable; - bool writeIsReadyVariable; - //can be open but with error - bool readIsOpeningVariable;//after call open() and before the end of internalOpen(), mostly to prevent internal error by open() when another is running - bool writeIsOpeningVariable;//after call open() and before the end of internalOpen(), mostly to prevent internal error by open() when another is running - bool readIsOpenVariable; - bool writeIsOpenVariable; - bool readIsFinishVariable; - bool writeIsFinishVariable; - bool readIsClosedVariable; - bool writeIsClosedVariable; - bool canBeMovedDirectlyVariable,canBeCopiedDirectlyVariable; - DriveManagement driveManagement; - QByteArray sourceChecksum,destinationChecksum; - volatile bool stopIt; - volatile bool canStartTransfer; - bool retry; - QFileInfo source; - QFileInfo destination; - int64_t size; - FileExistsAction fileExistsAction; - FileExistsAction alwaysDoFileExistsAction; - bool needSkip,needRemove; - QDateTime minTime; - int id; - QSemaphore *mkpathTransfer; - bool doChecksum,real_doChecksum; - bool checksumIgnoreIfImpossible; - bool checksumOnlyOnError; - bool deletePartiallyTransferredFiles; - bool osBuffer; - bool osBufferLimited; - unsigned int osBufferLimit; - std::string firstRenamingRule; - std::string otherRenamingRule; - //error management - bool writeError,writeError_source_seeked,writeError_destination_reopened; - bool readError; - bool renameTheOriginalDestination; - bool fileContentError; - bool doTheDateTransfer; - int parallelBuffer; - int sequentialBuffer; - int parallelizeIfSmallerThan; - std::regex renameRegex; - TransferAlgorithm transferAlgorithm; - #ifdef Q_OS_UNIX - utimbuf butime; - #else - #ifdef Q_OS_WIN32 - #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - utimbuf butime; - #else - uint32_t ftCreateL, ftAccessL, ftWriteL; - uint32_t ftCreateH, ftAccessH, ftWriteH; - std::regex regRead; - #endif - #endif - #endif - QFileDevice::Permissions permissions; - bool havePermission; - //different pre-operation - bool isSame(); - bool destinationExists(); - bool checkAlwaysRename();///< return true if has been renamed - bool canBeMovedDirectly() const; - bool canBeCopiedDirectly() const; - void tryMoveDirectly(); - void tryCopyDirectly(); - void ifCanStartTransfer(); - //fonction to edit the file date time - bool readFileDateTime(const QFileInfo &source); - bool writeFileDateTime(const QFileInfo &destination); - bool readFilePermissions(const QFile &source); - bool writeFilePermissions(QFile &destination); - void resetExtraVariable(); - //error management function - void resumeTransferAfterWriteError(); - //to send state - bool sended_state_preOperationStopped; - bool sended_state_readStopped; - bool sended_state_writeStopped; - //different post-operation - bool checkIfAllIsClosedAndDoOperations();// return true if all is closed, and do some operations, don't use into condition to check if is closed! - bool doFilePostOperation(); - //different pre-operation - void tryOpen(); - bool remainFileOpen() const; - bool remainSourceOpen() const; - bool remainDestinationOpen() const; -}; - -#endif // TRANSFERTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier/Variable.h b/plugins/CopyEngine/Ultracopier/Variable.h deleted file mode 100644 index 3311483..0000000 --- a/plugins/CopyEngine/Ultracopier/Variable.h +++ /dev/null @@ -1,45 +0,0 @@ -/** \file Variable.h -\brief Define the environment variable -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef VARIABLE_H -#define VARIABLE_H - -//Un-comment this next line to put ultracopier plugin in debug mode -#ifndef ULTRACOPIER_NODEBUG -#define ULTRACOPIER_PLUGIN_DEBUG -//#define ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER -#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW -#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW_TIMER 150 -#endif - -#define ULTRACOPIER_PLUGIN_MINTIMERINTERVAL 50 -#define ULTRACOPIER_PLUGIN_MAXTIMERINTERVAL 100 -#define ULTRACOPIER_PLUGIN_NUMSEMSPEEDMANAGEMENT 2 -#define ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER 1 -#define ULTRACOPIER_PLUGIN_MINIMALYEAR 1995 -#define ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE 256 //in KB -#define ULTRACOPIER_PLUGIN_DEFAULT_SEQUENTIAL_NUMBER_OF_BLOCK 512 -#define ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK 4 //in KB -#define ULTRACOPIER_PLUGIN_MAX_BLOCK_SIZE 16*1024 //in KB -#define ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK 2048 -#define ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK 128 //in KB - -//if set, check the inode type at scanFileOrFolder, deprecated into the new algorithm and not used -#define ULTRACOPIER_PLUGIN_CHECKLISTTYPE - -#define ULTRACOPIER_PLUGIN_SPEED_SUPPORT -//#define ULTRACOPIER_PLUGIN_RIGHTS - -/** \brief Need be greater than 2, but greater than 20 to be efficient */ -#define ULTRACOPIER_PLUGIN_TIME_UPDATE_TRASNFER_LIST 40 -#define ULTRACOPIER_PLUGIN_TIME_UPDATE_PROGRESSION 200 -#define ULTRACOPIER_PLUGIN_TIME_UPDATE_MOUNT_MS 60*1000 - -//#define ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY - -#endif // VARIABLE_H - - - diff --git a/plugins/CopyEngine/Ultracopier/WriteThread.cpp b/plugins/CopyEngine/Ultracopier/WriteThread.cpp deleted file mode 100644 index bbb35fa..0000000 --- a/plugins/CopyEngine/Ultracopier/WriteThread.cpp +++ /dev/null @@ -1,976 +0,0 @@ -#include "WriteThread.h" - -#ifdef Q_OS_LINUX -#include -#endif -#include - -QMultiHash WriteThread::writeFileList; -QMutex WriteThread::writeFileListMutex; - -WriteThread::WriteThread() -{ - deletePartiallyTransferredFiles = true; - lastGoodPosition = 0; - stopIt = false; - isOpen.release(); - moveToThread(this); - setObjectName(QStringLiteral("write")); - //this->mkpathTransfer = mkpathTransfer; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat = Idle; - #endif - numberOfBlock = ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; - buffer = false; - putInPause = false; - needRemoveTheFile = false; - blockSize = ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*1024; - start(); -} - -WriteThread::~WriteThread() -{ - stopIt=true; - needRemoveTheFile=true; - pauseMutex.release(); - writeFull.release(); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - waitNewClockForSpeed.release(); - waitNewClockForSpeed2.release(); - #endif - writeFull.release(); - pauseMutex.release(); - // useless because stopIt will close all thread, but if thread not runing run it - //endIsDetected(); - emit internalStartClose(); - isOpen.acquire(); - if(!file.fileName().isEmpty()) - resumeNotStarted(); - //disconnect(this);//-> do into ~TransferThread() - quit(); - wait(); -} - -void WriteThread::run() -{ - connect(this,&WriteThread::internalStartOpen, this,&WriteThread::internalOpen, Qt::QueuedConnection); - connect(this,&WriteThread::internalStartReopen, this,&WriteThread::internalReopen, Qt::QueuedConnection); - connect(this,&WriteThread::internalStartWrite, this,&WriteThread::internalWrite, Qt::QueuedConnection); - connect(this,&WriteThread::internalStartClose, this,&WriteThread::internalCloseSlot, Qt::QueuedConnection); - connect(this,&WriteThread::internalStartEndOfFile, this,&WriteThread::internalEndOfFile, Qt::QueuedConnection); - connect(this,&WriteThread::internalStartFlushAndSeekToZero, this,&WriteThread::internalFlushAndSeekToZero, Qt::QueuedConnection); - connect(this,&WriteThread::internalStartChecksum, this,&WriteThread::checkSum, Qt::QueuedConnection); - exec(); -} - -bool WriteThread::internalOpen() -{ - //do a bug - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] internalOpen destination: "+file.fileName().toStdString()); - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); - emit closed(); - return false; - } - if(file.isOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already open! destination: "+file.fileName().toStdString()); - return false; - } - if(file.fileName().isEmpty()) - { - errorString_internal=tr("Path resolution error (Empty path)").toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to open: %1, error: %2").arg(file.fileName()).arg(QString::fromStdString(errorString_internal)).toStdString()); - emit error(); - return false; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before the mutex"); - //set to LISTBLOCKSIZE - if(sequential) - { - while(writeFull.available()<1) - writeFull.release(); - if(writeFull.available()>1) - writeFull.acquire(writeFull.available()-1); - } - else - { - while(writeFull.available()numberOfBlock) - writeFull.acquire(writeFull.available()-numberOfBlock); - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the mutex"); - stopIt=false; - endDetected=false; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=InodeOperation; - #endif - //mkpath check if exists and return true if already exists - QFileInfo destinationInfo(file); - QDir destinationFolder; - { - mkpathTransfer->acquire(); - if(!destinationFolder.exists(destinationInfo.absolutePath())) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] Try create the path: "+ - destinationInfo.absolutePath().toStdString()); - if(!destinationFolder.mkpath(destinationInfo.absolutePath())) - { - if(!destinationFolder.exists(destinationInfo.absolutePath())) - { - /// \todo do real folder error here - errorString_internal="mkpath error on destination"; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable create the folder: %1, error: %2") - .arg(destinationInfo.absolutePath()) - .arg(QString::fromStdString(errorString_internal)) - .toStdString()); - emit error(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - mkpathTransfer->release(); - return false; - } - } - } - mkpathTransfer->release(); - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the mkpath"); - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); - emit closed(); - return false; - } - //try open it - QIODevice::OpenMode flags=QIODevice::ReadWrite; - if(!buffer) - flags|=QIODevice::Unbuffered; - { - QMutexLocker lock_mutex(&writeFileListMutex); - if(writeFileList.count(file.fileName(),this)==0) - { - writeFileList.insert(file.fileName(),this); - if(writeFileList.count(file.fileName())>1) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] in waiting because same file is found"); - return false; - } - } - } - bool fileWasExists=file.exists(); - if(file.open(flags)) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the open"); - { - QMutexLocker lock_mutex(&accessList); - if(!theBlockList.isEmpty()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] General file corruption detected"); - stopIt=true; - file.close(); - resumeNotStarted(); - file.setFileName(QStringLiteral("")); - return false; - } - } - pauseMutex.tryAcquire(pauseMutex.available()); - #ifdef Q_OS_LINUX - const int intfd=file.handle(); - if(intfd!=-1) - posix_fadvise(intfd, 0, 0, POSIX_FADV_SEQUENTIAL); - #endif - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the pause mutex"); - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); - file.close(); - resumeNotStarted(); - file.setFileName(QStringLiteral("")); - emit closed(); - return false; - } - if(!file.seek(0)) - { - file.close(); - resumeNotStarted(); - file.setFileName(QStringLiteral("")); - errorString_internal=file.errorString().toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to seek after open: %1, error: %2").arg(file.fileName()).arg(QString::fromStdString(errorString_internal)).toStdString()); - emit error(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - return false; - } - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); - file.close(); - resumeNotStarted(); - file.setFileName(QStringLiteral("")); - emit closed(); - return false; - } - if(!file.resize(startSize)) - { - file.close(); - resumeNotStarted(); - file.setFileName(QStringLiteral("")); - errorString_internal=file.errorString().toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to resize to %1 after open: %2, error: %3").arg(startSize).arg(file.fileName()).arg(QString::fromStdString(errorString_internal)).toStdString()); - emit error(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - return false; - } - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); - file.close(); - resumeNotStarted(); - file.setFileName(QStringLiteral("")); - emit closed(); - return false; - } - isOpen.acquire(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit opened()"); - emit opened(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - needRemoveTheFile=false; - postOperationRequested=false; - return true; - } - else - { - if(!fileWasExists && file.exists()) - if(!file.remove()) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file created but can't be removed"); - if(stopIt) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); - resumeNotStarted(); - file.setFileName(QStringLiteral("")); - emit closed(); - return false; - } - errorString_internal=file.errorString().toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to open: %1, error: %2").arg(file.fileName()).arg(QString::fromStdString(errorString_internal)).toStdString()); - emit error(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - return false; - } -} - -void WriteThread::open(const QFileInfo &file,const uint64_t &startSize,const bool &buffer,const int &numberOfBlock,const bool &sequential) -{ - if(!isRunning()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] the thread not running to open destination: "+file.absoluteFilePath().toStdString()+", numberOfBlock: "+std::to_string(numberOfBlock)); - errorString_internal=tr("Internal error, please report it!").toStdString(); - emit error(); - return; - } - if(this->file.isOpen()) - { - if(file.absoluteFilePath()==this->file.fileName()) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Try reopen already opened same file: "+file.absoluteFilePath().toStdString()); - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already open: "+file.absoluteFilePath().toStdString()); - emit internalStartClose(); - isOpen.acquire(); - isOpen.release(); - } - if(numberOfBlock<1 || (numberOfBlock>ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK && numberOfBlock>ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK)) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] numberOfBlock wrong, set to default"); - this->numberOfBlock=ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; - } - else - this->numberOfBlock=numberOfBlock; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+QStringLiteral("open destination: %1, sequential: %2").arg(file.absoluteFilePath()).arg(sequential).toStdString()); - stopIt=false; - fakeMode=false; - lastGoodPosition=0; - this->file.setFileName(file.absoluteFilePath()); - this->startSize=startSize; - this->buffer=buffer; - this->sequential=sequential; - endDetected=false; - writeFullBlocked=false; - emit internalStartOpen(); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - numberOfBlockCopied=0; - #endif -} - -void WriteThread::endIsDetected() -{ - if(endDetected) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); - return; - } - endDetected=true; - pauseMutex.release(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - emit internalStartEndOfFile(); -} - -std::string WriteThread::errorString() const -{ - return errorString_internal; -} - -void WriteThread::stop() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop()"); - needRemoveTheFile=true; - stopIt=true; - if(isOpen.available()>0) - return; - writeFull.release(); - pauseMutex.release(); - pauseMutex.release(); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - waitNewClockForSpeed.release(); - waitNewClockForSpeed2.release(); - #endif - // useless because stopIt will close all thread, but if thread not runing run it - endIsDetected(); - //for the stop for skip: void TransferThread::skip() - emit internalStartClose(); -} - -void WriteThread::flushBuffer() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - writeFull.release(); - writeFull.acquire(); - pauseMutex.release(); - { - QMutexLocker lock_mutex(&accessList); - theBlockList.clear(); - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop"); -} - -/// \brief buffer is empty -bool WriteThread::bufferIsEmpty() -{ - bool returnVal; - { - QMutexLocker lock_mutex(&accessList); - returnVal=theBlockList.isEmpty(); - } - return returnVal; -} - -void WriteThread::internalEndOfFile() -{ - if(!bufferIsEmpty()) - { - if(sequential) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start the write"); - emit internalStartWrite(); - } - else - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] buffer is not empty!"); - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] writeIsStopped"); - emit writeIsStopped(); - } -} - -#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT -/*! \brief Set the max speed -\param tempMaxSpeed Set the max speed in KB/s, 0 for no limit */ -void WriteThread::setMultiForBigSpeed(const int &multiForBigSpeed) -{ - this->multiForBigSpeed=multiForBigSpeed; - waitNewClockForSpeed.release(); - waitNewClockForSpeed2.release(); -} - -/// \brief For give timer every X ms -void WriteThread::timeOfTheBlockCopyFinished() -{ - /* this is the old way to limit the speed, it product blocking - *if(waitNewClockForSpeed.available()maxSpeed>0)*/ - if(waitNewClockForSpeed.available()<=1) - waitNewClockForSpeed.release(); - if(waitNewClockForSpeed2.available()<=1) - waitNewClockForSpeed2.release(); -} -#endif - -void WriteThread::resumeNotStarted() -{ - QMutexLocker lock_mutex(&writeFileListMutex); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - if(!writeFileList.contains(file.fileName())) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] file: \""+file.fileName().toStdString()+"\" for similar inode is not located into the list of "+std::to_string(writeFileList.size())+" items!"); - #endif - writeFileList.remove(file.fileName(),this); - if(writeFileList.contains(file.fileName())) - { - QList writeList=writeFileList.values(file.fileName()); - if(!writeList.isEmpty()) - writeList.first()->reemitStartOpen(); - return; - } -} - -void WriteThread::pause() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] try put read thread in pause"); - pauseMutex.tryAcquire(pauseMutex.available()); - putInPause=true; - return; -} - -void WriteThread::resume() -{ - if(putInPause) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - putInPause=false; - stopIt=false; - } - else - return; - if(!file.isOpen()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file is not open"); - return; - } - pauseMutex.release(); -} - -void WriteThread::reemitStartOpen() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] start"); - emit internalStartOpen(); -} - -void WriteThread::postOperation() -{ - if(postOperationRequested) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] double event dropped"); - return; - } - postOperationRequested=true; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - emit internalStartClose(); -} - -void WriteThread::internalCloseSlot() -{ - internalClose(); -} - -void WriteThread::internalClose(bool emitSignal) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close for file: "+file.fileName().toStdString()); - /// \note never send signal here, because it's called by the destructor - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Close; - #endif - bool emit_closed=false; - if(!fakeMode) - { - if(file.isOpen()) - { - if(!needRemoveTheFile) - { - if(startSize!=lastGoodPosition) - if(!file.resize(lastGoodPosition)) - { - if(emitSignal) - { - errorString_internal=file.errorString().toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to seek after open: %1, error: %2").arg(file.fileName()).arg(QString::fromStdString(errorString_internal)).toStdString()); - emit error(); - } - else - needRemoveTheFile=true; - } - } - file.close(); - if(needRemoveTheFile || stopIt) - { - if(deletePartiallyTransferredFiles) - { - if(!file.remove()) - if(emitSignal) - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unable to remove the destination file"); - } - } - //here and not after, because the transferThread don't need try close if not open - if(emitSignal) - emit_closed=true; - } - } - else - { - //here and not after, because the transferThread don't need try close if not open - - if(emitSignal) - emit_closed=true; - } - needRemoveTheFile=false; - resumeNotStarted(); - //warning: file.setFileName(""); need be after resumeNotStarted() - file.setFileName(QStringLiteral("")); - if(emit_closed) - emit closed(); - - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - - /// \note always the last of this function - if(!fakeMode) - isOpen.release(); -} - -void WriteThread::internalReopen() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - QString tempFile=file.fileName(); - internalClose(false); - flushBuffer(); - stopIt=false; - lastGoodPosition=0; - file.setFileName(tempFile); - if(internalOpen()) - emit reopened(); -} - -void WriteThread::reopen() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); - stopIt=true; - endDetected=false; - emit internalStartReopen(); -} - -#ifdef ULTRACOPIER_PLUGIN_DEBUG -//to set the id -void WriteThread::setId(int id) -{ - this->id=id; -} -#endif - -/// \brief do the fake open -void WriteThread::fakeOpen() -{ - fakeMode=true; - postOperationRequested=false; - emit opened(); -} - -/// \brief do the fake writeIsStarted -void WriteThread::fakeWriteIsStarted() -{ - emit writeIsStarted(); -} - -/// \brief do the fake writeIsStopped -void WriteThread::fakeWriteIsStopped() -{ - emit writeIsStopped(); -} - -/// do the checksum -void WriteThread::startCheckSum() -{ - emit internalStartChecksum(); -} - -/** \brief set block size -\param block the new block size in B -\return Return true if succes */ -bool WriteThread::setBlockSize(const int blockSize) -{ - //can be smaller than min block size to do correct speed limitation - if(blockSize>1 && blockSizeblockSize=blockSize; - return true; - } - else - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"block size out of range: "+std::to_string(blockSize)); - return false; - } -} - -/// \brief get the last good position -int64_t WriteThread::getLastGoodPosition() const -{ - return lastGoodPosition; -} - -void WriteThread::flushAndSeekToZero() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"flushAndSeekToZero: "+std::to_string(blockSize)); - stopIt=true; - emit internalStartFlushAndSeekToZero(); -} - - -void WriteThread::checkSum() -{ - //QByteArray blockArray; - QCryptographicHash hash(QCryptographicHash::Sha1); - endDetected=false; - lastGoodPosition=0; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - numberOfBlockCopied=0; - #endif - if(!file.seek(0)) - { - errorString_internal=file.errorString().toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to seek after open: %1, error: %2").arg(file.fileName()).arg(QString::fromStdString(errorString_internal)).toStdString()); - emit error(); - return; - } - int sizeReaden=0; - do - { - if(putInPause) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] write put in pause"); - if(stopIt) - return; - pauseMutex.acquire(); - if(stopIt) - return; - } - //read one block - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Read; - #endif - blockArray=file.read(blockSize); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - - if(file.error()!=QFile::NoError) - { - errorString_internal=tr("Unable to read the source file: ").toStdString()+file.errorString().toStdString()+" ("+std::to_string(file.error())+")"; - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("file.error()!=QFile::NoError: %1, error: %2").arg(QString::number(file.error())).arg(QString::fromStdString(errorString_internal)).toStdString()); - emit error(); - return; - } - sizeReaden=blockArray.size(); - if(sizeReaden>0) - { - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Checksum; - #endif - hash.addData(blockArray); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - - if(stopIt) - break; - - lastGoodPosition+=blockArray.size(); - } - } - while(sizeReaden>0 && !stopIt); - if(lastGoodPosition>(quint64)file.size()) - { - errorString_internal=tr("File truncated during read, possible data change").toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Source truncated during the read: %1 (%2)").arg(file.errorString()).arg(QString::number(file.error())).toStdString()); - emit error(); - return; - } - if(stopIt) - { -/* if(putInPause) - emit isInPause();*/ - stopIt=false; - return; - } - emit checksumFinish(hash.result()); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop the read"); -} - -void WriteThread::internalFlushAndSeekToZero() -{ - flushBuffer(); - if(!file.seek(0)) - { - errorString_internal=file.errorString().toStdString(); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Unable to seek after open: %1, error: %2").arg(file.fileName()).arg(QString::fromStdString(errorString_internal)).toStdString()); - emit error(); - return; - } - stopIt=false; - emit flushedAndSeekedToZero(); -} - -void WriteThread::setMkpathTransfer(QSemaphore *mkpathTransfer) -{ - this->mkpathTransfer=mkpathTransfer; -} - -void WriteThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) -{ - this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; -} - -bool WriteThread::write(const QByteArray &data) -{ - if(stopIt) - return false; - bool atMax; - if(sequential) - { - if(stopIt) - return false; - { - QMutexLocker lock_mutex(&accessList); - theBlockList.append(data); - atMax=(theBlockList.size()>=numberOfBlock); - } - if(atMax) - emit internalStartWrite(); - } - else - { - if(stopIt) - return false; - { - QMutexLocker lock_mutex(&accessList); - theBlockList.append(data); - atMax=(theBlockList.size()>=numberOfBlock); - } - emit internalStartWrite(); - } - if(atMax) - { - writeFullBlocked=true; - writeFull.acquire(); - writeFullBlocked=false; - } - if(stopIt) - return false; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - //wait for limitation speed if stop not query - if(multiForBigSpeed>0) - { - if(sequential) - { - numberOfBlockCopied++; - if(numberOfBlockCopied>=(multiForBigSpeed*2)) - { - numberOfBlockCopied=0; - waitNewClockForSpeed.acquire(); - } - } - else - { - numberOfBlockCopied2++; - if(numberOfBlockCopied2>=multiForBigSpeed) - { - numberOfBlockCopied2=0; - waitNewClockForSpeed2.acquire(); - } - } - } - #endif - if(stopIt) - return false; - return true; -} - -void WriteThread::internalWrite() -{ - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - if(sequential) - { - multiForBigSpeed=0; - QMutexLocker lock_mutex(&accessList); - if(theBlockList.size()0) - { - if(blockArray.size()==blockSize) - { - theBlockList.removeFirst(); - //if remove one block - if(!sequential) - writeFull.release(); - } - else - { - blockArray.clear(); - while(blockArray.size()!=blockSize) - { - //if larger - if(theBlockList.first().size()>blockSize) - { - blockArray+=theBlockList.first().mid(0,blockSize); - theBlockList.first().remove(0,blockSize); - if(!sequential) - { - //do write in loop to finish the actual block - emit internalStartWrite(); - } - break; - } - //if smaller - else - { - blockArray+=theBlockList.first(); - theBlockList.removeFirst(); - //if remove one block - if(!sequential) - writeFull.release(); - if(theBlockList.isEmpty()) - break; - } - } - } - //haveBlock=!blockArray.isEmpty(); - } - else - { - theBlockList.removeFirst(); - //if remove one block - if(!sequential) - writeFull.release(); - } - haveBlock=true; - } - } - if(stopIt) - return; - if(!haveBlock) - { - if(sequential) - { - if(endDetected) - internalEndOfFile(); - else - writeFull.release(); - return; - } - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] End detected of the file"); - return; - } - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - //wait for limitation speed if stop not query - if(multiForBigSpeed>0) - { - numberOfBlockCopied++; - if(sequential || (!sequential && writeFullBlocked)) - { - if(numberOfBlockCopied>=(multiForBigSpeed*2)) - { - numberOfBlockCopied=0; - waitNewClockForSpeed.acquire(); - if(stopIt) - break; - } - } - else - { - if(numberOfBlockCopied>=multiForBigSpeed) - { - numberOfBlockCopied=0; - waitNewClockForSpeed.acquire(); - if(stopIt) - break; - } - } - } - #endif - if(stopIt) - return; - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Write; - #endif - bytesWriten=file.write(blockArray); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - stat=Idle; - #endif - //mutex for stream this data - if(lastGoodPosition==0) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit writeIsStarted()"); - emit writeIsStarted(); - } - if(stopIt) - return; - if(file.error()!=QFile::NoError) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Error in writing: %1 (%2)").arg(file.errorString()).arg(file.error()).toStdString()); - errorString_internal=QStringLiteral("Error in writing: %1 (%2)").arg(file.errorString()).arg(file.error()).toStdString(); - stopIt=true; - emit error(); - return; - } - if(bytesWriten!=blockArray.size()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Error in writing, bytesWriten: %1, blockArray.size(): %2").arg(bytesWriten).arg(blockArray.size()).toStdString()); - errorString_internal=QStringLiteral("Error in writing, bytesWriten: %1, blockArray.size(): %2").arg(bytesWriten).arg(blockArray.size()).toStdString(); - stopIt=true; - emit error(); - return; - } - lastGoodPosition+=bytesWriten; - } while(sequential); -} diff --git a/plugins/CopyEngine/Ultracopier/WriteThread.h b/plugins/CopyEngine/Ultracopier/WriteThread.h deleted file mode 100644 index cadd022..0000000 --- a/plugins/CopyEngine/Ultracopier/WriteThread.h +++ /dev/null @@ -1,160 +0,0 @@ -/** \file WriteThread.h -\brief Thread changed to open/close and write the destination file -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef WRITETHREAD_H -#define WRITETHREAD_H - -#include -#include -#include -#include -#include -#include - -#include "Environment.h" -#include "StructEnumDefinition_CopyEngine.h" -#include "AvancedQFile.h" - -/// \brief Thread changed to open/close and write the destination file -class WriteThread : public QThread -{ - Q_OBJECT -public: - explicit WriteThread(); - ~WriteThread(); - /// \brief to have semaphore to do mkpath one by one - void setMkpathTransfer(QSemaphore *mkpathTransfer); -protected: - void run(); -public: - /// \brief open the destination to open it - void open(const QFileInfo &file,const uint64_t &startSize,const bool &buffer,const int &numberOfBlock,const bool &sequential); - /// \brief to return the error string - std::string errorString() const; - /// \brief to stop all - void stop(); - /// \brief to write data - bool write(const QByteArray &data); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief to set the id - void setId(int id); - /// \brief get the write stat - enum WriteStat - { - Idle=0, - InodeOperation=1, - Write=2, - Close=3, - Read=5, - Checksum=6 - }; - WriteStat stat; - #endif - /// \brief do the fake open - void fakeOpen(); - /// \brief do the fake writeIsStarted - void fakeWriteIsStarted(); - /// \brief do the fake writeIsStopped - void fakeWriteIsStopped(); - /// do the checksum - void startCheckSum(); - /// \brief set block size in KB - bool setBlockSize(const int blockSize); - /// \brief get the last good position - int64_t getLastGoodPosition() const; - /// \brief buffer is empty - bool bufferIsEmpty(); - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - /// \brief set the current max speed in KB/s - void setMultiForBigSpeed(const int &multiForBigSpeed); - #endif - void pause(); - void resume(); - void reemitStartOpen(); -public slots: - /// \brief start the operation - void postOperation(); - /// \brief flush buffer - void flushBuffer(); - /// \brief set the end is detected - void endIsDetected(); - /// \brief reopen the file - void reopen(); - /// \brief flush and seek to zero - void flushAndSeekToZero(); - /// do the checksum - void checkSum(); - void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); - /// \brief executed at regular interval to do a speed throling - void timeOfTheBlockCopyFinished(); - - void resumeNotStarted(); -signals: - void error() const; - void opened() const; - void reopened() const; - void writeIsStarted() const; - void writeIsStopped() const; - void flushedAndSeekedToZero() const; - void closed() const; - void checksumFinish(const QByteArray&) const; - //internal signals - void internalStartOpen() const; - void internalStartChecksum() const; - void internalStartReopen() const; - void internalStartWrite() const; - void internalStartClose() const; - void internalStartEndOfFile() const; - void internalStartFlushAndSeekToZero() const; - /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; -private: - std::string errorString_internal; - AvancedQFile file; - volatile bool stopIt; - volatile bool postOperationRequested; - volatile int blockSize;//only used in checksum - int numberOfBlock; - QMutex accessList; ///< For use the list - static QMultiHash writeFileList; - static QMutex writeFileListMutex; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - QSemaphore waitNewClockForSpeed,waitNewClockForSpeed2; - volatile int numberOfBlockCopied,numberOfBlockCopied2; ///< Multiple for count the number of block copied - volatile int multiplicatorForBigSpeed; ///< Multiple for count the number of block needed - volatile int MultiForBigSpeed; - #endif - QSemaphore writeFull; - volatile bool writeFullBlocked; - QSemaphore isOpen; - QSemaphore pauseMutex; - volatile bool putInPause; - QList theBlockList; ///< Store the block list - uint64_t lastGoodPosition; - QByteArray blockArray; ///< temp data for block writing, the data - int64_t bytesWriten; ///< temp data for block writing, the bytes writen - int id; - volatile bool endDetected; - uint64_t startSize; - QSemaphore *mkpathTransfer; - bool fakeMode; - bool buffer; - bool needRemoveTheFile; - volatile bool sequential; - bool deletePartiallyTransferredFiles; - #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT - volatile int multiForBigSpeed; ///< Multiple for count the number of block needed - #endif -private slots: - bool internalOpen(); - void internalWrite(); - void internalCloseSlot(); - void internalClose(bool emitSignal=true); - void internalReopen(); - void internalEndOfFile(); - void internalFlushAndSeekToZero(); -}; - -#endif // WRITETHREAD_H diff --git a/plugins/CopyEngine/Ultracopier/copyEngineOptions.ui b/plugins/CopyEngine/Ultracopier/copyEngineOptions.ui deleted file mode 100644 index 73e57f9..0000000 --- a/plugins/CopyEngine/Ultracopier/copyEngineOptions.ui +++ /dev/null @@ -1,771 +0,0 @@ - - - copyEngineOptions - - - - 0 - 0 - 801 - 504 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 3 - - - - - 0 - 0 - 791 - 349 - - - - Transfer - - - - - - - - - Move the whole folder - - - - - - - Transfer the file rights - - - - - - - - - - Keep the file date - - - - - - - - - - - - - Autostart the transfer - - - - - - - Less performance if checked - - - - - - - Qt::Vertical - - - - 20 - 278 - - - - - - - - Less performance if checked - - - Follow the strict order - - - - - - - Rsync - - - - - - - - - - - - 0 - 0 - 791 - 349 - - - - Error and collision - - - - - - When folder error - - - - - - - - - - When file error - - - - - - - - Ask - - - - - Skip - - - - - Put at the end - - - - - - - - When file collision - - - - - - - - Ask - - - - - Skip - - - - - Overwrite - - - - - Overwrite if different - - - - - Overwrite if newer - - - - - Overwrite if older - - - - - Rename - - - - - - - - - Ask - - - - - Skip - - - - - - - - When folder collision - - - - - - - - Ask - - - - - Merge - - - - - Skip - - - - - Rename - - - - - - - - Check if destination folder exists - - - - - - - Renaming rules - - - - - - - Qt::Vertical - - - - 20 - 193 - - - - - - - - Delete partially transferred files - - - - - - - - - - - - - Rename the original destination - - - - - label_12 - label_13 - label_6 - label_7 - label_8 - comboBoxFileError - comboBoxFileCollision - comboBoxFolderError - comboBoxFolderCollision - checkBoxDestinationFolderExists - renamingRules - label_20 - deletePartiallyTransferredFiles - renameTheOriginalDestination - label_22 - - - - - 0 - 0 - 791 - 349 - - - - Control - - - - - - Checksum - - - - - - - - - Only after error - - - - - - - Ignore if impossible - - - - - - - - - - true - - - - - - - Verify checksums - - - - - - - - - - Qt::Vertical - - - - 20 - 242 - - - - - - - - - - 0 - 0 - 791 - 349 - - - - Performance - - - - - - Parallel buffer - - - - - - - KB - - - 1 - - - 999999999 - - - - - - - KB - - - 1 - - - 65536 - - - - - - - KB - - - 1 - - - 999999999 - - - - - - - - - - Block size - - - - - - - Sequential buffer - - - - - - - Enable OS buffer - - - - - - - KB - - - 1 - - - 2048 - - - 512 - - - - - - - OS buffer only if smaller than - - - - - - - Transfer algorithm - - - - - - - - Automatic - - - - - Sequential - - - - - Parallel - - - - - - - - Qt::Vertical - - - - 20 - 197 - - - - - - - - Parallelize if smaller than - - - - - - - KB - - - 1024 - - - - - - - 1 - - - 32 - - - 16 - - - - - - - Inode threads (unsafe > 1) - - - - - - - More cpu, but better organisation on the disk - - - - - - - - - - More cpu, but better organisation on the disk - - - Order the list - - - - - - - - - 0 - 0 - 791 - 349 - - - - Misc - - - - - - Check the disk space - - - - - - - - - - Use this folder when destination is not set - - - - - - - - - - - - Browse - - - - - - - - - Qt::Horizontal - - - - 353 - 20 - - - - - - - - Filters - - - - - - - Qt::Horizontal - - - - 352 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 159 - - - - - - - - - - - - - - doChecksum - clicked(bool) - label_9 - setEnabled(bool) - - - 583 - 136 - - - 109 - 161 - - - - - doChecksum - clicked(bool) - checksumOnlyOnError - setEnabled(bool) - - - 594 - 136 - - - 586 - 161 - - - - - doChecksum - clicked(bool) - label_10 - setEnabled(bool) - - - 641 - 136 - - - 132 - 186 - - - - - doChecksum - clicked(bool) - checksumIgnoreIfImpossible - setEnabled(bool) - - - 665 - 136 - - - 609 - 186 - - - - - diff --git a/plugins/CopyEngine/Ultracopier/copyEngineResources.qrc b/plugins/CopyEngine/Ultracopier/copyEngineResources.qrc deleted file mode 100644 index 0228c74..0000000 --- a/plugins/CopyEngine/Ultracopier/copyEngineResources.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - resources/add.png - resources/edit.png - resources/remove.png - resources/filter.png - - diff --git a/plugins/CopyEngine/Ultracopier/debugDialog.ui b/plugins/CopyEngine/Ultracopier/debugDialog.ui deleted file mode 100644 index 80fde7e..0000000 --- a/plugins/CopyEngine/Ultracopier/debugDialog.ui +++ /dev/null @@ -1,98 +0,0 @@ - - - debugDialog - - - - 665 - 392 - - - - Monitor - - - - - - - - Transfer thread - - - - - - true - - - - - - - - - - Transfer list - - - - - - true - - - - - - - - - - - - Variables - - - - - - Active transfer: - - - - - - - true - - - 9999 - - - - - - - Number of inode manipuled: - - - - - - - true - - - 9999 - - - - - - - - - - - diff --git a/plugins/CopyEngine/Ultracopier/documentation.dox b/plugins/CopyEngine/Ultracopier/documentation.dox deleted file mode 100644 index 5a0fbf6..0000000 --- a/plugins/CopyEngine/Ultracopier/documentation.dox +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- mode: C++ ; c-file-style: "stroustrup" -*- **/ - -/* - This file contains NO source code, just some documentation for doxygen to - parse. -*/ - -/*! - \mainpage Copy engine - - \section mainpage_overview Overview - - The default copy engine for Ultracopier. Support file/folder, copy/move, ...\n - More informations on the wiki of ultracopier. - - \section mainpage_platforms Platforms - - This plugin might be usable in all environments where you find Qt 5, but Gcc is requiered for some part. You need qtsystem modules for QtSystemInfo\n - This plugin requires Qt 5.0 or newer. Tested on Qt 5.0.\n - - \section mainpage_downloads Downloads - - You can find the link on Ultracopier project page, via git, snapshot sources, ... - - \section mainpage_algorithm Algorithm - - Like say previously you will have more informations on the wiki.\n - Then file transfer is done via pipe mecamism system:\n -
    -
  • push at no blocking into table up to the table is full, after is blocked up to one entry is free
  • -
  • Other thread read the table up to have no more data, then is blocked
  • -
- The transfer thread do listing of the folder, removing folder, make folder is one thread for each.\n - The transfer list, have thread pool to do the inode operation (open, close, set date, ...). Do all inode operation in parallele, but transfer the data as sequential. - - \section license GPL Version 3 - The code source is under GPL3. The image is extacted from Oxygen icon pack of KDE4. - -*/ diff --git a/plugins/CopyEngine/Ultracopier/fileErrorDialog.ui b/plugins/CopyEngine/Ultracopier/fileErrorDialog.ui deleted file mode 100644 index b603924..0000000 --- a/plugins/CopyEngine/Ultracopier/fileErrorDialog.ui +++ /dev/null @@ -1,264 +0,0 @@ - - - fileErrorDialog - - - - 0 - 0 - 723 - 185 - - - - Error with file - - - - - - Error - - - - - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QFormLayout::ExpandingFieldsGrow - - - - - false - - - Size - - - - - - - 0 KiB - - - - - - - false - - - Modified - - - - - - - Today - - - - - - - false - - - File name - - - - - - - source.txt - - - - - - - false - - - Destination - - - - - - - ../toto.txt - - - - - - - false - - - Folder - - - - - - - /folder/ - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - &Always perform this action - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Try in with elevated privileges - - - - - - - Put to bottom - - - - - - - Retry - - - - - - - &Skip - - - - - - - &Cancel - - - - - - - - - - - checkBoxAlways - toggled(bool) - Cancel - setDisabled(bool) - - - 112 - 131 - - - 438 - 142 - - - - - checkBoxAlways - toggled(bool) - Retry - setDisabled(bool) - - - 155 - 131 - - - 309 - 134 - - - - - diff --git a/plugins/CopyEngine/Ultracopier/fileExistsDialog.ui b/plugins/CopyEngine/Ultracopier/fileExistsDialog.ui deleted file mode 100644 index 0c38a57..0000000 --- a/plugins/CopyEngine/Ultracopier/fileExistsDialog.ui +++ /dev/null @@ -1,412 +0,0 @@ - - - fileExistsDialog - - - - 0 - 0 - 469 - 162 - - - - The file exists - - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Source - - - Qt::AlignCenter - - - - - - - - 75 - true - - - - Destination - - - Qt::AlignCenter - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - false - - - Size - - - - - - - 0 KiB - - - - - - - false - - - Modified - - - - - - - Today - - - - - - - false - - - File name - - - - - - - source.txt - - - - - - - false - - - Folder - - - - - - - /source/ - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QFormLayout::ExpandingFieldsGrow - - - - - false - - - Size - - - - - - - 0 KiB - - - - - - - false - - - Modified - - - - - - - Today - - - - - - - false - - - File name - - - - - - - destination.txt - - - - - - - false - - - Folder - - - - - - - /destination/ - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - - - - - Suggest new &name - - - - - - - - - - - &Always perform this action - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - &Rename - - - - - - - &Overwrite - - - QToolButton::MenuButtonPopup - - - - - - - &Skip - - - - - - - &Cancel - - - - - - - - - Overwrite if newer - - - - - Overwrite if modification date differs - - - Overwrite if modification date differs - - - - - Overwrite if older - - - Overwrite if older - - - - - - - checkBoxAlways - toggled(bool) - Cancel - setDisabled(bool) - - - 115 - 130 - - - 440 - 129 - - - - - checkBoxAlways - toggled(bool) - lineEditNewName - setDisabled(bool) - - - 62 - 129 - - - 108 - 93 - - - - - checkBoxAlways - toggled(bool) - SuggestNewName - setDisabled(bool) - - - 144 - 138 - - - 326 - 98 - - - - - diff --git a/plugins/CopyEngine/Ultracopier/fileIsSameDialog.ui b/plugins/CopyEngine/Ultracopier/fileIsSameDialog.ui deleted file mode 100644 index c019a63..0000000 --- a/plugins/CopyEngine/Ultracopier/fileIsSameDialog.ui +++ /dev/null @@ -1,214 +0,0 @@ - - - fileIsSameDialog - - - - 0 - 0 - 411 - 142 - - - - The source and destination are same - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - false - - - Size - - - - - - - 0 KiB - - - Qt::PlainText - - - - - - - Today - - - Qt::PlainText - - - - - - - false - - - File name - - - - - - - source.txt - - - Qt::PlainText - - - - - - - false - - - Folder - - - - - - - /toto/ - - - Qt::PlainText - - - - - - - false - - - Modified - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - - - - - Suggest new &name - - - - - - - - - - - &Always perform this action - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - &Rename - - - - - - - &Skip - - - - - - - &Cancel - - - - - - - - - - diff --git a/plugins/CopyEngine/Ultracopier/folderExistsDialog.ui b/plugins/CopyEngine/Ultracopier/folderExistsDialog.ui deleted file mode 100644 index 440b5ca..0000000 --- a/plugins/CopyEngine/Ultracopier/folderExistsDialog.ui +++ /dev/null @@ -1,309 +0,0 @@ - - - folderExistsDialog - - - - 0 - 0 - 476 - 140 - - - - The source and destination is identical - - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Source - - - Qt::AlignCenter - - - - - - - - 75 - true - - - - Destination - - - Qt::AlignCenter - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - false - - - Modified - - - - - - - Today - - - - - - - false - - - Folder name - - - - - - - folder - - - - - - - false - - - Folder - - - - - - - /source/ - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - false - - - Modified - - - - - - - false - - - Folder name - - - - - - - Today - - - - - - - folder - - - - - - - false - - - Folder - - - - - - - /destination/ - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - - - - - Suggest new &name - - - - - - - - - - - &Always perform this action - - - - - - - &Rename - - - - - - - Merge - - - - - - - Skip - - - - - - - &Cancel - - - - - - - - - - - checkBoxAlways - clicked(bool) - lineEditNewName - setDisabled(bool) - - - 132 - 126 - - - 135 - 101 - - - - - checkBoxAlways - clicked(bool) - SuggestNewName - setDisabled(bool) - - - 113 - 129 - - - 304 - 100 - - - - - diff --git a/plugins/CopyEngine/Ultracopier/informations.xml b/plugins/CopyEngine/Ultracopier/informations.xml deleted file mode 100644 index fcb8c8f..0000000 --- a/plugins/CopyEngine/Ultracopier/informations.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - <![CDATA[Copy engine of Ultracopier]]> - <![CDATA[Moteur de copie d'ultracopier]]> - - CopyEngine - - - - - - - 1287496800 - - windows-x86 - - - - - 1.6.1.3 - - Ultracopier - - - \ No newline at end of file diff --git a/plugins/CopyEngine/Ultracopier/plugin.json b/plugins/CopyEngine/Ultracopier/plugin.json deleted file mode 100644 index 9e26dfe..0000000 --- a/plugins/CopyEngine/Ultracopier/plugin.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/plugins/CopyEngine/Ultracopier/resources/add.png b/plugins/CopyEngine/Ultracopier/resources/add.png deleted file mode 100644 index 7932127..0000000 Binary files a/plugins/CopyEngine/Ultracopier/resources/add.png and /dev/null differ diff --git a/plugins/CopyEngine/Ultracopier/resources/edit.png b/plugins/CopyEngine/Ultracopier/resources/edit.png deleted file mode 100644 index 5464856..0000000 Binary files a/plugins/CopyEngine/Ultracopier/resources/edit.png and /dev/null differ diff --git a/plugins/CopyEngine/Ultracopier/resources/filter.png b/plugins/CopyEngine/Ultracopier/resources/filter.png deleted file mode 100644 index 9bb3164..0000000 Binary files a/plugins/CopyEngine/Ultracopier/resources/filter.png and /dev/null differ diff --git a/plugins/CopyEngine/Ultracopier/resources/remove.png b/plugins/CopyEngine/Ultracopier/resources/remove.png deleted file mode 100644 index b711740..0000000 Binary files a/plugins/CopyEngine/Ultracopier/resources/remove.png and /dev/null differ diff --git a/plugins/Languages/README.md b/plugins/Languages/README.md old mode 100644 new mode 100755 diff --git a/plugins/Languages/ar/flag.png b/plugins/Languages/ar/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/ar/informations.xml b/plugins/Languages/ar/informations.xml index 6879db6..e259ae8 100644 --- a/plugins/Languages/ar/informations.xml +++ b/plugins/Languages/ar/informations.xml @@ -4,7 +4,7 @@ Languages - + ]]> @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 ar @@ -29,4 +29,4 @@ - \ No newline at end of file + diff --git a/plugins/Languages/ar/translation.qm b/plugins/Languages/ar/translation.qm new file mode 100755 index 0000000..0910e40 Binary files /dev/null and b/plugins/Languages/ar/translation.qm differ diff --git a/plugins/Languages/ar/translation.ts b/plugins/Languages/ar/translation.ts index cb636cf..643ccaa 100644 --- a/plugins/Languages/ar/translation.ts +++ b/plugins/Languages/ar/translation.ts @@ -1,41 +1,6 @@ - - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - + CliParser @@ -45,189 +10,174 @@ Warning - + التحذير Problem reading file, or file size is 0 - + مشكلة في قراءة الملف ، أو حجم الملف هو 0 The arguments possible are: - + الحجج الممكنة هي: To display the options - + لعرض الخيارات To quit the other instances (if running) - + (لإنهاء المثيلات الأخرى (في حالة التشغيل To copy sources to destination, separated by space. If destination is "?", ultracopier will ask the user - + سوف يسأل المستخدم ultracopier لنسخ المصادر إلى الوجهة ، مفصولة بمسافة. إذا كانت الوجهة "؟" ، To move sources to destination, separated by space. If destination is "?", ultracopier will ask the user - + سوف يسأل المستخدم ultracopier لنقل المصادر إلى الوجهة ، مفصولة بمسافة. إذا كانت الوجهة "؟" ، Command not valid - + الامر غير صالح This file is not supported transfer list - + هذا الملف غير معتمد قائمة النقل Ultracopier is already running, right click on its system tray icon (near the clock) to use it or just copy and paste - + Ultracopier تستخدمها أو مجرد نسخ ولصق قيد التشغيل بالفعل ، انقر فوق الزر الأيمن على أيقونة صينية النظام (بالقرب من الساعة) Ultracopier is already running, view all notification area icons (near the clock), right click on its system tray icon to use it or just copy and paste - + قيد التشغيل بالفعل، عرض كل الايقونات في منطقه الاعلام (بالقرب من الساعة) ، انقر بزر الماوس الأيمن على ايقونة علبه نظامك لاستخدامه أو مجرد نسخ ولصق Ultracopier Unable to open the transfer list file - + غير قادر على فتح ملف قائمه النقل To display this help - + لعرض هذه التعليمات Open transfer list - + فتح قائمه النقل Help - + التعليمات CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + الوجهه - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - + اسال - - - - + + + + Skip - + تخطي - + Merge - - + + Rename - + اعاده تسميه - + Put at the end - + Overwrite - + الكتابة فوق - + Overwrite if different - + Overwrite if newer - + الكتابة فوق إذا كان أحدث - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - - Ask + + Supported only on Windows - - - - + + + + + Ask + اسال + + + + + + Skip - + تخطي - + Merge - - + + Rename - + اعاده تسميه - + Put at the end - + Overwrite - + الكتابة فوق - + Overwrite if different - + Overwrite if newer - + الكتابة فوق إذا كان أحدث - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,145 +261,145 @@ CopyEngineManager - - - - + + + + Warning - + التحذير - + Cannot find any copy engine with move support - + لا يمكن العثور على اي مشغل نسخ مع دعم النقل - + This copy engine does not support move - + لا يدعم محرك النسخ هذا النقل - + Cannot find any compatible engine! - + لا يمكن العثور على اي محرك متوافق! - + Cannot find any engine with this name: %1 - + يتعذر العثور على اي محرك بهذا الاسم: %1 CopyListener - + Error - + الخطا - + Error during the reception of the copy/move list %1 - + حدث خطا اثناء استقبال قائمه النسخ/النقل %1 Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - + الخطا - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + غير قادر على الحصول على مثيل محرك النسخ - + Group window - + اطار المجموعة - + Do you want group the transfer with another actual running transfer? - + هل تريد تجميع التحويل مع نقل تشغيل فعلي اخر ؟ - + Unable to get a engine instance - + غير قادر علي الحصول على مثيل محرك - + The argument for the mode is not valid - + الوسيطة الخاصة بالوضع غير صالح - + Do you want to copy? If no, it will be moved. - + هل تريد النسخ ؟ إذا لا ، سيتم نقله. - - + + Unable to load the interface, copy aborted - + غير قادر على تحميل الواجهة ، تم إحباط النسخ - + Unable to load the copy engine, copy aborted - + غير قادر على تحميل مشغل النسخ ، تم إحباط النسخ - + Transfer mode - + وضع النقل DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,270 +407,275 @@ FacilityEngine - + Copy engine - + محرك النسخ - + Copy a copy - + نسخ - + Move a move - + نقل - + Pause - + مهلة - + Resume - + استئناف - - + + Skip - + تخطي - + Unlimited - + غير محدود - + s - + s - + Too big - + كبير جدا - + B - + ب - + KB - + ك ب - + MB - + م ب - + GB - + ق ب - + TB - + ت ب - + PB - + PB - + EB - + EB - + ZB - + ZB - + YB - + YB - + Less than %10 seconds - + اقل من %10 ثواني - + About %10 seconds remaining - + حوالي %10 ثواني متبقية - + About %1 minutes remaining - + حوالي %1 دقيقه متبقية - + About %1 hours remaining - + حوالي %1 ساعة متبقية - + Transfer a transfer - + نقل - + Start - + بدء - + Source - + مصدر - + Size - + حجم - + Destination - + الوجهه - + Quit - + هروب - + Target - + الهدف - - + + Time remaining: - + الوقت المتبقي: - + Listing - + الادراج - + Copying - + النسخ - + Listing and copying - + الادراج والنسخ - + + Remaining: + المتبقيه: + + + Ask - + اسال - + Overwrite - + الكتابة فوق - + Overwrite if newer - + الكتابة فوق إذا كان أحدث - + Overwrite if the last modification dates are different - + الكتابة فوق إذا كانت تواريخ التعديل الاخيره مختلفه - + Rename - + اعاده تسميه - + Put to the end of the list - + وضعت في نهاية القائمة - + Select source directory - + تحديد دليل المصدر - + Select destination directory - + تحديد دليل الوجهة - + Internal error - + خطا داخلي - + Select one or more files to open - + تحديد ملف واحد أو أكثر للفتح - + All files - + كافة الملفات - + Save transfer list - + حفظ قائمه النقل - + Open transfer list - + فتح قائمه النقل - + Transfer list - + قائمه النقل - + Error - + الخطا - + Not supported on this platform - + غير معتمد علي هذا النظام الأساسي - + Completed in %1 - + اكتمل في %1 FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + الخطا - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + الخطا - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + الخطا - + Try rename with using special characters @@ -951,161 +896,156 @@ HelpDialog - + About Ultracopier - + حول Ultracopier Based on Qt. Advanced utility to copy files under GPL3 license. This version is compiled as version: %1. %1 will be replaced by a variable content (normal, debug, ...) - + استنادا إلى الاداه المساعدة المتقدمة Qt لنسخ الملفات تحت ترخيص GPL3. يتم تجميع هذا الإصدار كاصدار: %1. Platform: %1 %1 will be replaced by the platform (windows, mac, linux, ...) - + النظام الأساسي: %1 Author: BRULE Herman Jacques Roger (alpha_one_x86), company: <a href="http://www.confiared.com/">confiared</a> - + Author: BRULE Herman Jacques Roger (alpha_one_x86), company: <a href="http://www.confiared.com/">confiared</a> - + About Qt - + Qt حول - + Check update - + تحقق من التحديث - + Do a crash - + هل تحطم - + Save bug report - + حفظ تقرير الشوائب - + Close - - - - - About Supercopier - + اغلاق - + For http://portableapps.com/ - + For http://portableapps.com/ - + Portable and all in one version - + المحمولة و الكل في نسخه واحده - + Portable version - + النسخة المحمولة - + All in one version - + الكل في إصدار واحد - + Normal version - + الإصدار العادي - + http://ultracopier.first-world.info/ - + http://ultracopier.first-world.info/ - + Update checking... - + تم التحقق من التحديث... - + Update: %1 - + التحديث: %1 - + No update - + لا يوجد تحديث - + http://ultracopier.first-world.info/download.html - + http://ultracopier.first-world.info/download.html <html><head/><body><p>For more information see the website <a href="%1"><span style=" text-decoration: underline; color:#0057ae;">%1</span></a></p></body></html> %1 will be remplaced by the website into the corresponding languages - + <a href="%1"><span style=" text-decoration: underline; color:#0057ae;">%1</span></a></p></body></html>لمزيد من المعلومات راجع الموقع<html><head/><body><p> ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,14 +1061,14 @@ This version is compiled as version: %1. LocalListener - + Warning - + التحذير - + Timeout while recomposing data from connected clients - + المهلة اثناء أعاده إنشاء البيانات من العملاء المتصلين @@ -1138,95 +1078,111 @@ This version is compiled as version: %1. Error - + الخطا Log file already open, error: %1 - + ملف السجل مفتوح بالفعل ، خطا: %1 Unable to open the log file, error: %1 - + تعذر فتح ملف السجل ، الخطا: %1 MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific Warning - + التحذير - + + Classic + كلاسيكي + + + + Modern + حديث + + + Don't show again - + لا تظهر مرة أخرى - + Ok - + موافق - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. - + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. + ما عليك القيام به نسخة / نقل يدويا.<br />اطلب من مطور مدير ملفاتك دعمه.<br />(Dolphin, Nautilus, ...) لا يدعم مدير الملفات استبدال نظام النسخ/النقل الافتراضي. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + أعد تشغيل النظام إذا كان قد سبق تثبيت برنامج مماثل (مثل Teracopy أو Supercopier أو إصدار سابق من Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + ما عليك القيام بنسخ / نقل يدويا عن طريق النقر بزر الماوس الأيمن على أيقونة صينية النظام بالقرب من الساعة (وليس رمز الإرساء).Mac OS X.<br /> استبدال نظام النسخ / النقل الافتراضي غير مدعوم وممنوع من قبل الباحث عن.. - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + ما عليك القيام به نسخ/نقل يدويا.<br />اطلب من المطور دعمه.<br />يجب ألا يكون استبدال نظام النسخ/النقل الافتراضي مدعوما بواسطة مدير الملفات. - + Consider Supercopier as deprecated, prefer Ultracopier - + Ultracopier كما تم إهمالها ، تفضل Supercopier يعتبر @@ -1235,302 +1191,325 @@ This version is compiled as version: %1. Options - + الخيارات General - + عام Plugins - + الاضافات - - + + Copy engine - + محرك النسخ - + Themes - + المواضيع + المواضيع Log - + سجل Confirm to group the windows - + تأكيد لتجميع النوافذ Check for updates - + التحقق من التحديثات Portable (need restart) - + محمولة (تحتاج إلى إعادة التشغيل) - + Name - + الاسم - + Version - + الإصدار - + Language - + اللغة - - + + Listener - + مستمع - - + + Plugin loader - + محمل المساعد - - + + Session loader - + محمل الجلسة Force the language - + إجبار اللغة Replace the default copy and move system - + استبدال نظام النسخ والنقل الافتراضي Load at the session loading - + تحميل في الجلسة التحميل When manual open - + عندما يفتح يدوي + عند فتحة يدوي Group the windows when - + مجموعة النوافذ عندما Display the OS warning - + عرض تحذير نظام التشغيل Remaining time algorithm - + خوارزمية الوقت المتبقي Traditional - + تقليدي + التقليديه + + + + Logarithmic + لوغاريتمي + + + + default: finish.opus + finish.opus :الافتراضي - - Logarithmic + + Play - + + Sound when finish + الصوت عند الانتهاء + + + Plugin - + المساعد - + Add - + اضافة - + Remove - + ازالة - + Information - + المعلومات - + Copy engine by order of preference: - + محرك النسخ حسب ترتيب التفضيل: - + Client connected - + العميل متصل - + Themes: - + المواضيع: + المواضيع: - + Unable to load the themes plugin - + غير قادر على تحميل البرنامج المساعد للسمات + غير قادر على تحميل الموضوعات المساعد - + Browse - + استعراض - + Write the transfers - + اكتب التحويلات - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + المتغيرات هي %الوقت%، %المصدر%، %الحجم%، %الوجهة% - + Write the errors - + كتابة الأخطاء - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + المتغيرات هي %الوقت%، %المسار%، %الحجم%، %وقت تعديل%، %خطأ% - + Write the log file into: - + اكتب ملف السجل في: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - + الكتابة مباشرة إلى الملف عند تلقي إدخال جديد (يمكن أن تنتج 50٪ من فقدان الأداء) - - + + Load - + حمل - + Load the theme? - + تحميل الموضوع؟ - + Load the language? - + تحميل اللغة؟ - + Do nothing - + لا تفعل شيئا - + Ask source as folder - + اسأل المصدر كمجلد - + Ask sources as files - + اسأل المصادر كملفات - + Never - + أبدا - + When source is same - + عندما يكون المصدر هو نفسه + عندما يكون المصدر هو نفسه - + When destination is same - + عندما الوجهة هي نفسها + عندما تكون الوجهة نفسها - + When source and destination are same - + عندما المصدر والوجهة هي نفسها + عندما تكون المصدر والوجهة هي نفسها - + When source or destination are same - + عندما المصدر أو الوجهة هي نفسها - + Always - + دائما - - - + + + The variables are %1 - + %1 المتغيرات هي - + Save logs as: - + حفظ السجلات باسم: - + Synchronized log - + سجل متزامن - + No option for this plugin - + لا يوجد خيار لهذا البرنامج المساعد - + Write the folder operations - + كتابة مجلد العمليات - + The variables are %path%, %operation% %path%, %operation% should not be translated - + المتغيرات هي %المسار%، %العملية% @@ -1541,7 +1520,7 @@ This version is compiled as version: %1. The variable was not found: %1 %2 - + لم يتم العثور على المتغير: %1 %2 @@ -1567,87 +1546,87 @@ This version is compiled as version: %1. About this plugin - + حول هذا المكون المساعد Name: - + الاسم: Category: - + الفئه: Author: - + المؤلف: Date: - + تاريخ: Description: - + وصف: Version: - + الإصدار: Copy engine - + محرك نسخ Languages - + اللغات Listener - + مستمع Plugin loader - + محمل المساعد Session loader - + محمل الجلسة Themes - + المواضيع Unknown - + مجهول Information about %1 - + معلومات حول %1 Website: - + الموقع: Title: - + العنوان: @@ -1655,140 +1634,140 @@ This version is compiled as version: %1. informations.xml is not accessible - + المعلومات xml لا يمكن الوصول إلى - + Dependencies part is wrong - + التبعيات جزء غير صحيح - + Dependencies %1 are not satisfied, for plugin: %2 - + التبعيات %1 غير راضيه ، للمكون المساعد: %2 - + Remove %1 - + أزاله %1 - + Error - + الخطا - + Error while the removing plugin, please check the rights on the folder: %1 - + خطا اثناء أزاله المكون المساعد ، الرجاء التحقق من الحقوق الموجودة على المجلد: %1 - + Information - + المعلومات %1, parse error at line %2, column %3: %4 - + %1 ، خطا في التحليل في السطر %2 ، العمود %3: %4 informations.xml not found for the plugin - + للمكون المساعد xml لم يتم العثور على المعلومات "package" root tag not found for the xml file - + xml "حزمه " علامة الجذر لم يتم العثور على ملف - + Duplicated plugin found, already loaded! - + تم العثور على المساعد المكرر ، محمله بالفعل! - + English text missing in the informations.xml for the tag: %1 - + نص باللغة الانجليزيه مفقود في المعلومات. xml للعلامة: %1 - + Tag not found: %1 - + لم يعثر على العلامة: %1 - + Are you sure about removing "%1" in version %2? - + هل تريد بالتاكيد أزاله "%1 " في الإصدار %2 ؟ - + Previous import is in progress... - + الاستيراد السابق قيد التقدم... - + Open Ultracopier plugin - + Ultracopier فتح مساعد - + Ultracopier plugin (*.urc) - - - - - - - - - - - - - + Ultracopier plugin (*.urc) + + + + + + + + + + + + Plugin loader - + محمل المساعد - + Unable to open the plugin: %1 - + غير قادر على فتح المكون المساعد: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + غير قادر على تحميل محتوي المكون المساعد ، الرجاء التحقق منه: %1 - + Unable to create a folder to install the plugin: %1 - + غير قادر على إنشاء مجلد لتثبيت المكون المساعد: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + غير قادر على إنشاء ملف لتثبيت المكون المساعد: %1 منذ: %2 - + Folder with same name is present, skip the plugin installation: %1 - + المجلد الذي له نفس الاسم موجود ، تخطي تثبيت المكون المساعد: %1 - - - + + + Unable to load the plugin content, please check it - + غير قادر علي تحميل محتوي المكون المساعد ، يرجى التحقق من ذلك @@ -1797,17 +1776,17 @@ since:%2 Product key - + مفتاح المنتج Error - + الخطا Your product key was rejected.<br />If you buy key, unmark check your spam and unmark the mail as spam<br />If you have not buy your key, go to <a href="https://shop.first-world.info/">https://shop.first-world.info/</a> - + <a href="https://shop.first-world.info/">https://shop.first-world.info/</a>إذا لم تشتري مفتاحك ، انتقل إلى <br />إذا قمت بشراء المفتاح ، قم بإلغاء تحديد بريدك المزعج وإلغاء وضع علامة للبريد على انه غير مرغوب <br />تم رفض مفتاح منتجك @@ -1816,66 +1795,59 @@ since:%2 Memory allocation failed - + فشل تخصيص الذاكرة Write error - + خطا في الكتابة Memory usage limit reached - + تم الوصول إلى حد استخدام الذاكرة Not a .xz file - + ليس ملف. xz Unsupported options in the .xz headers - + الخيارات الغير مدعومة في العناوين xz الرأسية The file is corrupted - + تلف الملف Bug! - + شوائب! The input data is too short - + بيانات الإدخال قصيرة جدا ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,267 +1855,240 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + لم يتم العثور علي وحده إصغاء للنسخ. قم بالنسخ يدويا بالنقر بزر الماوس الأيمن فوق أحد أيقونه علبه النظام. - + Information - + المعلومات - + Searching information... - + البحث عن المعلومات... - + Do not replace the explorer copy/move - + لا تستبدل نسخ/تحريك المستكشف - + Semi replace the explorer copy/move - + نصف استبدال المستكشف نسخه/تحريك - + Replace the explorer copy/move - + استبدال نسخ/تحريك المستكشف - + Warning - + التحذير - + The action on the systray icon is unknown! - + الاجراء على رمز علبه الانظمه مجهول! - + &About/Debug report - + &حول/تقرير التصحيح - + &About - + &حول - + &Save bug report - + &حفظ تقرير الشوائب - + &Quit - + &هروب - + &Options - + &الخيارات - + &Product key - + &مفتاح المنتج - + New version: %1 - + الإصدار الجديد: %1 - + Go to the download page: - + انتقل إلى صفحه التنزيل: - + A&dd copy/moving - + &أضافه نسخ/نقل - + Add &copy - + &أضافه نسخ - + Add &transfer - + &أضافه نقل - + Add &move - + &أضافه تحريك Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2121,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + نقل - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer - + + + MB + م ب - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + استعراض - + Filters @@ -2500,67 +2365,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + الخطا - + Size - + حجم - + Modified - + File name - + Destination - + الوجهه - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2433,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + مصدر - + Destination - + الوجهه - - + + Size - + حجم - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - + الكتابة فوق إذا كان أحدث - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + حجم - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2587,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + مصدر - + Destination - + الوجهه - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + تخطي - + &Cancel @@ -2818,7 +2695,7 @@ since:%2 Transfer list - + قائمه النقل @@ -2879,7 +2756,7 @@ since:%2 Error - + الخطا @@ -2889,12 +2766,12 @@ since:%2 Source - + مصدر Destination - + الوجهه diff --git a/plugins/Languages/de/informations.xml b/plugins/Languages/de/informations.xml index e86acd0..383d74b 100644 --- a/plugins/Languages/de/informations.xml +++ b/plugins/Languages/de/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 de diff --git a/plugins/Languages/de/translation.qm b/plugins/Languages/de/translation.qm new file mode 100755 index 0000000..86fa5d4 Binary files /dev/null and b/plugins/Languages/de/translation.qm differ diff --git a/plugins/Languages/de/translation.ts b/plugins/Languages/de/translation.ts index 1ccf680..557591d 100644 --- a/plugins/Languages/de/translation.ts +++ b/plugins/Languages/de/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - Auf dieser Plattform nicht unterstützt - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -68,13 +33,13 @@ To copy sources to destination, separated by space. If destination is "?", ultracopier will ask the user - + Um die Quelle zum Ziel zu kopieren, getrennt durch ein Leerzeichen. Wenn das Ziel lautet "?", wird Ultracopier den Benutzer fragen To move sources to destination, separated by space. If destination is "?", ultracopier will ask the user - + Um die Quelle zum Ziel zu verschieben, getrennt durch ein Leerzeichen. Wenn das Ziel lautet "?", wird Ultracopier den Benutzer fragen @@ -85,17 +50,17 @@ This file is not supported transfer list The original english text does not make sense. - Diese Datei wird nicht unterstützt Transferliste + Diese Datei ist eine nicht unterstützt Transferliste Ultracopier is already running, right click on its system tray icon (near the clock) to use it or just copy and paste - + Ultracopier läuft bereits, Rechtklick auf das TrayIcon um weitere Details zu sehen. Sie können aber auch gleich ohen Weiteres kopieren und verschieben Ultracopier is already running, view all notification area icons (near the clock), right click on its system tray icon to use it or just copy and paste - + Ultracopier läuft bereits, Beachten Sie alle Benachrichtigungen, Rechtsklick auf das TrayIcon um mehr Details zu erhalten, oder Sie können auch einfach ohne Weiteres kopieren oder verschieben @@ -129,106 +94,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination Ziel - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask Fragen - - - - + + + + Skip Überspringen - + Merge - - + + Rename Umbenennen - + Put at the end - + Overwrite Überschreiben - + Overwrite if different - + Overwrite if newer Überschreiben, falls neuer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -236,85 +186,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask Fragen - - - - + + + + Skip Überspringen - + Merge - - + + Rename Umbenennen - + Put at the end - + Overwrite Überschreiben - + Overwrite if different - + Overwrite if newer Überschreiben, falls neuer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -322,30 +262,30 @@ CopyEngineManager - - - - + + + + Warning Warnung - + Cannot find any copy engine with move support - + Die Kopier-Engine mit Verschiebungsunterstützung wurde nicht gefunden - + This copy engine does not support move - + Diese Engine unterstützt kein Verschieben - + Cannot find any compatible engine! Finde keine kompatible Engine! - + Cannot find any engine with this name: %1 Finde keine Engine mit diesem Namen: %1 @@ -353,12 +293,12 @@ CopyListener - + Error Fehler - + Error during the reception of the copy/move list %1 Fehler während Empfang der Kopier/Verschieben-Liste @@ -368,72 +308,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error Fehler - - - - - - - - + + + + + + + + Unable to get a copy engine instance - Bekomme keine Instanz der Kopier-Engine + Laden einer Instanz der Kopier-Engine nicht möglich - + Group window - + Fenster gruppieren - + Do you want group the transfer with another actual running transfer? - + Wollen Sie den aktuellen Transfer mit einem anderen laufenden Transfer gruppieren? - + Unable to get a engine instance - Bekomme keine Instanz der Engine + Laden einer Instanz der Engine nicht möglich - + The argument for the mode is not valid Die Parameter sind in diesem Modus ungültig - + Do you want to copy? If no, it will be moved. - Möchten Sie kopieren? Wenn nicht, wird verschoben. + Möchten Sie kopieren? Wenn nicht, werden die Dateien verschoben. - - + + Unable to load the interface, copy aborted - Konnte Oberfläche nicht laden. Kopiervorgang abgebrochen + Oberfläche konnte nicht geladen werden. Kopiervorgang abgebrochen - + Unable to load the copy engine, copy aborted - Konnte Kopier-Engine nicht laden. Kopiervorgang abgebrochen + Kopier-Engine konnte nicht geladen werden. Kopiervorgang abgebrochen - + Transfer mode Transfermodus @@ -441,27 +381,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -469,282 +409,287 @@ FacilityEngine - + Copy engine Kopier-Engine - + Copy a copy Kopieren - + Move a move Verschieben - + Pause Pause - + Resume Fortsetzen - - + + Skip Überspringen - + Unlimited Unbegrenzt - + s seconds? s - + Too big Zu groß - + B Byte? B - + KB Kilobyte KB - + MB Megabyte MB - + GB Gigabyte GB - + TB Terrabyte TB - + PB Petabyte PB - + EB Etabyte EB - + ZB Zetabyte ZB - + YB Yotabyte YB - + Less than %10 seconds Weniger als %10 Sekunden - + About %10 seconds remaining Ungefähr noch %10 Sekunden - + About %1 minutes remaining Ungefähr noch %1 Minuten - + About %1 hours remaining Ungefähr noch %1 Stunden - + Transfer a transfer evtl. "Datenübertragung", aber ich denke "Transfer" ist hier besser Transfer - + Start Start - + Source Quelle - + Size Größe - + Destination Ziel - + Quit Beenden - + Target Ziel - - + + Time remaining: Verbleibende Zeit: - + Listing Auflistung - + Copying - Kopieren + Kopiere - + Listing and copying not sure... depends on context Auflistung und Kopiervorgang - + + Remaining: + Verbleibend: + + + Ask Fragen - + Overwrite Überschreiben - + Overwrite if newer Überschreiben, falls neuer - + Overwrite if the last modification dates are different - Überschreiben, falls die letzten Änderungsdaten unterschiedlich sind + Überschreiben, falls letztes Änderungsdatum unterschiedlich ist - + Rename Umbenennen - + Put to the end of the list Ans Ende der Liste verschieben - + Completed in %1 Fertig in %1 - + Select source directory Wählen Sie das Quellverzeichnis - + Select destination directory Wählen Sie das Zielverzeichnis - + Internal error Interner Fehler - + Select one or more files to open Wählen Sie eine oder mehrere Dateien zum Öffnen - + All files Alle Dateien - + Save transfer list Transferliste speichern - + Open transfer list Transferliste öffnen - + Transfer list Transferliste - + Error Fehler - + Not supported on this platform - Auf dieser Plattform nicht unterstützt + Wird auf dieser Plattform nicht unterstützt FileErrorDialog - + Error on folder - + Folder name @@ -752,22 +697,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error Fehler - + Try rename with using special characters @@ -775,22 +720,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Fehler - + Try rename with using special characters @@ -798,77 +743,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -876,60 +821,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -937,27 +882,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Fehler - + Try rename with using special characters @@ -965,7 +910,7 @@ HelpDialog - + About Ultracopier Über Ultracopier @@ -974,7 +919,7 @@ Based on Qt. Advanced utility to copy files under GPL3 license. This version is compiled as version: %1. %1 will be replaced by a variable content (normal, debug, ...) - Basiert auf Qt. Erweitertes Tool um Dateien zu kopieren (Lizenz: GPLv3). + Basiert auf Qt. Fortgeschrittenes Tool um Dateien zu kopieren (Lizenz: GPLv3). Diese Version wurde kompiliert als Version: %1. @@ -986,86 +931,81 @@ Diese Version wurde kompiliert als Version: %1. Author: BRULE Herman Jacques Roger (alpha_one_x86), company: <a href="http://www.confiared.com/">confiared</a> - + Autor: BRULE Herman Jacques Roger (alpha_one_x86), Unternehmen: <a href="http://www.confiared.com/">confiared</a> - + About Qt Über Qt - + Check update - + Überprüfe auf Updates - + Do a crash Clumsy... depends on context Absturz ausführen - + Save bug report Fehlerbericht speichern - + Close Schließen - - About Supercopier - - - - + For http://portableapps.com/ Zu http://portableapps.com/ - + Portable and all in one version Portable und "Alles-in-Einem" Version - + Portable version Portable Version - + All in one version "Alles-in-Einem" Version - + Normal version Normale Version - + http://ultracopier.first-world.info/ http://ultracopier-de.first-world.info/ - + Update checking... - + Überprüfe Updates... - + Update: %1 - + Update: %1 - + No update - + Kein Update verfügbar - + http://ultracopier.first-world.info/download.html http://ultracopier.first-world.info/download.html @@ -1079,49 +1019,49 @@ Diese Version wurde kompiliert als Version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1137,14 +1077,14 @@ Diese Version wurde kompiliert als Version: %1. LocalListener - + Warning Warnung - + Timeout while recomposing data from connected clients - Timeout beim Zusammenfügen der Daten von verbundenen Clients + Zeitüberschreitung beim Zusammenfügen der Daten von verbundenen Clients @@ -1171,36 +1111,42 @@ Diese Version wurde kompiliert als Version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1210,39 +1156,49 @@ Diese Version wurde kompiliert als Version: %1. Warnung - + + Classic + Klassisch + + + + Modern + Modern + + + Don't show again Nicht mehr anzeigen - + Ok OK - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. - Das Ersetzen des Standard Kopier/Verschieben-Systems wird von diesem Datei-Manager nicht unterstützt.<br />Bitten Sie die Entwickler darum es zu supporten. <br />Sie müssen das Kopieren/Verschieben daher manuell durchführen. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. + Das Ersetzen des Standard Kopiersystems wird von diesem File-Manager nicht unterstützt (Dolphin, Nautilus, ...).<br />Bitten Sie die Entwickler um Hilfe. <br />Sie müssen den Vorgang bis dahin bitte manuell durchführen. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - System neustarten, Falls vorher ähnliche Software instaliert war (wie Teracopy, Supercopier oder ältere Version von Ultracopier). + Starten Sie das System bitte neu falls vorher eine ähnliche Software instaliert war (Teracopy, Supercopier oder ältere Version von Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - Das Ersetzen des Standard Kopier/Verschieben-Systems wird vom Mac OS X Finder nicht unterstützt und somit verhindert.<br />Sie müssen das Kopieren/Verschieben daher manuell durchführen. + Das Ersetzen des Standard Kopiersystems wird vom Mac OS X Finder nicht unterstützt und somit verhindert.<br />Sie müssen den Vorgang bis dahin bitte manuell durchführen. - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - Das Ersetzen des Standard Kopier/Verschieben-Systems wird von diesem File-Manager nicht unterstützt.<br />Bitten Sie die Entwickler darum es zu supporten. <br />Sie müssen das Kopieren/Verschieben daher manuell durchführen. + Das Ersetzen des Standard Kopiersystems wird von diesem File-Manager nicht unterstützt.<br />Bitten Sie die Entwickler um Hilfe. <br />Sie müssen den Vorgang bis dahin bitte manuell durchführen. - + Consider Supercopier as deprecated, prefer Ultracopier - + Supercopier ist die veraltete Lösung, bevorzugen Sie Ultracopier @@ -1265,16 +1221,16 @@ Diese Version wurde kompiliert als Version: %1. - - + + Copy engine Kopier-Engine - + Themes - Themes + Design @@ -1289,53 +1245,53 @@ Diese Version wurde kompiliert als Version: %1. Check for updates - Nach Updates suchen + Automatisch nach Updates suchen Portable (need restart) - + Portabel machen (Benötigt Neustart) - + Name Name - + Version Version - + Language Sprache - - + + Listener Listener - - + + Plugin loader Plugin loader - - + + Session loader Session loader Force the language - Sprache wählen + Sprache vorgeben @@ -1345,7 +1301,7 @@ Diese Version wurde kompiliert als Version: %1. Load at the session loading - Mit OS laden + Mit Betriebssystem laden @@ -1355,195 +1311,210 @@ Diese Version wurde kompiliert als Version: %1. Group the windows when - Fenster gruppieren + Fenster gruppieren wenn Display the OS warning - OS Warnungen anzeigen + Betriebssytem Warnungen anzeigen Remaining time algorithm - + Algorithmus für verbleibende Zeit Traditional - + Traditionell Logarithmic + Logarithmisch + + + + default: finish.opus + Standard: finish.opus + + + + Play - + + Sound when finish + Tonausgabe wenn fertig + + + Plugin Plugin - + Add Hinzufügen - + Remove Entfernen - + Information Information - + Copy engine by order of preference: - Kopier-Engine in Reihenfolge ihrer Präferenz: + Kopier-Engine in Reihenfolge Ihrer Präferenz: - + Client connected Client verbunden - + Themes: - Themes: + Desings: - + Unable to load the themes plugin - Konnte das Themes-Plugin nicht laden + Konnte das Design-Plugin nicht laden - + Browse Durchsuchen - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated Die Variablen sind %time%, %source%, %size%, %destination% - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated Die Variablen sind %time%, %path%, %size%, %mtime%, %error% - + Write the log file into: Log in folgende Datei schreiben: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) Schreibe direkt in die Datei, wenn ein neuer Eintrag erreicht wird (50% Leistungsverlust möglich) - - + + Load Laden - + Load the theme? - Theme laden? + Dieses Theme laden? - + Load the language? - Sprache laden? + Diese Sprache laden? - + Do nothing - Nichts tun + Nichts unternehmen - + Ask source as folder Nach Quell-Ordner fragen - + Ask sources as files Nach Quell-Datei fragen - + Never Nie - + When source is same Falls Quelle gleich ist - + When destination is same Falls Ziel gleich ist - + When source and destination are same Falls Quelle und Ziel gleich sind - + When source or destination are same Falls Quelle oder Ziel gleich sind - + Always Immer - - - + + + The variables are %1 Die Variablen sind %1 - + Save logs as: Protokolle speichern als: - + Synchronized log Synchronisiertes Protokoll - + No option for this plugin Keine Option für dieses Plugin - + Write the transfers - Protokolliere Transfers: + Protokolliere Transfers - + Write the errors Protokolliere Fehler: - + Write the folder operations - Protokolliere Ordner-Operationen: + Protokolliere Ordner-Operationen - + The variables are %path%, %operation% %path%, %operation% should not be translated Die Variablen sind %path% %operation% @@ -1643,12 +1614,12 @@ Diese Version wurde kompiliert als Version: %1. Themes - Themes + Designs Unknown - + Unbekannt @@ -1674,36 +1645,37 @@ Diese Version wurde kompiliert als Version: %1. Auf "informations.xml" kann nicht zugegriffen werden - + Dependencies part is wrong clumsy. Abhängigkeiten-Teil ist falsch - + Dependencies %1 are not satisfied, for plugin: %2 Die Abhängigkeiten "%1" sind nicht erfüllt für Plugin:%2 - + Remove %1 Entferne %1 - + Error Fehler - + Error while the removing plugin, please check the rights on the folder: %1 - + Fehler beim Entfernen des Plugins, bitte überprüfen Sie die nötigen Rechte für den Ordner: +%1 - + Information - Information + Informationen @@ -1721,75 +1693,75 @@ Diese Version wurde kompiliert als Version: %1. "package" Root-Tag für die XML-Datei nicht gefunden - + Duplicated plugin found, already loaded! Plugin-Duplikat gefunden. Bereits geladen! - + English text missing in the informations.xml for the tag: %1 Englischer Text fehlt in "informations.xml" für das Tag: %1 - + Tag not found: %1 XML-Tag nicht gefunden: %1 - + Are you sure about removing "%1" in version %2? Sind Sie sicher, dass Sie "%1" in der Version %2 entfernen wollen? - + Previous import is in progress... Vorheriger Import wird durchgeführt... - + Open Ultracopier plugin Ultracopier Plugin öffnen - + Ultracopier plugin (*.urc) Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader Plugin-Loader - + Unable to open the plugin: %1 Kann das Plugin nicht öffnen: %1 - - - + + + Unable to load the plugin content, please check it: %1 - Kann Plugin-Inhalte nicht laden. Bitte überprüfen Sie das: %1 + Kann Plugin-Inhalte nicht laden. Bitte überprüfen: %1 - + Unable to create a folder to install the plugin: %1 Kann keinen Ordner erstellen um das Plugin %1 zu installieren - + Unable to create a file to install the plugin: %1 since:%2 @@ -1798,18 +1770,18 @@ since:%2 seit: %2 - + Folder with same name is present, skip the plugin installation: %1 Ordner mit demselben Namen existiert bereits. Überspringen Sie die Plugin-Installation: %1 - - - + + + Unable to load the plugin content, please check it - Kann Plugin-Inhalte nicht laden. Bitte überprüfen Sie das + Kann Plugin-Inhalte nicht laden. Bitte überprüfen @@ -1818,17 +1790,17 @@ seit: %2 Product key - + Produktschlüssel Error - Fehler + Fehler Your product key was rejected.<br />If you buy key, unmark check your spam and unmark the mail as spam<br />If you have not buy your key, go to <a href="https://shop.first-world.info/">https://shop.first-world.info/</a> - + Ihr Produktschlüssel wurde verweigert. <br /> Wenn Sie einen Schlüssel gekauft haben, überprüfen Sie auch Ihren Spam-Ordner. <br />Wenn Sie noch keinen Schlüssel erworben haben gehen Sie bitte auf <a href="https://shop.first-world.info/">https://shop.first-world.info/</a> @@ -1848,7 +1820,7 @@ seit: %2 Memory usage limit reached - Grenze des Speicherverbrauchs erreicht + Grenze des verbauten Arbeitsspeicher erreicht @@ -1868,7 +1840,7 @@ seit: %2 Bug! - Bug! + Fehler! @@ -1879,24 +1851,17 @@ seit: %2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1904,267 +1869,240 @@ seit: %2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - Keine Kopie-Listener gefunden. Führen Sie die Kopie manuell durch Rechtsklick auf das Symbol im Systray aus. + Keine Kopie-Listener gefunden. Führen Sie die Kopie manuell durch Rechtsklick auf das Symbol im Systray aus. - + Information - Information + Informationen - + Searching information... - Suche Informationen ... + Suche Informationen ... - + Do not replace the explorer copy/move - Explorer:-Kopieren/Verschieben nicht ersetzen + Explorer: Kopieren/Verschieben nicht ersetzen - + Semi replace the explorer copy/move - Explorer: Kopieren/Verschieben teilweise ersetzen + Explorer: Kopieren/Verschieben teilweise ersetzen - + Replace the explorer copy/move - Explorer:-Kopieren/Verschieben ersetzen + Explorer: Kopieren/Verschieben ersetzen - + Warning - Warnung + Warnung - + The action on the systray icon is unknown! - + Diese Aktion auf dem TrayIcon ist unbekannt! - + &About/Debug report - + &Über/Debug Report - + &About - + &Über - + &Save bug report - + &Speicher Fehlerbericht - + &Quit - + &Beenden - + &Options - + &Optionen - + &Product key - + &Produktschlüssel - + New version: %1 - + Neue Version: %1 - + Go to the download page: - + Zur Downloadseite gehen: - + A&dd copy/moving - + &Neuer Kopiervorgang - + Add &copy - + &Kopie - + Add &transfer - + &Übertragung - + Add &move - + &Verschieben Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2197,323 +2135,243 @@ seit: %2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists + + Overwrite if not same size - - Renaming rules - - - - - Delete partially transferred files - - - - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - KB - - - - Block size + + Inode threads - - Sequential buffer - + + + MB + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse Durchsuchen - + Filters @@ -2521,67 +2379,67 @@ seit: %2 fileErrorDialog - + Error with file - + Error Fehler - + Size Größe - + Modified - + File name - + Destination Ziel - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2589,141 +2447,153 @@ seit: %2 fileExistsDialog - + The file exists - + Source Quelle - + Destination Ziel - - + + Size Größe - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer Überschreiben, falls neuer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size Größe - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2731,65 +2601,65 @@ seit: %2 folderExistsDialog - + The source and destination is identical - + Source Quelle - + Destination Ziel - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip Überspringen - + &Cancel diff --git a/plugins/Languages/el/flag.png b/plugins/Languages/el/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/el/informations.xml b/plugins/Languages/el/informations.xml old mode 100644 new mode 100755 index 0f39ddc..dd51884 --- a/plugins/Languages/el/informations.xml +++ b/plugins/Languages/el/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 el diff --git a/plugins/Languages/el/translation.qm b/plugins/Languages/el/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/el/translation.qm differ diff --git a/plugins/Languages/el/translation.ts b/plugins/Languages/el/translation.ts old mode 100644 new mode 100755 index cb636cf..b64f48b --- a/plugins/Languages/el/translation.ts +++ b/plugins/Languages/el/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/en/translation.qm b/plugins/Languages/en/translation.qm new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/plugins/Languages/en/translation.qm @@ -0,0 +1 @@ + diff --git a/plugins/Languages/es/flag.png b/plugins/Languages/es/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/es/informations.xml b/plugins/Languages/es/informations.xml old mode 100644 new mode 100755 index 872a4d7..c8b3e95 --- a/plugins/Languages/es/informations.xml +++ b/plugins/Languages/es/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 es diff --git a/plugins/Languages/es/translation.qm b/plugins/Languages/es/translation.qm new file mode 100755 index 0000000..63d590d Binary files /dev/null and b/plugins/Languages/es/translation.qm differ diff --git a/plugins/Languages/es/translation.ts b/plugins/Languages/es/translation.ts old mode 100644 new mode 100755 index 89830e4..13e33f3 --- a/plugins/Languages/es/translation.ts +++ b/plugins/Languages/es/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - No es compatible con esta plataforma - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -89,12 +54,12 @@ Ultracopier is already running, right click on its system tray icon (near the clock) to use it or just copy and paste - + Ultracopier ya se está ejecutando, haga clic derecho en el icono de la bandeja del sistema (cerca del reloj) para usarlo o simplemente copie y pegue Ultracopier is already running, view all notification area icons (near the clock), right click on its system tray icon to use it or just copy and paste - + Ultracopier ya se está ejecutando, vea todos los íconos del área de notificación (cerca del reloj), haga clic derecho en el ícono de la bandeja del sistema para usarlo o simplemente copie y pegue @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination Destino - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask Pedir - - - - + + + + Skip Salto - + Merge - - + + Rename Cambiar el nombre - + Put at the end - + Overwrite Sobrescribir - + Overwrite if different - + Overwrite if newer Sobrescribir si nuevo - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask Pedir - - - - + + + + Skip Salto - + Merge - - + + Rename Cambiar el nombre - + Put at the end - + Overwrite Sobrescribir - + Overwrite if different - + Overwrite if newer Sobrescribir si nuevo - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,31 +261,31 @@ CopyEngineManager - - - - + + + + Warning Advertencia - + Cannot find any copy engine with move support No se puede encontrar ningún motor de copia con soporte de movimiento - + This copy engine does not support move Este motor de copia no soporta mover - + Cannot find any compatible engine! No se puede encontrar un motor compatible! - + Cannot find any engine with this name: %1 No se puede encontrar un motor con este nombre: %1 @@ -353,12 +293,12 @@ Este motor de copia no soporta mover CopyListener - + Error Error - + Error during the reception of the copy/move list %1 Error durante la recepción de la lista de copia / movimiento @@ -368,72 +308,72 @@ Este motor de copia no soporta mover Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance No se puede obtener una instancia de motor de copia - + Group window Ventana en grupo - + Do you want group the transfer with another actual running transfer? ¿Quieres agrupar la transferencia con otra transferencia real en ejecución? - + Unable to get a engine instance No se puede obtener una instancia del motor - + The argument for the mode is not valid El argumento para el modo no es válida - + Do you want to copy? If no, it will be moved. ¿Quieres copiar? Si no, se puede mover. - - + + Unable to load the interface, copy aborted No se puede cargar la interfaz, copia abortados - + Unable to load the copy engine, copy aborted No se puede cargar el motor de copia, copia abortados - + Transfer mode Modo de transferencia @@ -441,27 +381,27 @@ Este motor de copia no soporta mover DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -469,257 +409,262 @@ Este motor de copia no soporta mover FacilityEngine - + Copy engine Motor de copia - + Copy a copy Copia - + Move a move Movimiento - + Pause Pausa - + Resume Resumen - - + + Skip Salto - + Unlimited Ilimitado - + s s - + Too big Demasiado grande - + B B - + KB KB - + MB MB - + GB GB - + TB TB - + PB PB - + EB EB - + ZB ZB - + YB YB - + Less than %10 seconds Menos de %10 segundos - + About %10 seconds remaining Alrededor de %10 segundos restantes - + About %1 minutes remaining Alrededor de %1 minutos restantes - + About %1 hours remaining Alrededor de %1 las horas restantes - + Transfer a transfer Transferencia - + Start Iniciar - + Source Origen - + Size Tamaño - + Destination Destino - + Quit Abandonar - + Target Objetivo - - + + Time remaining: Tiempo restante: - + Listing Listado - + Copying Copia - + Listing and copying Listado y copia - + + Remaining: + Restante: + + + Ask Pedir - + Overwrite Sobrescribir - + Overwrite if newer Sobrescribir si nuevo - + Overwrite if the last modification dates are different Sobrescribir si las fechas de modificación últimos son diferentes - + Rename Cambiar el nombre - + Put to the end of the list Ponga al final de la lista - + Completed in %1 Terminado en %1 - + Select source directory Seleccione el directorio de origen - + Select destination directory Seleccione el directorio de destino - + Internal error Error interno - + Select one or more files to open Seleccione uno o varios archivos para abrirlos - + All files Todos los archivos - + Save transfer list Guardar lista de transferencias - + Open transfer list Abrir lista de transferencias - + Transfer list Lista de transferencia - + Error Error - + Not supported on this platform No es compatible con esta plataforma @@ -727,12 +672,12 @@ Este motor de copia no soporta mover FileErrorDialog - + Error on folder - + Folder name @@ -740,22 +685,22 @@ Este motor de copia no soporta mover FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error Error - + Try rename with using special characters @@ -763,22 +708,22 @@ Este motor de copia no soporta mover FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Error - + Try rename with using special characters @@ -786,77 +731,77 @@ Este motor de copia no soporta mover FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -864,60 +809,60 @@ Este motor de copia no soporta mover Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -925,27 +870,27 @@ Este motor de copia no soporta mover FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Error - + Try rename with using special characters @@ -953,7 +898,7 @@ Este motor de copia no soporta mover HelpDialog - + About Ultracopier Acerca Ultracopier @@ -974,85 +919,80 @@ Esta versión está compilada en versión:%1. Author: BRULE Herman Jacques Roger (alpha_one_x86), company: <a href="http://www.confiared.com/">confiared</a> - + Autor: BRULE Herman Jacques Roger (alpha_one_x86), empresa: <a href="http://www.confiared.com/es/">Confiared</a> - + About Qt Acerca de Qt - + Check update - + Compruebar la actualización - + Do a crash Hacer a crash - + Save bug report Guardar informe de error - + Close Cerrar - - About Supercopier - - - - + For http://portableapps.com/ Para http://portableapps.com/ - + Portable and all in one version Portable y todo en una versión - + Portable version Version portable - + All in one version Todo en una sola versión - + Normal version Version normal - + http://ultracopier.first-world.info/ http://ultracopier-es.first-world.info/ - + Update checking... - + Comprobación de actualización ... - + Update: %1 - + Actualización: %1 - + No update - + Ninguna actualización - + http://ultracopier.first-world.info/download.html http://ultracopier-es.first-world.info/descarga.html @@ -1066,49 +1006,49 @@ Esta versión está compilada en versión:%1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1124,12 +1064,12 @@ Esta versión está compilada en versión:%1. LocalListener - + Warning Advertencia - + Timeout while recomposing data from connected clients Tiempo de espera, mientras que la recomposición de datos de los clientes conectados @@ -1158,36 +1098,42 @@ Esta versión está compilada en versión:%1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1197,39 +1143,49 @@ Esta versión está compilada en versión:%1. Advertencia - + + Classic + Clásico + + + + Modern + Moderno + + + Don't show again No mostrar de nuevo - + Ok Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. - La sustitución de la copia default / sistema de movimiento no está soportado por el gestor de archivos (Dolphin, Nautilus, ...). <br /> Pregunte al desarrollador para apoyarlo. <br /> Es necesario hacer el copiar / mover manualmente. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. + El administrador de archivos no admite la sustitución del sistema de copia / movimiento predeterminado (Dolphin, Nautilus, ...). <br /> Solicite al desarrollador de su administrador de archivos que lo admita. <br />Debe hacer la copia/mover manualmente. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). Reinicie el sistema si previamente se había instalado software similar (como TeraCopy, SuperCopier o una versión anterior de Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). La sustitución de la copia default / sistema de movimiento no se admite y bloquea buscador de Mac OS X. <br /> Es necesario hacer el copiar / mover manualmente haciendo clic derecho sobre el icono de la bandeja del sistema, cerca del reloj (no el icono del Dock). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. La sustitución de incumplimiento de copiar / mover sistema no debe ser soportado por el gestor de archivos. <br /> Pregunte al desarrollador para apoyarlo. <br /> Usted necesita hacer el copiar / mover manualmente. - + Consider Supercopier as deprecated, prefer Ultracopier - + Considere Supercopier como obsoleto, prefiera Ultracopier @@ -1252,14 +1208,14 @@ Esta versión está compilada en versión:%1. - - + + Copy engine Motor de copia - + Themes Themas @@ -1281,41 +1237,41 @@ Esta versión está compilada en versión:%1. Portable (need restart) - + Portátil (necesita reiniciar) - + Name Nombre - + Version Version - + Language Lenguaje - - + + Listener Oyente - - + + Plugin loader Plugin cargador - - + + Session loader Sesión cargador @@ -1365,172 +1321,187 @@ Esta versión está compilada en versión:%1. Logarítmica - + + default: finish.opus + valor predeterminado: finish.opus + + + + Play + + + + + Sound when finish + Sonido cuando termine + + + Plugin Plugin - + Add Añadir - + Remove Eliminar - + Information Información - + Copy engine by order of preference: Copia del motor por orden de preferencia: - + Client connected Cliente conectado - + Themes: Temas: - + Unable to load the themes plugin No se puede cargar el plugin temas - + No option for this plugin No hay ninguna opción para este plugin - + Browse Navegar - + Write the transfers Escriba las transferencias - + Write the folder operations Escriba la carpeta de las operaciones - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated Las variables son %time%, %source%, %size%, %destination% - + Write the errors Escribir los errores - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated Las variables son %time%, %path%, %size%, %mtime%, %error% - + Write the log file into: Escribir el archivo de registro en: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) Escriba directamente el archivo cuando se recibe una nueva entrada (se puede producir un 50% de pérdida de rendimiento) - - + + Load Cargar - + Load the theme? Cargue el tema? - + Load the language? Cargue el idioma? - + Do nothing No hacer nada - + Ask source as folder Pregunte a la fuente que la carpeta - + Ask sources as files Pregunte a las fuentes como archivos - + Never Nunca - + When source is same Cuando la fuente es la misma - + When destination is same Cuando destino es el mismo - + When source and destination are same Cuando la fuente y el destino son los mismos - + When source or destination are same Cuando la fuente o el destino son los mismos - + Always Siempre - - - + + + The variables are %1 Las variables son %1 - + Save logs as: Guardar registros como: - + Synchronized log Registro de sincronizada - + The variables are %path%, %operation% %path%, %operation% should not be translated Las variables son %path%, %operation% @@ -1661,34 +1632,34 @@ Esta versión está compilada en versión:%1. informations.xml no es accesible - + Dependencies part is wrong Parte las dependencias se equivoca - + Dependencies %1 are not satisfied, for plugin: %2 Dependencias %1 no está satisfecho, para el plugin:%2 - + Remove %1 Eliminar %1 - + Error Error - + Error while the removing plugin, please check the rights on the folder: %1 Error al eliminar el complemento, compruebe los derechos en la carpeta: %1 - + Information Información @@ -1708,75 +1679,75 @@ Esta versión está compilada en versión:%1. "package" etiqueta raíz que no se encuentra el archivo xml - + Duplicated plugin found, already loaded! Plugin de duplicados encontrados, ya está cargado! - + English text missing in the informations.xml for the tag: %1 Texto Inglés falta en el informations.xml para la etiqueta: %1 - + Tag not found: %1 Etiqueta no encontrada: %1 - + Are you sure about removing "%1" in version %2? ¿Estás seguro de eliminar "%1" en la versión %2? - + Previous import is in progress... Previo de importación está en curso ... - + Open Ultracopier plugin Abrir Plugin Ultracopier - + Ultracopier plugin (*.urc) Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader Plugin cargador - + Unable to open the plugin: %1 No se puede abrir el plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 No se puede cargar el contenido del plugin, por favor verifique que: %1 - + Unable to create a folder to install the plugin: %1 No se puede crear una carpeta para instalar el plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 @@ -1785,16 +1756,16 @@ since:%2 desde: %2 - + Folder with same name is present, skip the plugin installation: %1 Carpeta con el mismo nombre está presente, no tome la instalación del plugin: %1 - - - + + + Unable to load the plugin content, please check it No se puede cargar el contenido del plugin, por favor verifique @@ -1805,17 +1776,17 @@ desde: %2 Product key - + Clave de producto Error - Error + Error Your product key was rejected.<br />If you buy key, unmark check your spam and unmark the mail as spam<br />If you have not buy your key, go to <a href="https://shop.first-world.info/">https://shop.first-world.info/</a> - + Su clave de producto fue rechazada. <br /> Si compra la clave, desmarque, verifique su correo no deseado y desmarque el correo como spam <br /> Si no ha comprado su clave, vaya a <a href="https://shop.first-world.info/">https://shop.first-world.info/</a> @@ -1866,24 +1837,17 @@ desde: %2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1891,267 +1855,240 @@ desde: %2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + Information Información - + Searching information... Buscar información... - + No copy listener found. Do the copy manually by right click one the system tray icon. No se encontró copia de escucha. Haga la copia manualmente haciendo clic derecho en el icono de la bandeja del sistema. - + Do not replace the explorer copy/move No sustituya la copia explorer/move - + Semi replace the explorer copy/move Semi reemplazar la copia explorer/mudanza - + Replace the explorer copy/move Vuelva a colocar la copia explorer/mudanza - + Warning - Advertencia + Advertencia - + The action on the systray icon is unknown! - + ¡La acción en el icono de la bandeja del sistema es desconocida! - + &About/Debug report - + Acerca de/Informe de debug - + &About - + &Acerca de - + &Save bug report - + Guardar informe de error - + &Quit - + Dejar - + &Options - + &Optiones - + &Product key - + Clave de producto - + New version: %1 - + Nueva versión: %1 - + Go to the download page: - + Ve a la página de descarga: - + A&dd copy/moving - + Agregar copia/mover - + Add &copy - + Agregar copia - + Add &transfer - + Agregar transferencia - + Add &move - + Añadir movimiento Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2184,323 +2121,243 @@ desde: %2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer Transferencia - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer + + Inode threads - - - - - - KB - KB - - - - Block size - - - - - Sequential buffer - + + + MB + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse Navegar - + Filters @@ -2508,67 +2365,67 @@ desde: %2 fileErrorDialog - + Error with file - + Error Error - + Size Tamaño - + Modified - + File name - + Destination Destino - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2576,141 +2433,153 @@ desde: %2 fileExistsDialog - + The file exists - + Source Origen - + Destination Destino - - + + Size Tamaño - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer Sobrescribir si nuevo - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size Tamaño - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2718,65 +2587,65 @@ desde: %2 folderExistsDialog - + The source and destination is identical - + Source Origen - + Destination Destino - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip Salto - + &Cancel diff --git a/plugins/Languages/fr/flag.png b/plugins/Languages/fr/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/fr/informations.xml b/plugins/Languages/fr/informations.xml old mode 100644 new mode 100755 index 5c571f2..cd1496d --- a/plugins/Languages/fr/informations.xml +++ b/plugins/Languages/fr/informations.xml @@ -15,7 +15,7 @@ - 1.6.1.3 + 2.2.4.4 fr diff --git a/plugins/Languages/fr/translation.qm b/plugins/Languages/fr/translation.qm new file mode 100755 index 0000000..04e1999 Binary files /dev/null and b/plugins/Languages/fr/translation.qm differ diff --git a/plugins/Languages/fr/translation.ts b/plugins/Languages/fr/translation.ts old mode 100644 new mode 100755 index b6d0692..e2c3742 --- a/plugins/Languages/fr/translation.ts +++ b/plugins/Languages/fr/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - Pas supporté sur cette platforme - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask Demander - - - - + + + + Skip Passer - + Merge - - + + Rename Renommer - + Put at the end - + Overwrite Écraser - + Overwrite if different - + Overwrite if newer Écraser si plus récent - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask Demander - - - - + + + + Skip Passer - + Merge - - + + Rename Renommer - + Put at the end - + Overwrite Écraser - + Overwrite if different - + Overwrite if newer Écraser si plus récent - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning Avertissement - + Cannot find any copy engine with move support Impossible de trouver un moteur avec le support du déplacement - + This copy engine does not support move Ce moteur de copie ne supporte pas les déplacements - + Cannot find any compatible engine! Impossible de trouver un moteur de copie compatible! - + Cannot find any engine with this name: %1 Impossible de trouver un moteur portant ce nom: %1 @@ -352,12 +292,12 @@ CopyListener - + Error Erreur - + Error during the reception of the copy/move list %1 Erreur pendant la réception de la liste de copy/déplacement @@ -367,72 +307,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error Erreur - - - - - - - - + + + + + + + + Unable to get a copy engine instance Impossible d'obtenir une instance du moteur de copie - + Group window Grouper des fenêtres - + Do you want group the transfer with another actual running transfer? Voulez vous grouper le transfert avec le transfert actuel? - + Unable to get a engine instance Impossible d'otenir une instance du moteur de copie - + The argument for the mode is not valid L'argument pour le mode n'est pas valide - + Do you want to copy? If no, it will be moved. Voulez vous faire une copie? Si vous repondez non alors il sera déplacé. - - + + Unable to load the interface, copy aborted Impossible de charger l'interface, copie annulée - + Unable to load the copy engine, copy aborted Impossible de charger le moteur de copie, copie annulée - + Transfer mode Mode de transfert @@ -440,27 +380,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -468,259 +408,264 @@ FacilityEngine - + Copy engine Moteur de copie - + Copy a copy Copie - + Move a move Déplacer - + Pause Pause - + Resume Reprendre - - + + Skip Passer - + Unlimited Illimité - + s s - + Too big Trop grand - + B o - + KB Ko - + MB Mo - + GB Go - + TB To - + PB Po - + EB Eo - + ZB Zo - + YB Yo - + Less than %10 seconds Moins de %10 secondes - + About %10 seconds remaining Environ %10 secondes restantes - + About %1 minutes remaining Environ %1 minutes restantes - + About %1 hours remaining Environ %1 heures restantes - + Transfer a transfer Transfert - + Start Démarrer - + Source Source - + Size Taille - + Destination Destination - + Quit Quitter - + Target Cible - - + + Time remaining: Temps restant: - + Listing Création de la liste? Listage? Listing - + Copying Copie en cour -> copying in progress Copie - + Listing and copying Listing et copie - + + Remaining: + Restant: + + + Ask Demander - + Overwrite Écraser - + Overwrite if newer Écraser si plus récent - + Overwrite if the last modification dates are different Écraser si les dates de modification sont différentes - + Rename Renommer - + Put to the end of the list Mettre à la fin - + Completed in %1 Fini en %1 - + Select source directory Sélectionner un dossier source - + Select destination directory Sélectionner un dossier de destination - + Internal error Erreur interne - + Select one or more files to open Sélectionner un ou des fichiers à ouvrir - + All files Tous les fichiers - + Save transfer list Sauvegarder la liste de transfert - + Open transfer list Ouvrir la liste de transfert - + Transfer list Liste de transfert - + Error Erreur - + Not supported on this platform Pas supporté sur cette platforme @@ -728,12 +673,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -741,22 +686,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error Erreur - + Try rename with using special characters @@ -764,22 +709,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Erreur - + Try rename with using special characters @@ -787,77 +732,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -865,60 +810,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -926,27 +871,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Erreur - + Try rename with using special characters @@ -954,7 +899,7 @@ HelpDialog - + About Ultracopier À propos d'Ultracopier @@ -978,82 +923,77 @@ Cette version est compilée comme version : %1. Auteur: BRULE Herman Jacques Roger (alpha_one_x86), société: <a href="http://www.confiared.com/"> confiared </a> - + About Qt À propos de Qt - + Check update Vérifier la mise à jour - + Do a crash Faire un crash - + Save bug report Sauver le rapport - + Close Fermer - - About Supercopier - A propos de Supercopier - - - + For http://portableapps.com/ Pour http://portableapps.com/ - + Portable and all in one version Portable et tout en un - + Portable version Version portable - + All in one version Tout en un - + Normal version Version normale - + http://ultracopier.first-world.info/ http://ultracopier-fr.first-world.info/ - + Update checking... Vérification de la mise à jour... - + Update: %1 Mise à jour: %1 - + No update Pas de mise à jour - + http://ultracopier.first-world.info/download.html http://ultracopier-fr.first-world.info/telecharger.html @@ -1067,49 +1007,49 @@ Cette version est compilée comme version : %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1125,12 +1065,12 @@ Cette version est compilée comme version : %1. LocalListener - + Warning Avertissement - + Timeout while recomposing data from connected clients Timeout pendant la recompossition des données des clients connectés @@ -1159,36 +1099,42 @@ Cette version est compilée comme version : %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1198,37 +1144,47 @@ Cette version est compilée comme version : %1. Avertissement - + + Classic + Classique + + + + Modern + Moderne + + + Don't show again Ne plus afficher - + Ok Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. - Le remplacement du systéme de copie/déplacement n'est pas supporté par le gestionnaire de fichier (Dolphin, Nautilus, ...).<br />Demander aux developpeurs de le supporter.<br />Vous devez faire la copie/déplacement manuellement. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. + Le remplacement du système de copie/déplacement par défaut n’est pas pris en charge par le gestionnaire de fichiers (Dolphin, Nautilus, ...). <br /> Demandez au développeur de votre gestionnaire de fichiers de le prendre en charge. <br /> Vous devez effectuer la copie/déplacement manuellement. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). Redémarrer le système si précédemment vous avez installé un logiciel similaire (comme Teracopy, Supercopier ou une version précédente d'Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). Le remplacement du systéme de copie/déplacement n'est pas supporté et bloqué par le finder de Mac OS X.<br />Vous devez faire la copie/déplacement manuellement en cliquant sur l'icone du systray à coté de l'heure (pas l'icone du dock). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. Le remplacement du systéme de copie/déplacement n'est pas supporté par le gestionnaire de fichier.<br />Demander aux developpeurs de le supporter.<br />Vous devez faire la copie/déplacement manuellement. - + Consider Supercopier as deprecated, prefer Ultracopier Considérer Supercopier comme obsolète, préférez Ultracopier @@ -1253,14 +1209,14 @@ Cette version est compilée comme version : %1. - - + + Copy engine Moteurs de copie - + Themes Thèmes @@ -1285,38 +1241,38 @@ Cette version est compilée comme version : %1. Portable (besoin de redémarrer) - + Name Nom - + Version Version - + Language Langue - - + + Listener Écouteur - - + + Plugin loader Chargeur de plugin - - + + Session loader Chargeur de session @@ -1366,172 +1322,187 @@ Cette version est compilée comme version : %1. Logarithmique - + + default: finish.opus + défaut: finish.opus + + + + Play + + + + + Sound when finish + Son quand fini + + + Plugin Plugin - + Add Ajouter - + Remove Supprimer - + Information Informations - + Copy engine by order of preference: Moteurs de copie par ordre de préférence: - + Client connected Client connecté - + Themes: Thèmes: - + Unable to load the themes plugin Impossible de charger le plugin des thèmes - + No option for this plugin Pas d'options pour ce plugin - + Browse Parcourir - + Write the transfers Écrire les transferts - + Write the folder operations Écrire les opérations dossier - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated Les variables sont %time%, %source%, %size%, %destination% - + Write the errors Écrire les erreurs - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated Les variables sont %time%, %path%, %size%, %mtime%, %error% - + Write the log file into: Écrire le fichier journal dans: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) Écrire directement le fichier quand il reçoit une nouvelle entrée (peut entrainer 50% de perte de performances) - - + + Load Charger - + Load the theme? Charger le thème? - + Load the language? Charger la langue? - + Do nothing Ne rien faire - + Ask source as folder Demander la source comme un dossier - + Ask sources as files Demander la sources comme des fichiers - + Never Jamais - + When source is same Quand la source est la même - + When destination is same Quand la destination est la même - + When source and destination are same Quand la destination et la source sont les mêmes - + When source or destination are same Quand la destination ou la source sont les mêmes - + Always Toujours - - - + + + The variables are %1 Les variables sont %1 - + Save logs as: Sauvegarder les logs sous: - + Synchronized log Log synchronisé - + The variables are %path%, %operation% %path%, %operation% should not be translated Les variables sont %path%, %operation% @@ -1667,53 +1638,53 @@ Cette version est compilée comme version : %1. Le fichier informations.xml n'a pas été trouvé dans le plugin - + English text missing in the informations.xml for the tag: %1 Texte anglais manquant dans le informations.xml pour la balise: %1 - + Dependencies part is wrong Les dépendances sont fausses - + Dependencies %1 are not satisfied, for plugin: %2 Des dépendances %1 ne sont pas satisfaites, pour le plugin: %2 - + Error while the removing plugin, please check the rights on the folder: %1 Erreur lors de la suppression du plug-in, veuillez vérifier les droits sur le dossier: %1 - - - - - - - - - - + + + + + + + + + + Plugin loader Chargeur de plugin - + Remove %1 Supprimer %1 - + Error Erreur - + Information Informations @@ -1728,57 +1699,57 @@ Cette version est compilée comme version : %1. La balise racine "package" n'a pas été trouvée pour le fichier xml - + Duplicated plugin found, already loaded! Le plugins courrant est un doublont, donc déjà chargé! Plugin dupliqué trouvé, déjà chargé! - + Tag not found: %1 Balise non trouvée: %1 - + Are you sure about removing "%1" in version %2? Êtes vous sûr de vouloir supprimer "%1" en version %2? - + Previous import is in progress... Importation précédente en cours... - + Open Ultracopier plugin Ouvrir un plugin d'Ultracopier - + Ultracopier plugin (*.urc) Plugin d'Ultracopier (*.urc) - + Unable to open the plugin: %1 Impossible d'ouvrir le plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 Impossible de charger le contenu du plugin, veuillez le vérifier: %1 - + Unable to create a folder to install the plugin: %1 Impossible de créer un dossier pour installer le plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 @@ -1787,16 +1758,16 @@ since:%2 depuis:%2 - + Folder with same name is present, skip the plugin installation: %1 Le répertoire est déjà présent, on saute l'installation du plugin: %1 - - - + + + Unable to load the plugin content, please check it Impossible de charger le contenu du plugin, veuillez le vérifier @@ -1868,24 +1839,17 @@ depuis:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1893,198 +1857,183 @@ depuis:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. Pas d'écouteur trouvé. Effectuez la copie manuellement par clic droit sur l'icône dans la zone de notification (près de l'horloge). - + Searching information... Recherche d'informations... - + Do not replace the explorer copy/move Ne remplace pas la copie/déplacement de l'explorateur - + Semi replace the explorer copy/move Remplace partiellement la copie/déplacement de l'explorateur - + Replace the explorer copy/move Remplace la copie/déplacement de l'explorateur - + Warning Avertissement - + The action on the systray icon is unknown! L'action sur l'icône systray est inconnue! - + &About/Debug report &À propos/Rapport de débogage - + &About &À propos - + &Save bug report &Sauvegarder le rapport de bogue - + &Quit &Quitter - + &Options &Options - + &Product key &Clé de produit - + New version: %1 Nouvelle version: %1 - + Go to the download page: Aller à la page de téléchargement: - + A&dd copy/moving - Une cop&ie/déplacement + Ajouter cop&ie/déplacement - + Add &copy - Ajouter et &copie + Ajouter une &copie - + Add &transfer - Ajouter et &transférer + Ajouter un &transfére - + Add &move - Ajouter et dép&lacement + Ajouter un dép&lacement - + Information Informations @@ -2092,68 +2041,56 @@ depuis:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2186,323 +2123,243 @@ depuis:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer Transfert - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules + + Overwrite if not same size - - Delete partially transferred files - - - - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - Ko - - - - Block size + + Inode threads - - Sequential buffer - + + + MB + Mo - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse Parcourir - + Filters @@ -2510,67 +2367,67 @@ depuis:%2 fileErrorDialog - + Error with file - + Error Erreur - + Size Taille - + Modified - + File name - + Destination Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2578,141 +2435,153 @@ depuis:%2 fileExistsDialog - + The file exists - + Source Source - + Destination Destination - - + + Size Taille - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer Écraser si plus récent - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size Taille - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2720,65 +2589,65 @@ depuis:%2 folderExistsDialog - + The source and destination is identical - + Source Source - + Destination Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip Passer - + &Cancel diff --git a/plugins/Languages/hi/flag.png b/plugins/Languages/hi/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/hi/informations.xml b/plugins/Languages/hi/informations.xml old mode 100644 new mode 100755 index 33f66e6..dc5b57c --- a/plugins/Languages/hi/informations.xml +++ b/plugins/Languages/hi/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 hi diff --git a/plugins/Languages/hi/translation.qm b/plugins/Languages/hi/translation.qm new file mode 100755 index 0000000..d925dd6 Binary files /dev/null and b/plugins/Languages/hi/translation.qm differ diff --git a/plugins/Languages/hi/translation.ts b/plugins/Languages/hi/translation.ts old mode 100644 new mode 100755 index 71b0873..3c0c8fd --- a/plugins/Languages/hi/translation.ts +++ b/plugins/Languages/hi/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/hu/flag.png b/plugins/Languages/hu/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/hu/informations.xml b/plugins/Languages/hu/informations.xml old mode 100644 new mode 100755 index 6483629..ced72cc --- a/plugins/Languages/hu/informations.xml +++ b/plugins/Languages/hu/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 hu diff --git a/plugins/Languages/hu/translation.qm b/plugins/Languages/hu/translation.qm new file mode 100755 index 0000000..89f253f Binary files /dev/null and b/plugins/Languages/hu/translation.qm differ diff --git a/plugins/Languages/hu/translation.ts b/plugins/Languages/hu/translation.ts old mode 100644 new mode 100755 index f924d55..3416979 --- a/plugins/Languages/hu/translation.ts +++ b/plugins/Languages/hu/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - Ezen a platformon nem támogatott - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination Cél - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask Rákérdez - - - - + + + + Skip Kihagyás - + Merge - - + + Rename Átnevezés - + Put at the end - + Overwrite Felülírás - + Overwrite if different - + Overwrite if newer Felülírás, ha újabb - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask Rákérdez - - - - + + + + Skip Kihagyás - + Merge - - + + Rename Átnevezés - + Put at the end - + Overwrite Felülírás - + Overwrite if different - + Overwrite if newer Felülírás, ha újabb - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning Figyelmzetetés - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! Nem található semmilyen kompatibilis motor! - + Cannot find any engine with this name: %1 Nem található motor ezzel a névvel: %1 @@ -352,12 +292,12 @@ CopyListener - + Error Hiba - + Error during the reception of the copy/move list %1 Hiba a másolási/mozgatási lista fogadásakor @@ -367,72 +307,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error Hiba - - - - - - - - + + + + + + + + Unable to get a copy engine instance Nem lehetséges másoló motor példány észlelése - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance Motor állapot lekérése nem lehetséges - + The argument for the mode is not valid A mód argumentuma nem érvényes - + Do you want to copy? If no, it will be moved. Szeretnél másolni? Ha nem, akkor átmozgatva lesz. - - + + Unable to load the interface, copy aborted Kezelőfelület betöltése nem lehetséges, másolás megszakítva - + Unable to load the copy engine, copy aborted Másoló motor betöltése nem lehetséges, másolás megszakítva - + Transfer mode Átviteli mód @@ -440,27 +380,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -468,257 +408,262 @@ FacilityEngine - + s mp - + Too big Túl nagy - + B B - + KB KB - + MB MB - + GB GB - + TB TB - + PB PB - + EB EB - + ZB ZB - + YB YB - + Less than %10 seconds Kevesebb mint %10 másodperc - + About %10 seconds remaining Körülbelül %10 másodperc van hátra - + About %1 minutes remaining Körülbelül %1 perc van hátra - + About %1 hours remaining Körülbelül %1 óra van hátra - + Copy engine Másoló motor - + Copy a copy Másolás - + Transfer a transfer Átvitel - + Move a move Mozgatás - + Start Indítás - + Pause Szünet - + Resume Folytatás - - + + Skip Kihagyás - + Unlimited Korlátlan - + Source Forrás - + Size Méret - + Destination Cél - + Quit Kilépés - + Target Cél - - + + Time remaining: Hátralévő idő: - + Listing Listázás - + Copying Másolás - + Listing and copying Listázás és másolás - + + Remaining: + + + + Ask Rákérdez - + Overwrite Felülírás - + Overwrite if newer Felülírás, ha újabb - + Overwrite if the last modification dates are different Felülír, ha az legutóbbi módosítás dátumai különböznek - + Rename Átnevezés - + Put to the end of the list Helyezze a lista végére - + Select source directory Válassz forrásmappát - + Select destination directory Válassz célmappát - + Internal error Belső hiba - + Select one or more files to open Válassz egy vagy több fájlt megnyitásra - + All files Minden fájl - + Save transfer list Átviteli lista mentése - + Open transfer list Átviteli lista megnyitása - + Transfer list Átviteli lista - + Error Hiba - + Not supported on this platform Ezen a platformon nem támogatott - + Completed in %1 Befejezve %1 alatt @@ -726,12 +671,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -739,22 +684,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error Hiba - + Try rename with using special characters @@ -762,22 +707,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Hiba - + Try rename with using special characters @@ -785,77 +730,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -863,60 +808,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -924,27 +869,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Hiba - + Try rename with using special characters @@ -952,7 +897,7 @@ HelpDialog - + About Ultracopier Az Ultracopier névjegye @@ -982,82 +927,77 @@ Ez a verzió a következő verzióként került lefordításra: %1. - + About Qt A Qt névjegye - + Check update - + Do a crash Összeomlás - + Save bug report Hibajelentés mentése - + Close Bezárás - - About Supercopier - - - - + For http://portableapps.com/ http://portableapps.com/ - + Portable and all in one version Hordozható és teljes verzió - + Portable version Hordozható verzió - + All in one version Teljes verzió - + Normal version Normál verzió - + http://ultracopier.first-world.info/ http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1065,49 +1005,49 @@ Ez a verzió a következő verzióként került lefordításra: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1123,12 +1063,12 @@ Ez a verzió a következő verzióként került lefordításra: %1. LocalListener - + Warning Figyelmeztetés - + Timeout while recomposing data from connected clients Időtúllépés történt az adatok összeilesztése közben a kapcsolódott kliensektől @@ -1157,36 +1097,42 @@ Ez a verzió a következő verzióként került lefordításra: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1196,38 +1142,47 @@ Ez a verzió a következő verzióként került lefordításra: %1.Figyelmeztetés - + + Classic + + + + + Modern + + + + Don't show again Ne mutassa újra - + Ok Rendben - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. - Az alapértelmezett másolás/mozgatás rendszer lecserélését nem támogatja a fájlkezelő (Dolphin, Nautilus, ...).<br />Kérd meg a fejlesztőt, hogy támogassa.<br />A másolás/mozgatást manuálisan kell elvégezned. - + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. + - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). Indítsd újra a gépet, ha korábban már volt hasonló alkalmazás telepítve (például Teracopy, Supercopier vagy az Ultracopier korábbi verziója). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). Az alapértelmezett másoló/mozgató rendszer lecserélését nem támogatott és blokkolja a Mac OS X fejlesztője.<br />A másolást/mozgatást manuálisan kell elvégezned a tálcaikonra kattintva jobb egérgombbal, az óra mellett. - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. Az alapértelmezett másoló/mozgató rendszer lecserélését nem szabad támogatnia a fájlkezelőnek.<br />Kérd meg a fejlesztőt, hogy támogassa.<br />A másolás/mozgatást manuálisan kell elvégezned. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1252,35 +1207,35 @@ Ez a verzió a következő verzióként került lefordításra: %1. - - + + Copy engine Másoló motor - - + + Listener Figyelő - - + + Plugin loader Beépüő betöltő - - + + Session loader Folyamat betöltő - + Themes Témák @@ -1305,12 +1260,12 @@ Ez a verzió a következő verzióként került lefordításra: %1. - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) Írás közvetlenül a fájlba, ha új bejegyzést kap (akár 50%-kos teljesítménycsökkenést is okozhat) - + Name Név @@ -1360,178 +1315,193 @@ Ez a verzió a következő verzióként került lefordításra: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Version Verzió - + Language Nyelv - + Plugin Beépülő - + Add Hozzáadás - + Remove Eltávolítás - + Information Információ - + Copy engine by order of preference: Másoló motor tulajdonság szerint: - + Client connected Kliens kapcsolódva - + Themes: Témák: - + Unable to load the themes plugin A témák beépülő betöltése nem lehetséges - + No option for this plugin Nincs beállítás ehhez a beépülőhöz - + Write the log file into: Napló írása ide: - + Browse Tallózás - + Synchronized log Szinkronizált napló - + Write the transfers Átvitelek írása - + Write the errors Hibák írása - + Write the folder operations Mappa műveletek írása - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated A változók: %time%, %source%, %size%, %destination% - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated A változók: %time%, %path%, %size%, %mtime%, %error% - + The variables are %path%, %operation% %path%, %operation% should not be translated A változók: %path%, %operation% - - + + Load Betöltés - + Load the theme? Téma betöltése? - + Load the language? Nyelv betöltése? - + Do nothing Ne tegyen semmit - + Ask source as folder Rákérdezés a forrás mint mappa - + Ask sources as files Rákérdezés a forrásokra mint fájlok - + Never Soha - + When source is same Amikor a forrás ugyanaz - + When destination is same Amikor a cél ugyanaz - + When source and destination are same Amikor a forrás és a cél ugyanaz - + When source or destination are same Amikor a forrás vagy cél ugyanaz - + Always Mindig - - - + + + The variables are %1 A változók: %1 - + Save logs as: Napló mentése mint: @@ -1671,7 +1641,7 @@ Ez a verzió a következő verzióként került lefordításra: %1."package" gyökércímke nem található az xml fájlban - + Duplicated plugin found, already loaded! Duplikált beépülő található, már be van töltve! @@ -1681,101 +1651,101 @@ Ez a verzió a következő verzióként került lefordításra: %1.informations.xml nem található a beépülőhöz - + English text missing in the informations.xml for the tag: %1 Angol szöveg hiányzik az informations.xml-ből a címkéhez: %1 - + Tag not found: %1 Címke nem található: %1 - + Dependencies part is wrong A függőségek rész hibás - + Dependencies %1 are not satisfied, for plugin: %2 A(z) %1 függőségek nem megfelelőek a következő beépülőhöz: %2 - + Remove %1 %1 eltávolítása - + Are you sure about removing "%1" in version %2? Biztosan el akarod távolítani "%1"-t a(z) %2 verzióban? - + Error Hiba - + Error while the removing plugin, please check the rights on the folder: %1 - + Information Információ - + Previous import is in progress... Előző importálás folyamatban van... - + Open Ultracopier plugin Ultracopier beépülő megnyitása - + Ultracopier plugin (*.urc) Ultracopier beépülő (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader Beépülő betöltő - + Unable to open the plugin: %1 Beéülő megnyitása nem lehetséges: %1 - - - + + + Unable to load the plugin content, please check it: %1 Beépülő tartalmának betöltése nem lehetséges, kérlek ellenőrizd: %1 - + Unable to create a folder to install the plugin: %1 Mappa létrehozása a beépülő telepítéséhez nem lehetséges: %1 - + Unable to create a file to install the plugin: %1 since:%2 @@ -1784,16 +1754,16 @@ since:%2 óta:%2 - + Folder with same name is present, skip the plugin installation: %1 Mappa már létezik ilyen néven, beépülő telepítésének kihagyása: %1 - - - + + + Unable to load the plugin content, please check it Beépülő tartalmának betöltése nem lehetséges, kérlek ellenőrizd @@ -1865,24 +1835,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1890,198 +1853,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. Nem található másoló figyelő. Végezd el manuálisan a másolást a jobb egérgombbal a tálcaikonra kattintva. - + Information Információ - + Searching information... Információ keresése... - + Do not replace the explorer copy/move Ne cserélje le az Intéző másolását/mozgatását - + Semi replace the explorer copy/move Az Intéző másolás/mozgatás félig lecserélése - + Replace the explorer copy/move Az Intéző másolás/mozgatás lecserélése - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2089,68 +2037,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2183,323 +2119,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer Átvitel - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - KB - - - - Block size + + Inode threads - - Sequential buffer - + + + MB + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse Tallózás - + Filters @@ -2507,67 +2363,67 @@ since:%2 fileErrorDialog - + Error with file - + Error Hiba - + Size Méret - + Modified - + File name - + Destination Cél - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2575,141 +2431,153 @@ since:%2 fileExistsDialog - + The file exists - + Source Forrás - + Destination Cél - - + + Size Méret - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer Felülírás, ha újabb - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size Méret - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2717,65 +2585,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source Forrás - + Destination Cél - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip Kihagyás - + &Cancel diff --git a/plugins/Languages/id/flag.png b/plugins/Languages/id/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/id/informations.xml b/plugins/Languages/id/informations.xml old mode 100644 new mode 100755 index b090138..8341a58 --- a/plugins/Languages/id/informations.xml +++ b/plugins/Languages/id/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 id diff --git a/plugins/Languages/id/translation.qm b/plugins/Languages/id/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/id/translation.qm differ diff --git a/plugins/Languages/id/translation.ts b/plugins/Languages/id/translation.ts old mode 100644 new mode 100755 index cb636cf..b64f48b --- a/plugins/Languages/id/translation.ts +++ b/plugins/Languages/id/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/it/informations.xml b/plugins/Languages/it/informations.xml index 3f29549..0c123f0 100644 --- a/plugins/Languages/it/informations.xml +++ b/plugins/Languages/it/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 it diff --git a/plugins/Languages/it/translation.qm b/plugins/Languages/it/translation.qm new file mode 100755 index 0000000..b8ab191 Binary files /dev/null and b/plugins/Languages/it/translation.qm differ diff --git a/plugins/Languages/it/translation.ts b/plugins/Languages/it/translation.ts index 8517260..af9765d 100644 --- a/plugins/Languages/it/translation.ts +++ b/plugins/Languages/it/translation.ts @@ -1,41 +1,6 @@ - - - AvancedQFile - - - - - Not supported on this platform - Non supportato su questa piattaforma - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - + CliParser @@ -45,12 +10,12 @@ Warning - Avviso + Attenzione Problem reading file, or file size is 0 - Problema di lettura o dimensione nulla del file + Problema durante la lettura del file o dimensione file nulla @@ -62,19 +27,19 @@ To display the options - Mostra le opzioni + Mostrare le opzioni To copy sources to destination, separated by space. If destination is "?", ultracopier will ask the user - Copiare i file di origine alla destinazione separati da uno spazio. Se la destinazione è "?", Ultracopier chiederà all'utente + Copiare file di origine nella destinazione separati da uno spazio. Se la destinazione è "?" Ultracopier chiederà all'utente To move sources to destination, separated by space. If destination is "?", ultracopier will ask the user - Spostare i file di origine alla destinazione separati da uno spazio. Se la destinazione è "?", Ultracopier chiederà all'utente + Spostare file di origine nella destinazione separati da uno spazio. Se la destinazione è "?" Ultracopier chiederà all'utente @@ -84,28 +49,28 @@ This file is not supported transfer list - Questo file non è supportato dalla lista dei trasferimenti + Questo file non è supportato dalla lista trasferimenti Ultracopier is already running, right click on its system tray icon (near the clock) to use it or just copy and paste - + Ultracopier è già avviato, click destro su icona nell'area di notifica per usarlo oppure copia e incolla semplicemente Ultracopier is already running, view all notification area icons (near the clock), right click on its system tray icon to use it or just copy and paste - + Ultracopier è già avviato, controlla tra le icone nell'area di notifica. Click destro sull'icona della barra applicazioni di sistema per usarlo oppure copia e incolla semplicemente Unable to open the transfer list file - Impossibile aprire il file della lista dei trasferimenti + Impossibile aprire il file della lista di trasferimento To display this help - Mostra questo aiuto + Mostrare questa guida @@ -117,117 +82,102 @@ Open transfer list - Apri la lista dei trasferimenti + Aprire lista di trasferimento Help - Aiuto + Guida CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - Cartella di destinazione + Destinazione - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask Chiedi - - - - + + + + Skip Salta - + Merge - - + + Rename Rinomina - + Put at the end - + Overwrite Sovrascrivi - + Overwrite if different - + Overwrite if newer - Sovrascrivi se più recente + Sovrascrivere se più recente - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask Chiedi - - - - + + + + Skip Salta - + Merge - - + + Rename Rinomina - + Put at the end - + Overwrite Sovrascrivi - + Overwrite if different - + Overwrite if newer - Sovrascrivi se più recente + Sovrascrivere se più recente - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,43 +261,43 @@ CopyEngineManager - - - - + + + + Warning - Avviso + Attenzione - + Cannot find any copy engine with move support - + Impossibile trovare un motore di copia con supporto allo spostamento - + This copy engine does not support move - + Questo motore di copia non supporta lo spostamento - + Cannot find any compatible engine! - Impossibile trovare un motore per la copia compatibile! + Impossibile trovare un motore di copia compatibile! - + Cannot find any engine with this name: %1 - Impossibile trovare un motore per la copia con questo nome: %1 + Impossibile trovare un motore di copia con questo nome: "%1" CopyListener - + Error Errore - + Error during the reception of the copy/move list %1 Errore durante la ricezione della lista di copia/spostamento @@ -367,100 +307,100 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error Errore - - - - - - - - + + + + + + + + Unable to get a copy engine instance - Impossibile ottenere un'istanza dal motore per la copia + Impossibile ottenere un'istanza del motore di copia - + Group window - Raggruppa finestre + Raggruppare finestre - + Do you want group the transfer with another actual running transfer? - Vuoi un altro gruppo di trasferimento con un altro trasferimento attualmente avviato? + Vuoi raggruppare il trasferimento con un altro attualmente avviato? - + Unable to get a engine instance - Impossibile ottenere un'istanza dal motore per la copia + Impossibile ottenere un'istanza del motore - + The argument for the mode is not valid L'argomento per la modalità non è valido - + Do you want to copy? If no, it will be moved. - Vuoi copiarlo? se no, verrà spostato. + Vuoi copiare? Altrimenti verrà spostato - - + + Unable to load the interface, copy aborted - Impossibile avviare l'interfaccia, copia interrotta + Impossibile avviare l'interfaccia. Copia abortita - + Unable to load the copy engine, copy aborted - Impossibile avviare il motore per la copia, copia interrotta + Impossibile avviare il motore di copia. Copia abortita - + Transfer mode - Modalità di trasferimento + Modalità trasferimento DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -468,258 +408,262 @@ FacilityEngine - + Copy engine - Motore per la copia + Motore di copia - + Copy a copy Copia - + Move a move Sposta - + Pause Pausa - + Resume - Riprendi + Ripresa - - + + Skip Salta - + Unlimited Illimitato - + s s - + Too big Troppo grande - + B B - + KB KB - + MB MB - + GB GB - + TB TB - + PB PB - + EB EB - + ZB ZB - + YB YB - + Less than %10 seconds Meno di %10 secondi - + About %10 seconds remaining Circa %10 secondi rimanenti - + About %1 minutes remaining Circa %1 minuti rimanenti - + About %1 hours remaining Circa %1 ore rimanenti - + Transfer a transfer Trasferisci - + Start - Uno spostamento Avvia - + Source - Cartella di origine + Origine - + Size Dimensione - + Destination - Cartella di destinazione + Destinazione - + Quit Esci - + Target Obiettivo - - + + Time remaining: Tempo residuo: - + Listing - Elenco + Elencando - + Copying - Copiatura + Copia - + Listing and copying - Elenca e copia + Elencando e copiando - + + Remaining: + Rimanente: + + + Ask Chiedi - + Overwrite Sovrascrivi - + Overwrite if newer - Sovrascrivi se più recente + Sovrascrivere se più recente - + Overwrite if the last modification dates are different - Sovrascrivi se sono diverse le date dell'ultima modifica + Sovrascrivere se le date di ultima modifica sono differenti - + Rename Rinomina - + Put to the end of the list Metti in coda alla lista - + Completed in %1 Completato in %1 - + Select source directory - Selezionare la cartella di origine + Selezionare cartella di origine - + Select destination directory - Selezionare la cartella di destinazione + Selezionare cartella di destinazione - + Internal error Errore interno - + Select one or more files to open Selezionare uno o più file da aprire - + All files Tutti i file - + Save transfer list - Salvare la lista dei trasferimenti + Salvare lista di trasferimento - + Open transfer list - Aprire lista dei trasferimenti + Aprire lista di trasferimento - + Transfer list - Lista dei trasferimenti + Lista di trasferimento - + Error Errore - + Not supported on this platform Non supportato su questa piattaforma @@ -727,12 +671,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -740,22 +684,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error Errore - + Try rename with using special characters @@ -763,22 +707,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Errore - + Try rename with using special characters @@ -786,77 +730,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -864,60 +808,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -925,27 +869,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error Errore - + Try rename with using special characters @@ -953,7 +897,7 @@ HelpDialog - + About Ultracopier Informazioni su Ultracopier @@ -962,7 +906,7 @@ Based on Qt. Advanced utility to copy files under GPL3 license. This version is compiled as version: %1. %1 will be replaced by a variable content (normal, debug, ...) - %1 sarà rimpiazzata da una variabile content (normale, debug, ...) + %1 sarà rimpiazzato da un contenuto variabile (normale, debug, ...) Utility avanzata sotto licenza GPL3 per la copia dei file basata su Qt. Compilata come versione: %1. @@ -970,92 +914,87 @@ Compilata come versione: %1. Platform: %1 %1 will be replaced by the platform (windows, mac, linux, ...) - %1 sarà rimpiazzata dalla piattaforma (Windows, Mac, Linux, ...) + %1 sarà rimpiazzato dalla piattaforma (Windows, Mac, Linux, ...) Piattaforma: %1 Author: BRULE Herman Jacques Roger (alpha_one_x86), company: <a href="http://www.confiared.com/">confiared</a> - + Autore: BRULE Herman Jacques Roger (alpha_one_x86), azienda: <a href="http://www.confiared.com/">confiared</a> - + About Qt Informazioni su Qt - + Check update - + Controllare aggiornamenti - + Do a crash Si è verificato un crash - + Save bug report - Salva il bug + Salva rapporto bug - + Close Chiudi - - About Supercopier - - - - + For http://portableapps.com/ - Su http://portableapps.com/ + Per http://portableapps.com - + Portable and all in one version Versione portatile e pluricomprensiva - + Portable version Versione portatile - + All in one version Versione pluricomprensiva - + Normal version Versione normale - + http://ultracopier.first-world.info/ - Questo dovrebbe essere il sito ufficiale di Ultracopier in italiano - http://ultracopier-it.first-world.info/ + Questo dovrebbe essere il sito ufficiale di Ultracopier + http://ultracopier-it.first-world.info - + Update checking... - + Controllo aggiornamenti... - + Update: %1 - + Aggiornamento: %1 - + No update - + Nessun aggiornamento disponibile - + http://ultracopier.first-world.info/download.html http://ultracopier.first-world.info/download.html @@ -1063,56 +1002,56 @@ Compilata come versione: %1. <html><head/><body><p>For more information see the website <a href="%1"><span style=" text-decoration: underline; color:#0057ae;">%1</span></a></p></body></html> %1 will be remplaced by the website into the corresponding languages - %1 sarà rimpiazzato dal sito italiano + %1 sarà rimpiazzato dal sito in lingua corrispondente <html><head/><body><p>Per ulteriori informazioni consultare il sito <a href="%1"><span style=" text-decoration: underline; color:#0057ae;">%1</span></a></p></body></html> ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1128,12 +1067,12 @@ Compilata come versione: %1. LocalListener - + Warning - Avviso + Attenzione - + Timeout while recomposing data from connected clients Tempo scaduto durante la ricomposizione dei dati dai client collegati @@ -1150,90 +1089,106 @@ Compilata come versione: %1. Log file already open, error: %1 - File log già aperto, errore: %1 + File log già aperto, errore %1 Unable to open the log file, error: %1 - Impossibile aprire il file di log, errore: %1 + Impossibile aprire il file di log, errore %1 MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific Warning - Avviso + Attenzione + + + + Classic + Classic + + + + Modern + Modern - + Don't show again - Non visualizzare più questo messaggio + Non visualizzare di nuovo - + Ok Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. - Il ripristino del sistema predefinito di copia/spostamento non è supportato dal file manager (Dolphin, Nautilus, ...).<br />Chiedere supporto allo sviluppatore.<br />Bisogna fare la copia/spostamento manuale. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. + Il rimpiazzo del sistema di copia e spostamento predefinito non è supportato dal file manager (Dolphin, Nautilus, ...)<br />Chiedere allo sviluppatore del vostro file manager di supportarlo.<br />Dovete copiare/spostare manualmente. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - Riavviare il sistema, se in precedenza avevi installato un software simile a questo (come Teracopy, Supercopier o una versione precedente di Ultracopier). + Riavviare il sistema, se in precedenza avevate installato un software simile a questo (Teracopy, Supercopier o una versione precedente di Ultracopier) - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - Il ripristino del sistema predefinito di copia/spostamento non è supportato, quindi viene bloccato dal finder of Mac OS X.<br />Chiedere supporto allo sviluppatore.<br />Sarà possibile la copia/spostamento manuale cliccando col tasto destro del mouse sull'icona della barra di sistema vicina all'orologio (non l'icona dock). + Il rimpiazzo del sistema di copia e spostamento predefinito non è supportato, quindi viene bloccato dal finder di Mac OS X.<br />Chiedere supporto allo sviluppatore.<br />Sarà possibile copiare/spostare manualmente cliccando col tasto destro del mouse sull'icona della barra applicazioni di sistema - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - Il ripristino del sistema predefinito di copia/spostamento potrebbe non essere supportato dal file manager.<br />Chiedere supporto allo sviluppatore.<br />Bisogna fare la copia/spostamento manuale. + Il rimpiazzo del sistema di copia e spostamento predefinito potrebbe non essere supportato dal file manager.<br />Chiedere supporto allo sviluppatore.<br />Necessario usare copia/spostamento manuale - + Consider Supercopier as deprecated, prefer Ultracopier - + Considerate Supercopier deprecato, favorite Ultracopier @@ -1252,18 +1207,18 @@ Compilata come versione: %1. Plugins - I plug-in + Plug-in - - + + Copy engine - Motore per la copia + Motore di copia - + Themes Temi @@ -1280,267 +1235,282 @@ Compilata come versione: %1. Portable (need restart) - + Portatile (necessita riavvio) - + Name Nome - + Version Versione - + Language Lingua - - + + Listener Rilevatore - - + + Plugin loader - Caricatore di plug-in + Caricatore dei plug-in - - + + Session loader Caricatore di sessione Force the language - Utilizza la lingua + Forzare lingua Replace the default copy and move system - Ripristina il sistema di copia e spostamento predefinito + Rimpiazzare sistema di copia e spostamento predefinito Load at the session loading - Carica il programma all'avvio di sistema + Caricare il programma all'avvio di sistema When manual open - Se avviato manualmente + Con avvio manuale Group the windows when - Quando raggruppare le finestre + Raggruppare finestre quando Confirm to group the windows - Conferma il raggruppamento delle finestre + Conferma raggruppamento finestre Display the OS warning - Mostra l'avviso del Sistema Operativo + Mostrare avviso del Sistema Operativo Remaining time algorithm - + Algoritmo tempo rimanente Traditional - + Tradizionale Logarithmic - + Logaritmico - + + default: finish.opus + Predefinito: finish.opus + + + + Play + Riproduci + + + + Sound when finish + Suono al completamento + + + Plugin Plug-in - + Add Aggiungi - + Remove Elimina - + Information Informazioni - + Copy engine by order of preference: - Motore per la copia in ordine di preferenza: + Motore di copia in ordine di preferenza: - + Client connected Client connessi - + Themes: Temi: - + Unable to load the themes plugin Impossibile caricare il plug-in dei temi - + No option for this plugin - Non ci sono opzioni per questo plug-in + Nessuna opzione per questo plug-in - + Browse Sfoglia - + Write the transfers Scrivere i trasferimenti - + Write the folder operations Scrivere le operazioni di cartella - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated %time%, %source%, %size%, %destination% non dovranno essere tradotti - Le variabili sono %time%, %source%, %size%, %destination% + Le variabili sono: %time%, %source%, %size%, %destination% - + Write the errors Scrivere gli errori - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated %time%, %path%, %size%, %mtime%, %error% non dovranno essere tradotti - Le variabili sono %time%, %path%, %size%, %mtime%, %error% + Le variabili sono: %time%, %path%, %size%, %mtime%, %error% - + Write the log file into: Scrivere il file di log in: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - Scrivere direttamente il file quando si riceve una nuova voce (può causare il 50% di perdita di prestazioni) + Scrivere direttamente nel file quando si riceve una nuova voce (può causare il 50% di perdita di prestazioni) - - + + Load Carica - + Load the theme? - Caricare i temi? + Caricare il tema? - + Load the language? Caricare questa lingua? - + Do nothing Non fare nulla - + Ask source as folder - Chiedere la cartella di origine + Chiedi cartella come origine - + Ask sources as files - Chiedere i file di origine + Chiedi file come origine - + Never Mai - + When source is same - Quando la cartella di origine è uguale + Quando l'origine è identica - + When destination is same - Quando la cartella di destinazione è uguale + Quando la destinazione è identica - + When source and destination are same - Quando sia le cartelle di origine che di destinazione sono uguali + Quando sia lorigine che la destinazione sono identiche - + When source or destination are same - Quando le cartelle di origine o di destinazione coincidono + Quando l'origine o la destinazione sono identiche - + Always Sempre - - - + + + The variables are %1 - Le variabili sono %1 + Le variabili sono: %1 - + Save logs as: - Salvare i log come: + Salva i log come: - + Synchronized log Log sincronizzato - + The variables are %path%, %operation% %path%, %operation% should not be translated %path% e %operation%, non dovranno essere tradotti - Le variabili sono %path%, %operation% + Le variabili sono: %path%, %operation% @@ -1612,7 +1582,7 @@ Compilata come versione: %1. Copy engine - Motore per la copia + Motore di copia @@ -1668,33 +1638,33 @@ Compilata come versione: %1. informations.xml non è accessibile - + Dependencies part is wrong Alcune dipendenze non sono idonee - + Dependencies %1 are not satisfied, for plugin: %2 - Le dipendenze %1 per il plug-in: %2, non sono soddisfatte + Le dipendenze %1 per il plug-in %2 non sono soddisfatte - + Remove %1 - Elimina %1 + Eliminare %1 - + Error Errore - + Error while the removing plugin, please check the rights on the folder: %1 - + Errore nella rimozione del plug-in, Si prega di controllare i diritti sulla cartella "%1" - + Information Informazioni @@ -1706,101 +1676,97 @@ Compilata come versione: %1. informations.xml not found for the plugin - informations.xml non trovato per il plug-in + informations.xml non rilevato per il plug-in "package" root tag not found for the xml file - Tag root "package" non trovato nel file xml + Tag root "Package" non rilevato nel file xml - + Duplicated plugin found, already loaded! - Trovato plug-in duplicato, già caricato! + Rilevato plug-in duplicato. Già caricato! - + English text missing in the informations.xml for the tag: %1 - Testo in inglese mancante in informations.xml per il tag: %1 + Testo inglese mancante in informations.xml per il tag %1 - + Tag not found: %1 Tag non trovato: %1 - + Are you sure about removing "%1" in version %2? Si desidera eliminare "%1" nella versione %2? - + Previous import is in progress... Importazione precedente in corso ... - + Open Ultracopier plugin Apri plug-in di Ultracopier - + Ultracopier plugin (*.urc) Plug-in di Ultracopier (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader Caricatore di plug-in - + Unable to open the plugin: %1 - Impossibile aprire il plug-in: %1 + Impossibile aprire il plug-in "%1" - - - + + + Unable to load the plugin content, please check it: %1 - Impossibile caricare il contenuto del plug-in, si prega di controllare: %1 + Impossibile caricare il contenuto del plug-in, si prega di controllare: "%1" - + Unable to create a folder to install the plugin: %1 - Impossibile creare una cartella per installare il plug-in: -%1 + Impossibile creare una cartella per installare il plug-in %1 - + Unable to create a file to install the plugin: %1 since:%2 - Impossibile creare un file per installare il plug-in: -%1 -da: %2 + Impossibile creare un file per installare il plug-in %1 da %2 - + Folder with same name is present, skip the plugin installation: %1 - E' presente una cartella con lo stesso nome, non sarà installato il plug-in: -%1 + Presente cartella con identico nome, non sarà installato il plug-in "%1" - - - + + + Unable to load the plugin content, please check it Impossibile caricare il contenuto del plug-in, si prega di controllare @@ -1811,17 +1777,17 @@ da: %2 Product key - + Chiave prodotto Error - Errore + Errore Your product key was rejected.<br />If you buy key, unmark check your spam and unmark the mail as spam<br />If you have not buy your key, go to <a href="https://shop.first-world.info/">https://shop.first-world.info/</a> - + La vostra chiave prodotto è stata rigettata.<br />Se avete comprato la chiave controllare la cartella spam della vostra casella email.<br />Se non avete comprato la chiave, andare su <a href="https://shop.first-world.info/">https://shop.first-world.info/</a> @@ -1851,7 +1817,7 @@ da: %2 Unsupported options in the .xz headers - Opzioni non supportate nelle intestazioni .xz + Opzioni non supportate nelle intestazioni del file .xz @@ -1866,30 +1832,23 @@ da: %2 The input data is too short - I dati inseriti sono troppo pochi + I dati inseriti sono troppo corti ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1897,267 +1856,240 @@ da: %2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - Nessuna copia del rilevatore trovata. Fare una copia manualmente cliccando col tasto destro del mouse sull'icona nella barra di sistema. + Nessun rilevatore di copia trovato. Fare una copia manualmente cliccando col tasto destro del mouse sull'icona nell'area di notifica - + Information Informazioni - + Searching information... - Ricerca informazioni... + Cercando informazioni... - + Do not replace the explorer copy/move - Non ripristinare la copia/spostamento di Windows explorer + Non rimpiazzare il sistema di copia/spostamento di Windows Explorer - + Semi replace the explorer copy/move - Ripristinare parzialmente la copia/spostamento di Windows explorer + Rimpiazza parzialmente il sistema di copia/spostamento di Windows Explorer - + Replace the explorer copy/move - Ripristina la copia/spostamento di Windows explorer + Rimpiazza il sistema di copia/spostamento di Windows Explorer - + Warning - Avviso + Attenzione - + The action on the systray icon is unknown! - + Azione su icona dell'area di notifica sconosciuta! - + &About/Debug report - + Rapporto di debug/informazioni - + &About - + Al riguardo - + &Save bug report - + Salva rapporto bug - + &Quit - + Uscire - + &Options - + Opzioni - + &Product key - + Chiave prodotto - + New version: %1 - + Nuova versione: %1 - + Go to the download page: - + Vai alla pagina di scaricamento: - + A&dd copy/moving - + Aggiungi copia/spostamento - + Add &copy - + Aggiungi copia - + Add &transfer - + Aggiungi trasferimento - + Add &move - + Aggiungi spostamento Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2190,323 +2122,243 @@ da: %2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer Trasferisci - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - KB - - - - Block size + + Inode threads - - Sequential buffer - + + + MB + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse Sfoglia - + Filters @@ -2514,67 +2366,67 @@ da: %2 fileErrorDialog - + Error with file - + Error Errore - + Size Dimensione - + Modified - + File name - + Destination - Cartella di destinazione + Destinazione - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2582,141 +2434,153 @@ da: %2 fileExistsDialog - + The file exists - + Source - Cartella di origine + Origine - + Destination - Cartella di destinazione + Destinazione - - + + Size Dimensione - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - Sovrascrivi se più recente + Sovrascrivere se più recente - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size Dimensione - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2724,65 +2588,65 @@ da: %2 folderExistsDialog - + The source and destination is identical - + Source - Cartella di origine + Origine - + Destination - Cartella di destinazione + Destinazione - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip Salta - + &Cancel @@ -2832,7 +2696,7 @@ da: %2 Transfer list - Lista dei trasferimenti + Lista di trasferimento @@ -2903,12 +2767,12 @@ da: %2 Source - Cartella di origine + Origine Destination - Cartella di destinazione + Destinazione diff --git a/plugins/Languages/ja/flag.png b/plugins/Languages/ja/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/ja/informations.xml b/plugins/Languages/ja/informations.xml old mode 100644 new mode 100755 index d54bd12..7eccb7e --- a/plugins/Languages/ja/informations.xml +++ b/plugins/Languages/ja/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 jp diff --git a/plugins/Languages/ja/translation.qm b/plugins/Languages/ja/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/ja/translation.qm differ diff --git a/plugins/Languages/ja/translation.ts b/plugins/Languages/ja/translation.ts old mode 100644 new mode 100755 index bce88f7..a36d3a5 --- a/plugins/Languages/ja/translation.ts +++ b/plugins/Languages/ja/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -980,82 +925,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1271,54 +1227,54 @@ This version is compiled as version: %1. - + Name - + Version - + Language - + Client connected - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1378,157 +1334,172 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Themes: - + Unable to load the themes plugin - + No option for this plugin - + Browse - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/ko/flag.png b/plugins/Languages/ko/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/ko/informations.xml b/plugins/Languages/ko/informations.xml old mode 100644 new mode 100755 index b101bc7..ca7bdf8 --- a/plugins/Languages/ko/informations.xml +++ b/plugins/Languages/ko/informations.xml @@ -13,7 +13,7 @@ - 1.6.1.3 + 2.2.4.4 ko diff --git a/plugins/Languages/ko/translation.qm b/plugins/Languages/ko/translation.qm new file mode 100755 index 0000000..d35f3f2 Binary files /dev/null and b/plugins/Languages/ko/translation.qm differ diff --git a/plugins/Languages/ko/translation.ts b/plugins/Languages/ko/translation.ts old mode 100644 new mode 100755 index 7199299..bd3227f --- a/plugins/Languages/ko/translation.ts +++ b/plugins/Languages/ko/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip 건너뛰기 - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip 건너뛰기 - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning 알림 - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! 호환되는 엔진을 찾을 수 없습니다! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error 오류 - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error 오류 - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted 인터페이스를 불러올 수 없음, 복사가 취소되었습니다 - + Unable to load the copy engine, copy aborted 복사 엔진을 불러올 수 없음, 복사가 취소되었습니다 - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine 복사 엔진 - + Copy a copy 복사 - + Move a move 이동 - + Pause 일시 중지 - + Resume 다시 시작 - - + + Skip 건너뛰기 - + Unlimited 무제한 - + s - + Too big 너무 큽니다 - + B B - + KB KB - + MB MB - + GB GB - + TB TB - + PB PB - + EB EB - + ZB ZB - + YB YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error 오류 - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error 오류 - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error 오류 - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error 오류 - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -980,82 +925,77 @@ This version is compiled as version: %1. - + About Qt Qt에 대해 - + Check update - + Do a crash 충돌 발생시 - + Save bug report 버그 보고서 저장 - + Close 닫기 - - About Supercopier - - - - + For http://portableapps.com/ http://portableapps.com을 위해 - + Portable and all in one version - + Portable version 포터블 버전 - + All in one version - + Normal version 일반 버전 - + http://ultracopier.first-world.info/ http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning 알림 - + Timeout while recomposing data from connected clients 연결된 클라이언트로부터 데이터를 재구성하는 동안에 시간이 초과되었습니다 @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. 알림 - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine 복사 엔진 - + Themes 테마 @@ -1281,54 +1237,54 @@ This version is compiled as version: %1. - + Name 이름 - + Version 버전 - + Language 언어 - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated - - + + Listener 리스너 - - + + Plugin loader 플러그인 로더 - - + + Session loader 섹션 로더 @@ -1378,157 +1334,172 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin 플러그인 - + Add 추가 - + Remove 제거 - + Information 정보 - + Copy engine by order of preference: 복사 엔진 순서 환경 설정: - + Client connected - + Themes: 테마: - + Unable to load the themes plugin 테마 플러그인을 불러올 수 없습니다 - + No option for this plugin 이 플러그인에 대한 옵션이 없습니다 - + Browse 찾아보기 - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated 변수는 %time%, %source%, %size%, %destination% 입니다 - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated 변수는 %time%, %path%, %size%, %mtime%, %error% 입니다 - + Write the log file into: 로그 파일 작성: - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: 로그 따로 저장: - + Synchronized log 로그 동기화됨 @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. informations.xml 파일에 연결할 수 없습니다 - + Dependencies part is wrong 종속된 부분이 잘못되었습니다 - + Dependencies %1 are not satisfied, for plugin: %2 플러그인 %2에 대한 %1 종속성이 충족되지 않습니다 - + Remove %1 %1 제거 - + Error 오류 - + Error while the removing plugin, please check the rights on the folder: %1 - + Information 정보 @@ -1704,75 +1675,75 @@ This version is compiled as version: %1. xml 파일을 위한 "패키지" 루트 태그를 찾을 수 없습니다 - + Duplicated plugin found, already loaded! 중복된 플러그인 발견, 이미 호출되었습니다! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 태그를 찾을 수 없음: %1 - + Are you sure about removing "%1" in version %2? %2 버전에서 %1을 제거하시겠습니까? - + Previous import is in progress... 이전의 가져오기가 진행중입니다... - + Open Ultracopier plugin Ultracopier 플러그인 열기 - + Ultracopier plugin (*.urc) Ultracopier (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader 플러그인 로더 - + Unable to open the plugin: %1 플러그인 열기 불가: %1 - - - + + + Unable to load the plugin content, please check it: %1 플러그인 내용을 불러올 수 없습니다. 확인해주십시오: %1 - + Unable to create a folder to install the plugin: %1 플러그인을 설치할 폴더를 생성할 수 없음: %1 - + Unable to create a file to install the plugin: %1 since:%2 @@ -1781,16 +1752,16 @@ since:%2 since:%2 - + Folder with same name is present, skip the plugin installation: %1 동일한 이름의 폴더가 존재합니다. 플러그인 설치 건너뛰기: %1 - - - + + + Unable to load the plugin content, please check it 플러그인 컨태츠를 불러올 수 없습니다. 확인해주십시오 @@ -1862,24 +1833,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1887,198 +1851,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. 복사 리스너를 찾을 수 없습니다. 트레이 아이콘에서 우클릭하여 수동으로 복사하십시오. - + Information 정보 - + Searching information... 정보 검색중... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning 알림 - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2086,68 +2035,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2180,323 +2117,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - KB - - - - Block size + + Inode threads - - Sequential buffer - + + + MB + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse 찾아보기 - + Filters @@ -2504,67 +2361,67 @@ since:%2 fileErrorDialog - + Error with file - + Error 오류 - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2572,141 +2429,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2714,65 +2583,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip 건너뛰기 - + &Cancel diff --git a/plugins/Languages/nl/flag.png b/plugins/Languages/nl/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/nl/informations.xml b/plugins/Languages/nl/informations.xml old mode 100644 new mode 100755 index 98c307a..9b84641 --- a/plugins/Languages/nl/informations.xml +++ b/plugins/Languages/nl/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 nl diff --git a/plugins/Languages/nl/translation.qm b/plugins/Languages/nl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/nl/translation.qm differ diff --git a/plugins/Languages/nl/translation.ts b/plugins/Languages/nl/translation.ts old mode 100644 new mode 100755 index cb636cf..b64f48b --- a/plugins/Languages/nl/translation.ts +++ b/plugins/Languages/nl/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/no/flag.png b/plugins/Languages/no/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/no/informations.xml b/plugins/Languages/no/informations.xml old mode 100644 new mode 100755 index 6e7ecff..d6b2bb2 --- a/plugins/Languages/no/informations.xml +++ b/plugins/Languages/no/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 no diff --git a/plugins/Languages/no/translation.qm b/plugins/Languages/no/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/no/translation.qm differ diff --git a/plugins/Languages/no/translation.ts b/plugins/Languages/no/translation.ts old mode 100644 new mode 100755 index cb636cf..b64f48b --- a/plugins/Languages/no/translation.ts +++ b/plugins/Languages/no/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/pl/flag.png b/plugins/Languages/pl/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/pl/informations.xml b/plugins/Languages/pl/informations.xml old mode 100644 new mode 100755 index 0afef03..3d0dbd0 --- a/plugins/Languages/pl/informations.xml +++ b/plugins/Languages/pl/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 pl diff --git a/plugins/Languages/pl/translation.qm b/plugins/Languages/pl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/pl/translation.qm differ diff --git a/plugins/Languages/pl/translation.ts b/plugins/Languages/pl/translation.ts old mode 100644 new mode 100755 index cb636cf..b64f48b --- a/plugins/Languages/pl/translation.ts +++ b/plugins/Languages/pl/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/pt/flag.png b/plugins/Languages/pt/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/pt/informations.xml b/plugins/Languages/pt/informations.xml old mode 100644 new mode 100755 index eb40152..a1ba519 --- a/plugins/Languages/pt/informations.xml +++ b/plugins/Languages/pt/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 pt diff --git a/plugins/Languages/pt/translation.qm b/plugins/Languages/pt/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/pt/translation.qm differ diff --git a/plugins/Languages/pt/translation.ts b/plugins/Languages/pt/translation.ts old mode 100644 new mode 100755 index cb636cf..b64f48b --- a/plugins/Languages/pt/translation.ts +++ b/plugins/Languages/pt/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/ru/flag.png b/plugins/Languages/ru/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/ru/informations.xml b/plugins/Languages/ru/informations.xml old mode 100644 new mode 100755 index f34d54e..f2adff0 --- a/plugins/Languages/ru/informations.xml +++ b/plugins/Languages/ru/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 ru diff --git a/plugins/Languages/ru/translation.qm b/plugins/Languages/ru/translation.qm new file mode 100755 index 0000000..340a846 Binary files /dev/null and b/plugins/Languages/ru/translation.qm differ diff --git a/plugins/Languages/ru/translation.ts b/plugins/Languages/ru/translation.ts old mode 100644 new mode 100755 index 6bc6e2d..fb0fb51 --- a/plugins/Languages/ru/translation.ts +++ b/plugins/Languages/ru/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - Не поддерживается на этой платформе - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination назначение - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask просить - - - - + + + + Skip пропускать - + Merge - - + + Rename переименовать - + Put at the end - + Overwrite переписывать - + Overwrite if different - + Overwrite if newer Заменить, если новее - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask просить - - - - + + + + Skip пропускать - + Merge - - + + Rename переименовать - + Put at the end - + Overwrite переписывать - + Overwrite if different - + Overwrite if newer Заменить, если новее - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning Предупреждение - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! Не могу найти любой совместимый двигатель! - + Cannot find any engine with this name: %1 Не могу найти любой двигатель с таким именем: %1 @@ -352,12 +292,12 @@ CopyListener - + Error ошибка - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error ошибка - - - - - - - - + + + + + + + + Unable to get a copy engine instance Не удалось получить экземпляр копии двигателей - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted Не удалось загрузить интерфейс, копирование прервана - + Unable to load the copy engine, copy aborted Не удается загрузить копию двигателя, скопируйте прервана - + Transfer mode режим передачи @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine Копировать двигатель - + Copy a copy копия - + Move a move двигаться - + Pause пауза - + Resume резюме - - + + Skip пропускать - + Unlimited неограниченный - + s - + Too big Слишком большой - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds Менее %10 секунд - + About %10 seconds remaining О %10 секунды осталось - + About %1 minutes remaining О %1 минуты до конца - + About %1 hours remaining О %1 часов, оставшихся - + Transfer a transfer - + Start - + Source источник - + Size размер - + Destination назначение - + Quit выход - + Target цель - - + + Time remaining: Оставшееся время: - + Listing список - + Copying копирование - + Listing and copying Листинг и копирования - + + Remaining: + + + + Ask просить - + Overwrite переписывать - + Overwrite if newer Заменить, если новее - + Overwrite if the last modification dates are different Заменить, если последняя даты модификации отличаются - + Rename переименовать - + Put to the end of the list - + Completed in %1 - + Select source directory Выберите исходный каталог - + Select destination directory Выберите папку назначения - + Internal error Внутренняя ошибка - + Select one or more files to open Выберите один или более файлов, чтобы открыть - + All files Все файлы - + Save transfer list Сохранить трансфер - + Open transfer list Откройте трансфер - + Transfer list Передача списка - + Error ошибка - + Not supported on this platform Не поддерживается на этой платформе @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error ошибка - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error ошибка - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error ошибка - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt О Qt - + Check update - + Do a crash У аварии - + Save bug report Сохранить отчет об ошибке - + Close закрывать - - About Supercopier - - - - + For http://portableapps.com/ для http://portableapps.com/ - + Portable and all in one version - + Portable version Портативная версия - + All in one version - + Normal version Нормальная версия - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning Предупреждение - + Timeout while recomposing data from connected clients Тайм-аут в то время как композицию кадра данных из подключенных клиентов @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. Предупреждение - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine Копировать двигатель - + Themes Темы @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name имя - + Version версия - + Language язык - - + + Listener слушатель - - + + Plugin loader плагин погрузчика - - + + Session loader сессия погрузчика @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin плагин - + Add добавлять - + Remove удаление - + Information информация - + Copy engine by order of preference: Скопируйте двигателя порядке предпочтения: - + Client connected - + Themes: Темы: - + Unable to load the themes plugin Не удается загрузить плагин темы - + Browse просматривать - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated Переменные are %time%, %source%, %size%, %destination% - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated Переменные %time%, %path%, %size%, %mtime%, %error% - + Write the log file into: Запись в файл журнала: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing ничего не делать - + Ask source as folder Спросите источника папку - + Ask sources as files Спросите источников в виде файлов - + Never никогда - + When source is same Когда же источник - + When destination is same Когда же назначения - + When source and destination are same Когда источника и назначения те же - + When source or destination are same Когда источника или назначения те же - + Always всегда - - - + + + The variables are %1 - + Save logs as: Сохранить журналы, как: - + Synchronized log Синхронное журнала - + No option for this plugin Нет опции для этого плагина - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated Переменные %path%, %operation% @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. informations.xml не доступен - + Dependencies part is wrong Зависимости часть неправильно - + Dependencies %1 are not satisfied, for plugin: %2 Зависимости %1 не выполняется, для плагина: %2 - + Remove %1 удаление: %1 - + Error ошибка - + Error while the removing plugin, please check the rights on the folder: %1 - + Information информация @@ -1704,75 +1675,75 @@ This version is compiled as version: %1. "package" Корневой тег не найден для XML-файла - + Duplicated plugin found, already loaded! Дублированный плагин нашел, уже загружены! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 Тег не найден: %1 - + Are you sure about removing "%1" in version %2? Вы уверены, что об удалении "%1" в версии %2? - + Previous import is in progress... Предыдущая импорта идет ... - + Open Ultracopier plugin Открытое плагин Ultracopier - + Ultracopier plugin (*.urc) Ultracopier плагина (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader плагин погрузчика - + Unable to open the plugin: %1 Невозможно открыть плагин: %1 - - - + + + Unable to load the plugin content, please check it: %1 Не удается загрузить плагин содержания, пожалуйста, проверьте его: %1 - + Unable to create a folder to install the plugin: %1 Невозможно создать папку для установки плагина: %1 - + Unable to create a file to install the plugin: %1 since:%2 @@ -1781,16 +1752,16 @@ since:%2 С: %2 - + Folder with same name is present, skip the plugin installation: %1 Папка с таким же именем существует, пропустить установки плагина: %1 - - - + + + Unable to load the plugin content, please check it Не удается загрузить плагин содержания, пожалуйста, проверьте его @@ -1862,24 +1833,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1887,198 +1851,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. Нет копии слушатель найдено. Сделайте копию вручную, щелкните правой кнопкой мыши один из иконки в системном трее. - + Information информация - + Searching information... Поиск информации ... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning Предупреждение - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2086,68 +2035,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2180,323 +2117,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse просматривать - + Filters @@ -2504,67 +2361,67 @@ since:%2 fileErrorDialog - + Error with file - + Error ошибка - + Size размер - + Modified - + File name - + Destination назначение - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2572,141 +2429,153 @@ since:%2 fileExistsDialog - + The file exists - + Source источник - + Destination назначение - - + + Size размер - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer Заменить, если новее - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size размер - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2714,65 +2583,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source источник - + Destination назначение - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip пропускать - + &Cancel diff --git a/plugins/Languages/th/flag.png b/plugins/Languages/th/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/th/informations.xml b/plugins/Languages/th/informations.xml old mode 100644 new mode 100755 index 56eab32..ba01fb7 --- a/plugins/Languages/th/informations.xml +++ b/plugins/Languages/th/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 th diff --git a/plugins/Languages/th/translation.qm b/plugins/Languages/th/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/th/translation.qm differ diff --git a/plugins/Languages/th/translation.ts b/plugins/Languages/th/translation.ts old mode 100644 new mode 100755 index cb636cf..b64f48b --- a/plugins/Languages/th/translation.ts +++ b/plugins/Languages/th/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/tr/flag.png b/plugins/Languages/tr/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/tr/informations.xml b/plugins/Languages/tr/informations.xml old mode 100644 new mode 100755 index 7048279..499dac8 --- a/plugins/Languages/tr/informations.xml +++ b/plugins/Languages/tr/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 tr diff --git a/plugins/Languages/tr/translation.qm b/plugins/Languages/tr/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Languages/tr/translation.qm differ diff --git a/plugins/Languages/tr/translation.ts b/plugins/Languages/tr/translation.ts old mode 100644 new mode 100755 index cb636cf..b64f48b --- a/plugins/Languages/tr/translation.ts +++ b/plugins/Languages/tr/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier @@ -974,82 +919,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes @@ -1281,38 +1237,38 @@ This version is compiled as version: %1. - + Name - + Version - + Language - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1362,172 +1318,187 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Client connected - + Themes: - + Unable to load the themes plugin - + Browse - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log - + No option for this plugin - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Languages/zh/flag.png b/plugins/Languages/zh/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/zh/informations.xml b/plugins/Languages/zh/informations.xml old mode 100644 new mode 100755 index 897bb58..21f5d82 --- a/plugins/Languages/zh/informations.xml +++ b/plugins/Languages/zh/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 ch diff --git a/plugins/Languages/zh/translation.qm b/plugins/Languages/zh/translation.qm new file mode 100755 index 0000000..e866968 Binary files /dev/null and b/plugins/Languages/zh/translation.qm differ diff --git a/plugins/Languages/zh/translation.ts b/plugins/Languages/zh/translation.ts old mode 100644 new mode 100755 index 8c7df64..0beabf9 --- a/plugins/Languages/zh/translation.ts +++ b/plugins/Languages/zh/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,70 @@ CopyEngineFactory - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +256,30 @@ CopyEngineManager - - - - + + + + Warning 警告 - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +287,12 @@ CopyListener - + Error - + Error during the reception of the copy/move list %1 @@ -366,72 +301,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +374,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +402,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error - + Not supported on this platform - + Completed in %1 @@ -725,12 +665,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +678,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -761,22 +701,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -784,77 +724,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +802,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +863,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error - + Try rename with using special characters @@ -951,7 +891,7 @@ HelpDialog - + About Ultracopier @@ -980,82 +920,82 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close - + About Supercopier - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,52 @@ This version is compiled as version: %1. 警告 - + + Classic + + + + + Modern + + + + + Supercopier + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1210,14 @@ This version is compiled as version: %1. - + Copy engine - + Themes @@ -1271,53 +1232,53 @@ This version is compiled as version: %1. - + Name - + Version - + Language - + Client connected - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated - + Listener - + Plugin loader - + Session loader @@ -1378,79 +1339,89 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Themes: - + Unable to load the themes plugin - + No option for this plugin - + Browse - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: @@ -1523,12 +1494,12 @@ This version is compiled as version: %1. - + Save logs as: - + Synchronized log @@ -1658,27 +1629,27 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error - + Information @@ -1698,95 +1669,95 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Error while the removing plugin, please check the rights on the folder: %1 - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1810,6 +1781,19 @@ since:%2 + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + QXzDecode @@ -1856,225 +1840,193 @@ since:%2 - ReadThread - - - Internal error, please report it! - - - - - Internal error reading the source file:block size out of range - - + RadialMap::Widget - - - Unable to read the source file: - - - - - - File truncated during the read, possible data change + + + into %1 files RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning 警告 - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,93 +2034,82 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - - %1 %2% of %3 + + + + %1 %2% of %3 into %4 files ThemesFactory - + Don't close if errors are found - + Never close - + Always close - - - + + + Select a color @@ -2176,323 +2117,173 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist - - - - - Another file exists at same place - - - - - The checksums do not match - - - - - Internal error: The destination is not closed + + %name% - copy%suffix% - - Internal error: The size transfered doesn't match + + %name% - copy (%number%)%suffix% - - Internal error: The buffer is not empty + + + File not found - - - + + Unable to change the date - WriteThread + TransferThreadAsync - - Path resolution error (Empty path) - - - - - Internal error, please report it! + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Unable to read the source file: + + + Unable to create the destination folder: - - File truncated during read, possible data change + + + Unable to create the destination folder, errno: %1 copyEngineOptions - + Transfer - - Move the whole folder + + Keep the file date - - Transfer the file rights + + + Less performance if checked - - Keep the file date + + Follow the strict order - - Autostart the transfer + + Move the whole folder - - - Less performance if checked + + Transfer the file rights - - Follow the strict order + + Create full path if not exists - + Error and collision - + When folder error - + When file error - + When file collision - + When folder collision - + Check if destination folder exists - + Renaming rules - + Delete partially transferred files - + Rename the original destination - - Control - - - - - Checksum - - - - - Only after error - - - - - Ignore if impossible - - - - - Verify checksums - - - - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size - - - - - Sequential buffer - - - - - Enable OS buffer - - - - - OS buffer only if smaller than - - - - - Transfer algorithm - - - - - Parallelize if smaller than - - - - - Inode threads (unsafe > 1) - - - - - - More cpu, but better organisation on the disk + + Inode threads - - Order the list + + Buffer - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2291,67 @@ since:%2 fileErrorDialog - + Error with file - + Error - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,88 +2359,88 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older @@ -2657,52 +2448,52 @@ since:%2 fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2501,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel @@ -2776,158 +2567,163 @@ since:%2 interfaceCopy - - From: + + 0 - - To: + + 100MB+ - - Close on transfer completion + + &More - - &More + + &Pause - - &Pause + + Close on transfer completion - + + From: + + + + &Skip - + &Cancel - + Limit copy speed to: - + Transfer list - + Move the selected items to the top - + Move up the selected items - + Move down the selected items - + Move the selected items to the bottom - + Add file/folder - + Delete the selected items - + Search - + Export the transfer list - + Import the transfer list - + Previous - + Next - - + + Error - + Export the errors into transfer list - + Source - + Destination - + Interface - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder @@ -2935,43 +2731,38 @@ since:%2 options - - KB/s + + Speed with progress bar - - Progression color + + Show speed as main information - - - Limit copy speed at: + + Progression color - - Speed with progress bar + + + Limit copy speed at: - - Start with the "more button" pushed + + KB/s - + Show dual progression - - Show speed as main information - - - - + At the end of the copy: @@ -2979,88 +2770,93 @@ since:%2 themesOptions - + Use - - Start minimized + + Minimize on close to systray - - Minimize on close to systray + + + Limit copy speed to - + At the end of the copy - - - Limit copy speed to + + KB/s - - KB/s + + Start with the "more button" pushed - - Start with the "more button" pushed + + Start minimized - + Always on top - + Save position - + + Dark UI + + + + Informations - + Show speed as main information - + Display - + Speed with progress bar - + Show dual progression - + Show progression in the title - + Progression color - + Click to edit the color diff --git a/plugins/Languages/zh_TW/flag.png b/plugins/Languages/zh_TW/flag.png old mode 100644 new mode 100755 diff --git a/plugins/Languages/zh_TW/informations.xml b/plugins/Languages/zh_TW/informations.xml old mode 100644 new mode 100755 index 8d1a3d0..e06a397 --- a/plugins/Languages/zh_TW/informations.xml +++ b/plugins/Languages/zh_TW/informations.xml @@ -12,7 +12,7 @@ - 1.6.1.3 + 2.2.4.4 zh_tw diff --git a/plugins/Languages/zh_TW/translation.qm b/plugins/Languages/zh_TW/translation.qm new file mode 100755 index 0000000..0d07322 Binary files /dev/null and b/plugins/Languages/zh_TW/translation.qm differ diff --git a/plugins/Languages/zh_TW/translation.ts b/plugins/Languages/zh_TW/translation.ts old mode 100644 new mode 100755 index 62c72d5..5d4de45 --- a/plugins/Languages/zh_TW/translation.ts +++ b/plugins/Languages/zh_TW/translation.ts @@ -1,41 +1,6 @@ - - AvancedQFile - - - - - Not supported on this platform - - - - - Last modified date is wrong - - - - - Last access date is wrong - - - - - Unknown error: %1 - - - - - Path conversion error - - - - - Unknown error - - - CliParser @@ -128,106 +93,91 @@ CopyEngine - - + + The engine is forced to move, you can't copy with it - - + + The engine is forced to copy, you can't move with it - + Destination - + Use the actual destination "%1"? - + The mode has been forced previously. This is an internal error, please report it - - - - + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - + Options error - + Options engine is not loaded. Unable to access the filters @@ -235,85 +185,75 @@ CopyEngineFactory - - - - + + Supported only on Windows + + + + + + + Ask - - - - + + + + Skip - + Merge - - + + Rename - + Put at the end - + Overwrite - + Overwrite if different - + Overwrite if newer - + Overwrite if older - - Automatic - - - - - Sequential - - - - - Parallel - - - - - + + Options error - + Options engine is not loaded. Unable to access the filters - + Options engine is not loaded, can't access to the filters @@ -321,30 +261,30 @@ CopyEngineManager - - - - + + + + Warning 警告 - + Cannot find any copy engine with move support - + This copy engine does not support move - + Cannot find any compatible engine! - + Cannot find any engine with this name: %1 @@ -352,12 +292,12 @@ CopyListener - + Error 錯誤 - + Error during the reception of the copy/move list %1 @@ -366,72 +306,72 @@ Core - - - - - - - - - - - - - + + + + + + + + + + + + + Error 錯誤 - - - - - - - - + + + + + + + + Unable to get a copy engine instance - + Group window - + Do you want group the transfer with another actual running transfer? - + Unable to get a engine instance - + The argument for the mode is not valid - + Do you want to copy? If no, it will be moved. - - + + Unable to load the interface, copy aborted - + Unable to load the copy engine, copy aborted - + Transfer mode @@ -439,27 +379,27 @@ DiskSpace - + Disk space - + You need more space on this drive to finish this transfer - + Continue - + Cancel - + Drives %1 have %2 available but need %3 @@ -467,257 +407,262 @@ FacilityEngine - + Copy engine - + Copy a copy - + Move a move - + Pause - + Resume - - + + Skip - + Unlimited - + s - + Too big - + B - + KB - + MB - + GB - + TB - + PB - + EB - + ZB - + YB - + Less than %10 seconds - + About %10 seconds remaining - + About %1 minutes remaining - + About %1 hours remaining - + Transfer a transfer - + Start - + Source - + Size - + Destination - + Quit - + Target - - + + Time remaining: - + Listing - + Copying - + Listing and copying - + + Remaining: + + + + Ask - + Overwrite - + Overwrite if newer - + Overwrite if the last modification dates are different - + Rename - + Put to the end of the list - + Select source directory - + Select destination directory - + Internal error - + Select one or more files to open - + All files - + Save transfer list - + Open transfer list - + Transfer list - + Error 錯誤 - + Not supported on this platform - + Completed in %1 @@ -725,12 +670,12 @@ FileErrorDialog - + Error on folder - + Folder name @@ -738,22 +683,22 @@ FileExistsDialog - + %name% - copy%suffix% - + %name% - copy (%number%)%suffix% - + Error 錯誤 - + Try rename with using special characters @@ -761,22 +706,22 @@ FileIsSameDialog - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error 錯誤 - + Try rename with using special characters @@ -784,77 +729,77 @@ FilterRules - + Filters dialog - + Search: - + Search type: - + Raw text - + Simplified regex - + Perl's regex - + Apply on: - + File - + Folder - + File and folder - + Whole string must match - + Checking - + The regex is valid - + Test string: - + The test string matches with the regex @@ -862,60 +807,60 @@ Filters - + Filters - + Exclusion filters - + Inclusion filters - + None = Include all - - + + Raw text - - + + Simplified regex - - + + Perl's regex - - + + Only on file - - + + Only on folder - - - - + + + + Full match @@ -923,27 +868,27 @@ FolderExistsDialog - + Folder already exists - - %name% - copy + + %name% - copy%suffix% - - %name% - copy (%number%) + + %name% - copy (%number%)%suffix% - + Error 錯誤 - + Try rename with using special characters @@ -951,7 +896,7 @@ HelpDialog - + About Ultracopier 關於 Ultracopier @@ -980,82 +925,77 @@ This version is compiled as version: %1. - + About Qt - + Check update - + Do a crash - + Save bug report - + Close 關閉 - - About Supercopier - - - - + For http://portableapps.com/ - + Portable and all in one version - + Portable version - + All in one version - + Normal version - + http://ultracopier.first-world.info/ - + Update checking... - + Update: %1 - + No update - + http://ultracopier.first-world.info/download.html @@ -1063,49 +1003,49 @@ This version is compiled as version: %1. ListThread - - + + Unable do to move or copy item into wrong forced mode: %1 - - + + Unable to save the transfer list: %1 - + Problem reading file, or file-size is 0 - + Wrong header: "%1" - + The transfer list is in mixed mode, but this instance is not in this mode - + The transfer list is in copy mode, but this instance is not in this mode - + The transfer list is in move mode, but this instance is not in this mode - + Some errors have been found during the line parsing - + Unable to open the transfer list: %1 @@ -1121,12 +1061,12 @@ This version is compiled as version: %1. LocalListener - + Warning 警告 - + Timeout while recomposing data from connected clients @@ -1155,36 +1095,42 @@ This version is compiled as version: %1. MkPath - - + + Unable to remove - + + Unable to create the folder - + The source folder don't exists - + Unable to temporary rename the folder - + Unable to do the final real move the folder - + Unable to move the folder + + + Unable to move the folder: errno: %1 + + OSSpecific @@ -1194,37 +1140,47 @@ This version is compiled as version: %1. 警告 - + + Classic + + + + + Modern + + + + Don't show again - + Ok - - The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer to support it.<br />You need do the copy/move manually. + + The replacement of default copy/move system is not supported by the file manager (Dolphin, Nautilus, ...).<br />Ask the developer of your file manager to support it.<br />You need do the copy/move manually. - + Reboot the system if previously had similar software installed (like Teracopy, Supercopier or an earlier version of Ultracopier). - + The replacement of default copy/move system is not supported and blocked by finder of Mac OS X.<br />You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon). - + The replacement of default copy/move system should be not supported by the file manager.<br />Ask to the developer to support it.<br />You need do the copy/move manually. - + Consider Supercopier as deprecated, prefer Ultracopier @@ -1249,14 +1205,14 @@ This version is compiled as version: %1. - - + + Copy engine - + Themes 佈景 @@ -1271,54 +1227,54 @@ This version is compiled as version: %1. - + Name 名稱 - + Version 版本 - + Language 語言 - + Client connected - + Write the folder operations - + The variables are %path%, %operation% %path%, %operation% should not be translated - - + + Listener - - + + Plugin loader - - + + Session loader @@ -1378,157 +1334,172 @@ This version is compiled as version: %1. - + + default: finish.opus + + + + + Play + + + + + Sound when finish + + + + Plugin - + Add - + Remove - + Information - + Copy engine by order of preference: - + Themes: - + Unable to load the themes plugin - + No option for this plugin - + Browse - + Write directly to the file when it receive a new entry (can produce 50% of lost of performance) - + Write the transfers - + The variables are %time%, %source%, %size%, %destination% %time%, %source%, %size%, %destination% should not be translated - + Write the errors - + The variables are %time%, %path%, %size%, %mtime%, %error% %time%, %path%, %size%, %mtime%, %error% should not be translated - + Write the log file into: - - + + Load - + Load the theme? - + Load the language? - + Do nothing - + Ask source as folder - + Ask sources as files - + Never - + When source is same - + When destination is same - + When source and destination are same - + When source or destination are same - + Always - - - + + + The variables are %1 - + Save logs as: - + Synchronized log @@ -1658,33 +1629,33 @@ This version is compiled as version: %1. - + Dependencies part is wrong - + Dependencies %1 are not satisfied, for plugin: %2 - + Remove %1 - + Error 錯誤 - + Error while the removing plugin, please check the rights on the folder: %1 - + Information @@ -1704,89 +1675,89 @@ This version is compiled as version: %1. - + Duplicated plugin found, already loaded! - + English text missing in the informations.xml for the tag: %1 - + Tag not found: %1 - + Are you sure about removing "%1" in version %2? - + Previous import is in progress... - + Open Ultracopier plugin - + Ultracopier plugin (*.urc) - - - - - - - - - - + + + + + + + + + + Plugin loader - + Unable to open the plugin: %1 - - - + + + Unable to load the plugin content, please check it: %1 - + Unable to create a folder to install the plugin: %1 - + Unable to create a file to install the plugin: %1 since:%2 - + Folder with same name is present, skip the plugin installation: %1 - - - + + + Unable to load the plugin content, please check it @@ -1858,24 +1829,17 @@ since:%2 ReadThread - + Internal error, please report it! - - Internal error reading the source file:block size out of range - - - - - + Unable to read the source file: - - + File truncated during the read, possible data change @@ -1883,198 +1847,183 @@ since:%2 RenamingRules - + Renaming rules - + First renaming - + %name% - copy%suffix% %name% should not be translated - + Second renaming - + %name% - copy (%number%)%suffix% %name%, %number% should not be translated - + <html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html> %name%, %number% should not be translated - - - %1 - copy + + + %1 - copy%2 - - - %1 - copy (%2) + + + %1 - copy (%2)%3 ScanFileOrFolder - - Blacklisted folder - - - - + + %1 - copy - + + %1 - copy (%2) - + + %name% - copy - + + %name% - copy (%number%) - - This is not a folder - - - - - The folder does exists - - - - - The folder is not readable - - - - - Problem with name encoding + + + Problem with folder read SystrayIcon - + No copy listener found. Do the copy manually by right click one the system tray icon. - + Information - + Searching information... - + Do not replace the explorer copy/move - + Semi replace the explorer copy/move - + Replace the explorer copy/move - + Warning 警告 - + The action on the systray icon is unknown! - + &About/Debug report - + &About - + &Save bug report - + &Quit - + &Options - + &Product key - + New version: %1 - + Go to the download page: - + A&dd copy/moving - + Add &copy - + Add &transfer - + Add &move @@ -2082,68 +2031,56 @@ since:%2 Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 @@ -2176,323 +2113,243 @@ since:%2 TransferThread - + Try rename with using special characters - - - - - File not found - - - - - - Wrong modification date or unable to get it, you can disable time transfer to do it - - - - - - Internal error: Already opening - - - - - Drive %1 - - - - - Unknown folder - - - - - root - - - - - %name% - copy - - - - - %name% - copy (%number%) - - - - - - The source file doesn't exist - - - - - - Unable to do the folder - - - - - The source doesn't exist + + %name% - copy%suffix% - - Another file exists at same place + + %name% - copy (%number%)%suffix% - - The checksums do not match + + + File not found - - Internal error: The destination is not closed + + + Unable to change the date + + + TransferThreadAsync - - Internal error: The size transfered doesn't match + + Wrong modification date or unable to get it, you can disable time transfer to do it - - Internal error: The buffer is not empty + + + Unable to create the destination folder: - - - - Unable to change the date + + + Unable to create the destination folder, errno: %1 WriteThread - + Path resolution error (Empty path) - - Internal error, please report it! + + + Unable to create the destination folder: - - Unable to read the source file: + + + Unable to create the destination folder, errno: %1 - - File truncated during read, possible data change + + Internal error, please report it! copyEngineOptions - + Transfer - + Move the whole folder - - Transfer the file rights + + Keep the file date - - Keep the file date + + Auto start - - Autostart the transfer + + Transfer the file rights - - - Less performance if checked + + Create full path if not exists - - Follow the strict order + + Checksum - + Error and collision - + When folder error - + When file error - + When file collision - - When folder collision - - - - - Check if destination folder exists - - - - - Renaming rules - - - - - Delete partially transferred files + + Overwrite if not same size - - Rename the original destination + + Overwrite if modification date differs - - Control + + When folder collision - - Checksum + + Check if destination folder exists - - Only after error + + Renaming rules - - Ignore if impossible + + Delete partially transferred files - - Verify checksums + + Rename the original destination - + Performance - - Parallel buffer - - - - - - - - - KB - - - - - Block size + + Inode threads - - Sequential buffer + + + MB - - Enable OS buffer + + Uncheck this under Windows create problem - - OS buffer only if smaller than + + OS Buffer - - Transfer algorithm + + Disable parallel transfer when are different devices - - Parallelize if smaller than + + Buffer for different device - - Inode threads (unsafe > 1) + + OS FLags - - - More cpu, but better organisation on the disk + + Buffer for same device - - Order the list + + OS native copy (disable speed limitation) - + Misc - + Check the disk space - + Use this folder when destination is not set - + Browse - + Filters @@ -2500,67 +2357,67 @@ since:%2 fileErrorDialog - + Error with file - + Error 錯誤 - + Size - + Modified - + File name - + Destination - + Folder - + &Always perform this action - + Try in with elevated privileges - + Put to bottom - + Retry - + &Skip - + &Cancel @@ -2568,141 +2425,153 @@ since:%2 fileExistsDialog - + The file exists - + Source - + Destination - - + + Size - - + + Modified - - + + File name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + &Overwrite - + &Skip - + &Cancel - + Overwrite if newer - - + + Overwrite if modification date differs - - + + Overwrite if older + + + + Overwrite if not same size + + + + + + Overwrite if not same size and date + + fileIsSameDialog - + The source and destination are same - + Size - + File name - + Folder - + Modified - + Suggest new &name - + &Always perform this action - + &Rename - + &Skip - + &Cancel @@ -2710,65 +2579,65 @@ since:%2 folderExistsDialog - + The source and destination is identical - + Source - + Destination - - + + Modified - - + + Folder name - - + + Folder - + Suggest new &name - + &Always perform this action - + &Rename - + Merge - + Skip - + &Cancel diff --git a/plugins/Listener/README.md b/plugins/Listener/README.md old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/DebugEngineMacro.h b/plugins/Listener/catchcopy-v0002/DebugEngineMacro.h old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/Environment.h b/plugins/Listener/catchcopy-v0002/Environment.h old mode 100644 new mode 100755 index 265a5a6..821e3de --- a/plugins/Listener/catchcopy-v0002/Environment.h +++ b/plugins/Listener/catchcopy-v0002/Environment.h @@ -3,7 +3,7 @@ \author alpha_one_x86 \licence GPL3, see the file COPYING */ -#include "Variable.h" +#include "Listenercatchcopy-v0002Variable.h" /// \brief The global include #include "StructEnumDefinition.h" #include "DebugEngineMacro.h" diff --git a/plugins/Listener/catchcopy-v0002/Listenercatchcopy-v0002Variable.h b/plugins/Listener/catchcopy-v0002/Listenercatchcopy-v0002Variable.h new file mode 100755 index 0000000..075d4da --- /dev/null +++ b/plugins/Listener/catchcopy-v0002/Listenercatchcopy-v0002Variable.h @@ -0,0 +1,15 @@ +/** \file Variable.h +\brief Define the environment variable +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef VARIABLE_H +#define VARIABLE_H + +//Un-comment this next line to put ultracopier plugin in debug mode +//#define ULTRACOPIER_PLUGIN_DEBUG + +#endif // VARIABLE_H + + + diff --git a/plugins/Listener/catchcopy-v0002/README.md b/plugins/Listener/catchcopy-v0002/README.md old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/StructEnumDefinition.h b/plugins/Listener/catchcopy-v0002/StructEnumDefinition.h old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/Variable.h b/plugins/Listener/catchcopy-v0002/Variable.h deleted file mode 100644 index 963d0c8..0000000 --- a/plugins/Listener/catchcopy-v0002/Variable.h +++ /dev/null @@ -1,15 +0,0 @@ -/** \file Variable.h -\brief Define the environment variable -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef VARIABLE_H -#define VARIABLE_H - -//Un-comment this next line to put ultracopier plugin in debug mode -#define ULTRACOPIER_PLUGIN_DEBUG - -#endif // VARIABLE_H - - - diff --git a/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ClientCatchcopy.cpp b/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ClientCatchcopy.cpp old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ClientCatchcopy.h b/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ClientCatchcopy.h old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ExtraSocketCatchcopy.cpp b/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ExtraSocketCatchcopy.cpp old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ExtraSocketCatchcopy.h b/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ExtraSocketCatchcopy.h old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ServerCatchcopy.cpp b/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ServerCatchcopy.cpp old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ServerCatchcopy.h b/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/ServerCatchcopy.h old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/VariablesCatchcopy.h b/plugins/Listener/catchcopy-v0002/catchcopy-api-0002/VariablesCatchcopy.h old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/documentation.dox b/plugins/Listener/catchcopy-v0002/documentation.dox old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/informations.xml b/plugins/Listener/catchcopy-v0002/informations.xml old mode 100644 new mode 100755 index 822e6cc..77ceb69 --- a/plugins/Listener/catchcopy-v0002/informations.xml +++ b/plugins/Listener/catchcopy-v0002/informations.xml @@ -17,7 +17,7 @@ - 1.6.1.3 + 2.2.4.4 catchcopy-v0002 diff --git a/plugins/Listener/catchcopy-v0002/listener.cpp b/plugins/Listener/catchcopy-v0002/listener.cpp old mode 100644 new mode 100755 diff --git a/plugins/Listener/catchcopy-v0002/listener.h b/plugins/Listener/catchcopy-v0002/listener.h old mode 100644 new mode 100755 index 8cab248..3d4c26f --- a/plugins/Listener/catchcopy-v0002/listener.h +++ b/plugins/Listener/catchcopy-v0002/listener.h @@ -26,24 +26,24 @@ class Listener : public PluginInterface_Listener public: Listener(); /// \brief try listen the copy/move - void listen(); + void listen() override; /// \brief stop listen to copy/move - void close(); + void close() override; /// \brief return the error strong - const std::string errorString() const; + const std::string errorString() const override; /// \brief set resources for this plugins - void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,const bool &portableVersion); + void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,const bool &portableVersion) override; /// \brief to get the options widget, NULL if not have - QWidget * options(); + QWidget * options() override; /// \brief to get a client list - std::vector clientsList() const; + std::vector clientsList() const override; public slots: /// \brief say to the client that's the copy/move is finished - void transferFinished(const uint32_t &orderId,const bool &withError); + void transferFinished(const uint32_t &orderId,const bool &withError) override; /// \brief say to the client that's the copy/move is finished - void transferCanceled(const uint32_t &orderId); + void transferCanceled(const uint32_t &orderId) override; /// \brief to reload the translation, because the new language have been loaded - void newLanguageLoaded(); + void newLanguageLoaded() override; private: ServerCatchcopy server; private slots: diff --git a/plugins/Listener/catchcopy-v0002/listener.pro b/plugins/Listener/catchcopy-v0002/listener.pro old mode 100644 new mode 100755 index b21289a..fc674f3 --- a/plugins/Listener/catchcopy-v0002/listener.pro +++ b/plugins/Listener/catchcopy-v0002/listener.pro @@ -12,7 +12,7 @@ HEADERS = \ $$PWD/catchcopy-api-0002/ServerCatchcopy.h \ $$PWD/catchcopy-api-0002/ExtraSocketCatchcopy.h \ $$PWD/Environment.h \ - $$PWD/Variable.h \ + $$PWD/Listenercatchcopy-v0002Variable.h \ $$PWD/DebugEngineMacro.h \ $$PWD/StructEnumDefinition.h \ $$PWD/../../../interface/PluginInterface_Listener.h \ diff --git a/plugins/Listener/catchcopy-v0002/plugin.json b/plugins/Listener/catchcopy-v0002/plugin.json old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/README.md b/plugins/PluginLoader/README.md old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/DebugEngineMacro.h b/plugins/PluginLoader/catchcopy-v0002/DebugEngineMacro.h old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Environment.h b/plugins/PluginLoader/catchcopy-v0002/Environment.h old mode 100644 new mode 100755 index 265a5a6..f5d7a7f --- a/plugins/PluginLoader/catchcopy-v0002/Environment.h +++ b/plugins/PluginLoader/catchcopy-v0002/Environment.h @@ -3,7 +3,7 @@ \author alpha_one_x86 \licence GPL3, see the file COPYING */ -#include "Variable.h" +#include "PluginLoadercatchcopy-v0002Variable.h" /// \brief The global include #include "StructEnumDefinition.h" #include "DebugEngineMacro.h" diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.qm new file mode 100755 index 0000000..62327be Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.ts index bbe32fc..33c14da 100644 --- a/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.ts +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.ts @@ -1,22 +1,22 @@ - + OptionsWidget In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll. - + Dll.يمكن فتح لتحميلUAC عندما يكون الأمر مهما ،32Bits OS. مع 32Bits dll و 64Bits OS,من المهم مع dll 64Bits في الحالة العادية فقط.. All the dlls are importants - + هي المستوردين dlls كافة Register for all users - + مكتب التسجيل لكل المستخدمين diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.qm new file mode 100755 index 0000000..d8b0880 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.ts index f377223..b63b334 100644 --- a/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.ts +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.ts @@ -6,7 +6,7 @@ In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll. - Im Normalfall ist für 32 oder 64-Bit-Beriebsysteme nur die jeweilige dll wichtig. Die UAC kann geöffnet werden um die dll zu laden. + Im Normalfall ist für 32 oder 64-Bit-Beriebsysteme nur die jeweilige DLL wichtig. Möglicherweise muss die Windows UAC bestätigt werden, um die DLL zu laden. @@ -17,7 +17,7 @@ Register for all users - + Für alle Benutzer registrieren diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.qm new file mode 100755 index 0000000..d925dd6 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.qm new file mode 100755 index 0000000..543b9c0 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.qm new file mode 100755 index 0000000..5f0a7f4 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.qm new file mode 100755 index 0000000..d05e9c3 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.qm new file mode 100755 index 0000000..3974c3a Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.ts index f45ef55..256518d 100644 --- a/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.ts +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.ts @@ -6,17 +6,17 @@ In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll. - Solitamente, la dll 64Bit è indispensabile solo per sistemi operativi a 64Bit, e la dll 32Bit per sistemi operativi a 32Bits. Quando è necessario, l' UAC (il controllo dell'account utente) può essere aperto per caricare la dll. + Solitamente, le librerie dll 64bit sono indispensabili solo per sistemi operativi a x64, e le librerie 32bit per sistemi operativi a x86. Quando è necessario, l' UAC (il controllo dell'account utente) può essere aperto per caricare le dll All the dlls are importants - Tutte le dll sono necessarie + Tutte le librerie dll sono necessarie Register for all users - + Registrare per tutti gli utenti diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.qm new file mode 100755 index 0000000..00c9703 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.qm b/plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.qm differ diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.ts old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.cpp b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.cpp old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.h b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.h old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.ui b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.ui old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/PlatformMacro.h b/plugins/PluginLoader/catchcopy-v0002/PlatformMacro.h old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/PluginLoadercatchcopy-v0002Variable.h b/plugins/PluginLoader/catchcopy-v0002/PluginLoadercatchcopy-v0002Variable.h new file mode 100755 index 0000000..6f0d9aa --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/PluginLoadercatchcopy-v0002Variable.h @@ -0,0 +1,16 @@ +/** \file Variable.h +\brief Define the environment variable +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef VARIABLE_H +#define VARIABLE_H + +//Un-comment this next line to put ultracopier plugin in debug mode +//#define ULTRACOPIER_PLUGIN_DEBUG +//#define ULTRACOPIER_PLUGIN_ALL_IN_ONE + +#endif // VARIABLE_H + + + diff --git a/plugins/PluginLoader/catchcopy-v0002/README.md b/plugins/PluginLoader/catchcopy-v0002/README.md old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/StructEnumDefinition.h b/plugins/PluginLoader/catchcopy-v0002/StructEnumDefinition.h old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/Variable.h b/plugins/PluginLoader/catchcopy-v0002/Variable.h deleted file mode 100644 index 90e1557..0000000 --- a/plugins/PluginLoader/catchcopy-v0002/Variable.h +++ /dev/null @@ -1,16 +0,0 @@ -/** \file Variable.h -\brief Define the environment variable -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef VARIABLE_H -#define VARIABLE_H - -//Un-comment this next line to put ultracopier plugin in debug mode -#define ULTRACOPIER_PLUGIN_DEBUG -//#define ULTRACOPIER_PLUGIN_ALL_IN_ONE - -#endif // VARIABLE_H - - - diff --git a/plugins/PluginLoader/catchcopy-v0002/documentation.dox b/plugins/PluginLoader/catchcopy-v0002/documentation.dox old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/informations.xml b/plugins/PluginLoader/catchcopy-v0002/informations.xml old mode 100644 new mode 100755 index d60ebe6..ed8ed49 --- a/plugins/PluginLoader/catchcopy-v0002/informations.xml +++ b/plugins/PluginLoader/catchcopy-v0002/informations.xml @@ -17,7 +17,7 @@ - 1.6.1.3 + 2.2.4.4 catchcopy-v0002 diff --git a/plugins/PluginLoader/catchcopy-v0002/plugin.json b/plugins/PluginLoader/catchcopy-v0002/plugin.json old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.cpp b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.cpp old mode 100644 new mode 100755 diff --git a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h old mode 100644 new mode 100755 index 48e3d06..e87904a --- a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h +++ b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h @@ -38,14 +38,14 @@ public: WindowsExplorerLoader(); ~WindowsExplorerLoader(); /// \brief try enable/disable the catching - void setEnabled(const bool &needBeRegistred); + void setEnabled(const bool &needBeRegistred) override; /// \brief to set resources, writePath can be empty if read only mode - void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,const bool &portableVersion); + void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,const bool &portableVersion) override; /// \brief to get the options widget, NULL if not have - QWidget * options(); + QWidget * options() override; public slots: /// \brief to reload the translation, because the new language have been loaded - void newLanguageLoaded(); + void newLanguageLoaded() override; private: std::string pluginPath; std::vector importantDll,secondDll; diff --git a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.pro b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.pro old mode 100644 new mode 100755 index 40d5e5e..f7541f4 --- a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.pro +++ b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.pro @@ -10,7 +10,7 @@ HEADERS = \ $$PWD/pluginLoader.h \ $$PWD/DebugEngineMacro.h \ $$PWD/Environment.h \ - $$PWD/Variable.h \ + $$PWD/PluginLoadercatchcopy-v0002Variable.h \ $$PWD/PlatformMacro.h \ $$PWD/../../../interface/PluginInterface_PluginLoader.h \ $$PWD/../../../cpp11addition.h \ diff --git a/plugins/README.md b/plugins/README.md old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/README.md b/plugins/SessionLoader/README.md old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/Windows/DebugEngineMacro.h b/plugins/SessionLoader/Windows/DebugEngineMacro.h old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/Windows/Environment.h b/plugins/SessionLoader/Windows/Environment.h old mode 100644 new mode 100755 index 265a5a6..ca5a7e7 --- a/plugins/SessionLoader/Windows/Environment.h +++ b/plugins/SessionLoader/Windows/Environment.h @@ -3,7 +3,7 @@ \author alpha_one_x86 \licence GPL3, see the file COPYING */ -#include "Variable.h" +#include "SessionLoaderWindowsVariable.h" /// \brief The global include #include "StructEnumDefinition.h" #include "DebugEngineMacro.h" diff --git a/plugins/SessionLoader/Windows/README.md b/plugins/SessionLoader/Windows/README.md old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/Windows/SessionLoaderWindowsVariable.h b/plugins/SessionLoader/Windows/SessionLoaderWindowsVariable.h new file mode 100755 index 0000000..075d4da --- /dev/null +++ b/plugins/SessionLoader/Windows/SessionLoaderWindowsVariable.h @@ -0,0 +1,15 @@ +/** \file Variable.h +\brief Define the environment variable +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef VARIABLE_H +#define VARIABLE_H + +//Un-comment this next line to put ultracopier plugin in debug mode +//#define ULTRACOPIER_PLUGIN_DEBUG + +#endif // VARIABLE_H + + + diff --git a/plugins/SessionLoader/Windows/StructEnumDefinition.h b/plugins/SessionLoader/Windows/StructEnumDefinition.h old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/Windows/Variable.h b/plugins/SessionLoader/Windows/Variable.h deleted file mode 100644 index 963d0c8..0000000 --- a/plugins/SessionLoader/Windows/Variable.h +++ /dev/null @@ -1,15 +0,0 @@ -/** \file Variable.h -\brief Define the environment variable -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef VARIABLE_H -#define VARIABLE_H - -//Un-comment this next line to put ultracopier plugin in debug mode -#define ULTRACOPIER_PLUGIN_DEBUG - -#endif // VARIABLE_H - - - diff --git a/plugins/SessionLoader/Windows/documentation.dox b/plugins/SessionLoader/Windows/documentation.dox old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/Windows/informations.xml b/plugins/SessionLoader/Windows/informations.xml old mode 100644 new mode 100755 index ab5b852..7101277 --- a/plugins/SessionLoader/Windows/informations.xml +++ b/plugins/SessionLoader/Windows/informations.xml @@ -17,7 +17,7 @@ - 1.6.1.3 + 2.2.4.4 Windows diff --git a/plugins/SessionLoader/Windows/plugin.json b/plugins/SessionLoader/Windows/plugin.json old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/Windows/sessionLoader.cpp b/plugins/SessionLoader/Windows/sessionLoader.cpp old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/Windows/sessionLoader.h b/plugins/SessionLoader/Windows/sessionLoader.h old mode 100644 new mode 100755 diff --git a/plugins/SessionLoader/Windows/sessionLoader.pro b/plugins/SessionLoader/Windows/sessionLoader.pro old mode 100644 new mode 100755 index 1059692..c058dee --- a/plugins/SessionLoader/Windows/sessionLoader.pro +++ b/plugins/SessionLoader/Windows/sessionLoader.pro @@ -8,7 +8,7 @@ LIBS += -ladvapi32 HEADERS = \ $$PWD/sessionLoader.h \ $$PWD/StructEnumDefinition.h \ - $$PWD/Variable.h \ + $$PWD/SessionLoaderWindowsVariable.h \ $$PWD/Environment.h \ $$PWD/DebugEngineMacro.h \ $$PWD/../../../interface/PluginInterface_SessionLoader.h diff --git a/plugins/SessionLoader/Windows/sessionLoader.pro.user.4.8-pre1 b/plugins/SessionLoader/Windows/sessionLoader.pro.user.4.8-pre1 new file mode 100755 index 0000000..2a9bc34 --- /dev/null +++ b/plugins/SessionLoader/Windows/sessionLoader.pro.user.4.8-pre1 @@ -0,0 +1,333 @@ + + + + + + EnvironmentId + {74ab603f-f657-4135-92cf-c93af71b2f91} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + true + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + {23178a1c-09be-4e9f-9aab-ff55e05e7637} + 0 + 0 + 0 + + /home/user/Desktop/ultracopier/sources/plugins/SessionLoader/build-sessionLoader-Desktop-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/user/Desktop/ultracopier/sources/plugins/SessionLoader/build-sessionLoader-Desktop-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/user/Desktop/ultracopier/sources/plugins/SessionLoader/build-sessionLoader-Desktop-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + + + + + ProjectExplorer.CustomExecutableRunConfiguration + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/plugins/SessionLoader/Windows/sessionLoader.pro.user.74ab603.4.8-pre1 b/plugins/SessionLoader/Windows/sessionLoader.pro.user.74ab603.4.8-pre1 new file mode 100755 index 0000000..2a9bc34 --- /dev/null +++ b/plugins/SessionLoader/Windows/sessionLoader.pro.user.74ab603.4.8-pre1 @@ -0,0 +1,333 @@ + + + + + + EnvironmentId + {74ab603f-f657-4135-92cf-c93af71b2f91} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + true + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + {23178a1c-09be-4e9f-9aab-ff55e05e7637} + 0 + 0 + 0 + + /home/user/Desktop/ultracopier/sources/plugins/SessionLoader/build-sessionLoader-Desktop-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/user/Desktop/ultracopier/sources/plugins/SessionLoader/build-sessionLoader-Desktop-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/user/Desktop/ultracopier/sources/plugins/SessionLoader/build-sessionLoader-Desktop-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + + + + + ProjectExplorer.CustomExecutableRunConfiguration + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/plugins/Themes/Oxygen/DebugEngineMacro.h b/plugins/Themes/Oxygen/DebugEngineMacro.h old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/Environment.h b/plugins/Themes/Oxygen/Environment.h old mode 100644 new mode 100755 index 265a5a6..bc3418e --- a/plugins/Themes/Oxygen/Environment.h +++ b/plugins/Themes/Oxygen/Environment.h @@ -3,7 +3,7 @@ \author alpha_one_x86 \licence GPL3, see the file COPYING */ -#include "Variable.h" +#include "OxygenVariable.h" /// \brief The global include #include "StructEnumDefinition.h" #include "DebugEngineMacro.h" diff --git a/plugins/Themes/Oxygen/Languages/ar/translation.qm b/plugins/Themes/Oxygen/Languages/ar/translation.qm new file mode 100755 index 0000000..2ac6267 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/ar/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/ar/translation.ts b/plugins/Themes/Oxygen/Languages/ar/translation.ts index 2af674e..7db7d8a 100644 --- a/plugins/Themes/Oxygen/Languages/ar/translation.ts +++ b/plugins/Themes/Oxygen/Languages/ar/translation.ts @@ -1,73 +1,61 @@ - + Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + شراء النسخة النهائية لتمويل التنمية - + File %1/%2, size: %3/%4 - + الملف %1/%2 ، الحجم: %3/%4 - + Copy list - + قائمة النسخ - + Move list - + قائمة النقل - + Don't close if errors are found - + عدم الإغلاق في حاله العثور على أخطاء - + Never close - + لا تغلق أبدا - + Always close - + إغلاق دائم - + File Name, 0KB - + اسم الملف ، 0KB - - - + + + Select a color - + تحديد لون - - - + + + %1 %2% of %3 - + %1 %2% من %3 @@ -75,24 +63,24 @@ Don't close if errors are found - + عدم الإغلاق في حاله العثور على أخطاء Never close - + لا تغلق أبدا Always close - + إغلاق دائم Select a color - + تحديد لون @@ -100,158 +88,158 @@ From: - + من: To: - + الى: &More - + &تحريك &Pause - + &مهلة &Skip - + &تخطي &Cancel - + &الغاء الامر Close on transfer completion - + إغلاق عند إتمام النقل Limit copy speed to: - + الحد من سرعه النسخ إلى: Transfer list - + قائمه النقل Move the selected items to the top - + تحريك المواد المحددة إلى الأعلى Move up the selected items - + تحريك المواد المحددة لاعلي Move down the selected items - + تحريك المواد المحددة لاسفل Move the selected items to the bottom - + تحريك العناصر المحددة إلى الأسفل Add file/folder - + أضافه ملف/مجلد Delete the selected items - + حذف المواد المحددة Search - + بحث Export the transfer list - + تصدير قائمه النقل Import the transfer list - + استيراد قائمه النقل Previous - + السابق Next - + التالي Error - + الخطا Export the errors into transfer list - + تصدير الأخطاء إلى قائمه النقل Source - + المصدر Destination - + الوجهة Interface - + الواجهه Add file - + اضافة ملف Add folder - + اضافة مجلد Move file(s) - + تحريك الملفات Move folder - + تحريك المجلد Copy file(s) - + نسخ الملفات Copy folder - + نسخ المجلد @@ -259,88 +247,88 @@ Show dual progression - + إظهار التقدم المزدوج Show speed as main information - + إظهار السرعة كمعلومات رئيسيه Use - + استخدام Start with the "more button" pushed - + تبدا مع "أكثر زر" دفعت Minimize on close to systray - + تصغير بالقرب من الدرج النظام At the end of the copy - + في نهاية النسخ Limit copy speed to - + الحد من سرعه النسخ إلى KB/s - + KB/s Start minimized - + بدء التصغير Save position - + حفظ الموضع Informations - + المعلومات Display - + عرض Speed with progress bar - + السرعة مع شريط التقدم Progression color - + تدرج اللون Click to edit the color - + انقر لتحرير اللون Show progression in the title - + إظهار التقدم في العنوان Always on top - + دائما في القمه diff --git a/plugins/Themes/Oxygen/Languages/de/translation.qm b/plugins/Themes/Oxygen/Languages/de/translation.qm new file mode 100755 index 0000000..6bbb305 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/de/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/de/translation.ts b/plugins/Themes/Oxygen/Languages/de/translation.ts index af05eee..c4e5996 100644 --- a/plugins/Themes/Oxygen/Languages/de/translation.ts +++ b/plugins/Themes/Oxygen/Languages/de/translation.ts @@ -4,70 +4,58 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development Kaufe die Ultimate Version um die Entwicklung zu finanzieren - + File %1/%2, size: %3/%4 Datei %1/%2, Größe:%3/%4 - + Copy list Zu kopierende Dateien - + Move list Zu verschiebende Dateien - + Don't close if errors are found Nicht schließen, wenn Fehler aufgetreten sind - + Never close Niemals schließen - + Always close Immer schließen - + File Name, 0KB Dateiname, 0KB - - - + + + Select a color Farbe auswählen - - - + + + %1 %2% of %3 - + %1 %2% von %3 @@ -259,7 +247,7 @@ Show dual progression - Zweifachen Fortschritt anzeigen + @@ -295,7 +283,7 @@ Start minimized - + Minimiert starten @@ -310,7 +298,7 @@ Save position - + Speichere Fensterposition @@ -340,7 +328,7 @@ Always on top - Fenster immer im Vordergrund + Fenster immer im Vordergrund halten diff --git a/plugins/Themes/Oxygen/Languages/el/translation.qm b/plugins/Themes/Oxygen/Languages/el/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/el/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/el/translation.ts b/plugins/Themes/Oxygen/Languages/el/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/el/translation.ts +++ b/plugins/Themes/Oxygen/Languages/el/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/en/translation.qm b/plugins/Themes/Oxygen/Languages/en/translation.qm new file mode 100755 index 0000000..d925dd6 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/en/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/en/translation.ts b/plugins/Themes/Oxygen/Languages/en/translation.ts old mode 100644 new mode 100755 index 8889b16..adebfce --- a/plugins/Themes/Oxygen/Languages/en/translation.ts +++ b/plugins/Themes/Oxygen/Languages/en/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/es/translation.qm b/plugins/Themes/Oxygen/Languages/es/translation.qm new file mode 100755 index 0000000..5d258b3 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/es/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/es/translation.ts b/plugins/Themes/Oxygen/Languages/es/translation.ts old mode 100644 new mode 100755 index caf9b49..ce6281a --- a/plugins/Themes/Oxygen/Languages/es/translation.ts +++ b/plugins/Themes/Oxygen/Languages/es/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development Comprar la versión Ultimate para financiar el desarrollo - + File %1/%2, size: %3/%4 El archivo %1/%2, el tamaño: %3/%4 - + Copy list Lista de copia - + Move list Lista de movimiento - + Don't close if errors are found No cierre si se encuentran errores - + Never close Nunca cierre - + Always close Siempre cerrar - + File Name, 0KB Nombre de archivo, 0KB - - - + + + Select a color Seleccione un color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/fr/translation.qm b/plugins/Themes/Oxygen/Languages/fr/translation.qm new file mode 100755 index 0000000..3db8765 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/fr/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/fr/translation.ts b/plugins/Themes/Oxygen/Languages/fr/translation.ts old mode 100644 new mode 100755 index 3eff652..0171ad9 --- a/plugins/Themes/Oxygen/Languages/fr/translation.ts +++ b/plugins/Themes/Oxygen/Languages/fr/translation.ts @@ -4,19 +4,7 @@ Themes - - - %1 is deprecated, Use %2 - %1 est obsolète, utilisez %2 - - - - - This will be the last version for Mac, but you can compile from source - Ce sera la dernière version pour Mac, mais vous pouvez compiler à partir des sources - - - + Buy the Ultimate version to fund development Achetez la version Ultimate pour financer le développement @@ -36,7 +24,7 @@ Liste de déplacements - + Don't close if errors are found Garder ouvert s'il y a des erreurs diff --git a/plugins/Themes/Oxygen/Languages/hi/translation.qm b/plugins/Themes/Oxygen/Languages/hi/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/hi/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/hi/translation.ts b/plugins/Themes/Oxygen/Languages/hi/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/hi/translation.ts +++ b/plugins/Themes/Oxygen/Languages/hi/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/hu/translation.qm b/plugins/Themes/Oxygen/Languages/hu/translation.qm new file mode 100755 index 0000000..55200d4 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/hu/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/hu/translation.ts b/plugins/Themes/Oxygen/Languages/hu/translation.ts old mode 100644 new mode 100755 index 426a524..04c522a --- a/plugins/Themes/Oxygen/Languages/hu/translation.ts +++ b/plugins/Themes/Oxygen/Languages/hu/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development Vásárold meg az Ultimate verziót a fejlesztés támogatásához - + File %1/%2, size: %3/%4 Fájl %1/%2, méret: %3/%4 - + Copy list Lista másolása - + Move list Lista mozgatása - + Don't close if errors are found Ne zárja be, ha hiba történik - + Never close Sose zárja be - + Always close Mindig zárja be - + File Name, 0KB Fájlnév, 0KB - - - + + + Select a color Válassz egy színt - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/id/translation.qm b/plugins/Themes/Oxygen/Languages/id/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/id/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/id/translation.ts b/plugins/Themes/Oxygen/Languages/id/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/id/translation.ts +++ b/plugins/Themes/Oxygen/Languages/id/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/it/translation.qm b/plugins/Themes/Oxygen/Languages/it/translation.qm new file mode 100755 index 0000000..003803d Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/it/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/it/translation.ts b/plugins/Themes/Oxygen/Languages/it/translation.ts index 5eb14bf..6738ae9 100644 --- a/plugins/Themes/Oxygen/Languages/it/translation.ts +++ b/plugins/Themes/Oxygen/Languages/it/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - Acquista la versione Ultimate per finanziare lo sviluppo del programma + Acquista versione ultimate per finanziare lo sviluppo - + File %1/%2, size: %3/%4 File %1/%2, dimensione: %3/%4 - + Copy list - Lista della copia + Lista di copia - + Move list - Lista dello spostamento + Lista di spostamento - + Don't close if errors are found - Non chiudere se vengono rilevati errori + Non chiudere se vengono trovati errori - + Never close Non chiudere mai - + Always close Chiudere sempre - + File Name, 0KB - Nome del file, 0KB + Nome file, 0KB - - - + + + Select a color - Scegliere un colore + Selezionare colore - - - + + + %1 %2% of %3 %1 %2% di %3 @@ -92,7 +80,7 @@ Select a color - Scegliere un colore + Selezionare colore @@ -105,72 +93,72 @@ To: - a: + A: &More - Altr&o + Avanzate &Pause - &Pausa + Pausa &Skip - &Salta + Salta &Cancel - &Annulla + Annulla Close on transfer completion - Arresta il sistema a trasferimento comletato + Chiudi a trasferimento completato Limit copy speed to: - Limitare la velocità di copia a: + Limitare velocità di copia a: Transfer list - Lista dei trasferimenti + Lista di trasferimento Move the selected items to the top - Sposta in cima gli elementi selezionati + Metti elementi selezionati in cima Move up the selected items - Sposta sopra gli elementi selezionati + Sposta elementi selezionati in sù Move down the selected items - Sposta sotto gli elementi selezionati + Sposta elementi selezionati in giù Move the selected items to the bottom - Sposta in coda gli elementi selezionati + Metti elementi selezionati in coda Add file/folder - Aggiungi file/cartelle + Aggiungi file/cartella Delete the selected items - Elimina gli elementi selezionati + Elimina elementi selezionati @@ -180,12 +168,12 @@ Export the transfer list - Esporta la lista dei trasferimenti + Esporta lista di trasferimento Import the transfer list - Importa la lista dei trasferimenti + Importa lista di trasferimento @@ -206,17 +194,17 @@ Export the errors into transfer list - Esporta gli errori nella lista dei trasferimenti + Esporta errori in lista di trasferimento Source - Cartella di origine + Origine Destination - Cartella di destinazione + Destinazione @@ -236,22 +224,22 @@ Move file(s) - Sposta file + Spostare file Move folder - Sposta la cartella + Spostare cartella/e Copy file(s) - Copia file + Copiare file Copy folder - Copia la cartella + Copiare cartella/e @@ -259,48 +247,48 @@ Show dual progression - Mostrare la doppia progressione + Mostrare progressione duale Show speed as main information - Mostrare la velocità come principale informazione + Mostrare velocità come informazione principale Use - Utilità + Funzionalità Start with the "more button" pushed - Iniziare col pulsante "Altro" attivo + Avvio con bottone "Avanzate" premuto Minimize on close to systray - Alla chiusura riduci nella'area di notifica + Alla chiusura riduci nell'area di notifica At the end of the copy - Al termine della copia + A fine copia Limit copy speed to - Limitare la velocità di copia a + Limitare velocità di copia a Start minimized - + Avvia ridotto a icona Click to edit the color - Clicca per modificare il colore + Cliccare per modificare colore @@ -310,7 +298,7 @@ Save position - + Salva posizione @@ -320,22 +308,22 @@ Display - Visualizza + Visualizzazione Speed with progress bar - Velocità nella barra di progresso + Velocità in barra progresso Progression color - Colore della progressione + Colore progressione Show progression in the title - Mostrare la percentuale di progresso sul titolo + Mostra percentuale di progresso nel titolo diff --git a/plugins/Themes/Oxygen/Languages/ja/translation.qm b/plugins/Themes/Oxygen/Languages/ja/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/ja/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/ja/translation.ts b/plugins/Themes/Oxygen/Languages/ja/translation.ts old mode 100644 new mode 100755 index 526af3f..6f9cbf8 --- a/plugins/Themes/Oxygen/Languages/ja/translation.ts +++ b/plugins/Themes/Oxygen/Languages/ja/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/ko/translation.qm b/plugins/Themes/Oxygen/Languages/ko/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/ko/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/ko/translation.ts b/plugins/Themes/Oxygen/Languages/ko/translation.ts old mode 100644 new mode 100755 index e1280d7..4581886 --- a/plugins/Themes/Oxygen/Languages/ko/translation.ts +++ b/plugins/Themes/Oxygen/Languages/ko/translation.ts @@ -4,19 +4,7 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development @@ -36,7 +24,7 @@ - + Don't close if errors are found 오류 발견시 종료 안함 diff --git a/plugins/Themes/Oxygen/Languages/nl/translation.qm b/plugins/Themes/Oxygen/Languages/nl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/nl/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/nl/translation.ts b/plugins/Themes/Oxygen/Languages/nl/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/nl/translation.ts +++ b/plugins/Themes/Oxygen/Languages/nl/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/no/translation.qm b/plugins/Themes/Oxygen/Languages/no/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/no/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/no/translation.ts b/plugins/Themes/Oxygen/Languages/no/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/no/translation.ts +++ b/plugins/Themes/Oxygen/Languages/no/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/pl/translation.qm b/plugins/Themes/Oxygen/Languages/pl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/pl/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/pl/translation.ts b/plugins/Themes/Oxygen/Languages/pl/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/pl/translation.ts +++ b/plugins/Themes/Oxygen/Languages/pl/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/pt/translation.qm b/plugins/Themes/Oxygen/Languages/pt/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/pt/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/pt/translation.ts b/plugins/Themes/Oxygen/Languages/pt/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/pt/translation.ts +++ b/plugins/Themes/Oxygen/Languages/pt/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/ru/translation.qm b/plugins/Themes/Oxygen/Languages/ru/translation.qm new file mode 100755 index 0000000..ff20604 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/ru/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/ru/translation.ts b/plugins/Themes/Oxygen/Languages/ru/translation.ts old mode 100644 new mode 100755 index 3fd1814..0347921 --- a/plugins/Themes/Oxygen/Languages/ru/translation.ts +++ b/plugins/Themes/Oxygen/Languages/ru/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 Файл %1/%2, размер: %3/%4 - + Copy list Копировать список - + Move list - + Don't close if errors are found Не закрывать, если найдены ошибки - + Never close Никогда не закрывать - + Always close Всегда закрывайте - + File Name, 0KB Имя файла, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/th/translation.qm b/plugins/Themes/Oxygen/Languages/th/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/th/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/th/translation.ts b/plugins/Themes/Oxygen/Languages/th/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/th/translation.ts +++ b/plugins/Themes/Oxygen/Languages/th/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/tr/translation.qm b/plugins/Themes/Oxygen/Languages/tr/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/tr/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/tr/translation.ts b/plugins/Themes/Oxygen/Languages/tr/translation.ts old mode 100644 new mode 100755 index 2af674e..07732b2 --- a/plugins/Themes/Oxygen/Languages/tr/translation.ts +++ b/plugins/Themes/Oxygen/Languages/tr/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/Languages/zh/translation.qm b/plugins/Themes/Oxygen/Languages/zh/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen/Languages/zh/translation.qm differ diff --git a/plugins/Themes/Oxygen/Languages/zh/translation.ts b/plugins/Themes/Oxygen/Languages/zh/translation.ts old mode 100644 new mode 100755 index 526af3f..6f9cbf8 --- a/plugins/Themes/Oxygen/Languages/zh/translation.ts +++ b/plugins/Themes/Oxygen/Languages/zh/translation.ts @@ -4,68 +4,56 @@ Themes - - - %1 is deprecated, Use %2 - - - - - - This will be the last version for Mac, but you can compile from source - - - - + Buy the Ultimate version to fund development - + File %1/%2, size: %3/%4 - + Copy list - + Move list - + Don't close if errors are found - + Never close - + Always close - + File Name, 0KB - - - + + + Select a color - - - + + + %1 %2% of %3 diff --git a/plugins/Themes/Oxygen/OxygenVariable.h b/plugins/Themes/Oxygen/OxygenVariable.h new file mode 100755 index 0000000..029f6c3 --- /dev/null +++ b/plugins/Themes/Oxygen/OxygenVariable.h @@ -0,0 +1,18 @@ +/** \file Variable.h +\brief Define the environment variable +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef VARIABLE_H +#define VARIABLE_H + + +//Un-comment this next line to put ultracopier plugin in debug mode +#ifndef ULTRACOPIER_NODEBUG +//#define ULTRACOPIER_PLUGIN_DEBUG +#endif + +#endif // VARIABLE_H + + + diff --git a/plugins/Themes/Oxygen/README.md b/plugins/Themes/Oxygen/README.md old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/StructEnumDefinition.h b/plugins/Themes/Oxygen/StructEnumDefinition.h old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/ThemesFactory.cpp b/plugins/Themes/Oxygen/ThemesFactory.cpp old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/ThemesFactory.h b/plugins/Themes/Oxygen/ThemesFactory.h old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/TransferModel.cpp b/plugins/Themes/Oxygen/TransferModel.cpp old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/TransferModel.h b/plugins/Themes/Oxygen/TransferModel.h old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/Variable.h b/plugins/Themes/Oxygen/Variable.h deleted file mode 100644 index 9f9af0d..0000000 --- a/plugins/Themes/Oxygen/Variable.h +++ /dev/null @@ -1,18 +0,0 @@ -/** \file Variable.h -\brief Define the environment variable -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef VARIABLE_H -#define VARIABLE_H - - -//Un-comment this next line to put ultracopier plugin in debug mode -#ifndef ULTRACOPIER_NODEBUG -#define ULTRACOPIER_PLUGIN_DEBUG -#endif - -#endif // VARIABLE_H - - - diff --git a/plugins/Themes/Oxygen/documentation.dox b/plugins/Themes/Oxygen/documentation.dox old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/informations.xml b/plugins/Themes/Oxygen/informations.xml old mode 100644 new mode 100755 index 1b2222e..048caa3 --- a/plugins/Themes/Oxygen/informations.xml +++ b/plugins/Themes/Oxygen/informations.xml @@ -17,7 +17,7 @@ - 1.6.1.3 + 2.2.4.4 Oxygen diff --git a/plugins/Themes/Oxygen/interface.cpp b/plugins/Themes/Oxygen/interface.cpp old mode 100644 new mode 100755 index 22d1b24..4a8b83e --- a/plugins/Themes/Oxygen/interface.cpp +++ b/plugins/Themes/Oxygen/interface.cpp @@ -56,13 +56,31 @@ Themes::Themes(const bool &alwaysOnTop, const bool &minimizeToSystray, const bool &startMinimized, const bool &savePosition) : + duration(0), + durationStarted(false), ui(new Ui::interfaceCopy()), - uiOptions(new Ui::themesOptions()) + uiOptions(new Ui::themesOptions()), + currentFile(0), + totalFile(0), + currentSize(0), + totalSize(0), + getOldProgression(0), + sysTrayIcon(NULL), + menu(NULL), + action(Ultracopier::EngineActionInProgress::Idle), + currentSpeed(0), + storeIsInPause(false), + modeIsForced(false), + type(Ultracopier::CopyType::FileAndFolder), + mode(Ultracopier::CopyMode::Copy), + haveStarted(false), + haveError(false) { this->facilityEngine=facilityEngine; ui->setupUi(this); uiOptions->setupUi(ui->optionsTab); + m_havePause=false; currentFile = 0; totalFile = 0; currentSize = 0; @@ -298,17 +316,7 @@ Themes::Themes(const bool &alwaysOnTop, uiOptions->alwaysOnTop->hide(); #endif*/ if(facilityEngine->isUltimate()) - { - #ifdef SUPERCOPIER - ui->ad_ultimate->setText(tr("%1 is deprecated, Use %2").arg("SuperCopier").arg("Ultracopier")); - #else - #ifdef Q_OS_MACOS - ui->ad_ultimate->setText(tr("This will be the last version for Mac, but you can compile from source")); - #else - ui->ad_ultimate->hide(); - #endif - #endif - } + ui->ad_ultimate->hide(); else { QString ultimateUrl=QString::fromStdString(facilityEngine->ultimateUrl()); @@ -316,12 +324,6 @@ Themes::Themes(const bool &alwaysOnTop, ui->ad_ultimate->hide(); else ui->ad_ultimate->setText( - #ifdef SUPERCOPIER - tr("%1 is deprecated, Use %2").arg("Supercopier").arg("Ultracopier
")+ - #endif - #ifdef Q_OS_MACOS - tr("This will be the last version for Mac, but you can compile from source")+ - #endif QStringLiteral("%2").arg(ultimateUrl).arg(tr("Buy the Ultimate version to fund development"))); } @@ -668,6 +670,13 @@ void Themes::isInPause(const bool &isInPause) updatePause(); } +/// \brief set have pause +void Themes::havePause(const bool &havePause) +{ + ui->pauseButton->setEnabled(havePause); + m_havePause=havePause; +} + void Themes::updatePause() { if(storeIsInPause) @@ -1510,3 +1519,6 @@ void Themes::on_exportErrorToTransferList_clicked() emit exportErrorIntoTransferList(); } +void Themes::doneTime(const std::vector > &) +{ +} diff --git a/plugins/Themes/Oxygen/interface.h b/plugins/Themes/Oxygen/interface.h old mode 100644 new mode 100755 index 10e7a00..41849bd --- a/plugins/Themes/Oxygen/interface.h +++ b/plugins/Themes/Oxygen/interface.h @@ -95,6 +95,8 @@ public: void haveExternalOrder(); /// \brief set if is in pause void isInPause(const bool &); + /// \brief set if have pause + void havePause(const bool &); /// \brief get the widget for the copy engine QWidget * getOptionsEngineWidget(); /// \brief to set if the copy engine is found @@ -104,6 +106,8 @@ public: public slots: /// \brief set the translate void newLanguageLoaded(); + /// to get by file speed + void doneTime(const std::vector > &); private slots: void on_putOnTop_clicked(); void on_pushUp_clicked(); @@ -188,6 +192,7 @@ private: QModelIndexList selectedItems; /// \brief the custom transfer model TransferModel transferModel; + bool m_havePause; static QIcon player_play,player_pause,tempExitIcon,editDelete,skinIcon,editFind,documentOpen,documentSave,listAdd; static bool iconLoaded; diff --git a/plugins/Themes/Oxygen/interface.pro b/plugins/Themes/Oxygen/interface.pro old mode 100644 new mode 100755 index 9b4923d..f5f4fde --- a/plugins/Themes/Oxygen/interface.pro +++ b/plugins/Themes/Oxygen/interface.pro @@ -1,4 +1,6 @@ include($$PWD/../Oxygen/interfaceInclude.pri) +TEMPLATE = lib +CONFIG += plugin !CONFIG(static) { RESOURCES += \ diff --git a/plugins/Themes/Oxygen/interface.ui b/plugins/Themes/Oxygen/interface.ui old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/interfaceInclude.pri b/plugins/Themes/Oxygen/interfaceInclude.pri old mode 100644 new mode 100755 index 5f7317b..54507c6 --- a/plugins/Themes/Oxygen/interfaceInclude.pri +++ b/plugins/Themes/Oxygen/interfaceInclude.pri @@ -3,14 +3,12 @@ QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" mac:QMAKE_CXXFLAGS+="-stdlib=libc++" QT += widgets -TEMPLATE = lib -CONFIG += plugin HEADERS = \ $$PWD/ThemesFactory.h \ $$PWD/StructEnumDefinition.h \ $$PWD/DebugEngineMacro.h \ $$PWD/Environment.h \ - $$PWD/Variable.h \ + $$PWD/OxygenVariable.h \ $$PWD/../../../interface/PluginInterface_Themes.h \ $$PWD/../../../interface/FacilityInterface.h \ $$PWD/../../../interface/OptionInterface.h \ diff --git a/plugins/Themes/Oxygen/interfaceResources.qrc b/plugins/Themes/Oxygen/interfaceResources.qrc old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/interfaceResources_unix.qrc b/plugins/Themes/Oxygen/interfaceResources_unix.qrc old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/interfaceResources_windows.qrc b/plugins/Themes/Oxygen/interfaceResources_windows.qrc old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/options.ui b/plugins/Themes/Oxygen/options.ui old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/plugin.json b/plugins/Themes/Oxygen/plugin.json old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/add.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/add.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/exit.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/exit.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/informations.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/informations.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/options.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/options.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Caught_Unix.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Caught_Unix.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Caught_Windows.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Caught_Windows.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Uncaught_Unix.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Uncaught_Unix.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Uncaught_Windows.png b/plugins/Themes/Oxygen/resources/SystemTrayIcon/systray_Uncaught_Windows.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/add.png b/plugins/Themes/Oxygen/resources/add.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/cancel.png b/plugins/Themes/Oxygen/resources/cancel.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/export-transfer-list.png b/plugins/Themes/Oxygen/resources/export-transfer-list.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/import-transfer-list.png b/plugins/Themes/Oxygen/resources/import-transfer-list.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/main.png b/plugins/Themes/Oxygen/resources/main.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/moveDown.png b/plugins/Themes/Oxygen/resources/moveDown.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/moveUp.png b/plugins/Themes/Oxygen/resources/moveUp.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/player_end.png b/plugins/Themes/Oxygen/resources/player_end.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/player_pause.png b/plugins/Themes/Oxygen/resources/player_pause.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/player_play.png b/plugins/Themes/Oxygen/resources/player_play.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/putOnBottom.png b/plugins/Themes/Oxygen/resources/putOnBottom.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/putOnTop.png b/plugins/Themes/Oxygen/resources/putOnTop.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/remove.png b/plugins/Themes/Oxygen/resources/remove.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/resources/search.png b/plugins/Themes/Oxygen/resources/search.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen/themesOptions.ui b/plugins/Themes/Oxygen/themesOptions.ui old mode 100644 new mode 100755 diff --git a/plugins/Themes/Oxygen2/DarkButton.cpp b/plugins/Themes/Oxygen2/DarkButton.cpp new file mode 100755 index 0000000..06b09f1 --- /dev/null +++ b/plugins/Themes/Oxygen2/DarkButton.cpp @@ -0,0 +1,99 @@ +#include "DarkButton.h" +#include + +DarkButton::DarkButton(QWidget *parent) : + QPushButton(parent) +{ + setMinimumHeight(36); + setMaximumHeight(36); + setStyleSheet("border:none;color:#afb;"); + over=false; + enabled=true; +} + +void DarkButton::paintEvent(QPaintEvent * event) +{ + if(backgroundLeft.isNull() || backgroundLeft.height()!=height()) + { + QPixmap background(":/Themes/Oxygen2/resources/darkButton.png"); + if(background.isNull()) + abort(); + QPixmap backgroundPushed(":/Themes/Oxygen2/resources/darkButtonPushed.png"); + if(backgroundPushed.isNull()) + abort(); + QPixmap over(":/Themes/Oxygen2/resources/darkButtonOver.png"); + if(over.isNull()) + abort(); + if(height()==background.height()) + { + backgroundLeft=background.copy(0,0,10,36); + backgroundMiddle=background.copy(10,0,46,36); + backgroundRight=background.copy(56,0,10,36); + backgroundPushedLeft=backgroundPushed.copy(0,0,10,36); + backgroundPushedMiddle=backgroundPushed.copy(10,0,46,36); + backgroundPushedRight=backgroundPushed.copy(56,0,10,36); + overLeft=over.copy(0,0,10,36); + overMiddle=over.copy(10,0,46,36); + overRight=over.copy(56,0,10,36); + } + else + { + backgroundLeft=background.copy(0,0,10,36).scaledToHeight(height(),Qt::SmoothTransformation); + backgroundMiddle=background.copy(10,0,46,36).scaledToHeight(height(),Qt::SmoothTransformation); + backgroundRight=background.copy(56,0,10,36).scaledToHeight(height(),Qt::SmoothTransformation); + backgroundPushedLeft=backgroundPushed.copy(0,0,10,36).scaledToHeight(height(),Qt::SmoothTransformation); + backgroundPushedMiddle=backgroundPushed.copy(10,0,46,36).scaledToHeight(height(),Qt::SmoothTransformation); + backgroundPushedRight=backgroundPushed.copy(56,0,10,36).scaledToHeight(height(),Qt::SmoothTransformation); + overLeft=over.copy(0,0,10,36).scaledToHeight(height(),Qt::SmoothTransformation); + overMiddle=over.copy(10,0,46,36).scaledToHeight(height(),Qt::SmoothTransformation); + overRight=over.copy(56,0,10,36).scaledToHeight(height(),Qt::SmoothTransformation); + } + } + QPainter paint; + paint.begin(this); + if(enabled && !isEnabled()) + { + setStyleSheet("border:none;color:#fab;"); + enabled=false; + } + if(!enabled && isEnabled()) + { + setStyleSheet("border:none;color:#afb;"); + enabled=true; + } + if(isDown() && isEnabled()) + { + paint.drawPixmap(0,0,backgroundPushedLeft.width(), backgroundPushedLeft.height(), backgroundPushedLeft); + paint.drawPixmap(backgroundPushedLeft.width(), 0, + width()-backgroundPushedLeft.width()-backgroundPushedRight.width(), backgroundPushedLeft.height(),backgroundPushedMiddle); + paint.drawPixmap(width()-backgroundPushedRight.width(),0, backgroundPushedRight.width(), backgroundPushedRight.height(),backgroundPushedRight); + } + else + { + paint.drawPixmap(0,0,backgroundLeft.width(), backgroundLeft.height(), backgroundLeft); + paint.drawPixmap(backgroundLeft.width(), 0, + width()-backgroundLeft.width()-backgroundRight.width(), backgroundLeft.height(),backgroundMiddle); + paint.drawPixmap(width()-backgroundRight.width(),0, backgroundRight.width(), backgroundRight.height(),backgroundRight); + } + if(over && isEnabled()) + { + paint.drawPixmap(0,0,overLeft.width(), overLeft.height(), overLeft); + paint.drawPixmap(overLeft.width(), 0, + width()-overLeft.width()-overRight.width(), overLeft.height(),overMiddle); + paint.drawPixmap(width()-overRight.width(),0, overRight.width(), overRight.height(),overRight); + } + QPushButton::paintEvent(event); +} + +void DarkButton::enterEvent(QEvent *e) +{ + over=true; + QWidget::enterEvent(e); + update(); +} +void DarkButton::leaveEvent(QEvent *e) +{ + over=false; + QWidget::leaveEvent(e); + update(); +} diff --git a/plugins/Themes/Oxygen2/DarkButton.h b/plugins/Themes/Oxygen2/DarkButton.h new file mode 100755 index 0000000..38dbb60 --- /dev/null +++ b/plugins/Themes/Oxygen2/DarkButton.h @@ -0,0 +1,22 @@ +#ifndef DarkButton_H +#define DarkButton_H + +#include + +class DarkButton : public QPushButton +{ +public: + DarkButton(QWidget *parent = nullptr); + void paintEvent(QPaintEvent *) override; +protected: + void enterEvent(QEvent *e) override; + void leaveEvent(QEvent *e) override; +private: + QPixmap backgroundLeft,backgroundMiddle,backgroundRight; + QPixmap backgroundPushedLeft,backgroundPushedMiddle,backgroundPushedRight; + QPixmap overLeft,overMiddle,overRight; + bool over; + bool enabled; +}; + +#endif // PROGRESSBARDARK_H diff --git a/plugins/Themes/Oxygen2/DebugEngineMacro.h b/plugins/Themes/Oxygen2/DebugEngineMacro.h new file mode 100755 index 0000000..4582010 --- /dev/null +++ b/plugins/Themes/Oxygen2/DebugEngineMacro.h @@ -0,0 +1,28 @@ +/** \file DebugEngineMacro.h +\brief Define the macro for the debug +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef DEBUGENGINEMACRO_H +#define DEBUGENGINEMACRO_H + +#ifdef WIN32 +# define __func__ __FUNCTION__ +#endif + +/// \brief Macro for the debug log +#ifdef ULTRACOPIER_PLUGIN_DEBUG + #if defined (__FILE__) && defined (__LINE__) + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b,__FILE__,__LINE__) + #else + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b) + #endif +#else // ULTRACOPIER_DEBUG + #define ULTRACOPIER_DEBUGCONSOLE(a,b) void() +#endif // ULTRACOPIER_DEBUG + +#endif // DEBUGENGINEMACRO_H + + + + diff --git a/plugins/Themes/Oxygen2/Environment.h b/plugins/Themes/Oxygen2/Environment.h new file mode 100755 index 0000000..265a5a6 --- /dev/null +++ b/plugins/Themes/Oxygen2/Environment.h @@ -0,0 +1,10 @@ +/** \file Environment.h +\brief Define the environment variable and global function +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include "Variable.h" +/// \brief The global include +#include "StructEnumDefinition.h" +#include "DebugEngineMacro.h" + diff --git a/plugins/Themes/Oxygen2/Languages/ar/translation.qm b/plugins/Themes/Oxygen2/Languages/ar/translation.qm new file mode 100755 index 0000000..563a429 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/ar/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/ar/translation.ts b/plugins/Themes/Oxygen2/Languages/ar/translation.ts new file mode 100644 index 0000000..383e6a3 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/ar/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + ملفات %1 + + + + %1 file, with an average size of %2 + %1 ملف ، بمتوسط حجم %2 + + + + RadialMap::Widget + + + + into %1 files + إلى ملفات %1 + + + + Themes + + + + Buy the Ultimate version to fund development + شراء النسخة النهائية لتمويل التنمية + + + + File %1/%2, size: %3/%4 + الملف %1/%2 ، الحجم: %3/%4 + + + + Copy list + قائمة النسخ + + + + Move list + قائمة التحريك + + + + Don't close if errors are found + لا تغلق إذا تم العثور على أخطاء + + + + Never close + لا تغلق + + + + Always close + إغلاق دائما + + + + File Name, 0KB + اسم الملف ، 0KB + + + + + + Select a color + تحديد لون + + + + + + %1 %2% of %3 into %4 files + %1 %2% من %3 إلى ملفات %4 + + + + ThemesFactory + + + Don't close if errors are found + عدم الإغلاق في حاله العثور على أخطاء + + + + Never close + لا تغلق أبدا + + + + Always close + إغلاق دائما + + + + + + Select a color + تحديد لون + + + + interfaceCopy + + + From: + من: + + + + &More + &اكثر + + + + &Pause + &مهلة + + + + &Skip + &تخطي + + + + &Cancel + &الغاء الامر + + + + Close on transfer completion + إغلاق عند إتمام النقل + + + + 0 + 0 + + + + 100MB+ + 100MB+ + + + + Limit copy speed to: + الحد من سرعه النسخ إلى: + + + + Transfer list + قائمه النقل + + + + Move the selected items to the top + تحريك المواد المحددة إلى الأعلى + + + + Move up the selected items + تحريك المواد المحددة لاعلى + + + + Move down the selected items + تحريك المواد المحددة لأسفل + + + + Move the selected items to the bottom + تحريك العناصر المحددة إلى الأسفل + + + + Add file/folder + أضافه ملف/مجلد + + + + Delete the selected items + حذف المواد المحددة + + + + Search + بحث + + + + Export the transfer list + تصدير قائمه النقل + + + + Import the transfer list + استيراد قائمه النقل + + + + Previous + السابق + + + + Next + التالي + + + + + Error + خطا + + + + Export the errors into transfer list + تصدير الأخطاء إلى قائمه النقل + + + + Source + المصدر + + + + Destination + الوجهه + + + + Interface + الواجهه + + + + Add file + اضافة ملف + + + + Add folder + اضافة مجلد + + + + Move file(s) + نقل الملفات + + + + Move folder + نقل المجلد + + + + Copy file(s) + نسخ الملفات + + + + Copy folder + نسخ المجلد + + + + themesOptions + + + Show dual progression + إظهار التقدم المزدوج + + + + Show speed as main information + إظهار السرعة كمعلومات رئيسيه + + + + Use + استخدام + + + + Start with the "more button" pushed + تبدا مع "أكثر زر" دفعت + + + + Minimize on close to systray + تصغير بالقرب من درج النظام + + + + At the end of the copy + في نهاية النسخ + + + + + Limit copy speed to + الحد من سرعه النسخ إلى + + + + KB/s + KB/s + + + + Start minimized + بدء التصغير + + + + Position at start + الموضع في البداية + + + + Dark UI + واجهه مستخدم داكنه + + + + Default + افتراضي + + + + Save as previous + حفظ كسابق + + + + At Center + في الوسط + + + + Informations + المعلومات + + + + Display + عرض + + + + Speed with progress bar + السرعة مع شريط التقدم + + + + Progression color + تدرج اللون + + + + Click to edit the color + انقر لتحرير اللون + + + + Show progression in the title + إظهار التقدم في العنوان + + + + Always on top + دائما في القمه + + + diff --git a/plugins/Themes/Oxygen2/Languages/de/translation.qm b/plugins/Themes/Oxygen2/Languages/de/translation.qm new file mode 100755 index 0000000..ef742de Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/de/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/de/translation.ts b/plugins/Themes/Oxygen2/Languages/de/translation.ts new file mode 100644 index 0000000..db34222 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/de/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + %1 Dateien + + + + %1 file, with an average size of %2 + %1 Datei, mit einer ungefähren Größe von %2 + + + + RadialMap::Widget + + + + into %1 files + in%1 Dateien + + + + Themes + + + + Buy the Ultimate version to fund development + Kaufe die Ultimate Version um die Entwicklung zu finanzieren + + + + File %1/%2, size: %3/%4 + Datei %1/%2, Größe:%3/%4 + + + + Copy list + Zu kopierende Dateien + + + + Move list + Zu verschiebende Dateien + + + + Don't close if errors are found + Nicht schließen, wenn Fehler aufgetreten sind + + + + Never close + Niemals schließen + + + + Always close + Immer schließen + + + + File Name, 0KB + Dateiname, 0KB + + + + + + Select a color + Farbe auswählen + + + + + + %1 %2% of %3 into %4 files + %1 %2 von %3 in %4 Dateien + + + + ThemesFactory + + + Don't close if errors are found + Nicht schließen, wenn Fehler aufgetreten sind + + + + Never close + Niemals schließen + + + + Always close + Immer schließen + + + + + + Select a color + Wählen Sie eine Farbe + + + + interfaceCopy + + + From: + Von: + + + + &More + &Mehr + + + + &Pause + &Pause + + + + &Skip + Über&springen + + + + &Cancel + Abbrechen (&C) + + + + Transfer list + Dateiliste + + + + Delete the selected items + Ausgewählte Einträge löschen + + + + Export the transfer list + Dateiliste exportieren + + + + Import the transfer list + Dateiliste importieren + + + + Previous + Vorherige + + + + Next + Nächste + + + + Interface + Darstellungsoptionen + + + + Move the selected items to the top + Ausgewählte Einträge an den Listenanfang verschieben + + + + 0 + 0 + + + + 100MB+ + 100MB+ + + + + Close on transfer completion + Am Ende des Transfers schließen + + + + Limit copy speed to: + Begrenze Kopiergeschwindigkeit auf: + + + + Move up the selected items + Ausgewählte Einträge einen Platz nach oben verschieben + + + + Move down the selected items + Ausgewählte Einträge einen Platz nach unten verschieben + + + + Move the selected items to the bottom + Ausgewählte Einträge an das Listenende verschieben + + + + Add file/folder + Datei/Ordner hinzufügen + + + + Search + In Dateiliste suchen + + + + + Error + Fehlerprotokoll + + + + Export the errors into transfer list + Fehlgeschlagene Dateien exportieren + + + + Source + Quelle + + + + Destination + Ziel + + + + Add file + Datei hinzufügen + + + + Add folder + Ordner hinzufügen + + + + Move file(s) + Datei(en) verschieben + + + + Move folder + Ordner verschieben + + + + Copy file(s) + Datei(en) kopieren + + + + Copy folder + Verzeichnis kopieren + + + + themesOptions + + + Show dual progression + Zweifachen Fortschrittsbalken anzeigen + + + + Show speed as main information + Geschwindigkeitsbegrenzungsschieberegler anzeigen + + + + Use + Benutzung + + + + Start with the "more button" pushed + Standardmäßig "Mehr" Informationen anzeigen + + + + Minimize on close to systray + Beim Schließen ins Systray minimieren + + + + At the end of the copy + Am Ende des Vorgangs + + + + + Limit copy speed to + Begrenze Übertragungsgeschwindigkeit auf + + + + Start minimized + Minimiert starten + + + + Position at start + + + + + Click to edit the color + Zum Bearbeiten der Farbe klicken + + + + KB/s + KB/s + + + + Dark UI + Dunkles Design + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + Informationen + + + + Display + Anzeige + + + + Speed with progress bar + Geschwindigkeit als Fortschrittsbalken anzeigen + + + + Progression color + Farbe des Fortschrittsbalken + + + + Show progression in the title + Fortschritt im Fenstertitel zeigen + + + + Always on top + Fenster immer im Vordergrund halten + + + diff --git a/plugins/Themes/Oxygen2/Languages/el/translation.qm b/plugins/Themes/Oxygen2/Languages/el/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/el/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/el/translation.ts b/plugins/Themes/Oxygen2/Languages/el/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/el/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/en/translation.qm b/plugins/Themes/Oxygen2/Languages/en/translation.qm new file mode 100755 index 0000000..d925dd6 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/en/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/en/translation.ts b/plugins/Themes/Oxygen2/Languages/en/translation.ts new file mode 100755 index 0000000..4b62856 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/en/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Transfer list + + + + + Delete the selected items + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + Interface + + + + + Move the selected items to the top + + + + + 0 + + + + + 100MB+ + + + + + Close on transfer completion + + + + + Limit copy speed to: + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Search + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/es/translation.qm b/plugins/Themes/Oxygen2/Languages/es/translation.qm new file mode 100755 index 0000000..e18e87a Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/es/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/es/translation.ts b/plugins/Themes/Oxygen2/Languages/es/translation.ts new file mode 100755 index 0000000..43e63df --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/es/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + Comprar la versión Ultimate para financiar el desarrollo + + + + File %1/%2, size: %3/%4 + El archivo %1/%2, el tamaño: %3/%4 + + + + Copy list + Lista de copia + + + + Move list + Lista de movimiento + + + + Don't close if errors are found + No cierre si se encuentran errores + + + + Never close + Nunca cierre + + + + Always close + Siempre cerrar + + + + File Name, 0KB + Nombre de archivo, 0KB + + + + + + Select a color + Seleccione un color + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + No cierre si se encuentran errores + + + + Never close + Nunca cierre + + + + Always close + Siempre cerrar + + + + + + Select a color + Seleccione un color + + + + interfaceCopy + + + From: + De: + + + + &More + &Más + + + + &Pause + &Pausa + + + + &Skip + &Omitir + + + + &Cancel + &Cancelar + + + + Close on transfer completion + Cerca de finalización de transferencia + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + Limitar la velocidad de copia en: + + + + Transfer list + Lista de transferencia + + + + Move the selected items to the top + Mueve los elementos seleccionados a la parte superior + + + + Move up the selected items + Mueva los elementos seleccionados + + + + Move down the selected items + Bajar los elementos seleccionados + + + + Move the selected items to the bottom + Mueve los elementos seleccionados a la parte inferior + + + + Add file/folder + Agregar archivo/carpeta + + + + Delete the selected items + Eliminar los elementos seleccionados + + + + Search + Buscar + + + + Export the transfer list + Exportar la lista de transferencias + + + + Import the transfer list + Importe la lista de transferencias + + + + Previous + Anterior + + + + Next + Próximo + + + + + Error + Error + + + + Export the errors into transfer list + Exportar los errores en la lista de transferencias + + + + Source + Fuente + + + + Destination + Destino + + + + Interface + Interfaz + + + + Add file + Añadir archivo + + + + Add folder + Añadir carpeta + + + + Move file(s) + Mover archivo(s) + + + + Move folder + Mueva la carpeta + + + + Copy file(s) + Copia el archivo(s) + + + + Copy folder + Copia la carpeta + + + + themesOptions + + + Show dual progression + Mostrar progresión dual + + + + Show speed as main information + Mostrar la velocidad como principales informaciones + + + + Use + Uso + + + + Start with the "more button" pushed + Comience con el "botón más" empujada + + + + Minimize on close to systray + Minimizar en cerca de la bandeja del sistema + + + + At the end of the copy + Al final de la copia + + + + + Limit copy speed to + Limitar la velocidad de copia de + + + + Start minimized + + + + + Position at start + + + + + Click to edit the color + Haga clic para editar el color + + + + KB/s + KB/s + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + Informations + + + + Display + Visualización + + + + Speed with progress bar + Velocidad con barra de progreso + + + + Progression color + Progresión de color + + + + Show progression in the title + Mostrar progresión en el título + + + + Always on top + Siempre visible + + + diff --git a/plugins/Themes/Oxygen2/Languages/fr/translation.qm b/plugins/Themes/Oxygen2/Languages/fr/translation.qm new file mode 100755 index 0000000..c6039f5 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/fr/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/fr/translation.ts b/plugins/Themes/Oxygen2/Languages/fr/translation.ts new file mode 100755 index 0000000..2fedb8b --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/fr/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + %1 fichiers + + + + %1 file, with an average size of %2 + %1 fichiers, avec une taille moyenne de %2 + + + + RadialMap::Widget + + + + into %1 files + dans %1 fichiers + + + + Themes + + + + Buy the Ultimate version to fund development + Achetez la version Ultimate pour financer le développement + + + + File %1/%2, size: %3/%4 + Fichier %1/%2, taille: %3/%4 + + + + Copy list + Liste de copies + + + + Move list + Liste de déplacements + + + + Don't close if errors are found + Garder ouvert s'il y a des erreurs + + + + Never close + Ne jamais fermer + + + + Always close + Toujours fermer + + + + File Name, 0KB + Nom de fichier, 0Ko + + + + + + Select a color + Selectionner une coleur + + + + + + %1 %2% of %3 into %4 files + %1 %2% de %3 dans %4 fichiers + + + + ThemesFactory + + + Don't close if errors are found + Garder ouvert s'il y a des erreurs + + + + Never close + Ne jamais fermer + + + + Always close + Toujours fermer + + + + + + Select a color + Selectionner une coleur + + + + interfaceCopy + + + From: + Depuis: + + + + &More + Pl&us + + + + &Pause + &Pause + + + + &Skip + &Passer + + + + &Cancel + &Annuler + + + + Close on transfer completion + Fermer à la fin des transferts + + + + 0 + 0 + + + + 100MB+ + 100Mo+ + + + + Limit copy speed to: + Limiter la vitesse de copie à: + + + + Transfer list + Liste de transferts + + + + Move the selected items to the top + Déplacer l'item selectionné au debut + + + + Move up the selected items + Déplacer l'item selectionné vers le haut + + + + Move down the selected items + Déplacer l'item selectionné vers le bas + + + + Move the selected items to the bottom + Déplacer l'item selectionné à la fin + + + + Add file/folder + Ajouter fichier/dossier + + + + Delete the selected items + Supprimer les items sélectionnés + + + + Search + Rechercher + + + + Export the transfer list + Exporter la liste de transfert + + + + Import the transfer list + Importer la liste de transfert + + + + Previous + Précédent + + + + Next + Suivant + + + + + Error + Erreur + + + + Export the errors into transfer list + Exporter les erreurs dans une liste de transfert + + + + Source + Source + + + + Destination + Destination + + + + Interface + Interface + + + + Add file + Ajouter un fichier + + + + Add folder + Ajouter un répertoire + + + + Move file(s) + Déplacer le(s) fichier(s) + + + + Move folder + Déplacer un répertoire + + + + Copy file(s) + Copier le(s) fichier(s) + + + + Copy folder + Copier un répertoire + + + + themesOptions + + + Show dual progression + Afficher une double progression + + + + Show speed as main information + Afficher la vitesse comme information principale + + + + Use + Utilisation + + + + Start with the "more button" pushed + Déplier automatiquement les détails + + + + Minimize on close to systray + Minimiser à la fermeture dans le systray + + + + At the end of the copy + À la fin de la copie + + + + + Limit copy speed to + Limiter la vitesse de copie à + + + + Start minimized + Démarrer minimisé + + + + Position at start + + + + + Click to edit the color + Cliquer pour éditer la couleur + + + + KB/s + Ko/s + + + + Dark UI + UI obscure + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + Informations + + + + Display + Affichage + + + + Speed with progress bar + Vitesse avec barre de progression + + + + Progression color + Couleur de progression + + + + Show progression in the title + Afficher la progression dans le titre + + + + Always on top + Toujours au 1er plan + + + diff --git a/plugins/Themes/Oxygen2/Languages/hi/translation.qm b/plugins/Themes/Oxygen2/Languages/hi/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/hi/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/hi/translation.ts b/plugins/Themes/Oxygen2/Languages/hi/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/hi/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/hu/translation.qm b/plugins/Themes/Oxygen2/Languages/hu/translation.qm new file mode 100755 index 0000000..6567c41 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/hu/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/hu/translation.ts b/plugins/Themes/Oxygen2/Languages/hu/translation.ts new file mode 100755 index 0000000..1d6d670 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/hu/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + Vásárold meg az Ultimate verziót a fejlesztés támogatásához + + + + File %1/%2, size: %3/%4 + Fájl %1/%2, méret: %3/%4 + + + + Copy list + Lista másolása + + + + Move list + Lista mozgatása + + + + Don't close if errors are found + Ne zárja be, ha hiba történik + + + + Never close + Sose zárja be + + + + Always close + Mindig zárja be + + + + File Name, 0KB + Fájlnév, 0KB + + + + + + Select a color + Válassz egy színt + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + Ne zárja be, ha hiba történik + + + + Never close + Sose zárja be + + + + Always close + Mindig zárja be + + + + + + Select a color + Válassz egy színt + + + + interfaceCopy + + + From: + Forrás: + + + + &More + &Több + + + + &Pause + &Szünet + + + + &Skip + &Kihagy + + + + &Cancel + &Mégse + + + + Transfer list + Átviteli lista + + + + Previous + Előző + + + + Next + Következő + + + + Interface + Kezelőfelület + + + + Move the selected items to the top + Kijelölések elemek mozgatása legfelülre + + + + 0 + + + + + 100MB+ + + + + + Close on transfer completion + Átvitel végeztével zárja be + + + + Limit copy speed to: + Másolási sebesség korlátozása: + + + + Move up the selected items + Kijelölt elemek mozgatása fel + + + + Move down the selected items + Kijelölt elemek mozgatása le + + + + Move the selected items to the bottom + Kijelölések elemek mozgatása legalulra + + + + Add file/folder + Fájl/mappa hozzáadása + + + + Delete the selected items + Kijelölt elemek törlése + + + + Search + Keresés + + + + Export the transfer list + Átviteli lista exportálása + + + + Import the transfer list + Átviteli lista importálása + + + + + Error + Hiba + + + + Export the errors into transfer list + Hibák exportálása az átviteli listába + + + + Source + Forrás + + + + Destination + Cél + + + + Add file + Fájl hozzáadása + + + + Add folder + Mappa hozzáadása + + + + Move file(s) + Fájl(ok) mozgatása + + + + Move folder + Mappa mozgatása + + + + Copy file(s) + Fájl(ok) másolása + + + + Copy folder + Mappa másolása + + + + themesOptions + + + Show dual progression + Páros folyamat mutatása + + + + Show speed as main information + Sebesség mutatása, mint fő információ + + + + Use + Használ + + + + Start with the "more button" pushed + Indítás a "több gomb" lenyomásával + + + + Minimize on close to systray + Bezáráskor minimalizálás a tálcára + + + + At the end of the copy + A másolás befejezésekor + + + + + Limit copy speed to + Másolási sebesség korlátozása + + + + Start minimized + + + + + Position at start + + + + + Click to edit the color + Kattints a szín szerkesztéséhez + + + + KB/s + KB/s + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + Információk + + + + Display + Megjelenítés + + + + Speed with progress bar + Sebesség folyamatsávval + + + + Progression color + Folyamat színe + + + + Show progression in the title + Folyamat mutatása a címsorban + + + + Always on top + Mindig legfelül + + + diff --git a/plugins/Themes/Oxygen2/Languages/id/translation.qm b/plugins/Themes/Oxygen2/Languages/id/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/id/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/id/translation.ts b/plugins/Themes/Oxygen2/Languages/id/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/id/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/it/translation.qm b/plugins/Themes/Oxygen2/Languages/it/translation.qm new file mode 100755 index 0000000..5afbca5 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/it/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/it/translation.ts b/plugins/Themes/Oxygen2/Languages/it/translation.ts new file mode 100644 index 0000000..1c6eb21 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/it/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + %1 file + + + + %1 file, with an average size of %2 + %1 file, con una dimensione media di %2 + + + + RadialMap::Widget + + + + into %1 files + in %1 file + + + + Themes + + + + Buy the Ultimate version to fund development + Acquista la versione Ultimate per finanziare lo sviluppo del programma + + + + File %1/%2, size: %3/%4 + File %1/%2, dimensione: %3/%4 + + + + Copy list + Lista della copia + + + + Move list + Lista dello spostamento + + + + Don't close if errors are found + Non chiudere se vengono rilevati errori + + + + Never close + Non chiudere mai + + + + Always close + Chiudere sempre + + + + File Name, 0KB + Nome del file, 0KB + + + + + + Select a color + Scegliere un colore + + + + + + %1 %2% of %3 into %4 files + %1 %2% di %3 in %4 file + + + + ThemesFactory + + + Don't close if errors are found + Non chiudere se vengono rilevati errori + + + + Never close + Non chiudere mai + + + + Always close + Chiudere sempre + + + + + + Select a color + Scegliere un colore + + + + interfaceCopy + + + From: + Da: + + + + &More + Avanzate + + + + &Pause + Pausa + + + + &Skip + Salta + + + + &Cancel + Annulla + + + + Close on transfer completion + Arresta il sistema a trasferimento comletato + + + + 0 + 0 + + + + 100MB+ + 100MB+ + + + + Limit copy speed to: + Limitare la velocità di copia a: + + + + Transfer list + Lista dei trasferimenti + + + + Move the selected items to the top + Sposta in cima gli elementi selezionati + + + + Move up the selected items + Sposta sopra gli elementi selezionati + + + + Move down the selected items + Sposta sotto gli elementi selezionati + + + + Move the selected items to the bottom + Sposta in coda gli elementi selezionati + + + + Add file/folder + Aggiungi file/cartelle + + + + Delete the selected items + Elimina gli elementi selezionati + + + + Search + Cerca + + + + Export the transfer list + Esporta la lista dei trasferimenti + + + + Import the transfer list + Importa la lista dei trasferimenti + + + + Previous + Precedente + + + + Next + Successivo + + + + + Error + Errore + + + + Export the errors into transfer list + Esporta gli errori nella lista dei trasferimenti + + + + Source + Cartella di origine + + + + Destination + Cartella di destinazione + + + + Interface + Interfaccia + + + + Add file + Aggiungi file + + + + Add folder + Aggiungi cartella + + + + Move file(s) + Sposta file + + + + Move folder + Sposta la cartella + + + + Copy file(s) + Copia file + + + + Copy folder + Copia la cartella + + + + themesOptions + + + Show dual progression + Mostrare la doppia progressione + + + + Show speed as main information + Mostrare la velocità come principale informazione + + + + Use + Utilità + + + + Start with the "more button" pushed + Iniziare col pulsante "Altro" attivo + + + + Minimize on close to systray + Alla chiusura riduci nella'area di notifica + + + + At the end of the copy + Al termine della copia + + + + + Limit copy speed to + Limitare velocità di copia a: + + + + Start minimized + Avvia ridotto a icona + + + + Position at start + Posizione di partenza + + + + Click to edit the color + Clicca per modificare il colore + + + + KB/s + KB/s + + + + Dark UI + Interfaccia utente scura + + + + Default + Predefinito + + + + Save as previous + Mantenere come precedente + + + + At Center + Centrale + + + + Informations + Informazioni + + + + Display + Visualizza + + + + Speed with progress bar + Velocità nella barra di progresso + + + + Progression color + Colore della progressione + + + + Show progression in the title + Mostrare la percentuale di progresso sul titolo + + + + Always on top + Sempre in primo piano + + + diff --git a/plugins/Themes/Oxygen2/Languages/ja/translation.qm b/plugins/Themes/Oxygen2/Languages/ja/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/ja/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/ja/translation.ts b/plugins/Themes/Oxygen2/Languages/ja/translation.ts new file mode 100755 index 0000000..851343e --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/ja/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Transfer list + + + + + Delete the selected items + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + Interface + + + + + Move the selected items to the top + + + + + 0 + + + + + 100MB+ + + + + + Close on transfer completion + + + + + Limit copy speed to: + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Search + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/ko/translation.qm b/plugins/Themes/Oxygen2/Languages/ko/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/ko/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/ko/translation.ts b/plugins/Themes/Oxygen2/Languages/ko/translation.ts new file mode 100755 index 0000000..689ea9e --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/ko/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + 파일 %1/%2, 크기: %3/%4 + + + + Copy list + 복사 목록 + + + + Move list + + + + + Don't close if errors are found + 오류 발견시 종료 안함 + + + + Never close + 절대 종료 안함 + + + + Always close + 항상 종료 + + + + File Name, 0KB + 파일명, 0KB + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + 오류 발견시 종료 안함 + + + + Never close + 절대 종료 안함 + + + + Always close + 항상 종료 + + + + + + Select a color + + + + + interfaceCopy + + + From: + 원본: + + + + &More + &자세히 + + + + &Pause + &일시 정지 + + + + &Skip + &건너뛰기 + + + + &Cancel + &취소 + + + + Transfer list + + + + + Delete the selected items + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + 이전 + + + + Next + 다음 + + + + Interface + 인터페이스 + + + + Move the selected items to the top + + + + + 0 + + + + + 100MB+ + + + + + Close on transfer completion + + + + + Limit copy speed to: + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Search + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Add file + 파일 추가 + + + + Add folder + 폴더 추가 + + + + Move file(s) + 파일 이동 + + + + Move folder + 폴더 이동 + + + + Copy file(s) + 파일 복사 + + + + Copy folder + 폴더 복사 + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + 메인 정보에 속도 표시 + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + Start minimized + + + + + Position at start + + + + + Click to edit the color + + + + + KB/s + KB/초 + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/nl/translation.qm b/plugins/Themes/Oxygen2/Languages/nl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/nl/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/nl/translation.ts b/plugins/Themes/Oxygen2/Languages/nl/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/nl/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/no/translation.qm b/plugins/Themes/Oxygen2/Languages/no/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/no/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/no/translation.ts b/plugins/Themes/Oxygen2/Languages/no/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/no/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/pl/translation.qm b/plugins/Themes/Oxygen2/Languages/pl/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/pl/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/pl/translation.ts b/plugins/Themes/Oxygen2/Languages/pl/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/pl/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/pt/translation.qm b/plugins/Themes/Oxygen2/Languages/pt/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/pt/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/pt/translation.ts b/plugins/Themes/Oxygen2/Languages/pt/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/pt/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/ru/translation.qm b/plugins/Themes/Oxygen2/Languages/ru/translation.qm new file mode 100755 index 0000000..59964bb Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/ru/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/ru/translation.ts b/plugins/Themes/Oxygen2/Languages/ru/translation.ts new file mode 100755 index 0000000..512bece --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/ru/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + Файл %1/%2, размер: %3/%4 + + + + Copy list + Копировать список + + + + Move list + + + + + Don't close if errors are found + Не закрывать, если найдены ошибки + + + + Never close + Никогда не закрывать + + + + Always close + Всегда закрывайте + + + + File Name, 0KB + Имя файла, 0KB + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + Не закрывать, если найдены ошибки + + + + Never close + Никогда не закрывать + + + + Always close + Всегда закрывайте + + + + + + Select a color + + + + + interfaceCopy + + + From: + С: + + + + &More + больше + + + + &Pause + пауза + + + + &Skip + пропускать + + + + &Cancel + отменить + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + предыдущий + + + + Next + следующий + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + интерфейс + + + + Add file + Добавить файл + + + + Add folder + Добавить папку + + + + Move file(s) + Перемещение файла(ов) + + + + Move folder + Перемещение папки + + + + Copy file(s) + Копировать файл (ы) + + + + Copy folder + Копировать папку + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + Показать скорости в качестве основной информации + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + Start minimized + + + + + Position at start + + + + + Click to edit the color + + + + + KB/s + Кб/с + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/th/translation.qm b/plugins/Themes/Oxygen2/Languages/th/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/th/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/th/translation.ts b/plugins/Themes/Oxygen2/Languages/th/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/th/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/tr/translation.qm b/plugins/Themes/Oxygen2/Languages/tr/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/tr/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/tr/translation.ts b/plugins/Themes/Oxygen2/Languages/tr/translation.ts new file mode 100755 index 0000000..24ac139 --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/tr/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Close on transfer completion + + + + + 0 + + + + + 100MB+ + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Languages/zh/translation.qm b/plugins/Themes/Oxygen2/Languages/zh/translation.qm new file mode 100755 index 0000000..3738845 Binary files /dev/null and b/plugins/Themes/Oxygen2/Languages/zh/translation.qm differ diff --git a/plugins/Themes/Oxygen2/Languages/zh/translation.ts b/plugins/Themes/Oxygen2/Languages/zh/translation.ts new file mode 100755 index 0000000..851343e --- /dev/null +++ b/plugins/Themes/Oxygen2/Languages/zh/translation.ts @@ -0,0 +1,382 @@ + + + + + QObject + + + %1 files + + + + + %1 file, with an average size of %2 + + + + + RadialMap::Widget + + + + into %1 files + + + + + Themes + + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 into %4 files + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Transfer list + + + + + Delete the selected items + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + Interface + + + + + Move the selected items to the top + + + + + 0 + + + + + 100MB+ + + + + + Close on transfer completion + + + + + Limit copy speed to: + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Search + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Start minimized + + + + + Position at start + + + + + Dark UI + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins/Themes/Oxygen2/Oxygen2Environment.h b/plugins/Themes/Oxygen2/Oxygen2Environment.h new file mode 100755 index 0000000..71b9141 --- /dev/null +++ b/plugins/Themes/Oxygen2/Oxygen2Environment.h @@ -0,0 +1,10 @@ +/** \file Environment.h +\brief Define the environment variable and global function +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include "Oxygen2Variable.h" +/// \brief The global include +#include "StructEnumDefinition.h" +#include "DebugEngineMacro.h" + diff --git a/plugins/Themes/Oxygen2/Oxygen2Variable.h b/plugins/Themes/Oxygen2/Oxygen2Variable.h new file mode 100755 index 0000000..81a97d7 --- /dev/null +++ b/plugins/Themes/Oxygen2/Oxygen2Variable.h @@ -0,0 +1,18 @@ +/** \file Variable.h +\brief Define the environment variable +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef VARIABLEINTERFACEO2_H +#define VARIABLEINTERFACEO2_H + + +//Un-comment this next line to put ultracopier plugin in debug mode +#ifndef ULTRACOPIER_NODEBUG +//#define ULTRACOPIER_PLUGIN_DEBUG +#endif + +#endif // VARIABLEINTERFACEO2_H + + + diff --git a/plugins/Themes/Oxygen2/ProgressBarDark.cpp b/plugins/Themes/Oxygen2/ProgressBarDark.cpp new file mode 100755 index 0000000..3a6b414 --- /dev/null +++ b/plugins/Themes/Oxygen2/ProgressBarDark.cpp @@ -0,0 +1,69 @@ +#include "ProgressBarDark.h" +#include + +ProgressBarDark::ProgressBarDark(QWidget *parent) : + QProgressBar(parent) +{ + setMinimumHeight(22); + setMaximumHeight(55); +} + +ProgressBarDark::~ProgressBarDark() +{ +} + +void ProgressBarDark::paintEvent(QPaintEvent *) +{ + if(backgroundLeft.isNull() || backgroundLeft.height()!=height()) + { + QPixmap background(":/Themes/Oxygen2/resources/progressBarout.png"); + if(background.isNull()) + abort(); + QPixmap bar(":/Themes/Oxygen2/resources/progressBarin.png"); + if(bar.isNull()) + abort(); + if(height()==background.height()) + { + backgroundLeft=background.copy(0,0,24,55); + backgroundMiddle=background.copy(24,0,701,55); + backgroundRight=background.copy(725,0,24,55); + barLeft=bar.copy(0,0,24,55); + barMiddle=bar.copy(24,0,701,55); + barRight=bar.copy(725,0,24,55); + } + else + { + backgroundLeft=background.copy(0,0,24,55).scaledToHeight(height(),Qt::SmoothTransformation); + backgroundMiddle=background.copy(24,0,701,55).scaledToHeight(height(),Qt::SmoothTransformation); + backgroundRight=background.copy(725,0,24,55).scaledToHeight(height(),Qt::SmoothTransformation); + barLeft=bar.copy(0,0,24,55).scaledToHeight(height(),Qt::SmoothTransformation); + barMiddle=bar.copy(24,0,701,55).scaledToHeight(height(),Qt::SmoothTransformation); + barRight=bar.copy(725,0,24,55).scaledToHeight(height(),Qt::SmoothTransformation); + } + } + QPainter paint; + paint.begin(this); + + if(maximum()<=0) + { + paint.drawPixmap(0,0,backgroundLeft.width(), backgroundLeft.height(), backgroundLeft); + paint.drawPixmap(backgroundLeft.width(), 0, + width()-backgroundLeft.width()-backgroundRight.width(), backgroundLeft.height(),backgroundMiddle); + paint.drawPixmap(width()-backgroundRight.width(),0, backgroundRight.width(), backgroundRight.height(),backgroundRight); + return; + } + + int size=width()-barLeft.width()-barRight.width(); + int inpixel=value()*size/maximum(); + + paint.drawPixmap(0,0,backgroundLeft.width(), backgroundLeft.height(), backgroundLeft); + paint.drawPixmap(0,0,barLeft.width(), barLeft.height(), barLeft); + + paint.drawPixmap(backgroundLeft.width(), 0, + width()-backgroundLeft.width()-backgroundRight.width(), backgroundLeft.height(),backgroundMiddle); + paint.drawPixmap(barLeft.width(), 0, + inpixel, barLeft.height(),barMiddle); + + paint.drawPixmap(width()-backgroundRight.width(),0, backgroundRight.width(), backgroundRight.height(),backgroundRight); + paint.drawPixmap(barLeft.width()+inpixel, 0, barRight.width(), barRight.height(),barRight); +} diff --git a/plugins/Themes/Oxygen2/ProgressBarDark.h b/plugins/Themes/Oxygen2/ProgressBarDark.h new file mode 100755 index 0000000..7c8e168 --- /dev/null +++ b/plugins/Themes/Oxygen2/ProgressBarDark.h @@ -0,0 +1,17 @@ +#ifndef PROGRESSBARDARK_H +#define PROGRESSBARDARK_H + +#include + +class ProgressBarDark : public QProgressBar +{ +public: + ProgressBarDark(QWidget *parent = nullptr); + ~ProgressBarDark(); + void paintEvent(QPaintEvent *) override; +private: + QPixmap backgroundLeft,backgroundMiddle,backgroundRight; + QPixmap barLeft,barMiddle,barRight; +}; + +#endif // PROGRESSBARDARK_H diff --git a/plugins/Themes/Oxygen2/README.md b/plugins/Themes/Oxygen2/README.md new file mode 100755 index 0000000..b529701 --- /dev/null +++ b/plugins/Themes/Oxygen2/README.md @@ -0,0 +1,4 @@ +# Themes: Oxygen + +This theme is based on the the Oxygen project for KDE Plasma desktops. It is the +default theme for _Ultracopier_. diff --git a/plugins/Themes/Oxygen2/StructEnumDefinition.h b/plugins/Themes/Oxygen2/StructEnumDefinition.h new file mode 100755 index 0000000..c1758f4 --- /dev/null +++ b/plugins/Themes/Oxygen2/StructEnumDefinition.h @@ -0,0 +1 @@ +#include "../../../StructEnumDefinition.h" diff --git a/plugins/Themes/Oxygen2/ThemesFactory.cpp b/plugins/Themes/Oxygen2/ThemesFactory.cpp new file mode 100755 index 0000000..111cbaa --- /dev/null +++ b/plugins/Themes/Oxygen2/ThemesFactory.cpp @@ -0,0 +1,573 @@ +/** \file factory.cpp +\brief Define the factory core +\author alpha_one_x86 */ + +#include +#include +#include + +#include "ThemesFactory.h" +#include "../../../cpp11addition.h" + +ThemesFactory::ThemesFactory() +{ + optionsEngine=NULL; + tempWidget=new QWidget(); + ui=new Ui::themesOptions(); + ui->setupUi(tempWidget); + ui->toolBox->setCurrentIndex(0); + currentSpeed = 0; + updateSpeed(); + + qRegisterMetaType >("QList"); +} + +ThemesFactory::~ThemesFactory() +{ +} + +PluginInterface_Themes * ThemesFactory::getInstance() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, currentSpeed: "+std::to_string(currentSpeed)); + + Themes * newInterface=new Themes( + ui->alwaysOnTop->isChecked(), + ui->showProgressionInTheTitle->isChecked(), + progressColorWrite,progressColorRead,progressColorRemaining, + ui->showDualProgression->isChecked(), + ui->comboBox_copyEnd->currentIndex(), + ui->speedWithProgressBar->isChecked(), + currentSpeed, + ui->checkBoxShowSpeed->isChecked(), + facilityEngine, + ui->checkBoxStartWithMoreButtonPushed->isChecked(), + ui->minimizeToSystray->isChecked(), + ui->startMinimized->isChecked(), + ui->savePosition->currentIndex(), + ui->dark->isChecked() + ); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(newInterface,&Themes::debugInformation,this,&PluginInterface_ThemesFactory::debugInformation)) + abort(); + #endif + if(!connect(this,&ThemesFactory::reloadLanguage,newInterface,&Themes::newLanguageLoaded)) + abort(); + if(!connect(newInterface,&Themes::destroyed,this,&ThemesFactory::savePositionBeforeClose)) + abort(); + switch(ui->savePosition->currentIndex()) + { + default: + case 0: + break; + case 1: + newInterface->move( + stringtouint32(optionsEngine->getOptionValue("savePositionX")), + stringtouint32(optionsEngine->getOptionValue("savePositionY")) + ); + break; + case 2: + if(!qApp->screens().isEmpty()) + newInterface->setGeometry( + QStyle::alignedRect( + Qt::LeftToRight, + Qt::AlignCenter, + newInterface->size(), + #if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) + qApp->desktop()->availableGeometry() + #else + qApp->screens().front()->geometry() + #endif + ) + ); + break; + } + return newInterface; +} + +void ThemesFactory::savePositionBeforeClose(QObject *obj) +{ + if(ui->savePosition->currentIndex()!=1) + return; + if(obj == nullptr) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"obj == nullptr"); + return; + } + const QWidget * const widget=static_cast(obj); + optionsEngine->setOptionValue("savePositionX",std::to_string(widget->x())); + optionsEngine->setOptionValue("savePositionY",std::to_string(widget->y())); +} + +void ThemesFactory::setResources(OptionInterface * optionsEngine,const std::string & + #ifdef ULTRACOPIER_PLUGIN_DEBUG + writePath + #endif + ,const std::string & + #ifdef ULTRACOPIER_PLUGIN_DEBUG + pluginPath + #endif + ,FacilityInterface * facilityEngine,const bool & + ) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath: "+pluginPath); + this->facilityEngine=facilityEngine; + if(optionsEngine!=NULL) + { + this->optionsEngine=optionsEngine; + //load the options + std::vector > KeysList; + KeysList.push_back(std::pair("checkBoxShowSpeed","false")); + KeysList.push_back(std::pair("moreButtonPushed","false")); + KeysList.push_back(std::pair("speedWithProgressBar","true")); + KeysList.push_back(std::pair("currentSpeed","0")); + KeysList.push_back(std::pair("comboBox_copyEnd","0")); + KeysList.push_back(std::pair("showDualProgression","false")); + KeysList.push_back(std::pair("showProgressionInTheTitle","true")); + KeysList.push_back(std::pair("progressColorWrite",QApplication::palette().color(QPalette::Highlight).name().toStdString())); + KeysList.push_back(std::pair("progressColorRead",QApplication::palette().color(QPalette::AlternateBase).name().toStdString())); + KeysList.push_back(std::pair("progressColorRemaining",QApplication::palette().color(QPalette::Base).name().toStdString())); + KeysList.push_back(std::pair("alwaysOnTop","false")); + KeysList.push_back(std::pair("minimizeToSystray","false")); + KeysList.push_back(std::pair("startMinimized","false")); + KeysList.push_back(std::pair("savePosition","0")); + KeysList.push_back(std::pair("savePositionX","0")); + KeysList.push_back(std::pair("savePositionY","0")); + KeysList.push_back(std::pair("dark","true")); + optionsEngine->addOptionGroup(KeysList); + connect(optionsEngine,&OptionInterface::resetOptions,this,&ThemesFactory::resetOptions); + updateSpeed(); + + ui->comboBox_copyEnd->setCurrentIndex(stringtouint32(optionsEngine->getOptionValue("comboBox_copyEnd"))); + ui->speedWithProgressBar->setChecked(stringtobool(optionsEngine->getOptionValue("speedWithProgressBar"))); + ui->checkBoxShowSpeed->setChecked(stringtobool(optionsEngine->getOptionValue("checkBoxShowSpeed"))); + ui->checkBoxStartWithMoreButtonPushed->setChecked(stringtobool(optionsEngine->getOptionValue("moreButtonPushed"))); + ui->showDualProgression->setChecked(stringtobool(optionsEngine->getOptionValue("showDualProgression"))); + ui->showProgressionInTheTitle->setChecked(stringtobool(optionsEngine->getOptionValue("showProgressionInTheTitle"))); + ui->alwaysOnTop->setChecked(stringtobool(optionsEngine->getOptionValue("alwaysOnTop"))); + ui->minimizeToSystray->setChecked(stringtobool(optionsEngine->getOptionValue("minimizeToSystray"))); + ui->startMinimized->setChecked(stringtobool(optionsEngine->getOptionValue("startMinimized"))); + ui->savePosition->setCurrentIndex(stringtouint8(optionsEngine->getOptionValue("savePosition"))); + ui->dark->setChecked(stringtobool(optionsEngine->getOptionValue("dark"))); + } + #ifndef __GNUC__ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"__GNUC__ is not set"); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"__GNUC__ is set"); + #endif +} + +QWidget * ThemesFactory::options() +{ + if(optionsEngine!=NULL) + { + bool ok; + currentSpeed=stringtouint32(optionsEngine->getOptionValue("currentSpeed"),&ok); + if(!ok) + currentSpeed=0; + + progressColorWrite=QVariant(QString::fromStdString(optionsEngine->getOptionValue("progressColorWrite"))).value(); + progressColorRead=QVariant(QString::fromStdString(optionsEngine->getOptionValue("progressColorRead"))).value(); + progressColorRemaining=QVariant(QString::fromStdString(optionsEngine->getOptionValue("progressColorRemaining"))).value(); + + QPixmap pixmap(75,20); + pixmap.fill(progressColorWrite); + ui->progressColorWrite->setIcon(pixmap); + pixmap.fill(progressColorRead); + ui->progressColorRead->setIcon(pixmap); + pixmap.fill(progressColorRemaining); + ui->progressColorRemaining->setIcon(pixmap); + updateSpeed(); + updateProgressionColorBar(); + + if(!connect(ui->alwaysOnTop,&QCheckBox::stateChanged,this,&ThemesFactory::alwaysOnTop)) + abort(); + if(!connect(ui->checkBoxShowSpeed,&QCheckBox::stateChanged,this,&ThemesFactory::checkBoxShowSpeed)) + abort(); + if(!connect(ui->minimizeToSystray,&QCheckBox::stateChanged,this,&ThemesFactory::minimizeToSystray)) + abort(); + if(!connect(ui->checkBox_limitSpeed,&QCheckBox::stateChanged,this,&ThemesFactory::uiUpdateSpeed)) + abort(); + if(!connect(ui->SliderSpeed,&QAbstractSlider::valueChanged,this,&ThemesFactory::on_SliderSpeed_valueChanged)) + abort(); + if(!connect(ui->limitSpeed,static_cast(&QSpinBox::valueChanged), this, &ThemesFactory::uiUpdateSpeed)) + abort(); + if(!connect(ui->checkBoxShowSpeed,&QAbstractButton::toggled,this,&ThemesFactory::checkBoxShowSpeedHaveChanged)) + abort(); + if(!connect(ui->checkBoxStartWithMoreButtonPushed,&QAbstractButton::toggled,this,&ThemesFactory::checkBoxStartWithMoreButtonPushedHaveChanged)) + abort(); + if(!connect(ui->speedWithProgressBar,&QAbstractButton::toggled,this,&ThemesFactory::speedWithProgressBar)) + abort(); + if(!connect(ui->comboBox_copyEnd, static_cast(&QComboBox::currentIndexChanged), this,&ThemesFactory::comboBox_copyEnd)) + abort(); + if(!connect(ui->showDualProgression,&QCheckBox::stateChanged,this,&ThemesFactory::showDualProgression)) + abort(); + if(!connect(ui->showDualProgression,&QCheckBox::stateChanged,this,&ThemesFactory::updateProgressionColorBar)) + abort(); + if(!connect(ui->showProgressionInTheTitle,&QCheckBox::stateChanged,this,&ThemesFactory::setShowProgressionInTheTitle)) + abort(); + if(!connect(ui->progressColorWrite,&QAbstractButton::clicked,this,&ThemesFactory::progressColorWrite_clicked)) + abort(); + if(!connect(ui->progressColorRead, &QAbstractButton::clicked,this,&ThemesFactory::progressColorRead_clicked)) + abort(); + if(!connect(ui->progressColorRemaining,&QAbstractButton::clicked,this,&ThemesFactory::progressColorRemaining_clicked)) + abort(); + if(!connect(ui->startMinimized,&QCheckBox::stateChanged,this,&ThemesFactory::startMinimized)) + abort(); + if(!connect(ui->savePosition,static_cast(&QComboBox::currentIndexChanged),this,&ThemesFactory::savePositionHaveChanged)) + abort(); + if(!connect(ui->dark,&QCheckBox::stateChanged,this,&ThemesFactory::setDark)) + abort(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"return the options"); + return tempWidget; +} + +QIcon ThemesFactory::getIcon(const std::string &fileName) const +{ + if(fileName=="SystemTrayIcon/exit.png") + { + QIcon tempIcon=QIcon::fromTheme("application-exit"); + if(!tempIcon.isNull()) + return tempIcon; + } + else if(fileName=="SystemTrayIcon/add.png") + { + QIcon tempIcon=QIcon::fromTheme("list-add"); + if(!tempIcon.isNull()) + return tempIcon; + } + else if(fileName=="SystemTrayIcon/informations.png") + { + QIcon tempIcon=QIcon::fromTheme("help-about"); + if(!tempIcon.isNull()) + return tempIcon; + } + else if(fileName=="SystemTrayIcon/options.png") + { + QIcon tempIcon=QIcon::fromTheme("applications-system"); + if(!tempIcon.isNull()) + return tempIcon; + } + return QIcon(":/Themes/Oxygen2/resources/"+QString::fromStdString(fileName)); +} + +void ThemesFactory::resetOptions() +{ + ui->checkBoxShowSpeed->setChecked(true); + ui->checkBoxStartWithMoreButtonPushed->setChecked(false); + ui->savePosition->setCurrentIndex(0); +} + +void ThemesFactory::checkBoxShowSpeedHaveChanged(bool toggled) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("checkBoxShowSpeed",std::to_string(toggled)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::checkBoxStartWithMoreButtonPushedHaveChanged(bool toggled) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("moreButtonPushed",std::to_string(toggled)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::savePositionHaveChanged(int value) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("savePosition",std::to_string(value)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::setDark(bool toggled) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("dark",std::to_string(toggled)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::comboBox_copyEnd(int value) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("comboBox_copyEnd",std::to_string(value)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::speedWithProgressBar(bool toggled) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("speedWithProgressBar",std::to_string(toggled)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::newLanguageLoaded() +{ + ui->retranslateUi(tempWidget); + ui->comboBox_copyEnd->setItemText(0,tr("Don't close if errors are found")); + ui->comboBox_copyEnd->setItemText(1,tr("Never close")); + ui->comboBox_copyEnd->setItemText(2,tr("Always close")); + emit reloadLanguage(); +} + +void ThemesFactory::checkBoxShowSpeed(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + Q_UNUSED(checked); + updateSpeed(); +} + +void ThemesFactory::minimizeToSystray(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("minimizeToSystray",std::to_string(checked)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::alwaysOnTop(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("alwaysOnTop",std::to_string(checked)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::showDualProgression(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("showDualProgression",std::to_string(checked)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::startMinimized(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("startMinimized",std::to_string(checked)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::on_SliderSpeed_valueChanged(int value) +{ + if(optionsEngine==NULL) + return; + if(!ui->checkBoxShowSpeed->isChecked()) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"value: "+std::to_string(value)); + switch(value) + { + case 0: + currentSpeed=0; + break; + case 1: + currentSpeed=1024; + break; + case 2: + currentSpeed=1024*4; + break; + case 3: + currentSpeed=1024*16; + break; + case 4: + currentSpeed=1024*64; + break; + case 5: + currentSpeed=1024*128; + break; + } + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("currentSpeed",std::to_string(currentSpeed)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + updateSpeed(); +} + +void ThemesFactory::uiUpdateSpeed() +{ + if(optionsEngine==NULL) + return; + if(ui->checkBoxShowSpeed->isChecked()) + return; + if(!ui->checkBox_limitSpeed->isChecked()) + currentSpeed=0; + else + currentSpeed=ui->limitSpeed->value(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit newSpeedLimitation: "+std::to_string(currentSpeed)); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("currentSpeed",std::to_string(currentSpeed)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::updateSpeed() +{ + if(optionsEngine==NULL) + return; + ui->label_Slider_speed->setVisible(ui->checkBoxShowSpeed->isChecked()); + ui->SliderSpeed->setVisible(ui->checkBoxShowSpeed->isChecked()); + ui->label_SpeedMaxValue->setVisible(ui->checkBoxShowSpeed->isChecked()); + ui->limitSpeed->setVisible(!ui->checkBoxShowSpeed->isChecked()); + ui->checkBox_limitSpeed->setVisible(!ui->checkBoxShowSpeed->isChecked()); + + if(ui->checkBoxShowSpeed->isChecked()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"checked, currentSpeed: "+std::to_string(currentSpeed)); + ui->limitSpeed->setEnabled(false); + if(currentSpeed==0) + { + ui->SliderSpeed->setValue(0); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->translateText("Unlimited"))); + } + else if(currentSpeed<=1024) + { + if(currentSpeed!=1024) + { + currentSpeed=1024; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("currentSpeed",std::to_string(currentSpeed)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(1); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*1))); + } + else if(currentSpeed<=1024*4) + { + if(currentSpeed!=1024*4) + { + currentSpeed=1024*4; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("currentSpeed",std::to_string(currentSpeed)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(2); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*4))); + } + else if(currentSpeed<=1024*16) + { + if(currentSpeed!=1024*16) + { + currentSpeed=1024*16; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("currentSpeed",std::to_string(currentSpeed)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(3); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*16))); + } + else if(currentSpeed<=1024*64) + { + if(currentSpeed!=1024*64) + { + currentSpeed=1024*64; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("currentSpeed",std::to_string(currentSpeed)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(4); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*64))); + } + else + { + if(currentSpeed!=1024*128) + { + currentSpeed=1024*128; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("currentSpeed",std::to_string(currentSpeed)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(5); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*128))); + } + } + else + { + ui->checkBox_limitSpeed->setChecked(currentSpeed>0); + if(currentSpeed>0) + ui->limitSpeed->setValue(currentSpeed); + ui->checkBox_limitSpeed->setEnabled(currentSpeed!=-1); + ui->limitSpeed->setEnabled(ui->checkBox_limitSpeed->isChecked()); + } +} + +void ThemesFactory::progressColorWrite_clicked() +{ + QColor color=QColorDialog::getColor(progressColorWrite,NULL,tr("Select a color")); + if(!color.isValid()) + return; + progressColorWrite=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorWrite); + ui->progressColorWrite->setIcon(pixmap); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("progressColorWrite",progressColorWrite.name().toStdString()); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::progressColorRead_clicked() +{ + QColor color=QColorDialog::getColor(progressColorRead,NULL,tr("Select a color")); + if(!color.isValid()) + return; + progressColorRead=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorRead); + ui->progressColorRead->setIcon(pixmap); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("progressColorRead",progressColorRead.name().toStdString()); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::progressColorRemaining_clicked() +{ + QColor color=QColorDialog::getColor(progressColorRemaining,NULL,tr("Select a color")); + if(!color.isValid()) + return; + progressColorRemaining=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorRemaining); + ui->progressColorRemaining->setIcon(pixmap); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("progressColorRemaining",progressColorRemaining.name().toStdString()); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::updateProgressionColorBar() +{ + ui->labelProgressionColor->setVisible(ui->showDualProgression->isChecked()); + ui->frameProgressionColor->setVisible(ui->showDualProgression->isChecked()); +} + +void ThemesFactory::setShowProgressionInTheTitle() +{ + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("showProgressionInTheTitle",std::to_string(ui->showProgressionInTheTitle->isChecked())); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} diff --git a/plugins/Themes/Oxygen2/ThemesFactory.h b/plugins/Themes/Oxygen2/ThemesFactory.h new file mode 100755 index 0000000..bd6095e --- /dev/null +++ b/plugins/Themes/Oxygen2/ThemesFactory.h @@ -0,0 +1,89 @@ +/** \file factory.h +\brief Define the factory, to create instance of the interface +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef FACTORYTHEMEOXYGEN_H +#define FACTORYTHEMEOXYGEN_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../../interface/PluginInterface_Themes.h" +#include "ui_themesOptions.h" +#include "interface.h" +#include "Oxygen2Environment.h" + +namespace Ui { + class themesOptions; +} + +/// \brief Define the factory, to create instance of the interface +class ThemesFactory : public PluginInterface_ThemesFactory +{ + Q_OBJECT + #ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.ThemesFactory/1.0.1.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_ThemesFactory) + #endif +public: + ThemesFactory(); + ~ThemesFactory(); + /// \brief to return the instance of the copy engine + PluginInterface_Themes * getInstance() override; + /// \brief set the resources, to store options, to have facilityInterface + void setResources(OptionInterface * optionsEngine,const std::string & + #ifdef ULTRACOPIER_PLUGIN_DEBUG + writePath + #endif + ,const std::string & + #ifdef ULTRACOPIER_PLUGIN_DEBUG + pluginPath + #endif + ,FacilityInterface * facilityEngine,const bool &portableVersion) override; + /// \brief to get the default options widget + QWidget * options() override; + /// \brief to get a resource icon + QIcon getIcon(const std::string &fileName) const override; +private slots: + void checkBoxShowSpeedHaveChanged(bool toggled); + void checkBoxStartWithMoreButtonPushedHaveChanged(bool toggled); + void comboBox_copyEnd(int value); + void speedWithProgressBar(bool toggled); + void checkBoxShowSpeed(bool checked); + void minimizeToSystray(bool checked); + void alwaysOnTop(bool checked); + void showDualProgression(bool checked); + void on_SliderSpeed_valueChanged(int value); + void uiUpdateSpeed(); + void updateSpeed(); + void progressColorWrite_clicked(); + void progressColorRead_clicked(); + void progressColorRemaining_clicked(); + void updateProgressionColorBar(); + void setShowProgressionInTheTitle(); + void startMinimized(bool checked); + void savePositionBeforeClose(QObject *obj); + void savePositionHaveChanged(int value); + void setDark(bool toggled); +public slots: + void resetOptions() override; + void newLanguageLoaded() override; +private: + OptionInterface * optionsEngine; + Ui::themesOptions *ui; + QWidget *tempWidget; + FacilityInterface * facilityEngine; + int32_t currentSpeed;///< in KB/s, assume as 0KB/s as default like every where + QColor progressColorWrite,progressColorRead,progressColorRemaining; +signals: + void reloadLanguage() const; +}; + +#endif // FACTORY_H diff --git a/plugins/Themes/Oxygen2/TransferModel.cpp b/plugins/Themes/Oxygen2/TransferModel.cpp new file mode 100755 index 0000000..5a97aab --- /dev/null +++ b/plugins/Themes/Oxygen2/TransferModel.cpp @@ -0,0 +1,755 @@ +#include "TransferModel.h" +#include "../../../cpp11addition.h" +#include + +#define COLUMN_COUNT 3 + +// Model + +QIcon *TransferModel::start=NULL; +QIcon *TransferModel::stop=NULL; + +TransferModel::TransferModel() +{ + /// \warning to prevent Must construct a QGuiApplication before QPixmap IN STATIC WINDOWS VERSION ONLY + if(TransferModel::start==NULL) + TransferModel::start=new QIcon(QStringLiteral(":/resources/player_play.png")); + if(TransferModel::stop==NULL) + TransferModel::stop=new QIcon(QStringLiteral(":/resources/player_pause.png")); + currentIndexSearch=0; + haveSearchItem=false; + loop_size=0,index_for_loop=0; + sub_loop_size=0,sub_index_for_loop=0; + row=0,column=0; + facilityEngine=NULL; + currentIndexSearch=0; + haveSearchItem=false; + searchId=0; + + tree=NULL; +} + +int TransferModel::columnCount( const QModelIndex& parent ) const +{ + return parent == QModelIndex() ? COLUMN_COUNT : 0; +} + +QVariant TransferModel::data( const QModelIndex& index, int role ) const +{ + int row,column; + row=index.row(); + column=index.column(); + if(index.parent()!=QModelIndex() || row < 0 || (unsigned int)row >= transfertItemList.size() || column < 0 || column >= COLUMN_COUNT) + return QVariant(); + + const TransfertItem& item = transfertItemList.at(row); + if(role==Qt::UserRole) + return (quint64)item.id; + else if(role==Qt::DisplayRole) + { + switch(column) + { + case 0: + return QString::fromStdString(item.source); + break; + case 1: + return QString::fromStdString(item.size); + break; + case 2: + return QString::fromStdString(item.destination); + break; + default: + return QVariant(); + } + } + else if(role==Qt::DecorationRole) + { + switch(column) + { + case 0: + if(stopId.find(item.id)!=stopId.cend()) + return *stop; + else if(startId.find(item.id)!=startId.cend()) + return *start; + else + return QVariant(); + break; + default: + return QVariant(); + } + } + else if(role==Qt::BackgroundRole) + { + if(!search_text.empty() && (item.source.find(search_text)!=std::string::npos || + item.destination.find(search_text)!=std::string::npos)) + { + if(haveSearchItem && searchId==item.id) + return QColor(255,150,150,100); + else + return QColor(255,255,0,100); + } + else + return QVariant(); + } + return QVariant(); +} + +int TransferModel::rowCount( const QModelIndex& parent ) const +{ + return parent == QModelIndex() ? transfertItemList.size() : 0; +} + +uint64_t TransferModel::firstId() const +{ + if(transfertItemList.size()>0) + return transfertItemList.front().id; + else + return 0; +} + +QVariant TransferModel::headerData( int section, Qt::Orientation orientation, int role ) const +{ + if(facilityEngine==NULL) + abort(); + if ( role == Qt::DisplayRole && orientation == Qt::Horizontal && section >= 0 && section < COLUMN_COUNT ) { + switch ( section ) { + case 0: + return QString::fromStdString(facilityEngine->translateText("Source")); + case 1: + return QString::fromStdString(facilityEngine->translateText("Size")); + case 2: + return QString::fromStdString(facilityEngine->translateText("Destination")); + } + } + + return QAbstractTableModel::headerData( section, orientation, role ); +} + +bool TransferModel::setData( const QModelIndex& index, const QVariant& value, int role ) +{ + row=index.row(); + column=index.column(); + if(index.parent()!=QModelIndex() || row < 0 || (unsigned int)row >= transfertItemList.size() || column < 0 || column >= COLUMN_COUNT) + return false; + + TransfertItem& item = transfertItemList[row]; + if(role==Qt::UserRole) + { + item.id=value.toULongLong(); + return true; + } + else if(role==Qt::DisplayRole) + { + switch(column) + { + case 0: + item.source=value.toString().toStdString(); + emit dataChanged(index,index); + return true; + break; + case 1: + item.size=value.toString().toStdString(); + emit dataChanged(index,index); + return true; + break; + case 2: + item.destination=value.toString().toStdString(); + emit dataChanged(index,index); + return true; + break; + default: + return false; + } + } + return false; +} + +Folder * TransferModel::appendToTreeR(Folder * const tree, const std::string &subPath,Folder * const oldTree) +{ + const std::string::size_type n=subPath.find('/'); + + //isolate the name + std::string name; + if(n == std::string::npos) + name=subPath; + else + name=subPath.substr(0,n); + //search + auto search = tree->folders.find(name); + Folder * folder=nullptr; + if(search == tree->folders.end()) + { + //append or remplace the existing + if(oldTree!=NULL && (n+1)==subPath.size()) + { + oldTree->setName(subPath.substr(0,n).c_str()); + folder=oldTree; + } + else + folder=new Folder(name); + if(!folder->isFolder()) + { + if(oldTree!=NULL) + abort(); + return nullptr; + } + tree->append(folder); + } + else + { + //create a new leaf + File * file=search->second; + if(!file->isFolder()) + return nullptr; + folder=static_cast(file); + } + if(n == std::string::npos || n+1==subPath.size()) + return folder; + else + return appendToTreeR(folder,subPath.substr(n+1),oldTree); +} + +void TransferModel::appendToTree(const std::string &path,const uint64_t &size) +{ + if(size==0) + return; + const std::string::size_type n=path.rfind('/'); + if(n == std::string::npos) + return; + if(treePath.empty()) + { + treePath=path.substr(0,n+1); + tree->append(path.c_str()+n+1,size); + } + else + { + const std::string &newPath=path.substr(0,n+1); + unsigned int index=0; + while(indexindex) + { + const std::string &subPath=path.substr(index,(n+1)-index); + finalTree=appendToTreeR(tree,subPath); + } + finalTree->append(path.c_str()+n+1,size); + } + else //new root is to be created + { + //save the old values + const std::string oldTreePath=treePath; + Folder * const oldTree=tree; + tree=new Folder(""); + treePath=path.substr(0,index); + + //path switch to rebase the root + if(oldTreePath.size()>index) + appendToTreeR(tree,oldTreePath.substr(index),oldTree); + + Folder * finalTree=tree; + //make the new sub path if have + if((n+1)>index) + finalTree=appendToTreeR(tree,path.substr(index)); + + //do the file + finalTree->append(path.c_str()+n+1,size); + } + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG + //check the integrity of tree + /*now it's mostly stable checkIntegrityChildren(tree); + checkIntegritySize(tree);*/ + #endif +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//check the integrity of tree size +uint64_t TransferModel::checkIntegritySize(const Folder * const tree) +{ + uint64_t size=0; + unsigned int index=0; + while(indexonlyFiles.size()) + { + File * file=tree->onlyFiles.at(index); + if(file->parent()!=tree) + { + std::cerr << "tree parrent corrupted" << std::endl; + abort(); + } + size+=file->size(); + index++; + } + for(const auto& n : tree->folders) + { + Folder * folder=n.second; + if(folder->parent()!=tree) + { + std::cerr << "tree parrent corrupted" << std::endl; + abort(); + } + size+=checkIntegritySize(folder); + } + if(size!=tree->size()) + { + std::cerr << "tree corrupted" << std::endl; + abort(); + } + return tree->size(); +} + +//check the integrity of tree children +uint64_t TransferModel::checkIntegrityChildren(const Folder * const tree) +{ + uint64_t childrens=0; + childrens+=tree->onlyFiles.size(); + for(const auto& n : tree->folders) + { + Folder * folder=n.second; + if(folder->parent()!=tree) + { + std::cerr << "tree parrent corrupted" << std::endl; + abort(); + } + childrens+=checkIntegrityChildren(folder); + } + if(childrens!=tree->children()) + { + std::cerr << "tree corrupted" << std::endl; + abort(); + } + return tree->children(); +} +#endif + +/* + Return[0]: totalFile + Return[1]: totalSize + Return[2]: currentFile + */ +std::vector TransferModel::synchronizeItems(const std::vector& returnActions) +{ + const QModelIndexList oldIndexes = persistentIndexList(); + QModelIndexList newIndexes=oldIndexes; + QMap oldMapping; // model index row in model before update, item id + QMap newMapping; // item id, model index row in model after update + for ( int i = 0; i < oldIndexes.count(); i++ ) { + const QModelIndex& index = oldIndexes.at(i); + oldMapping[index.row()] = index.data( Qt::UserRole ).value(); + } + + loop_size=returnActions.size(); + index_for_loop=0; + quint64 totalFile=0,totalSize=0,currentFile=0; + emit layoutAboutToBeChanged(); + while(index_for_loopsizeToString(action.addAction.size); + newItem.destination=action.addAction.destinationFullPath; + transfertItemList.push_back(newItem); + totalFile++; + totalSize+=action.addAction.size; + + appendToTree(action.addAction.sourceFullPath,action.addAction.size); + } + break; + case Ultracopier::MoveItem: + { + //bool current_entry= + if(action.userAction.position<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, position is wrong: %2").arg(action.addAction.id).arg(action.userAction.position).toStdString()); + break; + } + if((unsigned int)action.userAction.position>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, position is wrong: %2").arg(action.addAction.id).arg(action.userAction.position).toStdString()); + break; + } + if(action.userAction.moveAt<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, position is wrong: %2").arg(action.addAction.id).arg(action.userAction.position).toStdString()); + break; + } + if((unsigned int)action.userAction.moveAt>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, position is wrong: %2").arg(action.addAction.id).arg(action.userAction.position).toStdString()); + break; + } + if(action.userAction.position==action.userAction.moveAt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, move at same position: %2").arg(action.addAction.id).arg(action.userAction.position).toStdString()); + break; + } + const TransfertItem transfertItem=transfertItemList.at(action.userAction.position); + transfertItemList.erase(transfertItemList.cbegin()+action.userAction.position); + transfertItemList.insert(transfertItemList.cbegin()+action.userAction.moveAt,transfertItem); + //newIndexes.move(action.userAction.position,action.userAction.moveAt); + } + break; + case Ultracopier::RemoveItem: + { + if(currentIndexSearch>0 && action.userAction.position<=currentIndexSearch) + currentIndexSearch--; + if(action.userAction.position<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position).toStdString()); + break; + } + if((unsigned int)action.userAction.position>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position).toStdString()); + break; + } + transfertItemList.erase(transfertItemList.cbegin()+action.userAction.position); + currentFile++; + startId.erase(action.addAction.id); + stopId.erase(action.addAction.id); + internalRunningOperation.erase(action.addAction.id); + //newIndexes.remove(action.userAction.moveAt); + } + break; + case Ultracopier::PreOperation: + { + ItemOfCopyListWithMoreInformations tempItem; + tempItem.currentReadProgression=0; + tempItem.currentWriteProgression=0; + tempItem.generalData=action.addAction; + tempItem.actionType=action.type; + internalRunningOperation[action.addAction.id]=tempItem; + } + break; + case Ultracopier::Transfer: + { + if(startId.find(action.addAction.id)==startId.cend()) + startId.insert(action.addAction.id); + stopId.erase(action.addAction.id); + if(internalRunningOperation.find(action.addAction.id)!=internalRunningOperation.cend()) + internalRunningOperation[action.addAction.id].actionType=action.type; + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("unable to found entry for file %1: actionType: Transfer").arg(action.addAction.id).toStdString()); + } + break; + case Ultracopier::PostOperation: + { + if(stopId.find(action.addAction.id)==stopId.cend()) + stopId.insert(action.addAction.id); + startId.erase(action.addAction.id); + } + break; + case Ultracopier::CustomOperation: + { + bool custom_with_progression=(action.addAction.size==1); + //without progression + if(custom_with_progression) + { + if(startId.find(action.addAction.id)!=startId.cend()) + { + startId.erase(action.addAction.id); + if(stopId.find(action.addAction.id)==stopId.cend()) + stopId.insert(action.addAction.id); + } + } + //with progression + else + { + stopId.erase(action.addAction.id); + if(startId.find(action.addAction.id)==startId.cend()) + startId.insert(action.addAction.id); + } + if(internalRunningOperation.find(action.addAction.id)!=internalRunningOperation.cend()) + { + ItemOfCopyListWithMoreInformations &item=internalRunningOperation[action.addAction.id]; + item.actionType=action.type; + item.custom_with_progression=custom_with_progression; + item.currentReadProgression=0; + item.currentWriteProgression=0; + } + } + break; + default: + //unknow code, ignore it + break; + } + index_for_loop++; + } + + if(!oldIndexes.isEmpty()) + { + const QSet ids = oldMapping.values().toSet(); + + for ( unsigned int i = 0; i < transfertItemList.size(); i++ ) { + const TransferModel::TransfertItem& item = transfertItemList.at(i); + + if ( ids.contains( item.id ) ) { + newMapping[ item.id ] = i; + } + } + + for ( int i = 0; i < oldIndexes.count(); i++ ) { + const QModelIndex& index = oldIndexes.at(i); + const int newRow = newMapping.value( oldMapping.value(index.row()), -1 ); + newIndexes[ i ] = newRow == -1 ? QModelIndex() : QAbstractTableModel::index( newRow, index.column(), index.parent() ); + } + } + + changePersistentIndexList( oldIndexes, newIndexes ); + emit layoutChanged(); + { + std::vector newList; + newList.resize(3); + newList[0]=totalFile; + newList[1]=totalSize; + newList[2]=currentFile; + return newList; + } +} + +void TransferModel::setFacilityEngine(FacilityInterface * facilityEngine) +{ + this->facilityEngine=facilityEngine; +} + +int TransferModel::search(const std::string &text, bool searchNext) +{ + emit layoutAboutToBeChanged(); + search_text=text; + emit layoutChanged(); + if(transfertItemList.size()==0) + return -1; + if(text.empty()) + return -1; + if(searchNext) + { + currentIndexSearch++; + if(currentIndexSearch>=loop_size) + currentIndexSearch=0; + } + index_for_loop=0; + loop_size=transfertItemList.size(); + while(index_for_loop=loop_size) + currentIndexSearch=0; + index_for_loop++; + } + haveSearchItem=false; + return -1; +} + +int TransferModel::searchPrev(const std::string &text) +{ + emit layoutAboutToBeChanged(); + search_text=text; + emit layoutChanged(); + if(transfertItemList.size()==0) + return -1; + if(text.empty()) + return -1; + if(currentIndexSearch==0) + currentIndexSearch=loop_size-1; + else + currentIndexSearch--; + index_for_loop=0; + loop_size=transfertItemList.size(); + while(index_for_loop &progressionList) +{ + loop_size=progressionList.size(); + index_for_loop=0; + while(index_for_loop0; + if(returnItem.haveItem) + { + if(internalRunningOperation.find(*startId.cbegin())==internalRunningOperation.cend()) + { + returnItem.haveItem=false; + return returnItem; + } + const ItemOfCopyListWithMoreInformations &itemTransfer=internalRunningOperation.at(*startId.cbegin()); + returnItem.from=itemTransfer.generalData.sourceFullPath; + returnItem.to=itemTransfer.generalData.destinationFullPath; + returnItem.current_file=itemTransfer.generalData.destinationFileName+", "+facilityEngine->sizeToString(itemTransfer.generalData.size); + returnItem.id=itemTransfer.generalData.id; + switch(itemTransfer.actionType) + { + case Ultracopier::CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_read=-1; + else + { + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + returnItem.progressBar_read=-1; + } + break; + case Ultracopier::Transfer: + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + { + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + } + break; + //should never pass here + case Ultracopier::PostOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType).toStdString()); + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + break; + //should pass here if in wait of new name for renaming + case Ultracopier::PreOperation: + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType).toStdString()); + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + break; + default: + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType).toStdString()); + break; + } + } + else + { + returnItem.haveItem=stopId.size()>0; + if(returnItem.haveItem) + { + if(internalRunningOperation.find(*stopId.cbegin())==internalRunningOperation.cend()) + { + returnItem.haveItem=false; + return returnItem; + } + const ItemOfCopyListWithMoreInformations &itemTransfer=internalRunningOperation.at(*stopId.cbegin()); + returnItem.from=itemTransfer.generalData.sourceFullPath; + returnItem.to=itemTransfer.generalData.destinationFullPath; + returnItem.current_file=itemTransfer.generalData.destinationFileName+", "+facilityEngine->sizeToString(itemTransfer.generalData.size); + returnItem.id=itemTransfer.generalData.id; + switch(itemTransfer.actionType) + { + case Ultracopier::CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_read=-1; + else + { + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + returnItem.progressBar_read=-1; + } + break; + case Ultracopier::Transfer: + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + { + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + } + break; + case Ultracopier::PostOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType).toStdString()); + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + break; + //should never pass here + case Ultracopier::PreOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType).toStdString()); + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + break; + default: + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType).toStdString()); + break; + } + } + } + if(returnItem.haveItem && returnItem.progressBar_read!=-1 && returnItem.progressBar_write>returnItem.progressBar_read) + { + int tempVar=returnItem.progressBar_write; + returnItem.progressBar_write=returnItem.progressBar_read; + returnItem.progressBar_read=tempVar; + } + return returnItem; +} diff --git a/plugins/Themes/Oxygen2/TransferModel.h b/plugins/Themes/Oxygen2/TransferModel.h new file mode 100755 index 0000000..94ccdae --- /dev/null +++ b/plugins/Themes/Oxygen2/TransferModel.h @@ -0,0 +1,106 @@ +#ifndef TRANSFERMODEL_H +#define TRANSFERMODEL_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "StructEnumDefinition.h" +#include "Oxygen2Environment.h" + +#include "../../../interface/FacilityInterface.h" +#include "fileTree.h" + +/// \brief model to store the transfer list +class TransferModel : public QAbstractTableModel +{ + Q_OBJECT +public: + /// \brief the transfer item displayed + struct TransfertItem + { + uint64_t id; + std::string source; + std::string size; + std::string destination; + }; + /// \brief the transfer item with progression + struct ItemOfCopyListWithMoreInformations + { + uint64_t currentReadProgression,currentWriteProgression; + Ultracopier::ItemOfCopyList generalData; + Ultracopier::ActionTypeCopyList actionType; + bool custom_with_progression; + }; + /// \brief returned first transfer item + struct currentTransfertItem + { + uint64_t id; + bool haveItem; + std::string from; + std::string to; + std::string current_file; + int progressBar_read,progressBar_write; + }; + + TransferModel(); + + virtual int columnCount(const QModelIndex& parent = QModelIndex()) const; + virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; + virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; + virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + + std::vector synchronizeItems(const std::vector& returnActions); + void appendToTree(const std::string &path, const uint64_t &size); + Folder * appendToTreeR(Folder * const tree, const std::string &subPath,Folder * const oldTree=NULL); + void setFacilityEngine(FacilityInterface * facilityEngine); + + int search(const std::string &text,bool searchNext); + int searchPrev(const std::string &text); + + void setFileProgression(std::vector &progressionList); + + currentTransfertItem getCurrentTransfertItem() const; + + uint64_t firstId() const; + Folder * tree; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + //check the integrity of tree + uint64_t checkIntegrityChildren(const Folder * const tree); + uint64_t checkIntegritySize(const Folder * const tree); + #endif +protected: + std::vector transfertItemList;///< To have a transfer list for the user + std::set startId,stopId;///< To show what is started, what is stopped + std::unordered_map internalRunningOperation;///< to have progression and stat +private: + int loop_size,index_for_loop; + int sub_loop_size,sub_index_for_loop; + int row,column; + FacilityInterface * facilityEngine; + std::string search_text; + /// \brief index from start the search, decresed by remove before it + int currentIndexSearch; + bool haveSearchItem; + uint64_t searchId; + static QIcon *start; + static QIcon *stop; + std::string treePath; +signals: + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; + #endif +}; + +#endif // TRANSFERMODEL_H diff --git a/plugins/Themes/Oxygen2/VerticalLabel.cpp b/plugins/Themes/Oxygen2/VerticalLabel.cpp new file mode 100755 index 0000000..bda9ab8 --- /dev/null +++ b/plugins/Themes/Oxygen2/VerticalLabel.cpp @@ -0,0 +1,44 @@ +#include "VerticalLabel.h" +#include +#include + +VerticalLabel::VerticalLabel(QWidget *parent) + : QLabel(parent) +{ + color=QApplication::palette().text().color(); +} + +VerticalLabel::VerticalLabel(const QString &text, QWidget *parent) + : QLabel(text, parent) +{ +} + +VerticalLabel::~VerticalLabel() +{ +} + +void VerticalLabel::paintEvent(QPaintEvent*) +{ + QPainter painter(this); + painter.setPen(color); + painter.setBrush(Qt::Dense1Pattern); + painter.rotate(90); + painter.drawText(0,0, text()); +} + +void VerticalLabel::setColor(QColor color) +{ + this->color=color; +} + +QSize VerticalLabel::minimumSizeHint() const +{ + QSize s = QLabel::minimumSizeHint(); + return QSize(s.height(), s.width()); +} + +QSize VerticalLabel::sizeHint() const +{ + QSize s = QLabel::sizeHint(); + return QSize(s.height(), s.width()); +} diff --git a/plugins/Themes/Oxygen2/VerticalLabel.h b/plugins/Themes/Oxygen2/VerticalLabel.h new file mode 100755 index 0000000..4c01012 --- /dev/null +++ b/plugins/Themes/Oxygen2/VerticalLabel.h @@ -0,0 +1,21 @@ +#ifndef VERTICALLABELCUSTOM_H +#define VERTICALLABELCUSTOM_H + +#include + +class VerticalLabel : public QLabel +{ +public: + explicit VerticalLabel(QWidget *parent=0); + explicit VerticalLabel(const QString &text, QWidget *parent=0); + ~VerticalLabel() override; + void setColor(QColor color); +protected: + void paintEvent(QPaintEvent*) override; + QSize sizeHint() const override; + QSize minimumSizeHint() const override; +private: + QColor color; +}; + +#endif // VERTICALLABELCUSTOM_H diff --git a/plugins/Themes/Oxygen2/chartarea.cpp b/plugins/Themes/Oxygen2/chartarea.cpp new file mode 100755 index 0000000..9378458 --- /dev/null +++ b/plugins/Themes/Oxygen2/chartarea.cpp @@ -0,0 +1,117 @@ +#include "chartarea.h" + +#include +#include +#include +#include +#include + +ChartArea::Widget::Widget(FacilityInterface * facilityEngine,QWidget *parent) + : QWidget(parent) +{ + this->facilityEngine=facilityEngine; + setSizePolicy(QSizePolicy::Preferred,QSizePolicy::MinimumExpanding); + setMinimumHeight(20); + setMinimumWidth(100); +} + +ChartArea::Widget::~Widget() +{ +} + +void ChartArea::Widget::invalidate() +{ +} + +void ChartArea::Widget::resizeEvent(QResizeEvent*) +{ +} + +void ChartArea::Widget::addValue(uint64_t value) +{ + m_values.push_back(value); + while(m_values.size()>64) + m_values.erase(m_values.begin()); + update(); +} + +void ChartArea::Widget::paintEvent(QPaintEvent*) +{ + QPainter painter; + painter.begin(this); + painter.setBrush(QColor(160,160,160,30)); + painter.drawRect(0,0,width()-1,height()-1); + painter.setRenderHint(QPainter::Antialiasing,true); + painter.setRenderHint(QPainter::SmoothPixmapTransform,true); + painter.setRenderHint(QPainter::HighQualityAntialiasing,true); + + while(m_values.size()<64) + m_values.insert(m_values.begin(),0); + std::vector values=m_values; + QVector points; + { + uint64_t max=0; + unsigned int index=0; + while(index250000) + painter.setPen(QPen(QColor(160,240,160), 3)); + else + painter.setPen(QPen(QColor(160,240,160), 2)); + painter.drawPolyline(QPolygonF(points)); + + + // todo: bounding rect + center flag + if(height()>30) + { + QFont font = painter.font(); + int heightTemp=height()/5; + if(heightTemp<14) + heightTemp=14; + font.setPixelSize(heightTemp); + painter.setFont(font); + + painter.setPen(QPen(QColor(140,140,140), 3)); + painter.drawText(0,0,width(),height(),Qt::AlignHCenter | Qt::AlignBottom, + QString::fromStdString( + facilityEngine->speedToString( + m_values.back() + ) + ) + ); + } + painter.end(); +} diff --git a/plugins/Themes/Oxygen2/chartarea.h b/plugins/Themes/Oxygen2/chartarea.h new file mode 100755 index 0000000..dbfa36c --- /dev/null +++ b/plugins/Themes/Oxygen2/chartarea.h @@ -0,0 +1,31 @@ +#ifndef ChartAreaWIDGET_H +#define ChartAreaWIDGET_H + +#include +#include + +#include "../../../interface/FacilityInterface.h" + +namespace ChartArea +{ + +class Widget : public QWidget +{ + Q_OBJECT + +public: + explicit Widget(FacilityInterface * facilityEngine,QWidget* = nullptr); + ~Widget() override; + void addValue(uint64_t value); +public Q_SLOTS: + void invalidate(); +protected: + void paintEvent(QPaintEvent*) override; + void resizeEvent(QResizeEvent*) override; +private: + FacilityInterface * facilityEngine; + std::vector m_values; +}; +} + +#endif diff --git a/plugins/Themes/Oxygen2/documentation.dox b/plugins/Themes/Oxygen2/documentation.dox new file mode 100755 index 0000000..d94ce0b --- /dev/null +++ b/plugins/Themes/Oxygen2/documentation.dox @@ -0,0 +1,31 @@ +/* -*- mode: C++ ; c-file-style: "stroustrup" -*- **/ + +/* + This file contains NO source code, just some documentation for doxygen to + parse. +*/ + +/*! + \mainpage Oxygen + + \section mainpage_overview Overview + + It's the default interface for Ultracopier.\n + More informations on the wiki of ultracopier. + + \section mainpage_platforms Platforms + + Ultracopier might be usable in all environments where you find Qt 5.\n + Ultracopier requires Qt 5.0 or newer. Tested on Qt 5.0. + + \section mainpage_downloads Downloads + + You can find the link on Ultracopier project page, via git, snapshot sources, ... + + \section license GPL Version 3 + The code source is under GPL3. The image is extacted from Oxygen icon pack of KDE4.\n + resources/export-transfer-list.png and resources/import-transfer-list.png done by png manipulation of KDE's oxygen icon pack (16x16/actions/format-indent-more.png + 16x16/actions/format-list-unordered.png), document-save.png -> all SystemTrayIcon/systray_* (color alteration).\n + From 16x16/actions/: list-add.png -> add.png and SystemTrayIcon/add.png, process-stop.png -> remove.png, document-save.png -> main.png and, arrow-down.png -> moveDown.png, arrow-up.png -> moveUp.png, system-shutdown.png -> cancel.png and SystemTrayIcon/exit.png, arrow-down-double.png -> putOnBottom.png, arrow-up-double.png -> putOnTop.png, media-skip-forward.png -> player_end.png, media-playback-pause.png -> player_pause.png, media-playback-start.png -> player_play.png, document-preview.png -> search.png, help-about.png -> SystemTrayIcon/informations.png \n + And 16x16/categories/applications-development.png -> SystemTrayIcon/options.png + +*/ diff --git a/plugins/Themes/Oxygen2/fileTree.cpp b/plugins/Themes/Oxygen2/fileTree.cpp new file mode 100755 index 0000000..501657c --- /dev/null +++ b/plugins/Themes/Oxygen2/fileTree.cpp @@ -0,0 +1,149 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* Copyright 2017 Harald Sitter +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#include "fileTree.h" + +FacilityInterface *File::facilityEngine=NULL; + +#include +#include + +QString File::displayName() const { + const QString decodedName = QString::fromStdString(m_name); + return url().isLocalFile() ? QDir::toNativeSeparators(decodedName) : decodedName; +} + +QString File::displayPath(const Folder *root) const +{ + // Use QUrl to sanitize the path for display and then run it through + // QDir to make sure we use native path separators. + const QUrl url = this->url(root); + const QString cleanPath = url.toDisplayString(QUrl::PreferLocalFile | QUrl::NormalizePathSegments); + return url.isLocalFile() ? QDir::toNativeSeparators(cleanPath) : cleanPath; +} + +QUrl File::url(const Folder *root) const +{ + QString path; + + if (root == this) + root = nullptr; //prevent returning empty string when there is something we could return + + for (const Folder *d = (Folder*)this; d != root && d; d = d->parent()) { + const QString &name=QString::fromStdString(d->name()); + if(!name.isEmpty() && !path.isEmpty()) + path.prepend(QDir::separator()); + path.prepend(name); + } + + return path; +} + +void Folder::append(File *p) +{ + if(p->isFolder()) + { + folders[p->name()]=static_cast(p); + Folder *d = this; + while(d != nullptr) { + d->m_children+=static_cast(p)->children(); + d->m_size += p->size(); + d=d->m_parent; + } + } + else + { + onlyFiles.push_back(p); + Folder *d = this; + while(d != nullptr) { + /*if(p->isFolder()) + d->m_children+=static_cast(p)->children(); + else*/ + d->m_children++; + d->m_size += p->size(); + d=d->m_parent; + } + } +} + +///appends a Folder +void Folder::append(Folder *d, const std::string &name) +{ + if (!name.empty()) + m_name=name; + + //do into append() m_children += d->children(); //doesn't include the dir itself + d->m_parent = this; + append((File*)d); //will add 1 to filecount for the dir itself +} + +void Folder::append(Folder *d) +{ + //do into append() m_children += d->children(); //doesn't include the dir itself + d->m_parent = this; + append((File*)d); //will add 1 to filecount for the dir itself +} + +///appends a File +void Folder::append(const std::string &name, uint64_t size) +{ + append(new File(name, size, this)); +} + +/// removes a file +void Folder::remove(const File *f) { + bool found=false; + uint64_t sizeToRemove=0; + uint64_t childToRemove=0; + for(const auto& n : folders) + { + Folder * folder=n.second; + if(f==folder) + { + sizeToRemove+=f->size(); + childToRemove+=static_cast(f)->children(); + found=true; + break; + } + } + if(!found) + { + for (unsigned int i = 0; i < onlyFiles.size();) + { + if(onlyFiles.at(i)==f) + { + delete f; + sizeToRemove+=f->size(); + childToRemove++; + break; + } + else + i++; + } + } + Folder *d = this; + while(d != nullptr) { + d->m_size -= sizeToRemove; + d->m_children-=childToRemove; + d=d->m_parent; + } +} diff --git a/plugins/Themes/Oxygen2/fileTree.h b/plugins/Themes/Oxygen2/fileTree.h new file mode 100755 index 0000000..e0ea1c7 --- /dev/null +++ b/plugins/Themes/Oxygen2/fileTree.h @@ -0,0 +1,133 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* Copyright 2017 Harald Sitter +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#ifndef FILETREE_H +#define FILETREE_H + +#include //qstrdup +#include //decodeName() +#include +#include +#include + +#include +#include "../../../interface/FacilityInterface.h" + +class Folder; + +class File +{ +public: + friend class Folder; + static FacilityInterface *facilityEngine; + +public: + File(const std::string &name, uint64_t size) : m_parent(nullptr), m_name(name), m_size(size) {} + File(const std::string &name, uint64_t size, Folder * parent) : m_parent(parent), m_name(name), m_size(size) {} + virtual ~File() { + } + + Folder *parent() const { + return m_parent; + } + + /** Do not use for user visible strings. Use name instead. */ + const std::string name() const { + return m_name; + } + void setName(const std::string &name) { + m_name=name; + } + /** Decoded name. Use when you need a QString. */ + QString decodedName() const { + return QString::fromStdString(m_name); + } + /** + * Human readable name (including native separators where applicable). + * Only use for display. + */ + QString displayName() const; + + uint64_t size() const { + return m_size; + } + + virtual bool isFolder() const { + return false; + } + + /** + * Human readable path for display (including native separators where applicable. + * Only use for display. + */ + QString displayPath(const Folder * = nullptr) const; + QString humanReadableSize() const { + return QString::fromStdString(facilityEngine->sizeToString(m_size)); + } + + /** Builds a complete QUrl by walking up to root. */ + QUrl url(const Folder *root = nullptr) const; + +protected: + File(const char *name, uint64_t size, Folder *parent) : m_parent(parent), m_name(qstrdup(name)), m_size(size) {} + + Folder *m_parent; //0 if this is treeRoot + std::string m_name;//speed boost with std::string in compare with char * due to string size defined without read all + uint64_t m_size; //in Bytes + +private: + File(const File&); + void operator=(const File&); +}; + + +class Folder : public File +{ +public: + Folder(const std::string &name) : File(name, 0), m_children(0) {} //DON'T pass the full path! + + uint children() const { + return m_children; + } + bool isFolder() const override { + return true; + } + + ///appends a Folder + void append(Folder *d, const std::string &name); + void append(Folder *d); + ///appends a File + void append(const std::string &name, uint64_t size); + /// removes a file + void remove(const File *f); + std::unordered_map folders; + std::vector onlyFiles; +private: + void append(File *p); + + uint m_children; +private: + Folder(const Folder&); //undefined + void operator=(const Folder&); //undefined +}; + +#endif diff --git a/plugins/Themes/Oxygen2/informations.xml b/plugins/Themes/Oxygen2/informations.xml new file mode 100755 index 0000000..d4ada14 --- /dev/null +++ b/plugins/Themes/Oxygen2/informations.xml @@ -0,0 +1,26 @@ + + + <![CDATA[Oxygen2 style for Ultracopier]]> + <![CDATA[Style oxygen2 pour Ultracopier]]> + + Themes + + + + + + + 1287496800 + + windows-x86 + + + + + 2.2.4.4 + + Oxygen2 + + + diff --git a/plugins/Themes/Oxygen2/interface.cpp b/plugins/Themes/Oxygen2/interface.cpp new file mode 100755 index 0000000..13ec028 --- /dev/null +++ b/plugins/Themes/Oxygen2/interface.cpp @@ -0,0 +1,1995 @@ +/** \file interface.cpp +\brief Define the interface core +\author alpha_one_x86 */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef Q_OS_WIN32 +#include +#endif + +#define ULTRACOPIERO2_MAXREMAININGTIMECOL 10 +#define ULTRACOPIERO2_MAXVALUESPEEDSTORED 5 + +#include "interface.h" +#include "ui_interface.h" +#include "ThemesFactory.h" +#include "ProgressBarDark.h" + +QIcon Themes::player_play; +QIcon Themes::player_pause; +QIcon Themes::tempExitIcon; +QIcon Themes::editDelete; +QIcon Themes::skinIcon; +QIcon Themes::editFind; +QIcon Themes::documentOpen; +QIcon Themes::documentSave; +QIcon Themes::listAdd; +bool Themes::iconLoaded=false; + +Themes::Themes(const bool &alwaysOnTop, + const bool &showProgressionInTheTitle, + const QColor &progressColorWrite, + const QColor &progressColorRead, + const QColor &progressColorRemaining, + const bool &showDualProgression, + const quint8 &comboBox_copyEnd, + const bool &speedWithProgressBar, + const qint32 ¤tSpeed, + const bool &checkBoxShowSpeed, + FacilityInterface * facilityEngine, + const bool &moreButtonPushed, + const bool &minimizeToSystray, + const bool &startMinimized, + const quint8 &position, + const bool &dark) : + duration(0), + durationStarted(false), + ui(new Ui::interfaceCopy()), + uiOptions(new Ui::themesOptions()), + currentFile(0), + totalFile(0), + currentSize(0), + totalSize(0), + getOldProgression(0), + sysTrayIcon(NULL), + menu(NULL), + action(Ultracopier::EngineActionInProgress::Idle), + currentSpeed(0), + storeIsInPause(false), + modeIsForced(false), + type(Ultracopier::CopyType::FileAndFolder), + mode(Ultracopier::CopyMode::Copy), + haveStarted(false), + haveError(false) + #ifdef Q_OS_WIN32 + ,winTaskbarProgress(this) + #endif +{ + darkUi=dark; + this->facilityEngine=facilityEngine; + File::facilityEngine=facilityEngine; + ui->setupUi(this); + uiOptions->setupUi(ui->optionsTab); + + m_havePause=false; + currentFile = 0; + totalFile = 0; + currentSize = 0; + totalSize = 0; + getOldProgression = 200; + haveError = false; + stat = status_never_started; + modeIsForced = false; + haveStarted = false; + storeIsInPause = false; + durationStarted = false; + if(startMinimized) + this->showMinimized(); + + this->progressColorWrite = progressColorWrite; + this->progressColorRead = progressColorRead; + this->progressColorRemaining= progressColorRemaining; + this->currentSpeed = currentSpeed; + uiOptions->showProgressionInTheTitle->setChecked(showProgressionInTheTitle); + uiOptions->speedWithProgressBar->setChecked(speedWithProgressBar); + uiOptions->showDualProgression->setChecked(showDualProgression); + uiOptions->startMinimized->setEnabled(false); + uiOptions->alwaysOnTop->setChecked(alwaysOnTop); + uiOptions->minimizeToSystray->setChecked(minimizeToSystray); + //uiOptions->setupUi(ui->tabWidget->widget(ui->tabWidget->count()-1)); + uiOptions->labelStartWithMoreButtonPushed->setVisible(false); + uiOptions->checkBoxStartWithMoreButtonPushed->setVisible(false); + uiOptions->labelSavePosition->setVisible(false); + uiOptions->savePosition->setVisible(false); + uiOptions->savePosition->setCurrentIndex(position); + uiOptions->label_Slider_speed->setVisible(false); + uiOptions->SliderSpeed->setVisible(false); + uiOptions->label_SpeedMaxValue->setVisible(false); + uiOptions->comboBox_copyEnd->setCurrentIndex(comboBox_copyEnd); + ui->progressBar->setValue(0); + ui->progressBar_2->setValue(0); + ui->progressBar_3->setValue(0); + ui->progressBar_4->setValue(0); + ui->progressBar_5->setValue(0); + ui->progressBar_6->setValue(0); + speedWithProgressBar_toggled(speedWithProgressBar); + QPixmap pixmap(75,20); + pixmap.fill(progressColorWrite); + uiOptions->progressColorWrite->setIcon(pixmap); + pixmap.fill(progressColorRead); + uiOptions->progressColorRead->setIcon(pixmap); + pixmap.fill(progressColorRemaining); + uiOptions->progressColorRemaining->setIcon(pixmap); + ui->labelTimeRemaining->setText(QString()); + + transferModel.setFacilityEngine(facilityEngine);//need be before ui->TransferList->setModel(&transferModel); due to call of TransferModel::headerData() + ui->TransferList->setModel(&transferModel); + ui->tabWidget->setCurrentIndex(0); + uiOptions->toolBox->setCurrentIndex(0); + uiOptions->checkBoxShowSpeed->setChecked(checkBoxShowSpeed); + menu=new QMenu(this); + ui->add->setMenu(menu); + + //connect the options + checkBoxShowSpeed_toggled(uiOptions->checkBoxShowSpeed->isChecked()); + connect(uiOptions->checkBoxShowSpeed,&QCheckBox::stateChanged,this,&Themes::checkBoxShowSpeed_toggled); + connect(uiOptions->speedWithProgressBar,&QCheckBox::stateChanged,this,&Themes::speedWithProgressBar_toggled); + connect(uiOptions->showProgressionInTheTitle,&QCheckBox::stateChanged,this,&Themes::updateTitle); + connect(uiOptions->showDualProgression,&QCheckBox::stateChanged,this,&Themes::showDualProgression_toggled); + connect(uiOptions->progressColorWrite,&QAbstractButton::clicked,this,&Themes::progressColorWrite_clicked); + connect(uiOptions->progressColorRead, &QAbstractButton::clicked,this,&Themes::progressColorRead_clicked); + connect(uiOptions->progressColorRemaining,&QAbstractButton::clicked,this,&Themes::progressColorRemaining_clicked); + connect(uiOptions->alwaysOnTop,&QAbstractButton::clicked,this,&Themes::alwaysOnTop_clickedSlot); + + connect(uiOptions->limitSpeed, static_cast(&QSpinBox::valueChanged), this, &Themes::uiUpdateSpeed); + connect(uiOptions->checkBox_limitSpeed,&QAbstractButton::toggled, this, &Themes::uiUpdateSpeed); + + connect(ui->actionAddFile,&QAction::triggered,this,&Themes::forcedModeAddFile); + connect(ui->actionAddFileToCopy,&QAction::triggered,this,&Themes::forcedModeAddFileToCopy); + connect(ui->actionAddFileToMove,&QAction::triggered,this,&Themes::forcedModeAddFileToMove); + connect(ui->actionAddFolderToCopy,&QAction::triggered,this,&Themes::forcedModeAddFolderToCopy); + connect(ui->actionAddFolderToMove,&QAction::triggered,this,&Themes::forcedModeAddFolderToMove); + connect(ui->actionAddFolder,&QAction::triggered,this,&Themes::forcedModeAddFolder); + connect(ui->exportErrorToTransferList,&QToolButton::triggered,this,&Themes::exportErrorIntoTransferList); + + ui->overall->hide(); + + //setup the search part + closeTheSearchBox(); + TimerForSearch = new QTimer(this); + TimerForSearch->setInterval(500); + TimerForSearch->setSingleShot(true); + searchShortcut = new QShortcut(QKeySequence(QKeySequence::Find),this); + searchShortcut2 = new QShortcut(QKeySequence(QKeySequence::FindNext),this); + searchShortcut3 = new QShortcut(QKeySequence(Qt::Key_Escape),this); + + //connect the search part + connect(TimerForSearch, &QTimer::timeout, this, &Themes::hilightTheSearchSlot); + connect(searchShortcut, &QShortcut::activated, this, &Themes::searchBoxShortcut); + connect(searchShortcut2, &QShortcut::activated, this, &Themes::on_pushButtonSearchNext_clicked); + connect(ui->pushButtonCloseSearch, &QPushButton::clicked, this, &Themes::closeTheSearchBox); + connect(searchShortcut3, &QShortcut::activated, this, &Themes::closeTheSearchBox); + + //remaining time + { + int index=0; + while(indexmoreButton->setChecked(moreButtonPushed); + on_moreButton_toggled(moreButtonPushed); + + /// \note important for drag and drop, \see dropEvent() + setAcceptDrops(true); + + const QString themePath=":/Themes/Oxygen2/"; + + // try set the OS icon + if(!iconLoaded) + { + iconLoaded=true; + tempExitIcon=QIcon::fromTheme(QStringLiteral("application-exit")); + editDelete=QIcon::fromTheme(QStringLiteral("edit-delete")); + player_pause=QIcon::fromTheme(QStringLiteral("media-playback-pause")); + if(player_pause.isNull()) + player_pause=QIcon(themePath+QStringLiteral("resources/player_pause.png")); + player_play=QIcon::fromTheme(QStringLiteral("media-playback-play")); + if(player_play.isNull()) + player_play=QIcon(themePath+QStringLiteral("resources/player_play.png")); + skinIcon=QIcon::fromTheme(QStringLiteral("media-skip-forward")); + editFind=QIcon::fromTheme(QStringLiteral("edit-find")); + documentOpen=QIcon::fromTheme(QStringLiteral("document-open")); + documentSave=QIcon::fromTheme(QStringLiteral("document-save")); + listAdd=QIcon::fromTheme(QStringLiteral("list-add")); + } + if(!tempExitIcon.isNull()) + { + ui->cancelButton->setIcon(tempExitIcon); + ui->pushButtonCloseSearch->setIcon(tempExitIcon); + ui->shutdown->setIcon(tempExitIcon); + } + if(!editDelete.isNull()) + ui->del->setIcon(editDelete); + if(!player_pause.isNull()) + ui->pauseButton->setIcon(player_pause); + if(!skinIcon.isNull()) + ui->skipButton->setIcon(skinIcon); + if(!editFind.isNull()) + ui->searchButton->setIcon(editFind); + if(!documentOpen.isNull()) + ui->importTransferList->setIcon(documentOpen); + if(!documentSave.isNull()) + { + ui->exportTransferList->setIcon(documentSave); + ui->exportErrorToTransferList->setIcon(documentSave); + } + if(!listAdd.isNull()) + { + ui->add->setIcon(listAdd); + ui->actionAddFile->setIcon(listAdd); + ui->actionAddFileToCopy->setIcon(listAdd); + ui->actionAddFileToMove->setIcon(listAdd); + ui->actionAddFolder->setIcon(listAdd); + ui->actionAddFolderToCopy->setIcon(listAdd); + ui->actionAddFolderToMove->setIcon(listAdd); + } + #ifdef Q_OS_WIN32 + pixmapTop=QPixmap(themePath+QStringLiteral("resources/SystemTrayIcon/systray_Uncaught_Windows.png")); + pixmapBottom=QPixmap(themePath+QStringLiteral("resources/SystemTrayIcon/systray_Caught_Windows.png")); + #else + pixmapTop=QPixmap(themePath+QStringLiteral("resources/SystemTrayIcon/systray_Uncaught_Unix.png")); + pixmapBottom=QPixmap(themePath+QStringLiteral("resources/SystemTrayIcon/systray_Caught_Unix.png")); + #endif + + shutdown=facilityEngine->haveFunctionality("shutdown"); + ui->shutdown->setVisible(shutdown); + radial=new RadialMap::Widget(dark,this); + ui->verticalLayouMiddle->addWidget(radial); + + chartarea=new ChartArea::Widget(facilityEngine,this); + ui->verticalLayoutRight->insertWidget(0,chartarea); + + selectionModel=ui->TransferList->selectionModel(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(&transferModel,&TransferModel::debugInformation,this,&Themes::debugInformation); + #endif + + updateSpeed(); + alwaysOnTop_clicked(false); + /*#ifdef Q_OS_WIN32 + uiOptions->labelAlwaysOnTop->hide(); + uiOptions->alwaysOnTop->hide(); + #endif*/ + QString ultimateUrl; + if(facilityEngine->isUltimate()) + ui->ad_ultimate->hide(); + else + { + ultimateUrl=QString::fromStdString(facilityEngine->ultimateUrl()); + if(ultimateUrl.isEmpty()) + ui->ad_ultimate->hide(); + else + ui->ad_ultimate->setText( + QStringLiteral("%2").arg(ultimateUrl).arg(tr("Buy the Ultimate version to fund development"))+", " + +QStringLiteral("Follow us: ")+QStringLiteral("").arg("https://www.facebook.com/Ultracopier/") + ); + } + + sysTrayIcon = new QSystemTrayIcon(this); + connect(sysTrayIcon,&QSystemTrayIcon::activated,this,&Themes::catchAction); + #ifdef Q_OS_WIN32 + winTaskbarProgress.show(); + #endif + + verticalLabel=new VerticalLabel(); + verticalLabel->setText(QString::fromStdString(facilityEngine->speedToString(50*1000*1000))); + ui->verticalLayoutVL->insertWidget(0,verticalLabel); + + if(darkUi) + { + if(ultimateUrl.isEmpty()) + ui->ad_ultimate->hide(); + else + ui->ad_ultimate->setText( + QStringLiteral("%2").arg(ultimateUrl).arg(tr("Buy the Ultimate version to fund development"))+", " + +QStringLiteral("Follow us: ")+QStringLiteral("").arg("https://www.facebook.com/Ultracopier/") + ); + //ui->frame->setStyleSheet("#frame{background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgb(70, 70, 70), stop:1 rgb(40, 40, 40));}"); + ui->labelTimeRemaining->setStyleSheet("color:#fff;"); + ui->labelSPStart->setStyleSheet("color:#aaa;"); + ui->labelSPStop->setStyleSheet("color:#aaa;"); + ui->from_label->setStyleSheet("color:#aaa;"); + ui->current_file->setStyleSheet("color:#fff;"); + ui->from->setStyleSheet("color:#fff;"); + verticalLabel->setColor(QColor(160,160,160)); + + //ui->ad_ultimate->setStyleSheet("color:#fff;background-color:rgb(50, 50, 50);"); + + QString labelTimeRemaining; + labelTimeRemaining+=""; + labelTimeRemaining+=QString::fromStdString(facilityEngine->translateText("Remaining:")); + labelTimeRemaining+=""; + labelTimeRemaining+=QStringLiteral(" "); + labelTimeRemaining+=QStringLiteral("∞"); + labelTimeRemaining+=QStringLiteral(""); + ui->labelTimeRemaining->setText(labelTimeRemaining); + + ui->frameS->setStyleSheet("#frameS{border: 1px solid #b0c0f0;} QProgressBar{background-color: rgba(160,180,240,100);border: 0 solid grey; } QProgressBar::chunk {background-color: rgba(160,180,240,200);}"); + + int tempIndex=ui->verticalLayoutLeft->indexOf(ui->progressBar_all); + progressBar_all=new ProgressBarDark(ui->frameLeft); + progressBar_all->setMaximum(ui->progressBar_all->maximum()); + progressBar_all->setValue(ui->progressBar_all->value()); + ui->progressBar_all->hide(); + ui->verticalLayoutLeft->insertWidget(tempIndex,progressBar_all); + + tempIndex=ui->verticalLayoutRight->indexOf(ui->progressBar_file); + progressBar_file=new ProgressBarDark(ui->frameRight); + progressBar_file->setMaximum(ui->progressBar_file->maximum()); + progressBar_file->setValue(ui->progressBar_file->value()); + ui->progressBar_file->hide(); + ui->verticalLayoutRight->insertWidget(tempIndex,progressBar_file); + + tempIndex=ui->horizontalLayoutLeft->indexOf(ui->moreButton); + moreButton=new DarkButton(ui->frameLeft); + moreButton->setText(ui->moreButton->text()); + moreButton->setCheckable(ui->moreButton->isCheckable()); + moreButton->setMinimumWidth(60); + ui->moreButton->hide(); + ui->horizontalLayoutLeft->insertWidget(tempIndex,moreButton); + { + QIcon i; + i.addFile(QString::fromUtf8(":/Themes/Oxygen/resources/darkmoveUp.png"), QSize(), QIcon::Normal, QIcon::Off); + i.addFile(QString::fromUtf8(":/Themes/Oxygen/resources/darkmoveDown.png"), QSize(), QIcon::Normal, QIcon::On); + moreButton->setIcon(i); + } + connect(moreButton,&QPushButton::toggled,ui->moreButton,&QPushButton::toggled); + + tempIndex=ui->horizontalLayoutLeft->indexOf(ui->pauseButton); + pauseButton=new DarkButton(ui->frameLeft); + pauseButton->setText(ui->pauseButton->text()); + pauseButton->setCheckable(ui->pauseButton->isCheckable()); + pauseButton->setMinimumWidth(60); + ui->pauseButton->hide(); + ui->horizontalLayoutLeft->insertWidget(tempIndex,pauseButton); + { + QIcon i; + i.addFile(QString::fromUtf8(":/Themes/Oxygen/resources/darkplayer_pause.png"), QSize(), QIcon::Normal, QIcon::Off); + i.addFile(QString::fromUtf8(":/Themes/Oxygen/resources/darkplayer_play.png"), QSize(), QIcon::Normal, QIcon::On); + pauseButton->setIcon(i); + } + connect(pauseButton,&QPushButton::toggled,ui->pauseButton,&QPushButton::toggled); + connect(pauseButton,&QPushButton::clicked,ui->pauseButton,&QPushButton::clicked); + + tempIndex=ui->horizontalLayoutRight->indexOf(ui->skipButton); + skipButton=new DarkButton(ui->frameLeft); + skipButton->setText(ui->skipButton->text()); + skipButton->setCheckable(ui->skipButton->isCheckable()); + skipButton->setMinimumWidth(60); + ui->skipButton->hide(); + ui->horizontalLayoutRight->insertWidget(tempIndex,skipButton); + { + QIcon i; + i.addFile(QString::fromUtf8(":/Themes/Oxygen/resources/darkplayer_end.png")); + skipButton->setIcon(i); + } + connect(skipButton,&QPushButton::toggled,ui->skipButton,&QPushButton::toggled); + connect(skipButton,&QPushButton::clicked,ui->skipButton,&QPushButton::clicked); + + tempIndex=ui->horizontalLayoutRight->indexOf(ui->cancelButton); + cancelButton=new DarkButton(ui->frameLeft); + cancelButton->setText(ui->cancelButton->text()); + cancelButton->setCheckable(ui->cancelButton->isCheckable()); + cancelButton->setMinimumWidth(60); + ui->cancelButton->hide(); + ui->horizontalLayoutRight->insertWidget(tempIndex,cancelButton); + { + QIcon i; + i.addFile(QString::fromUtf8(":/Themes/Oxygen/resources/cancelDarkE.png")); + cancelButton->setIcon(i); + } + connect(cancelButton,&QPushButton::toggled,ui->cancelButton,&QPushButton::toggled); + connect(cancelButton,&QPushButton::clicked,ui->cancelButton,&QPushButton::clicked); + + #if defined(__EMSCRIPTEN__) && defined(ULTRACOPIER_LITTLE_RANDOM) + cancelButton->setEnabled(false); + #endif + } + else + { + progressBar_all=nullptr; + progressBar_file=nullptr; + + moreButton=nullptr; + pauseButton=nullptr; + skipButton=nullptr; + cancelButton=nullptr; + #if defined(__EMSCRIPTEN__) && defined(ULTRACOPIER_LITTLE_RANDOM) + ui->cancelButton->setEnabled(false); + #endif + } + isInPause(false); + showDualProgression_toggled(showDualProgression); + + show(); +} + +Themes::~Themes() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //disconnect(ui->actionAddFile); + //disconnect(ui->actionAddFolder); + if(progressBar_all!=nullptr) + delete progressBar_all; + if(progressBar_file!=nullptr) + delete progressBar_file; + if(moreButton!=nullptr) + delete moreButton; + if(pauseButton!=nullptr) + delete pauseButton; + if(skipButton!=nullptr) + delete skipButton; + if(cancelButton!=nullptr) + delete cancelButton; + delete radial; + delete selectionModel; + delete menu; + delete sysTrayIcon; +} + +QWidget * Themes::getOptionsEngineWidget() +{ + return &optionEngineWidget; +} + +void Themes::getOptionsEngineEnabled(const bool &isEnabled) +{ + if(isEnabled) + { + QScrollArea *scrollArea=new QScrollArea(ui->tabWidget); + scrollArea->setWidgetResizable(true); + scrollArea->setWidget(&optionEngineWidget); + ui->tabWidget->addTab(scrollArea,QString::fromStdString(facilityEngine->translateText("Copy engine"))); + } +} + +void Themes::closeEvent(QCloseEvent *event) +{ + event->ignore(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + this->hide(); + if(uiOptions->minimizeToSystray->isChecked()) + { + updateSysTrayIcon(); + sysTrayIcon->show(); + } + else + emit cancel(); +} + +void Themes::updateSysTrayIcon() +{ + if(totalSize==0) + { + sysTrayIcon->setIcon(dynaIcon(0,"-")); + return; + } + quint64 currentNew=currentSize*100; + //update systray icon + quint16 getVarProgression=currentNew/totalSize; + if(getOldProgression!=getVarProgression) + { + getOldProgression=getVarProgression; + sysTrayIcon->setIcon(dynaIcon(getVarProgression)); + } +} + +void Themes::updateOverallInformation() +{ + if(uiOptions->showProgressionInTheTitle->isChecked()) + updateTitle(); + ui->overall->setText(tr("File %1/%2, size: %3/%4") + .arg(currentFile) + .arg(totalFile) + .arg(QString::fromStdString(facilityEngine->sizeToString(currentSize))) + .arg(QString::fromStdString(facilityEngine->sizeToString(totalSize))) + ); +} + +void Themes::actionInProgess(const Ultracopier::EngineActionInProgress &action) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"start: "+std::to_string(action)); + this->action=action; + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + if(darkUi) + { + progressBar_all->setMaximum(65535); + progressBar_all->setMinimum(0); + } + else + { + ui->progressBar_all->setMaximum(65535); + ui->progressBar_all->setMinimum(0); + } + #ifdef Q_OS_WIN32 + winTaskbarProgress.setMaximum(65535); + winTaskbarProgress.setMinimum(0); + #endif + break; + case Ultracopier::Listing: + if(darkUi) + { + progressBar_all->setMaximum(0); + progressBar_all->setMinimum(0); + } + else + { + ui->progressBar_all->setMaximum(0); + ui->progressBar_all->setMinimum(0); + } + #ifdef Q_OS_WIN32 + winTaskbarProgress.setMaximum(0); + winTaskbarProgress.setMinimum(0); + #endif + break; + case Ultracopier::Idle: + #ifdef Q_OS_WIN32 + winTaskbarProgress.setMaximum(65535); + winTaskbarProgress.setMinimum(0); + #endif + if(darkUi) + { + progressBar_all->setMaximum(65535); + progressBar_all->setMinimum(0); + } + else + { + ui->progressBar_all->setMaximum(65535); + ui->progressBar_all->setMinimum(0); + } + if(haveStarted && transferModel.rowCount()<=0) + { + if(shutdown && ui->shutdown->isChecked()) + { + facilityEngine->callFunctionality("shutdown"); + return; + } + switch(uiOptions->comboBox_copyEnd->currentIndex()) + { + case 2: + emit cancel(); + break; + case 0: + if(!haveError) + emit cancel(); + else + ui->tabWidget->setCurrentWidget(ui->tab_error); + break; + default: + break; + } + stat = status_stopped; + if(durationStarted) + { + Ultracopier::TimeDecomposition time=facilityEngine->secondsToTimeDecomposition( + (std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count()- + duration) + /1000); + ui->labelTimeRemaining->setText(QStringLiteral("")+ + QString::fromStdString(facilityEngine->translateText("Completed in %1")).arg( + QString::number(time.hour)+QStringLiteral(":")+ + QString::number(time.minute).rightJustified(2,'0')+ + QStringLiteral(":")+ + QString::number(time.second).rightJustified(2,'0') + )+QStringLiteral("")); + } + } + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"Very wrong switch case!"); + break; + } + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + if(m_havePause) + ui->pauseButton->setEnabled(true); + if(!durationStarted) + { + duration=std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + durationStarted=true; + } + haveStarted=true; + ui->cancelButton->setText(QString::fromStdString(facilityEngine->translateText("Quit"))); + updatePause(); + break; + case Ultracopier::Listing: + if(m_havePause) + ui->pauseButton->setEnabled(false); + haveStarted=true;//to close if skip at root folder collision + break; + case Ultracopier::Idle: + if(m_havePause) + ui->pauseButton->setEnabled(false); + break; + default: + break; + } +} + +void Themes::newFolderListing(const std::string &path) +{ + QString newPath=QString::fromStdString(path); + if(newPath.size()>(64+3)) + newPath=newPath.mid(0,32)+QStringLiteral("...")+newPath.mid(newPath.size()-32,32); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(action==Ultracopier::Listing) + ui->from->setText(newPath); +} + +void Themes::detectedSpeed(const uint64_t &speed)//in byte per seconds +{ + /*if(uiOptions->speedWithProgressBar->isChecked()) + { + quint64 tempSpeed=speed; + if(tempSpeed>999999999) + tempSpeed=999999999; + if(tempSpeed>(quint64)ui->progressBarCurrentSpeed->maximum()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set max speed to: "+std::to_string(tempSpeed)); + ui->progressBarCurrentSpeed->setMaximum(tempSpeed); + } + ui->progressBarCurrentSpeed->setValue(tempSpeed); + ui->progressBarCurrentSpeed->setFormat(QString::fromStdString(facilityEngine->speedToString(speed))); + } + else + ui->currentSpeed->setText(QString::fromStdString(facilityEngine->speedToString(speed)));*/ + chartarea->addValue(speed); +} + +void Themes::remainingTime(const int &remainingSeconds) +{ + QString labelTimeRemaining; + if(darkUi) + labelTimeRemaining+=""; + else + labelTimeRemaining+=""; + labelTimeRemaining+=QString::fromStdString(facilityEngine->translateText("Remaining:")); + if(darkUi) + labelTimeRemaining+=""; + labelTimeRemaining+=QStringLiteral(" "); + if(remainingSeconds==-1) + labelTimeRemaining+=QStringLiteral("∞"); + else + { + Ultracopier::TimeDecomposition time=facilityEngine->secondsToTimeDecomposition(remainingSeconds); + labelTimeRemaining+=QString::number(time.hour)+QStringLiteral(":")+QString::number(time.minute).rightJustified(2,'0')+QStringLiteral(":")+QString::number(time.second).rightJustified(2,'0'); + } + labelTimeRemaining+=QStringLiteral(""); + ui->labelTimeRemaining->setText(labelTimeRemaining); +} + +void Themes::errorDetected() +{ + haveError=true; +} + +/// \brief new error +void Themes::errorToRetry(const std::string &source,const std::string &destination,const std::string &error) +{ + ui->errorList->addTopLevelItem(new QTreeWidgetItem(QStringList() + << QString::fromStdString(source) + << QString::fromStdString(destination) + << QString::fromStdString(error) + )); +} + +/** \brief support speed limitation */ +void Themes::setSupportSpeedLimitation(const bool &supportSpeedLimitationBool) +{ + if(!supportSpeedLimitationBool) + { + ui->label_Slider_speed->setVisible(false); + ui->SliderSpeed->setVisible(false); + ui->label_SpeedMaxValue->setVisible(false); + uiOptions->labelShowSpeedAsMain->setVisible(false); + uiOptions->checkBoxShowSpeed->setVisible(false); + } + else + emit newSpeedLimitation(currentSpeed); +} + +//get information about the copy +void Themes::setGeneralProgression(const uint64_t ¤t,const uint64_t &total) +{ + currentSize=current; + totalSize=total; + if(total>0) + { + int newIndicator=((double)current/total)*65535; + if(darkUi) + progressBar_all->setValue(newIndicator); + else + ui->progressBar_all->setValue(newIndicator); + #ifdef Q_OS_WIN32 + winTaskbarProgress.setValue(newIndicator); + #endif + } + else + { + if(darkUi) + progressBar_all->setValue(0); + else + ui->progressBar_all->setValue(0); + #ifdef Q_OS_WIN32 + winTaskbarProgress.setValue(0); + #endif + } + if(current>0) + stat = status_started; + updateOverallInformation(); + if(isHidden()) + updateSysTrayIcon(); +} + +void Themes::setFileProgression(const std::vector &progressionList) +{ + std::vector progressionListBis=progressionList; + transferModel.setFileProgression(progressionListBis); + updateCurrentFileInformation(); +} + +//edit the transfer list +/// \todo check and re-enable to selection +void Themes::getActionOnList(const std::vector &returnActions) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, returnActions.size(): "+std::to_string(returnActions.size())); + if(transferModel.tree==NULL) + transferModel.tree=new Folder(std::string()); + std::vector returnValue=transferModel.synchronizeItems(returnActions); + totalFile+=returnValue.front(); + totalSize+=returnValue.at(1); + currentFile+=returnValue.back(); + if(transferModel.rowCount()==0) + { + ui->skipButton->setEnabled(false); + if(darkUi) + { + progressBar_all->setValue(65535); + progressBar_file->setValue(65535); + } + else + { + ui->progressBar_all->setValue(65535); + ui->progressBar_file->setValue(65535); + } + #ifdef Q_OS_WIN32 + winTaskbarProgress.setValue(65535); + #endif + currentSize=totalSize; + if(isHidden()) + updateSysTrayIcon(); + } + else + ui->skipButton->setEnabled(true); + updateOverallInformation(); + radial->invalidate(); + radial->create(transferModel.tree); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"transferModel.rowCount(): "+std::to_string(transferModel.rowCount())); +} + +void Themes::setCopyType(const Ultracopier::CopyType &type) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + this->type=type; + updateModeAndType(); +} + +void Themes::forceCopyMode(const Ultracopier::CopyMode &mode) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + modeIsForced=true; + this->mode=mode; + if(mode==Ultracopier::Copy) + ui->tabWidget->setTabText(0,tr("Copy list")); + else + ui->tabWidget->setTabText(0,tr("Move list")); + updateModeAndType(); + updateTitle(); +} + +void Themes::setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation) +{ + ui->exportTransferList->setVisible(transferListOperation & Ultracopier::TransferListOperation_Export); + ui->importTransferList->setVisible(transferListOperation & Ultracopier::TransferListOperation_Import); +} + +void Themes::haveExternalOrder() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); +// ui->moreButton->toggle(); +} + +void Themes::isInPause(const bool &isInPause) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"isInPause: "+std::to_string(isInPause)); + //resume in auto the pause + storeIsInPause=isInPause; + updatePause(); +} + +/// \brief set have pause +void Themes::havePause(const bool &havePause) +{ + if(darkUi) + pauseButton->setEnabled(havePause); + else + ui->pauseButton->setEnabled(havePause); + m_havePause=havePause; +} + +void Themes::updatePause() +{ + QPushButton *tempPauseButton=ui->pauseButton; + if(darkUi) + tempPauseButton=pauseButton; + if(storeIsInPause) + { + if(!darkUi) + ui->pauseButton->setIcon(player_play); + if(stat == status_started) + tempPauseButton->setText(QString::fromStdString(facilityEngine->translateText("Resume"))); + else + tempPauseButton->setText(QString::fromStdString(facilityEngine->translateText("Start"))); + } + else + { + if(!darkUi) + tempPauseButton->setIcon(player_pause); + tempPauseButton->setText(QString::fromStdString(facilityEngine->translateText("Pause"))); + } +} + +void Themes::updateCurrentFileInformation() +{ + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(transfertItem.haveItem) + { + std::string from=transfertItem.from; + std::string::size_type pos=from.rfind('/'); + if(pos == std::string::npos) + { + #ifdef Q_OS_WIN32 + std::string::size_type pos=from.rfind('\\'); + if(pos != std::string::npos) + if(pos < from.size()-1) + from=from.substr(0,pos); + #endif + } + else if(pos < from.size()-1) + { + #ifdef Q_OS_WIN32 + std::string::size_type pos2=from.rfind('\\'); + if(pos2 != std::string::npos) + { + std::string::size_type pos=from.rfind('\\'); + if(pos != std::string::npos) + { + if(pos2 < from.size()-1) + { + if(pos(64+3)) + newPath=newPath.mid(0,32)+QStringLiteral("...")+newPath.mid(newPath.size()-32,32); + ui->from->setText(newPath); + newPath=QString::fromStdString(transfertItem.to); + if(newPath.size()>(64+3)) + newPath=newPath.mid(0,32)+QStringLiteral("...")+newPath.mid(newPath.size()-32,32); + //ui->to->setText(newPath); + ui->current_file->setText(QString::fromStdString(transfertItem.current_file)); + if(transfertItem.progressBar_read!=-1) + { + if(darkUi) + progressBar_file->setRange(0,65535); + else + ui->progressBar_file->setRange(0,65535); + if(uiOptions->showDualProgression->isChecked()) + { + if(!darkUi) + { + if(transfertItem.progressBar_read!=transfertItem.progressBar_write) + { + float permilleread=round((float)transfertItem.progressBar_read/65535*1000)/1000; + float permillewrite=permilleread-0.001; + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border: 1px solid grey;text-align: center;background-color: qlineargradient(spread:pad, x1:%1, y1:0, x2:%2, y2:0, stop:0 %3, stop:1 %4);}QProgressBar::chunk{background-color:%5;}") + .arg(permilleread) + .arg(permillewrite) + .arg(progressColorRemaining.name()) + .arg(progressColorRead.name()) + .arg(progressColorWrite.name()) + ); + } + else + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + } + if(darkUi) + progressBar_file->setValue(transfertItem.progressBar_write); + else + ui->progressBar_file->setValue(transfertItem.progressBar_write); + } + else + { + if(darkUi) + progressBar_file->setValue((transfertItem.progressBar_read+transfertItem.progressBar_write)/2); + else + ui->progressBar_file->setValue((transfertItem.progressBar_read+transfertItem.progressBar_write)/2); + } + } + else + { + if(darkUi) + progressBar_file->setRange(0,0); + else + ui->progressBar_file->setRange(0,0); + } + } + else + { + ui->from->setText(QStringLiteral("")); + //ui->to->setText(QStringLiteral("")); + ui->current_file->setText(QStringLiteral("-")); + if(haveStarted && transferModel.rowCount()==0) + { + if(darkUi) + progressBar_file->setValue(65535); + else + ui->progressBar_file->setValue(65535); + } + else if(!haveStarted) + { + if(darkUi) + progressBar_file->setValue(0); + else + ui->progressBar_file->setValue(0); + } + } +} + + +void Themes::on_putOnTop_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + selectedItems=selectionModel->selectedRows(); + std::vector ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit moveItemsOnTop(ids); +} + +void Themes::on_pushUp_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + selectedItems=selectionModel->selectedRows(); + std::vector ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit moveItemsUp(ids); +} + +void Themes::on_pushDown_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + selectedItems=selectionModel->selectedRows(); + std::vector ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit moveItemsDown(ids); +} + +void Themes::on_putOnBottom_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + selectedItems=selectionModel->selectedRows(); + std::vector ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit moveItemsOnBottom(ids); +} + +void Themes::on_del_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + selectedItems=selectionModel->selectedRows(); + std::vector ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit removeItems(ids); +} + +void Themes::on_cancelButton_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + this->hide(); + emit cancel(); +} + + +void Themes::speedWithProgressBar_toggled(bool checked) +{ + (void)checked; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + /*ui->progressBarCurrentSpeed->setVisible(checked); + ui->currentSpeed->setVisible(!checked);*/ +} + +void Themes::showDualProgression_toggled(bool checked) +{ + Q_UNUSED(checked); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + updateProgressionColorBar(); +} + +void Themes::checkBoxShowSpeed_toggled(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + Q_UNUSED(checked); + updateSpeed(); +} + +void Themes::on_SliderSpeed_valueChanged(int value) +{ + if(!uiOptions->checkBoxShowSpeed->isChecked()) + return; + switch(value) + { + case 0: + currentSpeed=0; + break; + case 1: + currentSpeed=1024; + break; + case 2: + currentSpeed=1024*4; + break; + case 3: + currentSpeed=1024*16; + break; + case 4: + currentSpeed=1024*64; + break; + case 5: + currentSpeed=1024*128; + break; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"value: "+std::to_string(value)); + emit newSpeedLimitation(currentSpeed); + updateSpeed(); +} + +void Themes::uiUpdateSpeed() +{ + if(uiOptions->checkBoxShowSpeed->isChecked()) + return; + if(!uiOptions->checkBox_limitSpeed->isChecked()) + currentSpeed=0; + else + currentSpeed=uiOptions->limitSpeed->value(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit newSpeedLimitation"+std::to_string(currentSpeed)); + emit newSpeedLimitation(currentSpeed); +} + +void Themes::updateSpeed() +{ + ui->label_Slider_speed->setVisible(uiOptions->checkBoxShowSpeed->isChecked()); + ui->SliderSpeed->setVisible(uiOptions->checkBoxShowSpeed->isChecked()); + ui->label_SpeedMaxValue->setVisible(uiOptions->checkBoxShowSpeed->isChecked()); + uiOptions->limitSpeed->setVisible(!uiOptions->checkBoxShowSpeed->isChecked()); + uiOptions->checkBox_limitSpeed->setVisible(!uiOptions->checkBoxShowSpeed->isChecked()); + + if(uiOptions->checkBoxShowSpeed->isChecked()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"checked, currentSpeed: "+std::to_string(currentSpeed)); + uiOptions->limitSpeed->setEnabled(false); + if(currentSpeed==0) + { + ui->SliderSpeed->setValue(0); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->translateText("Unlimited"))); + } + else if(currentSpeed<=1024) + { + if(currentSpeed!=1024) + { + currentSpeed=1024; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(1); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*1))); + } + else if(currentSpeed<=1024*4) + { + if(currentSpeed!=1024*4) + { + currentSpeed=1024*4; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(2); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*4))); + } + else if(currentSpeed<=1024*16) + { + if(currentSpeed!=1024*16) + { + currentSpeed=1024*16; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(3); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*16))); + } + else if(currentSpeed<=1024*64) + { + if(currentSpeed!=1024*64) + { + currentSpeed=1024*64; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(4); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*64))); + } + else + { + if(currentSpeed!=1024*128) + { + currentSpeed=1024*128; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(5); + ui->label_SpeedMaxValue->setText(QString::fromStdString(facilityEngine->speedToString((double)(1024*1024)*128))); + } + } + else + { + uiOptions->checkBox_limitSpeed->setChecked(currentSpeed>0); + if(currentSpeed>0) + uiOptions->limitSpeed->setValue(currentSpeed); + uiOptions->checkBox_limitSpeed->setEnabled(currentSpeed!=-1); + uiOptions->limitSpeed->setEnabled(uiOptions->checkBox_limitSpeed->isChecked()); + } +} + +void Themes::on_pauseButton_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(storeIsInPause) + emit resume(); + else + emit pause(); +} + +void Themes::on_skipButton_clicked() +{ + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(transfertItem.haveItem) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"skip at running: "+std::to_string(transfertItem.id)); + emit skip(transfertItem.id); + } + else + { + if(transferModel.rowCount()>1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"skip at idle: "+std::to_string(transferModel.firstId())); + emit skip(transferModel.firstId()); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to skip the transfer, because no transfer running"); + } +} + +void Themes::updateModeAndType() +{ + menu->clear(); + if(modeIsForced) + { + menu->addAction(ui->actionAddFile); + if(type==Ultracopier::FileAndFolder) + menu->addAction(ui->actionAddFolder); + } + else + { + menu->addAction(ui->actionAddFileToCopy); + menu->addAction(ui->actionAddFileToMove); + if(type==Ultracopier::FileAndFolder) + { + menu->addAction(ui->actionAddFolderToCopy); + menu->addAction(ui->actionAddFolderToMove); + } + } +} + +void Themes::forcedModeAddFile() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFile(mode); +} + +void Themes::forcedModeAddFolder() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFolder(mode); +} + +void Themes::forcedModeAddFileToCopy() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFile(Ultracopier::Copy); +} + +void Themes::forcedModeAddFolderToCopy() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFolder(Ultracopier::Copy); +} + +void Themes::forcedModeAddFileToMove() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFile(Ultracopier::Move); +} + +void Themes::forcedModeAddFolderToMove() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFolder(Ultracopier::Move); +} + +void Themes::newLanguageLoaded() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(modeIsForced) + forceCopyMode(mode); + ui->retranslateUi(this); + uiOptions->retranslateUi(this); + uiOptions->comboBox_copyEnd->setItemText(0,tr("Don't close if errors are found")); + uiOptions->comboBox_copyEnd->setItemText(1,tr("Never close")); + uiOptions->comboBox_copyEnd->setItemText(2,tr("Always close")); + if(!haveStarted) + ui->current_file->setText(tr("File Name, 0KB")); + else + updateCurrentFileInformation(); + updateOverallInformation(); + updateSpeed(); + if(ui->tabWidget->count()>=4) + ui->tabWidget->setTabText(ui->tabWidget->count()-1, + QString::fromStdString(facilityEngine->translateText("Copy engine"))); + on_moreButton_toggled(ui->moreButton->isChecked()); +} + +void Themes::on_pushButtonCloseSearch_clicked() +{ + closeTheSearchBox(); +} + +//close the search box +void Themes::closeTheSearchBox() +{ + currentIndexSearch = -1; + ui->lineEditSearch->clear(); + ui->lineEditSearch->hide(); + ui->pushButtonSearchPrev->hide(); + ui->pushButtonSearchNext->hide(); + ui->pushButtonCloseSearch->hide(); + ui->searchButton->setChecked(false); + hilightTheSearch(); +} + +//search box shortcut +void Themes::searchBoxShortcut() +{ +/* if(ui->lineEditSearch->isHidden()) + {*/ + ui->lineEditSearch->show(); + ui->pushButtonSearchPrev->show(); + ui->pushButtonSearchNext->show(); + ui->pushButtonCloseSearch->show(); + ui->lineEditSearch->setFocus(Qt::ShortcutFocusReason); + ui->searchButton->setChecked(true); +/* } + else + closeTheSearchBox();*/ +} + +//hilight the search +void Themes::hilightTheSearch(bool searchNext) +{ + int result=transferModel.search(ui->lineEditSearch->text().toStdString(),searchNext); + if(ui->lineEditSearch->text().isEmpty()) + ui->lineEditSearch->setStyleSheet(""); + else + { + if(result==-1) + ui->lineEditSearch->setStyleSheet(QStringLiteral("background-color: rgb(255, 150, 150);")); + else + { + ui->lineEditSearch->setStyleSheet(QStringLiteral("background-color: rgb(193,255,176);")); + ui->TransferList->scrollTo(transferModel.index(result,0)); + } + } +} + +void Themes::hilightTheSearchSlot() +{ + hilightTheSearch(); +} + +void Themes::on_pushButtonSearchPrev_clicked() +{ + int result=transferModel.searchPrev(ui->lineEditSearch->text().toStdString()); + if(ui->lineEditSearch->text().isEmpty()) + ui->lineEditSearch->setStyleSheet(""); + else + { + if(result==-1) + ui->lineEditSearch->setStyleSheet(QStringLiteral("background-color: rgb(255, 150, 150);")); + else + { + ui->lineEditSearch->setStyleSheet(QStringLiteral("background-color: rgb(193,255,176);")); + ui->TransferList->scrollTo(transferModel.index(result,0)); + } + } +} + +void Themes::on_pushButtonSearchNext_clicked() +{ + hilightTheSearch(true); +} + +void Themes::on_lineEditSearch_returnPressed() +{ + hilightTheSearch(); +} + +void Themes::on_lineEditSearch_textChanged(QString text) +{ + if(text=="") + { + TimerForSearch->stop(); + hilightTheSearch(); + } + else + TimerForSearch->start(); +} + +void Themes::on_moreButton_toggled(bool checked) +{ + Q_UNUSED(checked); + /*if(checked) + this->setMaximumHeight(16777215); + else + this->setMaximumHeight(130);*/ + // usefull under windows + #if ! defined(__ANDROID__) && ! defined(ANDROID) && ! defined(__ANDROID_API__) + this->adjustSize(); + #endif +} + +/* drag event processing + +need setAcceptDrops(true); into the constructor +need implementation to accept the drop: +void dragEnterEvent(QDragEnterEvent* event); +void dragMoveEvent(QDragMoveEvent* event); +void dragLeaveEvent(QDragLeaveEvent* event); +*/ +void Themes::dropEvent(QDropEvent *event) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + const QMimeData* mimeData = event->mimeData(); + if(mimeData->hasUrls()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"hasUrls"); + std::vector urls; + unsigned int index=0; + foreach (QUrl url, mimeData->urls()) + { + const std::string &urlString=url.toString().toStdString(); + if(index<99) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,urlString); + urls.push_back(urlString); + index++; + } + emit urlDropped(urls); + event->acceptProposedAction(); + } +} + +void Themes::dragEnterEvent(QDragEnterEvent* event) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + // if some actions should not be usable, like move, this code must be adopted + const QMimeData* mimeData = event->mimeData(); + if(mimeData->hasUrls()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"hasUrls"); + event->acceptProposedAction(); + } +} + +void Themes::dragMoveEvent(QDragMoveEvent* event) +{ + // if some actions should not be usable, like move, this code must be adopted + const QMimeData* mimeData = event->mimeData(); + if(mimeData->hasUrls()) + event->acceptProposedAction(); +} + +void Themes::dragLeaveEvent(QDragLeaveEvent* event) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + event->accept(); +} + +void Themes::on_searchButton_toggled(bool checked) +{ + if(checked) + searchBoxShortcut(); + else + closeTheSearchBox(); +} + +void Themes::on_exportTransferList_clicked() +{ + emit exportTransferList(); +} + +void Themes::on_importTransferList_clicked() +{ + emit importTransferList(); +} + +void Themes::progressColorWrite_clicked() +{ + QColor color=QColorDialog::getColor(progressColorWrite,this,tr("Select a color")); + if(!color.isValid()) + return; + progressColorWrite=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorWrite); + uiOptions->progressColorWrite->setIcon(pixmap); + updateProgressionColorBar(); +} + +void Themes::progressColorRead_clicked() +{ + QColor color=QColorDialog::getColor(progressColorRead,this,tr("Select a color")); + if(!color.isValid()) + return; + progressColorRead=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorRead); + uiOptions->progressColorRead->setIcon(pixmap); + updateProgressionColorBar(); +} + +void Themes::progressColorRemaining_clicked() +{ + QColor color=QColorDialog::getColor(progressColorRemaining,this,tr("Select a color")); + if(!color.isValid()) + return; + progressColorRemaining=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorRemaining); + uiOptions->progressColorRemaining->setIcon(pixmap); + updateProgressionColorBar(); +} + +void Themes::alwaysOnTop_clicked(bool reshow) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_WIN32 + if(uiOptions->alwaysOnTop->isChecked()) + SetWindowPos((HWND)this->winId(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + else + SetWindowPos((HWND)this->winId(), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + #endif + #ifdef Q_OS_LINUX + if(uiOptions->alwaysOnTop->isChecked()) + flags=flags | Qt::X11BypassWindowManagerHint; + else + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + if(uiOptions->alwaysOnTop->isChecked()) + flags=flags | Qt::WindowStaysOnTopHint; + else + flags=flags & ~Qt::WindowStaysOnTopHint; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"uiOptions->alwaysOnTop->isChecked(): "+std::to_string(uiOptions->alwaysOnTop->isChecked())+", flags: "+std::to_string(flags)); + setWindowFlags(flags); + if(reshow) + show(); +} + +void Themes::alwaysOnTop_clickedSlot() +{ + alwaysOnTop_clicked(true); +} + +void Themes::updateProgressionColorBar() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + uiOptions->labelProgressionColor->setVisible(uiOptions->showDualProgression->isChecked()); + uiOptions->frameProgressionColor->setVisible(uiOptions->showDualProgression->isChecked()); + if(!darkUi) + { + if(!uiOptions->showDualProgression->isChecked()) + { + ui->progressBar_all->setStyleSheet(QStringLiteral("")); + ui->progressBar_file->setStyleSheet(QStringLiteral("")); + //ui->progressBarCurrentSpeed->setStyleSheet(QStringLiteral("")); + } + else + { + ui->progressBar_all->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + /*ui->progressBarCurrentSpeed->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + );*/ + } + } + if(stat==status_never_started) + updateCurrentFileInformation(); +} + +QString Themes::simplifiedBigNum(const uint64_t &num) +{ + if(num<1000) + return QString::number(num); + else if(num<1000000) + return QString::number(num/1000)+QStringLiteral("k"); + else + return QString::number(num/1000000)+QStringLiteral("M"); +} + +void Themes::updateTitle() +{ + if(uiOptions->showProgressionInTheTitle->isChecked() && totalSize>0) + { + if(!modeIsForced) + this->setWindowTitle(tr("%1 %2% of %3 into %4 files") + .arg(QString::fromStdString(facilityEngine->translateText("Transfer"))) + .arg((currentSize*100)/totalSize) + .arg(QString::fromStdString(facilityEngine->sizeToString(totalSize))) + .arg(simplifiedBigNum(totalFile))+ + QStringLiteral(" - ")+ + QString::fromStdString(facilityEngine->softwareName()) + ); + else + { + if(mode==Ultracopier::Copy) + this->setWindowTitle(tr("%1 %2% of %3 into %4 files") + .arg(QString::fromStdString(facilityEngine->translateText("Copy"))) + .arg((currentSize*100)/totalSize) + .arg(QString::fromStdString(facilityEngine->sizeToString(totalSize))) + .arg(simplifiedBigNum(totalFile))+ + QStringLiteral(" - ")+ + QString::fromStdString(facilityEngine->softwareName()) + ); + else + this->setWindowTitle(tr("%1 %2% of %3 into %4 files") + .arg(QString::fromStdString(facilityEngine->translateText("Move"))) + .arg((currentSize*100)/totalSize) + .arg(QString::fromStdString(facilityEngine->sizeToString(totalSize))) + .arg(simplifiedBigNum(totalFile))+ + QStringLiteral(" - ")+ + QString::fromStdString(facilityEngine->softwareName()) + ); + } + } + else + { + if(!modeIsForced) + this->setWindowTitle( + QString::fromStdString(facilityEngine->translateText("Transfer"))+ + QStringLiteral(" - ")+ + QString::fromStdString(facilityEngine->softwareName()) + ); + else + { + if(mode==Ultracopier::Copy) + this->setWindowTitle( + QString::fromStdString(facilityEngine->translateText("Copy"))+ + QStringLiteral(" - ")+ + QString::fromStdString(facilityEngine->softwareName()) + ); + else + this->setWindowTitle( + QString::fromStdString(facilityEngine->translateText("Move"))+ + QStringLiteral(" - ")+ + QString::fromStdString(facilityEngine->softwareName()) + ); + } + } +} + +/** \brief Create progessive icon + +Do QIcon with top and bottom image mixed and percent writed on it. +The icon it be search in the style path. +Do by mongaulois, remake by alpha_one_x86. +\param percent indique how many percent need be showed, sould be between 0 and 100 +\param text The showed text if needed (optionnal) +\return QIcon of the final image +\note Can be used as it: dynaIcon(75,"...") +*/ +QIcon Themes::dynaIcon(int percent,std::string text) const +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(pixmapTop.isNull() || pixmapBottom.isNull()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error loading the icons"); + #endif + if(percent==-1) + percent=getOldProgression; + if(percent<0) + percent=0; + if(percent>100) + percent=100; + //pixmap avec un fond transparent + #ifdef Q_OS_WIN32 + quint8 imageSize=16; + #else + quint8 imageSize=22; + #endif + QPixmap resultImage(imageSize,imageSize); + resultImage.fill(Qt::transparent); + { + QPainter painter(&resultImage); + #ifndef Q_OS_WIN32 + QFont font(QStringLiteral("Courier New"),9); + font.setBold(true); + font.setKerning(true); + painter.setFont(font); + #endif + #ifdef Q_OS_WIN32 + QFont font(QStringLiteral("Courier New"),8); + font.setBold(true); + font.setKerning(true); + painter.setFont(font); + #endif + + //preprocessing the calcul + quint8 bottomPixel=(percent*imageSize)/100; + quint8 topPixel=imageSize-bottomPixel; + + //top image + if(topPixel>0) + { + QRect target(0, 0, imageSize, topPixel); + QRect source(0, 0, imageSize, topPixel); + painter.drawPixmap(target, pixmapTop, source); + } + + //bottom image + if(bottomPixel>0) + { + QRect target2(0, topPixel, imageSize, bottomPixel); + QRect source2(0, topPixel, imageSize, bottomPixel); + painter.drawPixmap(target2, pixmapBottom, source2); + } + + qint8 textxOffset=0; + qint8 textyOffset=0; + if(text.empty()) + { + if(percent!=100) + text=std::to_string(percent); + else + { + text=":)"; + #ifdef Q_OS_WIN32 + textyOffset-=2; + #else + textyOffset-=1; + #endif + } + } + if(text.size()==1) + { + textxOffset+=3; + #ifdef Q_OS_WIN32 + textxOffset-=1; + #endif + } + else + { + #ifdef Q_OS_WIN32 + textxOffset-=1; + #endif + } + #ifndef Q_OS_WIN32 + textxOffset+=2; + textyOffset+=3; + #endif + painter.setPen(QPen(Qt::black)); + painter.drawText(3+textxOffset,13+textyOffset,QString::fromStdString(text)); + painter.setPen(QPen(Qt::white)); + painter.drawText(2+textxOffset,12+textyOffset,QString::fromStdString(text)); + } + return QIcon(resultImage); +} + +/** \brief For catch an action on the systray icon +\param reason Why it activated +*/ +void Themes::catchAction(QSystemTrayIcon::ActivationReason reason) +{ + if(reason==QSystemTrayIcon::DoubleClick || reason==QSystemTrayIcon::Trigger) + { + sysTrayIcon->hide(); + this->show(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Double Click detected"); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"reason: "+std::to_string(reason)); +} + +void Themes::on_exportErrorToTransferList_clicked() +{ + emit exportErrorIntoTransferList(); +} + +void Themes::resizeEvent(QResizeEvent*) +{ + if(!ui->moreButton->isChecked() && (moreButton==NULL || !moreButton->isChecked())) + { + if(width()horizontalLayout_3->setDirection(QBoxLayout::TopToBottom); + ui->frameLeft->setMaximumHeight(height()/3); + ui->frameLeft->setMaximumWidth(1000000); + ui->frameMiddle->setMaximumHeight(height()/3); + ui->frameMiddle->setMaximumWidth(1000000); + ui->frameRight->setMaximumHeight(height()/3); + ui->frameRight->setMaximumWidth(1000000); + } + else + { + ui->horizontalLayout_3->setDirection(QBoxLayout::LeftToRight); + ui->frameLeft->setMaximumHeight(1000000); + ui->frameLeft->setMaximumWidth(width()/3); + ui->frameMiddle->setMaximumHeight(1000000); + ui->frameMiddle->setMaximumWidth(width()/3); + ui->frameRight->setMaximumHeight(1000000); + ui->frameRight->setMaximumWidth(width()/3); + } + } + else { + ui->frameLeft->setMaximumHeight(1000000); + ui->frameLeft->setMaximumWidth(1000000); + ui->frameMiddle->setMaximumHeight(1000000); + ui->frameMiddle->setMaximumWidth(1000000); + ui->frameRight->setMaximumHeight(1000000); + ui->frameRight->setMaximumWidth(1000000); + } + if(ui->frameS->width()>300) + { + int space=ui->frameS->width()/20; + ui->horizontalLayoutS->setContentsMargins(space,space/2,space,space/2); + ui->horizontalLayoutS->setSpacing(space); + } + else + { + ui->horizontalLayoutS->setMargin(6); + ui->horizontalLayoutS->setSpacing(6); + } +} + +void Themes::doneTime(const std::vector > &timeList) +{ + if(remainingTimeLogarithmicValue.size() &timeUnit=timeList.at(sub_index); + const uint8_t &col=fileCatNumber(timeUnit.first); + RemainingTimeLogarithmicColumn &remainingTimeLogarithmicColumn=remainingTimeLogarithmicValue[col]; + if(remainingTimeLogarithmicValue.size()<=col) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"bug, remainingTimeLogarithmicValue.size() "+std::to_string(remainingTimeLogarithmicValue.size())+" < col %2"+std::to_string(col)); + break; + } + else + { + if(timeUnit.second>0) + { + remainingTimeLogarithmicColumn.lastProgressionSpeed.push_back(static_cast(timeUnit.first/timeUnit.second)*1000); + if(remainingTimeLogarithmicColumn.lastProgressionSpeed.size()>ULTRACOPIERO2_MAXVALUESPEEDSTORED) + remainingTimeLogarithmicColumn.lastProgressionSpeed.erase(remainingTimeLogarithmicColumn.lastProgressionSpeed.begin()); + + } + } + sub_index++; + } + unsigned int max=1; + sub_index=0; + while(sub_index1) + verticalLabel->setText(QString::fromStdString(facilityEngine->speedToString(max))); + sub_index=0; + while(sub_indexprogressBar; + break; + case 1: + p=ui->progressBar_2; + break; + case 2: + p=ui->progressBar_3; + break; + case 3: + p=ui->progressBar_4; + break; + case 4: + p=ui->progressBar_5; + break; + case 5: + p=ui->progressBar_6; + break; + default: + break; + } + p->setValue(res); + p->setMaximum(max); + p->setToolTip(QString::fromStdString(facilityEngine->speedToString(res))); + sub_index++; + } + } +} + +/* return 0 to 5 */ +uint8_t Themes::fileCatNumber(uint64_t size) +{ + //all is in base 10 to understand more easily + //drop the big value + if(size>100*1000*1000) + size=100*1000*1000; + size=size/100;//to group all the too small file into the value 0 + const double rlog=round(log10(size)); + if(rlog>5) + return 5; + return rlog; +} + +void Themes::paintEvent(QPaintEvent * event) +{ + if(darkUi) + { + if(background.width()!=width() || background.height()!=height()) + { + int minimal=height(); + if(width() +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef Q_OS_WIN32 +#include +#endif + +#include "../../../interface/PluginInterface_Themes.h" +#include "radialMap/widget.h" +#include "chartarea.h" +#include "ProgressBarDark.h" +#include "DarkButton.h" +#include "VerticalLabel.h" + +#include "ui_interface.h" +#include "ui_themesOptions.h" +#include "Oxygen2Environment.h" +#include "TransferModel.h" + +namespace Ui { + class interfaceCopy; + class themesOptions; +} + +/// \brief Define the interface +class Themes : public PluginInterface_Themes +{ + Q_OBJECT +public: + Themes(const bool &alwaysOnTop, + const bool &showProgressionInTheTitle, + const QColor &progressColorWrite, + const QColor &progressColorRead, + const QColor &progressColorRemaining, + const bool &showDualProgression, + const quint8 &comboBox_copyEnd, + const bool &speedWithProgressBar, + const qint32 ¤tSpeed, + const bool &checkBoxShowSpeed, + FacilityInterface * facilityEngine, + const bool &moreButtonPushed, + const bool &minimizeToSystray, + const bool &startMinimized, + const quint8 &position, + const bool &dark); + ~Themes(); + //send information about the copy + /// \brief to set the action in progress + void actionInProgess(const Ultracopier::EngineActionInProgress &) override; + /// \brief the new folder is listing + void newFolderListing(const std::string &path) override; + /** \brief show the detected speed + * in byte per seconds */ + void detectedSpeed(const uint64_t &speed) override; + /** \brief show the remaining time + * time in seconds */ + void remainingTime(const int &remainingSeconds) override; + /// \brief set the current collision action + void newCollisionAction(const std::string &action); + /// \brief set the current error action + void newErrorAction(const std::string &action); + /// \brief set one error is detected + void errorDetected() override; + /// \brief new error + void errorToRetry(const std::string &source,const std::string &destination,const std::string &error) override; + /** \brief support speed limitation */ + void setSupportSpeedLimitation(const bool &supportSpeedLimitationBool) override; + //get information about the copy + /// \brief show the general progression + void setGeneralProgression(const uint64_t ¤t,const uint64_t &total) override; + /// \brief show the file progression + void setFileProgression(const std::vector &progressionList) override; + /// \brief set the copyType -> file or folder + void setCopyType(const Ultracopier::CopyType &) override; + /// \brief set the copyMove -> copy or move, to force in copy or move, else support both + void forceCopyMode(const Ultracopier::CopyMode &) override; + /// \brief set if transfer list is exportable/importable + void setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation) override; + //edit the transfer list + /// \brief get action on the transfer list (add/move/remove) + void getActionOnList(const std::vector &returnActions) override; + /** \brief set if the order is external (like file manager copy) + * to notify the interface, which can hide add folder/filer button */ + void haveExternalOrder() override; + /// to get by file speed, size and ms + void doneTime(const std::vector > &timeList) override; + /// \brief set if is in pause + void isInPause(const bool &) override; + /// \brief set if have pause + void havePause(const bool &) override; + /// \brief get the widget for the copy engine + QWidget * getOptionsEngineWidget() override; + /// \brief to set if the copy engine is found + void getOptionsEngineEnabled(const bool &isEnabled) override; + enum status{status_never_started,status_started,status_stopped}; + status stat; + + static QString simplifiedBigNum(const uint64_t &num); +public slots: + /// \brief set the translate + void newLanguageLoaded(); +private slots: + void on_putOnTop_clicked(); + void on_pushUp_clicked(); + void on_pushDown_clicked(); + void on_putOnBottom_clicked(); + void on_del_clicked(); + void on_cancelButton_clicked(); + void speedWithProgressBar_toggled(bool checked); + void showDualProgression_toggled(bool checked); + void checkBoxShowSpeed_toggled(bool checked); + void on_SliderSpeed_valueChanged(int value); + void on_pauseButton_clicked(); + void on_skipButton_clicked(); + void forcedModeAddFile(); + void forcedModeAddFolder(); + void forcedModeAddFileToCopy(); + void forcedModeAddFolderToCopy(); + void forcedModeAddFileToMove(); + void forcedModeAddFolderToMove(); + void uiUpdateSpeed(); + void on_pushButtonCloseSearch_clicked(); + //close the search box + void closeTheSearchBox(); + //search box shortcut + void searchBoxShortcut(); + //hilight the search + void hilightTheSearch(bool searchNext=false); + void hilightTheSearchSlot(); + //auto connect + void on_pushButtonSearchPrev_clicked(); + void on_pushButtonSearchNext_clicked(); + void on_lineEditSearch_returnPressed(); + void on_lineEditSearch_textChanged(QString text); + void on_moreButton_toggled(bool checked); + void on_searchButton_toggled(bool checked); + void on_exportTransferList_clicked(); + void on_importTransferList_clicked(); + void progressColorWrite_clicked(); + void progressColorRead_clicked(); + void progressColorRemaining_clicked(); + void alwaysOnTop_clicked(bool reshow); + void alwaysOnTop_clickedSlot(); + void updateProgressionColorBar(); + void updateTitle(); + void catchAction(QSystemTrayIcon::ActivationReason reason); + void on_exportErrorToTransferList_clicked(); +private: + uint64_t duration; + bool durationStarted; + QPixmap pixmapTop,pixmapBottom; + QColor progressColorWrite,progressColorRead,progressColorRemaining; + Ui::interfaceCopy *ui; + Ui::themesOptions *uiOptions; + uint64_t currentFile; + uint64_t totalFile; + uint64_t currentSize; + uint64_t totalSize; + uint8_t getOldProgression; + QSystemTrayIcon *sysTrayIcon; + void updateOverallInformation(); + void updateCurrentFileInformation(); + QMenu *menu; + Ultracopier::EngineActionInProgress action; + void closeEvent(QCloseEvent *event) override; + int32_t currentSpeed;///< in KB/s, assume as 0KB/s as default like every where + void updateSpeed(); + bool storeIsInPause; + bool modeIsForced; + Ultracopier::CopyType type; + Ultracopier::CopyMode mode; + void updateModeAndType(); + bool haveStarted; + bool haveError; + QWidget optionEngineWidget; + QShortcut *searchShortcut; + QShortcut *searchShortcut2; + QShortcut *searchShortcut3; + QTimer *TimerForSearch; + int currentIndexSearch; ///< Current index search in starting at the end + FacilityInterface * facilityEngine; + QItemSelectionModel *selectionModel; + QModelIndexList selectedItems; + /// \brief the custom transfer model + TransferModel transferModel; + RadialMap::Widget *radial; + ChartArea::Widget *chartarea; + bool darkUi; + bool m_havePause; + QPixmap background; + + static QIcon player_play,player_pause,tempExitIcon,editDelete,skinIcon,editFind,documentOpen,documentSave,listAdd; + static bool iconLoaded; + + struct RemainingTimeLogarithmicColumn + { + std::vector lastProgressionSpeed; + }; + /** for RemainingTimeAlgo_Logarithmic **/ + std::vector remainingTimeLogarithmicValue; + + /** \brief drag event processing + + need setAcceptDrops(true); into the constructor + need implementation to accept the drop: + void dragEnterEvent(QDragEnterEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + */ + void dropEvent(QDropEvent *event) override; + /** \brief accept all event to allow the drag and drop + \see dropEvent() */ + void dragEnterEvent(QDragEnterEvent* event) override; + /** \brief accept all event to allow the drag and drop + \see dropEvent() */ + void dragMoveEvent(QDragMoveEvent* event) override; + /** \brief accept all event to allow the drag and drop + \see dropEvent() */ + void dragLeaveEvent(QDragLeaveEvent* event) override; + //have functionality + bool shutdown; + ProgressBarDark * progressBar_all; + ProgressBarDark * progressBar_file; + DarkButton * moreButton; + DarkButton * pauseButton; + DarkButton * skipButton; + DarkButton * cancelButton; + VerticalLabel *verticalLabel; + void updatePause(); + QIcon dynaIcon(int percent,std::string text="") const; + void updateSysTrayIcon(); + void resizeEvent(QResizeEvent*) override; + uint8_t fileCatNumber(uint64_t size); + void paintEvent(QPaintEvent *event) override; + + #ifdef Q_OS_WIN32 + QWinTaskbarProgress winTaskbarProgress; + #endif +signals: + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; +}; + +#endif // INTERFACE_H diff --git a/plugins/Themes/Oxygen2/interface.pro b/plugins/Themes/Oxygen2/interface.pro new file mode 100755 index 0000000..cbd495e --- /dev/null +++ b/plugins/Themes/Oxygen2/interface.pro @@ -0,0 +1,8 @@ +include($$PWD/../Oxygen2/interfaceInclude.pri) + +!CONFIG(static) { +RESOURCES += \ + $$PWD/../Oxygen2/interfaceResources.qrc \ + $$PWD/../Oxygen2/interfaceResources_unix.qrc \ + $$PWD/../Oxygen2/interfaceResources_windows.qrc +} diff --git a/plugins/Themes/Oxygen2/interface.ui b/plugins/Themes/Oxygen2/interface.ui new file mode 100755 index 0000000..dc0b397 --- /dev/null +++ b/plugins/Themes/Oxygen2/interface.ui @@ -0,0 +1,1098 @@ + + + interfaceCopy + + + + 0 + 0 + 550 + 539 + + + + + 550 + 0 + + + + Ultracopier + + + + :/Themes/Oxygen2/resources/main.png:/Themes/Oxygen2/resources/main.png + + + + 2 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + 300 + 100 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + 0 + 0 + + + + 20 + + + false + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + 30 + + + false + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + 66 + + + false + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + 75 + + + false + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + 84 + + + false + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + 87 + + + false + + + Qt::Vertical + + + + + + + + + + + + + + 0 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 100MB+ + + + + + + + + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + Remaining: 5min + + + Qt::AlignCenter + + + + + + + + 16777215 + 16 + + + + 65535 + + + + + + + + + &More + + + + :/Themes/Oxygen2/resources/moveDown.png:/Themes/Oxygen2/resources/moveDown.png + + + true + + + true + + + + + + + false + + + &Pause + + + + :/Themes/Oxygen2/resources/player_pause.png:/Themes/Oxygen2/resources/player_pause.png + + + + + + + + + + + + + 0 + 0 + + + + + + + File 0/0, Total: 0KB + + + Qt::PlainText + + + + + + + + + + + 0 + 0 + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 20 + 20 + + + + Close on transfer completion + + + background-color: rgba(255, 0, 255, 0); + + + + :/Themes/Oxygen2/resources/SystemTrayIcon/exit.png:/Themes/Oxygen2/resources/SystemTrayIcon/exit.png + + + true + + + true + + + + + + + + + Qt::Horizontal + + + + + + + + + From: + + + + + + + + 75 + true + + + + + + + Qt::PlainText + + + + + + + + + + 0 + 0 + + + + File Name, 0KB + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + 16777215 + 16 + + + + 65535 + + + + + + + + + false + + + &Skip + + + + :/Themes/Oxygen2/resources/player_end.png:/Themes/Oxygen2/resources/player_end.png + + + + + + + &Cancel + + + + :/Themes/Oxygen2/resources/cancel.png:/Themes/Oxygen2/resources/cancel.png + + + + + + + + + + + + + + + <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Ad or warning here</span></p></body></html> + + + Qt::RichText + + + true + + + + + + + + + Limit copy speed to: + + + + + + + 5 + + + Qt::Horizontal + + + + + + + Unlimited + + + + + + + Qt::Horizontal + + + + 40 + 1 + + + + + + + + + + 0 + + + + Transfer list + + + + + + 1 + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Move the selected items to the top + + + + :/Themes/Oxygen2/resources/putOnTop.png:/Themes/Oxygen2/resources/putOnTop.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Move up the selected items + + + + :/Themes/Oxygen2/resources/moveUp.png:/Themes/Oxygen2/resources/moveUp.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Move down the selected items + + + + :/Themes/Oxygen2/resources/moveDown.png:/Themes/Oxygen2/resources/moveDown.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Move the selected items to the bottom + + + + :/Themes/Oxygen2/resources/putOnBottom.png:/Themes/Oxygen2/resources/putOnBottom.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Add file/folder + + + + :/Themes/Oxygen2/resources/add.png:/Themes/Oxygen2/resources/add.png + + + QToolButton::InstantPopup + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Delete the selected items + + + + :/Themes/Oxygen2/resources/remove.png:/Themes/Oxygen2/resources/remove.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Search + + + + :/Themes/Oxygen2/resources/search.png:/Themes/Oxygen2/resources/search.png + + + true + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Export the transfer list + + + + :/Themes/Oxygen2/resources/export-transfer-list.png:/Themes/Oxygen2/resources/export-transfer-list.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Import the transfer list + + + + :/Themes/Oxygen2/resources/import-transfer-list.png:/Themes/Oxygen2/resources/import-transfer-list.png + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + 0 + + + + + QAbstractItemView::ExtendedSelection + + + false + + + true + + + + + + + 0 + + + + + + + + Previous + + + + + + + Next + + + + + + + + 25 + 25 + + + + + 25 + 25 + + + + + :/Themes/Oxygen2/resources/remove.png:/Themes/Oxygen2/resources/remove.png + + + true + + + + + + + + + + + + Error + + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Export the errors into transfer list + + + + :/Themes/Oxygen2/resources/export-transfer-list.png:/Themes/Oxygen2/resources/export-transfer-list.png + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + QAbstractItemView::NoSelection + + + false + + + true + + + + Source + + + + + Destination + + + + + Error + + + + + + + + + Interface + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + true + + + + + 0 + 0 + 542 + 249 + + + + + + + + + + + + + + :/Themes/Oxygen2/resources/add.png:/Themes/Oxygen2/resources/add.png + + + Add file + + + + + + :/Themes/Oxygen2/resources/add.png:/Themes/Oxygen2/resources/add.png + + + Add folder + + + + + + :/Themes/Oxygen2/resources/add.png:/Themes/Oxygen2/resources/add.png + + + Move file(s) + + + + + + :/Themes/Oxygen2/resources/add.png:/Themes/Oxygen2/resources/add.png + + + Move folder + + + + + + :/Themes/Oxygen2/resources/add.png:/Themes/Oxygen2/resources/add.png + + + Copy file(s) + + + + + + :/Themes/Oxygen2/resources/add.png:/Themes/Oxygen2/resources/add.png + + + Copy folder + + + + + + + + + moreButton + toggled(bool) + tabWidget + setVisible(bool) + + + 218 + 144 + + + 149 + 305 + + + + + diff --git a/plugins/Themes/Oxygen2/interfaceInclude.pri b/plugins/Themes/Oxygen2/interfaceInclude.pri new file mode 100755 index 0000000..354ffb9 --- /dev/null +++ b/plugins/Themes/Oxygen2/interfaceInclude.pri @@ -0,0 +1,73 @@ +CONFIG += c++11 +QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" +mac:QMAKE_CXXFLAGS+="-stdlib=libc++" + +QT += widgets xml +TEMPLATE = lib +CONFIG += plugin +HEADERS = \ + $$PWD/ThemesFactory.h \ + $$PWD/StructEnumDefinition.h \ + $$PWD/DebugEngineMacro.h \ + $$PWD/Oxygen2Environment.h \ + $$PWD/Oxygen2Variable.h \ + $$PWD/../../../interface/PluginInterface_Themes.h \ + $$PWD/../../../interface/FacilityInterface.h \ + $$PWD/../../../interface/OptionInterface.h \ + $$PWD/../../../cpp11addition.h \ + $$PWD/TransferModel.h \ + $$PWD/interface.h \ + $$PWD/chartarea.h \ + $$PWD/fileTree.h \ + $$PWD/ProgressBarDark.h \ + $$PWD/DarkButton.h \ + $$PWD/VerticalLabel.h \ + $$PWD/radialMap/map.h \ + $$PWD/radialMap/widget.h \ + $$PWD/radialMap/radialMap.h + +SOURCES += \ + $$PWD/chartarea.cpp \ + $$PWD/fileTree.cpp \ + $$PWD/ProgressBarDark.cpp \ + $$PWD/DarkButton.cpp \ + $$PWD/VerticalLabel.cpp \ + $$PWD/radialMap/labels.cpp \ + $$PWD/radialMap/map.cpp \ + $$PWD/radialMap/widgetEvents.cpp \ + $$PWD/radialMap/widget.cpp \ + $$PWD/ThemesFactory.cpp \ + $$PWD/TransferModel.cpp \ + $$PWD/interface.cpp \ + $$PWD/../../../cpp11addition.cpp \ + $$PWD/../../../cpp11additionstringtointcpp.cpp +TARGET = $$qtLibraryTarget(interface) +TRANSLATIONS += \ + $$PWD/Languages/ar/translation.ts \ + $$PWD/Languages/de/translation.ts \ + $$PWD/Languages/el/translation.ts \ + $$PWD/Languages/en/translation.ts \ + $$PWD/Languages/es/translation.ts \ + $$PWD/Languages/fr/translation.ts \ + $$PWD/Languages/hi/translation.ts \ + $$PWD/Languages/hu/translation.ts \ + $$PWD/Languages/id/translation.ts \ + $$PWD/Languages/it/translation.ts \ + $$PWD/Languages/ja/translation.ts \ + $$PWD/Languages/ko/translation.ts \ + $$PWD/Languages/nl/translation.ts \ + $$PWD/Languages/no/translation.ts \ + $$PWD/Languages/pl/translation.ts \ + $$PWD/Languages/pt/translation.ts \ + $$PWD/Languages/ru/translation.ts \ + $$PWD/Languages/th/translation.ts \ + $$PWD/Languages/tr/translation.ts \ + $$PWD/Languages/zh/translation.ts + +FORMS += \ + $$PWD/interface.ui \ + $$PWD/themesOptions.ui + +win32: { +QT += winextras +} diff --git a/plugins/Themes/Oxygen2/interfaceResources.qrc b/plugins/Themes/Oxygen2/interfaceResources.qrc new file mode 100755 index 0000000..0a6e539 --- /dev/null +++ b/plugins/Themes/Oxygen2/interfaceResources.qrc @@ -0,0 +1,36 @@ + + + resources/add.png + resources/cancel.png + resources/main.png + resources/moveDown.png + resources/darkmoveDown.png + resources/moveUp.png + resources/darkmoveUp.png + resources/player_end.png + resources/player_pause.png + resources/player_play.png + resources/darkplayer_end.png + resources/darkplayer_pause.png + resources/darkplayer_play.png + resources/putOnBottom.png + resources/putOnTop.png + resources/remove.png + resources/search.png + resources/export-transfer-list.png + resources/import-transfer-list.png + resources/SystemTrayIcon/add.png + resources/SystemTrayIcon/exit.png + resources/SystemTrayIcon/informations.png + resources/SystemTrayIcon/options.png + resources/cancelDarkE.png + resources/cancelDarkD.png + resources/progressBarout.png + resources/progressBarin.png + resources/darkButton.png + resources/darkButtonPushed.png + resources/darkButtonOver.png + resources/click.opus + resources/over.opus + + diff --git a/plugins/Themes/Oxygen2/interfaceResources_unix.qrc b/plugins/Themes/Oxygen2/interfaceResources_unix.qrc new file mode 100755 index 0000000..1dcca48 --- /dev/null +++ b/plugins/Themes/Oxygen2/interfaceResources_unix.qrc @@ -0,0 +1,7 @@ + + + resources/SystemTrayIcon/systray_Caught_Unix.png + resources/SystemTrayIcon/systray_Semiuncaught_Unix.png + resources/SystemTrayIcon/systray_Uncaught_Unix.png + + diff --git a/plugins/Themes/Oxygen2/interfaceResources_windows.qrc b/plugins/Themes/Oxygen2/interfaceResources_windows.qrc new file mode 100755 index 0000000..b9915d0 --- /dev/null +++ b/plugins/Themes/Oxygen2/interfaceResources_windows.qrc @@ -0,0 +1,7 @@ + + + resources/SystemTrayIcon/systray_Caught_Windows.png + resources/SystemTrayIcon/systray_Semiuncaught_Windows.png + resources/SystemTrayIcon/systray_Uncaught_Windows.png + + diff --git a/plugins/Themes/Oxygen2/options.ui b/plugins/Themes/Oxygen2/options.ui new file mode 100755 index 0000000..4149e33 --- /dev/null +++ b/plugins/Themes/Oxygen2/options.ui @@ -0,0 +1,280 @@ + + + options + + + + 0 + 0 + 515 + 251 + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Speed with progress bar + + + + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + + Show speed as main information + + + + + + + Progression color + + + + + + + Limit copy speed at: + + + + + + + false + + + KB/s + + + 1 + + + 999999 + + + + + + + + + + Qt::Horizontal + + + + 122 + 20 + + + + + + + + Show dual progression + + + + + + + Limit copy speed at: + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + At the end of the copy: + + + + + + + + + + Unlimited + + + + + + + 5 + + + Qt::Horizontal + + + + + + + + + checkBox_limitSpeed + clicked(bool) + limitSpeed + setEnabled(bool) + + + 109 + 144 + + + 199 + 144 + + + + + diff --git a/plugins/Themes/Oxygen2/plugin.json b/plugins/Themes/Oxygen2/plugin.json new file mode 100755 index 0000000..9e26dfe --- /dev/null +++ b/plugins/Themes/Oxygen2/plugin.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins/Themes/Oxygen2/radialMap/labels.cpp b/plugins/Themes/Oxygen2/radialMap/labels.cpp new file mode 100755 index 0000000..c5ff770 --- /dev/null +++ b/plugins/Themes/Oxygen2/radialMap/labels.cpp @@ -0,0 +1,338 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#include +#include +#include +#include + +#include "../fileTree.h" +#include "radialMap.h" +#include "widget.h" +#include +#include + +namespace RadialMap +{ +class Label +{ +public: + Label(const RadialMap::Segment *s, int l) : segment(s), level(l), angle(segment->start() + (segment->length() / 2)) { } + + bool tooClose(const int otherAngle) const { + return (angle > otherAngle - LABEL_ANGLE_MARGIN && angle < otherAngle + LABEL_ANGLE_MARGIN); + } + + const RadialMap::Segment *segment; + const unsigned int level; + const int angle; + + int targetX, targetY, middleX, startY, startX; + int textX, textY, tw, th; + + QString qs; +}; + +void RadialMap::Widget::paintExplodedLabels(QPainter &paint) const +{ + //we are a friend of RadialMap::Map + + QVector list; + unsigned int startLevel = 0; + + + //1. Create list of labels sorted in the order they will be rendered + + if (m_focus && m_focus->file() != m_tree) { //separate behavior for selected vs unselected segments + //don't bother with files + if (m_focus && m_focus->file() && !m_focus->file()->isFolder()) { + return; + } + + //find the range of levels we will be potentially drawing labels for + //startLevel is the level above whatever m_focus is in + for (const Folder *p = (const Folder*)m_focus->file(); p != m_tree; ++startLevel) { + p = p->parent(); + } + + //range=2 means 2 levels to draw labels for + + const uint start = m_focus->start(); + const uint end = m_focus->end(); //boundary angles + const uint minAngle = int(m_focus->length() * LABEL_MIN_ANGLE_FACTOR); + + + //**** Levels should be on a scale starting with 0 + //**** range is a useless parameter + //**** keep a topblock var which is the lowestLevel OR startLevel for indentation purposes + for (unsigned int i = startLevel; i <= m_map.m_visibleDepth; ++i) { + for (const Segment *segment : m_map.m_signature[i]) { + if (segment->start() >= start && segment->end() <= end) { + if (segment->length() > minAngle) { + list.append(new Label(segment, i)); + } + } + } + } + } else { + for (Segment *segment : *m_map.m_signature) { + if (segment->length() > 288) { + list.append(new Label(segment, 0)); + + } + } + } + + std::sort(list.begin(), list.end(), [](Label *item1, Label *item2) { + //you add 1440 to work round the fact that later you want the circle split vertically + //and as it is you start at 3 o' clock. It's to do with rightPrevY, stops annoying bug + + int angle1 = (item1)->angle + 1440; + int angle2 = (item2)->angle + 1440; + + // Also sort by level + if (angle1 == angle2) { + return (item1->level > item2->level); + } + + if (angle1 > 5760) angle1 -= 5760; + if (angle2 > 5760) angle2 -= 5760; + + return (angle1 < angle2); + + }); + + //2. Check to see if any adjacent labels are too close together + // if so, remove it (the least significant labels, since we sort by level too). + + int pos = 0; + while (pos < list.size() - 1) { + if (list[pos]->tooClose(list[pos+1]->angle)) { + delete list.takeAt(pos+1); + } else { + ++pos; + } + } + + //used in next two steps + bool varySizes; + //**** should perhaps use doubles + int *sizes = new int [ m_map.m_visibleDepth + 1 ]; //**** make sizes an array of floats I think instead (or doubles) + + // If the minimum is larger than the default it fucks up further down + if (paint.font().pointSize() < 0 || + paint.font().pointSize() < minFontPitch) { + QFont font = paint.font(); + font.setPointSize(minFontPitch); + paint.setFont(font); + } + + QVector::iterator it; + + do { + //3. Calculate font sizes + + { + //determine current range of levels to draw for + uint range = 0; + + for (Label *label : list) { + range = qMax(range, label->level); + + //**** better way would just be to assign if nothing is range + } + + range -= startLevel; //range 0 means 1 level of labels + + varySizes = range != 0; + + if (varySizes) { + //create an array of font sizes for various levels + //will exceed normal font pitch automatically if necessary, but not minPitch + //**** this needs to be checked lots + + //**** what if this is negative (min size gtr than default size) + uint step = (paint.font().pointSize() - minFontPitch) / range; + if (step == 0) { + step = 1; + } + + for (uint x = range + startLevel, y = minFontPitch; x >= startLevel; y += step, --x) { + sizes[x] = y; + } + } + } + + //4. determine label co-ordinates + + + const int preSpacer = int(m_map.m_ringBreadth * 0.5) + m_map.m_innerRadius; + const int fullStrutLength = (m_map.width() - m_map.MAP_2MARGIN) / 2 + LABEL_MAP_SPACER; //full length of a strut from map center + + int prevLeftY = 0; + int prevRightY = height(); + + QFont font; + + for (it = list.begin(); it != list.end(); ++it) { + Label *label = *it; + //** bear in mind that text is drawn with QPoint param as BOTTOM left corner of text box + QString string = label->segment->file()->displayName(); + if (varySizes) { + font.setPointSize(sizes[label->level]); + } + QFontMetrics fontMetrics(font); + #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) + const int minTextWidth = fontMetrics.width(QStringLiteral("M...")) + LABEL_TEXT_HMARGIN; // Fully elided string + #else + const int minTextWidth = fontMetrics.horizontalAdvance(QStringLiteral("M...")) + LABEL_TEXT_HMARGIN; // Fully elided string + #endif + + const int fontHeight = fontMetrics.height() + LABEL_TEXT_VMARGIN; //used to ensure label texts don't overlap + const int lineSpacing = fontHeight / 4; + + const bool rightSide = (label->angle < 1440 || label->angle > 4320); + + double sinra, cosra; + const double ra = M_PI/2880 * label->angle; //convert to radians + sinra = qSin(ra); + cosra = qCos(ra); + + const int spacer = preSpacer + m_map.m_ringBreadth * label->level; + + const int centerX = m_map.width() / 2 + m_offset.x(); //centre relative to canvas + const int centerY = m_map.height() / 2 + m_offset.y(); + int targetX = centerX + cosra * spacer; + int targetY = centerY - sinra * spacer; + int startX = targetX + cosra * (fullStrutLength - spacer + m_map.m_ringBreadth / 2); + int startY = targetY - sinra * (fullStrutLength - spacer); + + if (rightSide) { //righthand side, going upwards + if (startY > prevRightY /*- fmh*/) { //then it is too low, needs to be drawn higher + startY = prevRightY /*- fmh*/; + } + } else {//lefthand side, going downwards + if (startY < prevLeftY/* + fmh*/) { //then we're too high, need to be drawn lower + startY = prevLeftY /*+ fmh*/; + } + } + + int middleX = targetX - (startY - targetY) / tan(ra); + int textY = startY + lineSpacing; + + int textX; + #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) + const int textWidth = fontMetrics.width(string) + LABEL_TEXT_HMARGIN; + #else + const int textWidth = fontMetrics.horizontalAdvance(string) + LABEL_TEXT_HMARGIN; + #endif + if (rightSide) { + if (startX + minTextWidth > width() || textY < fontHeight || middleX < targetX) { + //skip this strut + //**** don't duplicate this code + list.erase(it); //will delete the label and set it to list.current() which _should_ be the next ptr + break; + } + + prevRightY = textY - fontHeight - lineSpacing; //must be after above's "continue" + + if (m_offset.x() + m_map.width() + textWidth < width()) { + startX = m_offset.x() + m_map.width(); + } else { + startX = qMax(width() - textWidth, startX); + string = fontMetrics.elidedText(string, Qt::ElideMiddle, width() - startX); + } + + textX = startX + LABEL_TEXT_HMARGIN; + } else { // left side + if (startX - minTextWidth < 0 || textY > height() || middleX > targetX) { + //skip this strut + list.erase(it); //will delete the label and set it to list.current() which _should_ be the next ptr + break; + } + + prevLeftY = textY + fontHeight - lineSpacing; + + if (m_offset.x() - textWidth > 0) { + startX = m_offset.x(); + textX = startX - textWidth - LABEL_TEXT_HMARGIN; + } else { + textX = 0; + string = fontMetrics.elidedText(string, Qt::ElideMiddle, startX); + #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) + startX = fontMetrics.width(string) + LABEL_TEXT_HMARGIN; + #else + startX = fontMetrics.horizontalAdvance(string) + LABEL_TEXT_HMARGIN; + #endif + } + } + + label->targetX = targetX; + label->targetY = targetY; + label->middleX = middleX; + label->startY = startY; + label->startX = startX; + label->textX = textX; + label->textY = textY; + label->qs = string; + } + + //if an element is deleted at this stage, we need to do this whole + //iteration again, thus the following loop + //**** in rare case that deleted label was last label in top level + // and last in labelList too, this will not work as expected (not critical) + + } while (it != list.end()); + + + //5. Render labels + + QFont font; + for (Label *label : list) { + if (varySizes) { + //**** how much overhead in making new QFont each time? + // (implicate sharing remember) + font.setPointSize(sizes[label->level]); + paint.setFont(font); + } + + paint.setPen(QPen(QColor(0,0,0),2)); + paint.drawLine(label->targetX, label->targetY, label->middleX, label->startY); + paint.drawLine(label->middleX, label->startY, label->startX, label->startY); + + paint.setPen(QPen(QColor(255,255,255),1)); + paint.drawLine(label->targetX, label->targetY, label->middleX, label->startY); + paint.drawLine(label->middleX, label->startY, label->startX, label->startY); + + paint.setPen(QPen(QColor(0,0,0),1)); + paint.drawText(label->textX-1, label->textY-1, label->qs); + paint.drawText(label->textX+1, label->textY-1, label->qs); + paint.drawText(label->textX+1, label->textY+1, label->qs); + paint.drawText(label->textX-1, label->textY+1, label->qs); + paint.setPen(QPen(QColor(255,255,255),1)); + paint.drawText(label->textX, label->textY, label->qs); + } + + qDeleteAll(list); + delete [] sizes; +} +} + diff --git a/plugins/Themes/Oxygen2/radialMap/map.cpp b/plugins/Themes/Oxygen2/radialMap/map.cpp new file mode 100755 index 0000000..a7306ac --- /dev/null +++ b/plugins/Themes/Oxygen2/radialMap/map.cpp @@ -0,0 +1,421 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#include //make() +#include //make() & paint() +#include //ctor +#include //ctor +#include +#include + +#include "radialMap.h" // defines +#include "../interface.h" +#include "../fileTree.h" +#include "widget.h" +#include +#include + +RadialMap::Map::Map() + : m_signature(nullptr) + , m_visibleDepth(DEFAULT_RING_DEPTH) + , m_ringBreadth(MIN_RING_BREADTH) + , m_innerRadius(0) + , defaultRingDepth(4) +{ + + //FIXME this is all broken. No longer is a maximum depth! + const int fmh = QFontMetrics(QFont()).height(); + const int fmhD4 = fmh / 4; + MAP_2MARGIN = 2 * (fmh - (fmhD4 - LABEL_MAP_SPACER)); //margin is dependent on fitting in labels at top and bottom + + m_minSize=27300; +} + +RadialMap::Map::~Map() +{ + delete [] m_signature; +} + +void RadialMap::Map::invalidate() +{ + delete [] m_signature; + m_signature = nullptr; + + m_visibleDepth = defaultRingDepth; +} + +void RadialMap::Map::make(const Folder *tree, bool refresh) +{ + if(height()<1) + return; + //slow operation so set the wait cursor + QApplication::setOverrideCursor(Qt::WaitCursor); + + //build a signature of visible components + { + //**** REMOVE NEED FOR the +1 with MAX_RING_DEPTH uses + //**** add some angle bounds checking (possibly in Segment ctor? can I delete in a ctor?) + //**** this is a mess + + delete [] m_signature; + m_signature = new std::vector[m_visibleDepth + 1]; + + m_root = tree; + + if (!refresh) { + quint64 varSize=tree->size(); + quint64 varHeight=height(); + quint64 varA=(varSize * 3); + quint64 varB=(PI * varHeight - MAP_2MARGIN); + m_minSize = varA / varB; + findVisibleDepth(tree); + } + + setRingBreadth(); + + // Calculate ring size limits + m_limits.resize(m_visibleDepth + 1); + const double size = m_root->size(); + const double pi2B = M_PI * 4 * m_ringBreadth; + for (uint depth = 0; depth <= m_visibleDepth; ++depth) { + m_limits[depth] = uint(size / double(pi2B * (depth + 1))); //min is angle that gives 3px outer diameter for that depth + } + + build(tree); + } + + //colour the segments + colorise(); + + m_centerText = tree->humanReadableSize()+"\n"+QObject::tr("%1 files").arg(Themes::simplifiedBigNum(tree->children())); + + //paint the pixmap + paint(); + + QApplication::restoreOverrideCursor(); +} + +void RadialMap::Map::setRingBreadth() +{ + //FIXME called too many times on creation + + m_ringBreadth = (height() - MAP_2MARGIN) / (2 * m_visibleDepth + 4); + m_ringBreadth = qBound(MIN_RING_BREADTH, m_ringBreadth, MAX_RING_BREADTH); +} + +void RadialMap::Map::findVisibleDepth(const Folder *dir, uint currentDepth) +{ + + //**** because I don't use the same minimumSize criteria as in the visual function + // this can lead to incorrect visual representation + //**** BUT, you can't set those limits until you know m_depth! + + //**** also this function doesn't check to see if anything is actually visible + // it just assumes that when it reaches a new level everything in it is visible + // automatically. This isn't right especially as there might be no files in the + // dir provided to this function! + + static uint stopDepth = 0; + + if (dir == m_root) { + stopDepth = m_visibleDepth; + m_visibleDepth = 0; + } + + if (m_visibleDepth < currentDepth) m_visibleDepth = currentDepth; + if (m_visibleDepth >= stopDepth) return; + + for(const auto& n : dir->folders) + { + Folder * folder=n.second; + if (folder->size() > m_minSize) { + findVisibleDepth(folder, currentDepth + 1); //if no files greater than min size the depth is still recorded + } + } +} + +//**** segments currently overlap at edges (i.e. end of first is start of next) +bool RadialMap::Map::build(const Folder * const dir, const uint depth, uint a_start, const uint a_end) +{ + //first iteration: dir == m_root + + if (dir->children() == 0) //we do fileCount rather than size to avoid chance of divide by zero later + return false; + + uint64_t hiddenSize = 0; + uint hiddenFileCount = 0; + + for(const auto& n : dir->folders) + { + Folder * folder=n.second; + if (folder->size() < m_limits[depth] * 6) { // limit is half a degree? we want at least 3 degrees + hiddenSize += folder->size(); + hiddenFileCount += folder->children(); //need to add one to count the dir as well + ++hiddenFileCount; + continue; + } + unsigned int a_len = (unsigned int)(5760 * ((double)folder->size() / (double)m_root->size())); + Segment *s = new Segment(folder, a_start, a_len); + m_signature[depth].push_back(s); + if (depth != m_visibleDepth) { + //recurse + s->m_hasHiddenChildren = build(folder, depth + 1, a_start, a_start + a_len); + } else { + s->m_hasHiddenChildren = true; + } + a_start += a_len; //**** should we add 1? + } + for (File *file : dir->onlyFiles) { + if (file->size() < m_limits[depth] * 6) { // limit is half a degree? we want at least 3 degrees + hiddenSize += file->size(); + ++hiddenFileCount; + continue; + } + unsigned int a_len = (unsigned int)(5760 * ((double)file->size() / (double)m_root->size())); + Segment *s = new Segment(file, a_start, a_len); + m_signature[depth].push_back(s); + a_start += a_len; //**** should we add 1? + } + + if (hiddenFileCount == dir->children()) { + return true; + } + + if (depth == 0 && hiddenSize >= m_limits[depth] && hiddenFileCount > 0) { + //append a segment for unrepresented space - a "fake" segment + const QString s = QObject::tr("%1 file, with an average size of %2") + .arg(hiddenFileCount) + .arg(QString::fromStdString(File::facilityEngine->sizeToString(hiddenSize/hiddenFileCount))); + + + (m_signature + depth)->push_back(new Segment(new File(s.toUtf8().constData(), hiddenSize), a_start, a_end - a_start, true)); + } + + return false; +} + +bool RadialMap::Map::resize(const QRect &rect) +{ + //there's a MAP_2MARGIN border + + const int mw=width(); + const int mh=height(); + const int cw=rect.width(); + const int ch=rect.height(); + + if (cw < mw || ch < mh || (cw > mw && ch > mh)) + { + uint size = ((cw < ch) ? cw : ch) - MAP_2MARGIN; + + //this also causes uneven sizes to always resize when resizing but map is small in that dimension + //size -= size % 2; //even sizes mean less staggered non-antialiased resizing + + { + const uint minSize = MIN_RING_BREADTH * 2 * (m_visibleDepth + 2); + + if (size < minSize) + size = minSize; + + //this QRect is used by paint() + m_rect.setRect(0,0,size,size); + } + m_pixmap = QPixmap(m_rect.size()); + + //resize the pixmap + size += MAP_2MARGIN; + + if (m_signature != nullptr) + { + setRingBreadth(); + paint(); + } + + return true; + } + + return false; +} + +void RadialMap::Map::colorise() +{ + if (!m_signature || m_signature->empty()) { + //std::cerr << "no signature yet" << std::endl; + return; + } + + QColor cp, cb; + double darkness = 1; + double contrast = (double)94 / (double)100; + int h, s1, s2, v1, v2; + + for (uint i = 0; i <= m_visibleDepth; ++i, darkness += 0.04) { + for (Segment *segment : m_signature[i]) { + h = int(segment->start() / 16); + s1 = 160; + v1 = (int)(255.0 / darkness); //doing this more often than once seems daft! + + v2 = v1 - int(contrast * v1); + s2 = s1 + int(contrast * (255 - s1)); + + if (s1 < 80) s1 = 80; //can fall too low and makes contrast between the files hard to discern + + if (segment->isFake()) { //multi-file + cb.setHsv(h, s2, (v2 < 90) ? 90 : v2); //too dark if < 100 + cp.setHsv(h, 17, v1); + } else if (!segment->file()->isFolder()) { //file + cb.setHsv(h, 17, v1); + cp.setHsv(h, 17, v2); + } else { //folder + cb.setHsv(h, s1, v1); //v was 225 + cp.setHsv(h, s2, v2); //v was 225 - delta + } + + segment->setPalette(cp, cb); + } + } +} + +void RadialMap::Map::paint(bool antialias) +{ + QPainter paint; + QRect rect = m_rect; + + rect.adjust(5, 5, -5, -5); + m_pixmap.fill(Qt::transparent); + + //m_rect.moveRight(1); // Uncommenting this breaks repainting when recreating map from cache + + + //**** best option you can think of is to make the circles slightly less perfect, + // ** i.e. slightly eliptic when resizing inbetween + + if (m_pixmap.isNull()) + return; + + if (!paint.begin(&m_pixmap)) { + //qWarning() << "Filelight::RadialMap Failed to initialize painting, returning..."; + return; + } + + if (antialias) { + paint.translate(0.7, 0.7); + paint.setRenderHint(QPainter::Antialiasing); + } + + int step = m_ringBreadth; + int excess = -1; + + //do intelligent distribution of excess to prevent nasty resizing + if (m_ringBreadth != MAX_RING_BREADTH && m_ringBreadth != MIN_RING_BREADTH) { + excess = rect.width() % m_ringBreadth; + ++step; + } + + for (int x = m_visibleDepth; x >= 0; --x) + { + int width = rect.width() / 2; + //clever geometric trick to find largest angle that will give biggest arrow head + uint a_max = int(acos((double)width / double((width + 5))) * (180*16 / M_PI)); + + for (Segment *segment : m_signature[x]) { + //draw the pie segments, most of this code is concerned with drawing the little + //arrows on the ends of segments when they have hidden files + + paint.setPen(segment->pen()); + + if (segment->hasHiddenChildren()) + { + //draw arrow head to indicate undisplayed files/directories + QPolygon pts(3); + QPoint pos, cpos = rect.center(); + uint a[3] = { segment->start(), segment->length(), 0 }; + + a[2] = a[0] + (a[1] / 2); //assign to halfway between + if (a[1] > a_max) + { + a[1] = a_max; + a[0] = a[2] - a_max / 2; + } + + a[1] += a[0]; + + for (int i = 0, radius = width; i < 3; ++i) + { + double ra = M_PI/(180*16) * a[i], sinra, cosra; + + if (i == 2) + radius += 5; + sinra = qSin(ra); + cosra = qCos(ra); + pos.rx() = cpos.x() + static_cast(cosra * radius); + pos.ry() = cpos.y() - static_cast(sinra * radius); + pts.setPoint(i, pos); + } + + paint.setBrush(segment->pen()); + paint.drawPolygon(pts); + } + + paint.setPen(QColor(120,120,120)); + paint.setBrush(segment->brush()); + paint.drawPie(rect, segment->start(), segment->length()); + + if (segment->hasHiddenChildren()) + { + //**** code is bloated! + paint.save(); + QPen pen = paint.pen(); + int width = 2; + pen.setWidth(width); + paint.setPen(pen); + QRect rect2 = rect; + width /= 2; + rect2.adjust(width, width, -width, -width); + paint.drawArc(rect2, segment->start(), segment->length()); + paint.restore(); + } + } + + if (excess >= 0) { //excess allows us to resize more smoothly (still crud tho) + if (excess < 2) //only decrease rect by more if even number of excesses left + --step; + excess -= 2; + } + + rect.adjust(step, step, -step, -step); + } + + // if(excess > 0) rect.addCoords(excess, excess, 0, 0); //ugly + + paint.setPen(QColor(120,120,120)); + paint.setBrush(QColor(255,255,255)); + paint.drawEllipse(rect); + if(width()>200) + { + paint.setPen(QColor(0,0,0)); + paint.drawText(rect, Qt::AlignCenter, m_centerText); + } + + m_innerRadius = rect.width() / 2; //rect.width should be multiple of 2 + + paint.end(); +} + diff --git a/plugins/Themes/Oxygen2/radialMap/map.h b/plugins/Themes/Oxygen2/radialMap/map.h new file mode 100755 index 0000000..a78e56d --- /dev/null +++ b/plugins/Themes/Oxygen2/radialMap/map.h @@ -0,0 +1,85 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#ifndef RadialMapMAP_H +#define RadialMapMAP_H + +#include "../fileTree.h" + +#include +#include +#include + +namespace RadialMap { +class Segment; + +class Map +{ +public: + explicit Map(); + ~Map(); + + void make(const Folder *, bool = false); + bool resize(const QRect&); + + bool isNull() const { + return (m_signature == nullptr); + } + void invalidate(); + + int height() const { + return m_rect.height(); + } + int width() const { + return m_rect.width(); + } + QPixmap pixmap() const { + return m_pixmap; + } + + + friend class Widget; + +private: + void paint(bool antialias = true); + void colorise(); + void setRingBreadth(); + void findVisibleDepth(const Folder *dir, uint currentDepth = 0); + bool build(const Folder* const dir, const uint depth =0, uint a_start =0, const uint a_end =5760); + + std::vector *m_signature; + + const Folder *m_root; + uint m_minSize; + std::vector m_limits; + QRect m_rect; + uint m_visibleDepth; ///visible level depth of system + QPixmap m_pixmap; + int m_ringBreadth; + uint m_innerRadius; ///radius of inner circle + QString m_centerText; + + uint MAP_2MARGIN; + int defaultRingDepth; +}; +} + +#endif diff --git a/plugins/Themes/Oxygen2/radialMap/radialMap.h b/plugins/Themes/Oxygen2/radialMap/radialMap.h new file mode 100755 index 0000000..7935010 --- /dev/null +++ b/plugins/Themes/Oxygen2/radialMap/radialMap.h @@ -0,0 +1,109 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#ifndef RadialMapRADIALMAP_H +#define RadialMapRADIALMAP_H + +#include + +class File; + +namespace RadialMap +{ +class Segment //all angles are in 16ths of degrees +{ +public: + Segment(const File *f, uint s, uint l, bool isFake = false) + : m_angleStart(s) + , m_angleSegment(l) + , m_file(f) + , m_hasHiddenChildren(false) + , m_fake(isFake) {} + ~Segment(); + + uint start() const { + return m_angleStart; + } + uint length() const { + return m_angleSegment; + } + uint end() const { + return m_angleStart + m_angleSegment; + } + const File *file() const { + return m_file; + } + const QColor& pen() const { + return m_pen; + } + const QColor& brush() const { + return m_brush; + } + + bool isFake() const { + return m_fake; + } + bool hasHiddenChildren() const { + return m_hasHiddenChildren; + } + + bool intersects(uint a) const { + return ((a >= start()) && (a < end())); + } + + friend class Map; + friend class Builder; + +private: + void setPalette(const QColor &p, const QColor &b) { + m_pen = p; + m_brush = b; + } + + const uint m_angleStart, m_angleSegment; + const File* const m_file; + QColor m_pen, m_brush; + bool m_hasHiddenChildren; + const bool m_fake; +}; +} + + +#ifndef PI +#define PI 3.141592653589793 +#endif +#ifndef M_PI +#define M_PI 3.14159265358979323846264338327 +#endif + +#define MIN_RING_BREADTH 7 +#define MAX_RING_BREADTH 60 +#define DEFAULT_RING_DEPTH 4 //first level = 0 +#define MIN_RING_DEPTH 0 + +#define LABEL_MAP_SPACER 7 +#define LABEL_TEXT_HMARGIN 5 +#define LABEL_TEXT_VMARGIN 0 +#define LABEL_ANGLE_MARGIN 32 +#define LABEL_MIN_ANGLE_FACTOR 0.05 +#define LABEL_MAX_CHARS 30 + +#endif diff --git a/plugins/Themes/Oxygen2/radialMap/widget.cpp b/plugins/Themes/Oxygen2/radialMap/widget.cpp new file mode 100755 index 0000000..9baf6db --- /dev/null +++ b/plugins/Themes/Oxygen2/radialMap/widget.cpp @@ -0,0 +1,211 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#include "widget.h" + +#include "../fileTree.h" +#include "radialMap.h" //constants +#include "map.h" + +#include + +#include //sendEvent +#include //ctor - finding cursor size +#include //slotPostMouseEvent() +#include //member +#include + + +RadialMap::Widget::Widget(const bool dark, QWidget *parent) + : QWidget(parent) + , m_tree(nullptr) + , m_focus(nullptr) + , m_map() + , m_rootSegment(nullptr) //TODO we don't delete it, *shrug* + , m_toBeDeleted(nullptr) + , minFontPitch(QFont().pointSize() - 3) +{ + setMaximumSize(16777215, 16777215); + setMinimumSize(150, 100); + + connect(this, &Widget::folderCreated, this, &Widget::sendFakeMouseEvent); + connect(&m_timer, &QTimer::timeout, this, &Widget::resizeTimeout); + m_updateCache.start(100); + connect(&m_updateCache, &QTimer::timeout, this, &Widget::updateCache); + m_tooltip.setFrameShape(QFrame::StyledPanel); + m_tooltip.setWindowFlags(Qt::ToolTip | Qt::WindowTransparentForInput); + this->dark=dark; + newData=false; +} + +RadialMap::Widget::~Widget() +{ + if(m_rootSegment!=nullptr) + delete m_rootSegment; +} + + +QString RadialMap::Widget::path() const +{ + return m_tree->displayPath(); +} + +QUrl RadialMap::Widget::url(File const * const file) const +{ + return file ? file->url() : m_tree->url(); +} + +void RadialMap::Widget::invalidate() +{ + newData=true; + if (isValid()) + { + //**** have to check that only way to invalidate is this function frankly + //**** otherwise you may get bugs.. + + //disable mouse tracking + setMouseTracking(false); + + // Get this before reseting m_tree below + QUrl invalidatedUrl(url()); + + //ensure this class won't think we have a map still + m_tree = nullptr; + m_focus = nullptr; + + delete m_rootSegment; + m_rootSegment = nullptr; + + //FIXME move this disablement thing no? + // it is confusing in other areas, like the whole createFromCache() thing + m_map.invalidate(); + update(); + + //tell rest of Filelight + emit invalidated(invalidatedUrl); + } +} + +void +RadialMap::Widget::create(const Folder *tree) +{ + newData=true; + //it is not the responsibility of create() to invalidate first + //skip invalidation at your own risk + + //FIXME make it the responsibility of create to invalidate first + + if (tree) + { + m_focus = nullptr; + //generate the filemap image + m_map.make(tree); + + //this is the inner circle in the center + if(m_rootSegment!=nullptr) + delete m_rootSegment; + m_rootSegment = new Segment(tree, 0, 16*360); + + setMouseTracking(true); + } + + m_tree = tree; + + //tell rest of Filelight + emit folderCreated(tree); +} + +void +RadialMap::Widget::createFromCache(const Folder *tree) +{ + //no scan was necessary, use cached tree, however we MUST still emit invalidate + invalidate(); + create(tree); +} + +void +RadialMap::Widget::sendFakeMouseEvent() //slot +{ + QMouseEvent me(QEvent::MouseMove, mapFromGlobal(QCursor::pos()), Qt::NoButton, Qt::NoButton, Qt::NoModifier); + QApplication::sendEvent(this, &me); + update(); +} + +void +RadialMap::Widget::resizeTimeout() //slot +{ + // the segments are about to erased! + // this was a horrid bug, and proves the OO programming should be obeyed always! + m_focus = nullptr; + if (m_tree) + m_map.make(m_tree, true); + updateCache(); +} + +void +RadialMap::Widget::updateCache() +{ + if(newData) + { + newData=false; + cache=QPixmap(); + update(); + } +} + +void +RadialMap::Widget::refresh(int filth) +{ + //TODO consider a more direct connection + + if (!m_map.isNull()) + { + switch (filth) + { + case 1: + m_focus=nullptr; + m_map.make(m_tree, true); //true means refresh only + break; + + case 2: + m_map.paint(true); //antialiased painting + break; + + case 3: + m_map.colorise(); //FALL THROUGH! + case 4: + m_map.paint(); + + default: + break; + } + + update(); + } +} + +RadialMap::Segment::~Segment() +{ + if (isFake()) + delete m_file; //created by us in Builder::build() +} + + diff --git a/plugins/Themes/Oxygen2/radialMap/widget.h b/plugins/Themes/Oxygen2/radialMap/widget.h new file mode 100755 index 0000000..50dfea9 --- /dev/null +++ b/plugins/Themes/Oxygen2/radialMap/widget.h @@ -0,0 +1,118 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#ifndef RadialMapWIDGET_H +#define RadialMapWIDGET_H + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "map.h" + +class Folder; +class File; +namespace KIO { +class Job; +} + +namespace RadialMap +{ +class Segment; + +class Widget : public QWidget +{ + Q_OBJECT + +public: + explicit Widget(const bool dark,QWidget* = nullptr); + ~Widget() override; + QString path() const; + QUrl url(File const * const = nullptr) const; + + bool isValid() const { + return m_tree != nullptr; + } + + friend class Label; //FIXME badness + +public Q_SLOTS: + void create(const Folder*); + void invalidate(); + void resizeTimeout(); + void refresh(int); + +private Q_SLOTS: + void sendFakeMouseEvent(); + void createFromCache(const Folder*); + +Q_SIGNALS: + void activated(const QUrl&); + void invalidated(const QUrl&); + void folderCreated(const Folder*); + void mouseHover(const QString&); + void giveMeTreeFor(const QUrl&); + +protected: + void changeEvent(QEvent*) override; + void mouseMoveEvent(QMouseEvent*) override; + void paintEvent(QPaintEvent*) override; + void resizeEvent(QResizeEvent*) override; + void enterEvent(QEvent*) override; + void leaveEvent(QEvent*) override; + +protected: + const Segment *segmentAt(QPoint&) const; //FIXME const reference for a library others can use + const Segment *rootSegment() const { + return m_rootSegment; ///never == 0 + } + const Segment *focusSegment() const { + return m_focus; ///0 == nothing in focus + } + +private: + void paintExplodedLabels(QPainter&) const; + void updateCache(); + + const Folder *m_tree; + const Segment *m_focus; + QPoint m_offset; + QTimer m_timer; + QTimer m_updateCache; + Map m_map; + Segment *m_rootSegment; + const Segment *m_toBeDeleted; + QLabel m_tooltip; + bool dark; + int minFontPitch; + QPixmap cache; + bool newData; +}; +} + +#endif diff --git a/plugins/Themes/Oxygen2/radialMap/widgetEvents.cpp b/plugins/Themes/Oxygen2/radialMap/widgetEvents.cpp new file mode 100755 index 0000000..d9c23a0 --- /dev/null +++ b/plugins/Themes/Oxygen2/radialMap/widgetEvents.cpp @@ -0,0 +1,254 @@ +/*********************************************************************** +* Copyright 2003-2004 Max Howell +* Copyright 2008-2009 Martin Sandsmark +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +***********************************************************************/ + +#include "../fileTree.h" +#include "radialMap.h" //class Segment +#include "widget.h" + +#include //::mousePressEvent() + +#include +#include //::resizeEvent() +#include +#include +#include +#include + +#include //::segmentAt() + +void RadialMap::Widget::resizeEvent(QResizeEvent*) +{ + QRect rectTemp(rect()); + if (m_map.resize(rectTemp)) + m_timer.setSingleShot(true); + m_timer.start(100); //will cause signature to rebuild for new size + + //always do these as they need to be initialised on creation + const unsigned int w=width(); + const unsigned int h=height(); + m_offset.rx() = (w - m_map.width()) / 2; + m_offset.ry() = (h - m_map.height()) / 2; +} + +void RadialMap::Widget::paintEvent(QPaintEvent*) +{ + if(cache.isNull() || cache.width()!=width() || cache.height()!=height()) + { + QImage temp(width(),height(),QImage::Format_ARGB32); + temp.fill(Qt::transparent); + QPainter paint; + paint.begin(&temp); + + if (!m_map.isNull()) + { + QPixmap p(m_map.pixmap()); + + int margin=((p.width() < p.height()) ? p.width() : p.height())/50; + if(margin<1) + margin=1; + paint.setRenderHint(QPainter::Antialiasing); + QRect rect = p.rect(); + rect.moveTo(m_offset); + rect.adjust(-margin, -margin, margin, margin); + paint.setPen(QColor(200,200,200)); + paint.setBrush(QColor(255,255,255)); + paint.drawEllipse(rect); + paint.setPen(QColor(0,0,0)); + + paint.drawPixmap(m_offset,p); + } + else + { + const unsigned int w=width(); + const unsigned int h=height(); + unsigned int min=w; + unsigned int x=0; + unsigned int y=0; + if(h= m_map.m_innerRadius) //not hovering over inner circle + { + uint depth = ((int)length - m_map.m_innerRadius) / m_map.m_ringBreadth; + + if (depth <= m_map.m_visibleDepth) //**** do earlier since you can //** check not outside of range + { + //vector calculation, reduces to simple trigonometry + //cos angle = (aibi + ajbj) / albl + //ai = x, bi=1, aj=y, bj=0 + //cos angle = x / (length) + + uint a = (uint)(acos((double)e.x() / length) * 916.736); //916.7324722 = #radians in circle * 16 + + //acos only understands 0-180 degrees + if (e.y() < 0) a = 5760 - a; + + for (Segment *segment : m_map.m_signature[depth]) { + if (segment->intersects(a)) + return segment; + } + } + } + else return m_rootSegment; //hovering over inner circle + } + + return nullptr; +} + +void RadialMap::Widget::mouseMoveEvent(QMouseEvent *e) +{ + //set m_focus to what we hover over, update UI if it's a new segment + + Segment const * const oldFocus = m_focus; + QPoint p = e->pos(); + + m_focus = segmentAt(p); //NOTE p is passed by non-const reference + + if (m_focus) + { + m_tooltip.move(e->globalX() + 20, e->globalY() + 20); + if (m_focus != oldFocus) //if not same as last time + { + setCursor(Qt::PointingHandCursor); + + QString string; + + + const QString &path=m_focus->file()->displayPath(); + if (m_focus->file()->isFolder()) + { + const Folder* folder=static_cast(m_focus->file()); + if(path.isEmpty()) + string += m_focus->file()->humanReadableSize()+tr(" into %1 files").arg(folder->children()); + else + string += path+"\n"+m_focus->file()->humanReadableSize()+tr(" into %1 files").arg(folder->children()); + } + else + string += path+" "+m_focus->file()->humanReadableSize(); + + // Calculate a semi-sane size for the tooltip + QFontMetrics fontMetrics(font()); + int tooltipWidth = 0; + int tooltipHeight = 0; + for (const QString &part : string.split(QLatin1Char('\n'))) { + tooltipHeight += fontMetrics.height(); + #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) + tooltipWidth = qMax(tooltipWidth, fontMetrics.width(part)); + #else + tooltipWidth = qMax(tooltipWidth, fontMetrics.horizontalAdvance(part)); + #endif + } + // Limit it to the window size, probably should find something better + tooltipWidth = qMin(tooltipWidth, window()->width()); + tooltipWidth += 10; + tooltipHeight += 10; + m_tooltip.resize(tooltipWidth, tooltipHeight); + m_tooltip.setText(string); + m_tooltip.show(); + + emit mouseHover(m_focus->file()->displayPath()); + update(); + } + } + else if (oldFocus && oldFocus->file() != m_tree) + { + m_tooltip.hide(); + unsetCursor(); + update(); + + emit mouseHover(QString()); + } +} + +void RadialMap::Widget::enterEvent(QEvent *) +{ + if (!m_focus) return; + + setCursor(Qt::PointingHandCursor); + emit mouseHover(m_focus->file()->displayPath()); + update(); +} + +void RadialMap::Widget::leaveEvent(QEvent *) +{ + m_tooltip.hide(); +} + +void RadialMap::Widget::changeEvent(QEvent *e) +{ + if (e->type() == QEvent::ApplicationPaletteChange || + e->type() == QEvent::PaletteChange) + m_map.paint(); +} diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/add.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/add.png new file mode 100755 index 0000000..7932127 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/add.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/exit.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/exit.png new file mode 100755 index 0000000..ae3c4e8 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/exit.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/informations.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/informations.png new file mode 100755 index 0000000..5b7b255 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/informations.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/options.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/options.png new file mode 100755 index 0000000..23ec531 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/options.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Caught_Unix.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Caught_Unix.png new file mode 100755 index 0000000..6f5d1cf Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Caught_Unix.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Caught_Windows.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Caught_Windows.png new file mode 100755 index 0000000..5464856 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Caught_Windows.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png new file mode 100755 index 0000000..b2bb2e3 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png new file mode 100755 index 0000000..0abeb5f Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Uncaught_Unix.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Uncaught_Unix.png new file mode 100755 index 0000000..5e313b9 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Uncaught_Unix.png differ diff --git a/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Uncaught_Windows.png b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Uncaught_Windows.png new file mode 100755 index 0000000..828e7e6 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/SystemTrayIcon/systray_Uncaught_Windows.png differ diff --git a/plugins/Themes/Oxygen2/resources/add.png b/plugins/Themes/Oxygen2/resources/add.png new file mode 100755 index 0000000..7932127 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/add.png differ diff --git a/plugins/Themes/Oxygen2/resources/cancel.png b/plugins/Themes/Oxygen2/resources/cancel.png new file mode 100755 index 0000000..ae3c4e8 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/cancel.png differ diff --git a/plugins/Themes/Oxygen2/resources/cancelDarkD.png b/plugins/Themes/Oxygen2/resources/cancelDarkD.png new file mode 100755 index 0000000..a2f4556 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/cancelDarkD.png differ diff --git a/plugins/Themes/Oxygen2/resources/cancelDarkE.png b/plugins/Themes/Oxygen2/resources/cancelDarkE.png new file mode 100755 index 0000000..1cda258 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/cancelDarkE.png differ diff --git a/plugins/Themes/Oxygen2/resources/click.opus b/plugins/Themes/Oxygen2/resources/click.opus new file mode 100755 index 0000000..ddd2a25 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/click.opus differ diff --git a/plugins/Themes/Oxygen2/resources/darkButton.png b/plugins/Themes/Oxygen2/resources/darkButton.png new file mode 100755 index 0000000..ab8d393 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/darkButton.png differ diff --git a/plugins/Themes/Oxygen2/resources/darkButtonOver.png b/plugins/Themes/Oxygen2/resources/darkButtonOver.png new file mode 100755 index 0000000..ea42018 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/darkButtonOver.png differ diff --git a/plugins/Themes/Oxygen2/resources/darkButtonPushed.png b/plugins/Themes/Oxygen2/resources/darkButtonPushed.png new file mode 100755 index 0000000..d8fba09 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/darkButtonPushed.png differ diff --git a/plugins/Themes/Oxygen2/resources/darkmoveDown.png b/plugins/Themes/Oxygen2/resources/darkmoveDown.png new file mode 100755 index 0000000..cfe6fe6 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/darkmoveDown.png differ diff --git a/plugins/Themes/Oxygen2/resources/darkmoveUp.png b/plugins/Themes/Oxygen2/resources/darkmoveUp.png new file mode 100755 index 0000000..1d5f41c Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/darkmoveUp.png differ diff --git a/plugins/Themes/Oxygen2/resources/darkplayer_end.png b/plugins/Themes/Oxygen2/resources/darkplayer_end.png new file mode 100755 index 0000000..b5e41ba Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/darkplayer_end.png differ diff --git a/plugins/Themes/Oxygen2/resources/darkplayer_pause.png b/plugins/Themes/Oxygen2/resources/darkplayer_pause.png new file mode 100755 index 0000000..8ce7922 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/darkplayer_pause.png differ diff --git a/plugins/Themes/Oxygen2/resources/darkplayer_play.png b/plugins/Themes/Oxygen2/resources/darkplayer_play.png new file mode 100755 index 0000000..b1d58a1 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/darkplayer_play.png differ diff --git a/plugins/Themes/Oxygen2/resources/export-transfer-list.png b/plugins/Themes/Oxygen2/resources/export-transfer-list.png new file mode 100755 index 0000000..3a0aac6 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/export-transfer-list.png differ diff --git a/plugins/Themes/Oxygen2/resources/import-transfer-list.png b/plugins/Themes/Oxygen2/resources/import-transfer-list.png new file mode 100755 index 0000000..ee47f0d Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/import-transfer-list.png differ diff --git a/plugins/Themes/Oxygen2/resources/main.png b/plugins/Themes/Oxygen2/resources/main.png new file mode 100755 index 0000000..5464856 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/main.png differ diff --git a/plugins/Themes/Oxygen2/resources/moveDown.png b/plugins/Themes/Oxygen2/resources/moveDown.png new file mode 100755 index 0000000..82a312c Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/moveDown.png differ diff --git a/plugins/Themes/Oxygen2/resources/moveUp.png b/plugins/Themes/Oxygen2/resources/moveUp.png new file mode 100755 index 0000000..7f7ba72 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/moveUp.png differ diff --git a/plugins/Themes/Oxygen2/resources/over.opus b/plugins/Themes/Oxygen2/resources/over.opus new file mode 100755 index 0000000..7344831 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/over.opus differ diff --git a/plugins/Themes/Oxygen2/resources/player_end.png b/plugins/Themes/Oxygen2/resources/player_end.png new file mode 100755 index 0000000..18982db Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/player_end.png differ diff --git a/plugins/Themes/Oxygen2/resources/player_pause.png b/plugins/Themes/Oxygen2/resources/player_pause.png new file mode 100755 index 0000000..68ee21f Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/player_pause.png differ diff --git a/plugins/Themes/Oxygen2/resources/player_play.png b/plugins/Themes/Oxygen2/resources/player_play.png new file mode 100755 index 0000000..a1c5b83 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/player_play.png differ diff --git a/plugins/Themes/Oxygen2/resources/progressBarin.png b/plugins/Themes/Oxygen2/resources/progressBarin.png new file mode 100755 index 0000000..6af26c7 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/progressBarin.png differ diff --git a/plugins/Themes/Oxygen2/resources/progressBarout.png b/plugins/Themes/Oxygen2/resources/progressBarout.png new file mode 100755 index 0000000..08f3748 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/progressBarout.png differ diff --git a/plugins/Themes/Oxygen2/resources/putOnBottom.png b/plugins/Themes/Oxygen2/resources/putOnBottom.png new file mode 100755 index 0000000..512286e Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/putOnBottom.png differ diff --git a/plugins/Themes/Oxygen2/resources/putOnTop.png b/plugins/Themes/Oxygen2/resources/putOnTop.png new file mode 100755 index 0000000..30fe96b Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/putOnTop.png differ diff --git a/plugins/Themes/Oxygen2/resources/remove.png b/plugins/Themes/Oxygen2/resources/remove.png new file mode 100755 index 0000000..b711740 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/remove.png differ diff --git a/plugins/Themes/Oxygen2/resources/search.png b/plugins/Themes/Oxygen2/resources/search.png new file mode 100755 index 0000000..cef1836 Binary files /dev/null and b/plugins/Themes/Oxygen2/resources/search.png differ diff --git a/plugins/Themes/Oxygen2/themesOptions.ui b/plugins/Themes/Oxygen2/themesOptions.ui new file mode 100755 index 0000000..b2da124 --- /dev/null +++ b/plugins/Themes/Oxygen2/themesOptions.ui @@ -0,0 +1,466 @@ + + + themesOptions + + + + 0 + 0 + 519 + 389 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + + 0 + 0 + 492 + 300 + + + + Use + + + + + + + + + + + + + Minimize on close to systray + + + + + + + + + + + + + Limit copy speed to + + + + + + + + + + At the end of the copy + + + + + + + Limit copy speed to + + + + + + + false + + + KB/s + + + 1 + + + 999999 + + + + + + + Start with the "more button" pushed + + + + + + + Start minimized + + + + + + + Qt::Vertical + + + + 20 + 133 + + + + + + + + Always on top + + + + + + + Position at start + + + + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + + + + + 0 + 0 + + + + 5 + + + Qt::Horizontal + + + + + + + Unlimited + + + + + + + + + + + + + + + + Dark UI + + + + + + + + Default + + + + + Save as previous + + + + + At Center + + + + + + + + + + 0 + 0 + 509 + 283 + + + + Informations + + + + + + Show speed as main information + + + + + + + + + + Qt::Vertical + + + + 20 + 529 + + + + + + + + + + 0 + 0 + 509 + 283 + + + + Display + + + + + + Speed with progress bar + + + + + + + + + + Show dual progression + + + + + + + + + + Show progression in the title + + + + + + + + + + Progression color + + + + + + + + 225 + 20 + + + + + 225 + 20 + + + + Click to edit the color + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + + + + Qt::Vertical + + + + 20 + 455 + + + + + + + + + + + + + + checkBox_limitSpeed + clicked(bool) + limitSpeed + setEnabled(bool) + + + 109 + 144 + + + 199 + 144 + + + + + diff --git a/plugins/Themes/README.md b/plugins/Themes/README.md old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/README.md b/plugins/Themes/Supercopier/README.md old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/informations.xml b/plugins/Themes/Supercopier/informations.xml old mode 100644 new mode 100755 index 7f61b17..77c7ccd --- a/plugins/Themes/Supercopier/informations.xml +++ b/plugins/Themes/Supercopier/informations.xml @@ -17,7 +17,7 @@ - 1.6.1.3 + 2.2.4.4 Supercopier diff --git a/plugins/Themes/Supercopier/interface.pro b/plugins/Themes/Supercopier/interface.pro old mode 100644 new mode 100755 index 1b0ef2e..647df4b --- a/plugins/Themes/Supercopier/interface.pro +++ b/plugins/Themes/Supercopier/interface.pro @@ -1,6 +1,8 @@ DEFINES+=SUPERCOPIER include($$PWD/../Oxygen/interfaceInclude.pri) +TEMPLATE = lib +CONFIG += plugin !CONFIG(static) { RESOURCES += \ diff --git a/plugins/Themes/Supercopier/interface.pro.user.4.8-pre1 b/plugins/Themes/Supercopier/interface.pro.user.4.8-pre1 new file mode 100755 index 0000000..1c6f64c --- /dev/null +++ b/plugins/Themes/Supercopier/interface.pro.user.4.8-pre1 @@ -0,0 +1,328 @@ + + + + + + EnvironmentId + {74ab603f-f657-4135-92cf-c93af71b2f91} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + true + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop llvm + Desktop llvm + {ba4f29d9-73b8-4c83-a619-0b3a4cb9295e} + 0 + 0 + 0 + + /home/user/Desktop/ultracopier/sources/plugins/Themes/build-interface-Desktop_llvm-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/user/Desktop/ultracopier/sources/plugins/Themes/build-interface-Desktop_llvm-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/user/Desktop/ultracopier/sources/plugins/Themes/build-interface-Desktop_llvm-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + + %{buildDir} + Custom Executable + + ProjectExplorer.CustomExecutableRunConfiguration + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/plugins/Themes/Supercopier/interfaceResources.qrc b/plugins/Themes/Supercopier/interfaceResources.qrc old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/interfaceResources_unix.qrc b/plugins/Themes/Supercopier/interfaceResources_unix.qrc old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/interfaceResources_windows.qrc b/plugins/Themes/Supercopier/interfaceResources_windows.qrc old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/add.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/add.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/exit.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/exit.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/informations.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/informations.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/options.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/options.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Unix.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Unix.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Windows.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Windows.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Unix.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Unix.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Windows.png b/plugins/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Windows.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/add.png b/plugins/Themes/Supercopier/resources/add.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/cancel.png b/plugins/Themes/Supercopier/resources/cancel.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/export-transfer-list.png b/plugins/Themes/Supercopier/resources/export-transfer-list.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/import-transfer-list.png b/plugins/Themes/Supercopier/resources/import-transfer-list.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/main.png b/plugins/Themes/Supercopier/resources/main.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/moveDown.png b/plugins/Themes/Supercopier/resources/moveDown.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/moveUp.png b/plugins/Themes/Supercopier/resources/moveUp.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/player_end.png b/plugins/Themes/Supercopier/resources/player_end.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/player_pause.png b/plugins/Themes/Supercopier/resources/player_pause.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/player_play.png b/plugins/Themes/Supercopier/resources/player_play.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/progressbarleft.png b/plugins/Themes/Supercopier/resources/progressbarleft.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/progressbarright.png b/plugins/Themes/Supercopier/resources/progressbarright.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/putOnBottom.png b/plugins/Themes/Supercopier/resources/putOnBottom.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/putOnTop.png b/plugins/Themes/Supercopier/resources/putOnTop.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/remove.png b/plugins/Themes/Supercopier/resources/remove.png old mode 100644 new mode 100755 diff --git a/plugins/Themes/Supercopier/resources/search.png b/plugins/Themes/Supercopier/resources/search.png old mode 100644 new mode 100755 diff --git a/plugins/static-plugins-oxygen.qrc b/plugins/static-plugins-oxygen.qrc old mode 100644 new mode 100755 index 21b4be0..804f75e --- a/plugins/static-plugins-oxygen.qrc +++ b/plugins/static-plugins-oxygen.qrc @@ -1,6 +1,5 @@ - Themes/Oxygen/informations.xml - Themes/Oxygen/Languages/fr/translation.qm + Themes/Oxygen2/informations.xml diff --git a/plugins/static-plugins-windows.qrc b/plugins/static-plugins-windows.qrc old mode 100644 new mode 100755 index 6ddcdc0..59ba10d --- a/plugins/static-plugins-windows.qrc +++ b/plugins/static-plugins-windows.qrc @@ -1,6 +1,5 @@ PluginLoader/catchcopy-v0002/informations.xml - PluginLoader/catchcopy-v0002/Languages/fr/translation.qm diff --git a/plugins/static-plugins.qrc b/plugins/static-plugins.qrc old mode 100644 new mode 100755 index b250e7c..a582439 --- a/plugins/static-plugins.qrc +++ b/plugins/static-plugins.qrc @@ -1,12 +1,7 @@ - CopyEngine/Ultracopier/informations.xml - CopyEngine/Ultracopier/Languages/fr/translation.qm - Languages/fr/informations.xml - Languages/fr/flag.png - Languages/fr/translation.qm + CopyEngine/Ultracopier-Spec/informations.xml Listener/catchcopy-v0002/informations.xml - Themes/Oxygen/informations.xml - Themes/Oxygen/Languages/fr/translation.qm + Themes/Oxygen2/informations.xml -- cgit v1.2.3