Pascale Noyret: made the doc reading of Yams working on all systems (default system viewer is used)

This commit is contained in:
rnc 2012-11-23 14:22:29 +00:00
parent 2c51e345a0
commit 431b3cc6de

View File

@ -64,16 +64,13 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
maDoc=os.environ['DISTENE_YAMS_DOC_PDF'] maDoc=os.environ['DISTENE_YAMS_DOC_PDF']
except Exception: except Exception:
QMessageBox.warning( self, "Help unavailable", str(maDoc) + " not found") QMessageBox.warning( self, "Help unavailable", str(maDoc) + " not found")
try :
commande='kpdf '+maDoc
os.system (commande)
except Exception:
old_ld=os.getenv("LD_LIBRARY_PATH") old_ld=os.getenv("LD_LIBRARY_PATH")
command="unset LD_LIBRARY_PATH;" command="unset LD_LIBRARY_PATH;"
command+="okular "+maDoc+";" command+="xdg-open "+maDoc+";"
command+="export LD_LIBRARY_PATH=%s"%old_ld command+="export LD_LIBRARY_PATH=%s"%old_ld
os.system(command) os.system(command)
def PBOKPressed(self): def PBOKPressed(self):
if not(self.PrepareLigneCommande()) : return if not(self.PrepareLigneCommande()) : return
self.PBSavePressed(NomHypo=True) self.PBSavePressed(NomHypo=True)