Browse Source

Implement NSM :optional-gui:

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
e0519f98a1
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 12 additions and 2 deletions
  1. +2
    -2
      source/backend/CarlaStandaloneNSM.cpp
  2. +4
    -0
      source/frontend/carla_host.py
  3. +6
    -0
      source/frontend/carla_skin.py

+ 2
- 2
source/backend/CarlaStandaloneNSM.cpp View File

@@ -22,8 +22,8 @@
#define NSM_API_VERSION_MAJOR 1
#define NSM_API_VERSION_MINOR 2

#define NSM_CLIENT_FEATURES ":switch:"
//#define NSM_CLIENT_FEATURES ":switch:optional-gui:"
// #define NSM_CLIENT_FEATURES ":switch:"
#define NSM_CLIENT_FEATURES ":switch:optional-gui:"

#include "CarlaOscUtils.hpp"
#include "CarlaString.hpp"


+ 4
- 0
source/frontend/carla_host.py View File

@@ -2404,6 +2404,10 @@ class HostWindow(QMainWindow):

# Hide Optional Gui
elif opcode == NSM_CALLBACK_HIDE_OPTIONAL_GUI:
for pitem in reversed(self.fPluginList):
if pitem is None:
continue
widget = pitem.getWidget().hideCustomUI()
self.hide()

self.host.nsm_ready(opcode)


+ 6
- 0
source/frontend/carla_skin.py View File

@@ -790,6 +790,12 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta):
if self.b_gui is not None:
self.b_gui.setChecked(True)

def hideCustomUI(self):
self.host.show_custom_ui(self.fPluginId, False)

if self.b_gui is not None:
self.b_gui.setChecked(False)

def showEditDialog(self):
self.fEditDialog.show()
self.fEditDialog.activateWindow()


Loading…
Cancel
Save