2019-01-21 21:44:13 +00:00
|
|
|
local Device = require("device")
|
|
|
|
|
2017-03-05 11:46:27 +00:00
|
|
|
local order = {
|
|
|
|
["KOMenu:menu_buttons"] = {
|
|
|
|
"navi",
|
|
|
|
"typeset",
|
|
|
|
"setting",
|
|
|
|
"tools",
|
|
|
|
"search",
|
|
|
|
"filemanager",
|
|
|
|
"main",
|
|
|
|
},
|
|
|
|
navi = {
|
|
|
|
"table_of_contents",
|
|
|
|
"bookmarks",
|
2022-01-04 20:58:56 +00:00
|
|
|
"toggle_bookmark", -- if not Device:isTouchDevice()
|
2017-09-23 16:25:22 +00:00
|
|
|
"bookmark_browsing_mode",
|
2021-02-04 16:43:52 +00:00
|
|
|
"navi_settings",
|
|
|
|
"----------------------------",
|
2020-03-26 13:04:59 +00:00
|
|
|
"page_map",
|
2020-10-31 09:40:36 +00:00
|
|
|
"hide_nonlinear_flows",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2022-01-04 20:58:56 +00:00
|
|
|
"book_map", -- if Device:isTouchDevice()
|
|
|
|
"page_browser", -- if Device:isTouchDevice()
|
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"go_to",
|
|
|
|
"skim_to",
|
2019-09-01 19:30:19 +00:00
|
|
|
"autoturn",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2018-01-17 19:28:33 +00:00
|
|
|
"go_to_previous_location",
|
2023-03-29 16:32:44 +00:00
|
|
|
"go_to_next_location",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
2021-02-04 16:43:52 +00:00
|
|
|
navi_settings = {
|
|
|
|
"toc_alt_toc",
|
|
|
|
"----------------------------",
|
|
|
|
"toc_ticks_level_ignore",
|
|
|
|
"----------------------------",
|
|
|
|
"toc_items_per_page",
|
|
|
|
"toc_items_font_size",
|
2021-05-12 23:55:35 +00:00
|
|
|
"toc_items_with_dots",
|
2021-02-04 16:43:52 +00:00
|
|
|
"----------------------------",
|
2021-10-18 15:26:04 +00:00
|
|
|
"bookmarks_settings",
|
2021-02-04 16:43:52 +00:00
|
|
|
},
|
2017-03-05 11:46:27 +00:00
|
|
|
typeset = {
|
2022-10-25 10:34:23 +00:00
|
|
|
"document_settings",
|
2021-11-07 18:29:53 +00:00
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"set_render_style",
|
2018-05-12 21:24:43 +00:00
|
|
|
"style_tweaks",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"change_font",
|
2020-04-21 19:30:16 +00:00
|
|
|
"typography",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2018-05-14 18:35:49 +00:00
|
|
|
"switch_zoom_mode",
|
|
|
|
"----------------------------",
|
|
|
|
"page_overlap",
|
2017-04-06 12:56:40 +00:00
|
|
|
"speed_reading_module_perception_expander",
|
2018-05-14 18:35:49 +00:00
|
|
|
"----------------------------",
|
|
|
|
"highlight_options",
|
2022-03-12 11:16:50 +00:00
|
|
|
"selection_text", -- if Device:hasDPad()
|
2021-09-11 09:04:48 +00:00
|
|
|
"panel_zoom_options",
|
|
|
|
"djvu_render_mode",
|
2022-03-12 11:16:50 +00:00
|
|
|
"start_content_selection", -- if Device:hasDPad(), put this as last one so it is easy to select with "press" and "up" keys
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
|
|
|
setting = {
|
|
|
|
-- common settings
|
|
|
|
-- those that don't exist will simply be skipped during menu gen
|
|
|
|
"frontlight", -- if Device:hasFrontlight()
|
|
|
|
"night_mode",
|
|
|
|
"----------------------------",
|
|
|
|
"network",
|
|
|
|
"screen",
|
2018-09-21 13:25:07 +00:00
|
|
|
"----------------------------",
|
2022-01-04 20:58:56 +00:00
|
|
|
"taps_and_gestures", -- if Device:isTouchDevice()
|
2018-04-09 07:22:16 +00:00
|
|
|
"navigation",
|
2019-02-28 19:42:00 +00:00
|
|
|
"document",
|
2017-03-05 11:46:27 +00:00
|
|
|
"----------------------------",
|
|
|
|
"language",
|
2018-08-11 20:47:33 +00:00
|
|
|
"device",
|
2017-03-05 11:46:27 +00:00
|
|
|
"----------------------------",
|
|
|
|
"status_bar",
|
|
|
|
},
|
2021-10-23 10:13:05 +00:00
|
|
|
document = {
|
2023-03-01 12:52:08 +00:00
|
|
|
"document_metadata_location",
|
2021-10-23 10:13:05 +00:00
|
|
|
"document_auto_save",
|
|
|
|
"document_save",
|
|
|
|
"document_end_action",
|
2021-10-23 10:13:09 +00:00
|
|
|
"language_support",
|
ReaderRolling: quicker partial rerenderings with EPUBs
Only available with EPUBs containing 2 or more fragments,
and a file size large enough to ensure a cache file is used.
The idea is simply, on any rendering setting change, to
skip the rerendering of the full book and to defer any
rerendering to the moment we draw a DocFragment, and
render only it.
So, on a setting change, only the fragment containing the
current page will be rerendered, and the new fragments we
may cross while turning pages.
When having done so, KOReader is in a degraded state (the
full page count is incorrect, the ToC is invalid...).
So, a full rerendering is needed, and one will happen
in the background, and when the user is idle, we reload
seamlessly and quickly from the cache file it has made.
ReaderFlipping will show some icons in the top left
corner to let it know at which steps in this procress
we are.
2023-02-16 22:30:58 +00:00
|
|
|
"----------------------------",
|
|
|
|
"partial_rerendering",
|
2021-10-23 10:13:05 +00:00
|
|
|
},
|
2018-08-11 20:47:33 +00:00
|
|
|
device = {
|
2019-09-06 15:01:37 +00:00
|
|
|
"keyboard_layout",
|
2022-10-29 20:46:35 +00:00
|
|
|
"external_keyboard",
|
2022-01-25 00:08:33 +00:00
|
|
|
"font_ui_fallbacks",
|
|
|
|
"----------------------------",
|
2018-08-11 20:47:33 +00:00
|
|
|
"time",
|
2022-07-05 13:38:59 +00:00
|
|
|
"units",
|
2021-06-29 12:07:29 +00:00
|
|
|
"device_status_alarm",
|
2020-10-21 23:17:34 +00:00
|
|
|
"charging_led", -- if Device:canToggleChargingLED()
|
2020-08-31 22:23:09 +00:00
|
|
|
"autostandby",
|
2019-03-26 22:03:18 +00:00
|
|
|
"autosuspend",
|
2019-09-12 12:15:08 +00:00
|
|
|
"autoshutdown",
|
2019-06-28 20:19:25 +00:00
|
|
|
"ignore_sleepcover",
|
|
|
|
"ignore_open_sleepcover",
|
2023-05-03 14:26:35 +00:00
|
|
|
"cover_events",
|
2020-11-04 18:15:07 +00:00
|
|
|
"ignore_battery_optimizations",
|
2020-10-21 23:17:34 +00:00
|
|
|
"mass_storage_settings", -- if Device:canToggleMassStorage()
|
2020-09-01 14:39:47 +00:00
|
|
|
"file_ext_assoc",
|
2019-09-17 11:01:40 +00:00
|
|
|
"screenshot",
|
2018-08-11 20:47:33 +00:00
|
|
|
},
|
2019-02-28 21:38:24 +00:00
|
|
|
navigation = {
|
|
|
|
"back_to_exit",
|
|
|
|
"back_in_filemanager",
|
2020-11-03 21:51:11 +00:00
|
|
|
"back_in_reader",
|
2022-01-23 17:40:37 +00:00
|
|
|
"backspace_as_back",
|
2022-01-02 14:01:08 +00:00
|
|
|
"----------------------------",
|
|
|
|
"page_turns_non_touch",
|
2019-08-01 16:27:24 +00:00
|
|
|
"android_volume_keys",
|
2020-05-05 09:18:18 +00:00
|
|
|
"android_haptic_feedback",
|
2020-06-15 05:43:37 +00:00
|
|
|
"android_back_button",
|
2019-02-28 21:38:24 +00:00
|
|
|
"----------------------------",
|
2021-05-31 18:28:43 +00:00
|
|
|
"opening_page_location_stack",
|
2019-02-28 21:38:24 +00:00
|
|
|
},
|
2018-05-13 19:27:52 +00:00
|
|
|
network = {
|
|
|
|
"network_wifi",
|
|
|
|
"network_proxy",
|
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
2020-07-27 01:39:06 +00:00
|
|
|
"network_powersave",
|
2018-05-13 19:27:52 +00:00
|
|
|
"network_restore",
|
|
|
|
"network_info",
|
|
|
|
"network_before_wifi_action",
|
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
2020-07-27 01:39:06 +00:00
|
|
|
"network_after_wifi_action",
|
2018-07-07 15:06:58 +00:00
|
|
|
"network_dismiss_scan",
|
2018-05-13 19:27:52 +00:00
|
|
|
"----------------------------",
|
|
|
|
"ssh",
|
|
|
|
},
|
2019-02-28 17:32:11 +00:00
|
|
|
screen = {
|
|
|
|
"screensaver",
|
2021-02-05 11:56:31 +00:00
|
|
|
"coverimage",
|
2022-06-01 21:18:48 +00:00
|
|
|
"autodim",
|
2019-02-28 17:32:11 +00:00
|
|
|
"----------------------------",
|
2020-07-01 20:17:41 +00:00
|
|
|
"screen_rotation",
|
|
|
|
"----------------------------",
|
2019-02-28 17:32:11 +00:00
|
|
|
"screen_dpi",
|
|
|
|
"screen_eink_opt",
|
2021-09-25 09:02:10 +00:00
|
|
|
"autowarmth",
|
2019-02-28 17:32:11 +00:00
|
|
|
"color_rendering",
|
|
|
|
"----------------------------",
|
2019-07-26 21:04:20 +00:00
|
|
|
"screen_timeout",
|
2019-02-28 17:32:11 +00:00
|
|
|
"fullscreen",
|
2021-05-20 21:14:11 +00:00
|
|
|
"----------------------------",
|
|
|
|
"screen_notification",
|
2019-02-28 17:32:11 +00:00
|
|
|
},
|
2019-02-28 19:42:00 +00:00
|
|
|
taps_and_gestures = {
|
|
|
|
"gesture_manager",
|
2019-07-24 12:31:20 +00:00
|
|
|
"gesture_intervals",
|
2019-02-28 19:42:00 +00:00
|
|
|
"----------------------------",
|
2021-09-11 09:04:48 +00:00
|
|
|
"ignore_hold_corners",
|
|
|
|
"screen_disable_double_tab",
|
|
|
|
"----------------------------",
|
2019-02-28 19:42:00 +00:00
|
|
|
"follow_links",
|
|
|
|
"----------------------------",
|
|
|
|
"menu_activate",
|
2021-04-22 16:35:08 +00:00
|
|
|
"page_turns",
|
2021-05-19 20:57:54 +00:00
|
|
|
"scrolling",
|
2021-09-11 09:04:48 +00:00
|
|
|
"long_press",
|
2019-02-28 19:42:00 +00:00
|
|
|
},
|
2017-03-05 11:46:27 +00:00
|
|
|
tools = {
|
2017-04-06 09:12:35 +00:00
|
|
|
"read_timer",
|
2020-06-19 10:22:38 +00:00
|
|
|
"calibre",
|
2021-08-30 07:11:23 +00:00
|
|
|
"exporter",
|
2017-03-05 11:46:27 +00:00
|
|
|
"statistics",
|
|
|
|
"progress_sync",
|
2020-05-02 21:02:36 +00:00
|
|
|
"move_to_archive",
|
2018-10-16 18:49:44 +00:00
|
|
|
"wallabag",
|
2017-05-08 20:15:42 +00:00
|
|
|
"news_downloader",
|
2018-02-22 23:02:32 +00:00
|
|
|
"send2ebook",
|
2018-08-06 19:16:30 +00:00
|
|
|
"text_editor",
|
2020-11-04 17:59:39 +00:00
|
|
|
"qrclipboard",
|
2020-06-19 21:38:53 +00:00
|
|
|
"profiles",
|
2017-06-24 07:55:31 +00:00
|
|
|
"----------------------------",
|
2020-06-19 18:40:40 +00:00
|
|
|
"more_tools",
|
2017-06-24 07:55:31 +00:00
|
|
|
},
|
2020-06-19 18:40:40 +00:00
|
|
|
more_tools = {
|
2017-06-24 07:55:31 +00:00
|
|
|
"auto_frontlight",
|
|
|
|
"battery_statistics",
|
2021-09-09 20:28:32 +00:00
|
|
|
"book_shortcuts",
|
2017-06-24 07:55:31 +00:00
|
|
|
"synchronize_time",
|
|
|
|
"keep_alive",
|
2019-10-08 15:14:38 +00:00
|
|
|
"doc_setting_tweak",
|
2017-04-02 06:50:24 +00:00
|
|
|
"terminal",
|
2020-06-19 18:40:40 +00:00
|
|
|
"----------------------------",
|
|
|
|
"plugin_management",
|
2022-12-30 07:45:27 +00:00
|
|
|
"patch_management",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
|
|
|
search = {
|
|
|
|
"dictionary_lookup",
|
2017-10-07 20:13:46 +00:00
|
|
|
"dictionary_lookup_history",
|
2022-06-12 19:34:17 +00:00
|
|
|
"vocabbuilder",
|
2017-08-22 15:24:31 +00:00
|
|
|
"dictionary_settings",
|
2017-07-03 06:29:11 +00:00
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"wikipedia_lookup",
|
2017-12-17 12:02:08 +00:00
|
|
|
"wikipedia_history",
|
2017-08-22 15:24:31 +00:00
|
|
|
"wikipedia_settings",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2018-12-17 13:15:13 +00:00
|
|
|
"translation_settings",
|
|
|
|
"----------------------------",
|
2020-06-19 10:22:38 +00:00
|
|
|
"find_book_in_calibre_catalog",
|
2017-03-05 11:46:27 +00:00
|
|
|
"fulltext_search",
|
2021-12-04 17:37:00 +00:00
|
|
|
"bookmark_search",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
|
|
|
filemanager = {},
|
|
|
|
main = {
|
|
|
|
"history",
|
2018-07-07 11:03:33 +00:00
|
|
|
"open_previous_document",
|
|
|
|
"----------------------------",
|
2019-11-05 23:17:28 +00:00
|
|
|
"collections",
|
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"book_status",
|
2017-07-01 10:11:44 +00:00
|
|
|
"book_info",
|
2017-03-05 11:46:27 +00:00
|
|
|
"----------------------------",
|
2020-08-29 03:20:28 +00:00
|
|
|
"mass_storage_actions", -- if Device:canToggleMassStorage()
|
2017-09-03 13:40:50 +00:00
|
|
|
"----------------------------",
|
2018-10-06 05:55:35 +00:00
|
|
|
"ota_update", -- if Device:hasOTAUpdates()
|
2017-03-05 11:46:27 +00:00
|
|
|
"help",
|
2017-05-14 16:43:08 +00:00
|
|
|
"----------------------------",
|
2017-09-03 13:40:50 +00:00
|
|
|
"exit_menu",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
2017-04-03 21:52:47 +00:00
|
|
|
help = {
|
2017-04-15 12:45:56 +00:00
|
|
|
"quickstart_guide",
|
|
|
|
"----------------------------",
|
2022-12-06 21:02:21 +00:00
|
|
|
"search_menu",
|
|
|
|
"----------------------------",
|
2017-04-03 21:52:47 +00:00
|
|
|
"report_bug",
|
|
|
|
"----------------------------",
|
2020-08-29 03:20:28 +00:00
|
|
|
"system_statistics", -- if enabled (Plugin)
|
|
|
|
"version",
|
2017-04-03 21:52:47 +00:00
|
|
|
"about",
|
|
|
|
},
|
2017-09-03 13:40:50 +00:00
|
|
|
exit_menu = {
|
2020-06-19 07:41:50 +00:00
|
|
|
"restart_koreader", -- if Device:canRestart()
|
2017-09-03 13:40:50 +00:00
|
|
|
"----------------------------",
|
2020-06-19 07:41:50 +00:00
|
|
|
"sleep", -- if Device:canSuspend()
|
|
|
|
"poweroff", -- if Device:canPowerOff()
|
|
|
|
"reboot", -- if Device:canReboot()
|
2017-09-03 13:40:50 +00:00
|
|
|
"----------------------------",
|
2020-06-19 07:41:50 +00:00
|
|
|
"start_bq", -- if Device:isCervantes()
|
2017-09-03 13:40:50 +00:00
|
|
|
"exit",
|
|
|
|
}
|
2017-03-05 11:46:27 +00:00
|
|
|
}
|
|
|
|
|
2020-06-19 07:41:50 +00:00
|
|
|
if not Device:hasExitOptions() then
|
2019-01-21 21:44:13 +00:00
|
|
|
order.exit_menu = nil
|
|
|
|
end
|
|
|
|
|
2017-03-05 11:46:27 +00:00
|
|
|
return order
|