X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=Editeur%2Fbureau.py;h=cbbf019495d3aa35d1b25a5e44e7d259da0445b2;hb=25956a3d3e5ceec1397957be47ee27be715d9f8a;hp=41840842ef8a83092f218a4218cb273bb2192dd6;hpb=fcd054a825fbe171652108194c0204f8e3fd955a;p=tools%2Feficas.git diff --git a/Editeur/bureau.py b/Editeur/bureau.py index 41840842..cbbf0194 100644 --- a/Editeur/bureau.py +++ b/Editeur/bureau.py @@ -1,3 +1,22 @@ +# 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 """ @@ -10,8 +29,10 @@ from tkMessageBox import showinfo,askyesno,showerror # 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 @@ -58,6 +79,14 @@ class BUREAU: ('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 @@ -108,6 +137,7 @@ class BUREAU: 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() @@ -196,7 +226,7 @@ class BUREAU: 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'): @@ -504,12 +534,16 @@ class BUREAU: """ 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): @@ -537,4 +571,8 @@ class BUREAU: 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)