Index: cells-gtk/tree-view.lisp
===================================================================
RCS file: /project/cells-gtk/cvsroot/root/cells-gtk/tree-view.lisp,v
retrieving revision 1.16
diff -u -r1.16 tree-view.lisp
--- cells-gtk/tree-view.lisp	7 Jun 2006 16:48:59 -0000	1.16
+++ cells-gtk/tree-view.lisp	18 Jul 2006 12:22:41 -0000
@@ -70,7 +70,9 @@
 
 (def-c-output tree-model ((self tree-view))
   (when new-value
-    (gtk-tree-view-set-model (id self) (id (to-be new-value)))))
+    (let ((new-model (to-be new-value)))
+      (gtk-tree-view-set-model (id self) (id new-model))
+      (setf (of-tree new-model) self))))
 
 (def-c-output expand-all ((self tree-view))
   (when new-value
@@ -219,9 +221,13 @@
   1)
 
 (def-c-output columns ((self tree-view))
+  (when old-value 
+    (loop for col in old-value do
+        (gtk-tree-view-remove-column (id self) (id col))
+        (gtk-object-forget (id col) col)))  
   (when new-value
     (loop for col in new-value
-        for pos from 0	  
+	for pos from 0	  
         for renderer = (case (nth pos (column-types self))
                          (:boolean (gtk-cell-renderer-toggle-new))
                          (:icon (gtk-cell-renderer-pixbuf-new))

