diff options
Diffstat (limited to 'freefilesync/debian/patches')
-rw-r--r-- | freefilesync/debian/patches/ffs_traditional_view.patch | 219 |
1 files changed, 50 insertions, 169 deletions
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<std::wstring>(fsObj->getRelativePath<side>()); case ItemPathFormat::full: @@ -10,7 +9,7 @@ index 4ee72b97..d9b9a4c7 100644 return AFS::getDisplayPath(fsObj->getAbstractPath<side>()); } assert(false); -@@ -615,6 +616,16 @@ private: +@@ -628,6 +629,16 @@ else //=> BaseFolderPair groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath<side>()); break; @@ -25,77 +24,15 @@ index 4ee72b97..d9b9a4c7 100644 + groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath<side>()); + 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<HoverAreaGroup>(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: |