Changeset c994f8f in sasview for sansguiframe/src/sans/guiframe
- Timestamp:
- Sep 5, 2011 9:43:17 PM (13 years ago)
- 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
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r53cf669 rc994f8f 83 83 # Didn't find local config, load the default 84 84 import sans.guiframe.config as config 85 custom_config = None 85 86 try: 86 87 path = PATH_APP … … 118 119 DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE 119 120 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 120 127 except: 128 raise 121 129 DATALOADER_SHOW = True 122 130 TOOLBAR_SHOW = True … … 129 137 DEFAULT_PERSPECTIVE = None 130 138 CLEANUP_PLOT = False 139 DEFAULT_OPEN_FOLDER = PATH_APP 131 140 132 141 DEFAULT_STYLE = config.DEFAULT_STYLE … … 238 247 239 248 # Default locations 240 self._default_save_location = os.getcwd() 241 249 self._default_save_location = DEFAULT_OPEN_FOLDER 242 250 # Welcome panel 243 251 self.defaultPanel = None … … 1564 1572 error_message += str(sys.exc_value) + "\n" 1565 1573 print error_message 1566 1574 print "_default_save_location", self._default_save_location 1567 1575 def load_folder(self, path): 1568 1576 """ -
sansguiframe/src/sans/guiframe/startup_configuration.py
r8c347a6 rc994f8f 27 27 'WELCOME_PANEL_SHOW':False, 28 28 'CLEANUP_PLOT':False, 29 'DEFAULT_PERSPECTIVE':'Fitting'} 29 'DEFAULT_PERSPECTIVE':'Fitting', 30 'DEFAULT_OPEN_FOLDER': None} 30 31 try: 31 32 CURRENT_STRINGS = {'GUIFRAME_WIDTH':CURRENT.GUIFRAME_WIDTH, … … 38 39 'WELCOME_PANEL_SHOW':CURRENT.WELCOME_PANEL_SHOW, 39 40 'CLEANUP_PLOT':CURRENT.CLEANUP_PLOT, 40 'DEFAULT_PERSPECTIVE':CURRENT.DEFAULT_PERSPECTIVE} 41 'DEFAULT_PERSPECTIVE':CURRENT.DEFAULT_PERSPECTIVE, 42 'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER} 41 43 except: 42 44 CURRENT_STRINGS = DEFAULT_STRINGS … … 68 70 self.SetWindowVariant(variant=FONT_VARIANT) 69 71 self.current_string = copy.deepcopy(CURRENT_STRINGS) 70 self.return_string = {}72 self.return_string = copy.deepcopy(DEFAULT_STRINGS) 71 73 # build layout 72 74 panel = wx.Panel(self, -1) … … 160 162 self.parent.cleanup_plots 161 163 perspective = self.parent.get_current_perspective() 162 self.current_string['DEFAULT_PERSPECTIVE'] = str(perspective.sub_menu) 164 self.current_string['DEFAULT_PERSPECTIVE'] =\ 165 str(perspective.sub_menu) 166 location = '' 167 temp = self.parent._default_save_location.split("\\") 168 for strings in temp: 169 location += (strings + "/") 170 self.current_string['DEFAULT_OPEN_FOLDER'] = location 171 #self.parent._default_save_location.ascii_letters 163 172 164 173 except: … … 199 208 out_f.write("#Application appearance custom configuration\n" ) 200 209 for key, item in strings.iteritems(): 201 if key == 'DEFAULT_PERSPECTIVE': 202 out_f.write("%s = '%s'\n" % (key,str(item))) 210 if (key == 'DEFAULT_PERSPECTIVE') or \ 211 (key == 'DEFAULT_OPEN_FOLDER' and item != None): 212 out_f.write("%s = \"%s\"\n" % (key,str(item))) 203 213 else: 204 214 out_f.write("%s = %s\n" % (key,str(item)))
Note: See TracChangeset
for help on using the changeset viewer.