Skip to content
Snippets Groups Projects
Commit 4326f783 authored by jsiegle's avatar jsiegle
Browse files

Allow color schemes to be saved and loaded

parent e452cd20
No related branches found
No related tags found
No related merge requests found
......@@ -92,9 +92,10 @@ void MainWindow::closeButtonPressed()
if (audioComponent->callbacksAreActive())
{
audioComponent->endCallbacks();
processorGraph->disableProcessors();
}
processorGraph->disableProcessors();
JUCEApplication::getInstance()->systemRequestedQuit();
}
......@@ -121,6 +122,21 @@ void MainWindow::saveWindowBounds()
xml->addChildElement(bounds);
XmlElement* recentDirectories = new XmlElement("RECENTDIRECTORYNAMES");
UIComponent* ui = (UIComponent*) getContentComponent();
StringArray dirs = ui->getRecentlyUsedFilenames();
for (int i = 0; i < dirs.size(); i++)
{
XmlElement* directory = new XmlElement("DIRECTORY");
directory->setAttribute("name", dirs[i]);
recentDirectories->addChildElement(directory);
}
xml->addChildElement(recentDirectories);
String error;
if (! xml->writeToFile(file, String::empty))
......@@ -177,6 +193,23 @@ void MainWindow::loadWindowBounds()
#endif
getContentComponent()->setBounds(0,0,w-10,h-33);
//setFullScreen(fs);
} else if (e->hasTagName("RECENTDIRECTORYNAMES"))
{
StringArray filenames;
forEachXmlChildElement(*e, directory)
{
if (directory->hasTagName("DIRECTORY"))
{
filenames.add(directory->getStringAttribute("name"));
}
}
UIComponent* ui = (UIComponent*) getContentComponent();
ui->setRecentlyUsedFilenames(filenames);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment