[Scummvm-cvs-logs] SF.net SVN: scummvm: [29283] scummvm/trunk
sev at users.sourceforge.net
sev at users.sourceforge.net
Sun Oct 28 13:04:38 CET 2007
Revision: 29283
http://scummvm.svn.sourceforge.net/scummvm/?rev=29283&view=rev
Author: sev
Date: 2007-10-28 05:04:38 -0700 (Sun, 28 Oct 2007)
Log Message:
-----------
Patch v5.2 from #1752243: "backends lib patches"
Modified Paths:
--------------
scummvm/trunk/common/system.h
scummvm/trunk/gui/ThemeClassic.cpp
scummvm/trunk/gui/ThemeModern.cpp
scummvm/trunk/gui/theme-config.cpp
scummvm/trunk/gui/theme.h
Modified: scummvm/trunk/common/system.h
===================================================================
--- scummvm/trunk/common/system.h 2007-10-28 12:02:09 UTC (rev 29282)
+++ scummvm/trunk/common/system.h 2007-10-28 12:04:38 UTC (rev 29283)
@@ -886,6 +886,17 @@
*/
virtual Common::SaveFileManager *getSavefileManager() = 0;
+
+ /**
+ * Return String which is used for backend-specific addition to theme
+ * config.
+ *
+ * Typical usage is to disable unneeded GUI widgets or defining
+ * theme-specific tab.
+ */
+ virtual Common::String getExtraThemeConfig() {
+ return "";
+ }
//@}
};
Modified: scummvm/trunk/gui/ThemeClassic.cpp
===================================================================
--- scummvm/trunk/gui/ThemeClassic.cpp 2007-10-28 12:02:09 UTC (rev 29282)
+++ scummvm/trunk/gui/ThemeClassic.cpp 2007-10-28 12:04:38 UTC (rev 29283)
@@ -70,7 +70,7 @@
if (isThemeLoadingRequired()) {
loadTheme(_defaultConfig);
- loadTheme(_configFile, false);
+ loadTheme(_configFile, false, true);
setupConfig();
}
Modified: scummvm/trunk/gui/ThemeModern.cpp
===================================================================
--- scummvm/trunk/gui/ThemeModern.cpp 2007-10-28 12:02:09 UTC (rev 29282)
+++ scummvm/trunk/gui/ThemeModern.cpp 2007-10-28 12:04:38 UTC (rev 29283)
@@ -135,7 +135,7 @@
if (isThemeLoadingRequired()) {
loadTheme(_defaultConfig);
- loadTheme(_configFile, false); // Don't reset
+ loadTheme(_configFile, false, true); // Don't reset
processExtraValues();
}
Modified: scummvm/trunk/gui/theme-config.cpp
===================================================================
--- scummvm/trunk/gui/theme-config.cpp 2007-10-28 12:02:09 UTC (rev 29282)
+++ scummvm/trunk/gui/theme-config.cpp 2007-10-28 12:04:38 UTC (rev 29283)
@@ -765,5 +765,16 @@
debug(3, "Number of variables: %d", _evaluator->getNumVars());
}
+void Theme::loadTheme(Common::ConfigFile &config, bool reset, bool doBackendSpecificPostProcessing) {
+ loadTheme(config, reset);
+ if (doBackendSpecificPostProcessing && !g_system->getExtraThemeConfig().empty()) {
+ Common::ConfigFile myConfig;
+ Common::String myConfigINI = g_system->getExtraThemeConfig();
+ Common::MemoryReadStream s((const byte *)myConfigINI.c_str(), strlen(myConfigINI.c_str()));
+ myConfig.loadFromStream(s);
+ loadTheme(myConfig, false);
+ }
+}
+
} // End of namespace GUI
Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h 2007-10-28 12:02:09 UTC (rev 29282)
+++ scummvm/trunk/gui/theme.h 2007-10-28 12:04:38 UTC (rev 29283)
@@ -210,7 +210,7 @@
bool isThemeLoadingRequired();
bool sectionIsSkipped(Common::ConfigFile &config, const char *name, int w, int h);
void loadTheme(Common::ConfigFile &config, bool reset = true);
-
+ void loadTheme(Common::ConfigFile &config, bool reset, bool doBackendSpecificPostProcessing);
Eval *_evaluator;
static bool themeConfigUseable(const Common::String &file, const Common::String &style="", Common::String *cStyle=0, Common::ConfigFile *cfg=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