summaryrefslogtreecommitdiff
path: root/protocols/CloudFile
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-11 18:58:29 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-11 18:58:29 +0300
commit13c65091dba7803ddc8b604732d3cf3e8cb2fe5d (patch)
tree77d39ba8d777f24c022d9141fa709165a2e802da /protocols/CloudFile
parent70ff82fd507835546c5f9a54e593f8868ab50891 (diff)
PS_CREATEACCMGRUI is obsoleted and converted into event
Diffstat (limited to 'protocols/CloudFile')
-rw-r--r--protocols/CloudFile/src/cloud_file.cpp8
-rw-r--r--protocols/CloudFile/src/cloud_file.h6
2 files changed, 6 insertions, 8 deletions
diff --git a/protocols/CloudFile/src/cloud_file.cpp b/protocols/CloudFile/src/cloud_file.cpp
index 81e2c37a2b..8674789126 100644
--- a/protocols/CloudFile/src/cloud_file.cpp
+++ b/protocols/CloudFile/src/cloud_file.cpp
@@ -9,8 +9,6 @@ CCloudService::CCloudService(const char *protoName, const wchar_t *userName, HPL
nlu.szSettingsModule = (char*)protoName;
nlu.szDescriptiveName.w = (wchar_t*)userName;
m_hConnection = Netlib_RegisterUser(&nlu);
-
- CreateProtoService(PS_CREATEACCMGRUI, &CCloudService::OnAccountManagerInit);
}
CCloudService::~CCloudService()
@@ -86,12 +84,12 @@ void CCloudService::OpenUploadDialog(MCONTACT hContact)
SetActiveWindow(it->second);
}
-INT_PTR CCloudService::OnAccountManagerInit(WPARAM, LPARAM lParam)
+MWindow CCloudService::OnCreateAccMgrUI(MWindow hwndParent)
{
CAccountManagerDlg *page = new CAccountManagerDlg(this);
- page->SetParent((HWND)lParam);
+ page->SetParent(hwndParent);
page->Show();
- return (INT_PTR)page->GetHwnd();
+ return page->GetHwnd();
}
std::string CCloudService::PreparePath(const std::string &path) const
diff --git a/protocols/CloudFile/src/cloud_file.h b/protocols/CloudFile/src/cloud_file.h
index f02589c2bd..de053af431 100644
--- a/protocols/CloudFile/src/cloud_file.h
+++ b/protocols/CloudFile/src/cloud_file.h
@@ -14,8 +14,6 @@ protected:
HPLUGIN m_pPlugin;
HNETLIBUSER m_hConnection;
- INT_PTR __cdecl OnAccountManagerInit(WPARAM, LPARAM);
-
// utils
std::string PreparePath(const std::string &path) const;
@@ -24,7 +22,9 @@ protected:
virtual void HandleHttpError(NETLIBHTTPREQUEST *response);
virtual void HandleJsonError(JSONNode &node) = 0;
+ // events
void OnModulesLoaded() override;
+ MWindow OnCreateAccMgrUI(MWindow) override;
JSONNode GetJsonResponse(NETLIBHTTPREQUEST *response);
@@ -40,7 +40,7 @@ public:
int FileCancel(MCONTACT hContact, HANDLE hTransfer) override;
HANDLE SendFile(MCONTACT hContact, const wchar_t *msg, wchar_t **ppszFiles) override;
-
+
HPLUGIN GetId() const;
virtual const char* GetModuleName() const = 0;
const char* GetAccountName() const;