diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-29 19:30:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-29 19:30:51 +0000 |
commit | ee3100701b64a1a34e8e5b3069219c7c5a201d8a (patch) | |
tree | 65ae99da9575d2611734482dcedec21bf7f186db /plugins/New_GPG/src | |
parent | cadd3f86302d30d6d6a2e4af63a7a50f0dd1f1cb (diff) |
- unified menu creation using wrapper class CMenuItem;
- duplicated hLangpack field removed from TMO_IntMenuItem;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14440 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src')
-rw-r--r-- | plugins/New_GPG/src/init.cpp | 53 | ||||
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 2 |
2 files changed, 23 insertions, 32 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index bc25e2f519..19d274ed51 100644 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -176,45 +176,36 @@ extern "C" int __declspec(dllexport) Load() CreateServiceFunction("/ExportGPGKeys",ExportGpGKeys);
CreateServiceFunction("/ImportGPGKeys",ImportGpGKeys);
- // !!!!!!!! check it later
- TMO_MenuItem mi = { 0 };
- mi.position=-0x7FFFFFFF;
- mi.flags=CMIF_TCHAR;
- mi.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Load GPG public key");
- mi.pszService="/LoadPubKey";
+ CMenuItem mi;
+ mi.position = -0x7FFFFFFF;
+ mi.flags = CMIF_TCHAR;
+ mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Load GPG public key");
+ mi.pszService = "/LoadPubKey";
hLoadPubKey = Menu_AddContactMenuItem(&mi);
- memset(&mi, 0, sizeof(mi));
- mi.position=-0x7FFFFFFe;
- mi.flags=CMIF_TCHAR;
- mi.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Toggle GPG encryption");
- mi.pszService="/ToggleEncryption";
+ mi.position = -0x7FFFFFFe;
+ mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Toggle GPG encryption");
+ mi.pszService = "/ToggleEncryption";
hToggleEncryption = Menu_AddContactMenuItem(&mi);
- memset(&mi, 0, sizeof(mi));
- mi.position=-0x7FFFFFFd;
- mi.flags=CMIF_TCHAR;
- mi.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Send public key");
- mi.pszService="/SendKey";
+ mi.position = -0x7FFFFFFd;
+ mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Send public key");
+ mi.pszService = "/SendKey";
hSendKey = Menu_AddContactMenuItem(&mi);
- memset(&mi, 0, sizeof(mi));
- mi.position=-0x7FFFFFFe;
- mi.flags=CMIF_TCHAR;
- mi.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Export GPG Public keys");
- mi.pszService="/ExportGPGKeys";
+ mi.position = -0x7FFFFFFe;
+ mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Export GPG Public keys");
+ mi.pszService = "/ExportGPGKeys";
hExportGpgKeys = Menu_AddMainMenuItem(&mi);
- memset(&mi, 0, sizeof(mi));
- mi.position=-0x7FFFFFFF;
- mi.flags=CMIF_TCHAR;
- mi.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Import GPG Public keys");
- mi.pszService="/ImportGPGKeys";
+ mi.position = -0x7FFFFFFF;
+ mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Import GPG Public keys");
+ mi.pszService = "/ImportGPGKeys";
hImportGpgKeys = Menu_AddMainMenuItem(&mi);
InitIconLib();
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 9443362054..356657bb19 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -235,7 +235,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM l) { MCONTACT hContact = db_mc_tryMeta(w); { - TMO_MenuItem mi2 = { 0 }; + CMenuItem mi2; LPSTR proto = GetContactProto(hContact); PROTOACCOUNT *acc = Proto_GetAccount(proto); std::string setting; |