Changeset 36658a5 in sasview for src/sas/sasgui/guiframe
- Timestamp:
- Sep 14, 2018 11:31:05 AM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- 893d852
- Parents:
- 13e4fa12 (diff), 5f08251 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Steve K <smk78@…> (09/14/18 11:31:05)
- git-committer:
- GitHub <noreply@…> (09/14/18 11:31:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/gui_manager.py
rb963b20 r5f08251 1281 1281 if config._do_tutorial and (IS_WIN or sys.platform == 'darwin'): 1282 1282 wx_id = wx.NewId() 1283 self._help_menu.Append(wx_id, '&Tutorial', 'Software tutorial') 1283 # Pluralised both occurences of 'Tutorial' in the line below 1284 # S King, Sep 2018 1285 self._help_menu.Append(wx_id, '&Tutorials', 'Software tutorials') 1284 1286 wx.EVT_MENU(self, wx_id, self._onTutorial) 1285 1287 … … 2144 2146 2145 2147 """ 2146 if config._do_tutorial: 2147 path = config.TUTORIAL_PATH 2148 if IS_WIN: 2149 try: 2150 from sas.sasgui.guiframe.pdfview import PDFFrame 2151 dialog = PDFFrame(None, -1, "Tutorial", path) 2152 # put icon 2153 self.put_icon(dialog) 2154 dialog.Show(True) 2155 except: 2156 logger.error("Error in _onTutorial: %s" % sys.exc_value) 2157 try: 2158 # Try an alternate method 2159 logger.error( 2160 "Could not open the tutorial pdf, trying xhtml2pdf") 2161 from xhtml2pdf import pisa 2162 pisa.startViewer(path) 2163 except: 2164 logger.error( 2165 "Could not open the tutorial pdf with xhtml2pdf") 2166 msg = "This feature requires 'PDF Viewer'\n" 2167 wx.MessageBox(msg, 'Error') 2168 else: 2169 try: 2170 command = "open '%s'" % path 2171 os.system(command) 2172 except: 2173 try: 2174 # Try an alternate method 2175 logger.error( 2176 "Could not open the tutorial pdf, trying xhtml2pdf") 2177 from xhtml2pdf import pisa 2178 pisa.startViewer(path) 2179 except: 2180 logger.error( 2181 "Could not open the tutorial pdf with xhtml2pdf") 2182 msg = "This feature requires the Preview application\n" 2183 wx.MessageBox(msg, 'Error') 2148 # Action changed from that in 2.x/3.x/4.0.x/4.1.x 2149 # Help >> Tutorial used to bring up a pdf of the 2150 # original 2.x tutorial. 2151 # Code below, implemented from 4.2.0, redirects 2152 # action to the Tutorials page of the help 2153 # documentation to give access to all available 2154 # tutorials 2155 # S King, Sep 2018 2156 2157 from documentation_window import DocumentationWindow 2158 _TreeLocation = "user/tutorial.html" 2159 DocumentationWindow(self, -1, _TreeLocation, "", 2160 "SasView Documentation") 2184 2161 2185 2162 def _onSphinxDocs(self, evt):
Note: See TracChangeset
for help on using the changeset viewer.