Allow running the template preferences without a gui

This commit is contained in:
Kovid Goyal 2022-07-10 09:34:36 +05:30
parent f54c3fba1e
commit 445066a381
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -505,7 +505,11 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
if __name__ == '__main__':
from calibre import Application
from calibre.gui2 import Application
from calibre.gui2.ui import get_gui
from calibre.library import db
app = Application([])
app.current_db = db()
get_gui.ans = app
test_widget('Advanced', 'TemplateFunctions')
del app