mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
5c9dea7064
commit
aab5d9707a
@ -356,7 +356,8 @@ class Document(QWebPage): # {{{
|
|||||||
self.mainFrame().setScrollPosition(QPoint(x, y))
|
self.mainFrame().setScrollPosition(QPoint(x, y))
|
||||||
|
|
||||||
def jump_to_anchor(self, anchor):
|
def jump_to_anchor(self, anchor):
|
||||||
if not self.loaded_javascript: return
|
if not self.loaded_javascript:
|
||||||
|
return
|
||||||
self.javascript('window.paged_display.jump_to_anchor("%s")'%anchor)
|
self.javascript('window.paged_display.jump_to_anchor("%s")'%anchor)
|
||||||
|
|
||||||
def element_ypos(self, elem):
|
def element_ypos(self, elem):
|
||||||
@ -766,8 +767,10 @@ class DocumentView(QWebView): # {{{
|
|||||||
|
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
def current_language(self):
|
def current_language(self):
|
||||||
def fget(self): return self.document.current_language
|
def fget(self):
|
||||||
def fset(self, val): self.document.current_language = val
|
return self.document.current_language
|
||||||
|
def fset(self, val):
|
||||||
|
self.document.current_language = val
|
||||||
return property(fget=fget, fset=fset)
|
return property(fget=fget, fset=fset)
|
||||||
|
|
||||||
def search(self, text, backwards=False):
|
def search(self, text, backwards=False):
|
||||||
@ -816,7 +819,6 @@ class DocumentView(QWebView): # {{{
|
|||||||
self.scrollbar.blockSignals(False)
|
self.scrollbar.blockSignals(False)
|
||||||
self._ignore_scrollbar_signals = False
|
self._ignore_scrollbar_signals = False
|
||||||
|
|
||||||
|
|
||||||
def load_finished(self, ok):
|
def load_finished(self, ok):
|
||||||
if self.loading_url is None:
|
if self.loading_url is None:
|
||||||
# An <iframe> finished loading
|
# An <iframe> finished loading
|
||||||
@ -1110,7 +1112,8 @@ class DocumentView(QWebView): # {{{
|
|||||||
return
|
return
|
||||||
|
|
||||||
if self.document.in_paged_mode:
|
if self.document.in_paged_mode:
|
||||||
if abs(event.delta()) < 15: return
|
if abs(event.delta()) < 15:
|
||||||
|
return
|
||||||
typ = 'screen' if self.document.wheel_flips_pages else 'col'
|
typ = 'screen' if self.document.wheel_flips_pages else 'col'
|
||||||
direction = 'next' if event.delta() < 0 else 'previous'
|
direction = 'next' if event.delta() < 0 else 'previous'
|
||||||
loc = self.document.javascript('paged_display.%s_%s_location()'%(
|
loc = self.document.javascript('paged_display.%s_%s_location()'%(
|
||||||
@ -1262,3 +1265,4 @@ class DocumentView(QWebView): # {{{
|
|||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user