diff -r 9c7d543fd15d doc/contributions.txt --- a/doc/contributions.txt Thu Jan 20 16:01:27 2011 -0500 +++ b/doc/contributions.txt Thu Jan 20 21:26:57 2011 -0500 @@ -802,6 +802,7 @@ STORM-102 STORM-103 STORM-143 + STORM-236 STORM-255 STORM-256 STORM-288 diff -r 9c7d543fd15d indra/newview/llbottomtray.h --- a/indra/newview/llbottomtray.h Thu Jan 20 16:01:27 2011 -0500 +++ b/indra/newview/llbottomtray.h Thu Jan 20 21:26:57 2011 -0500 @@ -169,10 +169,11 @@ /** * Specifies buttons which can be hidden when bottom tray is shrunk. * They are: Gestures, Movement (Move), Camera (View), Snapshot - * new: Build, Search, Map, World Map, Mini-Map. + * new: Build, Search, Map, World Map, Mini-Map + * added: Speak(this auto-hides if Voice is disabled) */ , RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES - | RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP + | RS_BUTTON_SPEAK | RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP }EResizeState; // Below are three methods that were introduced to handle drag'n'drop diff -r 9c7d543fd15d indra/newview/llbottomtray.cpp --- a/indra/newview/llbottomtray.cpp Thu Jan 20 16:01:27 2011 -0500 +++ b/indra/newview/llbottomtray.cpp Thu Jan 20 21:26:57 2011 -0500 @@ -1480,6 +1480,8 @@ void LLBottomTray::initResizeStateContainers() { // init map with objects should be processed for each type + //Added Speak button to enable button auto-hide if voice is disabled + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild("speak_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild("gesture_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild("movement_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild("cam_panel"))); @@ -1490,6 +1492,8 @@ mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MINI_MAP, getChild("mini_map_btn_panel"))); // init an order of processed buttons + //Added Speak button to enable button auto-hide if voice is disabled + mButtonsProcessOrder.push_back(RS_BUTTON_SPEAK); mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES); mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT); mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); @@ -1518,16 +1522,15 @@ // set default width for it. mObjectDefaultWidthMap[button_type] = mStateProcessedObjectMap[button_type]->getRect().getWidth(); } - - // ... and add Speak button because it also can be shrunk. - mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); - + //Speak Button now part of main process map so do not need to process seperatly } // this method must be called before restoring of the chat entry field on startup // because it resets chatbar's width according to resize logic. void LLBottomTray::initButtonsVisibility() { + //Added Ability to remove Speak Button if Voice is not enabled and have it follow the Voice setting. + setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat")); setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton")); setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton")); setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton")); @@ -1540,6 +1543,8 @@ void LLBottomTray::setButtonsControlsAndListeners() { + //Added Ability to remove Speak Button if Voice is not enabled and have it follow the Voice setting. + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2)); gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2)); gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2)); gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2)); diff -r 9c7d543fd15d indra/newview/llspeakbutton.cpp --- a/indra/newview/llspeakbutton.cpp Thu Jan 20 16:01:27 2011 -0500 +++ b/indra/newview/llspeakbutton.cpp Thu Jan 20 21:26:57 2011 -0500 @@ -34,6 +34,7 @@ #include "llcallfloater.h" #include "lloutputmonitorctrl.h" #include "lltransientfloatermgr.h" +#include "llviewercontrol.h" #include "llspeakbutton.h" @@ -55,12 +56,16 @@ void LLSpeakButton::draw() { - // LLVoiceClient::getInstance() is the authoritative global source of info regarding our open-mic state, we merely reflect that state. - bool openmic = LLVoiceClient::getInstance()->getUserPTTState(); - bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled(); - mSpeakBtn->setToggleState(openmic && voiceenabled); - mOutputMonitor->setIsMuted(!voiceenabled); - LLUICtrl::draw(); + // Adding check here to see if voice is enabled if so then draw the button. + if ( gSavedSettings.getBOOL("EnableVoiceChat") ) + { + // LLVoiceClient::getInstance() is the authoritative global source of info regarding our open-mic state, we merely reflect that state. + bool openmic = LLVoiceClient::getInstance()->getUserPTTState(); + bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled(); + mSpeakBtn->setToggleState(openmic && voiceenabled); + mOutputMonitor->setIsMuted(!voiceenabled); + LLUICtrl::draw(); + } } void LLSpeakButton::setSpeakBtnEnabled(bool enabled) { diff -r 9c7d543fd15d indra/newview/skins/default/xui/en/menu_bottomtray.xml --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml Thu Jan 20 16:01:27 2011 -0500 +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml Thu Jan 20 21:26:57 2011 -0500 @@ -8,6 +8,21 @@ top="624" visible="false" width="128"> + Added selction for showing the Speak Button and this will also toggle + the Voice being on or off. If Voice is enabled(default) then the Speak Button + will be visable.<--> + + + + +