mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-23 06:51:06 +00:00
2005-09-06 Mike Kestner <mkestner@novell.com>
* gtk/NodeStore.cs : fix recursive emit of row_inserted. svn path=/trunk/gtk-sharp/; revision=49566
This commit is contained in:
parent
2a61d6e9d9
commit
7b265e1f84
|
@ -347,10 +347,17 @@ namespace Gtk {
|
|||
[DllImport("gtksharpglue-2")]
|
||||
static extern void gtksharp_node_store_emit_row_inserted (IntPtr handle, IntPtr path, int node_idx);
|
||||
|
||||
private void EmitRowInserted (ITreeNode node)
|
||||
{
|
||||
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node.ID), node.ID);
|
||||
for (int i = 0; i < node.ChildCount; i++)
|
||||
EmitRowInserted (node [i]);
|
||||
}
|
||||
|
||||
private void child_added_cb (object o, ITreeNode child)
|
||||
{
|
||||
AddNodeInternal (child);
|
||||
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (child.ID), child.ID);
|
||||
EmitRowInserted (child);
|
||||
}
|
||||
|
||||
[DllImport("gtksharpglue-2")]
|
||||
|
@ -398,19 +405,14 @@ namespace Gtk {
|
|||
{
|
||||
nodes.Add (node);
|
||||
AddNodeInternal (node);
|
||||
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node.ID), node.ID);
|
||||
for (int i = 0; i < node.ChildCount; i++)
|
||||
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node[i].ID), node[i].ID);
|
||||
EmitRowInserted (node);
|
||||
}
|
||||
|
||||
public void AddNode (ITreeNode node, int position)
|
||||
{
|
||||
nodes.Insert (position, node);
|
||||
AddNodeInternal (node);
|
||||
|
||||
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node.ID), node.ID);
|
||||
for (int i = 0; i < node.ChildCount; i++)
|
||||
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node[i].ID), node[i].ID);
|
||||
EmitRowInserted (node);
|
||||
}
|
||||
|
||||
public void RemoveNode (ITreeNode node)
|
||||
|
|
Loading…
Reference in a new issue