EXP-759 Opening the Voice preferences window from the up arrow on the speak button turns voice off for user without notice also causes calls to be ended

master
Leyla Farazha 2011-05-04 11:16:08 -07:00
parent 9120a9bf29
commit f3bb2e31dc
4 changed files with 22 additions and 7 deletions

View File

@ -63,7 +63,12 @@ BOOL LLFloaterSoundDevices::postBuild()
if (mDragHandle)
mDragHandle->setTitleVisible(TRUE);
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
LLPanelVoiceDeviceSettings* panel = findChild<LLPanelVoiceDeviceSettings>("device_settings_panel");
if (panel)
{
panel->setUseTuningMode(false);
}
return TRUE;
}

View File

@ -51,6 +51,7 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
mDevicesUpdated = FALSE;
mUseTuningMode = true;
// grab "live" mic volume level
mMicVolume = gSavedSettings.getF32("AudioLevelMic");
@ -96,7 +97,7 @@ void LLPanelVoiceDeviceSettings::draw()
// let user know that volume indicator is not yet available
bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode();
getChildView("wait_text")->setVisible( !is_in_tuning_mode);
getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode);
LLPanel::draw();
@ -292,14 +293,20 @@ void LLPanelVoiceDeviceSettings::initialize()
LLVoiceClient::getInstance()->refreshDeviceLists();
// put voice client in "tuning" mode
LLVoiceClient::getInstance()->tuningStart();
LLVoiceChannel::suspend();
if (mUseTuningMode)
{
LLVoiceClient::getInstance()->tuningStart();
LLVoiceChannel::suspend();
}
}
void LLPanelVoiceDeviceSettings::cleanup()
{
LLVoiceClient::getInstance()->tuningStop();
LLVoiceChannel::resume();
if (mUseTuningMode)
{
LLVoiceClient::getInstance()->tuningStop();
LLVoiceChannel::resume();
}
}
void LLPanelVoiceDeviceSettings::onCommitInputDevice()

View File

@ -45,6 +45,8 @@ public:
void cleanup();
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
void setUseTuningMode(bool use) { mUseTuningMode = use; };
protected:
void onCommitInputDevice();
@ -56,6 +58,7 @@ protected:
class LLComboBox *mCtrlInputDevices;
class LLComboBox *mCtrlOutputDevices;
BOOL mDevicesUpdated;
bool mUseTuningMode;
};
#endif // LL_LLPANELVOICEDEVICESETTINGS_H

View File

@ -21,7 +21,7 @@
follows="all"
filename="panel_sound_devices.xml"
name="device_settings_panel"
width="300"
width="400"
left="2"
top="26"
class="panel_voice_device_settings"/>