/usr/share/tkgate-1.8.7/scripts/status.tcl is in tkgate-data 1.8.7-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | # Copyright (C) 1987-2007 by Jeffery P. Hansen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Last edit by hansen on Thu Dec 11 10:46:51 2003
#
set runlogo_state -1
set runlogo_speed 100
proc tkg_setDisplayFile {n} {
global tkg_displayFile
set p [string last "/" $n]
if { $p >= 0 } {
set n [string range $n [expr $p + 1] end]
}
set tkg_displayFile $n
}
proc updateStatus args {
global tkg_displayFile tkg_currentBlock tkg_modifiedFlag tkg_statusMessage
if { $tkg_modifiedFlag } {
set mod "*"
} else {
set mod ""
}
.status.file configure -text "[m ifile]: $tkg_displayFile$mod"
.status.block configure -text "[m imodule]: $tkg_currentBlock"
.status.msg configure -text "$tkg_statusMessage" -anchor w
}
proc tkg_resetLogo {} {
global bd runlogo_state
catch {
.status.logo configure -image "" -bitmap "@$bd/rungate1.xbm"
set runlogo_state 1
}
}
proc tkg_pauseLogo {} {
global bd runlogo_ev
catch { after cancel $runlogo_ev }
}
proc rkg_stepRunLogo {} {
global bd runlogo_state runlogo_speed runlogo_ev
catch {
.status.logo configure -image "" -bitmap "@$bd/rungate${runlogo_state}.xbm"
set runlogo_state [expr $runlogo_state + 1 ]
if { $runlogo_state > 14 } {
set runlogo_state 1
}
set runlogo_ev [after $runlogo_speed rkg_stepRunLogo]
}
}
proc tkg_runLogo {} {
global bd runlogo_speed runlogo_ev
catch {
catch { after cancel $runlogo_ev }
set runlogo_ev [after $runlogo_speed rkg_stepRunLogo]
}
}
proc tkg_editLogo {} {
global bd runlogo_ev
catch {
catch { after cancel $runlogo_ev }
.status.logo configure -bitmap "@$bd/gatelogo.xbm"
}
}
proc tkg_analysisLogo {} {
global bd runlogo_ev
catch {
catch { after cancel $runlogo_ev }
.status.logo configure -image "" -bitmap "@$bd/anallogo.xbm"
}
}
after [expr $tkg_checkpointFreq * 1000] tkg_checkpointReq
proc tkg_checkpointReq {} {
global tkg_wantCheckpoint tkg_checkpointEnabled tkg_checkpointFreq
if { $tkg_checkpointEnabled } {
set tkg_wantCheckpoint 1
}
after [expr $tkg_checkpointFreq * 1000] tkg_checkpointReq
}
frame .status.aux
label .status.file
label .status.block
#label .status.msg -font $body_font -relief groove -padx 5 -pady 5 -bg "\#ffbbbb"
label .status.msg -relief groove -padx 5 -pady 5 -bg "\#ffbbbb"
label .status.logo -relief groove -bitmap "@$bd/gatelogo.xbm"
pack .status.logo -side right -ipadx 5 -ipady 5 -padx 5
pack .status.msg -side bottom -padx 10 -pady 5 -fill x
pack .status.aux -side right
pack .status.file .status.block -side left -padx 10 -pady 3 -fill x
updateStatus
trace variable tkg_displayFile w updateStatus
trace variable tkg_currentBlock w updateStatus
trace variable tkg_modifiedFlag w updateStatus
trace variable tkg_statusMessage w updateStatus
helpon .status.logo [m ho.status.logo]
helpon .status.msg [m ho.status.msg]
helpon .status.block [m ho.status.block]
helpon .status.file [m ho.status.file]
|