summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index b8a37da3fa..9e13875d20 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -206,6 +206,7 @@ BOOL LLFloaterIMContainer::postBuild()
mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onExpandCollapseButtonClicked, this));
mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn");
mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this));
+ getChild<LLButton>("speak_btn")->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this));
childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this));
@@ -341,6 +342,11 @@ void LLFloaterIMContainer::onStubCollapseButtonClicked()
collapseMessagesPane(true);
}
+void LLFloaterIMContainer::onSpeakButtonClicked()
+{
+ LLAgent::toggleMicrophone("speak");
+ updateSpeakBtnState();
+}
void LLFloaterIMContainer::onExpandCollapseButtonClicked()
{
if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()
@@ -913,7 +919,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
}
else if ("im" == command)
{
- LLAvatarActions::startIM(userID);
+ if (gAgent.getID() != userID)
+ {
+ LLAvatarActions::startIM(userID);
+ }
}
else if ("offer_teleport" == command)
{
@@ -1650,7 +1659,7 @@ void LLFloaterIMContainer::openNearbyChat()
LLConversationViewSession* nearby_chat = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,LLUUID()));
if (nearby_chat)
{
- selectConversation(LLUUID());
+ reSelectConversation();
nearby_chat->setOpen(TRUE);
}
}
@@ -1672,6 +1681,13 @@ void LLFloaterIMContainer::reSelectConversation()
}
}
+void LLFloaterIMContainer::updateSpeakBtnState()
+{
+ LLButton* mSpeakBtn = getChild<LLButton>("speak_btn");
+ mSpeakBtn->setToggleState(LLVoiceClient::getInstance()->getUserPTTState());
+ mSpeakBtn->setEnabled(LLAgent::isActionAllowed("speak"));
+}
+
void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes)
{
//Finds the conversation line item to flash using the session_id