Changeset 60c7011 in sasview


Ignore:
Timestamp:
Jul 20, 2011 9:47:22 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
cb26857
Parents:
56a3ff3
Message:

added tutorial viewer

Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    r24adb89 r60c7011  
    945945                self._help_menu.Append(id,'&%s Help' % item.sub_menu, '') 
    946946                wx.EVT_MENU(self, id, item.help) 
     947        if config._do_tutorial: 
     948            self._help_menu.AppendSeparator() 
     949            id = wx.NewId() 
     950            self._help_menu.Append(id,'&Tutorial', 'Software tutorial') 
     951            wx.EVT_MENU(self, id, self._onTutorial) 
     952             
    947953        if config._do_aboutbox: 
    948954            self._help_menu.AppendSeparator() 
     
    17531759            import aboutbox  
    17541760            dialog = aboutbox.DialogAbout(None, -1, "") 
    1755             dialog.ShowModal()             
    1756              
     1761            dialog.ShowModal()    
     1762                      
     1763    def _onTutorial(self, evt): 
     1764        """ 
     1765        Pop up the tutorial dialog 
     1766         
     1767        :param evt: menu event 
     1768         
     1769        """ 
     1770        if config._do_tutorial: 
     1771            try: 
     1772                #if IS_WIN: 
     1773                import pdfview  
     1774                path = config.TUTORIAL_PATH 
     1775                dialog = pdfview.PDFFrame(None, -1, "Tutorial", path) 
     1776                #self.SetTopWindow(dialog) 
     1777                dialog.Show(True)  
     1778                #else: 
     1779                #    command = "open" 
     1780                #    command += path 
     1781                #    os.system(command) 
     1782            except: 
     1783                msg = "This feature requires 'Adobe Acrobat pdf Reader'\n" 
     1784                msg += "Please install it first (Free from Adobe)..." 
     1785                wx.MessageBox(msg, 'Error') 
     1786                #wx.PostEvent(self, StatusEvent(status=msg, info="error")) 
     1787                       
    17571788    def set_manager(self, manager): 
    17581789        """ 
  • sansview/local_config.py

    r7f291a3 r60c7011  
    2323 
    2424# About box info 
    25 _do_aboutbox=True 
     25_do_aboutbox = True 
     26_do_tutorial = True 
    2627_acknowledgement =  \ 
    2728'''This software was developed by the University of Tennessee as part of the 
     
    6162DATAPANEL_HEIGHT = 700 
    6263SPLASH_SCREEN_PATH = os.path.join("images","SVwelcome_mini.png") 
     64TUTORIAL_PATH = os.path.join("media","sansview_tutorial.pdf") 
    6365DEFAULT_STYLE = GUIFRAME.MULTIPLE_APPLICATIONS|GUIFRAME.MANAGER_ON\ 
    6466                    |GUIFRAME.CALCULATOR_ON|GUIFRAME.TOOLBAR_ON 
Note: See TracChangeset for help on using the changeset viewer.