summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/Services/yandex_service.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-04-11 23:37:53 +0300
committeraunsane <aunsane@gmail.com>2018-04-11 23:38:18 +0300
commit98c8a49c029397c7e5b81e19292681f24a533e0e (patch)
treeace75eb705f679ed1e69742dcef85d1b2242f578 /plugins/CloudFile/src/Services/yandex_service.cpp
parent21fe9b80ff4030f76f68a90726bc29e49627414c (diff)
CloudFile: Add "grant acess" link to CloudFile accounts (fixed #1260)
Diffstat (limited to 'plugins/CloudFile/src/Services/yandex_service.cpp')
-rw-r--r--plugins/CloudFile/src/Services/yandex_service.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CloudFile/src/Services/yandex_service.cpp b/plugins/CloudFile/src/Services/yandex_service.cpp
index f0b09adf4b..c3e32aa8c8 100644
--- a/plugins/CloudFile/src/Services/yandex_service.cpp
+++ b/plugins/CloudFile/src/Services/yandex_service.cpp
@@ -41,7 +41,7 @@ bool CYandexService::IsLoggedIn()
return now < expiresIn;
}
-void CYandexService::Login()
+void CYandexService::Login(HWND owner)
{
ptrA token(getStringA("TokenSecret"));
ptrA refreshToken(getStringA("RefreshToken"));
@@ -65,6 +65,7 @@ void CYandexService::Login()
}
COAuthDlg dlg(this, YANDEX_AUTH, RequestAccessTokenThread);
+ dlg.SetParent(owner);
dlg.DoModal();
}
@@ -139,6 +140,10 @@ unsigned CYandexService::RevokeAccessTokenThread(void *param)
YandexAPI::RevokeAccessTokenRequest request(token);
NLHR_PTR response(request.Send(service->m_hConnection));
+ service->delSetting("ExpiresIn");
+ service->delSetting("TokenSecret");
+ service->delSetting("RefreshToken");
+
return 0;
}