Amend 87bb0953d5 (Action script button text)

This commit is contained in:
Robin Gareus 2020-06-13 00:58:32 +02:00
parent 87bb0953d5
commit b6b95a1761
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 5 additions and 2 deletions

View File

@ -437,6 +437,11 @@ ARDOUR_UI::action_script_changed (int i, const std::string& n)
} else {
action_script_call_btn[i].set_icon (0, 0);
}
if (n.empty ()) {
action_script_call_btn[i].set_text (string_compose ("%1%2", std::hex, i+1));
} else {
action_script_call_btn[i].set_text (n.substr(0,1));
}
}
std::string const a = string_compose (X_("script-%1"), i + 1);
@ -446,12 +451,10 @@ 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 ();
}