summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-11 14:02:29 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-11 14:02:29 +0000
commit8ecb995a281008dbbc83ba8ea04ef28dbdc3d2e2 (patch)
tree753f5970ffbd881d60e7a633c255008e4401cf7d /plugins/MirLua/docs/examples
parent5778345f250585d701e34bbc1458f8c92a6166d2 (diff)
MirLua: added ModifyMenuItem to m_genmenu
git-svn-id: http://svn.miranda-ng.org/main/trunk@14116 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/docs/examples')
-rw-r--r--plugins/MirLua/docs/examples/menus.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/MirLua/docs/examples/menus.lua b/plugins/MirLua/docs/examples/menus.lua
index ee1ca258a8..fd20f92fe1 100644
--- a/plugins/MirLua/docs/examples/menus.lua
+++ b/plugins/MirLua/docs/examples/menus.lua
@@ -41,15 +41,12 @@ local CMIF_ROOTHANDLE = 384
local hRoot = genmenu.AddMainMenuItem({ Name = "Main menu root", Flags = CMIF_ROOTHANDLE })
--- Add child menu item
-menuItem.Name = "Main menu child"
+menuItem.Name = "Main menu child wierd"
menuItem.Flags = CMIF_ROOTHANDLE
menuItem.Service = 'Srv/SMI'
menuItem.Parent = hRoot
-genmenu.AddMainMenuItem(menuItem)
+local hChild = genmenu.AddMainMenuItem(menuItem)
---- Add child menu item
-menuItem.Name = "Main menu child 2"
-menuItem.Flags = CMIF_ROOTHANDLE
-menuItem.Service = 'Srv/SMI'
-menuItem.Parent = "&Help"
-genmenu.AddMainMenuItem(menuItem)
+--- Modify menu item
+local CMIM_NAME = tonumber("80000000", 16)
+genmenu.ModifyMenuItem(hChild, { Name = "Main menu child", Flags = CMIM_NAME })