EXP-670 Voice for basic mode

reviewed by Merov
http://codereview.lindenlab.com/6231263/
master
Leyla Farazha 2011-04-27 16:45:33 -07:00
parent d4ee7ac748
commit 37ef2c4f0f
6 changed files with 152 additions and 256 deletions

View File

@ -316,6 +316,6 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice()
if(LLVoiceClient::getInstance())
{
LLVoiceClient::getInstance()->setRenderDevice(
getChild<LLComboBox>("voice_input_device")->getValue().asString());
getChild<LLComboBox>("voice_output_device")->getValue().asString());
}
}

View File

@ -91,6 +91,7 @@
#include "llfloatersettingsdebug.h"
#include "llfloatersidetraytab.h"
#include "llfloatersnapshot.h"
#include "llfloatersounddevices.h"
#include "llfloatertelehub.h"
#include "llfloatertestinspectors.h"
#include "llfloatertestlistview.h"
@ -239,6 +240,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater);
LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml", &LLFloaterReg::build<LLFloaterSideTrayTab>);
LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>);
LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);

View File

@ -5591,6 +5591,14 @@ class LLToggleHelp : public view_listener_t
}
};
class LLToggleSpeak : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
LLVoiceClient::getInstance()->toggleUserPTTState();
return true;
}
};
class LLShowSidetrayPanel : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@ -8187,6 +8195,7 @@ void initialize_menus()
commit.add("BuyCurrency", boost::bind(&handle_buy_currency));
view_listener_t::addMenu(new LLShowHelp(), "ShowHelp");
view_listener_t::addMenu(new LLToggleHelp(), "ToggleHelp");
view_listener_t::addMenu(new LLToggleSpeak(), "ToggleSpeak");
view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL");
view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile");
view_listener_t::addMenu(new LLToggleAgentProfile(), "ToggleAgentProfile");

View File

@ -466,164 +466,13 @@
name="device_settings_btn"
width="190">
</button>
<panel
background_visible="false"
bg_alpha_color="DkGray"
visiblity_control="ShowDeviceSettings"
border="false"
follows="top|left"
height="100"
label="Device Settings"
layout="topleft"
left_delta="-2"
name="device_settings_panel"
class="panel_voice_device_settings"
width="470"
top_pad="0">
<panel.string
name="default_text">
Default
</panel.string>
<panel.string
name="default system device">
Default system device
</panel.string>
<panel.string
name="no device">
No device
</panel.string>
<icon
height="18"
image_name="Microphone_On"
left_delta="4"
name="microphone_icon"
mouse_opaque="false"
top="7"
visible="true"
width="18" />
<text
type="string"
length="1"
font.style="BOLD"
follows="left|top"
height="16"
layout="topleft"
left_pad="3"
name="Input"
width="70">
Input
</text>
<combo_box
height="23"
control_name="VoiceInputAudioDevice"
layout="topleft"
left_pad="0"
max_chars="128"
name="voice_input_device"
top_delta="-5"
width="200" />
<text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
left_delta="-70"
name="My volume label"
top_pad="4"
width="200">
My volume:
</text>
<slider_bar
control_name="AudioLevelMic"
follows="left|top"
height="17"
increment="0.025"
initial_value="1.0"
layout="topleft"
left_delta="-6"
max_val="2"
name="mic_volume_slider"
tool_tip="Change the volume using this slider"
top_pad="-1"
width="220" />
<text
type="string"
text_color="EmphasisColor"
length="1"
follows="left|top"
height="18"
layout="topleft"
left_pad="5"
name="wait_text"
top_delta="-1"
width="110">
Please wait
</text>
<locate
height="20"
layout="topleft"
left_delta="0"
name="bar0"
top_delta="-2"
width="20" />
<locate
height="20"
layout="topleft"
left_pad="5"
name="bar1"
top_delta="0"
width="20" />
<locate
height="20"
layout="topleft"
left_pad="5"
name="bar2"
top_delta="0"
width="20" />
<locate
height="20"
layout="topleft"
left_pad="5"
name="bar3"
top_delta="0"
width="20" />
<locate
height="20"
layout="topleft"
left_pad="5"
name="bar4"
top_delta="0"
width="20" />
<icon
height="18"
image_name="Parcel_Voice_Light"
left="5"
name="speaker_icon"
mouse_opaque="false"
top_pad="3"
visible="true"
width="22" />
<text
font.style="BOLD"
type="string"
length="1"
follows="left|top"
height="15"
layout="topleft"
left_pad="0"
name="Output"
width="70">
Output
</text>
<combo_box
control_name="VoiceOutputAudioDevice"
height="23"
layout="topleft"
left_pad="0"
max_chars="128"
name="voice_output_device"
top_delta="-3"
width="200" />
</panel>
</panel>
<panel
layout="topleft"
filename="panel_sound_devices.xml"
visiblity_control="ShowDeviceSettings"
name="device_settings_panel"
top="314"
width="345"
left="18"
class="panel_voice_device_settings"/>
</panel>

