From 41539458d2d114cb714b72315c482e33340a9ee3 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 11 Aug 2010 05:22:07 +0300 Subject: modified: init.cpp modified: main.cpp modified: messages.cpp modified: new_gpg.rc modified: options.cpp modified: resource.h modified: utilities.cpp --- init.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'init.cpp') diff --git a/init.cpp b/init.cpp index 5bc53ff..801b1c7 100644 --- a/init.cpp +++ b/init.cpp @@ -18,7 +18,7 @@ HINSTANCE hInst; -HANDLE hLoadPubKey = NULL, hToggleEncryption = NULL, hOnPreBuildContactMenu = NULL; +HANDLE hLoadPubKey = NULL, hToggleEncryption = NULL, hOnPreBuildContactMenu = NULL, hSendKey = NULL; PLUGINLINK *pluginLink; static int OnModulesLoaded(WPARAM wParam,LPARAM lParam); extern char *date(); @@ -69,6 +69,7 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) int LoadKey(WPARAM w, LPARAM l); int ToggleEncryption(WPARAM w, LPARAM l); +int SendKey(WPARAM w, LPARAM l); extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) { @@ -77,7 +78,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) mir_getMMI(&mmi); mir_getUTFI(&utfi); CreateServiceFunction("/LoadPubKey",LoadKey); - CreateServiceFunction("/ToggleEncryption",ToggleEncryption); + CreateServiceFunction("/ToggleEncryption",ToggleEncryption); + CreateServiceFunction("/SendKey",SendKey); CLISTMENUITEM mi = {0}; mi.cbSize=sizeof(mi); mi.position=-0x7FFFFFFF; @@ -94,6 +96,14 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) mi.pszName="Toggle GPG encryption"; mi.pszService="/ToggleEncryption"; hToggleEncryption = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi); + ZeroMemory(&mi,sizeof(mi)); + mi.cbSize=sizeof(mi); + mi.position=-0x7FFFFFFe; + mi.flags=0; + mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA); + mi.pszName="Send public key"; + mi.pszService="/SendKey"; + hSendKey = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi); return 0; } @@ -112,6 +122,13 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) int RecvMsgSvc(WPARAM w, LPARAM l); int SendMsgSvc(WPARAM w, LPARAM l); + void test(); + + void FirstRun(); + FirstRun(); + + test(); + HookEvent(ME_OPT_INITIALISE, GpgOptInit); hOnPreBuildContactMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPreBuildContactMenu); -- cgit v1.2.3