# Sebastian Hammer, Adam Dickmeiss
#
# $Log: client.tcl,v $
-# Revision 1.58 1995-06-29 12:34:06 adam
+# Revision 1.62 1995-08-04 11:32:37 adam
+# More work on output queue. Memory related routines moved
+# to mem.c
+#
+# Revision 1.61 1995/07/20 08:09:39 adam
+# client.tcl: Targets removed from hotTargets list when targets
+# are removed/modified.
+# ir-tcl.c: More work on triggerResourceControl.
+#
+# Revision 1.60 1995/06/30 16:30:19 adam
+# Minor changes.
+#
+# Revision 1.59 1995/06/29 14:06:25 adam
+# Another bug in install fixed. Configure searches for more versions of yaz.
+#
+# Revision 1.58 1995/06/29 12:34:06 adam
# IrTcl now works with both tk4.0b4/tcl7.4b4 and tk3.6/tcl7.3
#
# Revision 1.57 1995/06/29 09:20:30 adam
#
#
-set tk4 0
+if {$tk_version == "3.6"} {
+ set tk4 0
+} else {
+ set tk4 1
+}
+
if {$tk4} {
proc configure-enable-e {w n} {
incr n
set libdir LIBDIR
if {[file readable bitmaps/book2]} {
- set libdir .
+ set libdir .
}
if {! [file readable ${libdir}/bitmaps/book2]} {
puts "Cannot locate system files in ${libdir}. You must either run this"
set setOffset 0
set setMax 0
-if {0} {
proc tkerror err {
set w .tkerrorw
label $w.top.b -bitmap error
message $w.top.t -aspect 300 -text "Error: $err" \
- -font -Adobe-Helvetica-Bold-R-Normal-*-240-*
+ -font -Adobe-Helvetica-Bold-R-Normal-*-180-*
pack $w.top.b $w.top.t -side left -padx 10 -pady 10
bottom-buttons $w [list {Close} [list destroy $w]] 1
}
-}
proc read-formats {} {
global displayFormats
}
proc dputs {m} {
-# puts $m
+ puts $m
}
proc set-display-format {f} {
proc update-target-hotlist {target base} {
global hotTargets
- global tk4
- set len [llength $hotTargets]
- if {$len > 0} {
- if {$tk4} {
- .top.target.m delete 7 [expr 7+[llength $hotTargets]]
- } else {
- .top.target.m delete 6 [expr 6+[llength $hotTargets]]
- }
- }
+ set olen [llength $hotTargets]
set i 0
foreach e $hotTargets {
if {$target == [lindex $e 0] && $base == [lindex $e 1]} {
incr i
}
set hotTargets [linsert $hotTargets 0 [list $target $base]]
- set-target-hotlist
+ set-target-hotlist $olen
}
-proc set-target-hotlist {} {
+proc delete-target-hotlist {target} {
global hotTargets
-
+
+ set olen [llength $hotTargets]
+ set i 0
+ foreach e $hotTargets {
+ if {$target == [lindex $e 0]} {
+ set hotTargets [lreplace $hotTargets $i $i]
+ }
+ incr i
+ }
+ set-target-hotlist $olen
+}
+
+proc set-target-hotlist {olen} {
+ global hotTargets
+ global tk4
+
+ if {$olen > 0} {
+ if {$tk4} {
+ .top.target.m delete 7 [expr 7+$olen]
+ } else {
+ .top.target.m delete 6 [expr 6+$olen]
+ }
+ }
set i 1
foreach e $hotTargets {
set target [lindex $e 0]
proc load-set {} {
set w .load-set
-
- set oldFocus [focus]
toplevel $w
-
+ set oldFocus [focus]
place-force $w .
top-down-window $w
bind [lindex $list $i] <Return> $returnAction
bind [lindex $list $i] <Escape> $escapeAction
if {!$tk4} {
- bind [lindex $list $i] <Tab> [list focus [lindex $list 0]]
+ bind [lindex $list $i] <Tab> [list focus [lindex $list 0]]
bind [lindex $list $i] <Left> [list left-cursor [lindex $list $i]]
bind [lindex $list $i] <Right> [list right-cursor [lindex $list $i]]
}
unset profile($target)
set settingsChanged 1
cascade-target-list
+ delete-target-hotlist $target
}
}
$wno]
cascade-target-list
+ delete-target-hotlist $target
dputs $profile($target)
destroy $w
}
global profile
set w .database-select
-
- set oldFocus [focus]
toplevel $w
+ set oldFocus [focus]
set wno [lindex $profile($target) 12]
place-force $w .setup-${wno}
global hostid
toplevel $w
-
+ set oldFocus [focus]
place-force $w .
top-down-window $w
$w.top.databases.list insert end $b
}
top-down-ok-cancel $w {database-select-action} 1
+ focus $oldFocus
}
proc cascade-target-list {} {
set w .query-new
toplevel $w
+ set oldFocus [focus]
place-force $w .
top-down-window $w
frame $w.top.index
{{Query Name:}} \
query-new-action {destroy .query-new}
top-down-ok-cancel $w query-new-action 1
+ focus $oldFocus
}
proc query-delete-action {queryNo} {
global alertAnswer
toplevel $w
+ set oldFocus [focus]
place-force $w .
top-down-window $w
set alertAnswer 0
top-down-ok-cancel $w {alert-action} 1
+ focus $oldFocus
return $alertAnswer
}
set w .query-add-index
toplevel $w
+ set oldFocus [focus]
place-force $w .query-setup
top-down-window $w
frame $w.top.index
{{Index Name:}} \
[list query-add-index-action $queryNo] [list destroy $w]
top-down-ok-cancel $w [list query-add-index-action $queryNo] 1
+ focus $oldFocus
}
proc query-setup-action {queryNo} {
.top.target.m add cascade -label "Setup" -menu .top.target.m.slist
.top.target.m add command -label "Setup new" -command {define-target-dialog}
.top.target.m add separator
-set-target-hotlist
+set-target-hotlist 0
configure-disable-e .top.target.m 1
configure-disable-e .top.target.m 2
-side left -padx 2 -pady 2
ir z39
-
+z39 logLevel all
show-logo 1