Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Michael Hall
2014-08-25 18:08:14 +01:00
10 changed files with 62 additions and 34 deletions

View File

@@ -83,7 +83,8 @@ function Font:_readList(target, dir, effective_dir)
self:_readList(target, dir.."/"..f, effective_dir..f.."/")
else
local file_type = string.lower(string.match(f, ".+%.([^.]+)") or "")
if file_type == "ttf" or file_type == "cff" or file_type == "otf" then
if file_type == "ttf" or file_type == "ttc"
or file_type == "cff" or file_type == "otf" then
table.insert(target, effective_dir..f)
end
end

View File

@@ -39,8 +39,9 @@ function FileChooser:genItemTableFromPath(path)
local files = {}
-- lfs.dir directory without permission will give error
if pcall(lfs.dir, self.path) then
for f in lfs.dir(self.path) do
local ok, iter, dir_obj = pcall(lfs.dir, self.path)
if ok then
for f in iter, dir_obj do
if self.show_hidden or not string.match(f, "^%.[^.]") then
local filename = self.path.."/"..f
local filemode = lfs.attributes(filename, "mode")

View File

@@ -203,11 +203,6 @@ function VirtualKeyboard:init()
}
}
self:initLayout(self.layout)
if GLOBAL_INPUT_VALUE then
for i = 1, string.len(GLOBAL_INPUT_VALUE) do
self:addChar(string.sub(GLOBAL_INPUT_VALUE,i,i))
end
end
end
function VirtualKeyboard:initLayout(layout)