View File

@ -6,4 +6,6 @@
<texture name="bottomtray_close_off" file_name="bottomtray/close_off.png" preload="true" />
<texture name="bottomtray_close_over" file_name="bottomtray/close_over.png" preload="true" />
<texture name="bottomtray_close_press" file_name="bottomtray/close_press.png" preload="true" />
</textures>
<texture name="Speak_Btn_Off" file_name="bottomtray/Speak_Btn_Off.png" preload="true" scale.left="4" scale.top="16" scale.right="8" scale.bottom="4" />
<texture name="Speak_Btn_Selected_Press" file_name="bottomtray/Speak_Btn_Selected_Press.png" preload="true" scale.left="4" scale.top="16" scale.right="8" scale.bottom="4" />
</textures>

View File

@ -12,16 +12,16 @@
focus_root="true"
top="28"
width="1310">
<string
<string
name="DragIndicationImageName"
value="Accordion_ArrowOpened_Off" />
<string
<string
name="SpeakBtnToolTip"
value="Turns microphone on/off" />
<string
<string
name="VoiceControlBtnToolTip"
value="Shows/hides voice control panel" />
<layout_stack
<layout_stack
border_size="0"
clip="false"
follows="all"
@ -33,12 +33,12 @@
orientation="horizontal"
top="0"
width="1310">
<layout_panel
<layout_panel
auto_resize="false"
user_resize="false"
min_width="2"
width="2" />
<layout_panel
<layout_panel
auto_resize="false"
layout="topleft"
max_width="320"
@ -48,7 +48,7 @@
name="chat_bar_layout_panel"
user_resize="true"
width="308" >
<panel
<panel
name="chat_bar"
filename="panel_nearby_chat_bar.xml"
left="0"
@ -65,39 +65,73 @@
height="28"
layout="topleft"
min_height="28"
min_width="59"
min_width="35"
mouse_opaque="false"
name="speak_panel"
top_delta="0"
user_resize="false"
width="108">
<talk_button
width="85">
<button
follows="left|right"
height="23"
layout="topleft"
label="Speak"
left="0"
name="talk"
name="speak_btn"
pad_right="30"
halign="center"
use_ellipses="true"
tab_stop="true"
is_toggle="true"
image_selected="Speak_Btn_Selected_Press"
image_unselected="Speak_Btn_Off"
image_pressed="Speak_Btn_Selected_Press"
image_pressed_selected="Speak_Btn_Selected_Press"
top="5"
width="105">
<show_button
tab_stop="true">
<init_callback
function="Button.SetDockableFloaterToggle"
parameter="voice_controls" />
</show_button>
<!-- do not remove halign attribute with default value. otherwise it can't be overridden in other locales.
& pad_right is default value for long label which can be right aligned. See EXT-6318 -->
<speak_button
halign="center"
label="Speak"
label_selected="Speak"
name="speak_btn"
pad_right="20"
tab_stop="true"
use_ellipses="true" />
</talk_button>
width="85">
<commit_callback
function="ToggleSpeak"
parameter="f1_help" />
</button>
</layout_panel>
<layout_panel
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
min_height="28"
min_width="20"
mouse_opaque="false"
name="flyout_panel"
top_delta="0"
user_resize="false"
width="20">
<button
follows="left|right"
width="20"
top="5"
left="0"
height="23"
name="speak_flyout_btn"
label=""
tab_stop="false"
is_toggle="true"
image_disabled="ComboButton_UpOff"
image_unselected="ComboButton_UpOff"
image_selected="ComboButton_On"
image_pressed="ComboButton_UpSelected"
image_pressed_selected="ComboButton_Selected">
<init_callback
function="Button.SetDockableFloaterToggle"
parameter="sound_devices" />
</button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="right"
height="28"
@ -108,7 +142,7 @@
name="gesture_panel"
top_delta="0"
user_resize="false"
width="85">
width="88">
<gesture_combo_list
follows="left|right"
height="23"
@ -116,20 +150,20 @@
layout="topleft"
get_more="false"
view_all="false"
left="0"
left="3"
name="Gesture"
tool_tip="Shows/hides gestures"
top="5"
width="82">
<combo_button
<combo_button
pad_right="10"
can_drag="false"
use_ellipses="true" />
<combo_list
<combo_list
page_lines="17" />
</gesture_combo_list>
</layout_panel>
<layout_panel
</gesture_combo_list>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
@ -140,7 +174,7 @@
name="cam_panel"
user_resize="false"
width="83">
<bottomtray_button
<bottomtray_button
can_drag="false"
follows="left|right"
height="23"
@ -156,12 +190,12 @@
top="5"
use_ellipses="true"
width="80">
<init_callback
<init_callback
function="Button.SetDockableFloaterToggle"
parameter="camera" />
</bottomtray_button>
</layout_panel>
<layout_panel
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
@ -170,7 +204,7 @@
name="splitter_panel"
user_resize="false"
width="17">
<icon
<icon
follows="left|bottom"
height="18"
width="2"
@ -178,8 +212,8 @@
image_name="Button_Separator"
name="separator"
top="7"/>
</layout_panel>
<layout_panel
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
@ -190,7 +224,7 @@
name="avatar_and_destinations_panel"
user_resize="false"
width="103">
<bottomtray_button
<bottomtray_button
can_drag="false"
follows="left|right"
height="23"
@ -206,11 +240,11 @@
is_toggle="true"
use_ellipses="true"
width="100">
<bottomtray_button.commit_callback
<bottomtray_button.commit_callback
function="Destination.show" />
</bottomtray_button>
</layout_panel>
<layout_panel
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
@ -221,7 +255,7 @@
name="avatar_and_destinations_panel"
user_resize="false"
width="103">
<bottomtray_button
<bottomtray_button
can_drag="false"
follows="left|right"
height="23"
@ -236,11 +270,11 @@
is_toggle="true"
use_ellipses="true"
width="100">
<bottomtray_button.commit_callback
<bottomtray_button.commit_callback
function="Avatar.show" />
</bottomtray_button>
</layout_panel>
<layout_panel
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
@ -249,7 +283,7 @@
name="splitter_panel"
user_resize="false"
width="17">
<icon
<icon
follows="left|bottom"
height="18"
width="2"
@ -257,8 +291,8 @@
image_name="Button_Separator"
name="separator"
top="7"/>
</layout_panel>
<layout_panel
</layout_panel>
<layout_panel
auto_resize="false"
follows="right"
height="28"
@ -270,7 +304,7 @@
top_delta="0"
user_resize="false"
width="105">
<bottomtray_button
<bottomtray_button
can_drag="false"
follows="left|right"
height="23"
@ -286,12 +320,12 @@
is_toggle="true"
use_ellipses="true"
width="100">
<bottomtray_button.commit_callback
<bottomtray_button.commit_callback
function="ShowSidetrayPanel"
parameter="panel_people" />
</bottomtray_button>
</layout_panel>
<layout_panel
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="right"
height="28"
@ -303,7 +337,7 @@
top_delta="0"
user_resize="false"
width="105">
<bottomtray_button
<bottomtray_button
can_drag="false"
follows="left|right"
height="23"
@ -319,12 +353,12 @@
top="5"
use_ellipses="true"
width="100">
<bottomtray_button.commit_callback
<bottomtray_button.commit_callback
function="ToggleAgentProfile"
parameter="agent"/>
</bottomtray_button>
</layout_panel>
<layout_panel
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="right"
height="28"
@ -336,7 +370,7 @@
top_delta="0"
user_resize="false"
width="105">
<bottomtray_button
<bottomtray_button
can_drag="false"
follows="left|right"
height="23"
@ -352,12 +386,12 @@
top="5"
use_ellipses="true"
width="100">
<bottomtray_button.commit_callback
<bottomtray_button.commit_callback
function="ToggleHelp"
parameter="f1_help" />
</bottomtray_button>
</layout_panel>
<layout_panel
</bottomtray_button>
</layout_panel>
<layout_panel
follows="left|right"
height="30"
layout="topleft"
@ -367,9 +401,9 @@
top="0"
user_resize="false"
width="189">
<!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same
<!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same
as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. EXT-991-->
<chiclet_panel
<chiclet_panel
chiclet_padding="4"
follows="left|right"
height="24"
@ -380,7 +414,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
name="chiclet_list"
top="7"
width="189">
<button
<button
auto_resize="true"
follows="right"
height="29"
@ -397,7 +431,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
top="-28"
visible="false"
width="7" />
<button
<button
auto_resize="true"
follows="right"
height="29"
@ -414,13 +448,13 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
top="-28"
visible="false"
width="7" />
</chiclet_panel>
</layout_panel>
<layout_panel auto_resize="false"
</chiclet_panel>
</layout_panel>
<layout_panel auto_resize="false"
user_resize="false"
width="4"
min_width="4"/>
<layout_panel
<layout_panel
auto_resize="false"
follows="right"
height="28"
@ -431,7 +465,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
top="0"
user_resize="false"
width="37">
<chiclet_im_well
<chiclet_im_well
follows="right"
height="28"
layout="topleft"
@ -440,7 +474,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
name="im_well"
top="0"
width="35">
<!--
<!--
Emulate 4 states of button by background images, see details in EXT-3147. The same should be for notification_well button
xml attribute Description
image_unselected "Unlit" - there are no new messages
@ -448,7 +482,7 @@ image_selected "Unlit" + "Selected" - there are no new messages and the
image_pressed "Lit" - there are new messages
image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open
-->
<button
<button
auto_resize="true"
follows="right"
halign="center"
@ -463,13 +497,13 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well
name="Unread IM messages"
tool_tip="Conversations"
width="34">
<init_callback
<init_callback
function="Button.SetDockableFloaterToggle"
parameter="im_well_window" />
</button>
</chiclet_im_well>
</layout_panel>
<layout_panel
</button>
</chiclet_im_well>
</layout_panel>
<layout_panel
auto_resize="false"
follows="right"
height="28"
@ -480,7 +514,7 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well
top="0"
user_resize="false"
width="37">
<chiclet_notification
<chiclet_notification
follows="right"
height="23"
layout="topleft"
@ -489,7 +523,7 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well
name="notification_well"
top="5"
width="35">
<button
<button
auto_resize="true"
bottom_pad="3"
follows="right"
@ -505,7 +539,7 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well
name="Unread"
tool_tip="Notifications"
width="34">
<init_callback
<init_callback
function="Button.SetDockableFloaterToggle"
parameter="notification_well_window" />
</button>
@ -517,5 +551,5 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well
min_width="4"
name="DUMMY2"
width="8" />
</layout_stack>
</layout_stack>
</panel>