summaryrefslogtreecommitdiff
path: root/indra/newview/llspeakbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llspeakbutton.cpp')
-rw-r--r--indra/newview/llspeakbutton.cpp41
1 files changed, 3 insertions, 38 deletions
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp
index 9562d7828c..5edc4804ca 100644
--- a/indra/newview/llspeakbutton.cpp
+++ b/indra/newview/llspeakbutton.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "llbutton.h"
+#include "llfloaterreg.h"
#include "llagent.h"
#include "llbottomtray.h"
@@ -95,8 +96,8 @@ LLSpeakButton::LLSpeakButton(const Params& p)
addChild(mShowBtn);
LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn);
- mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this));
- mShowBtn->setToggleState(FALSE);
+// mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this));
+// mShowBtn->setToggleState(FALSE);
static const S32 MONITOR_RIGHT_PAD = 2;
@@ -168,39 +169,3 @@ void LLSpeakButton::onMouseUp_SpeakBtn()
gVoiceClient->inputUserControlState(down);
}
-void LLSpeakButton::onClick_ShowBtn()
-{
- if(!mShowBtn->getToggleState())
- {
- if (!mPrivateCallPanel.isDead())
- {
- LLFloater* instance = mPrivateCallPanel.get();
- instance->onClickClose(instance);
- }
- mShowBtn->setToggleState(FALSE);
- return;
- }
-
- S32 x = mSpeakBtn->getRect().mLeft;
- S32 y = 0;
-
- localPointToScreen(x, y, &x, &y);
-
- LLCallFloater* instance = new LLCallFloater;
- mPrivateCallPanel = instance->getHandle();
-
- // *TODO: mantipov: why we are adding this floater to Root View? It is in FloaterView by default
- getRootView()->addChild(instance);
-
- y = LLBottomTray::getInstance()->getRect().getHeight() + instance->getRect().getHeight();
-
- LLRect rect;
- rect.setLeftTopAndSize(x, y, instance->getRect().getWidth(), instance->getRect().getHeight());
- instance->setRect(rect);
-
- instance->setVisible(TRUE);
- instance->setFrontmost(TRUE);
-
- mShowBtn->setToggleState(TRUE);
-}
-