diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llcallfloater.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llcallfloater.h | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_voice_controls.xml | 27 |
3 files changed, 43 insertions, 4 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 7db709086f..d6ae4603b4 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -64,6 +64,7 @@ BOOL LLCallFloater::postBuild() { LLDockableFloater::postBuild(); mAvatarList = getChild<LLAvatarList>("speakers_list"); + childSetAction("leave_call_btn", boost::bind(&LLCallFloater::leaveCall, this)); LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_panel"); @@ -90,6 +91,14 @@ void LLCallFloater::onOpen(const LLSD& /*key*/) ////////////////////////////////////////////////////////////////////////// /// PRIVATE SECTION ////////////////////////////////////////////////////////////////////////// + +void LLCallFloater::leaveCall() +{ + LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); + if (voice_channel && voice_channel->isActive()) + voice_channel->deactivate(); +} + void LLCallFloater::updateSession() { LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); @@ -139,6 +148,11 @@ void LLCallFloater::updateSession() } updateTitle(); + + //hide "Leave Call" button for nearby chat + bool isLocalChat = mVoiceType == VC_LOCAL_CHAT; + childSetVisible("leave_btn_panel", !isLocalChat); + refreshPartisipantList(); } diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 3112b8e81b..d0a2ca5303 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -48,8 +48,8 @@ class LLSpeakerMgr; * the Resident's own microphone input volume, the audible volume of each of the other participants, * the Resident's own Voice Morphing settings (if she has subscribed to enable the feature), and Voice Recording. * - * When the Resident is engaged in Group Voice Chat, the Voice Control Panel also provides an - * 'End Call' button to allow the Resident to leave that voice channel. + * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel also provides an + * 'Leave Call' button to allow the Resident to leave that voice channel. */ class LLCallFloater : public LLDockableFloater { @@ -69,6 +69,8 @@ private: VC_PEER_TO_PEER }EVoiceControls; + void leaveCall(); + /** * Updates mSpeakerManager and list according to current Voice Channel * 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 04696ca2e7..c59d97457e 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -74,6 +74,7 @@ width="20" /> </panel> <layout_stack + animate="false" bottom="10" clip="false" follows="left|right|top" @@ -82,9 +83,11 @@ orientation="horizontal" width="262"> <layout_panel + auto_resize="false" follows="left" layout="topleft" min_width="24" + name="microphone_icon_panel" top="0" user_resize="false" width="24"> @@ -98,9 +101,11 @@ </layout_panel> <layout_panel layout="topleft" + min_width="138" + name="volume_slider_panel" top="0" user_resize="false" - width="258"> + width="138"> <slider_bar control_name="AudioLevelMic" follows="left|right|top" @@ -113,7 +118,25 @@ tool_tip="Master Volume" top="0" value="0.75" - width="258" /> + width="138" /> + </layout_panel> + <layout_panel + auto_resize="false" + layout="topleft" + min_width="100" + name="leave_btn_panel" + top="0" + user_resize="false" + visible="false" + width="100"> + <button + follows="left|right|top" + height="24" + label="Leave Call" + left="0" + name="leave_call_btn" + top="0" + width="100" /> </layout_panel> </layout_stack> </panel> |