+# -*- 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 widgets import showerror
# Modules Eficas
import splash
import fontes
import tooltip
import properties
+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.format_fichier = Tkinter.StringVar()
self.message=''
self.cree_composants_graphiques()
- self.load_appli_composants()
- self.affiche_FAQ()
+ self.load_appli_composants() # Creation du BUREAU
splash.fini_splash()
+ self.affiche_FAQ()
+ # AY : cas ou le nom du fichier a été passé en argument
+ if fichier :
+ 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
"""
Cree les constituants de l'application :
- menubar
- - tollbar
+ - toolbar
- bureau
- statusbar
"""
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)
menu=menudict.get(mname)
if not menu:continue
self.cree_menu(menu,itemlist,appli_composant)
+
+ def update_jdc_courant(self):
+ self.bureau.update_jdc_courant()
+
+ def affiche_alerte(self,titre,message):
+ f=Fenetre(self, titre="Compte-rendu d'erreur", texte = titre + "\n\n" + message)
+ f.wait()
+
+