diff options
Diffstat (limited to 'freefilesync/ffs_no_check_updates.patch')
-rw-r--r-- | freefilesync/ffs_no_check_updates.patch | 126 |
1 files changed, 62 insertions, 64 deletions
diff --git a/freefilesync/ffs_no_check_updates.patch b/freefilesync/ffs_no_check_updates.patch index 6524a1b..9cfc123 100644 --- a/freefilesync/ffs_no_check_updates.patch +++ b/freefilesync/ffs_no_check_updates.patch @@ -1,62 +1,60 @@ -Version: 11.13 -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. -Date: 2021-05-10 +Version: 11.18 +Date: 2022-03-08 Author: bgstack15 -diff -aur 11.10-1/FreeFileSync/Source/ui/gui_generated.cpp 11.12-1/FreeFileSync/Source/ui/gui_generated.cpp ---- 11.13-0/FreeFileSync/Source/ui/gui_generated.cpp 2021-08-17 19:18:02.043992470 -0400 -+++ 11.13-1/FreeFileSync/Source/ui/gui_generated.cpp 2021-08-17 19:29:06.794700840 -0400 -@@ -108,17 +108,6 @@ - m_menuItemHelp = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&View help") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemHelp ); +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. +diff -aur 11.18-0/FreeFileSync/Source/ui/gui_generated.cpp 11.18-1/FreeFileSync/Source/ui/gui_generated.cpp +--- 11.18-0/FreeFileSync/Source/ui/gui_generated.cpp 2022-03-08 16:51:21.090657955 -0500 ++++ 11.18-1/FreeFileSync/Source/ui/gui_generated.cpp 2022-03-08 16:55:57.009584234 -0500 +@@ -110,15 +110,6 @@ -- 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_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_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_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 ); + m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemAbout ); -@@ -1133,8 +1122,6 @@ - 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_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onCmpSettings ), NULL, this ); - m_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onCompSettingsContextMouse ), NULL, this ); -diff -aur 11.10-1/FreeFileSync/Source/ui/gui_generated.h 11.10-2/FreeFileSync/Source/ui/gui_generated.h ---- 11.13-0/FreeFileSync/Source/ui/gui_generated.h 2021-08-17 19:18:02.063992671 -0400 -+++ 11.13-1/FreeFileSync/Source/ui/gui_generated.h 2021-08-17 19:29:21.978854111 -0400 -@@ -93,8 +93,6 @@ - wxMenuItem* m_menuItemShowOverview; - wxMenu* m_menuHelp; - wxMenuItem* m_menuItemHelp; -- wxMenuItem* m_menuItemCheckVersionNow; -- wxMenuItem* m_menuItemCheckVersionAuto; - wxMenuItem* m_menuItemAbout; - wxBoxSizer* bSizerPanelHolder; - wxPanel* m_panelTopButtons; -@@ -229,8 +227,6 @@ - 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(); } +@@ -1131,8 +1122,6 @@ + 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_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onCmpSettings ), NULL, this ); + m_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onCompSettingsContextMouse ), NULL, this ); +diff -aur 11.18-0/FreeFileSync/Source/ui/gui_generated.h 11.18-1/FreeFileSync/Source/ui/gui_generated.h +--- 11.18-0/FreeFileSync/Source/ui/gui_generated.h 2022-03-08 16:51:21.114658209 -0500 ++++ 11.18-1/FreeFileSync/Source/ui/gui_generated.h 2022-03-08 16:56:17.057796860 -0500 +@@ -95,8 +95,6 @@ + wxMenuItem* m_menuItemShowOverview; + wxMenu* m_menuHelp; + wxMenuItem* m_menuItemHelp; +- wxMenuItem* m_menuItemCheckVersionNow; +- wxMenuItem* m_menuItemCheckVersionAuto; + wxMenuItem* m_menuItemAbout; + wxBoxSizer* bSizerPanelHolder; + wxPanel* m_panelTopButtons; +@@ -231,8 +229,6 @@ + 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(); } diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 11.10-2/FreeFileSync/Source/ui/main_dlg.cpp ---- 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 2021-05-10 10:43:26.103497095 -0400 -+++ 11.10-2/FreeFileSync/Source/ui/main_dlg.cpp 2021-05-10 10:52:37.904763378 -0400 -@@ -706,7 +706,6 @@ +--- 11.16-0/FreeFileSync/Source/ui/main_dlg.cpp 2022-01-04 08:52:19.811432573 -0500 ++++ 11.16-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-01-04 08:57:14.506728896 -0500 +@@ -735,7 +735,6 @@ m_menuItemHelp ->SetBitmap(loadImage("help_sicon")); m_menuItemAbout->SetBitmap(loadImage("about_sicon")); @@ -64,7 +62,7 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 11.10-2/FreeFileSync/Sourc auto fixMenuIcons = [](wxMenu& menu) //GTK: image must be set *before* adding wxMenuItem to menu or it won't show { -@@ -825,9 +824,6 @@ +@@ -854,9 +853,6 @@ //mainly to update row label sizes... updateGui(); @@ -74,7 +72,7 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 11.10-2/FreeFileSync/Sourc //asynchronous call to wxWindow::Layout(): 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() -@@ -1078,8 +1074,6 @@ +@@ -1108,8 +1104,6 @@ auiMgr_.GetPane(m_panelSearch).Hide(); //no need to show it on startup auiMgr_.GetPane(m_panelLog ).Hide(); // @@ -83,7 +81,7 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 11.10-2/FreeFileSync/Sourc auiMgr_.Update(); } -@@ -5601,72 +5595,6 @@ +@@ -5680,72 +5674,6 @@ } } @@ -107,7 +105,7 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 11.10-2/FreeFileSync/Sourc - { - flashStatusInformation(_("Searching for program updates...")); - //synchronous update check is sufficient here: -- automaticUpdateCheckEval(this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion, +- automaticUpdateCheckEval(*this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion, - automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare(*this).get()).get()); - } -} @@ -143,7 +141,7 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 11.10-2/FreeFileSync/Sourc - 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) - { -- automaticUpdateCheckEval(this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion, +- automaticUpdateCheckEval(*this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion, - resultAsync.get()); //run on main thread: - showNewVersionReminder(); - }); @@ -169,8 +167,8 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.h 11.10-2/FreeFileSync/Source/ void onShowHelp (wxCommandEvent& event) override { wxLaunchDefaultBrowser(L"https://freefilesync.org/manual.php?topic=freefilesync"); } void onMenuQuit (wxCommandEvent& event) override { Close(); } diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.cpp 11.10-2/FreeFileSync/Source/ui/version_check.cpp ---- 11.10-1/FreeFileSync/Source/ui/version_check.cpp 2021-05-10 08:10:14.751776629 -0400 -+++ 11.10-2/FreeFileSync/Source/ui/version_check.cpp 2021-05-10 10:50:08.595338399 -0400 +--- 11.16-1/FreeFileSync/Source/ui/version_check.cpp 2021-05-10 08:10:14.751776629 -0400 ++++ 11.16-2/FreeFileSync/Source/ui/version_check.cpp 2021-05-10 10:50:08.595338399 -0400 @@ -73,6 +73,8 @@ bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck) @@ -185,7 +183,7 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.cpp 11.10-2/FreeFileSync/ try { - updateDetailsMsg = utfTo<std::wstring>(sendHttpGet(utfTo<Zstring>("https://api.freefilesync.org/latest_changes?" + xWwwFormUrlEncode({{"since", ffsVersion}})), -- ffsUpdateCheckUserAgent, nullptr /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll()); //throw SysError +- ffsUpdateCheckUserAgent, Zstring() /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll()); //throw SysError + updateDetailsMsg = utfTo<std::wstring>(""); } catch (const SysError& e) { updateDetailsMsg = _("Failed to retrieve update information.") + + L"\n\n" + e.toString(); } @@ -195,7 +193,7 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.cpp 11.10-2/FreeFileSync/ std::string getOnlineVersion(const std::vector<std::pair<std::string, std::string>>& postParams) //throw SysError { - const std::string response = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams, -- ffsUpdateCheckUserAgent, nullptr /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError +- ffsUpdateCheckUserAgent, Zstring() /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError + const std::string response = ""; + return trimCpy(response); @@ -261,10 +259,10 @@ diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.cpp 11.10-2/FreeFileSync/ { std::vector<std::pair<std::string, std::string>> postParameters; diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.h 11.10-2/FreeFileSync/Source/ui/version_check.h ---- 11.10-1/FreeFileSync/Source/ui/version_check.h 2021-05-10 08:02:46.067494474 -0400 -+++ 11.10-2/FreeFileSync/Source/ui/version_check.h 2021-05-10 10:50:22.035466671 -0400 +--- 11.16-0/FreeFileSync/Source/ui/version_check.h 2021-05-10 08:02:46.067494474 -0400 ++++ 11.16-1/FreeFileSync/Source/ui/version_check.h 2021-05-10 10:50:22.035466671 -0400 @@ -32,9 +32,6 @@ - void automaticUpdateCheckEval(wxWindow* parent, time_t& lastUpdateCheck, std::string& lastOnlineVersion, + void automaticUpdateCheckEval(wxWindow& parent, time_t& lastUpdateCheck, std::string& lastOnlineVersion, const UpdateCheckResult* asyncResult); //---------------------------------------------------------------------------- -//call from main thread: |