Changeset a5e1b6ca in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Apr 1, 2019 1:11:34 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
ticket-1249
Children:
0dde203
Parents:
9305b46
Message:

change wx.SAVE to wx.FD_SAVE in FileDialog?

Location:
src/sas/sasgui/guiframe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/data_processor.py

    r5251ec6 ra5e1b6ca  
    7979            if label_pos != -1 and len(elt) >= separator_pos  and\ 
    8080                elt[separator_pos] == "[": 
    81                 # the label contain , meaning the range selected is not  
     81                # the label contain , meaning the range selected is not 
    8282                # continuous 
    8383                if elt.count(',') > 0: 
     
    107107class SPanel(ScrolledPanel): 
    108108    """ 
    109     ensure proper scrolling of GridPanel  
    110      
    111     Adds a SetupScrolling call to the normal ScrolledPanel init.     
     109    ensure proper scrolling of GridPanel 
     110 
     111    Adds a SetupScrolling call to the normal ScrolledPanel init. 
    112112    GridPanel then subclasses this class 
    113      
     113 
    114114    """ 
    115115    def __init__(self, parent, *args, **kwds): 
     
    129129    grid.GridCellEditor) in order to override two of its methods: 
    130130    PaintBackrgound and EndEdit. 
    131      
     131 
    132132    This is necessary as the sheet module is broken in wx 3.0.2 and 
    133133    improperly subclasses grid.GridCellEditor 
     
    247247 
    248248 
    249         # The following events must be bound even if CSheet is working  
     249        # The following events must be bound even if CSheet is working 
    250250        # properly and does not need the above re-implementation of the 
    251251        # CSheet init method.  Basically these override any intrinsic binding 
     
    313313    def OnCellChange(self, event): 
    314314        """ 
    315         Overrides sheet.CSheet.OnCellChange.   
     315        Overrides sheet.CSheet.OnCellChange. 
    316316 
    317317        Processes when a cell has been edited by a cell editor. Checks for the 
     
    558558        """ 
    559559 
    560         # add data to the grid     
     560        # add data to the grid 
    561561        row = 0 
    562562        col_name = self.GetCellValue(row, col) 
     
    583583        Sets up to insert column into the current grid before the current 
    584584        highlighted column location and sets up what to populate that column 
    585         with.  Then calls insert_column method to actually do the insertion.  
     585        with.  Then calls insert_column method to actually do the insertion. 
    586586        """ 
    587587 
     
    604604        Sets up to insert column into the current grid after the current 
    605605        highlighted column location and sets up what to populate that column 
    606         with.  Then calls insert_column method to actually do the insertion.  
     606        with.  Then calls insert_column method to actually do the insertion. 
    607607        """ 
    608608 
     
    758758    def onContextMenu(self, event): 
    759759        """ 
    760         Method to handle cell right click context menu.  
     760        Method to handle cell right click context menu. 
    761761 
    762762        THIS METHOD IS NOT CURRENTLY USED.  It is designed to provide a 
     
    11241124        """ 
    11251125 
    1126         # I Believe this is no longer used now that we have removed the  
     1126        # I Believe this is no longer used now that we have removed the 
    11271127        # edit menu from the menubar - PDB July 12, 2015 
    11281128        pos = self.GetSelection() 
     
    11341134        Remove the selected column from the grid 
    11351135        """ 
    1136         # I Believe this is no longer used now that we have removed the  
     1136        # I Believe this is no longer used now that we have removed the 
    11371137        # edit menu from the menubar - PDB July 12, 2015 
    11381138        pos = self.GetSelection() 
     
    16371637        # We need to grab a WxMenu handle here, otherwise the next one to grab 
    16381638        # the handle will be treated as the Edit Menu handle when checking in 
    1639         # on_menu_open event handler and thus raise an exception when it hits an  
     1639        # on_menu_open event handler and thus raise an exception when it hits an 
    16401640        # unitialized object.  Alternative is to comment out that whole section 
    16411641        # in on_menu_open, but that would make it more difficult to undo the 
     
    16901690        On Copy from the Edit menu item on the menubar 
    16911691        """ 
    1692         # I Believe this is no longer used now that we have removed the  
     1692        # I Believe this is no longer used now that we have removed the 
    16931693        # edit menu from the menubar - PDB July 12, 2015 
    16941694        if event is not None: 
     
    17021702        On Paste from the Edit menu item on the menubar 
    17031703        """ 
    1704         # I Believe this is no longer used now that we have removed the  
     1704        # I Believe this is no longer used now that we have removed the 
    17051705        # edit menu from the menubar - PDB July 12, 2015 
    17061706        if event is not None: 
     
    17141714        On Clear from the Edit menu item on the menubar 
    17151715        """ 
    1716         # I Believe this is no longer used now that we have removed the  
     1716        # I Believe this is no longer used now that we have removed the 
    17171717        # edit menu from the menubar - PDB July 12, 2015 
    17181718        pos = self.panel.notebook.GetSelection() 
     
    17331733        On remove column from the Edit menu Item on the menubar 
    17341734        """ 
    1735         # I Believe this is no longer used now that we have removed the  
     1735        # I Believe this is no longer used now that we have removed the 
    17361736        # edit menu from the menubar - PDB July 12, 2015 
    17371737        pos = self.panel.notebook.GetSelection() 
     
    18241824                location = os.path.dirname(grid.file_name) 
    18251825                dlg = wx.FileDialog(self, "Save Project file", 
    1826                                     location, grid.file_name, ext, wx.SAVE) 
     1826                                    location, grid.file_name, ext, wx.FD_SAVE) 
    18271827                path = None 
    18281828                if dlg.ShowModal() == wx.ID_OK: 
     
    20092009                location = os.path.dirname(self.file_name) 
    20102010                dlg = wx.FileDialog(self, "Save Project file", 
    2011                                     location, self.file_name, ext, wx.SAVE) 
     2011                                    location, self.file_name, ext, wx.FD_SAVE) 
    20122012                path = None 
    20132013                if dlg.ShowModal() == wx.ID_OK: 
  • src/sas/sasgui/guiframe/gui_manager.py

    r34f23c8 ra5e1b6ca  
    19171917                            self._default_save_location, "sasview_proj", 
    19181918                            extension, 
    1919                             wx.SAVE) 
     1919                            wx.FD_SAVE) 
    19201920        if dlg.ShowModal() == wx.ID_OK: 
    19211921            path = dlg.GetPath() 
     
    24142414        dlg = wx.FileDialog(self, "Choose a file", 
    24152415                            self._default_save_location, 
    2416                             default_name, wildcard, wx.SAVE) 
     2416                            default_name, wildcard, wx.FD_SAVE) 
    24172417 
    24182418        if dlg.ShowModal() == wx.ID_OK: 
     
    25512551        dlg = wx.FileDialog(self, "Choose a file", 
    25522552                            self._default_save_location, 
    2553                             default_name, wildcard, wx.SAVE) 
     2553                            default_name, wildcard, wx.FD_SAVE) 
    25542554 
    25552555        if dlg.ShowModal() == wx.ID_OK: 
Note: See TracChangeset for help on using the changeset viewer.