From a886f2bfcbb05c855d2c5b1cab9a71d60cc3e957 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 25 Feb 2020 16:16:20 +0100 Subject: [PATCH] Cleanup SourceList: remove unused copy/pasted region-list code --- gtk2_ardour/editor_sources.cc | 20 +------------------- gtk2_ardour/editor_sources.h | 26 +------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/gtk2_ardour/editor_sources.cc b/gtk2_ardour/editor_sources.cc index 090e586880..3ade49ee55 100644 --- a/gtk2_ardour/editor_sources.cc +++ b/gtk2_ardour/editor_sources.cc @@ -81,9 +81,6 @@ EditorSources::EditorSources (Editor* e) : EditorComponent (e) , old_focus (0) , tags_editable (0) - , _menu (0) - , _selection (0) - , _no_redisplay (false) { _display.set_size_request (100, -1); _display.set_rules_hint (true); @@ -280,11 +277,6 @@ EditorSources::set_session (ARDOUR::Session* s) SessionHandlePtr::set_session (s); if (s) { - - /* Currently, none of the displayed properties are mutable, so there is no reason to register for changes - * ARDOUR::Region::RegionPropertyChanged.connect (source_property_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::source_changed, this, _1, _2), gui_context()); - */ - ARDOUR::RegionFactory::CheckNewRegion.connect (add_source_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::add_source, this, _1), gui_context()); s->SourceRemoved.connect (remove_source_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::remove_weak_source, this, _1), gui_context()); @@ -420,10 +412,6 @@ EditorSources::populate_row (TreeModel::Row row, boost::shared_ptr(0)); _model->clear (); @@ -811,18 +799,13 @@ EditorSources::tag_edit (const std::string& path, const std::string& new_text) } } -void -EditorSources::selection_mapover (sigc::slot > sl) -{ -} - void EditorSources::drag_data_received (const RefPtr& context, int x, int y, const SelectionData& data, guint info, guint time) { - /* ToDo: allow dropping files/loops into the source list? */ + /* ToDo: allow dropping files/loops into the source list? */ } /** @return Region that has been dragged out of the list, or 0 */ @@ -899,5 +882,4 @@ EditorSources::get_state () const void EditorSources::set_state (const XMLNode & node) { - } diff --git a/gtk2_ardour/editor_sources.h b/gtk2_ardour/editor_sources.h index 05cc6ca3c6..95c5109227 100644 --- a/gtk2_ardour/editor_sources.h +++ b/gtk2_ardour/editor_sources.h @@ -36,28 +36,20 @@ public: void set_session (ARDOUR::Session *); - void set_selection (Selection *sel) { _selection = sel; } - Gtk::Widget& widget () { return _scroller; } void clear (); - void selection_mapover (sigc::slot >); - boost::shared_ptr get_dragged_region (); boost::shared_ptr get_single_selection (); - void block_change_connection (bool b) { - _change_connection.block (b); - } - void unselect_all () { _display.get_selection()->unselect_all (); } - //user actions + /* user actions */ void remove_selected_sources (); void recover_selected_sources(); @@ -127,38 +119,22 @@ private: void redisplay (); - void suspend_redisplay () { - _no_redisplay = true; - } - - void resume_redisplay () { - _no_redisplay = false; - redisplay (); - } - void drag_data_received ( Glib::RefPtr const &, gint, gint, Gtk::SelectionData const &, guint, guint ); - Gtk::Menu* _menu; Gtk::ScrolledWindow _scroller; - Gtk::Frame _frame; Gtkmm2ext::DnDTreeView > _display; Glib::RefPtr _model; - PBD::ScopedConnection source_property_connection; PBD::ScopedConnection add_source_connection; PBD::ScopedConnection remove_source_connection; PBD::ScopedConnectionList remove_region_connections; PBD::ScopedConnection editor_freeze_connection; PBD::ScopedConnection editor_thaw_connection; - - Selection* _selection; - - bool _no_redisplay; }; #endif