Changeset bb008fd in sasview
- Timestamp:
- Sep 14, 2018 7:18:54 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:
- 5f08251
- Parents:
- 13e4fa12
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/gui_manager.py
rb963b20 rbb008fd 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 self._help_menu.Append(wx_id, '&Tutorials', 'Software tutorials') 1284 1284 wx.EVT_MENU(self, wx_id, self._onTutorial) 1285 1285 … … 2144 2144 2145 2145 """ 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') 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') 2184 from documentation_window import DocumentationWindow 2185 _TreeLocation = "user/tutorial.html" 2186 DocumentationWindow(self, -1, _TreeLocation, "", 2187 "SasView Documentation") 2184 2188 2185 2189 def _onSphinxDocs(self, evt):
Note: See TracChangeset
for help on using the changeset viewer.