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))
|
||||
|
||||
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)
|
||||
|
||||
def element_ypos(self, elem):
|
||||
@ -766,8 +767,10 @@ class DocumentView(QWebView): # {{{
|
||||
|
||||
@dynamic_property
|
||||
def current_language(self):
|
||||
def fget(self): return self.document.current_language
|
||||
def fset(self, val): self.document.current_language = val
|
||||
def fget(self):
|
||||
return self.document.current_language
|
||||
def fset(self, val):
|
||||
self.document.current_language = val
|
||||
return property(fget=fget, fset=fset)
|
||||
|
||||
def search(self, text, backwards=False):
|
||||
@ -816,7 +819,6 @@ class DocumentView(QWebView): # {{{
|
||||
self.scrollbar.blockSignals(False)
|
||||
self._ignore_scrollbar_signals = False
|
||||
|
||||
|
||||
def load_finished(self, ok):
|
||||
if self.loading_url is None:
|
||||
# An <iframe> finished loading
|
||||
@ -1110,7 +1112,8 @@ class DocumentView(QWebView): # {{{
|
||||
return
|
||||
|
||||
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'
|
||||
direction = 'next' if event.delta() < 0 else 'previous'
|
||||
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