summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-05 15:36:32 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-05 15:36:32 -0400
commit0621810ab1060e615f7464b0b4d1407a5abf144d (patch)
treedb461db24d4bcae9293d6167edb49955feb41bb1 /indra/newview/llfloaterimcontainer.cpp
parentdeddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a (diff)
parentc053dbe02c301b92c151eb835f6c770b61a46859 (diff)
merge
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rwxr-xr-xindra/newview/llfloaterimcontainer.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index be8195b5ee..ab57e8c170 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -229,7 +229,9 @@ BOOL LLFloaterIMContainer::postBuild()
mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn");
mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this));
mSpeakBtn = getChild<LLButton>("speak_btn");
- mSpeakBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this));
+
+ mSpeakBtn->setMouseDownCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonPressed, this));
+ mSpeakBtn->setMouseUpCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonReleased, this));
childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this));
@@ -352,11 +354,18 @@ void LLFloaterIMContainer::onStubCollapseButtonClicked()
collapseMessagesPane(true);
}
-void LLFloaterIMContainer::onSpeakButtonClicked()
+void LLFloaterIMContainer::onSpeakButtonPressed()
+{
+ LLVoiceClient::getInstance()->inputUserControlState(true);
+ updateSpeakBtnState();
+}
+
+void LLFloaterIMContainer::onSpeakButtonReleased()
{
- LLAgent::toggleMicrophone("speak");
+ LLVoiceClient::getInstance()->inputUserControlState(false);
updateSpeakBtnState();
}
+
void LLFloaterIMContainer::onExpandCollapseButtonClicked()
{
if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()
@@ -1401,6 +1410,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v
{
return is_single_select && LLAvatarActions::canCall();
}
+ else if ("can_open_voice_conversation" == item)
+ {
+ return is_single_select && LLAvatarActions::canCall();
+ }
else if ("can_zoom_in" == item)
{
return is_single_select && gObjectList.findObject(single_id);