mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bump crengine: support for EPUB3 nav toc and page maps Includes: - Fix lvRect:isRectInside(rc) with 0-width or 0-height rect - TOC: parse EPUB3 nav toc, fallback to spine when no toc - Parse and cache various hardcopy page list maps - epub.css: hide EPUB3 <span epub:type="pagebreak"> content cre.cpp: add a few PageMap helper functions. Adds ReaderPageMap which will add a new menu (under TOC and Bookmarks) that will allow: - to list source page numbers (like a TOC) - to show visible page labels in the right margin - to use these source page numbers in the footer, the TOC, the GoTo and SkimTo widgets, and to use the source page number in the standard bookmark and highlight initial text.
194 lines
4.9 KiB
Lua
194 lines
4.9 KiB
Lua
local Device = require("device")
|
|
|
|
local order = {
|
|
["KOMenu:menu_buttons"] = {
|
|
"navi",
|
|
"typeset",
|
|
"setting",
|
|
"tools",
|
|
"search",
|
|
"filemanager",
|
|
"main",
|
|
},
|
|
navi = {
|
|
"table_of_contents",
|
|
"bookmarks",
|
|
"toggle_bookmark",
|
|
"bookmark_browsing_mode",
|
|
"page_map",
|
|
"----------------------------",
|
|
"go_to",
|
|
"skim_to",
|
|
"autoturn",
|
|
"----------------------------",
|
|
"go_to_previous_location",
|
|
},
|
|
typeset = {
|
|
"set_render_style",
|
|
"style_tweaks",
|
|
"----------------------------",
|
|
"change_font",
|
|
"hyphenation",
|
|
"floating_punctuation",
|
|
"----------------------------",
|
|
"switch_zoom_mode",
|
|
"----------------------------",
|
|
"page_overlap",
|
|
"speed_reading_module_perception_expander",
|
|
"----------------------------",
|
|
"highlight_options",
|
|
},
|
|
setting = {
|
|
-- common settings
|
|
-- those that don't exist will simply be skipped during menu gen
|
|
"frontlight", -- if Device:hasFrontlight()
|
|
"night_mode",
|
|
"----------------------------",
|
|
"network",
|
|
"screen",
|
|
"----------------------------",
|
|
"taps_and_gestures",
|
|
"navigation",
|
|
"document",
|
|
"----------------------------",
|
|
"language",
|
|
"device",
|
|
"----------------------------",
|
|
"djvu_render_mode",
|
|
"status_bar",
|
|
},
|
|
device = {
|
|
"keyboard_layout",
|
|
"time",
|
|
"battery",
|
|
"autosuspend",
|
|
"autoshutdown",
|
|
"ignore_sleepcover",
|
|
"ignore_open_sleepcover",
|
|
"mass_storage_settings",
|
|
"screenshot",
|
|
},
|
|
navigation = {
|
|
"back_to_exit",
|
|
"back_in_filemanager",
|
|
"enable_back_history",
|
|
"android_volume_keys",
|
|
"android_camera_key",
|
|
"----------------------------",
|
|
"invert_page_turn_gestures",
|
|
"invert_page_turn_buttons",
|
|
},
|
|
network = {
|
|
"network_wifi",
|
|
"network_proxy",
|
|
"network_restore",
|
|
"network_info",
|
|
"network_before_wifi_action",
|
|
"network_dismiss_scan",
|
|
"----------------------------",
|
|
"ssh",
|
|
},
|
|
screen = {
|
|
"screensaver",
|
|
"----------------------------",
|
|
"screen_dpi",
|
|
"screen_eink_opt",
|
|
"color_rendering",
|
|
"----------------------------",
|
|
"screen_toggle_gsensor",
|
|
"----------------------------",
|
|
"screen_timeout",
|
|
"fullscreen",
|
|
},
|
|
taps_and_gestures = {
|
|
"gesture_manager",
|
|
"gesture_intervals",
|
|
"----------------------------",
|
|
"follow_links",
|
|
"----------------------------",
|
|
"menu_activate",
|
|
"ignore_hold_corners",
|
|
"screen_disable_double_tab",
|
|
},
|
|
tools = {
|
|
"read_timer",
|
|
"calibre_wireless_connection",
|
|
"evernote",
|
|
"statistics",
|
|
"progress_sync",
|
|
"wallabag",
|
|
"zsync",
|
|
"news_downloader",
|
|
"send2ebook",
|
|
"text_editor",
|
|
"----------------------------",
|
|
"more_plugins",
|
|
"plugin_management",
|
|
},
|
|
more_plugins = {
|
|
"auto_frontlight",
|
|
"battery_statistics",
|
|
"synchronize_time",
|
|
"keep_alive",
|
|
"doc_setting_tweak",
|
|
"terminal",
|
|
},
|
|
search = {
|
|
"dictionary_lookup",
|
|
"dictionary_lookup_history",
|
|
"dictionary_settings",
|
|
"----------------------------",
|
|
"wikipedia_lookup",
|
|
"wikipedia_history",
|
|
"wikipedia_settings",
|
|
"----------------------------",
|
|
"translation_settings",
|
|
"----------------------------",
|
|
"goodreads",
|
|
"----------------------------",
|
|
"fulltext_search",
|
|
},
|
|
filemanager = {},
|
|
main = {
|
|
"history",
|
|
"open_previous_document",
|
|
"----------------------------",
|
|
"collections",
|
|
"----------------------------",
|
|
"book_status",
|
|
"book_info",
|
|
"----------------------------",
|
|
"system_statistics",
|
|
"mass_storage_actions",
|
|
"----------------------------",
|
|
"ota_update", -- if Device:hasOTAUpdates()
|
|
"version",
|
|
"help",
|
|
"----------------------------",
|
|
"exit_menu",
|
|
},
|
|
help = {
|
|
"quickstart_guide",
|
|
"----------------------------",
|
|
"report_bug",
|
|
"----------------------------",
|
|
"about",
|
|
},
|
|
exit_menu = {
|
|
"restart_koreader",
|
|
"----------------------------",
|
|
"sleep", -- if Device:isKindle() or Device:isKobo()
|
|
"poweroff", -- if Device:isKobo()
|
|
"reboot", -- if Device:isKobo()
|
|
"----------------------------",
|
|
"start_bq",
|
|
"exit",
|
|
}
|
|
}
|
|
|
|
if Device:isAndroid() then
|
|
order.exit_menu = nil
|
|
end
|
|
|
|
return order
|