summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-12-07 16:15:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-12-07 16:15:24 +0000
commitf3151f33e282214080abacf04521296acec5e9de (patch)
treee6983507bbc83c6d788cf5bcf9d5e2da45f1daa4 /src
parentfcb800cc6b9c2bf47a65750fa99065cb2a935b87 (diff)
fix to apply the unique identifiers to all menu roots
git-svn-id: http://svn.miranda-ng.org/main/trunk@15826 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/stdhelp/src/help.cpp1
-rw-r--r--src/mir_app/src/menu_utils.cpp10
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/stdhelp/src/help.cpp b/src/core/stdhelp/src/help.cpp
index a1ab2d23f8..32249210a1 100644
--- a/src/core/stdhelp/src/help.cpp
+++ b/src/core/stdhelp/src/help.cpp
@@ -75,6 +75,7 @@ int LoadHelpModule(void)
CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("&Help"), 2000090000);
+ Menu_ConfigureItem(mi.root, MCI_OPT_UID, "8824ECA5-6942-46D7-9D07-1BA600E0D02E");
SET_UID(mi, 0xf3ebf1fa, 0x587c, 0x494d, 0xbd, 0x33, 0x7f, 0x88, 0xb3, 0x61, 0x1e, 0xd3);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp
index b3430d527f..884f6c7816 100644
--- a/src/mir_app/src/menu_utils.cpp
+++ b/src/mir_app/src/menu_utils.cpp
@@ -458,6 +458,8 @@ MIR_APP_DLL(BOOL) Menu_ProcessCommand(HGENMENU hMenuItem, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
+#pragma comment(lib, "Rpcrt4.lib")
+
MIR_APP_DLL(int) Menu_ConfigureItem(HGENMENU hItem, int iOption, INT_PTR value)
{
if (!bIsGenMenuInited)
@@ -480,6 +482,10 @@ MIR_APP_DLL(int) Menu_ConfigureItem(HGENMENU hItem, int iOption, INT_PTR value)
case MCI_OPT_EXECPARAM:
pimi->execParam = value;
return 0;
+
+ case MCI_OPT_UID:
+ UuidFromStringA((RPC_CSTR)value, (UUID*)&pimi->mi.uid);
+ return 0;
}
return 1;
@@ -733,6 +739,10 @@ MIR_APP_DLL(HGENMENU) Menu_AddItem(int hMenuObject, TMO_MenuItem *pmi, void *pUs
// if parent menu has no uid, copy our id instead
if (!equalUUID(pmi->uid, miid_last) && equalUUID(pRoot->mi.uid, miid_last)) {
+ char szUid[100];
+ bin2hex(&pmi->uid, sizeof(pmi->uid), szUid);
+ Netlib_Logf("[MENU]: fake UUID added to menu item %s", szUid);
+
pRoot->mi.uid = pmi->uid;
pRoot->mi.uid.d[7]--; // and make it slightly different
}