aboutsummaryrefslogtreecommitdiff
path: root/core/ext
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-01-26 16:54:56 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-01-26 16:54:56 -0500
commit10398566eb46ae7b76844c77501461ce1945755e (patch)
tree6c311fced5ec35db3a3d525fc1be7b890b321ca4 /core/ext
parentde75865048797117e548d894051a7ce76cbe4b05 (diff)
downloadtextadept-10398566eb46ae7b76844c77501461ce1945755e.tar.gz
textadept-10398566eb46ae7b76844c77501461ce1945755e.zip
Menu label text is irrelevant for PM menu actions due to l10n; focus on menu_id.
Diffstat (limited to 'core/ext')
-rw-r--r--core/ext/pm.lua5
-rw-r--r--core/ext/pm/buffer_browser.lua2
-rw-r--r--core/ext/pm/ctags_browser.lua2
-rw-r--r--core/ext/pm/file_browser.lua2
-rw-r--r--core/ext/pm/macro_browser.lua2
-rw-r--r--core/ext/pm/modules_browser.lua2
-rw-r--r--core/ext/pm/project_browser.lua2
7 files changed, 8 insertions, 9 deletions
diff --git a/core/ext/pm.lua b/core/ext/pm.lua
index 8122c419..e70ae6e2 100644
--- a/core/ext/pm.lua
+++ b/core/ext/pm.lua
@@ -107,14 +107,13 @@ end
---
-- Performs an action based on the selected menu item.
-- This function is called internally and shouldn't be called by a script.
--- @param menu_item The label text of the menu item selected.
-- @param menu_id The numeric ID of the menu item.
-- @param selected_item Identical to 'full_path' in pm.get_contents_for.
-- @see pm.get_contents_for
-function pm.perform_menu_action(menu_item, menu_id, selected_item)
+function pm.perform_menu_action(menu_id, selected_item)
for _, browser in pairs(pm.browsers) do
if browser.matches(selected_item[1]) then
- return browser.perform_menu_action(menu_item, menu_id, selected_item)
+ return browser.perform_menu_action(menu_id, selected_item)
end
end
end
diff --git a/core/ext/pm/buffer_browser.lua b/core/ext/pm/buffer_browser.lua
index b2c04957..f9b69b8c 100644
--- a/core/ext/pm/buffer_browser.lua
+++ b/core/ext/pm/buffer_browser.lua
@@ -46,7 +46,7 @@ function get_context_menu(selected_item)
}
end
-function perform_menu_action(menu_item, menu_id, selected_item)
+function perform_menu_action(menu_id, selected_item)
if menu_id == ID.NEW then
textadept.new_buffer()
elseif menu_id == ID.OPEN then
diff --git a/core/ext/pm/ctags_browser.lua b/core/ext/pm/ctags_browser.lua
index 8f112470..4de96096 100644
--- a/core/ext/pm/ctags_browser.lua
+++ b/core/ext/pm/ctags_browser.lua
@@ -232,7 +232,7 @@ function get_context_menu(selected_item)
end
-function perform_menu_action(menu_item, menu_id, selected_item)
+function perform_menu_action(menu_id, selected_item)
end
diff --git a/core/ext/pm/file_browser.lua b/core/ext/pm/file_browser.lua
index 7c03518a..3e95a2ce 100644
--- a/core/ext/pm/file_browser.lua
+++ b/core/ext/pm/file_browser.lua
@@ -51,7 +51,7 @@ function get_context_menu(selected_item)
}
end
-function perform_menu_action(menu_item, menu_id, selected_item)
+function perform_menu_action(menu_id, selected_item)
local locale = textadept.locale
local filepath = table.concat(selected_item, '/')
if menu_id == ID.CHANGE_DIR then
diff --git a/core/ext/pm/macro_browser.lua b/core/ext/pm/macro_browser.lua
index 051487cf..eab11842 100644
--- a/core/ext/pm/macro_browser.lua
+++ b/core/ext/pm/macro_browser.lua
@@ -30,7 +30,7 @@ function get_context_menu(selected_item)
return { { locale.PM_BROWSER_MACRO_DELETE, ID.DELETE } }
end
-function perform_menu_action(menu_item, menu_id, selected_item)
+function perform_menu_action(menu_id, selected_item)
local m_macros = _m.textadept.macros
if menu_id == ID.DELETE then
m_macros.delete(selected_item[2])
diff --git a/core/ext/pm/modules_browser.lua b/core/ext/pm/modules_browser.lua
index 5cf93d25..9bcdd6df 100644
--- a/core/ext/pm/modules_browser.lua
+++ b/core/ext/pm/modules_browser.lua
@@ -122,7 +122,7 @@ function get_context_menu(selected_item)
}
end
-function perform_menu_action(menu_item, menu_id, selected_item)
+function perform_menu_action(menu_id, selected_item)
local locale = textadept.locale
if menu_id == ID.NEW then
local status, module_name =
diff --git a/core/ext/pm/project_browser.lua b/core/ext/pm/project_browser.lua
index 9a6c078a..8c99194c 100644
--- a/core/ext/pm/project_browser.lua
+++ b/core/ext/pm/project_browser.lua
@@ -98,7 +98,7 @@ function get_context_menu(selected_item)
}
end
-function perform_menu_action(menu_item, menu_id, selected_item)
+function perform_menu_action(menu_id, selected_item)
local locale = textadept.locale
if menu_id == ID.NEW then
-- Close all open files and prompt the user to save a project file.