From 300fb1462c23421826fe9a0030af792c3d9da83c Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Tue, 8 Jun 2010 09:17:13 +0000 Subject: [PATCH] pour map --- InterfaceQT4/editor.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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") -- 2.39.2