From c52211bb982f629d7902a3d85cbd098d93c9a003 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 12 Oct 1995 14:46:52 +0000 Subject: [PATCH] Better record popup windows. Next/prev buttons in popup record windows. The record position in the raw format is much more visible. --- Makefile.in | 14 +++++-- client.tcl | 115 ++++++++++++++++++++++++++++++---------------------------- clientrc.tcl | 6 +-- 3 files changed, 73 insertions(+), 62 deletions(-) diff --git a/Makefile.in b/Makefile.in index 78cd559..9a14647 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,7 +2,7 @@ # (c) Index Data 1995 # See the file LICENSE for details. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.18 1995-09-20 11:37:00 adam Exp $ +# $Id: Makefile.in,v 1.19 1995-10-12 14:46:52 adam Exp $ SHELL=/bin/sh # IrTcl Version @@ -90,8 +90,16 @@ install: ir-tcl echo "#! $(BINDIR)/ir-tk -f" >head.bak; \ cat head.bak client.tcl| sed "s,^set libdir LIBDIR,set libdir $(IRTCLDIR)," >client.bak; \ $(INSTALL_PROGRAM) client.bak $(BINDIR)/irclient; \ - echo "Installing clientrc.tcl" ; \ - $(INSTALL_DATA) clientrc.tcl $(IRTCLDIR); \ + if [ -f $(IRTCLDIR)/clientrc.tcl ]; then \ + echo "clientrc.tcl already exists"; \ + echo "Installing clientrc.tcl.n"; \ + cp clientrc.tcl clientrc.tcl.n; \ + $(INSTALL_DATA) clientrc.tcl.n $(IRTCLDIR); \ + rm clientrc.tcl.n; \ + else \ + echo "Installing clientrc.tcl"; \ + $(INSTALL_DATA) clientrc.tcl $(IRTCLDIR); \ + fi; \ echo "Installing LICENSE" ; \ $(INSTALL_DATA) LICENSE $(IRTCLDIR); \ echo "Installing display format scripts"; \ diff --git a/client.tcl b/client.tcl index 45007fc..7b528c9 100644 --- a/client.tcl +++ b/client.tcl @@ -4,7 +4,11 @@ # Sebastian Hammer, Adam Dickmeiss # # $Log: client.tcl,v $ -# Revision 1.69 1995-09-21 13:42:54 adam +# Revision 1.70 1995-10-12 14:46:52 adam +# Better record popup windows. Next/prev buttons in popup record windows. +# The record position in the raw format is much more visible. +# +# Revision 1.69 1995/09/21 13:42:54 adam # Bug fixes. # # Revision 1.68 1995/09/21 13:11:49 adam @@ -305,7 +309,6 @@ set setNo 0 set setNoLast 0 set cancelFlag 0 set scanEnable 0 -set fullMarcSeq 0 set displayFormat 1 set popupMarcdf 0 set textWrap word @@ -690,6 +693,7 @@ proc about-origin-logo {n} { proc about-origin {} { set w .about-origin-w global libdir + global tk_version if {[winfo exists $w]} { destroy $w @@ -717,8 +721,10 @@ proc about-origin {} { label $w.top.p.ii -text "Implementation id: $i" catch {set i [z39 implementationVersion]} label $w.top.p.iv -text "Implementation version: $i" + set i $tk_version + label $w.top.p.tk -text "Tk version: $i" - pack $w.top.p.in $w.top.p.ii $w.top.p.iv -side top -anchor nw + pack $w.top.p.in $w.top.p.ii $w.top.p.iv $w.top.p.tk -side top -anchor nw about-origin-logo 1 bottom-buttons $w [list {Close} [list destroy $w] \ @@ -726,25 +732,21 @@ proc about-origin {} { } proc popup-marc {sno no b df} { - global fullMarcSeq global displayFormats global popupMarcdf if {[z39.$sno type $no] != "DB"} { return } - if {$b} { - set w .full-marc-$fullMarcSeq - incr fullMarcSeq - set df $popupMarcdf - } else { - set w .full-marc - set df $popupMarcdf + if {$b == -1} { + set b 0 + while {[winfo exists .full-marc$b]} { + incr b + } } - if {[winfo exists $w]} { - set new 0 - } else { - + set df $popupMarcdf + set w .full-marc$b + if {![winfo exists $w]} { toplevelG $w wm minsize $w 0 0 @@ -768,47 +770,52 @@ proc popup-marc {sno no b df} { $w.top.record tag configure marc-id -foreground black } $w.top.record tag configure marc-data -foreground black - set new 1 - } - $w.top.record delete 0.0 end - set recordType [z39.$sno recordType $no] - wm title $w "$recordType record #$no" + $w.top.record tag configure marc-head \ + -font -Adobe-Times-Medium-R-Normal-*-180-* \ + -background black -foreground white - if {$new} { - bind $w.top.record {destroy .full-marc} - pack $w.top.s -side right -fill y pack $w.top.record -expand yes -fill both - if {$b} { - bottom-buttons $w [list \ - {Close} [list destroy $w]] 0 - } else { - bottom-buttons $w [list \ - {Close} [list destroy $w] \ - {Duplicate} [list popup-marc $sno $no 1 0]] 0 - menubutton $w.bot.formats -text "Format" -menu $w.bot.formats.m - menu $w.bot.formats.m - set i 0 - foreach f $displayFormats { - $w.bot.formats.m add radiobutton -label $f \ - -variable popupMarcdf -value $i \ - -command [list display-$f $sno $no $w.top.record 0] - incr i - } - pack $w.bot.formats -expand yes -ipadx 2 -ipady 2 \ - -padx 3 -pady 3 -side left - } + bottom-buttons $w [list \ + {Close} [list destroy $w] \ + {Prev} {} \ + {Next} {} \ + {Duplicate} {}] 0 + menubutton $w.bot.formats -text "Format" -menu $w.bot.formats.m \ + -relief raised + menu $w.bot.formats.m + pack $w.bot.formats -expand yes -ipadx 2 -ipady 2 \ + -padx 3 -pady 3 -side left } else { - set i 0 $w.bot.formats.m delete 0 last - foreach f $displayFormats { - $w.bot.formats.m add radiobutton -label $f \ - -variable popupMarcdf -value $i \ - -command [list display-$f $sno $no $w.top.record 0] - incr i - } } + 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] + incr i + } + $w.top.record delete 0.0 end + set recordType [z39.$sno recordType $no] + wm title $w "$recordType record #$no" + + $w.bot.2 configure -command \ + [list popup-marc $sno [expr $no-1] $b $df] + $w.bot.4 configure -command \ + [list popup-marc $sno [expr $no+1] $b $df] + if {$no == 1} { + $w.bot.2 configure -state disabled + } else { + $w.bot.2 configure -state normal + } + if {[z39.$sno type [expr $no+1]] != "DB"} { + $w.bot.4 configure -state disabled + } else { + $w.bot.4 configure -state normal + } + $w.bot.6 configure -command [list popup-marc $sno $no -1 0] set ffunc [lindex $displayFormats $df] set ffunc "display-$ffunc" @@ -1490,10 +1497,6 @@ proc init-title-lines {} { .data.record delete 0.0 end } -proc title-press {y setno} { - show-full-marc $setno [expr 1 + [.data.list nearest $y]] 0 -} - proc add-title-lines {setno no offset} { global displayFormats global displayFormat @@ -3098,6 +3101,9 @@ if {! $monoFlag} { .data.record tag configure marc-id -foreground black } .data.record tag configure marc-data -foreground black +.data.record tag configure marc-head \ + -font -Adobe-Times-Medium-R-Normal-*-180-* \ + -foreground white -background black button .bot.logo -bitmap @${libdir}/bitmaps/book1 -command cancel-operation if {[tk4]} { @@ -3122,9 +3128,6 @@ pack .bot.a.status .bot.a.set .bot.a.message \ if {[catch {ir z39}]} { set e [info sharedlibextension] - if {$e == {}} { - set e .dll - } puts -nonewline "Loading irtcl$e ..." load irtcl$e irtcl ir z39 diff --git a/clientrc.tcl b/clientrc.tcl index 49c8248..38d5c03 100644 --- a/clientrc.tcl +++ b/clientrc.tcl @@ -1,6 +1,6 @@ # Setup file set {profile(Penn)} {{Penn State's Library} 128.118.88.200 210 {} 16384 8192 tcpip CATALOG 1 {} {} Z39 2} -set {profile(ztest)} {{test server} localhost 210 {} 16384 4096 tcpip dummy 1 {} 1 Z39 3} +set {profile(ztest)} {{test server} localhost 8889 {} 16384 4096 tcpip dummy 1 {} 1 Z39 3} set {profile(madison)} {{University of Wisconsin-Madison} z3950.adp.wisc.edu 210 {} 16384 8192 tcpip madison 1 {} {} Z39 22} set {profile(bibsys)} {{BIBSYS Target (YAZ-based)} z3950.bibsys.no 2100 {} 16384 8192 tcpip BIBSYS 1 {} 1 Z39 27} set {profile(Default)} {{} {} {210} {} 16384 8192 tcpip {} 1 {} {} {} 28} @@ -11,11 +11,11 @@ set {profile(DANBIB)} {{SR Target DANBIB} 0103/find2.denet.dk 4500 {} 8192 8192 set {profile(OCLC)} {{OCLC First search engine} z3950.oclc.org 210 {} 16384 8192 tcpip {ArticleFirst BiographyIndex BusinessPeriodicalsIndex} 1 {} {} Z39 9} set {profile(adad)} {a {} 210 {} 16384 8192 tcpip {} 1 {} {} Z39 26} set {profile(CARL)} {{CARL systems} Z3950.carl.org 210 {} 16384 8192 tcpip {ACC AIC AUR BEM CUB DPL DNU EPL FRC LAW LCC MCC MIN MPL NJC NWC OCC PPC PUE RDR RGU SPL TCC TKU UNC WYO} 1 {} {} Z39 11} -set {profile(CLSI)} {CLSI inet-gw.clsi.us.geac.com 210 {} 16384 8192 tcpip cl_default 1 {} {} Z39 13} set {profile(Innovative)} {{Innovatives server: demo.iii.com} demo.iii.com 210 {} 16384 8192 tcpip DEFAULT 1 {} {} Z39 12} +set {profile(CLSI)} {CLSI inet-gw.clsi.us.geac.com 210 {} 16384 8192 tcpip cl_default 1 {} {} Z39 13} set {profile(AULS)} {{Acadia university} auls.acadiau.ca 210 {} 16384 8192 tcpip AULS 1 {} {} Z39 14} -set {profile(dranet)} {dranet dranet.dra.com 210 {} 16384 16384 tcpip drewdb 1 {} 1 Z39 15} set {profile(canberra)} {canberra canberra.cs.umass.edu 2110 {} 30000 30000 tcpip cacm_dots 1 {} {} Z39 25} +set {profile(dranet)} {dranet dranet.dra.com 210 {} 16384 16384 tcpip drewdb 1 {} 1 Z39 15} set queryTypes {Simple phrase} set queryButtons {{ {I 0} {I 1} {I 2} } {{I 0} {I 1} {I 0}}} set queryInfo {{ {Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}}} {{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 {}}}} -- 1.7.10.4