Re: Removing/Reordering Multiple Selections in GtkTreeModel
- From: "David M. Cook" <dave davidcook org>
- To: GtkAppDevelList <gtk-app-devel-list gnome org>
- Subject: Re: Removing/Reordering Multiple Selections in GtkTreeModel
- Date: Wed, 30 Jul 2003 10:25:02 -0700
On Wed, Jul 30, 2003 at 12:51:29AM -0700, Jared Krinke wrote:
I just recently had quite a bit of trouble figuring out how to remove
all of the selected rows from a gtk_list_store. As near as I can tell,
there is no simple way to do this and using
gtk_tree_selection_get_selected_rows() is necessary.
In Python, I just make sure I delete the rows in reverse order.
The API doc for gtk_tree_selection_get_selected_rows nots that...
"Additionally, if you are planning on modifying the model after calling this
function, you may want to convert the returned list into a list of
GtkTreeRowReferences. To do this, you can use
gtk_tree_row_reference_new_proxy()."
Once you have the list of row references you can iterate thru it and get the
correct paths from the references even though you've deleted intermediate
rows. At least that's the way I understand it. However, I have no idea
where this proxy GObject that gtk_tree_row_reference_new_proxy() takes as
it's first argument is supposed to come from.
Dave Cook
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]