0

I'm trying to implement a DND solution on 2 GTK treeview with a multiple selection. The single selection works well, but as soon as set the gtk_tree_selection_set_mode to GTK_SELECTION_MULTIPLE I must change my on_drag_data_get callback(drag-data-get).

The gtk_tree_selection_get_selected only works with a single selection. With the multiple selection I use the gtk_tree_selection_get_selected_rows to have a glist of selected rows and after I do a g_list_foreach with a function to set the gtk_selection_data with gtk_selection_data_set, but from there I'm lost.

Lundin
  • 195,001
  • 40
  • 254
  • 396
Ben
  • 1

1 Answers1

0

i find a solution, in fact i no longer use the gtk_selection_data to forward my data, it's just use to fired the drag-data-receive. In my drag-data-get i fill a liststore with all selected rows and in my drag-data-receive i just browse this liststore to fill the target's liststore and it's works well. I know this isn't the best solution but it works... if that can help...

Ben
  • 1
  • Please provide additional details in your answer. As it's currently written, it's hard to understand your solution. – Community Sep 09 '21 at 08:50