summaryrefslogtreecommitdiff
path: root/plugins/MenuItemEx/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-04 18:57:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-04 18:57:44 +0000
commitd716f207aa8b71f35e3872fd6b34651703c2beb7 (patch)
tree1ddff4e84ac5bc8e73e3796f1d9b07d7b6599388 /plugins/MenuItemEx/src
parentc3fbe61899fda92575cdaec8e29301ea2707d8e6 (diff)
links to options don't work with langpacks
git-svn-id: http://svn.miranda-ng.org/main/trunk@1355 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MenuItemEx/src')
-rw-r--r--plugins/MenuItemEx/src/main.cpp31
1 files changed, 14 insertions, 17 deletions
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 760520ce91..ca7a914527 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -19,8 +19,8 @@
const int vf_default = VF_VS|VF_HFL|VF_IGN|VF_CID|VF_SHOWID|VF_RECV|VF_STAT|VF_SMNAME|VF_CIDN|VF_CIP;
HINSTANCE hinstance;
-HANDLE hmenuVis,hmenuOff,hmenuHide,hmenuIgnore,hmenuProto,hmenuAdded,hmenuAuthReq;
-HANDLE hmenuCopyID,hmenuRecvFiles,hmenuStatusMsg,hmenuCopyIP,hmenuCopyMirVer;
+HGENMENU hmenuVis,hmenuOff,hmenuHide,hmenuIgnore,hmenuProto,hmenuAdded,hmenuAuthReq;
+HGENMENU hmenuCopyID,hmenuRecvFiles,hmenuStatusMsg,hmenuCopyIP,hmenuCopyMirVer;
static HANDLE hIgnoreItem[9], hProtoItem[MAX_PROTOS], hHooks[8], hServices[12];
HICON hIcon[5];
BOOL bMetaContacts, bMir_08;
@@ -914,20 +914,17 @@ INT_PTR onIgnore(WPARAM wparam,LPARAM lparam)
return 0;
}
-static HANDLE AddSubmenuItem(HANDLE hRoot, TCHAR* name, HICON icon, DWORD flag, char* service, int pos, int param)
+static HANDLE AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD flag, char* service, int pos, int param)
{
- CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(mi);
- mi.hParentMenu = (HGENMENU)hRoot;
- mi.pszPopupName = (char*)hRoot; // for Miranda 0.7
- mi.popupPosition = param;
- mi.position = pos;
- mi.ptszName = name;
- mi.hIcon = icon;
- mi.flags = CMIF_TCHAR | CMIF_CHILDPOPUP;
- if (flag)
- mi.flags |= flag;
- mi.pszService = service;
+ CLISTMENUITEM mi = { 0 };
+ mi.cbSize = sizeof(mi);
+ mi.hParentMenu = hRoot;
+ mi.popupPosition = param;
+ mi.position = pos;
+ mi.ptszName = name;
+ mi.hIcon = icon;
+ mi.flags = CMIF_TCHAR | CMIF_CHILDPOPUP | flag;
+ mi.pszService = service;
return Menu_AddContactMenuItem(&mi);
}
@@ -1094,7 +1091,7 @@ int EnumProtoSubmenu(WPARAM wparam, LPARAM lparam)
protoCount = MAX_PROTOS;
for (i = 0; i < protoCount; i++)
{
- hProtoItem[i] = AddSubmenuItem((HGENMENU)hmenuProto, accs[i]->tszAccountName,
+ hProtoItem[i] = AddSubmenuItem(hmenuProto, accs[i]->tszAccountName,
LoadSkinnedProtoIcon(accs[i]->szModuleName, ID_STATUS_ONLINE), CMIF_KEEPUNTRANSLATED,
MS_PROTO, pos++, (int)accs[i]->szModuleName);
}
@@ -1270,7 +1267,7 @@ static int PluginInit(WPARAM wparam,LPARAM lparam)
ood.cbSize = sizeof(ood);
ood.pszGroup = "Events";
ood.pszPage = "Ignore";
- AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_ignore"), 0, MS_OPT_OPENOPTIONS, pos, (int)&ood );
+ AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_ignore"), 0, "Opt/OpenOptions", pos, (int)&ood );
mi.pszPopupName = 0;
if (bMir_08) {