|
|
|
@ -84,7 +84,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
local fc = self.ui.file_chooser
|
|
|
|
|
local modes = {
|
|
|
|
|
{ _("Classic (filename only)") },
|
|
|
|
|
{ _("Mosaic"), "mosaic_image" },
|
|
|
|
|
{ _("Grid"), "mosaic_image" },
|
|
|
|
|
{ _("Detailed list"), "list_image_meta" },
|
|
|
|
|
}
|
|
|
|
|
local sub_item_table, history_sub_item_table, collection_sub_item_table = {}, {}, {}
|
|
|
|
@ -134,7 +134,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
table.insert(sub_item_table, {
|
|
|
|
|
text = _("Hide book covers"),
|
|
|
|
|
enabled_func = function()
|
|
|
|
|
return not fc.display_mode_type == false
|
|
|
|
|
return fc.display_mode_type and true or false
|
|
|
|
|
end,
|
|
|
|
|
checked_func = function()
|
|
|
|
|
return filemanager_display_mode == "mosaic_text" or filemanager_display_mode == "list_only_meta"
|
|
|
|
@ -171,7 +171,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
------------------------------------------------------------
|
|
|
|
|
-- add these settings to File browser Settings submenu
|
|
|
|
|
if menu_items.filebrowser_settings == nil then return end
|
|
|
|
|
table.insert(menu_items.filebrowser_settings.sub_item_table, 9, {
|
|
|
|
|
table.insert(menu_items.filebrowser_settings.sub_item_table, {
|
|
|
|
|
text = _("Book info cache management"),
|
|
|
|
|
sub_item_table = {
|
|
|
|
|
{
|
|
|
|
@ -268,14 +268,14 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text = _("History tab"),
|
|
|
|
|
text = _("History"),
|
|
|
|
|
enabled_func = function()
|
|
|
|
|
return not BookInfoManager:getSetting("unified_display_mode")
|
|
|
|
|
end,
|
|
|
|
|
sub_item_table = history_sub_item_table,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text = _("Collections tab"),
|
|
|
|
|
text = _("Collections"),
|
|
|
|
|
enabled_func = function()
|
|
|
|
|
return not BookInfoManager:getSetting("unified_display_mode")
|
|
|
|
|
end,
|
|
|
|
@ -285,19 +285,20 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- Classic view properties
|
|
|
|
|
table.insert(sub_item_table, menu_items.filebrowser_settings.sub_item_table[5])
|
|
|
|
|
table.remove(menu_items.filebrowser_settings.sub_item_table, 5)
|
|
|
|
|
|
|
|
|
|
table.insert(sub_item_table, {
|
|
|
|
|
text = _("Mosaic and list view properties"),
|
|
|
|
|
text = _("Grid and list view properties"),
|
|
|
|
|
separator = true,
|
|
|
|
|
enabled_func = function()
|
|
|
|
|
return not fc.display_mode_type == false
|
|
|
|
|
return fc.display_mode_type and true or false
|
|
|
|
|
end,
|
|
|
|
|
sub_item_table = {
|
|
|
|
|
{
|
|
|
|
|
text_func = function()
|
|
|
|
|
return T(_("Grid size in portrait-mosaic mode: %1 × %2"), fc.nb_cols_portrait, fc.nb_rows_portrait)
|
|
|
|
|
return T(_("Grid size in portrait mode: %1 × %2"), fc.nb_cols_portrait, fc.nb_rows_portrait)
|
|
|
|
|
end,
|
|
|
|
|
enabled_func = function()
|
|
|
|
|
return fc.display_mode_type == "mosaic"
|
|
|
|
@ -308,7 +309,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
local nb_rows = fc.nb_rows_portrait
|
|
|
|
|
local DoubleSpinWidget = require("/ui/widget/doublespinwidget")
|
|
|
|
|
local widget = DoubleSpinWidget:new{
|
|
|
|
|
title_text = _("Portrait mosaic view"),
|
|
|
|
|
title_text = _("Portrait grid view"),
|
|
|
|
|
width_factor = 0.6,
|
|
|
|
|
left_text = _("Columns"),
|
|
|
|
|
left_value = nb_cols,
|
|
|
|
@ -349,7 +350,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text_func = function()
|
|
|
|
|
return T(_("Grid size in landscape-mosaic mode: %1 × %2"), fc.nb_cols_landscape, fc.nb_rows_landscape)
|
|
|
|
|
return T(_("Grid size in landscape mode: %1 × %2"), fc.nb_cols_landscape, fc.nb_rows_landscape)
|
|
|
|
|
end,
|
|
|
|
|
enabled_func = function()
|
|
|
|
|
return fc.display_mode_type == "mosaic"
|
|
|
|
@ -359,7 +360,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
local nb_rows = fc.nb_rows_landscape
|
|
|
|
|
local DoubleSpinWidget = require("/ui/widget/doublespinwidget")
|
|
|
|
|
local widget = DoubleSpinWidget:new{
|
|
|
|
|
title_text = _("Landscape mosaic view"),
|
|
|
|
|
title_text = _("Landscape grid view"),
|
|
|
|
|
width_factor = 0.6,
|
|
|
|
|
left_text = _("Columns"),
|
|
|
|
|
left_value = nb_cols,
|
|
|
|
@ -488,7 +489,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text = _("Show file metadata"),
|
|
|
|
|
text = _("Show file properties"),
|
|
|
|
|
enabled_func = function()
|
|
|
|
|
return fc.display_mode_type == "list"
|
|
|
|
|
end,
|
|
|
|
@ -515,7 +516,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text = _("Show visual cue for books in history tab"),
|
|
|
|
|
text = _("Show visual cue for open books in history"),
|
|
|
|
|
checked_func = function() return BookInfoManager:getSetting("history_hint_opened") end,
|
|
|
|
|
callback = function()
|
|
|
|
|
BookInfoManager:toggleSetting("history_hint_opened")
|
|
|
|
@ -523,7 +524,7 @@ function CoverBrowser:addToMainMenu(menu_items)
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text = _("Show visual cue for books added to collections"),
|
|
|
|
|
text = _("Show visual cue for open books in collections"),
|
|
|
|
|
checked_func = function() return BookInfoManager:getSetting("collections_hint_opened") end,
|
|
|
|
|
callback = function()
|
|
|
|
|
BookInfoManager:toggleSetting("collections_hint_opened")
|
|
|
|
|