Re: reparenting items in GtkTreeView/Model
- From: Havoc Pennington <hp redhat com>
- To: "Jasper Huijsmans" <j b huijsmans hetnet nl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: reparenting items in GtkTreeView/Model
- Date: 04 Feb 2002 11:31:09 -0500
"Jasper Huijsmans" <j b huijsmans hetnet nl> writes:
I'm trying to port an application to use the new GtkTreeView/Model
widgets. I'm using the GtkTreeStore model. I may not be looking in
the right place, but I couldn't find a way to move an item and all
its subitems to a different node (the equivalent of
gtk_ctree_move). I hoped there would be a simpler way than inserting
new nodes, copying the data and removing the old ones. This sounds
like a realy stupid question, so if I'm just not looking right
please tell me.
With GtkTreeStore I think you do have to just copy the data.
You might file an enhancement request on http://bugzilla.gnome.org
about it.
If it's an efficiency concern, you can always write your own model,
it shouldn't be difficult. Or alternatively, it's pretty easy to make
the tree store contain a single column with a pointer to a struct in
each row - see the "stock browser" demo in gtk-demo for example. Then
a copy will have essentially zero cost.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]