Commits

leyla_linden committed f14128a

EXP-802 Add a check box to enable/disable voice chat.

Comments (0)

Files changed (4)

indra/newview/llbottomtray.cpp

 	else
 	{
 		LLTransientFloaterMgr::getInstance()->addControlView(getChild<LLButton>("speak_btn"));
-		LLTransientFloaterMgr::getInstance()->addControlView(getChild<LLButton>("speak_flyout_btn"));
+		LLTransientFloaterMgr::getInstance()->addControlView(getChild<LLButton>("flyout_btn"));
 	}
 
 
 // because it resets chatbar's width according to resize logic.
 void LLBottomTray::initButtonsVisibility()
 {
-	setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat"));
+	setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat") || !mSpeakBtn );
 	setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton"));
 	setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton"));
 	setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton"));
 
 void LLBottomTray::setButtonsControlsAndListeners()
 {
-	gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2));
+	// always show the speak panel if using the basic skin
+	if (mSpeakBtn)
+	{
+		gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2));
+	}	
+
 	gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2));
 	gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2));
 	gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2));

indra/newview/llfloatersounddevices.cpp

 {
 	LLTransientDockableFloater::postBuild();
 		
-	LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_flyout_btn");
+	LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("flyout_btn");
 	setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP));
 
 	setIsChrome(TRUE);

indra/newview/skins/default/xui/en/floater_sound_devices.xml

  save_rect="true"
  single_instance="true"
  bevel_style="in"
- height="140"
+ height="164"
  layout="topleft"
  name="floater_sound_devices"
  title="Sound Devices"
     left="2"
     top="26"
     class="panel_voice_device_settings"/>
+  <text
+    name="voice_label"
+    top="136"
+    left="12"
+    height="14"
+    width="80"
+    layout="topleft"
+    >Voice Chat</text>
+  <check_box
+    layout="topleft"
+    control_name="EnableVoiceChat"
+    follows="bottom|left"
+    top="138"
+    left="80"
+    name="enable_voice"
+    width="100"
+    height="14"
+    label="Enabled"
+    />
 </floater>

indra/newview/skins/minimal/xui/en/panel_bottomtray.xml

         top="5"
      left="0"
      height="23"
-     name="speak_flyout_btn"
+     name="flyout_btn"
      label=""
      tab_stop="false"
      tool_tip="Change your sound preferences"