Browse Source

LV2 export window is now a simple combo-box

tags/v1.9.9
falkTX FilipeCSnuk 6 years ago
parent
commit
e481680e7d
1 changed files with 21 additions and 8 deletions
  1. +21
    -8
      source/carla_skin.py

+ 21
- 8
source/carla_skin.py View File

@@ -1152,16 +1152,29 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta):
# Export LV2

elif actSel == actExportLV2:
ret = QFileDialog.getSaveFileName(self, self.tr("Export Plugin as LV2"), "", "", "", QFileDialog.ShowDirsOnly|QFileDialog.HideNameFilterDetails)

if config_UseQt5:
ret = ret[0]
if not ret:
filepath = QInputDialog.getItem(self, self.tr("Export LV2 Plugin"),
self.tr("Select LV2 Path where plugin will be exported to:"),
CARLA_DEFAULT_LV2_PATH, editable=False)
if not all(filepath):
return

if not self.host.export_plugin_lv2(self.fPluginId, ret):
CustomMessageBox(self, QMessageBox.Warning, self.tr("Error"), self.tr("Operation failed"),
self.host.get_last_error(), QMessageBox.Ok, QMessageBox.Ok)
plugname = self.fPluginInfo['name']
filepath = os.path.join(filepath[0], plugname.replace(" ","_"))

if not filepath.endswith(".lv2"):
filepath += ".lv2"

if os.path.exists(filepath):
if QMessageBox.question(self, self.tr("Export to LV2"),
self.tr("Plugin bundle already exists, overwrite?")) == QMessageBox.Ok:
return

if not self.host.export_plugin_lv2(self.fPluginId, filepath):
return CustomMessageBox(self, QMessageBox.Warning, self.tr("Error"), self.tr("Operation failed"),
self.host.get_last_error(), QMessageBox.Ok, QMessageBox.Ok)

QMessageBox.information(self, self.tr("Plugin exported"),
self.tr("Plugin exported successfully, saved in folder:\n%s" % filepath))

# -------------------------------------------------------------



Loading…
Cancel
Save