Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Windows-only &&>& find-replace #4381

Merged
merged 1 commit into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified resources/surge-xt/SurgeLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions src/common/gui/CPatchBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,6 @@ bool CPatchBrowser::populatePatchMenuForCategory(int c, COptionMenu *contextMenu

name = storage->patch_list[p].name;

#if WINDOWS
Surge::Storage::findReplaceSubstring(name, string("&"), string("&&"));
#endif

auto actionItem =
std::make_shared<CCommandMenuItem>(CCommandMenuItem::Desc(name.c_str()));
auto action = [this, p](CCommandMenuItem *item) { this->loadPatch(p); };
Expand Down Expand Up @@ -419,10 +415,6 @@ bool CPatchBrowser::populatePatchMenuForCategory(int c, COptionMenu *contextMenu
if (rootCall)
name = " " + name;

#if WINDOWS
Surge::Storage::findReplaceSubstring(name, string("&"), string("&&"));
#endif

if (!single_category)
{
auto entry = contextMenu->addEntry(subMenu, name.c_str());
Expand Down
14 changes: 1 addition & 13 deletions src/common/gui/CSnapshotMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,9 @@ VSTGUI::COptionMenu *CSnapshotMenu::populateSubmenuFromTypeElement(TiXmlElement
{
txt = snapshot->Attribute("name");

#if WINDOWS
Surge::Storage::findReplaceSubstring(txt, std::string("&"), std::string("&&"));
#endif

int snapshotTypeID = type_id;
int tmpI;

if (snapshot->Attribute("i", &tmpI) != nullptr)
{
snapshotTypeID = tmpI;
Expand Down Expand Up @@ -218,10 +215,6 @@ VSTGUI::COptionMenu *CSnapshotMenu::populateSubmenuFromTypeElement(TiXmlElement
*/
txt = type->Attribute("name");

#if WINDOWS
Surge::Storage::findReplaceSubstring(txt, std::string("&"), std::string("&&"));
#endif

if (sub)
{
parent->addEntry(subMenu, txt.c_str());
Expand Down Expand Up @@ -1025,11 +1018,6 @@ void CFxMenu::addToTopLevelTypeMenu(TiXmlElement *type, VSTGUI::COptionMenu *sub
for (auto &ps : userPresets[type_id])
{
auto fxName = ps.name;

#if WINDOWS
Surge::Storage::findReplaceSubstring(fxName, std::string("&"), std::string("&&"));
#endif

auto i = std::make_shared<CCommandMenuItem>(CCommandMenuItem::Desc(fxName.c_str()));
i->setActions([this, ps](CCommandMenuItem *item) { this->loadUserPreset(ps); });
subMenu->addEntry(i);
Expand Down
18 changes: 0 additions & 18 deletions src/common/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3193,11 +3193,6 @@ int32_t SurgeGUIEditor::controlModifierClicked(CControl *control, CButtonState b
if (useSubMenus && grpN == "")
addTo = contextMenu;

#if WINDOWS
Surge::Storage::findReplaceSubstring(displaytxt, std::string("&"),
std::string("&&"));
#endif

auto b =
addCallbackMenu(addTo, displaytxt.c_str(), [this, p, i, tag]() {
float ef = Parameter::intScaledToFloat(i, p->val_max.i,
Expand Down Expand Up @@ -3233,11 +3228,6 @@ int32_t SurgeGUIEditor::controlModifierClicked(CControl *control, CButtonState b

std::string displaytxt = txt;

#if WINDOWS
Surge::Storage::findReplaceSubstring(displaytxt, std::string("&"),
std::string("&&"));
#endif

auto b = addCallbackMenu(
contextMenu, displaytxt.c_str(), [this, ef, p, i]() {
synth->setParameter01(synth->idForParameter(p), ef, false,
Expand Down Expand Up @@ -5856,10 +5846,6 @@ VSTGUI::COptionMenu *SurgeGUIEditor::makeLfoMenu(VSTGUI::CRect &menuRect)

auto catname = cat.name;

#if WINDOWS
Surge::Storage::findReplaceSubstring(catname, std::string("&"), std::string("&&"));
#endif

parentMenu->addEntry(catSubMenu, catname.c_str());
catSubMenu->forget();
}
Expand All @@ -5883,10 +5869,6 @@ VSTGUI::COptionMenu *SurgeGUIEditor::makeLfoMenu(VSTGUI::CRect &menuRect)
{
auto pname = p.name;

#if WINDOWS
Surge::Storage::findReplaceSubstring(pname, std::string("&"), std::string("&&"));
#endif

addCallbackMenu(catSubMenu, pname, [this, p, currentLfoId]() {
Surge::ModulatorPreset::loadPresetFrom(p.path, &(this->synth->storage),
current_scene, currentLfoId);
Expand Down