mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Additional change for r1191.
This commit is contained in:
parent
b786c12bac
commit
6fec1dc759
@ -224,20 +224,15 @@ void CRainmeter::BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfAr
|
||||
|
||||
if (subStringsSize >= numOfArgs)
|
||||
{
|
||||
if (subStringsSize == numOfArgs)
|
||||
{
|
||||
if (meterWindow)
|
||||
if (subStringsSize == numOfArgs && meterWindow)
|
||||
{
|
||||
meterWindow->RunBang(bang, subStrings);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(LOG_ERROR, L"Bang: Config not specified");
|
||||
}
|
||||
}
|
||||
else // if (subStringsSize > numOfArgs)
|
||||
{
|
||||
// Use the specified window instead of meterWindow parameter
|
||||
if (subStringsSize > numOfArgs)
|
||||
{
|
||||
const std::wstring& config = subStrings[numOfArgs];
|
||||
if (!config.empty() && (config.length() != 1 || config[0] != L'*'))
|
||||
{
|
||||
@ -250,9 +245,10 @@ void CRainmeter::BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfAr
|
||||
{
|
||||
LogWithArgs(LOG_ERROR, L"Bang: Config \"%s\" not found", config.c_str());
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
// No config defined -> apply to all.
|
||||
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_MeterWindows.begin();
|
||||
for (; iter != m_MeterWindows.end(); ++iter)
|
||||
@ -261,7 +257,6 @@ void CRainmeter::BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfAr
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(LOG_ERROR, L"Bang: Incorrect number of arugments");
|
||||
|
Loading…
Reference in New Issue
Block a user