+# -*- coding: utf-8 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
L'aspect applicatif doit etre pris en charge par la classe dérivée
"""
# Modules Python
+import os
import sys
import types
import Pmw
import Tkinter
-from tkMessageBox import showinfo,askyesno,showerror
+from widgets import showerror
# Modules Eficas
import splash
from widgets import Fenetre
from Misc import MakeNomComplet
-VERSION="EFICAS v1.3"
+VERSION="EFICAS v1.6"
class APPLI:
def __init__ (self,master,code='ASTER',fichier=None) :
self.message=''
self.cree_composants_graphiques()
self.load_appli_composants() # Creation du BUREAU
- self.affiche_FAQ()
splash.fini_splash()
+ self.affiche_FAQ()
# AY : cas ou le nom du fichier a été passé en argument
if fichier :
- try :
- self.bureau.openJDC( str(MakeNomComplet.FILENAME(fichier)) )
- except Exception,e :
- showerror( "ARGUMENT INVALIDE", str(e) )
+ fich=str(MakeNomComplet.FILENAME(fichier))
+ if not os.path.isfile(fich):
+ showerror("Fichier inexistant", "Fichier %s en argument n'existe pas" % fich)
+ else:
+ self.bureau.openJDC( fich)
# AY : fin
+ # PN : ajout d un attribut pour indiquer si
+ # l appli a ete lance depuis Salome
+ self.salome=0
+
+
def send_message(self,message):
self.message=message
Retourne un texte d'informations sur la session courante d'EFICAS
"""
texte = VERSION + '\n\n'
- texte = texte + 'EFICAS est un produit développé par \nEDF-Division Stratégie et Développement\n'
- texte = texte + 'Equipe : MTI/MMN\n\n'
+ texte = texte + 'EFICAS est un produit développé par \nEDF-R&D\n'
+ texte = texte + 'Equipe : SINETICS\n\n'
texte = texte + 'Code utilisé : %s version %s\n' % (self.code,properties.version)
return texte
if not item :
menu.add_separator()
else:
+ if len(item)==3:
+ raccourci=item[2]
+ newitem=(item[0],item[1])
+ else :
+ raccourci=""
+ newitem=item
+ item=newitem
label,method=item
if type(method) == types.TupleType:
# On a un tuple => on cree une cascade
else:
command=getattr(appli_composant,method)
menu.add_command(label=label,command=command)
+ if raccourci != "" :
+ self.top.bind(raccourci,command)
# Si au moins un radiobouton existe on invoke le premier
if radio:menu.invoke(radio)