Re: Removing/Reordering Multiple Selections in GtkTreeModel




 I did not use the fuction that takes the Object as the first param, I used the
other one and got it to work; however, it seems that removing backwards my be
less work.

 Where is the link to the solution ?


--- "David M. Cook" <dave davidcook org> wrote:
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
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]