Author: danw
Date: 2005-03-15 10:49:30 -0500 (Tue, 15 Mar 2005)
New Revision: 41837
Modified:
trunk/gtk-sharp/ChangeLog
trunk/gtk-sharp/gtk/ITreeNode.cs
trunk/gtk-sharp/gtk/NodeStore.cs
trunk/gtk-sharp/gtk/TreeNode.cs
Log:
Re-fix for yesterday's fix that didn't actually work.
* gtk/ITreeNode.cs: add a "child" arg to TreeNodeRemovedHandler
* gtk/TreeNode.cs (RemoveChild, OnChildRemoved): update for that
* gtk/NodeStore.cs (child_deleted_cb): use the passed-in child;
GetNodeAtPath won't work because the parent node already removed
the child from its list
Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog 2005-03-15 15:00:50 UTC (rev 41836)
+++ trunk/gtk-sharp/ChangeLog 2005-03-15 15:49:30 UTC (rev 41837)
@@ -1,3 +1,15 @@
+2005-03-15 Dan Winship <[EMAIL PROTECTED]>
+
+ Re-fix for yesterday's fix that didn't actually work.
+
+ * gtk/ITreeNode.cs: add a "child" arg to TreeNodeRemovedHandler
+
+ * gtk/TreeNode.cs (RemoveChild, OnChildRemoved): update for that
+
+ * gtk/NodeStore.cs (child_deleted_cb): use the passed-in child;
+ GetNodeAtPath won't work because the parent node already removed
+ the child from its list
+
2005-03-14 Mike Kestner <[EMAIL PROTECTED]>
* configure.in : rework the gtkhtml check for 3.6.
Modified: trunk/gtk-sharp/gtk/ITreeNode.cs
===================================================================
--- trunk/gtk-sharp/gtk/ITreeNode.cs 2005-03-15 15:00:50 UTC (rev 41836)
+++ trunk/gtk-sharp/gtk/ITreeNode.cs 2005-03-15 15:49:30 UTC (rev 41837)
@@ -25,7 +25,7 @@
public delegate void TreeNodeAddedHandler (object o, ITreeNode child);
- public delegate void TreeNodeRemovedHandler (object o, int
old_position);
+ public delegate void TreeNodeRemovedHandler (object o, ITreeNode child,
int old_position);
public interface ITreeNode {
Modified: trunk/gtk-sharp/gtk/NodeStore.cs
===================================================================
--- trunk/gtk-sharp/gtk/NodeStore.cs 2005-03-15 15:00:50 UTC (rev 41836)
+++ trunk/gtk-sharp/gtk/NodeStore.cs 2005-03-15 15:49:30 UTC (rev 41837)
@@ -342,7 +342,7 @@
RemoveNodeInternal (node [i]);
}
- private void child_deleted_cb (object o, int idx)
+ private void child_deleted_cb (object o, ITreeNode child, int
idx)
{
ITreeNode node = o as ITreeNode;
@@ -350,7 +350,6 @@
TreePath child_path = path.Copy ();
child_path.AppendIndex (idx);
- ITreeNode child = GetNodeAtPath (child_path);
RemoveNodeInternal (child);
gtksharp_node_store_emit_row_deleted (Handle,
child_path.Handle);
Modified: trunk/gtk-sharp/gtk/TreeNode.cs
===================================================================
--- trunk/gtk-sharp/gtk/TreeNode.cs 2005-03-15 15:00:50 UTC (rev 41836)
+++ trunk/gtk-sharp/gtk/TreeNode.cs 2005-03-15 15:49:30 UTC (rev 41837)
@@ -96,12 +96,12 @@
public event TreeNodeRemovedHandler ChildRemoved;
- private void OnChildRemoved (int old_position)
+ private void OnChildRemoved (TreeNode child, int old_position)
{
if (ChildRemoved == null)
return;
- ChildRemoved (this, old_position);
+ ChildRemoved (this, child, old_position);
}
public void AddChild (TreeNode child)
@@ -126,7 +126,7 @@
children.Remove (child);
child.SetParent (null);
- OnChildRemoved (idx);
+ OnChildRemoved (child, idx);
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches