mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Reverted fd5de00
This commit is contained in:
parent
6394b447ba
commit
bd0ec4ece0
@ -1505,20 +1505,11 @@ void CRainmeter::SetSkinPath(const std::wstring& skinPath)
|
|||||||
|
|
||||||
void CRainmeter::SetSkinEditor(const std::wstring& path)
|
void CRainmeter::SetSkinEditor(const std::wstring& path)
|
||||||
{
|
{
|
||||||
assert(!path.empty());
|
if (!path.empty())
|
||||||
|
|
||||||
const WCHAR* pathSz = path.c_str();
|
|
||||||
WCHAR buffer[MAX_PATH];
|
|
||||||
DWORD cchOut = MAX_PATH;
|
|
||||||
HRESULT hr = AssocQueryString(ASSOCF_NOTRUNCATE, ASSOCSTR_EXECUTABLE, L".ini", L"open", buffer, &cchOut);
|
|
||||||
if (SUCCEEDED(hr) && _wcsicmp(pathSz, buffer) == 0)
|
|
||||||
{
|
{
|
||||||
// The selected editor and the associated editor is the same, so remove from Rainmeter.ini.
|
m_SkinEditor = path;
|
||||||
pathSz = NULL;
|
WritePrivateProfileString(L"Rainmeter", L"ConfigEditor", path.c_str(), m_IniFile.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_SkinEditor = path;
|
|
||||||
WritePrivateProfileString(L"Rainmeter", L"ConfigEditor", pathSz, m_IniFile.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRainmeter::WriteActive(const std::wstring& folderPath, int fileIndex)
|
void CRainmeter::WriteActive(const std::wstring& folderPath, int fileIndex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user