Changeset 3355


Ignore:
Timestamp:
Apr 22, 2018 5:15:25 AM (4 years ago)
Author:
toby
Message:

name main & plot window against project name, remove other SetTitle? calls

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r3333 r3355  
    573573    file = open(G2frame.GSASprojectfile,'rb')
    574574    if showProvenance: print ('loading from file: '+G2frame.GSASprojectfile)
    575     #G2frame.SetTitle("GSAS-II data tree: "+
    576     #                 os.path.split(G2frame.GSASprojectfile)[1])
    577     G2frame.SetTitle("GSAS-II data tree: "+
    578         os.path.split(G2frame.GSASprojectfile)[1],1)
     575    G2frame.SetTitle("GSAS-II project: "+os.path.split(G2frame.GSASprojectfile)[1])
     576    G2frame.plotFrame.SetTitle("GSAS-II plots: "+os.path.split(G2frame.GSASprojectfile)[1])
    579577    wx.BeginBusyCursor()
    580578    try:
  • trunk/GSASIIconstrGUI.py

    r3328 r3355  
    11231123    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.ConstraintMenu)
    11241124    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Constraints')
    1125     G2frame.SetTitle('Constraints')
     1125    #G2frame.SetTitle('Constraints')
    11261126    SetStatusLine('')
    11271127   
     
    21452145
    21462146    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RigidBodyMenu)
    2147     G2frame.SetTitle('Rigid bodies')
     2147    #G2frame.SetTitle('Rigid bodies')
    21482148    SetStatusLine('')
    21492149    UpdateVectorRB()
  • trunk/GSASIIdataGUI.py

    r3352 r3355  
    28942894                if item.IsOk(): self.GPXtree.SelectItem(item)
    28952895                   
    2896     def SetTitle(self,text,location=0):
    2897         '''Override the standard method with a call that puts text into
    2898         either the top box on the tree or the label on the frame.
    2899 
    2900         :param str text: text to be displayed
    2901         :param int location: if 0 (default) labels go into the the Frame;
    2902           if 1, labels go into the G2frame.treeTitle control, which is above the
    2903           data Tree.
    2904         '''
    2905         if location == 1:
    2906 #            self.treeTitle.SetLabel(text)
    2907             pass
    2908         elif not location:
    2909             wx.Frame.SetTitle(self,text)
    2910         else:
    2911             print(u'unexpected SetTitle option: '+str(location)+", "+
    2912                   text)     
    2913     def SetLabel(self,text,location=0):
    2914         'implement unfortunate synonym. with luck no longer used'
    2915         self.SetTitle(text,location=0)
     2896#     def SetTitle(self,text,location=0):
     2897#         '''Override the standard method with a call that puts text into
     2898#         either the top box on the tree or the label on the frame.
     2899
     2900#         :param str text: text to be displayed
     2901#         :param int location: if 0 (default) labels go into the the Frame;
     2902#           if 1, labels go into the G2frame.treeTitle control, which is above the
     2903#           data Tree.
     2904#         '''
     2905#         if location == 1:
     2906# #            self.treeTitle.SetLabel(text)
     2907#             pass
     2908#         elif not location:
     2909#             wx.Frame.SetTitle(self,text)
     2910#         else:
     2911#             print(u'unexpected SetTitle option: '+str(location)+", "+
     2912#                   text)     
     2913#     def SetLabel(self,text,location=0):
     2914#         'implement unfortunate synonym. with luck no longer used'
     2915#         self.SetTitle(text,location=0)
    29162916
    29172917    def OnColMetaTest(self,event):
     
    37373737                self.GSASprojectfile = G2IO.FileDlgFixExt(dlg,self.GSASprojectfile)
    37383738                self.GPXtree.SetItemText(self.root,'Project: '+self.GSASprojectfile)
    3739                 #self.SetTitle("GSAS-II data tree: "+os.path.split(self.GSASprojectfile)[1])
    3740                 self.SetTitle("GSAS-II project: "+os.path.split(self.GSASprojectfile)[1],1)
     3739                self.SetTitle("GSAS-II project: "+os.path.split(self.GSASprojectfile)[1])
     3740                self.plotFrame.SetTitle("GSAS-II plots: "+os.path.split(self.GSASprojectfile)[1])
    37413741                self.CheckNotebook()
    37423742                G2IO.ProjFileSave(self)
     
    54025402                   
    54035403    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Notebook')
    5404     G2frame.SetTitle('Notebook')
     5404    #G2frame.SetTitle('Notebook')
    54055405    text = wx.TextCtrl(G2frame.dataWindow,wx.ID_ANY,
    54065406            style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER | wx.TE_DONTWRAP)
     
    54205420
    54215421    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Comments')
    5422     G2frame.SetTitle('Comments')
     5422    #G2frame.SetTitle('Comments')
    54235423    lines = ""
    54245424    for line in data:
     
    56265626    #G2frame.dataWindow.SetupScrolling()
    56275627    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Controls')
    5628     G2frame.SetTitle('Controls')
     5628    #G2frame.SetTitle('Controls')
    56295629    SetDataMenuBar(G2frame,G2frame.dataWindow.ControlsMenu)
    56305630    mainSizer = wx.BoxSizer(wx.VERTICAL)
     
    66546654    SetDataMenuBar(G2frame,G2frame.dataWindow.SequentialMenu)
    66556655    #G2frame.dataWindow.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Sequential refinement results')
    6656     G2frame.SetTitle('Sequential refinement results')
     6656    #G2frame.SetTitle('Sequential refinement results')
    66576657    G2frame.Bind(wx.EVT_MENU, OnSelectUse, id=G2G.wxID_SELECTUSE)
    66586658    G2frame.Bind(wx.EVT_MENU, OnRenameSelSeq, id=G2G.wxID_RENAMESEQSEL)
     
    72797279    data = G2frame.GPXtree.GetItemPyData(item)
    72807280    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+G2frame.GPXtree.GetItemText(item))
    7281     G2frame.SetTitle(G2frame.GPXtree.GetItemText(item))
     7281    #G2frame.SetTitle(G2frame.GPXtree.GetItemText(item))
    72827282#patches
    72837283    if not data:
     
    75457545#        if G2frame.dataDisplay:
    75467546#            oldPage = G2frame.dataDisplay.GetSelection()
    7547     G2frame.SetTitle("GSAS-II project: "+os.path.split(G2frame.GSASprojectfile)[1],0)
     7547    G2frame.SetTitle("GSAS-II project: "+os.path.split(G2frame.GSASprojectfile)[1])
     7548    G2frame.plotFrame.SetTitle("GSAS-II plots: "+os.path.split(G2frame.GSASprojectfile)[1])
    75487549       
    75497550    SetDataMenuBar(G2frame)
     
    76417642        elif G2frame.GPXtree.GetItemText(item).startswith('IMG '):
    76427643            G2frame.Image = item
    7643             G2frame.SetTitle('Image Data')
     7644            #G2frame.SetTitle('Image Data')
    76447645            data = G2frame.GPXtree.GetItemPyData(GetGPXtreeItemId(
    76457646                G2frame,item,'Image Controls'))
     
    77067707        UpdateComments(G2frame,data)
    77077708    elif G2frame.GPXtree.GetItemText(item) == 'Image Controls':
    7708         G2frame.SetTitle('Image Controls')
     7709        #G2frame.SetTitle('Image Controls')
    77097710        G2frame.Image = G2frame.GPXtree.GetItemParent(item)
    77107711        masks = G2frame.GPXtree.GetItemPyData(
     
    77157716        G2plt.PlotImage(G2frame,newPlot=False)
    77167717    elif G2frame.GPXtree.GetItemText(item) == 'Masks':
    7717         G2frame.SetTitle('Masks')
     7718        #G2frame.SetTitle('Masks')
    77187719        G2frame.Image = G2frame.GPXtree.GetItemParent(item)
    77197720        masks = G2frame.GPXtree.GetItemPyData(item)
     
    77247725        G2plt.PlotImage(G2frame,newPlot=False)
    77257726    elif G2frame.GPXtree.GetItemText(item) == 'Stress/Strain':
    7726         G2frame.SetTitle('Stress/Strain')
     7727        #G2frame.SetTitle('Stress/Strain')
    77277728        G2frame.Image = G2frame.GPXtree.GetItemParent(item)
    77287729        data = G2frame.GPXtree.GetItemPyData(
  • trunk/GSASIIphsGUI.py

    r3353 r3355  
    13651365                    G2frame.G2plotNB.Rename(oldName,generalData['Name'])
    13661366                    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Phase Data for '+generalData['Name'])
    1367                     G2frame.SetTitle('Phase Data for '+generalData['Name'])                   
     1367                    #G2frame.SetTitle('Phase Data for '+generalData['Name'])                   
    13681368                    G2frame.GPXtree.SetItemText(Item,generalData['Name'])
    13691369                    # change phase name key in Reflection Lists for each histogram
     
    91959195    G2gd.SetDataMenuBar(G2frame)
    91969196    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Phase Data for '+PhaseName)
    9197     G2frame.SetTitle('Phase Data for '+PhaseName)
     9197    #G2frame.SetTitle('Phase Data for '+PhaseName)
    91989198    # Bob: why do this differently in debug mode? Is this code to test if tabs can be moved around? #TODO - yup, flaky tho.
    91999199#    if GSASIIpath.GetConfigValue('debug'):
  • trunk/GSASIIplot.py

    r3353 r3355  
    791791        else:
    792792            # should not happen!
    793             GSASIIpath.IPyBreak()
     793            if GSASIIpath.GetConfigValue('debug'): GSASIIpath.IPyBreak()
    794794        self.parent.toolbar.push_current()
    795795        ax.axis((xmin,xmax,ymin,ymax))
  • trunk/GSASIIpwdGUI.py

    r3348 r3355  
    930930    G2frame.PeakTable = G2G.Table(data['peaks'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    931931    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Peak List')
    932     G2frame.SetTitle('Peak List')
     932    #G2frame.SetTitle('Peak List')
    933933    G2frame.dataWindow.currentGrids = []
    934934    reflGrid = G2G.GSGrid(parent=G2frame.dataWindow)
     
    14471447    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.LimitMenu)
    14481448    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Limits')
    1449     G2frame.SetTitle('Limits')
     1449    #G2frame.SetTitle('Limits')
    14501450    G2frame.Bind(wx.EVT_MENU,OnLimitCopy,id=G2G.wxID_LIMITCOPY)
    14511451    G2frame.Bind(wx.EVT_MENU,OnAddExcl,id=G2G.wxID_ADDEXCLREGION)
     
    17831783    def MakeParameterWindow():
    17841784        'Displays the Instrument parameters in the dataWindow frame'
    1785         G2frame.SetTitle('Instrument Parameters')
     1785        #G2frame.SetTitle('Instrument Parameters')
    17861786        G2frame.dataWindow.ClearData()
    17871787        mainSizer = G2frame.dataWindow.GetSizer()
     
    24302430    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.SampleMenu)
    24312431    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Sample Parameters')
    2432     G2frame.SetTitle('Sample Parameters')
     2432    #G2frame.SetTitle('Sample Parameters')
    24332433    G2frame.Bind(wx.EVT_MENU, OnSetScale, id=G2G.wxID_SETSCALE)
    24342434    G2frame.Bind(wx.EVT_MENU, OnSampleCopy, id=G2G.wxID_SAMPLECOPY)
     
    27012701    G2frame.GPXtree.SetItemPyData(IndexId,data)
    27022702    G2frame.IndexPeaksTable = G2G.Table(data[0],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    2703     G2frame.SetTitle('Index Peak List')
     2703    #G2frame.SetTitle('Index Peak List')
    27042704    G2frame.dataWindow.currentGrids = []
    27052705    G2frame.indxPeaks = G2G.GSGrid(parent=G2frame.dataWindow)               
     
    32273227            dlg.Destroy()
    32283228           
    3229     G2frame.SetTitle('Unit cells')
     3229    #G2frame.SetTitle('Unit cells')
    32303230    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.IndexMenu)
    32313231    G2frame.Bind(wx.EVT_MENU, OnIndexPeaks, id=G2G.wxID_INDEXPEAKS)
     
    36073607            return          #deleted phase?
    36083608        G2frame.RefList = phaseName
    3609         G2frame.SetTitle('Reflection List for '+phaseName)
     3609        #G2frame.SetTitle('Reflection List for '+phaseName)
    36103610        if HKLF:
    36113611            G2frame.GetStatusBar().SetStatusText('abs(DF)/sig > 10 red; > 3 yellow; flag:>0 twin no., 0 sp.gp absent, -1 user rejected, -2 Rfree',1)
     
    40444044    wave = G2mth.getWave(Inst)
    40454045    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.SubstanceMenu)
    4046     G2frame.SetTitle('Substances')
     4046    #G2frame.SetTitle('Substances')
    40474047    G2frame.Bind(wx.EVT_MENU, OnLoadSubstance, id=G2G.wxID_LOADSUBSTANCE)   
    40484048    G2frame.Bind(wx.EVT_MENU, OnReloadSubstances, id=G2G.wxID_RELOADSUBSTANCES)   
     
    46944694    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.ModelMenu)
    46954695    G2frame.dataWindow.ClearData()
    4696     G2frame.SetTitle('Modelling')
     4696    #G2frame.SetTitle('Modelling')
    46974697    G2frame.Bind(wx.EVT_MENU, OnCopyModel, id=G2G.wxID_MODELCOPY)
    46984698    G2frame.Bind(wx.EVT_MENU, OnCopyFlags, id=G2G.wxID_MODELCOPYFLAGS)
     
    52695269    Inst = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Instrument Parameters'))[0]
    52705270    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.REFDModelMenu)
    5271     G2frame.SetTitle('Modelling')
     5271    #G2frame.SetTitle('Modelling')
    52725272    G2frame.dataWindow.ClearData()
    52735273    G2frame.Bind(wx.EVT_MENU, OnCopyModel, id=G2G.wxID_MODELCOPY)
  • trunk/GSASIIrestrGUI.py

    r3318 r3355  
    19801980   
    19811981    # GUI defined here
    1982     G2frame.SetTitle('restraints for '+phaseName)
     1982    #G2frame.SetTitle('restraints for '+phaseName)
    19831983    #G2frame.restrBook = G2G.GSNoteBook(parent=G2frame.dataWindow,size=G2frame.dataWindow.GetClientSize())
    19841984    G2frame.restrBook = G2G.GSNoteBook(parent=G2frame.dataWindow)
Note: See TracChangeset for help on using the changeset viewer.