Implement FR#1600020: GUI: Select "No SoundFont"
svn-id: r25556
This commit is contained in:
parent
d5b169d8a6
commit
d90fc8914c
4 changed files with 15 additions and 2 deletions
|
@ -68,6 +68,7 @@ enum {
|
|||
kSubtitleSpeedChanged = 'stsc',
|
||||
kSpeechVolumeChanged = 'vcvc',
|
||||
kChooseSoundFontCmd = 'chsf',
|
||||
kClearSoundFontCmd = 'clsf',
|
||||
kChooseSaveDirCmd = 'chos',
|
||||
kChooseThemeDirCmd = 'chth',
|
||||
kChooseExtraDirCmd = 'chex',
|
||||
|
@ -321,6 +322,8 @@ void OptionsDialog::close() {
|
|||
String soundFont(_soundFont->getLabel());
|
||||
if (!soundFont.empty() && (soundFont != "None"))
|
||||
ConfMan.set("soundfont", soundFont, _domain);
|
||||
else
|
||||
ConfMan.removeKey("soundfont", _domain);
|
||||
} else {
|
||||
ConfMan.removeKey("multi_midi", _domain);
|
||||
ConfMan.removeKey("native_mt32", _domain);
|
||||
|
@ -441,6 +444,7 @@ void OptionsDialog::setMIDISettingsState(bool enabled) {
|
|||
|
||||
_soundFontButton->setEnabled(enabled);
|
||||
_soundFont->setEnabled(enabled);
|
||||
_soundFontClearButton->setEnabled(enabled);
|
||||
_multiMidiCheckbox->setEnabled(enabled);
|
||||
_mt32Checkbox->setEnabled(enabled);
|
||||
_enableGSCheckbox->setEnabled(enabled);
|
||||
|
@ -532,6 +536,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const String &prefix) {
|
|||
// SoundFont
|
||||
_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", "SoundFont:", kChooseSoundFontCmd, 0);
|
||||
_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", "None");
|
||||
_soundFontClearButton = new ButtonWidget(boss, prefix + "mcFontClearButton", "C", kClearSoundFontCmd, 0);
|
||||
|
||||
// Multi midi setting
|
||||
_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", "Mixed Adlib/MIDI mode", 0, 0);
|
||||
|
@ -804,6 +809,11 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
|
|||
}
|
||||
break;
|
||||
}
|
||||
case kClearSoundFontCmd: {
|
||||
_soundFont->setLabel("None");
|
||||
draw();
|
||||
break;
|
||||
}
|
||||
case kChooseThemeCmd: {
|
||||
ThemeBrowser browser;
|
||||
if (browser.runModal() > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue