diff options
author | aunsane <aunsane@gmail.com> | 2018-02-25 14:45:28 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-02-25 14:45:28 +0300 |
commit | a76776079b6d15e92dffd0c5c0016389092b1c8b (patch) | |
tree | ac686f25c8714b11824624b7773f499035b6827c /plugins/CloudFile | |
parent | 7fc01c9c474a732cd8b978d2f163f0839b2f956d (diff) |
Fixes related with 7fc01c9
Diffstat (limited to 'plugins/CloudFile')
-rw-r--r-- | plugins/CloudFile/res/resource.rc | 4 | ||||
-rw-r--r-- | plugins/CloudFile/src/oauth.cpp | 8 | ||||
-rw-r--r-- | plugins/CloudFile/src/oauth.h | 4 | ||||
-rw-r--r-- | plugins/CloudFile/src/resource.h | 2 | ||||
-rw-r--r-- | plugins/CloudFile/src/transfers.cpp | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/plugins/CloudFile/res/resource.rc b/plugins/CloudFile/res/resource.rc index 53021dfa69..ac6165d105 100644 --- a/plugins/CloudFile/res/resource.rc +++ b/plugins/CloudFile/res/resource.rc @@ -109,8 +109,8 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,75,62,50,14 PUSHBUTTON "Cancel",IDCANCEL,136,62,50,14 LTEXT "Enter authorization code:",IDC_STATIC,7,33,179,8 - LTEXT "To allow Miranda NG access to %s account:",IDC_AUTH_TEXT,7,7,140,8 - PUSHBUTTON "Authorize",IDC_OAUTH_AUTHORIZE,58,17,74,14 + LTEXT "To allow Miranda NG access to %s:",IDC_AUTH_TEXT,7,7,179,8 + CONTROL "Go to this link",IDC_OAUTH_AUTHORIZE,"Hyperlink",WS_GROUP | WS_TABSTOP | 0x1,7,18,179,8 END diff --git a/plugins/CloudFile/src/oauth.cpp b/plugins/CloudFile/src/oauth.cpp index 1f837f021d..9ecd3a9ab8 100644 --- a/plugins/CloudFile/src/oauth.cpp +++ b/plugins/CloudFile/src/oauth.cpp @@ -15,14 +15,14 @@ COAuthDlg::COAuthDlg(CCloudService *service, const char *authUrl, pThreadFuncOwn void COAuthDlg::OnInitDialog() { - /*CCtrlBase *ctrl = FindControl(IDC_AUTH_TEXT); - ptrW format(ctrl->GetText()); + CCtrlLabel &ctrl = *(CCtrlLabel*)FindControl(IDC_AUTH_TEXT); + ptrW format(ctrl.GetText()); wchar_t text[MAX_PATH]; mir_snwprintf(text, (const wchar_t*)format, m_service->GetUserName()); - ctrl->SetText(text);*/ + ctrl.SetText(text); } -void COAuthDlg::Auth_OnClick(CCtrlButton*) +void COAuthDlg::Auth_OnClick(CCtrlHyperlink*) { if (SUCCEEDED(OleInitialize(NULL))) { CComPtr<IWebBrowser2> browser; diff --git a/plugins/CloudFile/src/oauth.h b/plugins/CloudFile/src/oauth.h index cbc4b3855e..e38ae45fa3 100644 --- a/plugins/CloudFile/src/oauth.h +++ b/plugins/CloudFile/src/oauth.h @@ -8,14 +8,14 @@ private: const char *m_authUrl; pThreadFuncOwner m_requestAccessTokenThread; - CCtrlButton m_authorize; + CCtrlHyperlink m_authorize; CCtrlEdit m_code; CCtrlButton m_ok; protected: void OnInitDialog() override; - void Auth_OnClick(CCtrlButton*); + void Auth_OnClick(CCtrlHyperlink*); void Code_OnChange(CCtrlBase*); void Ok_OnClick(CCtrlButton*); diff --git a/plugins/CloudFile/src/resource.h b/plugins/CloudFile/src/resource.h index 5a625809ca..aa5daf96da 100644 --- a/plugins/CloudFile/src/resource.h +++ b/plugins/CloudFile/src/resource.h @@ -29,7 +29,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 132 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1032 +#define _APS_NEXT_CONTROL_VALUE 1033 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/plugins/CloudFile/src/transfers.cpp b/plugins/CloudFile/src/transfers.cpp index b72c934abb..c70dbcf33f 100644 --- a/plugins/CloudFile/src/transfers.cpp +++ b/plugins/CloudFile/src/transfers.cpp @@ -8,7 +8,7 @@ INT_PTR CCloudService::SendFileInterceptor(WPARAM, LPARAM lParam) for (auto &service : Services) { auto it = service->InterceptedContacts.find(pccsd->hContact); if (it == service->InterceptedContacts.end()) - return CALLSERVICE_NOTFOUND; + continue; service->InterceptedContacts.erase(it); return (INT_PTR)service->SendFile(pccsd->hContact, (wchar_t*)pccsd->wParam, (wchar_t**)pccsd->lParam); } |