aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-01-01 17:02:45 +0000
committerMax Horn2009-01-01 17:02:45 +0000
commitc62efbcab33497487f8620eaed352b69810664fa (patch)
tree638144c430b16adaff33560fe4d74cdc099aac20
parent41dce61a30c30487d09020137176ceff504d0dff (diff)
downloadscummvm-rg350-c62efbcab33497487f8620eaed352b69810664fa.tar.gz
scummvm-rg350-c62efbcab33497487f8620eaed352b69810664fa.tar.bz2
scummvm-rg350-c62efbcab33497487f8620eaed352b69810664fa.zip
Added two FIXMEs to global options dialog, related to theme selection
svn-id: r35650
-rw-r--r--gui/options.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 29d0c6a3e1..98d8bbea76 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -847,6 +847,8 @@ void GlobalOptionsDialog::close() {
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 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
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;