Pascale Noyret and rnc :

- correction in yams plugin exportGMF has now a boolean argument
- default tab of yams plugin dialog is now the first one
- attempt to enable doc reading with okular besides kpdf
This commit is contained in:
rnc 2012-11-23 13:57:14 +00:00
parent d9ee5cf9e8
commit 2c51e345a0
2 changed files with 11 additions and 5 deletions

View File

@ -105,7 +105,7 @@
</font> </font>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="simple"> <widget class="QWidget" name="simple">
<attribute name="title"> <attribute name="title">

View File

@ -62,11 +62,17 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
def PBHelpPressed(self): def PBHelpPressed(self):
try : try :
maDoc=os.environ['DISTENE_YAMS_DOC_PDF'] maDoc=os.environ['DISTENE_YAMS_DOC_PDF']
except Exception:
QMessageBox.warning( self, "Help unavailable", str(maDoc) + " not found")
try :
commande='kpdf '+maDoc commande='kpdf '+maDoc
os.system (commande) os.system (commande)
except: except Exception:
QMessageBox.warning( self, "Help unavailable", str(maDoc) + " not found") old_ld=os.getenv("LD_LIBRARY_PATH")
command="unset LD_LIBRARY_PATH;"
command+="okular "+maDoc+";"
command+="export LD_LIBRARY_PATH=%s"%old_ld
os.system(command)
def PBOKPressed(self): def PBOKPressed(self):
if not(self.PrepareLigneCommande()) : return if not(self.PrepareLigneCommande()) : return
@ -233,7 +239,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
def prepareFichier(self): def prepareFichier(self):
self.fichierIn="/tmp/PourYam_"+str(self.num)+".mesh" self.fichierIn="/tmp/PourYam_"+str(self.num)+".mesh"
import SMESH import SMESH
self.__selectedMesh.ExportGMF(self.__selectedMesh,self.fichierIn) self.__selectedMesh.ExportGMF(self.__selectedMesh,self.fichierIn, True)
def PrepareLigneCommande(self): def PrepareLigneCommande(self):
self.commande="yams " self.commande="yams "