Changeset 135
- Timestamp:
- Jul 27, 2010 6:04:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r122 r135 38 38 return GSASII(parent) 39 39 40 [wxID_ GSASII, wxID_GSASIIPATTERNTREE, wxID_GSASIIDATA, wxID_GSASIIPICKGRID,41 ] = [wx.NewId() for _init_ctrls in range( 4)]42 43 [wxID_ GSASIIFILECLOSE, wxID_GSASIIFILEEXIT, wxID_GSASIIFILEOPEN,44 wxID_ GSASIIFILESAVE, wxID_GSASIIFILESAVEAS, wxID_GSASIIUNDO,40 [wxID_PATTERNTREE, 41 ] = [wx.NewId() for _init_ctrls in range(1)] 42 43 [wxID_FILECLOSE, wxID_FILEEXIT, wxID_FILEOPEN, 44 wxID_FILESAVE, wxID_FILESAVEAS, wxID_UNDO, 45 45 ] = [wx.NewId() for _init_coll_File_Items in range(6)] 46 46 47 [wxID_ GSASIIPWDRREAD,wxID_GSASIISNGLREAD,wxID_GSASIIADDPHASE,wxID_GSASIIDELETEPHASE,48 wxID_ GSASIIDATADELETE,wxID_GSASIIREADPEAKS,wxID_GSASIIPWDSUM,wxID_GSASIIIMGREAD,49 wxID_ GSASIIIMSUM,50 ] = [wx.NewId() for _init_coll_Data_Items in range( 9)]51 52 [wxID_ GSASIIIMPORT, wxID_GSASIIIMPORTPATTERN, wxID_GSASIIIMPORTHKL, wxID_GSASIIIMPORTPHASE,53 wxID_ GSASIIIMPORTCIF, wxID_GSASIIIMPORTPDB,47 [wxID_PWDRREAD,wxID_SNGLREAD,wxID_ADDPHASE,wxID_DELETEPHASE, 48 wxID_DATADELETE,wxID_READPEAKS,wxID_PWDSUM,wxID_IMGREAD, 49 wxID_IMSUM, wxID_DATARENAME, 50 ] = [wx.NewId() for _init_coll_Data_Items in range(10)] 51 52 [wxID_IMPORT, wxID_IMPORTPATTERN, wxID_IMPORTHKL, wxID_IMPORTPHASE, 53 wxID_IMPORTCIF, wxID_IMPORTPDB, 54 54 ] = [wx.NewId() for _init_coll_Import_Items in range(6)] 55 55 56 [wxID_ GSAIIEXPORT, wxID_GSASIIEXPORTPATTERN, wxID_GSASIIEXPORTHKL, wxID_GSASIIEXPORTPHASE,57 wxID_ GSASIIEXPORTCIF, wxID_GSASIIEXPORTPEAKLIST56 [wxID_EXPORT, wxID_EXPORTPATTERN, wxID_EXPORTHKL, wxID_EXPORTPHASE, 57 wxID_EXPORTCIF, wxID_EXPORTPEAKLIST 58 58 ] = [wx.NewId() for _init_coll_Export_Items in range(6)] 59 59 60 [wxID_ GSASIIHELPABOUT, wxID_GSASIIHELPHELP,60 [wxID_HELPABOUT, wxID_HELPHELP, 61 61 ] = [wx.NewId() for _init_coll_Help_Items in range(2)] 62 62 … … 72 72 73 73 def _init_coll_File_Items(self, parent): 74 parent.Append(help='Open a gsasii project file (*.gpx)', id=wxID_ GSASIIFILEOPEN,74 parent.Append(help='Open a gsasii project file (*.gpx)', id=wxID_FILEOPEN, 75 75 kind=wx.ITEM_NORMAL,text='Open project...') 76 parent.Append(help='SAve project to old file', id=wxID_ GSASIIFILESAVE,76 parent.Append(help='SAve project to old file', id=wxID_FILESAVE, 77 77 kind=wx.ITEM_NORMAL,text='Save project') 78 parent.Append(help='Save project to new file', id=wxID_ GSASIIFILESAVEAS,78 parent.Append(help='Save project to new file', id=wxID_FILESAVEAS, 79 79 kind=wx.ITEM_NORMAL,text='Save As...') 80 parent.Append(help='Close project, saving is optional', id=wxID_ GSASIIFILECLOSE,80 parent.Append(help='Close project, saving is optional', id=wxID_FILECLOSE, 81 81 kind=wx.ITEM_NORMAL,text='Close project') 82 parent.Append(help='Exit from gsasii', id=wxID_ GSASIIFILEEXIT, kind=wx.ITEM_NORMAL,82 parent.Append(help='Exit from gsasii', id=wxID_FILEEXIT, kind=wx.ITEM_NORMAL, 83 83 text='Exit') 84 self.Bind(wx.EVT_MENU, self.OnFileOpen Menu, id=wxID_GSASIIFILEOPEN)85 self.Bind(wx.EVT_MENU, self.OnFileSave Menu, id=wxID_GSASIIFILESAVE)86 self.Bind(wx.EVT_MENU, self.OnFileSaveas Menu, id=wxID_GSASIIFILESAVEAS)87 self.Bind(wx.EVT_MENU, self.OnFileClose Menu, id=wxID_GSASIIFILECLOSE)88 self.Bind(wx.EVT_MENU, self.OnFileExit Menu, id=wxID_GSASIIFILEEXIT)84 self.Bind(wx.EVT_MENU, self.OnFileOpen, id=wxID_FILEOPEN) 85 self.Bind(wx.EVT_MENU, self.OnFileSave, id=wxID_FILESAVE) 86 self.Bind(wx.EVT_MENU, self.OnFileSaveas, id=wxID_FILESAVEAS) 87 self.Bind(wx.EVT_MENU, self.OnFileClose, id=wxID_FILECLOSE) 88 self.Bind(wx.EVT_MENU, self.OnFileExit, id=wxID_FILEEXIT) 89 89 90 90 def _init_coll_Data_Items(self,parent): 91 parent.Append(help='', id=wxID_ GSASIIPWDRREAD, kind=wx.ITEM_NORMAL,91 parent.Append(help='', id=wxID_PWDRREAD, kind=wx.ITEM_NORMAL, 92 92 text='Read powder data...') 93 parent.Append(help='',id=wxID_ GSASIIIMGREAD, kind=wx.ITEM_NORMAL,93 parent.Append(help='',id=wxID_IMGREAD, kind=wx.ITEM_NORMAL, 94 94 text='Read image data...') 95 parent.Append(help='',id=wxID_ GSASIIREADPEAKS, kind=wx.ITEM_NORMAL,95 parent.Append(help='',id=wxID_READPEAKS, kind=wx.ITEM_NORMAL, 96 96 text='Read Powder Pattern Peaks...') 97 parent.Append(help='', id=wxID_ GSASIISNGLREAD, kind=wx.ITEM_NORMAL,97 parent.Append(help='', id=wxID_SNGLREAD, kind=wx.ITEM_NORMAL, 98 98 text='Read single crystal data...') 99 parent.Append(help='', id=wxID_ GSASIIPWDSUM, kind=wx.ITEM_NORMAL,99 parent.Append(help='', id=wxID_PWDSUM, kind=wx.ITEM_NORMAL, 100 100 text='Sum powder data') 101 parent.Append(help='',id=wxID_ GSASIIIMSUM, kind=wx.ITEM_NORMAL,101 parent.Append(help='',id=wxID_IMSUM, kind=wx.ITEM_NORMAL, 102 102 text='Sum image data') 103 parent.Append(help='', id=wxID_ GSASIIADDPHASE, kind=wx.ITEM_NORMAL,103 parent.Append(help='', id=wxID_ADDPHASE, kind=wx.ITEM_NORMAL, 104 104 text='Add phase') 105 parent.Append(help='', id=wxID_ GSASIIDELETEPHASE, kind=wx.ITEM_NORMAL,105 parent.Append(help='', id=wxID_DELETEPHASE, kind=wx.ITEM_NORMAL, 106 106 text='Delete phase') 107 parent.Append(help='', id=wxID_GSASIIDATADELETE, kind=wx.ITEM_NORMAL, 107 parent.Append(help='', id=wxID_DATARENAME, kind=wx.ITEM_NORMAL, 108 text='Rename data') 109 parent.Append(help='', id=wxID_DATADELETE, kind=wx.ITEM_NORMAL, 108 110 text='Delete data') 109 self.Bind(wx.EVT_MENU, self.OnPwdrReadMenu, id=wxID_GSASIIPWDRREAD) 110 self.Bind(wx.EVT_MENU, self.OnPwdrSumMenu, id=wxID_GSASIIPWDSUM) 111 self.Bind(wx.EVT_MENU, self.OnReadPowderPeaks, id=wxID_GSASIIREADPEAKS) 112 self.Bind(wx.EVT_MENU, self.OnImageRead, id=wxID_GSASIIIMGREAD) 113 self.Bind(wx.EVT_MENU, self.OnImageSum, id=wxID_GSASIIIMSUM) 114 self.Bind(wx.EVT_MENU, self.OnSnglReadMenu, id=wxID_GSASIISNGLREAD) 115 self.Bind(wx.EVT_MENU, self.OnAddPhase, id=wxID_GSASIIADDPHASE) 116 self.Bind(wx.EVT_MENU, self.OnDeletePhase, id=wxID_GSASIIDELETEPHASE) 117 self.Bind(wx.EVT_MENU, self.OnDataDeleteMenu, id=wxID_GSASIIDATADELETE) 111 self.Bind(wx.EVT_MENU, self.OnPwdrRead, id=wxID_PWDRREAD) 112 self.Bind(wx.EVT_MENU, self.OnPwdrSum, id=wxID_PWDSUM) 113 self.Bind(wx.EVT_MENU, self.OnReadPowderPeaks, id=wxID_READPEAKS) 114 self.Bind(wx.EVT_MENU, self.OnImageRead, id=wxID_IMGREAD) 115 self.Bind(wx.EVT_MENU, self.OnImageSum, id=wxID_IMSUM) 116 self.Bind(wx.EVT_MENU, self.OnSnglRead, id=wxID_SNGLREAD) 117 self.Bind(wx.EVT_MENU, self.OnAddPhase, id=wxID_ADDPHASE) 118 self.Bind(wx.EVT_MENU, self.OnDeletePhase, id=wxID_DELETEPHASE) 119 self.Bind(wx.EVT_MENU, self.OnRenameData, id=wxID_DATARENAME) 120 self.Bind(wx.EVT_MENU, self.OnDataDelete, id=wxID_DATADELETE) 118 121 119 122 def _init_coll_Calculate_Items(self,parent): 120 self.UnDo = parent.Append(help='', id=wxID_ GSASIIUNDO, kind=wx.ITEM_NORMAL,123 self.UnDo = parent.Append(help='', id=wxID_UNDO, kind=wx.ITEM_NORMAL, 121 124 text='UnDo') 122 125 self.UnDo.Enable(False) 123 self.Bind(wx.EVT_MENU, self.OnUnDo, id=wxID_ GSASIIUNDO)126 self.Bind(wx.EVT_MENU, self.OnUnDo, id=wxID_UNDO) 124 127 125 128 def _init_coll_Import_Items(self,parent): 126 129 self.ImportPhase = parent.Append(help='Import phase data from GSAS EXP file', 127 id=wxID_ GSASIIIMPORTPHASE, kind=wx.ITEM_NORMAL,text='Import GSAS EXP Phase...')130 id=wxID_IMPORTPHASE, kind=wx.ITEM_NORMAL,text='Import GSAS EXP Phase...') 128 131 self.ImportPDB = parent.Append(help='Import phase data from PDB file', 129 id=wxID_ GSASIIIMPORTPDB, kind=wx.ITEM_NORMAL,text='Import PDB Phase...')130 self.ImportPattern = parent.Append(help='',id=wxID_ GSASIIIMPORTPATTERN, kind=wx.ITEM_NORMAL,132 id=wxID_IMPORTPDB, kind=wx.ITEM_NORMAL,text='Import PDB Phase...') 133 self.ImportPattern = parent.Append(help='',id=wxID_IMPORTPATTERN, kind=wx.ITEM_NORMAL, 131 134 text='Import Powder Pattern...') 132 self.ImportHKL = parent.Append(help='',id=wxID_ GSASIIIMPORTHKL, kind=wx.ITEM_NORMAL,135 self.ImportHKL = parent.Append(help='',id=wxID_IMPORTHKL, kind=wx.ITEM_NORMAL, 133 136 text='Import HKLs...') 134 self.ImportCIF = parent.Append(help='',id=wxID_ GSASIIIMPORTCIF, kind=wx.ITEM_NORMAL,137 self.ImportCIF = parent.Append(help='',id=wxID_IMPORTCIF, kind=wx.ITEM_NORMAL, 135 138 text='Import CIF...') 136 self.Bind(wx.EVT_MENU, self.OnImportPhase, id=wxID_ GSASIIIMPORTPHASE)137 self.Bind(wx.EVT_MENU, self.OnImportPDB, id=wxID_ GSASIIIMPORTPDB)138 self.Bind(wx.EVT_MENU, self.OnImportPattern, id=wxID_ GSASIIIMPORTPATTERN)139 self.Bind(wx.EVT_MENU, self.OnImportHKL, id=wxID_ GSASIIIMPORTHKL)140 self.Bind(wx.EVT_MENU, self.OnImportCIF, id=wxID_ GSASIIIMPORTCIF)139 self.Bind(wx.EVT_MENU, self.OnImportPhase, id=wxID_IMPORTPHASE) 140 self.Bind(wx.EVT_MENU, self.OnImportPDB, id=wxID_IMPORTPDB) 141 self.Bind(wx.EVT_MENU, self.OnImportPattern, id=wxID_IMPORTPATTERN) 142 self.Bind(wx.EVT_MENU, self.OnImportHKL, id=wxID_IMPORTHKL) 143 self.Bind(wx.EVT_MENU, self.OnImportCIF, id=wxID_IMPORTCIF) 141 144 142 145 def _init_coll_Export_Items(self,parent): 143 self.ExportPattern = parent.Append(help='Select PWDR item to enable',id=wxID_ GSASIIEXPORTPATTERN, kind=wx.ITEM_NORMAL,146 self.ExportPattern = parent.Append(help='Select PWDR item to enable',id=wxID_EXPORTPATTERN, kind=wx.ITEM_NORMAL, 144 147 text='Export Powder Pattern...') 145 self.ExportPeakList = parent.Append(help='',id=wxID_ GSASIIEXPORTPEAKLIST, kind=wx.ITEM_NORMAL,148 self.ExportPeakList = parent.Append(help='',id=wxID_EXPORTPEAKLIST, kind=wx.ITEM_NORMAL, 146 149 text='Export All Peak Lists...') 147 self.ExportHKL = parent.Append(help='',id=wxID_ GSASIIEXPORTHKL, kind=wx.ITEM_NORMAL,150 self.ExportHKL = parent.Append(help='',id=wxID_EXPORTHKL, kind=wx.ITEM_NORMAL, 148 151 text='Export HKLs...') 149 self.ExportPhase = parent.Append(help='',id=wxID_ GSASIIEXPORTPHASE, kind=wx.ITEM_NORMAL,152 self.ExportPhase = parent.Append(help='',id=wxID_EXPORTPHASE, kind=wx.ITEM_NORMAL, 150 153 text='Export Phase...') 151 self.ExportCIF = parent.Append(help='',id=wxID_ GSASIIEXPORTCIF, kind=wx.ITEM_NORMAL,154 self.ExportCIF = parent.Append(help='',id=wxID_EXPORTCIF, kind=wx.ITEM_NORMAL, 152 155 text='Export CIF...') 153 156 self.ExportPattern.Enable(False) … … 156 159 self.ExportPhase.Enable(False) 157 160 self.ExportCIF.Enable(False) 158 self.Bind(wx.EVT_MENU, self.OnExportPattern, id=wxID_ GSASIIEXPORTPATTERN)159 self.Bind(wx.EVT_MENU, self.OnExportPeakList, id=wxID_ GSASIIEXPORTPEAKLIST)160 self.Bind(wx.EVT_MENU, self.OnExportHKL, id=wxID_ GSASIIEXPORTHKL)161 self.Bind(wx.EVT_MENU, self.OnExportPhase, id=wxID_ GSASIIEXPORTPHASE)162 self.Bind(wx.EVT_MENU, self.OnExportCIF, id=wxID_ GSASIIEXPORTCIF)161 self.Bind(wx.EVT_MENU, self.OnExportPattern, id=wxID_EXPORTPATTERN) 162 self.Bind(wx.EVT_MENU, self.OnExportPeakList, id=wxID_EXPORTPEAKLIST) 163 self.Bind(wx.EVT_MENU, self.OnExportHKL, id=wxID_EXPORTHKL) 164 self.Bind(wx.EVT_MENU, self.OnExportPhase, id=wxID_EXPORTPHASE) 165 self.Bind(wx.EVT_MENU, self.OnExportCIF, id=wxID_EXPORTCIF) 163 166 164 167 def _init_coll_Help_Items(self, parent): 165 parent.Append(help='', id=wxID_ GSASIIHELPHELP, kind=wx.ITEM_NORMAL,168 parent.Append(help='', id=wxID_HELPHELP, kind=wx.ITEM_NORMAL, 166 169 text='Help') 167 parent.Append(help='', id=wxID_ GSASIIHELPABOUT, kind=wx.ITEM_NORMAL,170 parent.Append(help='', id=wxID_HELPABOUT, kind=wx.ITEM_NORMAL, 168 171 text='About') 169 self.Bind(wx.EVT_MENU, self.OnHelpHelp Menu, id=wxID_GSASIIHELPHELP)170 self.Bind(wx.EVT_MENU, self.OnHelpAbout Menu, id=wxID_GSASIIHELPABOUT)172 self.Bind(wx.EVT_MENU, self.OnHelpHelp, id=wxID_HELPHELP) 173 self.Bind(wx.EVT_MENU, self.OnHelpAbout, id=wxID_HELPABOUT) 171 174 172 175 def _init_utils(self): … … 188 191 189 192 def _init_ctrls(self, parent): 190 wx.Frame.__init__(self, id=wxID_GSASII,name='GSASII', parent=parent,193 wx.Frame.__init__(self, name='GSASII', parent=parent, 191 194 size=wx.Size(300, 250),style=wx.DEFAULT_FRAME_STYLE, title='GSAS-II') 192 195 screenSize = wx.DisplaySize() … … 200 203 self.mainPanel = wx.Panel(self,-1) 201 204 202 self.PatternTree = wx.TreeCtrl(id=wxID_ GSASIIPATTERNTREE,205 self.PatternTree = wx.TreeCtrl(id=wxID_PATTERNTREE, 203 206 parent=self.mainPanel, pos=wx.Point(0, 0),style=wx.TR_DEFAULT_STYLE ) 204 207 self.PatternTree.Bind(wx.EVT_TREE_SEL_CHANGED, 205 self.OnPatternTreeSelChanged, id=wxID_ GSASIIPATTERNTREE)208 self.OnPatternTreeSelChanged, id=wxID_PATTERNTREE) 206 209 self.PatternTree.Bind(wx.EVT_TREE_ITEM_COLLAPSED, 207 self.OnPatternTreeItemCollapsed, id=wxID_ GSASIIPATTERNTREE)210 self.OnPatternTreeItemCollapsed, id=wxID_PATTERNTREE) 208 211 self.PatternTree.Bind(wx.EVT_TREE_ITEM_EXPANDED, 209 self.OnPatternTreeItemExpanded, id=wxID_ GSASIIPATTERNTREE)212 self.OnPatternTreeItemExpanded, id=wxID_PATTERNTREE) 210 213 self.root = self.PatternTree.AddRoot("Loaded Data") 211 214 … … 277 280 event.Skip() 278 281 279 def OnPwdrRead Menu(self, event):282 def OnPwdrRead(self, event): 280 283 self.CheckNotebook() 281 284 dlg = wx.FileDialog(self, 'Choose files', '.', '', … … 432 435 dlg.Destroy() 433 436 434 def OnSnglRead Menu(self,event):437 def OnSnglRead(self,event): 435 438 self.CheckNotebook() 436 439 dlg = wx.FileDialog(self, 'Choose file', '.', '', … … 447 450 names = ['Type','Lam'] 448 451 HKLref,HKLmin,HKLmax,FoMax,ifFc = G2IO.GetHKLData(filename) 449 Id = self.PatternTree.AppendItem(parent=self.root,text=' SXTL'+ospath.basename(filename))452 Id = self.PatternTree.AppendItem(parent=self.root,text='HKLF '+ospath.basename(filename)) 450 453 self.PatternTree.SetItemPyData(Id,HKLref) 451 454 Sub = self.PatternTree.AppendItem(Id,text='Instrument Parameters') … … 532 535 533 536 class SumDialog(wx.Dialog): 534 def __init__(self,parent,title,text, type,data):537 def __init__(self,parent,title,text,dataType,data): 535 538 wx.Dialog.__init__(self,parent,-1,title, 536 539 pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE) … … 550 553 dataGridSizer.Add(scale,0,wx.LEFT,10) 551 554 dataGridSizer.Add(name,0,wx.RIGHT,10) 552 dataGridSizer.Add(wx.StaticText(panel,-1,'Sum result name: '+ type),0, \555 dataGridSizer.Add(wx.StaticText(panel,-1,'Sum result name: '+dataType),0, \ 553 556 wx.LEFT|wx.TOP|wx.ALIGN_CENTER_VERTICAL,10) 554 557 self.name = wx.TextCtrl(panel,-1,self.data[-1],size=wx.Size(200,20),style=wx.TE_PROCESS_ENTER) … … 603 606 return self.data 604 607 605 def OnPwdrSum Menu(self,event):608 def OnPwdrSum(self,event): 606 609 TextList = [] 607 610 DataList = [] … … 839 842 self.PatternTree.Delete(item) 840 843 finally: 841 dlg.Destroy() 842 843 def OnDataDeleteMenu(self, event): 844 dlg.Destroy() 845 846 def OnRenameData(self,event): 847 name = self.PatternTree.GetItemText(self.PickId) 848 if 'PWDR' in name or 'HKLF' in name or 'IMG' in name: 849 dataType = name[:name.index(' ')+1] #includes the ' ' 850 dlg = wx.TextEntryDialog(self,'Data name: '+dataType,'Change data name', 851 defaultValue=name[name.index(' ')+1:]) 852 try: 853 if dlg.ShowModal() == wx.ID_OK: 854 self.PatternTree.SetItemText(self.PickId,dataType+dlg.GetValue()) 855 finally: 856 dlg.Destroy() 857 858 def OnDataDelete(self, event): 844 859 TextList = [] 845 860 DelList = [] … … 849 864 while item: 850 865 name = self.PatternTree.GetItemText(item) 851 if 'PWDR' in name or ' SXTL' in name or 'IMG' in name:866 if 'PWDR' in name or 'HKLF' in name or 'IMG' in name: 852 867 TextList.append(name) 853 868 item, cookie = self.PatternTree.GetNextChild(self.root, cookie) … … 867 882 dlg.Destroy() 868 883 869 def OnFileOpen Menu(self, event):884 def OnFileOpen(self, event): 870 885 result = '' 871 886 Id = 0 … … 878 893 if result == wx.ID_OK: 879 894 self.PatternTree.DeleteChildren(self.root) 880 print 'children deleted' 895 self.GSASprojectfile = '' 896 self.PatternTree.DeleteChildren(self.root) 897 if self.HKL: self.HKL = [] 898 if self.G2plotNB.plotList: 899 self.G2plotNB.clear() 881 900 finally: 882 901 dlg.Destroy() … … 896 915 while item and not Id: 897 916 name = self.PatternTree.GetItemText(item) 898 if 'PWDR' in name or ' SXTL' in name or 'IMG' in name:917 if 'PWDR' in name or 'HKLF' in name or 'IMG' in name: 899 918 Id = item 900 919 item, cookie = self.PatternTree.GetNextChild(self.root, cookie) … … 904 923 dlg.Destroy() 905 924 906 def OnFileClose Menu(self, event):925 def OnFileClose(self, event): 907 926 if self.dataFrame: 908 927 self.dataFrame.Clear() … … 917 936 self.PatternTree.DeleteChildren(self.root) 918 937 if self.HKL: self.HKL = [] 938 if self.G2plotNB.plotList: 939 self.G2plotNB.clear() 919 940 finally: 920 941 dlg.Destroy() 921 942 922 def OnFileSave Menu(self, event):943 def OnFileSave(self, event): 923 944 if self.GSASprojectfile: 924 945 G2IO.ProjFileSave(self) 925 946 else: 926 self.OnFileSaveas Menu(event)927 928 def OnFileSaveas Menu(self, event):947 self.OnFileSaveas(event) 948 949 def OnFileSaveas(self, event): 929 950 dlg = wx.FileDialog(self, 'Choose GSAS-II project file name', '.', '', 930 951 'GSAS-II project file (*.gpx)|*.gpx',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) … … 942 963 sys.exit() 943 964 944 def OnFileExit Menu(self, event):965 def OnFileExit(self, event): 945 966 if self.dataFrame: 946 967 self.dataFrame.Clear() … … 1117 1138 dlg.Destroy() 1118 1139 1119 def OnHelpHelp Menu(self, event):1140 def OnHelpHelp(self, event): 1120 1141 event.Skip() 1121 1142 1122 def OnHelpAbout Menu(self, event):1143 def OnHelpAbout(self, event): 1123 1144 info = wx.AboutDialogInfo() 1124 1145 info.Name = 'GSAS-II'
Note: See TracChangeset
for help on using the changeset viewer.