Changeset adb0851 in sasview


Ignore:
Timestamp:
Oct 7, 2016 1:05:25 PM (8 years ago)
Author:
mathieu
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b61bd57
Parents:
e697487
Message:

Add link to marketplace. Fixes #656

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasview/local_config.py

    r06707b6 radb0851  
    8888_welcome_image = os.path.join(icon_path, "SVwelcome.png") 
    8989_copyright = "(c) 2009 - 2016, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL and ANSTO" 
    90  
     90marketplace_url = "http://marketplace.sasview.org/" 
    9191 
    9292#edit the list of file state your plugin can read 
  • src/sas/sasgui/guiframe/gui_manager.py

    r3fac0df radb0851  
    13331333                    self._applications_menu_name = name 
    13341334 
     1335    def _on_marketplace_click(self, event): 
     1336        """ 
     1337            Click event for the help menu item linking to the Marketplace. 
     1338        """ 
     1339        import webbrowser 
     1340        webbrowser.open_new(config.marketplace_url) 
     1341 
    13351342    def _add_help_menu(self): 
    13361343        """ 
     
    13381345        tutorial PDF and documentation pages. 
    13391346        """ 
    1340         # Help menu 
    13411347        self._help_menu = wx.Menu() 
    1342         style = self.__gui_style & GUIFRAME.WELCOME_PANEL_ON 
    13431348 
    13441349        wx_id = wx.NewId() 
    13451350        self._help_menu.Append(wx_id, '&Documentation', '') 
    13461351        wx.EVT_MENU(self, wx_id, self._onSphinxDocs) 
    1347         self._help_menu.AppendSeparator() 
    13481352 
    13491353        if config._do_tutorial and (IS_WIN or sys.platform == 'darwin'): 
     
    13511355            self._help_menu.Append(wx_id, '&Tutorial', 'Software tutorial') 
    13521356            wx.EVT_MENU(self, wx_id, self._onTutorial) 
    1353             self._help_menu.AppendSeparator() 
    1354  
    13551357 
    13561358        if config._do_acknowledge: 
     
    13581360            self._help_menu.Append(wx_id, '&Acknowledge', 'Acknowledging SasView') 
    13591361            wx.EVT_MENU(self, wx_id, self._onAcknowledge) 
    1360             self._help_menu.AppendSeparator() 
    1361  
    13621362 
    13631363        if config._do_aboutbox: 
     
    13661366            self._help_menu.Append(wx_id, '&About', 'Software information') 
    13671367            wx.EVT_MENU(self, wx_id, self._onAbout) 
    1368             self._help_menu.AppendSeparator() 
    1369  
     1368 
     1369        if config.marketplace_url: 
     1370            wx_id = wx.NewId() 
     1371            self._help_menu.Append(wx_id, '&Model marketplace', '') 
     1372            wx.EVT_MENU(self, wx_id, self._on_marketplace_click) 
    13701373 
    13711374        # Checking for updates 
Note: See TracChangeset for help on using the changeset viewer.