-#@ MODIF componiveau 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.
+#
+#
# ======================================================================
from Tkinter import *
panneau.pack(expand=1,fill='both')
self.bouton_com.pack_forget()
self.makeJDCPage(panneau.pane('left'))
+ self.enlevebind()
+
+
+import treewidget
+class Node(treewidget.Node):pass
+
class NIVEAUTreeItem(Objecttreeitem.ObjectTreeItem):
panel = NIVEAUPanel
+ itemNode=Node
def isactif(self):
return self.object.isactif()
- def IsExpandable_old(self):
- return self.object.isactif()
-
def IsExpandable(self):
return 1
else:
return "ast-white-text"
- def keys_old(self):
- return range(len(self.object.etapes))
-
def keys(self):
if self.object.etapes_niveaux != []:
return range(len(self.object.etapes_niveaux))
def additem(self,name,pos):
if isinstance(name,Objecttreeitem.TreeItem) :
- cmd=self.object.addentite(name.object,pos)
+ cmd=self.object.addentite(name.getObject(),pos)
else :
cmd = self.object.addentite(name,pos)
item = self.make_objecttreeitem(self.appli,cmd.nom + " : ", cmd)
def suppitem(self,item) :
# item = item de l'ETAPE à supprimer du JDC
- # item.object = ETAPE ou COMMENTAIRE
+ # item.getObject() = ETAPE ou COMMENTAIRE
# self.object = JDC
- self.object.suppentite(item.object)
- if isinstance(item.object,commentaire.COMMENTAIRE):
- 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(item.object,commentaire.COMMENTAIRE):
+ 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 ''