1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-09 06:06:24 +01:00

Tooltip for Transcription play button mentions the shortcut...

... but only for the version without shift or ctrl modifier key.

Should it mention those others too?  It might get too long.
This commit is contained in:
Paul Licameli
2016-06-11 23:38:29 -04:00
parent 1f72f8db18
commit c1a22816f8

View File

@@ -298,7 +298,25 @@ void TranscriptionToolBar::UpdatePrefs()
void TranscriptionToolBar::RegenerateTooltips()
{
mButtons[TTB_PlaySpeed]->SetToolTip(_("Play-at-speed"));
// We could also mention the shift- and ctrl-modified versions in the
// tool tip... but it would get long
static const struct Entry {
int tool;
wxString commandName;
wxString untranslatedLabel;
} table[] = {
{ TTB_PlaySpeed, wxT("PlayAtSpeed"), XO("Play-at-speed") },
};
std::vector<wxString> commands;
for (const auto &entry : table) {
commands.clear();
commands.push_back(wxGetTranslation(entry.untranslatedLabel));
commands.push_back(entry.commandName);
ToolBar::SetButtonToolTip(*mButtons[entry.tool], commands);
}
#ifdef EXPERIMENTAL_VOICE_DETECTION
mButtons[TTB_StartOn]->SetToolTip(TRANSLATABLE("Left-to-On"));