diff options
author | George Hazan <ghazan@miranda.im> | 2021-03-19 17:11:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-03-19 17:11:48 +0300 |
commit | be033094b81ececb2fd911b0212d3542491212f5 (patch) | |
tree | 6894b521325c4eceb85cedf2786d62ddea147495 /src/mir_app | |
parent | ee4f504dd03d02468d6aa08e11a497325d8dee51 (diff) |
Menu_ConfigureItem(hUserMenu, MCI_OPT_DISABLED, TRUE) - a setting to make a menu item hidden by default
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/genmenu.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/menu_utils.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mir_app/src/genmenu.h b/src/mir_app/src/genmenu.h index 27c72b947d..37ee580d52 100644 --- a/src/mir_app/src/genmenu.h +++ b/src/mir_app/src/genmenu.h @@ -49,7 +49,7 @@ struct TMO_IntMenuItem int iconId; // icon index in the section's image list
TMO_MenuItem mi; // user-defined data
char* pszUniqName; // unique name
- wchar_t* ptszCustomName;
+ wchar_t* ptszCustomName;
HANDLE hIcolibItem; // handle of iconlib item
HBITMAP hBmp;
int originalPosition; // !!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp index 7804d588a0..1380de2271 100644 --- a/src/mir_app/src/menu_utils.cpp +++ b/src/mir_app/src/menu_utils.cpp @@ -503,6 +503,10 @@ MIR_APP_DLL(int) Menu_ConfigureItem(HGENMENU hItem, int iOption, INT_PTR value) case MCI_OPT_UID:
UuidFromStringA((RPC_CSTR)value, (UUID*)&pimi->mi.uid);
return 0;
+
+ case MCI_OPT_DISABLED:
+ pimi->customVisible = false;
+ return 0;
}
return 1;
|