mailr14176 - in /branches/gui_testing/gui: spin_viewer/ user_functions/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 05, 2011 - 14:20:
Author: bugman
Date: Fri Aug  5 14:20:58 2011
New Revision: 14176

URL: http://svn.gna.org/viewcvs/relax?rev=14176&view=rev
Log:
All wx object Append() calls now have their data passed through str_to_gui() 
first as well.

This prevents GUI failures due to the wrong data type being encountered.


Modified:
    branches/gui_testing/gui/spin_viewer/containers.py
    branches/gui_testing/gui/spin_viewer/frame.py
    branches/gui_testing/gui/user_functions/mol_res_spin.py
    branches/gui_testing/gui/user_functions/molecule.py
    branches/gui_testing/gui/user_functions/noe.py
    branches/gui_testing/gui/user_functions/pipe.py
    branches/gui_testing/gui/user_functions/relax_data.py
    branches/gui_testing/gui/user_functions/relax_fit.py
    branches/gui_testing/gui/user_functions/residue.py
    branches/gui_testing/gui/user_functions/sequence.py
    branches/gui_testing/gui/user_functions/spin.py

Modified: branches/gui_testing/gui/spin_viewer/containers.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/spin_viewer/containers.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/spin_viewer/containers.py (original)
+++ branches/gui_testing/gui/spin_viewer/containers.py Fri Aug  5 14:20:58 
2011
@@ -34,6 +34,7 @@
 
 # GUI module imports.
 from gui import paths
+from gui.misc import str_to_gui
 
 
 
@@ -527,14 +528,14 @@
             # List types.
             if obj_type in ['list', 'numpy.ndarray'] and len(obj) > 1:
                 # The first row.
-                table.Append((name, "[%s," % obj[0], obj_type))
+                table.Append((str_to_gui(name), str_to_gui("[%s," % obj[0]), 
str_to_gui(obj_type)))
 
                 # The rest of the rows.
                 for i in range(1, len(obj)-1):
-                    table.Append(('', " %s," % obj[i], ''))
+                    table.Append((str_to_gui(''), str_to_gui(" %s," % 
obj[i]), str_to_gui('')))
 
                 # The last row.
-                table.Append(('', " %s]" % obj[-1], ''))
+                table.Append((str_to_gui(''), str_to_gui(" %s]" % obj[-1]), 
str_to_gui('')))
 
             # Dictionary types.
             elif obj_type == 'dict':
@@ -544,22 +545,22 @@
 
                 # Single entry (or None).
                 if len(keys) < 2:
-                    table.Append((name, obj, obj_type))
+                    table.Append((str_to_gui(name), str_to_gui(obj), 
str_to_gui(obj_type)))
                     continue
 
                 # The first row.
-                table.Append((name, "{'%s': %s," % (keys[0], obj[keys[0]]), 
obj_type))
+                table.Append((str_to_gui(name), str_to_gui("{'%s': %s," % 
(keys[0], obj[keys[0]])), str_to_gui(obj_type)))
 
                 # The rest of the rows.
                 for i in range(1, len(keys)-1):
-                    table.Append(('', " '%s': %s," % (keys[i], 
obj[keys[i]]), ''))
+                    table.Append((str_to_gui(''), str_to_gui(" '%s': %s," % 
(keys[i], obj[keys[i]])), str_to_gui('')))
 
                 # The last row.
