Author: bugman Date: Thu Dec 30 15:25:21 2010 New Revision: 12038 URL: http://svn.gna.org/viewcvs/relax?rev=12038&view=rev Log: The initial values of the free file format widget are now those in the relax data store. This means that values set in the menu now appear in the user function windows. Modified: branches/bieri_gui/gui_bieri/user_functions/base.py Modified: branches/bieri_gui/gui_bieri/user_functions/base.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/base.py?rev=12038&r1=12037&r2=12038&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/user_functions/base.py (original) +++ branches/bieri_gui/gui_bieri/user_functions/base.py Thu Dec 30 15:25:21 2010 @@ -35,6 +35,7 @@ from gui_bieri.controller import Redirect_text from gui_bieri.filedialog import openfile from gui_bieri.message import error_message +from gui_bieri.misc import int_to_gui, str_to_gui from gui_bieri import paths @@ -533,8 +534,23 @@ data_col = self.input_field(sub_sizer, "Data column:", divider=divider, padding=padding, spacer=spacer) err_col = self.input_field(sub_sizer, "Error column:", divider=divider, padding=padding, spacer=spacer) + # Set the values. + spin_id_col.SetValue(int_to_gui(ds.relax_gui.free_file_format.spin_id_col)) + mol_name_col.SetValue(int_to_gui(ds.relax_gui.free_file_format.mol_name_col)) + res_num_col.SetValue(int_to_gui(ds.relax_gui.free_file_format.res_num_col)) + res_name_col.SetValue(int_to_gui(ds.relax_gui.free_file_format.res_name_col)) + spin_num_col.SetValue(int_to_gui(ds.relax_gui.free_file_format.spin_num_col)) + spin_name_col.SetValue(int_to_gui(ds.relax_gui.free_file_format.spin_name_col)) + if data_cols: + data_col.SetValue(int_to_gui(ds.relax_gui.free_file_format.data_col)) + err_col.SetValue(int_to_gui(ds.relax_gui.free_file_format.err_col)) + # The column separator. sep = self.combo_box(sub_sizer, "Column separator:", ["white space", ",", ";", ":", ""], divider=divider, padding=padding, spacer=0, read_only=False) + if not ds.relax_gui.free_file_format.sep: + sep.SetValue("white space") + else: + sep.SetValue(str_to_gui(ds.relax_gui.free_file_format.sep)) # Set the size of the widget. sub_sizer.AddSpacer(10)