1 # IR toolkit for tcl/tk
3 # See the file LICENSE for details.
4 # Sebastian Hammer, Adam Dickmeiss
7 # Revision 1.4 1995-06-19 08:10:21 adam
8 # Inverse highligt colours in monochrome mode.
10 # Revision 1.3 1995/06/16 12:29:00 adam
11 # Use insertWithTags on diagnostic errors.
13 # Revision 1.2 1995/06/13 14:39:06 adam
14 # Fix: if {$var != ""} doesn't work if var is a large numerical!
15 # Highlight when line format is used.
17 # Revision 1.1 1995/06/12 15:18:10 adam
18 # Work on presentation formats. These are used in the main window as well
23 proc display-line {sno no w hflag} {
24 set type [z39.$sno type $no]
26 if {[tk colormodel .] == "color"} {
27 $w tag bind r$no <Any-Enter> \
28 [list $w tag configure r$no -background gray80]
29 $w tag bind r$no <Any-Leave> \
30 [list $w tag configure r$no -background {}]
32 $w tag bind r$no <Any-Enter> \
33 [list $w tag configure r$no -background black -foreground white]
34 $w tag bind r$no <Any-Leave> \
35 [list $w tag configure r$no -background {} -foreground {}]
42 set nostr [format "%5d " $no]
43 insertWithTags $w $nostr marc-tag
45 set title [lindex [z39.$sno getMarc $no field 245 * a] 0]
46 set year [lindex [z39.$sno getMarc $no field 260 * c] 0]
47 insertWithTags $w "$title - $year\n" marc-data
49 } elseif {$type == "SD"} {
50 set err [lindex [z39.$sno diag $no] 1]
51 set add [lindex [z39.$sno diag $no] 2]
55 insertWithTags $w "Error ${err}${add}\n" marc-data
56 } elseif {$type == ""} {