aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/menu.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-07-30 19:02:51 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-07-30 19:02:51 -0400
commitf34ffdf83c66991efc42b04bb312af0a787d201e (patch)
tree7888793f826bbfd5611f47176816412454d719ac /modules/textadept/menu.lua
parent36675f10b0cefaee7e9451b3eec3dfd715888625 (diff)
downloadtextadept-f34ffdf83c66991efc42b04bb312af0a787d201e.tar.gz
textadept-f34ffdf83c66991efc42b04bb312af0a787d201e.zip
Code cleanup.
Diffstat (limited to 'modules/textadept/menu.lua')
-rw-r--r--modules/textadept/menu.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua
index efe18e1f..541f18a6 100644
--- a/modules/textadept/menu.lua
+++ b/modules/textadept/menu.lua
@@ -13,7 +13,7 @@ module('_m.textadept.menu', package.seeall)
local _buffer, _view = buffer, view
local m_textadept, m_editing = _m.textadept, _m.textadept.editing
local c, SEPARATOR = _SCINTILLA.constants, { 'separator' }
-local utils = _m.textadept.keys.utils
+local utils = m_textadept.keys.utils
-- Get a string uniquely identifying a key command.
-- This is used to match menu items with key commands to show the key shortcut.
@@ -209,8 +209,9 @@ menubar = {
{ utils.open_webpage, _HOME..'/doc/manual/1_Introduction.html' } },
{ L('Show LuaDoc'), { utils.open_webpage, _HOME..'/doc/index.html' } },
SEPARATOR,
- { L('gtk-about'), { gui.dialog, 'ok-msgbox', '--title', 'Textadept',
- '--informative-text', _RELEASE, '--no-cancel' } },
+ { L('gtk-about'),
+ { gui.dialog, 'ok-msgbox', '--title', 'Textadept', '--informative-text',
+ _RELEASE, '--no-cancel' } },
},
}
@@ -245,8 +246,7 @@ local function read_menu_table(menu)
if menuitem.title then
gtkmenu[#gtkmenu + 1] = read_menu_table(menuitem)
else
- local label, f = menuitem[1], menuitem[2]
- local menu_id = #menu_actions + 1
+ local label, f, menu_id = menuitem[1], menuitem[2], #menu_actions + 1
local key, mods = keys.get_gdk_key(key_shortcuts[get_id(f)])
gtkmenu[#gtkmenu + 1] = { label, menu_id, key, mods }
if f then menu_actions[menu_id] = f end