diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-12-07 10:25:39 -0800 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-12-07 10:25:39 -0800 |
commit | dd030f1b750c230d02515027d69ba79f0084a221 (patch) | |
tree | 68b5f5ebe16a0c5d77fa50dc82f68574ca452e53 /indra/newview | |
parent | 8dbb91728fba85f545dce39096399f505dabb960 (diff) | |
parent | 6122f000cb249dd2f8cbc0d16e664bb1b00d5864 (diff) |
merging in latest changes
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.h | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_im_container.xml | 17 |
5 files changed, 47 insertions, 10 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index b8a37da3fa..c36128b0bd 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() @@ -1650,7 +1656,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 +1678,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 diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index c9987bffe8..92985c036a 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -117,6 +117,7 @@ private: void onExpandCollapseButtonClicked(); void onStubCollapseButtonClicked(); void processParticipantsStyleUpdate(); + void onSpeakButtonClicked(); void collapseConversationsPane(bool collapse); @@ -172,6 +173,7 @@ public: void setTimeNow(const LLUUID& session_id, const LLUUID& participant_id); void setNearbyDistances(); void reSelectConversation(); + void updateSpeakBtnState(); void flashConversationItemWidget(const LLUUID& session_id, bool is_flashes); private: diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index b50b8c2d32..8e4e4e809a 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -167,12 +167,7 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id) if (!conversp->isNearbyChat() || gSavedSettings.getBOOL("NearbyChatIsNotTornOff")) { - floater_container->addFloater(conversp, FALSE, LLTabContainer::END); - - if (!floater_container->getVisible()) - { - LLFloaterReg::toggleInstanceOrBringToFront("im_container"); - } + floater_container->addFloater(conversp, !floater_container->getVisible(), LLTabContainer::END); } else { @@ -698,7 +693,8 @@ void LLFloaterIMSessionTab::updateCallBtnState(bool callIsActive) voiceButton->setToolTip( callIsActive? getString("end_call_button_tooltip") : getString("start_call_button_tooltip")); - enableDisableCallBtn(); + LLFloaterIMContainer::getInstance()->updateSpeakBtnState(); + enableDisableCallBtn(); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1a2632f921..6ffc3b610b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -30,6 +30,7 @@ #include "llavatarnamecache.h" // IDEVO #include "llavataractions.h" +#include "llfloaterconversationlog.h" #include "llfloaterreg.h" #include "llfontgl.h" #include "llgl.h" @@ -2482,6 +2483,18 @@ void LLIMMgr::addMessage( new_session_id = computeSessionID(dialog, other_participant_id); } + // Open conversation log if offline messages are present + if (is_offline_msg) + { + LLFloaterConversationLog* floater_log = + LLFloaterReg::getTypedInstance<LLFloaterConversationLog>("conversation"); + if (floater_log && !(floater_log->isFrontmost())) + { + floater_log->openFloater(); + floater_log->setFrontmost(TRUE); + } + } + //*NOTE session_name is empty in case of incoming P2P sessions std::string fixed_session_name = from; bool name_is_setted = false; diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index 152c897120..9f6503d799 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -32,7 +32,7 @@ top="0" width="450"> <layout_panel - auto_resize="true" + auto_resize="false" user_resize="true" height="430" name="conversations_layout_panel" @@ -73,13 +73,26 @@ image_hover_unselected="Toolbar_Middle_Over" image_overlay="Conv_toolbar_plus" image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" + image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" left_pad="4" name="add_btn" tool_tip="Start a new conversation" width="31"/> + <button + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Command_Speak_Icon" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left_pad="4" + name="speak_btn" + tool_tip="Speak with people using your microphone" + width="31"/> </layout_panel> <layout_panel auto_resize="false" |