diff options
Diffstat (limited to 'protocols/CloudFile/src')
-rw-r--r-- | protocols/CloudFile/src/oauth.cpp | 12 | ||||
-rw-r--r-- | protocols/CloudFile/src/oauth.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/protocols/CloudFile/src/oauth.cpp b/protocols/CloudFile/src/oauth.cpp index e62629fcd8..aeeba741c4 100644 --- a/protocols/CloudFile/src/oauth.cpp +++ b/protocols/CloudFile/src/oauth.cpp @@ -8,7 +8,6 @@ COAuthDlg::COAuthDlg(CCloudService *service, const char *authUrl, CCloudService: { m_autoClose = CLOSE_ON_CANCEL; m_code.OnChange = Callback(this, &COAuthDlg::Code_OnChange); - m_ok.OnClick = Callback(this, &COAuthDlg::Ok_OnClick); } bool COAuthDlg::OnInitDialog() @@ -21,13 +20,14 @@ bool COAuthDlg::OnInitDialog() return true; } +bool COAuthDlg::OnApply() +{ + m_service->ForkThread(m_requestAccessTokenThread, m_hwnd); + return true; +} + void COAuthDlg::Code_OnChange(CCtrlBase*) { ptrA requestToken(m_code.GetTextA()); m_ok.Enable(mir_strlen(requestToken) != 0); } - -void COAuthDlg::Ok_OnClick(CCtrlButton*) -{ - m_service->ForkThread(m_requestAccessTokenThread, m_hwnd); -}
\ No newline at end of file diff --git a/protocols/CloudFile/src/oauth.h b/protocols/CloudFile/src/oauth.h index 2b32ecbd9b..24f755fc79 100644 --- a/protocols/CloudFile/src/oauth.h +++ b/protocols/CloudFile/src/oauth.h @@ -6,15 +6,15 @@ class COAuthDlg : public CDlgBase CCloudService *m_service; CCloudService::MyThreadFunc m_requestAccessTokenThread; + CCtrlButton m_ok; CCtrlHyperlink m_authorize; CCtrlEdit m_code; - CCtrlButton m_ok; protected: bool OnInitDialog() override; + bool OnApply() override; void Code_OnChange(CCtrlBase*); - void Ok_OnClick(CCtrlButton*); public: COAuthDlg(CCloudService *service, const char *authUrl, CCloudService::MyThreadFunc requestAccessTokenThread); |