From 87bb0953d55c87249612108e379232e8964e0aac Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 13 Jun 2020 00:12:26 +0200 Subject: [PATCH] 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 --- gtk2_ardour/ardour_ui_dependents.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 85dc0bab20..b5922aeab8 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -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 (); }