[Scummvm-cvs-logs] scummvm master -> b35f4d31a64588a4a1f99e38df16bffc0abaf0b2
criezy
criezy at scummvm.org
Fri Jun 24 21:23:04 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b35f4d31a6 COMMON: Look for translations.dat in Theme path before using SearchMan
Commit: b35f4d31a64588a4a1f99e38df16bffc0abaf0b2
https://github.com/scummvm/scummvm/commit/b35f4d31a64588a4a1f99e38df16bffc0abaf0b2
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2011-06-24T12:21:08-07:00
Commit Message:
COMMON: Look for translations.dat in Theme path before using SearchMan
Changed paths:
common/translation.cpp
diff --git a/common/translation.cpp b/common/translation.cpp
index 59488c2..e456f73 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -223,7 +223,11 @@ String TranslationManager::getLangById(int id) const {
}
bool TranslationManager::openTranslationsFile(File& inFile) {
- // First try to open it using the SearchMan.
+ // First look in the Themepath if we can find the file.
+ if (ConfMan.hasKey("themepath") && openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile))
+ return true;
+
+ // Then try to open it using the SearchMan.
ArchiveMemberList fileList;
SearchMan.listMatchingMembers(fileList, "translations.dat");
for (ArchiveMemberList::iterator it = fileList.begin(); it != fileList.end(); ++it) {
@@ -235,10 +239,6 @@ bool TranslationManager::openTranslationsFile(File& inFile) {
}
}
- // Then look in the Themepath if we can find the file.
- if (ConfMan.hasKey("themepath"))
- return openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile);
-
return false;
}
More information about the Scummvm-git-logs
mailing list