summaryrefslogtreecommitdiff
path: root/freefilesync/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'freefilesync/debian/patches')
-rw-r--r--freefilesync/debian/patches/ffs_traditional_view.patch74
1 files changed, 62 insertions, 12 deletions
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<std::wstring>(fsObj->getRelativePath<side>());
@@ -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<side>());
}
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<side>());
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<std::wstring>(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<HoverAreaGroup>(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");
bgstack15