diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-09 15:12:22 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-09 15:12:22 +0000 |
commit | faf22fc165caf88e561b78752aab4a1704c89086 (patch) | |
tree | eced99885a9e49e2dc093df2e25e8a3a2cc8225e /protocols/MRA/src/Mra.cpp | |
parent | 30eda997b099947ea38c17d547950edc4a5af8eb (diff) |
- fix for moving contact to another group;
- home made debug functions replaced with their CRT analogs
git-svn-id: http://svn.miranda-ng.org/main/trunk@6417 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra.cpp')
-rw-r--r-- | protocols/MRA/src/Mra.cpp | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp index d77cbb639f..efaddcfd34 100644 --- a/protocols/MRA/src/Mra.cpp +++ b/protocols/MRA/src/Mra.cpp @@ -1,5 +1,7 @@ #include "Mra.h"
+LIST<CMraProto> g_Instances(1, PtrKeySortT);
+
MRA_SETTINGS masMraSettings;
int hLangpack;
@@ -19,9 +21,6 @@ PLUGININFOEX pluginInfoEx = { void IconsLoad();
-int OnModulesLoaded(WPARAM, LPARAM);
-int OnPreShutdown(WPARAM, LPARAM);
-
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID Reserved)
{
switch (dwReason) {
@@ -48,16 +47,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda }
///////////////////////////////////////////////////////////////////////////////
-// Protocol instances
-
-static int sttCompareProtocols(const CMraProto *p1, const CMraProto *p2)
-{
- return lstrcmp(p1->m_tszUserName, p2->m_tszUserName);
-}
-
-LIST<CMraProto> g_Instances(1, sttCompareProtocols);
-
-///////////////////////////////////////////////////////////////////////////////
static CMraProto* mraProtoInit(const char* pszProtoName, const TCHAR* tszUserName)
{
@@ -73,6 +62,20 @@ static int mraProtoUninit(CMraProto *ppro) return 0;
}
+///////////////////////////////////////////////////////////////////////////////
+
+static int OnModulesLoaded(WPARAM, LPARAM)
+{
+ masMraSettings.dwGlobalPluginRunning = TRUE;
+ return 0;
+}
+
+static int OnPreShutdown(WPARAM, LPARAM)
+{
+ masMraSettings.dwGlobalPluginRunning = FALSE;
+ return 0;
+}
+
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
@@ -117,8 +120,6 @@ extern "C" __declspec(dllexport) int Load(void) pd.fnInit = (pfnInitProto)mraProtoInit;
pd.fnUninit = (pfnUninitProto)mraProtoUninit;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
-
- DebugPrintCRLFW(_T("Load - DONE"));
return 0;
}
@@ -131,19 +132,5 @@ extern "C" __declspec(dllexport) int Unload(void) }
g_Instances.destroy();
- DebugPrintCRLFW(_T("Unload - DONE"));
- return 0;
-}
-
-
-static int OnModulesLoaded(WPARAM, LPARAM)
-{
- masMraSettings.dwGlobalPluginRunning = TRUE;
- return 0;
-}
-
-int OnPreShutdown(WPARAM, LPARAM)
-{
- masMraSettings.dwGlobalPluginRunning = FALSE;
return 0;
}
|