aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJohannes Schickel2011-04-17 21:44:29 +0200
committerJohannes Schickel2011-04-17 21:44:29 +0200
commitc824ef16a69387570a86aa9b6c62e10690fa549c (patch)
treea79ba829c54f01e0147d0d7f946e06d2e841996a /gui
parent055b766f7026128f614c482b6099611b0b8444e2 (diff)
parentd20a85d4f13acd641c8e59e2673095d393a82cad (diff)
downloadscummvm-rg350-c824ef16a69387570a86aa9b6c62e10690fa549c.tar.gz
scummvm-rg350-c824ef16a69387570a86aa9b6c62e10690fa549c.tar.bz2
scummvm-rg350-c824ef16a69387570a86aa9b6c62e10690fa549c.zip
Merge branch 'master' of https://github.com/enginmanap/scummvm
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp11
-rw-r--r--gui/options.h5
2 files changed, 14 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index a540fbb9d1..a12630a0e7 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -144,6 +144,7 @@ void OptionsDialog::init() {
_subSpeedDesc = 0;
_subSpeedSlider = 0;
_subSpeedLabel = 0;
+ _oldTheme = ConfMan.get("gui_theme");
// Retrieve game GUI options
_guioptions = 0;
@@ -509,6 +510,13 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
setResult(1);
close();
break;
+ case kCloseCmd:
+ if (g_gui.theme()->getThemeId() != _oldTheme) {
+ g_gui.loadNewTheme(_oldTheme);
+ ConfMan.set("gui_theme", _oldTheme);
+ }
+ close();
+ break;
default:
Dialog::handleCommand(sender, cmd, data);
}
@@ -1316,7 +1324,6 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
#ifdef USE_TRANSLATION
Common::String lang = TransMan.getCurrentLanguage();
#endif
- Common::String oldTheme = g_gui.theme()->getThemeId();
if (g_gui.loadNewTheme(theme)) {
#ifdef USE_TRANSLATION
// If the charset has changed, it means the font were not found for the
@@ -1324,7 +1331,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
// language without restarting, we let the user know about this.
if (lang != TransMan.getCurrentLanguage()) {
TransMan.setLanguage(lang.c_str());
- g_gui.loadNewTheme(oldTheme);
+ g_gui.loadNewTheme(_oldTheme);
MessageDialog error(_("The theme you selected does not support your current language. If you want to use this theme you need to switch to another language first."));
error.runModal();
} else {
diff --git a/gui/options.h b/gui/options.h
index eba1779b69..5cc13b5cf6 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -174,6 +174,11 @@ protected:
//
uint32 _guioptions;
Common::String _guioptionsString;
+
+ //
+ //Theme Options
+ //
+ Common::String _oldTheme;
};