[Scummvm-cvs-logs] SF.net SVN: scummvm: [25556] scummvm/trunk/gui

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Feb 13 20:55:21 CET 2007


Revision: 25556
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25556&view=rev
Author:   sev
Date:     2007-02-13 11:55:20 -0800 (Tue, 13 Feb 2007)

Log Message:
-----------
Implement FR#1600020: GUI: Select "No SoundFont"

Modified Paths:
--------------
    scummvm/trunk/gui/options.cpp
    scummvm/trunk/gui/options.h
    scummvm/trunk/gui/theme-config.cpp
    scummvm/trunk/gui/themes/modern.ini

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2007-02-13 19:52:21 UTC (rev 25555)
+++ scummvm/trunk/gui/options.cpp	2007-02-13 19:55:20 UTC (rev 25556)
@@ -68,6 +68,7 @@
 	kSubtitleSpeedChanged	= 'stsc',
 	kSpeechVolumeChanged	= 'vcvc',
 	kChooseSoundFontCmd		= 'chsf',
+	kClearSoundFontCmd      = 'clsf',
 	kChooseSaveDirCmd		= 'chos',
 	kChooseThemeDirCmd		= 'chth',
 	kChooseExtraDirCmd		= 'chex',
@@ -321,6 +322,8 @@
 				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 @@
 
 	_soundFontButton->setEnabled(enabled);
 	_soundFont->setEnabled(enabled);
+	_soundFontClearButton->setEnabled(enabled);
 	_multiMidiCheckbox->setEnabled(enabled);
 	_mt32Checkbox->setEnabled(enabled);
 	_enableGSCheckbox->setEnabled(enabled);
@@ -532,6 +536,7 @@
 	// 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 @@
 		}
 		break;
 	}
+	case kClearSoundFontCmd: {
+		_soundFont->setLabel("None");
+		draw();
+		break;
+	}
 	case kChooseThemeCmd: {
 		ThemeBrowser browser;
 		if (browser.runModal() > 0) {

Modified: scummvm/trunk/gui/options.h
===================================================================
--- scummvm/trunk/gui/options.h	2007-02-13 19:52:21 UTC (rev 25555)
+++ scummvm/trunk/gui/options.h	2007-02-13 19:55:20 UTC (rev 25556)
@@ -62,6 +62,7 @@
 
 	ButtonWidget *_soundFontButton;
 	StaticTextWidget *_soundFont;
+	ButtonWidget *_soundFontClearButton;
 
 	void addGraphicControls(GuiObject *boss, const String &prefix);
 	void addAudioControls(GuiObject *boss, const String &prefix);

Modified: scummvm/trunk/gui/theme-config.cpp
===================================================================
--- scummvm/trunk/gui/theme-config.cpp	2007-02-13 19:52:21 UTC (rev 25555)
+++ scummvm/trunk/gui/theme-config.cpp	2007-02-13 19:55:20 UTC (rev 25556)
@@ -370,7 +370,8 @@
 "[midiControls]\n"
 "mcx=10\n"
 "mcFontButton=mcx opYoffset buttonWidth buttonHeight\n"
-"mcFontPath=(prev.x2 + 20) (opYoffset + 3) (parent.w - (buttonWidth + 20) - 15) kLineHeight\n"
+"mcFontPath=(prev.x2 + 20) (opYoffset + 3) (parent.w - (buttonWidth + 20) - 15 - kLineHeight - 10) kLineHeight\n"
+"mcFontClearButton=(prev.x2 + 10) (opYoffset + 2) kLineHeight kLineHeight\n"
 "opYoffset=(opYoffset + buttonHeight + 2 * midiControlsSpacing)\n"
 "mcMixedCheckbox=mcx opYoffset (kFontHeight + 10 + 135) buttonHeight\n"
 "opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)\n"

Modified: scummvm/trunk/gui/themes/modern.ini
===================================================================
--- scummvm/trunk/gui/themes/modern.ini	2007-02-13 19:52:21 UTC (rev 25555)
+++ scummvm/trunk/gui/themes/modern.ini	2007-02-13 19:55:20 UTC (rev 25556)
@@ -489,7 +489,8 @@
 mcx=(opXoffset + 10)
 mcOff=((buttonHeight - kLineHeight) / 2 + 2)
 mcFontButton=mcx opYoffset buttonWidth buttonHeight
-mcFontPath=(prev.x2 + 20) (opYoffset + mcOff) (parent.w - (buttonWidth + 20) - 10) kLineHeight
+mcFontPath=(prev.x2 + 20) (opYoffset + mcOff) (parent.w - (buttonWidth + 20) - 10 - kLineHeight - 20) kLineHeight
+mcFontClearButton=(prev.x2 + 10) (opYoffset + mcOff) kLineHeight kLineHeight
 opYoffset=(opYoffset + buttonHeight + 6 * midiControlsSpacing)
 mcMixedCheckbox=mcx opYoffset (kFontHeight + 10 + 135) buttonHeight
 opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list