|
|
@ -1,28 +1,19 @@
|
|
|
|
local Device = require("device")
|
|
|
|
local Device = require("device")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Everything in there requires physicla page turn keys ;).
|
|
|
|
|
|
|
|
if Device:hasKeys() then
|
|
|
|
|
|
|
|
-- No menu entry at all if we don't have any
|
|
|
|
|
|
|
|
return {}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local Event = require("ui/event")
|
|
|
|
local Event = require("ui/event")
|
|
|
|
local UIManager = require("ui/uimanager")
|
|
|
|
local UIManager = require("ui/uimanager")
|
|
|
|
local _ = require("gettext")
|
|
|
|
local _ = require("gettext")
|
|
|
|
|
|
|
|
|
|
|
|
local PlatformNav = {
|
|
|
|
local PlatformNav = {
|
|
|
|
text = _("Page turn behavior"), -- Mainly so as to differentiate w/ "Page Turns" when in readermenu...
|
|
|
|
text = _("Page turn behavior"), -- Mainly so as to differentiate w/ "Page Turns" when in readermenu...
|
|
|
|
sub_item_table = {},
|
|
|
|
sub_item_table = {
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if Device:canDoSwipeAnimation() then
|
|
|
|
|
|
|
|
table.insert(PlatformNav.sub_item_table, {
|
|
|
|
|
|
|
|
text =_("Page turn animations"),
|
|
|
|
|
|
|
|
checked_func = function()
|
|
|
|
|
|
|
|
return G_reader_settings:isTrue("swipe_animations")
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
callback = function()
|
|
|
|
|
|
|
|
UIManager:broadcastEvent(Event:new("TogglePageChangeAnimation"))
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
separator = true,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if Device:hasKeys() then
|
|
|
|
|
|
|
|
table.insert(PlatformNav.sub_item_table, {
|
|
|
|
|
|
|
|
text = _("Invert page turn buttons"),
|
|
|
|
text = _("Invert page turn buttons"),
|
|
|
|
checked_func = function()
|
|
|
|
checked_func = function()
|
|
|
|
return G_reader_settings:isTrue("input_invert_page_turn_keys")
|
|
|
|
return G_reader_settings:isTrue("input_invert_page_turn_keys")
|
|
|
@ -30,12 +21,8 @@ if Device:hasKeys() then
|
|
|
|
callback = function()
|
|
|
|
callback = function()
|
|
|
|
UIManager:broadcastEvent(Event:new("SwapPageTurnButtons"))
|
|
|
|
UIManager:broadcastEvent(Event:new("SwapPageTurnButtons"))
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
end
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
-- No menu item at all if it's empty
|
|
|
|
|
|
|
|
if #PlatformNav.sub_item_table == 0 then
|
|
|
|
|
|
|
|
return {}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return PlatformNav
|
|
|
|
return PlatformNav
|
|
|
|