Changeset 845144e in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Oct 17, 2018 4:30:31 PM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
9fb4572
Parents:
b204004 (diff), 67ed543 (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.
Message:

Merge branch master into ticket-1111

Location:
src/sas/sasgui/guiframe
Files:
4 edited

Legend:

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

    rb963b20 r1b4cb41  
    108108        self.bitmap_button_tudelft = wx.BitmapButton(self, -1, wx.NullBitmap) 
    109109        self.bitmap_button_dls = wx.BitmapButton(self, -1, wx.NullBitmap) 
     110        self.bitmap_button_bam = wx.BitmapButton(self, -1, wx.NullBitmap) 
    110111 
    111112        self.static_line_3 = wx.StaticLine(self, -1) 
     
    128129        self.Bind(wx.EVT_BUTTON, self.onTudelftLogo, self.bitmap_button_tudelft) 
    129130        self.Bind(wx.EVT_BUTTON, self.onDlsLogo, self.bitmap_button_dls) 
     131        self.Bind(wx.EVT_BUTTON, self.onBamLogo, self.bitmap_button_bam) 
    130132        # end wxGlade 
    131133        # fill in acknowledgements 
     
    226228        logo = wx.Bitmap(image) 
    227229        self.bitmap_button_dls.SetBitmapLabel(logo) 
     230 
     231        image = file_dir + "/images/bam_logo.png" 
     232        if os.path.isfile(config._bam_logo): 
     233            image = config._bam_logo 
     234        logo = wx.Bitmap(image) 
     235        self.bitmap_button_bam.SetBitmapLabel(logo) 
    228236 
    229237        # resize dialog window to fit version number nicely 
     
    258266        self.bitmap_button_tudelft.SetSize(self.bitmap_button_tudelft.GetBestSize()) 
    259267        self.bitmap_button_dls.SetSize(self.bitmap_button_dls.GetBestSize()) 
     268        self.bitmap_button_bam.SetSize(self.bitmap_button_bam.GetBestSize()) 
    260269        # end wxGlade 
    261270 
     
    325334        sizer_logos.Add(self.bitmap_button_dls, 0, 
    326335                        wx.LEFT|wx.ADJUST_MINSIZE, 2) 
     336        sizer_logos.Add(self.bitmap_button_bam, 0, 
     337                        wx.LEFT|wx.ADJUST_MINSIZE, 2) 
    327338 
    328339        sizer_logos.Add((10, 50), 0, wx.ADJUST_MINSIZE, 0) 
     
    430441        event.Skip() 
    431442 
     443    def onBamLogo(self, event): 
     444        """ 
     445        """ 
     446        # wxGlade: DialogAbout.<event_handler> 
     447        launchBrowser(config._bam_url) 
     448        event.Skip() 
     449 
    432450# end of class DialogAbout 
    433451 
  • src/sas/sasgui/guiframe/config.py

    r1efbc190 r1b4cb41  
    3333_do_aboutbox = True 
    3434_do_acknowledge = True 
     35_do_release = True 
    3536_do_tutorial = True 
    3637_acknowledgement_preamble =\ 
     
    4950_acknowledgement_citation = \ 
    5051'''M. Doucet et al. SasView Version 4.1.2, Zenodo, 10.5281/zenodo.825675''' 
    51  
    5252_acknowledgement =  \ 
    53 '''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: http://www.sasview.org/contact.html 
     53'''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, BAM and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: http://www.sasview.org/contact.html 
    5454''' 
    5555 
     
    9090_tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/" 
    9191_dls_url = "http://www.diamond.ac.uk/" 
     92_bam_url = "http://www.bam.de/" 
    9293_danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" 
    9394_inst_url = "http://www.utk.edu" 
    9495_corner_image = os.path.join(icon_path, "angles_flat.png") 
    9596_welcome_image = os.path.join(icon_path, "SVwelcome.png") 
    96 _copyright = "(c) 2009 - 2017, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, and DLS" 
     97_copyright = "(c) 2009 - 2018, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS and BAM" 
    9798marketplace_url = "http://marketplace.sasview.org/" 
    9899 
  • src/sas/sasgui/guiframe/gui_manager.py

    rb1ec23d r845144e  
    12771277 
    12781278        wx_id = wx.NewId() 
    1279         self._help_menu.Append(wx_id, '&Documentation', '') 
     1279        self._help_menu.Append(wx_id, '&Documentation', 'Help documentation for SasView') 
    12801280        wx.EVT_MENU(self, wx_id, self._onSphinxDocs) 
    12811281 
    12821282        if config._do_tutorial and (IS_WIN or sys.platform == 'darwin'): 
    12831283            wx_id = wx.NewId() 
    1284             self._help_menu.Append(wx_id, '&Tutorial', 'Software tutorial') 
     1284            # Pluralised both occurences of 'Tutorial' in the line below 
     1285            # S King, Sep 2018 
     1286            self._help_menu.Append(wx_id, '&Tutorials', 'Tutorials on how to use SasView') 
    12851287            wx.EVT_MENU(self, wx_id, self._onTutorial) 
     1288 
     1289        if config.marketplace_url: 
     1290            wx_id = wx.NewId() 
     1291            self._help_menu.Append(wx_id, '&Model marketplace', 'Plug-in fitting models for SasView') 
     1292            wx.EVT_MENU(self, wx_id, self._on_marketplace_click) 
     1293 
     1294        if config._do_release: 
     1295            wx_id = wx.NewId() 
     1296            self._help_menu.Append(wx_id, '&Release notes', 
     1297                                   'SasView release notes and known issues') 
     1298            wx.EVT_MENU(self, wx_id, self._onRelease) 
    12861299 
    12871300        if config._do_acknowledge: 
     
    12941307            logger.info("Doing help menu") 
    12951308            wx_id = wx.NewId() 
    1296             self._help_menu.Append(wx_id, '&About', 'Software information') 
     1309            self._help_menu.Append(wx_id, '&About', 'Information about SasView') 
    12971310            wx.EVT_MENU(self, wx_id, self._onAbout) 
    1298  
    1299         if config.marketplace_url: 
    1300             wx_id = wx.NewId() 
    1301             self._help_menu.Append(wx_id, '&Model marketplace', '') 
    1302             wx.EVT_MENU(self, wx_id, self._on_marketplace_click) 
    13031311 
    13041312        # Checking for updates 
     
    21382146            dialog.ShowModal() 
    21392147 
     2148    def _onRelease(self, evt): 
     2149        """ 
     2150        Pop up the release notes 
     2151 
     2152        :param evt: menu event 
     2153 
     2154        """ 
     2155        # S King, Sep 2018 
     2156 
     2157        from documentation_window import DocumentationWindow 
     2158        _TreeLocation = "user/release.html" 
     2159        DocumentationWindow(self, -1, _TreeLocation, "", 
     2160                            "SasView Documentation") 
     2161 
    21402162    def _onTutorial(self, evt): 
    21412163        """ 
     
    21452167 
    21462168        """ 
    2147         if config._do_tutorial: 
    2148             path = config.TUTORIAL_PATH 
    2149             if IS_WIN: 
    2150                 try: 
    2151                     from sas.sasgui.guiframe.pdfview import PDFFrame 
    2152                     dialog = PDFFrame(None, -1, "Tutorial", path) 
    2153                     # put icon 
    2154                     self.put_icon(dialog) 
    2155                     dialog.Show(True) 
    2156                 except: 
    2157                     logger.error("Error in _onTutorial: %s" % sys.exc_value) 
    2158                     try: 
    2159                         # Try an alternate method 
    2160                         logger.error( 
    2161                             "Could not open the tutorial pdf, trying xhtml2pdf") 
    2162                         from xhtml2pdf import pisa 
    2163                         pisa.startViewer(path) 
    2164                     except: 
    2165                         logger.error( 
    2166                             "Could not open the tutorial pdf with xhtml2pdf") 
    2167                         msg = "This feature requires 'PDF Viewer'\n" 
    2168                         wx.MessageBox(msg, 'Error') 
    2169             else: 
    2170                 try: 
    2171                     command = "open '%s'" % path 
    2172                     os.system(command) 
    2173                 except: 
    2174                     try: 
    2175                         # Try an alternate method 
    2176                         logger.error( 
    2177                             "Could not open the tutorial pdf, trying xhtml2pdf") 
    2178                         from xhtml2pdf import pisa 
    2179                         pisa.startViewer(path) 
    2180                     except: 
    2181                         logger.error( 
    2182                             "Could not open the tutorial pdf with xhtml2pdf") 
    2183                         msg = "This feature requires the Preview application\n" 
    2184                         wx.MessageBox(msg, 'Error') 
     2169        # Action changed from that in 2.x/3.x/4.0.x/4.1.x 
     2170        # Help >> Tutorial used to bring up a pdf of the 
     2171        # original 2.x tutorial. 
     2172        # Code below, implemented from 4.2.0, redirects 
     2173        # action to the Tutorials page of the help  
     2174        # documentation to give access to all available 
     2175        # tutorials 
     2176        # S King, Sep 2018 
     2177 
     2178        from documentation_window import DocumentationWindow 
     2179        _TreeLocation = "user/tutorial.html" 
     2180        DocumentationWindow(self, -1, _TreeLocation, "", 
     2181                            "SasView Documentation") 
    21852182 
    21862183    def _onSphinxDocs(self, evt): 
  • src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py

    r9c7e2b8 r5218180  
    205205            except NoKnownLoaderException as e: 
    206206                exception_occurred = True 
    207                 error_message = "Loading data failed!" + e.message 
     207                error_message = "Loading data failed!\n" + e.message 
    208208                file_errors[basename] = [error_message] 
    209209            except Exception as e: 
     
    224224                for message in error_array: 
    225225                    error_message += message + "\n" 
     226                error_message = error_message[:-1] 
    226227            self.load_complete(output=output, 
    227228                               message=error_message, 
     
    231232            self.load_complete(output=output, message="Loading data complete!", 
    232233                               info="info") 
    233         else: 
    234             self.load_complete(output=None, message=error_message, info="error") 
    235234 
    236235    def load_update(self, message="", info="warning"): 
Note: See TracChangeset for help on using the changeset viewer.