Ignore:
Timestamp:
Jul 5, 2017 1:30:37 PM (5 years ago)
Author:
toby
Message:

improve window title; still working on help

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIctrlGUI.py

    r2907 r2909  
    15991599    histList = G2pdG.GetHistsLikeSelected(G2frame)
    16001600    if not histList:
    1601         G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame.dataFrame)
     1601        G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)
    16021602        return
    16031603    dlg = wx.Dialog(G2frame.dataDisplay,wx.ID_ANY,'Set a parameter value',
     
    16511651    copyList = []
    16521652    lbl = copyopts['currentsel']
    1653     dlg = G2MultiChoiceDialog(G2frame.dataFrame,'Copy parameter '+lbl+' from\n'+hst,
     1653    dlg = G2MultiChoiceDialog(G2frame,'Copy parameter '+lbl+' from\n'+hst,
    16541654        'Copy parameters', histList)
    16551655    dlg.CenterOnParent()
     
    34053405#            if log.LogInfo['Logging']:
    34063406#                log.MakeTabLog(
    3407 #                    G2frame.dataFrame.GetTitle(),
     3407#                    G2frame.dataWindow.GetTitle(),
    34083408#                    G2frame.dataDisplay.GetPageText(page)
    34093409#                    )
     
    34893489                text='&Regress to an old GSAS-II version')
    34903490            frame.Bind(wx.EVT_MENU, self.OnSelectVersion, helpobj)
     3491        # provide special help topic names for extra items in help menu
    34913492        for lbl,indx in morehelpitems:
    34923493            helpobj = self.Append(text=lbl,
     
    35063507    def OnHelpById(self,event):
    35073508        '''Called when Help on... is pressed in a menu. Brings up a web page
    3508         for documentation. Uses the helpKey value from the dataFrame window
     3509        for documentation. Uses the helpKey value from the dataWindow window
    35093510        unless a special help key value has been defined for this menu id in
    35103511        self.HelpById
    35113512
    3512         Note that self may be child of the main window (G2frame) or of the dataFrame
     3513        Note that self may be child of the main window (G2frame) or of the dataWindow
    35133514        '''
     3515        #TODO: !
    35143516        if hasattr(self.frame,'dataFrame'):  # find the dataFrame
    3515             dataFrame = self.frame.dataFrame
    3516         else:
    3517             dataFrame = self.frame
     3517            dW = self.frame.dataWindow
     3518        else:
     3519            print('help error: not called from standard menu?')
     3520            print self
     3521            return
    35183522           
    35193523        try:
    3520             helpKey = dataFrame.helpKey # BHT: look up help from helpKey in data window
     3524            helpKey = dW.helpKey # BHT: look up help from helpKey in data window
    35213525            #if GSASIIpath.GetConfigValue('debug'): print 'dataFrame help: key=',helpKey
    35223526        except AttributeError:
     
    35243528            if GSASIIpath.GetConfigValue('debug'):
    35253529                print('No helpKey for current dataFrame!')
    3526         helpType = self.HelpById.get(event.GetId(),helpKey)
     3530        helpType = self.HelpById.get(event.GetId(),helpKey) # see if there is a special help topic
     3531        if GSASIIpath.GetConfigValue('debug'):
     3532            print 'helpKey=',helpKey,'  helpType=',helpType
    35273533        if helpType == 'Tutorials':
    35283534            dlg = OpenTutorial(self.frame)
Note: See TracChangeset for help on using the changeset viewer.