CComponentsFrmClock: Fix thread handling

- Set clock activ = false for default


Origin commit data
------------------
Commit: ddc826ab51
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-02-13 (Thu, 13 Feb 2014)
This commit is contained in:
Michael Liebmann
2014-02-13 18:18:59 +01:00
parent 9de76bc073
commit c259eb1dc8
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();
}