From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- plugins/FavContacts/src/main.cpp | 30 ++++++++++++++++++------------ plugins/FavContacts/src/stdafx.h | 4 +--- 2 files changed, 19 insertions(+), 15 deletions(-) (limited to 'plugins/FavContacts') diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index bc75a82c0a..f3d78c6fb6 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -25,7 +25,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +IconItem iconList[] = +{ + { LPGEN("Favorite Contact"), "favcontacts_favorite", IDI_FAVORITE }, + { LPGEN("Regular Contact"), "favcontacts_regular", IDI_REGULAR }, +}; + +CContactCache *g_contactCache = nullptr; + +Options g_Options = { 0 }; + +///////////////////////////////////////////////////////////////////////////////////// + +static PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -38,26 +50,20 @@ PLUGININFOEX pluginInfo = { {0xce2c0401, 0xf9e0, 0x40d7, {0x8e, 0x95, 0x1a, 0x41, 0x97, 0xd7, 0xab, 0x4}} }; -IconItem iconList[] = -{ - { LPGEN("Favorite Contact"), "favcontacts_favorite", IDI_FAVORITE }, - { LPGEN("Regular Contact"), "favcontacts_regular", IDI_REGULAR }, -}; - -CContactCache *g_contactCache = nullptr; - -Options g_Options = { 0 }; +CMPlugin::CMPlugin() : + PLUGIN("FavContacts", pluginInfoEx) +{} extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } ///////////////////////////////////////////////////////////////////////////////////// extern "C" __declspec(dllexport) int Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); g_contactCache = new CContactCache; diff --git a/plugins/FavContacts/src/stdafx.h b/plugins/FavContacts/src/stdafx.h index 7de5e1728d..2ab32caea4 100644 --- a/plugins/FavContacts/src/stdafx.h +++ b/plugins/FavContacts/src/stdafx.h @@ -103,7 +103,5 @@ extern IconItem iconList[]; struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN("FavContacts") - {} + CMPlugin(); }; -- cgit v1.2.3