Merge branch 'DRTVWR-588-maint-W' of https://github.com/secondlife/viewer
# Conflicts: # indra/newview/llvoicevivox.cpp # indra/newview/skins/default/xui/en/panel_volume_pulldown.xmlmeow-7.2.2
commit
1860cc98a3
|
|
@ -32,6 +32,7 @@
|
|||
// Viewer includes
|
||||
#include "llcombobox.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "llstartup.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llvoiceclient.h"
|
||||
#include "llvoicechannel.h"
|
||||
|
|
@ -70,14 +71,14 @@ BOOL LLPanelVoiceDeviceSettings::postBuild()
|
|||
|
||||
mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
|
||||
mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
|
||||
mRetryBtn = getChild<LLButton>("retry_btn");
|
||||
mUnmuteBtn = getChild<LLButton>("unmute_btn");
|
||||
|
||||
mCtrlInputDevices->setCommitCallback(
|
||||
boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this));
|
||||
mCtrlOutputDevices->setCommitCallback(
|
||||
boost::bind(&LLPanelVoiceDeviceSettings::onCommitOutputDevice, this));
|
||||
mRetryBtn->setCommitCallback(
|
||||
boost::bind(&LLPanelVoiceDeviceSettings::onCommitRetry, this));
|
||||
mUnmuteBtn->setCommitCallback(
|
||||
boost::bind(&LLPanelVoiceDeviceSettings::onCommitUnmute, this));
|
||||
|
||||
mLocalizedDeviceNames[DEFAULT_DEVICE] = getString("default_text");
|
||||
mLocalizedDeviceNames["No Device"] = getString("name_no_device");
|
||||
|
|
@ -115,16 +116,18 @@ void LLPanelVoiceDeviceSettings::draw()
|
|||
if (voice_enabled)
|
||||
{
|
||||
getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode);
|
||||
getChildView("muted_text")->setVisible(FALSE);
|
||||
mRetryBtn->setVisible(FALSE);
|
||||
getChildView("disabled_text")->setVisible(FALSE);
|
||||
mUnmuteBtn->setVisible(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("wait_text")->setVisible(FALSE);
|
||||
getChildView("muted_text")->setVisible(TRUE);
|
||||
|
||||
static LLCachedControl<bool> voice_enabled(gSavedSettings, "EnableVoiceChat");
|
||||
mRetryBtn->setVisible(!voice_enabled || LLVoiceClient::isMutedVoiceInstance());
|
||||
static LLCachedControl<bool> chat_enabled(gSavedSettings, "EnableVoiceChat");
|
||||
// If voice isn't enabled, it is either disabled or muted
|
||||
bool voice_disabled = chat_enabled() || LLStartUp::getStartupState() <= STATE_LOGIN_WAIT;
|
||||
getChildView("disabled_text")->setVisible(voice_disabled);
|
||||
mUnmuteBtn->setVisible(!voice_disabled);
|
||||
}
|
||||
|
||||
LLPanel::draw();
|
||||
|
|
@ -357,8 +360,7 @@ void LLPanelVoiceDeviceSettings::onInputDevicesClicked()
|
|||
LLVoiceClient::getInstance()->refreshDeviceLists(false); // fill in the pop up menus again if needed.
|
||||
}
|
||||
|
||||
void LLPanelVoiceDeviceSettings::onCommitRetry()
|
||||
void LLPanelVoiceDeviceSettings::onCommitUnmute()
|
||||
{
|
||||
gSavedSettings.setBOOL("EnableVoiceChat", TRUE);
|
||||
LLVoiceClient::unmuteVoiceInstance();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,14 +55,14 @@ protected:
|
|||
void onCommitOutputDevice();
|
||||
void onOutputDevicesClicked();
|
||||
void onInputDevicesClicked();
|
||||
void onCommitRetry();
|
||||
void onCommitUnmute();
|
||||
|
||||
F32 mMicVolume;
|
||||
std::string mInputDevice;
|
||||
std::string mOutputDevice;
|
||||
class LLComboBox *mCtrlInputDevices;
|
||||
class LLComboBox *mCtrlOutputDevices;
|
||||
class LLButton *mRetryBtn;
|
||||
class LLButton *mUnmuteBtn;
|
||||
BOOL mDevicesUpdated;
|
||||
bool mUseTuningMode;
|
||||
std::map<std::string, std::string> mLocalizedDeviceNames;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include "llfloaterreg.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "llvoicevivox.h"
|
||||
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
|
@ -125,10 +124,6 @@ void LLPanelVolumePulldown::updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data
|
|||
getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled);
|
||||
}
|
||||
}
|
||||
else if (control_name == "VoiceChat")
|
||||
{
|
||||
LLVivoxVoiceClient::unmuteVoiceInstance();
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelVolumePulldown::onClickSetSounds()
|
||||
|
|
|
|||
|
|
@ -2285,7 +2285,7 @@ void LLPreviewLSL::draw()
|
|||
setTitle(LLTrans::getString("ScriptWasDeleted"));
|
||||
mScriptEd->setItemRemoved(TRUE);
|
||||
}
|
||||
if (mDirty)
|
||||
else if (mDirty)
|
||||
{
|
||||
// <FS:Ansariel> Make ugly location display better
|
||||
//std::string item_path = get_category_path(item->getParentUUID());
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@
|
|||
#include "llviewermenu.h" // for gMenuBarView
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewerthrottle.h"
|
||||
#include "llvoiceclient.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "lltoolmgr.h"
|
||||
|
|
@ -353,12 +352,9 @@ BOOL LLStatusBar::postBuild()
|
|||
gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2));
|
||||
gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLStatusBar::onVoiceChanged, this, _2));
|
||||
|
||||
if (gSavedSettings.getBOOL("EnableVoiceChat") && !LLVoiceClient::isMutedVoiceInstance())
|
||||
{
|
||||
mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off"));
|
||||
}
|
||||
else
|
||||
if (!gSavedSettings.getBOOL("EnableVoiceChat") && LLAppViewer::instance()->isSecondInstance())
|
||||
{
|
||||
// Indicate that second instance started without sound
|
||||
mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off"));
|
||||
}
|
||||
|
||||
|
|
@ -1138,14 +1134,11 @@ void LLStatusBar::onVolumeChanged(const LLSD& newvalue)
|
|||
|
||||
void LLStatusBar::onVoiceChanged(const LLSD& newvalue)
|
||||
{
|
||||
if (newvalue.asBoolean() && !LLVoiceClient::isMutedVoiceInstance())
|
||||
if (newvalue.asBoolean())
|
||||
{
|
||||
// Second instance starts with "VoiceMute_Off" icon, fix it
|
||||
mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off"));
|
||||
}
|
||||
else
|
||||
{
|
||||
mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off"));
|
||||
}
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -571,16 +571,6 @@ void LLVoiceClient::setVoiceEnabled(bool enabled)
|
|||
}
|
||||
}
|
||||
|
||||
void LLVoiceClient::unmuteVoiceInstance()
|
||||
{
|
||||
LLVivoxVoiceClient::unmuteVoiceInstance();
|
||||
}
|
||||
|
||||
bool LLVoiceClient::isMutedVoiceInstance()
|
||||
{
|
||||
return LLVivoxVoiceClient::isMutedVoiceInstance();
|
||||
}
|
||||
|
||||
void LLVoiceClient::updateMicMuteLogic()
|
||||
{
|
||||
// If not configured to use PTT, the mic should be open (otherwise the user will be unable to speak).
|
||||
|
|
|
|||
|
|
@ -432,8 +432,6 @@ public:
|
|||
void toggleUserPTTState(void);
|
||||
void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs
|
||||
void setVoiceEnabled(bool enabled);
|
||||
static void unmuteVoiceInstance();
|
||||
static bool isMutedVoiceInstance();
|
||||
|
||||
void setUsePTT(bool usePTT);
|
||||
void setPTTIsToggle(bool PTTIsToggle);
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@ static void killGateway()
|
|||
|
||||
bool LLVivoxVoiceClient::sShuttingDown = false;
|
||||
bool LLVivoxVoiceClient::sConnected = false;
|
||||
bool LLVivoxVoiceClient::sVoiceInstanceMuted = false;
|
||||
LLPumpIO *LLVivoxVoiceClient::sPump = nullptr;
|
||||
|
||||
LLVivoxVoiceClient::LLVivoxVoiceClient() :
|
||||
|
|
@ -356,7 +355,6 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
|
|||
sShuttingDown = false;
|
||||
sConnected = false;
|
||||
sPump = nullptr;
|
||||
sVoiceInstanceMuted = LLAppViewer::instance()->isSecondInstance();
|
||||
|
||||
mSpeakerVolume = scale_speaker_volume(0);
|
||||
|
||||
|
|
@ -5794,15 +5792,14 @@ bool LLVivoxVoiceClient::voiceEnabled(bool no_cache)
|
|||
// <FS:Ansariel> Replace frequently called gSavedSettings
|
||||
//return gSavedSettings.getBOOL("EnableVoiceChat") &&
|
||||
// !gSavedSettings.getBOOL("CmdLineDisableVoice") &&
|
||||
// !gNonInteractive &&
|
||||
// !sVoiceInstanceMuted;
|
||||
// !gNonInteractive;
|
||||
if (no_cache)
|
||||
{
|
||||
return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice") && !gNonInteractive && !sVoiceInstanceMuted;
|
||||
return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice") && !gNonInteractive;
|
||||
}
|
||||
static LLCachedControl<bool> sEnableVoiceChat(gSavedSettings, "EnableVoiceChat");
|
||||
static LLCachedControl<bool> sCmdLineDisableVoice(gSavedSettings, "CmdLineDisableVoice");
|
||||
return sEnableVoiceChat && !sCmdLineDisableVoice && !gNonInteractive && !sVoiceInstanceMuted;
|
||||
return sEnableVoiceChat && !sCmdLineDisableVoice && !gNonInteractive;
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
|
|||
|
|
@ -175,8 +175,6 @@ public:
|
|||
virtual bool voiceEnabled(bool no_cache = false);
|
||||
// </FS:Ansariel>
|
||||
virtual void setVoiceEnabled(bool enabled);
|
||||
static void unmuteVoiceInstance() { sVoiceInstanceMuted = false; }
|
||||
static bool isMutedVoiceInstance() { return sVoiceInstanceMuted; }
|
||||
virtual BOOL lipSyncEnabled();
|
||||
virtual void setLipSyncEnabled(BOOL enabled);
|
||||
virtual void setMuteMic(bool muted); // Set the mute state of the local mic.
|
||||
|
|
@ -933,7 +931,6 @@ private:
|
|||
// This variables can last longer than vivox in coroutines so we need them as static
|
||||
static bool sShuttingDown;
|
||||
static bool sConnected;
|
||||
static bool sVoiceInstanceMuted; // Second+ instance of viewer starts muted
|
||||
static LLPumpIO* sPump;
|
||||
|
||||
LLEventMailDrop mVivoxPump;
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@
|
|||
width="20" />
|
||||
<text
|
||||
type="string"
|
||||
name="muted_text"
|
||||
name="disabled_text"
|
||||
text_color="EmphasisColor"
|
||||
length="1"
|
||||
follows="right|top"
|
||||
|
|
@ -180,16 +180,16 @@
|
|||
layout="topleft"
|
||||
left_delta="-100"
|
||||
top_delta="5"
|
||||
width="70">
|
||||
Muted
|
||||
width="110">
|
||||
Disabled
|
||||
</text>
|
||||
<button
|
||||
follows="right|top"
|
||||
height="23"
|
||||
image_overlay="Refresh_Off"
|
||||
layout="topleft"
|
||||
left_pad="1"
|
||||
name="retry_btn"
|
||||
top_delta="-5"
|
||||
width="23" />
|
||||
left_delta="0"
|
||||
name="unmute_btn"
|
||||
label="Unmute"
|
||||
top_delta="-6"
|
||||
width="110" />
|
||||
</panel>
|
||||
Loading…
Reference in New Issue