summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolbarview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolbarview.cpp')
-rw-r--r--indra/newview/lltoolbarview.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 619d17efad..affa7241d1 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -35,6 +35,7 @@
#include "lltoolbar.h"
#include "llbutton.h"
#include "lltooldraganddrop.h"
+#include "lltransientfloatermgr.h"
#include "llclipboard.h"
#include "llagent.h" // HACK for destinations guide on startup
@@ -96,14 +97,17 @@ BOOL LLToolBarView::postBuild()
mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarLeft->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarRight->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarBottom->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
@@ -314,6 +318,22 @@ void LLToolBarView::addToToolset(command_id_list_t& command_list, Toolbar& toolb
}
}
+void LLToolBarView::onToolBarButtonAdded(LLView* button)
+{
+ if (button && button->getName() == "speak")
+ {
+ // Add the "Speak" button as a control view in LLTransientFloaterMgr
+ // to prevent hiding the transient IM floater upon pressing "Speak".
+ LLTransientFloaterMgr::getInstance()->addControlView(button);
+ }
+ else if (button && button->getName() == "voice")
+ {
+ // Add the "Voice controls" button as a control view in LLTransientFloaterMgr
+ // to prevent hiding the transient IM floater upon pressing "Voice controls".
+ LLTransientFloaterMgr::getInstance()->addControlView(button);
+ }
+}
+
void LLToolBarView::draw()
{
//LLPanel* sizer_left = getChild<LLPanel>("sizer_left");