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())
{
@ -3213,8 +3199,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)
{
Rainmeter->EditSkinFile(m_FolderPath, m_FileName);
@ -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;
}
@ -4339,14 +4318,7 @@ 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);
}