X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=client.tcl;h=9d8ff83b2538133915aa118e76e023ceec3621f4;hb=1dacbb936d32d0fc313535d511f7ccdefa0078dc;hp=183c7c7c0fe94374605e948c8f28a27f137ee8f6;hpb=0730ae3894fdd677ba532d8385ea867ffe02c7ed;p=ir-tcl-moved-to-github.git diff --git a/client.tcl b/client.tcl index 183c7c7..9d8ff83 100644 --- a/client.tcl +++ b/client.tcl @@ -1,10 +1,16 @@ # IR toolkit for tcl/tk -# (c) Index Data 1995-1997 +# (c) Index Data 1995-1998 # See the file LICENSE for details. # Sebastian Hammer, Adam Dickmeiss # # $Log: client.tcl,v $ -# Revision 1.102 1997-11-19 13:19:54 adam +# Revision 1.104 1998-02-12 13:32:41 adam +# Updated configuration system. +# +# Revision 1.103 1998/01/30 13:30:50 adam +# Name of target database is irtdb.tcl instead of clientrc.tcl. +# +# Revision 1.102 1997/11/19 13:19:54 adam # Font fix. # # Revision 1.101 1997/11/19 11:20:56 adam @@ -547,11 +553,13 @@ if {[file readable "${libdir}/tagsets.tcl"]} { source "${libdir}/tagsets.tcl" } -# Read the global configuration file. -if {[file readable "clientrc.tcl"]} { - source "clientrc.tcl" -} elseif {[file readable "${libdir}/clientrc.tcl"]} { - source "${libdir}/clientrc.tcl" +# Read the global target configuration file. +if {[file readable "${libdir}/irtdb.tcl"]} { + source "${libdir}/irtdb.tcl" +} +# Read the local target configuration file. +if {[file readable "irtdb.tcl"]} { + source "irtdb.tcl" } # Read the user configuration file. @@ -578,13 +586,20 @@ foreach target [array names profile] { set profile($target,comstack) [lindex $profile($target) 6] set profile($target,databases) [lindex $profile($target) 7] set profile($target,timeDefine) $timedef - - incr profile(Default,windowNumber) + set profile($target,windowNumber) 1 } unset profile($target) } } +# Assign unique ID's to each target's window number +set wno 1 +foreach n [array names profile *,windowNumber] { + set profile($n) $wno + incr wno +} +set profile(Default,windowNumber) $wno + # These globals describe the current query type. They are set to the # first query type. set queryButtonsFind [lindex $queryButtons 0] @@ -1413,7 +1428,7 @@ proc close-target {} { configure-disable-e .top.target.m 1 configure-disable-e .top.target.m 2 if {[tk4]} { - .top.rset.m delete 2 last + .top.rset.m delete 1 last } else { .top.rset.m delete 1 last } @@ -2901,7 +2916,7 @@ proc save-geometry {} { } # Procedure save-settings -# This procedure saves the per-host related settings clientrc.tcl which +# This procedure saves the per-host related settings irtdb.tcl which # is normally kept in the directory /usr/local/lib/irtcl. # All query types and target defintion profiles are saved. proc save-settings {} { @@ -2912,17 +2927,10 @@ proc save-settings {} { global queryButtons global queryInfo - if {[file exists clientrc.tcl]} { - set f [open "clientrc.tcl" w] - } elseif {![file writable "${libdir}/clientrc.tcl"]} { - set a [alert "Cannot open ${libdir}/clientrc.tcl for writing. Do you \ - wish to save clientrc.tcl in the current directory instead?"] - if {! $a} { - return - } - set f [open "clientrc.tcl" w] + if {[file writable "${libdir}/irtdb.tcl"]} { + set f [open "${libdir}/irtdb.tcl" w] } else { - set f [open "${libdir}/clientrc.tcl" w] + set f [open "irtdb.tcl" w] } puts $f "# Setup file" @@ -3965,6 +3973,7 @@ irmenu .top.service.m.present irmenu .top.service.m.dblist +# Init: Definition of Set menu. menubutton .top.rset -text Set -menu .top.rset.m irmenu .top.rset.m .top.rset.m add command -label Load -command {load-set} @@ -4151,7 +4160,7 @@ if {[file exists ${libdir}/setup.tcl]} { } # Init: Uncomment this line if you wan't to enable logging. -ir-log-init all +ir-log-init all irtcl irtcl.log # Init: If hostid is a valid target, a new connection will be established # immediately.