mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-09 13:12:17 +01:00
Bug49 (partial): Correctly recreate tooltips in device bar for language change
This commit is contained in:
@@ -97,7 +97,6 @@ void DeviceToolBar::Populate()
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize);
|
||||
mHost->SetName(_("Audio Host"));
|
||||
|
||||
Add(mHost, 0, wxALIGN_CENTER);
|
||||
|
||||
@@ -113,15 +112,12 @@ void DeviceToolBar::Populate()
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize);
|
||||
/* i18n-hint: (noun) It's the device used for recording.*/
|
||||
mInput->SetName(_("Recording Device"));
|
||||
Add(mInput, 0, wxALIGN_CENTER);
|
||||
|
||||
mInputChannels = new wxChoice(this,
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize);
|
||||
mInputChannels->SetName(_("Recording Channels"));
|
||||
Add(mInputChannels, 0, wxALIGN_CENTER);
|
||||
|
||||
// Output device
|
||||
@@ -135,8 +131,6 @@ void DeviceToolBar::Populate()
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize);
|
||||
/* i18n-hint: (noun) It's the device used for playback.*/
|
||||
mOutput->SetName(_("Playback Device"));
|
||||
Add(mOutput, 0, wxALIGN_CENTER);
|
||||
|
||||
|
||||
@@ -175,6 +169,8 @@ void DeviceToolBar::Populate()
|
||||
NULL,
|
||||
this);
|
||||
|
||||
SetNames();
|
||||
|
||||
RefillCombos();
|
||||
}
|
||||
|
||||
@@ -347,9 +343,20 @@ void DeviceToolBar::EnableDisableButtons()
|
||||
}
|
||||
}
|
||||
|
||||
void DeviceToolBar::SetNames()
|
||||
{
|
||||
/* i18n-hint: (noun) It's the device used for playback.*/
|
||||
mOutput->SetName(_("Playback Device"));
|
||||
/* i18n-hint: (noun) It's the device used for recording.*/
|
||||
mInput->SetName(_("Recording Device"));
|
||||
mHost->SetName(_("Audio Host"));
|
||||
mInputChannels->SetName(_("Recording Channels"));
|
||||
}
|
||||
|
||||
void DeviceToolBar::RegenerateTooltips()
|
||||
{
|
||||
#if wxUSE_TOOLTIPS
|
||||
SetNames();
|
||||
mOutput->SetToolTip(mOutput->GetName() + wxT(" - ") + mOutput->GetStringSelection());
|
||||
mInput->SetToolTip(mInput->GetName() + wxT(" - ") + mInput->GetStringSelection());
|
||||
mHost->SetToolTip(mHost->GetName() + wxT(" - ") + mHost->GetStringSelection());
|
||||
|
||||
Reference in New Issue
Block a user