summaryrefslogtreecommitdiff
path: root/indra/newview/llcallfloater.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-11-30 15:27:20 +0200
committerMike Antipov <mantipov@productengine.com>2009-11-30 15:27:20 +0200
commit3284dec5d962993882c1eaeee231e04b46fd4ec7 (patch)
treeefa6443cbeb033da1bf8da32e18b6b23708e9cdb /indra/newview/llcallfloater.cpp
parent288f67e46207220c589cdb82d464070c1bf1ab75 (diff)
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
Diffstat (limited to 'indra/newview/llcallfloater.cpp')
-rw-r--r--indra/newview/llcallfloater.cpp36
1 files changed, 30 insertions, 6 deletions
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