Added OnCloseAction

This commit is contained in:
Brian 2012-03-31 11:55:56 +03:00 committed by Birunthan Mohanathas
parent 024a720c11
commit 7d0706c56a
2 changed files with 7 additions and 0 deletions

View File

@ -166,6 +166,11 @@ CMeterWindow::CMeterWindow(const std::wstring& config, const std::wstring& iniFi
*/
CMeterWindow::~CMeterWindow()
{
if (!m_OnCloseAction.empty())
{
m_Rainmeter->ExecuteCommand(m_OnCloseAction.c_str(), this);
}
WriteConfig();
// Kill the timer
@ -2065,6 +2070,7 @@ bool CMeterWindow::ReadSkin()
m_MouseOverAction = m_Parser.ReadString(L"Rainmeter", L"MouseOverAction", L"", false);
m_MouseLeaveAction = m_Parser.ReadString(L"Rainmeter", L"MouseLeaveAction", L"", false);
m_OnRefreshAction = m_Parser.ReadString(L"Rainmeter", L"OnRefreshAction", L"", false);
m_OnCloseAction = m_Parser.ReadString(L"Rainmeter", L"OnCloseAction", L"", false);
m_WindowUpdate = m_Parser.ReadInt(L"Rainmeter", L"Update", INTERVAL_METER);
m_TransitionUpdate = m_Parser.ReadInt(L"Rainmeter", L"TransitionUpdate", INTERVAL_TRANSITION);

View File

@ -372,6 +372,7 @@ private:
std::wstring m_MouseOverAction; // Action to run when mouse goes over the window
std::wstring m_MouseLeaveAction; // Action to run when mouse leaves the window
std::wstring m_OnRefreshAction; // Action to run when window is initialized
std::wstring m_OnCloseAction; // Action to run when window is closed
bool m_MouseOver;