summaryrefslogtreecommitdiff
path: root/pcr/freefilesync/reversions_11-1.patch
blob: c503a4f2bee337e1d10ff8edcb51de1662076050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Version: 11.1
Message: Had to revert gui_status_handler.cpp and .h entirely to version 11.0 to avoid the wx 3.1.4-isms here.
diff --git a/FreeFileSync/Source/ui/gui_status_handler.cpp b/FreeFileSync/Source/ui/gui_status_handler.cpp
index 3cb6aaaa..9484af2c 100644
--- a/FreeFileSync/Source/ui/gui_status_handler.cpp
+++ b/FreeFileSync/Source/ui/gui_status_handler.cpp
@@ -43,8 +43,8 @@ StatusHandlerTemporaryPanel::StatusHandlerTemporaryPanel(MainDialog& dlg,
     mainDlg_.Update(); //don't wait until idle event!
 
     //register keys
-    mainDlg_.                Bind(wxEVT_CHAR_HOOK,              &StatusHandlerTemporaryPanel::onLocalKeyEvent, this);
-    mainDlg_.m_buttonCancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare,  this);
+    mainDlg_.Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this);
+    mainDlg_.m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this);
 }
 
 
@@ -128,9 +128,8 @@ StatusHandlerTemporaryPanel::~StatusHandlerTemporaryPanel()
     mainDlg_.auiMgr_.Update();
 
     //unregister keys
-    [[maybe_unused]] bool ubOk1 = mainDlg_.                Unbind(wxEVT_CHAR_HOOK,              &StatusHandlerTemporaryPanel::onLocalKeyEvent, this);
-    [[maybe_unused]] bool ubOk2 = mainDlg_.m_buttonCancel->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare,  this);
-    assert(ubOk1 && ubOk2);
+    mainDlg_.Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this);
+    mainDlg_.m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this);
 
     mainDlg_.compareStatus_->teardown();
 
@@ -314,20 +313,20 @@ void StatusHandlerTemporaryPanel::forceUiUpdateNoThrow()
 }
 
 
-void StatusHandlerTemporaryPanel::onLocalKeyEvent(wxKeyEvent& event)
+void StatusHandlerTemporaryPanel::OnKeyPressed(wxKeyEvent& event)
 {
     const int keyCode = event.GetKeyCode();
     if (keyCode == WXK_ESCAPE)
     {
         wxCommandEvent dummy;
-        onAbortCompare(dummy);
+        OnAbortCompare(dummy);
     }
 
     event.Skip();
 }
 
 
-void StatusHandlerTemporaryPanel::onAbortCompare(wxCommandEvent& event)
+void StatusHandlerTemporaryPanel::OnAbortCompare(wxCommandEvent& event)
 {
     userRequestAbort();
 }
diff --git a/FreeFileSync/Source/ui/gui_status_handler.h b/FreeFileSync/Source/ui/gui_status_handler.h
index e8ed01e4..2a9e00d2 100644
--- a/FreeFileSync/Source/ui/gui_status_handler.h
+++ b/FreeFileSync/Source/ui/gui_status_handler.h
@@ -41,8 +41,8 @@ public:
     Result reportResults(); //noexcept!!
 
 private:
-    void onLocalKeyEvent(wxKeyEvent& event);
-    void onAbortCompare(wxCommandEvent& event); //handle abort button click
+    void OnKeyPressed(wxKeyEvent& event);
+    void OnAbortCompare(wxCommandEvent& event); //handle abort button click
     void showStatsPanel();
 
     MainDialog& mainDlg_;