mailr11948 - /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:14:
Author: bugman
Date: Wed Dec 22 17:14:18 2010
New Revision: 11948

URL: http://svn.gna.org/viewcvs/relax?rev=11948&view=rev
Log:
Certain spin container objects are no longer listed in the table.


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=11948&r1=11947&r2=11948&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:14:18 
2010
@@ -25,6 +25,7 @@
 
 
 # Python module imports.
+from re import search
 from string import replace
 import wx
 
@@ -399,11 +400,13 @@
         return sizer
 
 
-    def spin_vars(self):
+    def spin_vars(self, blacklist=[]):
         """Create the variable table for the spin container.
 
-        @return:    The sizer containing the table.
-        @rtype:     wx.Sizer instance
+        @keyword blacklist: A list of spin container objects to blacklist 
from the variable display table.
+        @type blacklist:    list of str
+        @return:            The sizer containing the table.
+        @rtype:             wx.Sizer instance
         """
 
         # A sizer for the table.
@@ -432,8 +435,19 @@
         # The spin container.
         spin = return_spin(self.spin_id)
 
+        # Add some names to the blacklist.
+        blacklist += ['is_empty']
+
         # Loop over the contents of the spin container.
         for name in dir(spin):
+            # Skip special objects.
+            if search('^_', name):
+                continue
+
+            # Blacklisted names.
+            if name in blacklist:
+                continue
+
             # Get the object.
             obj = getattr(spin, name)
 




Related Messages


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