Skip to content

Instantly share code, notes, and snippets.

@bratsche
Last active December 29, 2015 08:58
Show Gist options
  • Save bratsche/7646660 to your computer and use it in GitHub Desktop.
Save bratsche/7646660 to your computer and use it in GitHub Desktop.
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[] paths = (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath));
foreach (TreePath path in paths) {
path.Owned = true;
}
return paths;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment