wm title . "IrTcl Client"
-#wm iconname . "IrTcl Client"
-
# Procedure irmenu
proc irmenu {w} {
- menu $w -tearoff off
+ menu $w -tearoff off
}
proc debug-window {} {
- set w .debug-window
+ set w .debug-window
toplevel $w
wm title $w "Debug Window"
frame $w.bot -relief raised -border 1
pack $w.top -side top -fill both -expand yes
pack $w.bot -fill both
- scrollbar $w.top.s -command [list $w.top.t yview]
+ scrollbar $w.top.s -command [list $w.top.t yview]
text $w.top.t -width 60 -height 10 -wrap word -relief flat -borderwidth 0 \
-font fixed -yscroll [list $w.top.s set]
pack $w.top.s -side right -fill y
# n menu entry number (0 is first entry)
# Enables menu entry
proc configure-enable-e {w n} {
- $w entryconfigure $n -state normal
+ $w entryconfigure $n -state normal
}
# Procedure configure-disable-e {w n}
# n menu entry number (0 is first entry)
# Disables menu entry
proc configure-disable-e {w n} {
- $w entryconfigure $n -state disabled
+ $w entryconfigure $n -state disabled
}
set noFocus [list -takefocus 0]
# Override the Tk error handler function.
if {1} {
proc tkerror err {
- global font
- set w .tkerrorw
-
- if {[winfo exists $w]} {
- destroy $w
- }
- toplevel $w
- wm title $w "Error"
-
- place-force $w .
- top-down-window $w
-
- label $w.top.b -bitmap error
- message $w.top.t -aspect 300 -text "Error: $err" -font $font(b,bold)
- pack $w.top.b $w.top.t -side left -padx 10 -pady 10
-
- bottom-buttons $w [list {Close} [list destroy $w]] 1
+ global font
+ set w .tkerrorw
+
+ if {[winfo exists $w]} {
+ destroy $w
+ }
+ toplevel $w
+ wm title $w "Error"
+
+ place-force $w .
+ top-down-window $w
+
+ label $w.top.b -bitmap error
+ message $w.top.t -aspect 300 -text "Error: $err" -font $font(b,bold)
+ pack $w.top.b $w.top.t -side left -padx 10 -pady 10
+
+ bottom-buttons $w [list {Close} [list destroy $w]] 1
}
}
# Read tag set file (if present)
if {[file readable [file join $libdir tagsets.tcl]]} {
- source [file join $libdir tagsets.tcl]
+ source [file join $libdir tagsets.tcl]
}
# Read the global target configuration file.
foreach target [array names profile] {
set timedef [clock seconds]
if {[string first , $target] == -1} {
- if {![info exists profile($target,port)]} {
- foreach n [array names profile Default,*] {
- set profile($target,[string range $n 8 end]) $profile($n)
- }
- set profile($target,description) [lindex $profile($target) 0]
- set profile($target,host) [lindex $profile($target) 1]
- set profile($target,port) [lindex $profile($target) 2]
- set profile($target,authentication) [lindex $profile($target) 3]
- set profile($target,maximumRecordSize) \
- [lindex $profile($target) 4]
- set profile($target,preferredMessageSize) \
- [lindex $profile($target) 5]
- set profile($target,comstack) [lindex $profile($target) 6]
- set profile($target,databases) [lindex $profile($target) 7]
- set profile($target,timeDefine) $timedef
- set profile($target,windowNumber) 1
- }
- unset profile($target)
+ if {![info exists profile($target,port)]} {
+ foreach n [array names profile Default,*] {
+ set profile($target,[string range $n 8 end]) $profile($n)
+ }
+ set profile($target,description) [lindex $profile($target) 0]
+ set profile($target,host) [lindex $profile($target) 1]
+ set profile($target,port) [lindex $profile($target) 2]
+ set profile($target,authentication) [lindex $profile($target) 3]
+ set profile($target,maximumRecordSize) \
+ [lindex $profile($target) 4]
+ set profile($target,preferredMessageSize) \
+ [lindex $profile($target) 5]
+ set profile($target,comstack) [lindex $profile($target) 6]
+ set profile($target,databases) [lindex $profile($target) 7]
+ set profile($target,timeDefine) $timedef
+ set profile($target,windowNumber) 1
+ }
+ unset profile($target)
}
}
cd [file join $libdir formats]
set formats [glob {*.[tT][cC][lL]}]
foreach f $formats {
- if {[file readable $f]} {
+ if {[file readable $f]} {
source $f
set l [string length $f]
set f [string tolower [string range $f 0 [expr $l - 5]]]
top-down-window $w
text $w.top.t -font fixed -width 60 -height 12 -wrap word \
- -relief flat -borderwidth 0 \
- -yscrollcommand [list $w.top.s set] -background grey85
+ -relief flat -borderwidth 0 \
+ -yscrollcommand [list $w.top.s set] -background grey85
scrollbar $w.top.s -command [list $w.top.t yview]
pack $w.top.s -side right -fill y
pack $w.top.t -expand yes -fill both
frame $w.bot.$i -relief sunken -border 1
pack $w.bot.$i -side left -expand yes -padx 2 -pady 2
button $w.bot.$i.ok -text [lindex $buttonList $i] \
- -command [lindex $buttonList [expr $i + 1]]
+ -command [lindex $buttonList [expr $i + 1]]
pack $w.bot.$i.ok -expand yes -padx 2 -pady 2 -side left
incr i 2
return
}
if {![string length $base]} {
- .bot.a.target configure -text "$target"
+ .bot.a.target configure -text "$target"
} else {
.bot.a.target configure -text "$target - $base"
}
$w.top.record tag configure marc-id -foreground red
$w.top.record tag configure marc-data -foreground black
$w.top.record tag configure marc-head -font $font(n,bold) \
- -background black -foreground white
+ -background black -foreground white
$w.top.record tag configure marc-pref -font $font(n,normal) -foreground blue
$w.top.record tag configure marc-text -font $font(n,normal) -foreground black
$w.top.record tag configure marc-it -font $font(n,normal) -foreground black
set i 0
foreach f $displayFormats {
$w.bot.formats.m add radiobutton -label $f -variable popupMarcdf -value $i \
- -command [list popup-marc $sno $no $b 0]
+ -command [list popup-marc $sno $no $b 0]
incr i
}
$w.top.record delete 0.0 end
set i 0
foreach e $hotTargets {
if {$target == [lindex $e 0]} {
- set hotTargets [lreplace $hotTargets $i $i]
+ set hotTargets [lreplace $hotTargets $i $i]
}
incr i
}
}
}
foreach n [array names profile Default,*] {
- set profile($target,[string range $n 8 end]) $profile($n)
+ set profile($target,[string range $n 8 end]) $profile($n)
}
incr profile(Default,windowNumber)
}
close-target
# tkerror "$m ($c)"
- bgerror "$m ($c)"
+ bgerror "$m ($c)"
}
# Procedure connect-response {target base}
# tkerror "Connection rejected by target: $u"
bgerror "Connection rejected by target: $u"
} else {
- z39 failback [list explain-crash $target $base]
+ z39 failback [list explain-crash $target $base]
explain-check $target [list ready-response $base] $base
}
}
z39 failback [list fail-response $target]
if {[string length $base]} {
- set profile($target,timeLastInit) [clock seconds]
- set settingsChanged 1
+ set profile($target,timeLastInit) [clock seconds]
+ set settingsChanged 1
- z39 databaseNames $base
- cascade-dblist $target $base
- show-target $target $base
+ z39 databaseNames $base
+ cascade-dblist $target $base
+ show-target $target $base
}
if {[lsearch [z39 options] scan] >= 0} {
set scanEnable 1
}
set data [string trim $profile($target,welcomeMessage)]
if {[string length $data]} {
- .data.record insert end "Welcome Message:\n$data\n\n"
+ .data.record insert end "Welcome Message:\n$data\n\n"
}
set data [string trim $profile($target,recentNews)]
if {[string length $data]} {
#proc ready-response-actions {target base}
#This procedure take care of all the actions that should start if connect is succesfull.
proc ready-response-actions {target base} {
- global profile queryAuto
-# changeQueryButtons $target $base
- configureOptionsSyntax $target $base
- if {[info exists profile($target,AttributeDetails,$base,Bib1Use)] && $queryAuto == 1} {
- changeQueryButtons $target $base
- change-queryInfo $target $base
- query-select 2
- .top.options.m.query.slist entryconfigure 2 -state normal
-# listbuttonx
- } else {
- query-select 0
- .top.options.m.query.slist entryconfigure 2 -state disabled
- }
+ global profile queryAuto attributeTypeSelected
+ configureOptionsSyntax $target $base
+ if {[info exists profile($target,AttributeDetails,$base,Bib1Use)] && $queryAuto == 1} {
+ changeQueryButtons $target $base
+ change-queryInfo $target $base
+ query-select 2
+ .top.options.m.query.slist entryconfigure 2 -state normal
+ } else {
+ query-select 0
+ .top.options.m.query.slist entryconfigure 2 -state disabled
+ }
+ if {[info exists attributeTypeSelected]} {
+ global attribute[set attributeTypeSelected]
+ set attribute$attributeTypeSelected 1
+ } else {
+ global attributeBib1
+ set attributeBib1 1
+ }
}
# Procedure search-request
dputs "setName=default"
}
if {$profile($target,queryRPN)} {
- z39.$setNo queryType rpn
+ z39.$setNo queryType rpn
} elseif {$profile($target,queryCCL)} {
- z39.$setNo queryType ccl
+ z39.$setNo queryType ccl
}
dputs Setting
dputs $recordSyntax
set w .scan-window
global profile hostid scanView scanTerm curIndexEntry queryButtonsFind \
- queryInfoFind cancelFlag delayRequest
+ queryInfoFind cancelFlag delayRequest
dputs "scan-request"
if {$cancelFlag} {
if {$setNo == 0} {
dputs "setNo=$setNo"
- return
+ return
}
set setOffset [z39.$setNo nextResultSetPosition]
dputs "setOffest=${setOffset}"
top-down-window $w
frame $w.top.database
pack $w.top.database -side top -anchor e -pady 2
- entry-fields $w.top {database} {{Database to add:}} \
+ entry-fields $w.top {database} {{Database to add:}} \
[list add-database-action $target $wp] {destroy .database-select}
top-down-ok-cancel $w [list add-database-action $target $wp] 1
[list advanced-setup-action $target $b] [list destroy $w]
$w.top.largeSetLowerBound.entry configure -textvariable \
- profileS($target,largeSetLowerBound)
+ profileS($target,largeSetLowerBound)
$w.top.smallSetUpperBound.entry configure -textvariable \
- profileS($target,smallSetUpperBound)
+ profileS($target,smallSetUpperBound)
$w.top.mediumSetPresentNumber.entry configure -textvariable \
- profileS($target,mediumSetPresentNumber)
+ profileS($target,mediumSetPresentNumber)
$w.top.presentChunk.entry configure -textvariable \
- profileS($target,presentChunk)
+ profileS($target,presentChunk)
$w.top.maximumRecordSize.entry configure -textvariable \
- profileS($target,maximumRecordSize)
+ profileS($target,maximumRecordSize)
$w.top.preferredMessageSize.entry configure -textvariable \
- profileS($target,preferredMessageSize)
+ profileS($target,preferredMessageSize)
bottom-buttons $w [list {Ok} [list advanced-setup-action $target $b] \
{Cancel} [list destroy $w]] 0
set w .top.service.m.dblist
$w delete 0 200
if {[info exists profile($target,databases)]} {
- foreach db $profile($target,databases) {
- $w add command -label $db \
- -command [list cascade-dblist-select $target $db]
- }
+ foreach db $profile($target,databases) {
+ $w add command -label $db \
+ -command [list cascade-dblist-select $target $db]
+ }
}
}
}
.top.target.m.clist delete 0 last
foreach nn [lsort [array names profile *,host]] {
- if {[string length $profile($nn)]} {
- set ll [expr {[string length $nn] - 6}]
- set n [string range $nn 0 $ll]
-
- set nl $profile($n,windowNumber)
- if {[info exists profile($n,databases)]} {
- set ndb [llength $profile($n,databases)]
- } else {
- set ndb 0
- }
- if {$ndb > 1} {
- .top.target.m.clist add cascade -label $n \
- -menu .top.target.m.clist.$nl
- irmenu .top.target.m.clist.$nl
- foreach b $profile($n,databases) {
- .top.target.m.clist.$nl add command -label $b \
- -command [list reopen-target $n $b]
- }
- } elseif {$ndb == 1} {
- .top.target.m.clist add command -label $n -command \
- [list reopen-target $n [lindex $profile($n,databases) 0]]
- } else {
- .top.target.m.clist add command -label $n -command \
- [list reopen-target $n {}]
- }
- }
+ if {[string length $profile($nn)]} {
+ set ll [expr {[string length $nn] - 6}]
+ set n [string range $nn 0 $ll]
+
+ set nl $profile($n,windowNumber)
+ if {[info exists profile($n,databases)]} {
+ set ndb [llength $profile($n,databases)]
+ } else {
+ set ndb 0
+ }
+ if {$ndb > 1} {
+ .top.target.m.clist add cascade -label $n \
+ -menu .top.target.m.clist.$nl
+ irmenu .top.target.m.clist.$nl
+ foreach b $profile($n,databases) {
+ .top.target.m.clist.$nl add command -label $b \
+ -command [list reopen-target $n $b]
+ }
+ } elseif {$ndb == 1} {
+ .top.target.m.clist add command -label $n -command \
+ [list reopen-target $n [lindex $profile($n,databases) 0]]
+ } else {
+ .top.target.m.clist add command -label $n -command \
+ [list reopen-target $n {}]
+ }
+ }
}
.top.target.m.slist delete 0 last
foreach nn [lsort [array names profile *,host]] {
- set ll [expr {[string length $nn] - 6}]
- set n [string range $nn 0 $ll]
- .top.target.m.slist add command -label $n -command [list protocol-setup $n]
+ set ll [expr {[string length $nn] - 6}]
+ set n [string range $nn 0 $ll]
+ .top.target.m.slist add command -label $n -command [list protocol-setup $n]
}
}
global queryButtonsFind queryInfoFind queryButtons queryInfo queryAuto queryAutoOld hostid currentDb profile
if {$queryAutoOld == 1 && $queryAuto == 0} {
- set queryAutoOld $queryAuto
- return
+ set queryAutoOld $queryAuto
+ return
}
if {$queryAutoOld == 0 && $queryAuto == 1 && [info exists profile($hostid,AttributeDetails,$currentDb,Bib1Use)] == 0} {
- set queryAutoOld $queryAuto
- return
+ set queryAutoOld $queryAuto
+ return
}
set queryInfoFind [lindex $queryInfo $i]
set queryButtonsFind [lindex $queryButtons $i]
label $w.top.warning -bitmap warning
message $w.top.quest -text "Are you sure you want to delete the \
- query type $n ?" -aspect 300
+ query type $n ?" -aspect 300
pack $w.top.warning $w.top.quest -side left -expand yes -padx 10 -pady 5
bottom-buttons $w [list {Ok} [list query-delete-action $queryNo] \
- {Cancel} [list destroy $w]] 1
+ {Cancel} [list destroy $w]] 1
}
# Procedure cascade-query-list
# Updates the entries below Options|Query to list all query types.
proc cascade-query-list {} {
- global queryTypes hostid queryAuto
+ global queryTypes hostid queryAuto attributeTypes
set w .top.options.m.query
set i 0
$w.clist delete 0 last
foreach n $queryTypes {
- if {$n == "Auto"} {
- $w.clist add check -label $n -variable queryAuto -command [list query-select $i]
+ if {$n == "Auto"} {
+ $w.clist add check -label $n -variable queryAuto -command [list query-select $i]
} else {
- $w.clist add command -label $n -command [list query-select $i]
+ $w.clist add command -label $n -command [list query-select $i]
}
incr i
}
set i 0
$w.slist delete 0 last
foreach n $queryTypes {
- if {$n == "Auto"} {
- if {$hostid == "Default"} {
- $w.slist add command -label $n -state disabled -command [list query-setup $i]
- } else {
- $w.slist add command -label $n -command [list query-setup $i]
- }
+ if {$n == "Auto"} {
+ if {$hostid == "Default"} {
+ $w.slist add command -label $n -state disabled -command [list query-setup $i]
+ } else {
+ $w.slist add command -label $n -command [list query-setup $i]
+ }
} else {
- $w.slist add command -label $n -command [list query-setup $i]
+ $w.slist add command -label $n -command [list query-setup $i]
}
incr i
}
set i 0
+ $w.tlist delete 0 last
+ foreach n $attributeTypes {
+ global attribute$n
+ $w.tlist add check -label $n -variable attribute$n -command [list attribute-select $i]
+ incr i
+ }
+ set i 0
$w.dlist delete 0 last
foreach n $queryTypes {
$w.dlist add command -label $n -command [list query-delete $i]
# saved.
proc save-geometry {} {
global windowGeometry hotTargets textWrap displayFormat popupMarcdf \
- recordSyntax elementSetNames hostid
+ recordSyntax elementSetNames hostid
set windowGeometry(.) [wm geometry .]
# is normally kept in the directory /usr/local/lib/irtcl.
# All query types and target defintion profiles are saved.
proc save-settings {} {
- global profile libdir settingsChanged queryTypes queryButtons queryInfo queryAuto
+ global profile libdir settingsChanged queryTypes queryButtons queryInfo queryAuto attributeTypes attributeTypeSelected
if {[file writable [file join $libdir irtdb.tcl]]} {
set f [open [file join $libdir irtdb.tcl] w]
foreach n [lsort [array names profile]] {
puts $f "set [list profile($n)] [list $profile($n)]"
}
+ puts $f "set attributeTypes [list $attributeTypes]"
+ puts $f "set attributeTypeSelected [list $attributeTypeSelected]"
puts $f "set queryTypes [list $queryTypes]"
puts $f "set queryButtons [list $queryButtons]"
puts $f "set queryInfo [list $queryInfo]"
# user user argument to the $handle function
# Makes an extended listbutton.
proc listbuttonx {button no names handle user} {
- set width 10
- foreach name $names {
- set buttonName [lindex $name 0]
- if {[string length $buttonName] > $width} {
- set width [string length $buttonName]
- }
- }
+ set width 10
+ foreach name $names {
+ set buttonName [lindex $name 0]
+ if {[string length $buttonName] > $width} {
+ set width [string length $buttonName]
+ }
+ }
if {[winfo exists $button]} {
$button configure -width $width -text [lindex [lindex $names $no] 0]
${button}.m delete 0 last
} else {
menubutton $button -text [lindex [lindex $names $no] 0] \
- -width $width -menu ${button}.m -relief raised -border 1
+ -width $width -menu ${button}.m -relief raised -border 1
irmenu ${button}.m
${button}.m configure -tearoff off
}
set i 0
foreach name $names {
${button}.m add command -label [lindex $name 0] \
- -command [list listbuttonaction ${button} $name $handle $user $i]
+ -command [list listbuttonaction ${button} $name $handle $user $i]
incr i
}
}
# the user commits the query setup changes by pressing button "Ok".
proc query-setup-action {queryNo} {
global queryButtons queryInfo queryButtonsTmp queryInfoTmp queryButtonsFind \
- queryInfoFind settingsChanged hostid currentDb profile
+ queryInfoFind settingsChanged hostid currentDb profile
set settingsChanged 1
set queryInfo [lreplace $queryInfo $queryNo $queryNo $queryInfoTmp]
set queryButtons [lreplace $queryButtons $queryNo $queryNo $queryButtonsTmp]
if {[info exists profile($hostid,AttributeDetails,$currentDb,Bib1Use)]} {
- set profile($hostid,queryButtons,$currentDb) $queryButtonsTmp
+ set profile($hostid,queryButtons,$currentDb) $queryButtonsTmp
}
set queryInfoFind $queryInfoTmp
set queryButtonsFind $queryButtonsTmp
index-lines .lines 1 $queryButtonsFind $queryInfoFind activate-index
}
+#This procedure handles selection of what attribute set the user wants to use for searching.
+#queryNo index in the attributeTypes list (also the menu item number in Query|Type).
+proc attribute-select {queryNo} {
+ global attributeTypes attributeTypeSelected
+ set attributeTypeSelected [lindex $attributeTypes $queryNo]
+ foreach type $attributeTypes {
+ global attribute[set type]
+ set attribute$type 0
+ }
+ set attribute[lindex $attributeTypes $queryNo] 1
+}
+
#proc changeQueryButtons {target base}
-#target target name
-#base database name
+#target target name
+#base database name
#Substitutes the third element (the Auto element) in queryButtons with
#profile(target,queryButtons,base). The third element in queryInfo is also substituted with
#profile(target,AttributeDetails,base,Bib1Use)
proc changeQueryButtons {target base} {
- source bib-1.tcl
- global profile queryButtons queryInfo
- if {[info exists profile($target,queryButtons,$base)]} {
- set queryButtons [lreplace $queryButtons 2 2 $profile($target,queryButtons,$base)]
- foreach tag $profile($target,AttributeDetails,$base,Bib1Use) {
- if {$tag < 1037} {
- lappend tempList [list $bib1($tag) 1=$tag]
- }
- }
- set queryInfo [lreplace $queryInfo 2 2 $tempList]
- }
+ source bib-1.tcl
+ global profile queryButtons queryInfo
+ if {[info exists profile($target,queryButtons,$base)]} {
+ set queryButtons [lreplace $queryButtons 2 2 $profile($target,queryButtons,$base)]
+ foreach tag $profile($target,AttributeDetails,$base,Bib1Use) {
+ if {$tag < 1037} {
+ lappend tempList [list $bib1($tag) 1=$tag]
+ }
+ }
+ set queryInfo [lreplace $queryInfo 2 2 $tempList]
+ }
}
# Procedure activate-e-index {value no i}
# is 0 the current selection of the listbox is read and the global
# $useTmpValue is set to the current use-value.
proc use-attr {init} {
+ global useTmpValue
+ source bib-1.tcl
set attr {
{None} 0
{Personal name} 1
{Anywhere} 1035
}
set w .index-setup
- global useTmpValue
- set l [llength $attr]
if {$init} {
set s 0
set lno 0
- for {set i 0} {$i < $l} {incr i} {
- $w.top.use.list insert end [lindex $attr $i]
+ for {set i 0} {$i < 1037} {incr i} {
+ $w.top.use.list insert end $bib1($i)
incr i
- if {$useTmpValue == [lindex $attr $i]} {
+ if {$useTmpValue == $bib1($i)} {
set s $lno
}
+ if {$i == 63} {
+ set i 1000
+ }
incr lno
}
$w.top.use.list selection clear 0 end
} else {
set lno [lindex [$w.top.use.list curselection] 0]
set i [expr {$lno+$lno+1}]
- set useTmpValue [lindex $attr $i]
+ set useTmpValue $bib1($i)
dputs "useTmpValue=$useTmpValue"
}
}
set attr [lindex $oldAttr 0]
global useTmpValue relationTmpValue structureTmpValue truncationTmpValue \
- completenessTmpValue positionTmpValue queryInfoTmp
+ completenessTmpValue positionTmpValue queryInfoTmp
use-attr 0
set w .index-setup
global relationTmpValue structureTmpValue truncationTmpValue \
- completenessTmpValue positionTmpValue useTmpValue
+ completenessTmpValue positionTmpValue useTmpValue
set relationTmpValue 0
set truncationTmpValue 0
set structureTmpValue 0
pack $w.top.use -side left -pady 6 -padx 6 -fill y
label $w.top.use.label -text "Use"
- listbox $w.top.use.list -width 26 -yscrollcommand "$w.top.use.scroll set"
+ listbox $w.top.use.list -width 26 -yscrollcommand "$w.top.use.scroll set"
scrollbar $w.top.use.scroll -orient vertical -border 1
pack $w.top.use.label -side top -fill x -padx 2 -pady 2
pack $w.top.use.list -side left -fill both -expand yes -padx 2 -pady 2
# Ok-cancel
bottom-buttons $w [list \
- {Ok} [list index-setup-action $attr $queryNo $indexNo] \
- {Cancel} [list destroy $w]] 0
+ {Ok} [list index-setup-action $attr $queryNo $indexNo] \
+ {Cancel} [list destroy $w]] 0
}
# left truncation; (?) on right-side indicates right-truncation; (?)
# on both sides indicates both-left-and-right truncation.
proc index-query {} {
- global queryButtonsFind queryInfoFind
+ global queryButtonsFind queryInfoFind attributeTypeSelected
set i 0
set qs {}
}
set term "\{${term}\}"
if {$right && $left} {
- set term "@attr 5=3 ${term}"
+ set term "@attrset $attributeTypeSelected @attr 5=3 ${term}"
} elseif {$right} {
- set term "@attr 5=1 ${term}"
+ set term "@attrset $attributeTypeSelected @attr 5=1 ${term}"
} elseif {$left} {
- set term "@attr 5=2 ${term}"
+ set term "@attrset $attributeTypeSelected @attr 5=2 ${term}"
}
if {$relation != ""} {
- set term "@attr 2=${relation} ${term}"
+ set term "@attrset $attributeTypeSelected @attr 2=${relation} ${term}"
}
foreach a $attr {
- set term "@attr $a ${term}"
+ set term "@attrset $attributeTypeSelected @attr $a ${term}"
}
if {$qs != ""} {
set qs "@and ${qs} ${term}"
if {! [winfo exists $w.$i.e]} {
entry $w.$i.e -width 32 -relief sunken -border 1
bind $w.$i.e <FocusIn> [list index-focus-in $w $i]
- bind $w.$i.e <FocusOut> [list $w.$i configure -background white]
+ bind $w.$i.e <FocusOut> [list $w.$i configure -background white]
pack $w.$i.l -side left
pack $w.$i.e -side left -fill x -expand yes
pack $w.$i -side top -fill x -padx 2 -pady 2
set j $k
}
if {$i >= 0} {
- bind $w.$i.e <Tab> "focus $w.0.e"
+ bind $w.$i.e <Tab> "focus $w.0.e"
focus $w.0.e
}
}
#Procedure configureOptionsSyntax {target base}
-#target target name
-#base database name
+#target target name
+#base database name
#Changes the Options|Syntax menu acording to the information obtained via explain.
proc configureOptionsSyntax {target base} {
- global profile syntaxList recordSyntax
- set activate 0
- set i -1
- set w .top.options.m.syntax
- if {[info exists profile($target,RecordSyntaxes,$base)]} {
- foreach syntax $syntaxList {
- incr i
- if {$syntax == "sep"} {continue}
- if {[lsearch $profile($target,RecordSyntaxes,$base) $syntax] != -1} {
- configure-enable-e $w $i
- if {$activate == 0} {
- $w invoke $i
- set recordSyntax $syntax
- set activate 1
- }
- } else {
- configure-disable-e $w $i
- }
- }
- } else {
- foreach syntax $syntaxList {
- incr i
- if {$syntax == "sep"} {continue}
- configure-enable-e $w $i
- }
- $w invoke 0
- }
+ global profile syntaxList recordSyntax
+ set activate 0
+ set i -1
+ set w .top.options.m.syntax
+ if {[info exists profile($target,RecordSyntaxes,$base)]} {
+ foreach syntax $syntaxList {
+ incr i
+ if {$syntax == "sep"} {continue}
+ if {[lsearch $profile($target,RecordSyntaxes,$base) $syntax] != -1} {
+ configure-enable-e $w $i
+ if {$activate == 0} {
+ $w invoke $i
+ set recordSyntax $syntax
+ set activate 1
+ }
+ } else {
+ configure-disable-e $w $i
+ }
+ }
+ } else {
+ foreach syntax $syntaxList {
+ incr i
+ if {$syntax == "sep"} {continue}
+ configure-enable-e $w $i
+ }
+ $w invoke 0
+ }
}
# Init: The geometry information for the main window is set - either
# Init: Definition of the Options|Query menu.
irmenu .top.options.m.query
.top.options.m.query add cascade -label Select -menu .top.options.m.query.clist
+.top.options.m.query add cascade -label Type -menu .top.options.m.query.tlist
.top.options.m.query add cascade -label Edit -menu .top.options.m.query.slist
.top.options.m.query add command -label New -command {query-new}
.top.options.m.query add cascade -label Delete -menu .top.options.m.query.dlist
irmenu .top.options.m.query.slist
+irmenu .top.options.m.query.tlist
irmenu .top.options.m.query.clist
irmenu .top.options.m.query.dlist
cascade-query-list
# Init: Definition of the Options|Syntax menu.
proc initOptionsSyntax {} {
- global syntaxList recordSyntax
- set w .top.options.m.syntax
- irmenu $w
- foreach syntax $syntaxList {
- if {$syntax == "sep"} {
- $w add separator
- } else {
- $w add radiobutton -label $syntax -value $syntax -variable recordSyntax
- }
- }
+ global syntaxList recordSyntax
+ set w .top.options.m.syntax
+ irmenu $w
+ foreach syntax $syntaxList {
+ if {$syntax == "sep"} {
+ $w add separator
+ } else {
+ $w add radiobutton -label $syntax -value $syntax -variable recordSyntax
+ }
+ }
}
initOptionsSyntax
irmenu .top.options.m.elements
.top.options.m.elements add radiobutton -label Unspecified \
-value None -variable elementSetNames
-.top.options.m.elements add radiobutton -label Full \
- -value F -variable elementSetNames
+.top.options.m.elements add radiobutton -label Full -value F -variable elementSetNames
.top.options.m.elements add radiobutton -label Brief -value B -variable elementSetNames
# Init: Definition of Help menu.
# Init: Define record area in main window.
text .data.record -font fixed -height 2 -width 20 -wrap none -borderwidth 0 \
- -relief flat -yscrollcommand [list .data.scroll set] -wrap $textWrap
+ -relief flat -yscrollcommand [list .data.scroll set] -wrap $textWrap
scrollbar .data.scroll -command [list .data.record yview]
.data.record configure -takefocus 0
.data.scroll configure -takefocus 0
set profile(BIBSYS,targetInfoName) {}
set profile(BIBSYS,timeDefine) 878567355
set profile(BIBSYS,timeLastExplain) {}
-set profile(BIBSYS,timeLastInit) 908265242
+set profile(BIBSYS,timeLastInit) 908447189
set profile(BIBSYS,welcomeMessage) {}
set profile(BIBSYS,windowNumber) 3
set profile(Bagel:210,AttributeDetails,gils,Bib1Use) {1012 1019 1007 62 1005 4}
set profile(Bagel:210,smallSetUpperBound) 0
set profile(Bagel:210,targetInfoName) Zebra
set profile(Bagel:210,timeDefine) {}
-set profile(Bagel:210,timeLastExplain) 908206139
-set profile(Bagel:210,timeLastInit) 908206139
+set profile(Bagel:210,timeLastExplain) 913116790
+set profile(Bagel:210,timeLastInit) 913116790
set profile(Bagel:210,welcomeMessage) {}
set profile(Bagel:210,windowNumber) 1
set {profile(Bell Laboratories Library Network,authentication)} {}
set {profile(Bell Laboratories Library Network,timeLastExplain)} 907838464
set {profile(Bell Laboratories Library Network,timeLastInit)} 907838464
set {profile(Bell Laboratories Library Network,welcomeMessage)} {Salutations - this is Lucent Technologies experimental Z39.50 server. No guarentees, but free and unlimited access!}
-set {profile(Bell Laboratories Library Network,windowNumber)} 15
+set {profile(Bell Laboratories Library Network,windowNumber)} 14
set {profile(Bibliothèque Nationale du Québec,authentication)} {}
set {profile(Bibliothèque Nationale du Québec,comstack)} tcpip
set {profile(Bibliothèque Nationale du Québec,databases)} IRIS
set profile(Default,timeLastExplain) {}
set profile(Default,timeLastInit) {}
set profile(Default,welcomeMessage) {}
-set profile(Default,windowNumber) 19
+set profile(Default,windowNumber) 18
set profile(LOC,authentication) {}
set profile(LOC,comstack) tcpip
set profile(LOC,databases) {BOOKS NAMES AUTH MAPS MUSIC BIB SERIALS SUBJECTS}
set profile(LOC,timeLastExplain) {}
set profile(LOC,timeLastInit) 907942726
set profile(LOC,welcomeMessage) {}
-set profile(LOC,windowNumber) 12
+set profile(LOC,windowNumber) 11
set {profile(OCLC FirstSearch,authentication)} {}
set {profile(OCLC FirstSearch,comstack)} tcpip
set {profile(OCLC FirstSearch,databases)} {AGRICOLA MEDLINE}
set {profile(OCLC FirstSearch,timeLastExplain)} {}
set {profile(OCLC FirstSearch,timeLastInit)} 907164654
set {profile(OCLC FirstSearch,welcomeMessage)} {}
-set {profile(OCLC FirstSearch,windowNumber)} 14
+set {profile(OCLC FirstSearch,windowNumber)} 12
set profile(Penn,authentication) {}
set profile(Penn,comstack) tcpip
set profile(Penn,databases) CATALOG
set profile(Penn,timeLastExplain) {}
set profile(Penn,timeLastInit) 902483000
set profile(Penn,welcomeMessage) {}
-set profile(Penn,windowNumber) 18
+set profile(Penn,windowNumber) 17
set {profile(Steiermrkische Landesbibliothek,authentication)} {}
set {profile(Steiermrkische Landesbibliothek,comstack)} tcpip
set {profile(Steiermrkische Landesbibliothek,databases)} {lbopac miopac}
set {profile(University of Crete,timeLastInit)} 907077673
set {profile(University of Crete,welcomeMessage)} {}
set {profile(University of Crete,windowNumber)} 5
+set {profile(Z39.50 Implementors Workshop mailing list,authentication)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,comstack)} tcpip
+set {profile(Z39.50 Implementors Workshop mailing list,databases)} ziw
+set {profile(Z39.50 Implementors Workshop mailing list,description)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,host)} z3950.mds.rmit.edu.au
+set {profile(Z39.50 Implementors Workshop mailing list,idAuthentication)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,largeSetLowerBound)} 2
+set {profile(Z39.50 Implementors Workshop mailing list,maxResultSets)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,maxResultSize)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,maxTerms)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,maximumRecordSize)} 50000
+set {profile(Z39.50 Implementors Workshop mailing list,mediumSetPresentNumber)} 0
+set {profile(Z39.50 Implementors Workshop mailing list,multipleDatabases)} 0
+set {profile(Z39.50 Implementors Workshop mailing list,namedResultSets)} 1
+set {profile(Z39.50 Implementors Workshop mailing list,port)} 210
+set {profile(Z39.50 Implementors Workshop mailing list,preferredMessageSize)} 30000
+set {profile(Z39.50 Implementors Workshop mailing list,presentChunk)} 4
+set {profile(Z39.50 Implementors Workshop mailing list,protocol)} Z39
+set {profile(Z39.50 Implementors Workshop mailing list,queryCCL)} 0
+set {profile(Z39.50 Implementors Workshop mailing list,queryRPN)} 1
+set {profile(Z39.50 Implementors Workshop mailing list,recentNews)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,smallSetUpperBound)} 0
+set {profile(Z39.50 Implementors Workshop mailing list,targetInfoName)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,timeDefine)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,timeLastExplain)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,timeLastInit)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,welcomeMessage)} {}
+set {profile(Z39.50 Implementors Workshop mailing list,windowNumber)} 13
set profile(arcatarget,authentication) {}
set profile(arcatarget,comstack) tcpip
set profile(arcatarget,databases) {IEI-books IR-Explain-1}
set profile(author,timeLastExplain) {}
set profile(author,timeLastInit) 887288138
set profile(author,welcomeMessage) {}
-set profile(author,windowNumber) 17
+set profile(author,windowNumber) 16
set profile(dranet,authentication) {}
set profile(dranet,comstack) tcpip
set profile(dranet,databases) drewdb
set profile(libris,recentNews) {}
set profile(libris,smallSetUpperBound) 0
set profile(libris,targetInfoName) {}
-set profile(libris,timeDefine) 878567355
-set profile(libris,timeLastExplain) {}
-set profile(libris,timeLastInit) 887285394
-set profile(libris,welcomeMessage) {}
set profile(libris,windowNumber) 7
-set profile(madison,authentication) {}
-set profile(madison,comstack) tcpip
-set profile(madison,databases) madison
-set profile(madison,description) {University of Wisconsin-Madison}
-set profile(madison,host) z3950.adp.wisc.edu
-set profile(madison,largeSetLowerBound) 2
-set profile(madison,maxResultSets) {}
-set profile(madison,maxResultSize) {}
-set profile(madison,maxTerms) {}
-set profile(madison,maximumRecordSize) 16384
-set profile(madison,mediumSetPresentNumber) 0
-set profile(madison,multipleDatabases) 0
-set profile(madison,namedResultSets) 1
-set profile(madison,port) 210
-set profile(madison,preferredMessageSize) 8192
-set profile(madison,presentChunk) 4
-set profile(madison,protocol) Z39
-set profile(madison,queryCCL) 0
-set profile(madison,queryRPN) 1
-set profile(madison,recentNews) {}
-set profile(madison,smallSetUpperBound) 0
-set profile(madison,targetInfoName) {}
-set profile(madison,timeDefine) 878567355
-set profile(madison,timeLastExplain) {}
-set profile(madison,timeLastInit) 887289602
-set profile(madison,welcomeMessage) {}
-set profile(madison,windowNumber) 11
-set profile(ztest9999,authentication) {}
-set profile(ztest9999,comstack) tcpip
-set profile(ztest9999,databases) {dranet.dra.com IR-Explain-1 gils marc}
-set profile(ztest9999,description) {YAZ server on localhost}
-set profile(ztest9999,descripton) Z_TDBS.ztdb_description
-set profile(ztest9999,host) bagel.indexdata.dk
-set profile(ztest9999,idAuthentication) {}
-set profile(ztest9999,largeSetLowerBound) 2
-set profile(ztest9999,maxResultSets) {}
-set profile(ztest9999,maxResultSize) {}
-set profile(ztest9999,maxTerms) {}
-set profile(ztest9999,maximumRecordSize) 50000
-set profile(ztest9999,mediumSetPresentNumber) 0
-set profile(ztest9999,multipleDatabases) 1
-set profile(ztest9999,namedResultSets) 1
-set profile(ztest9999,port) 210
-set profile(ztest9999,preferredMessageSize) 30000
-set profile(ztest9999,presentChunk) 4
-set profile(ztest9999,protocol) Z39
-set profile(ztest9999,queryCCL) 0
-set profile(ztest9999,queryRPN) 1
-set profile(ztest9999,recentNews) {}
-set profile(ztest9999,smallSetUpperBound) 0
-set profile(ztest9999,targetInfoName) Zebra
-set profile(ztest9999,targetMaxResultSets) {}
-set profile(ztest9999,targetMaxResultSize) {}
-set profile(ztest9999,targetMaxTerms) {}
-set profile(ztest9999,timeDefine) 878567355
-set profile(ztest9999,timeLastExplain) 902228978
-set profile(ztest9999,timeLastInit) 902228978
-set profile(ztest9999,welcomeMessage) {}
-set profile(ztest9999,windowNumber) 13
+set attributeTypes {Bib1 Gils}
+set attributeTypeSelected Gils
set queryTypes {Simple Phrase Auto}
set queryButtons {{{I 3} {I 0} {I 0}} {{I 0} {I 1} {I 0}} {{I 4} {I 5} {I 3}}}
-set queryInfo {{{Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}} {Query 1=1016 2=102} {Title-rank 1=4 2=102} {Date/time 1=1012} {Title-regular 1=4 2=3 4=2 5=102} {Ranked 1=1016 2=102 3=3 4=1 6=1}} {{Title 1=4 4=1 6=2} {Author 1=1003 4=1 6=2} {ISBN 1=7} {ISSN 1=8} {Year 1=30 4=4 6=2} {Any {}}} {{{Date/time last mod.} 1=1012} {Record-source 1=1019} {Identifier--standard 1=1007} {Abstract 1=62} {{Author, corporate} 1=1005} {Title 1=4}}}
+set queryInfo {{{Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}} {Query 1=1016 2=102} {Title-rank 1=4 2=102} {Date/time 1=1012} {Title-regular 1=4 2=3 4=2 5=102} {Ranked 1=1016 2=102 3=3 4=1 6=1} {per {}}} {{Title 1=4 4=1 6=2} {Author 1=1003 4=1 6=2} {ISBN 1=7} {ISSN 1=8} {Year 1=30 4=4 6=2} {Any {}}} {{{Date/time last mod.} 1=1012} {Record-source 1=1019} {Identifier--standard 1=1007} {Abstract 1=62} {{Author, corporate} 1=1005} {Title 1=4}}}
set queryAuto 1