summaryrefslogtreecommitdiff
path: root/SecureIM/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SecureIM/main.cpp')
-rw-r--r--SecureIM/main.cpp49
1 files changed, 25 insertions, 24 deletions
diff --git a/SecureIM/main.cpp b/SecureIM/main.cpp
index 00844d8..b1f71e0 100644
--- a/SecureIM/main.cpp
+++ b/SecureIM/main.cpp
@@ -1,5 +1,9 @@
#include "commonheaders.h"
+PLUGINLINK *pluginLink;
+MM_INTERFACE mmi = {0};
+int hLangpack = 0;
+
extern "C" BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) {
g_hInst = hInst;
if (dwReason == DLL_PROCESS_ATTACH) {
@@ -12,11 +16,6 @@ extern "C" BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) {
}
-PLUGININFO *MirandaPluginInfo(DWORD mirandaVersion) {
- return &pluginInfo;
-}
-
-
PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) {
return &pluginInfoEx;
}
@@ -59,7 +58,7 @@ HANDLE AddMenuItem(LPCSTR name,int pos,HICON hicon,LPCSTR service,int flags=0,WP
mi.flags=flags | CMIF_HIDDEN;
mi.position=pos;
mi.hIcon=hicon;
- mi.pszName=Translate(name);
+ mi.pszName= (char*)name;
mi.pszPopupName=(char*)-1;
mi.pszService=(char*)service;
return((HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,wParam,(LPARAM)&mi));
@@ -75,7 +74,7 @@ HANDLE AddSubItem(HANDLE rootid,LPCSTR name,int pos,int poppos,LPCSTR service,WP
mi.position=pos;
mi.popupPosition=poppos;
mi.hIcon=NULL;
- mi.pszName=Translate(name);
+ mi.pszName=(char*)name;
mi.pszPopupName=(char*)rootid;
mi.pszService=(char*)service;
return((HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,wParam,(LPARAM)&mi));
@@ -101,6 +100,8 @@ int __cdecl Load(PLUGINLINK *link) {
// get memoryManagerInterface address
mir_getMMI( &mmi );
+ //get per-plugin langpack interface
+ mir_getLP(&pluginInfoEx);
// check for support TrueColor Icons
BOOL bIsComCtl6 = FALSE;
@@ -152,20 +153,20 @@ int __cdecl Load(PLUGINLINK *link) {
g_hEvent[0] = CreateHookableEvent(MODULENAME"/Disabled");
g_hEvent[1] = CreateHookableEvent(MODULENAME"/Established");
- AddServiceFunction((LPCSTR)MODULENAME"/IsContactSecured",(MIRANDASERVICE)Service_IsContactSecured);
- AddServiceFunction((LPCSTR)MODULENAME"/SIM_EST",(MIRANDASERVICE)Service_CreateIM);
- AddServiceFunction((LPCSTR)MODULENAME"/SIM_DIS",(MIRANDASERVICE)Service_DisableIM);
- AddServiceFunction((LPCSTR)MODULENAME"/SIM_ST_DIS",(MIRANDASERVICE)Service_StatusDis);
- AddServiceFunction((LPCSTR)MODULENAME"/SIM_ST_ENA",(MIRANDASERVICE)Service_StatusEna);
- AddServiceFunction((LPCSTR)MODULENAME"/SIM_ST_TRY",(MIRANDASERVICE)Service_StatusTry);
- AddServiceFunction((LPCSTR)MODULENAME"/PGP_SET",(MIRANDASERVICE)Service_PGPsetKey);
- AddServiceFunction((LPCSTR)MODULENAME"/PGP_DEL",(MIRANDASERVICE)Service_PGPdelKey);
- AddServiceFunction((LPCSTR)MODULENAME"/GPG_SET",(MIRANDASERVICE)Service_GPGsetKey);
- AddServiceFunction((LPCSTR)MODULENAME"/GPG_DEL",(MIRANDASERVICE)Service_GPGdelKey);
- AddServiceFunction((LPCSTR)MODULENAME"/MODE_NAT",(MIRANDASERVICE)Service_ModeNative);
- AddServiceFunction((LPCSTR)MODULENAME"/MODE_PGP",(MIRANDASERVICE)Service_ModePGP);
- AddServiceFunction((LPCSTR)MODULENAME"/MODE_GPG",(MIRANDASERVICE)Service_ModeGPG);
- AddServiceFunction((LPCSTR)MODULENAME"/MODE_RSA",(MIRANDASERVICE)Service_ModeRSAAES);
+ AddServiceFunction(MODULENAME"/IsContactSecured",Service_IsContactSecured);
+ AddServiceFunction(MODULENAME"/SIM_EST",Service_CreateIM);
+ AddServiceFunction(MODULENAME"/SIM_DIS",Service_DisableIM);
+ AddServiceFunction(MODULENAME"/SIM_ST_DIS",Service_StatusDis);
+ AddServiceFunction(MODULENAME"/SIM_ST_ENA",Service_StatusEna);
+ AddServiceFunction(MODULENAME"/SIM_ST_TRY",Service_StatusTry);
+ AddServiceFunction(MODULENAME"/PGP_SET",Service_PGPsetKey);
+ AddServiceFunction(MODULENAME"/PGP_DEL",Service_PGPdelKey);
+ AddServiceFunction(MODULENAME"/GPG_SET",Service_GPGsetKey);
+ AddServiceFunction(MODULENAME"/GPG_DEL",Service_GPGdelKey);
+ AddServiceFunction(MODULENAME"/MODE_NAT",Service_ModeNative);
+ AddServiceFunction(MODULENAME"/MODE_PGP",Service_ModePGP);
+ AddServiceFunction(MODULENAME"/MODE_GPG",Service_ModeGPG);
+ AddServiceFunction(MODULENAME"/MODE_RSA",Service_ModeRSAAES);
return 0;
}
@@ -385,8 +386,8 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) {
if( ServiceExists(MS_EXTRAICON_REGISTER) ) {
g_hCLIcon = ExtraIcon_Register(szModuleName, Translate("SecureIM status"), "sim_cm_est",
- (MIRANDAHOOK)onExtraImageListRebuilding,
- (MIRANDAHOOK)onExtraImageApplying);
+ onExtraImageListRebuilding,
+ onExtraImageApplying);
}
else {
AddHookFunction(ME_CLIST_EXTRA_LIST_REBUILD, onExtraImageListRebuilding);
@@ -466,7 +467,7 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) {
// updater plugin support
if(ServiceExists(MS_UPDATE_REGISTERFL)) {
- CallService(MS_UPDATE_REGISTERFL, (WPARAM)2445, (LPARAM)&pluginInfo);
+ CallService(MS_UPDATE_REGISTERFL, (WPARAM)2445, (LPARAM)&pluginInfoEx);
}
#if defined(_DEBUG) || defined(NETLIB_LOG)