|
|
|
@ -49,12 +49,6 @@ function FileManagerShortcuts:updateItemTable()
|
|
|
|
|
table.sort(item_table, function(l, r)
|
|
|
|
|
return l.text < r.text
|
|
|
|
|
end)
|
|
|
|
|
table.insert(item_table, 1, {
|
|
|
|
|
text = _("Add new folder shortcut"),
|
|
|
|
|
callback = function()
|
|
|
|
|
self:addNewFolder()
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- try to stay on current page
|
|
|
|
|
local select_number
|
|
|
|
@ -77,9 +71,8 @@ function FileManagerShortcuts:addNewFolder()
|
|
|
|
|
local add_folder_input
|
|
|
|
|
local friendly_name = util.basename(path) or _("my folder")
|
|
|
|
|
add_folder_input = InputDialog:new{
|
|
|
|
|
title = self.title,
|
|
|
|
|
title = _("Enter friendly name"),
|
|
|
|
|
input = friendly_name,
|
|
|
|
|
input_type = "text",
|
|
|
|
|
description = T(_("Title for selected folder:\n%1"), BD.dirpath(path)),
|
|
|
|
|
buttons = {
|
|
|
|
|
{
|
|
|
|
@ -166,7 +159,6 @@ function FileManagerShortcuts:editFolderShortcut(item)
|
|
|
|
|
edit_folder_input = InputDialog:new {
|
|
|
|
|
title = _("Edit friendly name"),
|
|
|
|
|
input = item.friendly_name,
|
|
|
|
|
input_type = "text",
|
|
|
|
|
description = T(_("Rename title for selected folder:\n%1"), BD.dirpath(item.folder)),
|
|
|
|
|
buttons = {
|
|
|
|
|
{
|
|
|
|
@ -243,6 +235,8 @@ function FileManagerShortcuts:onShowFolderShortcutsDialog()
|
|
|
|
|
curr_path = self.ui.file_chooser and self.ui.file_chooser.path or self.ui:getLastDirFile(),
|
|
|
|
|
onMenuHold = self.onMenuHold,
|
|
|
|
|
onSetRotationMode = self.MenuSetRotationModeHandler,
|
|
|
|
|
title_bar_left_icon = "plus",
|
|
|
|
|
onLeftButtonTap = function() self:addNewFolder() end,
|
|
|
|
|
_manager = self,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|