Fix ebook editor global menu not working on Unity when started from inside calibre

This commit is contained in:
Kovid Goyal 2014-11-11 18:11:33 +05:30
parent bc815d9332
commit e1a0af8d2d
2 changed files with 8 additions and 2 deletions

View File

@ -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()

View File

@ -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'),