Browse Source

Minor fixing

tags/1.9.4
falkTX 11 years ago
parent
commit
380d80e82d
2 changed files with 6 additions and 6 deletions
  1. +4
    -6
      source/backend/plugin/NativePlugin.cpp
  2. +2
    -0
      source/utils/CarlaBackendUtils.hpp

+ 4
- 6
source/backend/plugin/NativePlugin.cpp View File

@@ -1808,23 +1808,21 @@ protected:
const char* handleUiOpenFile(const bool isDir, const char* const title, const char* const filter)
{
static CarlaString retStr;
QFileDialog::Options options(isDir ? QFileDialog::ShowDirsOnly : 0x0);

retStr = QFileDialog::getOpenFileName(nullptr, title, "", filter).toUtf8().constData();
retStr = QFileDialog::getOpenFileName(nullptr, title, "", filter, nullptr, options).toUtf8().constData();

return retStr.isNotEmpty() ? (const char*)retStr : nullptr;

// TODO - isDir
}

const char* handleUiSaveFile(const bool isDir, const char* const title, const char* const filter)
{
static CarlaString retStr;
QFileDialog::Options options(isDir ? QFileDialog::ShowDirsOnly : 0x0);

retStr = QFileDialog::getSaveFileName(nullptr, title, "", filter).toUtf8().constData();
retStr = QFileDialog::getSaveFileName(nullptr, title, "", filter, nullptr, options).toUtf8().constData();

return (const char*)retStr;

// TODO - isDir
}

public:


+ 2
- 0
source/utils/CarlaBackendUtils.hpp View File

@@ -275,6 +275,8 @@ const char* CallbackType2Str(const CallbackType& type)
return "CALLBACK_PLUGIN_ADDED";
case CALLBACK_PLUGIN_REMOVED:
return "CALLBACK_PLUGIN_REMOVED";
case CALLBACK_PLUGIN_RENAMED:
return "CALLBACK_PLUGIN_RENAMED";
case CALLBACK_PARAMETER_VALUE_CHANGED:
return "CALLBACK_PARAMETER_VALUE_CHANGED";
case CALLBACK_PARAMETER_DEFAULT_CHANGED:


Loading…
Cancel
Save