Skin information and instructions can be added to [Metadata] section.

This commit is contained in:
Kimmo Pekkola 2009-08-26 17:48:12 +00:00
parent dc3c767efa
commit 9246161739

View File

@ -1426,7 +1426,9 @@ void CMeterWindow::ReadSkin()
WCHAR* pos = items; WCHAR* pos = items;
while(wcslen(pos) > 0) while(wcslen(pos) > 0)
{ {
if(wcsicmp(L"Rainmeter", pos) != 0 && wcsicmp(L"Variables", pos) != 0) if(wcsicmp(L"Rainmeter", pos) != 0 &&
wcsicmp(L"Variables", pos) != 0 &&
wcsicmp(L"Metadata", pos) != 0)
{ {
std::wstring meterName, measureName; std::wstring meterName, measureName;
@ -2587,7 +2589,15 @@ LRESULT CMeterWindow::OnNcHitTest(WPARAM wParam, LPARAM lParam)
LRESULT CMeterWindow::OnSettingChange(WPARAM wParam, LPARAM lParam) LRESULT CMeterWindow::OnSettingChange(WPARAM wParam, LPARAM lParam)
{ {
m_Monitors.count = 0; m_Monitors.count = 0;
try
{
Refresh(false); Refresh(false);
}
catch (CError& error)
{
MessageBox(m_Window, error.GetString().c_str(), APPNAME, MB_OK | MB_TOPMOST | MB_ICONEXCLAMATION);
}
// Commented: Calling DefWindowProc seems to cause crash sometimes // Commented: Calling DefWindowProc seems to cause crash sometimes
return 0; // DefWindowProc(m_Window, m_Message, wParam, lParam); return 0; // DefWindowProc(m_Window, m_Message, wParam, lParam);
@ -3163,8 +3173,15 @@ LRESULT CMeterWindow::OnDelayedExecute(WPARAM wParam, LPARAM lParam)
** **
*/ */
LRESULT CMeterWindow::OnDelayedRefresh(WPARAM wParam, LPARAM lParam) LRESULT CMeterWindow::OnDelayedRefresh(WPARAM wParam, LPARAM lParam)
{
try
{ {
Refresh(false); Refresh(false);
}
catch (CError& error)
{
MessageBox(m_Window, error.GetString().c_str(), APPNAME, MB_OK | MB_TOPMOST | MB_ICONEXCLAMATION);
}
return 0; return 0;
} }