You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koreader/frontend/ui/elements/reader_menu_order.lua

202 lines
5.1 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",
"typography",
"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",
"android_haptic_feedback",
"android_back_button",
"----------------------------",
"invert_page_turn_gestures",
"invert_page_turn_buttons",
},
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.
4 years ago
"network_powersave",
"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.
4 years ago
"network_after_wifi_action",
"network_dismiss_scan",
"----------------------------",
"ssh",
},
screen = {
"screensaver",
"----------------------------",
"screen_rotation",
"----------------------------",
"screen_dpi",
"screen_eink_opt",
"color_rendering",
"----------------------------",
"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",
"evernote",
"statistics",
"progress_sync",
"move_to_archive",
"wallabag",
"zsync",
"news_downloader",
"send2ebook",
"text_editor",
"profiles",
"----------------------------",
"more_tools",
},
more_tools = {
"auto_frontlight",
"battery_statistics",
"synchronize_time",
"keep_alive",
"doc_setting_tweak",
"terminal",
"----------------------------",
"plugin_management",
},
search = {
"dictionary_lookup",
"dictionary_lookup_history",
"dictionary_settings",
"----------------------------",
"wikipedia_lookup",
"wikipedia_history",
"wikipedia_settings",
"----------------------------",
"translation_settings",
"----------------------------",
"goodreads",
"----------------------------",
"find_book_in_calibre_catalog",
"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", -- if Device:canRestart()
"----------------------------",
"sleep", -- if Device:canSuspend()
"poweroff", -- if Device:canPowerOff()
"reboot", -- if Device:canReboot()
"----------------------------",
"start_bq", -- if Device:isCervantes()
"exit",
}
}
if not Device:hasExitOptions() then
order.exit_menu = nil
end
return order