summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-04 18:51:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-04 18:51:53 +0000
commitecb177cadbcff850a16c4b9e306beb15f61ac6f9 (patch)
treeda36e3107747a5f37dbd078197d584054057609f /plugins/New_GPG/src
parent808f3b5e0fefeb560ce5393bf8311927d0927411 (diff)
kernel extraicons, part II
git-svn-id: http://svn.miranda-ng.org/main/trunk@2188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src')
-rwxr-xr-xplugins/New_GPG/src/init.cpp123
1 files changed, 60 insertions, 63 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 8413f9734d..809613d024 100755
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -24,8 +24,6 @@ list <JabberAccount*> Accounts;
HINSTANCE hInst;
HANDLE hLoadPubKey = NULL, hToggleEncryption = NULL, hOnPreBuildContactMenu = NULL, hSendKey = NULL, g_hCLIcon = NULL, hExportGpgKeys = NULL, hImportGpgKeys = NULL;
-IconExtraColumn g_IEC = {0};
-static int OnModulesLoaded(WPARAM wParam,LPARAM lParam);
RECT key_from_keyserver_rect = {0}, firstrun_rect = {0}, new_key_rect = {0}, key_gen_rect = {0}, load_key_rect = {0}, import_key_rect = {0}, key_password_rect = {0}, load_existing_key_rect = {0};
XML_API xi = {0};
int hLangpack = 0;
@@ -105,69 +103,8 @@ void init_vars()
tabsrmm_used = isTabsrmmUsed();
}
-extern "C" int __declspec(dllexport) Load()
-{
- HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- mir_getXI(&xi); //TODO: check if we have access to api
- mir_getLP(&pluginInfo);
- init_vars();
- CreateServiceFunction("/LoadPubKey",LoadKey);
- CreateServiceFunction("/ToggleEncryption",ToggleEncryption);
- CreateServiceFunction("/SendKey",SendKey);
- CreateServiceFunction("/ExportGPGKeys",ExportGpGKeys);
- CreateServiceFunction("/ImportGPGKeys",ImportGpGKeys);
-
- CLISTMENUITEM mi = {0};
- mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFF;
- mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Load GPG public key");
- mi.pszService="/LoadPubKey";
- hLoadPubKey = Menu_AddContactMenuItem(&mi);
-
- ZeroMemory(&mi,sizeof(mi));
- mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFe;
- mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Toggle GPG encryption");
- mi.pszService="/ToggleEncryption";
- hToggleEncryption = Menu_AddContactMenuItem(&mi);
-
- ZeroMemory(&mi,sizeof(mi));
- mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFe;
- mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Send public key");
- mi.pszService="/SendKey";
- hSendKey = Menu_AddContactMenuItem(&mi);
-
- ZeroMemory(&mi,sizeof(mi));
- mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFF;
- mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Export GPG Public keys from all users");
- mi.pszService="/ExportGPGKeys";
- hExportGpgKeys = Menu_AddMainMenuItem(&mi);
-
- ZeroMemory(&mi,sizeof(mi));
- mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFF;
- mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Import GPG Public keys from all users");
- mi.pszService="/ImportGPGKeys";
- hImportGpgKeys = Menu_AddMainMenuItem(&mi);
-
- return 0;
-}
-
static int OnModulesLoaded(WPARAM wParam,LPARAM lParam)
{
-
int GpgOptInit(WPARAM wParam,LPARAM lParam);
int OnPreBuildContactMenu(WPARAM w, LPARAM l);
int RecvMsgSvc(WPARAM w, LPARAM l);
@@ -246,6 +183,66 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam)
return 0;
}
+extern "C" int __declspec(dllexport) Load()
+{
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ mir_getXI(&xi); //TODO: check if we have access to api
+ mir_getLP(&pluginInfo);
+ init_vars();
+ CreateServiceFunction("/LoadPubKey",LoadKey);
+ CreateServiceFunction("/ToggleEncryption",ToggleEncryption);
+ CreateServiceFunction("/SendKey",SendKey);
+ CreateServiceFunction("/ExportGPGKeys",ExportGpGKeys);
+ CreateServiceFunction("/ImportGPGKeys",ImportGpGKeys);
+
+ CLISTMENUITEM mi = {0};
+ mi.cbSize=sizeof(mi);
+ mi.position=-0x7FFFFFFF;
+ mi.flags=CMIF_TCHAR;
+ mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.ptszName=LPGENT("Load GPG public key");
+ mi.pszService="/LoadPubKey";
+ hLoadPubKey = Menu_AddContactMenuItem(&mi);
+
+ ZeroMemory(&mi,sizeof(mi));
+ mi.cbSize=sizeof(mi);
+ mi.position=-0x7FFFFFFe;
+ mi.flags=CMIF_TCHAR;
+ mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.ptszName=LPGENT("Toggle GPG encryption");
+ mi.pszService="/ToggleEncryption";
+ hToggleEncryption = Menu_AddContactMenuItem(&mi);
+
+ ZeroMemory(&mi,sizeof(mi));
+ mi.cbSize=sizeof(mi);
+ mi.position=-0x7FFFFFFe;
+ mi.flags=CMIF_TCHAR;
+ mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.ptszName=LPGENT("Send public key");
+ mi.pszService="/SendKey";
+ hSendKey = Menu_AddContactMenuItem(&mi);
+
+ ZeroMemory(&mi,sizeof(mi));
+ mi.cbSize=sizeof(mi);
+ mi.position=-0x7FFFFFFF;
+ mi.flags=CMIF_TCHAR;
+ mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.ptszName=LPGENT("Export GPG Public keys from all users");
+ mi.pszService="/ExportGPGKeys";
+ hExportGpgKeys = Menu_AddMainMenuItem(&mi);
+
+ ZeroMemory(&mi,sizeof(mi));
+ mi.cbSize=sizeof(mi);
+ mi.position=-0x7FFFFFFF;
+ mi.flags=CMIF_TCHAR;
+ mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.ptszName=LPGENT("Import GPG Public keys from all users");
+ mi.pszService="/ImportGPGKeys";
+ hImportGpgKeys = Menu_AddMainMenuItem(&mi);
+
+ return 0;
+}
+
extern list<wstring> transfers;
extern "C" int __declspec(dllexport) Unload(void)
{