diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-12-14 17:01:13 -0800 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-12-14 17:01:13 -0800 |
commit | ba8d9afe17a5eb75b7c89b6a1400e412bb473379 (patch) | |
tree | dc0469ba86649548176157122141e89154c94ac8 | |
parent | d0dbdac41dffa8afbebaecb25d0e57e044bf61e6 (diff) | |
parent | 080a77a0d98905b2eccf9a0a30dbcd691dab83bd (diff) |
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
-rwxr-xr-x | indra/newview/llconversationview.cpp | 24 | ||||
-rwxr-xr-x | indra/newview/llconversationview.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterimsession.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloaterimsession.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llfloaterimsessiontab.h | 1 | ||||
-rw-r--r-- | indra/newview/lloutputmonitorctrl.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_im_session.xml | 12 |
8 files changed, 37 insertions, 25 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 527c0ad233..71d668d047 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -341,14 +341,6 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi if (vmi) { bool is_active = vmi->getUUID() == session_id; - bool is_nearby = vmi->getType() == LLConversationItem::CONV_SESSION_NEARBY; - - if (is_nearby) - { - mSpeakingIndicator->setSpeakerId(is_active ? gAgentID : LLUUID::null); - } - - mSpeakingIndicator->switchIndicator(is_active); mCallIconLayoutPanel->setVisible(is_active); } } @@ -409,7 +401,6 @@ BOOL LLConversationViewParticipant::postBuild() mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this)); mInfoBtn->setVisible(false); - mActiveVoiceChannelConnection = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLConversationViewParticipant::onCurrentVoiceSessionChanged, this, _1)); mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator"); if (!sStaticInitialized) @@ -479,21 +470,6 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height) return arranged; } -void LLConversationViewParticipant::onCurrentVoiceSessionChanged(const LLUUID& session_id) -{ - LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(getViewModelItem()); - - if (participant_model) - { - LLConversationItemSession* parent_session = participant_model->getParentSession(); - if (parent_session) - { - bool is_active = (parent_session->getUUID() == session_id); - mSpeakingIndicator->switchIndicator(is_active); - } - } -} - void LLConversationViewParticipant::refresh() { // Refresh the participant view from its model data diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index fb2834f26a..a9333020e9 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -146,7 +146,6 @@ protected: void onInfoBtnClick(); private: - void onCurrentVoiceSessionChanged(const LLUUID& session_id); LLAvatarIconCtrl* mAvatarIcon; LLButton * mInfoBtn; diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 3001029968..a0ca7286f1 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -102,6 +102,24 @@ void LLFloaterIMSession::refresh() } // virtual +void LLFloaterIMSession::onTearOffClicked() +{ + LLFloaterIMSessionTab::onTearOffClicked(); + + if(mIsP2PChat) + { + if(isTornOff()) + { + mSpeakingIndicator->setSpeakerId(mOtherParticipantUUID, mSessionID); + } + else + { + mSpeakingIndicator->setSpeakerId(LLUUID::null); + } + } +} + +// virtual void LLFloaterIMSession::onClickCloseBtn() { LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID); diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h index 72a320041f..1d8957b1d9 100644 --- a/indra/newview/llfloaterimsession.h +++ b/indra/newview/llfloaterimsession.h @@ -135,6 +135,7 @@ private: /*virtual*/ void refresh(); + /*virtual*/ void onTearOffClicked(); /*virtual*/ void onClickCloseBtn(); // Update the window title and input field help text diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 82d25b9da9..ea99a1c5bf 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -54,6 +54,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) , mSessionID(session_id.asUUID()) , mConversationsRoot(NULL) , mScroller(NULL) + , mSpeakingIndicator(NULL) , mChatHistory(NULL) , mInputEditor(NULL) , mInputEditorTopPad(0) @@ -206,6 +207,8 @@ BOOL LLFloaterIMSessionTab::postBuild() mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params); mScroller->setFollowsAll(); + mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator"); + // Insert that scroller into the panel widgets hierarchy mParticipantListPanel->addChild(mScroller); diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index 4851904074..cd0bcd481c 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -149,6 +149,7 @@ protected: LLFolderView* mConversationsRoot; LLScrollContainer* mScroller; + LLOutputMonitorCtrl* mSpeakingIndicator; LLChatHistory* mChatHistory; LLChatEntry* mInputEditor; int mInputEditorTopPad; // padding between input field and chat history diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 02841e9831..f6e3c0cac0 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -260,6 +260,8 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s if (speaker_id.isNull() && mSpeakerId.notNull()) { LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this); + switchIndicator(false); + mSpeakerId = speaker_id; } if (speaker_id.isNull() || (speaker_id == mSpeakerId)) diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index faf54774f6..e4b127b7b9 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -106,6 +106,18 @@ name="voice_call_btn" tool_tip="Open voice connection" width="31"/> + <output_monitor + auto_update="true" + follows="top|left" + draw_border="false" + height="16" + layout="topleft" + top="10" + left_pad="10" + mouse_opaque="true" + name="speaking_indicator" + visible="false" + width="20" /> <button follows="right|top" height="25" |