2017-08-08 16:20:46 +00:00
|
|
|
local UIManager = require("ui/uimanager")
|
|
|
|
local _ = require("gettext")
|
|
|
|
|
|
|
|
return {
|
|
|
|
text = _("Activate menu"),
|
|
|
|
sub_item_table = {
|
|
|
|
{
|
2021-07-25 21:59:06 +00:00
|
|
|
text = _("With a tap"),
|
2017-08-08 16:20:46 +00:00
|
|
|
checked_func = function()
|
2021-07-23 15:19:36 +00:00
|
|
|
return G_reader_settings:readSetting("activate_menu") ~= "swipe"
|
2017-08-08 16:20:46 +00:00
|
|
|
end,
|
|
|
|
callback = function()
|
2021-07-23 15:19:36 +00:00
|
|
|
if G_reader_settings:readSetting("activate_menu") ~= "swipe" then
|
|
|
|
G_reader_settings:saveSetting("activate_menu", "swipe")
|
2017-08-08 16:20:46 +00:00
|
|
|
else
|
2021-07-23 15:19:36 +00:00
|
|
|
G_reader_settings:saveSetting("activate_menu", "swipe_tap")
|
2017-08-08 16:20:46 +00:00
|
|
|
end
|
2022-12-03 20:29:13 +00:00
|
|
|
UIManager:askForRestart()
|
2021-07-23 15:19:36 +00:00
|
|
|
end,
|
2017-08-08 16:20:46 +00:00
|
|
|
},
|
|
|
|
{
|
2021-07-25 21:59:06 +00:00
|
|
|
text = _("With a swipe"),
|
2017-08-08 16:20:46 +00:00
|
|
|
checked_func = function()
|
2021-07-23 15:19:36 +00:00
|
|
|
return G_reader_settings:readSetting("activate_menu") ~= "tap"
|
2017-08-08 16:20:46 +00:00
|
|
|
end,
|
|
|
|
callback = function()
|
2021-07-23 15:19:36 +00:00
|
|
|
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
|
2022-12-03 20:29:13 +00:00
|
|
|
UIManager:askForRestart()
|
2017-10-08 10:27:53 +00:00
|
|
|
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,
|
2017-08-08 16:20:46 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|