From bc2d3e81e0b4bcc04f539ee216e25941df73428e Mon Sep 17 00:00:00 2001 From: Eric Butler Date: Wed, 7 Sep 2005 17:34:58 +0000 Subject: [PATCH] 2005-09-07 Eric Butler * gtk/NodeStore.cs : Add Clear() method * doc/en/Gtk/NodeStore.xml : Add documentation for above method svn path=/trunk/gtk-sharp/; revision=49648 --- ChangeLog | 5 +++++ doc/en/Gtk/NodeStore.xml | 12 ++++++++++++ gtk/NodeStore.cs | 7 +++++++ 3 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 56044b291..0ddb61ee6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-07 Eric Butler + + * gtk/NodeStore.cs : Add Clear() method + * doc/en/Gtk/NodeStore.xml : Add documentation for above method + 2005-09-07 Mike Kestner * configure.in.in : check for monodoc sources dir and warn if we are diff --git a/doc/en/Gtk/NodeStore.xml b/doc/en/Gtk/NodeStore.xml index 5276fe7f3..f95f7a9ba 100644 --- a/doc/en/Gtk/NodeStore.xml +++ b/doc/en/Gtk/NodeStore.xml @@ -191,5 +191,17 @@ Iteration: In new versions of Gtk# (2.0 and up) this class implements the + + + Method + + System.Void + + + + Removes all nodes from the store. + + + diff --git a/gtk/NodeStore.cs b/gtk/NodeStore.cs index c625e0d99..60ab5da38 100644 --- a/gtk/NodeStore.cs +++ b/gtk/NodeStore.cs @@ -429,6 +429,13 @@ namespace Gtk { gtksharp_node_store_emit_row_deleted (Handle, path.Handle); } + public void Clear () + { + while (nodes.Count > 0) + RemoveNode ((ITreeNode)nodes [0]); + + } + private ITreeNode GetNodeAtPath (TreePath path) { int[] indices = path.Indices;