Changeset a5e1b6ca in sasview for src/sas/sasgui


Ignore:
Timestamp:
Apr 1, 2019 11:11:34 AM (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
Files:
10 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: 
  • src/sas/sasgui/perspectives/calculator/data_editor.py

    r5251ec6 ra5e1b6ca  
    1919_QMAX_DEFAULT = 0.13 
    2020_NPTS_DEFAULT = 50 
    21 #Control panel width  
     21#Control panel width 
    2222if sys.platform.count("darwin") == 0: 
    2323    PANEL_WIDTH = 500 
     
    196196        summary = 'No data info available...' 
    197197        self.data_summary.SetValue(summary) 
    198         #self.summary_sizer.Add(self.data_summary, 1, wx.EXPAND|wx.ALL, 10)   
     198        #self.summary_sizer.Add(self.data_summary, 1, wx.EXPAND|wx.ALL, 10) 
    199199 
    200200    def _layout_button(self): 
     
    579579        wildcard = "CanSAS 1D files(*.xml)|*.xml" 
    580580        dlg = wx.FileDialog(self, "Choose a file", 
    581                             self._default_save_location, "", wildcard , wx.SAVE) 
     581                            self._default_save_location, "", wildcard , 
     582                            wx.FD_SAVE) 
    582583 
    583584        for data in self._data: 
  • src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py

    r34f23c8 ra5e1b6ca  
    16711671                            location, "sld_file", 
    16721672                             extension, 
    1673                              wx.SAVE) 
     1673                             wx.FD_SAVE) 
    16741674        if dlg.ShowModal() == wx.ID_OK: 
    16751675            path = dlg.GetPath() 
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    r82d88d5 ra5e1b6ca  
    337337        dlg = wx.FileDialog(self, "Choose a file", 
    338338                            default_save_location, \ 
    339                             self.window_caption, "*.crf", wx.SAVE) 
     339                            self.window_caption, "*.crf", wx.FD_SAVE) 
    340340        if dlg.ShowModal() == wx.ID_OK: 
    341341            path = dlg.GetPath() 
  • src/sas/sasgui/perspectives/fitting/basepage.py

    rcb64d86 ra5e1b6ca  
    676676                        self._manager.parent._default_save_location 
    677677        dlg = wx.FileDialog(self, "Choose a file", self._default_save_location, 
    678                             self.window_caption, "*.fitv", wx.SAVE) 
     678                            self.window_caption, "*.fitv", wx.FD_SAVE) 
    679679 
    680680        if dlg.ShowModal() == wx.ID_OK: 
  • src/sas/sasgui/perspectives/fitting/report_dialog.py

    r44e8f48 ra5e1b6ca  
    4949        dlg = wx.FileDialog(self, "Choose a file", 
    5050                            wildcard=self.wild_card, 
    51                             style=wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) 
     51                            style=wx.FD_SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) 
    5252        dlg.SetFilterIndex(0)  # Set .html files to be default 
    5353 
  • src/sas/sasgui/perspectives/invariant/invariant_panel.py

    r5251ec6 ra5e1b6ca  
    12551255        dlg = wx.FileDialog(self, "Choose a file", 
    12561256                            self._default_save_location, \ 
    1257                             self.window_caption, "*.inv", wx.SAVE) 
     1257                            self.window_caption, "*.inv", wx.FD_SAVE) 
    12581258        if dlg.ShowModal() == wx.ID_OK: 
    12591259            path = dlg.GetPath() 
  • src/sas/sasgui/perspectives/invariant/report_dialog.py

    r5251ec6 ra5e1b6ca  
    5252        dlg = wx.FileDialog(self, "Choose a file", 
    5353                            wildcard=self.wild_card, 
    54                             style=wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) 
     54                            style=wx.FD_SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) 
    5555        dlg.SetFilterIndex(0)  # Set .html files to be default 
    5656 
  • src/sas/sasgui/perspectives/pr/inversion_panel.py

    r5251ec6 ra5e1b6ca  
    282282        dlg = wx.FileDialog(self, "Choose a file", 
    283283                            self._default_save_location, 
    284                             self.window_caption, "*.prv", wx.SAVE) 
     284                            self.window_caption, "*.prv", wx.FD_SAVE) 
    285285        if dlg.ShowModal() == wx.ID_OK: 
    286286            path = dlg.GetPath() 
Note: See TracChangeset for help on using the changeset viewer.