From 64dffe46118f9c435115edd2b714a0314242e752 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Sat, 15 Dec 2012 20:37:18 +0200 Subject: CHUI-598 : Fixed : Conversation log file created even when keep conversation log preference is off : Checked the status of the another ("KeepConversationLogTranscripts") setting too. --- indra/newview/llconversationlog.cpp | 3 ++- indra/newview/llfloaterconversationlog.cpp | 3 ++- indra/newview/llimview.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'indra') 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/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/llimview.cpp b/indra/newview/llimview.cpp index 4e2ac09dd8..cdd08ededf 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; -- cgit v1.2.3 From 56973ed9a4e3bba8529071a5e37e576f17490296 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Sat, 15 Dec 2012 17:35:24 +0200 Subject: CHUI-505 : Fixed : Don't open Call Log on login if the user doesn't want a Call Log: Checked the setting status --- indra/newview/llimview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cdd08ededf..da3d2e89bf 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2478,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("conversation"); -- cgit v1.2.3 From ed52792396c76ead787207b7a7dc3968f4352a1d Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Mon, 17 Dec 2012 15:38:03 +0200 Subject: CHUI-593 FIXED Using callback signal will update Speak button if voice chat disabled --- indra/newview/llvoiceclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') 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(); } -- cgit v1.2.3 From b4d4fc902ba4d289326c6839e8a2a3e4fb1630e9 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Mon, 17 Dec 2012 15:06:38 -0800 Subject: CHUI-115: Removing code that is ifdef'ed out. --- indra/newview/llhudobject.cpp | 2 -- indra/newview/llhudobject.h | 4 ---- indra/newview/llvoavatar.cpp | 16 ---------------- indra/newview/llvoicevisualizer.cpp | 32 -------------------------------- indra/newview/llvoicevisualizer.h | 27 --------------------------- 5 files changed, 81 deletions(-) (limited to 'indra') 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 -#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/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 #include @@ -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/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 -- cgit v1.2.3 From 1bebff84ba56b2ecfc0d24b4246fa417f12c66b6 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Mon, 17 Dec 2012 16:11:52 -0800 Subject: Removing some old code for parsing the response from changing maturity level as it is now consistent across the grid. --- indra/newview/llagent.cpp | 58 ++++++++++++----------------------------------- 1 file changed, 14 insertions(+), 44 deletions(-) (limited to 'indra') 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; -- cgit v1.2.3 From 138d4f5fcd4567c5d77230b6eadc21c246ceed59 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Mon, 17 Dec 2012 16:15:28 -0800 Subject: Updating a comment. --- indra/newview/llflexibleobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') 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< Date: Tue, 18 Dec 2012 15:09:50 +0200 Subject: CHUI-562 FIXED Gear button is added for p2p torn-off floater. --- indra/newview/llfloaterimsession.cpp | 33 ++++++++ indra/newview/llfloaterimsession.h | 3 + indra/newview/llfloaterimsessiontab.cpp | 53 +++++++++++- indra/newview/llfloaterimsessiontab.h | 5 +- .../skins/default/xui/en/floater_im_session.xml | 15 ++++ .../skins/default/xui/en/menu_im_conversation.xml | 94 ++++++++++++++++++++++ 6 files changed, 200 insertions(+), 3 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/menu_im_conversation.xml (limited to 'indra') 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 ea99a1c5bf..267dba562c 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -197,6 +197,8 @@ BOOL LLFloaterIMSessionTab::postBuild() mTearOffBtn = getChild("tear_off_btn"); mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this)); + mGearBtn = getChild("gear_btn"); + mParticipantListPanel = getChild("speakers_list_panel"); // Add a scroller for the folder (participant) view @@ -239,11 +241,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; } @@ -756,6 +758,53 @@ void LLFloaterIMSessionTab::onTearOffClicked() initRectControl(); LLFloater::onClickTearOff(this); 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("add_btn")->getRect(); + LLRect call_btn_rect = getChild("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("add_btn")->setRect(add_btn_rect); + getChild("voice_call_btn")->setRect(call_btn_rect); + } +} + +void LLFloaterIMSessionTab::initBtns() +{ + LLRect gear_btn_rect = mGearBtn->getRect(); + LLRect add_btn_rect = getChild("add_btn")->getRect(); + LLRect call_btn_rect = getChild("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("add_btn")->setRect(add_btn_rect); + getChild("voice_call_btn")->setRect(call_btn_rect); } // static diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index cd0bcd481c..b05708059a 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(); @@ -157,6 +158,8 @@ protected: LLButton* mExpandCollapseBtn; LLButton* mTearOffBtn; LLButton* mCloseBtn; + LLButton* mGearBtn; + private: // Handling selection and contextual menu 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" /> +