Commits

leyla_linden committed 1e5c6ec

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

Comments (0)

Files changed (2)

indra/newview/llfloatersounddevices.cpp

 	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;
 }

indra/newview/llpanelvoicedevicesettings.cpp

 	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.
 			mCtrlOutputDevices->add( mOutputDevice, ADD_BOTTOM );
 			mCtrlOutputDevices->setSimple(mOutputDevice);
 		}
+		mDevicesUpdated = FALSE;
 	}
 	else if (!mDevicesUpdated)
 	{