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,15 +64,12 @@ 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 : old_ld=os.getenv("LD_LIBRARY_PATH")
commande='kpdf '+maDoc command="unset LD_LIBRARY_PATH;"
os.system (commande) command+="xdg-open "+maDoc+";"
except Exception: command+="export LD_LIBRARY_PATH=%s"%old_ld
old_ld=os.getenv("LD_LIBRARY_PATH") os.system(command)
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