mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1418960 ["edit toc" doesn't work in the newest version](https://bugs.launchpad.net/calibre/+bug/1418960)
This commit is contained in:
parent
51e6e70765
commit
9c17693aea
@ -17,7 +17,7 @@ from PyQt5.QtWebKitWidgets import QWebView, QWebPage
|
||||
from PyQt5.QtWebKit import QWebElement
|
||||
|
||||
from calibre.ebooks.oeb.display.webview import load_html
|
||||
from calibre.gui2 import error_dialog, question_dialog
|
||||
from calibre.gui2 import error_dialog, question_dialog, gprefs
|
||||
from calibre.utils.logging import default_log
|
||||
|
||||
class Page(QWebPage): # {{{
|
||||
@ -97,9 +97,9 @@ class WebView(QWebView): # {{{
|
||||
|
||||
class ItemEdit(QWidget):
|
||||
|
||||
def __init__(self, parent, prefs):
|
||||
def __init__(self, parent, prefs=None):
|
||||
QWidget.__init__(self, parent)
|
||||
self.prefs = prefs
|
||||
self.prefs = prefs or gprefs
|
||||
self.setLayout(QVBoxLayout())
|
||||
|
||||
self.la = la = QLabel('<b>'+_(
|
||||
|
Loading…
x
Reference in New Issue
Block a user