|
|
@ -3,6 +3,7 @@ local UIManager = require("ui/uimanager")
|
|
|
|
local Menu = require("ui/widget/menu")
|
|
|
|
local Menu = require("ui/widget/menu")
|
|
|
|
local Screen = require("device").screen
|
|
|
|
local Screen = require("device").screen
|
|
|
|
local Device = require("device")
|
|
|
|
local Device = require("device")
|
|
|
|
|
|
|
|
local DocSettings = require("docsettings")
|
|
|
|
local util = require("ffi/util")
|
|
|
|
local util = require("ffi/util")
|
|
|
|
local _ = require("gettext")
|
|
|
|
local _ = require("gettext")
|
|
|
|
local ffi = require("ffi")
|
|
|
|
local ffi = require("ffi")
|
|
|
@ -128,9 +129,15 @@ function FileChooser:genItemTableFromPath(path)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sstr = string.format("%d B", file_size)
|
|
|
|
sstr = string.format("%d B", file_size)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- show files with a .sdr in bold
|
|
|
|
|
|
|
|
local bold = nil
|
|
|
|
|
|
|
|
if DocSettings:hasSidecarDir(full_path) then
|
|
|
|
|
|
|
|
bold = true
|
|
|
|
|
|
|
|
end
|
|
|
|
table.insert(item_table, {
|
|
|
|
table.insert(item_table, {
|
|
|
|
text = file.name,
|
|
|
|
text = file.name,
|
|
|
|
mandatory = sstr,
|
|
|
|
mandatory = sstr,
|
|
|
|
|
|
|
|
bold = bold,
|
|
|
|
path = full_path
|
|
|
|
path = full_path
|
|
|
|
})
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|