From b35f4d31a64588a4a1f99e38df16bffc0abaf0b2 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Fri, 24 Jun 2011 20:20:32 +0100 Subject: COMMON: Look for translations.dat in Theme path before using SearchMan --- common/translation.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/translation.cpp b/common/translation.cpp index 59488c2dd5..e456f733fd 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; } -- cgit v1.2.3