#!/usr/bin/wish -f
option add *background lightgray
option add *borderWidth 1
set tk_strictMotif 1
. configure -background lightgray


wm title . "Popup"

label .l -text "Message from [ lindex $argv 0 ] on [ lindex $argv 1 ] at [ exec date +%H:%M ]"
pack .l -padx 4 -pady 4
frame .f -relief sunken
pack .f -fill x -padx 4
set f [ open [ lindex $argv 2 ] r ]
set i 0
while { ![ eof $f ] } {
  gets $f tmp
  if { ![ eof $f ] || "$tmp" != "" } {
    label .f.l$i -text $tmp
    pack .f.l$i -anchor nw
  }
  incr i
}
close $f
button .ok -text ok -width 10 -command exit
bind .ok <Return> { %W invoke }
pack .ok -pady 4 
focus .ok
