Changeset 1722


Ignore:
Timestamp:
Mar 16, 2015 10:38:02 PM (7 years ago)
Author:
toby
Message:

Show download paths, as suggested by Bob

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrls.py

    r1719 r1722  
    20882088        sizer1.Add(self.dataLoc,0,WACV)
    20892089        sizer.Add(sizer1)
     2090        label = wx.StaticText(
     2091            pnl,  wx.ID_ANY,
     2092            'Tutorials and Exercise files will be downloaded to:'
     2093            )
     2094        sizer.Add(label, 0, wx.ALIGN_LEFT|wx.ALL, 5)
     2095        self.TutorialLabel = wx.StaticText(pnl,wx.ID_ANY,'')
     2096        sizer.Add(self.TutorialLabel, 0, wx.ALIGN_LEFT|wx.EXPAND, 5)
     2097        self.ExerciseLabel = wx.StaticText(pnl,wx.ID_ANY,'')
     2098        self.ShowTutorialPath()
     2099        sizer.Add(self.ExerciseLabel, 0, wx.ALIGN_LEFT|wx.EXPAND, 5)
    20902100        self.listbox = wx.ListBox(pnl, wx.ID_ANY, size=(450, 100), style=wx.LB_SINGLE)
    20912101        self.listbox.Bind(wx.EVT_LISTBOX, self.OnTutorialSelected)
     
    21432153            ''')
    21442154                return
    2145         self.dataLoc.SetLabel(tutorialPath)
     2155        #self.dataLoc.SetLabel(tutorialPath)
    21462156        self.EndModal(wx.ID_OK)
    21472157        wx.BeginBusyCursor()
     
    21722182            raise Exception("How did this happen!")
    21732183        wx.EndBusyCursor()
     2184    def ShowTutorialPath(self):
     2185        'Show the help and exercise directory names'
     2186        self.TutorialLabel.SetLabel('\t'+
     2187                                    os.path.join(tutorialPath,"help") +
     2188                                    ' (tutorials)')
     2189        self.ExerciseLabel.SetLabel('\t'+
     2190                                    os.path.join(tutorialPath,"Exercises") +
     2191                                    ' (exercises)')
    21742192    def ValidateTutorialDir(self,fullpath=tutorialPath,baseURL=G2BaseURL):
    21752193        '''Load help to new directory or make sure existing directory looks correctly set up
     
    22392257                G2MessageBox(self.frame,msg)
    22402258                return
    2241         self.ValidateTutorialDir(pth,G2BaseURL)
    2242         try:
     2259        try:
    22432260            self.ValidateTutorialDir(pth,G2BaseURL)
    22442261            tutorialPath = pth
     
    22532270            ''')
    22542271        self.dataLoc.SetLabel(tutorialPath)
     2272        self.ShowTutorialPath()
    22552273   
    22562274if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.