diff --git a/frontend/apps/reader/modules/readergoto.lua b/frontend/apps/reader/modules/readergoto.lua index dd378bb34..ea14d6fbc 100644 --- a/frontend/apps/reader/modules/readergoto.lua +++ b/frontend/apps/reader/modules/readergoto.lua @@ -3,7 +3,6 @@ local InputDialog = require("ui/widget/inputdialog") local UIManager = require("ui/uimanager") local Screen = require("device").screen local Event = require("ui/event") -local DEBUG = require("dbg") local _ = require("gettext") local ReaderGoto = InputContainer:new{ @@ -25,23 +24,26 @@ function ReaderGoto:addToMainMenu(tab_item_table) end function ReaderGoto:onShowGotoDialog() - local dialog_title, goto_btn + local dialog_title, goto_btn, curr_page if self.document.info.has_pages then dialog_title = _("Go to Page") goto_btn = { text = _("Page"), callback = function() self:gotoPage() end, } + curr_page = self.ui.paging.current_page else dialog_title = _("Go to Location") goto_btn = { text = _("Location"), callback = function() self:gotoPage() end, } + -- only CreDocument has this method + curr_page = self.document:getCurrentPage() end self.goto_dialog = InputDialog:new{ title = dialog_title, - input_hint = "(1 - "..self.document:getPageCount()..")", + input_hint = "@"..curr_page.." (1 - "..self.document:getPageCount()..")", buttons = { { {