mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Additional change for r940.
This commit is contained in:
parent
f17602ee1d
commit
8b605c8fc5
@ -1302,13 +1302,22 @@ void RainmeterActivateConfigWide(const WCHAR* arg)
|
||||
|
||||
if (subStrings.size() > 1)
|
||||
{
|
||||
CMeterWindow* mw = Rainmeter->GetMeterWindow(subStrings[0]);
|
||||
if (mw)
|
||||
const std::vector<CRainmeter::CONFIG>& configs = Rainmeter->GetAllConfigs();
|
||||
|
||||
for (int i = 0, isize = (int)configs.size(); i < isize; ++i)
|
||||
{
|
||||
std::pair<int, int> indexes = Rainmeter->GetMeterWindowIndex(mw);
|
||||
Rainmeter->ActivateConfig(indexes.first, indexes.second);
|
||||
if (_wcsicmp(configs[i].config.c_str(), subStrings[0].c_str()) == 0)
|
||||
{
|
||||
for (int j = 0, jsize = (int)configs[i].iniFiles.size(); j < jsize; ++j)
|
||||
{
|
||||
if (_wcsicmp(configs[i].iniFiles[j].c_str(), subStrings[1].c_str()) == 0)
|
||||
{
|
||||
Rainmeter->ActivateConfig(i, j);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LogWithArgs(LOG_NOTICE, L"No such config: \"%s\" \"%s\"", subStrings[0].c_str(), subStrings[1].c_str());
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user