Browse Source

Disable link and kits search UI elements if not compiled in

tags/v1.9.9
falkTX 7 years ago
parent
commit
6fdb48cc03
2 changed files with 35 additions and 13 deletions
  1. +24
    -9
      source/carla_database.py
  2. +11
    -4
      source/carla_host.py

+ 24
- 9
source/carla_database.py View File

@@ -830,7 +830,7 @@ class SearchPluginsThread(QThread):
def _pluginLook(self, percent, plugin):
self.pluginLook.emit(percent, plugin)

# ----------------------------------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------------
# Plugin Refresh Dialog

class PluginRefreshW(QDialog):
@@ -844,7 +844,7 @@ class PluginRefreshW(QDialog):
# kdevelop likes this :)
self.host = host = CarlaHostNull()

# --------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------
# Internal stuff

hasNative = os.path.exists(os.path.join(self.host.pathBinaries, "carla-discovery-native"))
@@ -857,7 +857,7 @@ class PluginRefreshW(QDialog):
self.fIconYes = getIcon("dialog-ok-apply").pixmap(16, 16)
self.fIconNo = getIcon("dialog-error").pixmap(16, 16)

# --------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------
# Set-up GUI

self.ui.b_skip.setVisible(False)
@@ -949,12 +949,12 @@ class PluginRefreshW(QDialog):
self.ui.ch_dssi.setEnabled(False)
self.ui.ch_vst.setEnabled(False)

# --------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------
# Load settings

self.loadSettings()

# ----------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------
# Hide bridges if disabled

if not host.showPluginBridges:
@@ -995,12 +995,27 @@ class PluginRefreshW(QDialog):
self.ui.label_win32.hide()
self.ui.label_win64.hide()

# ----------------------------------------------------------------------------------------------------
# Disable non-supported features
features = gCarla.utils.get_supported_features()

if "gig" not in features:
self.ui.ch_gig.setChecked(False)
self.ui.ch_gig.setEnabled(False)

if "sf2" not in features:
self.ui.ch_sf2.setChecked(False)
self.ui.ch_sf2.setEnabled(False)

if "sfz" not in features:
self.ui.ch_sfz.setChecked(False)
self.ui.ch_sfz.setEnabled(False)

# -------------------------------------------------------------------------------------------------------------
# Resize to minimum size, as it's very likely UI stuff was hidden

self.resize(self.minimumSize())

# --------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------
# Set-up connections

self.finished.connect(self.slot_saveSettings)
@@ -1021,12 +1036,12 @@ class PluginRefreshW(QDialog):
self.fThread.pluginLook.connect(self.slot_handlePluginLook)
self.fThread.finished.connect(self.slot_handlePluginThreadFinished)

# --------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------
# Post-connect setup

self.slot_checkTools()

# ------------------------------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------

def loadSettings(self):
settings = QSettings("falkTX", "CarlaRefresh2")


+ 11
- 4
source/carla_host.py View File

@@ -519,16 +519,23 @@ class HostWindow(QMainWindow):
self.ui.text_logs.clear()
self.setProperWindowTitle()

# Disable non-supported features
features = gCarla.utils.get_supported_features()

if "link" not in features:
self.ui.cb_transport_link.setEnabled(False)
self.ui.cb_transport_link.setVisible(False)

# Plugin needs to have timers always running so it receives messages
if self.host.isPlugin:
self.startTimers()

# Qt needs this so it properly creates & resizes the canvas
self.ui.tabWidget.blockSignals(True)
self.ui.tabWidget.setCurrentIndex(1)
self.ui.tabWidget.setCurrentIndex(0)
self.ui.tabWidget.blockSignals(False)

# Plugin needs to have timers always running so it receives messages
if self.host.isPlugin:
self.startTimers()

# Start in patchbay tab if using forced patchbay mode
if host.processModeForced and host.processMode == ENGINE_PROCESS_MODE_PATCHBAY and not host.isControl:
self.ui.tabWidget.setCurrentIndex(1)


Loading…
Cancel
Save