summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-04-13 16:11:55 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-04-13 16:11:55 +0000
commit8f7fa7d93b47665c14e452b06e0fb017d0dd653d (patch)
tree82fd92bd3231aeea8f724390a567d776dfd18607 /gtk2_ardour
parentf511b7cc6b504926b8885aeb8fc7bafd1212887a (diff)
MCP: timeout display of value when altering with fader or pot; range ops on strip buttons should work; select logic may be broken
git-svn-id: svn://localhost/ardour2/branches/3.0@11959 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.cc23
-rw-r--r--gtk2_ardour/editor.h2
2 files changed, 20 insertions, 5 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index eb262ffb24..3a7023ba94 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -712,8 +712,6 @@ Editor::Editor ()
ControlProtocol::Undo.connect (*this, invalidator (*this), boost::bind (&Editor::undo, this, true), gui_context());
ControlProtocol::Redo.connect (*this, invalidator (*this), boost::bind (&Editor::redo, this, true), gui_context());
ControlProtocol::ScrollTimeline.connect (*this, invalidator (*this), ui_bind (&Editor::control_scroll, this, _1), gui_context());
- ControlProtocol::SelectByRID.connect (*this, invalidator (*this), ui_bind (&Editor::control_select, this, _1), gui_context());
- ControlProtocol::UnselectTrack.connect (*this, invalidator (*this), ui_bind (&Editor::control_unselect, this), gui_context());
ControlProtocol::GotoView.connect (*this, invalidator (*this), ui_bind (&Editor::control_view, this, _1), gui_context());
ControlProtocol::CloseDialog.connect (*this, invalidator (*this), Keyboard::close_current_dialog, gui_context());
ControlProtocol::VerticalZoomInAll.connect (*this, invalidator (*this), ui_bind (&Editor::control_vertical_zoom_in_all, this), gui_context());
@@ -721,6 +719,11 @@ Editor::Editor ()
ControlProtocol::VerticalZoomInSelected.connect (*this, invalidator (*this), ui_bind (&Editor::control_vertical_zoom_in_selected, this), gui_context());
ControlProtocol::VerticalZoomOutSelected.connect (*this, invalidator (*this), ui_bind (&Editor::control_vertical_zoom_out_selected, this), gui_context());
+ ControlProtocol::AddRouteToSelection.connect (*this, invalidator (*this), ui_bind (&Editor::control_select, this, _1, Selection::Add), gui_context());
+ ControlProtocol::RemoveRouteFromSelection.connect (*this, invalidator (*this), ui_bind (&Editor::control_select, this, _1, Selection::Toggle), gui_context());
+ ControlProtocol::SetRouteSelection.connect (*this, invalidator (*this), ui_bind (&Editor::control_select, this, _1, Selection::Set), gui_context());
+ ControlProtocol::ClearRouteSelection.connect (*this, invalidator (*this), ui_bind (&Editor::control_unselect, this), gui_context());
+
BasicUI::AccessAction.connect (*this, invalidator (*this), ui_bind (&Editor::access_action, this, _1, _2), gui_context());
/* problematic: has to return a value and thus cannot be x-thread */
@@ -966,7 +969,7 @@ Editor::control_unselect ()
}
void
-Editor::control_select (uint32_t rid)
+Editor::control_select (uint32_t rid, Selection::Operation op)
{
/* handles the (static) signal from the ControlProtocol class that
* requests setting the selected track to a given RID
@@ -985,7 +988,19 @@ Editor::control_select (uint32_t rid)
TimeAxisView* tav = axis_view_from_route (r);
if (tav) {
- selection->set (tav);
+ switch (op) {
+ case Selection::Add:
+ selection->add (tav);
+ break;
+ case Selection::Toggle:
+ selection->toggle (tav);
+ break;
+ case Selection::Extend:
+ break;
+ case Selection::Set:
+ selection->set (tav);
+ break;
+ }
} else {
selection->clear_tracks ();
}
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index a3315b6c19..89ee98d29c 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -994,7 +994,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void control_vertical_zoom_out_selected ();
void control_view (uint32_t);
void control_scroll (float);
- void control_select (uint32_t rid);
+ void control_select (uint32_t rid, Selection::Operation);
void control_unselect ();
void access_action (std::string,std::string);
bool deferred_control_scroll (framepos_t);