From 13c65091dba7803ddc8b604732d3cf3e8cb2fe5d Mon Sep 17 00:00:00 2001
From: George Hazan <ghazan@miranda.im>
Date: Sat, 11 Feb 2023 18:58:29 +0300
Subject: PS_CREATEACCMGRUI is obsoleted and converted into event

---
 protocols/Omegle/src/proto.cpp | 7 ++-----
 protocols/Omegle/src/proto.h   | 4 +---
 2 files changed, 3 insertions(+), 8 deletions(-)

(limited to 'protocols/Omegle/src')

diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp
index 036dc41d6f..36b85b01dd 100644
--- a/protocols/Omegle/src/proto.cpp
+++ b/protocols/Omegle/src/proto.cpp
@@ -36,8 +36,6 @@ OmegleProto::OmegleProto(const char* proto_name, const wchar_t* username) :
 	CreateProtoService(PS_JOINCHAT, &OmegleProto::OnJoinChat);
 	CreateProtoService(PS_LEAVECHAT, &OmegleProto::OnLeaveChat);
 
-	CreateProtoService(PS_CREATEACCMGRUI, &OmegleProto::SvcCreateAccMgrUI);
-
 	HookProtoEvent(ME_OPT_INITIALISE, &OmegleProto::OnOptionsInit);
 	HookProtoEvent(ME_GC_EVENT, &OmegleProto::OnChatEvent);
 
@@ -136,10 +134,9 @@ int OmegleProto::SetStatus(int new_status)
 //////////////////////////////////////////////////////////////////////////////
 // EVENTS
 
-INT_PTR OmegleProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
+MWindow OmegleProto::OnCreateAccMgrUI(MWindow hwndParent)
 {
-	return (INT_PTR)CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_OmegleACCOUNT),
-		(HWND)lParam, OmegleAccountProc, (LPARAM)this);
+	return CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_OmegleACCOUNT), hwndParent, OmegleAccountProc, (LPARAM)this);
 }
 
 void OmegleProto::OnShutdown()
diff --git a/protocols/Omegle/src/proto.h b/protocols/Omegle/src/proto.h
index c1a0c5dcfa..da10733393 100644
--- a/protocols/Omegle/src/proto.h
+++ b/protocols/Omegle/src/proto.h
@@ -54,11 +54,9 @@ public:
 	int     UserIsTyping(MCONTACT hContact, int type) override;
 
 	void    OnContactDeleted(MCONTACT) override;
+	MWindow OnCreateAccMgrUI(MWindow) override;
 	void    OnShutdown() override;
 
-	// Services
-	INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM);
-
 	// Events
 	int  __cdecl OnOptionsInit(WPARAM, LPARAM);
 
-- 
cgit v1.2.3