Use ReaderFrontLight:addToMainMenu in FM

Check if frontlight is present using the same method as ReaderFrontLight:init,
just for consistency.
pull/238/head
Paulo Matias 11 years ago
parent 3d04925109
commit 92e12d6466

@ -49,13 +49,8 @@ function FileManagerMenu:setUpdateItemTable()
widget:addToMainMenu(self.tab_item_table) widget:addToMainMenu(self.tab_item_table)
end end
if Device:hasFrontlight() then if Device:getFrontlight() ~= nil then
table.insert(self.tab_item_table.main, { ReaderFrontLight:addToMainMenu(self.tab_item_table)
text = _("Frontlight settings"),
callback = function()
ReaderFrontLight:onShowFlDialog()
end
})
end end
table.insert(self.tab_item_table.main, { table.insert(self.tab_item_table.main, {
text = _("Help"), text = _("Help"),

Loading…
Cancel
Save