diff --git a/source/backend/CarlaStandalone.hpp b/source/backend/CarlaStandalone.hpp index 952bab35a..6958cfc05 100644 --- a/source/backend/CarlaStandalone.hpp +++ b/source/backend/CarlaStandalone.hpp @@ -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) {} diff --git a/source/backend/standalone/CarlaStandalone.cpp b/source/backend/standalone/CarlaStandalone.cpp index e2bec3820..edd692390 100644 --- a/source/backend/standalone/CarlaStandalone.cpp +++ b/source/backend/standalone/CarlaStandalone.cpp @@ -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(); diff --git a/source/carla_backend.py b/source/carla_backend.py index b33eca3a0..ea332ed34 100644 --- a/source/carla_backend.py +++ b/source/carla_backend.py @@ -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) ] diff --git a/source/carla_shared.py b/source/carla_shared.py index 375cdb3ed..3784fda07 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -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")