mailr11950 - /branches/bieri_gui/gui_bieri/components/spin_view.py


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

Header


Content

Posted by edward on December 22, 2010 - 17:26:
Author: bugman
Date: Wed Dec 22 17:26:43 2010
New Revision: 11950

URL: http://svn.gna.org/viewcvs/relax?rev=11950&view=rev
Log:
create_subtitle() converts to unicode first to be able to handle the None 
type.


Modified:
    branches/bieri_gui/gui_bieri/components/spin_view.py

Modified: branches/bieri_gui/gui_bieri/components/spin_view.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/components/spin_view.py?rev=11950&r1=11949&r2=11950&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/components/spin_view.py (original)
+++ branches/bieri_gui/gui_bieri/components/spin_view.py Wed Dec 22 17:26:43 
2010
@@ -92,11 +92,11 @@
         @rtype:         wx.StaticText instance
         """
 
+        # Unicode.
+        text = unicode(text)
+
         # Fix for the '&' character.
         text = replace(text, '&', '&&')
-
-        # Unicode.
-        text = unicode(text)
 
         # The object.
         obj = wx.StaticText(self, -1, text)
@@ -289,7 +289,7 @@
         grid_sizer.Add(self.create_subtitle("Molecule:"), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle(self.mol_name), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle("Residue number:"), 0, 
wx.ADJUST_MINSIZE, 0)
-        grid_sizer.Add(self.create_subtitle(str(self.res_num)), 0, 
wx.ADJUST_MINSIZE, 0)
+        grid_sizer.Add(self.create_subtitle(self.res_num), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle("Residue name:"), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle(self.res_name), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle("Residue ID string:"), 0, 
wx.ADJUST_MINSIZE, 0)
@@ -375,11 +375,11 @@
         grid_sizer.Add(self.create_subtitle("Molecule:"), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle(self.mol_name), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle("Residue number:"), 0, 
wx.ADJUST_MINSIZE, 0)
-        grid_sizer.Add(self.create_subtitle(str(self.res_num)), 0, 
wx.ADJUST_MINSIZE, 0)
+        grid_sizer.Add(self.create_subtitle(self.res_num), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle("Residue name:"), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle(self.res_name), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle("Spin number:"), 0, 
wx.ADJUST_MINSIZE, 0)
-        grid_sizer.Add(self.create_subtitle(str(self.spin_num)), 0, 
wx.ADJUST_MINSIZE, 0)
+        grid_sizer.Add(self.create_subtitle(self.spin_num), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle("Spin name:"), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle(self.spin_name), 0, 
wx.ADJUST_MINSIZE, 0)
         grid_sizer.Add(self.create_subtitle("Spin ID string:"), 0, 
wx.ADJUST_MINSIZE, 0)




Related Messages


Powered by MHonArc, Updated Wed Dec 22 17:40:02 2010