screenshot shorcut patch by NuPogodi@mobileread

Qingping Hou 12 years ago
parent 381b34cc04
commit c818d7e90e

@ -37,6 +37,7 @@ function CREReader:open(filename)
end
-- detect file type for documents inside zip file
-- @TODO do the detection after the file is unzipped 30.04 2012 (houqp)
if file_type == "zip" then
-- store filename without zip-extention to fn
local fn = string.lower(string.sub(filename,0,-4))

@ -2402,6 +2402,17 @@ function UniReader:addAllCommands()
unireader:goto(unireader.pageno)
end
)
self.commands:add(KEY_P, MOD_SHIFT, "P",
"make screenshot",
function(unireader)
--@TODO convert bitmap to png or jpeg 30.04 2012 (houqp)
os.execute("mkdir ".."/mnt/us/kindlepdfviewer/screenshots")
local d = os.date("%Y%m%d%H%M%S")
InfoMessage:show("making screenshot...", 1)
os.execute("dd ".."if=/dev/fb0 ".."of=/mnt/us/kindlepdfviewer/screenshots/" .. d .. ".raw")
unireader:redrawCurrentPage()
end
)
-- commands.map is very large, impacts startup performance on device
--debug("defined commands "..dump(self.commands.map))
end

Loading…
Cancel
Save