MCP: more button tracing, more config stuff
git-svn-id: svn://localhost/ardour2/branches/3.0@11962 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
2329be8f6c
commit
411e2536c2
@ -69,8 +69,8 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
|
|||||||
Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 2));
|
Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 2));
|
||||||
table->set_spacings (4);
|
table->set_spacings (4);
|
||||||
|
|
||||||
table->attach (*manage (new Gtk::Label (_("Surface type:"))), 0, 1, 0, 1);
|
table->attach (*manage (new Gtk::Label (_("Surface type:"))), 0, 1, 0, 1, AttachOptions(FILL|EXPAND), AttachOptions(0));
|
||||||
table->attach (_surface_combo, 1, 2, 0, 1);
|
table->attach (_surface_combo, 1, 2, 0, 1, AttachOptions(FILL|EXPAND), AttachOptions(0));
|
||||||
|
|
||||||
vector<string> surfaces;
|
vector<string> surfaces;
|
||||||
|
|
||||||
@ -123,12 +123,51 @@ MackieControlProtocolGUI::rebuild_function_key_editor ()
|
|||||||
|
|
||||||
function_key_editor.append_column (_("Key"), function_key_columns.name);
|
function_key_editor.append_column (_("Key"), function_key_columns.name);
|
||||||
|
|
||||||
CellRendererCombo* plain_renderer = manage (new CellRendererCombo);
|
CellRendererCombo* action_renderer = manage (new CellRendererCombo);
|
||||||
plain_renderer->property_model() = available_action_model;
|
action_renderer->property_model() = available_action_model;
|
||||||
plain_renderer->property_editable() = true;
|
action_renderer->property_editable() = true;
|
||||||
plain_renderer->property_text_column() = 1;
|
action_renderer->property_text_column() = 0;
|
||||||
TreeViewColumn* plain_column = manage (new TreeViewColumn (_("plain"), *plain_renderer));
|
|
||||||
|
TreeViewColumn* plain_column = manage (new TreeViewColumn (_("Plain"), *action_renderer));
|
||||||
function_key_editor.append_column (*plain_column);
|
function_key_editor.append_column (*plain_column);
|
||||||
|
|
||||||
|
TreeViewColumn* shift_column = manage (new TreeViewColumn (_("Shift"), *action_renderer));
|
||||||
|
function_key_editor.append_column (*shift_column);
|
||||||
|
|
||||||
|
TreeViewColumn* control_column = manage (new TreeViewColumn (_("Control"), *action_renderer));
|
||||||
|
function_key_editor.append_column (*control_column);
|
||||||
|
|
||||||
|
TreeViewColumn* option_column = manage (new TreeViewColumn (_("Option"), *action_renderer));
|
||||||
|
function_key_editor.append_column (*option_column);
|
||||||
|
|
||||||
|
TreeViewColumn* cmdalt_column = manage (new TreeViewColumn (_("Cmd/Alt"), *action_renderer));
|
||||||
|
function_key_editor.append_column (*cmdalt_column);
|
||||||
|
|
||||||
|
TreeViewColumn* shiftcontrol_column = manage (new TreeViewColumn (_("Shift+Control"), *action_renderer));
|
||||||
|
function_key_editor.append_column (*shiftcontrol_column);
|
||||||
|
|
||||||
|
/* now fill with data */
|
||||||
|
|
||||||
|
function_key_model = ListStore::create (function_key_columns);
|
||||||
|
|
||||||
|
r = *(function_key_model->append());
|
||||||
|
r[function_key_columns.name] = "F1";
|
||||||
|
r = *(function_key_model->append());
|
||||||
|
r[function_key_columns.name] = "F2";
|
||||||
|
r = *(function_key_model->append());
|
||||||
|
r[function_key_columns.name] = "F3";
|
||||||
|
r = *(function_key_model->append());
|
||||||
|
r[function_key_columns.name] = "F4";
|
||||||
|
r = *(function_key_model->append());
|
||||||
|
r[function_key_columns.name] = "F5";
|
||||||
|
r = *(function_key_model->append());
|
||||||
|
r[function_key_columns.name] = "F6";
|
||||||
|
r = *(function_key_model->append());
|
||||||
|
r[function_key_columns.name] = "F7";
|
||||||
|
r = *(function_key_model->append());
|
||||||
|
r[function_key_columns.name] = "F8";
|
||||||
|
|
||||||
|
function_key_editor.set_model (function_key_model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -52,7 +52,7 @@ class MackieControlProtocolGUI : public Gtk::Notebook
|
|||||||
struct FunctionKeyColumns : public Gtk::TreeModel::ColumnRecord {
|
struct FunctionKeyColumns : public Gtk::TreeModel::ColumnRecord {
|
||||||
FunctionKeyColumns() {
|
FunctionKeyColumns() {
|
||||||
add (name);
|
add (name);
|
||||||
add (unmodified);
|
add (plain);
|
||||||
add (shift);
|
add (shift);
|
||||||
add (control);
|
add (control);
|
||||||
add (option);
|
add (option);
|
||||||
@ -60,7 +60,7 @@ class MackieControlProtocolGUI : public Gtk::Notebook
|
|||||||
add (shiftcontrol);
|
add (shiftcontrol);
|
||||||
};
|
};
|
||||||
Gtk::TreeModelColumn<std::string> name;
|
Gtk::TreeModelColumn<std::string> name;
|
||||||
Gtk::TreeModelColumn<std::string> unmodified;
|
Gtk::TreeModelColumn<std::string> plain;
|
||||||
Gtk::TreeModelColumn<std::string> shift;
|
Gtk::TreeModelColumn<std::string> shift;
|
||||||
Gtk::TreeModelColumn<std::string> control;
|
Gtk::TreeModelColumn<std::string> control;
|
||||||
Gtk::TreeModelColumn<std::string> option;
|
Gtk::TreeModelColumn<std::string> option;
|
||||||
|
@ -1208,6 +1208,8 @@ MackieControlProtocol::select_range ()
|
|||||||
|
|
||||||
pull_route_range (_down_select_buttons, routes);
|
pull_route_range (_down_select_buttons, routes);
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("select range: found %1 routes\n", routes.size()));
|
||||||
|
|
||||||
if (!routes.empty()) {
|
if (!routes.empty()) {
|
||||||
for (RouteList::iterator r = routes.begin(); r != routes.end(); ++r) {
|
for (RouteList::iterator r = routes.begin(); r != routes.end(); ++r) {
|
||||||
if (r == routes.begin()) {
|
if (r == routes.begin()) {
|
||||||
|
@ -415,10 +415,13 @@ Strip::handle_button (Button& button, ButtonState bs)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::MackieControl, "add select button on press\n");
|
||||||
_surface->mcp().add_down_select_button (_surface->number(), _index);
|
_surface->mcp().add_down_select_button (_surface->number(), _index);
|
||||||
|
|
||||||
_surface->mcp().select_range ();
|
_surface->mcp().select_range ();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
DEBUG_TRACE (DEBUG::MackieControl, "remove select button on release\n");
|
||||||
_surface->mcp().remove_down_select_button (_surface->number(), _index);
|
_surface->mcp().remove_down_select_button (_surface->number(), _index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,6 +451,7 @@ Strip::handle_button (Button& button, ButtonState bs)
|
|||||||
if (control) {
|
if (control) {
|
||||||
|
|
||||||
if (bs == press) {
|
if (bs == press) {
|
||||||
|
DEBUG_TRACE (DEBUG::MackieControl, "add button on release\n");
|
||||||
_surface->mcp().add_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index);
|
_surface->mcp().add_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index);
|
||||||
|
|
||||||
float new_value;
|
float new_value;
|
||||||
@ -467,6 +471,9 @@ Strip::handle_button (Button& button, ButtonState bs)
|
|||||||
MackieControlProtocol::ControlList controls = _surface->mcp().down_controls ((AutomationType) control->parameter().type());
|
MackieControlProtocol::ControlList controls = _surface->mcp().down_controls ((AutomationType) control->parameter().type());
|
||||||
|
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("there are %1 buttons down for control type %2, new value = %3\n",
|
||||||
|
controls.size(), control->parameter().type(), new_value));
|
||||||
|
|
||||||
/* apply change */
|
/* apply change */
|
||||||
|
|
||||||
for (MackieControlProtocol::ControlList::iterator c = controls.begin(); c != controls.end(); ++c) {
|
for (MackieControlProtocol::ControlList::iterator c = controls.begin(); c != controls.end(); ++c) {
|
||||||
@ -474,6 +481,7 @@ Strip::handle_button (Button& button, ButtonState bs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
DEBUG_TRACE (DEBUG::MackieControl, "remove button on release\n");
|
||||||
_surface->mcp().remove_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index);
|
_surface->mcp().remove_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user