ActionManager::get_all_actions() no longer includes <Actions> in the paths it returns, part 2 (surface support)

This commit is contained in:
Paul Davis 2019-03-20 11:15:34 -07:00
parent df29e57cb4
commit 94d859e30d
6 changed files with 7 additions and 31 deletions

View file

@ -456,13 +456,7 @@ CC121GUI::build_available_action_menu ()
action_map[*l] = *p;
}
string path = (*p);
/* ControlProtocol::access_action() is not interested in the
legacy "<Actions>/" prefix part of a path.
*/
path = path.substr (strlen ("<Actions>/"));
row[action_columns.path] = path;
row[action_columns.path] = *p;
}
}

View file

@ -453,13 +453,7 @@ FPGUI::build_available_action_menu ()
action_map[*l] = *p;
}
string path = (*p);
/* ControlProtocol::access_action() is not interested in the
legacy "<Actions>/" prefix part of a path.
*/
path = path.substr (strlen ("<Actions>/"));
row[action_columns.path] = path;
row[action_columns.path] = *p;
}
}

View file

@ -432,13 +432,7 @@ FP8GUI::build_available_action_menu ()
action_map[*l] = *p;
}
string path = (*p);
/* ControlProtocol::access_action() is not interested in the
legacy "<Actions>/" prefix part of a path.
*/
path = path.substr (strlen ("<Actions>/"));
row[action_columns.path] = path;
row[action_columns.path] = *p;
}
}

View file

@ -258,7 +258,7 @@ DeviceProfile::get_button_action (Button::ID id, int modifier_state) const
}
void
DeviceProfile::set_button_action (Button::ID id, int modifier_state, const string& act)
DeviceProfile::set_button_action (Button::ID id, int modifier_state, const string& action)
{
ButtonActionMap::iterator i = _button_map.find (id);
@ -266,9 +266,6 @@ DeviceProfile::set_button_action (Button::ID id, int modifier_state, const strin
i = _button_map.insert (std::make_pair (id, ButtonActions())).first;
}
string action (act);
replace_all (action, "<Actions>/", "");
if (modifier_state == MackieControlProtocol::MODIFIER_CONTROL) {
i->second.control = action;
} else if (modifier_state == MackieControlProtocol::MODIFIER_SHIFT) {

View file

@ -548,7 +548,7 @@ MackieControlProtocolGUI::build_available_action_menu ()
action_map[*l] = *p;
}
row[available_action_columns.path] = (*p);
row[available_action_columns.path] = *p;
}
}

View file

@ -230,12 +230,12 @@ DeviceProfile::get_button_action (Button::ID id, int modifier_state) const
if (modifier_state == US2400Protocol::MODIFIER_SHIFT) {
return i->second.shift;
}
return i->second.plain;
}
void
DeviceProfile::set_button_action (Button::ID id, int modifier_state, const string& act)
DeviceProfile::set_button_action (Button::ID id, int modifier_state, const string& action)
{
ButtonActionMap::iterator i = _button_map.find (id);
@ -243,9 +243,6 @@ DeviceProfile::set_button_action (Button::ID id, int modifier_state, const strin
i = _button_map.insert (std::make_pair (id, ButtonActions())).first;
}
string action (act);
replace_all (action, "<Actions>/", "");
if (modifier_state == US2400Protocol::MODIFIER_SHIFT) {
i->second.shift = action;
}