mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Profiles: add "on rotation" auto-execute event (#12612)
This commit is contained in:
@@ -3,7 +3,6 @@ local Event = require("ui/event")
|
||||
local FileManager = require("apps/filemanager/filemanager")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local _ = require("gettext")
|
||||
local C_ = _.pgettext
|
||||
local Screen = Device.screen
|
||||
|
||||
local function genMenuItem(text, mode)
|
||||
@@ -78,10 +77,10 @@ When unchecked, the default rotation of the file browser and the default/saved r
|
||||
})
|
||||
|
||||
if FileManager.instance then
|
||||
table.insert(rotation_table, genMenuItem(C_("Rotation", "⤹ 90°"), Screen.DEVICE_ROTATED_COUNTER_CLOCKWISE))
|
||||
table.insert(rotation_table, genMenuItem(C_("Rotation", "↑ 0°"), Screen.DEVICE_ROTATED_UPRIGHT))
|
||||
table.insert(rotation_table, genMenuItem(C_("Rotation", "⤸ 90°"), Screen.DEVICE_ROTATED_CLOCKWISE))
|
||||
table.insert(rotation_table, genMenuItem(C_("Rotation", "↓ 180°"), Screen.DEVICE_ROTATED_UPSIDE_DOWN))
|
||||
local optionsutil = require("ui/data/optionsutil")
|
||||
for i, mode in ipairs(optionsutil.rotation_modes) do
|
||||
table.insert(rotation_table, genMenuItem(optionsutil.rotation_labels[i], mode))
|
||||
end
|
||||
end
|
||||
|
||||
rotation_table[#rotation_table].separator = true
|
||||
|
||||
Reference in New Issue
Block a user