mutable menu item text for 'Toggle floating punctuation'

This commit is contained in:
chrox
2014-01-04 00:37:21 +08:00
parent bc960dcf01
commit 80732b6bf6

View File

@@ -128,7 +128,11 @@ function ReaderTypeset:addToMainMenu(tab_item_table)
sub_item_table = self:genStyleSheetMenu(),
})
table.insert(tab_item_table.typeset, {
text = _("Toggle floating punctuation"),
text_func = function()
return self.floating_punctuation == 1 and
_("Turn off floating punctuation") or
_("Turn on floating punctuation")
end,
callback = function () self:toggleFloatingPunctuation() end,
})
end