Add control-focus notifications from bindable widgets.
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / dndtreeview.h
index aa62166b686ccb9276809a5174df5933f2d5445d..0801058d87680d63b32bc6f4aa791a7fd2a0db78 100644 (file)
@@ -142,10 +142,16 @@ class /*LIBGTKMM2EXT_API*/ DnDTreeView : public DnDTreeViewBase
 
                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;
+                               }
+                       }
                }
        }