Changeset 482 for trunk/GSASII.py


Ignore:
Timestamp:
Feb 13, 2012 11:33:35 AM (11 years ago)
Author:
vondreele
Message:

move FileDlgFixExt? to G2IO
begin to add a save selected seq results to file
move IO routines called in G2struct back there
remove wx stuff from G2pwd & G2struct
put progress bar in G2pwdGUI (not G2pwd)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r481 r482  
    9090] = [wx.NewId() for _init_coll_Export_Items in range(7)]
    9191
    92 def FileDlgFixExt(dlg,file):            #this is needed to fix a problem in linux wx.FileDialog
    93     ext = dlg.GetWildcard().split('|')[2*dlg.GetFilterIndex()+1].strip('*')
    94     if ext not in file:
    95         file += ext
    96     return file
    97    
    9892class GSASII(wx.Frame):
    9993   
     
    10421036                        if dlg.ShowModal() == wx.ID_OK:
    10431037                            newimagefile = dlg.GetPath()
    1044                             newimagefile = FileDlgFixExt(dlg,newimagefile)
     1038                            newimagefile = G2IO.FileDlgFixExt(dlg,newimagefile)
    10451039                            G2IO.PutG2Image(newimagefile,Comments,Data,Npix,newImage)
    10461040                            Imax = np.amax(newImage)
     
    12551249                if dlg.ShowModal() == wx.ID_OK:
    12561250                    self.GSASprojectfile = dlg.GetPath()
    1257                     self.GSASprojectfile = FileDlgFixExt(dlg,self.GSASprojectfile)
     1251                    self.GSASprojectfile = G2IO.FileDlgFixExt(dlg,self.GSASprojectfile)
    12581252                    self.dirname = dlg.GetDirectory()
    12591253                    G2IO.ProjFileOpen(self)
     
    13121306            if dlg.ShowModal() == wx.ID_OK:
    13131307                self.GSASprojectfile = dlg.GetPath()
    1314                 self.GSASprojectfile = FileDlgFixExt(dlg,self.GSASprojectfile)
     1308                self.GSASprojectfile = G2IO.FileDlgFixExt(dlg,self.GSASprojectfile)
    13151309                self.PatternTree.SetItemText(self.root,'Loaded Data: '+self.GSASprojectfile)
    13161310                G2IO.ProjFileSave(self)
     
    15471541                if dlg.ShowModal() == wx.ID_OK:
    15481542                    powderfile = dlg.GetPath()
    1549                     powderfile = FileDlgFixExt(dlg,powderfile)
     1543                    powderfile = G2IO.FileDlgFixExt(dlg,powderfile)
    15501544                    if 'fxye' in powderfile:
    15511545                        G2IO.powderFxyeSave(self,exports,powderfile)
     
    15611555            if dlg.ShowModal() == wx.ID_OK:
    15621556                self.peaklistfile = dlg.GetPath()
    1563                 self.peaklistfile = FileDlgFixExt(dlg,self.peaklistfile)
     1557                self.peaklistfile = G2IO.FileDlgFixExt(dlg,self.peaklistfile)
    15641558                file = open(self.peaklistfile,'w')               
    15651559                item, cookie = self.PatternTree.GetFirstChild(self.root)
Note: See TracChangeset for help on using the changeset viewer.