From 776410582f483ba74ce1068ff0dc0e9f068fb5d7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 1 Sep 2007 04:36:03 +0000 Subject: r16442@tres: ted | 2007-08-30 21:51:42 -0700 One preference dialog per effect. Nothing crazy here. Also setting the timer to be ref counted in lock/unlock mode. This way the whole thing stays locked while the dialog is shown. (bzr r3653) --- src/extension/timer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/extension/timer.cpp') diff --git a/src/extension/timer.cpp b/src/extension/timer.cpp index 0e7a6ad11..c7a9331a0 100644 --- a/src/extension/timer.cpp +++ b/src/extension/timer.cpp @@ -33,11 +33,10 @@ bool ExpirationTimer::timer_started = false; the first timer extension, the timer is kicked off. This function also sets up teh circularly linked list of all the timers. */ -ExpirationTimer::ExpirationTimer (Extension * in_extension) +ExpirationTimer::ExpirationTimer (Extension * in_extension): + locked(0), + extension(in_extension) { - locked = false; - extension = in_extension; - /* Fix Me! */ if (timer_list == NULL) { next = this; @@ -124,7 +123,7 @@ ExpirationTimer::touch (void) bool ExpirationTimer::expired (void) const { - if (locked) return false; + if (locked > 0) return false; Glib::TimeVal current; current.assign_current_time(); -- cgit v1.2.3