Changeset 026041c in sasview
- Timestamp:
- May 22, 2011 12:23:11 PM (14 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:
- b3de12a4
- Parents:
- e0e22f2c
- Location:
- guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_panel.py
rd785914 r026041c 174 174 self.vbox.Add(self.sizer1, 0, wx.EXPAND|wx.ALL,0) 175 175 self.vbox.Add(self.sizer2, 0, wx.EXPAND|wx.ALL,1) 176 self.vbox.Add(self.sizer3, 0, wx.EXPAND|wx.ALL, 1)176 self.vbox.Add(self.sizer3, 0, wx.EXPAND|wx.ALL,5) 177 177 self.vbox.Add(self.sizer4, 0, wx.EXPAND|wx.ALL,5) 178 178 -
guiframe/startup_configuration.py
rf2d9e76 r026041c 16 16 from sans.guiframe.events import StatusEvent 17 17 from sans.guiframe.gui_style import GUIFRAME 18 from sans.guiframe import gui_manager as CURRENT 18 19 # default configuration 19 20 DEFAULT_STRINGS = {'GUIFRAME_WIDTH':1150, … … 27 28 'CLEANUP_PLOT':False, 28 29 'DEFAULT_PERSPECTIVE':'Fitting'} 29 30 try: 31 CURRENT_STRINGS = {'GUIFRAME_WIDTH':CURRENT.GUIFRAME_WIDTH, 32 'GUIFRAME_HEIGHT':CURRENT.GUIFRAME_HEIGHT, 33 'PLOPANEL_WIDTH':CURRENT.PLOPANEL_WIDTH, 34 'DATAPANEL_WIDTH':CURRENT.DATAPANEL_WIDTH, 35 'DATALOADER_SHOW':CURRENT.DATALOADER_SHOW, 36 'TOOLBAR_SHOW':CURRENT.TOOLBAR_SHOW, 37 'FIXED_PANEL':CURRENT.FIXED_PANEL, 38 'WELCOME_PANEL_SHOW':CURRENT.WELCOME_PANEL_SHOW, 39 'CLEANUP_PLOT':CURRENT.CLEANUP_PLOT, 40 'DEFAULT_PERSPECTIVE':CURRENT.DEFAULT_PERSPECTIVE} 41 except: 42 CURRENT_STRINGS = DEFAULT_STRINGS 43 30 44 if sys.platform.count("win32") > 0: 31 45 PANEL_WIDTH = 265 … … 53 67 # font size 54 68 self.SetWindowVariant(variant=FONT_VARIANT) 55 self.current_string = copy.deepcopy(DEFAULT_STRINGS) 69 self.current_string = copy.deepcopy(CURRENT_STRINGS) 70 self.return_string = {} 56 71 # build layout 57 72 panel = wx.Panel(self, -1) … … 91 106 event.Skip() 92 107 # event object and selection 93 return DEFAULT_STRINGS 108 self.return_string = copy.deepcopy(DEFAULT_STRINGS) 109 return self.return_string 94 110 95 111 def OnCurrent(self, event=None): … … 110 126 p_size = panel.size 111 127 if p_size == None: 112 p_size = DEFAULT_STRINGS['PLOPANEL_WIDTH']128 p_size = CURRENT_STRINGS['PLOPANEL_WIDTH'] 113 129 self.current_string['PLOPANEL_WIDTH'] = p_size 114 130 115 131 data_pw, _ = self.parent.panels["data_panel"].GetSizeTuple() 116 132 if data_pw == None: 117 data_pw = DEFAULT_STRINGS['DATAPANEL_WIDTH']133 data_pw = CURRENT_STRINGS['DATAPANEL_WIDTH'] 118 134 self.current_string['DATAPANEL_WIDTH'] = data_pw 119 135 … … 147 163 raise 148 164 # event object and selection 149 return self.current_string 165 self.return_string = self.current_string 166 return self.return_string 150 167 151 168 def OnCancel(self, event): … … 155 172 # clear event 156 173 event.Skip() 157 174 self.return_string = {} 158 175 self.Destroy() 159 176 … … 165 182 event.Skip() 166 183 fname = os.path.join(self.path, 'custom_config.py') 167 self.write_string(fname, self. current_string)184 self.write_string(fname, self.return_string) 168 185 169 186 self.Destroy() … … 186 203 187 204 out_f.close() 205
Note: See TracChangeset
for help on using the changeset viewer.