From 318d4547ef2ae363ce4db3764ab730f1a301dddf Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Sun, 12 Jan 2020 18:11:35 -0500 Subject: [PATCH] Use r, g, b settings from SHADE special. --- scripts/tkremind | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scripts/tkremind b/scripts/tkremind index f068c68e..4cf559f1 100755 --- a/scripts/tkremind +++ b/scripts/tkremind @@ -956,7 +956,7 @@ proc FillCalWindow {} { continue } "SHADE" { - DoShadeSpecial $n $stuff + DoShadeSpecial $n [dict get $obj r] [dict get $obj g] [dict get $obj b] continue } "MOON" { @@ -3241,20 +3241,13 @@ proc WriteReminder { out tag rem opts } { # %PROCEDURE: DoShadeSpecial # %ARGUMENTS: # n -- calendar box to shade -# stuff -- Remind command line +# r, g, b -- colour components # %RETURNS: # Nothing # %DESCRIPTION: # Handles the "SHADE" special -- shades a box. #*********************************************************************** -proc DoShadeSpecial { n stuff } { - set num [scan $stuff "%d %d %d" r g b] - if {$num == 1} { - set g $r - set b $r - } elseif {$num != 3} { - return - } +proc DoShadeSpecial { n r g b } { if {$r < 0 || $r > 255 || $g < 0 || $g > 255 || $b < 0 || $b > 255} { return }