mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Tweaks
This commit is contained in:
parent
aecef0b5f9
commit
27fe4a1e1c
@ -3283,14 +3283,16 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU men
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add custom actions to the context menu
|
// Add custom actions to the context menu
|
||||||
|
std::wstring contextTitle = meterWindow->GetParser().ReadString(L"Rainmeter", L"ContextTitle", L"");
|
||||||
|
if (!contextTitle.empty())
|
||||||
|
{
|
||||||
auto isTitleSeparator = [](const std::wstring& title)
|
auto isTitleSeparator = [](const std::wstring& title)
|
||||||
{
|
{
|
||||||
return title.find_first_not_of(L'-') == std::wstring::npos;
|
return title.find_first_not_of(L'-') == std::wstring::npos;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::wstring contextTitle = meterWindow->GetParser().ReadString(L"Rainmeter", L"ContextTitle", L"");
|
|
||||||
std::wstring contextAction = meterWindow->GetParser().ReadString(L"Rainmeter", L"ContextAction", L"");
|
std::wstring contextAction = meterWindow->GetParser().ReadString(L"Rainmeter", L"ContextAction", L"");
|
||||||
if (!contextTitle.empty() && (!contextAction.empty() || isTitleSeparator(contextTitle)))
|
if (!contextAction.empty() || isTitleSeparator(contextTitle))
|
||||||
{
|
{
|
||||||
std::vector<std::wstring> cTitles;
|
std::vector<std::wstring> cTitles;
|
||||||
WCHAR buffer[128];
|
WCHAR buffer[128];
|
||||||
@ -3361,6 +3363,7 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU men
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return skinMenu;
|
return skinMenu;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user