Salome HOME
Tuple
[tools/eficas.git] / InterfaceQT4 / viewManager.py
index 74b474bbe42397e35439a366188fb58430faa7fd..c393cf34cb49e420699003c37ddaf377500b6c97 100644 (file)
@@ -178,7 +178,9 @@ class MyTabview:
 
    def handlegestionParam(self):
        index=self.myQtab.currentIndex()
-       if index < 0 : return
+       if index < 0 : 
+          QMessageBox.warning( self.appliEficas,tr(u"Creation Parametre indisponible"),tr(u"les parametres sont lies a un jeu de donnees"))
+          return
        self.dict_editors[index].gestionParam()
 
    def handleViewJdcRapport(self):
@@ -208,6 +210,24 @@ class MyTabview:
            self.myQtab.setTabText(index,fileName)
        return ok
 
+   def sauveLigneCurrentEditor(self):
+       index=self.myQtab.currentIndex()
+       if index < 0 : return
+       editor=self.dict_editors[index]
+       if editor in self.doubles.keys() :
+           QMessageBox.warning(
+                     None,
+                     tr("Fichier Duplique"),
+                     tr("Le fichier ne sera pas sauvegarde."),
+                     tr("&Annuler"))
+           return
+       ok, newName = editor.sauveLigneFile()
+       if ok :
+           fileName=os.path.basename(unicode(newName))
+           self.myQtab.setTabText(index,fileName)
+       return ok
+
+
    def saveAsCurrentEditor(self):
        index=self.myQtab.currentIndex()
        editor=self.dict_editors[index]
@@ -271,7 +291,7 @@ class MyTabview:
 #PNPNPNPN --> a affiner
         if fichier is None:
             self.untitledCount += 1
-            self.myQtab.addTab(win, tr("Fichier non encore nommé ", self.untitledCount))
+            self.myQtab.addTab(win, tr("Fichier non encore nomme ", self.untitledCount))
             #self.myQtab.addTab(win, str(self.appliEficas.code))
         else:
             liste=fichier.split('/')