common_settings: migrate document menu to menu_order ordering

This is necessary in order to allow the language support module to be
added to the menu outside of the common_settings menu table definition.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
reviewable/pr8364/r1
Aleksa Sarai 3 years ago committed by Frans de Jonge
parent dca65a793e
commit da70fe9de1

@ -513,8 +513,10 @@ end
common_settings.document = { common_settings.document = {
text = _("Document"), text = _("Document"),
sub_item_table = { -- submenus are filled by menu_order
{ }
common_settings.document_auto_save = {
text_func = function() text_func = function()
local interval = G_reader_settings:readSetting("auto_save_settings_interval_minutes") local interval = G_reader_settings:readSetting("auto_save_settings_interval_minutes")
local s_interval local s_interval
@ -539,8 +541,9 @@ common_settings.document = {
end, end,
} or nil, } or nil,
}, },
}, }
{
common_settings.document_save = {
text = _("Save document (write highlights into PDF)"), text = _("Save document (write highlights into PDF)"),
sub_item_table = { sub_item_table = {
{ {
@ -574,8 +577,9 @@ common_settings.document = {
end, end,
}, },
}, },
}, }
{
common_settings.document_end_action = {
text = _("End of document action"), text = _("End of document action"),
sub_item_table = { sub_item_table = {
{ {
@ -674,9 +678,8 @@ common_settings.document = {
end, end,
}, },
} }
},
},
} }
common_settings.language = Language:getLangMenuTable() common_settings.language = Language:getLangMenuTable()
common_settings.screenshot = { common_settings.screenshot = {

@ -35,6 +35,11 @@ local order = {
"device", "device",
-- end common settings -- end common settings
}, },
document = {
"document_auto_save",
"document_save",
"document_end_action",
},
device = { device = {
"keyboard_layout", "keyboard_layout",
"time", "time",

@ -72,6 +72,11 @@ local order = {
"----------------------------", "----------------------------",
"status_bar", "status_bar",
}, },
document = {
"document_auto_save",
"document_save",
"document_end_action",
},
device = { device = {
"keyboard_layout", "keyboard_layout",
"time", "time",

Loading…
Cancel
Save