Removed redundant code

This commit is contained in:
Birunthan Mohanathas 2012-08-12 17:02:08 +03:00
parent 489f2c5a30
commit adeb73478b
3 changed files with 154 additions and 198 deletions

View File

@ -2553,16 +2553,9 @@ bool CMeterWindow::UpdateMeasure(CMeasure* measure, bool force)
{
if (measure->HasDynamicVariables() &&
(measure->GetUpdateCounter() + 1) >= updateDivider)
{
try
{
measure->ReadOptions(m_Parser);
}
catch (CError& error)
{
LogError(error);
}
}
if (measure->Update())
{
@ -2591,16 +2584,9 @@ bool CMeterWindow::UpdateMeter(CMeter* meter, bool& bActiveTransition, bool forc
{
if (meter->HasDynamicVariables() &&
(meter->GetUpdateCounter() + 1) >= updateDivider)
{
try
{
meter->ReadOptions(m_Parser);
}
catch (CError& error)
{
LogError(error);
}
}
if (meter->Update())
{
@ -3212,8 +3198,6 @@ LRESULT CMeterWindow::OnMouseLeave(UINT uMsg, WPARAM wParam, LPARAM lParam)
**
*/
LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
try
{
if (wParam == IDM_SKIN_EDITSKIN)
{
@ -3375,11 +3359,6 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessage(tray, WM_COMMAND, wParam, lParam);
}
}
}
catch (CError& error)
{
LogError(error);
}
return 0;
}
@ -4338,15 +4317,8 @@ LRESULT CALLBACK CMeterWindow::InitialWndProc(HWND hWnd, UINT uMsg, WPARAM wPara
**
*/
LRESULT CMeterWindow::OnDelayedRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
try
{
Refresh(false);
}
catch (CError& error)
{
LogError(error);
}
return 0;
}

View File

@ -2479,15 +2479,8 @@ void CRainmeter::RefreshAll()
continue;
}
try
{
mw->Refresh(false, true);
}
catch (CError& error)
{
LogError(error);
}
}
}
CDialogAbout::UpdateSkins();

View File

@ -364,20 +364,11 @@ void CTrayWindow::ReadOptions(CConfigParser& parser)
CConfigParser* oldParser = Rainmeter->GetCurrentParser();
Rainmeter->SetCurrentParser(&parser);
try
{
m_Measure = CMeasure::Create(measureName.c_str(), NULL, L"TrayMeasure");
if (m_Measure)
{
m_Measure->ReadOptions(parser);
}
}
catch (CError& error)
{
delete m_Measure;
m_Measure = NULL;
LogError(error);
}
Rainmeter->SetCurrentParser(oldParser);
}