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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Apr 6 11:26:59 CEST 2010


Revision: 48565
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48565&view=rev
Author:   fingolfin
Date:     2010-04-06 09:26:59 +0000 (Tue, 06 Apr 2010)

Log Message:
-----------
GUI: Remove 'typedef Common::String String' from (Global)OptionsDialog

Modified Paths:
--------------
    scummvm/trunk/gui/options.cpp
    scummvm/trunk/gui/options.h

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2010-04-06 09:26:43 UTC (rev 48564)
+++ scummvm/trunk/gui/options.cpp	2010-04-06 09:26:59 UTC (rev 48565)
@@ -74,12 +74,12 @@
 
 
 
-OptionsDialog::OptionsDialog(const String &domain, int x, int y, int w, int h)
+OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w, int h)
 	: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _tabWidget(0) {
 	init();
 }
 
-OptionsDialog::OptionsDialog(const String &domain, const String &name)
+OptionsDialog::OptionsDialog(const Common::String &domain, const Common::String &name)
 	: Dialog(name), _domain(domain), _graphicsTabId(-1), _tabWidget(0) {
 	init();
 }
@@ -150,7 +150,7 @@
 
 		if (ConfMan.hasKey("gfx_mode", _domain)) {
 			const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
-			String gfxMode(ConfMan.get("gfx_mode", _domain));
+			Common::String gfxMode(ConfMan.get("gfx_mode", _domain));
 			int gfxCount = 1;
 			while (gm->name) {
 				gfxCount++;
@@ -220,7 +220,7 @@
 		// GS extensions setting
 		_enableGSCheckbox->setState(ConfMan.getBool("enable_gs", _domain));
 
-		String soundFont(ConfMan.get("soundfont", _domain));
+		Common::String soundFont(ConfMan.get("soundfont", _domain));
 		if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain)) {
 			_soundFont->setLabel("None");
 			_soundFontClearButton->setEnabled(false);
@@ -377,7 +377,7 @@
 				ConfMan.setBool("enable_gs", _enableGSCheckbox->getState(), _domain);
 				ConfMan.setInt("midi_gain", _midiGainSlider->getValue(), _domain);
 
-				String soundFont(_soundFont->getLabel());
+				Common::String soundFont(_soundFont->getLabel());
 				if (!soundFont.empty() && (soundFont != "None"))
 					ConfMan.set("soundfont", soundFont, _domain);
 				else
@@ -587,7 +587,7 @@
 	_subSpeedLabel->setEnabled(ena);
 }
 
-void OptionsDialog::addGraphicControls(GuiObject *boss, const String &prefix) {
+void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &prefix) {
 	const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
 
 	// The GFX mode popup
@@ -620,7 +620,7 @@
 	_enableGraphicSettings = true;
 }
 
-void OptionsDialog::addAudioControls(GuiObject *boss, const String &prefix) {
+void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &prefix) {
 	// The MIDI mode popup & a label
 	_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", "Music driver:");
 	_midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup");
@@ -654,7 +654,7 @@
 	_enableAudioSettings = true;
 }
 
-void OptionsDialog::addMIDIControls(GuiObject *boss, const String &prefix) {
+void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefix) {
 	// SoundFont
 	_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", "SoundFont:", kChooseSoundFontCmd, 0);
 	_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", "None");
@@ -681,7 +681,7 @@
 
 // The function has an extra slider range parameter, since both the launcher and SCUMM engine
 // make use of the widgets. The launcher range is 0-255. SCUMM's 0-9
-void OptionsDialog::addSubtitleControls(GuiObject *boss, const String &prefix, int maxSliderVal) {
+void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &prefix, int maxSliderVal) {
 
 	_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", "Text and Speech:");
 	_subToggleButton = new ButtonWidget(boss, prefix + "subToggleButton", "", kSubtitleToggle, 0);
@@ -696,7 +696,7 @@
 	_enableSubtitleSettings = true;
 }
 
-void OptionsDialog::addVolumeControls(GuiObject *boss, const String &prefix) {
+void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &prefix) {
 
 	// Volume controllers
 	_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", "Music volume:");
@@ -906,24 +906,24 @@
 
 void GlobalOptionsDialog::close() {
 	if (getResult()) {
-		String savePath(_savePath->getLabel());
+		Common::String savePath(_savePath->getLabel());
 		if (!savePath.empty() && (savePath != "None"))
 			ConfMan.set("savepath", savePath, _domain);
 
-		String themePath(_themePath->getLabel());
+		Common::String themePath(_themePath->getLabel());
 		if (!themePath.empty() && (themePath != "None"))
 			ConfMan.set("themepath", themePath, _domain);
 		else
 			ConfMan.removeKey("themepath", _domain);
 
-		String extraPath(_extraPath->getLabel());
+		Common::String extraPath(_extraPath->getLabel());
 		if (!extraPath.empty() && (extraPath != "None"))
 			ConfMan.set("extrapath", extraPath, _domain);
 		else
 			ConfMan.removeKey("extrapath", _domain);
 
 #ifdef DYNAMIC_MODULES
-		String pluginsPath(_pluginsPath->getLabel());
+		Common::String pluginsPath(_pluginsPath->getLabel());
 		if (!pluginsPath.empty() && (pluginsPath != "None"))
 			ConfMan.set("pluginspath", pluginsPath, _domain);
 		else

Modified: scummvm/trunk/gui/options.h
===================================================================
--- scummvm/trunk/gui/options.h	2010-04-06 09:26:43 UTC (rev 48564)
+++ scummvm/trunk/gui/options.h	2010-04-06 09:26:59 UTC (rev 48565)
@@ -43,10 +43,9 @@
 class ListWidget;
 
 class OptionsDialog : public Dialog {
-	typedef Common::String String;
 public:
-	OptionsDialog(const String &domain, int x, int y, int w, int h);
-	OptionsDialog(const String &domain, const String &name);
+	OptionsDialog(const Common::String &domain, int x, int y, int w, int h);
+	OptionsDialog(const Common::String &domain, const Common::String &name);
 
 	void init();
 
@@ -59,19 +58,19 @@
 
 protected:
 	/** Config domain this dialog is used to edit. */
-	String _domain;
+	Common::String _domain;
 
 	ButtonWidget *_soundFontButton;
 	StaticTextWidget *_soundFont;
 	ButtonWidget *_soundFontClearButton;
 
-	void addGraphicControls(GuiObject *boss, const String &prefix);
-	void addAudioControls(GuiObject *boss, const String &prefix);
-	void addMIDIControls(GuiObject *boss, const String &prefix);
-	void addVolumeControls(GuiObject *boss, const String &prefix);
+	void addGraphicControls(GuiObject *boss, const Common::String &prefix);
+	void addAudioControls(GuiObject *boss, const Common::String &prefix);
+	void addMIDIControls(GuiObject *boss, const Common::String &prefix);
+	void addVolumeControls(GuiObject *boss, const Common::String &prefix);
 	// The default value is the launcher's non-scaled talkspeed value. When SCUMM uses the widget,
 	// it uses its own scale
-	void addSubtitleControls(GuiObject *boss, const String &prefix, int maxSliderVal = 255);
+	void addSubtitleControls(GuiObject *boss, const Common::String &prefix, int maxSliderVal = 255);
 
 	void setGraphicSettingsState(bool enabled);
 	void setAudioSettingsState(bool enabled);
@@ -158,7 +157,6 @@
 
 
 class GlobalOptionsDialog : public OptionsDialog {
-	typedef Common::String String;
 public:
 	GlobalOptionsDialog();
 	~GlobalOptionsDialog();


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