-#@ MODIF cataediteur Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE
+# -*- coding: utf-8 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
-# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG
-# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND
-# REDISTRIBUTION OF THIS FILE.
+# 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.
+#
+#
# ======================================================================
# Modules Python
import os
import types
import string
import Pmw
-from tkMessageBox import showinfo,askyesno,showerror,askretrycancel
+from widgets import showinfo
from Tkinter import *
# Modules Eficas
import definition_cata
#
-__version__="$Name: V1_1p1 $"
-__Id__="$Id: cataediteur.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $"
+__version__="$Name: $"
+__Id__="$Id: cataediteur.py,v 1.5 2004/09/10 15:51:48 eficas Exp $"
#
Fonte_Niveau = fontes.canvas_gras_italique
texte_infos = ''
for e in cmd.entites.keys() :
if e == name :
- texte_infos=cmd.entites[e].fr
+ texte_infos=getattr(cmd.entites[e],'fr')
break
if texte_infos == '' : texte_infos="Pas d'infos disponibles"
self.parent.appli.affiche_infos(texte_infos)
for k in l_cles_fils :
typ = TYPE_COMPLET(dico_fils[k])
if type(self.objet_cata_ordonne) == types.InstanceType :
- objet_cata = self.objet_cata_ordonne.dico[k]
+ objet_cata = self.objet_cata_ordonne.entites[k]
else :
objet_cata = self.objet_cata_ordonne.get(k,None)
item = make_objecttreeitem(self.appli,typ + " : ",dico_fils[k],objet_cata_ordonne = objet_cata)
return self.object.get_valeur_attribut('nom')
def get_liste_mc_ordonnee(self):
- return self.objet_cata_ordonne.liste
+ return self.objet_cata_ordonne.ordre_mc
def GetIconName(self):
if self.object.isvalid():
def additem(self,name,pos):
if isinstance(name,TreeItem) :
- cmd=self.object.addentite(name.object,pos)
+ cmd=self.object.addentite(name.getObject(),pos)
else :
cmd = self.object.addentite(name,pos)
typ = TYPE_COMPLET(cmd)
for k in l_cles_fils :
typ = TYPE_COMPLET(dico_fils[k])
if type(self.objet_cata_ordonne) == types.InstanceType :
- objet_cata = self.objet_cata_ordonne.dico[k]
+ objet_cata = self.objet_cata_ordonne.entites[k]
else :
objet_cata = self.objet_cata_ordonne.get(k,None)
item = make_objecttreeitem(self.appli,typ + " : ",dico_fils[k],objet_cata_ordonne = objet_cata)
def additem(self,name,pos):
if isinstance(name,TreeItem) :
- cmd=self.object.addentite(name.object,pos)
+ cmd=self.object.addentite(name.getObject(),pos)
else :
cmd = self.object.addentite(name,pos)
typ = TYPE_COMPLET(obj)
def suppitem(self,item) :
# item = item de l'ETAPE à supprimer du JDC
- # item.object = ETAPE ou _C
+ # item.getObject() = ETAPE ou _C
# self.object = JDC
- self.object.suppentite(item.object)
- if isinstance(item.object,_C):
- message = "Commentaire supprimé"
- self.appli.affiche_infos(message)
- else :
- message = "Commande " + item.object.nom + " supprimée"
- self.appli.affiche_infos(message)
- return 1
+ itemobject=item.getObject()
+ if self.object.suppentite(itemobject):
+ if isinstance(itemobject,_C):
+ message = "Commentaire supprimé"
+ else :
+ message = "Commande " + itemobject.nom + " supprimée"
+ self.appli.affiche_infos(message)
+ return 1
+ else:
+ self.appli.affiche_infos("Pb interne : impossible de supprimer cet objet")
+ return 0
def GetText(self):
return ''
def shell(self,event=None):
import Interp
- d={'j':self.tree.item.object}
+ d={'j':self.tree.item.getObject()}
Interp.InterpWindow(d,parent=self.parent)
def visuCR(self,mode='Cata'):