Ignore:
Timestamp:
Sep 5, 2011 9:43:17 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
d72ef56
Parents:
902f373
Message:

added custom path saving by view setting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_manager.py

    r53cf669 rc994f8f  
    8383    # Didn't find local config, load the default  
    8484    import sans.guiframe.config as config 
     85custom_config = None 
    8586try: 
    8687    path = PATH_APP 
     
    118119    DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE 
    119120    CLEANUP_PLOT = custom_config.CLEANUP_PLOT 
     121    # custom open_path 
     122    open_folder = custom_config.DEFAULT_OPEN_FOLDER 
     123    if open_folder != None and os.path.isdir(open_folder): 
     124        DEFAULT_OPEN_FOLDER = os.path.abspath(open_folder) 
     125    else: 
     126        DEFAULT_OPEN_FOLDER = PATH_APP 
    120127except: 
     128    raise 
    121129    DATALOADER_SHOW = True 
    122130    TOOLBAR_SHOW = True 
     
    129137    DEFAULT_PERSPECTIVE = None 
    130138    CLEANUP_PLOT = False 
     139    DEFAULT_OPEN_FOLDER = PATH_APP 
    131140 
    132141DEFAULT_STYLE = config.DEFAULT_STYLE 
     
    238247 
    239248        # Default locations 
    240         self._default_save_location = os.getcwd()         
    241          
     249        self._default_save_location = DEFAULT_OPEN_FOLDER        
    242250        # Welcome panel 
    243251        self.defaultPanel = None 
     
    15641572            error_message += str(sys.exc_value) + "\n" 
    15651573            print error_message 
    1566             
     1574        print "_default_save_location", self._default_save_location   
    15671575    def load_folder(self, path): 
    15681576        """ 
Note: See TracChangeset for help on using the changeset viewer.