mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove initialization of DBUS
Not needed anymore all remaining uses of dbus dont require an event loop as far as I can tell
This commit is contained in:
parent
d630ca0674
commit
06847efbee
@ -36,14 +36,6 @@ def detach_gui():
|
||||
do_detach()
|
||||
|
||||
|
||||
def init_dbus():
|
||||
from calibre.constants import islinux, isbsd
|
||||
if islinux or isbsd:
|
||||
from dbus.mainloop.glib import DBusGMainLoop, threads_init
|
||||
threads_init()
|
||||
DBusGMainLoop(set_as_default=True)
|
||||
|
||||
|
||||
def register_with_default_programs():
|
||||
from calibre.constants import iswindows
|
||||
if iswindows:
|
||||
@ -67,7 +59,6 @@ def calibre(args=sys.argv):
|
||||
from calibre.debug import print_basic_debug_info
|
||||
print_basic_debug_info()
|
||||
detach_gui()
|
||||
init_dbus()
|
||||
with register_with_default_programs():
|
||||
from calibre.gui2.main import main
|
||||
main(args)
|
||||
@ -75,7 +66,6 @@ def calibre(args=sys.argv):
|
||||
|
||||
def ebook_viewer(args=sys.argv):
|
||||
detach_gui()
|
||||
init_dbus()
|
||||
with register_with_default_programs():
|
||||
from calibre.gui2.viewer.main import main
|
||||
main(args)
|
||||
@ -83,14 +73,12 @@ def ebook_viewer(args=sys.argv):
|
||||
|
||||
def store_dialog(args=sys.argv):
|
||||
detach_gui()
|
||||
init_dbus()
|
||||
from calibre.gui2.store.web_store import main
|
||||
main(args)
|
||||
|
||||
|
||||
def webengine_dialog(**kw):
|
||||
detach_gui()
|
||||
init_dbus()
|
||||
from calibre.debug import load_user_plugins
|
||||
load_user_plugins()
|
||||
import importlib
|
||||
@ -100,21 +88,18 @@ def webengine_dialog(**kw):
|
||||
|
||||
def toc_dialog(**kw):
|
||||
detach_gui()
|
||||
init_dbus()
|
||||
from calibre.gui2.toc.main import main
|
||||
main(**kw)
|
||||
|
||||
|
||||
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()
|
||||
with register_with_default_programs():
|
||||
from calibre.gui2.tweak_book.main import main
|
||||
main(args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user