13
0

Use first char of bound script action in button

In case an action-script does not have a custom icon, use the first
character of the script's name.

see also https://discourse.ardour.org/t/new-ideas-for-2020/104235
This commit is contained in:
Robin Gareus 2020-06-13 00:12:26 +02:00
parent cda2e004a8
commit 87bb0953d5
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -446,10 +446,12 @@ ARDOUR_UI::action_script_changed (int i, const std::string& n)
act->set_label (string_compose (_("Unset #%1"), i + 1));
act->set_tooltip (_("No action bound\nRight-click to assign"));
act->set_sensitive (false);
action_script_call_btn[i].set_text (string_compose ("%1%2", std::hex, i+1));
} else {
act->set_label (n);
act->set_tooltip (string_compose (_("%1\n\nClick to run\nRight-click to re-assign\nShift+right-click to unassign"), n));
act->set_sensitive (true);
action_script_call_btn[i].set_text (n.substr(0,1));
}
KeyEditor::UpdateBindings ();
}