Changeset bc7bc839 in sasview


Ignore:
Timestamp:
Jul 25, 2011 3:24:12 PM (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:
486aa43
Parents:
463eb76e
Message:

finished tutorial help menu

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    r204d0fa rbc7bc839  
    17731773            if IS_WIN: 
    17741774                try: 
    1775                     import pdfview  
     1775                    from sans.guiframe.pdfview import PDFFrame 
    17761776                     
    1777                     dialog = pdfview.PDFFrame(None, -1, "Tutorial", path) 
     1777                    dialog = PDFFrame(None, -1, "Tutorial", path) 
    17781778                    #self.SetTopWindow(dialog) 
    17791779                    dialog.Show(True)  
  • guiframe/pdfview.py

    r60c7011 rbc7bc839  
    33 
    44import  wx 
     5import os 
    56if wx.Platform == '__WXMSW__': 
    67    from wx.lib.pdfwin import PDFWindow 
     
    1617         
    1718        self.parent = parent 
     19        self.path = path 
    1820        sizer = wx.BoxSizer(wx.VERTICAL) 
    1921        btnSizer = wx.BoxSizer(wx.HORIZONTAL) 
     
    2729        btnSizer.Add(btn, proportion=1, flag=wx.EXPAND|wx.ALL, border=5) 
    2830 
    29         self.pdf.LoadFile(path) 
     31        self.pdf.LoadFile(self.path) 
    3032        btn = wx.Button(self, wx.NewId(), "Previous Page") 
    3133        self.Bind(wx.EVT_BUTTON, self.OnPrevPageButton, btn) 
     
    5153        # make sure you have PDF files available on your drive 
    5254        dlg = wx.FileDialog(self, wildcard="*.pdf") 
     55        dlg.SetDirectory(os.path.dirname(self.path)) 
    5356        if dlg.ShowModal() == wx.ID_OK: 
    5457            wx.BeginBusyCursor() 
    55             self.pdf.LoadFile(dlg.GetPath()) 
    56  
     58            file = dlg.GetPath() 
     59            self.pdf.LoadFile(file) 
     60            self.parent.SetTitle(os.path.basename(file.split('.')[0])) 
    5761            wx.EndBusyCursor() 
    5862        dlg.Destroy() 
  • sansview/local_config.py

    r60c7011 rbc7bc839  
    6262DATAPANEL_HEIGHT = 700 
    6363SPLASH_SCREEN_PATH = os.path.join("images","SVwelcome_mini.png") 
    64 TUTORIAL_PATH = os.path.join("media","sansview_tutorial.pdf") 
     64TUTORIAL_PATH = os.path.join("media","Tutorial.pdf") 
    6565DEFAULT_STYLE = GUIFRAME.MULTIPLE_APPLICATIONS|GUIFRAME.MANAGER_ON\ 
    6666                    |GUIFRAME.CALCULATOR_ON|GUIFRAME.TOOLBAR_ON 
Note: See TracChangeset for help on using the changeset viewer.