update to newest API change in master

This commit is contained in:
Jérémy Rosen
2016-04-17 20:46:32 +02:00
parent 204868d733
commit 783194e253
12 changed files with 24 additions and 30 deletions

View File

@@ -147,7 +147,7 @@ dt.register_lib(
local output_image = target_dir.."/enfuse.tiff"
local command = "enfuse --depth "..depth.value.." --exposure-mu "..ugly_decimal_point_hack
.." -o \""..output_image.."\" \"@"..response_file.."\""
if coroutine.yield("RUN_COMMAND", command) > 0 then
if dt.control.execute( command) > 0 then
dt.print("enfuse failed, see terminal output for details")
os.remove(response_file)
return

View File

@@ -97,7 +97,7 @@ dt.register_event("mouse-over-image-changed", function(event, img)
local command = command_setting:gsub("%$%(FILE_NAME%)", '"'..img_filename..'"')..' > "'..txt_filename..'"'
-- finally, run it
coroutine.yield("RUN_COMMAND", command)
dt.control.execute( command)
end
)

View File

@@ -128,7 +128,7 @@ dt.register_storage("export_pdf","Export thumbnails to pdf",
local dir=string.gsub(filename, "(.*/)(.*)", "%1")
local locfile=string.gsub(filename, "(.*/)(.*)", "%2")
local command = "pdflatex -halt-on-error -output-directory "..dir.." "..locfile
local result = coroutine.yield("RUN_COMMAND",command)
local result = dt.control.execute(command)
if result ~= 0 then
dt.print("Problem running pdflatex") -- this one is probably usefull to the user
error("Problem running "..command)
@@ -138,7 +138,7 @@ dt.register_storage("export_pdf","Export thumbnails to pdf",
local pdffile=string.gsub(filename, ".tex", ".pdf")
command = dt.preferences.read("selection_to_pdf","Open with","string")
command = command.." "..pdffile
local result = coroutine.yield("RUN_COMMAND",command)
local result = dt.control.execute(command)
if result ~= 0 then
dt.print("Problem running pdf viewer") -- this one is probably usefull to the user
error("Problem running "..command)