Added #ROOTCONFIGPATH#.

This commit is contained in:
spx 2010-08-02 14:28:55 +00:00
parent 17a0fcf33a
commit d92f4f939d

View File

@ -129,6 +129,19 @@ void CConfigParser::SetDefaultVariables(CRainmeter* pRainmeter, CMeterWindow* me
SetVariable(L"CURRENTPATH", CRainmeter::ExtractPath(m_Filename));
SetVariable(L"ADDONSPATH", pRainmeter->GetPath() + L"Addons\\");
SetVariable(L"CRLF", L"\n");
if (meterWindow)
{
const std::wstring& config = meterWindow->GetSkinName();
if ((loc = config.find_first_of(L'\\')) != std::wstring::npos)
{
SetVariable(L"ROOTCONFIGPATH", pRainmeter->GetSkinPath() + config.substr(0, loc + 1));
}
else
{
SetVariable(L"ROOTCONFIGPATH", pRainmeter->GetSkinPath() + config + L"\\");
}
}
}
if (meterWindow)
{