mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed bangs using "[[Measure]]"
This commit is contained in:
parent
b80fe5dbd1
commit
17ce199271
@ -2003,7 +2003,7 @@ void CRainmeter::ExecuteBang(const WCHAR* bang, std::vector<std::wstring>& args,
|
|||||||
** Runs the given command or bang
|
** Runs the given command or bang
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow)
|
void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow, bool multi)
|
||||||
{
|
{
|
||||||
if (command[0] == L'!') // Bang
|
if (command[0] == L'!') // Bang
|
||||||
{
|
{
|
||||||
@ -2043,7 +2043,7 @@ void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command[0] == L'[') // Multi-bang
|
if (multi && command[0] == L'[') // Multi-bang
|
||||||
{
|
{
|
||||||
std::wstring bangs = command;
|
std::wstring bangs = command;
|
||||||
std::wstring::size_type start = std::wstring::npos;
|
std::wstring::size_type start = std::wstring::npos;
|
||||||
@ -2070,7 +2070,7 @@ void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow)
|
|||||||
// Skip whitespace
|
// Skip whitespace
|
||||||
start = bangs.find_first_not_of(L" \t\r\n", start + 1, 4);
|
start = bangs.find_first_not_of(L" \t\r\n", start + 1, 4);
|
||||||
|
|
||||||
ExecuteCommand(bangs.c_str() + start, meterWindow);
|
ExecuteCommand(bangs.c_str() + start, meterWindow, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bangs[i] == L'"' && isize > (i + 2) && bangs[i + 1] == L'"' && bangs[i + 2] == L'"')
|
else if (bangs[i] == L'"' && isize > (i + 2) && bangs[i + 1] == L'"' && bangs[i + 2] == L'"')
|
||||||
|
@ -217,7 +217,7 @@ public:
|
|||||||
const std::wstring& GetTrayExecuteDM() { return m_TrayExecuteDM; }
|
const std::wstring& GetTrayExecuteDM() { return m_TrayExecuteDM; }
|
||||||
|
|
||||||
void ExecuteBang(const WCHAR* bang, std::vector<std::wstring>& args, CMeterWindow* meterWindow);
|
void ExecuteBang(const WCHAR* bang, std::vector<std::wstring>& args, CMeterWindow* meterWindow);
|
||||||
void ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow);
|
void ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow, bool multi = true);
|
||||||
void DelayedExecuteCommand(const WCHAR* command);
|
void DelayedExecuteCommand(const WCHAR* command);
|
||||||
|
|
||||||
void RefreshAll();
|
void RefreshAll();
|
||||||
|
Loading…
Reference in New Issue
Block a user