diff --git a/src/calibre/gui_launch.py b/src/calibre/gui_launch.py index 13bc99b958..f08ec861ee 100644 --- a/src/calibre/gui_launch.py +++ b/src/calibre/gui_launch.py @@ -52,6 +52,12 @@ def ebook_viewer(args=sys.argv): from calibre.gui2.viewer.main import main main(args) +def gui_ebook_edit(path=None, notify=None): + ' For launching the editor from inside calibre ' + init_dbus() + from calibre.gui2.tweak_book.main import gui_main + gui_main(path, notify) + def ebook_edit(args=sys.argv): detach_gui() init_dbus() diff --git a/src/calibre/utils/ipc/worker.py b/src/calibre/utils/ipc/worker.py index 6614eab1ca..04a825a911 100644 --- a/src/calibre/utils/ipc/worker.py +++ b/src/calibre/utils/ipc/worker.py @@ -23,10 +23,10 @@ PARALLEL_FUNCS = { ('calibre.gui2.lrf_renderer.main', 'main', None), 'ebook-viewer' : - ('calibre.gui2.viewer.main', 'main', None), + ('calibre.gui_launch', 'ebook_viewer', None), 'ebook-edit' : - ('calibre.gui2.tweak_book.main', 'gui_main', None), + ('calibre.gui_launch', 'gui_ebook_edit', None), 'render_pages' : ('calibre.ebooks.comic.input', 'render_pages', 'notification'),