[Commits] (john) - Fixed bug caused by changing API for AddChildNodeAddChildNode and AddRootNode

commits at osafoundation.org commits at osafoundation.org
Tue Jan 20 17:39:30 PST 2004


Commit by: john
Modified files:
osaf/chandler/Chandler/parcels/OSAF/framework/blocks/ContainerBlocks.py 1.37 1.38

Log message:
- Fixed bug caused by changing API for AddChildNodeAddChildNode and AddRootNode


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/osaf/chandler/Chandler/parcels/OSAF/framework/blocks/ContainerBlocks.py.diff?r1=text&tr1=1.37&r2=text&tr2=1.38

Index: osaf/chandler/Chandler/parcels/OSAF/framework/blocks/ContainerBlocks.py
diff -u osaf/chandler/Chandler/parcels/OSAF/framework/blocks/ContainerBlocks.py:1.37 osaf/chandler/Chandler/parcels/OSAF/framework/blocks/ContainerBlocks.py:1.38
--- osaf/chandler/Chandler/parcels/OSAF/framework/blocks/ContainerBlocks.py:1.37	Tue Jan 20 17:23:06 2004
+++ osaf/chandler/Chandler/parcels/OSAF/framework/blocks/ContainerBlocks.py	Tue Jan 20 17:38:59 2004
@@ -551,16 +551,7 @@
         
 class TreeList(RectangularChild):
     def renderOneBlock(self, parent, parentWindow):
-        style = wxTR_DEFAULT_STYLE
-        if self.hideRoot:
-            style |= wxTR_HIDE_ROOT
-        if self.noLines:
-            style |= wxTR_NO_LINES
-        if self.useButtons:
-            style |= wxTR_HAS_BUTTONS
-        else:
-            style |= wxTR_NO_BUTTONS
-        treeList = wxTreeList(parentWindow, Block.getwxID(self), style = style)
+        treeList = wxTreeList(parentWindow, Block.getwxID(self), style = self.Calculate_wxStyle())
         info = wxTreeListColumnInfo()
         for x in range(len(self.columnHeadings)):
             info.SetText(self.columnHeadings[x])
@@ -585,6 +576,19 @@
 
         return treeList, None, None
 
+    def Calculate_wxStyle (self):
+        style = wxTR_DEFAULT_STYLE
+        if self.hideRoot:
+            style |= wxTR_HIDE_ROOT
+        if self.noLines:
+            style |= wxTR_NO_LINES
+        if self.useButtons:
+            style |= wxTR_HAS_BUTTONS
+        else:
+            style |= wxTR_NO_BUTTONS
+        return style
+
+
 class RepositoryTreeList(TreeList):
     def OnGetTreeListDataEvent (self, notification):
         node = notification.data['node']
@@ -614,9 +618,9 @@
         item = node.GetData()
         if item:
             for child in item:
-                node.AddChildNode (None, child, false)
+                node.AddChildNode (None, [child], false)
         else:
-            node.AddRootNode (['Repository Viewer', 'Demo'], 'Views', true)
+            node.AddRootNode (['Repository Viewer', 'Demo'], ['Views'], true)
     
     def OnSelectionChangedEvent (self, notification):
         pass



More information about the Commits mailing list