Added optional parameters to the "!Manage" bang for the "Skins" tab.

Usage: !Manage Skins Config File (both "Config" and "File" are optional).
Example: !Manage Skins "illustro\Clock" "Clock.ini"

To use the "File" parameter, you must specify a "Config" parameter as well.
This commit is contained in:
Brian Ferguson
2013-08-25 11:28:15 -06:00
parent dfc804d50e
commit eca5dd0010
3 changed files with 51 additions and 1 deletions

View File

@ -712,7 +712,21 @@ void CommandHandler::DoAboutBang(std::vector<std::wstring>& args, MeterWindow* m
void CommandHandler::DoManageBang(std::vector<std::wstring>& args, MeterWindow* meterWindow)
{
DialogManage::Open(args.empty() ? L"" : args[0].c_str());
const size_t argsSize = args.size();
if (argsSize >= 2 && argsSize <= 3)
{
DialogManage::OpenSkin(args[0].c_str(),
args[1].c_str(),
(argsSize == 3) ? args[2].c_str() : L"");
}
else if (argsSize == 1)
{
DialogManage::Open(args.empty() ? L"" : args[0].c_str());
}
else
{
LogErrorF(meterWindow, L"!Manage: Invalid parameters");
}
}
void CommandHandler::DoSkinMenuBang(std::vector<std::wstring>& args, MeterWindow* skin)