From 7da54d6d67ad08d7fe26729679f93ba7c703e783 Mon Sep 17 00:00:00 2001 From: marko Date: Mon, 23 Jun 2008 17:02:52 +0000 Subject: [PATCH] Unbreak the scheduler, so that periodic events can be rescheduled even in absence of another event for the same target scheduled in the future. Allow for link width to be modulated from the event scheduler, and convert integer values to appropriate format for specifying 24-bit color, so that colors can be specified both as plain integers as well as using standard Tk color naming conventions. Bug found by: Submitted by: Reviewed by: Approved by: Obtained from: --- eventsched.tcl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/eventsched.tcl b/eventsched.tcl index b2aadee..2ac478d 100644 --- a/eventsched.tcl +++ b/eventsched.tcl @@ -23,7 +23,7 @@ # SUCH DAMAGE. # -# $Id: eventsched.tcl,v 1.2 2008/06/22 23:32:17 marko Exp $ +# $Id: eventsched.tcl,v 1.3 2008/06/23 17:02:52 marko Exp $ set sched_init_done 0 @@ -65,7 +65,7 @@ proc evsched {} { if { $next > $deadline } { set nextev \ [lsearch $eventqueue "* $class $object $target *"] - if { $nextev > -1 && \ + if { $nextev == -1 || \ [lindex [lindex $eventqueue $nextev] 0] > $next } { lappend eventqueue "$next [lrange $event 1 end]" set need_sort 1 @@ -87,8 +87,15 @@ proc evsched {} { duplicate { setLinkDup $object $value } + width { + setLinkWidth $object $value + } color { - setLinkColor $object $value + if { [string is integer $value] == 1 } { + setLinkColor $object [format #%06x $value] + } else { + setLinkColor $object $value + } } } #execSetLinkParams $eid $object -- 2.39.5