From b9f113fe2a87741de51547a6d84f378a72fe1847 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 26 Nov 2009 20:17:07 +0200 Subject: implemented overridden LLAvatarList::clear to follow class behavior --HG-- branch : product-engine --- indra/newview/llavatarlist.cpp | 7 +++++++ indra/newview/llavatarlist.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 7f3f869e5d..202fbdebd4 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -153,6 +153,13 @@ void LLAvatarList::draw() } } +//virtual +void LLAvatarList::clear() +{ + getIDs().clear(); + setDirty(true); +} + void LLAvatarList::setNameFilter(const std::string& filter) { if (mNameFilter != filter) diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 490f93e501..9058fec540 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -70,6 +70,8 @@ public: virtual void draw(); // from LLView + virtual void clear(); + void setNameFilter(const std::string& filter); void setDirty(bool val = true) { mDirty = val; } uuid_vector_t& getIDs() { return mIDs; } -- cgit v1.2.3 From bf6d5e9755b6c6e93fdf22a6cd4e20ffb2d2b441 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 26 Nov 2009 20:41:07 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- implemented opening of the Voice Control Panel from the Group Chat --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 25 ++++++++++++++++++++-- indra/newview/llcallfloater.h | 1 + indra/newview/llpanelimcontrolpanel.cpp | 4 +++- indra/newview/llparticipantlist.cpp | 1 + .../default/xui/en/panel_group_control_panel.xml | 1 - 5 files changed, 28 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index f566806b29..4a24b558c9 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -62,8 +62,6 @@ BOOL LLCallFloater::postBuild() LLDockableFloater::postBuild(); mAvatarList = getChild("speakers_list"); - mSpeakerManager = LLLocalSpeakerMgr::getInstance(); - mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, false); LLView *anchor_panel = LLBottomTray::getInstance()->getChild("speak_panel"); @@ -73,4 +71,27 @@ BOOL LLCallFloater::postBuild() return TRUE; } + +// virtual +void LLCallFloater::onOpen(const LLSD& key) +{ + // by default let show nearby chat participants + mSpeakerManager = LLLocalSpeakerMgr::getInstance(); + + const LLUUID& session_id = key.asUUID(); + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); + if (im_session) + { + mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id); + } + + delete mPaticipants; + mAvatarList->clear(); + mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, false); +} + +////////////////////////////////////////////////////////////////////////// +/// PRIVATE SECTION +////////////////////////////////////////////////////////////////////////// + //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 8c4a204943..0b86a6ee92 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -58,6 +58,7 @@ public: ~LLCallFloater(); /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); private: diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 78b4d29b16..741f42f9d5 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" +#include "llfloaterreg.h" + #include "llpanelimcontrolpanel.h" #include "llagent.h" @@ -58,7 +60,7 @@ void LLPanelChatControlPanel::onEndCallButtonClicked() void LLPanelChatControlPanel::onOpenVoiceControlsClicked() { - // TODO: implement Voice Control Panel opening + LLFloaterReg::showInstance("voice_controls", getSessionId()); } void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index a5440c3687..7cf5302e40 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -89,6 +89,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mModeratorList.insert(speakerp->mID); } } + mAvatarList->setDirty(true); sort(); } diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml index 41b210557e..889f29fc53 100644 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml @@ -61,7 +61,6 @@ width="125"/>