From e19db4d04b946532912e9422f78da4258c843fbd Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 14 Jun 1995 15:07:59 +0000 Subject: [PATCH] Bug fix in cascade-target-list. Uses yaz-version.h. --- client.tcl | 38 +++++++++++++++++++------------------- clientrc.tcl | 2 +- ir-tclp.h | 6 +++++- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/client.tcl b/client.tcl index c5048d7..faa1b3b 100644 --- a/client.tcl +++ b/client.tcl @@ -4,7 +4,10 @@ # Sebastian Hammer, Adam Dickmeiss # # $Log: client.tcl,v $ -# Revision 1.40 1995-06-14 13:37:17 adam +# Revision 1.41 1995-06-14 15:07:59 adam +# Bug fix in cascade-target-list. Uses yaz-version.h. +# +# Revision 1.40 1995/06/14 13:37:17 adam # Setting recordType implemented. # Setting implementationVersion implemented. # Settings implementationId / implementationName edited. @@ -801,12 +804,6 @@ proc search-request {} { show-status {Search} 1 0 } -proc scan-focus {w} { - set oldFocus [focus] - bind $w [list focus $oldFocus] - focus $w.top.entry -} - proc scan-request {} { set w .scan-window @@ -859,7 +856,6 @@ proc scan-request {} { bind $w.top.list [list scan-down $attr] } wm title $w "Scan $title" -# bind $w.top [list scan-focus $w] z39 callback [list scan-response $attr 0 35] z39.scan numberOfTermsRequested 5 @@ -1248,7 +1244,8 @@ proc define-target-dialog {} { proc protocol-setup-delete {target} { global profile - set a [alert "Are you you want to delete the target definition $target ?"] + set a [alert "Are you sure you want to delete the target \ +definition $target ?"] if {$a} { set wno [lindex $profile($target) 12] set w .setup-${wno} @@ -1347,10 +1344,17 @@ proc delete-database {target} { set wno [lindex $profile($target) 12] set w .setup-${wno} - - foreach i [lsort -decreasing \ - [$w.top.databases.list curselection]] { - $w.top.databases.list delete $i + set l {} + foreach i [$w.top.databases.list curselection] { + set b [$w.top.databases.list get $i] + set l "$l $b" + } + set a [alert "Are you sure you want to remove the database(s)${l}?"] + if {$a} { + foreach i [lsort -decreasing \ + [$w.top.databases.list curselection]] { + $w.top.databases.list delete $i + } } } @@ -1541,7 +1545,7 @@ proc cascade-target-list {} { .top.target.m.clist delete 0 last foreach n [array names profile] { if {$n != "Default"} { - set nl [string tolower $n] + set nl [lindex $profile($n) 12] if {[llength [lindex $profile($n) 7]] > 1} { .top.target.m.clist add cascade -label $n \ -menu .top.target.m.clist.$nl @@ -2307,7 +2311,7 @@ proc query-setup {queryNo} { foreach x $queryInfoTmp { $w.top.index.list insert end [lindex $x 0] } - # Ok-cancel + # Bottom bottom-buttons $w [list \ {Ok} [list query-setup-action $queryNo] \ {Add index} [list query-add-index $queryNo] \ @@ -2597,11 +2601,7 @@ pack .bot.a.target -side top -anchor nw -padx 2 -pady 2 pack .bot.a.status .bot.a.set .bot.a.message \ -side left -padx 2 -pady 2 -#bind . {focus .lines.0.e} - ir z39 -#.top.options.m.formats invoke $displayFormat - show-logo 1 diff --git a/clientrc.tcl b/clientrc.tcl index 9b4afc5..d8c477c 100644 --- a/clientrc.tcl +++ b/clientrc.tcl @@ -1,7 +1,7 @@ # Setup file set {profile(CNIDR)} {CNIDR Kudzu.cnidr.org 5556 {} 16384 8192 tcpip {Book ERIC} 1 {} {} z39v2 1} set {profile(Penn)} {{Penn State's Library} 128.118.88.200 210 {} 16384 8192 tcpip CATALOG 1 {} {} z39v2 2} -set {profile(A new server)} {{A completely new server} dtbsun.dtv.dk 9999 {} 16384 8192 tcpip dummy {} {} {} z39v2 20} +set {profile(A new server)} {{A completely new server} dtbsun.dtv.dk 9999 {} 16384 8192 tcpip {aaa aaaa} {} {} {} z39v2 20} set {profile(ztest)} {{test server} localhost 9999 {} 16384 4096 tcpip dummy 1 {} {} z39v2 3} set {profile(Nsrtest)} {{NSR in house.} localhost 4500 {} 16384 8192 mosi x 1 {} {} sr 4} set {profile(Default)} {{} {} {210} {} 16384 8192 tcpip {} {} {} {} {} 22} diff --git a/ir-tclp.h b/ir-tclp.h index 8ad98d2..dd01323 100644 --- a/ir-tclp.h +++ b/ir-tclp.h @@ -5,7 +5,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: ir-tclp.h,v $ - * Revision 1.8 1995-06-14 13:37:18 adam + * Revision 1.9 1995-06-14 15:08:01 adam + * Bug fix in cascade-target-list. Uses yaz-version.h. + * + * Revision 1.8 1995/06/14 13:37:18 adam * Setting recordType implemented. * Setting implementationVersion implemented. * Settings implementationId / implementationName edited. @@ -55,6 +58,7 @@ #include #endif +#include #include #include #include -- 1.7.10.4