mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
The deactivated window wasn't deleted properly (issue 117).
Deactivating a config kept it still activate in the rainmeter.ini file (issue 118).
This commit is contained in:
parent
0ccc1e8388
commit
b5042589cb
@ -141,6 +141,7 @@ public:
|
|||||||
|
|
||||||
void MoveWindow(int x, int y);
|
void MoveWindow(int x, int y);
|
||||||
void ChangeZPos(ZPOSITION zPos);
|
void ChangeZPos(ZPOSITION zPos);
|
||||||
|
void FadeWindow(int from, int to);
|
||||||
|
|
||||||
Gdiplus::Bitmap* GetDoubleBuffer() { return m_DoubleBuffer; };
|
Gdiplus::Bitmap* GetDoubleBuffer() { return m_DoubleBuffer; };
|
||||||
HWND GetWindow() { return m_Window; };
|
HWND GetWindow() { return m_Window; };
|
||||||
@ -222,7 +223,6 @@ private:
|
|||||||
void ShowWindowIfAppropriate();
|
void ShowWindowIfAppropriate();
|
||||||
bool DoAction(int x, int y, MOUSE mouse, bool test);
|
bool DoAction(int x, int y, MOUSE mouse, bool test);
|
||||||
bool ResizeWindow(bool reset);
|
bool ResizeWindow(bool reset);
|
||||||
void FadeWindow(int from, int to);
|
|
||||||
|
|
||||||
CConfigParser m_Parser;
|
CConfigParser m_Parser;
|
||||||
|
|
||||||
|
@ -1180,10 +1180,10 @@ void CRainmeter::ActivateConfig(int configIndex, int iniIndex)
|
|||||||
{
|
{
|
||||||
m_ConfigStrings[configIndex].active = iniIndex + 1;
|
m_ConfigStrings[configIndex].active = iniIndex + 1;
|
||||||
|
|
||||||
CreateMeterWindow(skinPath, skinConfig, skinIniFile);
|
|
||||||
|
|
||||||
wsprintf(buffer, L"%i", iniIndex + 1);
|
wsprintf(buffer, L"%i", iniIndex + 1);
|
||||||
WritePrivateProfileString(skinConfig.c_str(), L"Active", buffer, m_IniFile.c_str());
|
WritePrivateProfileString(skinConfig.c_str(), L"Active", buffer, m_IniFile.c_str());
|
||||||
|
|
||||||
|
CreateMeterWindow(skinPath, skinConfig, skinIniFile);
|
||||||
}
|
}
|
||||||
catch(CError& error)
|
catch(CError& error)
|
||||||
{
|
{
|
||||||
@ -1232,7 +1232,22 @@ void CRainmeter::ClearDeleteLaterList()
|
|||||||
{
|
{
|
||||||
while (!m_DelayDeleteList.empty())
|
while (!m_DelayDeleteList.empty())
|
||||||
{
|
{
|
||||||
DeleteMeterWindow(m_DelayDeleteList.front(), false);
|
CMeterWindow* meterWindow = m_DelayDeleteList.front();
|
||||||
|
delete meterWindow;
|
||||||
|
|
||||||
|
// Remove from the delete later list
|
||||||
|
m_DelayDeleteList.remove(meterWindow);
|
||||||
|
|
||||||
|
// Remove from the meter window list if it is still there
|
||||||
|
std::map<std::wstring, CMeterWindow*>::iterator iter = m_Meters.begin();
|
||||||
|
for (; iter != m_Meters.end(); iter++)
|
||||||
|
{
|
||||||
|
if ((*iter).second == meterWindow)
|
||||||
|
{
|
||||||
|
m_Meters.erase(iter);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1241,6 +1256,7 @@ bool CRainmeter::DeleteMeterWindow(CMeterWindow* meterWindow, bool bLater)
|
|||||||
if (bLater)
|
if (bLater)
|
||||||
{
|
{
|
||||||
m_DelayDeleteList.push_back(meterWindow);
|
m_DelayDeleteList.push_back(meterWindow);
|
||||||
|
meterWindow->FadeWindow(meterWindow->GetAlphaValue(), 0); // Fade out the window
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user