show file size and directory items in filemanager

This commit is contained in:
chrox
2014-09-10 12:21:07 +08:00
parent 8294a629b8
commit 11a8a1dce6
3 changed files with 40 additions and 24 deletions

View File

@@ -28,8 +28,6 @@ local FileManager = InputContainer:extend{
}
function FileManager:init()
local exclude_dirs = {"%.sdr$"}
self.show_parent = self.show_parent or self
self.banner = VerticalGroup:new{
@@ -51,12 +49,6 @@ function FileManager:init()
is_popout = false,
is_borderless = true,
has_close_button = true,
dir_filter = function(dirname)
for _, pattern in ipairs(exclude_dirs) do
if dirname:match(pattern) then return end
end
return true
end,
file_filter = function(filename)
if DocumentRegistry:getProvider(filename) then
return true
@@ -164,6 +156,11 @@ function FileManager:onClose()
return true
end
function FileManager:onRefresh()
self.file_chooser:refreshPath()
return true
end
function FileManager:getDefaultDir()
if Device:isKindle() then
return "/mnt/us/documents"