mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Add #ROOTCONFIG# variable
This commit is contained in:
parent
8b68092cf1
commit
08eb662e1f
@ -104,6 +104,7 @@ void ConfigParser::SetBuiltInVariables(const std::wstring& filename, const std::
|
||||
{
|
||||
insertVariable(L"CURRENTFILE", meterWindow->GetFileName());
|
||||
insertVariable(L"CURRENTCONFIG", meterWindow->GetFolderPath());
|
||||
insertVariable(L"ROOTCONFIG", meterWindow->GetRootName());
|
||||
insertVariable(L"ROOTCONFIGPATH", meterWindow->GetRootPath());
|
||||
}
|
||||
|
||||
|
@ -4841,6 +4841,17 @@ std::wstring MeterWindow::GetFilePath()
|
||||
return file;
|
||||
}
|
||||
|
||||
std::wstring MeterWindow::GetRootName()
|
||||
{
|
||||
std::wstring::size_type loc;
|
||||
if ((loc = m_FolderPath.find_first_of(L'\\')) != std::wstring::npos)
|
||||
{
|
||||
return m_FolderPath.substr(0, loc);
|
||||
}
|
||||
|
||||
return m_FolderPath;
|
||||
}
|
||||
|
||||
std::wstring MeterWindow::GetRootPath()
|
||||
{
|
||||
std::wstring path = GetRainmeter().GetSkinPath();
|
||||
|
@ -162,6 +162,7 @@ public:
|
||||
const std::wstring& GetFolderPath() { return m_FolderPath; }
|
||||
const std::wstring& GetFileName() { return m_FileName; }
|
||||
std::wstring GetFilePath();
|
||||
std::wstring GetRootName();
|
||||
std::wstring GetRootPath();
|
||||
std::wstring GetResourcesPath();
|
||||
std::wstring GetSkinPath();
|
||||
|
Loading…
Reference in New Issue
Block a user