aboutsummaryrefslogtreecommitdiff
path: root/core/ext/menu.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-01-14 09:21:50 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-01-14 09:21:50 -0500
commitd51cbf71f7c2982b4e8ef9b3066bbf22c42f3b81 (patch)
tree94b194bb3cc9133fa90be8712ac011ae62834b51 /core/ext/menu.lua
parent25632fd3a4ed2219a7c8350dfc0b9807292445be (diff)
downloadtextadept-d51cbf71f7c2982b4e8ef9b3066bbf22c42f3b81.tar.gz
textadept-d51cbf71f7c2982b4e8ef9b3066bbf22c42f3b81.zip
Added key commands, menu items, and locale strings for running/compiling files.
Diffstat (limited to 'core/ext/menu.lua')
-rw-r--r--core/ext/menu.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/ext/menu.lua b/core/ext/menu.lua
index 3398f47e..54f4a501 100644
--- a/core/ext/menu.lua
+++ b/core/ext/menu.lua
@@ -81,6 +81,8 @@ local ID = {
GOTO_LINE = 307,
-- Tools
FOCUS_COMMAND_ENTRY = 401,
+ RUN = 420,
+ COMPILE = 421,
INSERT_SNIPPET = 402,
PREVIOUS_SNIPPET_PLACEHOLDER = 403,
CANCEL_SNIPPET = 404,
@@ -282,6 +284,10 @@ t.menubar = {
gtkmenu {
title = l.MENU_TOOLS_TITLE,
{ l.MENU_TOOLS_FOCUS_COMMAND_ENTRY, ID.FOCUS_COMMAND_ENTRY },
+ { SEPARATOR, ID.SEPARATOR },
+ { l.MENU_TOOLS_RUN, ID.RUN },
+ { l.MENU_TOOLS_COMPILE, ID.COMPILE },
+ { SEPARATOR, ID.SEPARATOR },
{ title = l.MENU_TOOLS_SNIPPETS_TITLE,
{ l.MENU_TOOLS_SNIPPETS_INSERT, ID.INSERT_SNIPPET },
{ l.MENU_TOOLS_SNIPPETS_PREV_PLACE, ID.PREVIOUS_SNIPPET_PLACEHOLDER },
@@ -418,6 +424,7 @@ local m_editing = _m.textadept.editing
local m_mlines = _m.textadept.mlines
local m_bookmarks = _m.textadept.bookmarks
local m_macros = _m.textadept.macros
+local m_run = _m.textadept.run
local function pm_activate(text)
t.pm.entry_text = text
@@ -510,6 +517,8 @@ local actions = {
[ID.GOTO_LINE] = { m_editing.goto_line },
-- Tools
[ID.FOCUS_COMMAND_ENTRY] = { t.command_entry.focus },
+ [ID.RUN] = { m_run.go },
+ [ID.COMPILE] = { m_run.compile },
-- Tools -> Snippets
[ID.INSERT_SNIPPET] = { m_snippets.insert },
[ID.PREVIOUS_SNIPPET_PLACEHOLDER] = { m_snippets.prev },