]> git.entuzijast.net Git - imunes.git/commitdiff
Unbreak the scheduler, so that periodic events can be rescheduled even
authormarko <marko>
Mon, 23 Jun 2008 17:02:52 +0000 (17:02 +0000)
committermarko <marko>
Mon, 23 Jun 2008 17:02:52 +0000 (17:02 +0000)
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

index b2aadee48df14e852918500b1e04579b1f155d82..2ac478d1119d0bc2f4f52082dbf8ba2358010f71 100644 (file)
@@ -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