summaryrefslogtreecommitdiff
path: root/plugins/HistorySweeperLight/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
commit8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch)
tree03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/HistorySweeperLight/src
parentc5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff)
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/HistorySweeperLight/src')
-rw-r--r--plugins/HistorySweeperLight/src/main.cpp24
-rw-r--r--plugins/HistorySweeperLight/src/stdafx.h4
2 files changed, 18 insertions, 10 deletions
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp
index 9ddc5c5e84..dae726de88 100644
--- a/plugins/HistorySweeperLight/src/main.cpp
+++ b/plugins/HistorySweeperLight/src/main.cpp
@@ -26,6 +26,8 @@ int &hLangpack(g_plugin.m_hLang);
LIST<void> g_hWindows(5, PtrKeySortT);
+/////////////////////////////////////////////////////////////////////////////////////////
+
static PLUGININFOEX pluginInfoEx =
{
sizeof(PLUGININFOEX),
@@ -40,7 +42,18 @@ static PLUGININFOEX pluginInfoEx =
{ 0x1d9bf74a, 0x44a8, 0x4b3f, { 0xa6, 0xe5, 0x73, 0x6, 0x9d, 0x3a, 0x89, 0x79 } }
};
-int OnIconPressed(WPARAM hContact, LPARAM lParam)
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(ModuleName, pluginInfoEx)
+{}
+
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
+{
+ return &pluginInfoEx;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static int OnIconPressed(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
@@ -63,7 +76,7 @@ int OnIconPressed(WPARAM hContact, LPARAM lParam)
return 0;
}
-int OnModulesLoaded(WPARAM, LPARAM)
+static int OnModulesLoaded(WPARAM, LPARAM)
{
int sweep = db_get_b(NULL, ModuleName, "SweepHistory", 0);
@@ -106,11 +119,6 @@ int OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
@@ -122,6 +130,8 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) int Unload(void)
{
ShutdownAction();
diff --git a/plugins/HistorySweeperLight/src/stdafx.h b/plugins/HistorySweeperLight/src/stdafx.h
index 27d77a69d2..c6ee6ae3c4 100644
--- a/plugins/HistorySweeperLight/src/stdafx.h
+++ b/plugins/HistorySweeperLight/src/stdafx.h
@@ -46,9 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(ModuleName)
- {}
+ CMPlugin();
};
// main.c