From f543238c605185cd3311872c38bbd343e4f2d16c Mon Sep 17 00:00:00 2001 From: rnc Date: Tue, 3 Dec 2013 16:40:54 +0000 Subject: [PATCH] BUG: MGCleaner / MGSurfOpt : Fixed a problem with the doc displayed in a non-standard way when clickin on help button. A pdf file included in the general plugin documentation was opened through xdg-open instead of showing the general documentation in the browser specified in the preferences. This latest behaviour has been implemented --- src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py | 12 +++++++++--- src/Tools/YamsPlug/monYamsPlugDialog.py | 14 ++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py b/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py index b7e72d423..b7d02ec8e 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py @@ -129,14 +129,20 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): self.connect(self.CB_ComputedOverlapDistance,SIGNAL("stateChanged(int)"),self.SP_OverlapDistance.setDisabled) def PBHelpPressed(self): + import SalomePyQt + sgPyQt = SalomePyQt.SalomePyQt() try: mydir=os.environ["SMESH_ROOT_DIR"] except Exception: QMessageBox.warning( self, "Help", "Help unavailable $SMESH_ROOT_DIR not found") return - maDoc=mydir+"/share/doc/salome/gui/SMESH/MGCleaner/_downloads/mg-cleaner_user_manual.pdf" - command="xdg-open "+maDoc+";" - subprocess.call(command, shell=True) + + maDoc=mydir+"/share/doc/salome/gui/SMESH/MGCleaner/index.html" + sgPyQt.helpContext(maDoc,"") + + #maDoc=mydir+"/share/doc/salome/gui/SMESH/MGCleaner/_downloads/mg-cleaner_user_manual.pdf" + #command="xdg-open "+maDoc+";" + #subprocess.call(command, shell=True) def PBOKPressed(self): if not(self.PrepareLigneCommande()): diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index 6db2a8f47..6f97b1ed6 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -102,14 +102,20 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): self.connect(self.LE_ParamsFile,SIGNAL("returnPressed()"),self.paramsFileNameChanged) def PBHelpPressed(self): + import SalomePyQt + sgPyQt = SalomePyQt.SalomePyQt() try : mydir=os.environ["SMESH_ROOT_DIR"] except Exception: QMessageBox.warning(self, "Help", "Help unavailable $SMESH_ROOT_DIR not found") return - maDoc=mydir+"/share/doc/salome/gui/SMESH/yams/_downloads/mg-surfopt_user_manual.pdf" - command="xdg-open "+maDoc+";" - subprocess.call(command, shell=True) + + maDoc=mydir+"/share/doc/salome/gui/SMESH/yams/index.html" + sgPyQt.helpContext(maDoc,"") + + #maDoc=mydir+"/share/doc/salome/gui/SMESH/yams/_downloads/mg-surfopt_user_manual.pdf" + #command="xdg-open "+maDoc+";" + #subprocess.call(command, shell=True) def PBOKPressed(self): if not(self.PrepareLigneCommande()): @@ -518,7 +524,7 @@ __dialog=None def getDialog(): """ This function returns a singleton instance of the plugin dialog. - It is mandatory in order to call show witout a parent ... + It is mandatory in order to call show without a parent ... """ global __dialog if __dialog is None: -- 2.39.2