Gtk_CTree : Help please



Hi,
I was using gtk_tree to figure a tree structure from a program.
In this tree, I set for each item a key (with this key I had access to
the
program and something).
	gtk_object_set_data (GTK_OBJECT (item), "key", key);
And also for each kind of item I set a drop destination and drag
source.		
When I want to do the same thing with a Gnome MDI environnement, Havoc
says
that I have to use Gtk_CTree because Gtk_Tree was obsolete/deprecated.
So I change my tree to a ctree one. Now it work fine but :

How can I set a key for an item in a gtk_ctree ?
I can't use gtk_object_set_data (GTK_OBJECT (item),...) because Gtk
can't
convert a GtkCTreeNode to an GtkObject (the GtkCTreeNode is opaque...).
And a second question which is the same thing I think.
How can I set a drag source and a dest drop for a specific item ?

I've got this warning when I run my program.
Gtk-WARNING **: invalid cast from `(unknown)' to `GtkObject'

Gtk-CRITICAL **: file gtkobject.c: line 1034 (gtk_object_set_data):
assertion `GTK_IS_OBJECT (object)' failed.

This warning is done by this code :
	noeud = gtk_ctree_insert_node (GTK_CTREE (root_tree), tree, NULL,
		texte, 8,
		image->pixmap, image->mask,
		image->pixmap, image->mask,
		FALSE, FALSE);
	gtk_object_set_data (GTK_OBJECT (noeud), "nom", key);
-- 
Florent DEVIN




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