mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +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)
|
: EditorComponent (e)
|
||||||
, old_focus (0)
|
, old_focus (0)
|
||||||
, tags_editable (0)
|
, tags_editable (0)
|
||||||
, _menu (0)
|
|
||||||
, _selection (0)
|
|
||||||
, _no_redisplay (false)
|
|
||||||
{
|
{
|
||||||
_display.set_size_request (100, -1);
|
_display.set_size_request (100, -1);
|
||||||
_display.set_rules_hint (true);
|
_display.set_rules_hint (true);
|
||||||
|
|
@ -280,11 +277,6 @@ EditorSources::set_session (ARDOUR::Session* s)
|
||||||
SessionHandlePtr::set_session (s);
|
SessionHandlePtr::set_session (s);
|
||||||
|
|
||||||
if (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());
|
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());
|
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
|
void
|
||||||
EditorSources::redisplay ()
|
EditorSources::redisplay ()
|
||||||
{
|
{
|
||||||
if (_no_redisplay || !_session) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
remove_region_connections.drop_connections ();
|
remove_region_connections.drop_connections ();
|
||||||
_display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
|
_display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
|
||||||
_model->clear ();
|
_model->clear ();
|
||||||
|
|
@ -811,11 +799,6 @@ 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
|
void
|
||||||
EditorSources::drag_data_received (const RefPtr<Gdk::DragContext>& context,
|
EditorSources::drag_data_received (const RefPtr<Gdk::DragContext>& context,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
|
|
@ -899,5 +882,4 @@ EditorSources::get_state () const
|
||||||
void
|
void
|
||||||
EditorSources::set_state (const XMLNode & node)
|
EditorSources::set_state (const XMLNode & node)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,28 +36,20 @@ public:
|
||||||
|
|
||||||
void set_session (ARDOUR::Session *);
|
void set_session (ARDOUR::Session *);
|
||||||
|
|
||||||
void set_selection (Selection *sel) { _selection = sel; }
|
|
||||||
|
|
||||||
Gtk::Widget& widget () {
|
Gtk::Widget& widget () {
|
||||||
return _scroller;
|
return _scroller;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear ();
|
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_dragged_region ();
|
||||||
boost::shared_ptr<ARDOUR::Region> get_single_selection ();
|
boost::shared_ptr<ARDOUR::Region> get_single_selection ();
|
||||||
|
|
||||||
void block_change_connection (bool b) {
|
|
||||||
_change_connection.block (b);
|
|
||||||
}
|
|
||||||
|
|
||||||
void unselect_all () {
|
void unselect_all () {
|
||||||
_display.get_selection()->unselect_all ();
|
_display.get_selection()->unselect_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//user actions
|
/* user actions */
|
||||||
void remove_selected_sources ();
|
void remove_selected_sources ();
|
||||||
void recover_selected_sources();
|
void recover_selected_sources();
|
||||||
|
|
||||||
|
|
@ -127,38 +119,22 @@ private:
|
||||||
|
|
||||||
void redisplay ();
|
void redisplay ();
|
||||||
|
|
||||||
void suspend_redisplay () {
|
|
||||||
_no_redisplay = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void resume_redisplay () {
|
|
||||||
_no_redisplay = false;
|
|
||||||
redisplay ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void drag_data_received (
|
void drag_data_received (
|
||||||
Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint
|
Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint
|
||||||
);
|
);
|
||||||
|
|
||||||
Gtk::Menu* _menu;
|
|
||||||
Gtk::ScrolledWindow _scroller;
|
Gtk::ScrolledWindow _scroller;
|
||||||
Gtk::Frame _frame;
|
|
||||||
|
|
||||||
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > _display;
|
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > _display;
|
||||||
|
|
||||||
Glib::RefPtr<Gtk::TreeStore> _model;
|
Glib::RefPtr<Gtk::TreeStore> _model;
|
||||||
|
|
||||||
PBD::ScopedConnection source_property_connection;
|
|
||||||
PBD::ScopedConnection add_source_connection;
|
PBD::ScopedConnection add_source_connection;
|
||||||
PBD::ScopedConnection remove_source_connection;
|
PBD::ScopedConnection remove_source_connection;
|
||||||
PBD::ScopedConnectionList remove_region_connections;
|
PBD::ScopedConnectionList remove_region_connections;
|
||||||
|
|
||||||
PBD::ScopedConnection editor_freeze_connection;
|
PBD::ScopedConnection editor_freeze_connection;
|
||||||
PBD::ScopedConnection editor_thaw_connection;
|
PBD::ScopedConnection editor_thaw_connection;
|
||||||
|
|
||||||
Selection* _selection;
|
|
||||||
|
|
||||||
bool _no_redisplay;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue