Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/gui_manager.py

    rb963b20 r8ac05a5  
    12761276 
    12771277        wx_id = wx.NewId() 
    1278         self._help_menu.Append(wx_id, '&Documentation', '') 
     1278        self._help_menu.Append(wx_id, '&Documentation', 'Help documentation for SasView') 
    12791279        wx.EVT_MENU(self, wx_id, self._onSphinxDocs) 
    12801280 
    12811281        if config._do_tutorial and (IS_WIN or sys.platform == 'darwin'): 
    12821282            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', 'Tutorials on how to use SasView') 
    12841286            wx.EVT_MENU(self, wx_id, self._onTutorial) 
     1287 
     1288        if config.marketplace_url: 
     1289            wx_id = wx.NewId() 
     1290            self._help_menu.Append(wx_id, '&Model marketplace', 'Plug-in fitting models for SasView') 
     1291            wx.EVT_MENU(self, wx_id, self._on_marketplace_click) 
     1292 
     1293        if config._do_release: 
     1294            wx_id = wx.NewId() 
     1295            self._help_menu.Append(wx_id, '&Release notes', 
     1296                                   'SasView release notes and known issues') 
     1297            wx.EVT_MENU(self, wx_id, self._onRelease) 
    12851298 
    12861299        if config._do_acknowledge: 
     
    12931306            logger.info("Doing help menu") 
    12941307            wx_id = wx.NewId() 
    1295             self._help_menu.Append(wx_id, '&About', 'Software information') 
     1308            self._help_menu.Append(wx_id, '&About', 'Information about SasView') 
    12961309            wx.EVT_MENU(self, wx_id, self._onAbout) 
    1297  
    1298         if config.marketplace_url: 
    1299             wx_id = wx.NewId() 
    1300             self._help_menu.Append(wx_id, '&Model marketplace', '') 
    1301             wx.EVT_MENU(self, wx_id, self._on_marketplace_click) 
    13021310 
    13031311        # Checking for updates 
     
    21372145            dialog.ShowModal() 
    21382146 
     2147    def _onRelease(self, evt): 
     2148        """ 
     2149        Pop up the release notes 
     2150 
     2151        :param evt: menu event 
     2152 
     2153        """ 
     2154        # S King, Sep 2018 
     2155 
     2156        from documentation_window import DocumentationWindow 
     2157        _TreeLocation = "user/release.html" 
     2158        DocumentationWindow(self, -1, _TreeLocation, "", 
     2159                            "SasView Documentation") 
     2160 
    21392161    def _onTutorial(self, evt): 
    21402162        """ 
     
    21442166 
    21452167        """ 
    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') 
     2168        # Action changed from that in 2.x/3.x/4.0.x/4.1.x 
     2169        # Help >> Tutorial used to bring up a pdf of the 
     2170        # original 2.x tutorial. 
     2171        # Code below, implemented from 4.2.0, redirects 
     2172        # action to the Tutorials page of the help  
     2173        # documentation to give access to all available 
     2174        # tutorials 
     2175        # S King, Sep 2018 
     2176 
     2177        from documentation_window import DocumentationWindow 
     2178        _TreeLocation = "user/tutorial.html" 
     2179        DocumentationWindow(self, -1, _TreeLocation, "", 
     2180                            "SasView Documentation") 
    21842181 
    21852182    def _onSphinxDocs(self, evt): 
Note: See TracChangeset for help on using the changeset viewer.