MenuSorter: fix outside testability (for potential unit tests)
This commit is contained in:
1 parent
653ff64438
commit
a970a1f034
27 files changed
+58
-56
No files matched your search
@@ -181,7 +181,7 @@ function ReaderPaging:getLastPercent()
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderPaging:addToMainMenu(tab_item_table)
|
||||
function ReaderPaging:addToMainMenu(menu_items)
|
||||
-- FIXME: repeated code with page overlap menu for readerrolling
|
||||
-- needs to keep only one copy of the logic as for the DRY principle.
|
||||
-- The difference between the two menus is only the enabled func.
|
||||
@@ -201,7 +201,7 @@ function ReaderPaging:addToMainMenu(tab_item_table)
|
||||
for _, menu_entry in ipairs(self.view:genOverlapStyleMenu()) do
|
||||
table.insert(page_overlap_menu, menu_entry)
|
||||
end
|
||||
self.ui.menu.menu_items.page_overlap = {
|
||||
menu_items.page_overlap = {
|
||||
text = _("Page overlap"),
|
||||
enabled_func = function()
|
||||
return not self.view.page_scroll and self.zoom_mode ~= "page"
|
||||
@@ -209,7 +209,7 @@ function ReaderPaging:addToMainMenu(tab_item_table)
|
||||
end,
|
||||
sub_item_table = page_overlap_menu,
|
||||
}
|
||||
self.ui.menu.menu_items.read_from_right_to_left = {
|
||||
menu_items.read_from_right_to_left = {
|
||||
text = _("Read from right to left"),
|
||||
checked_func = function() return self.inverse_reading_order end,
|
||||
callback = function()
|
||||
|
||||
Reference in new issue
Block a user