Changeset 2917 for branch


Ignore:
Timestamp:
Jul 7, 2017 4:45:18 PM (4 years ago)
Author:
toby
Message:

massive changes of wxID_ ids & misc to fix undefined vars wanings

Location:
branch/2frame
Files:
8 edited

Legend:

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

    r2915 r2917  
    10841084        G2frame.constr.ChangeSelection(page)
    10851085        text = G2frame.constr.GetPageText(page)
    1086         G2frame.dataWindow.ConstraintEdit.Enable(G2gd.wxID_EQUIVALANCEATOMS,False)
    1087 #        G2frame.dataWindow.ConstraintEdit.Enable(G2gd.wxID_ADDRIDING,False)
     1086        G2frame.dataWindow.ConstraintEdit.Enable(G2G.wxID_EQUIVALANCEATOMS,False)
     1087#        G2frame.dataWindow.ConstraintEdit.Enable(G2G.wxID_ADDRIDING,False)
    10881088        if text == 'Histogram/Phase':
    10891089            G2frame.Page = [page,'hap']
     
    10941094        elif text == 'Phase':
    10951095            G2frame.Page = [page,'phs']
    1096             G2frame.dataWindow.ConstraintEdit.Enable(G2gd.wxID_EQUIVALANCEATOMS,True)
    1097 #            G2frame.dataWindow.ConstraintEdit.Enable(G2gd.wxID_ADDRIDING,True)
     1096            G2frame.dataWindow.ConstraintEdit.Enable(G2G.wxID_EQUIVALANCEATOMS,True)
     1097#            G2frame.dataWindow.ConstraintEdit.Enable(G2G.wxID_ADDRIDING,True)
    10981098            if 'DELETED' in str(PhaseConstr):   #seems to be no other way to do this (wx bug)
    10991099                if GSASIIpath.GetConfigValue('debug'):
     
    11081108        'Respond to a "select tab" menu button'
    11091109        try:
    1110             i = (G2gd.wxID_CONSPHASE,
    1111                  G2gd.wxID_CONSHAP,
    1112                  G2gd.wxID_CONSHIST,
    1113                  G2gd.wxID_CONSGLOBAL).index(event.GetId())
     1110            i = (G2G.wxID_CONSPHASE,
     1111                 G2G.wxID_CONSHAP,
     1112                 G2G.wxID_CONSHIST,
     1113                 G2G.wxID_CONSGLOBAL).index(event.GetId())
    11141114            G2frame.constr.SetSelection(i)
    11151115            wx.CallAfter(OnPageChanged,None)
     
    11251125    SetStatusLine('')
    11261126   
    1127     G2frame.Bind(wx.EVT_MENU, OnAddConstraint, id=G2gd.wxID_CONSTRAINTADD)
    1128     G2frame.Bind(wx.EVT_MENU, OnAddFunction, id=G2gd.wxID_FUNCTADD)
    1129     G2frame.Bind(wx.EVT_MENU, OnAddEquivalence, id=G2gd.wxID_EQUIVADD)
    1130     G2frame.Bind(wx.EVT_MENU, OnAddHold, id=G2gd.wxID_HOLDADD)
    1131     G2frame.Bind(wx.EVT_MENU, OnAddAtomEquiv, id=G2gd.wxID_EQUIVALANCEATOMS)
    1132 #    G2frame.Bind(wx.EVT_MENU, OnAddRiding, id=G2gd.wxID_ADDRIDING)
     1127    G2frame.Bind(wx.EVT_MENU, OnAddConstraint, id=G2G.wxID_CONSTRAINTADD)
     1128    G2frame.Bind(wx.EVT_MENU, OnAddFunction, id=G2G.wxID_FUNCTADD)
     1129    G2frame.Bind(wx.EVT_MENU, OnAddEquivalence, id=G2G.wxID_EQUIVADD)
     1130    G2frame.Bind(wx.EVT_MENU, OnAddHold, id=G2G.wxID_HOLDADD)
     1131    G2frame.Bind(wx.EVT_MENU, OnAddAtomEquiv, id=G2G.wxID_EQUIVALANCEATOMS)
     1132#    G2frame.Bind(wx.EVT_MENU, OnAddRiding, id=G2G.wxID_ADDRIDING)
    11331133    # tab commands
    1134     for id in (G2gd.wxID_CONSPHASE,
    1135                G2gd.wxID_CONSHAP,
    1136                G2gd.wxID_CONSHIST,
    1137                G2gd.wxID_CONSGLOBAL):
     1134    for id in (G2G.wxID_CONSPHASE,
     1135               G2G.wxID_CONSHAP,
     1136               G2G.wxID_CONSHIST,
     1137               G2G.wxID_CONSGLOBAL):
    11381138        G2frame.Bind(wx.EVT_MENU, RaisePage,id=id)
    11391139
     
    13231323        if text == 'Vector rigid bodies':
    13241324            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.VectorBodyMenu)
    1325             G2frame.Bind(wx.EVT_MENU, AddVectorRB, id=G2gd.wxID_VECTORBODYADD)
     1325            G2frame.Bind(wx.EVT_MENU, AddVectorRB, id=G2G.wxID_VECTORBODYADD)
    13261326            G2frame.Page = [page,'vrb']
    13271327            UpdateVectorRB()
    13281328        elif text == 'Residue rigid bodies':
    13291329            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RigidBodyMenu)
    1330             G2frame.Bind(wx.EVT_MENU, AddResidueRB, id=G2gd.wxID_RIGIDBODYADD)
    1331             G2frame.Bind(wx.EVT_MENU, OnImportRigidBody, id=G2gd.wxID_RIGIDBODYIMPORT)
    1332             G2frame.Bind(wx.EVT_MENU, OnDefineTorsSeq, id=G2gd.wxID_RESIDUETORSSEQ) #enable only if residue RBs exist?
     1330            G2frame.Bind(wx.EVT_MENU, AddResidueRB, id=G2G.wxID_RIGIDBODYADD)
     1331            G2frame.Bind(wx.EVT_MENU, OnImportRigidBody, id=G2G.wxID_RIGIDBODYIMPORT)
     1332            G2frame.Bind(wx.EVT_MENU, OnDefineTorsSeq, id=G2G.wxID_RESIDUETORSSEQ) #enable only if residue RBs exist?
    13331333            G2frame.Page = [page,'rrb']
    13341334            UpdateResidueRB()
  • branch/2frame/GSASIIctrlGUI.py

    r2914 r2917  
    4141VERY_LIGHT_GREY = wx.Colour(235,235,235)
    4242WACV = wx.ALIGN_CENTER_VERTICAL
     43
     44################################################################################
     45#### Fixed definitions for wx Ids
     46################################################################################
     47def Define_wxId(*args):
     48    '''routine to create unique global wx Id symbols in this module.
     49    '''
     50    for arg in args:
     51        if GSASIIpath.GetConfigValue('debug') and not arg.startswith('wxID_'):
     52            print 'Problem in name',arg
     53        if arg in globals():
     54            if GSASIIpath.GetConfigValue('debug'): print arg,'already defined'
     55            continue
     56        exec('global '+arg+';'+arg+' = wx.NewId()')
    4357
    4458################################################################################
     
    33993413       
    34003414    def PageChangeEvent(self,event):
     3415        pass
    34013416#        G2frame = self.parent.G2frame
    3402         page = event.GetSelection()
     3417#        page = event.GetSelection()
    34033418#        if self.PageChangeHandler:
    34043419#            if log.LogInfo['Logging']:
  • branch/2frame/GSASIIdataGUI.py

    r2916 r2917  
    8282commonNames = ['abc','bca','cab','a-cb','ba-c','-cba','P->A','A->P','P->B','B->P','P->C','C->P',
    8383    'P->I','I->P','P->F','F->P','H->R','R->H','R->O','O->R','abc*','setting 1->2']          #don't put any new ones after the setting one!
    84 def Define_wxId(*args):
    85     '''routine to create unique global wx Id symbols in current module.
    86     '''
    87     for arg in args:
    88         if arg in globals():
    89             if GSASIIpath.GetConfigValue('debug'): print arg,'already defined'
    90             continue
    91         exec('global '+arg+';'+arg+' = wx.NewId()')
    9284
    9385def SetDefaultDData(dType,histoName,NShkl=0,NDij=0):
     
    263255        locale.getdefaultlocale()
    264256    try:
    265         import OpenGL as ogl
     257        import OpenGL
     258        OpenGL  # avoids unused package error
    266259    except ImportError:
    267260        print('*******************************************************')
     
    316309    print "  scipy:      ",sp.__version__
    317310    print "  OpenGL:     ",ogl.__version__
     311    # TODO: not sure this prints the right message with pillow
    318312    try:
    319313        from PIL import Image
     
    391385        for p in (wx,mpl,np,sp,ogl):
    392386            self.main.PackageVersions.append([p.__name__,p.__version__])
     387        # TODO: not sure how this works with pillow
    393388        try:
    394             self.main.PackageVersions.append([Image.__name__,Image.VERSION])
    395         except:
     389            from PIL import Image
    396390            try:
    397391                from PIL import PILLOW_VERSION
    398392                self.main.PackageVersions.append([Image.__name__,PILLOW_VERSION])
    399393            except:
     394                self.main.PackageVersions.append([Image.__name__,Image.VERSION])
     395        except ImportError:
     396            try:
     397                import Image
     398                self.main.PackageVersions.append([Image.__name__,Image.VERSION])
     399            except ImportError:
    400400                pass
    401401        self.main.PackageVersions.append(['Platform',sys.platform+' '+platform.architecture()[0]+' '+platform.machine()])
     
    17841784            if UseList: haveData = True
    17851785        if haveData:
    1786             self.dataWindow.DataMenu.Enable(wxID_DATADELETE,True)
     1786            self.dataWindow.DataMenu.Enable(G2G.wxID_DATADELETE,True)
    17871787            for item in self.Refine: item.Enable(True)
    17881788        else:
    1789             self.dataWindow.DataMenu.Enable(wxID_DATADELETE,False)
     1789            self.dataWindow.DataMenu.Enable(G2G.wxID_DATADELETE,False)
    17901790            for item in self.Refine: item.Enable(False)
    17911791
     
    28582858        self.Status.SetStatusWidths([200,-1])   # make these match?
    28592859       
    2860         wxID_PATTERNTREE = wx.NewId()
     2860        G2G.wxID_GPXTREE = wx.NewId()
    28612861        treeSizer = wx.BoxSizer(wx.VERTICAL)
    28622862        self.treePanel.SetSizer(treeSizer)
    2863         self.GPXtree = G2G.G2TreeCtrl(id=wxID_PATTERNTREE,
     2863        self.GPXtree = G2G.G2TreeCtrl(id=G2G.wxID_GPXTREE,
    28642864            parent=self.treePanel, size=self.treePanel.GetClientSize(),style=wx.TR_DEFAULT_STYLE )
    28652865#        self.treeTitle = wx.StaticText(self.treePanel, wx.ID_ANY, "GSAS-II project: ",
     
    28712871        self.GPXtree.Bind(wx.EVT_TREE_ITEM_RIGHT_CLICK,self.OnDataTreeSelChanged)
    28722872        self.GPXtree.Bind(wx.EVT_TREE_ITEM_COLLAPSED,
    2873             self.OnGPXtreeItemCollapsed, id=wxID_PATTERNTREE)
     2873            self.OnGPXtreeItemCollapsed, id=G2G.wxID_GPXTREE)
    28742874        self.GPXtree.Bind(wx.EVT_TREE_ITEM_EXPANDED,
    2875             self.OnGPXtreeItemExpanded, id=wxID_PATTERNTREE)
     2875            self.OnGPXtreeItemExpanded, id=G2G.wxID_GPXTREE)
    28762876        self.GPXtree.Bind(wx.EVT_TREE_DELETE_ITEM,
    2877             self.OnGPXtreeItemDelete, id=wxID_PATTERNTREE)
     2877            self.OnGPXtreeItemDelete, id=G2G.wxID_GPXTREE)
    28782878        self.GPXtree.Bind(wx.EVT_TREE_KEY_DOWN,
    2879             self.OnGPXtreeKeyDown, id=wxID_PATTERNTREE)
     2879            self.OnGPXtreeKeyDown, id=G2G.wxID_GPXTREE)
    28802880        self.GPXtree.Bind(wx.EVT_TREE_BEGIN_RDRAG,
    2881             self.OnGPXtreeBeginRDrag, id=wxID_PATTERNTREE)       
     2881            self.OnGPXtreeBeginRDrag, id=G2G.wxID_GPXTREE)       
    28822882        self.GPXtree.Bind(wx.EVT_TREE_END_DRAG,
    2883             self.OnGPXtreeEndDrag, id=wxID_PATTERNTREE)       
     2883            self.OnGPXtreeEndDrag, id=G2G.wxID_GPXTREE)       
    28842884        self.root = self.GPXtree.root       
    28852885
     
    47814781        'define all GSAS-II data window menus'
    47824782       
    4783         Define_wxId('wxID_ADDMCSAATOM', 'wxID_ADDMCSARB', 'wxID_CLEARMCSARB', 'wxID_MOVEMCSA', 'wxID_MCSACLEARRESULTS',)
    4784        
    4785         Define_wxId('wxID_CLEARTEXTURE', 'wxID_REFINETEXTURE',)
    4786        
    4787         Define_wxId('wxID_LOADDIFFAX', 'wxID_LAYERSIMULATE', 'wxID_SEQUENCESIMULATE', 'wxID_LAYERSFIT', 'wxID_COPYPHASE',)
    4788        
    4789         Define_wxId('wxID_PAWLEYLOAD', 'wxID_PAWLEYESTIMATE', 'wxID_PAWLEYUPDATE', 'wxID_PAWLEYSELALL', 'wxID_PAWLEYSELNONE',
     4783        G2G.Define_wxId('wxID_ADDMCSAATOM', 'wxID_ADDMCSARB', 'wxID_CLEARMCSARB', 'wxID_MOVEMCSA', 'wxID_MCSACLEARRESULTS',)
     4784       
     4785        G2G.Define_wxId('wxID_CLEARTEXTURE', 'wxID_REFINETEXTURE',)
     4786       
     4787        G2G.Define_wxId('wxID_LOADDIFFAX', 'wxID_LAYERSIMULATE', 'wxID_SEQUENCESIMULATE', 'wxID_LAYERSFIT', 'wxID_COPYPHASE',)
     4788       
     4789        G2G.Define_wxId('wxID_PAWLEYLOAD', 'wxID_PAWLEYESTIMATE', 'wxID_PAWLEYUPDATE', 'wxID_PAWLEYSELALL', 'wxID_PAWLEYSELNONE',
    47904790          'wxID_PAWLEYSELTOGGLE', 'wxID_PAWLEYSET',)
    47914791       
    4792         Define_wxId('wxID_BACKCOPY', 'wxID_LIMITCOPY', 'wxID_SAMPLECOPY', 'wxID_SAMPLECOPYSOME', 'wxID_BACKFLAGCOPY', 'wxID_SAMPLEFLAGCOPY',
     4792        G2G.Define_wxId('wxID_BACKCOPY', 'wxID_LIMITCOPY', 'wxID_SAMPLECOPY', 'wxID_SAMPLECOPYSOME', 'wxID_BACKFLAGCOPY', 'wxID_SAMPLEFLAGCOPY',
    47934793            'wxID_SAMPLESAVE', 'wxID_SAMPLELOAD', 'wxID_ADDEXCLREGION', 'wxID_SETSCALE', 'wxID_SAMPLE1VAL', 'wxID_ALLSAMPLELOAD',
    47944794            'wxID_MAKEBACKRDF', 'wxID_RESCALEALL',)
    47954795       
    4796         Define_wxId('wxID_INSTPRMRESET', 'wxID_CHANGEWAVETYPE', 'wxID_INSTCOPY', 'wxID_INSTFLAGCOPY', 'wxID_INSTLOAD',
     4796        G2G.Define_wxId('wxID_INSTPRMRESET', 'wxID_CHANGEWAVETYPE', 'wxID_INSTCOPY', 'wxID_INSTFLAGCOPY', 'wxID_INSTLOAD',
    47974797            'wxID_INSTSAVE', 'wxID_INST1VAL', 'wxID_INSTCALIB', 'wxID_INSTSAVEALL',)
    47984798       
    4799         Define_wxId('wxID_UNDO', 'wxID_LSQPEAKFIT', 'wxID_LSQONECYCLE', 'wxID_RESETSIGGAM', 'wxID_CLEARPEAKS', 'wxID_AUTOSEARCH',
     4799        G2G.Define_wxId('wxID_UNDO', 'wxID_LSQPEAKFIT', 'wxID_LSQONECYCLE', 'wxID_RESETSIGGAM', 'wxID_CLEARPEAKS', 'wxID_AUTOSEARCH',
    48004800            'wxID_PEAKSCOPY', 'wxID_SEQPEAKFIT',)
    48014801       
    4802         Define_wxId(' wxID_INDXRELOAD', 'wxID_INDEXPEAKS', 'wxID_REFINECELL', 'wxID_COPYCELL', 'wxID_MAKENEWPHASE',
     4802        G2G.Define_wxId(' wxID_INDXRELOAD', 'wxID_INDEXPEAKS', 'wxID_REFINECELL', 'wxID_COPYCELL', 'wxID_MAKENEWPHASE',
    48034803            'wxID_EXPORTCELLS',)
    48044804       
    4805         Define_wxId('wxID_CONSTRAINTADD', 'wxID_EQUIVADD', 'wxID_HOLDADD', 'wxID_FUNCTADD', 'wxID_ADDRIDING',
     4805        G2G.Define_wxId('wxID_CONSTRAINTADD', 'wxID_EQUIVADD', 'wxID_HOLDADD', 'wxID_FUNCTADD', 'wxID_ADDRIDING',
    48064806          'wxID_CONSPHASE', 'wxID_CONSHIST', 'wxID_CONSHAP', 'wxID_CONSGLOBAL', 'wxID_EQUIVALANCEATOMS',)
    48074807       
    4808         Define_wxId('wxID_SELECTPHASE', 'wxID_PWDHKLPLOT', 'wxID_PWD3DHKLPLOT', 'wxID_3DALLHKLPLOT', 'wxID_MERGEHKL',)
    4809        
    4810         Define_wxId('wxID_MCRON', 'wxID_MCRLIST', 'wxID_MCRSAVE', 'wxID_MCRPLAY',)
    4811 
    4812         Define_wxId('wxID_PWDRADD', 'wxID_HKLFADD', 'wxID_PWDANALYSIS', 'wxID_PWDCOPY', 'wxID_PLOTCTRLCOPY',
     4808        G2G.Define_wxId('wxID_SELECTPHASE', 'wxID_PWDHKLPLOT', 'wxID_PWD3DHKLPLOT', 'wxID_3DALLHKLPLOT', 'wxID_MERGEHKL',)
     4809       
     4810        G2G.Define_wxId('wxID_MCRON', 'wxID_MCRLIST', 'wxID_MCRSAVE', 'wxID_MCRPLAY',)
     4811
     4812        G2G.Define_wxId('wxID_PWDRADD', 'wxID_HKLFADD', 'wxID_PWDANALYSIS', 'wxID_PWDCOPY', 'wxID_PLOTCTRLCOPY',
    48134813            'wxID_DATADELETE', 'wxID_DATACOPY', 'wxID_DATACOPYFLAGS', 'wxID_DATASELCOPY', 'wxID_DATAUSE',)
    48144814
    4815         Define_wxId('wxID_FOURCALC', 'wxID_FOURSEARCH', 'wxID_FOURCLEAR', 'wxID_PEAKSMOVE', 'wxID_PEAKSCLEAR',
     4815        G2G.Define_wxId('wxID_FOURCALC', 'wxID_FOURSEARCH', 'wxID_FOURCLEAR', 'wxID_PEAKSMOVE', 'wxID_PEAKSCLEAR',
    48164816            'wxID_CHARGEFLIP', 'wxID_PEAKSUNIQUE', 'wxID_PEAKSDELETE', 'wxID_PEAKSDA',
    48174817            'wxID_PEAKSDISTVP', 'wxID_PEAKSVIEWPT', 'wxID_FINDEQVPEAKS', 'wxID_SHOWBONDS', 'wxID_MULTIMCSA',
     
    48464846        self.ConstraintMenu.Append(menu=self.ConstraintTab, title='Select tab')
    48474847        for id,txt in (
    4848             (wxID_CONSPHASE,'Phase'),
    4849             (wxID_CONSHAP,'Histogram/Phase'),
    4850             (wxID_CONSHIST,'Histogram'),
    4851             (wxID_CONSGLOBAL,'Global')):
     4848            (G2G.wxID_CONSPHASE,'Phase'),
     4849            (G2G.wxID_CONSHAP,'Histogram/Phase'),
     4850            (G2G.wxID_CONSHIST,'Histogram'),
     4851            (G2G.wxID_CONSGLOBAL,'Global')):
    48524852            self.ConstraintTab.Append(
    48534853                id=id, kind=wx.ITEM_NORMAL,text=txt,
     
    48554855        self.ConstraintEdit = wx.Menu(title='')
    48564856        self.ConstraintMenu.Append(menu=self.ConstraintEdit, title='Edit Constr.') # renamed from Edit due to Mac adding extra items to menu
    4857         self.ConstraintEdit.Append(id=wxID_HOLDADD, kind=wx.ITEM_NORMAL,text='Add hold',
     4857        self.ConstraintEdit.Append(id=G2G.wxID_HOLDADD, kind=wx.ITEM_NORMAL,text='Add hold',
    48584858            help='Prevent refinement of parameter values')
    4859         self.ConstraintEdit.Append(id=wxID_EQUIVADD, kind=wx.ITEM_NORMAL,text='Add equivalence',
     4859        self.ConstraintEdit.Append(id=G2G.wxID_EQUIVADD, kind=wx.ITEM_NORMAL,text='Add equivalence',
    48604860            help='Force parameter values to be equivalent')
    4861         self.ConstraintEdit.Append(id=wxID_CONSTRAINTADD, kind=wx.ITEM_NORMAL,text='Add constraint equation',
     4861        self.ConstraintEdit.Append(id=G2G.wxID_CONSTRAINTADD, kind=wx.ITEM_NORMAL,text='Add constraint equation',
    48624862            help='Add a constraint equation to apply to parameter values')
    4863         self.ConstraintEdit.Append(id=wxID_FUNCTADD, kind=wx.ITEM_NORMAL,text='Add New Var',
     4863        self.ConstraintEdit.Append(id=G2G.wxID_FUNCTADD, kind=wx.ITEM_NORMAL,text='Add New Var',
    48644864            help='Create a variable composed of existing parameters')
    4865         self.ConstraintEdit.Append(id=wxID_EQUIVALANCEATOMS, kind=wx.ITEM_NORMAL,text='Make atoms equivalent',
     4865        self.ConstraintEdit.Append(id=G2G.wxID_EQUIVALANCEATOMS, kind=wx.ITEM_NORMAL,text='Make atoms equivalent',
    48664866            help='Force atom parameter values to be equivalent')
    4867         self.ConstraintEdit.Enable(wxID_EQUIVALANCEATOMS,False)
    4868 #        self.ConstraintEdit.Append(id=wxID_ADDRIDING, kind=wx.ITEM_NORMAL,text='Add H riding constraints',
     4867        self.ConstraintEdit.Enable(G2G.wxID_EQUIVALANCEATOMS,False)
     4868#        self.ConstraintEdit.Append(id=G2G.wxID_ADDRIDING, kind=wx.ITEM_NORMAL,text='Add H riding constraints',
    48694869#            help='Add H atom riding constraints between atom parameter values')
    4870 #        self.ConstraintEdit.Enable(wxID_ADDRIDING,False)
     4870#        self.ConstraintEdit.Enable(G2G.wxID_ADDRIDING,False)
    48714871        self.PostfillDataMenu()
    48724872
     
    48804880
    48814881        # Rigid bodies
    4882         Define_wxId('wxID_RIGIDBODYADD', 'wxID_DRAWDEFINERB', 'wxID_RIGIDBODYIMPORT', 'wxID_RESIDUETORSSEQ',
     4882        G2G.Define_wxId('wxID_RIGIDBODYADD', 'wxID_DRAWDEFINERB', 'wxID_RIGIDBODYIMPORT', 'wxID_RESIDUETORSSEQ',
    48834883            'wxID_AUTOFINDRESRB', 'wxID_GLOBALRESREFINE', 'wxID_RBREMOVEALL', 'wxID_COPYRBPARMS',
    48844884            'wxID_GLOBALTHERM', 'wxID_VECTORBODYADD')
     
    48874887        self.PrefillDataMenu(self.RigidBodyMenu)
    48884888        self.ResidueRBMenu = wx.Menu(title='')
    4889         self.ResidueRBMenu.Append(id=wxID_RIGIDBODYIMPORT, kind=wx.ITEM_NORMAL,text='Import XYZ',
     4889        self.ResidueRBMenu.Append(id=G2G.wxID_RIGIDBODYIMPORT, kind=wx.ITEM_NORMAL,text='Import XYZ',
    48904890            help='Import rigid body XYZ from file')
    4891         self.ResidueRBMenu.Append(id=wxID_RESIDUETORSSEQ, kind=wx.ITEM_NORMAL,text='Define sequence',
     4891        self.ResidueRBMenu.Append(id=G2G.wxID_RESIDUETORSSEQ, kind=wx.ITEM_NORMAL,text='Define sequence',
    48924892            help='Define torsion sequence')
    4893         self.ResidueRBMenu.Append(id=wxID_RIGIDBODYADD, kind=wx.ITEM_NORMAL,text='Import residues',
     4893        self.ResidueRBMenu.Append(id=G2G.wxID_RIGIDBODYADD, kind=wx.ITEM_NORMAL,text='Import residues',
    48944894            help='Import residue rigid bodies from macro file')
    48954895        self.RigidBodyMenu.Append(menu=self.ResidueRBMenu, title='Edit Body')
     
    48994899        self.PrefillDataMenu(self.VectorBodyMenu)
    49004900        self.VectorRBEdit = wx.Menu(title='')
    4901         self.VectorRBEdit.Append(id=wxID_VECTORBODYADD, kind=wx.ITEM_NORMAL,text='Add rigid body',
     4901        self.VectorRBEdit.Append(id=G2G.wxID_VECTORBODYADD, kind=wx.ITEM_NORMAL,text='Add rigid body',
    49024902            help='Add vector rigid body')
    49034903        self.VectorBodyMenu.Append(menu=self.VectorRBEdit, title='Edit Vector Body')
     
    49054905
    49064906        # Restraints
    4907         Define_wxId('wxID_RESTRAINTADD', 'wxID_RESTSELPHASE', 'wxID_RESTDELETE', 'wxID_RESRCHANGEVAL',
     4907        G2G.Define_wxId('wxID_RESTRAINTADD', 'wxID_RESTSELPHASE', 'wxID_RESTDELETE', 'wxID_RESRCHANGEVAL',
    49084908            'wxID_RESTCHANGEESD', 'wxID_AARESTRAINTADD', 'wxID_AARESTRAINTPLOT',)
    49094909
    49104910        self.RestraintTab = wx.Menu(title='')
    49114911        self.RestraintEdit = wx.Menu(title='')
    4912         self.RestraintEdit.Append(id=wxID_RESTSELPHASE, kind=wx.ITEM_NORMAL,text='Select phase',
     4912        self.RestraintEdit.Append(id=G2G.wxID_RESTSELPHASE, kind=wx.ITEM_NORMAL,text='Select phase',
    49134913            help='Select phase')
    4914         self.RestraintEdit.Append(id=wxID_RESTRAINTADD, kind=wx.ITEM_NORMAL,text='Add restraints',
     4914        self.RestraintEdit.Append(id=G2G.wxID_RESTRAINTADD, kind=wx.ITEM_NORMAL,text='Add restraints',
    49154915            help='Add restraints')
    4916         self.RestraintEdit.Enable(wxID_RESTRAINTADD,True)    #gets disabled if macromolecule phase
    4917         self.RestraintEdit.Append(id=wxID_AARESTRAINTADD, kind=wx.ITEM_NORMAL,text='Add residue restraints',
     4916        self.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,True)    #gets disabled if macromolecule phase
     4917        self.RestraintEdit.Append(id=G2G.wxID_AARESTRAINTADD, kind=wx.ITEM_NORMAL,text='Add residue restraints',
    49184918            help='Add residue based restraints for macromolecules from macro file')
    4919         self.RestraintEdit.Enable(wxID_AARESTRAINTADD,False)    #gets enabled if macromolecule phase
    4920         self.RestraintEdit.Append(id=wxID_AARESTRAINTPLOT, kind=wx.ITEM_NORMAL,text='Plot residue restraints',
     4919        self.RestraintEdit.Enable(G2G.wxID_AARESTRAINTADD,False)    #gets enabled if macromolecule phase
     4920        self.RestraintEdit.Append(id=G2G.wxID_AARESTRAINTPLOT, kind=wx.ITEM_NORMAL,text='Plot residue restraints',
    49214921            help='Plot selected residue based restraints for macromolecules from macro file')
    4922         self.RestraintEdit.Enable(wxID_AARESTRAINTPLOT,False)    #gets enabled if macromolecule phase
    4923         self.RestraintEdit.Append(id=wxID_RESRCHANGEVAL, kind=wx.ITEM_NORMAL,text='Change value',
     4922        self.RestraintEdit.Enable(G2G.wxID_AARESTRAINTPLOT,False)    #gets enabled if macromolecule phase
     4923        self.RestraintEdit.Append(id=G2G.wxID_RESRCHANGEVAL, kind=wx.ITEM_NORMAL,text='Change value',
    49244924            help='Change observed value')
    4925         self.RestraintEdit.Append(id=wxID_RESTCHANGEESD, kind=wx.ITEM_NORMAL,text='Change esd',
     4925        self.RestraintEdit.Append(id=G2G.wxID_RESTCHANGEESD, kind=wx.ITEM_NORMAL,text='Change esd',
    49264926            help='Change esd in observed value')
    4927         self.RestraintEdit.Append(id=wxID_RESTDELETE, kind=wx.ITEM_NORMAL,text='Delete restraints',
     4927        self.RestraintEdit.Append(id=G2G.wxID_RESTDELETE, kind=wx.ITEM_NORMAL,text='Delete restraints',
    49284928            help='Delete selected restraints')
    49294929
     
    49354935           
    49364936        # Sequential results
    4937         Define_wxId('wxID_RENAMESEQSEL', 'wxID_SAVESEQSEL', 'wxID_SAVESEQCSV', 'wxID_SAVESEQSELCSV', 'wxID_PLOTSEQSEL',
    4938           'wxID_ORGSEQSEL', 'wxADDSEQVAR', 'wxDELSEQVAR', 'wxEDITSEQVAR', 'wxCOPYPARFIT', 'wxID_AVESEQSEL',
    4939           'wxADDPARFIT', 'wxDELPARFIT', 'wxEDITPARFIT', 'wxDOPARFIT', 'wxADDSEQDIST', 'wxADDSEQANGLE', 'wxID_ORGSEQINC',)
     4937        G2G.Define_wxId('wxID_RENAMESEQSEL', 'wxID_SAVESEQSEL', 'wxID_SAVESEQCSV', 'wxID_SAVESEQSELCSV', 'wxID_PLOTSEQSEL',
     4938          'wxID_ORGSEQSEL', 'wxID_ADDSEQVAR', 'wxID_DELSEQVAR', 'wxID_EDITSEQVAR', 'wxID_COPYPARFIT', 'wxID_AVESEQSEL',
     4939          'wxID_ADDPARFIT', 'wxID_DELPARFIT', 'wxID_EDITPARFIT', 'wxID_DOPARFIT', 'wxID_ADDSEQDIST', 'wxID_ADDSEQANGLE', 'wxID_ORGSEQINC',)
    49404940
    49414941        self.SequentialMenu = wx.MenuBar()
     
    49434943        self.SequentialFile = wx.Menu(title='')
    49444944        self.SequentialMenu.Append(menu=self.SequentialFile, title='Columns')
    4945         self.SequentialFile.Append(id=wxID_RENAMESEQSEL, kind=wx.ITEM_NORMAL,text='Rename selected',
     4945        self.SequentialFile.Append(id=G2G.wxID_RENAMESEQSEL, kind=wx.ITEM_NORMAL,text='Rename selected',
    49464946            help='Rename selected sequential refinement columns')
    4947         self.SequentialFile.Append(id=wxID_SAVESEQSEL, kind=wx.ITEM_NORMAL,text='Save selected as text',
     4947        self.SequentialFile.Append(id=G2G.wxID_SAVESEQSEL, kind=wx.ITEM_NORMAL,text='Save selected as text',
    49484948            help='Save selected sequential refinement results as a text file')
    4949         self.SequentialFile.Append(id=wxID_SAVESEQCSV, kind=wx.ITEM_NORMAL,text='Save all as CSV',
     4949        self.SequentialFile.Append(id=G2G.wxID_SAVESEQCSV, kind=wx.ITEM_NORMAL,text='Save all as CSV',
    49504950            help='Save all sequential refinement results as a CSV spreadsheet file')
    4951         self.SequentialFile.Append(id=wxID_SAVESEQSELCSV, kind=wx.ITEM_NORMAL,text='Save selected as CSV',
     4951        self.SequentialFile.Append(id=G2G.wxID_SAVESEQSELCSV, kind=wx.ITEM_NORMAL,text='Save selected as CSV',
    49524952            help='Save selected sequential refinement results as a CSV spreadsheet file')
    4953         self.SequentialFile.Append(id=wxID_PLOTSEQSEL, kind=wx.ITEM_NORMAL,text='Plot selected',
     4953        self.SequentialFile.Append(id=G2G.wxID_PLOTSEQSEL, kind=wx.ITEM_NORMAL,text='Plot selected',
    49544954            help='Plot selected sequential refinement results')
    4955         self.SequentialFile.Append(id=wxID_AVESEQSEL, kind=wx.ITEM_NORMAL,text='Compute average',
     4955        self.SequentialFile.Append(id=G2G.wxID_AVESEQSEL, kind=wx.ITEM_NORMAL,text='Compute average',
    49564956            help='Compute average for selected parameter')           
    4957 #        self.SequentialFile.Append(id=wxID_ORGSEQSEL, kind=wx.ITEM_NORMAL,text='Reorganize',
     4957#        self.SequentialFile.Append(id=G2G.wxID_ORGSEQSEL, kind=wx.ITEM_NORMAL,text='Reorganize',
    49584958#            help='Reorganize variables where variables change')
    4959         self.SequentialFile.Append(id=wxID_ORGSEQINC, kind=wx.ITEM_NORMAL,text='Hide columns...',
     4959        self.SequentialFile.Append(id=G2G.wxID_ORGSEQINC, kind=wx.ITEM_NORMAL,text='Hide columns...',
    49604960            help='Select columns to remove from displayed table')
    49614961        self.SequentialPvars = wx.Menu(title='')
    49624962        self.SequentialMenu.Append(menu=self.SequentialPvars, title='Pseudo Vars')
    49634963        self.SequentialPvars.Append(
    4964             id=wxADDSEQVAR, kind=wx.ITEM_NORMAL,text='Add Formula',
     4964            id=G2G.wxID_ADDSEQVAR, kind=wx.ITEM_NORMAL,text='Add Formula',
    49654965            help='Add a new custom pseudo-variable')
    49664966        self.SequentialPvars.Append(
    4967             id=wxADDSEQDIST, kind=wx.ITEM_NORMAL,text='Add Distance',
     4967            id=G2G.wxID_ADDSEQDIST, kind=wx.ITEM_NORMAL,text='Add Distance',
    49684968            help='Add a new bond distance pseudo-variable')
    49694969        self.SequentialPvars.Append(
    4970             id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Add Angle',
     4970            id=G2G.wxID_ADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Add Angle',
    49714971            help='Add a new bond angle pseudo-variable')
    49724972        self.SequentialPvars.Append(
    4973             id=wxDELSEQVAR, kind=wx.ITEM_NORMAL,text='Delete',
     4973            id=G2G.wxID_DELSEQVAR, kind=wx.ITEM_NORMAL,text='Delete',
    49744974            help='Delete an existing pseudo-variable')
    49754975        self.SequentialPvars.Append(
    4976             id=wxEDITSEQVAR, kind=wx.ITEM_NORMAL,text='Edit',
     4976            id=G2G.wxID_EDITSEQVAR, kind=wx.ITEM_NORMAL,text='Edit',
    49774977            help='Edit an existing pseudo-variable')
    49784978
     
    49804980        self.SequentialMenu.Append(menu=self.SequentialPfit, title='Parametric Fit')
    49814981        self.SequentialPfit.Append(
    4982             id=wxADDPARFIT, kind=wx.ITEM_NORMAL,text='Add equation',
     4982            id=G2G.wxID_ADDPARFIT, kind=wx.ITEM_NORMAL,text='Add equation',
    49834983            help='Add a new equation to minimize')
    49844984        self.SequentialPfit.Append(
    4985             id=wxCOPYPARFIT, kind=wx.ITEM_NORMAL,text='Copy equation',
     4985            id=G2G.wxID_COPYPARFIT, kind=wx.ITEM_NORMAL,text='Copy equation',
    49864986            help='Copy an equation to minimize - edit it next')
    49874987        self.SequentialPfit.Append(
    4988             id=wxDELPARFIT, kind=wx.ITEM_NORMAL,text='Delete equation',
     4988            id=G2G.wxID_DELPARFIT, kind=wx.ITEM_NORMAL,text='Delete equation',
    49894989            help='Delete an equation for parametric minimization')
    49904990        self.SequentialPfit.Append(
    4991             id=wxEDITPARFIT, kind=wx.ITEM_NORMAL,text='Edit equation',
     4991            id=G2G.wxID_EDITPARFIT, kind=wx.ITEM_NORMAL,text='Edit equation',
    49924992            help='Edit an existing parametric minimization equation')
    49934993        self.SequentialPfit.Append(
    4994             id=wxDOPARFIT, kind=wx.ITEM_NORMAL,text='Fit to equation(s)',
     4994            id=G2G.wxID_DOPARFIT, kind=wx.ITEM_NORMAL,text='Fit to equation(s)',
    49954995            help='Perform a parametric minimization')
    49964996        # fill sequential Export menu
     
    50345034        self.ErrorAnal = wx.Menu(title='')
    50355035        self.PWDRMenu.Append(menu=self.ErrorAnal,title='Commands')
    5036         self.ErrorAnal.Append(id=wxID_PWDANALYSIS,kind=wx.ITEM_NORMAL,text='Error Analysis',
     5036        self.ErrorAnal.Append(id=G2G.wxID_PWDANALYSIS,kind=wx.ITEM_NORMAL,text='Error Analysis',
    50375037            help='Error analysis on powder pattern')
    5038         self.ErrorAnal.Append(id=wxID_PWDCOPY,kind=wx.ITEM_NORMAL,text='Copy params',
     5038        self.ErrorAnal.Append(id=G2G.wxID_PWDCOPY,kind=wx.ITEM_NORMAL,text='Copy params',
    50395039            help='Copy of PWDR parameters')
    5040         self.ErrorAnal.Append(id=wxID_PLOTCTRLCOPY,kind=wx.ITEM_NORMAL,text='Copy plot controls',
     5040        self.ErrorAnal.Append(id=G2G.wxID_PLOTCTRLCOPY,kind=wx.ITEM_NORMAL,text='Copy plot controls',
    50415041            help='Copy of PWDR plot controls')
    50425042        self.moveDiffCurve = self.ErrorAnal.Append(id=wx.ID_ANY,kind=wx.ITEM_NORMAL,text='Move diff. curve',
     
    50535053        self.ErrorAnal = wx.Menu(title='')
    50545054        self.HKLFMenu.Append(menu=self.ErrorAnal,title='Commands')
    5055         self.ErrorAnal.Append(id=wxID_PWDANALYSIS,kind=wx.ITEM_NORMAL,text='Error Analysis',
     5055        self.ErrorAnal.Append(id=G2G.wxID_PWDANALYSIS,kind=wx.ITEM_NORMAL,text='Error Analysis',
    50565056            help='Error analysis on single crystal data')
    5057         self.ErrorAnal.Append(id=wxID_MERGEHKL,kind=wx.ITEM_NORMAL,text='Merge HKLs',
     5057        self.ErrorAnal.Append(id=G2G.wxID_MERGEHKL,kind=wx.ITEM_NORMAL,text='Merge HKLs',
    50585058            help='Transform & merge HKLF data to new histogram')
    5059         self.ErrorAnal.Append(id=wxID_PWD3DHKLPLOT,kind=wx.ITEM_NORMAL,text='Plot 3D HKLs',
     5059        self.ErrorAnal.Append(id=G2G.wxID_PWD3DHKLPLOT,kind=wx.ITEM_NORMAL,text='Plot 3D HKLs',
    50605060            help='Plot HKLs from single crystal data in 3D')
    5061         self.ErrorAnal.Append(id=wxID_3DALLHKLPLOT,kind=wx.ITEM_NORMAL,text='Plot all 3D HKLs',
     5061        self.ErrorAnal.Append(id=G2G.wxID_3DALLHKLPLOT,kind=wx.ITEM_NORMAL,text='Plot all 3D HKLs',
    50625062            help='Plot HKLs from all single crystal data in 3D')
    5063         self.ErrorAnal.Append(id=wxID_PWDCOPY,kind=wx.ITEM_NORMAL,text='Copy params',
     5063        self.ErrorAnal.Append(id=G2G.wxID_PWDCOPY,kind=wx.ITEM_NORMAL,text='Copy params',
    50645064            help='Copy of HKLF parameters')
    50655065        self.PostfillDataMenu()
     
    50705070        self.LimitEdit = wx.Menu(title='')
    50715071        self.LimitMenu.Append(menu=self.LimitEdit, title='Edit Limits')
    5072         self.LimitEdit.Append(id=wxID_LIMITCOPY, kind=wx.ITEM_NORMAL,text='Copy',
     5072        self.LimitEdit.Append(id=G2G.wxID_LIMITCOPY, kind=wx.ITEM_NORMAL,text='Copy',
    50735073            help='Copy limits to other histograms')
    5074         self.LimitEdit.Append(id=wxID_ADDEXCLREGION, kind=wx.ITEM_NORMAL,text='Add exclude',
     5074        self.LimitEdit.Append(id=G2G.wxID_ADDEXCLREGION, kind=wx.ITEM_NORMAL,text='Add exclude',
    50755075            help='Add excluded region - select a point on plot; drag to adjust')           
    50765076        self.PostfillDataMenu()
     
    50815081        self.BackEdit = wx.Menu(title='')
    50825082        self.BackMenu.Append(menu=self.BackEdit, title='File')
    5083         self.BackEdit.Append(id=wxID_BACKCOPY, kind=wx.ITEM_NORMAL,text='Copy',
     5083        self.BackEdit.Append(id=G2G.wxID_BACKCOPY, kind=wx.ITEM_NORMAL,text='Copy',
    50845084            help='Copy background parameters to other histograms')
    5085         self.BackEdit.Append(id=wxID_BACKFLAGCOPY, kind=wx.ITEM_NORMAL,text='Copy flags',
     5085        self.BackEdit.Append(id=G2G.wxID_BACKFLAGCOPY, kind=wx.ITEM_NORMAL,text='Copy flags',
    50865086            help='Copy background refinement flags to other histograms')
    5087         self.BackEdit.Append(id=wxID_PEAKSMOVE, kind=wx.ITEM_NORMAL,text='Move peaks',
     5087        self.BackEdit.Append(id=G2G.wxID_PEAKSMOVE, kind=wx.ITEM_NORMAL,text='Move peaks',
    50885088            help='Move background peaks to Peak List')
    5089         self.BackEdit.Append(id=wxID_MAKEBACKRDF, kind=wx.ITEM_NORMAL,text='Plot RDF',
     5089        self.BackEdit.Append(id=G2G.wxID_MAKEBACKRDF, kind=wx.ITEM_NORMAL,text='Plot RDF',
    50905090            help='Plot radial distribution from differences')
    50915091        self.BackFixed = wx.Menu(title='') # fixed background point menu
     
    51165116        self.InstMenu.Append(menu=self.InstEdit, title='Operations')
    51175117        self.InstEdit.Append(help='Calibrate from indexed peaks',
    5118             id=wxID_INSTCALIB, kind=wx.ITEM_NORMAL,text='Calibrate')           
     5118            id=G2G.wxID_INSTCALIB, kind=wx.ITEM_NORMAL,text='Calibrate')           
    51195119        self.InstEdit.Append(help='Reset instrument profile parameters to default',
    5120             id=wxID_INSTPRMRESET, kind=wx.ITEM_NORMAL,text='Reset profile')           
     5120            id=G2G.wxID_INSTPRMRESET, kind=wx.ITEM_NORMAL,text='Reset profile')           
    51215121        self.InstEdit.Append(help='Load instrument profile parameters from file',
    5122             id=wxID_INSTLOAD, kind=wx.ITEM_NORMAL,text='Load profile...')           
     5122            id=G2G.wxID_INSTLOAD, kind=wx.ITEM_NORMAL,text='Load profile...')           
    51235123        self.InstEdit.Append(help='Save instrument profile parameters to file',
    5124             id=wxID_INSTSAVE, kind=wx.ITEM_NORMAL,text='Save profile...')
     5124            id=G2G.wxID_INSTSAVE, kind=wx.ITEM_NORMAL,text='Save profile...')
    51255125        self.InstEdit.Append(help='Save all instrument profile parameters to one file',
    5126             id=wxID_INSTSAVEALL, kind=wx.ITEM_NORMAL,text='Save all profile...')           
     5126            id=G2G.wxID_INSTSAVEALL, kind=wx.ITEM_NORMAL,text='Save all profile...')           
    51275127        self.InstEdit.Append(help='Copy instrument profile parameters to other histograms',
    5128             id=wxID_INSTCOPY, kind=wx.ITEM_NORMAL,text='Copy')
    5129         self.InstEdit.Append(id=wxID_INSTFLAGCOPY, kind=wx.ITEM_NORMAL,text='Copy flags',
     5128            id=G2G.wxID_INSTCOPY, kind=wx.ITEM_NORMAL,text='Copy')
     5129        self.InstEdit.Append(id=G2G.wxID_INSTFLAGCOPY, kind=wx.ITEM_NORMAL,text='Copy flags',
    51305130            help='Copy instrument parameter refinement flags to other histograms')
    51315131#        self.InstEdit.Append(help='Change radiation type (Ka12 - synch)',
    5132 #            id=wxID_CHANGEWAVETYPE, kind=wx.ITEM_NORMAL,text='Change radiation')
    5133         self.InstEdit.Append(id=wxID_INST1VAL, kind=wx.ITEM_NORMAL,text='Set one value',
     5132#            id=G2G.wxID_CHANGEWAVETYPE, kind=wx.ITEM_NORMAL,text='Change radiation')
     5133        self.InstEdit.Append(id=G2G.wxID_INST1VAL, kind=wx.ITEM_NORMAL,text='Set one value',
    51345134            help='Set one instrument parameter value across multiple histograms')
    51355135        self.PostfillDataMenu()
     
    51405140        self.SampleEdit = wx.Menu(title='')
    51415141        self.SampleMenu.Append(menu=self.SampleEdit, title='Command')
    5142         self.SetScale = self.SampleEdit.Append(id=wxID_SETSCALE, kind=wx.ITEM_NORMAL,text='Set scale',
     5142        self.SetScale = self.SampleEdit.Append(id=G2G.wxID_SETSCALE, kind=wx.ITEM_NORMAL,text='Set scale',
    51435143            help='Set scale by matching to another histogram')
    5144         self.SampleEdit.Append(id=wxID_SAMPLELOAD, kind=wx.ITEM_NORMAL,text='Load',
     5144        self.SampleEdit.Append(id=G2G.wxID_SAMPLELOAD, kind=wx.ITEM_NORMAL,text='Load',
    51455145            help='Load sample parameters from file')
    5146         self.SampleEdit.Append(id=wxID_SAMPLESAVE, kind=wx.ITEM_NORMAL,text='Save',
     5146        self.SampleEdit.Append(id=G2G.wxID_SAMPLESAVE, kind=wx.ITEM_NORMAL,text='Save',
    51475147            help='Save sample parameters to file')
    5148         self.SampleEdit.Append(id=wxID_SAMPLECOPY, kind=wx.ITEM_NORMAL,text='Copy',
     5148        self.SampleEdit.Append(id=G2G.wxID_SAMPLECOPY, kind=wx.ITEM_NORMAL,text='Copy',
    51495149            help='Copy refinable and most other sample parameters to other histograms')
    5150         self.SampleEdit.Append(id=wxID_SAMPLECOPYSOME, kind=wx.ITEM_NORMAL,text='Copy selected...',
     5150        self.SampleEdit.Append(id=G2G.wxID_SAMPLECOPYSOME, kind=wx.ITEM_NORMAL,text='Copy selected...',
    51515151            help='Copy selected sample parameters to other histograms')
    5152         self.SampleEdit.Append(id=wxID_SAMPLEFLAGCOPY, kind=wx.ITEM_NORMAL,text='Copy flags',
     5152        self.SampleEdit.Append(id=G2G.wxID_SAMPLEFLAGCOPY, kind=wx.ITEM_NORMAL,text='Copy flags',
    51535153            help='Copy sample parameter refinement flags to other histograms')
    5154         self.SampleEdit.Append(id=wxID_SAMPLE1VAL, kind=wx.ITEM_NORMAL,text='Set one value',
     5154        self.SampleEdit.Append(id=G2G.wxID_SAMPLE1VAL, kind=wx.ITEM_NORMAL,text='Set one value',
    51555155            help='Set one sample parameter value across multiple histograms')
    5156         self.SampleEdit.Append(id=wxID_ALLSAMPLELOAD, kind=wx.ITEM_NORMAL,text='Load all',
     5156        self.SampleEdit.Append(id=G2G.wxID_ALLSAMPLELOAD, kind=wx.ITEM_NORMAL,text='Load all',
    51575157            help='Load sample parmameters over multiple histograms')
    5158         self.SampleEdit.Append(id=wxID_RESCALEALL, kind=wx.ITEM_NORMAL,text='Rescale all',
     5158        self.SampleEdit.Append(id=G2G.wxID_RESCALEALL, kind=wx.ITEM_NORMAL,text='Rescale all',
    51595159            help='Rescale all data with selected range')
    51605160        self.PostfillDataMenu()
     
    51755175            text='Set all ref flags...')
    51765176        self.AutoSearch = self.PeakEdit.Append(help='Automatic peak search',
    5177             id=wxID_AUTOSEARCH, kind=wx.ITEM_NORMAL,text='Auto search')
     5177            id=G2G.wxID_AUTOSEARCH, kind=wx.ITEM_NORMAL,text='Auto search')
    51785178        self.UnDo = self.PeakEdit.Append(help='Undo last least squares refinement',
    5179             id=wxID_UNDO, kind=wx.ITEM_NORMAL,text='UnDo')
    5180         self.PeakFit = self.PeakEdit.Append(id=wxID_LSQPEAKFIT, kind=wx.ITEM_NORMAL,text='Peakfit',
     5179            id=G2G.wxID_UNDO, kind=wx.ITEM_NORMAL,text='UnDo')
     5180        self.PeakFit = self.PeakEdit.Append(id=G2G.wxID_LSQPEAKFIT, kind=wx.ITEM_NORMAL,text='Peakfit',
    51815181            help='Peak fitting' )
    5182         self.PFOneCycle = self.PeakEdit.Append(id=wxID_LSQONECYCLE, kind=wx.ITEM_NORMAL,text='Peakfit one cycle',
     5182        self.PFOneCycle = self.PeakEdit.Append(id=G2G.wxID_LSQONECYCLE, kind=wx.ITEM_NORMAL,text='Peakfit one cycle',
    51835183            help='One cycle of Peak fitting' )
    5184         self.PeakEdit.Append(id=wxID_RESETSIGGAM, kind=wx.ITEM_NORMAL,
     5184        self.PeakEdit.Append(id=G2G.wxID_RESETSIGGAM, kind=wx.ITEM_NORMAL,
    51855185            text='Reset sig and gam',help='Reset sigma and gamma to global fit' )
    51865186        self.PeakCopy = self.PeakEdit.Append(help='Copy peaks to other histograms',
    5187             id=wxID_PEAKSCOPY, kind=wx.ITEM_NORMAL,text='Peak copy')
    5188         self.SeqPeakFit = self.PeakEdit.Append(id=wxID_SEQPEAKFIT, kind=wx.ITEM_NORMAL,text='Seq PeakFit',
     5187            id=G2G.wxID_PEAKSCOPY, kind=wx.ITEM_NORMAL,text='Peak copy')
     5188        self.SeqPeakFit = self.PeakEdit.Append(id=G2G.wxID_SEQPEAKFIT, kind=wx.ITEM_NORMAL,text='Seq PeakFit',
    51895189            help='Sequential Peak fitting for all histograms' )
    5190         self.PeakEdit.Append(id=wxID_CLEARPEAKS, kind=wx.ITEM_NORMAL,text='Clear peaks',
     5190        self.PeakEdit.Append(id=G2G.wxID_CLEARPEAKS, kind=wx.ITEM_NORMAL,text='Clear peaks',
    51915191            help='Clear the peak list' )
    51925192        self.movePeak = self.PeakEdit.Append(id=wx.ID_ANY,kind=wx.ITEM_NORMAL,text='Move selected peak',
     
    52035203        self.IndPeaksEdit = wx.Menu(title='')
    52045204        self.IndPeaksMenu.Append(menu=self.IndPeaksEdit,title='Operations')
    5205         self.IndPeaksEdit.Append(help='Load/Reload index peaks from peak list',id=wxID_INDXRELOAD,
     5205        self.IndPeaksEdit.Append(help='Load/Reload index peaks from peak list',id=G2G.wxID_INDXRELOAD,
    52065206            kind=wx.ITEM_NORMAL,text='Load/Reload')
    52075207        self.PostfillDataMenu()
     
    52125212        self.IndexEdit = wx.Menu(title='')
    52135213        self.IndexMenu.Append(menu=self.IndexEdit, title='Cell Index/Refine')
    5214         self.IndexPeaks = self.IndexEdit.Append(help='', id=wxID_INDEXPEAKS, kind=wx.ITEM_NORMAL,
     5214        self.IndexPeaks = self.IndexEdit.Append(help='', id=G2G.wxID_INDEXPEAKS, kind=wx.ITEM_NORMAL,
    52155215            text='Index Cell')
    5216         self.CopyCell = self.IndexEdit.Append( id=wxID_COPYCELL, kind=wx.ITEM_NORMAL,text='Copy Cell',
     5216        self.CopyCell = self.IndexEdit.Append( id=G2G.wxID_COPYCELL, kind=wx.ITEM_NORMAL,text='Copy Cell',
    52175217            help='Copy selected unit cell from indexing to cell refinement fields')
    5218         self.RefineCell = self.IndexEdit.Append( id=wxID_REFINECELL, kind=wx.ITEM_NORMAL,
     5218        self.RefineCell = self.IndexEdit.Append( id=G2G.wxID_REFINECELL, kind=wx.ITEM_NORMAL,
    52195219            text='Refine Cell',help='Refine unit cell parameters from indexed peaks')
    5220         self.MakeNewPhase = self.IndexEdit.Append( id=wxID_MAKENEWPHASE, kind=wx.ITEM_NORMAL,
     5220        self.MakeNewPhase = self.IndexEdit.Append( id=G2G.wxID_MAKENEWPHASE, kind=wx.ITEM_NORMAL,
    52215221            text='Make new phase',help='Make new phase from selected unit cell')
    5222         self.ExportCells = self.IndexEdit.Append( id=wxID_EXPORTCELLS, kind=wx.ITEM_NORMAL,
     5222        self.ExportCells = self.IndexEdit.Append( id=G2G.wxID_EXPORTCELLS, kind=wx.ITEM_NORMAL,
    52235223            text='Export cell list',help='Export cell list to csv file')
    52245224        self.PostfillDataMenu()
     
    52335233        self.ReflEdit = wx.Menu(title='')
    52345234        self.ReflMenu.Append(menu=self.ReflEdit, title='Reflection List')
    5235         self.SelectPhase = self.ReflEdit.Append(help='Select phase for reflection list',id=wxID_SELECTPHASE,
     5235        self.SelectPhase = self.ReflEdit.Append(help='Select phase for reflection list',id=G2G.wxID_SELECTPHASE,
    52365236            kind=wx.ITEM_NORMAL,text='Select phase')
    5237         self.ReflEdit.Append(id=wxID_PWDHKLPLOT,kind=wx.ITEM_NORMAL,text='Plot HKLs',
     5237        self.ReflEdit.Append(id=G2G.wxID_PWDHKLPLOT,kind=wx.ITEM_NORMAL,text='Plot HKLs',
    52385238            help='Plot HKLs from powder pattern')
    5239         self.ReflEdit.Append(id=wxID_PWD3DHKLPLOT,kind=wx.ITEM_NORMAL,text='Plot 3D HKLs',
     5239        self.ReflEdit.Append(id=G2G.wxID_PWD3DHKLPLOT,kind=wx.ITEM_NORMAL,text='Plot 3D HKLs',
    52405240            help='Plot HKLs from powder pattern in 3D')
    52415241        self.PostfillDataMenu()
     
    52475247        self.SASDInstMenu.Append(menu=self.SASDInstEdit, title='Operations')
    52485248        self.InstEdit.Append(help='Reset instrument profile parameters to default',
    5249             id=wxID_INSTPRMRESET, kind=wx.ITEM_NORMAL,text='Reset profile')
     5249            id=G2G.wxID_INSTPRMRESET, kind=wx.ITEM_NORMAL,text='Reset profile')
    52505250        self.SASDInstEdit.Append(help='Copy instrument profile parameters to other histograms',
    5251             id=wxID_INSTCOPY, kind=wx.ITEM_NORMAL,text='Copy')
     5251            id=G2G.wxID_INSTCOPY, kind=wx.ITEM_NORMAL,text='Copy')
    52525252        self.PostfillDataMenu()
    52535253       
    52545254        #SASD & REFL/ Substance editor
    5255         Define_wxId('wxID_MODELCOPY', 'wxID_MODELFIT', 'wxID_MODELADD', 'wxID_ELEMENTADD', 'wxID_ELEMENTDELETE',
     5255        G2G.Define_wxId('wxID_MODELCOPY', 'wxID_MODELFIT', 'wxID_MODELADD', 'wxID_ELEMENTADD', 'wxID_ELEMENTDELETE',
    52565256            'wxID_ADDSUBSTANCE', 'wxID_LOADSUBSTANCE', 'wxID_DELETESUBSTANCE', 'wxID_COPYSUBSTANCE',
    52575257            'wxID_MODELUNDO', 'wxID_MODELFITALL', 'wxID_MODELCOPYFLAGS', 'wxID_RELOADSUBSTANCES',
     
    52625262        self.SubstanceEdit = wx.Menu(title='')
    52635263        self.SubstanceMenu.Append(menu=self.SubstanceEdit, title='Edit substance')
    5264         self.SubstanceEdit.Append(id=wxID_LOADSUBSTANCE, kind=wx.ITEM_NORMAL,text='Load substance',
     5264        self.SubstanceEdit.Append(id=G2G.wxID_LOADSUBSTANCE, kind=wx.ITEM_NORMAL,text='Load substance',
    52655265            help='Load substance from file')
    5266         self.SubstanceEdit.Append(id=wxID_RELOADSUBSTANCES, kind=wx.ITEM_NORMAL,text='Reload substances',
     5266        self.SubstanceEdit.Append(id=G2G.wxID_RELOADSUBSTANCES, kind=wx.ITEM_NORMAL,text='Reload substances',
    52675267            help='Reload all substances from file')
    5268         self.SubstanceEdit.Append(id=wxID_ADDSUBSTANCE, kind=wx.ITEM_NORMAL,text='Add substance',
     5268        self.SubstanceEdit.Append(id=G2G.wxID_ADDSUBSTANCE, kind=wx.ITEM_NORMAL,text='Add substance',
    52695269            help='Add new substance to list')
    5270         self.SubstanceEdit.Append(id=wxID_COPYSUBSTANCE, kind=wx.ITEM_NORMAL,text='Copy substances',
     5270        self.SubstanceEdit.Append(id=G2G.wxID_COPYSUBSTANCE, kind=wx.ITEM_NORMAL,text='Copy substances',
    52715271            help='Copy substances')
    5272         self.SubstanceEdit.Append(id=wxID_DELETESUBSTANCE, kind=wx.ITEM_NORMAL,text='Delete substance',
     5272        self.SubstanceEdit.Append(id=G2G.wxID_DELETESUBSTANCE, kind=wx.ITEM_NORMAL,text='Delete substance',
    52735273            help='Delete substance from list')           
    5274         self.SubstanceEdit.Append(id=wxID_ELEMENTADD, kind=wx.ITEM_NORMAL,text='Add elements',
     5274        self.SubstanceEdit.Append(id=G2G.wxID_ELEMENTADD, kind=wx.ITEM_NORMAL,text='Add elements',
    52755275            help='Add elements to substance')
    5276         self.SubstanceEdit.Append(id=wxID_ELEMENTDELETE, kind=wx.ITEM_NORMAL,text='Delete elements',
     5276        self.SubstanceEdit.Append(id=G2G.wxID_ELEMENTDELETE, kind=wx.ITEM_NORMAL,text='Delete elements',
    52775277            help='Delete elements from substance')
    52785278        self.PostfillDataMenu()
     
    52835283        self.ModelEdit = wx.Menu(title='')
    52845284        self.ModelMenu.Append(menu=self.ModelEdit, title='Models')
    5285         self.ModelEdit.Append(id=wxID_MODELADD,kind=wx.ITEM_NORMAL,text='Add',
     5285        self.ModelEdit.Append(id=G2G.wxID_MODELADD,kind=wx.ITEM_NORMAL,text='Add',
    52865286            help='Add new term to model')
    5287         self.ModelEdit.Append(id=wxID_MODELFIT, kind=wx.ITEM_NORMAL,text='Fit',
     5287        self.ModelEdit.Append(id=G2G.wxID_MODELFIT, kind=wx.ITEM_NORMAL,text='Fit',
    52885288            help='Fit model parameters to data')
    5289         self.SasdUndo = self.ModelEdit.Append(id=wxID_MODELUNDO, kind=wx.ITEM_NORMAL,text='Undo',
     5289        self.SasdUndo = self.ModelEdit.Append(id=G2G.wxID_MODELUNDO, kind=wx.ITEM_NORMAL,text='Undo',
    52905290            help='Undo model fit')
    52915291        self.SasdUndo.Enable(False)           
    5292         self.ModelEdit.Append(id=wxID_MODELFITALL, kind=wx.ITEM_NORMAL,text='Sequential fit',
     5292        self.ModelEdit.Append(id=G2G.wxID_MODELFITALL, kind=wx.ITEM_NORMAL,text='Sequential fit',
    52935293            help='Sequential fit of model parameters to all SASD data')
    5294         self.ModelEdit.Append(id=wxID_MODELCOPY, kind=wx.ITEM_NORMAL,text='Copy',
     5294        self.ModelEdit.Append(id=G2G.wxID_MODELCOPY, kind=wx.ITEM_NORMAL,text='Copy',
    52955295            help='Copy model parameters to other histograms')
    5296         self.ModelEdit.Append(id=wxID_MODELCOPYFLAGS, kind=wx.ITEM_NORMAL,text='Copy flags',
     5296        self.ModelEdit.Append(id=G2G.wxID_MODELCOPYFLAGS, kind=wx.ITEM_NORMAL,text='Copy flags',
    52975297            help='Copy model refinement flags to other histograms')
    52985298        self.PostfillDataMenu()
     
    53035303        self.REFDModelEdit = wx.Menu(title='')
    53045304        self.REFDModelMenu.Append(menu=self.REFDModelEdit, title='Models')
    5305         self.REFDModelEdit.Append(id=wxID_MODELFIT, kind=wx.ITEM_NORMAL,text='Fit',
     5305        self.REFDModelEdit.Append(id=G2G.wxID_MODELFIT, kind=wx.ITEM_NORMAL,text='Fit',
    53065306            help='Fit model parameters to data')
    5307         self.REFDUndo = self.REFDModelEdit.Append(id=wxID_MODELUNDO, kind=wx.ITEM_NORMAL,text='Undo',
     5307        self.REFDUndo = self.REFDModelEdit.Append(id=G2G.wxID_MODELUNDO, kind=wx.ITEM_NORMAL,text='Undo',
    53085308            help='Undo model fit')
    53095309        self.REFDUndo.Enable(False)           
    5310         self.REFDModelEdit.Append(id=wxID_MODELFITALL, kind=wx.ITEM_NORMAL,text='Sequential fit',
     5310        self.REFDModelEdit.Append(id=G2G.wxID_MODELFITALL, kind=wx.ITEM_NORMAL,text='Sequential fit',
    53115311            help='Sequential fit of model parameters to all REFD data')
    5312         self.REFDModelEdit.Append(id=wxID_MODELCOPY, kind=wx.ITEM_NORMAL,text='Copy',
     5312        self.REFDModelEdit.Append(id=G2G.wxID_MODELCOPY, kind=wx.ITEM_NORMAL,text='Copy',
    53135313            help='Copy model parameters to other histograms')
    5314         self.REFDModelEdit.Append(id=wxID_MODELPLOT, kind=wx.ITEM_NORMAL,text='Plot',
     5314        self.REFDModelEdit.Append(id=G2G.wxID_MODELPLOT, kind=wx.ITEM_NORMAL,text='Plot',
    53155315            help='Plot model SDL for selected histograms')
    53165316        self.PostfillDataMenu()
    53175317
    53185318        # IMG / Image Controls
    5319         Define_wxId('wxID_IMCALIBRATE', 'wxID_IMRECALIBRATE', 'wxID_IMINTEGRATE', 'wxID_IMCLEARCALIB', 'wxID_IMRECALIBALL',
     5319        G2G.Define_wxId('wxID_IMCALIBRATE', 'wxID_IMRECALIBRATE', 'wxID_IMINTEGRATE', 'wxID_IMCLEARCALIB', 'wxID_IMRECALIBALL',
    53205320            'wxID_IMCOPYCONTROLS', 'wxID_INTEGRATEALL', 'wxID_IMSAVECONTROLS', 'wxID_IMLOADCONTROLS', 'wxID_IMAUTOINTEG',
    53215321            'wxID_IMCOPYSELECTED', 'wxID_SAVESELECTEDCONTROLS', 'wxID_IMXFERCONTROLS', 'wxID_IMRESETDIST',)
     
    53265326        self.ImageMenu.Append(menu=self.ImageEdit, title='Calibration')
    53275327        self.ImageEdit.Append(help='Calibrate detector by fitting to calibrant lines',
    5328             id=wxID_IMCALIBRATE, kind=wx.ITEM_NORMAL,text='Calibrate')
     5328            id=G2G.wxID_IMCALIBRATE, kind=wx.ITEM_NORMAL,text='Calibrate')
    53295329        self.ImageEdit.Append(help='Recalibrate detector by fitting to calibrant lines',
    5330             id=wxID_IMRECALIBRATE, kind=wx.ITEM_NORMAL,text='Recalibrate')
     5330            id=G2G.wxID_IMRECALIBRATE, kind=wx.ITEM_NORMAL,text='Recalibrate')
    53315331        self.ImageEdit.Append(help='Recalibrate all images by fitting to calibrant lines',
    5332             id=wxID_IMRECALIBALL, kind=wx.ITEM_NORMAL,text='Recalibrate all')           
     5332            id=G2G.wxID_IMRECALIBALL, kind=wx.ITEM_NORMAL,text='Recalibrate all')           
    53335333        self.ImageEdit.Append(help='Clear calibration data points and rings',
    5334             id=wxID_IMCLEARCALIB, kind=wx.ITEM_NORMAL,text='Clear calibration')
     5334            id=G2G.wxID_IMCLEARCALIB, kind=wx.ITEM_NORMAL,text='Clear calibration')
    53355335       
    53365336        ImageIntegrate = wx.Menu(title='')
    53375337        self.ImageMenu.Append(menu=ImageIntegrate, title='Integration')
    5338         ImageIntegrate.Append(help='Integrate selected image',id=wxID_IMINTEGRATE,
     5338        ImageIntegrate.Append(help='Integrate selected image',id=G2G.wxID_IMINTEGRATE,
    53395339            kind=wx.ITEM_NORMAL,text='Integrate')
    5340         ImageIntegrate.Append(help='Integrate all images selected from list',id=wxID_INTEGRATEALL,
     5340        ImageIntegrate.Append(help='Integrate all images selected from list',id=G2G.wxID_INTEGRATEALL,
    53415341            kind=wx.ITEM_NORMAL,text='Integrate all')
    53425342        ImageIntegrate.Append(help='Open Auto-integration window to integrate a series of images',
    5343             id=wxID_IMAUTOINTEG, kind=wx.ITEM_NORMAL,text='Auto Integrate')
     5343            id=G2G.wxID_IMAUTOINTEG, kind=wx.ITEM_NORMAL,text='Auto Integrate')
    53445344
    53455345        ImageParams = wx.Menu(title='')
    53465346        self.ImageMenu.Append(menu=ImageParams, title='Parms')
    53475347        ImageParams.Append(help='Copy image controls to other images',
    5348             id=wxID_IMCOPYCONTROLS, kind=wx.ITEM_NORMAL,text='Copy Controls')
     5348            id=G2G.wxID_IMCOPYCONTROLS, kind=wx.ITEM_NORMAL,text='Copy Controls')
    53495349        ImageParams.Append(help='Copy selected image controls to other images',
    5350             id=wxID_IMCOPYSELECTED, kind=wx.ITEM_NORMAL,text='Copy Selected')
     5350            id=G2G.wxID_IMCOPYSELECTED, kind=wx.ITEM_NORMAL,text='Copy Selected')
    53515351        ImageParams.Append(help='Save image controls to file',
    5352             id=wxID_IMSAVECONTROLS, kind=wx.ITEM_NORMAL,text='Save Controls')
     5352            id=G2G.wxID_IMSAVECONTROLS, kind=wx.ITEM_NORMAL,text='Save Controls')
    53535353        ImageParams.Append(help='Save controls from selected images to file',
    5354             id=wxID_SAVESELECTEDCONTROLS, kind=wx.ITEM_NORMAL,text='Save Multiple Controls')
     5354            id=G2G.wxID_SAVESELECTEDCONTROLS, kind=wx.ITEM_NORMAL,text='Save Multiple Controls')
    53555355        ImageParams.Append(help='Load image controls from file',
    5356             id=wxID_IMLOADCONTROLS, kind=wx.ITEM_NORMAL,text='Load Controls')
     5356            id=G2G.wxID_IMLOADCONTROLS, kind=wx.ITEM_NORMAL,text='Load Controls')
    53575357        ImageParams.Append(help='Transfer integration range for other detector distances',
    5358             id=wxID_IMXFERCONTROLS, kind=wx.ITEM_NORMAL,text='Xfer angles')
     5358            id=G2G.wxID_IMXFERCONTROLS, kind=wx.ITEM_NORMAL,text='Xfer angles')
    53595359        ImageParams.Append(help='Reset all detector dist to set dist',
    5360             id=wxID_IMRESETDIST, kind=wx.ITEM_NORMAL,text='Reset dist')
     5360            id=G2G.wxID_IMRESETDIST, kind=wx.ITEM_NORMAL,text='Reset dist')
    53615361       
    53625362        self.PostfillDataMenu()
    53635363           
    53645364        # IMG / Masks
    5365         Define_wxId('wxID_MASKCOPY', 'wxID_MASKSAVE', 'wxID_MASKLOAD', 'wxID_NEWMASKSPOT', 'wxID_NEWMASKARC', 'wxID_NEWMASKRING',
     5365        G2G.Define_wxId('wxID_MASKCOPY', 'wxID_MASKSAVE', 'wxID_MASKLOAD', 'wxID_NEWMASKSPOT', 'wxID_NEWMASKARC', 'wxID_NEWMASKRING',
    53665366            'wxID_NEWMASKFRAME', 'wxID_NEWMASKPOLY', 'wxID_MASKLOADNOT', 'wxID_FINDSPOTS', 'wxID_DELETESPOTS',)
    53675367
     
    53765376            )
    53775377        self.MaskEdit.Append(help='Copy mask to other images',
    5378             id=wxID_MASKCOPY, kind=wx.ITEM_NORMAL,text='Copy mask')
     5378            id=G2G.wxID_MASKCOPY, kind=wx.ITEM_NORMAL,text='Copy mask')
    53795379        self.MaskEdit.Append(help='Save mask to file',
    5380             id=wxID_MASKSAVE, kind=wx.ITEM_NORMAL,text='Save mask')
     5380            id=G2G.wxID_MASKSAVE, kind=wx.ITEM_NORMAL,text='Save mask')
    53815381        self.MaskEdit.Append(help='Load mask from file; ignoring threshold',
    5382             id=wxID_MASKLOADNOT, kind=wx.ITEM_NORMAL,text='Load mask')
     5382            id=G2G.wxID_MASKLOADNOT, kind=wx.ITEM_NORMAL,text='Load mask')
    53835383        self.MaskEdit.Append(help='Load mask from file keeping the threshold value',
    5384             id=wxID_MASKLOAD, kind=wx.ITEM_NORMAL,text='Load mask w/threshold')
     5384            id=G2G.wxID_MASKLOAD, kind=wx.ITEM_NORMAL,text='Load mask w/threshold')
    53855385        self.MaskEdit.Append(help='Auto search for spot masks; NB: will clear old spot masks',
    5386             id=wxID_FINDSPOTS, kind=wx.ITEM_NORMAL,text='Auto spot masks')
     5386            id=G2G.wxID_FINDSPOTS, kind=wx.ITEM_NORMAL,text='Auto spot masks')
    53875387        self.MaskEdit.Append(help='Delete all spot masks',
    5388             id=wxID_DELETESPOTS, kind=wx.ITEM_NORMAL,text='Delete spot masks')       
     5388            id=G2G.wxID_DELETESPOTS, kind=wx.ITEM_NORMAL,text='Delete spot masks')       
    53895389        submenu.Append(help='Create an arc mask with mouse input',
    5390             id=wxID_NEWMASKARC, kind=wx.ITEM_NORMAL,text='Arc mask')
     5390            id=G2G.wxID_NEWMASKARC, kind=wx.ITEM_NORMAL,text='Arc mask')
    53915391        submenu.Append(help='Create a frame mask with mouse input',
    5392             id=wxID_NEWMASKFRAME, kind=wx.ITEM_NORMAL,text='Frame mask')
     5392            id=G2G.wxID_NEWMASKFRAME, kind=wx.ITEM_NORMAL,text='Frame mask')
    53935393        submenu.Append(help='Create a polygon mask with mouse input',
    5394             id=wxID_NEWMASKPOLY, kind=wx.ITEM_NORMAL,text='Polygon mask')
     5394            id=G2G.wxID_NEWMASKPOLY, kind=wx.ITEM_NORMAL,text='Polygon mask')
    53955395        submenu.Append(help='Create a ring mask with mouse input',
    5396             id=wxID_NEWMASKRING, kind=wx.ITEM_NORMAL,text='Ring mask')
     5396            id=G2G.wxID_NEWMASKRING, kind=wx.ITEM_NORMAL,text='Ring mask')
    53975397        submenu.Append(help='Create spot masks with mouse input',
    5398             id=wxID_NEWMASKSPOT, kind=wx.ITEM_NORMAL,text='Spot mask')
     5398            id=G2G.wxID_NEWMASKSPOT, kind=wx.ITEM_NORMAL,text='Spot mask')
    53995399        self.PostfillDataMenu()
    54005400           
    54015401        # IMG / Stress/Strain
    5402         Define_wxId('wxID_STRSTACOPY', 'wxID_STRSTAFIT', 'wxID_STRSTASAVE', 'wxID_STRSTALOAD', 'wxID_STRSTSAMPLE',
     5402        G2G.Define_wxId('wxID_STRSTACOPY', 'wxID_STRSTAFIT', 'wxID_STRSTASAVE', 'wxID_STRSTALOAD', 'wxID_STRSTSAMPLE',
    54035403            'wxID_APPENDDZERO', 'wxID_STRSTAALLFIT', 'wxID_UPDATEDZERO', 'wxID_STRSTAPLOT', 'wxID_STRRINGSAVE',)
    54045404       
     
    54085408        self.StrStaMenu.Append(menu=self.StrStaEdit, title='Operations')
    54095409        self.StrStaEdit.Append(help='Append d-zero for one ring',
    5410             id=wxID_APPENDDZERO, kind=wx.ITEM_NORMAL,text='Append d-zero')
     5410            id=G2G.wxID_APPENDDZERO, kind=wx.ITEM_NORMAL,text='Append d-zero')
    54115411        self.StrStaEdit.Append(help='Fit stress/strain data',
    5412             id=wxID_STRSTAFIT, kind=wx.ITEM_NORMAL,text='Fit stress/strain')
     5412            id=G2G.wxID_STRSTAFIT, kind=wx.ITEM_NORMAL,text='Fit stress/strain')
    54135413        self.StrStaEdit.Append(help='Plot intensity distribution',
    5414             id=wxID_STRSTAPLOT, kind=wx.ITEM_NORMAL,text='Plot intensity distribution')
     5414            id=G2G.wxID_STRSTAPLOT, kind=wx.ITEM_NORMAL,text='Plot intensity distribution')
    54155415        self.StrStaEdit.Append(help='Save intensity distribution',
    5416             id=wxID_STRRINGSAVE, kind=wx.ITEM_NORMAL,text='Save intensity distribution')
     5416            id=G2G.wxID_STRRINGSAVE, kind=wx.ITEM_NORMAL,text='Save intensity distribution')
    54175417        self.StrStaEdit.Append(help='Update d-zero from ave d-zero',
    5418             id=wxID_UPDATEDZERO, kind=wx.ITEM_NORMAL,text='Update d-zero')       
     5418            id=G2G.wxID_UPDATEDZERO, kind=wx.ITEM_NORMAL,text='Update d-zero')       
    54195419        self.StrStaEdit.Append(help='Fit stress/strain data for all images',
    5420             id=wxID_STRSTAALLFIT, kind=wx.ITEM_NORMAL,text='All image fit')
     5420            id=G2G.wxID_STRSTAALLFIT, kind=wx.ITEM_NORMAL,text='All image fit')
    54215421        self.StrStaEdit.Append(help='Copy stress/strain data to other images',
    5422             id=wxID_STRSTACOPY, kind=wx.ITEM_NORMAL,text='Copy stress/strain')
     5422            id=G2G.wxID_STRSTACOPY, kind=wx.ITEM_NORMAL,text='Copy stress/strain')
    54235423        self.StrStaEdit.Append(help='Save stress/strain data to file',
    5424             id=wxID_STRSTASAVE, kind=wx.ITEM_NORMAL,text='Save stress/strain')
     5424            id=G2G.wxID_STRSTASAVE, kind=wx.ITEM_NORMAL,text='Save stress/strain')
    54255425        self.StrStaEdit.Append(help='Load stress/strain data from file',
    5426             id=wxID_STRSTALOAD, kind=wx.ITEM_NORMAL,text='Load stress/strain')
     5426            id=G2G.wxID_STRSTALOAD, kind=wx.ITEM_NORMAL,text='Load stress/strain')
    54275427        self.StrStaEdit.Append(help='Load sample data from file',
    5428             id=wxID_STRSTSAMPLE, kind=wx.ITEM_NORMAL,text='Load sample data')
     5428            id=G2G.wxID_STRSTSAMPLE, kind=wx.ITEM_NORMAL,text='Load sample data')
    54295429        self.PostfillDataMenu()
    54305430           
    54315431        # PDF / PDF Controls
    5432         Define_wxId('wxID_PDFCOPYCONTROLS', 'wxID_PDFSAVECONTROLS', 'wxID_PDFLOADCONTROLS', 'wxID_PDFCOMPUTE',
     5432        G2G.Define_wxId('wxID_PDFCOPYCONTROLS', 'wxID_PDFSAVECONTROLS', 'wxID_PDFLOADCONTROLS', 'wxID_PDFCOMPUTE',
    54335433            'wxID_PDFCOMPUTEALL', 'wxID_PDFADDELEMENT', 'wxID_PDFDELELEMENT', 'wxID_PDFPKSFIT',
    54345434            'wxID_PDFPKSFITALL', 'wxID_PDFCOPYPEAKS', 'wxID_CLEARPDFPEAKS',)
     
    54385438        self.PDFEdit = wx.Menu(title='')
    54395439        self.PDFMenu.Append(menu=self.PDFEdit, title='PDF Controls')
    5440         self.PDFEdit.Append(help='Add one or more elements to sample composition',id=wxID_PDFADDELEMENT, kind=wx.ITEM_NORMAL,
     5440        self.PDFEdit.Append(help='Add one or more elements to sample composition',id=G2G.wxID_PDFADDELEMENT, kind=wx.ITEM_NORMAL,
    54415441            text='Add elements')
    5442         self.PDFEdit.Append(help='Delete element from sample composition',id=wxID_PDFDELELEMENT, kind=wx.ITEM_NORMAL,
     5442        self.PDFEdit.Append(help='Delete element from sample composition',id=G2G.wxID_PDFDELELEMENT, kind=wx.ITEM_NORMAL,
    54435443            text='Delete element')
    5444         self.PDFEdit.Append(help='Copy PDF controls', id=wxID_PDFCOPYCONTROLS, kind=wx.ITEM_NORMAL,
     5444        self.PDFEdit.Append(help='Copy PDF controls', id=G2G.wxID_PDFCOPYCONTROLS, kind=wx.ITEM_NORMAL,
    54455445            text='Copy controls')
    5446         self.PDFEdit.Append(help='Load PDF controls from file',id=wxID_PDFLOADCONTROLS, kind=wx.ITEM_NORMAL,
     5446        self.PDFEdit.Append(help='Load PDF controls from file',id=G2G.wxID_PDFLOADCONTROLS, kind=wx.ITEM_NORMAL,
    54475447            text='Load Controls')
    5448         self.PDFEdit.Append(help='Save PDF controls to file', id=wxID_PDFSAVECONTROLS, kind=wx.ITEM_NORMAL,
     5448        self.PDFEdit.Append(help='Save PDF controls to file', id=G2G.wxID_PDFSAVECONTROLS, kind=wx.ITEM_NORMAL,
    54495449            text='Save controls')
    5450         self.PDFEdit.Append(help='Compute PDF', id=wxID_PDFCOMPUTE, kind=wx.ITEM_NORMAL,
     5450        self.PDFEdit.Append(help='Compute PDF', id=G2G.wxID_PDFCOMPUTE, kind=wx.ITEM_NORMAL,
    54515451            text='Compute PDF')
    54525452        self.PDFEdit.Append(help='Compute all PDFs with or w/o optimization',
    5453                             id=wxID_PDFCOMPUTEALL, kind=wx.ITEM_NORMAL,
     5453                            id=G2G.wxID_PDFCOMPUTEALL, kind=wx.ITEM_NORMAL,
    54545454            text='Compute all PDFs')
    5455 #        self.PDFEdit.Append(help='Optimize PDF', id=wxID_PDFOPT, kind=wx.ITEM_NORMAL,
     5455#        self.PDFEdit.Append(help='Optimize PDF', id=G2G.wxID_PDFOPT, kind=wx.ITEM_NORMAL,
    54565456#            text='Optimize corrections for r<Rmin section of current G(r)')
    54575457        self.PostfillDataMenu()
     
    54625462        self.PDFPksEdit = wx.Menu(title='')
    54635463        self.PDFPksMenu.Append(menu=self.PDFPksEdit, title='PDF Peaks')
    5464         self.PDFPksEdit.Append(help='Fit PDF peaks', id=wxID_PDFPKSFIT, kind=wx.ITEM_NORMAL,
     5464        self.PDFPksEdit.Append(help='Fit PDF peaks', id=G2G.wxID_PDFPKSFIT, kind=wx.ITEM_NORMAL,
    54655465            text='PDF peak fit')
    5466         self.PDFPksEdit.Append(help='Sequential Peak fitting for all PDFs', id=wxID_PDFPKSFITALL, kind=wx.ITEM_NORMAL,
     5466        self.PDFPksEdit.Append(help='Sequential Peak fitting for all PDFs', id=G2G.wxID_PDFPKSFITALL, kind=wx.ITEM_NORMAL,
    54675467            text='Seq PDF peak fit')
    5468         self.PDFPksEdit.Append(help='Copy PDF peaks', id=wxID_PDFCOPYPEAKS, kind=wx.ITEM_NORMAL,
     5468        self.PDFPksEdit.Append(help='Copy PDF peaks', id=G2G.wxID_PDFCOPYPEAKS, kind=wx.ITEM_NORMAL,
    54695469            text='Copy peaks')
    5470         self.PDFPksEdit.Append(help='Clear PDF peaks', id=wxID_CLEARPDFPEAKS, kind=wx.ITEM_NORMAL,
     5470        self.PDFPksEdit.Append(help='Clear PDF peaks', id=G2G.wxID_CLEARPDFPEAKS, kind=wx.ITEM_NORMAL,
    54715471            text='Clear peaks')       
    54725472        self.PostfillDataMenu()
     
    54785478        self.GeneralCalc = wx.Menu(title='')
    54795479        self.DataGeneral.Append(menu=self.GeneralCalc,title='Compute')
    5480         self.GeneralCalc.Append(help='Compute Fourier map',id=wxID_FOURCALC, kind=wx.ITEM_NORMAL,
     5480        self.GeneralCalc.Append(help='Compute Fourier map',id=G2G.wxID_FOURCALC, kind=wx.ITEM_NORMAL,
    54815481            text='Fourier map')
    5482         self.GeneralCalc.Append(help='Search Fourier map',id=wxID_FOURSEARCH, kind=wx.ITEM_NORMAL,
     5482        self.GeneralCalc.Append(help='Search Fourier map',id=G2G.wxID_FOURSEARCH, kind=wx.ITEM_NORMAL,
    54835483            text='Search map')
    5484         self.GeneralCalc.Append(help='Run charge flipping',id=wxID_CHARGEFLIP, kind=wx.ITEM_NORMAL,
     5484        self.GeneralCalc.Append(help='Run charge flipping',id=G2G.wxID_CHARGEFLIP, kind=wx.ITEM_NORMAL,
    54855485            text='Charge flipping')
    5486         self.GeneralCalc.Append(help='Run 4D charge flipping',id=wxID_4DCHARGEFLIP, kind=wx.ITEM_NORMAL,
     5486        self.GeneralCalc.Append(help='Run 4D charge flipping',id=G2G.wxID_4DCHARGEFLIP, kind=wx.ITEM_NORMAL,
    54875487            text='4D Charge flipping')
    5488         self.GeneralCalc.Enable(wxID_4DCHARGEFLIP,False)   
    5489         self.GeneralCalc.Append(help='Clear map',id=wxID_FOURCLEAR, kind=wx.ITEM_NORMAL,
     5488        self.GeneralCalc.Enable(G2G.wxID_4DCHARGEFLIP,False)   
     5489        self.GeneralCalc.Append(help='Clear map',id=G2G.wxID_FOURCLEAR, kind=wx.ITEM_NORMAL,
    54905490            text='Clear map')
    5491         self.GeneralCalc.Append(help='Run Monte Carlo - Simulated Annealing',id=wxID_SINGLEMCSA, kind=wx.ITEM_NORMAL,
     5491        self.GeneralCalc.Append(help='Run Monte Carlo - Simulated Annealing',id=G2G.wxID_SINGLEMCSA, kind=wx.ITEM_NORMAL,
    54925492            text='MC/SA')
    5493         self.GeneralCalc.Append(help='Run Monte Carlo - Simulated Annealing on multiprocessors',id=wxID_MULTIMCSA, kind=wx.ITEM_NORMAL,
     5493        self.GeneralCalc.Append(help='Run Monte Carlo - Simulated Annealing on multiprocessors',id=G2G.wxID_MULTIMCSA, kind=wx.ITEM_NORMAL,
    54945494            text='Multi MC/SA')            #currently not useful
    5495         self.GeneralCalc.Append(help='Transform crystal structure',id=wxID_TRANSFORMSTRUCTURE, kind=wx.ITEM_NORMAL,
     5495        self.GeneralCalc.Append(help='Transform crystal structure',id=G2G.wxID_TRANSFORMSTRUCTURE, kind=wx.ITEM_NORMAL,
    54965496            text='Transform')
    54975497        self.PostfillDataMenu()
     
    55035503        self.DataEdit = wx.Menu(title='')
    55045504        self.DataMenu.Append(menu=self.DataEdit, title='Edit Phase')
    5505         self.DataEdit.Append(id=wxID_DATACOPY, kind=wx.ITEM_NORMAL,text='Copy data',
     5505        self.DataEdit.Append(id=G2G.wxID_DATACOPY, kind=wx.ITEM_NORMAL,text='Copy data',
    55065506            help='Copy phase data to other histograms')
    5507         self.DataEdit.Append(id=wxID_DATACOPYFLAGS, kind=wx.ITEM_NORMAL,text='Copy flags',
     5507        self.DataEdit.Append(id=G2G.wxID_DATACOPYFLAGS, kind=wx.ITEM_NORMAL,text='Copy flags',
    55085508            help='Copy phase data flags to other histograms')
    5509         self.DataEdit.Append(id=wxID_DATASELCOPY, kind=wx.ITEM_NORMAL,text='Copy selected data',
     5509        self.DataEdit.Append(id=G2G.wxID_DATASELCOPY, kind=wx.ITEM_NORMAL,text='Copy selected data',
    55105510            help='Copy selected phase data to other histograms')
    5511         self.DataEdit.Append(id=wxID_DATAUSE, kind=wx.ITEM_NORMAL,text='Select used data',
     5511        self.DataEdit.Append(id=G2G.wxID_DATAUSE, kind=wx.ITEM_NORMAL,text='Select used data',
    55125512            help='Select all histograms to use')
    5513         self.DataEdit.Append(id=wxID_PWDRADD, kind=wx.ITEM_NORMAL,text='Add powder histograms',
     5513        self.DataEdit.Append(id=G2G.wxID_PWDRADD, kind=wx.ITEM_NORMAL,text='Add powder histograms',
    55145514            help='Select new powder histograms to be used for this phase')
    5515         self.DataEdit.Append(id=wxID_HKLFADD, kind=wx.ITEM_NORMAL,text='Add single crystal histograms',
     5515        self.DataEdit.Append(id=G2G.wxID_HKLFADD, kind=wx.ITEM_NORMAL,text='Add single crystal histograms',
    55165516            help='Select new single crystal histograms to be used for this phase')
    5517         self.DataEdit.Append(id=wxID_DATADELETE, kind=wx.ITEM_NORMAL,text='Remove histograms',
     5517        self.DataEdit.Append(id=G2G.wxID_DATADELETE, kind=wx.ITEM_NORMAL,text='Remove histograms',
    55185518            help='Remove histograms from use for this phase')
    55195519        self.PostfillDataMenu()
    55205520           
    55215521        # Phase / Atoms tab
    5522         Define_wxId('wxID_ATOMSEDITADD', 'wxID_ATOMSEDITINSERT', 'wxID_ATOMSEDITDELETE',
     5522        G2G.Define_wxId('wxID_ATOMSEDITADD', 'wxID_ATOMSEDITINSERT', 'wxID_ATOMSEDITDELETE',
    55235523            'wxID_ATOMSMODIFY', 'wxID_ATOMSTRANSFORM', 'wxID_ATOMSVIEWADD', 'wxID_ATOMVIEWINSERT',
    55245524            'wxID_RELOADDRAWATOMS', 'wxID_ATOMSDISAGL', 'wxID_ATOMMOVE', 'wxID_MAKEMOLECULE',
     
    55375537        self.AtomEdit.AppendMenu(wx.ID_ANY, 'On selected atoms...', submenu,
    55385538            help='Set/Act on selected atoms')
    5539         submenu.Append(wxID_ATOMSSETSEL,
     5539        submenu.Append(G2G.wxID_ATOMSSETSEL,
    55405540            help='Set refinement flags for selected atoms',
    55415541            kind=wx.ITEM_NORMAL,
    55425542            text='Refine selected')
    5543         submenu.Append(id=wxID_ATOMSMODIFY, kind=wx.ITEM_NORMAL,text='Modify parameters',
     5543        submenu.Append(id=G2G.wxID_ATOMSMODIFY, kind=wx.ITEM_NORMAL,text='Modify parameters',
    55445544            help='Modify parameters values for all selected atoms')
    5545         submenu.Append(id=wxID_ATOMSEDITINSERT, kind=wx.ITEM_NORMAL,text='Insert atom',
     5545        submenu.Append(id=G2G.wxID_ATOMSEDITINSERT, kind=wx.ITEM_NORMAL,text='Insert atom',
    55465546            help='Inserts an H atom before all selected atoms')
    5547         submenu.Append(id=wxID_ADDHATOM, kind=wx.ITEM_NORMAL,text='Calc H atoms',
     5547        submenu.Append(id=G2G.wxID_ADDHATOM, kind=wx.ITEM_NORMAL,text='Calc H atoms',
    55485548            help='Insert H atoms in expected bonding positions for selected atoms')
    5549         submenu.Append(id=wxID_ATOMSEDITDELETE, kind=wx.ITEM_NORMAL,text='Delete atom',
     5549        submenu.Append(id=G2G.wxID_ATOMSEDITDELETE, kind=wx.ITEM_NORMAL,text='Delete atom',
    55505550            help='Delete selected atoms')
    5551         submenu.Append(id=wxID_ATOMSTRANSFORM, kind=wx.ITEM_NORMAL,text='Transform atoms',
     5551        submenu.Append(id=G2G.wxID_ATOMSTRANSFORM, kind=wx.ITEM_NORMAL,text='Transform atoms',
    55525552            help='Symmetry transform selected atoms')
    5553 #        self.AtomEdit.Append(id=wxID_ATOMSROTATE, kind=wx.ITEM_NORMAL,text='Rotate atoms',
     5553#        self.AtomEdit.Append(id=G2G.wxID_ATOMSROTATE, kind=wx.ITEM_NORMAL,text='Rotate atoms',
    55545554#            help='Select atoms to rotate first')
    5555         submenu.Append(wxID_ATOMSSETALL,
     5555        submenu.Append(G2G.wxID_ATOMSSETALL,
    55565556            help='Set refinement flags for all atoms',
    55575557            kind=wx.ITEM_NORMAL,
    55585558            text='Select All')
    55595559       
    5560         self.AtomEdit.Append(id=wxID_ATOMSEDITADD, kind=wx.ITEM_NORMAL,text='Append atom',
     5560        self.AtomEdit.Append(id=G2G.wxID_ATOMSEDITADD, kind=wx.ITEM_NORMAL,text='Append atom',
    55615561            help='Appended as an H atom')
    5562         self.AtomEdit.Append(id=wxID_ATOMSVIEWADD, kind=wx.ITEM_NORMAL,text='Append view point',
     5562        self.AtomEdit.Append(id=G2G.wxID_ATOMSVIEWADD, kind=wx.ITEM_NORMAL,text='Append view point',
    55635563            help='Appended as an H atom')
    5564         self.AtomEdit.Append(id=wxID_ATOMVIEWINSERT, kind=wx.ITEM_NORMAL,text='Insert view point',
     5564        self.AtomEdit.Append(id=G2G.wxID_ATOMVIEWINSERT, kind=wx.ITEM_NORMAL,text='Insert view point',
    55655565            help='Select atom row to insert before; inserted as an H atom')
    5566         self.AtomEdit.Append(id=wxID_UPDATEHATOM, kind=wx.ITEM_NORMAL,text='Update H atoms',
     5566        self.AtomEdit.Append(id=G2G.wxID_UPDATEHATOM, kind=wx.ITEM_NORMAL,text='Update H atoms',
    55675567            help='Update H atoms in standard positions')
    5568         self.AtomEdit.Append(id=wxID_ATOMMOVE, kind=wx.ITEM_NORMAL,text='Move selected atom to view point',
     5568        self.AtomEdit.Append(id=G2G.wxID_ATOMMOVE, kind=wx.ITEM_NORMAL,text='Move selected atom to view point',
    55695569            help='Select a single atom to be moved to view point in plot')
    5570         self.AtomEdit.Append(id=wxID_MAKEMOLECULE, kind=wx.ITEM_NORMAL,text='Assemble molecule',
     5570        self.AtomEdit.Append(id=G2G.wxID_MAKEMOLECULE, kind=wx.ITEM_NORMAL,text='Assemble molecule',
    55715571            help='Select a single atom to assemble as a molecule from scattered atom positions')
    5572         self.AtomEdit.Append(id=wxID_RELOADDRAWATOMS, kind=wx.ITEM_NORMAL,text='Reload draw atoms',
     5572        self.AtomEdit.Append(id=G2G.wxID_RELOADDRAWATOMS, kind=wx.ITEM_NORMAL,text='Reload draw atoms',
    55735573            help='Reload atom drawing list')
    55745574        submenu = wx.Menu()
     
    55895589        self.ReImportMenuId[item.GetId()] = None # try all readers
    55905590
    5591         self.AtomCompute.Append(id=wxID_ATOMSDISAGL, kind=wx.ITEM_NORMAL,text='Show Distances && Angles',
     5591        self.AtomCompute.Append(id=G2G.wxID_ATOMSDISAGL, kind=wx.ITEM_NORMAL,text='Show Distances && Angles',
    55925592            help='Compute distances & angles for selected atoms')
    5593         self.AtomCompute.Append(id=wxID_ATOMSPDISAGL, kind=wx.ITEM_NORMAL,text='Save Distances && Angles',
     5593        self.AtomCompute.Append(id=G2G.wxID_ATOMSPDISAGL, kind=wx.ITEM_NORMAL,text='Save Distances && Angles',
    55945594            help='Compute distances & angles for selected atoms')
    5595         self.AtomCompute.Append(id=wxID_ATOMSDENSITY, kind=wx.ITEM_NORMAL,
     5595        self.AtomCompute.Append(id=G2G.wxID_ATOMSDENSITY, kind=wx.ITEM_NORMAL,
    55965596            text='Density',help='Compute density for current phase')
    5597         self.AtomCompute.Append(id=wxID_VALIDPROTEIN, kind=wx.ITEM_NORMAL,
     5597        self.AtomCompute.Append(id=G2G.wxID_VALIDPROTEIN, kind=wx.ITEM_NORMAL,
    55985598            text='Protein quality',help='Protein quality analysis')
    5599         self.AtomCompute.ISOcalc = self.AtomCompute.Append(id=wxID_ISODISP, kind=wx.ITEM_NORMAL,
     5599        self.AtomCompute.ISOcalc = self.AtomCompute.Append(id=G2G.wxID_ISODISP, kind=wx.ITEM_NORMAL,
    56005600            text='ISODISTORT mode values',help='Compute values of ISODISTORT modes from atom parameters')
    56015601       
     
    56085608        self.WavesDataEdit = wx.Menu(title='')
    56095609        self.WavesData.Append(menu=self.WavesDataEdit, title='Edit Wave')
    5610         self.WavesDataEdit.Append(id=wxID_WAVEVARY, kind=wx.ITEM_NORMAL,text='Global wave vary',
     5610        self.WavesDataEdit.Append(id=G2G.wxID_WAVEVARY, kind=wx.ITEM_NORMAL,text='Global wave vary',
    56115611            help='Global setting of wave vary flags')
    56125612        self.PostfillDataMenu()
     
    56185618        self.LayerDataEdit = wx.Menu(title='')
    56195619        self.LayerData.Append(menu=self.LayerDataEdit, title='Operations')
    5620         self.LayerDataEdit.Append(id=wxID_LOADDIFFAX, kind=wx.ITEM_NORMAL,text='Load from DIFFaX file',
     5620        self.LayerDataEdit.Append(id=G2G.wxID_LOADDIFFAX, kind=wx.ITEM_NORMAL,text='Load from DIFFaX file',
    56215621            help='Load layer info from DIFFaX file')
    5622         self.LayerDataEdit.Append(id=wxID_COPYPHASE, kind=wx.ITEM_NORMAL,text='Copy phase cell',
     5622        self.LayerDataEdit.Append(id=G2G.wxID_COPYPHASE, kind=wx.ITEM_NORMAL,text='Copy phase cell',
    56235623            help='Copy phase cell from another project')
    5624         self.LayerDataEdit.Append(id=wxID_LAYERSIMULATE, kind=wx.ITEM_NORMAL,text='Simulate pattern',
     5624        self.LayerDataEdit.Append(id=G2G.wxID_LAYERSIMULATE, kind=wx.ITEM_NORMAL,text='Simulate pattern',
    56255625            help='Simulate diffraction pattern from layer stacking')
    5626         self.LayerDataEdit.Append(id=wxID_LAYERSFIT, kind=wx.ITEM_NORMAL,text='Fit pattern',
     5626        self.LayerDataEdit.Append(id=G2G.wxID_LAYERSFIT, kind=wx.ITEM_NORMAL,text='Fit pattern',
    56275627            help='Fit diffraction pattern with layer stacking model')
    5628         self.LayerDataEdit.Append(id=wxID_SEQUENCESIMULATE, kind=wx.ITEM_NORMAL,text='Sequence simulations',
     5628        self.LayerDataEdit.Append(id=G2G.wxID_SEQUENCESIMULATE, kind=wx.ITEM_NORMAL,text='Sequence simulations',
    56295629            help='Sequence simulation changing one parameter')
    56305630        self.PostfillDataMenu()
     
    56375637       
    56385638        # Phase / Draw Atoms tab
    5639         Define_wxId('wxID_DRAWATOMSTYLE', 'wxID_DRAWATOMLABEL', 'wxID_DRAWATOMCOLOR', 'wxID_DRAWATOMRESETCOLOR',
     5639        G2G.Define_wxId('wxID_DRAWATOMSTYLE', 'wxID_DRAWATOMLABEL', 'wxID_DRAWATOMCOLOR', 'wxID_DRAWATOMRESETCOLOR',
    56405640            'wxID_DRAWVIEWPOINT', 'wxID_DRAWTRANSFORM', 'wxID_DRAWDELETE', 'wxID_DRAWFILLCELL',
    56415641            'wxID_DRAWADDEQUIV', 'wxID_DRAWFILLCOORD', 'wxID_DRAWDISAGLTOR', ' wxID_DRAWPLANE',
    56425642            'wxID_DRAWDISTVP', 'wxID_DRAWADDSPHERE', 'wxID_DRWAEDITRADII',)
    5643         Define_wxId('wxID_DRAWRESTRBOND', 'wxID_DRAWRESTRANGLE', 'wxID_DRAWRESTRPLANE', 'wxID_DRAWRESTRCHIRAL',)
     5643        G2G.Define_wxId('wxID_DRAWRESTRBOND', 'wxID_DRAWRESTRANGLE', 'wxID_DRAWRESTRPLANE', 'wxID_DRAWRESTRCHIRAL',)
    56445644       
    56455645        self.DrawAtomsMenu = wx.MenuBar()
     
    56545654        self.DrawAtomsMenu.Append(menu=self.DrawAtomRestraint, title='Restraints')
    56555655        self.DrawAtomsMenu.Append(menu=self.DrawAtomRigidBody, title='Rigid body')
    5656         self.DrawAtomEdit.Append(id=wxID_DRAWATOMSTYLE, kind=wx.ITEM_NORMAL,text='Atom style',
     5656        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWATOMSTYLE, kind=wx.ITEM_NORMAL,text='Atom style',
    56575657            help='Select atoms first')
    5658         self.DrawAtomEdit.Append(id=wxID_DRAWATOMLABEL, kind=wx.ITEM_NORMAL,text='Atom label',
     5658        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWATOMLABEL, kind=wx.ITEM_NORMAL,text='Atom label',
    56595659            help='Select atoms first')
    5660         self.DrawAtomEdit.Append(id=wxID_DRAWATOMCOLOR, kind=wx.ITEM_NORMAL,text='Atom color',
     5660        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWATOMCOLOR, kind=wx.ITEM_NORMAL,text='Atom color',
    56615661            help='Select atoms first')
    5662         self.DrawAtomEdit.Append(id=wxID_DRAWATOMRESETCOLOR, kind=wx.ITEM_NORMAL,text='Reset atom colors',
     5662        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWATOMRESETCOLOR, kind=wx.ITEM_NORMAL,text='Reset atom colors',
    56635663            help='Resets all atom colors to defaults')
    5664         self.DrawAtomEdit.Append(id=wxID_DRWAEDITRADII, kind=wx.ITEM_NORMAL,text='Edit atom radii',
     5664        self.DrawAtomEdit.Append(id=G2G.wxID_DRWAEDITRADII, kind=wx.ITEM_NORMAL,text='Edit atom radii',
    56655665            help='Edit drawing atom radii')
    5666         self.DrawAtomEdit.Append(id=wxID_DRAWVIEWPOINT, kind=wx.ITEM_NORMAL,text='View point',
     5666        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWVIEWPOINT, kind=wx.ITEM_NORMAL,text='View point',
    56675667            help='View point is 1st atom selected')
    5668         self.DrawAtomEdit.Append(id=wxID_DRAWADDEQUIV, kind=wx.ITEM_NORMAL,text='Add atoms',
     5668        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWADDEQUIV, kind=wx.ITEM_NORMAL,text='Add atoms',
    56695669            help='Add symmetry & cell equivalents to drawing set from selected atoms')
    5670         self.DrawAtomEdit.Append(id=wxID_DRAWADDSPHERE, kind=wx.ITEM_NORMAL,text='Add sphere of atoms',
     5670        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWADDSPHERE, kind=wx.ITEM_NORMAL,text='Add sphere of atoms',
    56715671            help='Add atoms within sphere of enclosure')
    5672         self.DrawAtomEdit.Append(id=wxID_DRAWTRANSFORM, kind=wx.ITEM_NORMAL,text='Transform draw atoms',
     5672        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWTRANSFORM, kind=wx.ITEM_NORMAL,text='Transform draw atoms',
    56735673            help='Transform selected atoms by symmetry & cell translations')
    5674         self.DrawAtomEdit.Append(id=wxID_DRAWFILLCOORD, kind=wx.ITEM_NORMAL,text='Fill CN-sphere',
     5674        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWFILLCOORD, kind=wx.ITEM_NORMAL,text='Fill CN-sphere',
    56755675            help='Fill coordination sphere for selected atoms')           
    5676         self.DrawAtomEdit.Append(id=wxID_DRAWFILLCELL, kind=wx.ITEM_NORMAL,text='Fill unit cell',
     5676        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWFILLCELL, kind=wx.ITEM_NORMAL,text='Fill unit cell',
    56775677            help='Fill unit cell with selected atoms')
    5678         self.DrawAtomEdit.Append(id=wxID_DRAWDELETE, kind=wx.ITEM_NORMAL,text='Delete atoms',
     5678        self.DrawAtomEdit.Append(id=G2G.wxID_DRAWDELETE, kind=wx.ITEM_NORMAL,text='Delete atoms',
    56795679            help='Delete atoms from drawing set')
    5680         self.DrawAtomCompute.Append(id=wxID_DRAWDISTVP, kind=wx.ITEM_NORMAL,text='View pt. dist.',
     5680        self.DrawAtomCompute.Append(id=G2G.wxID_DRAWDISTVP, kind=wx.ITEM_NORMAL,text='View pt. dist.',
    56815681            help='Compute distance of selected atoms from view point')   
    5682         self.DrawAtomCompute.Append(id=wxID_DRAWDISAGLTOR, kind=wx.ITEM_NORMAL,text='Dist. Ang. Tors.',
     5682        self.DrawAtomCompute.Append(id=G2G.wxID_DRAWDISAGLTOR, kind=wx.ITEM_NORMAL,text='Dist. Ang. Tors.',
    56835683            help='Compute distance, angle or torsion for 2-4 selected atoms')   
    5684         self.DrawAtomCompute.Append(id=wxID_DRAWPLANE, kind=wx.ITEM_NORMAL,text='Best plane',
     5684        self.DrawAtomCompute.Append(id=G2G.wxID_DRAWPLANE, kind=wx.ITEM_NORMAL,text='Best plane',
    56855685            help='Compute best plane for 4+ selected atoms')   
    5686         self.DrawAtomRestraint.Append(id=wxID_DRAWRESTRBOND, kind=wx.ITEM_NORMAL,text='Add bond restraint',
     5686        self.DrawAtomRestraint.Append(id=G2G.wxID_DRAWRESTRBOND, kind=wx.ITEM_NORMAL,text='Add bond restraint',
    56875687            help='Add bond restraint for selected atoms (2)')
    5688         self.DrawAtomRestraint.Append(id=wxID_DRAWRESTRANGLE, kind=wx.ITEM_NORMAL,text='Add angle restraint',
     5688        self.DrawAtomRestraint.Append(id=G2G.wxID_DRAWRESTRANGLE, kind=wx.ITEM_NORMAL,text='Add angle restraint',
    56895689            help='Add angle restraint for selected atoms (3: one end 1st)')
    5690         self.DrawAtomRestraint.Append(id=wxID_DRAWRESTRPLANE, kind=wx.ITEM_NORMAL,text='Add plane restraint',
     5690        self.DrawAtomRestraint.Append(id=G2G.wxID_DRAWRESTRPLANE, kind=wx.ITEM_NORMAL,text='Add plane restraint',
    56915691            help='Add plane restraint for selected atoms (4+)')
    5692         self.DrawAtomRestraint.Append(id=wxID_DRAWRESTRCHIRAL, kind=wx.ITEM_NORMAL,text='Add chiral restraint',
     5692        self.DrawAtomRestraint.Append(id=G2G.wxID_DRAWRESTRCHIRAL, kind=wx.ITEM_NORMAL,text='Add chiral restraint',
    56935693            help='Add chiral restraint for selected atoms (4: center atom 1st)')
    5694         self.DrawAtomRigidBody.Append(id=wxID_DRAWDEFINERB, kind=wx.ITEM_NORMAL,text='Define rigid body',
     5694        self.DrawAtomRigidBody.Append(id=G2G.wxID_DRAWDEFINERB, kind=wx.ITEM_NORMAL,text='Define rigid body',
    56955695            help='Define rigid body with selected atoms')
    56965696        self.PostfillDataMenu()
     
    57025702        self.MCSAEdit = wx.Menu(title='')
    57035703        self.MCSAMenu.Append(menu=self.MCSAEdit, title='MC/SA')
    5704         self.MCSAEdit.Append(id=wxID_ADDMCSAATOM, kind=wx.ITEM_NORMAL,text='Add atom',
     5704        self.MCSAEdit.Append(id=G2G.wxID_ADDMCSAATOM, kind=wx.ITEM_NORMAL,text='Add atom',
    57055705            help='Add single atom to MC/SA model')
    5706         self.MCSAEdit.Append(id=wxID_ADDMCSARB, kind=wx.ITEM_NORMAL,text='Add rigid body',
     5706        self.MCSAEdit.Append(id=G2G.wxID_ADDMCSARB, kind=wx.ITEM_NORMAL,text='Add rigid body',
    57075707            help='Add rigid body to MC/SA model' )
    5708         self.MCSAEdit.Append(id=wxID_CLEARMCSARB, kind=wx.ITEM_NORMAL,text='Clear rigid bodies',
     5708        self.MCSAEdit.Append(id=G2G.wxID_CLEARMCSARB, kind=wx.ITEM_NORMAL,text='Clear rigid bodies',
    57095709            help='Clear all atoms & rigid bodies from MC/SA model' )
    5710         self.MCSAEdit.Append(id=wxID_MOVEMCSA, kind=wx.ITEM_NORMAL,text='Move MC/SA solution',
     5710        self.MCSAEdit.Append(id=G2G.wxID_MOVEMCSA, kind=wx.ITEM_NORMAL,text='Move MC/SA solution',
    57115711            help='Move MC/SA solution to atom list' )
    5712         self.MCSAEdit.Append(id=wxID_MCSACLEARRESULTS, kind=wx.ITEM_NORMAL,text='Clear results',
     5712        self.MCSAEdit.Append(id=G2G.wxID_MCSACLEARRESULTS, kind=wx.ITEM_NORMAL,text='Clear results',
    57135713            help='Clear table of MC/SA results' )
    57145714        self.PostfillDataMenu()
     
    57205720        self.TextureEdit = wx.Menu(title='')
    57215721        self.TextureMenu.Append(menu=self.TextureEdit, title='Texture')
    5722         self.TextureEdit.Append(id=wxID_REFINETEXTURE, kind=wx.ITEM_NORMAL,text='Refine texture',
     5722        self.TextureEdit.Append(id=G2G.wxID_REFINETEXTURE, kind=wx.ITEM_NORMAL,text='Refine texture',
    57235723            help='Refine the texture coefficients from sequential results')
    5724 #        self.TextureEdit.Append(id=wxID_CLEARTEXTURE, kind=wx.ITEM_NORMAL,text='Clear texture',
     5724#        self.TextureEdit.Append(id=G2G.wxID_CLEARTEXTURE, kind=wx.ITEM_NORMAL,text='Clear texture',
    57255725#            help='Clear the texture coefficients' )
    57265726        self.PostfillDataMenu()
     
    57325732        self.PawleyEdit = wx.Menu(title='')
    57335733        self.PawleyMenu.Append(menu=self.PawleyEdit,title='Operations')
    5734         self.PawleyEdit.Append(id=wxID_PAWLEYSET, kind=wx.ITEM_NORMAL,text='Pawley settings',
     5734        self.PawleyEdit.Append(id=G2G.wxID_PAWLEYSET, kind=wx.ITEM_NORMAL,text='Pawley settings',
    57355735            help='Change Pawley refinement settings')
    5736         self.PawleyEdit.Append(id=wxID_PAWLEYLOAD, kind=wx.ITEM_NORMAL,text='Pawley create',
     5736        self.PawleyEdit.Append(id=G2G.wxID_PAWLEYLOAD, kind=wx.ITEM_NORMAL,text='Pawley create',
    57375737            help='Initialize Pawley reflection list')
    5738         self.PawleyEdit.Append(id=wxID_PAWLEYESTIMATE, kind=wx.ITEM_NORMAL,text='Pawley estimate',
     5738        self.PawleyEdit.Append(id=G2G.wxID_PAWLEYESTIMATE, kind=wx.ITEM_NORMAL,text='Pawley estimate',
    57395739            help='Estimate initial Pawley intensities')
    5740         self.PawleyEdit.Append(id=wxID_PAWLEYUPDATE, kind=wx.ITEM_NORMAL,text='Pawley update',
     5740        self.PawleyEdit.Append(id=G2G.wxID_PAWLEYUPDATE, kind=wx.ITEM_NORMAL,text='Pawley update',
    57415741            help='Update negative Pawley intensities with -0.5*Fobs and turn off refinement')
    5742         self.PawleyEdit.Append(id=wxID_PAWLEYSELALL, kind=wx.ITEM_NORMAL,text='Select all',
     5742        self.PawleyEdit.Append(id=G2G.wxID_PAWLEYSELALL, kind=wx.ITEM_NORMAL,text='Select all',
    57435743            help='Select all reflections to be refined')
    5744         self.PawleyEdit.Append(id=wxID_PAWLEYSELNONE, kind=wx.ITEM_NORMAL,text='Select none',
     5744        self.PawleyEdit.Append(id=G2G.wxID_PAWLEYSELNONE, kind=wx.ITEM_NORMAL,text='Select none',
    57455745            help='Set flag for all reflections for no refinement')
    5746         self.PawleyEdit.Append(id=wxID_PAWLEYSELTOGGLE, kind=wx.ITEM_NORMAL,text='Toggle Selection',
     5746        self.PawleyEdit.Append(id=G2G.wxID_PAWLEYSELTOGGLE, kind=wx.ITEM_NORMAL,text='Toggle Selection',
    57475747            help='Toggle Selection flag for all reflections to opposite setting')
    57485748        self.PostfillDataMenu()
     
    57545754        self.MapPeaksEdit = wx.Menu(title='')
    57555755        self.MapPeaksMenu.Append(menu=self.MapPeaksEdit, title='Map peaks')
    5756         self.MapPeaksEdit.Append(id=wxID_PEAKSMOVE, kind=wx.ITEM_NORMAL,text='Move peaks',
     5756        self.MapPeaksEdit.Append(id=G2G.wxID_PEAKSMOVE, kind=wx.ITEM_NORMAL,text='Move peaks',
    57575757            help='Move selected peaks to atom list')
    5758         self.MapPeaksEdit.Append(id=wxID_PEAKSVIEWPT, kind=wx.ITEM_NORMAL,text='View point',
     5758        self.MapPeaksEdit.Append(id=G2G.wxID_PEAKSVIEWPT, kind=wx.ITEM_NORMAL,text='View point',
    57595759            help='View point is 1st peak selected')
    5760         self.MapPeaksEdit.Append(id=wxID_PEAKSDISTVP, kind=wx.ITEM_NORMAL,text='View pt. dist.',
     5760        self.MapPeaksEdit.Append(id=G2G.wxID_PEAKSDISTVP, kind=wx.ITEM_NORMAL,text='View pt. dist.',
    57615761            help='Compute distance of selected peaks from view point')   
    5762         self.MapPeaksEdit.Append(id=wxID_SHOWBONDS, kind=wx.ITEM_NORMAL,text='Hide bonds',
     5762        self.MapPeaksEdit.Append(id=G2G.wxID_SHOWBONDS, kind=wx.ITEM_NORMAL,text='Hide bonds',
    57635763            help='Hide or show bonds between peak positions')   
    5764         self.MapPeaksEdit.Append(id=wxID_PEAKSDA, kind=wx.ITEM_NORMAL,text='Calc dist/ang',
     5764        self.MapPeaksEdit.Append(id=G2G.wxID_PEAKSDA, kind=wx.ITEM_NORMAL,text='Calc dist/ang',
    57655765            help='Calculate distance or angle for selection')
    5766         self.MapPeaksEdit.Append(id=wxID_FINDEQVPEAKS, kind=wx.ITEM_NORMAL,text='Equivalent peaks',
     5766        self.MapPeaksEdit.Append(id=G2G.wxID_FINDEQVPEAKS, kind=wx.ITEM_NORMAL,text='Equivalent peaks',
    57675767            help='Find equivalent peaks')
    5768         self.MapPeaksEdit.Append(id=wxID_PEAKSUNIQUE, kind=wx.ITEM_NORMAL,text='Unique peaks',
     5768        self.MapPeaksEdit.Append(id=G2G.wxID_PEAKSUNIQUE, kind=wx.ITEM_NORMAL,text='Unique peaks',
    57695769            help='Select unique set')
    5770         self.MapPeaksEdit.Append(id=wxID_PEAKSDELETE, kind=wx.ITEM_NORMAL,text='Delete peaks',
     5770        self.MapPeaksEdit.Append(id=G2G.wxID_PEAKSDELETE, kind=wx.ITEM_NORMAL,text='Delete peaks',
    57715771            help='Delete selected peaks')
    5772         self.MapPeaksEdit.Append(id=wxID_PEAKSCLEAR, kind=wx.ITEM_NORMAL,text='Clear peaks',
     5772        self.MapPeaksEdit.Append(id=G2G.wxID_PEAKSCLEAR, kind=wx.ITEM_NORMAL,text='Clear peaks',
    57735773            help='Clear the map peak list')
    57745774        self.PostfillDataMenu()
     
    57805780        self.RigidBodiesEdit = wx.Menu(title='')
    57815781        self.RigidBodiesMenu.Append(menu=self.RigidBodiesEdit, title='Edit Body')
    5782         self.RigidBodiesEdit.Append(id=wxID_ASSIGNATMS2RB, kind=wx.ITEM_NORMAL,text='Assign atoms to rigid body',
     5782        self.RigidBodiesEdit.Append(id=G2G.wxID_ASSIGNATMS2RB, kind=wx.ITEM_NORMAL,text='Assign atoms to rigid body',
    57835783            help='Select & position rigid body in structure of existing atoms')
    5784         self.RigidBodiesEdit.Append(id=wxID_AUTOFINDRESRB, kind=wx.ITEM_NORMAL,text='Auto find residues',
     5784        self.RigidBodiesEdit.Append(id=G2G.wxID_AUTOFINDRESRB, kind=wx.ITEM_NORMAL,text='Auto find residues',
    57855785            help='Auto find of residue RBs in macromolecule')
    5786         self.RigidBodiesEdit.Append(id=wxID_COPYRBPARMS, kind=wx.ITEM_NORMAL,text='Copy rigid body parms',
     5786        self.RigidBodiesEdit.Append(id=G2G.wxID_COPYRBPARMS, kind=wx.ITEM_NORMAL,text='Copy rigid body parms',
    57875787            help='Copy rigid body location & TLS parameters')
    5788         self.RigidBodiesEdit.Append(id=wxID_GLOBALTHERM, kind=wx.ITEM_NORMAL,text='Global thermal motion',
     5788        self.RigidBodiesEdit.Append(id=G2G.wxID_GLOBALTHERM, kind=wx.ITEM_NORMAL,text='Global thermal motion',
    57895789            help='Global setting of residue thermal motion models')
    5790         self.RigidBodiesEdit.Append(id=wxID_GLOBALRESREFINE, kind=wx.ITEM_NORMAL,text='Global residue refine',
     5790        self.RigidBodiesEdit.Append(id=G2G.wxID_GLOBALRESREFINE, kind=wx.ITEM_NORMAL,text='Global residue refine',
    57915791            help='Global setting of residue RB refinement flags')
    5792         self.RigidBodiesEdit.Append(id=wxID_RBREMOVEALL, kind=wx.ITEM_NORMAL,text='Remove all rigid bodies',
     5792        self.RigidBodiesEdit.Append(id=G2G.wxID_RBREMOVEALL, kind=wx.ITEM_NORMAL,text='Remove all rigid bodies',
    57935793            help='Remove all rigid body assignment for atoms')
    57945794        self.PostfillDataMenu()
     
    64226422        else:
    64236423            val = False
    6424         G2frame.dataWindow.SequentialPvars.Enable(wxDELSEQVAR,val)
    6425         G2frame.dataWindow.SequentialPvars.Enable(wxEDITSEQVAR,val)
     6424        G2frame.dataWindow.SequentialPvars.Enable(G2G.wxID_DELSEQVAR,val)
     6425        G2frame.dataWindow.SequentialPvars.Enable(G2G.wxID_EDITSEQVAR,val)
    64266426
    64276427    def DelPseudoVar(event):
     
    66666666        else:
    66676667            val = False
    6668         G2frame.dataWindow.SequentialPfit.Enable(wxDELPARFIT,val)
    6669         G2frame.dataWindow.SequentialPfit.Enable(wxEDITPARFIT,val)
    6670         G2frame.dataWindow.SequentialPfit.Enable(wxDOPARFIT,val)
     6668        G2frame.dataWindow.SequentialPfit.Enable(G2G.wxID_DELPARFIT,val)
     6669        G2frame.dataWindow.SequentialPfit.Enable(G2G.wxID_EDITPARFIT,val)
     6670        G2frame.dataWindow.SequentialPfit.Enable(G2G.wxID_DOPARFIT,val)
    66716671
    66726672    def ParEqEval(Values,calcObjList,varyList):
     
    69996999    G2frame.SetTitle('Sequential refinement results')
    70007000    G2frame.GetStatusBar().SetStatusText('',1)
    7001     G2frame.Bind(wx.EVT_MENU, OnRenameSelSeq, id=wxID_RENAMESEQSEL)
    7002     G2frame.Bind(wx.EVT_MENU, OnSaveSelSeq, id=wxID_SAVESEQSEL)
    7003     G2frame.Bind(wx.EVT_MENU, OnSaveSelSeqCSV, id=wxID_SAVESEQSELCSV)
    7004     G2frame.Bind(wx.EVT_MENU, OnSaveSeqCSV, id=wxID_SAVESEQCSV)
    7005     G2frame.Bind(wx.EVT_MENU, OnPlotSelSeq, id=wxID_PLOTSEQSEL)
    7006     G2frame.Bind(wx.EVT_MENU, OnAveSelSeq, id=wxID_AVESEQSEL)
    7007     #G2frame.Bind(wx.EVT_MENU, OnReOrgSelSeq, id=wxID_ORGSEQSEL)
    7008     G2frame.Bind(wx.EVT_MENU, onSelectSeqVars, id=wxID_ORGSEQINC)
    7009     G2frame.Bind(wx.EVT_MENU, AddNewPseudoVar, id=wxADDSEQVAR)
    7010     G2frame.Bind(wx.EVT_MENU, AddNewDistPseudoVar, id=wxADDSEQDIST)
    7011     G2frame.Bind(wx.EVT_MENU, AddNewAnglePseudoVar, id=wxADDSEQANGLE)
    7012     G2frame.Bind(wx.EVT_MENU, DelPseudoVar, id=wxDELSEQVAR)
    7013     G2frame.Bind(wx.EVT_MENU, EditPseudoVar, id=wxEDITSEQVAR)
    7014     G2frame.Bind(wx.EVT_MENU, AddNewParFitEq, id=wxADDPARFIT)
    7015     G2frame.Bind(wx.EVT_MENU, CopyParFitEq, id=wxCOPYPARFIT)
    7016     G2frame.Bind(wx.EVT_MENU, DelParFitEq, id=wxDELPARFIT)
    7017     G2frame.Bind(wx.EVT_MENU, EditParFitEq, id=wxEDITPARFIT)
    7018     G2frame.Bind(wx.EVT_MENU, DoParEqFit, id=wxDOPARFIT)
     7001    G2frame.Bind(wx.EVT_MENU, OnRenameSelSeq, id=G2G.wxID_RENAMESEQSEL)
     7002    G2frame.Bind(wx.EVT_MENU, OnSaveSelSeq, id=G2G.wxID_SAVESEQSEL)
     7003    G2frame.Bind(wx.EVT_MENU, OnSaveSelSeqCSV, id=G2G.wxID_SAVESEQSELCSV)
     7004    G2frame.Bind(wx.EVT_MENU, OnSaveSeqCSV, id=G2G.wxID_SAVESEQCSV)
     7005    G2frame.Bind(wx.EVT_MENU, OnPlotSelSeq, id=G2G.wxID_PLOTSEQSEL)
     7006    G2frame.Bind(wx.EVT_MENU, OnAveSelSeq, id=G2G.wxID_AVESEQSEL)
     7007    #G2frame.Bind(wx.EVT_MENU, OnReOrgSelSeq, id=G2G.wxID_ORGSEQSEL)
     7008    G2frame.Bind(wx.EVT_MENU, onSelectSeqVars, id=G2G.wxID_ORGSEQINC)
     7009    G2frame.Bind(wx.EVT_MENU, AddNewPseudoVar, id=G2G.wxID_ADDSEQVAR)
     7010    G2frame.Bind(wx.EVT_MENU, AddNewDistPseudoVar, id=G2G.wxID_ADDSEQDIST)
     7011    G2frame.Bind(wx.EVT_MENU, AddNewAnglePseudoVar, id=G2G.wxID_ADDSEQANGLE)
     7012    G2frame.Bind(wx.EVT_MENU, DelPseudoVar, id=G2G.wxID_DELSEQVAR)
     7013    G2frame.Bind(wx.EVT_MENU, EditPseudoVar, id=G2G.wxID_EDITSEQVAR)
     7014    G2frame.Bind(wx.EVT_MENU, AddNewParFitEq, id=G2G.wxID_ADDPARFIT)
     7015    G2frame.Bind(wx.EVT_MENU, CopyParFitEq, id=G2G.wxID_COPYPARFIT)
     7016    G2frame.Bind(wx.EVT_MENU, DelParFitEq, id=G2G.wxID_DELPARFIT)
     7017    G2frame.Bind(wx.EVT_MENU, EditParFitEq, id=G2G.wxID_EDITPARFIT)
     7018    G2frame.Bind(wx.EVT_MENU, DoParEqFit, id=G2G.wxID_DOPARFIT)
    70197019
    70207020    for id in G2frame.dataWindow.SeqExportLookup:       
     
    70667066        print ' Warning: Total of %d data sets missing from sequential results'%(missing)
    70677067    #if len(VaryListChanges) > 1:
    7068     #    G2frame.dataWindow.SequentialFile.Enable(wxID_ORGSEQSEL,True)
     7068    #    G2frame.dataWindow.SequentialFile.Enable(G2G.wxID_ORGSEQSEL,True)
    70697069    #else:
    7070     #    G2frame.dataWindow.SequentialFile.Enable(wxID_ORGSEQSEL,False)
     7070    #    G2frame.dataWindow.SequentialFile.Enable(G2G.wxID_ORGSEQSEL,False)
    70717071    #-----------------------------------------------------------------------------------
    70727072    # build up the data table by columns -----------------------------------------------
     
    75867586    if kind in ['PWDR','SASD','REFD']:
    75877587        SetDataMenuBar(G2frame,G2frame.dataWindow.PWDRMenu)
    7588         G2frame.Bind(wx.EVT_MENU, OnErrorAnalysis, id=wxID_PWDANALYSIS)
    7589         G2frame.Bind(wx.EVT_MENU, onCopySelectedItems, id=wxID_PWDCOPY)
    7590         G2frame.Bind(wx.EVT_MENU, onCopyPlotCtrls, id=wxID_PLOTCTRLCOPY)
     7588        G2frame.Bind(wx.EVT_MENU, OnErrorAnalysis, id=G2G.wxID_PWDANALYSIS)
     7589        G2frame.Bind(wx.EVT_MENU, onCopySelectedItems, id=G2G.wxID_PWDCOPY)
     7590        G2frame.Bind(wx.EVT_MENU, onCopyPlotCtrls, id=G2G.wxID_PLOTCTRLCOPY)
    75917591    elif kind in ['HKLF',]:
    75927592        SetDataMenuBar(G2frame,G2frame.dataWindow.HKLFMenu)
    7593         G2frame.Bind(wx.EVT_MENU, OnErrorAnalysis, id=wxID_PWDANALYSIS)
    7594         G2frame.Bind(wx.EVT_MENU, OnMergeHKL, id=wxID_MERGEHKL)
    7595         G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=wxID_PWD3DHKLPLOT)
    7596         G2frame.Bind(wx.EVT_MENU, OnPlotAll3DHKL, id=wxID_3DALLHKLPLOT)
     7593        G2frame.Bind(wx.EVT_MENU, OnErrorAnalysis, id=G2G.wxID_PWDANALYSIS)
     7594        G2frame.Bind(wx.EVT_MENU, OnMergeHKL, id=G2G.wxID_MERGEHKL)
     7595        G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=G2G.wxID_PWD3DHKLPLOT)
     7596        G2frame.Bind(wx.EVT_MENU, OnPlotAll3DHKL, id=G2G.wxID_3DALLHKLPLOT)
    75977597   
    75987598    G2frame.dataWindow.ClearData()
  • branch/2frame/GSASIIddataGUI.py

    r2915 r2917  
    965965    UseList = data['Histograms']
    966966    if UseList:
    967         G2frame.dataWindow.DataMenu.Enable(G2gd.wxID_DATADELETE,True)
     967        G2frame.dataWindow.DataMenu.Enable(G2G.wxID_DATADELETE,True)
    968968        for item in G2frame.Refine: item.Enable(True)
    969969    else:
    970         G2frame.dataWindow.DataMenu.Enable(G2gd.wxID_DATADELETE,False)
     970        G2frame.dataWindow.DataMenu.Enable(G2G.wxID_DATADELETE,False)
    971971        for item in G2frame.Refine: item.Enable(False)
    972972    # make a list of histograms (any type) used in this phase, ordered as in tree
  • branch/2frame/GSASIIimgGUI.py

    r2915 r2917  
    10301030            data['calibrant'] = calSel.GetValue().strip()
    10311031            if data['calibrant']:
    1032                 G2frame.dataWindow.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBRATE,enable=True)
    1033                 G2frame.dataWindow.ImageEdit.Enable(id=G2gd.wxID_IMCALIBRATE,enable=True)
    1034                 G2frame.dataWindow.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBALL,enable=True)
     1032                G2frame.dataWindow.ImageEdit.Enable(id=G2G.wxID_IMRECALIBRATE,enable=True)
     1033                G2frame.dataWindow.ImageEdit.Enable(id=G2G.wxID_IMCALIBRATE,enable=True)
     1034                G2frame.dataWindow.ImageEdit.Enable(id=G2G.wxID_IMRECALIBALL,enable=True)
    10351035                data['calibskip'] = calFile.Calibrants[data['calibrant']][3]
    10361036                limits = calFile.Calibrants[data['calibrant']][4]
     
    10411041                G2frame.calibDmin.SetValue(limits[0])
    10421042            else:
    1043                 G2frame.dataWindow.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBRATE,enable=False)
    1044                 G2frame.dataWindow.ImageEdit.Enable(id=G2gd.wxID_IMCALIBRATE,enable=False)
    1045                 G2frame.dataWindow.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBALL,enable=False)
     1043                G2frame.dataWindow.ImageEdit.Enable(id=G2G.wxID_IMRECALIBRATE,enable=False)
     1044                G2frame.dataWindow.ImageEdit.Enable(id=G2G.wxID_IMCALIBRATE,enable=False)
     1045                G2frame.dataWindow.ImageEdit.Enable(id=G2G.wxID_IMRECALIBALL,enable=False)
    10461046               
    10471047        def OnCalibSkip(event):
     
    11741174    G2frame.dataWindow.ClearData()
    11751175    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.ImageMenu)
    1176     G2frame.Bind(wx.EVT_MENU, OnCalibrate, id=G2gd.wxID_IMCALIBRATE)
    1177     G2frame.Bind(wx.EVT_MENU, OnRecalibrate, id=G2gd.wxID_IMRECALIBRATE)
    1178     G2frame.Bind(wx.EVT_MENU, OnRecalibAll, id=G2gd.wxID_IMRECALIBALL)
    1179     G2frame.Bind(wx.EVT_MENU, OnClearCalib, id=G2gd.wxID_IMCLEARCALIB)
     1176    G2frame.Bind(wx.EVT_MENU, OnCalibrate, id=G2G.wxID_IMCALIBRATE)
     1177    G2frame.Bind(wx.EVT_MENU, OnRecalibrate, id=G2G.wxID_IMRECALIBRATE)
     1178    G2frame.Bind(wx.EVT_MENU, OnRecalibAll, id=G2G.wxID_IMRECALIBALL)
     1179    G2frame.Bind(wx.EVT_MENU, OnClearCalib, id=G2G.wxID_IMCLEARCALIB)
    11801180    if data.get('calibrant'):
    11811181        mode = True
    11821182    else:
    11831183        mode = False
    1184 #    G2frame.Enable(id=G2gd.wxID_IMRECALIBRATE,enable=mode)
    1185 #    G2frame.Enable(id=G2gd.wxID_IMCALIBRATE,enable=mode)
    1186 #    G2frame.Enable(id=G2gd.wxID_IMRECALIBALL,enable=mode)
    1187     G2frame.Bind(wx.EVT_MENU, OnIntegrate, id=G2gd.wxID_IMINTEGRATE)
    1188     G2frame.Bind(wx.EVT_MENU, OnIntegrateAll, id=G2gd.wxID_INTEGRATEALL)
    1189     G2frame.Bind(wx.EVT_MENU, OnCopyControls, id=G2gd.wxID_IMCOPYCONTROLS)
    1190     G2frame.Bind(wx.EVT_MENU, OnCopySelected, id=G2gd.wxID_IMCOPYSELECTED)
    1191     G2frame.Bind(wx.EVT_MENU, OnSaveControls, id=G2gd.wxID_IMSAVECONTROLS)
    1192     G2frame.Bind(wx.EVT_MENU, OnSaveMultiControls, id=G2gd.wxID_SAVESELECTEDCONTROLS)
    1193     G2frame.Bind(wx.EVT_MENU, OnLoadControls, id=G2gd.wxID_IMLOADCONTROLS)
    1194     G2frame.Bind(wx.EVT_MENU, OnTransferAngles, id=G2gd.wxID_IMXFERCONTROLS)
    1195     G2frame.Bind(wx.EVT_MENU, OnResetDist, id=G2gd.wxID_IMRESETDIST)
     1184#    G2frame.Enable(id=G2G.wxID_IMRECALIBRATE,enable=mode)
     1185#    G2frame.Enable(id=G2G.wxID_IMCALIBRATE,enable=mode)
     1186#    G2frame.Enable(id=G2G.wxID_IMRECALIBALL,enable=mode)
     1187    G2frame.Bind(wx.EVT_MENU, OnIntegrate, id=G2G.wxID_IMINTEGRATE)
     1188    G2frame.Bind(wx.EVT_MENU, OnIntegrateAll, id=G2G.wxID_INTEGRATEALL)
     1189    G2frame.Bind(wx.EVT_MENU, OnCopyControls, id=G2G.wxID_IMCOPYCONTROLS)
     1190    G2frame.Bind(wx.EVT_MENU, OnCopySelected, id=G2G.wxID_IMCOPYSELECTED)
     1191    G2frame.Bind(wx.EVT_MENU, OnSaveControls, id=G2G.wxID_IMSAVECONTROLS)
     1192    G2frame.Bind(wx.EVT_MENU, OnSaveMultiControls, id=G2G.wxID_SAVESELECTEDCONTROLS)
     1193    G2frame.Bind(wx.EVT_MENU, OnLoadControls, id=G2G.wxID_IMLOADCONTROLS)
     1194    G2frame.Bind(wx.EVT_MENU, OnTransferAngles, id=G2G.wxID_IMXFERCONTROLS)
     1195    G2frame.Bind(wx.EVT_MENU, OnResetDist, id=G2G.wxID_IMRESETDIST)
    11961196    def OnDestroy(event):
    11971197        G2frame.autoIntFrame = None
     
    12031203        G2frame.autoIntFrame = AutoIntFrame(G2frame,PollTime=PollTime)
    12041204        G2frame.autoIntFrame.Bind(wx.EVT_WINDOW_DESTROY,OnDestroy) # clean up name on window close
    1205     G2frame.Bind(wx.EVT_MENU, OnAutoInt, id=G2gd.wxID_IMAUTOINTEG)
     1205    G2frame.Bind(wx.EVT_MENU, OnAutoInt, id=G2G.wxID_IMAUTOINTEG)
    12061206
    12071207    mainSizer = G2frame.dataWindow.GetSizer()
     
    13121312       
    13131313    def OnLoadMask(event):
    1314         if event.Id == G2gd.wxID_MASKLOADNOT:
     1314        if event.Id == G2G.wxID_MASKLOADNOT:
    13151315            ignoreThreshold = True
    13161316        else:
     
    15521552        CleanupMasks(data) # posting page for 1st time; clean out anything unfinished
    15531553    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.MaskMenu)
    1554     G2frame.Bind(wx.EVT_MENU, OnCopyMask, id=G2gd.wxID_MASKCOPY)
    1555     G2frame.Bind(wx.EVT_MENU, OnLoadMask, id=G2gd.wxID_MASKLOAD)
    1556     G2frame.Bind(wx.EVT_MENU, OnLoadMask, id=G2gd.wxID_MASKLOADNOT)
    1557     G2frame.Bind(wx.EVT_MENU, OnSaveMask, id=G2gd.wxID_MASKSAVE)
    1558     G2frame.Bind(wx.EVT_MENU, OnAutoSpotMask, id=G2gd.wxID_FINDSPOTS)
    1559     G2frame.Bind(wx.EVT_MENU, OnDeleteSpotMask, id=G2gd.wxID_DELETESPOTS)
    1560     G2frame.Bind(wx.EVT_MENU, ToggleSpotMaskMode, id=G2gd.wxID_NEWMASKSPOT)
    1561     G2frame.Bind(wx.EVT_MENU, OnNewArcMask, id=G2gd.wxID_NEWMASKARC)
    1562     G2frame.Bind(wx.EVT_MENU, OnNewRingMask, id=G2gd.wxID_NEWMASKRING)
    1563     G2frame.Bind(wx.EVT_MENU, OnNewPolyMask, id=G2gd.wxID_NEWMASKPOLY)
    1564     G2frame.Bind(wx.EVT_MENU, OnNewFrameMask, id=G2gd.wxID_NEWMASKFRAME)
     1554    G2frame.Bind(wx.EVT_MENU, OnCopyMask, id=G2G.wxID_MASKCOPY)
     1555    G2frame.Bind(wx.EVT_MENU, OnLoadMask, id=G2G.wxID_MASKLOAD)
     1556    G2frame.Bind(wx.EVT_MENU, OnLoadMask, id=G2G.wxID_MASKLOADNOT)
     1557    G2frame.Bind(wx.EVT_MENU, OnSaveMask, id=G2G.wxID_MASKSAVE)
     1558    G2frame.Bind(wx.EVT_MENU, OnAutoSpotMask, id=G2G.wxID_FINDSPOTS)
     1559    G2frame.Bind(wx.EVT_MENU, OnDeleteSpotMask, id=G2G.wxID_DELETESPOTS)
     1560    G2frame.Bind(wx.EVT_MENU, ToggleSpotMaskMode, id=G2G.wxID_NEWMASKSPOT)
     1561    G2frame.Bind(wx.EVT_MENU, OnNewArcMask, id=G2G.wxID_NEWMASKARC)
     1562    G2frame.Bind(wx.EVT_MENU, OnNewRingMask, id=G2G.wxID_NEWMASKRING)
     1563    G2frame.Bind(wx.EVT_MENU, OnNewPolyMask, id=G2G.wxID_NEWMASKPOLY)
     1564    G2frame.Bind(wx.EVT_MENU, OnNewFrameMask, id=G2G.wxID_NEWMASKFRAME)
    15651565    if G2frame.MaskKey == 'f':
    15661566        G2frame.GetStatusBar().SetStatusText('Frame mask active - LB pick next point, RB close polygon',1)
     
    21322132        G2gd.GetGPXtreeItemId(G2frame,G2frame.Image, 'Image Controls'))       
    21332133    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.StrStaMenu)
    2134     G2frame.Bind(wx.EVT_MENU, OnAppendDzero, id=G2gd.wxID_APPENDDZERO)
    2135     G2frame.Bind(wx.EVT_MENU, OnUpdateDzero, id=G2gd.wxID_UPDATEDZERO)
    2136     G2frame.Bind(wx.EVT_MENU, OnFitStrSta, id=G2gd.wxID_STRSTAFIT)
    2137     G2frame.Bind(wx.EVT_MENU, OnPlotStrSta, id=G2gd.wxID_STRSTAPLOT) 
    2138     G2frame.Bind(wx.EVT_MENU, OnSaveStrRing, id=G2gd.wxID_STRRINGSAVE) 
    2139     G2frame.Bind(wx.EVT_MENU, OnFitAllStrSta, id=G2gd.wxID_STRSTAALLFIT)
    2140     G2frame.Bind(wx.EVT_MENU, OnCopyStrSta, id=G2gd.wxID_STRSTACOPY)
    2141     G2frame.Bind(wx.EVT_MENU, OnLoadStrSta, id=G2gd.wxID_STRSTALOAD)
    2142     G2frame.Bind(wx.EVT_MENU, OnSaveStrSta, id=G2gd.wxID_STRSTASAVE)
    2143     G2frame.Bind(wx.EVT_MENU, OnStrStaSample, id=G2gd.wxID_STRSTSAMPLE)       
     2134    G2frame.Bind(wx.EVT_MENU, OnAppendDzero, id=G2G.wxID_APPENDDZERO)
     2135    G2frame.Bind(wx.EVT_MENU, OnUpdateDzero, id=G2G.wxID_UPDATEDZERO)
     2136    G2frame.Bind(wx.EVT_MENU, OnFitStrSta, id=G2G.wxID_STRSTAFIT)
     2137    G2frame.Bind(wx.EVT_MENU, OnPlotStrSta, id=G2G.wxID_STRSTAPLOT) 
     2138    G2frame.Bind(wx.EVT_MENU, OnSaveStrRing, id=G2G.wxID_STRRINGSAVE) 
     2139    G2frame.Bind(wx.EVT_MENU, OnFitAllStrSta, id=G2G.wxID_STRSTAALLFIT)
     2140    G2frame.Bind(wx.EVT_MENU, OnCopyStrSta, id=G2G.wxID_STRSTACOPY)
     2141    G2frame.Bind(wx.EVT_MENU, OnLoadStrSta, id=G2G.wxID_STRSTALOAD)
     2142    G2frame.Bind(wx.EVT_MENU, OnSaveStrSta, id=G2G.wxID_STRSTASAVE)
     2143    G2frame.Bind(wx.EVT_MENU, OnStrStaSample, id=G2G.wxID_STRSTSAMPLE)       
    21442144    if G2frame.StrainKey == 'a':    #probably doesn't happen
    21452145        G2frame.GetStatusBar().SetStatusText('Add strain ring active - LB pick d-zero value',1)
  • branch/2frame/GSASIIphsGUI.py

    r2915 r2917  
    13011301                    pages = [G2frame.phaseDisplay.GetPageText(PageNum) for PageNum in range(G2frame.phaseDisplay.GetPageCount())]
    13021302                    if generalData['Type'] == 'faulted':
    1303                         G2frame.Bind(wx.EVT_MENU, OnLoadDIFFaX, id=G2gd.wxID_LOADDIFFAX)
    1304                         G2frame.Bind(wx.EVT_MENU, OnSimulate, id=G2gd.wxID_LAYERSIMULATE)
    1305                         G2frame.Bind(wx.EVT_MENU, OnSeqSimulate, id=G2gd.wxID_SEQUENCESIMULATE)
    1306                         G2frame.Bind(wx.EVT_MENU, OnFitLayers, id=G2gd.wxID_LAYERSFIT)                       
     1303                        G2frame.Bind(wx.EVT_MENU, OnLoadDIFFaX, id=G2G.wxID_LOADDIFFAX)
     1304                        G2frame.Bind(wx.EVT_MENU, OnSimulate, id=G2G.wxID_LAYERSIMULATE)
     1305                        G2frame.Bind(wx.EVT_MENU, OnSeqSimulate, id=G2G.wxID_SEQUENCESIMULATE)
     1306                        G2frame.Bind(wx.EVT_MENU, OnFitLayers, id=G2G.wxID_LAYERSFIT)                       
    13071307                        if 'Wave Data' in pages:
    13081308                            pass
     
    22992299
    23002300        if generalData['Modulated']:
    2301             G2frame.dataWindow.GeneralCalc.Enable(G2gd.wxID_SINGLEMCSA,False)
    2302             G2frame.dataWindow.GeneralCalc.Enable(G2gd.wxID_MULTIMCSA,False)
    2303             G2frame.dataWindow.GeneralCalc.Enable(G2gd.wxID_4DCHARGEFLIP,True)
     2301            G2frame.dataWindow.GeneralCalc.Enable(G2G.wxID_SINGLEMCSA,False)
     2302            G2frame.dataWindow.GeneralCalc.Enable(G2G.wxID_MULTIMCSA,False)
     2303            G2frame.dataWindow.GeneralCalc.Enable(G2G.wxID_4DCHARGEFLIP,True)
    23042304            mainSizer.Add(ModulatedSizer(generalData['Type']))
    23052305            G2G.HorizontalLine(mainSizer,General)
    23062306        else:
    2307             G2frame.dataWindow.GeneralCalc.Enable(G2gd.wxID_SINGLEMCSA,True)
    2308             G2frame.dataWindow.GeneralCalc.Enable(G2gd.wxID_MULTIMCSA,True)
    2309             G2frame.dataWindow.GeneralCalc.Enable(G2gd.wxID_4DCHARGEFLIP,False)
     2307            G2frame.dataWindow.GeneralCalc.Enable(G2G.wxID_SINGLEMCSA,True)
     2308            G2frame.dataWindow.GeneralCalc.Enable(G2G.wxID_MULTIMCSA,True)
     2309            G2frame.dataWindow.GeneralCalc.Enable(G2G.wxID_4DCHARGEFLIP,False)
    23102310
    23112311        mainSizer.Add(PawleySizer())
     
    27792779                    rbAtmDict[id] += 'U'           
    27802780        # exclList will be 'x' or 'xu' if TLS used in RB
    2781         Items = [G2gd.wxID_ATOMSEDITINSERT,G2gd.wxID_ATOMSEDITDELETE,
    2782             G2gd.wxID_ATOMSMODIFY,G2gd.wxID_ATOMSTRANSFORM,G2gd.wxID_MAKEMOLECULE,
    2783             G2gd.wxID_ATOMVIEWINSERT,G2gd.wxID_ATOMMOVE,G2gd.wxID_ADDHATOM]
     2781        Items = [G2G.wxID_ATOMSEDITINSERT,G2G.wxID_ATOMSEDITDELETE,
     2782            G2G.wxID_ATOMSMODIFY,G2G.wxID_ATOMSTRANSFORM,G2G.wxID_MAKEMOLECULE,
     2783            G2G.wxID_ATOMVIEWINSERT,G2G.wxID_ATOMMOVE,G2G.wxID_ADDHATOM]
    27842784        if atomData:
    27852785            for item in Items:   
     
    27882788            for item in Items:
    27892789                G2frame.dataWindow.AtomsMenu.Enable(item,False)
    2790         Items = [G2gd.wxID_ATOMVIEWINSERT, G2gd.wxID_ATOMSVIEWADD,G2gd.wxID_ATOMMOVE]
     2790        Items = [G2G.wxID_ATOMVIEWINSERT, G2G.wxID_ATOMSVIEWADD,G2G.wxID_ATOMMOVE]
    27912791        if 'showABC' in data['Drawing']:
    27922792            for item in Items:
     
    29892989            SetupGeneral()
    29902990            data['General']['HydIds'].update(HydIds)
    2991             G2frame.dataWindow.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,True)
     2991            G2frame.dataWindow.AtomEdit.Enable(G2G.wxID_UPDATEHATOM,True)
    29922992            data['Drawing']['Atoms'] = []
    29932993            UpdateDrawAtoms()
     
    30203020            del HydIds[HId]
    30213021        if not len(HydIds):
    3022             G2frame.dataWindow.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,False)
     3022            G2frame.dataWindow.AtomEdit.Enable(G2G.wxID_UPDATEHATOM,False)
    30233023        data['Drawing']['Atoms'] = []
    30243024        UpdateDrawAtoms()
     
    31433143        SetupGeneral()
    31443144        if not len(HydIds):
    3145             G2frame.dataWindow.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,False)
     3145            G2frame.dataWindow.AtomEdit.Enable(G2G.wxID_UPDATEHATOM,False)
    31463146        event.StopPropagation()
    31473147
     
    49114911            atSymOp.append(atomData[item][cs-1])
    49124912            atIndx.append(atomData[item][ci])
    4913         if event.GetId() == G2gd.wxID_DRAWRESTRBOND and len(indx) == 2:
     4913        if event.GetId() == G2G.wxID_DRAWRESTRBOND and len(indx) == 2:
    49144914            try:
    49154915                bondData = restData[PhaseName]['Bond']
     
    49194919                restData[PhaseName]['Bond'] = bondData
    49204920            bondData['Bonds'].append([atIndx,atSymOp,1.54,0.01])
    4921         elif event.GetId() == G2gd.wxID_DRAWRESTRANGLE and len(indx) == 3:
     4921        elif event.GetId() == G2G.wxID_DRAWRESTRANGLE and len(indx) == 3:
    49224922            try:
    49234923                angleData = restData[PhaseName]['Angle']
     
    49274927                restData[PhaseName]['Angle'] = angleData
    49284928            angleData['Angles'].append([atIndx,atSymOp,109.5,1.0])           
    4929         elif event.GetId() == G2gd.wxID_DRAWRESTRPLANE and len(indx) > 3:
     4929        elif event.GetId() == G2G.wxID_DRAWRESTRPLANE and len(indx) > 3:
    49304930            try:
    49314931                planeData = restData[PhaseName]['Plane']
     
    49354935                restData[PhaseName]['Plane'] = planeData
    49364936            planeData['Planes'].append([atIndx,atSymOp,0.0,0.01])           
    4937         elif event.GetId() == G2gd.wxID_DRAWRESTRCHIRAL and len(indx) == 4:
     4937        elif event.GetId() == G2G.wxID_DRAWRESTRCHIRAL and len(indx) == 4:
    49384938            try:
    49394939                chiralData = restData[PhaseName]['Chiral']
     
    86168616        if generalData['Map'].get('Show bonds',False):
    86178617            generalData['Map']['Show bonds'] = False
    8618             G2frame.dataWindow.MapPeaksEdit.SetLabel(G2gd.wxID_SHOWBONDS,'Show bonds')
     8618            G2frame.dataWindow.MapPeaksEdit.SetLabel(G2G.wxID_SHOWBONDS,'Show bonds')
    86198619        else:
    86208620            generalData['Map']['Show bonds'] = True
    8621             G2frame.dataWindow.MapPeaksEdit.SetLabel(G2gd.wxID_SHOWBONDS,'Hide bonds')
     8621            G2frame.dataWindow.MapPeaksEdit.SetLabel(G2G.wxID_SHOWBONDS,'Hide bonds')
    86228622        FillMapPeaksGrid()
    86238623        G2plt.PlotStructure(G2frame,data)
     
    90089008        # General
    90099009        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.DataGeneral)
    9010         G2frame.Bind(wx.EVT_MENU, OnFourierMaps, id=G2gd.wxID_FOURCALC)
    9011         G2frame.Bind(wx.EVT_MENU, OnSearchMaps, id=G2gd.wxID_FOURSEARCH)
    9012         G2frame.Bind(wx.EVT_MENU, OnChargeFlip, id=G2gd.wxID_CHARGEFLIP)
    9013         G2frame.Bind(wx.EVT_MENU, On4DChargeFlip, id=G2gd.wxID_4DCHARGEFLIP)
    9014         G2frame.Bind(wx.EVT_MENU, OnFourClear, id=G2gd.wxID_FOURCLEAR)
    9015         G2frame.Bind(wx.EVT_MENU, OnRunSingleMCSA, id=G2gd.wxID_SINGLEMCSA)
    9016         G2frame.Bind(wx.EVT_MENU, OnRunMultiMCSA, id=G2gd.wxID_MULTIMCSA)
    9017         G2frame.Bind(wx.EVT_MENU, OnTransform, id=G2gd.wxID_TRANSFORMSTRUCTURE)
     9010        G2frame.Bind(wx.EVT_MENU, OnFourierMaps, id=G2G.wxID_FOURCALC)
     9011        G2frame.Bind(wx.EVT_MENU, OnSearchMaps, id=G2G.wxID_FOURSEARCH)
     9012        G2frame.Bind(wx.EVT_MENU, OnChargeFlip, id=G2G.wxID_CHARGEFLIP)
     9013        G2frame.Bind(wx.EVT_MENU, On4DChargeFlip, id=G2G.wxID_4DCHARGEFLIP)
     9014        G2frame.Bind(wx.EVT_MENU, OnFourClear, id=G2G.wxID_FOURCLEAR)
     9015        G2frame.Bind(wx.EVT_MENU, OnRunSingleMCSA, id=G2G.wxID_SINGLEMCSA)
     9016        G2frame.Bind(wx.EVT_MENU, OnRunMultiMCSA, id=G2G.wxID_MULTIMCSA)
     9017        G2frame.Bind(wx.EVT_MENU, OnTransform, id=G2G.wxID_TRANSFORMSTRUCTURE)
    90189018        # Data
    90199019        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.DataMenu)
    9020         G2frame.Bind(wx.EVT_MENU, OnDataUse, id=G2gd.wxID_DATAUSE)
    9021         G2frame.Bind(wx.EVT_MENU, OnDataCopy, id=G2gd.wxID_DATACOPY)
    9022         G2frame.Bind(wx.EVT_MENU, OnDataCopyFlags, id=G2gd.wxID_DATACOPYFLAGS)
    9023         G2frame.Bind(wx.EVT_MENU, OnSelDataCopy, id=G2gd.wxID_DATASELCOPY)
    9024         G2frame.Bind(wx.EVT_MENU, OnPwdrAdd, id=G2gd.wxID_PWDRADD)
    9025         G2frame.Bind(wx.EVT_MENU, OnHklfAdd, id=G2gd.wxID_HKLFADD)
    9026         G2frame.Bind(wx.EVT_MENU, OnDataDelete, id=G2gd.wxID_DATADELETE)
     9020        G2frame.Bind(wx.EVT_MENU, OnDataUse, id=G2G.wxID_DATAUSE)
     9021        G2frame.Bind(wx.EVT_MENU, OnDataCopy, id=G2G.wxID_DATACOPY)
     9022        G2frame.Bind(wx.EVT_MENU, OnDataCopyFlags, id=G2G.wxID_DATACOPYFLAGS)
     9023        G2frame.Bind(wx.EVT_MENU, OnSelDataCopy, id=G2G.wxID_DATASELCOPY)
     9024        G2frame.Bind(wx.EVT_MENU, OnPwdrAdd, id=G2G.wxID_PWDRADD)
     9025        G2frame.Bind(wx.EVT_MENU, OnHklfAdd, id=G2G.wxID_HKLFADD)
     9026        G2frame.Bind(wx.EVT_MENU, OnDataDelete, id=G2G.wxID_DATADELETE)
    90279027        # Atoms
    90289028        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.AtomsMenu)
    9029         G2frame.Bind(wx.EVT_MENU, OnSetAll, id=G2gd.wxID_ATOMSSETALL)
    9030         G2frame.Bind(wx.EVT_MENU, AtomRefine, id=G2gd.wxID_ATOMSSETSEL)
    9031         G2frame.Bind(wx.EVT_MENU, AtomModify, id=G2gd.wxID_ATOMSMODIFY)
    9032         G2frame.Bind(wx.EVT_MENU, OnAtomInsert, id=G2gd.wxID_ATOMSEDITINSERT)
    9033         G2frame.Bind(wx.EVT_MENU, OnHydAtomAdd, id=G2gd.wxID_ADDHATOM)
    9034         G2frame.Bind(wx.EVT_MENU, AtomDelete, id=G2gd.wxID_ATOMSEDITDELETE)
    9035         G2frame.Bind(wx.EVT_MENU, AtomTransform, id=G2gd.wxID_ATOMSTRANSFORM)
    9036 #        G2frame.Bind(wx.EVT_MENU, AtomRotate, id=G2gd.wxID_ATOMSROTATE)
    9037        
    9038         G2frame.Bind(wx.EVT_MENU, OnAtomAdd, id=G2gd.wxID_ATOMSEDITADD)
    9039         G2frame.Bind(wx.EVT_MENU, OnAtomViewAdd, id=G2gd.wxID_ATOMSVIEWADD)
    9040         G2frame.Bind(wx.EVT_MENU, OnAtomViewInsert, id=G2gd.wxID_ATOMVIEWINSERT)
    9041         G2frame.Bind(wx.EVT_MENU, OnHydAtomUpdate, id=G2gd.wxID_UPDATEHATOM)
    9042         G2frame.Bind(wx.EVT_MENU, OnAtomMove, id=G2gd.wxID_ATOMMOVE)
    9043         G2frame.Bind(wx.EVT_MENU, MakeMolecule, id=G2gd.wxID_MAKEMOLECULE)
    9044         G2frame.Bind(wx.EVT_MENU, OnReloadDrawAtoms, id=G2gd.wxID_RELOADDRAWATOMS)
    9045         G2frame.Bind(wx.EVT_MENU, OnDistAngle, id=G2gd.wxID_ATOMSDISAGL)
    9046         G2frame.Bind(wx.EVT_MENU, OnDistAnglePrt, id=G2gd.wxID_ATOMSPDISAGL)
    9047         G2frame.Bind(wx.EVT_MENU, OnDensity, id=G2gd.wxID_ATOMSDENSITY)
    9048         G2frame.Bind(wx.EVT_MENU, OnValidProtein, id=G2gd.wxID_VALIDPROTEIN)
    9049         G2frame.Bind(wx.EVT_MENU, OnIsoDistortCalc, id=G2gd.wxID_ISODISP)
     9029        G2frame.Bind(wx.EVT_MENU, OnSetAll, id=G2G.wxID_ATOMSSETALL)
     9030        G2frame.Bind(wx.EVT_MENU, AtomRefine, id=G2G.wxID_ATOMSSETSEL)
     9031        G2frame.Bind(wx.EVT_MENU, AtomModify, id=G2G.wxID_ATOMSMODIFY)
     9032        G2frame.Bind(wx.EVT_MENU, OnAtomInsert, id=G2G.wxID_ATOMSEDITINSERT)
     9033        G2frame.Bind(wx.EVT_MENU, OnHydAtomAdd, id=G2G.wxID_ADDHATOM)
     9034        G2frame.Bind(wx.EVT_MENU, AtomDelete, id=G2G.wxID_ATOMSEDITDELETE)
     9035        G2frame.Bind(wx.EVT_MENU, AtomTransform, id=G2G.wxID_ATOMSTRANSFORM)
     9036#        G2frame.Bind(wx.EVT_MENU, AtomRotate, id=G2G.wxID_ATOMSROTATE)
     9037       
     9038        G2frame.Bind(wx.EVT_MENU, OnAtomAdd, id=G2G.wxID_ATOMSEDITADD)
     9039        G2frame.Bind(wx.EVT_MENU, OnAtomViewAdd, id=G2G.wxID_ATOMSVIEWADD)
     9040        G2frame.Bind(wx.EVT_MENU, OnAtomViewInsert, id=G2G.wxID_ATOMVIEWINSERT)
     9041        G2frame.Bind(wx.EVT_MENU, OnHydAtomUpdate, id=G2G.wxID_UPDATEHATOM)
     9042        G2frame.Bind(wx.EVT_MENU, OnAtomMove, id=G2G.wxID_ATOMMOVE)
     9043        G2frame.Bind(wx.EVT_MENU, MakeMolecule, id=G2G.wxID_MAKEMOLECULE)
     9044        G2frame.Bind(wx.EVT_MENU, OnReloadDrawAtoms, id=G2G.wxID_RELOADDRAWATOMS)
     9045        G2frame.Bind(wx.EVT_MENU, OnDistAngle, id=G2G.wxID_ATOMSDISAGL)
     9046        G2frame.Bind(wx.EVT_MENU, OnDistAnglePrt, id=G2G.wxID_ATOMSPDISAGL)
     9047        G2frame.Bind(wx.EVT_MENU, OnDensity, id=G2G.wxID_ATOMSDENSITY)
     9048        G2frame.Bind(wx.EVT_MENU, OnValidProtein, id=G2G.wxID_VALIDPROTEIN)
     9049        G2frame.Bind(wx.EVT_MENU, OnIsoDistortCalc, id=G2G.wxID_ISODISP)
    90509050        if 'HydIds' in data['General']:
    9051             G2frame.dataWindow.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,True)
     9051            G2frame.dataWindow.AtomEdit.Enable(G2G.wxID_UPDATEHATOM,True)
    90529052        else:
    9053             G2frame.dataWindow.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,False)
     9053            G2frame.dataWindow.AtomEdit.Enable(G2G.wxID_UPDATEHATOM,False)
    90549054        for id in G2frame.dataWindow.ReImportMenuId:     #loop over submenu items
    90559055            G2frame.Bind(wx.EVT_MENU, OnReImport, id=id)
     
    90579057        if data['General']['Modulated']:
    90589058            FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.WavesData)
    9059             G2frame.Bind(wx.EVT_MENU, OnWaveVary, id=G2gd.wxID_WAVEVARY)
     9059            G2frame.Bind(wx.EVT_MENU, OnWaveVary, id=G2G.wxID_WAVEVARY)
    90609060        # Stacking faults
    90619061        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.LayerData)
    9062         G2frame.Bind(wx.EVT_MENU, OnCopyPhase, id=G2gd.wxID_COPYPHASE)
    9063         G2frame.Bind(wx.EVT_MENU, OnLoadDIFFaX, id=G2gd.wxID_LOADDIFFAX)
    9064         G2frame.Bind(wx.EVT_MENU, OnSimulate, id=G2gd.wxID_LAYERSIMULATE)
    9065         G2frame.Bind(wx.EVT_MENU, OnFitLayers, id=G2gd.wxID_LAYERSFIT)                       
    9066         G2frame.Bind(wx.EVT_MENU, OnSeqSimulate, id=G2gd.wxID_SEQUENCESIMULATE)
     9062        G2frame.Bind(wx.EVT_MENU, OnCopyPhase, id=G2G.wxID_COPYPHASE)
     9063        G2frame.Bind(wx.EVT_MENU, OnLoadDIFFaX, id=G2G.wxID_LOADDIFFAX)
     9064        G2frame.Bind(wx.EVT_MENU, OnSimulate, id=G2G.wxID_LAYERSIMULATE)
     9065        G2frame.Bind(wx.EVT_MENU, OnFitLayers, id=G2G.wxID_LAYERSFIT)                       
     9066        G2frame.Bind(wx.EVT_MENU, OnSeqSimulate, id=G2G.wxID_SEQUENCESIMULATE)
    90679067        # Draw Options
    90689068        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.DataDrawOptions)
    90699069        # Draw Atoms
    90709070        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.DrawAtomsMenu)
    9071         G2frame.Bind(wx.EVT_MENU, DrawAtomStyle, id=G2gd.wxID_DRAWATOMSTYLE)
    9072         G2frame.Bind(wx.EVT_MENU, DrawAtomLabel, id=G2gd.wxID_DRAWATOMLABEL)
    9073         G2frame.Bind(wx.EVT_MENU, DrawAtomColor, id=G2gd.wxID_DRAWATOMCOLOR)
    9074         G2frame.Bind(wx.EVT_MENU, ResetAtomColors, id=G2gd.wxID_DRAWATOMRESETCOLOR)
    9075         G2frame.Bind(wx.EVT_MENU, OnEditAtomRadii, id=G2gd.wxID_DRWAEDITRADII)   
    9076         G2frame.Bind(wx.EVT_MENU, SetViewPoint, id=G2gd.wxID_DRAWVIEWPOINT)
    9077         G2frame.Bind(wx.EVT_MENU, AddSymEquiv, id=G2gd.wxID_DRAWADDEQUIV)
    9078         G2frame.Bind(wx.EVT_MENU, AddSphere, id=G2gd.wxID_DRAWADDSPHERE)
    9079         G2frame.Bind(wx.EVT_MENU, TransformSymEquiv, id=G2gd.wxID_DRAWTRANSFORM)
    9080         G2frame.Bind(wx.EVT_MENU, FillCoordSphere, id=G2gd.wxID_DRAWFILLCOORD)           
    9081         G2frame.Bind(wx.EVT_MENU, FillUnitCell, id=G2gd.wxID_DRAWFILLCELL)
    9082         G2frame.Bind(wx.EVT_MENU, DrawAtomsDelete, id=G2gd.wxID_DRAWDELETE)
    9083         G2frame.Bind(wx.EVT_MENU, OnDrawDistVP, id=G2gd.wxID_DRAWDISTVP)
    9084         G2frame.Bind(wx.EVT_MENU, OnDrawDAT, id=G2gd.wxID_DRAWDISAGLTOR)
    9085         G2frame.Bind(wx.EVT_MENU, OnDrawPlane, id=G2gd.wxID_DRAWPLANE)
    9086         G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRBOND)
    9087         G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRANGLE)
    9088         G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRPLANE)
    9089         G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRCHIRAL)
    9090         G2frame.Bind(wx.EVT_MENU, OnDefineRB, id=G2gd.wxID_DRAWDEFINERB)
     9071        G2frame.Bind(wx.EVT_MENU, DrawAtomStyle, id=G2G.wxID_DRAWATOMSTYLE)
     9072        G2frame.Bind(wx.EVT_MENU, DrawAtomLabel, id=G2G.wxID_DRAWATOMLABEL)
     9073        G2frame.Bind(wx.EVT_MENU, DrawAtomColor, id=G2G.wxID_DRAWATOMCOLOR)
     9074        G2frame.Bind(wx.EVT_MENU, ResetAtomColors, id=G2G.wxID_DRAWATOMRESETCOLOR)
     9075        G2frame.Bind(wx.EVT_MENU, OnEditAtomRadii, id=G2G.wxID_DRWAEDITRADII)   
     9076        G2frame.Bind(wx.EVT_MENU, SetViewPoint, id=G2G.wxID_DRAWVIEWPOINT)
     9077        G2frame.Bind(wx.EVT_MENU, AddSymEquiv, id=G2G.wxID_DRAWADDEQUIV)
     9078        G2frame.Bind(wx.EVT_MENU, AddSphere, id=G2G.wxID_DRAWADDSPHERE)
     9079        G2frame.Bind(wx.EVT_MENU, TransformSymEquiv, id=G2G.wxID_DRAWTRANSFORM)
     9080        G2frame.Bind(wx.EVT_MENU, FillCoordSphere, id=G2G.wxID_DRAWFILLCOORD)           
     9081        G2frame.Bind(wx.EVT_MENU, FillUnitCell, id=G2G.wxID_DRAWFILLCELL)
     9082        G2frame.Bind(wx.EVT_MENU, DrawAtomsDelete, id=G2G.wxID_DRAWDELETE)
     9083        G2frame.Bind(wx.EVT_MENU, OnDrawDistVP, id=G2G.wxID_DRAWDISTVP)
     9084        G2frame.Bind(wx.EVT_MENU, OnDrawDAT, id=G2G.wxID_DRAWDISAGLTOR)
     9085        G2frame.Bind(wx.EVT_MENU, OnDrawPlane, id=G2G.wxID_DRAWPLANE)
     9086        G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2G.wxID_DRAWRESTRBOND)
     9087        G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2G.wxID_DRAWRESTRANGLE)
     9088        G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2G.wxID_DRAWRESTRPLANE)
     9089        G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2G.wxID_DRAWRESTRCHIRAL)
     9090        G2frame.Bind(wx.EVT_MENU, OnDefineRB, id=G2G.wxID_DRAWDEFINERB)
    90919091        # RB Models
    90929092        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.RigidBodiesMenu)
    9093         G2frame.Bind(wx.EVT_MENU, OnAutoFindResRB, id=G2gd.wxID_AUTOFINDRESRB)
    9094         G2frame.Bind(wx.EVT_MENU, OnRBAssign, id=G2gd.wxID_ASSIGNATMS2RB)
    9095         G2frame.Bind(wx.EVT_MENU, OnRBCopyParms, id=G2gd.wxID_COPYRBPARMS)
    9096         G2frame.Bind(wx.EVT_MENU, OnGlobalResRBTherm, id=G2gd.wxID_GLOBALTHERM)
    9097         G2frame.Bind(wx.EVT_MENU, OnGlobalResRBRef, id=G2gd.wxID_GLOBALRESREFINE)
    9098         G2frame.Bind(wx.EVT_MENU, OnRBRemoveAll, id=G2gd.wxID_RBREMOVEALL)
     9093        G2frame.Bind(wx.EVT_MENU, OnAutoFindResRB, id=G2G.wxID_AUTOFINDRESRB)
     9094        G2frame.Bind(wx.EVT_MENU, OnRBAssign, id=G2G.wxID_ASSIGNATMS2RB)
     9095        G2frame.Bind(wx.EVT_MENU, OnRBCopyParms, id=G2G.wxID_COPYRBPARMS)
     9096        G2frame.Bind(wx.EVT_MENU, OnGlobalResRBTherm, id=G2G.wxID_GLOBALTHERM)
     9097        G2frame.Bind(wx.EVT_MENU, OnGlobalResRBRef, id=G2G.wxID_GLOBALRESREFINE)
     9098        G2frame.Bind(wx.EVT_MENU, OnRBRemoveAll, id=G2G.wxID_RBREMOVEALL)
    90999099        # Map peaks
    91009100        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.MapPeaksMenu)
    9101         G2frame.Bind(wx.EVT_MENU, OnPeaksMove, id=G2gd.wxID_PEAKSMOVE)
    9102         G2frame.Bind(wx.EVT_MENU, OnPeaksViewPoint, id=G2gd.wxID_PEAKSVIEWPT)
    9103         G2frame.Bind(wx.EVT_MENU, OnPeaksDistVP, id=G2gd.wxID_PEAKSDISTVP)
    9104         G2frame.Bind(wx.EVT_MENU, OnPeaksDA, id=G2gd.wxID_PEAKSDA)
    9105         G2frame.Bind(wx.EVT_MENU, OnShowBonds, id=G2gd.wxID_SHOWBONDS)
    9106         G2frame.Bind(wx.EVT_MENU, OnPeaksEquiv, id=G2gd.wxID_FINDEQVPEAKS)
    9107         G2frame.Bind(wx.EVT_MENU, OnPeaksUnique, id=G2gd.wxID_PEAKSUNIQUE)
    9108         G2frame.Bind(wx.EVT_MENU, OnPeaksDelete, id=G2gd.wxID_PEAKSDELETE)
    9109         G2frame.Bind(wx.EVT_MENU, OnPeaksClear, id=G2gd.wxID_PEAKSCLEAR)
     9101        G2frame.Bind(wx.EVT_MENU, OnPeaksMove, id=G2G.wxID_PEAKSMOVE)
     9102        G2frame.Bind(wx.EVT_MENU, OnPeaksViewPoint, id=G2G.wxID_PEAKSVIEWPT)
     9103        G2frame.Bind(wx.EVT_MENU, OnPeaksDistVP, id=G2G.wxID_PEAKSDISTVP)
     9104        G2frame.Bind(wx.EVT_MENU, OnPeaksDA, id=G2G.wxID_PEAKSDA)
     9105        G2frame.Bind(wx.EVT_MENU, OnShowBonds, id=G2G.wxID_SHOWBONDS)
     9106        G2frame.Bind(wx.EVT_MENU, OnPeaksEquiv, id=G2G.wxID_FINDEQVPEAKS)
     9107        G2frame.Bind(wx.EVT_MENU, OnPeaksUnique, id=G2G.wxID_PEAKSUNIQUE)
     9108        G2frame.Bind(wx.EVT_MENU, OnPeaksDelete, id=G2G.wxID_PEAKSDELETE)
     9109        G2frame.Bind(wx.EVT_MENU, OnPeaksClear, id=G2G.wxID_PEAKSCLEAR)
    91109110        # MC/SA
    91119111        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.MCSAMenu)
    9112         G2frame.Bind(wx.EVT_MENU, OnMCSAaddAtom, id=G2gd.wxID_ADDMCSAATOM)
    9113         G2frame.Bind(wx.EVT_MENU, OnMCSAaddRB, id=G2gd.wxID_ADDMCSARB)
    9114         G2frame.Bind(wx.EVT_MENU, OnMCSAclear, id=G2gd.wxID_CLEARMCSARB)
    9115         G2frame.Bind(wx.EVT_MENU, OnMCSAmove, id=G2gd.wxID_MOVEMCSA)
    9116         G2frame.Bind(wx.EVT_MENU, OnClearResults, id=G2gd.wxID_MCSACLEARRESULTS)
     9112        G2frame.Bind(wx.EVT_MENU, OnMCSAaddAtom, id=G2G.wxID_ADDMCSAATOM)
     9113        G2frame.Bind(wx.EVT_MENU, OnMCSAaddRB, id=G2G.wxID_ADDMCSARB)
     9114        G2frame.Bind(wx.EVT_MENU, OnMCSAclear, id=G2G.wxID_CLEARMCSARB)
     9115        G2frame.Bind(wx.EVT_MENU, OnMCSAmove, id=G2G.wxID_MOVEMCSA)
     9116        G2frame.Bind(wx.EVT_MENU, OnClearResults, id=G2G.wxID_MCSACLEARRESULTS)
    91179117        # Texture
    91189118        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.TextureMenu)
    9119         G2frame.Bind(wx.EVT_MENU, OnTextureRefine, id=G2gd.wxID_REFINETEXTURE)
    9120 #        G2frame.Bind(wx.EVT_MENU, OnTextureClear, id=G2gd.wxID_CLEARTEXTURE)
     9119        G2frame.Bind(wx.EVT_MENU, OnTextureRefine, id=G2G.wxID_REFINETEXTURE)
     9120#        G2frame.Bind(wx.EVT_MENU, OnTextureClear, id=G2G.wxID_CLEARTEXTURE)
    91219121        # Pawley reflections
    91229122        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.PawleyMenu)
    9123         G2frame.Bind(wx.EVT_MENU, OnPawleySet, id=G2gd.wxID_PAWLEYSET)
    9124         G2frame.Bind(wx.EVT_MENU, OnPawleyLoad, id=G2gd.wxID_PAWLEYLOAD)
    9125         G2frame.Bind(wx.EVT_MENU, OnPawleyEstimate, id=G2gd.wxID_PAWLEYESTIMATE)
    9126         G2frame.Bind(wx.EVT_MENU, OnPawleyUpdate, id=G2gd.wxID_PAWLEYUPDATE)
    9127         G2frame.Bind(wx.EVT_MENU, OnPawleySelAll, id=G2gd.wxID_PAWLEYSELALL)
    9128         G2frame.Bind(wx.EVT_MENU, OnPawleySelNone, id=G2gd.wxID_PAWLEYSELNONE)
    9129         G2frame.Bind(wx.EVT_MENU, OnPawleyToggle, id=G2gd.wxID_PAWLEYSELTOGGLE)
     9123        G2frame.Bind(wx.EVT_MENU, OnPawleySet, id=G2G.wxID_PAWLEYSET)
     9124        G2frame.Bind(wx.EVT_MENU, OnPawleyLoad, id=G2G.wxID_PAWLEYLOAD)
     9125        G2frame.Bind(wx.EVT_MENU, OnPawleyEstimate, id=G2G.wxID_PAWLEYESTIMATE)
     9126        G2frame.Bind(wx.EVT_MENU, OnPawleyUpdate, id=G2G.wxID_PAWLEYUPDATE)
     9127        G2frame.Bind(wx.EVT_MENU, OnPawleySelAll, id=G2G.wxID_PAWLEYSELALL)
     9128        G2frame.Bind(wx.EVT_MENU, OnPawleySelNone, id=G2G.wxID_PAWLEYSELNONE)
     9129        G2frame.Bind(wx.EVT_MENU, OnPawleyToggle, id=G2G.wxID_PAWLEYSELTOGGLE)
    91309130       
    91319131    # UpdatePhaseData execution starts here
     
    92059205    G2frame.phaseDisplay.AddPage(G2frame.PawleyRefl,'Pawley reflections')
    92069206    Pages.append('Pawley reflections')
    9207     G2frame.dataWindow.AtomCompute.Enable(G2gd.wxID_ISODISP,'ISODISTORT' in data)
    9208     G2frame.dataWindow.AtomCompute.Enable(G2gd.wxID_VALIDPROTEIN,'macro' in data['General']['Type'])
     9207    G2frame.dataWindow.AtomCompute.Enable(G2G.wxID_ISODISP,'ISODISTORT' in data)
     9208    G2frame.dataWindow.AtomCompute.Enable(G2G.wxID_VALIDPROTEIN,'macro' in data['General']['Type'])
    92099209    G2frame.phaseDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
    92109210    FillMenus()
  • branch/2frame/GSASIIpwdGUI.py

    r2916 r2917  
    814814    G2frame.GetStatusBar().SetStatusText('Global refine: select refine column & press Y or N',1)
    815815    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.PeakMenu)
    816     G2frame.Bind(wx.EVT_MENU, OnAutoSearch, id=G2gd.wxID_AUTOSEARCH)
    817     G2frame.Bind(wx.EVT_MENU, OnCopyPeaks, id=G2gd.wxID_PEAKSCOPY)
    818     G2frame.Bind(wx.EVT_MENU, OnUnDo, id=G2gd.wxID_UNDO)
     816    G2frame.Bind(wx.EVT_MENU, OnAutoSearch, id=G2G.wxID_AUTOSEARCH)
     817    G2frame.Bind(wx.EVT_MENU, OnCopyPeaks, id=G2G.wxID_PEAKSCOPY)
     818    G2frame.Bind(wx.EVT_MENU, OnUnDo, id=G2G.wxID_UNDO)
    819819    G2frame.Bind(wx.EVT_MENU, OnRefineSelected, id=G2frame.dataWindow.peaksSel.GetId())
    820820    G2frame.Bind(wx.EVT_MENU, OnRefineAll, id=G2frame.dataWindow.peaksAll.GetId())
    821     G2frame.Bind(wx.EVT_MENU, OnLSQPeakFit, id=G2gd.wxID_LSQPEAKFIT)
    822     G2frame.Bind(wx.EVT_MENU, OnOneCycle, id=G2gd.wxID_LSQONECYCLE)
    823     G2frame.Bind(wx.EVT_MENU, OnSeqPeakFit, id=G2gd.wxID_SEQPEAKFIT)
    824     G2frame.Bind(wx.EVT_MENU, OnClearPeaks, id=G2gd.wxID_CLEARPEAKS)
    825     G2frame.Bind(wx.EVT_MENU, OnResetSigGam, id=G2gd.wxID_RESETSIGGAM)
     821    G2frame.Bind(wx.EVT_MENU, OnLSQPeakFit, id=G2G.wxID_LSQPEAKFIT)
     822    G2frame.Bind(wx.EVT_MENU, OnOneCycle, id=G2G.wxID_LSQONECYCLE)
     823    G2frame.Bind(wx.EVT_MENU, OnSeqPeakFit, id=G2G.wxID_SEQPEAKFIT)
     824    G2frame.Bind(wx.EVT_MENU, OnClearPeaks, id=G2G.wxID_CLEARPEAKS)
     825    G2frame.Bind(wx.EVT_MENU, OnResetSigGam, id=G2G.wxID_RESETSIGGAM)
    826826    if data['peaks']:
    827827        G2frame.dataWindow.AutoSearch.Enable(False)
     
    12521252               
    12531253    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.BackMenu)
    1254     G2frame.Bind(wx.EVT_MENU,OnBackCopy,id=G2gd.wxID_BACKCOPY)
    1255     G2frame.Bind(wx.EVT_MENU,OnBackFlagCopy,id=G2gd.wxID_BACKFLAGCOPY)
    1256     G2frame.Bind(wx.EVT_MENU,OnPeaksMove,id=G2gd.wxID_PEAKSMOVE)
    1257     G2frame.Bind(wx.EVT_MENU,OnMakeRDF,id=G2gd.wxID_MAKEBACKRDF)
     1254    G2frame.Bind(wx.EVT_MENU,OnBackCopy,id=G2G.wxID_BACKCOPY)
     1255    G2frame.Bind(wx.EVT_MENU,OnBackFlagCopy,id=G2G.wxID_BACKFLAGCOPY)
     1256    G2frame.Bind(wx.EVT_MENU,OnPeaksMove,id=G2G.wxID_PEAKSMOVE)
     1257    G2frame.Bind(wx.EVT_MENU,OnMakeRDF,id=G2G.wxID_MAKEBACKRDF)
    12581258    G2frame.Bind(wx.EVT_MENU,OnBkgFit,id=G2frame.dataWindow.wxID_BackPts['Fit'])
    12591259    G2frame.Bind(wx.EVT_MENU,OnBkgClear,id=G2frame.dataWindow.wxID_BackPts['Clear'])   
     
    13501350    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Limits')
    13511351    G2frame.SetTitle('Limits')
    1352     G2frame.Bind(wx.EVT_MENU,OnLimitCopy,id=G2gd.wxID_LIMITCOPY)
    1353     G2frame.Bind(wx.EVT_MENU,OnAddExcl,id=G2gd.wxID_ADDEXCLREGION)
     1352    G2frame.Bind(wx.EVT_MENU,OnLimitCopy,id=G2G.wxID_LIMITCOPY)
     1353    G2frame.Bind(wx.EVT_MENU,OnAddExcl,id=G2G.wxID_ADDEXCLREGION)
    13541354    Draw()
    13551355   
     
    19711971        G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.InstMenu)
    19721972        G2frame.GetStatusBar().SetStatusText('NB: Azimuth is used for polarization only',1)
    1973         G2frame.Bind(wx.EVT_MENU,OnCalibrate,id=G2gd.wxID_INSTCALIB)
    1974         G2frame.Bind(wx.EVT_MENU,OnLoad,id=G2gd.wxID_INSTLOAD)
    1975         G2frame.Bind(wx.EVT_MENU,OnSave,id=G2gd.wxID_INSTSAVE)
    1976         G2frame.Bind(wx.EVT_MENU,OnSaveAll,id=G2gd.wxID_INSTSAVEALL)
    1977         G2frame.Bind(wx.EVT_MENU,OnReset,id=G2gd.wxID_INSTPRMRESET)
    1978         G2frame.Bind(wx.EVT_MENU,OnInstCopy,id=G2gd.wxID_INSTCOPY)
    1979         G2frame.Bind(wx.EVT_MENU,OnInstFlagCopy,id=G2gd.wxID_INSTFLAGCOPY)
    1980         #G2frame.Bind(wx.EVT_MENU,OnWaveChange,id=G2gd.wxID_CHANGEWAVETYPE)       
    1981         G2frame.Bind(wx.EVT_MENU,OnCopy1Val,id=G2gd.wxID_INST1VAL)
     1973        G2frame.Bind(wx.EVT_MENU,OnCalibrate,id=G2G.wxID_INSTCALIB)
     1974        G2frame.Bind(wx.EVT_MENU,OnLoad,id=G2G.wxID_INSTLOAD)
     1975        G2frame.Bind(wx.EVT_MENU,OnSave,id=G2G.wxID_INSTSAVE)
     1976        G2frame.Bind(wx.EVT_MENU,OnSaveAll,id=G2G.wxID_INSTSAVEALL)
     1977        G2frame.Bind(wx.EVT_MENU,OnReset,id=G2G.wxID_INSTPRMRESET)
     1978        G2frame.Bind(wx.EVT_MENU,OnInstCopy,id=G2G.wxID_INSTCOPY)
     1979        G2frame.Bind(wx.EVT_MENU,OnInstFlagCopy,id=G2G.wxID_INSTFLAGCOPY)
     1980        #G2frame.Bind(wx.EVT_MENU,OnWaveChange,id=G2G.wxID_CHANGEWAVETYPE)       
     1981        G2frame.Bind(wx.EVT_MENU,OnCopy1Val,id=G2G.wxID_INST1VAL)
    19821982    elif 'L' in insVal['Type'] or 'R' in insVal['Type']:                   #SASD data menu commands
    19831983        G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.SASDInstMenu)
    1984         G2frame.Bind(wx.EVT_MENU,OnInstCopy,id=G2gd.wxID_INSTCOPY)
     1984        G2frame.Bind(wx.EVT_MENU,OnInstCopy,id=G2G.wxID_INSTCOPY)
    19851985    MakeParameterWindow()
    19861986       
     
    23472347    #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Sample Parameters')
    23482348    G2frame.SetTitle('Sample Parameters')
    2349     G2frame.Bind(wx.EVT_MENU, OnSetScale, id=G2gd.wxID_SETSCALE)
    2350     G2frame.Bind(wx.EVT_MENU, OnSampleCopy, id=G2gd.wxID_SAMPLECOPY)
    2351     G2frame.Bind(wx.EVT_MENU, OnSampleCopySelected, id=G2gd.wxID_SAMPLECOPYSOME)
    2352     G2frame.Bind(wx.EVT_MENU, OnSampleFlagCopy, id=G2gd.wxID_SAMPLEFLAGCOPY)
    2353     G2frame.Bind(wx.EVT_MENU, OnSampleSave, id=G2gd.wxID_SAMPLESAVE)
    2354     G2frame.Bind(wx.EVT_MENU, OnSampleLoad, id=G2gd.wxID_SAMPLELOAD)
    2355     G2frame.Bind(wx.EVT_MENU, OnCopy1Val, id=G2gd.wxID_SAMPLE1VAL)
    2356     G2frame.Bind(wx.EVT_MENU, OnAllSampleLoad, id=G2gd.wxID_ALLSAMPLELOAD)
    2357     G2frame.Bind(wx.EVT_MENU, OnRescaleAll, id=G2gd.wxID_RESCALEALL)
     2349    G2frame.Bind(wx.EVT_MENU, OnSetScale, id=G2G.wxID_SETSCALE)
     2350    G2frame.Bind(wx.EVT_MENU, OnSampleCopy, id=G2G.wxID_SAMPLECOPY)
     2351    G2frame.Bind(wx.EVT_MENU, OnSampleCopySelected, id=G2G.wxID_SAMPLECOPYSOME)
     2352    G2frame.Bind(wx.EVT_MENU, OnSampleFlagCopy, id=G2G.wxID_SAMPLEFLAGCOPY)
     2353    G2frame.Bind(wx.EVT_MENU, OnSampleSave, id=G2G.wxID_SAMPLESAVE)
     2354    G2frame.Bind(wx.EVT_MENU, OnSampleLoad, id=G2G.wxID_SAMPLELOAD)
     2355    G2frame.Bind(wx.EVT_MENU, OnCopy1Val, id=G2G.wxID_SAMPLE1VAL)
     2356    G2frame.Bind(wx.EVT_MENU, OnAllSampleLoad, id=G2G.wxID_ALLSAMPLELOAD)
     2357    G2frame.Bind(wx.EVT_MENU, OnRescaleAll, id=G2G.wxID_RESCALEALL)
    23582358    if histName[:4] in ['SASD','REFD','PWDR']:
    23592359        G2frame.dataWindow.SetScale.Enable(True)
     
    25692569    if 'PWD' in G2frame.GPXtree.GetItemText(G2frame.PatternId):
    25702570        G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.IndPeaksMenu)
    2571         G2frame.Bind(wx.EVT_MENU, OnReload, id=G2gd.wxID_INDXRELOAD)
     2571        G2frame.Bind(wx.EVT_MENU, OnReload, id=G2G.wxID_INDXRELOAD)
    25722572    G2frame.dataWindow.IndexPeaks.Enable(False)
    25732573    G2frame.IndexPeaksTable = []
     
    31153115    G2frame.SetTitle('Unit cells')
    31163116    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.IndexMenu)
    3117     G2frame.Bind(wx.EVT_MENU, OnIndexPeaks, id=G2gd.wxID_INDEXPEAKS)
    3118     G2frame.Bind(wx.EVT_MENU, CopyUnitCell, id=G2gd.wxID_COPYCELL)
    3119     G2frame.Bind(wx.EVT_MENU, RefineCell, id=G2gd.wxID_REFINECELL)
    3120     G2frame.Bind(wx.EVT_MENU, MakeNewPhase, id=G2gd.wxID_MAKENEWPHASE)
    3121     G2frame.Bind(wx.EVT_MENU, OnExportCells, id=G2gd.wxID_EXPORTCELLS)
     3117    G2frame.Bind(wx.EVT_MENU, OnIndexPeaks, id=G2G.wxID_INDEXPEAKS)
     3118    G2frame.Bind(wx.EVT_MENU, CopyUnitCell, id=G2G.wxID_COPYCELL)
     3119    G2frame.Bind(wx.EVT_MENU, RefineCell, id=G2G.wxID_REFINECELL)
     3120    G2frame.Bind(wx.EVT_MENU, MakeNewPhase, id=G2G.wxID_MAKENEWPHASE)
     3121    G2frame.Bind(wx.EVT_MENU, OnExportCells, id=G2G.wxID_EXPORTCELLS)
    31223122       
    31233123    controls,bravais,cells,dminx,ssopt = data
     
    35623562    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.ReflMenu)
    35633563    if HKLF:
    3564         G2frame.Bind(wx.EVT_MENU, OnPlotHKL, id=G2gd.wxID_PWDHKLPLOT)
    3565         G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=G2gd.wxID_PWD3DHKLPLOT)
     3564        G2frame.Bind(wx.EVT_MENU, OnPlotHKL, id=G2G.wxID_PWDHKLPLOT)
     3565        G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=G2G.wxID_PWD3DHKLPLOT)
    35663566        G2frame.dataWindow.SelectPhase.Enable(False)
    35673567    else:
    3568         G2frame.Bind(wx.EVT_MENU, OnSelectPhase, id=G2gd.wxID_SELECTPHASE)
    3569         G2frame.Bind(wx.EVT_MENU, OnPlotHKL, id=G2gd.wxID_PWDHKLPLOT)
    3570         G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=G2gd.wxID_PWD3DHKLPLOT)
     3568        G2frame.Bind(wx.EVT_MENU, OnSelectPhase, id=G2G.wxID_SELECTPHASE)
     3569        G2frame.Bind(wx.EVT_MENU, OnPlotHKL, id=G2G.wxID_PWDHKLPLOT)
     3570        G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=G2G.wxID_PWD3DHKLPLOT)
    35713571        G2frame.dataWindow.SelectPhase.Enable(False)
    35723572           
     
    39273927    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.SubstanceMenu)
    39283928    G2frame.SetTitle('Substances')
    3929     G2frame.Bind(wx.EVT_MENU, OnLoadSubstance, id=G2gd.wxID_LOADSUBSTANCE)   
    3930     G2frame.Bind(wx.EVT_MENU, OnReloadSubstances, id=G2gd.wxID_RELOADSUBSTANCES)   
    3931     G2frame.Bind(wx.EVT_MENU, OnAddSubstance, id=G2gd.wxID_ADDSUBSTANCE)
    3932     G2frame.Bind(wx.EVT_MENU, OnCopySubstance, id=G2gd.wxID_COPYSUBSTANCE)
    3933     G2frame.Bind(wx.EVT_MENU, OnDeleteSubstance, id=G2gd.wxID_DELETESUBSTANCE)   
    3934     G2frame.Bind(wx.EVT_MENU, OnAddElement, id=G2gd.wxID_ELEMENTADD)
    3935     G2frame.Bind(wx.EVT_MENU, OnDeleteElement, id=G2gd.wxID_ELEMENTDELETE)
     3929    G2frame.Bind(wx.EVT_MENU, OnLoadSubstance, id=G2G.wxID_LOADSUBSTANCE)   
     3930    G2frame.Bind(wx.EVT_MENU, OnReloadSubstances, id=G2G.wxID_RELOADSUBSTANCES)   
     3931    G2frame.Bind(wx.EVT_MENU, OnAddSubstance, id=G2G.wxID_ADDSUBSTANCE)
     3932    G2frame.Bind(wx.EVT_MENU, OnCopySubstance, id=G2G.wxID_COPYSUBSTANCE)
     3933    G2frame.Bind(wx.EVT_MENU, OnDeleteSubstance, id=G2G.wxID_DELETESUBSTANCE)   
     3934    G2frame.Bind(wx.EVT_MENU, OnAddElement, id=G2G.wxID_ELEMENTADD)
     3935    G2frame.Bind(wx.EVT_MENU, OnDeleteElement, id=G2G.wxID_ELEMENTDELETE)
    39363936    mainSizer = wx.BoxSizer(wx.VERTICAL)
    39373937    mainSizer.Add(SubstSizer(),0)
     
    45864586    G2frame.dataWindow.ClearData()
    45874587    G2frame.SetTitle('Modelling')
    4588     G2frame.Bind(wx.EVT_MENU, OnCopyModel, id=G2gd.wxID_MODELCOPY)
    4589     G2frame.Bind(wx.EVT_MENU, OnCopyFlags, id=G2gd.wxID_MODELCOPYFLAGS)
    4590     G2frame.Bind(wx.EVT_MENU, OnFitModel, id=G2gd.wxID_MODELFIT)
    4591     G2frame.Bind(wx.EVT_MENU, OnFitModelAll, id=G2gd.wxID_MODELFITALL)
    4592     G2frame.Bind(wx.EVT_MENU, OnUnDo, id=G2gd.wxID_MODELUNDO)
    4593     G2frame.Bind(wx.EVT_MENU, OnAddModel, id=G2gd.wxID_MODELADD)
     4588    G2frame.Bind(wx.EVT_MENU, OnCopyModel, id=G2G.wxID_MODELCOPY)
     4589    G2frame.Bind(wx.EVT_MENU, OnCopyFlags, id=G2G.wxID_MODELCOPYFLAGS)
     4590    G2frame.Bind(wx.EVT_MENU, OnFitModel, id=G2G.wxID_MODELFIT)
     4591    G2frame.Bind(wx.EVT_MENU, OnFitModelAll, id=G2G.wxID_MODELFITALL)
     4592    G2frame.Bind(wx.EVT_MENU, OnUnDo, id=G2G.wxID_MODELUNDO)
     4593    G2frame.Bind(wx.EVT_MENU, OnAddModel, id=G2G.wxID_MODELADD)
    45944594    Indx = {}
    45954595    mainSizer = G2frame.dataWindow.GetSizer()
     
    51705170    G2frame.SetTitle('Modelling')
    51715171    G2frame.dataWindow.ClearData()
    5172     G2frame.Bind(wx.EVT_MENU, OnCopyModel, id=G2gd.wxID_MODELCOPY)
    5173     G2frame.Bind(wx.EVT_MENU, OnModelPlot, id=G2gd.wxID_MODELPLOT)
    5174     G2frame.Bind(wx.EVT_MENU, OnFitModel, id=G2gd.wxID_MODELFIT)
    5175     G2frame.Bind(wx.EVT_MENU, OnFitModelAll, id=G2gd.wxID_MODELFITALL)
    5176     G2frame.Bind(wx.EVT_MENU, OnUnDo, id=G2gd.wxID_MODELUNDO)
     5172    G2frame.Bind(wx.EVT_MENU, OnCopyModel, id=G2G.wxID_MODELCOPY)
     5173    G2frame.Bind(wx.EVT_MENU, OnModelPlot, id=G2G.wxID_MODELPLOT)
     5174    G2frame.Bind(wx.EVT_MENU, OnFitModel, id=G2G.wxID_MODELFIT)
     5175    G2frame.Bind(wx.EVT_MENU, OnFitModelAll, id=G2G.wxID_MODELFITALL)
     5176    G2frame.Bind(wx.EVT_MENU, OnUnDo, id=G2G.wxID_MODELUNDO)
    51775177    mainSizer = G2frame.dataWindow.GetSizer()
    51785178    mainSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Reflectometry fitting for: '+Name),0,WACV)
     
    59745974    else:
    59755975        G2frame.dataWindow.PDFMenu.EnableTop(0,enable=False)
    5976     G2frame.Bind(wx.EVT_MENU, OnCopyPDFControls, id=G2gd.wxID_PDFCOPYCONTROLS)
    5977     G2frame.Bind(wx.EVT_MENU, OnSavePDFControls, id=G2gd.wxID_PDFSAVECONTROLS)
    5978     G2frame.Bind(wx.EVT_MENU, OnLoadPDFControls, id=G2gd.wxID_PDFLOADCONTROLS)
    5979     G2frame.Bind(wx.EVT_MENU, OnAddElement, id=G2gd.wxID_PDFADDELEMENT)
    5980     G2frame.Bind(wx.EVT_MENU, OnDeleteElement, id=G2gd.wxID_PDFDELELEMENT)
    5981     G2frame.Bind(wx.EVT_MENU, OnComputePDF, id=G2gd.wxID_PDFCOMPUTE)
    5982     G2frame.Bind(wx.EVT_MENU, OnComputeAllPDF, id=G2gd.wxID_PDFCOMPUTEALL)
     5976    G2frame.Bind(wx.EVT_MENU, OnCopyPDFControls, id=G2G.wxID_PDFCOPYCONTROLS)
     5977    G2frame.Bind(wx.EVT_MENU, OnSavePDFControls, id=G2G.wxID_PDFSAVECONTROLS)
     5978    G2frame.Bind(wx.EVT_MENU, OnLoadPDFControls, id=G2G.wxID_PDFLOADCONTROLS)
     5979    G2frame.Bind(wx.EVT_MENU, OnAddElement, id=G2G.wxID_PDFADDELEMENT)
     5980    G2frame.Bind(wx.EVT_MENU, OnDeleteElement, id=G2G.wxID_PDFDELELEMENT)
     5981    G2frame.Bind(wx.EVT_MENU, OnComputePDF, id=G2G.wxID_PDFCOMPUTE)
     5982    G2frame.Bind(wx.EVT_MENU, OnComputeAllPDF, id=G2G.wxID_PDFCOMPUTEALL)
    59835983
    59845984    mainSizer = G2frame.dataWindow.GetSizer()
     
    61576157
    61586158    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.PDFPksMenu)
    6159     G2frame.Bind(wx.EVT_MENU, OnCopyPDFPeaks, id=G2gd.wxID_PDFCOPYPEAKS)
    6160     G2frame.Bind(wx.EVT_MENU, OnFitPDFpeaks, id=G2gd.wxID_PDFPKSFIT)
    6161     G2frame.Bind(wx.EVT_MENU, OnFitAllPDFpeaks, id=G2gd.wxID_PDFPKSFITALL)
    6162     G2frame.Bind(wx.EVT_MENU, OnClearPDFpeaks, id=G2gd.wxID_CLEARPDFPEAKS)
     6159    G2frame.Bind(wx.EVT_MENU, OnCopyPDFPeaks, id=G2G.wxID_PDFCOPYPEAKS)
     6160    G2frame.Bind(wx.EVT_MENU, OnFitPDFpeaks, id=G2G.wxID_PDFPKSFIT)
     6161    G2frame.Bind(wx.EVT_MENU, OnFitAllPDFpeaks, id=G2G.wxID_PDFPKSFITALL)
     6162    G2frame.Bind(wx.EVT_MENU, OnClearPDFpeaks, id=G2G.wxID_CLEARPDFPEAKS)
    61636163    mainSizer = G2frame.dataWindow.GetSizer()
    61646164    mainSizer.Add((5,5),0)
  • branch/2frame/GSASIIrestrGUI.py

    r2914 r2917  
    868868                Bonds.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    869869                Bonds.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    870                 G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    871                 G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
    872                 G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     870                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2G.wxID_RESTDELETE)
     871                G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2G.wxID_RESRCHANGEVAL)
     872                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2G.wxID_RESTCHANGEESD)
    873873                mainSizer.Add(wx.StaticText(BondRestr,-1,
    874874                    'Bond restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    10031003                Angles.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    10041004                Angles.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1005                 G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1006                 G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
    1007                 G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1005                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2G.wxID_RESTDELETE)
     1006                G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2G.wxID_RESRCHANGEVAL)
     1007                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2G.wxID_RESTCHANGEESD)
    10081008                mainSizer.Add(wx.StaticText(AngleRestr,-1,
    10091009                    'Angle restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    11301130                Planes.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    11311131                Planes.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1132                 G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1133                 G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1132                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2G.wxID_RESTDELETE)
     1133                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2G.wxID_RESTCHANGEESD)
    11341134                mainSizer.Add(wx.StaticText(PlaneRestr,-1,
    11351135                    'Plane restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    12581258                Volumes.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    12591259                Volumes.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1260                 G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1261                 G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
    1262                 G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1260                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2G.wxID_RESTDELETE)
     1261                G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2G.wxID_RESRCHANGEVAL)
     1262                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2G.wxID_RESTCHANGEESD)
    12631263                mainSizer.Add(wx.StaticText(ChiralRestr,-1,
    12641264                    'Chiral volume restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    13591359                TorsionRestr.Torsions.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    13601360                TorsionRestr.Torsions.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1361                 G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1362                 G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1361                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2G.wxID_RESTDELETE)
     1362                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2G.wxID_RESTCHANGEESD)
    13631363                mainSizer.Add(wx.StaticText(TorsionRestr,-1,
    13641364                    'Torsion restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    14791479                RamaRestr.Ramas.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    14801480                RamaRestr.Ramas.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1481                 G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1482                 G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1481                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2G.wxID_RESTDELETE)
     1482                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2G.wxID_RESTCHANGEESD)
    14831483                mainSizer.Add(wx.StaticText(RamaRestr,-1,
    14841484                    'Ramachandran restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    16301630                ChemComps.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    16311631                ChemComps.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1632                 G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1633                 G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
     1632                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2G.wxID_RESTDELETE)
     1633                G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2G.wxID_RESRCHANGEVAL)
    16341634                mainSizer.Add(wx.StaticText(ChemCompRestr,-1,
    16351635                    'Chemical composition restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    17101710            Textures.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    17111711            Textures.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1712             G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     1712            G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2G.wxID_RESTDELETE)
    17131713            mainSizer.Add(Textures,0,)
    17141714        else:
     
    17251725        #G2frame.restrBook.SetSize(G2frame.dataWindow.GetClientSize())    #TODO -almost right
    17261726        text = G2frame.restrBook.GetPageText(page)
    1727         G2frame.dataWindow.RestraintEdit.SetLabel(G2gd.wxID_RESRCHANGEVAL,'Change value')
     1727        G2frame.dataWindow.RestraintEdit.SetLabel(G2G.wxID_RESRCHANGEVAL,'Change value')
    17281728        if text == 'Bond':
    17291729            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)
    1730             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTRAINTADD,True)
    1731             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESRCHANGEVAL,True)
     1730            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,True)
     1731            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,True)
    17321732            bondRestData = restrData['Bond']
    17331733            UpdateBondRestr(bondRestData)
    17341734        elif text == 'Angle':
    17351735            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)
    1736             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTRAINTADD,True)
    1737             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESRCHANGEVAL,True)
     1736            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,True)
     1737            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,True)
    17381738            angleRestData = restrData['Angle']
    17391739            UpdateAngleRestr(angleRestData)
    17401740        elif text == 'Plane':
    17411741            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)
    1742             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTRAINTADD,True)
    1743             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESRCHANGEVAL,False)
     1742            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,True)
     1743            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,False)
    17441744            planeRestData = restrData['Plane']
    17451745            UpdatePlaneRestr(planeRestData)
    17461746        elif text == 'Chiral':
    17471747            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)
    1748             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTRAINTADD,False)
    1749             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESRCHANGEVAL,True)
     1748            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,False)
     1749            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,True)
    17501750            chiralRestData = restrData['Chiral']
    17511751            UpdateChiralRestr(chiralRestData)
    17521752        elif text == 'Torsion':
    17531753            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)
    1754             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTRAINTADD,False)
    1755             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESRCHANGEVAL,False)
    1756             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_AARESTRAINTPLOT,True)
     1754            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,False)
     1755            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,False)
     1756            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_AARESTRAINTPLOT,True)
    17571757            torsionRestData = restrData['Torsion']
    17581758            UpdateTorsionRestr(torsionRestData)
    17591759        elif text == 'Ramachandran':
    17601760            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)
    1761             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTRAINTADD,False)
    1762             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESRCHANGEVAL,False)
    1763             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_AARESTRAINTPLOT,True)
     1761            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,False)
     1762            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,False)
     1763            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_AARESTRAINTPLOT,True)
    17641764            ramaRestData = restrData['Rama']
    17651765            UpdateRamaRestr(ramaRestData)
     
    17671767        elif text == 'Chem. comp.':
    17681768            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)
    1769             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTRAINTADD,True)
    1770             G2frame.dataWindow.RestraintEdit.SetLabel(G2gd.wxID_RESRCHANGEVAL,'Change factor')
    1771             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESRCHANGEVAL,True)
    1772             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTCHANGEESD,False)
     1769            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,True)
     1770            G2frame.dataWindow.RestraintEdit.SetLabel(G2G.wxID_RESRCHANGEVAL,'Change factor')
     1771            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,True)
     1772            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTCHANGEESD,False)
    17731773            chemcompRestData = restrData['ChemComp']
    17741774            UpdateChemcompRestr(chemcompRestData)
    17751775        elif text == 'Texture':
    17761776            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)
    1777             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTRAINTADD,True)
    1778             G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESRCHANGEVAL,True)
     1777            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,True)
     1778            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,True)
    17791779            textureRestData = restrData['Texture']
    17801780            UpdateTextureRestr(textureRestData)
     
    18611861    ramaName = 'All'
    18621862    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RestraintMenu)   
    1863     G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTSELPHASE,False)
     1863    G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTSELPHASE,False)
    18641864    if len(Phases) > 1:
    1865         G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTSELPHASE,True)
    1866         G2frame.Bind(wx.EVT_MENU, OnSelectPhase, id=G2gd.wxID_RESTSELPHASE)
    1867     G2frame.Bind(wx.EVT_MENU, OnAddRestraint, id=G2gd.wxID_RESTRAINTADD)
     1865        G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTSELPHASE,True)
     1866        G2frame.Bind(wx.EVT_MENU, OnSelectPhase, id=G2G.wxID_RESTSELPHASE)
     1867    G2frame.Bind(wx.EVT_MENU, OnAddRestraint, id=G2G.wxID_RESTRAINTADD)
    18681868    if 'macro' in phasedata['General']['Type']:
    1869         G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_AARESTRAINTADD,True)
    1870         G2frame.Bind(wx.EVT_MENU, OnAddAARestraint, id=G2gd.wxID_AARESTRAINTADD)
    1871         G2frame.Bind(wx.EVT_MENU, OnPlotAARestraint, id=G2gd.wxID_AARESTRAINTPLOT)
     1869        G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_AARESTRAINTADD,True)
     1870        G2frame.Bind(wx.EVT_MENU, OnAddAARestraint, id=G2G.wxID_AARESTRAINTADD)
     1871        G2frame.Bind(wx.EVT_MENU, OnPlotAARestraint, id=G2G.wxID_AARESTRAINTPLOT)
    18721872   
    18731873    # GUI defined here
Note: See TracChangeset for help on using the changeset viewer.