diff --git a/source/backend/plugin/NativePlugin.cpp b/source/backend/plugin/NativePlugin.cpp index ec61ac338..9435b5606 100644 --- a/source/backend/plugin/NativePlugin.cpp +++ b/source/backend/plugin/NativePlugin.cpp @@ -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: diff --git a/source/utils/CarlaBackendUtils.hpp b/source/utils/CarlaBackendUtils.hpp index a659988a9..bd8d75601 100644 --- a/source/utils/CarlaBackendUtils.hpp +++ b/source/utils/CarlaBackendUtils.hpp @@ -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: