mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
The __main__ stuff to allow the dialog to run under calibre-debug -c
This commit is contained in:
parent
2b625a173e
commit
c097c450c1
@ -185,3 +185,15 @@ class FFDocEditor(Dialog):
|
|||||||
def functions_box_index_changed(self, idx):
|
def functions_box_index_changed(self, idx):
|
||||||
self.show_original_cb.setChecked(True)
|
self.show_original_cb.setChecked(True)
|
||||||
self.fill_in_top_row()
|
self.fill_in_top_row()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
from calibre.db.legacy import LibraryDatabase
|
||||||
|
from calibre.gui2 import Application
|
||||||
|
|
||||||
|
with TemporaryDirectory() as tdir:
|
||||||
|
app = Application([])
|
||||||
|
db = LibraryDatabase(tdir) # needed to load formatter_funcs
|
||||||
|
d = FFDocEditor(None)
|
||||||
|
d.exec()
|
||||||
|
del app
|
||||||
|
Loading…
x
Reference in New Issue
Block a user