Salome HOME
linux/windows
[tools/eficas.git] / InterfaceQT4 / qtEficas.py
index 22d9627cd2dbff21ad81ea041584e7ad0e7e6eec..160f5921fce1cd0ae7b79352b4631c77f60ae7d0 100644 (file)
@@ -63,7 +63,8 @@ class Appli(Ui_Eficas,QMainWindow):
         self.ficRecents={}
         self.listeAEnlever=[]
         self.ListeCode=['Aster','Carmel3D','Cuve2dg','Openturns_Study','Openturns_Wrapper','MAP','ZCracks', 'CarmelCND','MT']
-        self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'../Editeur/icons')
+        #self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'../Editeur/icons')
+        self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'..','Editeur','icons')
 
         if self.salome:
           import Accas
@@ -162,8 +163,11 @@ class Appli(Ui_Eficas,QMainWindow):
     def ajoutExecution(self):
         self.menuExecution = self.menubar.addMenu(QApplication.translate("Eficas", "Execution", None, QApplication.UnicodeUTF8))
         self.actionExecution = QAction(self)
-        icon6 = QIcon(self.repIcon+"/roue.png")
-        self.actionExecution.setIcon(icon6)
+        if sys.platform[0:5]=="linux":
+          icon6 = QIcon(self.repIcon+"/roue.png")
+          self.actionExecution.setIcon(icon6)
+        else :
+          self.actionExecution.setText(QApplication.translate("Eficas", "Run", None))
         self.actionExecution.setObjectName("actionExecution")
         self.menuExecution.addAction(self.actionExecution)
         if not(self.actionExecution in self.toolBar.actions()):
@@ -248,7 +252,6 @@ class Appli(Ui_Eficas,QMainWindow):
 
     def PSEN(self):
         self.ajoutExecution()
-        self.ajoutSauveExecution()
 
     def ChercheGrpMesh(self):
         Msg,listeGroup=self.ChercheGrpMeshInSalome()
@@ -446,6 +449,8 @@ class Appli(Ui_Eficas,QMainWindow):
         self.recent.prepend(fn)
         if len(self.recent) > 9:
             self.recent = self.recent[:9]
+        index=0
+        self.sauveRecents()
 
     def sauveRecents(self) :
        try :
@@ -497,7 +502,8 @@ class Appli(Ui_Eficas,QMainWindow):
         maD=repAide+"/../Aide"
         try :
           indexAide=maD+"/fichiers_EFICAS/index.html"
-          cmd="xdg-open "+indexAide
+          if sys.platform[0:5]=="linux" : cmd="xdg-open "+indexAide
+          else                          : cmd="start "+indexAide
           os.system(cmd)
         except:
           QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee "))
@@ -507,7 +513,8 @@ class Appli(Ui_Eficas,QMainWindow):
         if self.code==None : return
         try :
         #if 1 :
-          cmd="xdg-open "+self.fileDoc
+          if sys.platform[0:5]=="linux" : cmd="xdg-open "+self.fileDoc
+          else                          : cmd="start "+self.fileDoc
           os.system(cmd)
         except:
         #else: