2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

filechooser: added support for calling folder info

This commit is contained in:
NuPogodi 2012-09-24 18:15:30 +03:00
parent 59c212971f
commit 6a2b0d044d

View File

@ -332,10 +332,20 @@ function FileChooser:addAllCommands()
self.commands:add({KEY_FW_RIGHT, KEY_I}, nil, "joypad right",
"show document information",
function(self)
if self:FullFileName() then
FileInfo:show(self.path,self.files[self.perpage*(self.page-1)+self.current - #self.dirs])
self.pagedirty = true
local folder = self.dirs[self.perpage*(self.page-1)+self.current]
if folder then
if folder == ".." then
showInfoMsgWithDelay("<UP-DIR> ", 1000, 1)
else
folder = self.path.."/"..folder
if FileInfo:show(folder) == "goto" then
self:setPath(folder)
end
end
else -- file info
FileInfo:show(self.path, self.files[self.perpage*(self.page-1)+self.current-#self.dirs])
end
self.pagedirty = true
end
)
self.commands:add({KEY_ENTER, KEY_FW_PRESS}, nil, "Enter",