summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/New_GPG/src/utilities.cpp')
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 4dd31b3a1a..51f9bb8312 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -192,7 +192,8 @@ INT_PTR SendKey(WPARAM w, LPARAM l)
return 0;
}
-extern HANDLE hLoadPublicKey, hToggleEncryption, hSendKey;
+extern HANDLE hLoadPublicKey;
+extern HGENMENU hToggleEncryption, hSendKey;
INT_PTR ToggleEncryption(WPARAM w, LPARAM l)
{
@@ -227,7 +228,7 @@ INT_PTR ToggleEncryption(WPARAM w, LPARAM l)
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME;
enc?mi.pszName="Turn off GPG encryption":mi.pszName="Turn on GPG encryption";
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hToggleEncryption, (LPARAM)&mi);
+ Menu_ModifyItem(hToggleEncryption, &mi);
return 0;
}
@@ -260,7 +261,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM l)
mir_sntprintf(buf, 127 * sizeof(TCHAR), _T("%s: %s"), TranslateT("Send publick key"), toUTF16(keyid).c_str());
mi2.ptszName = buf;
mi2.flags = CMIM_NAME | CMIF_TCHAR;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hSendKey, (LPARAM)&mi2);
+ Menu_ModifyItem(hSendKey, &mi2);
}
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME;
@@ -273,7 +274,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM l)
else
mi.flags = CMIM_NAME | CMIM_FLAGS;
mi.pszName = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0)?"Turn off GPG encryption":"Turn on GPG encryption";
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hToggleEncryption, (LPARAM)&mi);
+ Menu_ModifyItem(hToggleEncryption, &mi);
return 0;
}