mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4220 (E-Book Viewer position in book navigation is broken)
This commit is contained in:
parent
2042052a92
commit
6e25583bc0
@ -10,7 +10,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
|||||||
|
|
||||||
class FinancialTimes(BasicNewsRecipe):
|
class FinancialTimes(BasicNewsRecipe):
|
||||||
title = u'Financial Times'
|
title = u'Financial Times'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic and Sujata Raman'
|
||||||
description = 'Financial world news'
|
description = 'Financial world news'
|
||||||
oldest_article = 2
|
oldest_article = 2
|
||||||
language = 'en'
|
language = 'en'
|
||||||
|
@ -228,7 +228,7 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
|||||||
self.connect(self.action_bookmark, SIGNAL('triggered(bool)'), self.bookmark)
|
self.connect(self.action_bookmark, SIGNAL('triggered(bool)'), self.bookmark)
|
||||||
self.connect(self.action_forward, SIGNAL('triggered(bool)'), self.forward)
|
self.connect(self.action_forward, SIGNAL('triggered(bool)'), self.forward)
|
||||||
self.connect(self.action_preferences, SIGNAL('triggered(bool)'), lambda x: self.view.config(self))
|
self.connect(self.action_preferences, SIGNAL('triggered(bool)'), lambda x: self.view.config(self))
|
||||||
self.connect(self.pos, SIGNAL('valueChanged(double)'), self.goto_page)
|
self.pos.editingFinished.connect(self.goto_page_num)
|
||||||
self.connect(self.vertical_scrollbar, SIGNAL('valueChanged(int)'),
|
self.connect(self.vertical_scrollbar, SIGNAL('valueChanged(int)'),
|
||||||
lambda x: self.goto_page(x/100.))
|
lambda x: self.goto_page(x/100.))
|
||||||
self.connect(self.search, SIGNAL('search(PyQt_PyObject, PyQt_PyObject)'), self.find)
|
self.connect(self.search, SIGNAL('search(PyQt_PyObject, PyQt_PyObject)'), self.find)
|
||||||
@ -319,6 +319,9 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
|||||||
if pos is not None:
|
if pos is not None:
|
||||||
self.goto_page(pos)
|
self.goto_page(pos)
|
||||||
|
|
||||||
|
def goto_page_num(self):
|
||||||
|
num = self.pos.value()
|
||||||
|
self.goto_page(num)
|
||||||
|
|
||||||
def forward(self, x):
|
def forward(self, x):
|
||||||
pos = self.history.forward()
|
pos = self.history.forward()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user