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

treeview drag and drop



Hi !

I'm trying to get drag and drop between two treeviews.

I tried this :

1) define :
  static GtkTargetEntry target_entry[] = {
    { "text/plain", 0, 0 },
    { "text/uri-list", 0, 1 },
    { "STRING", 0, 2 }
  };

2) enable drag on the source treeview
  gtk_tree_view_enable_model_drag_source( GTK_TREE_VIEW(treeview_source),
       GDK_BUTTON1_MASK,  target_entry, G_N_ELEMENTS(target_entry),
       GDK_ACTION_COPY);

3) enable drop on the destination treeview
  gtk_tree_view_enable_model_drag_dest( GTK_TREE_VIEW(treeview_dest),
       target_entry, G_N_ELEMENTS(target_entry), GDK_ACTION_COPY);

The result is that I can drag, but I cannot drop on the dest treeview
(there is not the little '+' sign, and it does absolutely nothing).

I'd like use the specific interfaces for treeview dnd 
(GtkTreeDragSourceIface and  GtkTreeDragDestIface),
in particular to control "row_drop_possible" virtual method on drag 
destination .

Thanks in advance

Federico







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