From 3284dec5d962993882c1eaeee231e04b46fd4ec7 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 30 Nov 2009 15:27:20 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Updated title according to voice chat type --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 36 ++++++++++++++++++++++++++++++------ indra/newview/llcallfloater.h | 9 +++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 46432a4953..b29e6d0574 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -46,6 +46,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mSpeakerManager(NULL) , mPaticipants(NULL) , mAvatarList(NULL) +, mVoiceType(VC_LOCAL_CHAT) { } @@ -110,6 +111,19 @@ void LLCallFloater::updateSession() if (im_session) { mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id); + switch (im_session->mType) + { + case IM_NOTHING_SPECIAL: + case IM_SESSION_P2P_INVITE: + mVoiceType = VC_PEER_TO_PEER; + break; + case IM_SESSION_CONFERENCE_START: + mVoiceType = VC_AD_HOC_CHAT; + break; + default: + mVoiceType = VC_GROUP_CHAT; + break; + } } if (NULL == mSpeakerManager) @@ -117,6 +131,7 @@ void LLCallFloater::updateSession() // by default let show nearby chat participants mSpeakerManager = LLLocalSpeakerMgr::getInstance(); lldebugs << "Set DEFAULT speaker manager" << llendl; + mVoiceType = VC_LOCAL_CHAT; } updateTitle(); @@ -140,16 +155,25 @@ void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) void LLCallFloater::updateTitle() { LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); - if (NULL == voice_channel) return; - - std::string title = voice_channel->getSessionName(); - - if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager) + std::string title; + switch (mVoiceType) { + case VC_LOCAL_CHAT: title = getString("title_nearby"); + break; + case VC_PEER_TO_PEER: + title = voice_channel->getSessionName(); + break; + case VC_AD_HOC_CHAT: + title = getString("title_adhoc"); + break; + case VC_GROUP_CHAT: + LLStringUtil::format_map_t args; + args["[GROUP]"] = voice_channel->getSessionName(); + title = getString("title_group", args); + break; } - // *TODO: mantipov: update code to use title from xml for other chat types setTitle(title); } //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 0cd5fe05c1..94a19d92e0 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -61,6 +61,14 @@ public: /*virtual*/ void onOpen(const LLSD& key); private: + typedef enum e_voice_controls_type + { + VC_LOCAL_CHAT, + VC_GROUP_CHAT, + VC_AD_HOC_CHAT, + VC_PEER_TO_PEER + }EVoiceControls; + /** * Updates mSpeakerManager and list according to current Voice Channel * @@ -80,6 +88,7 @@ private: LLSpeakerMgr* mSpeakerManager; LLParticipantList* mPaticipants; LLAvatarList* mAvatarList; + EVoiceControls mVoiceType; }; -- cgit v1.2.3 From 62e775288ca50e37edbdb3dc7dc55dbf61a546e3 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 30 Nov 2009 15:38:18 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Changed text for empty nearby list to "No one near" --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 5 +++++ indra/newview/skins/default/xui/en/floater_voice_controls.xml | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index b29e6d0574..0c6d3d2d54 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -145,6 +145,11 @@ void LLCallFloater::refreshPartisipantList() bool do_not_use_context_menu_in_local_chat = LLLocalSpeakerMgr::getInstance() != mSpeakerManager; mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, do_not_use_context_menu_in_local_chat); + + if (!do_not_use_context_menu_in_local_chat) + { + mAvatarList->setNoItemsCommentText(getString("no_one_near")); + } } void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 4a5642e5c6..3c12aed3a0 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -20,6 +20,10 @@ name="title_adhoc"> Conference Call + + No one near + Date: Mon, 30 Nov 2009 16:02:22 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Enabled "Voice Controls" button in P2P voice chat --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_im_control_panel.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index 0a5812882d..0a3fd1699f 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -76,7 +76,6 @@ visible="false" width="100" />