[Scummvm-cvs-logs] SF.net SVN: scummvm:[35650] scummvm/trunk/gui/options.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Jan 1 18:02:45 CET 2009


Revision: 35650
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35650&view=rev
Author:   fingolfin
Date:     2009-01-01 17:02:45 +0000 (Thu, 01 Jan 2009)

Log Message:
-----------
Added two FIXMEs to global options dialog, related to theme selection

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

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2009-01-01 16:02:43 UTC (rev 35649)
+++ scummvm/trunk/gui/options.cpp	2009-01-01 17:02:45 UTC (rev 35650)
@@ -847,6 +847,8 @@
 		GUI::ThemeEngine::GraphicsMode selected = (GUI::ThemeEngine::GraphicsMode)_rendererPopUp->getSelectedTag();
 		const char *cfg = GUI::ThemeEngine::findModeConfigName(selected);
 		if (!ConfMan.get("gui_renderer").equalsIgnoreCase(cfg)) {
+			// FIXME: Actually, any changes (including the theme change) should
+			// only become active *after* the options dialog has closed.
 			g_gui.loadNewTheme(g_gui.theme()->getThemeFileName(), selected);
 			ConfMan.set("gui_renderer", cfg, _domain);
 		}
@@ -930,12 +932,13 @@
 		ThemeBrowser browser;
 		if (browser.runModal() > 0) {
 			// User made his choice...
-			const Common::String &theme = browser.getSelected();
-			if (!theme.equalsIgnoreCase(g_gui.theme()->getThemeFileName()))
-				if (g_gui.loadNewTheme(theme)) {
-					_curTheme->setLabel(g_gui.theme()->getThemeName());
-					ConfMan.set("gui_theme", theme);
-				}
+			Common::String theme = browser.getSelected();
+			// FIXME: Actually, any changes (including the theme change) should
+			// only become active *after* the options dialog has closed.
+			if (g_gui.loadNewTheme(theme)) {
+				_curTheme->setLabel(g_gui.theme()->getThemeName());
+				ConfMan.set("gui_theme", theme);
+			}
 			draw();
 		}
 		break;


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