summaryrefslogtreecommitdiff
path: root/init.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-07 21:17:36 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-07 21:17:36 +0300
commitdfe1e876c6d8ad77a66ae242482e8cc2b6be48c3 (patch)
tree9f2472e2ec4f537d491d3b4f8e57b075d85d6c24 /init.cpp
parent9041e1e89514d7a1a1df7620b7fdf974a4abac1e (diff)
working....
Diffstat (limited to 'init.cpp')
-rw-r--r--init.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/init.cpp b/init.cpp
index d03c951..75ae28a 100644
--- a/init.cpp
+++ b/init.cpp
@@ -68,6 +68,7 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
}
int LoadKey(WPARAM w, LPARAM l);
+int ToggleEncryption(WPARAM w, LPARAM l);
extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
@@ -76,15 +77,23 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
mir_getMMI(&mmi);
mir_getUTFI(&utfi);
CreateServiceFunction("/LoadPubKey",LoadKey);
- CLISTMENUITEM mi;
- ZeroMemory(&mi,sizeof(mi));
+ CreateServiceFunction("/ToggleEncryption",ToggleEncryption);
+ CLISTMENUITEM mi = {0};
mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFF;
mi.flags=0;
mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- mi.pszName="Load public key";
+ mi.pszName="Load GPG public key";
mi.pszService="/LoadPubKey";
hLoadPubKey = (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="Toggle GPG encryption";
+ mi.pszService="/ToggleEncryption";
+ hLoadPubKey = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi);
return 0;
}
@@ -107,5 +116,13 @@ extern "C" int __declspec(dllexport) Unload(void)
int LoadKey(WPARAM w, LPARAM l)
{
+ HANDLE hContact = (HANDLE)w;
+ MessageBox(0, _T("Load GPG key function called"), _T("INFO"), MB_OK);
+ return 0;
+}
+int ToggleEncryption(WPARAM w, LPARAM l)
+{
+ HANDLE hContact = (HANDLE)w;
+ MessageBox(0, _T("Toggle GPG encryption function called"), _T("INFO"), MB_OK);
return 0;
} \ No newline at end of file