Changeset 4154 for trunk/GSASIIdataGUI.py
- Timestamp:
- Sep 18, 2019 5:05:24 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIdataGUI.py
r4151 r4154 440 440 item = parent.Append(wx.ID_ANY,'&Open project...\tCtrl+O','Open a GSAS-II project file (*.gpx)') 441 441 self.Bind(wx.EVT_MENU, self.OnFileOpen, id=item.GetId()) 442 if sys.platform == "darwin": 443 item = parent.Append(wx.ID_ANY,'&Open in new window...','Open a GSAS-II project file (*.gpx) in a separate process') 444 self.Bind(wx.EVT_MENU, self.OnNewGSASII, id=item.GetId()) 442 445 item = parent.Append(wx.ID_ANY,'Reopen recent...\tCtrl+E','Reopen a previously used GSAS-II project file (*.gpx)') 443 446 self.Bind(wx.EVT_MENU, self.OnFileReopen, id=item.GetId()) … … 3969 3972 return self.OnFileSaveas(event) 3970 3973 3974 def OnNewGSASII(self, event): 3975 '''Gets a GSAS-II .gpx project file in response to the 3976 File/Open new window menu button. Runs only on Mac. 3977 ''' 3978 if self.LastGPXdir: 3979 pth = self.LastGPXdir 3980 else: 3981 pth = '.' 3982 GSASprojectfile = '' 3983 dlg = wx.FileDialog(self, 'Choose GSAS-II project file', pth, 3984 wildcard='GSAS-II project file (*.gpx)|*.gpx',style=wx.FD_OPEN) 3985 try: 3986 if dlg.ShowModal() == wx.ID_OK: 3987 GSASprojectfile = dlg.GetPath() 3988 GSASprojectfile = G2IO.FileDlgFixExt(dlg,GSASprojectfile) 3989 finally: 3990 dlg.Destroy() 3991 G2script = os.path.join(os.path.split(__file__)[0],'GSASII.py') 3992 GSASIIpath.MacStartGSASII(G2script,GSASprojectfile) 3993 3971 3994 def SetTitleByGPX(self): 3972 3995 '''Set the title for the two window frames
Note: See TracChangeset
for help on using the changeset viewer.