CComponentsFrmClock: Fix thread handling

- Set clock activ = false for default
This commit is contained in:
M. Liebmann
2014-02-13 18:18:59 +01:00
parent 0be3cb731d
commit ddc826ab51
4 changed files with 14 additions and 6 deletions

View File

@@ -76,11 +76,10 @@ void CComponentsFrmClock::initVarClock( const int& x_pos, const int& y_pos, cons
cl_thread = 0;
cl_interval = 1;
activeClock = true;
cl_blink_str = "";
paintClock = false;
activeClock = activ;
activeClock = activ;
if (activeClock)
startThread();
}
@@ -373,3 +372,12 @@ Font** CComponentsFrmClock::getClockFont()
return cl_font;
}
void CComponentsFrmClock::setClockActiv(bool activ/* = true*/)
{
activeClock = activ;
if (activ && !cl_thread)
startThread();
if (!activ && cl_thread)
stopThread();
}