summaryrefslogtreecommitdiff
path: root/freefilesync/02_no_wx311.patch
diff options
context:
space:
mode:
Diffstat (limited to 'freefilesync/02_no_wx311.patch')
-rw-r--r--freefilesync/02_no_wx311.patch138
1 files changed, 138 insertions, 0 deletions
diff --git a/freefilesync/02_no_wx311.patch b/freefilesync/02_no_wx311.patch
new file mode 100644
index 0000000..e74da90
--- /dev/null
+++ b/freefilesync/02_no_wx311.patch
@@ -0,0 +1,138 @@
+Last modified: 2022-05-24
+Version: 11.21
+Author: bgstack15
+Message: Just compile by stepping around wxWidgets 3.1.1 calls
+diff -Naur -x '*.orig' -x '*.rej' -x .git 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp
+--- 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 08:15:29.432156507 -0500
++++ 11.21-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 18:22:19.929543356 -0500
+@@ -300,7 +300,8 @@
+ {
+ showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString()));
+ }
+- m_listBoxGdriveUsers->Append(gdriveAccounts);
++ for (const wxString& item : gdriveAccounts) // reverted to pre-wx 3.1.1 logic
++ m_listBoxGdriveUsers->Append(item);
+
+ //set default values for Google Drive: use first item of m_listBoxGdriveUsers
+ if (!gdriveAccounts.empty() && !acceptsItemPathPhraseGdrive(folderPathPhrase))
+@@ -1292,7 +1298,8 @@
+ for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_)
+ dialogMessages.push_back(msg);
+
+- m_checkListHiddenDialogs->Append(dialogMessages);
++ for (const wxString& item :dialogMessages) // reverted to pre-wx 3.1.1 logic
++ m_checkListHiddenDialogs->Append(item);
+
+ unsigned int itemPos = 0;
+ for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_)
+@@ -1689,7 +1690,6 @@
+ //setMainInstructionFont(*m_staticTextMain);
+
+ setImage(*m_bitmapActivation, loadImage("internet"));
+- m_textCtrlOfflineActivationKey->ForceUpper();
+
+ setTextWithUrls(*m_richTextLastError, lastErrorMsg);
+ setTextWithUrls(*m_richTextManualActivationUrl, manualActivationUrl);
+diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp
+--- 10.3-0/wx+/grid.cpp 2018-08-07 05:03:34.000000000 -0400
++++ 10.3-2/wx+/grid.cpp 2018-08-08 19:24:56.849445102 -0400
+@@ -1176,7 +1176,9 @@
+ {
+ if (overlapPix != 0)
+ {
+- const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec]
++ // Fedora 28 does not have wxGTK 3.1.1 yet. This probably breaks HiDPI usage
++ //const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec]
++ const double scrollSpeed = overlapPix * mouseDragSpeedIncScrollU; //unit: [scroll units / sec]
+ toScroll += scrollSpeed * deltaSecs;
+ }
+ else
+diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/command_box.cpp 10.24-1/FreeFileSync/Source/ui/command_box.cpp
+--- 10.24-0/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:01:12.893890567 -0400
++++ 10.24-1/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:22:18.069114993 -0400
+@@ -120,7 +120,8 @@
+
+ //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!!
+ wxItemContainer::Clear(); //suffices to clear the selection items only!
+- this->Append(items); //expensive as fuck! => only call when absolutely needed!
++ for (const wxString& item : items) // reverted to pre-wx 3.1.1 logic
++ this->Append(item);
+
+ //this->SetSelection(wxNOT_FOUND); //don't select anything
+ ChangeValue(value); //preserve main text!
+diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp
+--- 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:01:12.909890709 -0400
++++ 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:21:18.460583251 -0400
+@@ -90,7 +90,8 @@
+
+ //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!!
+ wxItemContainer::Clear(); //suffices to clear the selection items only!
+- this->Append(items); //expensive as fuck! => only call when absolutely needed!
++ for (const wxString& itemk : items) // reverted to pre-wx 3.1.1 logic
++ this->Append(itemk);
+
+ //this->SetSelection(wxNOT_FOUND); //don't select anything
+ ChangeValue(folderPathPhrase); //preserve main text!
+--- 11.21-0/FreeFileSync/Source/config.cpp 2022-05-22 17:09:32.238809549 -0400
++++ 11.21-1/FreeFileSync/Source/config.cpp 2022-05-24 08:41:55.360955076 -0400
+@@ -1502,13 +1512,13 @@
+ if (lngName == "English (US)")
+ cfg.programLanguage = wxLANGUAGE_ENGLISH_US;
+ else if (lngName == "Chinese (Simplified)")
+- cfg.programLanguage = wxLANGUAGE_CHINESE_CHINA;
++ cfg.programLanguage = wxLANGUAGE_CHINESE_SIMPLIFIED;
+ else if (lngName == "Chinese (Traditional)")
+ cfg.programLanguage = wxLANGUAGE_CHINESE_TAIWAN;
+ else if (lngName == "English (U.K.)")
+ cfg.programLanguage = wxLANGUAGE_ENGLISH_UK;
+ else if (lngName == "Norwegian (Bokmal)")
+- cfg.programLanguage = wxLANGUAGE_NORWEGIAN;
++ cfg.programLanguage = wxLANGUAGE_NORWEGIAN_BOKMAL;
+ else if (lngName == "Portuguese (Brazilian)")
+ cfg.programLanguage = wxLANGUAGE_PORTUGUESE_BRAZILIAN;
+ else if (const wxLanguageInfo* lngInfo = wxLocale::FindLanguageInfo(utfTo<wxString>(lngName)))
+--- 11.21-0/FreeFileSync/Source/localization.cpp 2022-05-22 17:09:32.238809549 -0400
++++ 11.21-1/FreeFileSync/Source/localization.cpp 2022-05-24 08:48:56.398222091 -0400
+@@ -195,19 +195,19 @@
+ if (lngCode == "zh")
+ {
+ if (lng == wxLANGUAGE_CHINESE) //wxWidgets assigns this to "zh" or "zh_TW" for some reason
+- return wxLANGUAGE_CHINESE_CHINA;
++ return wxLANGUAGE_CHINESE_SIMPLIFIED;
+
+ for (const char* l : {"zh_HK", "zh_MO", "zh_TW"})
+ if (locale == l)
+ return wxLANGUAGE_CHINESE_TAIWAN;
+
+- return wxLANGUAGE_CHINESE_CHINA;
++ return wxLANGUAGE_CHINESE_SIMPLIFIED;
+ }
+
+ if (lngCode == "en")
+ {
+ if (lng == wxLANGUAGE_ENGLISH || //wxWidgets assigns this to "en" or "en_GB" for some reason
+- lng == wxLANGUAGE_ENGLISH_WORLD)
++ lng == wxLANGUAGE_ENGLISH_EIRE)
+ return wxLANGUAGE_ENGLISH_US;
+
+ for (const char* l : {"en_US", "en_CA", "en_AS", "en_UM", "en_VI"})
+@@ -218,7 +218,7 @@
+ }
+
+ if (lngCode == "nb" || lngCode == "nn") //wxLANGUAGE_NORWEGIAN_BOKMAL, wxLANGUAGE_NORWEGIAN_NYNORSK
+- return wxLANGUAGE_NORWEGIAN;
++ return wxLANGUAGE_NORWEGIAN_BOKMAL;
+
+ if (locale == "pt_BR")
+ return wxLANGUAGE_PORTUGUESE_BRAZILIAN;
+--- 11.21-0/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-22 17:09:32.246809650 -0400
++++ 11.21-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-24 09:29:32.384695364 -0400
+@@ -1759,7 +1753,7 @@
+ if (statusTxts_.empty())
+ {
+ m_staticTextStatusCenter->SetForegroundColour(highlight ? wxColor(31, 57, 226) /*blue*/ : wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+- m_staticTextStatusCenter->SetFont((m_staticTextStatusCenter->GetFont().*(highlight ? &wxFont::Bold : &wxFont::GetBaseFont))());
++ m_staticTextStatusCenter->SetFont(m_staticTextStatusCenter->GetFont().Bold());
+
+ setText(*m_staticTextStatusCenter, text);
+ m_panelStatusBar->Layout();
bgstack15