EXP-819 Turning off Voice Chat setting in Basic mode reverts changes made in Sound Device selection and turning setting back on results in drop downs not being populated

meow-7.2.2
Leyla Farazha 2011-05-16 15:17:27 -07:00
parent 889f6cc3b3
commit 90d41bd746
2 changed files with 19 additions and 1 deletions

View File

@ -68,6 +68,9 @@ BOOL LLFloaterSoundDevices::postBuild()
if (panel)
{
panel->setUseTuningMode(false);
getChild<LLUICtrl>("voice_input_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel));
getChild<LLUICtrl>("voice_output_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel));
getChild<LLUICtrl>("mic_volume_slider")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel));
}
return TRUE;
}

View File

@ -191,7 +191,21 @@ void LLPanelVoiceDeviceSettings::refresh()
mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
if(!LLVoiceClient::getInstance()->deviceSettingsAvailable())
bool device_settings_available = LLVoiceClient::getInstance()->deviceSettingsAvailable();
if (mCtrlInputDevices)
{
mCtrlInputDevices->setEnabled(device_settings_available);
}
if (mCtrlOutputDevices)
{
mCtrlOutputDevices->setEnabled(device_settings_available);
}
getChild<LLSlider>("mic_volume_slider")->setEnabled(device_settings_available);
if(!device_settings_available)
{
// The combo boxes are disabled, since we can't get the device settings from the daemon just now.
// Put the currently set default (ONLY) in the box, and select it.
@ -207,6 +221,7 @@ void LLPanelVoiceDeviceSettings::refresh()
mCtrlOutputDevices->add( mOutputDevice, ADD_BOTTOM );
mCtrlOutputDevices->setSimple(mOutputDevice);
}
mDevicesUpdated = FALSE;
}
else if (!mDevicesUpdated)
{