From cfe63b7b15a3c90be450f7f218fc5c89b1f19c6e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 17 Jun 2017 16:48:25 +0200 Subject: [PATCH] Simplify route-display TreeView. There's no TargetEntry receiver for the custom DnDTreeView object. We can just use a default Gtk::TreeView. --- gtk2_ardour/editor_routes.cc | 15 --------------- gtk2_ardour/editor_routes.h | 6 +----- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index 35d98e3c57..d21113b8b5 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -261,7 +261,6 @@ EditorRoutes::EditorRoutes (Editor* e) _display.set_name (X_("EditGroupList")); _display.set_rules_hint (true); _display.set_size_request (100, -1); - _display.add_object_drag (_columns.stripable.index(), "routes"); CellRendererText* name_cell = dynamic_cast (_display.get_column_cell_renderer (_name_column)); @@ -1515,20 +1514,6 @@ EditorRoutes::initial_display () sync_treeview_from_presentation_info (Properties::order); } -void -EditorRoutes::display_drag_data_received (const RefPtr& context, - int x, int y, - const SelectionData& data, - guint info, guint time) -{ - if (data.get_target() == "GTK_TREE_MODEL_ROW") { - _display.on_drag_data_received (context, x, y, data, info, time); - return; - } - - context->drag_finish (true, false, time); -} - struct ViewStripable { TimeAxisView* tav; boost::shared_ptr stripable; diff --git a/gtk2_ardour/editor_routes.h b/gtk2_ardour/editor_routes.h index 2ceb6682b2..320b9b9064 100644 --- a/gtk2_ardour/editor_routes.h +++ b/gtk2_ardour/editor_routes.h @@ -109,10 +109,6 @@ private: int plugin_setup (boost::shared_ptr, boost::shared_ptr, ARDOUR::Route::PluginSetupOptions); - void display_drag_data_received ( - Glib::RefPtr const &, gint, gint, Gtk::SelectionData const &, guint, guint - ); - bool selection_filter (Glib::RefPtr const &, Gtk::TreeModel::Path const &, bool); void name_edit (std::string const &, std::string const &); void solo_changed_so_update_mute (); @@ -157,7 +153,7 @@ private: }; Gtk::ScrolledWindow _scroller; - Gtkmm2ext::DnDTreeView > _display; + Gtk::TreeView _display; Glib::RefPtr _model; ModelColumns _columns; int _name_column;