Remember directory
This commit is contained in:
@@ -32,6 +32,8 @@ using namespace juce;
|
||||
JaySynthAudioProcessorEditor::JaySynthAudioProcessorEditor (JaySynthAudioProcessor* ownerFilter, bool has_wt)
|
||||
: AudioProcessorEditor (ownerFilter)
|
||||
{
|
||||
m_fileChooserDirectory = File::getSpecialLocation (File::currentExecutableFile).getParentDirectory();
|
||||
|
||||
addAndMakeVisible (m_label_colon = new Label ("Colon",
|
||||
TRANS(":")));
|
||||
m_label_colon->setFont (Font ("Times New Roman", 20.00f, Font::plain));
|
||||
@@ -4932,41 +4934,45 @@ void JaySynthAudioProcessorEditor::buttonClicked (Button* buttonThatWasClicked)
|
||||
if (buttonThatWasClicked == m_button_bank_load)
|
||||
{
|
||||
String filePatterns("*.fxb;*.xml");
|
||||
FileChooser fc("Load bank", File::nonexistent, filePatterns, false);
|
||||
FileChooser fc("Load bank", m_fileChooserDirectory, filePatterns, false);
|
||||
if (fc.browseForFileToOpen())
|
||||
{
|
||||
File const &file = fc.getResult();
|
||||
getProcessor()->loadBank(file);
|
||||
m_fileChooserDirectory = file;
|
||||
}
|
||||
}
|
||||
else if (buttonThatWasClicked == m_button_bank_save)
|
||||
{
|
||||
String filePatterns("*.fxb;*.xml");
|
||||
FileChooser fc("Save bank", File::nonexistent, filePatterns, false);
|
||||
FileChooser fc("Save bank", m_fileChooserDirectory, filePatterns, false);
|
||||
if (fc.browseForFileToSave(true))
|
||||
{
|
||||
File const &file = fc.getResult();
|
||||
getProcessor()->saveBank(file);
|
||||
m_fileChooserDirectory = file;
|
||||
}
|
||||
}
|
||||
else if (buttonThatWasClicked == m_button_patch_load)
|
||||
{
|
||||
String filePatterns("*.fxp;*.xml");
|
||||
FileChooser fc("Load patch", File::nonexistent, filePatterns, false);
|
||||
FileChooser fc("Load patch", m_fileChooserDirectory, filePatterns, false);
|
||||
if (fc.browseForFileToOpen())
|
||||
{
|
||||
File const &file = fc.getResult();
|
||||
getProcessor()->loadPatch(file, 0);
|
||||
m_fileChooserDirectory = file;
|
||||
}
|
||||
}
|
||||
else if (buttonThatWasClicked == m_button_patch_save)
|
||||
{
|
||||
String filePatterns("*.fxp;*.xml");
|
||||
FileChooser fc("Save patch", File::nonexistent, filePatterns, false);
|
||||
FileChooser fc("Save patch", m_fileChooserDirectory, filePatterns, false);
|
||||
if (fc.browseForFileToSave(true))
|
||||
{
|
||||
File const &file = fc.getResult();
|
||||
getProcessor()->savePatch(file, 0);
|
||||
m_fileChooserDirectory = file;
|
||||
}
|
||||
}
|
||||
else if (buttonThatWasClicked == m_button_patch_incr)
|
||||
|
||||
@@ -102,6 +102,7 @@ private:
|
||||
String m_mod_src_op_names[VOICE_NUM_MOD_OPS];
|
||||
String m_mod_src0_cb_names[VOICE_NUM_MOD_SOURCES_0];
|
||||
String m_mod_src1_cb_names[(VOICE_NUM_MOD_SOURCES_1-1)*VOICE_NUM_MOD_OPS + 1];
|
||||
File m_fileChooserDirectory;
|
||||
//[/UserVariables]
|
||||
|
||||
//==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user