mutable menu item text for 'Toggle page overlap'

This commit is contained in:
chrox
2014-01-04 00:32:14 +08:00
parent 819fece802
commit bc960dcf01
2 changed files with 6 additions and 2 deletions

View File

@@ -145,7 +145,11 @@ end
function ReaderPaging:addToMainMenu(tab_item_table)
if self.ui.document.info.has_pages then
table.insert(tab_item_table.typeset, {
text = _("Toggle page overlap"),
text_func = function()
return self.show_overlap_enable and
_("Turn off page overlap") or
_("Turn on page overlap")
end,
callback = function()
self.show_overlap_enable = not self.show_overlap_enable
end