+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2002 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.
+#
+#
+# ======================================================================
"""
Ce module contient la classe BUREAU qui gere les JDC ouverts
"""
# Modules Eficas
import splash
+import prefs
import convert
import generator
+import AIDE
from jdcdisplay import JDCDISPLAY
from utils import extension,stripPath,save_in_file
from widgets import Fenetre,Ask_Format_Fichier
('Delete24',"delete","Supprime l'objet courant",'jdc'),
('Help24',"view_doc","Documentation de l'objet courant",'jdc')
)
+ try:
+ menu_defs=prefs.menu_defs['bureau']
+ except:
+ pass
+ try:
+ button_defs=prefs.button_defs['bureau']
+ except:
+ pass
def __init__(self,appli,parent):
self.parent=parent
cata_ord_dico=self.cata_ordonne_dico,
appli=self.appli)
self.JDCName=J.nom
+ self.fileName=None
self.ShowJDC(J,self.JDCName)
self.appli.toolbar.active_boutons()
Demande à l'utilisateur quel JDC existant il veut ouvrir
"""
if self.code == 'ASTER':
- filetypes = ( ("format "+self.appli.format_fichier.get(), ".comm"),)
+ filetypes = ( ("format "+self.appli.format_fichier.get(), ".comm"),("Tous",'*'))
else:
filetypes = ( ("format "+self.appli.format_fichier.get(), ".py"),)
if not hasattr(self,'initialdir'):
"""
if not hasattr(self,'JDC') : return
titre = "fichier de commandes utilisateur"
- texte = self.JDC.procedure
- if texte == None:
+ #texte = self.JDC.procedure
+ #if texte == None:
+ if self.JDCDisplay_courant.fichier == None:
self.appli.affiche_infos("Pas de fichier initial")
- showerror("Impossible de visualiser le fichier initial","EFICAS ne peut visualiser le fichier \
- initial.\nIl s'agit d'un nouveau JDC")
+ showerror("Impossible de visualiser le fichier initial",
+ "EFICAS ne peut visualiser le fichier initial.\nIl s'agit d'un nouveau JDC")
return
+ f=open(self.JDCDisplay_courant.fichier,'r')
+ texte=f.read()
+ f.close()
self.visu_texte_JDC = Fenetre(self.appli,titre=titre,texte=texte)
def affichage_fichier_ini(self):
l_mc = self.JDCDisplay_courant.jdc.get_liste_mc_inconnus()
o = fenetre_mc_inconnus(l_mc)
l = o.wait_new_list()
+ #print "mc_inconnus_new_list: ",l
+ #CCAR: Il n' y a pas de retour vers le JDC
+ def aideEFICAS(self):
+ AIDE.go(master=self.parent)