summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/settings.xml110
-rw-r--r--indra/newview/llbottomtray.cpp12
-rw-r--r--indra/newview/llparticipantlist.cpp10
-rw-r--r--indra/newview/llparticipantlist.h10
-rw-r--r--indra/newview/llspeakers.cpp65
-rw-r--r--indra/newview/llspeakers.h30
-rw-r--r--indra/newview/llvoicevivox.cpp8
7 files changed, 177 insertions, 68 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 693093c6ce..1d3301d6f7 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1597,6 +1597,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>ChatBarCustomWidth</key>
+ <map>
+ <key>Comment</key>
+ <string>Stores customized width of chat bar.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>CreateToolCopyCenters</key>
<map>
<key>Comment</key>
@@ -8063,6 +8074,28 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>ShowBuildButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows/Hides Build button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ShowCameraButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Show/Hide View button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>ShowConsoleWindow</key>
<map>
<key>Comment</key>
@@ -8140,6 +8173,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>ShowGestureButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows/Hides Gesture button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>ShowHoverTips</key>
<map>
<key>Comment</key>
@@ -8162,6 +8206,28 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>ShowMiniMapButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows/Hides Mini-Map button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ShowMoveButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows/Hides Move button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>ShowScriptErrors</key>
<map>
<key>Comment</key>
@@ -8184,6 +8250,39 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>ShowSearchButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows/Hides Search button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ShowSidebarButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows/hides Sidebar button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ShowSnapshotButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows/Hides Snapshot button button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>ShowObjectRenderingCost</key>
<map>
<key>Comment</key>
@@ -8217,6 +8316,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>ShowWorldMapButton</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows/Hides Map button in the bottom tray.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>SidebarCameraMovement</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index ae97460468..1603ff0a54 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -1220,18 +1220,6 @@ void LLBottomTray::initButtonsVisibility()
void LLBottomTray::setButtonsControlsAndListeners()
{
- gSavedSettings.declareBOOL("ShowGestureButton", TRUE, "Shows/Hides Gesture button in the bottom tray. (Declared in code)");
- gSavedSettings.declareBOOL("ShowMoveButton", TRUE, "Shows/Hides Move button in the bottom tray. (Declared in code)");
- gSavedSettings.declareBOOL("ShowSnapshotButton", TRUE, "Shows/Hides Snapshot button button in the bottom tray. (Declared in code)");
- gSavedSettings.declareBOOL("ShowCameraButton", TRUE, "Show/Hide View button in the bottom tray. (Declared in code)");
- gSavedSettings.declareBOOL("ShowSidebarButton", TRUE, "Shows/hides Sidebar button in the bottom tray. (Declared in code)");
- gSavedSettings.declareBOOL("ShowBuildButton", TRUE, "Shows/Hides Build button in the bottom tray. (Declared in code)");
- gSavedSettings.declareBOOL("ShowSearchButton", TRUE, "Shows/Hides Search button in the bottom tray. (Declared in code)");
- gSavedSettings.declareBOOL("ShowWorldMapButton", TRUE, "Shows/Hides Map button in the bottom tray. (Declared in code)");
- gSavedSettings.declareBOOL("ShowMiniMapButton", TRUE, "Shows/Hides Mini-Map button in the bottom tray. (Declared in code)");
-
- gSavedSettings.declareS32("ChatBarCustomWidth", 0, "Stores customized width of chat bar. (Declared in code)");
-
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));
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index b975536f8b..4f0946774a 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -793,7 +793,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdat
else
{
bool unmute_all = userdata.asString() == "unmute_all";
- moderateVoiceOtherParticipants(LLUUID::null, unmute_all);
+ moderateVoiceAllParticipants(unmute_all);
}
}
@@ -806,7 +806,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LL
}
}
-void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute)
+void LLParticipantList::LLParticipantListMenu::moderateVoiceAllParticipants(bool unmute)
{
LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr);
if (mgr)
@@ -815,12 +815,11 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co
{
LLSD payload;
payload["session_id"] = mgr->getSessionID();
- payload["excluded_avatar_id"] = excluded_avatar_id;
LLNotificationsUtil::add("ConfirmMuteAll", LLSD(), payload, confirmMuteAllCallback);
return;
}
- mgr->moderateVoiceOtherParticipants(excluded_avatar_id, unmute);
+ mgr->moderateVoiceAllParticipants(unmute);
}
}
@@ -835,13 +834,12 @@ void LLParticipantList::LLParticipantListMenu::confirmMuteAllCallback(const LLSD
const LLSD& payload = notification["payload"];
const LLUUID& session_id = payload["session_id"];
- const LLUUID& excluded_avatar_id = payload["excluded_avatar_id"];
LLIMSpeakerMgr * speaker_manager = dynamic_cast<LLIMSpeakerMgr*> (
LLIMModel::getInstance()->getSpeakerManager(session_id));
if (speaker_manager)
{
- speaker_manager->moderateVoiceOtherParticipants(excluded_avatar_id, false);
+ speaker_manager->moderateVoiceAllParticipants(false);
}
return;
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 967c8b78cf..3fe45fa591 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -187,7 +187,7 @@ class LLParticipantList
* @param userdata can be "selected" or "others".
*
* @see moderateVoiceParticipant()
- * @see moderateVoiceOtherParticipants()
+ * @see moderateVoiceAllParticipants()
*/
void moderateVoice(const LLSD& userdata);
@@ -200,22 +200,20 @@ class LLParticipantList
* @param[in] avatar_id UUID of avatar to be processed
* @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted.
*
- * @see moderateVoiceOtherParticipants()
+ * @see moderateVoiceAllParticipants()
*/
void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
/**
- * Mutes/Unmutes all avatars except specified for current group voice chat.
+ * Mutes/Unmutes all avatars for current group voice chat.
*
* It only marks avatars as muted for session and does not use local Agent's Block list.
- * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted.
*
- * @param[in] excluded_avatar_id UUID of avatar NOT to be processed
* @param[in] unmute if true - avatars will be muted, otherwise - unmuted.
*
* @see moderateVoiceParticipant()
*/
- void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute);
+ void moderateVoiceAllParticipants(bool unmute);
static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response);
};
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 9da3db3032..bf00b47c21 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -251,6 +251,8 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_
LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) :
mVoiceChannel(channelp)
+, mVoiceModerated(false)
+, mModerateModeHandledFirstTime(false)
{
static LLUICachedControl<F32> remove_delay ("SpeakerParticipantRemoveDelay", 10.0);
@@ -297,6 +299,33 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin
return speakerp;
}
+// *TODO: Once way to request the current voice channel moderation mode is implemented
+// this method with related code should be removed.
+/*
+ Initializes "moderate_mode" of voice session on first join.
+
+ This is WORKAROUND because a way to request the current voice channel moderation mode exists
+ but is not implemented in viewer yet. See EXT-6937.
+*/
+void LLSpeakerMgr::initVoiceModerateMode()
+{
+ if (!mModerateModeHandledFirstTime && (mVoiceChannel && mVoiceChannel->isActive()))
+ {
+ LLPointer<LLSpeaker> speakerp;
+
+ if (mSpeakers.find(gAgentID) != mSpeakers.end())
+ {
+ speakerp = mSpeakers[gAgentID];
+ }
+
+ if (speakerp.notNull())
+ {
+ mVoiceModerated = speakerp->mModeratorMutedVoice;
+ mModerateModeHandledFirstTime = true;
+ }
+ }
+}
+
void LLSpeakerMgr::update(BOOL resort_ok)
{
if (!LLVoiceClient::getInstance())
@@ -529,7 +558,6 @@ BOOL LLSpeakerMgr::isVoiceActive()
// LLIMSpeakerMgr
//
LLIMSpeakerMgr::LLIMSpeakerMgr(LLVoiceChannel* channel) : LLSpeakerMgr(channel)
-, mVoiceModerated(false)
{
}
@@ -762,31 +790,9 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu
new ModerationResponder(getSessionID()));
}
-void LLIMSpeakerMgr::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else)
+void LLIMSpeakerMgr::moderateVoiceAllParticipants( bool unmute_everyone )
{
- // *TODO: mantipov: add more intellectual processing of several following requests if it is needed.
- /*
- Such situation should be tested:
- "Moderator sends the same second request before first response is come"
- Moderator sends "mute everyone else" for A and then for B
- two requests to disallow voice chat are sent
- UUID of B is stored.
- Then first response (to disallow voice chat) is come
- request to allow voice for stored avatar (B)
- Then second response (to disallow voice chat) is come
- have nothing to do, the latest selected speaker is already enabled
-
- What can happen?
- If request to allow voice for stored avatar (B) is processed on server BEFORE
- second request to disallow voice chat all speakers will be disabled on voice.
- But I'm not sure such situation is possible.
- See EXT-3431.
- */
-
- mReverseVoiceModeratedAvatarID = excluded_avatar_id;
-
-
- if (mVoiceModerated == !unmute_everyone_else)
+ if (mVoiceModerated == !unmute_everyone)
{
// session already in requested state. Just force participants which do not match it.
forceVoiceModeratedMode(mVoiceModerated);
@@ -794,7 +800,7 @@ void LLIMSpeakerMgr::moderateVoiceOtherParticipants(const LLUUID& excluded_avata
else
{
// otherwise set moderated mode for a whole session.
- moderateVoiceSession(getSessionID(), !unmute_everyone_else);
+ moderateVoiceSession(getSessionID(), !unmute_everyone);
}
}
@@ -804,13 +810,6 @@ void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update)
session_update["moderated_mode"].has("voice"))
{
mVoiceModerated = session_update["moderated_mode"]["voice"];
-
- if (mReverseVoiceModeratedAvatarID.notNull())
- {
- moderateVoiceParticipant(mReverseVoiceModeratedAvatarID, mVoiceModerated);
-
- mReverseVoiceModeratedAvatarID = LLUUID::null;
- }
}
}
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index b38acb7bc4..4a250de82f 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -242,6 +242,13 @@ public:
*/
bool removeAvalineSpeaker(const LLUUID& speaker_id) { return removeSpeaker(speaker_id); }
+ /**
+ * Initializes mVoiceModerated depend on LLSpeaker::mModeratorMutedVoice of agent's participant.
+ *
+ * Is used only to implement workaround to initialize mVoiceModerated on first join to group chat. See EXT-6937
+ */
+ void initVoiceModerateMode();
+
protected:
virtual void updateSpeakerList();
void setSpeakerNotInChannel(LLSpeaker* speackerp);
@@ -258,6 +265,14 @@ protected:
* time out speakers when they are not part of current session
*/
LLSpeakersDelayActionsStorage* mSpeakerDelayRemover;
+
+ // *TODO: should be moved back into LLIMSpeakerMgr when a way to request the current voice channel
+ // moderation mode is implemented: See EXT-6937
+ bool mVoiceModerated;
+
+ // *TODO: To be removed when a way to request the current voice channel
+ // moderation mode is implemented: See EXT-6937
+ bool mModerateModeHandledFirstTime;
};
class LLIMSpeakerMgr : public LLSpeakerMgr
@@ -279,22 +294,21 @@ public:
* @param[in] avatar_id UUID of avatar to be processed
* @param[in] unmute if false - specified avatar will be muted, otherwise - unmuted.
*
- * @see moderateVoiceOtherParticipants()
+ * @see moderateVoiceAllParticipants()
*/
void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
/**
- * Mutes/Unmutes all avatars except specified for current group voice chat.
+ * Mutes/Unmutes all avatars for current group voice chat.
*
* It only marks avatars as muted for session and does not use local Agent's Block list.
- * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted.
+ * It calls forceVoiceModeratedMode() in case of session is already in requested state.
*
- * @param[in] excluded_avatar_id UUID of avatar NOT to be processed
- * @param[in] unmute_everyone_else if false - avatars will be muted, otherwise - unmuted.
+ * @param[in] unmute_everyone if false - avatars will be muted, otherwise - unmuted.
*
* @see moderateVoiceParticipant()
*/
- void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else);
+ void moderateVoiceAllParticipants(bool unmute_everyone);
void processSessionUpdate(const LLSD& session_update);
@@ -308,10 +322,6 @@ protected:
*/
void forceVoiceModeratedMode(bool should_be_muted);
-private:
- LLUUID mReverseVoiceModeratedAvatarID;
- bool mVoiceModerated;
-
};
class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr>
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index bcb1a70efb..1597691347 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -3698,9 +3698,15 @@ void LLVivoxVoiceClient::participantUpdatedEvent(
if (speaker_manager)
{
speaker_manager->update(true);
+
+ // also initialize voice moderate_mode depend on Agent's participant. See EXT-6937.
+ // *TODO: remove once a way to request the current voice channel moderation mode is implemented.
+ if (gAgentID == participant->mAvatarID)
+ {
+ speaker_manager->initVoiceModerateMode();
+ }
}
}
-
}
else
{