Use provided methods instead of protected members
This commit is contained in:
parent
0893e3a038
commit
9c47128799
@ -806,7 +806,7 @@ class AbstractTab(QWidget):
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def dump_async(self, callback, *, plain=False):
|
def dump_async(self, callback, *, plain=False):
|
||||||
"""Dump the current page to a file ascync.
|
"""Dump the current page's html asynchronously.
|
||||||
|
|
||||||
The given callback will be called with the result when dumping is
|
The given callback will be called with the result when dumping is
|
||||||
complete.
|
complete.
|
||||||
|
@ -1515,10 +1515,10 @@ class CommandDispatcher:
|
|||||||
return
|
return
|
||||||
if current_url.scheme() == 'view-source':
|
if current_url.scheme() == 'view-source':
|
||||||
raise cmdexc.CommandError("Already viewing source!")
|
raise cmdexc.CommandError("Already viewing source!")
|
||||||
|
|
||||||
if edit:
|
if edit:
|
||||||
ed = editor.ExternalEditor(self._tabbed_browser)
|
ed = editor.ExternalEditor(self._tabbed_browser)
|
||||||
|
tab.dump_async(ed.edit)
|
||||||
tab._widget.page().toHtml(ed.edit)
|
|
||||||
else:
|
else:
|
||||||
tab.action.show_source()
|
tab.action.show_source()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user