RadioButtonGroup rb_group = absolute_touch_mode_button.get_group();
touch_move_mode_button.set_group (rb_group);
+ recalibrate_fader_button.signal_clicked().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::recalibrate_faders));
+ backlight_button.signal_clicked().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::toggle_backlight));
+
+ touch_sensitivity_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::touch_sensitive_change));
+ touch_sensitivity_scale.set_update_policy (Gtk::UPDATE_DISCONTINUOUS);
+
l = manage (new Gtk::Label (_("Button click")));
l->set_alignment (1.0, 0.5);
table->attach (*l, 0, 1, 1, 2, AttachOptions(FILL|EXPAND), AttachOptions (0));
ipmidi_base_port_spinner.set_sensitive (_cp.device_info().uses_ipmidi());
ipmidi_base_port_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::ipmidi_spinner_changed));
-
table->attach (discover_button, 1, 2, 8, 9, AttachOptions(FILL|EXPAND), AttachOptions (0));
discover_button.signal_clicked().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::discover_clicked));
parent = *(rowp);
parent[available_action_columns.name] = _("Remove Binding");
+ /* Key aliasing */
+
+ rowp = available_action_model->append();
+ parent = *(rowp);
+ parent[available_action_columns.name] = _("Shift");
+ rowp = available_action_model->append();
+ parent = *(rowp);
+ parent[available_action_columns.name] = _("Control");
+ rowp = available_action_model->append();
+ parent = *(rowp);
+ parent[available_action_columns.name] = _("Option");
+ rowp = available_action_model->append();
+ parent = *(rowp);
+ parent[available_action_columns.name] = _("CmdAlt");
+
+
for (l = labels.begin(), k = keys.begin(), p = paths.begin(), t = tooltips.begin(); l != labels.end(); ++k, ++p, ++t, ++l) {
TreeModel::Row row;
if (action.empty()) {
row[function_key_columns.plain] = defstring;
} else {
- act = ActionManager::get_action (action.c_str());
- if (act) {
- row[function_key_columns.plain] = act->get_label();
+ if (action.find ('/') == string::npos) {
+ /* Probably a key alias */
+ row[function_key_columns.plain] = action;
} else {
- row[function_key_columns.plain] = defstring;
+
+ act = ActionManager::get_action (action.c_str());
+ if (act) {
+ row[function_key_columns.plain] = act->get_label();
+ } else {
+ row[function_key_columns.plain] = defstring;
+ }
}
}
if (action.empty()) {
row[function_key_columns.control] = defstring;
} else {
- act = ActionManager::get_action (action.c_str());
- if (act) {
- row[function_key_columns.control] = act->get_label();
+ if (action.find ('/') == string::npos) {
+ /* Probably a key alias */
+ row[function_key_columns.control] = action;
} else {
- row[function_key_columns.control] = defstring;
+ act = ActionManager::get_action (action.c_str());
+ if (act) {
+ row[function_key_columns.control] = act->get_label();
+ } else {
+ row[function_key_columns.control] = defstring;
+ }
}
}
if (action.empty()) {
row[function_key_columns.shift] = defstring;
} else {
- act = ActionManager::get_action (action.c_str());
- if (act) {
- row[function_key_columns.shift] = act->get_label();
+ if (action.find ('/') == string::npos) {
+ /* Probably a key alias */
+ row[function_key_columns.shift] = action;
} else {
- row[function_key_columns.shift] = defstring;
+ act = ActionManager::get_action (action.c_str());
+ if (act) {
+ row[function_key_columns.shift] = act->get_label();
+ } else {
+ row[function_key_columns.shift] = defstring;
+ }
}
}
if (action.empty()) {
row[function_key_columns.option] = defstring;
} else {
- act = ActionManager::get_action (action.c_str());
- if (act) {
- row[function_key_columns.option] = act->get_label();
+ if (action.find ('/') == string::npos) {
+ /* Probably a key alias */
+ row[function_key_columns.option] = action;
} else {
- row[function_key_columns.option] = defstring;
+ act = ActionManager::get_action (action.c_str());
+ if (act) {
+ row[function_key_columns.option] = act->get_label();
+ } else {
+ row[function_key_columns.option] = defstring;
+ }
}
}
if (action.empty()) {
row[function_key_columns.cmdalt] = defstring;
} else {
- act = ActionManager::get_action (action.c_str());
- if (act) {
- row[function_key_columns.cmdalt] = act->get_label();
+ if (action.find ('/') == string::npos) {
+ /* Probably a key alias */
+ row[function_key_columns.cmdalt] = action;
} else {
- row[function_key_columns.cmdalt] = defstring;
+ act = ActionManager::get_action (action.c_str());
+ if (act) {
+ row[function_key_columns.cmdalt] = act->get_label();
+ } else {
+ row[function_key_columns.cmdalt] = defstring;
+ }
}
}
void
MackieControlProtocolGUI::surface_combo_changed ()
{
+ _cp.not_session_load();
_cp.set_device (_surface_combo.get_active_text());
/* update ipMIDI field */
/* this should help to get things started */
_cp.midi_connectivity_established ();
}
+
+void
+MackieControlProtocolGUI::recalibrate_faders ()
+{
+ _cp.recalibrate_faders ();
+}
+
+void
+MackieControlProtocolGUI::toggle_backlight ()
+{
+ _cp.toggle_backlight ();
+}
+
+void
+MackieControlProtocolGUI::touch_sensitive_change ()
+{
+ int sensitivity = (int) touch_sensitivity_adjustment.get_value ();
+ _cp.set_touch_sensitivity (sensitivity);
+}