-
- /* Get a row reference to the source path because the path
- could change after the insertion. The gtk_drag_finish() is
- not able to delete the source because that, so we have to
- do it manually */
- source_row_reference = gtk_tree_row_reference_new (source_model, helper->source_row);
- gtk_tree_path_free (helper->source_row);
-
- /* Insert the dragged row as a child of the dest row */
- gtk_tree_path_down (dest_row);
- if (gtk_tree_drag_dest_drag_data_received (GTK_TREE_DRAG_DEST (dest_model),
- dest_row,
- selection_data)) {
-
- GtkTreeIter iter;
-
- /* Set the newly created folder as the instance in the row */
- gtk_tree_model_get_iter (dest_model, &iter, dest_row);
- gtk_tree_store_set (GTK_TREE_STORE (dest_model), &iter,
- TNY_GTK_FOLDER_STORE_TREE_MODEL_INSTANCE_COLUMN,
- new_folder, -1);
- g_object_unref (G_OBJECT (new_folder));
-
- helper->source_row = gtk_tree_row_reference_get_path (source_row_reference);
-
- success = TRUE;
- }
- gtk_tree_row_reference_free (source_row_reference);
-
- /* Save and clean */
- save_and_clean (helper, success);
-
- out:
- gtk_drag_finish (helper->context, success, (success && helper->delete_source), helper->time);