Browse Source

Import small tweaks needed for kxstudio

tags/v0.9.0
falkTX 7 years ago
parent
commit
8d32325c26
3 changed files with 17 additions and 3 deletions
  1. +11
    -2
      src/cadence.py
  2. +1
    -1
      src/cadence_session_start.py
  3. +5
    -0
      src/shared_cadence.py

+ 11
- 2
src/cadence.py View File

@@ -55,7 +55,16 @@ try:
from dbus.mainloop.pyqt5 import DBusQtMainLoop
haveDBus = True
except:
haveDBus = False
kxstudioWorkaround = "/opt/kxstudio/python3/dist-packages/dbus/mainloop"
if os.path.exists(kxstudioWorkaround):
try:
sys.path.insert(0, kxstudioWorkaround)
from pyqt5 import DBusQtMainLoop
haveDBus = True
except:
haveDBus = False
else:
haveDBus = False

# ------------------------------------------------------------------------------------------------------------
# Check for PulseAudio and Wine
@@ -2272,7 +2281,7 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW):

usingAlsaLoop = bool(GlobalSettings.value("ALSA-Audio/BridgeIndexType", iAlsaFileNone, type=int) == iAlsaFileLoop)

self.cb_jack_autostart.setChecked(GlobalSettings.value("JACK/AutoStart", False, type=bool))
self.cb_jack_autostart.setChecked(GlobalSettings.value("JACK/AutoStart", wantJackStart, type=bool))
self.cb_a2j_autostart.setChecked(GlobalSettings.value("A2J/AutoStart", True, type=bool))
self.cb_pulse_autostart.setChecked(GlobalSettings.value("Pulse2JACK/AutoStart", havePulseAudio and not usingAlsaLoop, type=bool))



+ 1
- 1
src/cadence_session_start.py View File

@@ -46,7 +46,7 @@ def forceReset():
# Start JACK, A2J and Pulse, according to user settings
def startSession(systemStarted, secondSystemStartAttempt):
# Check if JACK is set to auto-start
if systemStarted and not GlobalSettings.value("JACK/AutoStart", False, type=bool):
if systemStarted and not GlobalSettings.value("JACK/AutoStart", wantJackStart, type=bool):
print("JACK is set to NOT auto-start on login")
return True



+ 5
- 0
src/shared_cadence.py View File

@@ -72,6 +72,11 @@ iAlsaFileMax = 4

GlobalSettings = QSettings("Cadence", "GlobalSettings")

# ------------------------------------------------------------------------------------------------------------
# KXStudio Check

wantJackStart = os.path.exists("/usr/share/kxstudio/config/config/Cadence/GlobalSettings.conf")

# ------------------------------------------------------------------------------------------------------------
# Get Process list



Loading…
Cancel
Save