Re: dnd with treeviews



Hi,

I am also looking into the GtkTreeView and looked up the DragNDropTutorial
at
http://live.gnome.org/GnomeLove/DragNDropTutorial

When you look up the example you can see that the "drag-drop" callback
function has the following form:
static gboolean drag_drop_handler (GtkWidget *widget, GdkDragContext
*context, gint x, gint y, guint time, gpointer user_data);
I think that is the reason why you don't get the OK message.

I am also implementing drag and drop between two treeview widgets. I have
connected callbacks to all the signals described in the tutorial and added
the following in all of my callbacks:
const gchar *name=gtk_widget_get_name(widget);
and printed to the console using a printf statement.

In my main application I named the treeview widgets using:
gtk_widget_set_name(widget,"name");
This way at least you can look up what is happening (order of signals
emitted), and easily see which widget the callback connected to.
>From the treeview widget pointer you can retrieve all related information
(treestore, selected iters, etc). I am working on that for the moment.
-- 
View this message in context: http://www.nabble.com/dnd-with-treeviews-tf3127014.html#a8679752
Sent from the Gtk+ - General mailing list archive at Nabble.com.




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