aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/menu.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-06-02 06:29:28 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-06-02 06:29:28 -0400
commit0905cd65f9dd7509ee059a35cc156af7cfc543dc (patch)
tree93b93e07965838b8f253bd27c7a887d00615bf31 /modules/textadept/menu.lua
parente399248490c69f96e595413356242eb1b3683efd (diff)
downloadtextadept-0905cd65f9dd7509ee059a35cc156af7cfc543dc.tar.gz
textadept-0905cd65f9dd7509ee059a35cc156af7cfc543dc.zip
Fix broken code from ncurses changes; modules/textadept/menu.lua
Diffstat (limited to 'modules/textadept/menu.lua')
-rw-r--r--modules/textadept/menu.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua
index 45621703..cf9f0d7e 100644
--- a/modules/textadept/menu.lua
+++ b/modules/textadept/menu.lua
@@ -241,13 +241,13 @@ M.context_menu = {
local key_shortcuts = {}
local menu_actions, contextmenu_actions = {}, {}
--- Creates a menu suitable for `gui.gtkmenu()` from the menu table format.
+-- Creates a menu suitable for `gui.menu()` from the menu table format.
-- Also assigns key commands.
--- @param menu The menu to create a gtkmenu from.
+-- @param menu The menu to create a GTK menu from.
-- @param contextmenu Flag indicating whether or not the menu is a context menu.
-- If so, menu_id offset is 1000. The default value is `false`.
--- @return gtkmenu that can be passed to `gui.gtkmenu()`.
--- @see gui.gtkmenu
+-- @return GTK menu that can be passed to `gui.menu()`.
+-- @see gui.menu
local function read_menu_table(menu, contextmenu)
local gtkmenu = {}
gtkmenu.title = menu.title
@@ -288,7 +288,7 @@ function M.set_menubar(menubar)
menu_actions = {}
local _menubar = {}
for i = 1, #menubar do
- _menubar[#_menubar + 1] = gui.gtkmenu(read_menu_table(menubar[i]))
+ _menubar[#_menubar + 1] = gui.menu(read_menu_table(menubar[i]))
end
gui.menubar = _menubar
end
@@ -302,7 +302,7 @@ M.set_menubar(M.menubar)
-- @name set_contextmenu
function M.set_contextmenu(menu_table)
contextmenu_actions = {}
- gui.context_menu = gui.gtkmenu(read_menu_table(menu_table, true))
+ gui.context_menu = gui.menu(read_menu_table(menu_table, true))
end
M.set_contextmenu(M.context_menu)