summaryrefslogtreecommitdiff
path: root/freefilesync/debian/patches/ffs_no_check_updates.patch
diff options
context:
space:
mode:
Diffstat (limited to 'freefilesync/debian/patches/ffs_no_check_updates.patch')
-rw-r--r--freefilesync/debian/patches/ffs_no_check_updates.patch187
1 files changed, 88 insertions, 99 deletions
diff --git a/freefilesync/debian/patches/ffs_no_check_updates.patch b/freefilesync/debian/patches/ffs_no_check_updates.patch
index c540560..26180ff 100644
--- a/freefilesync/debian/patches/ffs_no_check_updates.patch
+++ b/freefilesync/debian/patches/ffs_no_check_updates.patch
@@ -1,121 +1,104 @@
-Version: 11.27
-Date: 2022-10-19
+Version: 13.0
+Date: 2023-09-13
Author: bgstack15
Message: This is a major rewrite of the ffs_no_check_updates patch from before 11.10 which disabled only a few technical www interactions. This current version completely deletes all logic associated with checking the version of the program.
+--- a/FreeFileSync/Source/Makefile
++++ b/FreeFileSync/Source/Makefile
+@@ -80,7 +80,6 @@ cppFiles+=ui/small_dlgs.cpp
+ cppFiles+=ui/sync_cfg.cpp
+ cppFiles+=ui/tray_icon.cpp
+ cppFiles+=ui/triple_splitter.cpp
+-cppFiles+=ui/version_check.cpp
+ cppFiles+=../../libcurl/curl_wrap.cpp
+ cppFiles+=../../zen/argon2.cpp
+ cppFiles+=../../zen/file_access.cpp
--- a/FreeFileSync/Source/ui/gui_generated.cpp
+++ b/FreeFileSync/Source/ui/gui_generated.cpp
-@@ -110,15 +110,6 @@
+@@ -110,11 +110,6 @@ MainDialogGenerated::MainDialogGenerated
m_menuHelp->AppendSeparator();
- m_menuItemCheckVersionNow = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for updates now") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemCheckVersionNow );
-
-- m_menuItemCheckVersionAuto = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("Check &automatically once a week") ) , wxEmptyString, wxITEM_CHECK );
-- m_menuHelp->Append( m_menuItemCheckVersionAuto );
-- m_menuItemCheckVersionAuto->Check( true );
--
- m_menuHelp->AppendSeparator();
-
m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL );
m_menuHelp->Append( m_menuItemAbout );
-@@ -1129,8 +1120,6 @@
+@@ -1119,7 +1114,6 @@ MainDialogGenerated::MainDialogGenerated
m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuExportFileList ), this, m_menuItemExportList->GetId());
m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuResetLayout ), this, m_menuItemResetLayout->GetId());
m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onShowHelp ), this, m_menuItemHelp->GetId());
- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuCheckVersion ), this, m_menuItemCheckVersionNow->GetId());
-- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuCheckVersionAutomatically ), this, m_menuItemCheckVersionAuto->GetId());
m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuAbout ), this, m_menuItemAbout->GetId());
m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onCompare ), NULL, this );
m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onCmpSettings ), NULL, this );
--- a/FreeFileSync/Source/ui/gui_generated.h
+++ b/FreeFileSync/Source/ui/gui_generated.h
-@@ -96,8 +96,6 @@
+@@ -96,7 +96,6 @@ class MainDialogGenerated : public wxFra
wxMenuItem* m_menuItemShowOverview;
wxMenu* m_menuHelp;
wxMenuItem* m_menuItemHelp;
- wxMenuItem* m_menuItemCheckVersionNow;
-- wxMenuItem* m_menuItemCheckVersionAuto;
wxMenuItem* m_menuItemAbout;
wxBoxSizer* bSizerPanelHolder;
wxPanel* m_panelTopButtons;
-@@ -234,8 +232,6 @@
+@@ -233,7 +232,6 @@ class MainDialogGenerated : public wxFra
virtual void onMenuExportFileList( wxCommandEvent& event ) { event.Skip(); }
virtual void onMenuResetLayout( wxCommandEvent& event ) { event.Skip(); }
virtual void onShowHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void onMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); }
-- virtual void onMenuCheckVersionAutomatically( wxCommandEvent& event ) { event.Skip(); }
virtual void onMenuAbout( wxCommandEvent& event ) { event.Skip(); }
virtual void onCompSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); }
virtual void onCompSettingsContext( wxCommandEvent& event ) { event.Skip(); }
--- a/FreeFileSync/Source/ui/main_dlg.cpp
+++ b/FreeFileSync/Source/ui/main_dlg.cpp
-@@ -30,7 +30,6 @@
+@@ -32,7 +32,6 @@
#include <wx+/window_tools.h>
#include <wx+/image_resources.h>
#include "cfg_grid.h"
-#include "version_check.h"
#include "gui_status_handler.h"
#include "small_dlgs.h"
- #include "progress_indicator.h"
-@@ -826,7 +825,6 @@ imgFileManagerSmall_([]
+ #include "rename_dlg.h"
+@@ -477,7 +476,7 @@ void MainDialog::create(const Zstring& g
- setImage(*m_menuItemHelp, loadImage("help_sicon"));
- setImage(*m_menuItemAbout, loadImage("about_sicon"));
-- setImage(*m_menuItemCheckVersionNow, loadImage("update_check_sicon"));
+ //showAboutDialog(mainDlg); => dialog centered incorrectly (Centos)
+ //mainDlg->CallAfter([mainDlg] { showAboutDialog(mainDlg); }); => dialog centered incorrectly (Windows, Centos)
+- mainDlg->guiQueue_.processAsync([] {}, [mainDlg]() { showAboutDialog(mainDlg); }); //apparently oh-kay?
++ //mainDlg->guiQueue_.processAsync([] {}, [mainDlg]() { showAboutDialog(mainDlg); }); //apparently oh-kay?
+ }
+
+
+@@ -871,7 +870,6 @@ imgFileManagerSmall_([]
+
+ setImage(*m_menuItemHelp, loadImage("help", dipToScreen(getMenuIconDipSize())));
+ setImage(*m_menuItemAbout, loadImage("about", dipToScreen(getMenuIconDipSize())));
+- setImage(*m_menuItemCheckVersionNow, loadImage("update_check", dipToScreen(getMenuIconDipSize())));
fixMenuIcons(*m_menuFile);
fixMenuIcons(*m_menuActions);
-@@ -927,9 +925,6 @@ imgFileManagerSmall_([]
+@@ -971,9 +969,6 @@ imgFileManagerSmall_([]
//mainly to update row label sizes...
updateGui();
- //register regular check for update on next idle event
- Bind(wxEVT_IDLE, &MainDialog::onStartupUpdateCheck, this);
-
- //asynchronous call to wxWindow::Layout(): fix superfluous frame on right and bottom when FFS is started in fullscreen mode
+ //asynchronous call to wxWindow::Dimensions(): fix superfluous frame on right and bottom when FFS is started in fullscreen mode
Bind(wxEVT_IDLE, &MainDialog::onLayoutWindowAsync, this);
wxCommandEvent evtDummy; //call once before onLayoutWindowAsync()
-@@ -1123,8 +1118,6 @@ void MainDialog::setGlobalCfgOnInit(cons
- auiMgr_.GetPane(m_panelSearch).Hide(); //no need to show it on startup
- auiMgr_.GetPane(m_panelLog ).Hide(); //
-
-- m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.lastUpdateCheck));
--
- auiMgr_.Update();
+@@ -6271,56 +6266,6 @@ void MainDialog::onMenuExportFileList(wx
}
-@@ -5746,72 +5739,6 @@ void MainDialog::onMenuExportFileList(wx
- }
- }
--
-void MainDialog::onMenuCheckVersion(wxCommandEvent& event)
-{
- checkForUpdateNow(*this, globalCfg_.lastOnlineVersion);
-}
-
-
--void MainDialog::onMenuCheckVersionAutomatically(wxCommandEvent& event)
--{
-- if (updateCheckActive(globalCfg_.lastUpdateCheck))
-- disableUpdateCheck(globalCfg_.lastUpdateCheck);
-- else
-- globalCfg_.lastUpdateCheck = 0; //reset to GlobalSettings.xml default value!
--
-- m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.lastUpdateCheck));
--
-- if (shouldRunAutomaticUpdateCheck(globalCfg_.lastUpdateCheck))
-- {
-- flashStatusInfo(_("Searching for program updates..."));
-- //synchronous update check is sufficient here:
-- automaticUpdateCheckEval(*this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion,
-- automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare(*this).get()).get());
-- }
--}
--
--
-void MainDialog::onStartupUpdateCheck(wxIdleEvent& event)
-{
- //execute just once per startup!
@@ -124,12 +107,12 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
-
- auto showNewVersionReminder = [this]
- {
-- if (!globalCfg_.lastOnlineVersion.empty() && haveNewerVersionOnline(globalCfg_.lastOnlineVersion))
+- if (haveNewerVersionOnline(globalCfg_.lastOnlineVersion))
- {
- auto menu = new wxMenu();
- wxMenuItem* newItem = new wxMenuItem(menu, wxID_ANY, _("&Show details"));
- Bind(wxEVT_COMMAND_MENU_SELECTED, [this](wxCommandEvent&) { checkForUpdateNow(*this, globalCfg_.lastOnlineVersion); }, newItem->GetId());
-- //show changelog + handle Donation Edition auto-updater (including expiration)
+- //show changelog + handle Supporter Edition auto-updater (including expiration)
- menu->Append(newItem); //pass ownership
-
- const std::wstring& blackStar = utfTo<std::wstring>("★");
@@ -137,18 +120,22 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
- }
- };
-
-- if (shouldRunAutomaticUpdateCheck(globalCfg_.lastUpdateCheck))
+- if (automaticUpdateCheckDue(globalCfg_.lastUpdateCheck))
- {
- flashStatusInfo(_("Searching for program updates..."));
-
-- std::shared_ptr<const UpdateCheckResultPrep> resultPrep = automaticUpdateCheckPrepare(*this); //run on main thread:
--
-- guiQueue_.processAsync([resultPrep] { return automaticUpdateCheckRunAsync(resultPrep.get()); }, //run on worker thread: (long-running part of the check)
-- [this, showNewVersionReminder] (std::shared_ptr<const UpdateCheckResult>&& resultAsync)
+- guiQueue_.processAsync([resultPrep = automaticUpdateCheckPrepare(*this) /*prepare on main thread*/]
+- { return automaticUpdateCheckRunAsync(resultPrep.ref()); }, //run on worker thread: (long-running part of the check)
+- [this, showNewVersionReminder] (SharedRef<const UpdateCheckResult>&& resultAsync)
- {
+- const time_t lastUpdateCheckOld = globalCfg_.lastUpdateCheck;
+-
- automaticUpdateCheckEval(*this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion,
-- resultAsync.get()); //run on main thread:
+- resultAsync.ref()); //run on main thread:
- showNewVersionReminder();
+-
+- if (globalCfg_.lastUpdateCheck == lastUpdateCheckOld)
+- flashStatusInfo(_("Update check failed!"));
- });
- }
- else
@@ -161,27 +148,41 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
//execute just once per startup!
--- a/FreeFileSync/Source/ui/main_dlg.h
+++ b/FreeFileSync/Source/ui/main_dlg.h
-@@ -273,8 +273,6 @@ private:
+@@ -272,7 +272,6 @@ private:
void onMenuExportFileList (wxCommandEvent& event) override;
void onMenuResetLayout (wxCommandEvent& event) override { resetLayout(); }
void onMenuFindItem (wxCommandEvent& event) override { showFindPanel(true /*show*/); } //CTRL + F
- void onMenuCheckVersion (wxCommandEvent& event) override;
-- void onMenuCheckVersionAutomatically(wxCommandEvent& event) override;
void onMenuAbout (wxCommandEvent& event) override;
void onShowHelp (wxCommandEvent& event) override { wxLaunchDefaultBrowser(L"https://freefilesync.org/manual.php?topic=freefilesync"); }
void onMenuQuit (wxCommandEvent& event) override { Close(); }
---- 11.25-0/FreeFileSync/Source/ui/version_check.cpp 2022-09-07 14:54:31.556630130 -0400
-+++ 11.25-1/FreeFileSync/Source/ui/version_check.cpp 2022-09-07 15:24:11.648682649 -0400
-@@ -79,6 +79,8 @@
+--- a/FreeFileSync/Source/ui/small_dlgs.cpp
++++ b/FreeFileSync/Source/ui/small_dlgs.cpp
+@@ -26,7 +26,6 @@
+ #include <wx+/image_resources.h>
+ #include "gui_generated.h"
+ #include "folder_selector.h"
+-#include "version_check.h"
+ #include "abstract_folder_picker.h"
+ #include "../afs/concrete.h"
+ #include "../afs/gdrive.h"
+--- a/FreeFileSync/Source/ui/version_check.cpp
++++ b/FreeFileSync/Source/ui/version_check.cpp
+@@ -44,13 +44,6 @@ void openBrowserForDownload(wxWindow* pa
+ }
- bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck)
- {
-+ // short-circuit
-+ return false;
- if (lastUpdateCheck == getVersionCheckInactiveId())
- return false;
-@@ -175,8 +174,7 @@
+-bool fff::automaticUpdateCheckDue(time_t lastUpdateCheck)
+-{
+- const time_t now = std::time(nullptr);
+- return numeric::dist(now, lastUpdateCheck) >= 7 * 24 * 3600; //check weekly
+-}
+-
+-
+ namespace
+ {
+ std::wstring getIso639Language()
+@@ -139,8 +132,7 @@ void showUpdateAvailableDialog(wxWindow*
std::wstring updateDetailsMsg;
try
{
@@ -191,7 +192,7 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
}
catch (const SysError& e) { updateDetailsMsg = _("Failed to retrieve update information.") + + L"\n\n" + e.toString(); }
-@@ -198,8 +196,8 @@
+@@ -162,8 +154,8 @@ void showUpdateAvailableDialog(wxWindow*
std::string getOnlineVersion(const std::vector<std::pair<std::string, std::string>>& postParams) //throw SysError
{
@@ -202,7 +203,7 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
if (response.empty() ||
!std::all_of(response.begin(), response.end(), [](char c) { return isDigit(c) || c == FFS_VERSION_SEPARATOR; }) ||
-@@ -239,58 +240,6 @@
+@@ -204,58 +196,6 @@ bool fff::haveNewerVersionOnline(const s
}
@@ -210,7 +211,7 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
-{
- try
- {
-- const std::string onlineVersion = getOnlineVersion(geHttpPostParameters(parent)); //throw SysError
+- const std::string onlineVersion = getOnlineVersion(geHttpPostParameters()); //throw SysError
- lastOnlineVersion = onlineVersion;
-
- if (haveNewerVersionOnline(onlineVersion))
@@ -219,13 +220,13 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
- showNotificationDialog(&parent, DialogInfoType::info, PopupDialogCfg().
- setIcon(loadImage("update_check")).
- setTitle(_("Check for Program Updates")).
-- setMainInstructions(_("FreeFileSync is up to date.")));
+- setMainInstructions(_("FreeFileSync is up-to-date.")));
- }
- catch (const SysError& e)
- {
- if (internetIsAlive())
- {
-- lastOnlineVersion = "Unknown";
+- lastOnlineVersion = getUnknownVersionTag();
-
- switch (showConfirmationDialog(&parent, DialogInfoType::error, PopupDialogCfg().
- setTitle(_("Check for Program Updates")).
@@ -263,9 +264,17 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
std::vector<std::pair<std::string, std::string>> postParameters;
--- a/FreeFileSync/Source/ui/version_check.h
+++ b/FreeFileSync/Source/ui/version_check.h
-@@ -32,9 +32,6 @@ std::shared_ptr<const UpdateCheckResult>
- void automaticUpdateCheckEval(wxWindow& parent, time_t& lastUpdateCheck, std::string& lastOnlineVersion,
- const UpdateCheckResult* asyncResult);
+@@ -15,7 +15,6 @@ namespace fff
+ {
+ bool haveNewerVersionOnline(const std::string& onlineVersion);
+ //----------------------------------------------------------------------------
+-bool automaticUpdateCheckDue(time_t lastUpdateCheck);
+
+ struct UpdateCheckResultPrep;
+ struct UpdateCheckResult;
+@@ -27,9 +26,6 @@ zen::SharedRef<const UpdateCheckResult>
+ //run on main thread:
+ void automaticUpdateCheckEval(wxWindow& parent, time_t& lastUpdateCheck, std::string& lastOnlineVersion, const UpdateCheckResult& result);
//----------------------------------------------------------------------------
-//call from main thread:
-void checkForUpdateNow(wxWindow& parent, std::string& lastOnlineVersion);
@@ -273,23 +282,3 @@ Message: This is a major rewrite of the ffs_no_check_updates patch from before 1
}
#endif //VERSION_CHECK_H_324872374893274983275
---- a/FreeFileSync/Source/Makefile
-+++ b/FreeFileSync/Source/Makefile
-@@ -77,7 +77,6 @@ cppFiles+=ui/small_dlgs.cpp
- cppFiles+=ui/sync_cfg.cpp
- cppFiles+=ui/tray_icon.cpp
- cppFiles+=ui/triple_splitter.cpp
--cppFiles+=ui/version_check.cpp
- cppFiles+=../../libcurl/curl_wrap.cpp
- cppFiles+=../../zen/file_access.cpp
- cppFiles+=../../zen/file_io.cpp
---- a/FreeFileSync/Source/ui/small_dlgs.cpp
-+++ b/FreeFileSync/Source/ui/small_dlgs.cpp
-@@ -27,7 +27,6 @@
- #include <wx+/image_resources.h>
- #include "gui_generated.h"
- #include "folder_selector.h"
--#include "version_check.h"
- #include "abstract_folder_picker.h"
- #include "../afs/concrete.h"
- #include "../afs/gdrive.h"
bgstack15