Browse Source

Nicer name when loading xmz&xiz files

tags/1.9.6
falkTX 9 years ago
parent
commit
bad481d6f5
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      source/backend/engine/CarlaEngine.cpp

+ 11
- 1
source/backend/engine/CarlaEngine.cpp View File

@@ -983,7 +983,17 @@ bool CarlaEngine::loadFile(const char* const filename)
if (extension == "xmz" || extension == "xiz")
{
#ifdef HAVE_ZYN_DEPS
if (addPlugin(PLUGIN_INTERNAL, nullptr, baseName, "zynaddsubfx", 0, nullptr))
CarlaString nicerName("Zyn - ");

const std::size_t sep(baseName.find('-')+1);

if (sep < baseName.length())
nicerName += baseName.buffer()+sep;
else
nicerName += baseName;

//nicerName
if (addPlugin(PLUGIN_INTERNAL, nullptr, nicerName, "zynaddsubfx", 0, nullptr))
{
if (CarlaPlugin* const plugin = getPlugin(curPluginId))
plugin->setCustomData(CUSTOM_DATA_TYPE_STRING, (extension == "xmz") ? "CarlaAlternateFile1" : "CarlaAlternateFile2", filename, true);


Loading…
Cancel
Save