Implemented normal sub-task EXT-1909 (Update IM Control Panels buttons according to the spec) - added 'Open Voice Controls' button. Note Teleport and Pay buttons will be implemented in EXT-957

--HG--
branch : product-engine
meow-7.2.2
Eugene Mutavchi 2009-11-02 19:18:24 +02:00
parent 3dc509bec0
commit 5b7f40df4e
6 changed files with 51 additions and 20 deletions

View File

@ -54,10 +54,16 @@ void LLPanelChatControlPanel::onEndCallButtonClicked()
gIMMgr->endCall(mSessionId);
}
void LLPanelChatControlPanel::onOpenVoiceControlsClicked()
{
// TODO: implement Voice Control Panel opening
}
BOOL LLPanelChatControlPanel::postBuild()
{
childSetAction("call_btn", boost::bind(&LLPanelChatControlPanel::onCallButtonClicked, this));
childSetAction("end_call_btn", boost::bind(&LLPanelChatControlPanel::onEndCallButtonClicked, this));
childSetAction("voice_ctrls_btn", boost::bind(&LLPanelChatControlPanel::onOpenVoiceControlsClicked, this));
return TRUE;
}
@ -73,8 +79,10 @@ void LLPanelChatControlPanel::draw()
LLVoiceChannel* voice_channel = session->mVoiceChannel;
if (voice_channel && voice_enabled)
{
childSetVisible("end_call_btn", voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED);
childSetVisible("call_btn", voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED);
bool is_call_started = ( voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED );
childSetVisible("end_call_btn", is_call_started);
childSetVisible("voice_ctrls_btn", is_call_started);
childSetVisible("call_btn", ! is_call_started);
}
bool session_initialized = session->mSessionInitialized;

View File

@ -50,6 +50,7 @@ public:
void onCallButtonClicked();
void onEndCallButtonClicked();
void onOpenVoiceControlsClicked();
virtual void setSessionId(const LLUUID& session_id) { mSessionId = session_id; }

View File

@ -3,7 +3,7 @@
legacy_header_height="18"
background_visible="true"
follows="left|top|right|bottom"
height="250"
height="270"
layout="topleft"
left="0"
name="panel_im"
@ -17,7 +17,7 @@
min_width="200"
min_height="150">
<layout_stack follows="left|top|right|bottom"
height="235"
height="255"
width="365"
layout="topleft"
orientation="horizontal"
@ -29,11 +29,11 @@
layout="topleft"
top_delta="-3"
width="146"
height="225"
height="255"
follows="left"
label="IM Control Panel"
user_resize="false" />
<layout_panel height="235"
<layout_panel height="255"
width="200"
left_delta="146"
top="0"
@ -56,7 +56,7 @@
length="1"
follows="left|top|right|bottom"
font="SansSerif"
height="185"
height="205"
layout="topleft"
name="chat_history"
parse_highlights="true"

View File

@ -20,12 +20,19 @@
<button
name="call_btn"
label="Call"
width="90"
width="125"
height="20" />
<button
name="end_call_btn"
label="End Call"
width="90"
width="125"
height="20"
visible="false"/>
<button
enabled="false"
name="voice_ctrls_btn"
label="Open Voice Controls"
width="125"
height="20"
visible="false"/>
</panel>

View File

@ -2,7 +2,7 @@
<panel
name="panel_im_control_panel"
width="146"
height="215"
height="238"
border="false">
<avatar_list
color="DkGray2"
@ -21,17 +21,24 @@
name="group_info_btn"
label="Group Info"
left_delta="3"
width="90"
width="125"
height="20" />
<button
name="call_btn"
label="Call"
width="90"
width="125"
height="20" />
<button
name="end_call_btn"
label="End Call"
width="90"
width="125"
height="20"
visible="false"/>
<button
enabled="false"
name="voice_ctrls_btn"
label="Open Voice Controls"
width="125"
height="20"
visible="false"/>
</panel>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel name="panel_im_control_panel"
width="96"
height="225"
width="125"
height="248"
border="false">
<avatar_icon name="avatar_icon"
@ -11,17 +11,17 @@
<button name="view_profile_btn"
label="View Profile"
left_delta="3"
width="90"
width="125"
height="20" />
<button name="add_friend_btn"
label="Add Friend"
width="90"
width="125"
height="20" />
<button name="call_btn"
label="Call"
width="90"
width="125"
height="20" />
<button
@ -29,11 +29,19 @@
label="End Call"
name="end_call_btn"
visible="false"
width="90" />
width="125" />
<button
enabled="false"
name="voice_ctrls_btn"
label="Open Voice Controls"
width="125"
height="20"
visible="false"/>
<button name="share_btn"
label="Share"
width="90"
width="125"
height="20" />
</panel>