/usr/share/astk/ihm_agla.tcl is in code-aster-gui 1.8.4-5.
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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | #########################################################################
# COPYRIGHT (C) 2003 EDF R&D WWW.CODE-ASTER.ORG #
# #
# 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 : EDF R&D CODE_ASTER, #
# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. #
#########################################################################
# $Id: ihm_agla.tcl 2883 2007-03-20 17:00:02Z courtois $
# liste des versions gérées en conf
#################################################################
proc liste_vers_agla { parent } {
set pastrouve 1
catch { destroy $parent.vers }
set MenuVers [tk_optionMenu $parent.vers astk::profil(version) $astk::agla(verdev,0)]
$MenuVers configure \
-foreground $astk::ihm(couleur,menu_foreground) \
-background $astk::ihm(couleur,menu_background)
$MenuVers entryconfigure 0 -font $astk::ihm(font,lablst)
for {set j 1} {$j < $astk::agla(nb_verdev)} {incr j} {
$MenuVers add radiobutton
$MenuVers entryconfigure $j -label $astk::agla(verdev,$j) -font $astk::ihm(font,lablst) -variable astk::profil(version)
if { $astk::profil(version) == $astk::agla(verdev,$j) } {
set pastrouve 0
}
}
$parent.vers configure -font $astk::ihm(font,lablst)
pack $parent.vers -side right
if { $pastrouve } {
set astk::profil(version) $astk::agla(verdev,0)
}
}
# raffraichit le menu/onglet AGLA
#################################################################
proc raffr_ong_agla { } {
global ongsel
if { $astk::profil(agla) == "oui" } {
adapt_satellite 1
for {set j 2} {$j <= $astk::ihm(nbong,$astk::ihm(nongl_agla)) } {incr j} {
if { $astk::profil($astk::ihm(ong,$astk::ihm(nongl_agla),$j)) == "oui" } {
set ongsel($astk::ihm(nongl_agla)) $astk::ihm(tit,$astk::ihm(nongl_agla),$j)
}
}
}
coche_onglet_agla
}
# fenêtre pour renseigner les modules à denoter
# retourne 0 si ok, 1 si annuler
#################################################################
proc asdeno_ihm { } {
global iret_asdeno
set iret_asdeno 0
set fen .f_asdeno
catch {destroy $fen}
set tit [ashare::mess ihm 144]
toplevel $fen
wm title $fen $tit
# type de module, version
pack [frame $fen.f0 -bd 0] -fill x -anchor nw
pack [frame $fen.f0.typ -bd 0] -side left
pack [frame $fen.f0.vers -bd 0] -side left -padx 20
pack [frame $fen.f1 -bd 0] -anchor nw
label $fen.f0.typ.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 14] :"
pack $fen.f0.typ.lbl -padx 5 -pady 3 -side left
set ltype {f/f90/c py cata/capy test}
set i 0
set lab [lindex $ltype $i]
set Menu [tk_optionMenu $fen.f0.typ.liste typ_asdeno $lab]
$Menu configure \
-foreground $astk::ihm(couleur,menu_foreground) \
-background $astk::ihm(couleur,menu_background)
for {set i 1} {$i < [llength $ltype]} {incr i} {
$Menu add radiobutton
$Menu entryconfigure $i -label [lindex $ltype $i] -font $astk::ihm(font,labmenu) -variable typ_asdeno
}
pack $fen.f0.typ.liste -padx 5 -pady 3 -side left
label $fen.f0.vers.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 46] : $astk::profil(version)"
pack $fen.f0.vers.lbl -padx 5 -pady 3
# info
label $fen.f1.lbl -font $astk::ihm(font,lab) -justify left -text [ashare::mess ihm 126]
pack $fen.f1.lbl -padx 5 -pady 3
# texte
pack [frame $fen.txt -relief solid -bd 0] -anchor c -fill both -expand 1
text $fen.txt.tx -xscrollcommand "$fen.txt.scrollx set" -yscrollcommand "$fen.txt.scrolly set" \
-height 32 -width 80 -font $astk::ihm(font,zonfix) -bg "$astk::ihm(couleur,entry_background)" -wrap word
scrollbar $fen.txt.scrolly -command "$fen.txt.tx yview"
scrollbar $fen.txt.scrollx -command "$fen.txt.tx xview" -orient h
pack $fen.txt.scrolly -side right -fill y
pack $fen.txt.scrollx -side bottom -fill x
pack $fen.txt.tx -expand 1 -fill both
# fermer
pack [frame $fen.valid -relief solid -bd 0]
button $fen.valid.ok -font $astk::ihm(font,labbout) -text "Ok" \
-background $astk::ihm(couleur,valid) \
-command "asdeno_prof $fen"
button $fen.valid.can -font $astk::ihm(font,labbout) -text [ashare::mess ihm 85] \
-background $astk::ihm(couleur,annul) \
-command "set iret_asdeno 1 ; destroy $fen"
pack $fen.valid.ok $fen.valid.can -side left -padx 10 -pady 3
focus $fen.txt.tx
tkwait window $fen
return $iret_asdeno
}
# remplit le profil pour asdeno
#################################################################
proc asdeno_prof { fen } {
global iret_asdeno typ_asdeno
# set ltype {f/c py cata/capy test}
switch -exact -- $typ_asdeno {
f/f90/c -
cata/capy {
set var "sources"
regexp {([-a-z_0-9]+)/} $typ_asdeno mat1 type
}
py {
set var "sources"
set type $typ_asdeno
}
test {
set var "tests"
set type "rep_test"
}
}
set lmod [$fen.txt.tx get 1.0 end]
set n [llength $lmod]
for {set i 0} {$i < $n} {incr i} {
set astk::profil($var,fich,$i,nom) [lindex $lmod $i]
set astk::profil($var,fich,$i,serv) $astk::config($astk::agla(num_serv),nom)
set astk::profil($var,fich,$i,type) $type
set astk::profil($var,fich,$i,UL) 0
set astk::profil($var,fich,$i,donnee) 1
set astk::profil($var,fich,$i,resultat) 0
set astk::profil($var,fich,$i,compress) 0
set astk::profil($var,fich,$i,FR) "N"
}
set astk::profil($var,nbfic) $n
set iret_asdeno 0
destroy $fen
}
# active/desactive la partie produits de surcharge si agla
#################################################################
proc raffr_agla_surch { } {
if { $ashare::dbg >= 4 } {
ashare::log "<DEBUG> raffr_agla_surch : onglet_actif=$astk::profil(onglet_actif) agla_actif=$astk::profil(agla)"
}
if { $astk::profil(agla) == "non" } {
set etat normal
} else {
set etat disabled
}
#
set liste $astk::ihm(fenetre).active.prod.lst.f.frame
set var surcharge
if { $astk::profil(onglet_actif) == "$var" } {
liste_fich $liste 0 $var
for { set i 0 } { $i < $astk::profil($var,nbfic) } { incr i } {
if { $astk::profil($var,fich,$i,type) == "exec"
|| $astk::profil($var,fich,$i,type) == "cmde"
|| $astk::profil($var,fich,$i,type) == "ele" } {
$liste.lig($i,nom) configure -state $etat
$liste.lig($i,type) configure -state $etat
$liste.lig($i,serv) configure -state $etat
$liste.lig($i,donnee) configure -state $etat
$liste.lig($i,resultat) configure -state $etat
}
}
}
}
|