From 10022f78cbbcc41d20d1a59b61dd8361d6e632c0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 11 Jun 2014 19:14:47 +0100 Subject: [PATCH] Misc --- source/Makefile.mk | 2 +- source/carla_host.py | 17 ++++++++++++----- source/carla_patchbay.py | 3 ++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/source/Makefile.mk b/source/Makefile.mk index 62399e460..d46c4d86b 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -112,7 +112,7 @@ CFLAGS += -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes CXXFLAGS += -Wnon-virtual-dtor -Woverloaded-virtual ifeq ($(LINUX),true) CFLAGS += -isystem /opt/kxstudio/include -CXXFLAGS += -isystem /opt/kxstudio/include -isystem /usr/include/qt4 +CXXFLAGS += -isystem /opt/kxstudio/include -isystem /usr/include/qt5 endif ifeq ($(MACOS),true) CFLAGS += -isystem /opt/kxstudio/include diff --git a/source/carla_host.py b/source/carla_host.py index 019b6a031..3d33e7502 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -394,7 +394,8 @@ class HostWindow(QMainWindow): self.fContainer.projectLoadingStarted() self.fIsProjectLoading = True - gCarla.host.load_project(self.fProjectFilename) + if gCarla.host is not None: + gCarla.host.load_project(self.fProjectFilename) self.fIsProjectLoading = False self.fContainer.projectLoadingFinished() @@ -513,6 +514,9 @@ class HostWindow(QMainWindow): if audioDriver != "JACK" and transportMode == ENGINE_TRANSPORT_MODE_JACK: transportMode = ENGINE_TRANSPORT_MODE_INTERNAL + if gCarla.host is None: + return audioDriver + # ------------------------------------------------------------- # apply to engine @@ -543,7 +547,7 @@ class HostWindow(QMainWindow): def startEngine(self): audioDriver = self.setEngineSettings() - if not gCarla.host.engine_init(audioDriver, self.fClientName): + if gCarla.host is not None and not gCarla.host.engine_init(audioDriver, self.fClientName): if self.fFirstEngineInit: self.fFirstEngineInit = False return @@ -850,7 +854,7 @@ class HostWindow(QMainWindow): def slot_engineStart(self, doStart = True): if doStart: self.startEngine() - check = gCarla.host.is_engine_running() + check = gCarla.host is not None and gCarla.host.is_engine_running() self.ui.menu_PluginMacros.setEnabled(check) self.ui.menu_Canvas.setEnabled(check) @@ -908,7 +912,7 @@ class HostWindow(QMainWindow): if not dialog.exec_(): return - if not gCarla.host.is_engine_running(): + if gCarla.host is not None and not gCarla.host.is_engine_running(): QMessageBox.warning(self, self.tr("Warning"), self.tr("Cannot add new plugins while engine is stopped")) return @@ -1186,7 +1190,10 @@ class HostWindow(QMainWindow): self.killTimers() self.saveSettings() - if gCarla.host.is_engine_running() and not gCarla.isPlugin: + if gCarla.host is None or gCarla.isPlugin: + pass + + elif gCarla.host.is_engine_running(): gCarla.host.set_engine_about_to_close() count = self.fContainer.getPluginCount() diff --git a/source/carla_patchbay.py b/source/carla_patchbay.py index 7b61d90dd..1be771913 100644 --- a/source/carla_patchbay.py +++ b/source/carla_patchbay.py @@ -996,7 +996,8 @@ class CarlaPatchbayW(QFrame): @pyqtSlot() def slot_canvasRefresh(self): patchcanvas.clear() - if gCarla.host.is_engine_running(): + + if gCarla.host is not None and gCarla.host.is_engine_running(): gCarla.host.patchbay_refresh() for pitem in self.fPluginList: