Re: treeview drag and drop
- From: Matthias Mann <matman matman24 org>
- To: gtk-app-devel-list gnome org
- Subject: Re: treeview drag and drop
- Date: Sun, 19 Oct 2003 11:02:18 +0200
On Wednesday October 01 2003 18:06 CEST, Federico Miranda
wrote:
3) enable drop on the destination treeview
I'm not shure if this will help you. I don't remember all
details but i did the same some weeks ago and by the first
tries to get it i also had no '+' sign. What was going on?
I had trouble with the struct GtkTargetEntry. The best for
me was to do something like this:
GtkTargetEntry target_entry;
and then like you:
gtk_tree_view_enable_model_drag_dest( GTK_TREE_VIEW
(treeview_dest),
EXCEPT: &target_entry,
G_N_ELEMENTS(target_entry),
GDK_ACTION_COPY);
The other thing that is important to get the '+' sign is a
correct working event handler system. The "drag-drop" signal
that is received by the destination tree view can be used
to get the drag datas from source widget. And also you need
to use the "drag-data-received" on destination widget and
"drag-data-get" on source widget. Or do you have done this?
If not, you need to call functions like these:
gtk_selection_data_set(selectionData, selectionData->target,
8, dropData, strlen(dropData));
gtk_drag_get_data(treeView, dragContext, GDK_POINTER_TO_ATOM(
dragContext->targets->data), time);
Mathew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]