2005-01-27 Mike Kestner <mkestner@novell.com>
* gtk/NodeSelection.cs : use new GetSelectedRows() overload. * gtk/TreeSelection.custom : add a GetSelectedRows overload without the out model param. [Fixes #71814] svn path=/trunk/gtk-sharp/; revision=39654
This commit is contained in:
parent
f7e51fd250
commit
ccd3cebf9d
4 changed files with 37 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-01-27 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/NodeSelection.cs : use new GetSelectedRows() overload.
|
||||
* gtk/TreeSelection.custom : add a GetSelectedRows overload without the
|
||||
out model param. [Fixes #71814]
|
||||
|
||||
2005-01-27 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/NodeView.cs : fix the value creation in the ctor.
|
||||
|
|
|
@ -527,5 +527,18 @@ class TreeSelectionSample
|
|||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="GetSelectedRows">
|
||||
<MemberSignature Language="C#" Value="public Gtk.TreePath[] GetSelectedRows ();" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Gtk.TreePath[]</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Returns an array of <see cref="T:Gtk.TreePath" />s representing the selected rows.</summary>
|
||||
<returns>Selected rows in an array of <see cref="T:Gtk.TreePath" />s</returns>
|
||||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
||||
|
|
|
@ -119,8 +119,7 @@ namespace Gtk {
|
|||
|
||||
public ITreeNode[] SelectedNodes {
|
||||
get {
|
||||
TreeModel model;
|
||||
TreePath [] paths = selection.GetSelectedRows (out model);
|
||||
TreePath [] paths = selection.GetSelectedRows ();
|
||||
int length = paths.Length;
|
||||
|
||||
ITreeNode [] results = new ITreeNode [length];
|
||||
|
|
|
@ -19,6 +19,22 @@
|
|||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_tree_selection_get_selected_rows (IntPtr raw, IntPtr model);
|
||||
|
||||
public TreePath[] GetSelectedRows ()
|
||||
{
|
||||
IntPtr list_ptr = gtk_tree_selection_get_selected_rows (Handle, IntPtr.Zero);
|
||||
if (list_ptr == IntPtr.Zero)
|
||||
return new TreePath [0];
|
||||
|
||||
GLib.List list = new GLib.List (list_ptr, typeof (Gtk.TreePath));
|
||||
TreePath[] result = new TreePath [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = (TreePath) list [i];
|
||||
return result;
|
||||
}
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_tree_selection_get_selected_rows (IntPtr raw, out IntPtr model);
|
||||
|
||||
|
|
Loading…
Reference in a new issue