if (selection_data.get_target() == "GTK_TREE_MODEL_ROW") {
TreeView::on_drag_data_received (context, x, y, selection_data, info, time);
- } else if (selection_data.get_target() == object_type) {
- signal_drop (context, selection_data);
} else {
- /* some kind of target type added by the app, which will be handled by a signal handler */
+ /* some kind of target type, usually 'object_type' added by the app,
+ * which will be handled by a signal handler */
+ for (std::list<Gtk::TargetEntry>::const_iterator i = draggable.begin(); i != draggable.end (); ++i) {
+ if (selection_data.get_target() == (*i).get_target()) {
+ signal_drop (context, selection_data);
+ context->drag_finish (true, false, time);
+ break;
+ }
+ }
}
}