From: Pascale Noyret Date: Tue, 8 Jun 2010 09:17:13 +0000 (+0000) Subject: pour map X-Git-Tag: V2_0~63 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=300fb1462c23421826fe9a0030af792c3d9da83c;p=tools%2Feficas.git pour map --- diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index 56253a09..04752e7a 100644 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -544,6 +544,29 @@ class JDCEditor(QSplitter): else: return self.textePython + #-----------------------------# + def saveRun(self): + #-----------------------------# + texte=self.run(execution="non") + path=self.CONFIGURATION.savedir + fn = QFileDialog.getSaveFileName( self, + self.trUtf8("sauvegarde"), path, + self.trUtf8("JDC (*.sh);;" "All Files (*)"),None, + QFileDialog.DontConfirmOverwrite) + if fn.isNull(): return + ext = QFileInfo(fn).suffix() + if ext.isEmpty(): fn.append(".xml") + + if QFileInfo(fn).exists(): + abort = QMessageBox.warning(self, + self.trUtf8("Sauvegarde du Fichier"), + self.trUtf8("Le fichier %1 existe deja.").arg(fn), + self.trUtf8("&Ecraser"), + self.trUtf8("&Abandonner")) + if abort == 1 : return + + fn = unicode(QDir.convertSeparators(fn)) + self.writeFile( fn, txt = texte) #-----------------------------# def saveYACS(self): @@ -569,7 +592,6 @@ class JDCEditor(QSplitter): fn = unicode(QDir.convertSeparators(fn)) self.writeFile( fn, txt = texte) - #-----------------------------------------#e def cherche_Groupes(self): listeMA,listeNO=self.get_text_JDC("GroupMA")