From a905c9c3f92fd54f37a5466649ac378db69e7cb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 14:29:31 +0300 Subject: all protocols rewritten to CMPluginBase --- plugins/GmailNotifier/src/main.cpp | 17 ++++++++++++----- plugins/GmailNotifier/src/stdafx.h | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'plugins/GmailNotifier') diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index 3a715ca048..9dccc5965d 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -94,11 +94,6 @@ extern "C" int __declspec(dllexport) Load() Skin_AddSound("Gmail", LPGENW("Other"), LPGENW("Gmail: New thread(s)")); HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser); - PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE }; - pd.szName = MODULE_NAME; - pd.type = PROTOTYPE_VIRTUAL; - Proto_RegisterModule(&pd); - NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE; nlu.szSettingsModule = MODULE_NAME; @@ -172,3 +167,15 @@ extern "C" int __declspec(dllexport) Unload(void) UnhookEvent(hOptionsInitial); return 0; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(MODULE_NAME) + { + RegisterProtocol(PROTOTYPE_VIRTUAL); + } +} + g_plugin; diff --git a/plugins/GmailNotifier/src/stdafx.h b/plugins/GmailNotifier/src/stdafx.h index 936a16376a..40a8bedf68 100644 --- a/plugins/GmailNotifier/src/stdafx.h +++ b/plugins/GmailNotifier/src/stdafx.h @@ -20,6 +20,7 @@ #include "m_clc.h" #include "m_popup.h" #include "m_netlib.h" +#include #define WM_SHELLNOTIFY WM_USER+5 #define IDI_TRAY WM_USER+6 -- cgit v1.2.3