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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Oct 8 20:49:35 CEST 2006


Revision: 24216
          http://svn.sourceforge.net/scummvm/?rev=24216&view=rev
Author:   lordhoto
Date:     2006-10-08 11:49:25 -0700 (Sun, 08 Oct 2006)

Log Message:
-----------
- Forcing 'classic' as the builtin classic theme (which means it ignores the classic.ini atm)

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeClassic.cpp
    scummvm/trunk/gui/newgui.cpp
    scummvm/trunk/gui/themebrowser.cpp

Modified: scummvm/trunk/gui/ThemeClassic.cpp
===================================================================
--- scummvm/trunk/gui/ThemeClassic.cpp	2006-10-08 18:30:33 UTC (rev 24215)
+++ scummvm/trunk/gui/ThemeClassic.cpp	2006-10-08 18:49:25 UTC (rev 24216)
@@ -37,10 +37,14 @@
 #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() {

Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp	2006-10-08 18:30:33 UTC (rev 24215)
+++ scummvm/trunk/gui/newgui.cpp	2006-10-08 18:49:25 UTC (rev 24216)
@@ -128,17 +128,21 @@
 	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();
 

Modified: scummvm/trunk/gui/themebrowser.cpp
===================================================================
--- scummvm/trunk/gui/themebrowser.cpp	2006-10-08 18:30:33 UTC (rev 24215)
+++ scummvm/trunk/gui/themebrowser.cpp	2006-10-08 18:49:25 UTC (rev 24216)
@@ -82,6 +82,13 @@
 
 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);


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