diff options
author | 2009-07-08 19:39:26 -0400 | |
---|---|---|
committer | 2009-07-08 19:39:26 -0400 | |
commit | a8e87e8efd47676ff0f04fbfba14be189b169ebb (patch) | |
tree | e04ec88b6ad70d43b39e0c2700a86affc316fa88 /core/ext/find.lua | |
parent | 9827462bc8ac4ecc6009f2285c2397bf6ff64777 (diff) | |
download | textadept-a8e87e8efd47676ff0f04fbfba14be189b169ebb.tar.gz textadept-a8e87e8efd47676ff0f04fbfba14be189b169ebb.zip |
Replace lua_dialog with gcocoadialog.
Diffstat (limited to 'core/ext/find.lua')
-rw-r--r-- | core/ext/find.lua | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/core/ext/find.lua b/core/ext/find.lua index c97cefd3..1f3dfa99 100644 --- a/core/ext/find.lua +++ b/core/ext/find.lua @@ -79,13 +79,13 @@ local function find_(text, next, flags, nowrap, wrapped) else -- find in files local utf8_dir = - cocoa_dialog('fileselect', { - title = locale.FIND_IN_FILES_TITLE, - text = locale.FIND_IN_FILES_TEXT, - ['select-only-directories'] = true, - ['with-directory'] = (buffer.filename or ''):match('^.+[/\\]'), - ['no-newline'] = true - }) + textadept.dialog('fileselect', + '--title', locale.FIND_IN_FILES_TITLE, + '--text', locale.FIND_IN_FILES_TEXT, + '--select-only-directories', + '--with-directory', + (buffer.filename or ''):match('^.+[/\\]') or '', + '--no-newline') if #utf8_dir > 0 then if not find.lua then text = text:gsub('([().*+?^$%%[%]-])', '%%%1') end if not find.match_case then text = text:lower() end @@ -182,12 +182,11 @@ local function replace(rtext) function(code) local ret, val = pcall(loadstring('return '..code)) if not ret then - cocoa_dialog('ok-msgbox', { - title = locale.FIND_ERROR_DIALOG_TITLE, - text = locale.FIND_ERROR_DIALOG_TEXT, - ['informative-text'] = val:gsub('"', '\\"'), - ['no-cancel'] = true - }) + textadept.dialog('ok-msgbox', + '--title', locale.FIND_ERROR_DIALOG_TITLE, + '--text', locale.FIND_ERROR_DIALOG_TEXT, + '--informative-text', val:gsub('"', '\\"'), + '--no-cancel') error() end return val |