diff options
author | George Hazan <george.hazan@gmail.com> | 2015-12-02 22:25:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-12-02 22:25:39 +0000 |
commit | 1b5b29808bb2d596b69e61149cd690f2306812b7 (patch) | |
tree | f4ef5041c1ce989d7019d407425396823f8e3f52 | |
parent | 78c9a9412cfbcbb65d838368888ba2cb99a87452 (diff) |
crutch for assigning virtual menu ids to menu roots without ids
git-svn-id: http://svn.miranda-ng.org/main/trunk@15809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | src/mir_app/src/menu_utils.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp index 88bcf826ae..965a613116 100644 --- a/src/mir_app/src/menu_utils.cpp +++ b/src/mir_app/src/menu_utils.cpp @@ -727,8 +727,15 @@ MIR_APP_DLL(HGENMENU) Menu_AddItem(int hMenuObject, TMO_MenuItem *pmi, void *pUs if (pRoot) {
p->owner = &pRoot->submenu;
+ // if parent menu has no icon, copy our icon there
if (pRoot->iconId == -1)
pRoot->iconId = p->iconId;
+
+ // if parent menu has no uid, copy our id instead
+ if (!equalUUID(pmi->uid, miid_last) && equalUUID(pRoot->mi.uid, miid_last)) {
+ pRoot->mi.uid = pmi->uid;
+ pRoot->mi.uid.d[7]--; // and make it slightly different
+ }
}
else p->owner = &pmo->m_items;
|