aboutsummaryrefslogtreecommitdiff
path: root/core/ext/pm/modules_browser.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-01-08 15:54:26 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-01-08 15:54:26 -0500
commit0194a626fcb17bcb037341fc6c2f586f54d26035 (patch)
tree9b54a08a6f30ce597b751190c113b934a3bb2b6d /core/ext/pm/modules_browser.lua
parent1267b118ffebf604639ca7a56660a1b4b69a2b85 (diff)
downloadtextadept-0194a626fcb17bcb037341fc6c2f586f54d26035.tar.gz
textadept-0194a626fcb17bcb037341fc6c2f586f54d26035.zip
Reformatted all C and Lua code to a single standard for each language.
Diffstat (limited to 'core/ext/pm/modules_browser.lua')
-rw-r--r--core/ext/pm/modules_browser.lua28
1 files changed, 15 insertions, 13 deletions
diff --git a/core/ext/pm/modules_browser.lua b/core/ext/pm/modules_browser.lua
index 95a5bd9f..4fc97206 100644
--- a/core/ext/pm/modules_browser.lua
+++ b/core/ext/pm/modules_browser.lua
@@ -123,15 +123,17 @@ end
function perform_menu_action(menu_item, menu_id, selected_item)
local locale = textadept.locale
if menu_id == ID.NEW then
- local status, module_name = cocoa_dialog( 'standard-inputbox', {
- ['title'] = locale.PM_BROWSER_MODULE_NEW_TITLE,
- ['informative-text'] = locale.PM_BROWSER_MODULE_NEW_INFO_TEXT
- } ):match('^(%d)%s+([^\n]+)%s+$')
+ local status, module_name =
+ cocoa_dialog('standard-inputbox', {
+ ['title'] = locale.PM_BROWSER_MODULE_NEW_TITLE,
+ ['informative-text'] = locale.PM_BROWSER_MODULE_NEW_INFO_TEXT
+ }):match('^(%d)%s+([^\n]+)%s+$')
if status ~= '1' then return end
- local status, lang_name = cocoa_dialog( 'standard-inputbox', {
- ['title'] = locale.PM_BROWSER_MODULE_NEW_LANG_TITLE,
- ['informative-text'] = locale.PM_BROWSER_MODULE_NEW_LANG_INFO_TEXT
- } ):match('^(%d)%s+([^\n]+)%s+$')
+ local status, lang_name =
+ cocoa_dialog('standard-inputbox', {
+ ['title'] = locale.PM_BROWSER_MODULE_NEW_LANG_TITLE,
+ ['informative-text'] = locale.PM_BROWSER_MODULE_NEW_LANG_INFO_TEXT
+ }):match('^(%d)%s+([^\n]+)%s+$')
if status ~= '1' then return end
local module_dir = _HOME..'/modules/'..module_name
if lfs.mkdir(module_dir) then
@@ -151,22 +153,22 @@ function perform_menu_action(menu_item, menu_id, selected_item)
f:write(out)
f:close()
else
- cocoa_dialog( 'ok-msgbox', {
+ cocoa_dialog('ok-msgbox', {
['text'] = locale.PM_BROWSER_MODULE_NEW_ERROR,
['informative-text'] = locale.PM_BROWSER_MODULE_NEW_ERROR_TEXT,
['no-cancel'] = true
- } )
+ })
return
end
elseif menu_id == ID.DELETE then
local module_name = selected_item[2]
- if cocoa_dialog( 'yesno-msgbox', {
+ if cocoa_dialog('yesno-msgbox', {
['text'] = locale.PM_BROWSER_MODULE_DELETE_TITLE,
['informative-text'] =
- string.format( locale.PM_BROWSER_MODULE_DELETE_TEXT, module_name ),
+ string.format(locale.PM_BROWSER_MODULE_DELETE_TEXT, module_name),
['no-cancel'] = true,
['no-newline'] = true
- } ) == '1' then
+ }) == '1' then
local function remove_directory(dirpath)
for name in lfs.dir(dirpath) do
if not name:match('^%.%.?$') then os.remove(dirpath..'/'..name) end