From 0fbf28ea5f00bc594f2d8d00937cafc5b9cd5e5c Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 2 Oct 2020 15:16:42 -0400 Subject: bump ffs patches to 11.2, minus trad view --- .../debian/patches/ffs_allow_parallel_ops.patch | 25 +++++----- freefilesync/debian/patches/ffs_devuan.patch | 6 +-- freefilesync/debian/patches/ffs_gcc.patch | 21 +++++---- .../debian/patches/ffs_no_check_updates.patch | 52 ++++++++++---------- .../revert_zenju_aggressive_upstreamisms.patch | 55 +++++++--------------- 5 files changed, 71 insertions(+), 88 deletions(-) (limited to 'freefilesync/debian') diff --git a/freefilesync/debian/patches/ffs_allow_parallel_ops.patch b/freefilesync/debian/patches/ffs_allow_parallel_ops.patch index 15bf3ab..040369f 100644 --- a/freefilesync/debian/patches/ffs_allow_parallel_ops.patch +++ b/freefilesync/debian/patches/ffs_allow_parallel_ops.patch @@ -1,20 +1,20 @@ This is still experimental. -diff -x '*.orig' -x '*.swp' -x '*.rej' -Naur 10.9-0/FreeFileSync/Source/ui/folder_selector.cpp 10.9-1/FreeFileSync/Source/ui/folder_selector.cpp ---- 10.9-0/FreeFileSync/Source/ui/folder_selector.cpp 2019-02-10 16:42:28.960039117 -0500 -+++ 10.9-1/FreeFileSync/Source/ui/folder_selector.cpp 2019-02-10 20:20:11.981339625 -0500 -@@ -231,7 +231,7 @@ - +diff -aur 11.2-0/FreeFileSync/Source/ui/folder_selector.cpp 11.2-1/FreeFileSync/Source/ui/folder_selector.cpp +--- 11.2-0/FreeFileSync/Source/ui/folder_selector.cpp 2020-10-02 14:39:05.297463367 -0400 ++++ 11.2-1/FreeFileSync/Source/ui/folder_selector.cpp 2020-10-02 15:01:06.505758389 -0400 +@@ -260,7 +260,7 @@ + std::optional parallelOpsDisabledReason; - + - parallelOpsDisabledReason = _("Requires FreeFileSync Donation Edition"); + // parallelOpsDisabledReason = _("Requires FreeFileSync Donation Edition"); - - if (showCloudSetupDialog(parent_, folderPathPhrase, parallelOps, get(parallelOpsDisabledReason)) != ReturnSmallDlg::BUTTON_OKAY) + + if (showCloudSetupDialog(parent_, folderPathPhrase, sftpKeyFileLastSelected_, parallelOps, get(parallelOpsDisabledReason)) != ConfirmationButton::accept) return; -diff -Naur -x '*.orig' -x '*.rej' 10.9-0/FreeFileSync/Source/ui/sync_cfg.cpp 10.9-1/FreeFileSync/Source/ui/sync_cfg.cpp ---- 10.21-0/FreeFileSync/Source/ui/sync_cfg.cpp 2020-03-18 08:56:08.644066742 -0400 -+++ 10.21-1/FreeFileSync/Source/ui/sync_cfg.cpp 2020-03-18 09:13:30.459409986 -0400 -@@ -290,7 +290,7 @@ +diff -aur 11.2-0/FreeFileSync/Source/ui/sync_cfg.cpp 11.2-1/FreeFileSync/Source/ui/sync_cfg.cpp +--- 11.2-0/FreeFileSync/Source/ui/sync_cfg.cpp 2020-10-02 14:39:05.289463269 -0400 ++++ 11.2-1/FreeFileSync/Source/ui/sync_cfg.cpp 2020-10-02 15:01:06.509758438 -0400 +@@ -336,7 +336,7 @@ commandHistoryOut_(commandHistory), globalPairCfg_(globalPairCfg), localPairCfg_(localPairConfig), @@ -23,3 +23,4 @@ diff -Naur -x '*.orig' -x '*.rej' 10.9-0/FreeFileSync/Source/ui/sync_cfg.cpp 10. showMultipleCfgs_(showMultipleCfgs) { setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonOkay).setCancel(m_buttonCancel)); + diff --git a/freefilesync/debian/patches/ffs_devuan.patch b/freefilesync/debian/patches/ffs_devuan.patch index 67846e1..5e5af0b 100644 --- a/freefilesync/debian/patches/ffs_devuan.patch +++ b/freefilesync/debian/patches/ffs_devuan.patch @@ -1,6 +1,6 @@ Author: B Stack Source: Original research -Last date modified: 2020-02-15 +Last date modified: 2020-10-02 Message: Main patch to compile on Devuan. diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/ffs_paths.cpp 10.18-1/FreeFileSync/Source/ffs_paths.cpp --- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 @@ -24,7 +24,7 @@ diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/Makefi -cxxFlags = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ +cxxFlags += -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ - -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ + -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread -linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread @@ -53,7 +53,7 @@ diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/RealTi -cxxFlags = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ +cxxFlags += -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ - -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ + -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread -linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread diff --git a/freefilesync/debian/patches/ffs_gcc.patch b/freefilesync/debian/patches/ffs_gcc.patch index ed007b5..1f34404 100644 --- a/freefilesync/debian/patches/ffs_gcc.patch +++ b/freefilesync/debian/patches/ffs_gcc.patch @@ -1,13 +1,13 @@ -diff -Naur 10.25-1/FreeFileSync/Source/Makefile 10.25-2/FreeFileSync/Source/Makefile ---- 10.25-1/FreeFileSync/Source/Makefile 2020-06-20 13:36:08.495867672 -0400 -+++ 10.25-2/FreeFileSync/Source/Makefile 2020-06-20 13:31:36.180419862 -0400 +diff -aur 11.2-1/FreeFileSync/Source/Makefile 11.2-2/FreeFileSync/Source/Makefile +--- 11.2-1/FreeFileSync/Source/Makefile 2020-10-02 14:59:35.816639878 -0400 ++++ 11.2-2/FreeFileSync/Source/Makefile 2020-10-02 14:59:54.220866929 -0400 @@ -1,4 +1,5 @@ exeName = FreeFileSync +CXX=g++-10 cxxFlags += -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ - -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ -@@ -114,11 +115,11 @@ + -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ +@@ -115,11 +116,11 @@ ../Build/Bin/$(exeName): $(objFiles) mkdir -p $(dir $@) @@ -21,16 +21,16 @@ diff -Naur 10.25-1/FreeFileSync/Source/Makefile 10.25-2/FreeFileSync/Source/Make clean: rm -rf $(tmpPath) -diff -Naur 10.25-1/FreeFileSync/Source/RealTimeSync/Makefile 10.25-2/FreeFileSync/Source/RealTimeSync/Makefile ---- 10.25-1/FreeFileSync/Source/RealTimeSync/Makefile 2020-06-20 13:36:08.499867723 -0400 -+++ 10.25-2/FreeFileSync/Source/RealTimeSync/Makefile 2020-06-20 13:31:48.844580205 -0400 +diff -aur 11.2-1/FreeFileSync/Source/RealTimeSync/Makefile 11.2-2/FreeFileSync/Source/RealTimeSync/Makefile +--- 11.2-1/FreeFileSync/Source/RealTimeSync/Makefile 2020-10-02 14:59:35.820639928 -0400 ++++ 11.2-2/FreeFileSync/Source/RealTimeSync/Makefile 2020-10-02 14:59:54.220866929 -0400 @@ -1,4 +1,5 @@ exeName = RealTimeSync +CXX=g++-10 cxxFlags += -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ - -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ -@@ -52,11 +53,11 @@ + -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ +@@ -54,11 +55,11 @@ ../../Build/Bin/$(exeName): $(objFiles) mkdir -p $(dir $@) @@ -44,3 +44,4 @@ diff -Naur 10.25-1/FreeFileSync/Source/RealTimeSync/Makefile 10.25-2/FreeFileSyn clean: rm -rf $(tmpPath) + diff --git a/freefilesync/debian/patches/ffs_no_check_updates.patch b/freefilesync/debian/patches/ffs_no_check_updates.patch index fcbeb97..4616461 100644 --- a/freefilesync/debian/patches/ffs_no_check_updates.patch +++ b/freefilesync/debian/patches/ffs_no_check_updates.patch @@ -1,7 +1,7 @@ -diff -x '*.orig' -x '*.rej' -Naur 11.1-0/FreeFileSync/Source/ui/main_dlg.cpp 11.1-1/FreeFileSync/Source/ui/main_dlg.cpp ---- 11.1-0/FreeFileSync/Source/ui/main_dlg.cpp 2020-08-31 20:04:21.621863187 -0400 -+++ 11.1-1/FreeFileSync/Source/ui/main_dlg.cpp 2020-08-31 20:55:07.732089665 -0400 -@@ -5606,7 +5606,7 @@ +diff -aur 11.2-0/FreeFileSync/Source/ui/main_dlg.cpp 11.2-1/FreeFileSync/Source/ui/main_dlg.cpp +--- 11.2-0/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 14:39:05.333463811 -0400 ++++ 11.2-1/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 14:52:01.515034696 -0400 +@@ -5621,7 +5621,7 @@ globalCfg_.gui.lastUpdateCheck = 0; //reset to GlobalSettings.xml default value! m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.gui.lastUpdateCheck)); @@ -10,7 +10,7 @@ diff -x '*.orig' -x '*.rej' -Naur 11.1-0/FreeFileSync/Source/ui/main_dlg.cpp 11. if (shouldRunAutomaticUpdateCheck(globalCfg_.gui.lastUpdateCheck)) { flashStatusInformation(_("Searching for program updates...")); -@@ -5614,6 +5614,7 @@ +@@ -5629,6 +5629,7 @@ automaticUpdateCheckEval(this, globalCfg_.gui.lastUpdateCheck, globalCfg_.gui.lastOnlineVersion, automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare(*this).get()).get()); } @@ -18,25 +18,25 @@ diff -x '*.orig' -x '*.rej' -Naur 11.1-0/FreeFileSync/Source/ui/main_dlg.cpp 11. } -@@ -5623,6 +5624,7 @@ - [[maybe_unused]] bool ubOk = Unbind(wxEVT_IDLE, &MainDialog::onRegularUpdateCheck, this); - assert(ubOk); +@@ -5653,6 +5654,7 @@ + } + }; + /* if (shouldRunAutomaticUpdateCheck(globalCfg_.gui.lastUpdateCheck)) { flashStatusInformation(_("Searching for program updates...")); -@@ -5636,6 +5638,7 @@ - resultAsync.get()); //run on main thread: - }); +@@ -5669,6 +5671,7 @@ } -+ */ + else + showNewVersionReminder(); ++ */ } -diff -x '*.orig' -x '*.rej' -Naur 11.1-0/FreeFileSync/Source/ui/version_check.cpp 11.1-1/FreeFileSync/Source/ui/version_check.cpp ---- 11.1-0/FreeFileSync/Source/ui/version_check.cpp 2020-08-31 20:04:21.573862614 -0400 -+++ 11.1-1/FreeFileSync/Source/ui/version_check.cpp 2020-08-31 20:48:08.102811585 -0400 +diff -aur 11.2-0/FreeFileSync/Source/ui/version_check.cpp 11.2-1/FreeFileSync/Source/ui/version_check.cpp +--- 11.2-0/FreeFileSync/Source/ui/version_check.cpp 2020-10-02 14:39:05.297463367 -0400 ++++ 11.2-1/FreeFileSync/Source/ui/version_check.cpp 2020-10-02 14:55:17.857457477 -0400 @@ -70,6 +70,8 @@ bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck) @@ -46,17 +46,17 @@ diff -x '*.orig' -x '*.rej' -Naur 11.1-0/FreeFileSync/Source/ui/version_check.cp if (lastUpdateCheck == getVersionCheckInactiveId()) return false; -@@ -155,8 +157,7 @@ +@@ -156,8 +158,7 @@ + std::wstring updateDetailsMsg; + try { - try - { -- const std::string buf = sendHttpGet(utfTo("https://api.freefilesync.org/latest_changes?" + xWwwFormUrlEncode({ { "since", ffsVersion } })), -- ffsUpdateCheckUserAgent, nullptr /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError -+ const std::string buf = ""; - updateDetailsMsg = utfTo(buf); - } - catch (const SysError& e) { throw FileError(_("Failed to retrieve update information."), e.toString()); } -@@ -185,8 +186,7 @@ +- updateDetailsMsg = utfTo(sendHttpGet(utfTo("https://api.freefilesync.org/latest_changes?" + xWwwFormUrlEncode({ { "since", ffsVersion } })), +- ffsUpdateCheckUserAgent, nullptr /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll()); //throw SysError ++ updateDetailsMsg = utfTo(""); + } + catch (const SysError& e) { updateDetailsMsg = _("Failed to retrieve update information.") + + L"\n\n" + e.toString(); } + +@@ -178,8 +179,7 @@ std::string getOnlineVersion(const std::vector>& postParams) //throw SysError { @@ -66,7 +66,7 @@ diff -x '*.orig' -x '*.rej' -Naur 11.1-0/FreeFileSync/Source/ui/version_check.cp return trimCpy(response); } -@@ -233,13 +233,13 @@ +@@ -226,13 +226,13 @@ const std::string onlineVersion = getOnlineVersion(geHttpPostParameters(parent)); //throw SysError lastOnlineVersion = onlineVersion; diff --git a/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch b/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch index 12a1b43..1a468db 100644 --- a/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch +++ b/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch @@ -92,35 +92,21 @@ diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/wx+/choice_enum.h 10.24-1/ } } - -Version: 11.1 -Message: this one is really just a fix of Zenju's sloppy Makefile. He'll figure it out on his own for v11.2. If I tell him now, he'll replace the source tarball for 11.1 which will mess up everyone's checksums. -diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/Makefile 11.1-2/FreeFileSync/Source/Makefile ---- 11.1-1/FreeFileSync/Source/Makefile 2020-09-01 20:07:26.751011466 -0400 -+++ 11.1-2/FreeFileSync/Source/Makefile 2020-09-01 20:17:31.030611773 -0400 -@@ -95,6 +95,7 @@ - cppFiles+=../../zen/shutdown.cpp - cppFiles+=../../zen/sys_error.cpp - cppFiles+=../../zen/sys_info.cpp -+cppFiles+=../../zen/sys_version.cpp - cppFiles+=../../zen/thread.cpp - cppFiles+=../../zen/zlib_wrap.cpp - cppFiles+=../../wx+/file_drop.cpp Message: Now have to revert wxWidgets 3.1.4 upstreamisms cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxASCII_STR' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxASCII_STR' ) ; ) cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) ; ) -diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 11.1-2/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp ---- 11.1-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-09-01 19:07:43.703122022 -0400 -+++ 11.1-2/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-09-01 20:13:16.679447647 -0400 -@@ -145,7 +145,7 @@ +diff -x '*.orig' -x '*.rej' -aur 11.2-0/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 11.2-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp +--- 11.2-0/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-10-02 14:39:05.273463072 -0400 ++++ 11.2-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-10-02 15:06:56.670070620 -0400 +@@ -158,7 +158,7 @@ } Zstring newFolderPath; -- wxDirDialog dirPicker(parent_, _("Select a folder"), utfTo(defaultFolderPath), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); -+ wxDirDialog dirPicker(parent_, _("Select a folder"), utfTo(defaultFolderPath)); //put modal wxWidgets dialogs on stack: creating on freestore leads to memleak! - if (dirPicker.ShowModal() != wxID_OK) +- wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderPath), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); ++ wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderPath)); + if (folderSelector.ShowModal() != wxID_OK) return; - newFolderPath = utfTo(dirPicker.GetPath()); + newFolderPath = utfTo(folderSelector.GetPath()); diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/command_box.h 11.1-2/FreeFileSync/Source/ui/command_box.h --- 11.1-1/FreeFileSync/Source/ui/command_box.h 2020-09-01 19:07:43.719122215 -0400 +++ 11.1-2/FreeFileSync/Source/ui/command_box.h 2020-09-01 20:09:56.840929352 -0400 @@ -145,23 +131,18 @@ diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/folder_history_bo void setHistory(std::shared_ptr sharedHistory) { sharedHistory_ = std::move(sharedHistory); } std::shared_ptr getHistory() { return sharedHistory_; } -diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/folder_selector.cpp 11.1-2/FreeFileSync/Source/ui/folder_selector.cpp ---- 11.1-1/FreeFileSync/Source/ui/folder_selector.cpp 2020-09-01 20:07:25.907000676 -0400 -+++ 11.1-2/FreeFileSync/Source/ui/folder_selector.cpp 2020-09-01 20:13:48.791852316 -0400 -@@ -227,9 +227,10 @@ - } +diff -x '*.orig' -x '*.rej' -aur 11.2-0/FreeFileSync/Source/ui/folder_selector.cpp 11.2-1/FreeFileSync/Source/ui/folder_selector.cpp +--- 11.2-0/FreeFileSync/Source/ui/folder_selector.cpp 2020-10-02 14:39:05.297463367 -0400 ++++ 11.2-1/FreeFileSync/Source/ui/folder_selector.cpp 2020-10-02 15:08:07.066935749 -0400 +@@ -232,7 +232,7 @@ Zstring shellItemPath; -- wxDirDialog dirPicker(parent_, _("Select a folder"), utfTo(defaultFolderPath), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); -- //GTK2: "Show hidden" is also available as a context menu option in the folder picker! -- //It looks like wxDD_SHOW_HIDDEN only sets the default when opening for the first time!? -+ wxDirDialog dirPicker(parent_, _("Select a folder"), utfTo(defaultFolderPath)); //put modal wxWidgets dialogs on stack: creating on freestore leads to memleak! -+ -+ //-> following doesn't seem to do anything at all! still "Show hidden" is available as a context menu option: -+ //::gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dirPicker.m_widget), true /*show_hidden*/); - - if (dirPicker.ShowModal() != wxID_OK) - return; + //default size? Windows: not implemented, Linux(GTK2): not implemented, macOS: not implemented => wxWidgets, what is this shit!? +- wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderNative), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); ++ wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderNative)); + //GTK2: "Show hidden" is also available as a context menu option in the folder picker! + //It looks like wxDD_SHOW_HIDDEN only sets the default when opening for the first time!? + if (folderSelector.ShowModal() != wxID_OK) diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/bitmap_button.h 11.1-2/wx+/bitmap_button.h --- 11.1-1/wx+/bitmap_button.h 2020-09-01 19:07:43.727122311 -0400 +++ 11.1-2/wx+/bitmap_button.h 2020-09-01 20:10:31.385364671 -0400 -- cgit From fdf9c60fca67af5d6957819882403399336d1073 Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 2 Oct 2020 19:05:28 -0400 Subject: make trad view work, but needs improv for 11.2 --- .../debian/patches/ffs_traditional_view.patch | 219 +++++---------------- 1 file changed, 50 insertions(+), 169 deletions(-) (limited to 'freefilesync/debian') diff --git a/freefilesync/debian/patches/ffs_traditional_view.patch b/freefilesync/debian/patches/ffs_traditional_view.patch index e602033..5be2244 100644 --- a/freefilesync/debian/patches/ffs_traditional_view.patch +++ b/freefilesync/debian/patches/ffs_traditional_view.patch @@ -1,8 +1,7 @@ -diff --git a/FreeFileSync/Source/ui/file_grid.cpp b/FreeFileSync/Source/ui/file_grid.cpp -index 4ee72b97..d9b9a4c7 100644 ---- a/FreeFileSync/Source/ui/file_grid.cpp -+++ b/FreeFileSync/Source/ui/file_grid.cpp -@@ -437,6 +437,7 @@ private: +diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad1/FreeFileSync/Source/ui/file_grid.cpp +--- 11.2-2/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 14:39:05.289463269 -0400 ++++ 11.2-1-trad1/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 18:53:42.872947053 -0400 +@@ -448,6 +448,7 @@ case ItemPathFormat::relative: return utfTo(fsObj->getRelativePath()); case ItemPathFormat::full: @@ -10,7 +9,7 @@ index 4ee72b97..d9b9a4c7 100644 return AFS::getDisplayPath(fsObj->getAbstractPath()); } assert(false); -@@ -615,6 +616,16 @@ private: +@@ -628,6 +629,16 @@ else //=> BaseFolderPair groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); break; @@ -25,77 +24,15 @@ index 4ee72b97..d9b9a4c7 100644 + groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); + break; } - //add slashes for better readability - assert(!contains(groupParentFolder, L'/') || !contains(groupParentFolder, L'\\')); -@@ -650,72 +661,84 @@ private: - int widthGroupName = groupName .empty() ? 0 : ((iconMgr ? iconSize + gridGap_ : 0) + getTextExtentBuffered(dc, groupName).x + (iconMgr ? gridGap_ : 0)); - int widthGroupItems = (iconMgr ? iconSize + gridGap_ : 0) + groupItemNamesWidth; -- //not enough space? => collapse -- if (int excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; -- excessWidth > 0) + //path components should follow the app layout direction and are NOT a single piece of text! +@@ -655,6 +666,20 @@ + int widthGroupName = groupName .empty() ? 0 : (iconSize + gridGap_ + getTextExtentBuffered(dc, groupName).x + 2 * gridGap_); + int widthGroupItems = widthGroupSep + (drawFileIcons ? iconSize + gridGap_ : 0) + groupItemNamesWidth; + ++ // start trad patch + switch (itemPathFormat_) - { -- if (multiItemGroup && !groupParentFolder.empty() && !groupName.empty()) -- { -- //1. render group components on two rows -- stackedGroupRender = true; -- -- if (!endsWith(groupParentFolder, L'/' ) && -- !endsWith(groupParentFolder, L'\\')) -- groupParentFolder += groupParentSep; -- groupParentFolder += ELLIPSIS; -- -- widthGroupParent = getTextExtentBuffered(dc, groupParentFolder).x + gridGap_; -- -- int widthGroupStack = std::max(widthGroupParent, widthGroupName); -- excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; -- -- if (excessWidth > 0) -- { -- //2. shrink group stack (group parent only) -- if (widthGroupParent > widthGroupName) -- { -- widthGroupStack = widthGroupParent = std::max(widthGroupParent - excessWidth, widthGroupName); -- excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; -- } -- if (excessWidth > 0) -- { -- //3. shrink item rendering -- widthGroupItems = std::max(widthGroupItems - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth); -- excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; -- -- if (excessWidth > 0) -- { -- //4. shrink group stack -- widthGroupStack = std::max(widthGroupStack - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth + (iconMgr ? gridGap_ : 0)); -- -- widthGroupParent = std::min(widthGroupParent, widthGroupStack); -- widthGroupName = std::min(widthGroupName, widthGroupStack); -- } -- } -- } -- } -- else //group details on single row -- { -- //1. shrink group parent -- if (!groupParentFolder.empty()) -- { -- widthGroupParent = std::max(widthGroupParent - excessWidth, ellipsisWidth + (iconMgr ? gridGap_ : 0)); -- excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; -- } -- if (excessWidth > 0) -- { -- //2. shrink item rendering -- widthGroupItems = std::max(widthGroupItems - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth); -- excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; -- -- if (excessWidth > 0) -- //3. shrink group name -- if (!groupName.empty()) -- widthGroupName = std::max(widthGroupName - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth + (iconMgr ? gridGap_ : 0)); -- } -- } ++ { + case ItemPathFormat::traditional: + //widthGroupName = 0; + widthGroupParent -= widthGroupName ; @@ -104,79 +41,25 @@ index 4ee72b97..d9b9a4c7 100644 + case ItemPathFormat::relative: + case ItemPathFormat::full: + default: -+ // the insane logic of the new views -+ //not enough space? => collapse -+ if (int excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; -+ excessWidth > 0) -+ { -+ if (multiItemGroup && !groupParentFolder.empty() && !groupName.empty()) -+ { -+ //1. render group components on two rows -+ stackedGroupRender = true; -+ -+ if (!endsWith(groupParentFolder, L'/' ) && -+ !endsWith(groupParentFolder, L'\\')) -+ groupParentFolder += groupParentSep; -+ groupParentFolder += ELLIPSIS; -+ -+ widthGroupParent = getTextExtentBuffered(dc, groupParentFolder).x + gridGap_; -+ -+ int widthGroupStack = std::max(widthGroupParent, widthGroupName); -+ excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; -+ -+ if (excessWidth > 0) -+ { -+ //2. shrink group stack (group parent only) -+ if (widthGroupParent > widthGroupName) -+ { -+ widthGroupStack = widthGroupParent = std::max(widthGroupParent - excessWidth, widthGroupName); -+ excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; -+ } -+ if (excessWidth > 0) -+ { -+ //3. shrink item rendering -+ widthGroupItems = std::max(widthGroupItems - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth); -+ excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; ++ // the insane logic of the new views ++ // but preserve the original tabbing, to make the patch easier. + -+ if (excessWidth > 0) -+ { -+ //4. shrink group stack -+ widthGroupStack = std::max(widthGroupStack - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth + (iconMgr ? gridGap_ : 0)); -+ -+ widthGroupParent = std::min(widthGroupParent, widthGroupStack); -+ widthGroupName = std::min(widthGroupName, widthGroupStack); -+ } -+ } -+ } -+ } -+ else //group details on single row -+ { -+ //1. shrink group parent -+ if (!groupParentFolder.empty()) -+ { -+ widthGroupParent = std::max(widthGroupParent - excessWidth, ellipsisWidth + (iconMgr ? gridGap_ : 0)); -+ excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; -+ } -+ if (excessWidth > 0) -+ { -+ //2. shrink item rendering -+ widthGroupItems = std::max(widthGroupItems - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth); -+ excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; -+ -+ if (excessWidth > 0) -+ //3. shrink group name -+ if (!groupName.empty()) -+ widthGroupName = std::max(widthGroupName - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth + (iconMgr ? gridGap_ : 0)); -+ } -+ } -+ } -+ break; + //not enough space? => collapse + if (int excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; + excessWidth > 0) +@@ -725,6 +750,11 @@ + } } -- + ++ // end of original section, and back to the trad patch! ++ break; ++ } ++ // and end the addition for trad patch ++ return { itemName, -@@ -786,6 +809,9 @@ private: +@@ -793,6 +823,9 @@ rectGroup = rectGroupParent = rectGroupName = rectTmp; rectGroupParent.width = widthGroupParent; @@ -186,28 +69,28 @@ index 4ee72b97..d9b9a4c7 100644 rectGroupName .width = widthGroupName; if (stackedGroupRender) -@@ -837,7 +863,7 @@ private: +@@ -844,7 +877,7 @@ dc.GradientFillLinear(rectNav, getColorSelectionGradientFrom(), backCol, wxEAST); } -- if (!groupName.empty() && row == groupBeginRow) -+ if (!(itemPathFormat_ == ItemPathFormat::traditional) && !groupName.empty() && row == groupBeginRow) +- if (!groupName.empty() && row == groupFirstRow) ++ if (!(itemPathFormat_ == ItemPathFormat::traditional) && !groupName.empty() && row == groupFirstRow) { wxDCTextColourChanger textColorGroupName(dc); if (static_cast(rowHover) == HoverAreaGroup::groupName) -@@ -855,9 +881,9 @@ private: +@@ -865,9 +898,9 @@ drawCellText(dc, rectGroupName, groupName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupName)); } - if (!groupParentFolder.empty() && + if (itemPathFormat_ == ItemPathFormat::traditional || (!groupParentFolder.empty() && - ((stackedGroupRender && row == groupBeginRow + 1) || -- (!stackedGroupRender && row == groupBeginRow))) -+ (!stackedGroupRender && row == groupBeginRow)))) + (( stackedGroupRender && row == groupFirstRow + 1) || +- (!stackedGroupRender && row == groupFirstRow))) ++ (!stackedGroupRender && row == groupFirstRow)))) { drawCellText(dc, rectGroupParent, groupParentFolder, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupParentFolder)); } -@@ -1020,6 +1046,8 @@ private: +@@ -1040,6 +1073,8 @@ return _("Relative path"); case ItemPathFormat::full: return _("Full path"); @@ -216,11 +99,10 @@ index 4ee72b97..d9b9a4c7 100644 } assert(false); break; -diff --git a/FreeFileSync/Source/ui/file_grid_attr.h b/FreeFileSync/Source/ui/file_grid_attr.h -index 324619c1..7511a1ab 100644 ---- a/FreeFileSync/Source/ui/file_grid_attr.h -+++ b/FreeFileSync/Source/ui/file_grid_attr.h -@@ -79,6 +79,7 @@ enum class ItemPathFormat +diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_grid_attr.h 11.2-1-trad1/FreeFileSync/Source/ui/file_grid_attr.h +--- 11.2-2/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 14:39:05.313463564 -0400 ++++ 11.2-1-trad1/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 15:28:20.378038432 -0400 +@@ -79,6 +79,7 @@ name, relative, full, @@ -228,11 +110,10 @@ index 324619c1..7511a1ab 100644 }; const ItemPathFormat defaultItemPathFormatLeftGrid = ItemPathFormat::relative; -diff --git a/FreeFileSync/Source/ui/main_dlg.cpp b/FreeFileSync/Source/ui/main_dlg.cpp -index 491b7321..2d5c20c3 100644 ---- a/FreeFileSync/Source/ui/main_dlg.cpp -+++ b/FreeFileSync/Source/ui/main_dlg.cpp -@@ -2716,6 +2716,7 @@ void MainDialog::onGridLabelContextRim(bool leftSide) +diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/main_dlg.cpp 11.2-1-trad1/FreeFileSync/Source/ui/main_dlg.cpp +--- 11.2-2/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 18:54:21.781435371 -0400 ++++ 11.2-1-trad1/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 15:28:20.382038482 -0400 +@@ -2710,6 +2710,7 @@ addFormatEntry(_("Item name" ), ItemPathFormat::name); addFormatEntry(_("Relative path"), ItemPathFormat::relative); addFormatEntry(_("Full path" ), ItemPathFormat::full); @@ -240,9 +121,9 @@ index 491b7321..2d5c20c3 100644 //---------------------------------------------------------------------------------------------- menu.addSeparator(); -diff -x .git -Naur 11.1-1/FreeFileSync/Source/config.cpp 11.1-2/FreeFileSync/Source/config.cpp ---- 11.1-1/FreeFileSync/Source/config.cpp 2020-09-01 19:07:43.715122167 -0400 -+++ 11.1-2/FreeFileSync/Source/config.cpp 2020-09-10 09:38:14.539542699 -0400 +diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/config.cpp 11.2-1-trad1/FreeFileSync/Source/config.cpp +--- 11.2-2/FreeFileSync/Source/config.cpp 2020-10-02 14:39:05.233462578 -0400 ++++ 11.2-1-trad1/FreeFileSync/Source/config.cpp 2020-10-02 15:28:20.382038482 -0400 @@ -528,6 +528,9 @@ case ItemPathFormat::full: output = "Full"; @@ -253,7 +134,7 @@ diff -x .git -Naur 11.1-1/FreeFileSync/Source/config.cpp 11.1-2/FreeFileSync/Sou } } -@@ -541,6 +545,8 @@ +@@ -541,6 +544,8 @@ value = ItemPathFormat::relative; else if (tmp == "Full") value = ItemPathFormat::full; @@ -262,10 +143,10 @@ diff -x .git -Naur 11.1-1/FreeFileSync/Source/config.cpp 11.1-2/FreeFileSync/Sou else return false; return true; -diff -x .git -Naur 11.1-1/FreeFileSync/Source/ui/file_view.cpp 11.1-2/FreeFileSync/Source/ui/file_view.cpp ---- 11.1-1/FreeFileSync/Source/ui/file_view.cpp 2020-09-01 19:07:43.719122215 -0400 -+++ 11.1-2/FreeFileSync/Source/ui/file_view.cpp 2020-09-10 09:40:11.609044834 -0400 -@@ -798,6 +798,7 @@ +diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_view.cpp 11.2-1-trad1/FreeFileSync/Source/ui/file_view.cpp +--- 11.2-2/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 14:39:05.305463465 -0400 ++++ 11.2-1-trad1/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 15:28:20.386038532 -0400 +@@ -803,6 +803,7 @@ break; case ItemPathFormat::full: -- cgit From 0f1be52b4d312f8cfb4bc6e1367e00c28c601964 Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 2 Oct 2020 20:14:09 -0400 Subject: trad view valid for 11.2, and bump dpkg version --- freefilesync/debian/changelog | 18 ++++++ .../debian/patches/ffs_traditional_view.patch | 74 ++++++++++++++++++---- 2 files changed, 80 insertions(+), 12 deletions(-) (limited to 'freefilesync/debian') diff --git a/freefilesync/debian/changelog b/freefilesync/debian/changelog index fbdcbf7..301e624 100644 --- a/freefilesync/debian/changelog +++ b/freefilesync/debian/changelog @@ -1,3 +1,21 @@ +freefilesync (11.2-1+devuan) obs; urgency=low + + * Upstream updates + - Improved grid layout with file icons hidden + - Improved rendering of inactive and disabled grid items + - Remember last user-selected paths for file and folder pickers + - Fixed folder name hidden in "item name" view type + - Fixed determination of unsupported trash folder (Linux) + - Fixed copying broken symlinks (macOS) + - Fixed default action when pressing Enter in popup dialogs + - Fixed default popup dialog size (macOS) + - Use localized start of week for %WeekDay% (Linux, macOS) + - Swap sides using CTRL+W instead of F10 + - Show confirmation dialog before swapping sides + * [bgstack15] improve traditional view for current layout + + -- Ben Stack Fri, 02 Oct 2020 20:15:18 -0400 + freefilesync (11.1-2+devuan) obs; urgency=low * add traditional option to main grid view diff --git a/freefilesync/debian/patches/ffs_traditional_view.patch b/freefilesync/debian/patches/ffs_traditional_view.patch index 5be2244..544a935 100644 --- a/freefilesync/debian/patches/ffs_traditional_view.patch +++ b/freefilesync/debian/patches/ffs_traditional_view.patch @@ -1,6 +1,6 @@ -diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad1/FreeFileSync/Source/ui/file_grid.cpp ---- 11.2-2/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 14:39:05.289463269 -0400 -+++ 11.2-1-trad1/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 18:53:42.872947053 -0400 +diff -aur 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad2/FreeFileSync/Source/ui/file_grid.cpp +--- 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 14:39:05.289463269 -0400 ++++ 11.2-1-trad2/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 20:01:57.664195069 -0400 @@ -448,6 +448,7 @@ case ItemPathFormat::relative: return utfTo(fsObj->getRelativePath()); @@ -9,7 +9,17 @@ diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_g return AFS::getDisplayPath(fsObj->getAbstractPath()); } assert(false); -@@ -628,6 +629,16 @@ +@@ -529,7 +530,8 @@ + //---------------------------------------------------------------------------------- + wxDCPenChanger dummy(dc, wxPen(row == pdi.groupLastRow - 1 /*last group item*/ ? + getColorGridLine() : getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 != 0), fastFromDIP(1))); +- dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0)); ++ if (itemPathFormat_ != ItemPathFormat::traditional) ++ dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0)); + } + + +@@ -628,6 +630,16 @@ else //=> BaseFolderPair groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); break; @@ -26,16 +36,24 @@ diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_g } //path components should follow the app layout direction and are NOT a single piece of text! -@@ -655,6 +666,20 @@ +@@ -655,6 +667,29 @@ int widthGroupName = groupName .empty() ? 0 : (iconSize + gridGap_ + getTextExtentBuffered(dc, groupName).x + 2 * gridGap_); int widthGroupItems = widthGroupSep + (drawFileIcons ? iconSize + gridGap_ : 0) + groupItemNamesWidth; + // start trad patch ++ ++ //add slashes for better readability ++ assert(!contains(groupParentFolder, L'/') || !contains(groupParentFolder, L'\\')); ++ const wchar_t groupParentSep = contains(groupParentFolder, L'/') ? L'/' : (contains(groupParentFolder, L'\\') ? L'\\' : FILE_NAME_SEPARATOR); ++ + switch (itemPathFormat_) + { + case ItemPathFormat::traditional: -+ //widthGroupName = 0; -+ widthGroupParent -= widthGroupName ; ++ widthGroupParent -= widthGroupName - getTextExtentBuffered(dc, utfTo(FILE_NAME_SEPARATOR)).x; ++ ++ if (!endsWith(groupParentFolder, L'/' ) && //e.g. ftp://server/ ++ !endsWith(groupParentFolder, L'\\')) /*e.g. C:\ */ ++ groupParentFolder += groupParentSep; + break; + case ItemPathFormat::name: + case ItemPathFormat::relative: @@ -43,11 +61,23 @@ diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_g + default: + // the insane logic of the new views + // but preserve the original tabbing, to make the patch easier. ++ // but with the "add slashes" paragraph 1 moved to above this switch statement! + //not enough space? => collapse if (int excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; excessWidth > 0) -@@ -725,6 +750,11 @@ +@@ -664,10 +699,6 @@ + //1. render group components on two rows + stackedGroupRender = true; + +- //add slashes for better readability +- assert(!contains(groupParentFolder, L'/') || !contains(groupParentFolder, L'\\')); +- const wchar_t groupParentSep = contains(groupParentFolder, L'/') ? L'/' : (contains(groupParentFolder, L'\\') ? L'\\' : FILE_NAME_SEPARATOR); +- + if (!endsWith(groupParentFolder, L'/' ) && //e.g. ftp://server/ + !endsWith(groupParentFolder, L'\\')) /*e.g. C:\ */ + groupParentFolder += groupParentSep; +@@ -725,6 +756,11 @@ } } @@ -59,7 +89,7 @@ diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_g return { itemName, -@@ -793,6 +823,9 @@ +@@ -793,6 +829,9 @@ rectGroup = rectGroupParent = rectGroupName = rectTmp; rectGroupParent.width = widthGroupParent; @@ -69,7 +99,17 @@ diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_g rectGroupName .width = widthGroupName; if (stackedGroupRender) -@@ -844,7 +877,7 @@ +@@ -829,7 +868,8 @@ + if (row == pdi.groupLastRow - 1 /*last group item*/) //restore the group separation line we just cleared + { + wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), fastFromDIP(1))); +- dc.DrawLine(rectGroup.GetBottomLeft(), rectGroup.GetBottomRight() + wxPoint(1, 0)); ++ if (itemPathFormat_ != ItemPathFormat::traditional) ++ dc.DrawLine(rectGroup.GetBottomLeft(), rectGroup.GetBottomRight() + wxPoint(1, 0)); + } + } + +@@ -844,7 +884,7 @@ dc.GradientFillLinear(rectNav, getColorSelectionGradientFrom(), backCol, wxEAST); } @@ -78,7 +118,7 @@ diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_g { wxDCTextColourChanger textColorGroupName(dc); if (static_cast(rowHover) == HoverAreaGroup::groupName) -@@ -865,9 +898,9 @@ +@@ -865,9 +905,9 @@ drawCellText(dc, rectGroupName, groupName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupName)); } @@ -90,7 +130,17 @@ diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_g { drawCellText(dc, rectGroupParent, groupParentFolder, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupParentFolder)); } -@@ -1040,6 +1073,8 @@ +@@ -876,7 +916,8 @@ + if (!groupParentFolder.empty() || !groupName.empty()) + { + wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), fastFromDIP(1))); +- dc.DrawLine(rectGroupItems.GetTopLeft(), rectGroupItems.GetBottomLeft() + wxPoint(0, 1)); //draws half-open range! ++ if (itemPathFormat_ != ItemPathFormat::traditional) ++ dc.DrawLine(rectGroupItems.GetTopLeft(), rectGroupItems.GetBottomLeft() + wxPoint(0, 1)); //draws half-open range! + rectGroupItems.x += fastFromDIP(1) + gridGap_; + rectGroupItems.width -= fastFromDIP(1) + gridGap_; + } +@@ -1040,6 +1081,8 @@ return _("Relative path"); case ItemPathFormat::full: return _("Full path"); -- cgit From 9b947cb496c93679f65ad42a9be2d2ad1ddf6315 Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 2 Oct 2020 21:31:03 -0400 Subject: add trad rel view --- .../debian/patches/ffs_traditional_view.patch | 105 +++++++++++++-------- 1 file changed, 67 insertions(+), 38 deletions(-) (limited to 'freefilesync/debian') diff --git a/freefilesync/debian/patches/ffs_traditional_view.patch b/freefilesync/debian/patches/ffs_traditional_view.patch index 544a935..173842f 100644 --- a/freefilesync/debian/patches/ffs_traditional_view.patch +++ b/freefilesync/debian/patches/ffs_traditional_view.patch @@ -1,25 +1,28 @@ -diff -aur 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad2/FreeFileSync/Source/ui/file_grid.cpp +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad3/FreeFileSync/Source/ui/file_grid.cpp --- 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 14:39:05.289463269 -0400 -+++ 11.2-1-trad2/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 20:01:57.664195069 -0400 -@@ -448,6 +448,7 @@ ++++ 11.2-1-trad3/FreeFileSync/Source/ui/file_grid.cpp 2020-10-02 20:48:25.047194116 -0400 +@@ -446,8 +446,10 @@ + case ItemPathFormat::name: + return utfTo(fsObj->getItemName()); case ItemPathFormat::relative: ++ case ItemPathFormat::tradrel: return utfTo(fsObj->getRelativePath()); case ItemPathFormat::full: + case ItemPathFormat::traditional: return AFS::getDisplayPath(fsObj->getAbstractPath()); } assert(false); -@@ -529,7 +530,8 @@ +@@ -529,7 +531,8 @@ //---------------------------------------------------------------------------------- wxDCPenChanger dummy(dc, wxPen(row == pdi.groupLastRow - 1 /*last group item*/ ? getColorGridLine() : getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 != 0), fastFromDIP(1))); - dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0)); -+ if (itemPathFormat_ != ItemPathFormat::traditional) ++ if (itemPathFormat_ != ItemPathFormat::traditional && itemPathFormat_ != ItemPathFormat::tradrel) + dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0)); } -@@ -628,6 +630,16 @@ +@@ -628,6 +631,24 @@ else //=> BaseFolderPair groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); break; @@ -32,11 +35,19 @@ diff -aur 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad2/FreeFileSync/ + } + else //=> BaseFolderPair + groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); ++ break; ++ case ItemPathFormat::tradrel: ++ if (pdi.folderGroupObj) ++ { ++ groupName = utfTo(pdi.folderGroupObj ->template getItemName ()); ++ groupParentFolder = utfTo(pdi.folderGroupObj->parent().template getRelativePath()) + \ ++ utfTo(pdi.folderGroupObj ->template getItemName()); ++ } + break; } //path components should follow the app layout direction and are NOT a single piece of text! -@@ -655,6 +667,29 @@ +@@ -655,6 +676,31 @@ int widthGroupName = groupName .empty() ? 0 : (iconSize + gridGap_ + getTextExtentBuffered(dc, groupName).x + 2 * gridGap_); int widthGroupItems = widthGroupSep + (drawFileIcons ? iconSize + gridGap_ : 0) + groupItemNamesWidth; @@ -49,10 +60,12 @@ diff -aur 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad2/FreeFileSync/ + switch (itemPathFormat_) + { + case ItemPathFormat::traditional: ++ case ItemPathFormat::tradrel: + widthGroupParent -= widthGroupName - getTextExtentBuffered(dc, utfTo(FILE_NAME_SEPARATOR)).x; + + if (!endsWith(groupParentFolder, L'/' ) && //e.g. ftp://server/ -+ !endsWith(groupParentFolder, L'\\')) /*e.g. C:\ */ ++ !endsWith(groupParentFolder, L'\\') && /*e.g. C:\ */ ++ groupParentFolder.size() > 0 ) + groupParentFolder += groupParentSep; + break; + case ItemPathFormat::name: @@ -66,7 +79,7 @@ diff -aur 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad2/FreeFileSync/ //not enough space? => collapse if (int excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; excessWidth > 0) -@@ -664,10 +699,6 @@ +@@ -664,10 +710,6 @@ //1. render group components on two rows stackedGroupRender = true; @@ -77,7 +90,7 @@ diff -aur 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad2/FreeFileSync/ if (!endsWith(groupParentFolder, L'/' ) && //e.g. ftp://server/ !endsWith(groupParentFolder, L'\\')) /*e.g. C:\ */ groupParentFolder += groupParentSep; -@@ -725,6 +756,11 @@ +@@ -725,6 +767,11 @@ } } @@ -89,114 +102,129 @@ diff -aur 11.2-1/FreeFileSync/Source/ui/file_grid.cpp 11.2-1-trad2/FreeFileSync/ return { itemName, -@@ -793,6 +829,9 @@ +@@ -793,6 +840,9 @@ rectGroup = rectGroupParent = rectGroupName = rectTmp; rectGroupParent.width = widthGroupParent; + // re-add back the width of groupname so that the directory name is clickable -+ if (itemPathFormat_ == ItemPathFormat::traditional) ++ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) + rectGroupParent.width += widthGroupName; rectGroupName .width = widthGroupName; if (stackedGroupRender) -@@ -829,7 +868,8 @@ +@@ -829,7 +879,8 @@ if (row == pdi.groupLastRow - 1 /*last group item*/) //restore the group separation line we just cleared { wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), fastFromDIP(1))); - dc.DrawLine(rectGroup.GetBottomLeft(), rectGroup.GetBottomRight() + wxPoint(1, 0)); -+ if (itemPathFormat_ != ItemPathFormat::traditional) ++ if (itemPathFormat_ != ItemPathFormat::traditional && itemPathFormat_ != ItemPathFormat::tradrel) + dc.DrawLine(rectGroup.GetBottomLeft(), rectGroup.GetBottomRight() + wxPoint(1, 0)); } } -@@ -844,7 +884,7 @@ +@@ -844,7 +895,7 @@ dc.GradientFillLinear(rectNav, getColorSelectionGradientFrom(), backCol, wxEAST); } - if (!groupName.empty() && row == groupFirstRow) -+ if (!(itemPathFormat_ == ItemPathFormat::traditional) && !groupName.empty() && row == groupFirstRow) ++ if (!(itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) && !groupName.empty() && row == groupFirstRow) { wxDCTextColourChanger textColorGroupName(dc); if (static_cast(rowHover) == HoverAreaGroup::groupName) -@@ -865,9 +905,9 @@ +@@ -865,9 +916,9 @@ drawCellText(dc, rectGroupName, groupName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupName)); } - if (!groupParentFolder.empty() && -+ if (itemPathFormat_ == ItemPathFormat::traditional || (!groupParentFolder.empty() && ++ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel || (!groupParentFolder.empty() && (( stackedGroupRender && row == groupFirstRow + 1) || - (!stackedGroupRender && row == groupFirstRow))) + (!stackedGroupRender && row == groupFirstRow)))) { drawCellText(dc, rectGroupParent, groupParentFolder, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupParentFolder)); } -@@ -876,7 +916,8 @@ +@@ -876,7 +927,8 @@ if (!groupParentFolder.empty() || !groupName.empty()) { wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), fastFromDIP(1))); - dc.DrawLine(rectGroupItems.GetTopLeft(), rectGroupItems.GetBottomLeft() + wxPoint(0, 1)); //draws half-open range! -+ if (itemPathFormat_ != ItemPathFormat::traditional) ++ if (itemPathFormat_ != ItemPathFormat::traditional && itemPathFormat_ != ItemPathFormat::tradrel) + dc.DrawLine(rectGroupItems.GetTopLeft(), rectGroupItems.GetBottomLeft() + wxPoint(0, 1)); //draws half-open range! rectGroupItems.x += fastFromDIP(1) + gridGap_; rectGroupItems.width -= fastFromDIP(1) + gridGap_; } -@@ -1040,6 +1081,8 @@ +@@ -1040,6 +1092,10 @@ return _("Relative path"); case ItemPathFormat::full: return _("Full path"); + case ItemPathFormat::traditional: + return _("Traditional"); ++ case ItemPathFormat::tradrel: ++ return _("Trad. relative"); } assert(false); break; -diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_grid_attr.h 11.2-1-trad1/FreeFileSync/Source/ui/file_grid_attr.h ---- 11.2-2/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 14:39:05.313463564 -0400 -+++ 11.2-1-trad1/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 15:28:20.378038432 -0400 -@@ -79,6 +79,7 @@ +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/file_grid_attr.h 11.2-1-trad3/FreeFileSync/Source/ui/file_grid_attr.h +--- 11.2-1/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 14:39:05.313463564 -0400 ++++ 11.2-1-trad3/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 20:21:48.863111642 -0400 +@@ -79,6 +79,8 @@ name, relative, full, + traditional, ++ tradrel, }; const ItemPathFormat defaultItemPathFormatLeftGrid = ItemPathFormat::relative; -diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/main_dlg.cpp 11.2-1-trad1/FreeFileSync/Source/ui/main_dlg.cpp ---- 11.2-2/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 18:54:21.781435371 -0400 -+++ 11.2-1-trad1/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 15:28:20.382038482 -0400 -@@ -2710,6 +2710,7 @@ +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/main_dlg.cpp 11.2-1-trad3/FreeFileSync/Source/ui/main_dlg.cpp +--- 11.2-1/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 20:49:11.487782099 -0400 ++++ 11.2-1-trad3/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 20:22:02.191278722 -0400 +@@ -2710,6 +2710,8 @@ addFormatEntry(_("Item name" ), ItemPathFormat::name); addFormatEntry(_("Relative path"), ItemPathFormat::relative); addFormatEntry(_("Full path" ), ItemPathFormat::full); + addFormatEntry(_("Traditional" ), ItemPathFormat::traditional); ++ addFormatEntry(_("Trad. relative"),ItemPathFormat::tradrel); //---------------------------------------------------------------------------------------------- menu.addSeparator(); -diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/config.cpp 11.2-1-trad1/FreeFileSync/Source/config.cpp ---- 11.2-2/FreeFileSync/Source/config.cpp 2020-10-02 14:39:05.233462578 -0400 -+++ 11.2-1-trad1/FreeFileSync/Source/config.cpp 2020-10-02 15:28:20.382038482 -0400 -@@ -528,6 +528,9 @@ +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/config.cpp 11.2-1-trad3/FreeFileSync/Source/config.cpp +--- 11.2-1/FreeFileSync/Source/config.cpp 2020-10-02 14:39:05.233462578 -0400 ++++ 11.2-1-trad3/FreeFileSync/Source/config.cpp 2020-10-02 20:22:24.275555557 -0400 +@@ -528,6 +528,12 @@ case ItemPathFormat::full: output = "Full"; break; + case ItemPathFormat::traditional: + output = "Traditional"; ++ break; ++ case ItemPathFormat::tradrel: ++ output = "Trad. relative"; + break; } } -@@ -541,6 +544,8 @@ +@@ -541,6 +547,10 @@ value = ItemPathFormat::relative; else if (tmp == "Full") value = ItemPathFormat::full; + else if (tmp == "Traditional") + value = ItemPathFormat::traditional; ++ else if (tmp == "Trad. relative") ++ value = ItemPathFormat::tradrel; else return false; return true; -diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_view.cpp 11.2-1-trad1/FreeFileSync/Source/ui/file_view.cpp ---- 11.2-2/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 14:39:05.305463465 -0400 -+++ 11.2-1-trad1/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 15:28:20.386038532 -0400 -@@ -803,6 +803,7 @@ +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/file_view.cpp 11.2-1-trad3/FreeFileSync/Source/ui/file_view.cpp +--- 11.2-1/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 14:39:05.305463465 -0400 ++++ 11.2-1-trad3/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 20:22:38.439733112 -0400 +@@ -798,11 +798,13 @@ + break; + + case ItemPathFormat::relative: ++ case ItemPathFormat::tradrel: + if ( ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder(folderPairs_)); + else if (!ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder(folderPairs_)); break; case ItemPathFormat::full: @@ -204,3 +232,4 @@ diff -x '.git*' -x '*.rej' -x '*.orig' -aur 11.2-2/FreeFileSync/Source/ui/file_v if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); + -- cgit From dd523e02858204a3d85fd3abfc5d2f12409ddd37 Mon Sep 17 00:00:00 2001 From: B Stack Date: Sat, 3 Oct 2020 10:12:37 -0400 Subject: update dsc for 11.2 --- freefilesync/debian/freefilesync+devuan.dsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'freefilesync/debian') diff --git a/freefilesync/debian/freefilesync+devuan.dsc b/freefilesync/debian/freefilesync+devuan.dsc index e6a707d..e5cae56 100644 --- a/freefilesync/debian/freefilesync+devuan.dsc +++ b/freefilesync/debian/freefilesync+devuan.dsc @@ -2,7 +2,7 @@ Format: 3.0 (quilt) Source: freefilesync Binary: freefilesync Architecture: any -Version: 11.1-2+devuan +Version: 11.2-1+devuan Maintainer: B Stack Homepage: https://freefilesync.org/ Standards-Version: 4.1.4 -- cgit