}
}
-RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
+RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, boost::shared_ptr<Route> rt, Canvas& canvas)
: AxisView(sess)
, RouteUI(rt, sess)
, TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas)
controls_table.attach (*rec_enable_button, 5, 6, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
ARDOUR_UI::instance()->tooltips().set_tip(*rec_enable_button, _("Record"));
- rec_enable_button->set_sensitive (_session.writable());
+ rec_enable_button->set_sensitive (_session->writable());
}
controls_hbox.pack_start(gm.get_level_meter(), false, false);
- _route->meter_change.connect (sigc::mem_fun(*this, &RouteTimeAxisView::meter_changed));
- _route->input()->changed.connect (sigc::mem_fun(*this, &RouteTimeAxisView::io_changed));
- _route->output()->changed.connect (sigc::mem_fun(*this, &RouteTimeAxisView::io_changed));
+ _route->meter_change.connect (*this, ui_bind (&RouteTimeAxisView::meter_changed, this, _1), gui_context());
+ _route->input()->changed.connect (*this, ui_bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
+ _route->output()->changed.connect (*this, ui_bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
controls_table.attach (*mute_button, 6, 7, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
controls_table.attach (*solo_button, 7, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
_y_position = -1;
- _route->mute_changed.connect (sigc::mem_fun(*this, &RouteUI::mute_changed));
- _route->solo_changed.connect (sigc::mem_fun(*this, &RouteUI::solo_changed));
- _route->processors_changed.connect (sigc::mem_fun(*this, &RouteTimeAxisView::processors_changed));
- _route->NameChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::route_name_changed));
- _route->solo_isolated_changed.connect (sigc::mem_fun(*this, &RouteUI::solo_changed));
+ _route->mute_changed.connect (*this, ui_bind (&RouteUI::mute_changed, this, _1), gui_context());
+ _route->solo_changed.connect (*this, ui_bind (&RouteUI::solo_changed, this, _1), gui_context());
+ _route->processors_changed.connect (*this, ui_bind (&RouteTimeAxisView::processors_changed, this, _1), gui_context());
+ _route->NameChanged.connect (*this, boost::bind (&RouteTimeAxisView::route_name_changed, this), gui_context());
+ _route->solo_isolated_changed.connect (*this, ui_bind (&RouteUI::solo_changed, this, _1), gui_context());
if (is_track()) {
- track()->TrackModeChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::track_mode_changed));
- track()->FreezeChange.connect (sigc::mem_fun(*this, &RouteTimeAxisView::map_frozen));
- track()->DiskstreamChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::diskstream_changed));
- get_diskstream()->SpeedChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::speed_changed));
+ track()->TrackModeChanged.connect (*this, boost::bind (&RouteTimeAxisView::track_mode_changed, this), gui_context());
+ track()->FreezeChange.connect (*this, boost::bind (&RouteTimeAxisView::map_frozen, this), gui_context());
+ track()->DiskstreamChanged.connect (*this, boost::bind (&RouteTimeAxisView::diskstream_changed, this), gui_context());
+ get_diskstream()->SpeedChanged.connect (*this, boost::bind (&RouteTimeAxisView::speed_changed, this), gui_context());
/* pick up the correct freeze state */
map_frozen ();
RouteTimeAxisView::~RouteTimeAxisView ()
{
- GoingAway (); /* EMIT_SIGNAL */
+ drop_references ();
+ drop_connections ();
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
delete *i;
if (!Profile->get_sae()) {
items.push_back (MenuElem (_("Alignment"), *alignment_menu));
- get_diskstream()->AlignmentStyleChanged.connect (
- sigc::mem_fun(*this, &RouteTimeAxisView::align_style_changed));
+ get_diskstream()->AlignmentStyleChanged.connect (route_connections, boost::bind (&RouteTimeAxisView::align_style_changed, this), gui_context());
RadioMenuItem::Group mode_group;
items.push_back (RadioMenuElem (mode_group, _("Normal mode"), sigc::bind (
}
}
- get_diskstream()->AlignmentStyleChanged.connect (
- sigc::mem_fun(*this, &RouteTimeAxisView::align_style_changed));
+ get_diskstream()->AlignmentStyleChanged.connect (route_connections, boost::bind (&RouteTimeAxisView::align_style_changed, this), gui_context());
mode_menu = build_mode_menu();
if (mode_menu)
name = resolve_new_group_playlist_name(name, playlists_before_op);
}
- while (_session.playlists->by_name(name)) {
- name = Playlist::bump_name (name, _session);
+ while (_session->playlists->by_name(name)) {
+ name = Playlist::bump_name (name, *_session);
}
// TODO: The prompter "new" button should be de-activated if the user
name = resolve_new_group_playlist_name(name,playlists_before_op);
}
- while (_session.playlists->by_name(name)) {
- name = Playlist::bump_name (name, _session);
+ while (_session->playlists->by_name(name)) {
+ name = Playlist::bump_name (name, *_session);
}
return;
}
- PublicEditor::TrackViewList* tracks = _editor.get_valid_views (this, _route->route_group());
-
switch (ArdourKeyboard::selection_type (ev->state)) {
case Selection::Toggle:
- _editor.get_selection().toggle (*tracks);
+ _editor.get_selection().toggle (this);
break;
case Selection::Set:
- _editor.get_selection().set (*tracks);
+ _editor.get_selection().set (this);
break;
case Selection::Extend:
- if (tracks->size() > 1) {
- /* add each one, do not "extend" */
- _editor.get_selection().add (*tracks);
- } else {
- /* extend to the single track */
- _editor.extend_selection_to_track (*tracks->front());
- }
+ _editor.extend_selection_to_track (*this);
break;
case Selection::Add:
- _editor.get_selection().add (*tracks);
+ _editor.get_selection().add (this);
break;
}
-
- delete tracks;
}
void
return;
}
- if (!_session.route_name_unique (x)) {
+ if (!_session->route_name_unique (x)) {
ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
name_entry.set_text (_route->name());
- } else if (_session.route_name_internal (x)) {
+ } else if (_session->route_name_internal (x)) {
ARDOUR_UI::instance()->popup_error (_("You cannot create a track with that name as it is reserved for Ardour"));
name_entry.set_text (_route->name());
} else {
case Cut:
if ((what_we_got = playlist->cut (time)) != 0) {
_editor.get_cut_buffer().add (what_we_got);
- _session.add_command( new MementoCommand<Playlist>(*playlist.get(), &before, &playlist->get_state()));
+ _session->add_command( new MementoCommand<Playlist>(*playlist.get(), &before, &playlist->get_state()));
ret = true;
}
break;
case Clear:
if ((what_we_got = playlist->cut (time)) != 0) {
- _session.add_command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
+ _session->add_command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
what_we_got->release ();
ret = true;
}
XMLNode &before = playlist->get_state();
playlist->paste (*p, pos, times);
- _session.add_command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
+ _session->add_command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
return true;
}
boost::shared_ptr<Diskstream> ds = get_diskstream();
RadioMenuItem::Group playlist_group;
- _session.playlists->get (playlists);
+ _session->playlists->get (playlists);
for (vector<boost::shared_ptr<Playlist> >::iterator i = playlists.begin(); i != playlists.end(); ++i) {
continue;
}
- boost::shared_ptr<Playlist> ipl = session().playlists->by_name(playlist_name);
+ boost::shared_ptr<Playlist> ipl = session()->playlists->by_name(playlist_name);
if (!ipl) {
// No playlist for this track for this take yet, make it
track->diskstream()->use_new_playlist();