Changeset ee22241 in sasview
- Timestamp:
- Sep 24, 2018 7:15:49 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 2dce1d8
- Parents:
- 712db9e
- Location:
- src/sas/qtgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/GuiManager.py
rdad086f ree22241 202 202 Open a local url in the default browser 203 203 """ 204 location = GuiUtils.HELP_DIRECTORY_LOCATION + url 205 #WP: Added to handle OSX bundle docs 206 if os.path.isdir(location) == False: 207 sas_path = os.path.abspath(os.path.dirname(sys.argv[0])) 208 location = sas_path+"/"+location 209 try: 210 webbrowser.open('file://' + os.path.realpath(location)) 211 except webbrowser.Error as ex: 212 logging.warning("Cannot display help. %s" % ex) 204 GuiUtils.showHelp(url) 213 205 214 206 def workspace(self): -
src/sas/qtgui/Plotting/SlicerParameters.py
raed0532 ree22241 4 4 import numpy 5 5 import functools 6 6 7 from PyQt5 import QtCore 7 8 from PyQt5 import QtGui … … 86 87 Display generic data averaging help 87 88 """ 88 location = "/user/qtgui/MainWindow/graph_help.html#d-data-averaging" 89 self.parent.showHelp(location) 90 89 url = "/user/qtgui/MainWindow/graph_help.html#d-data-averaging" 90 GuiUtils.showHelp(url) 91 91 92 92 class ProxyModel(QtCore.QIdentityProxyModel): -
src/sas/qtgui/Utilities/GuiUtils.py
r9ce69ec ree22241 584 584 msg = "Attempt at opening an invalid URL" 585 585 raise AttributeError(msg) 586 587 def showHelp(url): 588 """ 589 Open a local url in the default browser 590 """ 591 location = HELP_DIRECTORY_LOCATION + url 592 #WP: Added to handle OSX bundle docs 593 if os.path.isdir(location) == False: 594 sas_path = os.path.abspath(os.path.dirname(sys.argv[0])) 595 location = sas_path+"/"+location 596 try: 597 webbrowser.open('file://' + os.path.realpath(location)) 598 except webbrowser.Error as ex: 599 logging.warning("Cannot display help. %s" % ex) 586 600 587 601 def retrieveData1d(data):
Note: See TracChangeset
for help on using the changeset viewer.