|
|
|
@ -28,6 +28,7 @@ local FileChooser = Menu:extend{
|
|
|
|
|
strcoll = strcoll,
|
|
|
|
|
collate = "strcoll", -- or collate = "access",
|
|
|
|
|
reverse_collate = false,
|
|
|
|
|
path_pages = {}, -- store last browsed location(page) for each path
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function FileChooser:init()
|
|
|
|
@ -148,8 +149,14 @@ function FileChooser:genItemTableFromPath(path)
|
|
|
|
|
return item_table
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function FileChooser:updateItems(select_number)
|
|
|
|
|
Menu.updateItems(self, select_number) -- call parent's updateItems()
|
|
|
|
|
self.path_pages[self.path] = self.page
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function FileChooser:refreshPath()
|
|
|
|
|
self:swithItemTable(nil, self:genItemTableFromPath(self.path))
|
|
|
|
|
self.page = self.path_pages[self.path] or 1
|
|
|
|
|
self:swithItemTable(nil, self:genItemTableFromPath(self.path), -1)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function FileChooser:changeToPath(path)
|
|
|
|
|