Author: bugman Date: Tue Aug 9 11:41:30 2011 New Revision: 14283 URL: http://svn.gna.org/viewcvs/relax?rev=14283&view=rev Log: The cdp.result_file structure has been modified to include a type, a label, and the file path. This is for the results viewer window to use, and allows the label to change to anything while the code still operates normally. Modified: branches/gui_testing/generic_fns/grace.py branches/gui_testing/generic_fns/structure/geometric.py branches/gui_testing/generic_fns/value.py branches/gui_testing/gui/analyses/auto_noe.py branches/gui_testing/gui/results_viewer.py Modified: branches/gui_testing/generic_fns/grace.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/generic_fns/grace.py?rev=14283&r1=14282&r2=14283&view=diff ============================================================================== --- branches/gui_testing/generic_fns/grace.py (original) +++ branches/gui_testing/generic_fns/grace.py Tue Aug 9 11:41:30 2011 @@ -373,7 +373,7 @@ # Add the file to the results file list. if not hasattr(cdp, 'result_files'): cdp.result_files = [] - cdp.result_files.append(['grace', file_path]) + cdp.result_files.append(['grace', 'Grace', file_path]) Modified: branches/gui_testing/generic_fns/structure/geometric.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/generic_fns/structure/geometric.py?rev=14283&r1=14282&r2=14283&view=diff ============================================================================== --- branches/gui_testing/generic_fns/structure/geometric.py (original) +++ branches/gui_testing/generic_fns/structure/geometric.py Tue Aug 9 11:41:30 2011 @@ -394,7 +394,7 @@ # Add the file to the results file list. if not hasattr(cdp, 'result_files'): cdp.result_files = [] - cdp.result_files.append(['Cone PDB', pdb_path]) + cdp.result_files.append(['cone_pdb', 'Cone PDB', pdb_path]) def create_diff_tensor_pdb(scale=1.8e-6, file=None, dir=None, force=False): @@ -576,7 +576,7 @@ cdp.result_files = [] if dir == None: dir = getcwd() - cdp.result_files.append(['Diffusion tensor PDB', get_file_path(file, dir)]) + cdp.result_files.append(['diff_tensor_pdb', 'Diffusion tensor PDB', get_file_path(file, dir)]) def create_vector_dist(length=None, symmetry=True, file=None, dir=None, force=False): @@ -719,7 +719,7 @@ cdp.result_files = [] if dir == None: dir = getcwd() - cdp.result_files.append(['Vector distribution PDB', get_file_path(file, dir)]) + cdp.result_files.append(['vector_dist_pdb', 'Vector distribution PDB', get_file_path(file, dir)]) def generate_vector_dist(mol=None, res_name=None, res_num=None, chain_id='', centre=zeros(3, float64), R=eye(3), warp=eye(3), limit_check=None, scale=1.0, inc=20, distribution='uniform', debug=False): Modified: branches/gui_testing/generic_fns/value.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/generic_fns/value.py?rev=14283&r1=14282&r2=14283&view=diff ============================================================================== --- branches/gui_testing/generic_fns/value.py (original) +++ branches/gui_testing/generic_fns/value.py Tue Aug 9 11:41:30 2011 @@ -412,7 +412,7 @@ # Add the file to the results file list. if not hasattr(cdp, 'result_files'): cdp.result_files = [] - cdp.result_files.append(['text', file_path]) + cdp.result_files.append(['text', 'Text', file_path]) def write_data(param=None, file=None, bc=False, return_value=None): Modified: branches/gui_testing/gui/analyses/auto_noe.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_noe.py?rev=14283&r1=14282&r2=14283&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_noe.py (original) +++ branches/gui_testing/gui/analyses/auto_noe.py Tue Aug 9 11:41:30 2011 @@ -490,4 +490,4 @@ color_code_noe(data.save_dir, data.structure_file) # Add the macro to the results list. - cdp.result_files.append(['pymol', data.save_dir+sep+'noe.pml']) + cdp.result_files.append(['pymol', 'PyMOL', data.save_dir+sep+'noe.pml']) Modified: branches/gui_testing/gui/results_viewer.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/results_viewer.py?rev=14283&r1=14282&r2=14283&view=diff ============================================================================== --- branches/gui_testing/gui/results_viewer.py (original) +++ branches/gui_testing/gui/results_viewer.py Tue Aug 9 11:41:30 2011 @@ -235,11 +235,11 @@ continue # Get the type and file. - type = gui_to_str(self.file_list.GetItem(i, 0).GetText()) + type = self.file_data[i] file = gui_to_str(self.file_list.GetItem(i, 1).GetText()) # Grace files. - if lower(type) == 'grace': + if type == 'grace': self.gui.user_functions.grace.view(None, file=file) # A special table. @@ -263,6 +263,7 @@ # Clear the list. self.file_list.DeleteAllItems() + self.file_data = [] # Nothing to do. if not hasattr(cdp, 'result_files'): @@ -270,7 +271,8 @@ # Update the list. for i in range(len(cdp.result_files)): - self.file_list.Append((str_to_gui(cdp.result_files[i][0]), str_to_gui(cdp.result_files[i][1]))) + self.file_list.Append((str_to_gui(cdp.result_files[i][1]), str_to_gui(cdp.result_files[i][2]))) + self.file_data.append(cdp.result_files[i][0]) # Release the locks. finally: