From e1a0af8d2d0f8c63817254400008ec3133af4603 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 11 Nov 2014 18:11:33 +0530 Subject: [PATCH] Fix ebook editor global menu not working on Unity when started from inside calibre --- src/calibre/gui_launch.py | 6 ++++++ src/calibre/utils/ipc/worker.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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'),