MattKing's change to add #CURRENTCONFIG# as a "built-in" variable.

Purpose. To allow Rainmeter to send the current config name (basically the current path but starting under "\Skins" and with no trailing "\") to external programs with !Execute.  This will allow external programs to know the config name if they need to take some action and then send "Rainmeter.exe !RainmeterDeactivate" or "Rainmeter.exe!RainmeterRefresh" or other bangs that require a config name when sent to Rainmeter via the command line.
This commit is contained in:
jsmorley 2009-10-05 04:29:33 +00:00
parent 3afe01569c
commit 7fdeafba9f

View File

@ -73,6 +73,12 @@ void CConfigParser::Initialize(LPCTSTR filename, CRainmeter* pRainmeter)
SetVariable(L"SKINSPATH", pRainmeter->GetSkinPath());
SetVariable(L"PLUGINSPATH", pRainmeter->GetPluginPath());
SetVariable(L"CURRENTPATH", CRainmeter::ExtractPath(filename));
std::wstring cPath = CRainmeter::ExtractPath(filename);
cPath = cPath.substr(pRainmeter->GetSkinPath().length(),
cPath.length()-pRainmeter->GetSkinPath().length()-1);
SetVariable(L"CURRENTCONFIG", cPath);
SetVariable(L"ADDONSPATH", pRainmeter->GetPath() + L"Addons\\");
RECT workArea;