summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMaximB ProductEngine <mberezhnoy@productengine.com>2012-12-18 19:17:38 +0200
committerMaximB ProductEngine <mberezhnoy@productengine.com>2012-12-18 19:17:38 +0200
commitef58be0f74262fbc034f1b9b3ba4fa7ee6d16225 (patch)
treee5c2e934f441341902e825b912dae8e161f3351b /indra
parent355e7a061311df30f019fd722df6072b745b0ef6 (diff)
parente64c8fdc145c6ae2727173d310a732a471aaf569 (diff)
merge
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llagent.cpp58
-rw-r--r--indra/newview/llconversationlog.cpp3
-rw-r--r--indra/newview/llflexibleobject.cpp2
-rw-r--r--indra/newview/llfloaterconversationlog.cpp3
-rw-r--r--indra/newview/llfloaterimsession.cpp33
-rw-r--r--indra/newview/llfloaterimsession.h3
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp53
-rw-r--r--indra/newview/llfloaterimsessiontab.h5
-rw-r--r--indra/newview/llhudobject.cpp2
-rw-r--r--indra/newview/llhudobject.h4
-rw-r--r--indra/newview/llimview.cpp7
-rwxr-xr-xindra/newview/llvoavatar.cpp16
-rw-r--r--indra/newview/llvoiceclient.cpp1
-rw-r--r--indra/newview/llvoicevisualizer.cpp32
-rw-r--r--indra/newview/llvoicevisualizer.h27
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml15
-rw-r--r--indra/newview/skins/default/xui/en/menu_im_conversation.xml94
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml53
18 files changed, 276 insertions, 135 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 22a21ffaeb..49c570c30b 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2541,51 +2541,21 @@ void LLMaturityPreferencesResponder::error(U32 pStatus, const std::string& pReas
U8 LLMaturityPreferencesResponder::parseMaturityFromServerResponse(const LLSD &pContent)
{
- // stinson 05/24/2012 Pathfinding regions have re-defined the response behavior. In the old server code,
- // if you attempted to change the preferred maturity to the same value, the response content would be an
- // undefined LLSD block. In the new server code with pathfinding, the response content should always be
- // defined. Thus, the check for isUndefined() can be replaced with an assert after pathfinding is merged
- // into server trunk and fully deployed.
U8 maturity = SIM_ACCESS_MIN;
- if (pContent.isUndefined())
- {
- maturity = mPreferredMaturity;
- }
- else
- {
- llassert(!pContent.isUndefined());
- llassert(pContent.isMap());
-
- if (!pContent.isUndefined() && pContent.isMap())
- {
- // stinson 05/24/2012 Pathfinding regions have re-defined the response syntax. The if statement catches
- // the new syntax, and the else statement catches the old syntax. After pathfinding is merged into
- // server trunk and fully deployed, we can remove the else statement.
- if (pContent.has("access_prefs"))
- {
- llassert(pContent.has("access_prefs"));
- llassert(pContent.get("access_prefs").isMap());
- llassert(pContent.get("access_prefs").has("max"));
- llassert(pContent.get("access_prefs").get("max").isString());
- if (pContent.get("access_prefs").isMap() && pContent.get("access_prefs").has("max") &&
- pContent.get("access_prefs").get("max").isString())
- {
- LLSD::String actualPreference = pContent.get("access_prefs").get("max").asString();
- LLStringUtil::trim(actualPreference);
- maturity = LLViewerRegion::shortStringToAccess(actualPreference);
- }
- }
- else if (pContent.has("max"))
- {
- llassert(pContent.get("max").isString());
- if (pContent.get("max").isString())
- {
- LLSD::String actualPreference = pContent.get("max").asString();
- LLStringUtil::trim(actualPreference);
- maturity = LLViewerRegion::shortStringToAccess(actualPreference);
- }
- }
- }
+
+ llassert(!pContent.isUndefined());
+ llassert(pContent.isMap());
+ llassert(pContent.has("access_prefs"));
+ llassert(pContent.get("access_prefs").isMap());
+ llassert(pContent.get("access_prefs").has("max"));
+ llassert(pContent.get("access_prefs").get("max").isString());
+ if (!pContent.isUndefined() && pContent.isMap() && pContent.has("access_prefs")
+ && pContent.get("access_prefs").isMap() && pContent.get("access_prefs").has("max")
+ && pContent.get("access_prefs").get("max").isString())
+ {
+ LLSD::String actualPreference = pContent.get("access_prefs").get("max").asString();
+ LLStringUtil::trim(actualPreference);
+ maturity = LLViewerRegion::shortStringToAccess(actualPreference);
}
return maturity;
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index a0765f5e16..1171b3db41 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -191,7 +191,8 @@ LLConversationLog::LLConversationLog()
if (ctrl)
{
ctrl->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2));
- if (ctrl->getValue().asBoolean())
+ if (ctrl->getValue().asBoolean()
+ && gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
{
enableLogging(true);
}
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index aae0990e4b..c2b9c77307 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -444,7 +444,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
return ;
}
- // stinson 11/12/2012: Need to check with davep on the following.
+ // Fix for MAINT-1894
// Skipping the flexible update if render res is negative. If we were to continue with a negative value,
// the subsequent S32 num_render_sections = 1<<mRenderRes; code will specify a really large number of
// render sections which will then create a length exception in the std::vector::resize() method.
diff --git a/indra/newview/llfloaterconversationlog.cpp b/indra/newview/llfloaterconversationlog.cpp
index 089aec1905..a40a000bab 100644
--- a/indra/newview/llfloaterconversationlog.cpp
+++ b/indra/newview/llfloaterconversationlog.cpp
@@ -67,7 +67,8 @@ BOOL LLFloaterConversationLog::postBuild()
if (ctrl)
{
ctrl->getSignal()->connect(boost::bind(&LLFloaterConversationLog::onCallLoggingEnabledDisabled, this, _2));
- onCallLoggingEnabledDisabled(ctrl->getValue().asBoolean());
+ onCallLoggingEnabledDisabled(ctrl->getValue().asBoolean()
+ && gSavedSettings.getBOOL("KeepConversationLogTranscripts"));
}
return LLFloater::postBuild();
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index a0ca7286f1..f2afe9d7bb 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -83,6 +83,9 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
setOverlapsScreenChannel(true);
LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this);
+ mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&LLFloaterIMSession::enableGearMenuItem, this, _2));
+ mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&LLFloaterIMSession::GearDoToSelected, this, _2));
+ mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&LLFloaterIMSession::checkGearMenuItem, this, _2));
setDocked(true);
}
@@ -190,6 +193,36 @@ void LLFloaterIMSession::onSendMsg( LLUICtrl* ctrl, void* userdata )
self->setTyping(false);
}
+bool LLFloaterIMSession::enableGearMenuItem(const LLSD& userdata)
+{
+ std::string command = userdata.asString();
+ uuid_vec_t selected_uuids;
+ selected_uuids.push_back(mOtherParticipantUUID);
+
+ LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
+ return floater_container->enableContextMenuItem(command, selected_uuids);
+}
+
+void LLFloaterIMSession::GearDoToSelected(const LLSD& userdata)
+{
+ std::string command = userdata.asString();
+ uuid_vec_t selected_uuids;
+ selected_uuids.push_back(mOtherParticipantUUID);
+
+ LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
+ floater_container->doToParticipants(command, selected_uuids);
+}
+
+bool LLFloaterIMSession::checkGearMenuItem(const LLSD& userdata)
+{
+ std::string command = userdata.asString();
+ uuid_vec_t selected_uuids;
+ selected_uuids.push_back(mOtherParticipantUUID);
+
+ LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
+ return floater_container->checkContextMenuItem(command, selected_uuids);
+}
+
void LLFloaterIMSession::sendMsgFromInputEditor()
{
if (gAgent.isGodlike()
diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h
index 1d8957b1d9..43d84eb8c0 100644
--- a/indra/newview/llfloaterimsession.h
+++ b/indra/newview/llfloaterimsession.h
@@ -99,6 +99,9 @@ public:
void setPositioned(bool b) { mPositioned = b; };
void onVisibilityChange(const LLSD& new_visibility);
+ bool enableGearMenuItem(const LLSD& userdata);
+ void GearDoToSelected(const LLSD& userdata);
+ bool checkGearMenuItem(const LLSD& userdata);
// Implements LLVoiceClientStatusObserver::onChange() to enable the call
// button when voice is available
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 07907095f8..d6955f37f2 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -198,6 +198,8 @@ BOOL LLFloaterIMSessionTab::postBuild()
mTearOffBtn = getChild<LLButton>("tear_off_btn");
mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this));
+ mGearBtn = getChild<LLButton>("gear_btn");
+
mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel");
// Add a scroller for the folder (participant) view
@@ -241,11 +243,11 @@ BOOL LLFloaterIMSessionTab::postBuild()
// Now ready to build the conversation and participants list
buildConversationViewParticipant();
refreshConversation();
-
+
// Zero expiry time is set only once to allow initial update.
mRefreshTimer->setTimerExpirySec(0);
mRefreshTimer->start();
-
+ initBtns();
return result;
}
@@ -771,6 +773,53 @@ void LLFloaterIMSessionTab::onTearOffClicked()
forceReshape();
}
refreshConversation();
+ updateGearBtn();
+}
+
+void LLFloaterIMSessionTab::updateGearBtn()
+{
+
+ BOOL prevVisibility = mGearBtn->getVisible();
+ mGearBtn->setVisible(checkIfTornOff() && mIsP2PChat);
+
+
+ // Move buttons if Gear button changed visibility
+ if(prevVisibility != mGearBtn->getVisible())
+ {
+ LLRect gear_btn_rect = mGearBtn->getRect();
+ LLRect add_btn_rect = getChild<LLButton>("add_btn")->getRect();
+ LLRect call_btn_rect = getChild<LLButton>("voice_call_btn")->getRect();
+ S32 gap_width = call_btn_rect.mLeft - add_btn_rect.mRight;
+ S32 right_shift = gear_btn_rect.getWidth() + gap_width;
+ if(mGearBtn->getVisible())
+ {
+ // Move buttons to the right to give space for Gear button
+ add_btn_rect.translate(right_shift,0);
+ call_btn_rect.translate(right_shift,0);
+ }
+ else
+ {
+ add_btn_rect.translate(-right_shift,0);
+ call_btn_rect.translate(-right_shift,0);
+ }
+ getChild<LLButton>("add_btn")->setRect(add_btn_rect);
+ getChild<LLButton>("voice_call_btn")->setRect(call_btn_rect);
+ }
+}
+
+void LLFloaterIMSessionTab::initBtns()
+{
+ LLRect gear_btn_rect = mGearBtn->getRect();
+ LLRect add_btn_rect = getChild<LLButton>("add_btn")->getRect();
+ LLRect call_btn_rect = getChild<LLButton>("voice_call_btn")->getRect();
+ S32 gap_width = call_btn_rect.mLeft - add_btn_rect.mRight;
+ S32 right_shift = gear_btn_rect.getWidth() + gap_width;
+
+ add_btn_rect.translate(-right_shift,0);
+ call_btn_rect.translate(-right_shift,0);
+
+ getChild<LLButton>("add_btn")->setRect(add_btn_rect);
+ getChild<LLButton>("voice_call_btn")->setRect(call_btn_rect);
}
// static
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index 9aeda9ddf9..a452c77224 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -92,7 +92,8 @@ public:
void setSortOrder(const LLConversationSort& order);
virtual void onTearOffClicked();
-
+ void updateGearBtn();
+ void initBtns();
virtual void updateMessages() {}
LLConversationItem* getCurSelectedViewModelItem();
@@ -159,6 +160,8 @@ protected:
LLButton* mExpandCollapseBtn;
LLButton* mTearOffBtn;
LLButton* mCloseBtn;
+ LLButton* mGearBtn;
+
private:
// Handling selection and contextual menu
diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp
index 0960846510..95d57d08d8 100644
--- a/indra/newview/llhudobject.cpp
+++ b/indra/newview/llhudobject.cpp
@@ -232,11 +232,9 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type)
case LL_HUD_EFFECT_LOOKAT:
hud_objectp = new LLHUDEffectLookAt(type);
break;
-#ifdef XXX_STINSON_CHUI_REWORK
case LL_HUD_EFFECT_VOICE_VISUALIZER:
hud_objectp = new LLVoiceVisualizer(type);
break;
-#endif // XXX_STINSON_CHUI_REWORK
case LL_HUD_EFFECT_POINTAT:
hud_objectp = new LLHUDEffectPointAt(type);
break;
diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h
index 32cffe6839..2f7a98c86c 100644
--- a/indra/newview/llhudobject.h
+++ b/indra/newview/llhudobject.h
@@ -39,8 +39,6 @@
#include "lldrawpool.h" // TODO: eliminate, unused below
#include <list>
-#define XXX_STINSON_CHUI_REWORK // temporarily re-enabling the in-world voice-dot
-
class LLViewerCamera;
class LLFontGL;
class LLFace;
@@ -96,9 +94,7 @@ public:
LL_HUD_EFFECT_EDIT,
LL_HUD_EFFECT_LOOKAT,
LL_HUD_EFFECT_POINTAT,
-#ifdef XXX_STINSON_CHUI_REWORK
LL_HUD_EFFECT_VOICE_VISUALIZER, // Ventrella
-#endif // XXX_STINSON_CHUI_REWORK
LL_HUD_NAME_TAG,
LL_HUD_EFFECT_BLOB
};
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 4e2ac09dd8..da3d2e89bf 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -857,7 +857,8 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,
bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text)
{
- if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
+ if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")
+ && gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
{
std::string from_name = from;
@@ -2477,8 +2478,8 @@ void LLIMMgr::addMessage(
new_session_id = computeSessionID(dialog, other_participant_id);
}
- // Open conversation log if offline messages are present
- if (is_offline_msg)
+ // Open conversation log if offline messages are present and user allows a Call Log
+ if (is_offline_msg && gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
{
LLFloaterConversationLog* floater_log =
LLFloaterReg::getTypedInstance<LLFloaterConversationLog>("conversation");
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 7cc4e3ed04..19c7eda717 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -34,8 +34,6 @@
#include "llvoavatar.h"
-#define XXX_STINSON_CHUI_REWORK // temporarily re-enabling the in-world voice-dot
-
#include <stdio.h>
#include <ctype.h>
@@ -711,13 +709,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
LLMemType mt(LLMemType::MTYPE_AVATAR);
//VTResume(); // VTune
-#ifdef XXX_STINSON_CHUI_REWORK
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );
-#else // XXX_STINSON_CHUI_REWORK
- mVoiceVisualizer = new LLVoiceVisualizer();
-#endif // XXX_STINSON_CHUI_REWORK
lldebugs << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << llendl;
@@ -893,11 +887,7 @@ void LLVOAvatar::markDead()
mNameText = NULL;
sNumVisibleChatBubbles--;
}
-#ifdef XXX_STINSON_CHUI_REWORK
mVoiceVisualizer->markDead();
-#else // XXX_STINSON_CHUI_REWORK
- mVoiceVisualizer->setStopSpeaking();
-#endif // XXX_STINSON_CHUI_REWORK
LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ;
LLViewerObject::markDead();
}
@@ -1429,9 +1419,7 @@ void LLVOAvatar::initInstance(void)
//VTPause(); // VTune
-#ifdef XXX_STINSON_CHUI_REWORK
mVoiceVisualizer->setVoiceEnabled( LLVoiceClient::getInstance()->getVoiceEnabled( mID ) );
-#endif // XXX_STINSON_CHUI_REWORK
}
@@ -2529,7 +2517,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
{
-#ifdef XXX_STINSON_CHUI_REWORK
bool render_visualizer = voice_enabled;
// Don't render the user's own voice visualizer when in mouselook, or when opening the mic is disabled.
@@ -2542,7 +2529,6 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
}
mVoiceVisualizer->setVoiceEnabled(render_visualizer);
-#endif // XXX_STINSON_CHUI_REWORK
if ( voice_enabled )
{
@@ -2618,7 +2604,6 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
}
}
-#ifdef XXX_STINSON_CHUI_REWORK
//--------------------------------------------------------------------------------------------
// here we get the approximate head position and set as sound source for the voice symbol
// (the following version uses a tweak of "mHeadOffset" which handle sitting vs. standing)
@@ -2636,7 +2621,6 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
tagPos[VZ] += ( mBodySize[VZ] + 0.125f );
mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos );
}
-#endif // XXX_STINSON_CHUI_REWORK
}//if ( voiceEnabled )
}
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index dd529d74e9..b46c55321c 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -541,6 +541,7 @@ void LLVoiceClient::setMuteMic(bool muted)
{
mMuteMic = muted;
updateMicMuteLogic();
+ mMicroChangedSignal();
}
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index d380a8672f..b497f80560 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -45,7 +45,6 @@
//29de489d-0491-fb00-7dab-f9e686d31e83
-#ifdef XXX_STINSON_CHUI_REWORK
//--------------------------------------------------------------------------------------
// sound symbol constants
//--------------------------------------------------------------------------------------
@@ -61,7 +60,6 @@ const F32 BASE_BRIGHTNESS = 0.7f; // gray level of the voice indicator when qu
const F32 DOT_SIZE = 0.05f; // size of the dot billboard texture
const F32 DOT_OPACITY = 0.7f; // how opaque the dot is
const F32 WAVE_MOTION_RATE = 1.5f; // scalar applied to consecutive waves as a function of speaking amplitude
-#endif // XXX_STINSON_CHUI_REWORK
//--------------------------------------------------------------------------------------
// gesticulation constants
@@ -69,13 +67,11 @@ const F32 WAVE_MOTION_RATE = 1.5f; // scalar applied to consecutive waves as a
const F32 DEFAULT_MINIMUM_GESTICULATION_AMPLITUDE = 0.2f;
const F32 DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE = 1.0f;
-#ifdef XXX_STINSON_CHUI_REWORK
//--------------------------------------------------------------------------------------
// other constants
//--------------------------------------------------------------------------------------
const F32 ONE_HALF = 1.0f; // to clarify intent and reduce magic numbers in the code.
const LLVector3 WORLD_UPWARD_DIRECTION = LLVector3( 0.0f, 0.0f, 1.0f ); // Z is up in SL
-#endif // XXX_STINSON_CHUI_REWORK
//------------------------------------------------------------------
// Initialize the statics
@@ -98,28 +94,12 @@ F32 LLVoiceVisualizer::sAahPowerTransfersf = 0.0f;
//-----------------------------------------------
// constructor
//-----------------------------------------------
-#ifdef XXX_STINSON_CHUI_REWORK
LLVoiceVisualizer::LLVoiceVisualizer( const U8 type )
: LLHUDEffect(type)
-#else // XXX_STINSON_CHUI_REWORK
-LLVoiceVisualizer::LLVoiceVisualizer()
- : LLRefCount(),
- mTimer(),
- mStartTime(0.0),
- mCurrentlySpeaking(false),
- mSpeakingAmplitude(0.0f),
- mMaxGesticulationAmplitude(DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE),
- mMinGesticulationAmplitude(DEFAULT_MINIMUM_GESTICULATION_AMPLITUDE)
-#endif // XXX_STINSON_CHUI_REWORK
{
-#ifdef XXX_STINSON_CHUI_REWORK
mCurrentTime = mTimer.getTotalSeconds();
mPreviousTime = mCurrentTime;
mStartTime = mCurrentTime;
-#else // XXX_STINSON_CHUI_REWORK
- mStartTime = mTimer.getTotalSeconds();
-#endif // XXX_STINSON_CHUI_REWORK
-#ifdef XXX_STINSON_CHUI_REWORK
mVoiceSourceWorldPosition = LLVector3( 0.0f, 0.0f, 0.0f );
mSpeakingAmplitude = 0.0f;
mCurrentlySpeaking = false;
@@ -128,11 +108,9 @@ LLVoiceVisualizer::LLVoiceVisualizer()
mMaxGesticulationAmplitude = DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE;
mSoundSymbol.mActive = true;
mSoundSymbol.mPosition = LLVector3( 0.0f, 0.0f, 0.0f );
-#endif // XXX_STINSON_CHUI_REWORK
mTimer.reset();
-#ifdef XXX_STINSON_CHUI_REWORK
const char* sound_level_img[] =
{
"voice_meter_dot.j2c",
@@ -154,7 +132,6 @@ LLVoiceVisualizer::LLVoiceVisualizer()
}
mSoundSymbol.mTexture[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
-#endif // XXX_STINSON_CHUI_REWORK
// The first instance loads the initial state from prefs.
if (!sPrefsInitialized)
@@ -174,7 +151,6 @@ LLVoiceVisualizer::LLVoiceVisualizer()
}//---------------------------------------------------
-#ifdef XXX_STINSON_CHUI_REWORK
//---------------------------------------------------
void LLVoiceVisualizer::setMinGesticulationAmplitude( F32 m )
{
@@ -195,16 +171,13 @@ void LLVoiceVisualizer::setVoiceEnabled( bool v )
mVoiceEnabled = v;
}//---------------------------------------------------
-#endif // XXX_STINSON_CHUI_REWORK
//---------------------------------------------------
void LLVoiceVisualizer::setStartSpeaking()
{
mStartTime = mTimer.getTotalSeconds();
mCurrentlySpeaking = true;
-#ifdef XXX_STINSON_CHUI_REWORK
mSoundSymbol.mActive = true;
-#endif // XXX_STINSON_CHUI_REWORK
}//---------------------------------------------------
@@ -359,7 +332,6 @@ void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah )
}//---------------------------------------------------
-#ifdef XXX_STINSON_CHUI_REWORK
//---------------------------------------------------
// this method is inherited from HUD Effect
//---------------------------------------------------
@@ -558,7 +530,6 @@ void LLVoiceVisualizer::setVoiceSourceWorldPosition( const LLVector3 &p )
mVoiceSourceWorldPosition = p;
}//---------------------------------------------------
-#endif // XXX_STINSON_CHUI_REWORK
//---------------------------------------------------
VoiceGesticulationLevel LLVoiceVisualizer::getCurrentGesticulationLevel()
@@ -589,7 +560,6 @@ LLVoiceVisualizer::~LLVoiceVisualizer()
}//----------------------------------------------
-#ifdef XXX_STINSON_CHUI_REWORK
//---------------------------------------------------
// "packData" is inherited from HUDEffect
//---------------------------------------------------
@@ -639,5 +609,3 @@ void LLVoiceVisualizer::markDead()
LLHUDEffect::markDead();
}//------------------------------------------------------------------
-
-#endif // XXX_STINSON_CHUI_REWORK
diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h
index 5da592c48e..36c78252d1 100644
--- a/indra/newview/llvoicevisualizer.h
+++ b/indra/newview/llvoicevisualizer.h
@@ -42,12 +42,7 @@
#ifndef LL_VOICE_VISUALIZER_H
#define LL_VOICE_VISUALIZER_H
-#define XXX_STINSON_CHUI_REWORK // temporarily re-enabling the in-world voice-dot
-#ifdef XXX_STINSON_CHUI_REWORK
#include "llhudeffect.h"
-#else // XXX_STINSON_CHUI_REWORK
-#include "llpointer.h"
-#endif // XXX_STINSON_CHUI_REWORK
//-----------------------------------------------------------------------------------------------
// The values of voice gesticulation represent energy levels for avatar animation, based on
@@ -65,45 +60,30 @@ enum VoiceGesticulationLevel
NUM_VOICE_GESTICULATION_LEVELS
};
-#ifdef XXX_STINSON_CHUI_REWORK
const static int NUM_VOICE_SYMBOL_WAVES = 7;
-#endif // XXX_STINSON_CHUI_REWORK
//----------------------------------------------------
// LLVoiceVisualizer class
//----------------------------------------------------
-#ifdef XXX_STINSON_CHUI_REWORK
class LLVoiceVisualizer : public LLHUDEffect
-#else // XXX_STINSON_CHUI_REWORK
-class LLVoiceVisualizer : public LLRefCount
-#endif // XXX_STINSON_CHUI_REWORK
{
//---------------------------------------------------
// public methods
//---------------------------------------------------
public:
-#ifdef XXX_STINSON_CHUI_REWORK
LLVoiceVisualizer( const U8 type ); //constructor
-#else // XXX_STINSON_CHUI_REWORK
- LLVoiceVisualizer(); //constructor
-#endif // XXX_STINSON_CHUI_REWORK
~LLVoiceVisualizer(); //destructor
-#ifdef XXX_STINSON_CHUI_REWORK
void setVoiceSourceWorldPosition( const LLVector3 &p ); // this should be the position of the speaking avatar's head
void setMinGesticulationAmplitude( F32 ); // the lower range of meaningful amplitude for setting gesticulation level
void setMaxGesticulationAmplitude( F32 ); // the upper range of meaningful amplitude for setting gesticulation level
-#endif // XXX_STINSON_CHUI_REWORK
void setStartSpeaking(); // tell me when the av starts speaking
-#ifdef XXX_STINSON_CHUI_REWORK
void setVoiceEnabled( bool ); // tell me whether or not the user is voice enabled
-#endif // XXX_STINSON_CHUI_REWORK
void setSpeakingAmplitude( F32 ); // tell me how loud the av is speaking (ranges from 0 to 1)
void setStopSpeaking(); // tell me when the av stops speaking
bool getCurrentlySpeaking(); // the get for the above set
VoiceGesticulationLevel getCurrentGesticulationLevel(); // based on voice amplitude, I'll give you the current "energy level" of avatar speech
void lipSyncOohAah( F32& ooh, F32& aah );
-#ifdef XXX_STINSON_CHUI_REWORK
void render(); // inherited from HUD Effect
void packData(LLMessageSystem *mesgsys); // inherited from HUD Effect
void unpackData(LLMessageSystem *mesgsys, S32 blocknum); // inherited from HUD Effect
@@ -119,7 +99,6 @@ class LLVoiceVisualizer : public LLRefCount
//----------------------------------------------------------------------------------------------
void setMaxGesticulationAmplitude();
void setMinGesticulationAmplitude();
-#endif // XXX_STINSON_CHUI_REWORK
//---------------------------------------------------
// private members
@@ -129,7 +108,6 @@ class LLVoiceVisualizer : public LLRefCount
static void setPreferences( );
static void lipStringToF32s ( std::string& in_string, F32*& out_F32s, U32& count_F32s ); // convert a string of digits to an array of floats
-#ifdef XXX_STINSON_CHUI_REWORK
struct SoundSymbol
{
F32 mWaveExpansion [ NUM_VOICE_SYMBOL_WAVES ];
@@ -140,20 +118,15 @@ class LLVoiceVisualizer : public LLRefCount
bool mActive;
LLVector3 mPosition;
};
-#endif // XXX_STINSON_CHUI_REWORK
LLFrameTimer mTimer; // so I can ask the current time in seconds
F64 mStartTime; // time in seconds when speaking started
-#ifdef XXX_STINSON_CHUI_REWORK
F64 mCurrentTime; // current time in seconds, captured every step
F64 mPreviousTime; // copy of "current time" from last frame
SoundSymbol mSoundSymbol; // the sound symbol that appears over the avatar's head
bool mVoiceEnabled; // if off, no rendering should happen
-#endif // XXX_STINSON_CHUI_REWORK
bool mCurrentlySpeaking; // is the user currently speaking?
-#ifdef XXX_STINSON_CHUI_REWORK
LLVector3 mVoiceSourceWorldPosition; // give this to me every step - I need it to update the sound symbol
-#endif // XXX_STINSON_CHUI_REWORK
F32 mSpeakingAmplitude; // this should be set as often as possible when the user is speaking
F32 mMaxGesticulationAmplitude; // this is the upper-limit of the envelope of detectable gesticulation leves
F32 mMinGesticulationAmplitude; // this is the lower-limit of the envelope of detectable gesticulation leves
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index e4b127b7b9..4dbd52d05e 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -79,6 +79,21 @@
tool_tip="View/sort options"
top="5"
width="31" />
+ <menu_button
+ menu_filename="menu_im_conversation.xml"
+ follows="top|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ layout="topleft"
+ top="5"
+ left_pad="4"
+ name="gear_btn"
+ visible="false"
+ tool_tip="Actions on selected person"
+ width="31"/>
<button
enabled="false"
follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/menu_im_conversation.xml b/indra/newview/skins/default/xui/en/menu_im_conversation.xml
new file mode 100644
index 0000000000..8882d0a7d8
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_im_conversation.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ layout="topleft"
+ name="Conversation Gear Menu">
+ <menu_item_call
+ label="View Profile"
+ layout="topleft"
+ name="View Profile">
+ <on_click function="Avatar.GearDoToSelected" parameter="view_profile" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_view_profile" />
+ </menu_item_call>
+ <menu_item_call
+ label="Add Friend"
+ layout="topleft"
+ name="Add Friend">
+ <on_click function="Avatar.GearDoToSelected" parameter="add_friend" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_add" />
+ </menu_item_call>
+ <menu_item_call
+ label="Remove friend"
+ layout="topleft"
+ name="remove_friend">
+ <on_click function="Avatar.GearDoToSelected" parameter="remove_friend" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_delete" />
+ </menu_item_call>
+ <menu_item_call
+ label="Offer teleport"
+ layout="topleft"
+ name="offer_teleport">
+ <on_click function="Avatar.GearDoToSelected" parameter="offer_teleport"/>
+ <on_enable function="Avatar.EnableGearItem" parameter="can_offer_teleport"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Invite to group..."
+ layout="topleft"
+ name="invite_to_group">
+ <on_click function="Avatar.GearDoToSelected" parameter="invite_to_group" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_invite" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft"
+ name="View Icons Separator" />
+ <menu_item_call
+ label="Chat history..."
+ layout="topleft"
+ name="chat_history">
+ <on_click function="Avatar.GearDoToSelected" parameter="chat_history"/>
+ <on_enable function="Avatar.EnableGearItem" parameter="can_chat_history"/>
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft"/>
+ <menu_item_call
+ label="Map"
+ layout="topleft"
+ name="map">
+ <on_click function="Avatar.GearDoToSelected" parameter="map" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_show_on_map" />
+ </menu_item_call>
+ <menu_item_call
+ label="Share"
+ layout="topleft"
+ name="Share">
+ <on_click function="Avatar.GearDoToSelected" parameter="share" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_share" />
+ </menu_item_call>
+ <menu_item_call
+ label="Pay"
+ layout="topleft"
+ name="Pay">
+ <on_click function="Avatar.GearDoToSelected" parameter="pay" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_pay" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft"/>
+ <menu_item_check
+ label="Block Voice"
+ layout="topleft"
+ name="Block/Unblock">
+ <on_check function="Avatar.CheckGearItem" parameter="is_blocked" />
+ <on_click function="Avatar.GearDoToSelected" parameter="block_unblock" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_block" />
+ </menu_item_check>
+ <menu_item_check
+ label="Block Text"
+ layout="topleft"
+ name="MuteText">
+ <on_check function="Avatar.CheckGearItem" parameter="is_muted" />
+ <on_click function="Avatar.GearDoToSelected" parameter="mute_unmute" />
+ <on_enable function="Avatar.EnableGearItem" parameter="can_block" />
+ </menu_item_check>
+ <menu_item_separator
+ layout="topleft"/>
+</toggleable_menu>
+
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 3e7329c0b5..00424e97f6 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1267,7 +1267,58 @@
function="Floater.Show"
parameter="hud" />
</menu_item_call>-->
-
+ <menu_item_separator/>
+
+ <menu_item_call
+ label="User’s guide"
+ name="User’s guide">
+ <menu_item_call.on_click
+ function="Advanced.WebBrowserTest"
+ parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-User-s-Guide/ta-p/1244857"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Knowledge Base"
+ name="Knowledge Base">
+ <menu_item_call.on_click
+ function="Advanced.WebBrowserTest"
+ parameter="http://community.secondlife.com/t5/tkb/communitypage"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Wiki"
+ name="Wiki">
+ <menu_item_call.on_click
+ function="Advanced.WebBrowserTest"
+ parameter="http://wiki.secondlife.com"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Community Forums"
+ name="Community Forums">
+ <menu_item_call.on_click
+ function="Advanced.WebBrowserTest"
+ parameter="http://community.secondlife.com/t5/Forums/ct-p/Forums"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Support portal"
+ name="Support portal">
+ <menu_item_call.on_click
+ function="Advanced.WebBrowserTest"
+ parameter="https://support.secondlife.com/"/>
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call
+ label="[SECOND_LIFE] News"
+ name="Second Life News">
+ <menu_item_call.on_click
+ function="Advanced.WebBrowserTest"
+ parameter="http://community.secondlife.com/t5/Featured-News/bg-p/blog_feature_news"/>
+ </menu_item_call>
+ <menu_item_call
+ label="[SECOND_LIFE] Blogs"
+ name="Second Life Blogs">
+ <menu_item_call.on_click
+ function="Advanced.WebBrowserTest"
+ parameter="http://community.secondlife.com/t5/Blogs/ct-p/Blogs"/>
+ </menu_item_call>
<menu_item_separator/>
<menu_item_call