From a8e87e8efd47676ff0f04fbfba14be189b169ebb Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 8 Jul 2009 19:39:26 -0400 Subject: Replace lua_dialog with gcocoadialog. --- core/ext/find.lua | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'core/ext/find.lua') 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 -- cgit v1.2.3