+# -*- coding: utf-8 -*-
+# 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 EFICAS qui est l'application
proprement dite. Elle est dérivée de la classe APPLI
import string
from Tkinter import Label
import Pmw
-from tkCommonDialog import Dialog
-from tkFileDialog import *
-from tkMessageBox import askyesno,showerror
import traceback
# Modules Eficas
+from widgets import showerror
+from widgets import askopenfilename
+import patches
import appli
from widgets import Fenetre
class EFICAS(appli.APPLI):
- extensions=['readercata','bureau','browser','options']
+ try:
+ from prefs import appli_composants
+ except:
+ appli_composants=['readercata','bureau','browser','options']
def get_texte_infos(self):
texte=appli.APPLI.get_texte_infos(self)
def exitEFICAS(self):
self.bureau.exitEFICAS()
+ def getBureau(self):
+ return self.bureau
+
def browse(self,result):
if result == 'Browse':
self.ulfile = askopenfilename(title="Choix fichier :")
self._ulfile.setentry('')
self.dialog.deactivate(result)
self.ulfile = None
- self.text=''
+ self.text=""
def get_file(self,unite=None,fic_origine = ''):
"""
else:
texte="Le fichier %s contient une commande %s\n" %(fic_origine,'POURSUITE')
texte = texte+'Donnez le nom du fichier dont vous \n voulez faire une poursuite'
+ if self.test == 1: raise Exception("Erreur: "+texte)
w = Label(self.dialog.interior(),
text = texte)
w.pack(padx = 10, pady = 10)
showerror("Type de fichier non reconnu","EFICAS ne sait pas ouvrir ce type de fichier")
return None
+ def affiche_texte(self,entete,texte):
+ """Cette methode ouvre une fenetre modale dans laquelle on affiche un texte
+ """
+ self.affiche_infos(entete)
+ f=Fenetre(self, titre=entete, texte = texte)
+ f.wait()
+