Drag and drop question, more drop than drag !



Hi,

I have problem in detecting the drop in the destination widget (thunar XFCE file manager). I have set my app like this:

treeview1 = gtk_tree_view_new ();
  gtk_widget_set_name (treeview1, "treeview1");
  gtk_widget_show (treeview1);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), treeview1);
gtk_drag_source_set (treeview1, GDK_BUTTON1_MASK, target_table, 1, GDK_ACTION_COPY); g_signal_connect (treeview1, "drag_data_get" , G_CALLBACK (drag_data_get), NULL);

And the signal handler:
void drag_data_get (GtkWidget *widget, GdkDragContext *dc, GtkSelectionData *selection_data, guint info, guint t, gpointer data)
{
    GtkWidget *source_widget;
    source_widget = gtk_drag_get_source_widget(dc);
    if ( source_widget == widget) g_print ("Same widget !\n");
        else g_print ("Different widget !\n");
}

The problem is that when I drag a row from the treeview of my app inside the window of Thunar, it's not drawed a border around thunar window, meaning that the drop event is not detected. Is it a matter of signals or what else ?

Thanks,
--
Colossus
Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.sourceforge.net
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net
Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net



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