# Sebastian Hammer, Adam Dickmeiss
#
# $Log: client.tcl,v $
-# Revision 1.59 1995-06-29 14:06:25 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
label $w.top.b -bitmap error
message $w.top.t -aspect 300 -text "Error: $err" \
- -font -Adobe-Helvetica-Bold-R-Normal-*-200-*
+ -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 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
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