mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
!CommandMeasure: "Measure Args" is now accepted for backwards compatibility ("Measure" "Args" is preferred!)
This commit is contained in:
parent
b48791dd58
commit
669ddfc09d
@ -267,6 +267,20 @@ void CRainmeter::BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfAr
|
||||
}
|
||||
else
|
||||
{
|
||||
// For backwards compatibility
|
||||
if (bang == BANG_COMMANDMEASURE && subStringsSize >= 1)
|
||||
{
|
||||
std::wstring tmpSz = arg;
|
||||
std::wstring::size_type pos = tmpSz.find_first_of(L' ');
|
||||
if (pos != std::wstring::npos)
|
||||
{
|
||||
tmpSz.replace(pos, 1, L"\" \"");
|
||||
BangWithArgs(bang, tmpSz.c_str(), numOfArgs, meterWindow);
|
||||
Log(LOG_WARNING, L"!CommandMeasure: Two parameters required, only one given");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Log(LOG_ERROR, L"Bang: Incorrect number of arugments");
|
||||
}
|
||||
}
|
||||
|
@ -180,6 +180,8 @@ PLUGIN_EXPORT double Update(void* data)
|
||||
else
|
||||
{
|
||||
// Drive removed
|
||||
changed = true;
|
||||
|
||||
if (data.directory)
|
||||
{
|
||||
CloseHandle(data.directory);
|
||||
|
Loading…
Reference in New Issue
Block a user