Changeset c3437260 in sasview
- Timestamp:
- Nov 30, 2014 11:06:12 AM (10 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 70a9d1c
- Parents:
- 9729a6d
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
run.py
rf8940db rc3437260 67 67 #import numpy; numpy.seterr(all='raise') 68 68 69 # Notify the help menu that the Sphinx documentation is in a different 70 # place than it otherwise would be. 71 72 73 69 74 # find the directories for the source and build 70 75 from distutils.util import get_platform … … 72 77 platform = '%s-%s'%(get_platform(),sys.version[:3]) 73 78 build_path = joinpath(root, 'build','lib.'+platform) 79 80 os.environ['SASVIEW_DOC_PATH'] = joinpath(build_path, "doc") 74 81 75 82 # Make sure that we have a private version of mplconfig -
src/sans/guiframe/gui_manager.py
rafb5080 rc3437260 1330 1330 self._help_menu = wx.Menu() 1331 1331 style = self.__gui_style & GUIFRAME.WELCOME_PANEL_ON 1332 1332 1333 if style == GUIFRAME.WELCOME_PANEL_ON or custom_config != None: 1333 1334 # add the welcome panel menu item … … 1337 1338 self._help_menu.AppendSeparator() 1338 1339 wx.EVT_MENU(self, id, self.show_welcome_panel) 1340 1339 1341 # Look for help item in plug-ins 1340 1342 for item in self.plugins: … … 1343 1345 self._help_menu.Append(id,'&%s Help' % item.sub_menu, '') 1344 1346 wx.EVT_MENU(self, id, item.help) 1347 1348 # Only show new Sphinx docs link if version of wx supports displaying 1349 # it correctly. 1350 show_sphinx_docs = float(wx.__version__[:3]) >= 2.9 1351 if show_sphinx_docs: 1352 self._help_menu.AppendSeparator() 1353 id = wx.NewId() 1354 self._help_menu.Append(id, '&Sphinx Documentation', '') 1355 wx.EVT_MENU(self, id, self._onSphinxDocs) 1356 1345 1357 if config._do_tutorial and (IS_WIN or sys.platform =='darwin'): 1346 1358 self._help_menu.AppendSeparator() … … 2148 2160 wx.MessageBox(msg, 'Error') 2149 2161 2150 2162 def _onSphinxDocs(self, evt): 2163 """ 2164 Pop up a Sphinx Documentation dialog. 2165 2166 :param evt: menu event 2167 """ 2168 # Running SasView "in-place" using run.py means the docs will be in a 2169 # different place than they would otherwise. 2170 SPHINX_DOC_ENV = "SASVIEW_DOC_PATH" 2171 if SPHINX_DOC_ENV in os.environ: 2172 docs_path = os.path.join(os.environ[SPHINX_DOC_ENV], "index.html") 2173 else: 2174 docs_path = os.path.join(PATH_APP, "..", "..", "doc", "index.html") 2175 2176 if os.path.exists(docs_path): 2177 from documentation_window import DocumentationWindow 2178 2179 sphinx_doc_viewer = DocumentationWindow(None, -1, docs_path) 2180 sphinx_doc_viewer.Show() 2181 else: 2182 logging.error("Could not find Sphinx documentation at '%' -- has it been built?" % docs_path) 2183 2151 2184 def set_manager(self, manager): 2152 2185 """
Note: See TracChangeset
for help on using the changeset viewer.