-                table.Append(('', " '%s': %s}" % (keys[-1], obj[keys[-1]]), 
''))
+                table.Append((str_to_gui(')', str_to_gui(" '%s': %s}" % 
(keys[-1], obj[keys[-1]])), str_to_gui('')))
 
             # All other data types.
             else:
-                table.Append((name, obj, obj_type))
+                table.Append((str_to_gui(name), str_to_gui(obj), 
str_to_gui(obj_type)))
 
         # Add the table to the sizer.
         sizer.Add(table, 1, wx.ALL|wx.EXPAND, 0)

Modified: branches/gui_testing/gui/spin_viewer/frame.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/spin_viewer/frame.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/spin_viewer/frame.py (original)
+++ branches/gui_testing/gui/spin_viewer/frame.py Fri Aug  5 14:20:58 2011
@@ -287,7 +287,7 @@
 
         # The list of pipe names.
         for name in pipe_names():
-            self.pipe_name.Append(name)
+            self.pipe_name.Append(str_to_gui(name))
 
         # Switch.
         if pipe_switch:

Modified: branches/gui_testing/gui/user_functions/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/mol_res_spin.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/mol_res_spin.py (original)
+++ branches/gui_testing/gui/user_functions/mol_res_spin.py Fri Aug  5 
14:20:58 2011
@@ -196,7 +196,7 @@
         # The list of residue names.
         mol_id = generate_spin_id(str(self.mol.GetValue()))
         for res in residue_loop(mol_id):
-            self.res.Append("%s %s" % (res.num, res.name))
+            self.res.Append(str_to_gui("%s %s" % (res.num, res.name)))
 
 
     def _update_spins(self, event):
@@ -219,4 +219,4 @@
 
         # Build the list of spin names.
         for spin in spin_loop(res_id):
-            self.spin.Append("%s %s" % (spin.num, spin.name))
+            self.spin.Append(str_to_gui("%s %s" % (spin.num, spin.name)))

Modified: branches/gui_testing/gui/user_functions/molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/molecule.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/molecule.py (original)
+++ branches/gui_testing/gui/user_functions/molecule.py Fri Aug  5 14:20:58 
2011
@@ -127,8 +127,8 @@
 
         # The list of pipe names.
         for name in pipe_names():
-            self.pipe_from.Append(name)
-            self.pipe_to.Append(name)
+            self.pipe_from.Append(str_to_gui(name))
+            self.pipe_to.Append(str_to_gui(name))
 
         # Update the molecule list.
         self.update_mol_list()

Modified: branches/gui_testing/gui/user_functions/noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/noe.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/noe.py (original)
+++ branches/gui_testing/gui/user_functions/noe.py Fri Aug  5 14:20:58 2011
@@ -34,7 +34,7 @@
 # GUI module imports.
 from base import UF_base, UF_page
 from gui.paths import ANALYSIS_IMAGE_PATH
-from gui.misc import gui_to_float, gui_to_int, gui_to_str
+from gui.misc import gui_to_float, gui_to_int, gui_to_str, str_to_gui
 from gui.wizard import Wiz_window
 
 
@@ -178,4 +178,4 @@
 
         # The spectrum IDs.
         for i in range(len(cdp.spectrum_ids)):
-            self.spectrum_id.Append(cdp.spectrum_ids[i])
+            self.spectrum_id.Append(str_to_gui(cdp.spectrum_ids[i]))

Modified: branches/gui_testing/gui/user_functions/pipe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/pipe.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/pipe.py (original)
+++ branches/gui_testing/gui/user_functions/pipe.py Fri Aug  5 14:20:58 2011
@@ -144,7 +144,7 @@
 
         # The list of pipe names.
         for name in pipe_names():
-            self.pipe_from.Append(name)
+            self.pipe_from.Append(str_to_gui(name))
 
 
     def on_execute(self):
@@ -222,7 +222,7 @@
 
         # The list of pipe names.
         for name in pipe_names():
-            self.pipe_name.Append(name)
+            self.pipe_name.Append(str_to_gui(name))
 
 
     def on_execute(self):
@@ -304,7 +304,7 @@
 
         # The list of pipe names.
         for name in pipe_names():
-            self.pipe_name.Append(name)
+            self.pipe_name.Append(str_to_gui(name))
 
 
     def on_execute(self):

Modified: branches/gui_testing/gui/user_functions/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/relax_data.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/relax_data.py (original)
+++ branches/gui_testing/gui/user_functions/relax_data.py Fri Aug  5 14:20:58 
2011
@@ -33,7 +33,7 @@
 # GUI module imports.
 from base import UF_base, UF_page
 from gui.paths import WIZARD_IMAGE_PATH
-from gui.misc import gui_to_float, gui_to_int, gui_to_str
+from gui.misc import gui_to_float, gui_to_int, gui_to_str, str_to_gui
 from gui.wizard import Wiz_window
 
 
@@ -110,7 +110,7 @@
 
         # The relaxation data IDs.
         for i in range(len(cdp.ri_ids)):
-            self.ri_id.Append(cdp.ri_ids[i])
+            self.ri_id.Append(str_to_gui(cdp.ri_ids[i]))
 
 
 

Modified: branches/gui_testing/gui/user_functions/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/relax_fit.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/relax_fit.py (original)
+++ branches/gui_testing/gui/user_functions/relax_fit.py Fri Aug  5 14:20:58 
2011
@@ -117,7 +117,7 @@
 
         # The spectrum IDs.
         for i in range(len(cdp.spectrum_ids)):
-            self.spectrum_id.Append(cdp.spectrum_ids[i])
+            self.spectrum_id.Append(str_to_gui(cdp.spectrum_ids[i]))
 
 
 

Modified: branches/gui_testing/gui/user_functions/residue.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/residue.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/residue.py (original)
+++ branches/gui_testing/gui/user_functions/residue.py Fri Aug  5 14:20:58 
2011
@@ -156,8 +156,8 @@
 
         # The list of pipe names.
         for name in pipe_names():
-            self.pipe_from.Append(name)
-            self.pipe_to.Append(name)
+            self.pipe_from.Append(str_to_gui(name))
+            self.pipe_to.Append(str_to_gui(name))
 
         # Update the molecule list.
         self.update_mol_list()
@@ -262,7 +262,7 @@
         # The list of molecule names.
         if cdp_name():
             for mol in molecule_loop():
-                self.mol_name.Append(mol.name)
+                self.mol_name.Append(str_to_gui(mol.name))
 
 
     def on_execute(self):
@@ -319,7 +319,7 @@
         # The list of molecule names.
         if cdp_name():
             for mol in molecule_loop():
-                self.mol.Append(mol.name)
+                self.mol.Append(str_to_gui(mol.name))
 
 
     def on_execute(self):

Modified: branches/gui_testing/gui/user_functions/sequence.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/sequence.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/sequence.py (original)
+++ branches/gui_testing/gui/user_functions/sequence.py Fri Aug  5 14:20:58 
2011
@@ -116,8 +116,8 @@
 
         # The list of pipe names.
         for name in pipe_names():
-            self.pipe_from.Append(name)
-            self.pipe_to.Append(name)
+            self.pipe_from.Append(str_to_gui(name))
+            self.pipe_to.Append(str_to_gui(name))
 
 
     def on_execute(self):

Modified: branches/gui_testing/gui/user_functions/spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/spin.py?rev=14176&r1=14175&r2=14176&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/spin.py (original)
+++ branches/gui_testing/gui/user_functions/spin.py Fri Aug  5 14:20:58 2011
@@ -251,8 +251,8 @@
 
         # The list of pipe names.
         for name in pipe_names():
-            self.pipe_from.Append(name)
-            self.pipe_to.Append(name)
+            self.pipe_from.Append(str_to_gui(name))
+            self.pipe_to.Append(str_to_gui(name))
 
         # Update the molecule list.
         self.update_mol_list()
@@ -385,7 +385,7 @@
         # The list of molecule names.
         if cdp_name():
             for mol in molecule_loop():
-                self.mol.Append(mol.name)
+                self.mol.Append(str_to_gui(mol.name))
 
 
     def on_execute(self):
@@ -491,7 +491,7 @@
         # The list of molecule names.
         if cdp_name():
             for mol in molecule_loop():
-                self.mol.Append(mol.name)
+                self.mol.Append(str_to_gui(mol.name))
 
 
     def on_execute(self):




Related Messages


Powered by MHonArc, Updated Fri Aug 05 14:40:02 2011