Skip to content

Commit

Permalink
Version 13.4 (2024-02-16)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkneptune committed Mar 2, 2024
1 parent a106273 commit fdbcfd1
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 53 deletions.
10 changes: 10 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
FreeFileSync 13.4 [2024-02-16]
------------------------------
Ignore leading/trailing space when matching file names
Work around wxWidgets system logger clearing error code
Fixed registration info not found after App Translocation (macOS)
Avoid modal dialog hang on KDE when compiling with GTK3
Change app location without losing Donation Edition status (macOS)


FreeFileSync 13.3 [2024-01-07]
------------------------------
Completed CASA security assessment for Google Drive
Use system temp folder for auto-updating
Ignore errors when setting directory attributes is unsupported
Save GUI sync log file even when cancelled
Fixed Business Edition install over existing installation
Updated code signing certificates (Windows)


FreeFileSync 13.2 [2023-11-23]
Expand Down
20 changes: 11 additions & 9 deletions FreeFileSync/Source/base/comparison.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,19 +776,21 @@ void matchFolders(const MapType& mapLeft, const MapType& mapRight, ProcessLeftOn
{
struct FileRef
{
//perf: buffer ZstringNoCase instead of compareNoCase()/equalNoCase()? => makes no (significant) difference!
Zstring canonicalName; //perf: buffer instead of compareNoCase()/equalNoCase()? => makes no (significant) difference!
const typename MapType::value_type* ref;
SelectSide side;
};
std::vector<FileRef> fileList;
fileList.reserve(mapLeft.size() + mapRight.size()); //perf: ~5% shorter runtime

for (const auto& item : mapLeft ) fileList.push_back({&item, SelectSide::left});
for (const auto& item : mapRight) fileList.push_back({&item, SelectSide::right});
auto getCanonicalName = [](const Zstring& name){ return trimCpy(getUpperCase(name)); };

for (const auto& item : mapLeft ) fileList.push_back({getCanonicalName(item.first), &item, SelectSide::left});
for (const auto& item : mapRight) fileList.push_back({getCanonicalName(item.first), &item, SelectSide::right});

//primary sort: ignore Unicode normal form and upper/lower case
//primary sort: ignore upper/lower case, leading/trailing space, Unicode normal form
//bonus: natural default sequence on UI file grid
std::sort(fileList.begin(), fileList.end(), [](const FileRef& lhs, const FileRef& rhs) { return compareNoCase(lhs.ref->first /*item name*/, rhs.ref->first) < 0; });
std::sort(fileList.begin(), fileList.end(), [](const FileRef& lhs, const FileRef& rhs) { return lhs.canonicalName < rhs.canonicalName; });

using ItType = typename std::vector<FileRef>::iterator;
auto tryMatchRange = [&](ItType it, ItType itLast) //auto parameters? compiler error on VS 17.2...
Expand All @@ -814,16 +816,16 @@ void matchFolders(const MapType& mapLeft, const MapType& mapRight, ProcessLeftOn

for (auto it = fileList.begin(); it != fileList.end();)
{
//find equal range: ignore case, ignore Unicode normalization
auto itEndEq = std::find_if(it + 1, fileList.end(), [&](const FileRef& fr) { return !equalNoCase(fr.ref->first, it->ref->first); });
//find equal range: ignore upper/lower case, leading/trailing space, Unicode normal form
auto itEndEq = std::find_if(it + 1, fileList.end(), [&](const FileRef& fr) { return fr.canonicalName != it->canonicalName; });
if (!tryMatchRange(it, itEndEq))
{
//secondary sort: respect case, ignore unicode normal forms
//secondary sort: respect case, ignore Unicode normal forms
std::sort(it, itEndEq, [](const FileRef& lhs, const FileRef& rhs) { return getUnicodeNormalForm(lhs.ref->first) < getUnicodeNormalForm(rhs.ref->first); });

for (auto itCase = it; itCase != itEndEq;)
{
//find equal range: respect case, ignore Unicode normalization
//find equal range: respect case, ignore Unicode normal forms
auto itEndCase = std::find_if(itCase + 1, itEndEq, [&](const FileRef& fr) { return getUnicodeNormalForm(fr.ref->first) != getUnicodeNormalForm(itCase->ref->first); });
if (!tryMatchRange(itCase, itEndCase))
{
Expand Down
30 changes: 15 additions & 15 deletions FreeFileSync/Source/base/structures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ std::wstring fff::getSymbol(CompareFileResult cmpRes)
switch (cmpRes)
{
//*INDENT-OFF*
case FILE_EQUAL: return L"'=="; //added quotation mark to avoid error in Excel cell when exporting to *.cvs
case FILE_EQUAL: return L"'="; //added quotation mark to avoid error in Excel cell when exporting to *.cvs
case FILE_RENAMED: return L"renamed";
case FILE_LEFT_ONLY: return L"only <-";
case FILE_RIGHT_ONLY: return L"only ->";
Expand All @@ -252,20 +252,20 @@ std::wstring fff::getSymbol(SyncOperation op)
switch (op)
{
//*INDENT-OFF*
case SO_CREATE_LEFT: return L"create <-";
case SO_CREATE_RIGHT: return L"create ->";
case SO_DELETE_LEFT: return L"delete <-";
case SO_DELETE_RIGHT: return L"delete ->";
case SO_MOVE_LEFT_FROM: return L"move from <-";
case SO_MOVE_LEFT_TO: return L"move to <-";
case SO_MOVE_RIGHT_FROM: return L"move from ->";
case SO_MOVE_RIGHT_TO: return L"move to ->";
case SO_OVERWRITE_LEFT: return L"update <-";
case SO_OVERWRITE_RIGHT: return L"update ->";
case SO_RENAME_LEFT: return L"rename <-";
case SO_RENAME_RIGHT: return L"rename ->";
case SO_DO_NOTHING: return L" -";
case SO_EQUAL: return L"'=="; //added quotation mark to avoid error in Excel cell when exporting to *.cvs
case SO_CREATE_LEFT: return L"create <-";
case SO_CREATE_RIGHT: return L"create ->";
case SO_DELETE_LEFT: return L"delete <-";
case SO_DELETE_RIGHT: return L"delete ->";
case SO_MOVE_LEFT_FROM: return L"move from <-";
case SO_MOVE_LEFT_TO: return L"move to <-";
case SO_MOVE_RIGHT_FROM: return L"move from ->";
case SO_MOVE_RIGHT_TO: return L"move to ->";
case SO_OVERWRITE_LEFT: return L"update <-";
case SO_OVERWRITE_RIGHT: return L"update ->";
case SO_RENAME_LEFT: return L"rename <-";
case SO_RENAME_RIGHT: return L"rename ->";
case SO_DO_NOTHING: return L" -";
case SO_EQUAL: return L"'="; //added quotation mark to avoid error in Excel cell when exporting to *.cvs
case SO_UNRESOLVED_CONFLICT: return L"conflict"; //portable Unicode symbol: ⚡
//*INDENT-ON*
};
Expand Down
2 changes: 1 addition & 1 deletion FreeFileSync/Source/ui/abstract_folder_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ AbstractFolderPickerDlg::AbstractFolderPickerDlg(wxWindow* parent, AbstractPath&
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down
2 changes: 1 addition & 1 deletion FreeFileSync/Source/ui/batch_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ BatchDialog::BatchDialog(wxWindow* parent, BatchDialogConfig& dlgCfg) :
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down
6 changes: 3 additions & 3 deletions FreeFileSync/Source/ui/file_grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1585,14 +1585,14 @@ class GridDataCenter : public GridDataBase
case ColumnTypeCenter::checkbox:
break;
case ColumnTypeCenter::difference:
return _("Difference") + L" (F11)";
return _("Difference");
case ColumnTypeCenter::action:
return _("Action") + L" (F11)";
return _("Action");
}
return std::wstring();
}

std::wstring getToolTip(ColumnType colType) const override { return getColumnLabel(colType); }
std::wstring getToolTip(ColumnType colType) const override { return getColumnLabel(colType) + L" (F11)"; }

void renderColumnLabel(wxDC& dc, const wxRect& rect, ColumnType colType, bool enabled, bool highlighted) override
{
Expand Down
2 changes: 1 addition & 1 deletion FreeFileSync/Source/ui/file_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FileView //grid view of FolderComparison
{
public:
FileView() {}
explicit FileView(FolderComparison& folderCmp); //takes (shared) ownership
explicit FileView(FolderComparison& folderCmp); //takes weak (non-owning) references

size_t rowsOnView() const { return viewRef_ .size(); } //only visible elements
size_t rowsTotal () const { return sortedRef_.size(); } //total rows available
Expand Down
6 changes: 3 additions & 3 deletions FreeFileSync/Source/ui/progress_indicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ CompareProgressPanel::Impl::Impl(wxFrame& parentWindow) :

GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
}

Expand Down Expand Up @@ -924,7 +924,7 @@ syncStat_(&syncStat)
this->GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
this->Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
this->Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
pnl_.Layout();
this->Center(); //call *after* dialog layout update and *before* wxWindow::Show()!
Expand Down
2 changes: 1 addition & 1 deletion FreeFileSync/Source/ui/rename_dlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ RenameDialog::RenameDialog(wxWindow* parent,
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down
28 changes: 14 additions & 14 deletions FreeFileSync/Source/ui/small_dlgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif

{
Expand All @@ -168,7 +168,7 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -406,7 +406,7 @@ CloudSetupDlg::CloudSetupDlg(wxWindow* parent, Zstring& folderPathPhrase, Zstrin
//=> works like a charm for GTK with window resizing problems and title bar corruption; e.g. Debian!!!
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -973,7 +973,7 @@ CopyToDialog::CopyToDialog(wxWindow* parent,
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -1090,7 +1090,7 @@ DeleteDialog::DeleteDialog(wxWindow* parent,
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -1233,7 +1233,7 @@ SyncConfirmationDlg::SyncConfirmationDlg(wxWindow* parent,
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -1500,7 +1500,7 @@ OptionsDlg::OptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg) :
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -1823,7 +1823,7 @@ SelectTimespanDlg::SelectTimespanDlg(wxWindow* parent, time_t& timeFrom, time_t&
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -1922,7 +1922,7 @@ PasswordPromptDlg::PasswordPromptDlg(wxWindow* parent, const std::wstring& msg,
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -2008,7 +2008,7 @@ CfgHighlightDlg::CfgHighlightDlg(wxWindow* parent, int& cfgHistSyncOverdueDays)
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -2064,8 +2064,8 @@ ActivationDlg::ActivationDlg(wxWindow* parent,

//setMainInstructionFont(*m_staticTextMain);

m_richTextLastError ->SetMinSize({-1, m_richTextLastError ->GetCharHeight() * 8});
m_richTextManualActivationUrl->SetMinSize({-1, m_richTextManualActivationUrl->GetCharHeight() * 4});
m_richTextLastError ->SetMinSize({-1, m_richTextLastError ->GetCharHeight() * 8});
m_richTextManualActivationUrl ->SetMinSize({-1, m_richTextManualActivationUrl->GetCharHeight() * 4});
m_textCtrlOfflineActivationKey->SetMinSize({dipToWxsize(260), -1});

setImage(*m_bitmapActivation, loadImage("internet"));
Expand All @@ -2079,7 +2079,7 @@ ActivationDlg::ActivationDlg(wxWindow* parent,
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down Expand Up @@ -2187,7 +2187,7 @@ DownloadProgressWindow::Impl::Impl(wxWindow* parent, int64_t fileSizeTotal) :
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down
2 changes: 1 addition & 1 deletion FreeFileSync/Source/ui/sync_cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ globalLogFolderPhrase_(globalLogFolderPhrase)
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
Hide(); //avoid old position flash when Center() moves window (asynchronously?)
//Hide(); -> avoids old position flash before Center() on GNOME but causes hang on KDE? https://freefilesync.org/forum/viewtopic.php?t=10103#p42404
#endif
Center(); //needs to be re-applied after a dialog size change!

Expand Down
2 changes: 1 addition & 1 deletion FreeFileSync/Source/ui/version_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ void fff::automaticUpdateCheckEval(wxWindow& parent, time_t& lastUpdateCheck, st
{
lastUpdateCheck = getVersionCheckCurrentTime();

if (lastOnlineVersion != result.onlineVersion) //show new version popup only *once*
if (lastOnlineVersion != result.onlineVersion) //show new version popup only *once* per new release
{
lastOnlineVersion = result.onlineVersion;

Expand Down
2 changes: 1 addition & 1 deletion FreeFileSync/Source/version/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace fff
{
const char ffsVersion[] = "13.3"; //internal linkage!
const char ffsVersion[] = "13.4"; //internal linkage!
const char FFS_VERSION_SEPARATOR = '.';
}

Expand Down
Loading

0 comments on commit fdbcfd1

Please sign in to comment.