On Tue, 2007-10-23 at 19:15 +0800, Liangxu Wang wrote:
> Use iconview object, delete the selected items, the code:
> ------------
> //if use the treeview, replace the get_selected_items() with
> get_selection().
> std::list<Gtk::TreeModel::Path> selected = get_selected_items();
> -- snip --
Thanks, my list now works, but I'm blocked.. I don't know the next step.
My newer code is:
typedef std::list<Gtk::TreePath> ListPath;
void TreeView::on_remove()
{
Glib::RefPtr<Gtk::TreeModel> model = get_model();
ListPath list = get_selection()->get_selected_rows(model);
// and now?
}
Gtkmm Reference about get_selected_rows() says:
----
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.
----
Well... How I should convert my list?
Thanks,
s.
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list