aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJohannes Schickel2006-10-08 18:49:25 +0000
committerJohannes Schickel2006-10-08 18:49:25 +0000
commit1ced1777f8baca3e93bd7adfeea3a9a1e66a8cb4 (patch)
treeab58768acbf2595ed6cd54b517d388e70b007497 /gui
parent0b75c747177fdba2910dd92ae427ee03d10f6a53 (diff)
downloadscummvm-rg350-1ced1777f8baca3e93bd7adfeea3a9a1e66a8cb4.tar.gz
scummvm-rg350-1ced1777f8baca3e93bd7adfeea3a9a1e66a8cb4.tar.bz2
scummvm-rg350-1ced1777f8baca3e93bd7adfeea3a9a1e66a8cb4.zip
- Forcing 'classic' as the builtin classic theme (which means it ignores the classic.ini atm)
svn-id: r24216
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeClassic.cpp12
-rw-r--r--gui/newgui.cpp22
-rw-r--r--gui/themebrowser.cpp7
3 files changed, 28 insertions, 13 deletions
diff --git a/gui/ThemeClassic.cpp b/gui/ThemeClassic.cpp
index 31efd12d51..1485b7e5e7 100644
--- a/gui/ThemeClassic.cpp
+++ b/gui/ThemeClassic.cpp
@@ -37,10 +37,14 @@ ThemeClassic::ThemeClassic(OSystem *system, const Common::String &config, const
#endif
_font = 0;
- if (cfg)
- _configFile = *cfg;
- else
- loadConfigFile(_stylefile);
+ // 'classic' is always the built in one, we force it and
+ // ignore all 'classic' named config files
+ if (config.compareToIgnoreCase("classic") != 0) {
+ if (cfg)
+ _configFile = *cfg;
+ else
+ loadConfigFile(_stylefile);
+ }
}
ThemeClassic::~ThemeClassic() {
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 211068c30f..d8acabf477 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -128,17 +128,21 @@ bool NewGui::loadNewTheme(const Common::String &style) {
Common::String oldTheme = (_theme != 0) ? _theme->getStylefileName() : "";
delete _theme;
- if (Theme::themeConfigUseable(style, "", &styleType, &cfg)) {
- if (0 == styleType.compareToIgnoreCase("classic"))
- _theme = new ThemeClassic(_system, style, &cfg);
+ if (style.compareToIgnoreCase("classic") == 0) {
+ _theme = new ThemeClassic(_system);
+ } else {
+ if (Theme::themeConfigUseable(style, "", &styleType, &cfg)) {
+ if (0 == styleType.compareToIgnoreCase("classic"))
+ _theme = new ThemeClassic(_system, style, &cfg);
#ifndef DISABLE_FANCY_THEMES
- else if (0 == styleType.compareToIgnoreCase("modern"))
- _theme = new ThemeNew(_system, style, &cfg);
+ else if (0 == styleType.compareToIgnoreCase("modern"))
+ _theme = new ThemeNew(_system, style, &cfg);
#endif
- else
- warning("Unsupported theme type '%s'", styleType.c_str());
- } else {
- warning("Config '%s' is NOT usable for themes or not found", style.c_str());
+ else
+ warning("Unsupported theme type '%s'", styleType.c_str());
+ } else {
+ warning("Config '%s' is NOT usable for themes or not found", style.c_str());
+ }
}
cfg.clear();
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index 5bda962db1..5b20d51996 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -82,6 +82,13 @@ void ThemeBrowser::handleCommand(CommandSender *sender, uint32 cmd, uint32 data)
void ThemeBrowser::updateListing() {
_themes.clear();
+
+ // classic is always build in
+ Entry th;
+ th.name = "classic";
+ th.type = "classic";
+ th.file = "classic";
+ _themes.push_back(th);
if (ConfMan.hasKey("themepath"))
addDir(_themes, ConfMan.get("themepath"), 0);