| @@ -49,10 +49,15 @@ from shared_i18n import * | |||||
| try: | try: | ||||
| import dbus | import dbus | ||||
| from dbus.mainloop.pyqt5 import DBusQtMainLoop | |||||
| from dbus.mainloop.pyqt5 import DBusMainLoop | |||||
| haveDBus = True | haveDBus = True | ||||
| except: | 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 | # Try Import OpenGL | ||||
| @@ -2750,7 +2755,7 @@ if __name__ == '__main__': | |||||
| "DBus is not available, Claudia cannot start without it!")) | "DBus is not available, Claudia cannot start without it!")) | ||||
| sys.exit(1) | 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.bus = dbus.SessionBus(mainloop=gDBus.loop) | ||||
| gDBus.jack = gDBus.bus.get_object("org.jackaudio.service", "/org/jackaudio/Controller") | gDBus.jack = gDBus.bus.get_object("org.jackaudio.service", "/org/jackaudio/Controller") | ||||
| gDBus.ladish_control = gDBus.bus.get_object("org.ladish", "/org/ladish/Control") | gDBus.ladish_control = gDBus.bus.get_object("org.ladish", "/org/ladish/Control") | ||||
| @@ -700,9 +700,11 @@ class ClaudiaLauncher(QWidget, ui_claudia_launcher.Ui_ClaudiaLauncherW): | |||||
| elif os.path.exists("/usr/bin/dpkg"): | elif os.path.exists("/usr/bin/dpkg"): | ||||
| pkg_out = getoutput("env LANG=C LC_ALL=C /usr/bin/dpkg --get-selections 2>/dev/null").split("\n") | pkg_out = getoutput("env LANG=C LC_ALL=C /usr/bin/dpkg --get-selections 2>/dev/null").split("\n") | ||||
| for pkg_info in pkg_out: | for pkg_info in pkg_out: | ||||
| package, installed = pkg_info.rsplit("\t", 1) | |||||
| if installed == "install": | |||||
| pkglist.append(package.strip()) | |||||
| pkg_info = pkg_info.strip() | |||||
| if pkg_info: | |||||
| package, installed = pkg_info.rsplit("\t", 1) | |||||
| if installed == "install": | |||||
| pkglist.append(package.strip()) | |||||
| elif os.path.exists("/bin/rpm"): | elif os.path.exists("/bin/rpm"): | ||||
| pkg_out = getoutput("env LANG=C /bin/rpm -qa --qf \"%{NAME}\n\" 2>/dev/null").split("\n") | pkg_out = getoutput("env LANG=C /bin/rpm -qa --qf \"%{NAME}\n\" 2>/dev/null").split("\n") | ||||
| @@ -16,17 +16,10 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the COPYING file | # For a full copy of the GNU General Public License see the COPYING file | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Global) | |||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSlot, QTimer | |||||
| from PyQt5.QtGui import QCursor, QFontMetrics, QImage, QPainter | |||||
| from PyQt5.QtWidgets import QMainWindow, QMenu | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, QTimer | |||||
| from PyQt4.QtGui import QCursor, QFontMetrics, QImage, QPainter | |||||
| from PyQt4.QtGui import QMainWindow, QMenu | |||||
| from PyQt5.QtCore import pyqtSlot, QTimer | |||||
| from PyQt5.QtCore import pyqtSignal | |||||
| from PyQt5.QtGui import QCursor, QFontMetrics, QImage, QPainter | |||||
| from PyQt5.QtWidgets import QMainWindow, QMenu | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||