From d9015a836f59c228818dc85e37ef4807b2d1b181 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 16 Mar 2011 18:32:28 -0400 Subject: STORM-1077 Change "Voice Enabled/Disabled" to "Speak Button" --- indra/newview/llbottomtray.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d8ec4b605c..2dfd2ba492 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -52,6 +52,7 @@ #include "llviewerwindow.h" #include "llsdserialize.h" +#include "llfirstuse.h" // Distance from mouse down on which drag'n'drop should be started. #define DRAG_START_DISTANCE 3 @@ -378,7 +379,12 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b // skipped to avoid button blinking if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL) { - mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); + bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); + mSpeakBtn->setFlyoutBtnEnabled(voice_status); + if (voice_status) + { + LLFirstUse::speak(true); + } } } @@ -562,6 +568,7 @@ BOOL LLBottomTray::postBuild() mSpeakPanel = getChild("speak_panel"); mSpeakBtn = getChild("talk"); + LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle()); // Both parts of speak button should be initially disabled because // it takes some time between logging in to world and connecting to voice channel. -- cgit v1.2.3