Fixed mistake in r1145 and some minor changes.

This commit is contained in:
Birunthan Mohanathas 2012-01-29 15:59:44 +00:00
parent 476c4b996a
commit d302561618
2 changed files with 5 additions and 5 deletions

View File

@ -4,6 +4,7 @@ EXPORTS
RmReadFormula RmReadFormula
RmPathToAbsolute RmPathToAbsolute
RmExecute RmExecute
RmGet
LSLog LSLog
ReadConfigString ReadConfigString
PluginBridge PluginBridge

View File

@ -1010,9 +1010,8 @@ void CRainmeter::ActivateConfig(int configIndex, int iniIndex)
if (configIndex >= 0 && configIndex < (int)m_ConfigStrings.size() && if (configIndex >= 0 && configIndex < (int)m_ConfigStrings.size() &&
iniIndex >= 0 && iniIndex < (int)m_ConfigStrings[configIndex].iniFiles.size()) iniIndex >= 0 && iniIndex < (int)m_ConfigStrings[configIndex].iniFiles.size())
{ {
const std::wstring skinIniFile = m_ConfigStrings[configIndex].iniFiles[iniIndex]; const std::wstring& skinIniFile = m_ConfigStrings[configIndex].iniFiles[iniIndex];
const std::wstring skinConfig = m_ConfigStrings[configIndex].config; const std::wstring& skinConfig = m_ConfigStrings[configIndex].config;
const std::wstring& skinPath = m_SkinPath;
// Verify that the config is not already active // Verify that the config is not already active
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Meters.find(skinConfig); std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Meters.find(skinConfig);
@ -1031,7 +1030,7 @@ void CRainmeter::ActivateConfig(int configIndex, int iniIndex)
} }
// Verify whether the ini-file exists // Verify whether the ini-file exists
std::wstring skinIniPath = skinPath + skinConfig; std::wstring skinIniPath = m_SkinPath + skinConfig;
skinIniPath += L'\\'; skinIniPath += L'\\';
skinIniPath += skinIniFile; skinIniPath += skinIniFile;
@ -1045,7 +1044,7 @@ void CRainmeter::ActivateConfig(int configIndex, int iniIndex)
m_ConfigStrings[configIndex].active = iniIndex + 1; m_ConfigStrings[configIndex].active = iniIndex + 1;
WriteActive(skinConfig, iniIndex); WriteActive(skinConfig, iniIndex);
CreateMeterWindow(skinPath, skinConfig, skinIniFile); CreateMeterWindow(m_SkinPath, skinConfig, skinIniFile);
} }
} }