From bfce657fabb0d6d7b4e9516424aa1ff98a170812 Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Tue, 19 Feb 2008 13:20:16 +0000 Subject: [PATCH] *** empty log message *** --- InterfaceQT/politiquesValidation.py | 4 ++-- InterfaceQT/readercata.py | 4 ++-- InterfaceQT/viewManager.py | 16 ++++++++++++---- Ui/desChoixCata.py | 4 ++-- Ui/desChoixCata.ui | 2 +- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/InterfaceQT/politiquesValidation.py b/InterfaceQT/politiquesValidation.py index cd668855..539f6113 100644 --- a/InterfaceQT/politiquesValidation.py +++ b/InterfaceQT/politiquesValidation.py @@ -123,18 +123,18 @@ class PolitiquePlusieurs: commentaire2="" valide=1 if listevaleur==None: return + if listevaleur=="": return if not( type(listevaleur) in (types.ListType,types.TupleType)) : listevaleur=tuple(listevaleur) for valeur in listevaleur : # On teste le type de la valeur valide=self.node.item.valide_item(valeur) if not valide : - #testtype,commentaire = self.node.item.object.verif_type(valeur) #print self.__class__ #if not testtype : try : valeur,valide=self.node.item.eval_valeur(valeur) - print "apres try" + valide,commentaire = self.node.item.object.verif_type(valeur) except : #return testtype,commentaire,"",listeRetour pass diff --git a/InterfaceQT/readercata.py b/InterfaceQT/readercata.py index c5c10c3d..b4452868 100644 --- a/InterfaceQT/readercata.py +++ b/InterfaceQT/readercata.py @@ -125,7 +125,7 @@ class READERCATA: self.update_barre() if not self.cata : QMessageBox.critical( self.parent, "Import du catalogue","Impossible d'importer le catalogue %s" %self.fic_cata) - self.appli.quit() + self.appli.parent.ui.close() sys.exit(1) # # analyse du catalogue (ordre des mots-clés) @@ -296,7 +296,7 @@ class READERCATA: # teste si plusieurs catalogues ou non if len(liste_choix) == 0: QMessageBox.critical( self.parent, "", "Aucun catalogue déclaré pour %s" %self.code) - self.appli.quit() + self.appli.parent.ui.close() sys.exit(1) # création d'une boite de dialogue modale diff --git a/InterfaceQT/viewManager.py b/InterfaceQT/viewManager.py index 6341d177..be4fe49f 100644 --- a/InterfaceQT/viewManager.py +++ b/InterfaceQT/viewManager.py @@ -1843,8 +1843,11 @@ class ViewManager: return self.getProject().ppath else: - # None will cause open dialog to start with cwd - return None + try : + userDir=os.path.expanduser("~/Eficas_install/") + return userDir + except : + return "" def _getOpenFileFilter(self): @@ -2402,7 +2405,7 @@ class MyTabview(Tabview): if fn is None: fn = QFileDialog.getOpenFileName(self._getOpenStartDir(), - self.trUtf8('JDC Files (*.comm);;''All Files (*)'), self.ui, None, None, None) + self.trUtf8('JDC Files (*.comm);;''All Files (*)'), self.ui) if fn.isNull(): return @@ -2436,6 +2439,7 @@ class MyTabview(Tabview): @return String name of directory to start or None """ # if we have an active source, return its path + print self.activeWindow() if self.activeWindow() is not None and \ self.activeWindow().getFileName(): return os.path.dirname(self.activeWindow().getFileName()) @@ -2443,7 +2447,11 @@ class MyTabview(Tabview): else: # None will cause open dialog to start with cwd - return None + try : + userDir=os.path.expanduser("~/Eficas_install/") + return userDir + except : + return "" def handleEditorOpened(self): diff --git a/Ui/desChoixCata.py b/Ui/desChoixCata.py index 3ce6d9dc..3bb5c2b7 100644 --- a/Ui/desChoixCata.py +++ b/Ui/desChoixCata.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'desChoixCata.ui' # -# Created: lun nov 19 11:09:03 2007 +# Created: mar fév 19 12:14:31 2008 # by: The PyQt User Interface Compiler (pyuic) 3.13 # # WARNING! All changes made in this file will be lost! @@ -59,7 +59,7 @@ class DChoixCata(QDialog): self.connect(self.buttonOk,SIGNAL("clicked()"),self.BOkPressed) self.connect(self.buttonCancel,SIGNAL("clicked()"),self.BCancelPressed) - self.connect(self.CBChoixCata,SIGNAL("textChanged(const QString&)"),self.CataChoisi) + self.connect(self.CBChoixCata,SIGNAL("activated(const QString&)"),self.CataChoisi) def languageChange(self): diff --git a/Ui/desChoixCata.ui b/Ui/desChoixCata.ui index 7ae385b2..8f6eff55 100644 --- a/Ui/desChoixCata.ui +++ b/Ui/desChoixCata.ui @@ -133,7 +133,7 @@ CBChoixCata - textChanged(const QString&) + activated(const QString&) DChoixCata CataChoisi() -- 2.39.2