2008-06-28 Mike Kestner <mkestner@novell.com>

* gtk/TreeSelection.custom: use list marshaler to avoid O(n^2)
	copy from old custom code.  [Fixes #404669]

svn path=/trunk/gtk-sharp/; revision=106824
This commit is contained in:
Mike Kestner 2008-06-28 17:06:06 +00:00
parent a43acaf970
commit ff1db7980c
2 changed files with 7 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2008-06-28 Mike Kestner <mkestner@novell.com>
* gtk/TreeSelection.custom: use list marshaler to avoid O(n^2)
copy from old custom code. [Fixes #404669]
2008-06-28 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata: mark a const string. [Fixes #404630]

View File

@ -29,10 +29,7 @@
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;
return (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath));
}
[DllImport("libgtk-win32-2.0-0.dll")]
@ -47,10 +44,7 @@
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;
return (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath));
}
[Obsolete ("Replaced by SelectFunction property.")]