Skip to content

Commit

Permalink
Server: Added LV2 settings
Browse files Browse the repository at this point in the history
  • Loading branch information
apohl79 committed Mar 13, 2023
1 parent 6a5abdc commit fa674bc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
38 changes: 38 additions & 0 deletions Server/Source/ServerSettingsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,39 @@ ServerSettingsWindow::ServerSettingsWindow(App* app)
tooltip.clear();
row++;

label = std::make_unique<Label>();
label->setText("LV2 Support:", NotificationType::dontSendNotification);
label->setBounds(getLabelBounds(row));
addChildAndSetID(label.get(), "lbl");
m_components.push_back(std::move(label));

m_lv2Support.setBounds(getCheckBoxBounds(row));
m_lv2Support.setToggleState(srv->getEnableLV2(), NotificationType::dontSendNotification);
addChildAndSetID(&m_lv2Support, "lv2");

row++;

label = std::make_unique<Label>();
tmpStr = "LV2 Custom Folders";
tmpStr << newLine << "(one folder per line):";
label->setText(tmpStr, NotificationType::dontSendNotification);
label->setBounds(getLabelBounds(row));
addChildAndSetID(label.get(), "lbl");
m_components.push_back(std::move(label));

m_lv2Folders.setBounds(getLargeFieldBounds(row));
m_lv2Folders.setMultiLine(true, false);
m_lv2Folders.setReturnKeyStartsNewLine(true);
addChildAndSetID(&m_lv2Folders, "lv2fold");

tmpStr = "";
for (auto& folder : srv->getLV2Folders()) {
tmpStr << folder << newLine;
}
m_lv2Folders.setText(tmpStr);

row += largeFieldRows;

label = std::make_unique<Label>();
label->setText("Screen Capturing", NotificationType::dontSendNotification);
label->setJustificationType(Justification::centredTop);
Expand Down Expand Up @@ -552,6 +585,7 @@ ServerSettingsWindow::ServerSettingsWindow(App* app)
srv2->setEnableAU(m_auSupport.getToggleState());
srv2->setEnableVST3(m_vst3Support.getToggleState());
srv2->setEnableVST2(m_vst2Support.getToggleState());
srv2->setEnableLV2(m_lv2Support.getToggleState());
srv2->setScanForPlugins(m_scanForPlugins.getToggleState());
srv2->setSandboxMode((Server::SandboxMode)m_sandboxMode.getSelectedItemIndex());
srv2->setCrashReporting(m_crashReporting.getToggleState());
Expand Down Expand Up @@ -611,6 +645,10 @@ ServerSettingsWindow::ServerSettingsWindow(App* app)
}
srv2->setVSTNoStandardFolders(m_vstNoStandardFolders.getToggleState());

if (m_lv2Folders.getText().length() > 0) {
srv2->setLV2Folders(StringArray::fromLines(m_lv2Folders.getText()));
}

auto offsetParts = StringArray::fromTokens(m_screenMouseOffsetXY.getText(), "x", "");
if (offsetParts.size() >= 2) {
srv2->setScreenMouseOffsetX(offsetParts[0].getIntValue());
Expand Down
7 changes: 4 additions & 3 deletions Server/Source/ServerSettingsWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ class ServerSettingsWindow : public DocumentWindow, public LogTag {
private:
App* m_app;
std::vector<std::unique_ptr<Component>> m_components;
TextEditor m_idText, m_nameText, m_screenJpgQuality, m_vst2Folders, m_vst3Folders, m_screenMouseOffsetXY;
ToggleButton m_auSupport, m_vst3Support, m_vst2Support, m_screenDiffDetection, m_scanForPlugins, m_tracer, m_logger,
m_vstNoStandardFolders, m_pluginWindowsOnTop, m_crashReporting;
TextEditor m_idText, m_nameText, m_screenJpgQuality, m_vst2Folders, m_vst3Folders, m_lv2Folders,
m_screenMouseOffsetXY;
ToggleButton m_auSupport, m_vst3Support, m_vst2Support, m_lv2Support, m_screenDiffDetection, m_scanForPlugins,
m_tracer, m_logger, m_vstNoStandardFolders, m_pluginWindowsOnTop, m_crashReporting;
TextButton m_saveButton;
Label m_screenJpgQualityLbl, m_screenDiffDetectionLbl, m_screenCapturingQualityLbl, m_pluginWindowsOnTopLbl;
ComboBox m_screenCapturingMode, m_screenCapturingQuality, m_sandboxMode;
Expand Down

0 comments on commit fa674bc

Please sign in to comment.