mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Cleanup SourceList: remove unused copy/pasted region-list code
This commit is contained in:
parent
f158d2064d
commit
a886f2bfcb
2 changed files with 2 additions and 44 deletions
|
|
@ -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<ARDOUR::Regio
|
|||
void
|
||||
EditorSources::redisplay ()
|
||||
{
|
||||
if (_no_redisplay || !_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
remove_region_connections.drop_connections ();
|
||||
_display.set_model (Glib::RefPtr<Gtk::TreeStore>(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<void,boost::shared_ptr<Region> > sl)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
EditorSources::drag_data_received (const RefPtr<Gdk::DragContext>& 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)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<void,boost::shared_ptr<ARDOUR::Region> >);
|
||||
|
||||
boost::shared_ptr<ARDOUR::Region> get_dragged_region ();
|
||||
boost::shared_ptr<ARDOUR::Region> 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<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint
|
||||
);
|
||||
|
||||
Gtk::Menu* _menu;
|
||||
Gtk::ScrolledWindow _scroller;
|
||||
Gtk::Frame _frame;
|
||||
|
||||
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > _display;
|
||||
|
||||
Glib::RefPtr<Gtk::TreeStore> _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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue