Browse Source

claudia.py: Use dbus.mainloop.glib when dbus.mainloop.pyqt5 is not available

See also commit c146ff90ef
pull/362/head
Nedko Arnaudov 1 year ago
parent
commit
80dbd06ef3
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      src/claudia.py

+ 8
- 3
src/claudia.py View File

@@ -48,10 +48,15 @@ from shared_settings import *

try:
import dbus
from dbus.mainloop.pyqt5 import DBusQtMainLoop
from dbus.mainloop.pyqt5 import DBusMainLoop
haveDBus = True
except:
haveDBus = False
try:
# Try falling back to GMainLoop
from dbus.mainloop.glib import DBusGMainLoop as DBusMainLoop
haveDBus = True
except:
haveDBus = False

# ------------------------------------------------------------------------------------------------------------
# Try Import OpenGL
@@ -2748,7 +2753,7 @@ if __name__ == '__main__':
"DBus is not available, Claudia cannot start without it!"))
sys.exit(1)

gDBus.loop = DBusQtMainLoop(set_as_default=True)
gDBus.loop = DBusMainLoop(set_as_default=True)
gDBus.bus = dbus.SessionBus(mainloop=gDBus.loop)
gDBus.jack = gDBus.bus.get_object("org.jackaudio.service", "/org/jackaudio/Controller")
gDBus.ladish_control = gDBus.bus.get_object("org.ladish", "/org/ladish/Control")


Loading…
Cancel
Save