_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed));
- mute_button = manage (new BindableToggleButton (*_route->mute_control().get(), m_name ));
+ mute_button = manage (new BindableToggleButton (_route->mute_control(), m_name ));
mute_button->set_self_managed (true);
- solo_button = manage (new BindableToggleButton (*_route->solo_control().get(), s_name ));
+ solo_button = manage (new BindableToggleButton (_route->solo_control(), s_name ));
solo_button->set_self_managed (true);
mute_button->set_name ("MuteButton");
_session.RecordStateChanged.connect (mem_fun (*this, &RouteUI::session_rec_enable_changed));
- rec_enable_button = manage (new BindableToggleButton (*t->rec_enable_control().get(), r_name ));
+ rec_enable_button = manage (new BindableToggleButton (t->rec_enable_control(), r_name ));
rec_enable_button->set_name ("RecordEnableButton");
rec_enable_button->set_self_managed (true);
bool
RouteUI::mute_press(GdkEventButton* ev)
{
+ if (ev->type == GDK_2BUTTON_PRESS) {
+ return true;
+ }
+
if (!ignore_toggle) {
if (Keyboard::is_context_menu_event (ev)) {
} else {
if (ev->button == 2) {
- // ctrl-button2 click is the midi binding click
+ // Primary-button2 click is the midi binding click
// button2-click is "momentary"
- if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control))) {
+ if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
wait_for_release = true;
} else {
return false;
if (ev->button == 1 || ev->button == 2) {
- if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
+ if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
- /* ctrl-shift-click applies change to all routes */
+ /* Primary-Tertiary-click applies change to all routes */
_session.begin_reversible_command (_("mute change"));
Session::GlobalMuteStateCommand *cmd = new Session::GlobalMuteStateCommand(_session, this);
_session.add_command(cmd);
_session.commit_reversible_command ();
- } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
+ } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
- /* ctrl-click applies change to the mix group.
- ctrl-button2 is MIDI learn.
+ /* Primary-button1 applies change to the mix group.
+ NOTE: Primary-button2 is MIDI learn.
*/
if (ev->button == 1) {
bool
RouteUI::solo_press(GdkEventButton* ev)
{
+ /* ignore double clicks */
+
+ if (ev->type == GDK_2BUTTON_PRESS) {
+ return true;
+ }
+
if (!ignore_toggle) {
if (Keyboard::is_context_menu_event (ev)) {
if (ev->button == 2) {
- // ctrl-button2 click is the midi binding click
+ // Primary-button2 click is the midi binding click
// button2-click is "momentary"
- if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control))) {
+ if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
wait_for_release = true;
} else {
return false;
if (ev->button == 1 || ev->button == 2) {
- if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
+ if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
- /* ctrl-shift-click applies change to all routes */
+ /* Primary-Tertiary-click applies change to all routes */
_session.begin_reversible_command (_("solo change"));
Session::GlobalSoloStateCommand *cmd = new Session::GlobalSoloStateCommand(_session, this);
_session.add_command (cmd);
_session.commit_reversible_command ();
- } else if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Alt))) {
+ } else if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
- // ctrl-alt-click: exclusively solo this track, not a toggle */
+ // Primary-Secondary-click: exclusively solo this track, not a toggle */
_session.begin_reversible_command (_("solo change"));
Session::GlobalSoloStateCommand *cmd = new Session::GlobalSoloStateCommand (_session, this);
_session.add_command(cmd);
_session.commit_reversible_command ();
- } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
+ } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
// shift-click: set this route to solo safe
_route->set_solo_safe (!_route->solo_safe(), this);
wait_for_release = false;
- } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
+ } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
- /* ctrl-click: solo mix group.
- ctrl-button2 is MIDI learn.
+ /* Primary-button1: solo mix group.
+ NOTE: Primary-button2 is MIDI learn.
*/
if (ev->button == 1) {
} else {
/* click: solo this route */
-
reversibly_apply_route_boolean ("solo change", &Route::set_solo, !_route->soloed(), this);
}
}
bool
RouteUI::rec_enable_press(GdkEventButton* ev)
{
+ if (ev->type == GDK_2BUTTON_PRESS) {
+ return true;
+ }
+
if (!_session.engine().connected()) {
MessageDialog msg (_("Not connected to JACK - cannot engage record"));
msg.run ();
if (!ignore_toggle && is_track() && rec_enable_button) {
- if (ev->button == 2 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
+ if (ev->button == 2 && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
// do nothing on midi bind event
+ return false;
- } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
+ } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
_session.begin_reversible_command (_("rec-enable change"));
Session::GlobalRecordEnableStateCommand *cmd = new Session::GlobalRecordEnableStateCommand(_session, this);
_session.add_command(cmd);
_session.commit_reversible_command ();
- } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
+ } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
+
+ /* Primary-button1 applies change to the mix group.
+ NOTE: Primary-button2 is MIDI learn.
+ */
set_mix_group_rec_enable (_route, !_route->record_enabled());
ignore_toggle = true;
solo_button->set_active(x);
ignore_toggle = false;
- }
+ }
if (_route->solo_safe()) {
solo_button->set_visual_state (2);
for (iter = kids.begin(); iter != kids.end(); ++iter) {
if ((*iter)->name() == AutomationTimeAxisView::state_node_name) {
XMLProperty* type = (*iter)->property("automation-id");
- if (type && type->value() == param.to_string())
+ if (type && type->value() == param.symbol())
return *iter;
}
}
// Didn't find it, make a new one
XMLNode* child = new XMLNode (AutomationTimeAxisView::state_node_name);
- child->add_property("automation-id", param.to_string());
+ child->add_property("automation-id", param.symbol());
xml_node->add_child_nocopy (*child);
return child;