summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples/menus.lua
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-10 21:00:17 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-10 21:00:17 +0000
commit031b81f8764de5e566490248dbc4bb466c0b03e9 (patch)
treeb68acf9b7ff269aae2f81ad46ed6c6975414d114 /plugins/MirLua/docs/examples/menus.lua
parent02dc801c6e29d5dad184baff51be70a1c8b2b897 (diff)
MirLua:
- added OnModulesLoaded handler - added OnPreShutdown handler - renamed existing modules - changed modules loading - chaged examples git-svn-id: http://svn.miranda-ng.org/main/trunk@14107 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/docs/examples/menus.lua')
-rw-r--r--plugins/MirLua/docs/examples/menus.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/MirLua/docs/examples/menus.lua b/plugins/MirLua/docs/examples/menus.lua
index b2a3f222d2..90ace6f6d9 100644
--- a/plugins/MirLua/docs/examples/menus.lua
+++ b/plugins/MirLua/docs/examples/menus.lua
@@ -1,9 +1,9 @@
--- include m_menus module
-require('m_menus')
-require('m_icons')
+local genmenu = require('m_genmenu')
+local icolib = require('m_icolib')
--- Add icon for menu items
-local hIcon = M.Icons.AddIcon('testMenuIcon', 'Lua icon for menus')
+local hIcon = icolib.AddIcon('testMenuIcon', 'Lua icon for menus')
--- Add menu item to main menu
-- @param name The name of menu item
@@ -12,7 +12,7 @@ local hIcon = M.Icons.AddIcon('testMenuIcon', 'Lua icon for menus')
-- @param icon The handle of icon of menu item (default NULL)
-- @param service The name of service which will be called (default '')
-- @return handle of menu item
-M.Menus.AddMainMenuItem('Main menu item', 0, 0, hIcon, 'Srv/MMI')
+genmenu.AddMainMenuItem('Main menu item', 0, 0, hIcon, 'Srv/MMI')
--- Add menu item to contact menu
-- @param name The name of menu item
@@ -21,12 +21,12 @@ M.Menus.AddMainMenuItem('Main menu item', 0, 0, hIcon, 'Srv/MMI')
-- @param icon The handle of icon of menu item (default NULL)
-- @param service The name of service which will be called (default '')
-- @return handle of menu item
-M.Menus.AddContactMenuItem('Contact menu item', 0, 0, hIcon, 'Srv/CMI')
+genmenu.AddContactMenuItem('Contact menu item', 0, 0, hIcon, 'Srv/CMI')
--- Create the contact menu item which will be deleted below
-local hMenuItem = M.Menus.AddContactMenuItem('testRemove', 0, 0, 0, 'Srv/TestRemove')
+local hMenuItem = genmenu.AddContactMenuItem('testRemove', 0, 0, 0, 'Srv/TestRemove')
--- Remove menu item from parent menu
-- @param handle The handle of menu item
-- @return 0 on success
-M.Menus.RemoveMenuItem(hMenuItem)
+genmenu.RemoveMenuItem(hMenuItem)