mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
e5f28a0f60
Make "Taps and gestures - Page turns" available only in reader. Move there other page turn related menu items from Navigation. Remove duplicated code. Added standard "star" for default RTL.
52 lines
1.8 KiB
Lua
52 lines
1.8 KiB
Lua
local InfoMessage = require("ui/widget/infomessage")
|
|
local UIManager = require("ui/uimanager")
|
|
local _ = require("gettext")
|
|
|
|
return {
|
|
text = _("Activate menu"),
|
|
sub_item_table = {
|
|
{
|
|
text = _("With a tap"),
|
|
checked_func = function()
|
|
return G_reader_settings:readSetting("activate_menu") ~= "swipe"
|
|
end,
|
|
callback = function()
|
|
if G_reader_settings:readSetting("activate_menu") ~= "swipe" then
|
|
G_reader_settings:saveSetting("activate_menu", "swipe")
|
|
else
|
|
G_reader_settings:saveSetting("activate_menu", "swipe_tap")
|
|
end
|
|
UIManager:show(InfoMessage:new{
|
|
text = _("This will take effect on next restart."),
|
|
})
|
|
end,
|
|
},
|
|
{
|
|
text = _("With a swipe"),
|
|
checked_func = function()
|
|
return G_reader_settings:readSetting("activate_menu") ~= "tap"
|
|
end,
|
|
callback = function()
|
|
if G_reader_settings:readSetting("activate_menu") ~= "tap" then
|
|
G_reader_settings:saveSetting("activate_menu", "tap")
|
|
else
|
|
G_reader_settings:saveSetting("activate_menu", "swipe_tap")
|
|
end
|
|
UIManager:show(InfoMessage:new{
|
|
text = _("This will take effect on next restart."),
|
|
})
|
|
end,
|
|
separator = true,
|
|
},
|
|
{
|
|
text = _("Auto-show bottom menu"),
|
|
checked_func = function()
|
|
return G_reader_settings:nilOrTrue("show_bottom_menu")
|
|
end,
|
|
callback = function()
|
|
G_reader_settings:flipNilOrTrue("show_bottom_menu")
|
|
end,
|
|
},
|
|
}
|
|
}
|