diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-14 09:54:05 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-14 09:54:05 +0000 |
| commit | 96a9196cbb71b7f8d5e3d98a92b2e59bb1b591a8 (patch) | |
| tree | 795fa58db8ecd287d1b77f76818cc260b106db17 /otk/imagecontrol.cc | |
| parent | 0afb43164484dcac4773ad778c032687da6b01aa (diff) | |
otk::Timer-ng!! thanks ManMower for this shizznit!
Diffstat (limited to 'otk/imagecontrol.cc')
| -rw-r--r-- | otk/imagecontrol.cc | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/otk/imagecontrol.cc b/otk/imagecontrol.cc index 348e2343..ab8f5c50 100644 --- a/otk/imagecontrol.cc +++ b/otk/imagecontrol.cc @@ -41,11 +41,10 @@ static unsigned long bsqrt(unsigned long x) { ImageControl *ctrl = 0; -ImageControl::ImageControl(TimerQueueManager *timermanager, - const ScreenInfo *scrn, - bool _dither, int _cpc, - unsigned long cache_timeout, - unsigned long cmax) { +ImageControl::ImageControl(const ScreenInfo *scrn, + bool _dither, int _cpc, + unsigned long cache_timeout, + unsigned long cmax) { if (! ctrl) ctrl = this; screeninfo = scrn; @@ -53,13 +52,10 @@ ImageControl::ImageControl(TimerQueueManager *timermanager, setColorsPerChannel(_cpc); cache_max = cmax; - if (cache_timeout) { - timer = new Timer(timermanager, (TimeoutHandler)timeout, this); - timer->setTimeout(cache_timeout); - timer->start(); - } else { + if (cache_timeout) + timer = new Timer(cache_timeout, (Timer::TimeoutHandler)timeout, this); + else timer = (Timer *) 0; - } colors = (XColor *) 0; ncolors = 0; @@ -350,10 +346,8 @@ ImageControl::~ImageControl(void) { for (; it != end; ++it) XFreePixmap(**display, it->pixmap); } - if (timer) { - timer->stop(); + if (timer) delete timer; - } } |
