From 976a2f5a442150ef89cff6b39450eabbca956d0f Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Wed, 26 Sep 2012 20:45:18 +0300 Subject: CHUI-344 FIXED (LLConversationViewSession: enable icon update) - This commit also fixes CHUI-345 CHUI-346 --- indra/newview/llconversationview.cpp | 84 ++++++++++++++++++++- indra/newview/llconversationview.h | 13 +++- indra/newview/llnearbychat.cpp | 1 + indra/newview/lloutputmonitorctrl.cpp | 20 ++++- indra/newview/lloutputmonitorctrl.h | 3 + .../default/textures/icons/nearby_chat_icon.png | Bin 0 -> 793 bytes indra/newview/skins/default/textures/textures.xml | 2 + .../xui/en/panel_conversation_list_item.xml | 26 ++++++- 8 files changed, 140 insertions(+), 9 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/nearby_chat_icon.png (limited to 'indra') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index a4733bb693..ab15e20d89 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -30,10 +30,12 @@ #include "llconversationview.h" #include +#include "llagentdata.h" #include "llconversationmodel.h" #include "llimconversation.h" #include "llimfloatercontainer.h" #include "llfloaterreg.h" +#include "llgroupiconctrl.h" #include "lluictrlfactory.h" // @@ -51,20 +53,79 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes LLFolderViewFolder(p), mContainer(p.container), mItemPanel(NULL), - mSessionTitle(NULL) + mCallIconLayoutPanel(NULL), + mSessionTitle(NULL), + mSpeakingIndicator(NULL) { } +LLConversationViewSession::~LLConversationViewSession() +{ + mActiveVoiceChannelConnection.disconnect(); +} + BOOL LLConversationViewSession::postBuild() { LLFolderViewItem::postBuild(); mItemPanel = LLUICtrlFactory::getInstance()->createFromFile("panel_conversation_list_item.xml", NULL, LLPanel::child_registry_t::instance()); - addChild(mItemPanel); + mCallIconLayoutPanel = mItemPanel->getChild("call_icon_panel"); mSessionTitle = mItemPanel->getChild("conversation_title"); + mActiveVoiceChannelConnection = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLConversationViewSession::onCurrentVoiceSessionChanged, this, _1)); + mSpeakingIndicator = getChild("speaking_indicatorn"); + + LLConversationItem* vmi = dynamic_cast(getViewModelItem()); + if (vmi) + { + switch(vmi->getType()) + { + case LLConversationItem::CONV_PARTICIPANT: + case LLConversationItem::CONV_SESSION_1_ON_1: + { + LLIMModel::LLIMSession* session= LLIMModel::instance().findIMSession(vmi->getUUID()); + if (session) + { + LLAvatarIconCtrl* icon = mItemPanel->getChild("avatar_icon"); + icon->setVisible(true); + icon->setValue(session->mOtherParticipantID); + mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID); + mSpeakingIndicator->setShowParticipantsTalking(true); + } + break; + } + case LLConversationItem::CONV_SESSION_AD_HOC: + { + LLGroupIconCtrl* icon = mItemPanel->getChild("group_icon"); + icon->setVisible(true); + mSpeakingIndicator->setSpeakerId(gAgentID, vmi->getUUID()); + mSpeakingIndicator->setShowParticipantsTalking(true); + } + case LLConversationItem::CONV_SESSION_GROUP: + { + LLGroupIconCtrl* icon = mItemPanel->getChild("group_icon"); + icon->setVisible(true); + icon->setValue(vmi->getUUID()); + mSpeakingIndicator->setSpeakerId(gAgentID, vmi->getUUID()); + mSpeakingIndicator->setShowParticipantsTalking(true); + break; + } + case LLConversationItem::CONV_SESSION_NEARBY: + { + LLIconCtrl* icon = mItemPanel->getChild("nearby_chat_icon"); + icon->setVisible(true); + mSpeakingIndicator->setSpeakerId(gAgentID); + mSpeakingIndicator->setShowParticipantsTalking(true); + break; + } + + default: + break; + } + } + refresh(); return TRUE; @@ -188,6 +249,25 @@ void LLConversationViewSession::refresh() LLFolderViewFolder::refresh(); } +void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& session_id) +{ + LLConversationItem* vmi = dynamic_cast(getViewModelItem()); + + 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); + } +} + // // Implementation of conversations list participant (avatar) widgets // diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 0b98c34c73..dbc7f3b1bb 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -57,7 +57,7 @@ protected: LLIMFloaterContainer* mContainer; public: - virtual ~LLConversationViewSession( void ) { } + virtual ~LLConversationViewSession(); virtual void selectItem(); /*virtual*/ BOOL postBuild(); @@ -71,8 +71,15 @@ public: virtual void refresh(); private: - LLPanel* mItemPanel; - LLTextBox* mSessionTitle; + + void onCurrentVoiceSessionChanged(const LLUUID& session_id); + + LLPanel* mItemPanel; + LLPanel* mCallIconLayoutPanel; + LLTextBox* mSessionTitle; + LLOutputMonitorCtrl* mSpeakingIndicator; + + boost::signals2::connection mActiveVoiceChannelConnection; }; // Implementation of conversations list participant (avatar) widgets diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 71c4938ae9..75c691d99b 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -110,6 +110,7 @@ BOOL LLNearbyChat::postBuild() mInputEditor->setKeystrokeCallback(boost::bind(&onChatBoxKeystroke, _1, this)); mInputEditor->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this)); mInputEditor->setFocusReceivedCallback(boost::bind(&LLNearbyChat::onChatBoxFocusReceived, this)); + mInputEditor->setLabel(LLTrans::getString("NearbyChatTitle")); // mOutputMonitor = getChild("chat_zone_indicator"); // mOutputMonitor->setVisible(FALSE); diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 096e714981..d48826779c 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -74,7 +74,8 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p) mSpeakerId(p.speaker_id), mIsAgentControl(false), mIsSwitchDirty(false), - mShouldSwitchOn(false) + mShouldSwitchOn(false), + mShowParticipantsTalking(false) { //static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange); //static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red); @@ -157,6 +158,23 @@ void LLOutputMonitorCtrl::draw() } } + if ((mPower == 0.f && !mIsTalking) && mShowParticipantsTalking) + { + std::set participant_uuids; + LLVoiceClient::instance().getParticipantList(participant_uuids); + std::set::const_iterator part_it = participant_uuids.begin(); + + F32 power = 0; + for (; part_it != participant_uuids.end(); ++part_it) + { + if (power = LLVoiceClient::instance().getCurrentPower(*part_it)) + { + mPower = power; + break; + } + } + } + LLPointer icon; if (mIsMuted) { diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 7b02e84744..44d4d6f64b 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -82,6 +82,8 @@ public: void setIsTalking(bool val) { mIsTalking = val; } + void setShowParticipantsTalking(bool show) { mShowParticipantsTalking = show; } + /** * Sets avatar UUID to interact with voice channel. * @@ -132,6 +134,7 @@ private: bool mIsAgentControl; bool mIsMuted; bool mIsTalking; + bool mShowParticipantsTalking; LLPointer mImageMute; LLPointer mImageOff; LLPointer mImageOn; diff --git a/indra/newview/skins/default/textures/icons/nearby_chat_icon.png b/indra/newview/skins/default/textures/icons/nearby_chat_icon.png new file mode 100644 index 0000000000..7c3ad40381 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/nearby_chat_icon.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 47b0c12fa0..a124041565 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -363,6 +363,8 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml index 375ea79ebe..56056ed560 100644 --- a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml @@ -13,13 +13,33 @@ layout="topleft" left="5" top="2" + visible="false" width="20" /> + + -- cgit v1.2.3 From 9e1ea5a1652528dead811dee8904ae8a6833d163 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 26 Sep 2012 12:05:27 -0700 Subject: CHUI-364 : WIP : Suppress unused code --- indra/newview/llimfloatercontainer.cpp | 50 ---------------------------------- indra/newview/llimfloatercontainer.h | 1 - 2 files changed, 51 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 14d40d4685..e64247cd60 100755 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -661,56 +661,6 @@ void LLIMFloaterContainer::setSortOrder(const LLConversationSort& order) gSavedSettings.setU32("ConversationSortOrder", (U32)order); } -void LLIMFloaterContainer::repositioningWidgets() -{ - if (!mInitialized) - { - return; - } - - if (!mConversationsPane->isCollapsed()) - { - S32 list_width = (mConversationsPane->getRect()).getWidth(); - gSavedPerAccountSettings.setS32("ConversationsListPaneWidth", list_width); - } - LLRect panel_rect = mConversationsListPanel->getRect(); - S32 item_height = 16; - int index = 0; - for (conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); - widget_it != mConversationsWidgets.end(); - widget_it++) - { - LLFolderViewFolder* widget = dynamic_cast(widget_it->second); - widget->setVisible(TRUE); - widget->setRect(LLRect(0, - panel_rect.getHeight() - item_height*index, - panel_rect.getWidth(), - panel_rect.getHeight() - item_height*(index+1))); - index++; - // Reposition the children as well - // Merov : This is highly suspiscious but gets the debug hack to work. This needs to be revised though. - if (widget->getItemsCount() != 0) - { - BOOL is_open = widget->isOpen(); - widget->setOpen(TRUE); - LLFolderViewFolder::items_t::const_iterator current = widget->getItemsBegin(); - LLFolderViewFolder::items_t::const_iterator end = widget->getItemsEnd(); - while (current != end) - { - LLFolderViewItem* item = (*current); - item->setVisible(TRUE); - item->setRect(LLRect(0, - panel_rect.getHeight() - item_height*index, - panel_rect.getWidth(), - panel_rect.getHeight() - item_height*(index+1))); - index++; - current++; - } - widget->setOpen(is_open); - } - } -} - void LLIMFloaterContainer::setConvItemSelect(const LLUUID& session_id) { LLFolderViewItem* widget = mConversationsWidgets[session_id]; diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index e8d185297c..070feb3273 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -100,7 +100,6 @@ private: void collapseConversationsPane(bool collapse); void updateState(bool collapse, S32 delta_width); - void repositioningWidgets(); void onAddButtonClicked(); void onAvatarPicked(const uuid_vec_t& ids); -- cgit v1.2.3 From 30ea13381884bca7a07e2bca16e5bde0ccacb530 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 26 Sep 2012 17:30:52 -0700 Subject: CHUI-344 : Fix Mac build issue introduced by previous fix attempt --- indra/newview/lloutputmonitorctrl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index d48826779c..1c412b15f7 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -167,7 +167,8 @@ void LLOutputMonitorCtrl::draw() F32 power = 0; for (; part_it != participant_uuids.end(); ++part_it) { - if (power = LLVoiceClient::instance().getCurrentPower(*part_it)) + power = LLVoiceClient::instance().getCurrentPower(*part_it); + if (power) { mPower = power; break; -- cgit v1.2.3 From f7f15900ea4c61c499427a8b6416dc08e9a972f7 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 27 Sep 2012 17:46:11 +0300 Subject: CHUI-346 ADDITIONAL FIX (LLConversationViewSession: enable current voice channel indicator) - When voice initialized show voice channel indicator for nearby chat session --- indra/newview/llconversationview.cpp | 58 +++++++++++++++++++++++++++++------ indra/newview/llconversationview.h | 6 ++++ indra/newview/lloutputmonitorctrl.cpp | 7 +++-- indra/newview/lloutputmonitorctrl.h | 6 ++-- 4 files changed, 61 insertions(+), 16 deletions(-) (limited to 'indra') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index ab15e20d89..c2898d9a47 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -45,6 +45,30 @@ static LLDefaultChildRegistry::Register r_conversatio const LLColor4U DEFAULT_WHITE(255, 255, 255); +class LLNearbyVoiceClientStatusObserver : public LLVoiceClientStatusObserver +{ +public: + + LLNearbyVoiceClientStatusObserver(LLConversationViewSession* conv) + : conversation(conv) + {} + + virtual void onChange(EStatusType status, const std::string &channelURI, bool proximal) + { + if (conversation + && status != STATUS_JOINING + && status != STATUS_LEFT_CHANNEL + && LLVoiceClient::getInstance()->voiceEnabled() + && LLVoiceClient::getInstance()->isVoiceWorking()) + { + conversation->showVoiceIndicator(); + } + } + +private: + LLConversationViewSession* conversation; +}; + LLConversationViewSession::Params::Params() : container() {} @@ -55,13 +79,19 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes mItemPanel(NULL), mCallIconLayoutPanel(NULL), mSessionTitle(NULL), - mSpeakingIndicator(NULL) + mSpeakingIndicator(NULL), + mVoiceClientObserver(NULL) { } LLConversationViewSession::~LLConversationViewSession() { mActiveVoiceChannelConnection.disconnect(); + + if(LLVoiceClient::instanceExists() && mVoiceClientObserver) + { + LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver); + } } BOOL LLConversationViewSession::postBuild() @@ -91,8 +121,7 @@ BOOL LLConversationViewSession::postBuild() LLAvatarIconCtrl* icon = mItemPanel->getChild("avatar_icon"); icon->setVisible(true); icon->setValue(session->mOtherParticipantID); - mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID); - mSpeakingIndicator->setShowParticipantsTalking(true); + mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true); } break; } @@ -100,27 +129,28 @@ BOOL LLConversationViewSession::postBuild() { LLGroupIconCtrl* icon = mItemPanel->getChild("group_icon"); icon->setVisible(true); - mSpeakingIndicator->setSpeakerId(gAgentID, vmi->getUUID()); - mSpeakingIndicator->setShowParticipantsTalking(true); + mSpeakingIndicator->setSpeakerId(gAgentID, vmi->getUUID(), true); } case LLConversationItem::CONV_SESSION_GROUP: { LLGroupIconCtrl* icon = mItemPanel->getChild("group_icon"); icon->setVisible(true); icon->setValue(vmi->getUUID()); - mSpeakingIndicator->setSpeakerId(gAgentID, vmi->getUUID()); - mSpeakingIndicator->setShowParticipantsTalking(true); + mSpeakingIndicator->setSpeakerId(gAgentID, vmi->getUUID(), true); break; } case LLConversationItem::CONV_SESSION_NEARBY: { LLIconCtrl* icon = mItemPanel->getChild("nearby_chat_icon"); icon->setVisible(true); - mSpeakingIndicator->setSpeakerId(gAgentID); - mSpeakingIndicator->setShowParticipantsTalking(true); + mSpeakingIndicator->setSpeakerId(gAgentID, LLUUID::null, true); + if(LLVoiceClient::instanceExists()) + { + LLNearbyVoiceClientStatusObserver* mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this); + LLVoiceClient::getInstance()->addObserver(mVoiceClientObserver); + } break; } - default: break; } @@ -232,6 +262,14 @@ LLConversationViewParticipant* LLConversationViewSession::findParticipant(const return (iter == getItemsEnd() ? NULL : participant); } +void LLConversationViewSession::showVoiceIndicator() +{ + if (LLVoiceChannel::getCurrentVoiceChannel()->getSessionID().isNull()) + { + mCallIconLayoutPanel->setVisible(true); + } +} + void LLConversationViewSession::refresh() { // Refresh the session view from its model data diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index dbc7f3b1bb..064239eeb1 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -38,6 +38,8 @@ class LLIMFloaterContainer; class LLConversationViewSession; class LLConversationViewParticipant; +class LLVoiceClientStatusObserver; + // Implementation of conversations list session widgets class LLConversationViewSession : public LLFolderViewFolder @@ -68,6 +70,8 @@ public: void setVisibleIfDetached(BOOL visible); LLConversationViewParticipant* findParticipant(const LLUUID& participant_id); + void showVoiceIndicator(); + virtual void refresh(); private: @@ -79,6 +83,8 @@ private: LLTextBox* mSessionTitle; LLOutputMonitorCtrl* mSpeakingIndicator; + LLVoiceClientStatusObserver* mVoiceClientObserver; + boost::signals2::connection mActiveVoiceChannelConnection; }; diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 1c412b15f7..c3cbca68c7 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -75,7 +75,7 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p) mIsAgentControl(false), mIsSwitchDirty(false), mShouldSwitchOn(false), - mShowParticipantsTalking(false) + mShowParticipantsSpeaking(false) { //static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange); //static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red); @@ -158,7 +158,7 @@ void LLOutputMonitorCtrl::draw() } } - if ((mPower == 0.f && !mIsTalking) && mShowParticipantsTalking) + if ((mPower == 0.f && !mIsTalking) && mShowParticipantsSpeaking) { std::set participant_uuids; LLVoiceClient::instance().getParticipantList(participant_uuids); @@ -272,7 +272,7 @@ BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask) return TRUE; } -void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/) +void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/, bool show_other_participants_speaking /* = false */) { if (speaker_id.isNull() && mSpeakerId.notNull()) { @@ -287,6 +287,7 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this); } + mShowParticipantsSpeaking = show_other_participants_speaking; mSpeakerId = speaker_id; LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this, session_id); diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 44d4d6f64b..1fa6ef41f8 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -82,7 +82,7 @@ public: void setIsTalking(bool val) { mIsTalking = val; } - void setShowParticipantsTalking(bool show) { mShowParticipantsTalking = show; } + void setShowParticipantsSpeaking(bool show) { mShowParticipantsSpeaking = show; } /** * Sets avatar UUID to interact with voice channel. @@ -92,7 +92,7 @@ public: * If this parameter is set registered indicator will be shown only in voice channel * which has the same session id (EXT-5562). */ - void setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id = LLUUID::null); + void setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id = LLUUID::null, bool show_other_participants_speaking = false); //called by mute list virtual void onChange(); @@ -134,7 +134,7 @@ private: bool mIsAgentControl; bool mIsMuted; bool mIsTalking; - bool mShowParticipantsTalking; + bool mShowParticipantsSpeaking; LLPointer mImageMute; LLPointer mImageOff; LLPointer mImageOn; -- cgit v1.2.3 From 6daf27cd0f89e324f6fa67792e60bb8452af5adb Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 27 Sep 2012 17:14:15 +0300 Subject: CHUI-352 FIXED (Viewer crash when dropping a worn attachment): getting the item's id before destruction corresponding viewmodel's item --- indra/newview/llinventorypanel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 2a84616ddf..a77b57638f 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -441,8 +441,9 @@ void LLInventoryPanel::modelChanged(U32 mask) handled = true; if (model_item && view_item && viewmodel_item) { + const LLUUID& idp = viewmodel_item->getUUID(); view_item->destroyView(); - removeItemID(viewmodel_item->getUUID()); + removeItemID(idp); } view_item = buildNewViews(item_id); viewmodel_item = -- cgit v1.2.3 From 483cbd74d78b8fa7ce94e3d3c7d264bcdaa331b5 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Thu, 27 Sep 2012 20:09:22 +0300 Subject: CHUI-165 FIXED Add access to Conversation Log and Chat History from the People floater. --- indra/newview/llavataractions.cpp | 6 ++++++ indra/newview/llavataractions.h | 5 +++++ indra/newview/llpanelpeoplemenus.cpp | 1 + .../newview/skins/default/xui/en/menu_people_friends_view.xml | 8 ++++++++ indra/newview/skins/default/xui/en/menu_people_nearby.xml | 10 +++++++++- 5 files changed, 29 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 42a0376774..a76dbcac53 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -897,6 +897,12 @@ void LLAvatarActions::inviteToGroup(const LLUUID& id) } } +// static +void LLAvatarActions::viewChatHistory(const LLUUID& id) +{ + LLFloaterReg::showInstance("preview_conversation", id, true); +} + //== private methods ======================================================================================== // static diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 473b9cecc3..6e60f624ad 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -218,6 +218,11 @@ public: */ static void buildResidentsString(const std::vector avatar_names, std::string& residents_string); + /** + * Opens the chat history for avatar + */ + static void viewChatHistory(const LLUUID& id); + static std::set getInventorySelectedUUIDs(); private: diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index c9eebe24d3..899771f3b9 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -69,6 +69,7 @@ LLContextMenu* NearbyMenu::createMenu() registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id)); registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id)); registrar.add("Avatar.InviteToGroup", boost::bind(&LLAvatarActions::inviteToGroup, id)); + registrar.add("Avatar.Calllog", boost::bind(&LLAvatarActions::viewChatHistory, id)); enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2)); enable_registrar.add("Avatar.CheckItem", boost::bind(&NearbyMenu::checkContextMenuItem, this, _2)); diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml index eab7b8c085..dde9432867 100644 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml @@ -40,4 +40,12 @@ function="CheckControl" parameter="FriendsListShowPermissions" /> + + + + diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index b7c9ab1fe3..8014e81469 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -36,6 +36,14 @@ parameter="can_call" /> + + + + - + -- cgit v1.2.3 From 78e6b910a5012352ab265e52a78b0d340ac7ce27 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 27 Sep 2012 20:04:26 +0300 Subject: CHUI-370, CHUI-372 FIXED Viewer crash when voice calling another user from people panel then opening conversation floater or when starting a IM chat when conversation floater has not been previously opened: connecting floater to the host postponed until the end of its initialization --- indra/newview/llnearbychat.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 75c691d99b..2982f30102 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -122,8 +122,6 @@ BOOL LLNearbyChat::postBuild() // it is used for show the item's name in the conversations list setTitle(LLTrans::getString("NearbyChatTitle")); - addToHost(); - //for menu LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; @@ -312,6 +310,7 @@ void LLNearbyChat::addToHost() // virtual void LLNearbyChat::onOpen(const LLSD& key) { + addToHost(); LLIMConversation::onOpen(key); showTranslationCheckbox(LLTranslate::isTranslationConfigured()); } -- cgit v1.2.3 From 3e3735c16b47402d8fc2da8afa6086638fb5b948 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Fri, 28 Sep 2012 15:02:31 +0300 Subject: CHUI-345 ADDITIONAL FIX (LLConversationViewSession: enable speaking indicator) - Clicking on the conversation speaking icon brings up the volume floater for voice conversations --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterchatvoicevolume.cpp | 26 ++++++++++++ indra/newview/llfloaterchatvoicevolume.h | 26 ++++++++++++ indra/newview/lloutputmonitorctrl.cpp | 6 ++- indra/newview/llviewerfloaterreg.cpp | 2 + .../default/xui/en/floater_voice_chat_volume.xml | 48 ++++++++++++++++++++++ 6 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 indra/newview/llfloaterchatvoicevolume.cpp create mode 100644 indra/newview/llfloaterchatvoicevolume.h create mode 100644 indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b94c33587b..ec1562a4c1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -197,6 +197,7 @@ set(viewer_SOURCE_FILES llfloaterbuycurrencyhtml.cpp llfloaterbuyland.cpp llfloatercamera.cpp + llfloaterchatvoicevolume.cpp llfloatercolorpicker.cpp llfloaterconversationlog.cpp llfloaterconversationpreview.cpp @@ -781,6 +782,7 @@ set(viewer_HEADER_FILES llfloaterbuycurrencyhtml.h llfloaterbuyland.h llfloatercamera.h + llfloaterchatvoicevolume.h llfloatercolorpicker.h llfloaterconversationlog.h llfloaterconversationpreview.h diff --git a/indra/newview/llfloaterchatvoicevolume.cpp b/indra/newview/llfloaterchatvoicevolume.cpp new file mode 100644 index 0000000000..d10c3c6504 --- /dev/null +++ b/indra/newview/llfloaterchatvoicevolume.cpp @@ -0,0 +1,26 @@ +/* + * llfloaterchatvoicevolume.cpp + * + * Created on: Sep 27, 2012 + * Author: pguslisty + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterchatvoicevolume.h" + +LLFloaterChatVoiceVolume::LLFloaterChatVoiceVolume(const LLSD& key) +: LLInspect(key) +{ +} + +void LLFloaterChatVoiceVolume::onOpen(const LLSD& key) +{ + LLInspect::onOpen(key); + LLUI::positionViewNearMouse(this); +} + +LLFloaterChatVoiceVolume::~LLFloaterChatVoiceVolume() +{ + LLTransientFloaterMgr::getInstance()->removeControlView(this); +}; diff --git a/indra/newview/llfloaterchatvoicevolume.h b/indra/newview/llfloaterchatvoicevolume.h new file mode 100644 index 0000000000..0aeab7874c --- /dev/null +++ b/indra/newview/llfloaterchatvoicevolume.h @@ -0,0 +1,26 @@ +/* + * llfloaterchatvoicevolume.h + * + * Created on: Sep 27, 2012 + * Author: pguslisty + */ + +#ifndef LLFLOATERCHATVOICEVOLUME_H_ +#define LLFLOATERCHATVOICEVOLUME_H_ + +#include "llinspect.h" +#include "lltransientfloatermgr.h" + +class LLFloaterChatVoiceVolume : public LLInspect, LLTransientFloater +{ +public: + + LLFloaterChatVoiceVolume(const LLSD& key); + virtual ~LLFloaterChatVoiceVolume(); + + virtual void onOpen(const LLSD& key); + + /*virtual*/ LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; } +}; + +#endif /* LLFLOATERCHATVOICEVOLUME_H_ */ diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index c3cbca68c7..4a9a50d96a 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -264,10 +264,14 @@ void LLOutputMonitorCtrl::draw() // virtual BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask) { - if (mSpeakerId != gAgentID) + if (mSpeakerId != gAgentID && !mShowParticipantsSpeaking) { LLFloaterReg::showInstance("floater_voice_volume", LLSD().with("avatar_id", mSpeakerId)); } + else if(mShowParticipantsSpeaking) + { + LLFloaterReg::showInstance("chat_voice", LLSD()); + } return TRUE; } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 927ee8f380..4cd5ecc754 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -50,6 +50,7 @@ #include "llfloaterbump.h" #include "llfloaterbvhpreview.h" #include "llfloatercamera.h" +#include "llfloaterchatvoicevolume.h" #include "llfloaterconversationlog.h" #include "llfloaterconversationpreview.h" #include "llfloaterdeleteenvpreset.h" @@ -192,6 +193,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("chat_voice", "floater_voice_chat_volume.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("nearby_chat", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("conversation", "floater_conversation_log.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml new file mode 100644 index 0000000000..5c71fd3bc6 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml @@ -0,0 +1,48 @@ + + + + + +