Browse Source

Add iconName to PluginInfo struct and use it for disthro plugins

tags/1.9.4
falkTX 11 years ago
parent
commit
0bd0f358f4
4 changed files with 10 additions and 1 deletions
  1. +2
    -0
      source/backend/CarlaStandalone.hpp
  2. +2
    -0
      source/backend/standalone/CarlaStandalone.cpp
  3. +1
    -0
      source/carla_backend.py
  4. +5
    -1
      source/carla_shared.py

+ 2
- 0
source/backend/CarlaStandalone.hpp View File

@@ -68,6 +68,7 @@ struct CarlaPluginInfo {
const char* label;
const char* maker;
const char* copyright;
const char* iconName;
long uniqueId;
uint32_t latency;

@@ -83,6 +84,7 @@ struct CarlaPluginInfo {
label(nullptr),
maker(nullptr),
copyright(nullptr),
iconName(nullptr),
uniqueId(0),
latency(0) {}



+ 2
- 0
source/backend/standalone/CarlaStandalone.cpp View File

@@ -1089,6 +1089,7 @@ const CarlaPluginInfo* carla_get_plugin_info(unsigned int pluginId)
info.hints = 0x0;
info.binary = nullptr;
info.name = nullptr;
info.iconName = nullptr;
info.uniqueId = 0;
info.latency = 0;
info.optionsAvailable = 0x0;
@@ -1127,6 +1128,7 @@ const CarlaPluginInfo* carla_get_plugin_info(unsigned int pluginId)
info.hints = plugin->hints();
info.binary = plugin->filename();
info.name = plugin->name();
info.iconName = plugin->iconName();
info.uniqueId = plugin->uniqueId();
info.latency = plugin->latency();



+ 1
- 0
source/carla_backend.py View File

@@ -344,6 +344,7 @@ class CarlaPluginInfo(Structure):
("label", c_char_p),
("maker", c_char_p),
("copyright", c_char_p),
("iconName", c_char_p),
("uniqueId", c_long),
("latency", c_uint32)
]


+ 5
- 1
source/carla_shared.py View File

@@ -1181,6 +1181,7 @@ class PluginEdit(QDialog):
self.fPluginInfo['label'] = cString(self.fPluginInfo['label'])
self.fPluginInfo['maker'] = cString(self.fPluginInfo['maker'])
self.fPluginInfo['copyright'] = cString(self.fPluginInfo['copyright'])
self.fPluginInfo['iconName'] = cString(self.fPluginInfo['iconName'])

if not Carla.isLocal:
self.fPluginInfo['hints'] &= ~PLUGIN_HAS_GUI
@@ -1984,6 +1985,7 @@ class PluginWidget(QFrame):
self.fPluginInfo['label'] = cString(self.fPluginInfo['label'])
self.fPluginInfo['maker'] = cString(self.fPluginInfo['maker'])
self.fPluginInfo['copyright'] = cString(self.fPluginInfo['copyright'])
self.fPluginInfo['iconName'] = cString(self.fPluginInfo['iconName'])

if not Carla.isLocal:
self.fPluginInfo['hints'] &= ~PLUGIN_HAS_GUI
@@ -2036,7 +2038,9 @@ class PluginWidget(QFrame):
self.ui.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png")
self.ui.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png")

if self.fPluginInfo['hints'] & PLUGIN_HAS_GUI_AS_FILE:
if self.fPluginInfo['iconName'] == "distrho":
self.ui.b_gui.setPixmaps(":/bitmaps/button_distrho.png", ":/bitmaps/button_distrho_down.png", ":/bitmaps/button_distrho_hover.png")
elif self.fPluginInfo['iconName'] == "file" or (self.fPluginInfo['hints'] & PLUGIN_HAS_GUI_AS_FILE) != 0:
self.ui.b_gui.setPixmaps(":/bitmaps/button_file.png", ":/bitmaps/button_file_down.png", ":/bitmaps/button_file_hover.png")
else:
self.ui.b_gui.setPixmaps(":/bitmaps/button_gui.png", ":/bitmaps/button_gui_down.png", ":/bitmaps/button_gui_hover.png")


Loading…
Cancel
Save