summaryrefslogtreecommitdiff
path: root/freefilesync/debian/patches
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-10-02 21:31:03 -0400
committerB Stack <bgstack15@gmail.com>2020-10-02 21:31:03 -0400
commit9b947cb496c93679f65ad42a9be2d2ad1ddf6315 (patch)
tree4dce70d31c0597a40e5cbcc1196dd5693a41b990 /freefilesync/debian/patches
parenttrad view valid for 11.2, and bump dpkg version (diff)
downloadstackrpms-9b947cb496c93679f65ad42a9be2d2ad1ddf6315.tar.gz
stackrpms-9b947cb496c93679f65ad42a9be2d2ad1ddf6315.tar.bz2
stackrpms-9b947cb496c93679f65ad42a9be2d2ad1ddf6315.zip
add trad rel view
Diffstat (limited to 'freefilesync/debian/patches')
-rw-r--r--freefilesync/debian/patches/ffs_traditional_view.patch105
1 files changed, 67 insertions, 38 deletions
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<std::wstring>(fsObj->getItemName<side>());
case ItemPathFormat::relative:
++ case ItemPathFormat::tradrel:
return utfTo<std::wstring>(fsObj->getRelativePath<side>());
case ItemPathFormat::full:
+ case ItemPathFormat::traditional:
return AFS::getDisplayPath(fsObj->getAbstractPath<side>());
}
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<side>());
break;
@@ -33,10 +36,18 @@ 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<side>());
+ break;
++ case ItemPathFormat::tradrel:
++ if (pdi.folderGroupObj)
++ {
++ groupName = utfTo<std::wstring>(pdi.folderGroupObj ->template getItemName <side>());
++ groupParentFolder = utfTo<std::wstring>(pdi.folderGroupObj->parent().template getRelativePath<side>()) + \
++ utfTo<std::wstring>(pdi.folderGroupObj ->template getItemName<side>());
++ }
++ 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<std::wstring>(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<HoverAreaGroup>(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<true >(folderPairs_));
+ else if (!ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder<false>(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<true, LEFT_SIDE>(folderPairs_));
else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<true, RIGHT_SIDE>(folderPairs_));
else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<false, LEFT_SIDE>(folderPairs_));
+
bgstack15