diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-06-21 10:21:52 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-06-21 10:21:52 -0700 |
commit | c8970618567e867b619c9fb5e225978bc5f66781 (patch) | |
tree | d5ec9d2f27d887e9a39b1109469ca405b14c6a85 /indra | |
parent | 6be9f280ff5b2e2eba3bb9c3f14d7166579d1a49 (diff) | |
parent | a069e0d3db0e0771e54768a702fa18e57415992e (diff) |
Merge with q/viewer-release
Diffstat (limited to 'indra')
511 files changed, 12943 insertions, 8795 deletions
diff --git a/indra/cmake/CARes.cmake b/indra/cmake/CARes.cmake index 8a2dc01561..1850b706ac 100644 --- a/indra/cmake/CARes.cmake +++ b/indra/cmake/CARes.cmake @@ -9,6 +9,7 @@ if (STANDALONE) include(FindCARes) else (STANDALONE) use_prebuilt_binary(ares) + add_definitions("-DCARES_STATICLIB") if (WINDOWS) set(CARES_LIBRARIES areslib) elseif (DARWIN) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index faf9da8b14..89422fbdb2 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -19,7 +19,7 @@ if(WINDOWS) set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") set(vivox_files SLVoice.exe - libsndfile-1.dll + libsndfile-1.dll vivoxplatform.dll vivoxsdk.dll ortp.dll @@ -167,6 +167,7 @@ elseif(DARWIN) libexpat.dylib libllqtwebkit.dylib libndofdev.dylib + libexception_handler.dylib ) # fmod is statically linked on darwin @@ -216,6 +217,7 @@ elseif(LINUX) libapr-1.so.0 libaprutil-1.so.0 libatk-1.0.so + libbreakpad_client.so.0 libcrypto.so.0.9.7 libdb-4.2.so libexpat.so diff --git a/indra/cmake/GoogleBreakpad.cmake b/indra/cmake/GoogleBreakpad.cmake new file mode 100644 index 0000000000..8270c0fabb --- /dev/null +++ b/indra/cmake/GoogleBreakpad.cmake @@ -0,0 +1,19 @@ +# -*- cmake -*- +include(Prebuilt) + +if (STANDALONE) + MESSAGE(FATAL_ERROR "*TODO standalone support for google breakad is unimplemented") + # *TODO - implement this include(FindGoogleBreakpad) +else (STANDALONE) + use_prebuilt_binary(google_breakpad) + if (DARWIN) + set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler) + endif (DARWIN) + if (LINUX) + set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES breakpad_client) + endif (LINUX) + if (WINDOWS) + set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler crash_generation_client common) + endif (WINDOWS) +endif (STANDALONE) + diff --git a/indra/linux_crash_logger/llcrashloggerlinux.cpp b/indra/linux_crash_logger/llcrashloggerlinux.cpp index 039b70ec4a..ce03ea0d6f 100644 --- a/indra/linux_crash_logger/llcrashloggerlinux.cpp +++ b/indra/linux_crash_logger/llcrashloggerlinux.cpp @@ -120,7 +120,6 @@ LLCrashLoggerLinux::~LLCrashLoggerLinux(void) void LLCrashLoggerLinux::gatherPlatformSpecificFiles() { - mFileMap["CrashLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log").c_str(); } bool LLCrashLoggerLinux::mainLoop() diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index b92ccd1d77..9f4c108dff 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -548,12 +548,11 @@ void LLAudioEngine::enableWind(bool enable) { if (enable && (!mEnableWind)) { - initWind(); - mEnableWind = enable; + mEnableWind = initWind(); } else if (mEnableWind && (!enable)) { - mEnableWind = enable; + mEnableWind = false; cleanupWind(); } } diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index d287104204..5876cef4ea 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -195,7 +195,7 @@ protected: virtual LLAudioBuffer *createBuffer() = 0; virtual LLAudioChannel *createChannel() = 0; - virtual void initWind() = 0; + virtual bool initWind() = 0; virtual void cleanupWind() = 0; virtual void setInternalGain(F32 gain) = 0; diff --git a/indra/llaudio/llaudioengine_fmod.cpp b/indra/llaudio/llaudioengine_fmod.cpp index d7f58defca..7a8a04afa1 100644 --- a/indra/llaudio/llaudioengine_fmod.cpp +++ b/indra/llaudio/llaudioengine_fmod.cpp @@ -54,13 +54,12 @@ extern "C" { void * F_CALLBACKAPI windCallback(void *originalbuffer, void *newbuffer, int length, void* userdata); } -FSOUND_DSPUNIT *gWindDSP = NULL; - LLAudioEngine_FMOD::LLAudioEngine_FMOD() { mInited = false; mWindGen = NULL; + mWindDSP = NULL; } @@ -258,10 +257,10 @@ void LLAudioEngine_FMOD::allocateListener(void) void LLAudioEngine_FMOD::shutdown() { - if (gWindDSP) + if (mWindDSP) { - FSOUND_DSP_SetActive(gWindDSP,false); - FSOUND_DSP_Free(gWindDSP); + FSOUND_DSP_SetActive(mWindDSP,false); + FSOUND_DSP_Free(mWindDSP); } stopInternetStream(); @@ -289,29 +288,66 @@ LLAudioChannel * LLAudioEngine_FMOD::createChannel() } -void LLAudioEngine_FMOD::initWind() +bool LLAudioEngine_FMOD::initWind() { - mWindGen = new LLWindGen<MIXBUFFERFORMAT>; + if (!mWindGen) + { + bool enable; + + switch (FSOUND_GetMixer()) + { + case FSOUND_MIXER_MMXP5: + case FSOUND_MIXER_MMXP6: + case FSOUND_MIXER_QUALITY_MMXP5: + case FSOUND_MIXER_QUALITY_MMXP6: + enable = (typeid(MIXBUFFERFORMAT) == typeid(S16)); + break; + case FSOUND_MIXER_BLENDMODE: + enable = (typeid(MIXBUFFERFORMAT) == typeid(S32)); + break; + case FSOUND_MIXER_QUALITY_FPU: + enable = (typeid(MIXBUFFERFORMAT) == typeid(F32)); + break; + default: + // FSOUND_GetMixer() does not return a valid mixer type on Darwin + LL_INFOS("AppInit") << "Unknown FMOD mixer type, assuming default" << LL_ENDL; + enable = true; + break; + } + + if (enable) + { + mWindGen = new LLWindGen<MIXBUFFERFORMAT>(FSOUND_GetOutputRate()); + } + else + { + LL_WARNS("AppInit") << "Incompatible FMOD mixer type, wind noise disabled" << LL_ENDL; + } + } + + mNextWindUpdate = 0.0; - if (!gWindDSP) + if (mWindGen && !mWindDSP) { - gWindDSP = FSOUND_DSP_Create(&windCallback, FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT + 20, mWindGen); + mWindDSP = FSOUND_DSP_Create(&windCallback, FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT + 20, mWindGen); } - if (gWindDSP) + if (mWindDSP) { - FSOUND_DSP_SetActive(gWindDSP, true); + FSOUND_DSP_SetActive(mWindDSP, true); + return true; } - mNextWindUpdate = 0.0; + + return false; } void LLAudioEngine_FMOD::cleanupWind() { - if (gWindDSP) + if (mWindDSP) { - FSOUND_DSP_SetActive(gWindDSP, false); - FSOUND_DSP_Free(gWindDSP); - gWindDSP = NULL; + FSOUND_DSP_SetActive(mWindDSP, false); + FSOUND_DSP_Free(mWindDSP); + mWindDSP = NULL; } delete mWindGen; @@ -740,30 +776,12 @@ void * F_CALLBACKAPI windCallback(void *originalbuffer, void *newbuffer, int len // originalbuffer = fmod's original mixbuffer. // newbuffer = the buffer passed from the previous DSP unit. // length = length in samples at this mix time. - // param = user parameter passed through in FSOUND_DSP_Create. - // - // modify the buffer in some fashion + // userdata = user parameter passed through in FSOUND_DSP_Create. LLWindGen<LLAudioEngine_FMOD::MIXBUFFERFORMAT> *windgen = (LLWindGen<LLAudioEngine_FMOD::MIXBUFFERFORMAT> *)userdata; - U8 stride; - -#if LL_DARWIN - stride = sizeof(LLAudioEngine_FMOD::MIXBUFFERFORMAT); -#else - int mixertype = FSOUND_GetMixer(); - if (mixertype == FSOUND_MIXER_BLENDMODE || - mixertype == FSOUND_MIXER_QUALITY_FPU) - { - stride = 4; - } - else - { - stride = 2; - } -#endif - - newbuffer = windgen->windGenerate((LLAudioEngine_FMOD::MIXBUFFERFORMAT *)newbuffer, length, stride); + + newbuffer = windgen->windGenerate((LLAudioEngine_FMOD::MIXBUFFERFORMAT *)newbuffer, length); return newbuffer; } diff --git a/indra/llaudio/llaudioengine_fmod.h b/indra/llaudio/llaudioengine_fmod.h index 3968657cba..0e386a3884 100644 --- a/indra/llaudio/llaudioengine_fmod.h +++ b/indra/llaudio/llaudioengine_fmod.h @@ -55,15 +55,15 @@ public: virtual void shutdown(); - /*virtual*/ void initWind(); + /*virtual*/ bool initWind(); /*virtual*/ void cleanupWind(); /*virtual*/void updateWind(LLVector3 direction, F32 camera_height_above_water); #if LL_DARWIN - typedef S32 MIXBUFFERFORMAT; + typedef S32 MIXBUFFERFORMAT; #else - typedef S16 MIXBUFFERFORMAT; + typedef S16 MIXBUFFERFORMAT; #endif protected: @@ -83,6 +83,7 @@ protected: void* mUserData; LLWindGen<MIXBUFFERFORMAT> *mWindGen; + FSOUND_DSPUNIT *mWindDSP; }; diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp index a5982ccbd6..887c791790 100644 --- a/indra/llaudio/llaudioengine_openal.cpp +++ b/indra/llaudio/llaudioengine_openal.cpp @@ -370,7 +370,7 @@ U32 LLAudioBufferOpenAL::getLength() // ------------ -void LLAudioEngine_OpenAL::initWind() +bool LLAudioEngine_OpenAL::initWind() { ALenum error; llinfos << "LLAudioEngine_OpenAL::initWind() start" << llendl; @@ -397,10 +397,12 @@ void LLAudioEngine_OpenAL::initWind() if(mWindBuf==NULL) { llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl; - mEnableWind=false; + return false; } llinfos << "LLAudioEngine_OpenAL::initWind() done" << llendl; + + return true; } void LLAudioEngine_OpenAL::cleanupWind() @@ -508,14 +510,14 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) alGenBuffers(1,&buffer); if((error=alGetError()) != AL_NO_ERROR) { - llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << llendl; + llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl; break; } alBufferData(buffer, AL_FORMAT_STEREO16, mWindGen->windGenerate(mWindBuf, - mWindBufSamples, 2), + mWindBufSamples), mWindBufBytes, mWindBufFreq); error = alGetError(); diff --git a/indra/llaudio/llaudioengine_openal.h b/indra/llaudio/llaudioengine_openal.h index 5aca03e195..16125b2476 100644 --- a/indra/llaudio/llaudioengine_openal.h +++ b/indra/llaudio/llaudioengine_openal.h @@ -57,23 +57,23 @@ class LLAudioEngine_OpenAL : public LLAudioEngine LLAudioBuffer* createBuffer(); LLAudioChannel* createChannel(); - /*virtual*/ void initWind(); + /*virtual*/ bool initWind(); /*virtual*/ void cleanupWind(); /*virtual*/ void updateWind(LLVector3 direction, F32 camera_altitude); private: void * windDSP(void *newbuffer, int length); - typedef S16 WIND_SAMPLE_T; - LLWindGen<WIND_SAMPLE_T> *mWindGen; - S16 *mWindBuf; - U32 mWindBufFreq; - U32 mWindBufSamples; - U32 mWindBufBytes; - ALuint mWindSource; - int mNumEmptyWindALBuffers; - - static const int MAX_NUM_WIND_BUFFERS = 80; - static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec + typedef S16 WIND_SAMPLE_T; + LLWindGen<WIND_SAMPLE_T> *mWindGen; + S16 *mWindBuf; + U32 mWindBufFreq; + U32 mWindBufSamples; + U32 mWindBufBytes; + ALuint mWindSource; + int mNumEmptyWindALBuffers; + + static const int MAX_NUM_WIND_BUFFERS = 80; + static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec }; class LLAudioChannelOpenAL : public LLAudioChannel diff --git a/indra/llaudio/llwindgen.h b/indra/llaudio/llwindgen.h index 847bfa6e9d..1908b2545f 100644 --- a/indra/llaudio/llwindgen.h +++ b/indra/llaudio/llwindgen.h @@ -33,104 +33,149 @@ #define WINDGEN_H #include "llcommon.h" -#include "llrand.h" template <class MIXBUFFERFORMAT_T> class LLWindGen { public: - LLWindGen() : + LLWindGen(const U32 sample_rate = 44100) : mTargetGain(0.f), mTargetFreq(100.f), mTargetPanGainR(0.5f), - mbuf0(0.0), - mbuf1(0.0), - mbuf2(0.0), - mbuf3(0.0), - mbuf4(0.0), - mbuf5(0.0), - mY0(0.0), - mY1(0.0), + mInputSamplingRate(sample_rate), + mSubSamples(2), + mFilterBandWidth(50.f), + mBuf0(0.0f), + mBuf1(0.0f), + mBuf2(0.0f), + mY0(0.0f), + mY1(0.0f), mCurrentGain(0.f), mCurrentFreq(100.f), - mCurrentPanGainR(0.5f) {}; - - static const U32 getInputSamplingRate() {return mInputSamplingRate;} + mCurrentPanGainR(0.5f) + { + mSamplePeriod = (F32)mSubSamples / (F32)mInputSamplingRate; + mB2 = expf(-F_TWO_PI * mFilterBandWidth * mSamplePeriod); + } + const U32 getInputSamplingRate() { return mInputSamplingRate; } + // newbuffer = the buffer passed from the previous DSP unit. // numsamples = length in samples-per-channel at this mix time. - // stride = number of bytes between start of each sample. // NOTE: generates L/R interleaved stereo - MIXBUFFERFORMAT_T* windGenerate(MIXBUFFERFORMAT_T *newbuffer, int numsamples, int stride) + MIXBUFFERFORMAT_T* windGenerate(MIXBUFFERFORMAT_T *newbuffer, int numsamples) { - U8 *cursamplep = (U8*)newbuffer; + MIXBUFFERFORMAT_T *cursamplep = newbuffer; + + // Filter coefficients + F32 a0 = 0.0f, b1 = 0.0f; - double bandwidth = 50.0F; - double a0,b1,b2; + // No need to clip at normal volumes + bool clip = mCurrentGain > 2.0f; - // calculate resonant filter coeffs - b2 = exp(-(F_TWO_PI) * (bandwidth / mInputSamplingRate)); + bool interp_freq = false; - while (numsamples--) + //if the frequency isn't changing much, we don't need to interpolate in the inner loop + if (llabs(mTargetFreq - mCurrentFreq) < (mCurrentFreq * 0.112)) { - mCurrentFreq = (float)((0.999 * mCurrentFreq) + (0.001 * mTargetFreq)); - mCurrentGain = (float)((0.999 * mCurrentGain) + (0.001 * mTargetGain)); - mCurrentPanGainR = (float)((0.999 * mCurrentPanGainR) + (0.001 * mTargetPanGainR)); - b1 = (-4.0 * b2) / (1.0 + b2) * cos(F_TWO_PI * (mCurrentFreq / mInputSamplingRate)); - a0 = (1.0 - b2) * sqrt(1.0 - (b1 * b1) / (4.0 * b2)); - double nextSample; + // calculate resonant filter coefficients + mCurrentFreq = mTargetFreq; + b1 = (-4.0f * mB2) / (1.0f + mB2) * cosf(F_TWO_PI * (mCurrentFreq * mSamplePeriod)); + a0 = (1.0f - mB2) * sqrtf(1.0f - (b1 * b1) / (4.0f * mB2)); + } + else + { + interp_freq = true; + } + + while (numsamples) + { + F32 next_sample; + + // Start with white noise + // This expression is fragile, rearrange it and it will break! + next_sample = (F32)rand() * (1.0f / (F32)(RAND_MAX / (U16_MAX / 8))) + (F32)(S16_MIN / 8); - // start with white noise - nextSample = ll_frand(2.0f) - 1.0f; + // Apply a pinking filter + // Magic numbers taken from PKE method at http://www.firstpr.com.au/dsp/pink-noise/ + mBuf0 = mBuf0 * 0.99765f + next_sample * 0.0990460f; + mBuf1 = mBuf1 * 0.96300f + next_sample * 0.2965164f; + mBuf2 = mBuf2 * 0.57000f + next_sample * 1.0526913f; - // apply pinking filter - mbuf0 = 0.997f * mbuf0 + 0.0126502f * nextSample; - mbuf1 = 0.985f * mbuf1 + 0.0139083f * nextSample; - mbuf2 = 0.950f * mbuf2 + 0.0205439f * nextSample; - mbuf3 = 0.850f * mbuf3 + 0.0387225f * nextSample; - mbuf4 = 0.620f * mbuf4 + 0.0465932f * nextSample; - mbuf5 = 0.250f * mbuf5 + 0.1093477f * nextSample; + next_sample = mBuf0 + mBuf1 + mBuf2 + next_sample * 0.1848f; - nextSample = mbuf0 + mbuf1 + mbuf2 + mbuf3 + mbuf4 + mbuf5; + if (interp_freq) + { + // calculate and interpolate resonant filter coefficients + mCurrentFreq = (0.999f * mCurrentFreq) + (0.001f * mTargetFreq); + b1 = (-4.0f * mB2) / (1.0f + mB2) * cosf(F_TWO_PI * (mCurrentFreq * mSamplePeriod)); + a0 = (1.0f - mB2) * sqrtf(1.0f - (b1 * b1) / (4.0f * mB2)); + } - // do a resonant filter on the noise - nextSample = (double)( a0 * nextSample - b1 * mY0 - b2 * mY1 ); + // Apply a resonant low-pass filter on the pink noise + next_sample = a0 * next_sample - b1 * mY0 - mB2 * mY1; mY1 = mY0; - mY0 = nextSample; + mY0 = next_sample; - nextSample *= mCurrentGain; + mCurrentGain = (0.999f * mCurrentGain) + (0.001f * mTargetGain); + mCurrentPanGainR = (0.999f * mCurrentPanGainR) + (0.001f * mTargetPanGainR); - MIXBUFFERFORMAT_T sample; + // For a 3dB pan law use: + // next_sample *= mCurrentGain * ((mCurrentPanGainR*(mCurrentPanGainR-1)*1.652+1.413); + next_sample *= mCurrentGain; - sample = llfloor(((F32)nextSample*32768.f*(1.0f - mCurrentPanGainR))+0.5f); - *(MIXBUFFERFORMAT_T*)cursamplep = llclamp(sample, (MIXBUFFERFORMAT_T)-32768, (MIXBUFFERFORMAT_T)32767); - cursamplep += stride; - - sample = llfloor(((F32)nextSample*32768.f*mCurrentPanGainR)+0.5f); - *(MIXBUFFERFORMAT_T*)cursamplep = llclamp(sample, (MIXBUFFERFORMAT_T)-32768, (MIXBUFFERFORMAT_T)32767); - cursamplep += stride; + // delta is used to interpolate between synthesized samples + F32 delta = (next_sample - mLastSample) / (F32)mSubSamples; + + // Fill the audio buffer, clipping if necessary + for (U8 i=mSubSamples; i && numsamples; --i, --numsamples) + { + mLastSample = mLastSample + delta; + S32 sample_right = (S32)(mLastSample * mCurrentPanGainR); + S32 sample_left = (S32)mLastSample - sample_right; + + if (!clip) + { + *cursamplep = (MIXBUFFERFORMAT_T)sample_left; + ++cursamplep; + *cursamplep = (MIXBUFFERFORMAT_T)sample_right; + ++cursamplep; + } + else + { + *cursamplep = (MIXBUFFERFORMAT_T)llclamp(sample_left, (S32)S16_MIN, (S32)S16_MAX); + ++cursamplep; + *cursamplep = (MIXBUFFERFORMAT_T)llclamp(sample_right, (S32)S16_MIN, (S32)S16_MAX); + ++cursamplep; + } + } } return newbuffer; } - + +public: F32 mTargetGain; F32 mTargetFreq; F32 mTargetPanGainR; - + private: - static const U32 mInputSamplingRate = 44100; - F64 mbuf0; - F64 mbuf1; - F64 mbuf2; - F64 mbuf3; - F64 mbuf4; - F64 mbuf5; - F64 mY0; - F64 mY1; + U32 mInputSamplingRate; + U8 mSubSamples; + F32 mSamplePeriod; + F32 mFilterBandWidth; + F32 mB2; + + F32 mBuf0; + F32 mBuf1; + F32 mBuf2; + F32 mY0; + F32 mY1; + F32 mCurrentGain; F32 mCurrentFreq; F32 mCurrentPanGainR; + F32 mLastSample; }; #endif diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index f814618fc1..0587e5642c 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -44,32 +44,31 @@ //----------------------------------------------------------------------------- // Macros //----------------------------------------------------------------------------- -const F32 MAX_WALK_PLAYBACK_SPEED = 8.f; // max m/s for which we adjust walk cycle speed - -const F32 MIN_WALK_SPEED = 0.1f; // minimum speed at which we use velocity for down foot detection -const F32 MAX_TIME_DELTA = 2.f; //max two seconds a frame for calculating interpolation -F32 SPEED_ADJUST_MAX = 2.5f; // maximum adjustment of walk animation playback speed -F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second -F32 ANIM_SPEED_MAX = 10.0f; // absolute upper limit on animation speed -F32 ANIM_SPEED_MIN = 0.0f; // absolute lower limit on animation speed -const F32 DRIFT_COMP_MAX_TOTAL = 0.07f;//0.55f; // maximum drift compensation overall, in any direction -const F32 DRIFT_COMP_MAX_SPEED = 4.f; // speed at which drift compensation total maxes out +const F32 MAX_WALK_PLAYBACK_SPEED = 8.f; // max m/s for which we adjust walk cycle speed + +const F32 MIN_WALK_SPEED = 0.1f; // minimum speed at which we use velocity for down foot detection +const F32 TIME_EPSILON = 0.001f; // minumum frame time +const F32 MAX_TIME_DELTA = 2.f; // max two seconds a frame for calculating interpolation +F32 SPEED_ADJUST_MAX_SEC = 2.f; // maximum adjustment to walk animation playback speed for a second +F32 ANIM_SPEED_MAX = 1.5f; // absolute upper limit on animation speed +const F32 DRIFT_COMP_MAX_TOTAL = 0.1f; // maximum drift compensation overall, in any direction +const F32 DRIFT_COMP_MAX_SPEED = 4.f; // speed at which drift compensation total maxes out const F32 MAX_ROLL = 0.6f; +const F32 PELVIS_COMPENSATION_WIEGHT = 0.7f; // proportion of foot drift that is compensated by moving the avatar directly +const F32 SPEED_ADJUST_TIME_CONSTANT = 0.1f; // time constant for speed adjustment interpolation //----------------------------------------------------------------------------- // LLKeyframeWalkMotion() // Class Constructor //----------------------------------------------------------------------------- LLKeyframeWalkMotion::LLKeyframeWalkMotion(const LLUUID &id) - : LLKeyframeMotion(id), - +: LLKeyframeMotion(id), mCharacter(NULL), mCyclePhase(0.0f), mRealTimeLast(0.0f), mAdjTimeLast(0.0f), mDownFoot(0) -{ -} +{} //----------------------------------------------------------------------------- @@ -77,8 +76,7 @@ LLKeyframeWalkMotion::LLKeyframeWalkMotion(const LLUUID &id) // Class Destructor //----------------------------------------------------------------------------- LLKeyframeWalkMotion::~LLKeyframeWalkMotion() -{ -} +{} //----------------------------------------------------------------------------- @@ -149,15 +147,12 @@ BOOL LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask) LLWalkAdjustMotion::LLWalkAdjustMotion(const LLUUID &id) : LLMotion(id), mLastTime(0.f), - mAvgCorrection(0.f), - mSpeedAdjust(0.f), mAnimSpeed(0.f), - mAvgSpeed(0.f), + mAdjustedSpeed(0.f), mRelativeDir(0.f), mAnkleOffset(0.f) { mName = "walk_adjust"; - mPelvisState = new LLJointState; } @@ -189,15 +184,16 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara //----------------------------------------------------------------------------- BOOL LLWalkAdjustMotion::onActivate() { - mAvgCorrection = 0.f; - mSpeedAdjust = 0.f; mAnimSpeed = 0.f; - mAvgSpeed = 0.f; + mAdjustedSpeed = 0.f; mRelativeDir = 1.f; mPelvisState->setPosition(LLVector3::zero); // store ankle positions for next frame - mLastLeftAnklePos = mCharacter->getPosGlobalFromAgent(mLeftAnkleJoint->getWorldPosition()); - mLastRightAnklePos = mCharacter->getPosGlobalFromAgent(mRightAnkleJoint->getWorldPosition()); + mLastLeftFootGlobalPos = mCharacter->getPosGlobalFromAgent(mLeftAnkleJoint->getWorldPosition()); + mLastLeftFootGlobalPos.mdV[VZ] = 0.0; + + mLastRightFootGlobalPos = mCharacter->getPosGlobalFromAgent(mRightAnkleJoint->getWorldPosition()); + mLastRightFootGlobalPos.mdV[VZ] = 0.0; F32 leftAnkleOffset = (mLeftAnkleJoint->getWorldPosition() - mCharacter->getCharacterPosition()).magVec(); F32 rightAnkleOffset = (mRightAnkleJoint->getWorldPosition() - mCharacter->getCharacterPosition()).magVec(); @@ -211,164 +207,120 @@ BOOL LLWalkAdjustMotion::onActivate() //----------------------------------------------------------------------------- BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) { - LLVector3 footCorrection; - LLVector3 vel = mCharacter->getCharacterVelocity() * mCharacter->getTimeDilation(); - F32 deltaTime = llclamp(time - mLastTime, 0.f, MAX_TIME_DELTA); + // delta_time is guaranteed to be non zero + F32 delta_time = llclamp(time - mLastTime, TIME_EPSILON, MAX_TIME_DELTA); mLastTime = time; - LLQuaternion inv_rotation = ~mPelvisJoint->getWorldRotation(); + // find the avatar motion vector in the XY plane + LLVector3 avatar_velocity = mCharacter->getCharacterVelocity() * mCharacter->getTimeDilation(); + avatar_velocity.mV[VZ] = 0.f; - // get speed and normalize velocity vector - LLVector3 ang_vel = mCharacter->getCharacterAngularVelocity() * mCharacter->getTimeDilation(); - F32 speed = llmin(vel.normVec(), MAX_WALK_PLAYBACK_SPEED); - mAvgSpeed = lerp(mAvgSpeed, speed, LLCriticalDamp::getInterpolant(0.2f)); + F32 speed = llclamp(avatar_velocity.magVec(), 0.f, MAX_WALK_PLAYBACK_SPEED); - // calculate facing vector in pelvis-local space - // (either straight forward or back, depending on velocity) - LLVector3 localVel = vel * inv_rotation; - if (localVel.mV[VX] > 0.f) - { - mRelativeDir = 1.f; - } - else if (localVel.mV[VX] < 0.f) - { - mRelativeDir = -1.f; - } + // grab avatar->world transforms + LLQuaternion avatar_to_world_rot = mCharacter->getRootJoint()->getWorldRotation(); - // calculate world-space foot drift - LLVector3 leftFootDelta; - LLVector3 leftFootWorldPosition = mLeftAnkleJoint->getWorldPosition(); - LLVector3d leftFootGlobalPosition = mCharacter->getPosGlobalFromAgent(leftFootWorldPosition); - leftFootDelta.setVec(mLastLeftAnklePos - leftFootGlobalPosition); - mLastLeftAnklePos = leftFootGlobalPosition; + LLQuaternion world_to_avatar_rot(avatar_to_world_rot); + world_to_avatar_rot.conjugate(); - LLVector3 rightFootDelta; - LLVector3 rightFootWorldPosition = mRightAnkleJoint->getWorldPosition(); - LLVector3d rightFootGlobalPosition = mCharacter->getPosGlobalFromAgent(rightFootWorldPosition); - rightFootDelta.setVec(mLastRightAnklePos - rightFootGlobalPosition); - mLastRightAnklePos = rightFootGlobalPosition; + LLVector3 foot_slip_vector; // find foot drift along velocity vector - if (mAvgSpeed > 0.1) - { - // walking/running - F32 leftFootDriftAmt = leftFootDelta * vel; - F32 rightFootDriftAmt = rightFootDelta * vel; - - if (rightFootDriftAmt > leftFootDriftAmt) - { - footCorrection = rightFootDelta; - } else - { - footCorrection = leftFootDelta; - } - } - else - { - mAvgSpeed = ang_vel.magVec() * mAnkleOffset; - mRelativeDir = 1.f; - - // standing/turning - // find the lower foot - if (leftFootWorldPosition.mV[VZ] < rightFootWorldPosition.mV[VZ]) - { - // pivot on left foot - footCorrection = leftFootDelta; - } + if (speed > MIN_WALK_SPEED) + { // walking/running + + // calculate world-space foot drift + // use global coordinates to seamlessly handle region crossings + LLVector3d leftFootGlobalPosition = mCharacter->getPosGlobalFromAgent(mLeftAnkleJoint->getWorldPosition()); + leftFootGlobalPosition.mdV[VZ] = 0.0; + LLVector3 leftFootDelta(leftFootGlobalPosition - mLastLeftFootGlobalPos); + mLastLeftFootGlobalPos = leftFootGlobalPosition; + + LLVector3d rightFootGlobalPosition = mCharacter->getPosGlobalFromAgent(mRightAnkleJoint->getWorldPosition()); + rightFootGlobalPosition.mdV[VZ] = 0.0; + LLVector3 rightFootDelta(rightFootGlobalPosition - mLastRightFootGlobalPos); + mLastRightFootGlobalPos = rightFootGlobalPosition; + + // get foot drift along avatar direction of motion + F32 left_foot_slip_amt = leftFootDelta * avatar_velocity; + F32 right_foot_slip_amt = rightFootDelta * avatar_velocity; + + // if right foot is pushing back faster than left foot... + if (right_foot_slip_amt < left_foot_slip_amt) + { //...use it to calculate optimal animation speed + foot_slip_vector = rightFootDelta; + } else - { - // pivot on right foot - footCorrection = rightFootDelta; + { // otherwise use the left foot + foot_slip_vector = leftFootDelta; } - } - // rotate into avatar coordinates - footCorrection = footCorrection * inv_rotation; + // calculate ideal pelvis offset so that foot is glued to ground and damp towards it + // this will soak up transient slippage + // + // FIXME: this interacts poorly with speed adjustment + // mPelvisOffset compensates for foot drift by moving the avatar pelvis in the opposite + // direction of the drift, up to a certain limited distance + // but this will cause the animation playback rate calculation below to + // kick in too slowly and sometimes start playing the animation in reverse. - // calculate ideal pelvis offset so that foot is glued to ground and damp towards it - // the amount of foot slippage this frame + the offset applied last frame - mPelvisOffset = mPelvisState->getPosition() + lerp(LLVector3::zero, footCorrection, LLCriticalDamp::getInterpolant(0.2f)); + //mPelvisOffset -= PELVIS_COMPENSATION_WIEGHT * (foot_slip_vector * world_to_avatar_rot);//lerp(LLVector3::zero, -1.f * (foot_slip_vector * world_to_avatar_rot), LLCriticalDamp::getInterpolant(0.1f)); - // pelvis drift (along walk direction) - mAvgCorrection = lerp(mAvgCorrection, footCorrection.mV[VX] * mRelativeDir, LLCriticalDamp::getInterpolant(0.1f)); + ////F32 drift_comp_max = DRIFT_COMP_MAX_TOTAL * (llclamp(speed, 0.f, DRIFT_COMP_MAX_SPEED) / DRIFT_COMP_MAX_SPEED); + //F32 drift_comp_max = DRIFT_COMP_MAX_TOTAL; - // calculate average velocity of foot slippage - F32 footSlipVelocity = (deltaTime != 0.f) ? (-mAvgCorrection / deltaTime) : 0.f; + //// clamp pelvis offset to a 90 degree arc behind the nominal position + //// NB: this is an ADDITIVE amount that is accumulated every frame, so clamping it alone won't do the trick + //// must clamp with absolute position of pelvis in mind + //LLVector3 currentPelvisPos = mPelvisState->getJoint()->getPosition(); + //mPelvisOffset.mV[VX] = llclamp( mPelvisOffset.mV[VX], -drift_comp_max, drift_comp_max ); + //mPelvisOffset.mV[VY] = llclamp( mPelvisOffset.mV[VY], -drift_comp_max, drift_comp_max ); + //mPelvisOffset.mV[VZ] = 0.f; + // + //mLastRightFootGlobalPos += LLVector3d(mPelvisOffset * avatar_to_world_rot); + //mLastLeftFootGlobalPos += LLVector3d(mPelvisOffset * avatar_to_world_rot); - F32 newSpeedAdjust = 0.f; - - // modulate speed by dot products of facing and velocity - // so that if we are moving sideways, we slow down the animation - // and if we're moving backward, we walk backward + //foot_slip_vector -= mPelvisOffset; - F32 directional_factor = localVel.mV[VX] * mRelativeDir; + LLVector3 avatar_movement_dir = avatar_velocity; + avatar_movement_dir.normalize(); - if (speed > 0.1f) - { - // calculate ratio of desired foot velocity to detected foot velocity - newSpeedAdjust = llclamp(footSlipVelocity - mAvgSpeed * (1.f - directional_factor), - -SPEED_ADJUST_MAX, SPEED_ADJUST_MAX); - newSpeedAdjust = lerp(mSpeedAdjust, newSpeedAdjust, LLCriticalDamp::getInterpolant(0.2f)); + // planted foot speed is avatar velocity - foot slip amount along avatar movement direction + F32 foot_speed = speed - ((foot_slip_vector * avatar_movement_dir) / delta_time); - F32 speedDelta = newSpeedAdjust - mSpeedAdjust; - speedDelta = llclamp(speedDelta, -SPEED_ADJUST_MAX_SEC * deltaTime, SPEED_ADJUST_MAX_SEC * deltaTime); + // multiply animation playback rate so that foot speed matches avatar speed + F32 desired_speed_multiplier = llclamp(speed / foot_speed, 0.f, ANIM_SPEED_MAX); - mSpeedAdjust = mSpeedAdjust + speedDelta; - } - else - { - mSpeedAdjust = lerp(mSpeedAdjust, 0.f, LLCriticalDamp::getInterpolant(0.2f)); - } + // blend towards new speed adjustment value + F32 new_speed_adjust = lerp(mAdjustedSpeed, desired_speed_multiplier, LLCriticalDamp::getInterpolant(SPEED_ADJUST_TIME_CONSTANT)); - mAnimSpeed = (mAvgSpeed + mSpeedAdjust) * mRelativeDir; - if (mAnimSpeed>0) - { - mAnimSpeed = llclamp(mAnimSpeed, ANIM_SPEED_MIN, ANIM_SPEED_MAX); + // limit that rate at which the speed adjustment changes + F32 speedDelta = llclamp(new_speed_adjust - mAdjustedSpeed, -SPEED_ADJUST_MAX_SEC * delta_time, SPEED_ADJUST_MAX_SEC * delta_time); + mAdjustedSpeed += speedDelta; + + // modulate speed by dot products of facing and velocity + // so that if we are moving sideways, we slow down the animation + // and if we're moving backward, we walk backward + // do this at the end to be more responsive to direction changes instead of in the above speed calculations + F32 directional_factor = (avatar_movement_dir * world_to_avatar_rot).mV[VX]; + + mAnimSpeed = mAdjustedSpeed * directional_factor; } else - { - mAnimSpeed = llclamp(mAnimSpeed, -ANIM_SPEED_MAX, -ANIM_SPEED_MIN); - } -// char debug_text[64]; -// sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Speed: %.2f", mAvgSpeed); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); -// mCharacter->addDebugText(debug_text); - mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); - if (mCharacter->getMotionController().mIsSelf) - { -// F32 elapsed = mCharacter->getMotionController().getFrameTimer().getElapsedTimeF32(); -// llinfos << "PLOT elapsed: " << elapsed -// << " footSlipVelocity: " << footSlipVelocity -// << " mAvgCorrection: " << mAvgCorrection -// << " mAvgSpeed: " << mAvgSpeed -// << " mAnimSpeed: " << mAnimSpeed -// << " ANIM_SPEED_MAX: " << ANIM_SPEED_MAX -// << " ANIM_SPEED_MIN: " << ANIM_SPEED_MIN -// << llendl; - } - - // clamp pelvis offset to a 90 degree arc behind the nominal position - F32 drift_comp_max = llclamp(speed, 0.f, DRIFT_COMP_MAX_SPEED) / DRIFT_COMP_MAX_SPEED; - drift_comp_max *= DRIFT_COMP_MAX_TOTAL; + { // standing/turning - LLVector3 currentPelvisPos = mPelvisState->getJoint()->getPosition(); + // damp out speed adjustment to 0 + mAnimSpeed = lerp(mAnimSpeed, 1.f, LLCriticalDamp::getInterpolant(0.2f)); + //mPelvisOffset = lerp(mPelvisOffset, LLVector3::zero, LLCriticalDamp::getInterpolant(0.2f)); + } - // NB: this is an ADDITIVE amount that is accumulated every frame, so clamping it alone won't do the trick - // must clamp with absolute position of pelvis in mind - mPelvisOffset.mV[VX] = llclamp( mPelvisOffset.mV[VX], -drift_comp_max - currentPelvisPos.mV[VX], drift_comp_max - currentPelvisPos.mV[VX] ); - mPelvisOffset.mV[VY] = llclamp( mPelvisOffset.mV[VY], -drift_comp_max - currentPelvisPos.mV[VY], drift_comp_max - currentPelvisPos.mV[VY]); - mPelvisOffset.mV[VZ] = 0.f; + // broadcast walk speed change + mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); // set position + // need to update *some* joint to keep this animation active mPelvisState->setPosition(mPelvisOffset); - mCharacter->setAnimationData("Pelvis Offset", &mPelvisOffset); - return TRUE; } @@ -438,14 +390,8 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) // roll is critically damped interpolation between current roll and angular velocity-derived target roll mRoll = lerp(mRoll, target_roll, LLCriticalDamp::getInterpolant(0.1f)); -// llinfos << mRoll << llendl; - LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); -// F32 lerp_amt = LLCriticalDamp::getInterpolant(0.2f); -// -// LLVector3 pelvis_correction = mPelvisState->getPosition() - lerp(LLVector3::zero, mPelvisState->getJoint()->getPosition() + mPelvisState->getPosition(), lerp_amt); -// mPelvisState->setPosition(pelvis_correction); return TRUE; } diff --git a/indra/llcharacter/llkeyframewalkmotion.h b/indra/llcharacter/llkeyframewalkmotion.h index 90dd4dbcac..b507e9423a 100644 --- a/indra/llcharacter/llkeyframewalkmotion.h +++ b/indra/llcharacter/llkeyframewalkmotion.h @@ -126,13 +126,11 @@ public: LLJoint* mRightAnkleJoint; LLPointer<LLJointState> mPelvisState; LLJoint* mPelvisJoint; - LLVector3d mLastLeftAnklePos; - LLVector3d mLastRightAnklePos; + LLVector3d mLastLeftFootGlobalPos; + LLVector3d mLastRightFootGlobalPos; F32 mLastTime; - F32 mAvgCorrection; - F32 mSpeedAdjust; + F32 mAdjustedSpeed; F32 mAnimSpeed; - F32 mAvgSpeed; F32 mRelativeDir; LLVector3 mPelvisOffset; F32 mAnkleOffset; diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp index 05d1bc0cd9..ee60430d97 100644 --- a/indra/llcharacter/llmultigesture.cpp +++ b/indra/llcharacter/llmultigesture.cpp @@ -498,6 +498,10 @@ std::vector<std::string> LLGestureStepWait::getLabel() const strings.push_back("until animations are done"); // label += "until animations are done"; } + else + { + strings.push_back(""); + } return strings; } diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 60e88a1cfb..77740fb8bf 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -9,6 +9,7 @@ include(Linking) include(Boost) include(Pth) include(LLSharedLibs) +include(GoogleBreakpad) include(GooglePerfTools) include(Copy3rdPartyLibs) @@ -234,7 +235,6 @@ set(llcommon_HEADER_FILES metaclasst.h metaproperty.h metapropertyt.h - processor.h reflective.h reflectivet.h roles_constants.h @@ -261,6 +261,7 @@ endif(LLCOMMON_LINK_SHARED) target_link_libraries( llcommon + ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES} ${APRUTIL_LIBRARIES} ${APR_LIBRARIES} ${EXPAT_LIBRARIES} @@ -292,6 +293,7 @@ if (LL_TESTS) LL_ADD_INTEGRATION_TEST(llframetimer "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llinstancetracker "" "${test_libs}") LL_ADD_INTEGRATION_TEST(lllazy "" "${test_libs}") + LL_ADD_INTEGRATION_TEST(llprocessor "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llrand "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}") diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 6b2d1b7c20..0447ca93f5 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -30,6 +30,14 @@ * $/LicenseInfo$ */ +#include <cstdlib> + +#ifdef LL_DARWIN +#include <sys/types.h> +#include <unistd.h> +#include <sys/sysctl.h> +#endif + #include "linden_common.h" #include "llapp.h" @@ -41,8 +49,11 @@ #include "lllivefile.h" #include "llmemory.h" #include "llstl.h" // for DeletePointer() +#include "llstring.h" #include "lleventtimer.h" +#include "google_breakpad/exception_handler.h" + // // Signal handling // @@ -51,11 +62,22 @@ #if LL_WINDOWS LONG WINAPI default_windows_exception_handler(struct _EXCEPTION_POINTERS *exception_infop); BOOL ConsoleCtrlHandler(DWORD fdwCtrlType); +bool windows_post_minidump_callback(const wchar_t* dump_path, + const wchar_t* minidump_id, + void* context, + EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion, + bool succeeded); #else # include <signal.h> # include <unistd.h> // for fork() void setup_signals(); void default_unix_signal_handler(int signum, siginfo_t *info, void *); + +// Called by breakpad exception handler after the minidump has been generated. +bool unix_post_minidump_callback(const char *dump_dir, + const char *minidump_id, + void *context, bool succeeded); # if LL_DARWIN /* OSX doesn't support SIGRT* */ S32 LL_SMACKDOWN_SIGNAL = SIGUSR1; @@ -81,7 +103,6 @@ BOOL LLApp::sLogInSignal = FALSE; // static LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status LLAppErrorHandler LLApp::sErrorHandler = NULL; -LLAppErrorHandler LLApp::sSyncErrorHandler = NULL; BOOL LLApp::sErrorThreadRunning = FALSE; #if !LL_WINDOWS LLApp::child_map LLApp::sChildMap; @@ -123,7 +144,12 @@ void LLApp::commonCtor() // Set the application to this instance. sApplication = this; - + + mExceptionHandler = 0; + + // initialize the buffer to write the minidump filename to + // (this is used to avoid allocating memory in the crash handler) + memset(minidump_path, 0, MAX_MINDUMP_PATH_LENGTH); } LLApp::LLApp(LLErrorThread *error_thread) : @@ -152,6 +178,8 @@ LLApp::~LLApp() delete mThreadErrorp; mThreadErrorp = NULL; } + + if(mExceptionHandler != 0) delete mExceptionHandler; LLCommon::cleanupClass(); } @@ -262,19 +290,18 @@ void LLApp::setupErrorHandling() // occasionally checks to see if the app is in an error state, and sees if it needs to be run. #if LL_WINDOWS - // Windows doesn't have the same signal handling mechanisms as UNIX, thus APR doesn't provide - // a signal handling thread implementation. - // What we do is install an unhandled exception handler, which will try to do the right thing - // in the case of an error (generate a minidump) - - // Disable this until the viewer gets ported so server crashes can be JIT debugged. - //LPTOP_LEVEL_EXCEPTION_FILTER prev_filter; - //prev_filter = SetUnhandledExceptionFilter(default_windows_exception_handler); - // This sets a callback to handle w32 signals to the console window. // The viewer shouldn't be affected, sicne its a windowed app. SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ConsoleCtrlHandler, TRUE); + // Install the Google Breakpad crash handler for Windows + if(mExceptionHandler == 0) + { + llwarns << "adding breakpad exception handler" << llendl; + mExceptionHandler = new google_breakpad::ExceptionHandler( + L"C:\\Temp\\", 0, windows_post_minidump_callback, 0, google_breakpad::ExceptionHandler::HANDLER_ALL); + } + #else // // Start up signal handling. @@ -282,9 +309,49 @@ void LLApp::setupErrorHandling() // There are two different classes of signals. Synchronous signals are delivered to a specific // thread, asynchronous signals can be delivered to any thread (in theory) // - setup_signals(); - + + // Add google breakpad exception handler configured for Darwin/Linux. + bool installHandler = true; +#ifdef LL_DARWIN + // For the special case of Darwin, we do not want to install the handler if + // the process is being debugged as the app will exit with value ABRT (6) if + // we do. Unfortunately, the code below which performs that test relies on + // the structure kinfo_proc which has been tagged by apple as an unstable + // API. We disable this test for shipping versions to avoid conflicts with + // future releases of Darwin. This test is really only needed for developers + // starting the app from a debugger anyway. + #ifndef LL_RELEASE_FOR_DOWNLOAD + int mib[4]; + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_PID; + mib[3] = getpid(); + + struct kinfo_proc info; + memset(&info, 0, sizeof(info)); + + size_t size = sizeof(info); + int result = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0); + if((result == 0) || (errno == ENOMEM)) + { + // P_TRACED flag is set, so this process is being debugged; do not install + // the handler + if(info.kp_proc.p_flag & P_TRACED) installHandler = false; + } + else + { + // Failed to discover if the process is being debugged; default to + // installing the handler. + installHandler = true; + } + #endif +#endif + if(installHandler && (mExceptionHandler == 0)) + { + std::string dumpPath = "/tmp/"; + mExceptionHandler = new google_breakpad::ExceptionHandler(dumpPath, 0, &unix_post_minidump_callback, 0, true); + } #endif startErrorThread(); @@ -310,21 +377,6 @@ void LLApp::setErrorHandler(LLAppErrorHandler handler) LLApp::sErrorHandler = handler; } - -void LLApp::setSyncErrorHandler(LLAppErrorHandler handler) -{ - LLApp::sSyncErrorHandler = handler; -} - -// static -void LLApp::runSyncErrorHandler() -{ - if (LLApp::sSyncErrorHandler) - { - LLApp::sSyncErrorHandler(); - } -} - // static void LLApp::runErrorHandler() { @@ -337,7 +389,6 @@ void LLApp::runErrorHandler() LLApp::setStopped(); } - // static void LLApp::setStatus(EAppStatus status) { @@ -348,15 +399,27 @@ void LLApp::setStatus(EAppStatus status) // static void LLApp::setError() { - if (!isError()) - { - // perform any needed synchronous error-handling - runSyncErrorHandler(); - // set app status to ERROR so that the LLErrorThread notices - setStatus(APP_STATUS_ERROR); - } + // set app status to ERROR so that the LLErrorThread notices + setStatus(APP_STATUS_ERROR); } +void LLApp::setMiniDumpDir(const std::string &path) +{ + if(mExceptionHandler == 0) return; +#ifdef LL_WINDOWS + wchar_t buffer[MAX_MINDUMP_PATH_LENGTH]; + mbstowcs(buffer, path.c_str(), MAX_MINDUMP_PATH_LENGTH); + mExceptionHandler->set_dump_path(std::wstring(buffer)); +#else + mExceptionHandler->set_dump_path(path); +#endif +} + +void LLApp::writeMiniDump() +{ + if(mExceptionHandler == 0) return; + mExceptionHandler->WriteMinidump(); +} // static void LLApp::setQuitting() @@ -587,6 +650,7 @@ void setup_signals() // Asynchronous signals that result in core sigaction(SIGQUIT, &act, NULL); + } void clear_signals() @@ -765,4 +829,97 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) } } +bool unix_post_minidump_callback(const char *dump_dir, + const char *minidump_id, + void *context, bool succeeded) +{ + // Copy minidump file path into fixed buffer in the app instance to avoid + // heap allocations in a crash handler. + + // path format: <dump_dir>/<minidump_id>.dmp + int dirPathLength = strlen(dump_dir); + int idLength = strlen(minidump_id); + + // The path must not be truncated. + llassert((dirPathLength + idLength + 5) <= LLApp::MAX_MINDUMP_PATH_LENGTH); + + char * path = LLApp::instance()->getMiniDumpFilename(); + S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH; + strncpy(path, dump_dir, remaining); + remaining -= dirPathLength; + path += dirPathLength; + if (remaining > 0 && dirPathLength > 0 && path[-1] != '/') + { + *path++ = '/'; + --remaining; + } + if (remaining > 0) + { + strncpy(path, minidump_id, remaining); + remaining -= idLength; + path += idLength; + strncpy(path, ".dmp", remaining); + } + + llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; + LLApp::runErrorHandler(); + return true; +} #endif // !WINDOWS + +#ifdef LL_WINDOWS +bool windows_post_minidump_callback(const wchar_t* dump_path, + const wchar_t* minidump_id, + void* context, + EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion, + bool succeeded) +{ + char * path = LLApp::instance()->getMiniDumpFilename(); + S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH; + size_t bytesUsed; + + bytesUsed = wcstombs(path, dump_path, static_cast<size_t>(remaining)); + remaining -= bytesUsed; + path += bytesUsed; + if(remaining > 0 && bytesUsed > 0 && path[-1] != '\\') + { + *path++ = '\\'; + --remaining; + } + if(remaining > 0) + { + bytesUsed = wcstombs(path, minidump_id, static_cast<size_t>(remaining)); + remaining -= bytesUsed; + path += bytesUsed; + } + if(remaining > 0) + { + strncpy(path, ".dmp", remaining); + } + + llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; + // *NOTE:Mani - this code is stolen from LLApp, where its never actually used. + //OSMessageBox("Attach Debugger Now", "Error", OSMB_OK); + // *TODO: Translate the signals/exceptions into cross-platform stuff + // Windows implementation + llinfos << "Entering Windows Exception Handler..." << llendl; + + if (LLApp::isError()) + { + llwarns << "Got another fatal signal while in the error handler, die now!" << llendl; + } + + // Flag status to error, so thread_error starts its work + LLApp::setError(); + + // Block in the exception handler until the app has stopped + // This is pretty sketchy, but appears to work just fine + while (!LLApp::isStopped()) + { + ms_sleep(10); + } + + return true; +} +#endif diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index e5b8edf9c3..fef05a7939 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -66,6 +66,10 @@ public: }; #endif +namespace google_breakpad { + class ExceptionHandler; // See exception_handler.h +} + class LL_COMMON_API LLApp : public LLOptionInterface { friend class LLErrorThread; @@ -227,8 +231,20 @@ public: void setupErrorHandling(); void setErrorHandler(LLAppErrorHandler handler); - void setSyncErrorHandler(LLAppErrorHandler handler); + static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred. //@} + + // the maximum length of the minidump filename returned by getMiniDumpFilename() + static const U32 MAX_MINDUMP_PATH_LENGTH = 256; + + // change the directory where Breakpad minidump files are written to + void setMiniDumpDir(const std::string &path); + + // Return the Google Breakpad minidump filename after a crash. + char *getMiniDumpFilename() { return minidump_path; } + + // Write out a Google Breakpad minidump file. + void writeMiniDump(); #if !LL_WINDOWS // @@ -286,15 +302,14 @@ protected: private: void startErrorThread(); - static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred. - static void runSyncErrorHandler(); // run IMMEDIATELY when we get an error, ran in the context of the faulting thread. + // Contains the filename of the minidump file after a crash. + char minidump_path[MAX_MINDUMP_PATH_LENGTH]; // *NOTE: On Windows, we need a routine to reset the structured // exception handler when some evil driver has taken it over for // their own purposes typedef int(*signal_handler_func)(int signum); static LLAppErrorHandler sErrorHandler; - static LLAppErrorHandler sSyncErrorHandler; // Default application threads LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback @@ -315,6 +330,8 @@ private: private: // the static application instance if it was created. static LLApp* sApplication; + + google_breakpad::ExceptionHandler * mExceptionHandler; #if !LL_WINDOWS diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index de7f2ead74..a7ef28b431 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -248,8 +248,27 @@ bool LLDate::fromStream(std::istream& s) s >> fractional; seconds_since_epoch += fractional; } - c = s.get(); // skip the Z - if (c != 'Z') { return false; } + + c = s.peek(); // check for offset + if (c == '+' || c == '-') + { + S32 offset_sign = (c == '+') ? 1 : -1; + S32 offset_hours = 0; + S32 offset_minutes = 0; + S32 offset_in_seconds = 0; + + s >> offset_hours; + + c = s.get(); // skip the colon a get the minutes if there are any + if (c == ':') + { + s >> offset_minutes; + } + + offset_in_seconds = (offset_hours * 60 + offset_sign * offset_minutes) * 60; + seconds_since_epoch -= offset_in_seconds; + } + else if (c != 'Z') { return false; } // skip the Z mSecondsSinceEpoch = seconds_since_epoch; return true; diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 41ff5849f4..d06d6baf85 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -954,7 +954,12 @@ namespace LLError std::string class_name = className(site.mClassInfo); std::string function_name = functionName(site.mFunction); +#if LL_LINUX + // gross, but typeid comparison seems to always fail here with gcc4.1 + if (0 != strcmp(site.mClassInfo.name(), typeid(NoClassInfo).name())) +#else if (site.mClassInfo != typeid(NoClassInfo)) +#endif // LL_LINUX { function_name = class_name + "::" + function_name; } @@ -1079,7 +1084,12 @@ namespace LLError #if LL_WINDOWS // DevStudio: __FUNCTION__ already includes the full class name #else + #if LL_LINUX + // gross, but typeid comparison seems to always fail here with gcc4.1 + if (0 != strcmp(site.mClassInfo.name(), typeid(NoClassInfo).name())) + #else if (site.mClassInfo != typeid(NoClassInfo)) + #endif // LL_LINUX { prefix << className(site.mClassInfo) << "::"; } diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 09812de2b8..e64ee5e081 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -179,7 +179,7 @@ namespace LLError { return s; } // used to indicate the end of a message - class NoClassInfo { }; + class LL_COMMON_API NoClassInfo { }; // used to indicate no class info known for logging //LLCallStacks keeps track of call stacks and output the call stacks to log file diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp index f39a4e6619..dfbae09864 100644 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer_class.cpp @@ -238,7 +238,8 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer #else // windows or x86-mac or x86-linux or x86-solaris U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer { - static U64 sCPUClockFrequency = U64(CProcessor().GetCPUFrequency(50)); + //getCPUFrequency returns MHz and sCPUClockFrequency wants to be in Hz + static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency()*1000000.0); // we drop the low-order byte in our timers, so report a lower frequency return sCPUClockFrequency >> 8; diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index f6ab55a6b5..d3ba215751 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -30,139 +30,389 @@ * $/LicenseInfo$ */ -// Filename: Processor.cpp -// ======================= -// Author: Benjamin Jurke -// File history: 27.02.2002 - File created. Support for Intel and AMD processors -// 05.03.2002 - Fixed the CPUID bug: On Pre-Pentium CPUs the CPUID -// command is not available -// - The CProcessor::WriteInfoTextFile function do not -// longer use Win32 file functions (-> os independend) -// - Optional include of the windows.h header which is -// still need for CProcessor::GetCPUFrequency. -// 06.03.2002 - My birthday (18th :-)) -// - Replaced the '\r\n' line endings in function -// CProcessor::CPUInfoToText by '\n' -// - Replaced unsigned __int64 by signed __int64 for -// solving some compiler conversion problems -// - Fixed a bug at family=6, model=6 (Celeron -> P2) -////////////////////////////////////////////////////////////////////////////////// - #include "linden_common.h" +#include "llprocessor.h" -#include "processor.h" +#include "llerror.h" -#include <memory> +//#include <memory> #if LL_WINDOWS # define WIN32_LEAN_AND_MEAN # include <winsock2.h> # include <windows.h> +# define _interlockedbittestandset _renamed_interlockedbittestandset +# define _interlockedbittestandreset _renamed_interlockedbittestandreset +# include <intrin.h> +# undef _interlockedbittestandset +# undef _interlockedbittestandreset #endif -#if LL_LINUX -#include "llsys.h" -#endif // LL_LINUX +#include "llsd.h" + +#if LL_MSVC && _M_X64 +# define LL_X86_64 1 +# define LL_X86 1 +#elif LL_MSVC && _M_IX86 +# define LL_X86 1 +#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) ) +# define LL_X86_64 1 +# define LL_X86 1 +#elif LL_GNUC && ( defined(__i386__) ) +# define LL_X86 1 +#elif LL_GNUC && ( defined(__powerpc__) || defined(__ppc__) ) +# define LL_PPC 1 +#endif + +class LLProcessorInfoImpl; // foward declaration for the mImpl; + +namespace +{ + enum cpu_info + { + eBrandName = 0, + eFrequency, + eVendor, + eStepping, + eFamily, + eExtendedFamily, + eModel, + eExtendedModel, + eType, + eBrandID, + eFamilyName + }; + + + const char* cpu_info_names[] = + { + "Processor Name", + "Frequency", + "Vendor", + "Stepping", + "Family", + "Extended Family", + "Model", + "Extended Model", + "Type", + "Brand ID", + "Family Name" + }; + + enum cpu_config + { + eMaxID, + eMaxExtID, + eCLFLUSHCacheLineSize, + eAPICPhysicalID, + eCacheLineSize, + eL2Associativity, + eCacheSizeK, + eFeatureBits, + eExtFeatureBits + }; + + const char* cpu_config_names[] = + { + "Max Supported CPUID level", + "Max Supported Ext. CPUID level", + "CLFLUSH cache line size", + "APIC Physical ID", + "Cache Line Size", + "L2 Associativity", + "Cache Size", + "Feature Bits", + "Ext. Feature Bits" + }; -#if !LL_DARWIN && !LL_SOLARIS -#ifdef PROCESSOR_FREQUENCY_MEASURE_AVAILABLE -// We need the QueryPerformanceCounter and Sleep functions -#define FORCEINLINE __forceinline -#else -#define FORCEINLINE -#endif + // *NOTE:Mani - this contains the elements we reference directly and extensions beyond the first 32. + // The rest of the names are referenced by bit maks returned from cpuid. + enum cpu_features + { + eSSE_Ext=25, + eSSE2_Ext=26, + + eSSE3_Features=32, + eMONTIOR_MWAIT=33, + eCPLDebugStore=34, + eThermalMonitor2=35, + eAltivec=36 + }; -// Some macros we often need -//////////////////////////// -#define CheckBit(var, bit) ((var & (1 << bit)) ? true : false) + const char* cpu_feature_names[] = + { + "x87 FPU On Chip", + "Virtual-8086 Mode Enhancement", + "Debugging Extensions", + "Page Size Extensions", + "Time Stamp Counter", + "RDMSR and WRMSR Support", + "Physical Address Extensions", + "Machine Check Exception", + "CMPXCHG8B Instruction", + "APIC On Chip", + "Unknown1", + "SYSENTER and SYSEXIT", + "Memory Type Range Registers", + "PTE Global Bit", + "Machine Check Architecture", + "Conditional Move/Compare Instruction", + "Page Attribute Table", + "Page Size Extension", + "Processor Serial Number", + "CFLUSH Extension", + "Unknown2", + "Debug Store", + "Thermal Monitor and Clock Ctrl", + "MMX Technology", + "FXSAVE/FXRSTOR", + "SSE Extensions", + "SSE2 Extensions", + "Self Snoop", + "Hyper-threading Technology", + "Thermal Monitor", + "Unknown4", + "Pend. Brk. EN.", // 31 End of FeatureInfo bits + + "SSE3 New Instructions", // 32 + "MONITOR/MWAIT", + "CPL Qualified Debug Store", + "Thermal Monitor 2", + + "Altivec" + }; + + std::string intel_CPUFamilyName(int composed_family) + { + switch(composed_family) + { + case 3: return "Intel i386"; + case 4: return "Intel i486"; + case 5: return "Intel Pentium"; + case 6: return "Intel Pentium Pro/2/3, Core"; + case 7: return "Intel Itanium (IA-64)"; + case 0xF: return "Intel Pentium 4"; + case 0x10: return "Intel Itanium 2 (IA-64)"; + } + return "Unknown"; + } + + std::string amd_CPUFamilyName(int composed_family) + { + switch(composed_family) + { + case 4: return "AMD 80486/5x86"; + case 5: return "AMD K5/K6"; + case 6: return "AMD K7"; + case 0xF: return "AMD K8"; + case 0x10: return "AMD K8L"; + } + return "Unknown"; + } + + std::string compute_CPUFamilyName(const char* cpu_vendor, int composed_family) + { + const char* intel_string = "GenuineIntel"; + const char* amd_string = "AuthenticAMD"; + if(!strncmp(cpu_vendor, intel_string, strlen(intel_string))) + { + return intel_CPUFamilyName(composed_family); + } + else if(!strncmp(cpu_vendor, amd_string, strlen(amd_string))) + { + return amd_CPUFamilyName(composed_family); + } + return "Unknown"; + } + + std::string compute_CPUFamilyName(const char* cpu_vendor, int family, int ext_family) + { + const char* intel_string = "GenuineIntel"; + const char* amd_string = "AuthenticAMD"; + if(!strncmp(cpu_vendor, intel_string, strlen(intel_string))) + { + U32 composed_family = family + ext_family; + return intel_CPUFamilyName(composed_family); + } + else if(!strncmp(cpu_vendor, amd_string, strlen(amd_string))) + { + U32 composed_family = (family == 0xF) + ? family + ext_family + : family; + return amd_CPUFamilyName(composed_family); + } + return "Unknown"; + } + +} // end unnamed namespace + +// The base class for implementations. +// Each platform should override this class. +class LLProcessorInfoImpl +{ +public: + LLProcessorInfoImpl() + { + mProcessorInfo["info"] = LLSD::emptyMap(); + mProcessorInfo["config"] = LLSD::emptyMap(); + mProcessorInfo["extension"] = LLSD::emptyMap(); + } + virtual ~LLProcessorInfoImpl() {} + + F64 getCPUFrequency() const + { + return getInfo(eFrequency, 0).asReal(); + } + + bool hasSSE() const + { + return hasExtension(cpu_feature_names[eSSE_Ext]); + } + + bool hasSSE2() const + { + return hasExtension(cpu_feature_names[eSSE2_Ext]); + } + + bool hasAltivec() const + { + return hasExtension("Altivec"); + } + + std::string getCPUFamilyName() const { return getInfo(eFamilyName, "Unknown").asString(); } + std::string getCPUBrandName() const { return getInfo(eBrandName, "Unknown").asString(); } + + // This is virtual to support a different linux format. + // *NOTE:Mani - I didn't want to screw up server use of this data... + virtual std::string getCPUFeatureDescription() const + { + std::ostringstream out; + out << std::endl << std::endl; + out << "// CPU General Information" << std::endl; + out << "//////////////////////////" << std::endl; + out << "Processor Name: " << getCPUBrandName() << std::endl; + out << "Frequency: " << getCPUFrequency() << " MHz" << std::endl; + out << "Vendor: " << getInfo(eVendor, "Unknown").asString() << std::endl; + out << "Family: " << getCPUFamilyName() << " (" << getInfo(eFamily, 0) << ")" << std::endl; + out << "Extended family: " << getInfo(eExtendedFamily, 0) << std::endl; + out << "Model: " << getInfo(eModel, 0) << std::endl; + out << "Extended model: " << getInfo(eExtendedModel, 0) << std::endl; + out << "Type: " << getInfo(eType, 0) << std::endl; + out << "Brand ID: " << getInfo(eBrandID, 0) << std::endl; + out << std::endl; + out << "// CPU Configuration" << std::endl; + out << "//////////////////////////" << std::endl; + + // Iterate through the dictionary of configuration options. + LLSD configs = mProcessorInfo["config"]; + for(LLSD::map_const_iterator cfgItr = configs.beginMap(); cfgItr != configs.endMap(); ++cfgItr) + { + out << cfgItr->first << " = " << cfgItr->second << std::endl; + } + out << std::endl; + + out << "// CPU Extensions" << std::endl; + out << "//////////////////////////" << std::endl; + + for(LLSD::map_const_iterator itr = mProcessorInfo["extension"].beginMap(); itr != mProcessorInfo["extension"].endMap(); ++itr) + { + out << " " << itr->first << std::endl; + } + return out.str(); + } + +protected: + void setInfo(cpu_info info_type, const LLSD& value) + { + setInfo(cpu_info_names[info_type], value); + } + LLSD getInfo(cpu_info info_type, const LLSD& defaultVal) const + { + return getInfo(cpu_info_names[info_type], defaultVal); + } + + void setConfig(cpu_config config_type, const LLSD& value) + { + setConfig(cpu_config_names[config_type], value); + } + LLSD getConfig(cpu_config config_type, const LLSD& defaultVal) const + { + return getConfig(cpu_config_names[config_type], defaultVal); + } + + void setExtension(const std::string& name) { mProcessorInfo["extension"][name] = "true"; } + bool hasExtension(const std::string& name) const + { + return mProcessorInfo["extension"].has(name); + } + +private: + void setInfo(const std::string& name, const LLSD& value) { mProcessorInfo["info"][name]=value; } + LLSD getInfo(const std::string& name, const LLSD& defaultVal) const + { + if(mProcessorInfo["info"].has(name)) + { + return mProcessorInfo["info"][name]; + } + return defaultVal; + } + void setConfig(const std::string& name, const LLSD& value) { mProcessorInfo["config"][name]=value; } + LLSD getConfig(const std::string& name, const LLSD& defaultVal) const + { + LLSD r = mProcessorInfo["config"].get(name); + return r.isDefined() ? r : defaultVal; + } + +private: + + LLSD mProcessorInfo; +}; + + +#ifdef LL_MSVC +// LL_MSVC and not LLWINDOWS because some of the following code +// uses the MSVC compiler intrinsics __cpuid() and __rdtsc(). -#ifdef PROCESSOR_FREQUENCY_MEASURE_AVAILABLE // Delays for the specified amount of milliseconds -static void _Delay(unsigned int ms) +static void _Delay(unsigned int ms) { - LARGE_INTEGER freq, c1, c2; - __int64 x; + LARGE_INTEGER freq, c1, c2; + __int64 x; - // Get High-Res Timer frequency + // Get High-Res Timer frequency if (!QueryPerformanceFrequency(&freq)) return; - + // Convert ms to High-Res Timer value x = freq.QuadPart/1000*ms; - // Get first snapshot of High-Res Timer value + // Get first snapshot of High-Res Timer value QueryPerformanceCounter(&c1); do { - // Get second snapshot - QueryPerformanceCounter(&c2); + // Get second snapshot + QueryPerformanceCounter(&c2); }while(c2.QuadPart-c1.QuadPart < x); // Loop while (second-first < x) } -#endif - -// CProcessor::CProcessor -// ====================== -// Class constructor: -///////////////////////// -CProcessor::CProcessor() -{ - uqwFrequency = 0; - strCPUName[0] = 0; - memset(&CPUInfo, 0, sizeof(CPUInfo)); -} -// unsigned __int64 CProcessor::GetCPUFrequency(unsigned int uiMeasureMSecs) -// ========================================================================= -// Function to measure the current CPU frequency -//////////////////////////////////////////////////////////////////////////// -F64 CProcessor::GetCPUFrequency(unsigned int uiMeasureMSecs) +static F64 calculate_cpu_frequency(U32 measure_msecs) { -#if LL_LINUX - // use the shinier LLCPUInfo interface - return 1000000.0F * gSysCPU.getMHz(); -#endif - -#ifndef PROCESSOR_FREQUENCY_MEASURE_AVAILABLE - return 0; -#else - // If there are invalid measure time parameters, zero msecs for example, - // we've to exit the function - if (uiMeasureMSecs < 1) + if(measure_msecs == 0) { - // If theres already a measured frequency available, we return it - if (uqwFrequency > 0) - return uqwFrequency; - else - return 0; - } - - // Now we check if the CPUID command is available - if (!CheckCPUIDPresence()) return 0; - - // First we get the CPUID standard level 0x00000001 - unsigned long reg; - __asm - { - mov eax, 1 - cpuid - mov reg, edx } - // Then we check, if the RDTSC (Real Date Time Stamp Counter) is available. - // This function is necessary for our measure process. - if (!(reg & (1 << 4))) - return 0; - // After that we declare some vars and check the frequency of the high // resolution timer for the measure process. - // If there's no high-res timer, we exit. - __int64 starttime, endtime, timedif, freq, start, end, dif; + // If there"s no high-res timer, we exit. + unsigned __int64 starttime, endtime, timedif, freq, start, end, dif; if (!QueryPerformanceFrequency((LARGE_INTEGER *) &freq)) + { return 0; + } // Now we can init the measure process. We set the process and thread priority // to the highest available level (Realtime priority). Also we focus the @@ -178,35 +428,27 @@ F64 CProcessor::GetCPUFrequency(unsigned int uiMeasureMSecs) SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL); SetProcessAffinityMask(hProcess, dwNewMask); - // Now we call a CPUID to ensure, that all other prior called functions are - // completed now (serialization) - __asm cpuid + //// Now we call a CPUID to ensure, that all other prior called functions are + //// completed now (serialization) + //__asm cpuid + int cpu_info[4] = {-1}; + __cpuid(cpu_info, 0); // We ask the high-res timer for the start time QueryPerformanceCounter((LARGE_INTEGER *) &starttime); // Then we get the current cpu clock and store it - __asm - { - rdtsc - mov dword ptr [start+4], edx - mov dword ptr [start], eax - } + start = __rdtsc(); // Now we wart for some msecs - _Delay(uiMeasureMSecs); -// Sleep(uiMeasureMSecs); + _Delay(measure_msecs); + // Sleep(uiMeasureMSecs); // We ask for the end time QueryPerformanceCounter((LARGE_INTEGER *) &endtime); // And also for the end cpu clock - __asm - { - rdtsc - mov dword ptr [end+4], edx - mov dword ptr [end], eax - } + end = __rdtsc(); // Now we can restore the default process and thread priorities SetProcessAffinityMask(hProcess, dwProcessMask); @@ -219,2075 +461,433 @@ F64 CProcessor::GetCPUFrequency(unsigned int uiMeasureMSecs) // And finally the frequency is the clock difference divided by the time // difference. - uqwFrequency = (F64)dif / (((F64)timedif) / freq); + F64 frequency = (F64)dif / (((F64)timedif) / freq); // At last we just return the frequency that is also stored in the call - // member var uqwFrequency - return uqwFrequency; -#endif + // member var uqwFrequency - converted to MHz + return frequency / (F64)1000000; } -// bool CProcessor::AnalyzeIntelProcessor() -// ======================================== -// Private class function for analyzing an Intel processor -////////////////////////////////////////////////////////// -bool CProcessor::AnalyzeIntelProcessor() +// Windows implementation +class LLProcessorInfoWindowsImpl : public LLProcessorInfoImpl { -#if LL_WINDOWS - unsigned long eaxreg, ebxreg, edxreg; - - // First we check if the CPUID command is available - if (!CheckCPUIDPresence()) - return false; - - // Now we get the CPUID standard level 0x00000001 - __asm +public: + LLProcessorInfoWindowsImpl() { - mov eax, 1 - cpuid - mov eaxreg, eax - mov ebxreg, ebx - mov edxreg, edx + getCPUIDInfo(); + setInfo(eFrequency, calculate_cpu_frequency(50)); } - - // Then get the cpu model, family, type, stepping and brand id by masking - // the eax and ebx register - CPUInfo.uiStepping = eaxreg & 0xF; - CPUInfo.uiModel = (eaxreg >> 4) & 0xF; - CPUInfo.uiFamily = (eaxreg >> 8) & 0xF; - CPUInfo.uiType = (eaxreg >> 12) & 0x3; - CPUInfo.uiBrandID = ebxreg & 0xF; - - static const char* INTEL_BRAND[] = - { - /* 0x00 */ "", - /* 0x01 */ "0.18 micron Intel Celeron", - /* 0x02 */ "0.18 micron Intel Pentium III", - /* 0x03 */ "0.13 micron Intel Celeron", - /* 0x04 */ "0.13 micron Intel Pentium III", - /* 0x05 */ "", - /* 0x06 */ "0.13 micron Intel Pentium III Mobile", - /* 0x07 */ "0.13 micron Intel Celeron Mobile", - /* 0x08 */ "0.18 micron Intel Pentium 4", - /* 0x09 */ "0.13 micron Intel Pentium 4", - /* 0x0A */ "0.13 micron Intel Celeron", - /* 0x0B */ "0.13 micron Intel Pentium 4 Xeon", - /* 0x0C */ "Intel Xeon MP", - /* 0x0D */ "", - /* 0x0E */ "0.18 micron Intel Pentium 4 Xeon", - /* 0x0F */ "Mobile Intel Celeron", - /* 0x10 */ "", - /* 0x11 */ "Mobile Genuine Intel", - /* 0x12 */ "Intel Celeron M", - /* 0x13 */ "Mobile Intel Celeron", - /* 0x14 */ "Intel Celeron", - /* 0x15 */ "Mobile Genuine Intel", - /* 0x16 */ "Intel Pentium M", - /* 0x17 */ "Mobile Intel Celeron", - }; - // Only override the brand if we have it in the lookup table. We should - // already have a string here from GetCPUInfo(). JC - if ( CPUInfo.uiBrandID < LL_ARRAY_SIZE(INTEL_BRAND) ) +private: + void getCPUIDInfo() { - strncpy(CPUInfo.strBrandID, INTEL_BRAND[CPUInfo.uiBrandID], sizeof(CPUInfo.strBrandID)-1); - CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; + // http://msdn.microsoft.com/en-us/library/hskdteyh(VS.80).aspx + + // __cpuid with an InfoType argument of 0 returns the number of + // valid Ids in cpu_info[0] and the CPU identification string in + // the other three array elements. The CPU identification string is + // not in linear order. The code below arranges the information + // in a human readable form. + int cpu_info[4] = {-1}; + __cpuid(cpu_info, 0); + unsigned int ids = (unsigned int)cpu_info[0]; + setConfig(eMaxID, (S32)ids); + + char cpu_vendor[0x20]; + memset(cpu_vendor, 0, sizeof(cpu_vendor)); + *((int*)cpu_vendor) = cpu_info[1]; + *((int*)(cpu_vendor+4)) = cpu_info[3]; + *((int*)(cpu_vendor+8)) = cpu_info[2]; + setInfo(eVendor, cpu_vendor); - if (CPUInfo.uiBrandID == 3 && CPUInfo.uiModel == 6) + // Get the information associated with each valid Id + for(unsigned int i=0; i<=ids; ++i) { - strcpy(CPUInfo.strBrandID, "0.18 micron Intel Pentium III Xeon"); - } - } + __cpuid(cpu_info, i); - // Then we translate the cpu family - switch (CPUInfo.uiFamily) - { - case 3: // Family = 3: i386 (80386) processor family - strcpy(CPUInfo.strFamily, "Intel i386"); /* Flawfinder: ignore */ - break; - case 4: // Family = 4: i486 (80486) processor family - strcpy(CPUInfo.strFamily, "Intel i486"); /* Flawfinder: ignore */ - break; - case 5: // Family = 5: Pentium (80586) processor family - strcpy(CPUInfo.strFamily, "Intel Pentium"); /* Flawfinder: ignore */ - break; - case 6: // Family = 6: Pentium Pro (80686) processor family - strcpy(CPUInfo.strFamily, "Intel Pentium Pro/2/3, Core"); /* Flawfinder: ignore */ - break; - case 15: // Family = 15: Extended family specific - // Masking the extended family - CPUInfo.uiExtendedFamily = (eaxreg >> 20) & 0xFF; - switch (CPUInfo.uiExtendedFamily) - { - case 0: // Family = 15, Ext. Family = 0: Pentium 4 (80786 ??) processor family - strcpy(CPUInfo.strFamily, "Intel Pentium 4"); /* Flawfinder: ignore */ - break; - case 1: // Family = 15, Ext. Family = 1: McKinley (64-bit) processor family - strcpy(CPUInfo.strFamily, "Intel McKinley (IA-64)"); /* Flawfinder: ignore */ - break; - default: // Sure is sure - strcpy(CPUInfo.strFamily, "Unknown Intel Pentium 4+"); /* Flawfinder: ignore */ - break; - } - break; - default: // Failsave - strcpy(CPUInfo.strFamily, "Unknown"); /* Flawfinder: ignore */ - break; - } - - // Now we come to the big deal, the exact model name - switch (CPUInfo.uiFamily) - { - case 3: // i386 (80386) processor family - strcpy(CPUInfo.strModel, "Unknown Intel i386"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i386", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 4: // i486 (80486) processor family - switch (CPUInfo.uiModel) - { - case 0: // Model = 0: i486 DX-25/33 processor model - strcpy(CPUInfo.strModel, "Intel i486 DX-25/33"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 DX-25/33", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 1: // Model = 1: i486 DX-50 processor model - strcpy(CPUInfo.strModel, "Intel i486 DX-50"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 DX-50", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 2: // Model = 2: i486 SX processor model - strcpy(CPUInfo.strModel, "Intel i486 SX"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 SX", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 3: // Model = 3: i486 DX2 (with i487 numeric coprocessor) processor model - strcpy(CPUInfo.strModel, "Intel i486 487/DX2"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 DX2 with i487 numeric coprocessor", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 4: // Model = 4: i486 SL processor model (never heard ?!?) - strcpy(CPUInfo.strModel, "Intel i486 SL"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 SL", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 5: // Model = 5: i486 SX2 processor model - strcpy(CPUInfo.strModel, "Intel i486 SX2"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 SX2", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 7: // Model = 7: i486 write-back enhanced DX2 processor model - strcpy(CPUInfo.strModel, "Intel i486 write-back enhanced DX2"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 write-back enhanced DX2", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 8: // Model = 8: i486 DX4 processor model - strcpy(CPUInfo.strModel, "Intel i486 DX4"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 DX4", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 9: // Model = 9: i486 write-back enhanced DX4 processor model - strcpy(CPUInfo.strModel, "Intel i486 write-back enhanced DX4"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 DX4", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - default: // ... - strcpy(CPUInfo.strModel, "Unknown Intel i486"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel i486 (Unknown model)", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - } - break; - case 5: // Pentium (80586) processor family - switch (CPUInfo.uiModel) - { - case 0: // Model = 0: Pentium (P5 A-Step) processor model - strcpy(CPUInfo.strModel, "Intel Pentium (P5 A-Step)"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium (P5 A-Step core)", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; // Famous for the DIV bug, as far as I know - case 1: // Model = 1: Pentium 60/66 processor model - strcpy(CPUInfo.strModel, "Intel Pentium 60/66 (P5)"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium 60/66 (P5 core)", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 2: // Model = 2: Pentium 75-200 (P54C) processor model - strcpy(CPUInfo.strModel, "Intel Pentium 75-200 (P54C)"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium 75-200 (P54C core)", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - case 3: // Model = 3: Pentium overdrive for 486 systems processor model - strcpy(CPUInfo.strModel, "Intel Pentium for 486 system (P24T Overdrive)"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium for 486 (P24T overdrive core)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 4: // Model = 4: Pentium MMX processor model - strcpy(CPUInfo.strModel, "Intel Pentium MMX (P55C)"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium MMX (P55C core)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 7: // Model = 7: Pentium processor model (don't know difference to Model=2) - strcpy(CPUInfo.strModel, "Intel Pentium (P54C)"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium (P54C core)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 8: // Model = 8: Pentium MMX (0.25 micron) processor model - strcpy(CPUInfo.strModel, "Intel Pentium MMX (P55C), 0.25 micron"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium MMX (P55C core), 0.25 micron", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - default: // ... - strcpy(CPUInfo.strModel, "Unknown Intel Pentium"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium (Unknown P5-model)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - } - break; - case 6: // Pentium Pro (80686) processor family - switch (CPUInfo.uiModel) - { - case 0: // Model = 0: Pentium Pro (P6 A-Step) processor model - strcpy(CPUInfo.strModel, "Intel Pentium Pro (P6 A-Step)"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium Pro (P6 A-Step core)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 1: // Model = 1: Pentium Pro - strcpy(CPUInfo.strModel, "Intel Pentium Pro (P6)"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium Pro (P6 core)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 3: // Model = 3: Pentium II (66 MHz FSB, I think) processor model - strcpy(CPUInfo.strModel, "Intel Pentium II Model 3, 0.28 micron"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium II (Model 3 core, 0.28 micron process)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 5: // Model = 5: Pentium II/Xeon/Celeron (0.25 micron) processor model - strcpy(CPUInfo.strModel, "Intel Pentium II Model 5/Xeon/Celeron, 0.25 micron"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium II/Xeon/Celeron (Model 5 core, 0.25 micron process)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 6: // Model = 6: Pentium II with internal L2 cache - strcpy(CPUInfo.strModel, "Intel Pentium II - internal L2 cache"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium II with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 7: // Model = 7: Pentium III/Xeon (extern L2 cache) processor model - strcpy(CPUInfo.strModel, "Intel Pentium III/Pentium III Xeon - external L2 cache, 0.25 micron"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium III/Pentium III Xeon (0.25 micron process) with external L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 8: // Model = 8: Pentium III/Xeon/Celeron (256 KB on-die L2 cache) processor model - strcpy(CPUInfo.strModel, "Intel Pentium III/Celeron/Pentium III Xeon - internal L2 cache, 0.18 micron"); /*Flawfinder: ignore*/ - // We want to know it exactly: - switch (CPUInfo.uiBrandID) - { - case 1: // Model = 8, Brand id = 1: Celeron (on-die L2 cache) processor model - strncat(strCPUName, "Intel Celeron (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 2: // Model = 8, Brand id = 2: Pentium III (on-die L2 cache) processor model (my current cpu :-)) - strncat(strCPUName, "Intel Pentium III (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 3: // Model = 8, Brand id = 3: Pentium III Xeon (on-die L2 cache) processor model - strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - default: // ... - strncat(strCPUName, "Intel Pentium III core (unknown model, 0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - } - break; - case 9: // Model = 9: Intel Pentium M processor, Intel Celeron M processor, model 9 - strcpy(CPUInfo.strModel, "Intel Pentium M Series Processor"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium M Series Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 0xA: // Model = 0xA: Pentium III/Xeon/Celeron (1 or 2 MB on-die L2 cache) processor model - strcpy(CPUInfo.strModel, "Intel Pentium III/Celeron/Pentium III Xeon - internal L2 cache, 0.18 micron"); /*Flawfinder: ignore*/ - // Exact detection: - switch (CPUInfo.uiBrandID) - { - case 1: // Model = 0xA, Brand id = 1: Celeron (1 or 2 MB on-die L2 cache (does it exist??)) processor model - strncat(strCPUName, "Intel Celeron (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 2: // Model = 0xA, Brand id = 2: Pentium III (1 or 2 MB on-die L2 cache (never seen...)) processor model - strncat(strCPUName, "Intel Pentium III (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 3: // Model = 0xA, Brand id = 3: Pentium III Xeon (1 or 2 MB on-die L2 cache) processor model - strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - default: // Getting bored of this............ - strncat(strCPUName, "Intel Pentium III core (unknown model, 0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - } - break; - case 0xB: // Model = 0xB: Pentium III/Xeon/Celeron (Tualatin core, on-die cache) processor model - strcpy(CPUInfo.strModel, "Intel Pentium III/Celeron/Pentium III Xeon - internal L2 cache, 0.13 micron"); /*Flawfinder: ignore*/ - // Omniscient: ;-) - switch (CPUInfo.uiBrandID) - { - case 3: // Model = 0xB, Brand id = 3: Celeron (Tualatin core) processor model - strncat(strCPUName, "Intel Celeron (Tualatin core, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 4: // Model = 0xB, Brand id = 4: Pentium III (Tualatin core) processor model - strncat(strCPUName, "Intel Pentium III (Tualatin core, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 7: // Model = 0xB, Brand id = 7: Celeron mobile (Tualatin core) processor model - strncat(strCPUName, "Intel Celeron mobile (Tualatin core, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - default: // *bored* - strncat(strCPUName, "Intel Pentium III Tualatin core (unknown model, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - } - break; - case 0xD: // Model = 0xD: Intel Pentium M processor, Intel Celeron M processor, model D - strcpy(CPUInfo.strModel, "Intel Pentium M Series Processor"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium M Series Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 0xE: // Model = 0xE: Intel Core Duo processor, Intel Core Solo processor, model E - strcpy(CPUInfo.strModel, "Intel Core Series Processor"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Core Series Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - case 0xF: // Model = 0xF: Intel Core 2 Duo processor, model F - strcpy(CPUInfo.strModel, "Intel Core 2 Series Processor"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Core 2 Series Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - default: // *more bored* - strcpy(CPUInfo.strModel, "Unknown Intel Pentium Pro/2/3, Core"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium Pro/2/3, Core (Unknown model)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - break; - } - break; - case 15: // Extended processor family - // Masking the extended model - CPUInfo.uiExtendedModel = (eaxreg >> 16) & 0xFF; - switch (CPUInfo.uiModel) + // Interpret CPU feature information. + if (i == 1) { - case 0: // Model = 0: Pentium 4 Willamette (A-Step) core - if ((CPUInfo.uiBrandID) == 8) // Brand id = 8: P4 Willamette - { - strcpy(CPUInfo.strModel, "Intel Pentium 4 Willamette (A-Step)"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium 4 Willamette (A-Step)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ - } - else // else Xeon - { - strcpy(CPUInfo.strModel, "Intel Pentium 4 Willamette Xeon (A-Step)"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium 4 Willamette Xeon (A-Step)", sizeof(strCPUName) - strlen(strCPUName) - 1); /* Flawfinder: ignore */ - } - break; - case 1: // Model = 1: Pentium 4 Willamette core - if ((CPUInfo.uiBrandID) == 8) // Brand id = 8: P4 Willamette + setInfo(eStepping, cpu_info[0] & 0xf); + setInfo(eModel, (cpu_info[0] >> 4) & 0xf); + int family = (cpu_info[0] >> 8) & 0xf; + setInfo(eFamily, family); + setInfo(eType, (cpu_info[0] >> 12) & 0x3); + setInfo(eExtendedModel, (cpu_info[0] >> 16) & 0xf); + int ext_family = (cpu_info[0] >> 20) & 0xff; + setInfo(eExtendedFamily, ext_family); + setInfo(eBrandID, cpu_info[1] & 0xff); + + setInfo(eFamilyName, compute_CPUFamilyName(cpu_vendor, family, ext_family)); + + setConfig(eCLFLUSHCacheLineSize, ((cpu_info[1] >> 8) & 0xff) * 8); + setConfig(eAPICPhysicalID, (cpu_info[1] >> 24) & 0xff); + + if(cpu_info[2] & 0x1) + { + setExtension(cpu_feature_names[eSSE3_Features]); + } + + if(cpu_info[2] & 0x8) + { + setExtension(cpu_feature_names[eMONTIOR_MWAIT]); + } + + if(cpu_info[2] & 0x10) + { + setExtension(cpu_feature_names[eCPLDebugStore]); + } + + if(cpu_info[2] & 0x100) + { + setExtension(cpu_feature_names[eThermalMonitor2]); + } + + unsigned int feature_info = (unsigned int) cpu_info[3]; + for(unsigned int index = 0, bit = 1; index < eSSE3_Features; ++index, bit <<= 1) + { + if(feature_info & bit) { - strcpy(CPUInfo.strModel, "Intel Pentium 4 Willamette"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium 4 Willamette", sizeof(strCPUName) - strlen(strCPUName) - 1); /* Flawfinder: ignore */ + setExtension(cpu_feature_names[index]); } - else // else Xeon - { - strcpy(CPUInfo.strModel, "Intel Pentium 4 Willamette Xeon"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium 4 Willamette Xeon", sizeof(strCPUName) - strlen(strCPUName) - 1); /* Flawfinder: ignore */ - } - break; - case 2: // Model = 2: Pentium 4 Northwood core - if (((CPUInfo.uiBrandID) == 9) || ((CPUInfo.uiBrandID) == 0xA)) // P4 Willamette - { - strcpy(CPUInfo.strModel, "Intel Pentium 4 Northwood"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium 4 Northwood", sizeof(strCPUName) - strlen(strCPUName) - 1); /* Flawfinder: ignore */ - } - else // Xeon - { - strcpy(CPUInfo.strModel, "Intel Pentium 4 Northwood Xeon"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium 4 Northwood Xeon", sizeof(strCPUName) - strlen(strCPUName) - 1); /* Flawfinder: ignore */ - } - break; - default: // Silly stupid never used failsave option - strcpy(CPUInfo.strModel, "Unknown Intel Pentium 4"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel Pentium 4 (Unknown model)", sizeof(strCPUName) - strlen(strCPUName) - 1); /* Flawfinder: ignore */ - break; + } } - break; - default: // *grmpf* - strcpy(CPUInfo.strModel, "Unknown Intel model"); /* Flawfinder: ignore */ - strncat(strCPUName, "Intel (Unknown model)", sizeof(strCPUName) - strlen(strCPUName) - 1); /* Flawfinder: ignore */ - break; - } - - // After the long processor model block we now come to the processors serial - // number. - // First of all we check if the processor supports the serial number - if (CPUInfo.MaxSupportedLevel >= 3) - { - // If it supports the serial number CPUID level 0x00000003 we read the data - unsigned long sig1, sig2, sig3; - __asm - { - mov eax, 1 - cpuid - mov sig1, eax - mov eax, 3 - cpuid - mov sig2, ecx - mov sig3, edx } - // Then we convert the data to a readable string - snprintf( /* Flawfinder: ignore */ - CPUInfo.strProcessorSerial, - sizeof(CPUInfo.strProcessorSerial), - "%04lX-%04lX-%04lX-%04lX-%04lX-%04lX", - sig1 >> 16, - sig1 & 0xFFFF, - sig3 >> 16, - sig3 & 0xFFFF, - sig2 >> 16, sig2 & 0xFFFF); - } - else - { - // If there's no serial number support we just put "No serial number" - snprintf( /* Flawfinder: ignore */ - CPUInfo.strProcessorSerial, - sizeof(CPUInfo.strProcessorSerial), - "No Processor Serial Number"); - } - - // Now we get the standard processor extensions - GetStandardProcessorExtensions(); - // And finally the processor configuration (caches, TLBs, ...) and translate - // the data to readable strings - GetStandardProcessorConfiguration(); - TranslateProcessorConfiguration(); + // Calling __cpuid with 0x80000000 as the InfoType argument + // gets the number of valid extended IDs. + __cpuid(cpu_info, 0x80000000); + unsigned int ext_ids = cpu_info[0]; + setConfig(eMaxExtID, 0); - // At last... - return true; -#else - return FALSE; -#endif -} + char cpu_brand_string[0x40]; + memset(cpu_brand_string, 0, sizeof(cpu_brand_string)); -// bool CProcessor::AnalyzeAMDProcessor() -// ====================================== -// Private class function for analyzing an AMD processor -//////////////////////////////////////////////////////// -bool CProcessor::AnalyzeAMDProcessor() -{ -#if LL_WINDOWS - unsigned long eaxreg, ebxreg, ecxreg, edxreg; - - // First of all we check if the CPUID command is available - if (!CheckCPUIDPresence()) - return 0; - - // Now we get the CPUID standard level 0x00000001 - __asm - { - mov eax, 1 - cpuid - mov eaxreg, eax - mov ebxreg, ebx - mov edxreg, edx - } - - // Then we mask the model, family, stepping and type (AMD does not support brand id) - CPUInfo.uiStepping = eaxreg & 0xF; - CPUInfo.uiModel = (eaxreg >> 4) & 0xF; - CPUInfo.uiFamily = (eaxreg >> 8) & 0xF; - CPUInfo.uiType = (eaxreg >> 12) & 0x3; - - // Now we check if the processor supports the brand id string extended CPUID level - if (CPUInfo.MaxSupportedExtendedLevel >= 0x80000004) - { - // If it supports the extended CPUID level 0x80000004 we read the data - char tmp[52]; /* Flawfinder: ignore */ - memset(tmp, 0, sizeof(tmp)); - __asm + // Get the information associated with each extended ID. + for(unsigned int i=0x80000000; i<=ext_ids; ++i) { - mov eax, 0x80000002 - cpuid - mov dword ptr [tmp], eax - mov dword ptr [tmp+4], ebx - mov dword ptr [tmp+8], ecx - mov dword ptr [tmp+12], edx - mov eax, 0x80000003 - cpuid - mov dword ptr [tmp+16], eax - mov dword ptr [tmp+20], ebx - mov dword ptr [tmp+24], ecx - mov dword ptr [tmp+28], edx - mov eax, 0x80000004 - cpuid - mov dword ptr [tmp+32], eax - mov dword ptr [tmp+36], ebx - mov dword ptr [tmp+40], ecx - mov dword ptr [tmp+44], edx - } - // And copy it to the brand id string - strncpy(CPUInfo.strBrandID, tmp,sizeof(CPUInfo.strBrandID)-1); - CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; - } - else - { - // Or just tell there is no brand id string support - strcpy(CPUInfo.strBrandID, ""); /* Flawfinder: ignore */ - } - - // After that we translate the processor family - switch(CPUInfo.uiFamily) - { - case 4: // Family = 4: 486 (80486) or 5x86 (80486) processor family - switch (CPUInfo.uiModel) + __cpuid(cpu_info, i); + + // Interpret CPU brand string and cache information. + if (i == 0x80000002) + memcpy(cpu_brand_string, cpu_info, sizeof(cpu_info)); + else if (i == 0x80000003) + memcpy(cpu_brand_string + 16, cpu_info, sizeof(cpu_info)); + else if (i == 0x80000004) { - case 3: // Thanks to AMD for this nice form of family - case 7: // detection.... *grmpf* - case 8: - case 9: - strcpy(CPUInfo.strFamily, "AMD 80486"); /* Flawfinder: ignore */ - break; - case 0xE: - case 0xF: - strcpy(CPUInfo.strFamily, "AMD 5x86"); /* Flawfinder: ignore */ - break; - default: - strcpy(CPUInfo.strFamily, "Unknown family"); /* Flawfinder: ignore */ - break; + memcpy(cpu_brand_string + 32, cpu_info, sizeof(cpu_info)); + setInfo(eBrandName, cpu_brand_string); } - break; - case 5: // Family = 5: K5 or K6 processor family - switch (CPUInfo.uiModel) + else if (i == 0x80000006) { - case 0: - case 1: - case 2: - case 3: - strcpy(CPUInfo.strFamily, "AMD K5"); /* Flawfinder: ignore */ - break; - case 6: - case 7: - case 8: - case 9: - strcpy(CPUInfo.strFamily, "AMD K6"); /* Flawfinder: ignore */ - break; - default: - strcpy(CPUInfo.strFamily, "Unknown family"); /* Flawfinder: ignore */ - break; + setConfig(eCacheLineSize, cpu_info[2] & 0xff); + setConfig(eL2Associativity, (cpu_info[2] >> 12) & 0xf); + setConfig(eCacheSizeK, (cpu_info[2] >> 16) & 0xffff); } - break; - case 6: // Family = 6: K7 (Athlon, ...) processor family - strcpy(CPUInfo.strFamily, "AMD K7"); /* Flawfinder: ignore */ - break; - default: // For security - strcpy(CPUInfo.strFamily, "Unknown family"); /* Flawfinder: ignore */ - break; + } } +}; - // After the family detection we come to the specific processor model - // detection - switch (CPUInfo.uiFamily) - { - case 4: // Family = 4: 486 (80486) or 5x85 (80486) processor family - switch (CPUInfo.uiModel) - { - case 3: // Model = 3: 80486 DX2 - strcpy(CPUInfo.strModel, "AMD 80486 DX2"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD 80486 DX2", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 7: // Model = 7: 80486 write-back enhanced DX2 - strcpy(CPUInfo.strModel, "AMD 80486 write-back enhanced DX2"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD 80486 write-back enhanced DX2", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 8: // Model = 8: 80486 DX4 - strcpy(CPUInfo.strModel, "AMD 80486 DX4"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD 80486 DX4", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 9: // Model = 9: 80486 write-back enhanced DX4 - strcpy(CPUInfo.strModel, "AMD 80486 write-back enhanced DX4"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD 80486 write-back enhanced DX4", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 0xE: // Model = 0xE: 5x86 - strcpy(CPUInfo.strModel, "AMD 5x86"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD 5x86", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 0xF: // Model = 0xF: 5x86 write-back enhanced (oh my god.....) - strcpy(CPUInfo.strModel, "AMD 5x86 write-back enhanced"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD 5x86 write-back enhanced", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - default: // ... - strcpy(CPUInfo.strModel, "Unknown AMD 80486 or 5x86 model"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD 80486 or 5x86 (Unknown model)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - } - break; - case 5: // Family = 5: K5 / K6 processor family - switch (CPUInfo.uiModel) - { - case 0: // Model = 0: K5 SSA 5 (Pentium Rating *ggg* 75, 90 and 100 MHz) - strcpy(CPUInfo.strModel, "AMD K5 SSA5 (PR75, PR90, PR100)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K5 SSA5 (PR75, PR90, PR100)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 1: // Model = 1: K5 5k86 (PR 120 and 133 MHz) - strcpy(CPUInfo.strModel, "AMD K5 5k86 (PR120, PR133)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K5 5k86 (PR120, PR133)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 2: // Model = 2: K5 5k86 (PR 166 MHz) - strcpy(CPUInfo.strModel, "AMD K5 5k86 (PR166)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K5 5k86 (PR166)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 3: // Model = 3: K5 5k86 (PR 200 MHz) - strcpy(CPUInfo.strModel, "AMD K5 5k86 (PR200)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K5 5k86 (PR200)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 6: // Model = 6: K6 - strcpy(CPUInfo.strModel, "AMD K6 (0.30 micron)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K6 (0.30 micron)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 7: // Model = 7: K6 (0.25 micron) - strcpy(CPUInfo.strModel, "AMD K6 (0.25 micron)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K6 (0.25 micron)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 8: // Model = 8: K6-2 - strcpy(CPUInfo.strModel, "AMD K6-2"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K6-2", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 9: // Model = 9: K6-III - strcpy(CPUInfo.strModel, "AMD K6-III"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K6-III", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 0xD: // Model = 0xD: K6-2+ / K6-III+ - strcpy(CPUInfo.strModel, "AMD K6-2+ or K6-III+ (0.18 micron)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K6-2+ or K6-III+ (0.18 micron)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - default: // ... - strcpy(CPUInfo.strModel, "Unknown AMD K5 or K6 model"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K5 or K6 (Unknown model)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - } - break; - case 6: // Family = 6: K7 processor family (AMDs first good processors) - switch (CPUInfo.uiModel) +#elif LL_DARWIN + +#include <mach/machine.h> +#include <sys/sysctl.h> + +class LLProcessorInfoDarwinImpl : public LLProcessorInfoImpl +{ +public: + LLProcessorInfoDarwinImpl() + { + getCPUIDInfo(); + uint64_t frequency = getSysctlInt64("hw.cpufrequency"); + setInfo(eFrequency, (F64)frequency / (F64)1000000); + } + + virtual ~LLProcessorInfoDarwinImpl() {} + +private: + int getSysctlInt(const char* name) + { + int result = 0; + size_t len = sizeof(int); + int error = sysctlbyname(name, (void*)&result, &len, NULL, 0); + return error == -1 ? 0 : result; + } + + uint64_t getSysctlInt64(const char* name) + { + uint64_t value = 0; + size_t size = sizeof(value); + int result = sysctlbyname(name, (void*)&value, &size, NULL, 0); + if ( result == 0 ) + { + if ( size == sizeof( uint64_t ) ) + ; + else if ( size == sizeof( uint32_t ) ) + value = (uint64_t)(( uint32_t *)&value); + else if ( size == sizeof( uint16_t ) ) + value = (uint64_t)(( uint16_t *)&value); + else if ( size == sizeof( uint8_t ) ) + value = (uint64_t)(( uint8_t *)&value); + else { - case 1: // Athlon - strcpy(CPUInfo.strModel, "AMD Athlon (0.25 micron)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD Athlon (0.25 micron)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 2: // Athlon (0.18 micron) - strcpy(CPUInfo.strModel, "AMD Athlon (0.18 micron)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD Athlon (0.18 micron)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 3: // Duron (Spitfire core) - strcpy(CPUInfo.strModel, "AMD Duron (Spitfire)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD Duron (Spitfire core)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 4: // Athlon (Thunderbird core) - strcpy(CPUInfo.strModel, "AMD Athlon (Thunderbird)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD Athlon (Thunderbird core)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 6: // Athlon MP / Mobile Athlon (Palomino core) - strcpy(CPUInfo.strModel, "AMD Athlon MP/Mobile Athlon (Palomino)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD Athlon MP/Mobile Athlon (Palomino core)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - case 7: // Mobile Duron (Morgan core) - strcpy(CPUInfo.strModel, "AMD Mobile Duron (Morgan)"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD Mobile Duron (Morgan core)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - default: // ... - strcpy(CPUInfo.strModel, "Unknown AMD K7 model"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD K7 (Unknown model)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; + LL_WARNS("Unknown type returned from sysctl!") << LL_ENDL; } - break; - default: // ... - strcpy(CPUInfo.strModel, "Unknown AMD model"); /* Flawfinder: ignore */ - strncat(strCPUName, "AMD (Unknown model)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ - break; - } - - // Now we read the standard processor extension that are stored in the same - // way the Intel standard extensions are - GetStandardProcessorExtensions(); - - // Then we check if theres an extended CPUID level support - if (CPUInfo.MaxSupportedExtendedLevel >= 0x80000001) - { - // If we can access the extended CPUID level 0x80000001 we get the - // edx register - __asm - { - mov eax, 0x80000001 - cpuid - mov edxreg, edx } - - // Now we can mask some AMD specific cpu extensions - CPUInfo._Ext.EMMX_MultimediaExtensions = CheckBit(edxreg, 22); - CPUInfo._Ext.AA64_AMD64BitArchitecture = CheckBit(edxreg, 29); - CPUInfo._Ext._E3DNOW_InstructionExtensions = CheckBit(edxreg, 30); - CPUInfo._Ext._3DNOW_InstructionExtensions = CheckBit(edxreg, 31); - } - - // After that we check if the processor supports the ext. CPUID level - // 0x80000006 - if (CPUInfo.MaxSupportedExtendedLevel >= 0x80000006) + + return result == -1 ? 0 : value; + } + + void getCPUIDInfo() { - // If it's present, we read it out - __asm - { - mov eax, 0x80000005 - cpuid - mov eaxreg, eax - mov ebxreg, ebx - mov ecxreg, ecx - mov edxreg, edx - } + size_t len = 0; - // Then we mask the L1 Data TLB information - if ((ebxreg >> 16) && (eaxreg >> 16)) - { - CPUInfo._Data.bPresent = true; - strcpy(CPUInfo._Data.strPageSize, "4 KB / 2 MB / 4MB"); /*Flawfinder: ignore*/ - CPUInfo._Data.uiAssociativeWays = (eaxreg >> 24) & 0xFF; - CPUInfo._Data.uiEntries = (eaxreg >> 16) & 0xFF; - } - else if (eaxreg >> 16) - { - CPUInfo._Data.bPresent = true; - strcpy(CPUInfo._Data.strPageSize, "2 MB / 4MB"); /*Flawfinder: ignore*/ - CPUInfo._Data.uiAssociativeWays = (eaxreg >> 24) & 0xFF; - CPUInfo._Data.uiEntries = (eaxreg >> 16) & 0xFF; - } - else if (ebxreg >> 16) - { - CPUInfo._Data.bPresent = true; - strcpy(CPUInfo._Data.strPageSize, "4 KB"); /*Flawfinder: ignore*/ - CPUInfo._Data.uiAssociativeWays = (ebxreg >> 24) & 0xFF; - CPUInfo._Data.uiEntries = (ebxreg >> 16) & 0xFF; - } - if (CPUInfo._Data.uiAssociativeWays == 0xFF) - CPUInfo._Data.uiAssociativeWays = (unsigned int) -1; - - // Now the L1 Instruction/Code TLB information - if ((ebxreg & 0xFFFF) && (eaxreg & 0xFFFF)) - { - CPUInfo._Instruction.bPresent = true; - strcpy(CPUInfo._Instruction.strPageSize, "4 KB / 2 MB / 4MB"); /*Flawfinder: ignore*/ - CPUInfo._Instruction.uiAssociativeWays = (eaxreg >> 8) & 0xFF; - CPUInfo._Instruction.uiEntries = eaxreg & 0xFF; - } - else if (eaxreg & 0xFFFF) - { - CPUInfo._Instruction.bPresent = true; - strcpy(CPUInfo._Instruction.strPageSize, "2 MB / 4MB"); /*Flawfinder: ignore*/ - CPUInfo._Instruction.uiAssociativeWays = (eaxreg >> 8) & 0xFF; - CPUInfo._Instruction.uiEntries = eaxreg & 0xFF; - } - else if (ebxreg & 0xFFFF) - { - CPUInfo._Instruction.bPresent = true; - strcpy(CPUInfo._Instruction.strPageSize, "4 KB"); /*Flawfinder: ignore*/ - CPUInfo._Instruction.uiAssociativeWays = (ebxreg >> 8) & 0xFF; - CPUInfo._Instruction.uiEntries = ebxreg & 0xFF; - } - if (CPUInfo._Instruction.uiAssociativeWays == 0xFF) - CPUInfo._Instruction.uiAssociativeWays = (unsigned int) -1; + char cpu_brand_string[0x40]; + len = sizeof(cpu_brand_string); + memset(cpu_brand_string, 0, len); + sysctlbyname("machdep.cpu.brand_string", (void*)cpu_brand_string, &len, NULL, 0); + cpu_brand_string[0x3f] = 0; + setInfo(eBrandName, cpu_brand_string); - // Then we read the L1 data cache information - if ((ecxreg >> 24) > 0) - { - CPUInfo._L1.Data.bPresent = true; - snprintf(CPUInfo._L1.Data.strSize, sizeof(CPUInfo._L1.Data.strSize), "%d KB", ecxreg >> 24); /* Flawfinder: ignore */ - CPUInfo._L1.Data.uiAssociativeWays = (ecxreg >> 15) & 0xFF; - CPUInfo._L1.Data.uiLineSize = ecxreg & 0xFF; - } - // After that we read the L2 instruction/code cache information - if ((edxreg >> 24) > 0) - { - CPUInfo._L1.Instruction.bPresent = true; - snprintf(CPUInfo._L1.Instruction.strSize, sizeof(CPUInfo._L1.Instruction.strSize), "%d KB", edxreg >> 24); /* Flawfinder: ignore */ - CPUInfo._L1.Instruction.uiAssociativeWays = (edxreg >> 15) & 0xFF; - CPUInfo._L1.Instruction.uiLineSize = edxreg & 0xFF; - } - - // Note: I'm not absolutely sure that the L1 page size code (the - // 'if/else if/else if' structs above) really detects the real page - // size for the TLB. Somebody should check it.... - - // Now we read the ext. CPUID level 0x80000006 - __asm - { - mov eax, 0x80000006 - cpuid - mov eaxreg, eax - mov ebxreg, ebx - mov ecxreg, ecx - } + char cpu_vendor[0x20]; + len = sizeof(cpu_vendor); + memset(cpu_vendor, 0, len); + sysctlbyname("machdep.cpu.vendor", (void*)cpu_vendor, &len, NULL, 0); + cpu_vendor[0x1f] = 0; + setInfo(eVendor, cpu_vendor); + + setInfo(eStepping, getSysctlInt("machdep.cpu.stepping")); + setInfo(eModel, getSysctlInt("machdep.cpu.model")); + int family = getSysctlInt("machdep.cpu.family"); + int ext_family = getSysctlInt("machdep.cpu.extfamily"); + setInfo(eFamily, family); + setInfo(eExtendedFamily, ext_family); + setInfo(eFamilyName, compute_CPUFamilyName(cpu_vendor, family, ext_family)); + setInfo(eExtendedModel, getSysctlInt("machdep.cpu.extmodel")); + setInfo(eBrandID, getSysctlInt("machdep.cpu.brand")); + setInfo(eType, 0); // ? where to find this? + + //setConfig(eCLFLUSHCacheLineSize, ((cpu_info[1] >> 8) & 0xff) * 8); + //setConfig(eAPICPhysicalID, (cpu_info[1] >> 24) & 0xff); + setConfig(eCacheLineSize, getSysctlInt("machdep.cpu.cache.linesize")); + setConfig(eL2Associativity, getSysctlInt("machdep.cpu.cache.L2_associativity")); + setConfig(eCacheSizeK, getSysctlInt("machdep.cpu.cache.size")); + + uint64_t feature_info = getSysctlInt64("machdep.cpu.feature_bits"); + S32 *feature_infos = (S32*)(&feature_info); + + setConfig(eFeatureBits, feature_infos[0]); - // We only mask the unified L2 cache masks (never heard of an - // L2 cache that is divided in data and code parts) - if (((ecxreg >> 12) & 0xF) > 0) + for(unsigned int index = 0, bit = 1; index < eSSE3_Features; ++index, bit <<= 1) { - CPUInfo._L2.bPresent = true; - snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", ecxreg >> 16); /* Flawfinder: ignore */ - switch ((ecxreg >> 12) & 0xF) + if(feature_info & bit) { - case 1: - CPUInfo._L2.uiAssociativeWays = 1; - break; - case 2: - CPUInfo._L2.uiAssociativeWays = 2; - break; - case 4: - CPUInfo._L2.uiAssociativeWays = 4; - break; - case 6: - CPUInfo._L2.uiAssociativeWays = 8; - break; - case 8: - CPUInfo._L2.uiAssociativeWays = 16; - break; - case 0xF: - CPUInfo._L2.uiAssociativeWays = (unsigned int) -1; - break; - default: - CPUInfo._L2.uiAssociativeWays = 0; - break; + setExtension(cpu_feature_names[index]); } - CPUInfo._L2.uiLineSize = ecxreg & 0xFF; } - } - else - { - // If we could not detect the ext. CPUID level 0x80000006 we - // try to read the standard processor configuration. - GetStandardProcessorConfiguration(); - } - // After reading we translate the configuration to strings - TranslateProcessorConfiguration(); - - // And finally exit - return true; -#else - return FALSE; -#endif -} - -// bool CProcessor::AnalyzeUnknownProcessor() -// ========================================== -// Private class function to analyze an unknown (No Intel or AMD) processor -/////////////////////////////////////////////////////////////////////////// -bool CProcessor::AnalyzeUnknownProcessor() -{ -#if LL_WINDOWS - unsigned long eaxreg, ebxreg; - - // We check if the CPUID command is available - if (!CheckCPUIDPresence()) - return false; - - // First of all we read the standard CPUID level 0x00000001 - // This level should be available on every x86-processor clone - __asm - { - mov eax, 1 - cpuid - mov eaxreg, eax - mov ebxreg, ebx - } - // Then we mask the processor model, family, type and stepping - CPUInfo.uiStepping = eaxreg & 0xF; - CPUInfo.uiModel = (eaxreg >> 4) & 0xF; - CPUInfo.uiFamily = (eaxreg >> 8) & 0xF; - CPUInfo.uiType = (eaxreg >> 12) & 0x3; - - // To have complete information we also mask the brand id - CPUInfo.uiBrandID = ebxreg & 0xF; - - // Then we get the standard processor extensions - GetStandardProcessorExtensions(); - - // Now we mark everything we do not know as unknown - strcpy(strCPUName, "Unknown"); /*Flawfinder: ignore*/ - - strcpy(CPUInfo._Data.strTLB, "Unknown"); /*Flawfinder: ignore*/ - strcpy(CPUInfo._Instruction.strTLB, "Unknown"); /*Flawfinder: ignore*/ - - strcpy(CPUInfo._Trace.strCache, "Unknown"); /*Flawfinder: ignore*/ - strcpy(CPUInfo._L1.Data.strCache, "Unknown"); /*Flawfinder: ignore*/ - strcpy(CPUInfo._L1.Instruction.strCache, "Unknown"); /*Flawfinder: ignore*/ - strcpy(CPUInfo._L2.strCache, "Unknown"); /*Flawfinder: ignore*/ - strcpy(CPUInfo._L3.strCache, "Unknown"); /*Flawfinder: ignore*/ - - strcpy(CPUInfo.strProcessorSerial, "Unknown / Not supported"); /*Flawfinder: ignore*/ - - // For the family, model and brand id we can only print the numeric value - snprintf(CPUInfo.strBrandID, sizeof(CPUInfo.strBrandID), "Brand-ID number %d", CPUInfo.uiBrandID); /* Flawfinder: ignore */ - snprintf(CPUInfo.strFamily, sizeof(CPUInfo.strFamily), "Family number %d", CPUInfo.uiFamily); /* Flawfinder: ignore */ - snprintf(CPUInfo.strModel, sizeof(CPUInfo.strModel), "Model number %d", CPUInfo.uiModel); /* Flawfinder: ignore */ - - // And thats it - return true; -#else - return FALSE; -#endif -} - -// bool CProcessor::CheckCPUIDPresence() -// ===================================== -// This function checks if the CPUID command is available on the current -// processor -//////////////////////////////////////////////////////////////////////// -bool CProcessor::CheckCPUIDPresence() -{ -#if LL_WINDOWS - unsigned long BitChanged; - - // We've to check if we can toggle the flag register bit 21 - // If we can't the processor does not support the CPUID command - __asm - { - pushfd - pop eax - mov ebx, eax - xor eax, 0x00200000 - push eax - popfd - pushfd - pop eax - xor eax,ebx - mov BitChanged, eax - } - return ((BitChanged) ? true : false); -#else - return FALSE; -#endif -} + // *NOTE:Mani - I didn't find any docs that assure me that machdep.cpu.feature_bits will always be + // The feature bits I think it is. Here's a test: +#ifndef LL_RELEASE_FOR_DOWNLOAD + #if defined(__i386__) && defined(__PIC__) + /* %ebx may be the PIC register. */ + #define __cpuid(level, a, b, c, d) \ + __asm__ ("xchgl\t%%ebx, %1\n\t" \ + "cpuid\n\t" \ + "xchgl\t%%ebx, %1\n\t" \ + : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ + : "0" (level)) + #else + #define __cpuid(level, a, b, c, d) \ + __asm__ ("cpuid\n\t" \ + : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ + : "0" (level)) + #endif + + unsigned int eax, ebx, ecx, edx; + __cpuid(0x1, eax, ebx, ecx, edx); + if(feature_infos[0] != (S32)edx) + { + llerrs << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << llendl; + } +#endif // LL_RELEASE_FOR_DOWNLOAD -// void CProcessor::DecodeProcessorConfiguration(unsigned int cfg) -// =============================================================== -// This function (or switch ?!) just translates a one-byte processor configuration -// byte to understandable values -////////////////////////////////////////////////////////////////////////////////// -void CProcessor::DecodeProcessorConfiguration(unsigned int cfg) -{ - // First we ensure that there's only one single byte - cfg &= 0xFF; - // Then we do a big switch - switch(cfg) - { - case 0: // cfg = 0: Unused - break; - case 0x1: // cfg = 0x1: code TLB present, 4 KB pages, 4 ways, 32 entries - CPUInfo._Instruction.bPresent = true; - strcpy(CPUInfo._Instruction.strPageSize, "4 KB"); /*Flawfinder: ignore*/ - CPUInfo._Instruction.uiAssociativeWays = 4; - CPUInfo._Instruction.uiEntries = 32; - break; - case 0x2: // cfg = 0x2: code TLB present, 4 MB pages, fully associative, 2 entries - CPUInfo._Instruction.bPresent = true; - strcpy(CPUInfo._Instruction.strPageSize, "4 MB"); /*Flawfinder: ignore*/ - CPUInfo._Instruction.uiAssociativeWays = 4; - CPUInfo._Instruction.uiEntries = 2; - break; - case 0x3: // cfg = 0x3: data TLB present, 4 KB pages, 4 ways, 64 entries - CPUInfo._Data.bPresent = true; - strcpy(CPUInfo._Data.strPageSize, "4 KB"); /*Flawfinder: ignore*/ - CPUInfo._Data.uiAssociativeWays = 4; - CPUInfo._Data.uiEntries = 64; - break; - case 0x4: // cfg = 0x4: data TLB present, 4 MB pages, 4 ways, 8 entries - CPUInfo._Data.bPresent = true; - strcpy(CPUInfo._Data.strPageSize, "4 MB"); /*Flawfinder: ignore*/ - CPUInfo._Data.uiAssociativeWays = 4; - CPUInfo._Data.uiEntries = 8; - break; - case 0x6: // cfg = 0x6: code L1 cache present, 8 KB, 4 ways, 32 byte lines - CPUInfo._L1.Instruction.bPresent = true; - strcpy(CPUInfo._L1.Instruction.strSize, "8 KB"); /*Flawfinder: ignore*/ - CPUInfo._L1.Instruction.uiAssociativeWays = 4; - CPUInfo._L1.Instruction.uiLineSize = 32; - break; - case 0x8: // cfg = 0x8: code L1 cache present, 16 KB, 4 ways, 32 byte lines - CPUInfo._L1.Instruction.bPresent = true; - strcpy(CPUInfo._L1.Instruction.strSize, "16 KB"); /*Flawfinder: ignore*/ - CPUInfo._L1.Instruction.uiAssociativeWays = 4; - CPUInfo._L1.Instruction.uiLineSize = 32; - break; - case 0xA: // cfg = 0xA: data L1 cache present, 8 KB, 2 ways, 32 byte lines - CPUInfo._L1.Data.bPresent = true; - strcpy(CPUInfo._L1.Data.strSize, "8 KB"); /*Flawfinder: ignore*/ - CPUInfo._L1.Data.uiAssociativeWays = 2; - CPUInfo._L1.Data.uiLineSize = 32; - break; - case 0xC: // cfg = 0xC: data L1 cache present, 16 KB, 4 ways, 32 byte lines - CPUInfo._L1.Data.bPresent = true; - strcpy(CPUInfo._L1.Data.strSize, "16 KB"); /*Flawfinder: ignore*/ - CPUInfo._L1.Data.uiAssociativeWays = 4; - CPUInfo._L1.Data.uiLineSize = 32; - break; - case 0x22: // cfg = 0x22: code and data L3 cache present, 512 KB, 4 ways, 64 byte lines, sectored - CPUInfo._L3.bPresent = true; - strcpy(CPUInfo._L3.strSize, "512 KB"); /*Flawfinder: ignore*/ - CPUInfo._L3.uiAssociativeWays = 4; - CPUInfo._L3.uiLineSize = 64; - CPUInfo._L3.bSectored = true; - break; - case 0x23: // cfg = 0x23: code and data L3 cache present, 1024 KB, 8 ways, 64 byte lines, sectored - CPUInfo._L3.bPresent = true; - strcpy(CPUInfo._L3.strSize, "1024 KB"); /*Flawfinder: ignore*/ - CPUInfo._L3.uiAssociativeWays = 8; - CPUInfo._L3.uiLineSize = 64; - CPUInfo._L3.bSectored = true; - break; - case 0x25: // cfg = 0x25: code and data L3 cache present, 2048 KB, 8 ways, 64 byte lines, sectored - CPUInfo._L3.bPresent = true; - strcpy(CPUInfo._L3.strSize, "2048 KB"); /*Flawfinder: ignore*/ - CPUInfo._L3.uiAssociativeWays = 8; - CPUInfo._L3.uiLineSize = 64; - CPUInfo._L3.bSectored = true; - break; - case 0x29: // cfg = 0x29: code and data L3 cache present, 4096 KB, 8 ways, 64 byte lines, sectored - CPUInfo._L3.bPresent = true; - strcpy(CPUInfo._L3.strSize, "4096 KB"); /*Flawfinder: ignore*/ - CPUInfo._L3.uiAssociativeWays = 8; - CPUInfo._L3.uiLineSize = 64; - CPUInfo._L3.bSectored = true; - break; - case 0x40: // cfg = 0x40: no integrated L2 cache (P6 core) or L3 cache (P4 core) - break; - case 0x41: // cfg = 0x41: code and data L2 cache present, 128 KB, 4 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "128 KB"); /*Flawfinder: ignore*/ - CPUInfo._L2.uiAssociativeWays = 4; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x42: // cfg = 0x42: code and data L2 cache present, 256 KB, 4 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "256 KB"); /*Flawfinder: ignore*/ - CPUInfo._L2.uiAssociativeWays = 4; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x43: // cfg = 0x43: code and data L2 cache present, 512 KB, 4 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "512 KB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 4; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x44: // cfg = 0x44: code and data L2 cache present, 1024 KB, 4 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "1 MB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 4; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x45: // cfg = 0x45: code and data L2 cache present, 2048 KB, 4 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "2 MB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 4; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x50: // cfg = 0x50: code TLB present, 4 KB / 4 MB / 2 MB pages, fully associative, 64 entries - CPUInfo._Instruction.bPresent = true; - strcpy(CPUInfo._Instruction.strPageSize, "4 KB / 2 MB / 4 MB"); /* Flawfinder: ignore */ - CPUInfo._Instruction.uiAssociativeWays = (unsigned int) -1; - CPUInfo._Instruction.uiEntries = 64; - break; - case 0x51: // cfg = 0x51: code TLB present, 4 KB / 4 MB / 2 MB pages, fully associative, 128 entries - CPUInfo._Instruction.bPresent = true; - strcpy(CPUInfo._Instruction.strPageSize, "4 KB / 2 MB / 4 MB"); /* Flawfinder: ignore */ - CPUInfo._Instruction.uiAssociativeWays = (unsigned int) -1; - CPUInfo._Instruction.uiEntries = 128; - break; - case 0x52: // cfg = 0x52: code TLB present, 4 KB / 4 MB / 2 MB pages, fully associative, 256 entries - CPUInfo._Instruction.bPresent = true; - strcpy(CPUInfo._Instruction.strPageSize, "4 KB / 2 MB / 4 MB"); /* Flawfinder: ignore */ - CPUInfo._Instruction.uiAssociativeWays = (unsigned int) -1; - CPUInfo._Instruction.uiEntries = 256; - break; - case 0x5B: // cfg = 0x5B: data TLB present, 4 KB / 4 MB pages, fully associative, 64 entries - CPUInfo._Data.bPresent = true; - strcpy(CPUInfo._Data.strPageSize, "4 KB / 4 MB"); /* Flawfinder: ignore */ - CPUInfo._Data.uiAssociativeWays = (unsigned int) -1; - CPUInfo._Data.uiEntries = 64; - break; - case 0x5C: // cfg = 0x5C: data TLB present, 4 KB / 4 MB pages, fully associative, 128 entries - CPUInfo._Data.bPresent = true; - strcpy(CPUInfo._Data.strPageSize, "4 KB / 4 MB"); /* Flawfinder: ignore */ - CPUInfo._Data.uiAssociativeWays = (unsigned int) -1; - CPUInfo._Data.uiEntries = 128; - break; - case 0x5d: // cfg = 0x5D: data TLB present, 4 KB / 4 MB pages, fully associative, 256 entries - CPUInfo._Data.bPresent = true; - strcpy(CPUInfo._Data.strPageSize, "4 KB / 4 MB"); /* Flawfinder: ignore */ - CPUInfo._Data.uiAssociativeWays = (unsigned int) -1; - CPUInfo._Data.uiEntries = 256; - break; - case 0x66: // cfg = 0x66: data L1 cache present, 8 KB, 4 ways, 64 byte lines, sectored - CPUInfo._L1.Data.bPresent = true; - strcpy(CPUInfo._L1.Data.strSize, "8 KB"); /* Flawfinder: ignore */ - CPUInfo._L1.Data.uiAssociativeWays = 4; - CPUInfo._L1.Data.uiLineSize = 64; - break; - case 0x67: // cfg = 0x67: data L1 cache present, 16 KB, 4 ways, 64 byte lines, sectored - CPUInfo._L1.Data.bPresent = true; - strcpy(CPUInfo._L1.Data.strSize, "16 KB"); /* Flawfinder: ignore */ - CPUInfo._L1.Data.uiAssociativeWays = 4; - CPUInfo._L1.Data.uiLineSize = 64; - break; - case 0x68: // cfg = 0x68: data L1 cache present, 32 KB, 4 ways, 64 byte lines, sectored - CPUInfo._L1.Data.bPresent = true; - strcpy(CPUInfo._L1.Data.strSize, "32 KB"); /* Flawfinder: ignore */ - CPUInfo._L1.Data.uiAssociativeWays = 4; - CPUInfo._L1.Data.uiLineSize = 64; - break; - case 0x70: // cfg = 0x70: trace L1 cache present, 12 KuOPs, 4 ways - CPUInfo._Trace.bPresent = true; - strcpy(CPUInfo._Trace.strSize, "12 K-micro-ops"); /* Flawfinder: ignore */ - CPUInfo._Trace.uiAssociativeWays = 4; - break; - case 0x71: // cfg = 0x71: trace L1 cache present, 16 KuOPs, 4 ways - CPUInfo._Trace.bPresent = true; - strcpy(CPUInfo._Trace.strSize, "16 K-micro-ops"); /* Flawfinder: ignore */ - CPUInfo._Trace.uiAssociativeWays = 4; - break; - case 0x72: // cfg = 0x72: trace L1 cache present, 32 KuOPs, 4 ways - CPUInfo._Trace.bPresent = true; - strcpy(CPUInfo._Trace.strSize, "32 K-micro-ops"); /* Flawfinder: ignore */ - CPUInfo._Trace.uiAssociativeWays = 4; - break; - case 0x79: // cfg = 0x79: code and data L2 cache present, 128 KB, 8 ways, 64 byte lines, sectored - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "128 KB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 64; - CPUInfo._L2.bSectored = true; - break; - case 0x7A: // cfg = 0x7A: code and data L2 cache present, 256 KB, 8 ways, 64 byte lines, sectored - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "256 KB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 64; - CPUInfo._L2.bSectored = true; - break; - case 0x7B: // cfg = 0x7B: code and data L2 cache present, 512 KB, 8 ways, 64 byte lines, sectored - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "512 KB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 64; - CPUInfo._L2.bSectored = true; - break; - case 0x7C: // cfg = 0x7C: code and data L2 cache present, 1024 KB, 8 ways, 64 byte lines, sectored - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "1 MB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 64; - CPUInfo._L2.bSectored = true; - break; - case 0x81: // cfg = 0x81: code and data L2 cache present, 128 KB, 8 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "128 KB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x82: // cfg = 0x82: code and data L2 cache present, 256 KB, 8 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "256 KB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x83: // cfg = 0x83: code and data L2 cache present, 512 KB, 8 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "512 KB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x84: // cfg = 0x84: code and data L2 cache present, 1024 KB, 8 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "1 MB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 32; - break; - case 0x85: // cfg = 0x85: code and data L2 cache present, 2048 KB, 8 ways, 32 byte lines - CPUInfo._L2.bPresent = true; - strcpy(CPUInfo._L2.strSize, "2 MB"); /* Flawfinder: ignore */ - CPUInfo._L2.uiAssociativeWays = 8; - CPUInfo._L2.uiLineSize = 32; - break; + uint64_t ext_feature_info = getSysctlInt64("machdep.cpu.extfeature_bits"); + S32 *ext_feature_infos = (S32*)(&ext_feature_info); + setConfig(eExtFeatureBits, ext_feature_infos[0]); } -} +}; -FORCEINLINE static char *TranslateAssociativeWays(unsigned int uiWays, char *buf) -{ - // We define 0xFFFFFFFF (= -1) as fully associative - if (uiWays == ((unsigned int) -1)) - strcpy(buf, "fully associative"); /* Flawfinder: ignore */ - else - { - if (uiWays == 1) // A one way associative cache is just direct mapped - strcpy(buf, "direct mapped"); /* Flawfinder: ignore */ - else if (uiWays == 0) // This should not happen... - strcpy(buf, "unknown associative ways"); /* Flawfinder: ignore */ - else // The x-way associative cache - sprintf(buf, "%d ways associative", uiWays); /* Flawfinder: ignore */ - } - // To ease the function use we return the buffer - return buf; -} -FORCEINLINE static void TranslateTLB(ProcessorTLB *tlb) -{ - char buf[64]; /* Flawfinder: ignore */ +#elif LL_LINUX +const char CPUINFO_FILE[] = "/proc/cpuinfo"; - // We just check if the TLB is present - if (tlb->bPresent) - snprintf(tlb->strTLB,sizeof(tlb->strTLB), "%s page size, %s, %d entries", tlb->strPageSize, TranslateAssociativeWays(tlb->uiAssociativeWays, buf), tlb->uiEntries); /* Flawfinder: ignore */ - else - strcpy(tlb->strTLB, "Not present"); /* Flawfinder: ignore */ -} -FORCEINLINE static void TranslateCache(ProcessorCache *cache) +class LLProcessorInfoLinuxImpl : public LLProcessorInfoImpl { - char buf[64]; /* Flawfinder: ignore */ - - // We just check if the cache is present - if (cache->bPresent) - { - // If present we construct the string - snprintf(cache->strCache, sizeof(cache->strCache), "%s cache size, %s, %d bytes line size", cache->strSize, TranslateAssociativeWays(cache->uiAssociativeWays, buf), cache->uiLineSize); /* Flawfinder: ignore */ - if (cache->bSectored) - strncat(cache->strCache, ", sectored", sizeof(cache->strCache)-strlen(cache->strCache)-1); /* Flawfinder: ignore */ - } - else +public: + LLProcessorInfoLinuxImpl() { - // Else we just say "Not present" - strcpy(cache->strCache, "Not present"); /* Flawfinder: ignore */ + get_proc_cpuinfo(); } -} - -// void CProcessor::TranslateProcessorConfiguration() -// ================================================== -// Private class function to translate the processor configuration values -// to strings -///////////////////////////////////////////////////////////////////////// -void CProcessor::TranslateProcessorConfiguration() -{ - // We just call the small functions defined above - TranslateTLB(&CPUInfo._Data); - TranslateTLB(&CPUInfo._Instruction); - TranslateCache(&CPUInfo._Trace); + virtual ~LLProcessorInfoLinuxImpl() {} +private: - TranslateCache(&CPUInfo._L1.Instruction); - TranslateCache(&CPUInfo._L1.Data); - TranslateCache(&CPUInfo._L2); - TranslateCache(&CPUInfo._L3); -} - -// void CProcessor::GetStandardProcessorConfiguration() -// ==================================================== -// Private class function to read the standard processor configuration -////////////////////////////////////////////////////////////////////// -void CProcessor::GetStandardProcessorConfiguration() -{ -#if LL_WINDOWS - unsigned long eaxreg, ebxreg, ecxreg, edxreg; - - // We check if the CPUID function is available - if (!CheckCPUIDPresence()) - return; - - // First we check if the processor supports the standard - // CPUID level 0x00000002 - if (CPUInfo.MaxSupportedLevel >= 2) + void get_proc_cpuinfo() { - // Now we go read the std. CPUID level 0x00000002 the first time - unsigned long count, num = 255; - for (count = 0; count < num; count++) + std::map< std::string, std::string > cpuinfo; + LLFILE* cpuinfo_fp = LLFile::fopen(CPUINFO_FILE, "rb"); + if(cpuinfo_fp) { - __asm - { - mov eax, 2 - cpuid - mov eaxreg, eax - mov ebxreg, ebx - mov ecxreg, ecx - mov edxreg, edx - } - // We have to repeat this reading for 'num' times - num = eaxreg & 0xFF; - - // Then we call the big decode switch function - DecodeProcessorConfiguration(eaxreg >> 8); - DecodeProcessorConfiguration(eaxreg >> 16); - DecodeProcessorConfiguration(eaxreg >> 24); - - // If ebx contains additional data we also decode it - if ((ebxreg & 0x80000000) == 0) + char line[MAX_STRING]; + memset(line, 0, MAX_STRING); + while(fgets(line, MAX_STRING, cpuinfo_fp)) { - DecodeProcessorConfiguration(ebxreg); - DecodeProcessorConfiguration(ebxreg >> 8); - DecodeProcessorConfiguration(ebxreg >> 16); - DecodeProcessorConfiguration(ebxreg >> 24); - } - // And also the ecx register - if ((ecxreg & 0x80000000) == 0) - { - DecodeProcessorConfiguration(ecxreg); - DecodeProcessorConfiguration(ecxreg >> 8); - DecodeProcessorConfiguration(ecxreg >> 16); - DecodeProcessorConfiguration(ecxreg >> 24); - } - // At last the edx processor register - if ((edxreg & 0x80000000) == 0) - { - DecodeProcessorConfiguration(edxreg); - DecodeProcessorConfiguration(edxreg >> 8); - DecodeProcessorConfiguration(edxreg >> 16); - DecodeProcessorConfiguration(edxreg >> 24); + // /proc/cpuinfo on Linux looks like: + // name\t*: value\n + char* tabspot = strchr( line, '\t' ); + if (tabspot == NULL) + continue; + char* colspot = strchr( tabspot, ':' ); + if (colspot == NULL) + continue; + char* spacespot = strchr( colspot, ' ' ); + if (spacespot == NULL) + continue; + char* nlspot = strchr( line, '\n' ); + if (nlspot == NULL) + nlspot = line + strlen( line ); // Fallback to terminating NUL + std::string linename( line, tabspot ); + std::string llinename(linename); + LLStringUtil::toLower(llinename); + std::string lineval( spacespot + 1, nlspot ); + cpuinfo[ llinename ] = lineval; } + fclose(cpuinfo_fp); + } +# if LL_X86 + +// *NOTE:Mani - eww, macros! srry. +#define LLPI_SET_INFO_STRING(llpi_id, cpuinfo_id) \ + if (!cpuinfo[cpuinfo_id].empty()) \ + { setInfo(llpi_id, cpuinfo[cpuinfo_id]);} + +#define LLPI_SET_INFO_INT(llpi_id, cpuinfo_id) \ + {\ + S32 result; \ + if (!cpuinfo[cpuinfo_id].empty() \ + && LLStringUtil::convertToS32(cpuinfo[cpuinfo_id], result)) \ + { setInfo(llpi_id, result);} \ + } + + F64 mhz; + if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz) + && 200.0 < mhz && mhz < 10000.0) + { + setInfo(eFrequency,(F64)(mhz)); } - } -#endif -} -// void CProcessor::GetStandardProcessorExtensions() -// ================================================= -// Private class function to read the standard processor extensions -/////////////////////////////////////////////////////////////////// -void CProcessor::GetStandardProcessorExtensions() -{ -#if LL_WINDOWS - unsigned long ebxreg, edxreg; + LLPI_SET_INFO_STRING(eBrandName, "model name"); + LLPI_SET_INFO_STRING(eVendor, "vendor_id"); - // We check if the CPUID command is available - if (!CheckCPUIDPresence()) - return; - // We just get the standard CPUID level 0x00000001 which should be - // available on every x86 processor - __asm - { - mov eax, 1 - cpuid - mov ebxreg, ebx - mov edxreg, edx - } - - // Then we mask some bits - CPUInfo._Ext.FPU_FloatingPointUnit = CheckBit(edxreg, 0); - CPUInfo._Ext.VME_Virtual8086ModeEnhancements = CheckBit(edxreg, 1); - CPUInfo._Ext.DE_DebuggingExtensions = CheckBit(edxreg, 2); - CPUInfo._Ext.PSE_PageSizeExtensions = CheckBit(edxreg, 3); - CPUInfo._Ext.TSC_TimeStampCounter = CheckBit(edxreg, 4); - CPUInfo._Ext.MSR_ModelSpecificRegisters = CheckBit(edxreg, 5); - CPUInfo._Ext.PAE_PhysicalAddressExtension = CheckBit(edxreg, 6); - CPUInfo._Ext.MCE_MachineCheckException = CheckBit(edxreg, 7); - CPUInfo._Ext.CX8_COMPXCHG8B_Instruction = CheckBit(edxreg, 8); - CPUInfo._Ext.APIC_AdvancedProgrammableInterruptController = CheckBit(edxreg, 9); - CPUInfo._Ext.APIC_ID = (ebxreg >> 24) & 0xFF; - CPUInfo._Ext.SEP_FastSystemCall = CheckBit(edxreg, 11); - CPUInfo._Ext.MTRR_MemoryTypeRangeRegisters = CheckBit(edxreg, 12); - CPUInfo._Ext.PGE_PTE_GlobalFlag = CheckBit(edxreg, 13); - CPUInfo._Ext.MCA_MachineCheckArchitecture = CheckBit(edxreg, 14); - CPUInfo._Ext.CMOV_ConditionalMoveAndCompareInstructions = CheckBit(edxreg, 15); - CPUInfo._Ext.FGPAT_PageAttributeTable = CheckBit(edxreg, 16); - CPUInfo._Ext.PSE36_36bitPageSizeExtension = CheckBit(edxreg, 17); - CPUInfo._Ext.PN_ProcessorSerialNumber = CheckBit(edxreg, 18); - CPUInfo._Ext.CLFSH_CFLUSH_Instruction = CheckBit(edxreg, 19); - CPUInfo._Ext.CLFLUSH_InstructionCacheLineSize = (ebxreg >> 8) & 0xFF; - CPUInfo._Ext.DS_DebugStore = CheckBit(edxreg, 21); - CPUInfo._Ext.ACPI_ThermalMonitorAndClockControl = CheckBit(edxreg, 22); - CPUInfo._Ext.MMX_MultimediaExtensions = CheckBit(edxreg, 23); - CPUInfo._Ext.FXSR_FastStreamingSIMD_ExtensionsSaveRestore = CheckBit(edxreg, 24); - CPUInfo._Ext.SSE_StreamingSIMD_Extensions = CheckBit(edxreg, 25); - CPUInfo._Ext.SSE2_StreamingSIMD2_Extensions = CheckBit(edxreg, 26); - CPUInfo._Ext.Altivec_Extensions = false; - CPUInfo._Ext.SS_SelfSnoop = CheckBit(edxreg, 27); - CPUInfo._Ext.HT_HyperThreading = CheckBit(edxreg, 28); - CPUInfo._Ext.HT_HyterThreadingSiblings = (ebxreg >> 16) & 0xFF; - CPUInfo._Ext.TM_ThermalMonitor = CheckBit(edxreg, 29); - CPUInfo._Ext.IA64_Intel64BitArchitecture = CheckBit(edxreg, 30); -#endif -} + LLPI_SET_INFO_INT(eStepping, "stepping"); + LLPI_SET_INFO_INT(eModel, "model"); -// const ProcessorInfo *CProcessor::GetCPUInfo() -// ============================================= -// Calls all the other detection function to create an detailed -// processor information -/////////////////////////////////////////////////////////////// -const ProcessorInfo *CProcessor::GetCPUInfo() -{ -#if LL_WINDOWS - unsigned long eaxreg, ebxreg, ecxreg, edxreg; + + S32 family; + if (!cpuinfo["cpu family"].empty() + && LLStringUtil::convertToS32(cpuinfo["cpu family"], family)) + { + setInfo(eFamily, family); + } - // First of all we check if the CPUID command is available - if (!CheckCPUIDPresence()) - return NULL; + setInfo(eFamilyName, compute_CPUFamilyName(cpuinfo["vendor_id"].c_str(), family)); - // We read the standard CPUID level 0x00000000 which should - // be available on every x86 processor - __asm - { - mov eax, 0 - cpuid - mov eaxreg, eax - mov ebxreg, ebx - mov edxreg, edx - mov ecxreg, ecx - } - // Then we connect the single register values to the vendor string - *((unsigned long *) CPUInfo.strVendor) = ebxreg; - *((unsigned long *) (CPUInfo.strVendor+4)) = edxreg; - *((unsigned long *) (CPUInfo.strVendor+8)) = ecxreg; - // Null terminate for string comparisons below. - CPUInfo.strVendor[12] = 0; - - // We can also read the max. supported standard CPUID level - CPUInfo.MaxSupportedLevel = eaxreg & 0xFFFF; - - // Then we read the ext. CPUID level 0x80000000 - __asm - { - mov eax, 0x80000000 - cpuid - mov eaxreg, eax - } - // ...to check the max. supportted extended CPUID level - CPUInfo.MaxSupportedExtendedLevel = eaxreg; - - // Then we switch to the specific processor vendors - // See http://www.sandpile.org/ia32/cpuid.htm - if (!strcmp(CPUInfo.strVendor, "GenuineIntel")) - { - AnalyzeIntelProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "AuthenticAMD")) - { - AnalyzeAMDProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "UMC UMC UMC")) - { - AnalyzeUnknownProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "CyrixInstead")) - { - AnalyzeUnknownProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "NexGenDriven")) - { - AnalyzeUnknownProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "CentaurHauls")) - { - AnalyzeUnknownProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "RiseRiseRise")) - { - AnalyzeUnknownProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "SiS SiS SiS")) - { - AnalyzeUnknownProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "GenuineTMx86")) - { - // Transmeta - AnalyzeUnknownProcessor(); - } - else if (!strcmp(CPUInfo.strVendor, "Geode by NSC")) - { - AnalyzeUnknownProcessor(); - } - else - { - AnalyzeUnknownProcessor(); - } -#endif - // After all we return the class CPUInfo member var - return (&CPUInfo); -} + // setInfo(eExtendedModel, getSysctlInt("machdep.cpu.extmodel")); + // setInfo(eBrandID, getSysctlInt("machdep.cpu.brand")); + // setInfo(eType, 0); // ? where to find this? -#elif LL_SOLARIS -#include <kstat.h> - -#if defined(__i386) -#include <sys/auxv.h> -#endif - -// ====================== -// Class constructor: -///////////////////////// -CProcessor::CProcessor() -{ - uqwFrequency = 0; - strCPUName[0] = 0; - memset(&CPUInfo, 0, sizeof(CPUInfo)); -} - -// unsigned __int64 CProcessor::GetCPUFrequency(unsigned int uiMeasureMSecs) -// ========================================================================= -// Function to query the current CPU frequency -//////////////////////////////////////////////////////////////////////////// -F64 CProcessor::GetCPUFrequency(unsigned int /*uiMeasureMSecs*/) -{ - if(uqwFrequency == 0){ - GetCPUInfo(); - } - - return uqwFrequency; -} - -// const ProcessorInfo *CProcessor::GetCPUInfo() -// ============================================= -// Calls all the other detection function to create an detailed -// processor information -/////////////////////////////////////////////////////////////// -const ProcessorInfo *CProcessor::GetCPUInfo() -{ - // In Solaris the CPU info is in the kstats - // try "psrinfo" or "kstat cpu_info" to see all - // that's available - int ncpus=0, i; - kstat_ctl_t *kc; - kstat_t *ks; - kstat_named_t *ksinfo, *ksi; - kstat_t *CPU_stats_list; - - kc = kstat_open(); - - if((int)kc == -1){ - llwarns << "kstat_open(0 failed!" << llendl; - return (&CPUInfo); - } - - for (ks = kc->kc_chain; ks != NULL; ks = ks->ks_next) { - if (strncmp(ks->ks_module, "cpu_info", 8) == 0 && - strncmp(ks->ks_name, "cpu_info", 8) == 0) - ncpus++; - } - - if(ncpus < 1){ - llwarns << "No cpus found in kstats!" << llendl; - return (&CPUInfo); - } - - for (ks = kc->kc_chain; ks; ks = ks->ks_next) { - if (strncmp(ks->ks_module, "cpu_info", 8) == 0 - && strncmp(ks->ks_name, "cpu_info", 8) == 0 - && kstat_read(kc, ks, NULL) != -1){ - CPU_stats_list = ks; // only looking at the first CPU - - break; - } - } - - if(ncpus > 1) - snprintf(strCPUName, sizeof(strCPUName), "%d x ", ncpus); - - kstat_read(kc, CPU_stats_list, NULL); - ksinfo = (kstat_named_t *)CPU_stats_list->ks_data; - for(i=0; i < (int)(CPU_stats_list->ks_ndata); ++i){ // Walk the kstats for this cpu gathering what we need - ksi = ksinfo++; - if(!strcmp(ksi->name, "brand")){ - strncat(strCPUName, (char *)KSTAT_NAMED_STR_PTR(ksi), - sizeof(strCPUName)-strlen(strCPUName)-1); - strncat(CPUInfo.strFamily, (char *)KSTAT_NAMED_STR_PTR(ksi), - sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); - strncpy(CPUInfo.strBrandID, strCPUName,sizeof(CPUInfo.strBrandID)-1); - CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; - // DEBUG llinfos << "CPU brand: " << strCPUName << llendl; - continue; - } + //setConfig(eCLFLUSHCacheLineSize, ((cpu_info[1] >> 8) & 0xff) * 8); + //setConfig(eAPICPhysicalID, (cpu_info[1] >> 24) & 0xff); + //setConfig(eCacheLineSize, getSysctlInt("machdep.cpu.cache.linesize")); + //setConfig(eL2Associativity, getSysctlInt("machdep.cpu.cache.L2_associativity")); + //setConfig(eCacheSizeK, getSysctlInt("machdep.cpu.cache.size")); + + // Read extensions + std::string flags = " " + cpuinfo["flags"] + " "; + LLStringUtil::toLower(flags); - if(!strcmp(ksi->name, "clock_MHz")){ -#if defined(__sparc) - llinfos << "Raw kstat clock rate is: " << ksi->value.l << llendl; - uqwFrequency = (F64)(ksi->value.l * 1000000); -#else - uqwFrequency = (F64)(ksi->value.i64 * 1000000); -#endif - //DEBUG llinfos << "CPU frequency: " << uqwFrequency << llendl; - continue; + if( flags.find( " sse " ) != std::string::npos ) + { + setExtension(cpu_feature_names[eSSE_Ext]); } -#if defined(__i386) - if(!strcmp(ksi->name, "vendor_id")){ - strncpy(CPUInfo.strVendor, (char *)KSTAT_NAMED_STR_PTR(ksi), sizeof(CPUInfo.strVendor)-1); - // DEBUG llinfos << "CPU vendor: " << CPUInfo.strVendor << llendl; - continue; + if( flags.find( " sse2 " ) != std::string::npos ) + { + setExtension(cpu_feature_names[eSSE2_Ext]); } -#endif - } - - kstat_close(kc); - -#if defined(__sparc) // SPARC does not define a vendor string in kstat - strncpy(CPUInfo.strVendor, "Sun Microsystems, Inc.", sizeof(CPUInfo.strVendor)-1); -#endif - - // DEBUG llinfo << "The system has " << ncpus << " CPUs with a clock rate of " << uqwFrequency << "MHz." << llendl; - -#if defined (__i386) // we really don't care about the CPU extensions on SPARC but on x86... - - // Now get cpu extensions - - uint_t ui; - - (void) getisax(&ui, 1); - if(ui & AV_386_FPU) - CPUInfo._Ext.FPU_FloatingPointUnit = true; - if(ui & AV_386_CX8) - CPUInfo._Ext.CX8_COMPXCHG8B_Instruction = true; - if(ui & AV_386_MMX) - CPUInfo._Ext.MMX_MultimediaExtensions = true; - if(ui & AV_386_AMD_MMX) - CPUInfo._Ext.MMX_MultimediaExtensions = true; - if(ui & AV_386_FXSR) - CPUInfo._Ext.FXSR_FastStreamingSIMD_ExtensionsSaveRestore = true; - if(ui & AV_386_SSE) - CPUInfo._Ext.SSE_StreamingSIMD_Extensions = true; - if(ui & AV_386_SSE2) - CPUInfo._Ext.SSE2_StreamingSIMD2_Extensions = true; -/* Left these here since they may get used later - if(ui & AV_386_SSE3) - CPUInfo._Ext.... = true; - if(ui & AV_386_AMD_3DNow) - CPUInfo._Ext.... = true; - if(ui & AV_386_AMD_3DNowx) - CPUInfo._Ext.... = true; -*/ -#endif - return (&CPUInfo); -} - -#else -// LL_DARWIN - -#include <mach/machine.h> -#include <sys/sysctl.h> - -static char *TranslateAssociativeWays(unsigned int uiWays, char *buf) -{ - // We define 0xFFFFFFFF (= -1) as fully associative - if (uiWays == ((unsigned int) -1)) - strcpy(buf, "fully associative"); /* Flawfinder: ignore */ - else - { - if (uiWays == 1) // A one way associative cache is just direct mapped - strcpy(buf, "direct mapped"); /* Flawfinder: ignore */ - else if (uiWays == 0) // This should not happen... - strcpy(buf, "unknown associative ways"); /* Flawfinder: ignore */ - else // The x-way associative cache - sprintf(buf, "%d ways associative", uiWays); /* Flawfinder: ignore */ +# endif // LL_X86 } - // To ease the function use we return the buffer - return buf; -} -static void TranslateTLB(ProcessorTLB *tlb) -{ - char buf[64]; /* Flawfinder: ignore */ - - // We just check if the TLB is present - if (tlb->bPresent) - snprintf(tlb->strTLB, sizeof(tlb->strTLB), "%s page size, %s, %d entries", tlb->strPageSize, TranslateAssociativeWays(tlb->uiAssociativeWays, buf), tlb->uiEntries); /* Flawfinder: ignore */ - else - strcpy(tlb->strTLB, "Not present"); /* Flawfinder: ignore */ -} -static void TranslateCache(ProcessorCache *cache) -{ - char buf[64]; /* Flawfinder: ignore */ - // We just check if the cache is present - if (cache->bPresent) + std::string getCPUFeatureDescription() const { - // If present we construct the string - snprintf(cache->strCache,sizeof(cache->strCache), "%s cache size, %s, %d bytes line size", cache->strSize, TranslateAssociativeWays(cache->uiAssociativeWays, buf), cache->uiLineSize); /* Flawfinder: ignore */ - if (cache->bSectored) - strncat(cache->strCache, ", sectored", sizeof(cache->strCache)-strlen(cache->strCache)-1); /* Flawfinder: ignore */ - } - else - { - // Else we just say "Not present" - strcpy(cache->strCache, "Not present"); /* Flawfinder: ignore */ - } -} - -// void CProcessor::TranslateProcessorConfiguration() -// ================================================== -// Private class function to translate the processor configuration values -// to strings -///////////////////////////////////////////////////////////////////////// -void CProcessor::TranslateProcessorConfiguration() -{ - // We just call the small functions defined above - TranslateTLB(&CPUInfo._Data); - TranslateTLB(&CPUInfo._Instruction); - - TranslateCache(&CPUInfo._Trace); + std::ostringstream s; - TranslateCache(&CPUInfo._L1.Instruction); - TranslateCache(&CPUInfo._L1.Data); - TranslateCache(&CPUInfo._L2); - TranslateCache(&CPUInfo._L3); -} - -// CProcessor::CProcessor -// ====================== -// Class constructor: -///////////////////////// -CProcessor::CProcessor() -{ - uqwFrequency = 0; - strCPUName[0] = 0; - memset(&CPUInfo, 0, sizeof(CPUInfo)); -} - -// unsigned __int64 CProcessor::GetCPUFrequency(unsigned int uiMeasureMSecs) -// ========================================================================= -// Function to query the current CPU frequency -//////////////////////////////////////////////////////////////////////////// -F64 CProcessor::GetCPUFrequency(unsigned int /*uiMeasureMSecs*/) -{ - U64 frequency = 0; - size_t len = sizeof(frequency); - - if(sysctlbyname("hw.cpufrequency", &frequency, &len, NULL, 0) == 0) - { - uqwFrequency = (F64)frequency; - } - - return uqwFrequency; -} - -static bool hasFeature(const char *name) -{ - bool result = false; - int val = 0; - size_t len = sizeof(val); - - if(sysctlbyname(name, &val, &len, NULL, 0) == 0) - { - if(val != 0) - result = true; - } - - return result; -} - -// const ProcessorInfo *CProcessor::GetCPUInfo() -// ============================================= -// Calls all the other detection function to create an detailed -// processor information -/////////////////////////////////////////////////////////////// -const ProcessorInfo *CProcessor::GetCPUInfo() -{ - int pagesize = 0; - int cachelinesize = 0; - int l1icachesize = 0; - int l1dcachesize = 0; - int l2settings = 0; - int l2cachesize = 0; - int l3settings = 0; - int l3cachesize = 0; - int ncpu = 0; - int cpusubtype = 0; - - // sysctl knows all. - int mib[2]; - size_t len; - mib[0] = CTL_HW; - - mib[1] = HW_PAGESIZE; - len = sizeof(pagesize); - sysctl(mib, 2, &pagesize, &len, NULL, 0); - - mib[1] = HW_CACHELINE; - len = sizeof(cachelinesize); - sysctl(mib, 2, &cachelinesize, &len, NULL, 0); - - mib[1] = HW_L1ICACHESIZE; - len = sizeof(l1icachesize); - sysctl(mib, 2, &l1icachesize, &len, NULL, 0); - - mib[1] = HW_L1DCACHESIZE; - len = sizeof(l1dcachesize); - sysctl(mib, 2, &l1dcachesize, &len, NULL, 0); - - mib[1] = HW_L2SETTINGS; - len = sizeof(l2settings); - sysctl(mib, 2, &l2settings, &len, NULL, 0); - - mib[1] = HW_L2CACHESIZE; - len = sizeof(l2cachesize); - sysctl(mib, 2, &l2cachesize, &len, NULL, 0); - - mib[1] = HW_L3SETTINGS; - len = sizeof(l3settings); - sysctl(mib, 2, &l3settings, &len, NULL, 0); - - mib[1] = HW_L3CACHESIZE; - len = sizeof(l3cachesize); - sysctl(mib, 2, &l3cachesize, &len, NULL, 0); - - mib[1] = HW_NCPU; - len = sizeof(ncpu); - sysctl(mib, 2, &ncpu, &len, NULL, 0); - - sysctlbyname("hw.cpusubtype", &cpusubtype, &len, NULL, 0); - - strCPUName[0] = 0; - - if((ncpu == 0) || (ncpu == 1)) - { - // Uhhh... - } - else if(ncpu == 2) - { - strncat(strCPUName, "Dual ", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - } - else - { - snprintf(strCPUName, sizeof(strCPUName), "%d x ", ncpu); /* Flawfinder: ignore */ - } - -#if __ppc__ - switch(cpusubtype) - { - case CPU_SUBTYPE_POWERPC_601:// ((cpu_subtype_t) 1) - strncat(strCPUName, "PowerPC 601", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - - break; - case CPU_SUBTYPE_POWERPC_602:// ((cpu_subtype_t) 2) - strncat(strCPUName, "PowerPC 602", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_603:// ((cpu_subtype_t) 3) - strncat(strCPUName, "PowerPC 603", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_603e:// ((cpu_subtype_t) 4) - strncat(strCPUName, "PowerPC 603e", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_603ev:// ((cpu_subtype_t) 5) - strncat(strCPUName, "PowerPC 603ev", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_604:// ((cpu_subtype_t) 6) - strncat(strCPUName, "PowerPC 604", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_604e:// ((cpu_subtype_t) 7) - strncat(strCPUName, "PowerPC 604e", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_620:// ((cpu_subtype_t) 8) - strncat(strCPUName, "PowerPC 620", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_750:// ((cpu_subtype_t) 9) - strncat(strCPUName, "PowerPC 750", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC G3", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_7400:// ((cpu_subtype_t) 10) - strncat(strCPUName, "PowerPC 7400", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC G4", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_7450:// ((cpu_subtype_t) 11) - strncat(strCPUName, "PowerPC 7450", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC G4", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - case CPU_SUBTYPE_POWERPC_970:// ((cpu_subtype_t) 100) - strncat(strCPUName, "PowerPC 970", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - strncat(CPUInfo.strFamily, "PowerPC G5", sizeof(CPUInfo.strFamily)-strlen(CPUInfo.strFamily)-1); /* Flawfinder: ignore */ - break; - - default: - strncat(strCPUName, "PowerPC (Unknown)", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - } - - CPUInfo._Ext.EMMX_MultimediaExtensions = - CPUInfo._Ext.MMX_MultimediaExtensions = - CPUInfo._Ext.SSE_StreamingSIMD_Extensions = - CPUInfo._Ext.SSE2_StreamingSIMD2_Extensions = false; - - CPUInfo._Ext.Altivec_Extensions = hasFeature("hw.optional.altivec"); - -#endif - -#if __i386__ - // MBW -- XXX -- TODO -- make this call AnalyzeIntelProcessor()? - switch(cpusubtype) - { - default: - strncat(strCPUName, "i386 (Unknown)", sizeof(strCPUName)-strlen(strCPUName)-1); /* Flawfinder: ignore */ - break; - } - - CPUInfo._Ext.EMMX_MultimediaExtensions = hasFeature("hw.optional.mmx"); // MBW -- XXX -- this may be wrong... - CPUInfo._Ext.MMX_MultimediaExtensions = hasFeature("hw.optional.mmx"); - CPUInfo._Ext.SSE_StreamingSIMD_Extensions = hasFeature("hw.optional.sse"); - CPUInfo._Ext.SSE2_StreamingSIMD2_Extensions = hasFeature("hw.optional.sse2"); - CPUInfo._Ext.Altivec_Extensions = false; - CPUInfo._Ext.AA64_AMD64BitArchitecture = hasFeature("hw.optional.x86_64"); - -#endif - - // Terse CPU info uses this string... - strncpy(CPUInfo.strBrandID, strCPUName,sizeof(CPUInfo.strBrandID)-1); /* Flawfinder: ignore */ - CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; - - // Fun cache config stuff... - - if(l1dcachesize != 0) - { - CPUInfo._L1.Data.bPresent = true; - snprintf(CPUInfo._L1.Data.strSize, sizeof(CPUInfo._L1.Data.strSize), "%d KB", l1dcachesize / 1024); /* Flawfinder: ignore */ -// CPUInfo._L1.Data.uiAssociativeWays = ???; - CPUInfo._L1.Data.uiLineSize = cachelinesize; + // *NOTE:Mani - This is for linux only. + LLFILE* cpuinfo = LLFile::fopen(CPUINFO_FILE, "rb"); + if(cpuinfo) + { + char line[MAX_STRING]; + memset(line, 0, MAX_STRING); + while(fgets(line, MAX_STRING, cpuinfo)) + { + line[strlen(line)-1] = ' '; + s << line; + s << std::endl; + } + fclose(cpuinfo); + s << std::endl; + } + else + { + s << "Unable to collect processor information" << std::endl; + } + return s.str(); } + +}; - if(l1icachesize != 0) - { - CPUInfo._L1.Instruction.bPresent = true; - snprintf(CPUInfo._L1.Instruction.strSize, sizeof(CPUInfo._L1.Instruction.strSize), "%d KB", l1icachesize / 1024); /* Flawfinder: ignore */ -// CPUInfo._L1.Instruction.uiAssociativeWays = ???; - CPUInfo._L1.Instruction.uiLineSize = cachelinesize; - } - if(l2cachesize != 0) - { - CPUInfo._L2.bPresent = true; - snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", l2cachesize / 1024); /* Flawfinder: ignore */ -// CPUInfo._L2.uiAssociativeWays = ???; - CPUInfo._L2.uiLineSize = cachelinesize; - } +#endif // LL_MSVC elif LL_DARWIN elif LL_LINUX - if(l3cachesize != 0) - { - CPUInfo._L2.bPresent = true; - snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", l3cachesize / 1024); /* Flawfinder: ignore */ -// CPUInfo._L2.uiAssociativeWays = ???; - CPUInfo._L2.uiLineSize = cachelinesize; +////////////////////////////////////////////////////// +// Interface definition +LLProcessorInfo::LLProcessorInfo() : mImpl(NULL) +{ + // *NOTE:Mani - not thread safe. + if(!mImpl) + { +#ifdef LL_MSVC + static LLProcessorInfoWindowsImpl the_impl; + mImpl = &the_impl; +#elif LL_DARWIN + static LLProcessorInfoDarwinImpl the_impl; + mImpl = &the_impl; +#else + static LLProcessorInfoLinuxImpl the_impl; + mImpl = &the_impl; +#endif // LL_MSVC } - - CPUInfo._Ext.FPU_FloatingPointUnit = hasFeature("hw.optional.floatingpoint"); - -// printf("pagesize = 0x%x\n", pagesize); -// printf("cachelinesize = 0x%x\n", cachelinesize); -// printf("l1icachesize = 0x%x\n", l1icachesize); -// printf("l1dcachesize = 0x%x\n", l1dcachesize); -// printf("l2settings = 0x%x\n", l2settings); -// printf("l2cachesize = 0x%x\n", l2cachesize); -// printf("l3settings = 0x%x\n", l3settings); -// printf("l3cachesize = 0x%x\n", l3cachesize); - - // After reading we translate the configuration to strings - TranslateProcessorConfiguration(); - - // After all we return the class CPUInfo member var - return (&CPUInfo); } -#endif // LL_DARWIN -// bool CProcessor::CPUInfoToText(char *strBuffer, unsigned int uiMaxLen) -// ====================================================================== -// Gets the frequency and processor information and writes it to a string -///////////////////////////////////////////////////////////////////////// -bool CProcessor::CPUInfoToText(char *strBuffer, unsigned int uiMaxLen) -{ -#define LENCHECK len = (unsigned int) strlen(buf); if (len >= uiMaxLen) return false; strcpy(strBuffer, buf); strBuffer += len; /*Flawfinder: ignore*/ -#define COPYADD(str) strcpy(buf, str); LENCHECK; /* Flawfinder: ignore */ -#define FORMATADD(format, var) sprintf(buf, format, var); LENCHECK; /* Flawfinder: ignore */ -#define BOOLADD(str, boolvar) COPYADD(str); if (boolvar) { COPYADD(" Yes\n"); } else { COPYADD(" No\n"); } - - char buf[1024]; /* Flawfinder: ignore */ - unsigned int len; - - // First we have to get the frequency - GetCPUFrequency(50); - - // Then we get the processor information - GetCPUInfo(); - - // Now we construct the string (see the macros at function beginning) - strBuffer[0] = 0; - - COPYADD("// CPU General Information\n//////////////////////////\n"); - FORMATADD("Processor name: %s\n", strCPUName); - FORMATADD("Frequency: %.2f MHz\n\n", (float) uqwFrequency / 1000000.0f); - FORMATADD("Vendor: %s\n", CPUInfo.strVendor); - FORMATADD("Family: %s\n", CPUInfo.strFamily); - FORMATADD("Extended family: %d\n", CPUInfo.uiExtendedFamily); - FORMATADD("Model: %s\n", CPUInfo.strModel); - FORMATADD("Extended model: %d\n", CPUInfo.uiExtendedModel); - FORMATADD("Type: %s\n", CPUInfo.strType); - FORMATADD("Brand ID: %s\n", CPUInfo.strBrandID); - if (CPUInfo._Ext.PN_ProcessorSerialNumber) - { - FORMATADD("Processor Serial: %s\n", CPUInfo.strProcessorSerial); - } - else - { - COPYADD("Processor Serial: Disabled\n"); - } -#if !LL_SOLARIS // NOTE: Why bother printing all this when it's irrelavent - - COPYADD("\n\n// CPU Configuration\n////////////////////\n"); - FORMATADD("L1 instruction cache: %s\n", CPUInfo._L1.Instruction.strCache); - FORMATADD("L1 data cache: %s\n", CPUInfo._L1.Data.strCache); - FORMATADD("L2 cache: %s\n", CPUInfo._L2.strCache); - FORMATADD("L3 cache: %s\n", CPUInfo._L3.strCache); - FORMATADD("Trace cache: %s\n", CPUInfo._Trace.strCache); - FORMATADD("Instruction TLB: %s\n", CPUInfo._Instruction.strTLB); - FORMATADD("Data TLB: %s\n", CPUInfo._Data.strTLB); - FORMATADD("Max Supported CPUID-Level: 0x%08lX\n", CPUInfo.MaxSupportedLevel); - FORMATADD("Max Supported Ext. CPUID-Level: 0x%08lX\n", CPUInfo.MaxSupportedExtendedLevel); - - COPYADD("\n\n// CPU Extensions\n/////////////////\n"); - BOOLADD("AA64 AMD 64-bit Architecture: ", CPUInfo._Ext.AA64_AMD64BitArchitecture); - BOOLADD("ACPI Thermal Monitor And Clock Control: ", CPUInfo._Ext.ACPI_ThermalMonitorAndClockControl); - BOOLADD("APIC Advanced Programmable Interrupt Controller: ", CPUInfo._Ext.APIC_AdvancedProgrammableInterruptController); - FORMATADD(" APIC-ID: %d\n", CPUInfo._Ext.APIC_ID); - BOOLADD("CLFSH CLFLUSH Instruction Presence: ", CPUInfo._Ext.CLFSH_CFLUSH_Instruction); - FORMATADD(" CLFLUSH Instruction Cache Line Size: %d\n", CPUInfo._Ext.CLFLUSH_InstructionCacheLineSize); - BOOLADD("CMOV Conditional Move And Compare Instructions: ", CPUInfo._Ext.CMOV_ConditionalMoveAndCompareInstructions); - BOOLADD("CX8 COMPXCHG8B Instruction: ", CPUInfo._Ext.CX8_COMPXCHG8B_Instruction); - BOOLADD("DE Debugging Extensions: ", CPUInfo._Ext.DE_DebuggingExtensions); - BOOLADD("DS Debug Store: ", CPUInfo._Ext.DS_DebugStore); - BOOLADD("FGPAT Page Attribute Table: ", CPUInfo._Ext.FGPAT_PageAttributeTable); - BOOLADD("FPU Floating Point Unit: ", CPUInfo._Ext.FPU_FloatingPointUnit); - BOOLADD("FXSR Fast Streaming SIMD Extensions Save/Restore:", CPUInfo._Ext.FXSR_FastStreamingSIMD_ExtensionsSaveRestore); - BOOLADD("HT Hyper Threading: ", CPUInfo._Ext.HT_HyperThreading); - BOOLADD("IA64 Intel 64-Bit Architecture: ", CPUInfo._Ext.IA64_Intel64BitArchitecture); - BOOLADD("MCA Machine Check Architecture: ", CPUInfo._Ext.MCA_MachineCheckArchitecture); - BOOLADD("MCE Machine Check Exception: ", CPUInfo._Ext.MCE_MachineCheckException); - BOOLADD("MMX Multimedia Extensions: ", CPUInfo._Ext.MMX_MultimediaExtensions); - BOOLADD("MMX+ Multimedia Extensions: ", CPUInfo._Ext.EMMX_MultimediaExtensions); - BOOLADD("MSR Model Specific Registers: ", CPUInfo._Ext.MSR_ModelSpecificRegisters); - BOOLADD("MTRR Memory Type Range Registers: ", CPUInfo._Ext.MTRR_MemoryTypeRangeRegisters); - BOOLADD("PAE Physical Address Extension: ", CPUInfo._Ext.PAE_PhysicalAddressExtension); - BOOLADD("PGE PTE Global Flag: ", CPUInfo._Ext.PGE_PTE_GlobalFlag); - if (CPUInfo._Ext.PN_ProcessorSerialNumber) - { - FORMATADD("PN Processor Serial Number: %s\n", CPUInfo.strProcessorSerial); - } - else - { - COPYADD("PN Processor Serial Number: Disabled\n"); - } - BOOLADD("PSE Page Size Extensions: ", CPUInfo._Ext.PSE_PageSizeExtensions); - BOOLADD("PSE36 36-bit Page Size Extension: ", CPUInfo._Ext.PSE36_36bitPageSizeExtension); - BOOLADD("SEP Fast System Call: ", CPUInfo._Ext.SEP_FastSystemCall); - BOOLADD("SS Self Snoop: ", CPUInfo._Ext.SS_SelfSnoop); - BOOLADD("SSE Streaming SIMD Extensions: ", CPUInfo._Ext.SSE_StreamingSIMD_Extensions); - BOOLADD("SSE2 Streaming SIMD 2 Extensions: ", CPUInfo._Ext.SSE2_StreamingSIMD2_Extensions); - BOOLADD("ALTVEC Altivec Extensions: ", CPUInfo._Ext.Altivec_Extensions); - BOOLADD("TM Thermal Monitor: ", CPUInfo._Ext.TM_ThermalMonitor); - BOOLADD("TSC Time Stamp Counter: ", CPUInfo._Ext.TSC_TimeStampCounter); - BOOLADD("VME Virtual 8086 Mode Enhancements: ", CPUInfo._Ext.VME_Virtual8086ModeEnhancements); - BOOLADD("3DNow! Instructions: ", CPUInfo._Ext._3DNOW_InstructionExtensions); - BOOLADD("Enhanced 3DNow! Instructions: ", CPUInfo._Ext._E3DNOW_InstructionExtensions); -#endif - // Yippie!!! - return true; -} +LLProcessorInfo::~LLProcessorInfo() {} +F64 LLProcessorInfo::getCPUFrequency() const { return mImpl->getCPUFrequency(); } +bool LLProcessorInfo::hasSSE() const { return mImpl->hasSSE(); } +bool LLProcessorInfo::hasSSE2() const { return mImpl->hasSSE2(); } +bool LLProcessorInfo::hasAltivec() const { return mImpl->hasAltivec(); } +std::string LLProcessorInfo::getCPUFamilyName() const { return mImpl->getCPUFamilyName(); } +std::string LLProcessorInfo::getCPUBrandName() const { return mImpl->getCPUBrandName(); } +std::string LLProcessorInfo::getCPUFeatureDescription() const { return mImpl->getCPUFeatureDescription(); } -// bool CProcessor::WriteInfoTextFile(const std::string& strFilename) -// =========================================================== -// Takes use of CProcessor::CPUInfoToText and saves the string to a -// file -/////////////////////////////////////////////////////////////////// -bool CProcessor::WriteInfoTextFile(const std::string& strFilename) -{ - char buf[16384]; /* Flawfinder: ignore */ - - // First we get the string - if (!CPUInfoToText(buf, 16383)) - return false; - - // Then we create a new file (CREATE_ALWAYS) - LLFILE *file = LLFile::fopen(strFilename, "w"); /* Flawfinder: ignore */ - if (!file) - return false; - - // After that we write the string to the file - unsigned long dwBytesToWrite, dwBytesWritten; - dwBytesToWrite = (unsigned long) strlen(buf); /*Flawfinder: ignore*/ - dwBytesWritten = (unsigned long) fwrite(buf, 1, dwBytesToWrite, file); - fclose(file); - if (dwBytesToWrite != dwBytesWritten) - return false; - - // Done - return true; -} diff --git a/indra/llcommon/llprocessor.h b/indra/llcommon/llprocessor.h index 746d007a7f..fc2c8dacfb 100644 --- a/indra/llcommon/llprocessor.h +++ b/indra/llcommon/llprocessor.h @@ -30,167 +30,26 @@ * $/LicenseInfo$ */ -// Author: Benjamin Jurke -// File history: 27.02.2002 File created. -/////////////////////////////////////////// - #ifndef LLPROCESSOR_H #define LLPROCESSOR_H +class LLProcessorInfoImpl; -// Options: -/////////// -#if LL_WINDOWS -#define PROCESSOR_FREQUENCY_MEASURE_AVAILABLE -#endif - -#if LL_MSVC && _M_X64 -# define LL_X86_64 1 -# define LL_X86 1 -#elif LL_MSVC && _M_IX86 -# define LL_X86 1 -#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) ) -# define LL_X86_64 1 -# define LL_X86 1 -#elif LL_GNUC && ( defined(__i386__) ) -# define LL_X86 1 -#elif LL_GNUC && ( defined(__powerpc__) || defined(__ppc__) ) -# define LL_PPC 1 -#endif - - -struct ProcessorExtensions -{ - bool FPU_FloatingPointUnit; - bool VME_Virtual8086ModeEnhancements; - bool DE_DebuggingExtensions; - bool PSE_PageSizeExtensions; - bool TSC_TimeStampCounter; - bool MSR_ModelSpecificRegisters; - bool PAE_PhysicalAddressExtension; - bool MCE_MachineCheckException; - bool CX8_COMPXCHG8B_Instruction; - bool APIC_AdvancedProgrammableInterruptController; - unsigned int APIC_ID; - bool SEP_FastSystemCall; - bool MTRR_MemoryTypeRangeRegisters; - bool PGE_PTE_GlobalFlag; - bool MCA_MachineCheckArchitecture; - bool CMOV_ConditionalMoveAndCompareInstructions; - bool FGPAT_PageAttributeTable; - bool PSE36_36bitPageSizeExtension; - bool PN_ProcessorSerialNumber; - bool CLFSH_CFLUSH_Instruction; - unsigned int CLFLUSH_InstructionCacheLineSize; - bool DS_DebugStore; - bool ACPI_ThermalMonitorAndClockControl; - bool EMMX_MultimediaExtensions; - bool MMX_MultimediaExtensions; - bool FXSR_FastStreamingSIMD_ExtensionsSaveRestore; - bool SSE_StreamingSIMD_Extensions; - bool SSE2_StreamingSIMD2_Extensions; - bool Altivec_Extensions; - bool SS_SelfSnoop; - bool HT_HyperThreading; - unsigned int HT_HyterThreadingSiblings; - bool TM_ThermalMonitor; - bool IA64_Intel64BitArchitecture; - bool _3DNOW_InstructionExtensions; - bool _E3DNOW_InstructionExtensions; - bool AA64_AMD64BitArchitecture; -}; - -struct ProcessorCache -{ - bool bPresent; - char strSize[32]; /* Flawfinder: ignore */ - unsigned int uiAssociativeWays; - unsigned int uiLineSize; - bool bSectored; - char strCache[128]; /* Flawfinder: ignore */ -}; - -struct ProcessorL1Cache -{ - ProcessorCache Instruction; - ProcessorCache Data; -}; - -struct ProcessorTLB +class LL_COMMON_API LLProcessorInfo { - bool bPresent; - char strPageSize[32]; /* Flawfinder: ignore */ - unsigned int uiAssociativeWays; - unsigned int uiEntries; - char strTLB[128]; /* Flawfinder: ignore */ -}; - -struct ProcessorInfo -{ - char strVendor[16]; /* Flawfinder: ignore */ - unsigned int uiFamily; - unsigned int uiExtendedFamily; - char strFamily[64]; /* Flawfinder: ignore */ - unsigned int uiModel; - unsigned int uiExtendedModel; - char strModel[128]; /* Flawfinder: ignore */ - unsigned int uiStepping; - unsigned int uiType; - char strType[64]; /* Flawfinder: ignore */ - unsigned int uiBrandID; - char strBrandID[64]; /* Flawfinder: ignore */ - char strProcessorSerial[64]; /* Flawfinder: ignore */ - unsigned long MaxSupportedLevel; - unsigned long MaxSupportedExtendedLevel; - ProcessorExtensions _Ext; - ProcessorL1Cache _L1; - ProcessorCache _L2; - ProcessorCache _L3; - ProcessorCache _Trace; - ProcessorTLB _Instruction; - ProcessorTLB _Data; -}; - - -// CProcessor -// ========== -// Class for detecting the processor name, type and available -// extensions as long as it's speed. -///////////////////////////////////////////////////////////// -class CProcessor -{ -// Constructor / Destructor: -//////////////////////////// public: - CProcessor(); - -// Private vars: -//////////////// -public: - F64 uqwFrequency; - char strCPUName[128]; /* Flawfinder: ignore */ - ProcessorInfo CPUInfo; - -// Private functions: -///////////////////// + LLProcessorInfo(); + ~LLProcessorInfo(); + + F64 getCPUFrequency() const; + bool hasSSE() const; + bool hasSSE2() const; + bool hasAltivec() const; + std::string getCPUFamilyName() const; + std::string getCPUBrandName() const; + std::string getCPUFeatureDescription() const; private: - bool AnalyzeIntelProcessor(); - bool AnalyzeAMDProcessor(); - bool AnalyzeUnknownProcessor(); - bool CheckCPUIDPresence(); - void DecodeProcessorConfiguration(unsigned int cfg); - void TranslateProcessorConfiguration(); - void GetStandardProcessorConfiguration(); - void GetStandardProcessorExtensions(); - -// Public functions: -//////////////////// -public: - F64 GetCPUFrequency(unsigned int uiMeasureMSecs); - const ProcessorInfo *GetCPUInfo(); - bool CPUInfoToText(char *strBuffer, unsigned int uiMaxLen); - bool WriteInfoTextFile(const std::string& strFilename); + LLProcessorInfoImpl* mImpl; }; - -#endif +#endif // LLPROCESSOR_H diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index ad8f8632a2..8071c8aa2d 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -249,7 +249,7 @@ public: ///////////////////////////////////////////////////////////////////////////////////////// // Static Utility functions that operate on std::strings - static std::basic_string<T> null; + static const std::basic_string<T> null; typedef std::map<LLFormatMapString, LLFormatMapString> format_map_t; LL_COMMON_API static void getTokens(const std::basic_string<T>& instr, std::vector<std::basic_string<T> >& tokens, const std::basic_string<T>& delims); @@ -371,7 +371,7 @@ private: LL_COMMON_API static size_type getSubstitution(const std::basic_string<T>& instr, size_type& start, std::vector<std::basic_string<T> >& tokens); }; -template<class T> std::basic_string<T> LLStringUtilBase<T>::null; +template<class T> const std::basic_string<T> LLStringUtilBase<T>::null; template<class T> std::string LLStringUtilBase<T>::sLocale; typedef LLStringUtilBase<char> LLStringUtil; diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 52b1b63209..d41d0c8a3f 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -58,7 +58,6 @@ # include <unistd.h> # include <sys/sysinfo.h> const char MEMINFO_FILE[] = "/proc/meminfo"; -const char CPUINFO_FILE[] = "/proc/cpuinfo"; #elif LL_SOLARIS # include <stdio.h> # include <unistd.h> @@ -513,71 +512,21 @@ U32 LLOSInfo::getProcessResidentSizeKB() LLCPUInfo::LLCPUInfo() { std::ostringstream out; - CProcessor proc; - const ProcessorInfo* info = proc.GetCPUInfo(); + LLProcessorInfo proc; // proc.WriteInfoTextFile("procInfo.txt"); - mHasSSE = info->_Ext.SSE_StreamingSIMD_Extensions; - mHasSSE2 = info->_Ext.SSE2_StreamingSIMD2_Extensions; - mHasAltivec = info->_Ext.Altivec_Extensions; - mCPUMHz = (F64)(proc.GetCPUFrequency(50)/1000000.0F); - mFamily.assign( info->strFamily ); + mHasSSE = proc.hasSSE(); + mHasSSE2 = proc.hasSSE2(); + mHasAltivec = proc.hasAltivec(); + mCPUMHz = (F64)proc.getCPUFrequency(); + mFamily = proc.getCPUFamilyName(); mCPUString = "Unknown"; -#if LL_WINDOWS || LL_DARWIN || LL_SOLARIS - out << proc.strCPUName; + out << proc.getCPUBrandName(); if (200 < mCPUMHz && mCPUMHz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check { out << " (" << mCPUMHz << " MHz)"; } mCPUString = out.str(); - -#elif LL_LINUX - std::map< std::string, std::string > cpuinfo; - LLFILE* cpuinfo_fp = LLFile::fopen(CPUINFO_FILE, "rb"); - if(cpuinfo_fp) - { - char line[MAX_STRING]; - memset(line, 0, MAX_STRING); - while(fgets(line, MAX_STRING, cpuinfo_fp)) - { - // /proc/cpuinfo on Linux looks like: - // name\t*: value\n - char* tabspot = strchr( line, '\t' ); - if (tabspot == NULL) - continue; - char* colspot = strchr( tabspot, ':' ); - if (colspot == NULL) - continue; - char* spacespot = strchr( colspot, ' ' ); - if (spacespot == NULL) - continue; - char* nlspot = strchr( line, '\n' ); - if (nlspot == NULL) - nlspot = line + strlen( line ); // Fallback to terminating NUL - std::string linename( line, tabspot ); - std::string llinename(linename); - LLStringUtil::toLower(llinename); - std::string lineval( spacespot + 1, nlspot ); - cpuinfo[ llinename ] = lineval; - } - fclose(cpuinfo_fp); - } -# if LL_X86 - std::string flags = " " + cpuinfo["flags"] + " "; - LLStringUtil::toLower(flags); - mHasSSE = ( flags.find( " sse " ) != std::string::npos ); - mHasSSE2 = ( flags.find( " sse2 " ) != std::string::npos ); - - F64 mhz; - if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz) - && 200.0 < mhz && mhz < 10000.0) - { - mCPUMHz = (F64)(mhz); - } - if (!cpuinfo["model name"].empty()) - mCPUString = cpuinfo["model name"]; -# endif // LL_X86 -#endif // LL_LINUX } bool LLCPUInfo::hasAltivec() const @@ -607,38 +556,9 @@ std::string LLCPUInfo::getCPUString() const void LLCPUInfo::stream(std::ostream& s) const { -#if LL_WINDOWS || LL_DARWIN || LL_SOLARIS // gather machine information. - char proc_buf[CPUINFO_BUFFER_SIZE]; /* Flawfinder: ignore */ - CProcessor proc; - if(proc.CPUInfoToText(proc_buf, CPUINFO_BUFFER_SIZE)) - { - s << proc_buf; - } - else - { - s << "Unable to collect processor information" << std::endl; - } -#else - // *NOTE: This works on linux. What will it do on other systems? - LLFILE* cpuinfo = LLFile::fopen(CPUINFO_FILE, "rb"); - if(cpuinfo) - { - char line[MAX_STRING]; - memset(line, 0, MAX_STRING); - while(fgets(line, MAX_STRING, cpuinfo)) - { - line[strlen(line)-1] = ' '; - s << line; - } - fclose(cpuinfo); - s << std::endl; - } - else - { - s << "Unable to collect processor information" << std::endl; - } -#endif + s << LLProcessorInfo().getCPUFeatureDescription(); + // These are interesting as they reflect our internal view of the // CPU's attributes regardless of platform s << "->mHasSSE: " << (U32)mHasSSE << std::endl; diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index adef1a9192..dbb8ec5231 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -135,7 +135,7 @@ class LL_COMMON_API LLMutex { public: LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex - ~LLMutex(); + virtual ~LLMutex(); void lock(); // blocks void unlock(); diff --git a/indra/llcommon/llversionserver.h b/indra/llcommon/llversionserver.h index e3663544db..87fe7001e0 100644 --- a/indra/llcommon/llversionserver.h +++ b/indra/llcommon/llversionserver.h @@ -33,10 +33,10 @@ #ifndef LL_LLVERSIONSERVER_H #define LL_LLVERSIONSERVER_H -const S32 LL_VERSION_MAJOR = 1; -const S32 LL_VERSION_MINOR = 31; +const S32 LL_VERSION_MAJOR = 2; +const S32 LL_VERSION_MINOR = 1; const S32 LL_VERSION_PATCH = 0; -const S32 LL_VERSION_BUILD = 203110; +const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Server"; diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index fc3ce6df7e..6e341b83a1 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -34,8 +34,8 @@ #define LL_LLVERSIONVIEWER_H const S32 LL_VERSION_MAJOR = 2; -const S32 LL_VERSION_MINOR = 0; -const S32 LL_VERSION_PATCH = 2; +const S32 LL_VERSION_MINOR = 1; +const S32 LL_VERSION_PATCH = 0; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp index 6785d0cf17..1558df231a 100644 --- a/indra/llcommon/tests/llerror_test.cpp +++ b/indra/llcommon/tests/llerror_test.cpp @@ -545,15 +545,6 @@ namespace tut // output order void ErrorTestObject::test<10>() { -#if LL_LINUX - skip("Fails on Linux, see comments"); -// on Linux: -// [error, 10] fail: 'order is time type location function message: expected -// '1947-07-08T03:04:05Z INFO: llcommon/tests/llerror_test.cpp(268) : -// writeReturningLocationAndFunction: apple' actual -// '1947-07-08T03:04:05Z INFO: llcommon/tests/llerror_test.cpp(268) : -// LLError::NoClassInfo::writeReturningLocationAndFunction: apple'' -#endif LLError::setPrintLocation(true); LLError::setTimeFunction(roswell); mRecorder.setWantsTime(true); diff --git a/indra/llcommon/tests/llprocessor_test.cpp b/indra/llcommon/tests/llprocessor_test.cpp new file mode 100644 index 0000000000..a9e312b70b --- /dev/null +++ b/indra/llcommon/tests/llprocessor_test.cpp @@ -0,0 +1,67 @@ +/** + * @file llprocessor_test.cpp + * @date 2010-06-01 + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "linden_common.h" +#include "../test/lltut.h" + +#include "../llprocessor.h" + + +namespace tut +{ + struct processor + { + }; + + typedef test_group<processor> processor_t; + typedef processor_t::object processor_object_t; + tut::processor_t tut_processor("processor"); + + template<> template<> + void processor_object_t::test<1>() + { + set_test_name("LLProcessorInfo regression test"); + + LLProcessorInfo pi; + F64 freq = pi.getCPUFrequency(); + //bool sse = pi.hasSSE(); + //bool sse2 = pi.hasSSE2(); + //bool alitvec = pi.hasAltivec(); + std::string family = pi.getCPUFamilyName(); + std::string brand = pi.getCPUBrandName(); + //std::string steam = pi.getCPUFeatureDescription(); + + ensure_not_equals("Unknown Brand name", brand, "Unknown"); + ensure_not_equals("Unknown Family name", family, "Unknown"); + ensure("Reasonable CPU Frequency > 100 && < 10000", freq > 100 && freq < 10000); + } +} diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index c1022c1195..51e5f14bfe 100755 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -155,25 +155,6 @@ std::string getStartupStateFromLog(std::string& sllog) void LLCrashLogger::gatherFiles() { - - /* - //TODO:This function needs to be reimplemented somewhere in here... - if(!previous_crash && is_crash_log) - { - // Make sure the file isn't too old. - double age = difftime(gLaunchTime, stat_data.st_mtimespec.tv_sec); - - // llinfos << "age is " << age << llendl; - - if(age > 60.0) - { - // The file was last modified more than 60 seconds before the crash reporter was launched. Assume it's stale. - llwarns << "File " << mFilename << " is too old!" << llendl; - return; - } - } - */ - updateApplication("Gathering logs..."); // Figure out the filename of the debug log @@ -209,11 +190,9 @@ void LLCrashLogger::gatherFiles() mFileMap["SettingsXml"] = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings.xml"); } -#if !LL_DARWIN if(mCrashInPreviousExec) -#else -#endif { + // Restarting after freeze. // Replace the log file ext with .old, since the // instance that launched this process has overwritten // SecondLife.log @@ -225,7 +204,12 @@ void LLCrashLogger::gatherFiles() gatherPlatformSpecificFiles(); //Use the debug log to reconstruct the URL to send the crash report to - if(mDebugLog.has("CurrentSimHost")) + if(mDebugLog.has("CrashHostUrl")) + { + // Crash log receiver has been manually configured. + mCrashHost = mDebugLog["CrashHostUrl"].asString(); + } + else if(mDebugLog.has("CurrentSimHost")) { mCrashHost = "https://"; mCrashHost += mDebugLog["CurrentSimHost"].asString(); @@ -247,7 +231,6 @@ void LLCrashLogger::gatherFiles() mCrashInfo["DebugLog"] = mDebugLog; mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stats.log"); - mFileMap["StackTrace"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); updateApplication("Encoding files..."); @@ -272,8 +255,30 @@ void LLCrashLogger::gatherFiles() trimSLLog(crash_info); } - mCrashInfo[(*itr).first] = rawstr_to_utf8(crash_info); + mCrashInfo[(*itr).first] = LLStringFn::strip_invalid_xml(rawstr_to_utf8(crash_info)); + } + + // Add minidump as binary. + std::string minidump_path = mDebugLog["MinidumpPath"]; + if(minidump_path != "") + { + std::ifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary); + if(minidump_stream.is_open()) + { + minidump_stream.seekg(0, std::ios::end); + size_t length = minidump_stream.tellg(); + minidump_stream.seekg(0, std::ios::beg); + + LLSD::Binary data; + data.resize(length); + + minidump_stream.read(reinterpret_cast<char *>(&(data[0])),length); + minidump_stream.close(); + + mCrashInfo["Minidump"] = data; + } } + mCrashInfo["DebugLog"].erase("MinidumpPath"); } LLSD LLCrashLogger::constructPostData() diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index aa7c8c789a..0fc5ca1ad6 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -168,8 +168,8 @@ U8* LLImageBase::allocateData(S32 size) } else { - llerrs << "LLImageBase::allocateData: bad size: " << size << llendl; - } + llerrs << "LLImageBase::allocateData: bad size: " << size << llendl; + } } if (!mData || size != mDataSize) { @@ -267,10 +267,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) { mMemType = LLMemType::MTYPE_IMAGERAW; //llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE ); - if(S32(width) * S32(height) * S32(components) > MAX_IMAGE_DATA_SIZE) - { - llwarns << "over size: width: " << (S32)width << " height: " << (S32)height << " components: " << (S32)components << llendl ; - } allocateDataSize(width, height, components); ++sRawImageCount; } diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp index b5de104e61..018ce993b5 100644 --- a/indra/llimage/llimagepng.cpp +++ b/indra/llimage/llimagepng.cpp @@ -42,17 +42,12 @@ // LLImagePNG // --------------------------------------------------------------------------- LLImagePNG::LLImagePNG() - : LLImageFormatted(IMG_CODEC_PNG), - mTmpWriteBuffer(NULL) + : LLImageFormatted(IMG_CODEC_PNG) { } LLImagePNG::~LLImagePNG() { - if (mTmpWriteBuffer) - { - delete[] mTmpWriteBuffer; - } } // Virtual @@ -123,27 +118,24 @@ BOOL LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time) // Temporary buffer to hold the encoded image. Note: the final image // size should be much smaller due to compression. - if (mTmpWriteBuffer) - { - delete[] mTmpWriteBuffer; - } U32 bufferSize = getWidth() * getHeight() * getComponents() + 1024; - U8* mTmpWriteBuffer = new U8[ bufferSize ]; + U8* tmpWriteBuffer = new U8[ bufferSize ]; // Delegate actual encoding work to wrapper LLPngWrapper pngWrapper; - if (! pngWrapper.writePng(raw_image, mTmpWriteBuffer)) + if (! pngWrapper.writePng(raw_image, tmpWriteBuffer)) { setLastError(pngWrapper.getErrorMessage()); + delete[] tmpWriteBuffer; return FALSE; } // Resize internal buffer and copy from temp U32 encodedSize = pngWrapper.getFinalSize(); allocateData(encodedSize); - memcpy(getData(), mTmpWriteBuffer, encodedSize); + memcpy(getData(), tmpWriteBuffer, encodedSize); - delete[] mTmpWriteBuffer; + delete[] tmpWriteBuffer; return TRUE; } diff --git a/indra/llimage/llimagepng.h b/indra/llimage/llimagepng.h index 083dda73b9..4d6e2ee70a 100644 --- a/indra/llimage/llimagepng.h +++ b/indra/llimage/llimagepng.h @@ -47,9 +47,6 @@ public: /*virtual*/ BOOL updateData(); /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time); /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time); - -private: - U8* mTmpWriteBuffer; }; #endif diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 2c767a4857..53830b1a14 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -85,10 +85,7 @@ LLInventoryObject::LLInventoryObject(const LLUUID& uuid, mType(type), mName(name) { - LLStringUtil::replaceNonstandardASCII(mName, ' '); - LLStringUtil::replaceChar(mName, '|', ' '); - LLStringUtil::trim(mName); - LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN); + correctInventoryName(mName); } LLInventoryObject::LLInventoryObject() : @@ -155,12 +152,8 @@ void LLInventoryObject::setUUID(const LLUUID& new_uuid) void LLInventoryObject::rename(const std::string& n) { std::string new_name(n); - LLStringUtil::replaceNonstandardASCII(new_name, ' '); - LLStringUtil::replaceChar(new_name, '|', ' '); - LLStringUtil::trim(new_name); - LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN); - - if( new_name != mName ) + correctInventoryName(new_name); + if( !new_name.empty() && new_name != mName ) { mName = new_name; } @@ -221,10 +214,7 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream) " %254s %254[^|]", keyword, valuestr); mName.assign(valuestr); - LLStringUtil::replaceNonstandardASCII(mName, ' '); - LLStringUtil::replaceChar(mName, '|', ' '); - LLStringUtil::trim(mName); - LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN); + correctInventoryName(mName); } else { @@ -284,6 +274,15 @@ void LLInventoryObject::updateServer(BOOL) const llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl; } +inline +void LLInventoryObject::correctInventoryName(std::string& name) +{ + LLStringUtil::replaceNonstandardASCII(name, ' '); + LLStringUtil::replaceChar(name, '|', ' '); + LLStringUtil::trim(name); + LLStringUtil::truncate(name, DB_INV_ITEM_NAME_STR_LEN); +} + ///---------------------------------------------------------------------------- /// Class LLInventoryItem diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index b083e305b1..4c6ac83ab8 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -92,9 +92,13 @@ public: void setParent(const LLUUID& new_parent); void setType(LLAssetType::EType type); +private: + // in place correction for inventory name string + void correctInventoryName(std::string& name); + //-------------------------------------------------------------------- // File Support - // Implemented here so that a minimal information set can be transmitted + // Implemented here so that a minimal information set can be transmitted // between simulator and viewer. //-------------------------------------------------------------------- public: diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 209b506c30..c3c15e1374 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -61,11 +61,11 @@ #endif // Single Precision Floating Point Routines -#ifndef fsqrtf -#define fsqrtf(x) ((F32)sqrt((F64)(x))) -#endif #ifndef sqrtf -#define sqrtf(x) ((F32)sqrt((F64)(x))) +#define sqrtf(x) ((F32)sqrt((F64)(x))) +#endif +#ifndef fsqrtf +#define fsqrtf(x) sqrtf(x) #endif #ifndef cosf @@ -78,11 +78,14 @@ #define tanf(x) ((F32)tan((F64)(x))) #endif #ifndef acosf -#define acosf(x) ((F32)acos((F64)(x))) +#define acosf(x) ((F32)acos((F64)(x))) #endif #ifndef powf -#define powf(x,y) ((F32)pow((F64)(x),(F64)(y))) +#define powf(x,y) ((F32)pow((F64)(x),(F64)(y))) +#endif +#ifndef expf +#define expf(x) ((F32)exp((F64)(x))) #endif const F32 GRAVITY = -9.8f; diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp index ea42f6e001..68d9ddc0fe 100644 --- a/indra/llmath/tests/mathmisc_test.cpp +++ b/indra/llmath/tests/mathmisc_test.cpp @@ -334,6 +334,8 @@ namespace tut template<> template<> void sphere_object::test<2>() { + skip("See SNOW-620. Neither the test nor the code being tested seem good. Also sim-only."); + // test LLSphere::getBoundingSphere() S32 number_of_tests = 100; S32 number_of_spheres = 10; diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp index 00e77d20e9..5b7e5138ef 100644 --- a/indra/llmessage/llares.cpp +++ b/indra/llmessage/llares.cpp @@ -108,7 +108,8 @@ LLAres::LLAres() : mInitSuccess(false), mListener(new LLAresListener(this)) { - if (ares_init(&chan_) != ARES_SUCCESS) + if (ares_library_init( ARES_LIB_INIT_ALL ) != ARES_SUCCESS || + ares_init(&chan_) != ARES_SUCCESS) { llwarns << "Could not succesfully initialize ares!" << llendl; return; @@ -120,6 +121,7 @@ LLAres::LLAres() : LLAres::~LLAres() { ares_destroy(chan_); + ares_library_cleanup(); } void LLAres::cancel() @@ -473,7 +475,7 @@ bool LLAres::process(U64 timeout) ll_init_apr(); } - int socks[ARES_GETSOCK_MAXNUM]; + ares_socket_t socks[ARES_GETSOCK_MAXNUM]; apr_pollfd_t aprFds[ARES_GETSOCK_MAXNUM]; apr_int32_t nsds = 0; int nactive = 0; diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 91e11b8c0d..36874a5d48 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -365,6 +365,13 @@ U32 LLCurl::Easy::report(CURLcode code) responseReason = strerror(code) + " : " + mErrorBuffer; } + if(responseCode >= 300 && responseCode < 400) //redirect + { + char new_url[512] ; + curl_easy_getinfo(mCurlEasyHandle, CURLINFO_REDIRECT_URL, new_url); + responseReason = new_url ; //get the new URL. + } + if (mResponder) { mResponder->completedRaw(responseCode, responseReason, mChannels, mOutput); diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 9c2e4b5658..e8dc207114 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -199,6 +199,7 @@ namespace fileBuffer = new U8 [fileSize]; vfile.read(fileBuffer, fileSize); ostream.write((char*)fileBuffer, fileSize); + delete [] fileBuffer; eos = true; return STATUS_DONE; } diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index ff47c57c70..2d408f8e10 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1748,7 +1748,8 @@ BOOL LLImageGL::getMask(const LLVector2 &tc) { LL_WARNS_ONCE("render") << "Ugh, non-finite u/v in mask pick" << LL_ENDL; u = v = 0.f; - llassert(false); + // removing assert per EXT-4388 + // llassert(false); } if (LL_UNLIKELY(u < 0.f || u > 1.f || @@ -1756,7 +1757,8 @@ BOOL LLImageGL::getMask(const LLVector2 &tc) { LL_WARNS_ONCE("render") << "Ugh, u/v out of range in image mask pick" << LL_ENDL; u = v = 0.f; - llassert(false); + // removing assert per EXT-4388 + // llassert(false); } S32 x = llfloor(u * mPickMaskWidth); diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 8e0245c451..237d42090f 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -66,8 +66,13 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) , mAutoScrolling( false ) , mAutoScrollRate( 0.f ) , mSelectedTab( NULL ) + , mTabComparator( NULL ) + , mNoVisibleTabsHelpText(NULL) + , mNoVisibleTabsOrigString(params.no_visible_tabs_text.initial_value().asString()) { - mSingleExpansion = params.single_expansion; + initNoTabsWidget(params.no_matched_tabs_text); + + mSingleExpansion = params.single_expansion; if(mFitParent && !mSingleExpansion) { llinfos << "fit_parent works best when combined with single_expansion" << llendl; @@ -78,7 +83,10 @@ LLAccordionCtrl::LLAccordionCtrl() : LLPanel() , mAutoScrolling( false ) , mAutoScrollRate( 0.f ) , mSelectedTab( NULL ) + , mNoVisibleTabsHelpText(NULL) { + initNoTabsWidget(LLTextBox::Params()); + mSingleExpansion = false; mFitParent = false; LLUICtrlFactory::getInstance()->buildPanel(this, "accordion_parent.xml"); @@ -168,6 +176,8 @@ BOOL LLAccordionCtrl::postBuild() } } + updateNoTabsHelpTextVisibility(); + return TRUE; } @@ -187,8 +197,15 @@ void LLAccordionCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) rcLocal.mRight = rcLocal.mLeft + width; rcLocal.mTop = rcLocal.mBottom + height; + // get textbox a chance to reshape its content + mNoVisibleTabsHelpText->reshape(width, height, called_from_parent); + setRect(rcLocal); + // assume that help text is always fit accordion. + // necessary text paddings can be set via h_pad and v_pad + mNoVisibleTabsHelpText->setRect(getLocalRect()); + arrange(); } @@ -336,7 +353,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view) mAccordionTabs.push_back(accordion_tab); accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) ); - + arrange(); } void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view) @@ -359,6 +376,31 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view) } } +void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params) +{ + LLTextBox::Params tp = tb_params; + tp.rect(getLocalRect()); + mNoMatchedTabsOrigString = tp.initial_value().asString(); + mNoVisibleTabsHelpText = LLUICtrlFactory::create<LLTextBox>(tp, this); +} + +void LLAccordionCtrl::updateNoTabsHelpTextVisibility() +{ + bool visible_exists = false; + std::vector<LLAccordionCtrlTab*>::const_iterator it = mAccordionTabs.begin(); + const std::vector<LLAccordionCtrlTab*>::const_iterator it_end = mAccordionTabs.end(); + for (; it != it_end; ++it) + { + if ((*it)->getVisible()) + { + visible_exists = true; + break; + } + } + + mNoVisibleTabsHelpText->setVisible(!visible_exists); +} + void LLAccordionCtrl::arrangeSinge() { S32 panel_left = BORDER_MARGIN; // Margin from left side of Splitter @@ -482,6 +524,8 @@ void LLAccordionCtrl::arrangeMultiple() void LLAccordionCtrl::arrange() { + updateNoTabsHelpTextVisibility(); + if( mAccordionTabs.size() == 0) { //We do not arrange if we do not have what should be arranged @@ -500,6 +544,8 @@ void LLAccordionCtrl::arrange() S32 panel_height = getRect().getHeight() - 2*BORDER_MARGIN; + if (accordion_tab->getFitParent()) + panel_height = accordion_tab->getRect().getHeight(); ctrlSetLeftTopAndSize(accordion_tab,panel_rect.mLeft,panel_top,panel_width,panel_height); show_hide_scrollbar(getRect().getWidth(),getRect().getHeight()); @@ -737,6 +783,20 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info) } return 1; } + else if (info.has("child_visibility_change")) + { + BOOL new_visibility = info["child_visibility_change"]; + if (new_visibility) + { + // there is at least one visible tab + mNoVisibleTabsHelpText->setVisible(FALSE); + } + else + { + // it could be the latest visible tab, check all of them + updateNoTabsHelpTextVisibility(); + } + } return LLPanel::notifyParent(info); } void LLAccordionCtrl::reset () @@ -745,6 +805,46 @@ void LLAccordionCtrl::reset () mScrollbar->setDocPos(0); } +void LLAccordionCtrl::sort() +{ + if (!mTabComparator) + { + llwarns << "No comparator specified for sorting accordion tabs." << llendl; + return; + } + + std::sort(mAccordionTabs.begin(), mAccordionTabs.end(), LLComparatorAdaptor(*mTabComparator)); + arrange(); +} + +void LLAccordionCtrl::setFilterSubString(const std::string& filter_string) +{ + LLStringUtil::format_map_t args; + args["[SEARCH_TERM]"] = LLURI::escape(filter_string); + std::string text = filter_string.empty() ? mNoVisibleTabsOrigString : mNoMatchedTabsOrigString; + LLStringUtil::format(text, args); + + mNoVisibleTabsHelpText->setValue(text); +} + +const LLAccordionCtrlTab* LLAccordionCtrl::getExpandedTab() const +{ + typedef std::vector<LLAccordionCtrlTab*>::const_iterator tabs_const_iterator; + + const LLAccordionCtrlTab* result = 0; + + for (tabs_const_iterator i = mAccordionTabs.begin(); i != mAccordionTabs.end(); ++i) + { + if ((*i)->isExpanded()) + { + result = *i; + break; + } + } + + return result; +} + S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 available_height /* = 0 */) { if(tab_index < 0) diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index a029201c90..b5fdf796cd 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -34,6 +34,7 @@ #define LL_ACCORDIONCTRL_H #include "llpanel.h" +#include "lltextbox.h" #include "llscrollbar.h" #include <vector> @@ -56,6 +57,19 @@ private: public: + /** + * Abstract comparator for accordion tabs. + */ + class LLTabComparator + { + public: + LLTabComparator() {}; + virtual ~LLTabComparator() {}; + + /** Returns true if tab1 < tab2, false otherwise */ + virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0; + }; + struct Params : public LLInitParam::Block<Params, LLPanel::Params> { @@ -64,10 +78,14 @@ public: accordion tabs are responsible for scrolling their content. *NOTE fit_parent works best when combined with single_expansion. Accordion view should implement getRequiredRect() and provide valid height*/ + Optional<LLTextBox::Params> no_matched_tabs_text; + Optional<LLTextBox::Params> no_visible_tabs_text; Params() : single_expansion("single_expansion",false) , fit_parent("fit_parent", false) + , no_matched_tabs_text("no_matched_tabs_text") + , no_visible_tabs_text("no_visible_tabs_text") {}; }; @@ -105,7 +123,27 @@ public: void reset (); + void setComparator(const LLTabComparator* comp) { mTabComparator = comp; } + void sort(); + + /** + * Sets filter substring as a search_term for help text when there are no any visible tabs. + */ + void setFilterSubString(const std::string& filter_string); + + /** + * This method returns the first expanded accordion tab. + * It is expected to be called for accordion which doesn't allow multiple + * tabs to be expanded. Use with care. + */ + const LLAccordionCtrlTab* getExpandedTab() const; + + const LLAccordionCtrlTab* getSelectedTab() const { return mSelectedTab; } + private: + void initNoTabsWidget(const LLTextBox::Params& tb_params); + void updateNoTabsHelpTextVisibility(); + void arrangeSinge(); void arrangeMultiple(); @@ -123,6 +161,21 @@ private: BOOL autoScroll (S32 x, S32 y); + /** + * An adaptor for LLTabComparator + */ + struct LLComparatorAdaptor + { + LLComparatorAdaptor(const LLTabComparator& comparator) : mComparator(comparator) {}; + + bool operator()(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) + { + return mComparator.compare(tab1, tab2); + } + + const LLTabComparator& mComparator; + }; + private: LLRect mInnerRect; LLScrollbar* mScrollbar; @@ -130,7 +183,13 @@ private: bool mFitParent; bool mAutoScrolling; F32 mAutoScrollRate; - LLAccordionCtrlTab* mSelectedTab; + LLTextBox* mNoVisibleTabsHelpText; + + std::string mNoMatchedTabsOrigString; + std::string mNoVisibleTabsOrigString; + + LLAccordionCtrlTab* mSelectedTab; + const LLTabComparator* mTabComparator; }; diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 83e67980a3..20e4b7867c 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -76,6 +76,8 @@ public: std::string getTitle(); void setTitle(const std::string& title, const std::string& hl); + void setTitleFontStyle(std::string style); + void setSelected(bool is_selected) { mIsSelected = is_selected; } virtual void onMouseEnter(S32 x, S32 y, MASK mask); @@ -102,6 +104,9 @@ private: LLPointer<LLUIImage> mImageHeaderPressed; LLPointer<LLUIImage> mImageHeaderFocused; + // style saved when applying it in setTitleFontStyle + LLStyle::Params mStyleParams; + LLUIColor mHeaderBGColor; bool mNeedsHighlight; @@ -170,12 +175,23 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitle(const std::string& t { LLTextUtil::textboxSetHighlightedVal( mHeaderTextbox, - LLStyle::Params(), + mStyleParams, title, hl); } } +void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleFontStyle(std::string style) +{ + if (mHeaderTextbox) + { + std::string text = mHeaderTextbox->getText(); + mStyleParams.font(mHeaderTextbox->getDefaultFont()); + mStyleParams.font.style(style); + mHeaderTextbox->setText(text, mStyleParams); + } +} + void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() { S32 width = getRect().getWidth(); @@ -409,6 +425,13 @@ void LLAccordionCtrlTab::changeOpenClose(bool is_open) } } +void LLAccordionCtrlTab::handleVisibilityChange(BOOL new_visibility) +{ + LLUICtrl::handleVisibilityChange(new_visibility); + + notifyParent(LLSD().with("child_visibility_change", new_visibility)); +} + BOOL LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask) { if(mCollapsible && mHeaderVisible && mCanOpenClose) @@ -466,7 +489,7 @@ void LLAccordionCtrlTab::setAccordionView(LLView* panel) addChild(panel,0); } -std::string LLAccordionCtrlTab::getTitle() +std::string LLAccordionCtrlTab::getTitle() const { LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); if (header) @@ -488,6 +511,15 @@ void LLAccordionCtrlTab::setTitle(const std::string& title, const std::string& h } } +void LLAccordionCtrlTab::setTitleFontStyle(std::string style) +{ + LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); + if (header) + { + header->setTitleFontStyle(style); + } +} + boost::signals2::connection LLAccordionCtrlTab::setFocusReceivedCallback(const focus_signal_t::slot_type& cb) { LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); @@ -961,3 +993,16 @@ BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask) } return LLUICtrl::handleToolTip(x, y, mask); } +BOOL LLAccordionCtrlTab::handleScrollWheel ( S32 x, S32 y, S32 clicks ) +{ + if( LLUICtrl::handleScrollWheel(x,y,clicks)) + { + return TRUE; + } + if( mScrollbar && mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) ) + { + return TRUE; + } + return FALSE; +} + diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 83a9024a74..e17ecc5319 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -37,6 +37,7 @@ #include "llrect.h" #include "lluictrl.h" #include "lluicolor.h" +#include "llstyle.h" class LLUICtrlFactory; class LLUIImage; @@ -115,11 +116,14 @@ public: void setAccordionView(LLView* panel); LLView* getAccordionView() { return mContainerPanel; }; - std::string getTitle(); + std::string getTitle() const; // Set text and highlight substring in LLAccordionCtrlTabHeader void setTitle(const std::string& title, const std::string& hl = LLStringUtil::null); + // Set text font style in LLAccordionCtrlTabHeader + void setTitleFontStyle(std::string style); + boost::signals2::connection setFocusReceivedCallback(const focus_signal_t::slot_type& cb); boost::signals2::connection setFocusLostCallback(const focus_signal_t::slot_type& cb); @@ -154,6 +158,11 @@ public: // Call reshape after changing size virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /** + * Raises notifyParent event with "child_visibility_change" = new_visibility + */ + void handleVisibilityChange(BOOL new_visibility); + // Changes expand/collapse state and triggers expand/collapse callbacks virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); @@ -161,10 +170,12 @@ public: virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); virtual BOOL handleToolTip(S32 x, S32 y, MASK mask); + virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); + virtual bool addChild(LLView* child, S32 tab_group); - bool isExpanded() { return mDisplayChildren; } + bool isExpanded() const { return mDisplayChildren; } S32 getHeaderHeight(); @@ -185,6 +196,7 @@ public: void showAndFocusHeader(); void setFitPanel( bool fit ) { mFitPanel = true; } + bool getFitParent() const { return mFitPanel; } protected: void adjustContainerPanel (const LLRect& child_rect); diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index fad98e553f..9a56372e68 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -347,7 +347,7 @@ void LLFloater::layoutDragHandle() { rect = getLocalRect(); } - mDragHandle->setRect(rect); + mDragHandle->setShape(rect); updateTitleButtons(); } @@ -810,6 +810,11 @@ void LLFloater::applyTitle() { mDragHandle->setTitle ( mTitle ); } + + if (getHost()) + { + getHost()->updateFloaterTitle(this); + } } std::string LLFloater::getCurrentTitle() const diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 75342afbe2..e9614ea660 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -339,6 +339,9 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW { if( *cur == '\n' ) { + LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(cur-base); + text_segment->setToken( 0 ); + insertSegment( *seg_list, text_segment, text_len, defaultColor, editor); cur++; if( !*cur || *cur == '\n' ) { @@ -378,9 +381,8 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW } S32 seg_end = cur - base; - LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, seg_end, editor ); - text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + //create segments from seg_start to seg_end + insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); line_done = TRUE; // to break out of second loop. break; } @@ -486,11 +488,12 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW seg_end = seg_start + between_delimiters + cur_delimiter->getLength(); } - + insertSegments(wtext, *seg_list,cur_delimiter, text_len, seg_start, seg_end, defaultColor, editor); + /* LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_delimiter->getColor(), seg_start, seg_end, editor ); text_segment->setToken( cur_delimiter ); insertSegment( seg_list, text_segment, text_len, defaultColor, editor); - + */ // Note: we don't increment cur, since the end of one delimited seg may be immediately // followed by the start of another one. continue; @@ -519,10 +522,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW // llinfos << "Seg: [" << word.c_str() << "]" << llendl; - - LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, seg_end, editor ); - text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); } cur += seg_len; continue; @@ -537,24 +537,50 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW } } -void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>* seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor ) +void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* cur_token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor ) +{ + std::string::size_type pos = wtext.find('\n',seg_start); + + while (pos!=-1 && pos < (std::string::size_type)seg_end) + { + if (pos!=seg_start) + { + LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, pos, editor ); + text_segment->setToken( cur_token ); + insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + } + + LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(pos); + text_segment->setToken( cur_token ); + insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + + seg_start = pos+1; + pos = wtext.find('\n',seg_start); + } + + LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, seg_end, editor ); + text_segment->setToken( cur_token ); + insertSegment( seg_list, text_segment, text_len, defaultColor, editor); +} + +void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor ) { - LLTextSegmentPtr last = seg_list->back(); + LLTextSegmentPtr last = seg_list.back(); S32 new_seg_end = new_segment->getEnd(); if( new_segment->getStart() == last->getStart() ) { - seg_list->pop_back(); + seg_list.pop_back(); } else { last->setEnd( new_segment->getStart() ); } - seg_list->push_back( new_segment ); + seg_list.push_back( new_segment ); if( new_seg_end < text_len ) { - seg_list->push_back( new LLNormalTextSegment( defaultColor, new_seg_end, text_len, editor ) ); + seg_list.push_back( new LLNormalTextSegment( defaultColor, new_seg_end, text_len, editor ) ); } } diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index e5b66dfa56..09378e408b 100644 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -129,7 +129,8 @@ public: private: LLColor3 readColor(const std::string& s); - void insertSegment(std::vector<LLTextSegmentPtr> *seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); + void insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); + void insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor); BOOL mLoaded; word_token_map_t mWordTokenMap; diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 45f9de8e8d..c93ca1af88 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -377,7 +377,10 @@ void LLLineEditor::setText(const LLStringExplicit &new_text) setCursor(llmin((S32)mText.length(), getCursor())); // Set current history line to end of history. - mCurrentHistoryLine = mLineHistory.end() - 1; + if(mLineHistory.end() != mLineHistory.begin()) + { + mCurrentHistoryLine = mLineHistory.end() - 1; + } mPrevText = mText; } diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index 3aea648562..b1dbce0000 100644 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -238,6 +238,16 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, moveResizeHandlesToFront(); } +void LLMultiFloater::updateFloaterTitle(LLFloater* floaterp) +{ + S32 index = mTabContainer->getIndexForPanel(floaterp); + if (index != -1) + { + mTabContainer->setPanelTitle(index, floaterp->getShortTitle()); + } +} + + /** BOOL selectFloater(LLFloater* floaterp) diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index bbf2c56fe7..24a841f64e 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -80,6 +80,7 @@ public: void onTabSelected(); virtual void updateResizeLimits(); + virtual void updateFloaterTitle(LLFloater* floaterp); protected: struct LLFloaterData diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index cfa341ea23..4d835b869f 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -152,6 +152,7 @@ LLTextBase::Params::Params() bg_writeable_color("bg_writeable_color"), bg_focus_color("bg_focus_color"), allow_scroll("allow_scroll", true), + plain_text("plain_text",false), track_end("track_end", false), read_only("read_only", false), v_pad("v_pad", 0), @@ -200,6 +201,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mSelectionStart( 0 ), mSelectionEnd( 0 ), mIsSelecting( FALSE ), + mPlainText ( p.plain_text ), mWordWrap(p.wrap), mUseEllipses( p.use_ellipses ), mParseHTML(p.allow_html), @@ -1101,7 +1103,7 @@ S32 LLTextBase::getLeftOffset(S32 width) case LLFontGL::LEFT: return mHPad; case LLFontGL::HCENTER: - return mHPad + (mVisibleTextRect.getWidth() - width - mHPad) / 2; + return mHPad + llmax(0, (mVisibleTextRect.getWidth() - width - mHPad) / 2); case LLFontGL::RIGHT: return mVisibleTextRect.getWidth() - width; default: @@ -1207,11 +1209,6 @@ void LLTextBase::reflow() // grow line height as necessary based on reported height of this segment line_height = llmax(line_height, segment_height); remaining_pixels -= segment_width; - if (remaining_pixels < 0) - { - // getNumChars() and getDimensions() should return consistent results - remaining_pixels = 0; - } seg_offset += character_count; @@ -1630,7 +1627,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para part = (S32)LLTextParser::MIDDLE; } std::string subtext=text.substr(0,start); - appendAndHighlightTextImpl(subtext, part, style_params); + appendAndHighlightText(subtext, part, style_params); } // output an optional icon before the Url @@ -1652,7 +1649,14 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para } // output the styled Url - appendAndHighlightTextImpl(match.getLabel(), part, link_params); + // output the styled Url (unless we've been asked to suppress hyperlinking) + if (match.isLinkDisabled()) + { + appendAndHighlightText(match.getLabel(), part, style_params); + } + else + { + appendAndHighlightText(match.getLabel(), part, link_params); // set the tooltip for the Url label if (! match.getTooltip().empty()) @@ -1680,11 +1684,11 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para if (part != (S32)LLTextParser::WHOLE) part=(S32)LLTextParser::END; if (end < (S32)text.length()) - appendAndHighlightTextImpl(text, part, style_params); + appendAndHighlightText(text, part, style_params); } else { - appendAndHighlightTextImpl(new_text, part, style_params); + appendAndHighlightText(new_text, part, style_params); } } @@ -1695,23 +1699,7 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c if(prepend_newline) appendLineBreakSegment(input_params); - std::string::size_type start = 0; - std::string::size_type pos = new_text.find("\n",start); - - while(pos!=-1) - { - if(pos!=start) - { - std::string str = std::string(new_text,start,pos-start); - appendTextImpl(str,input_params); - } - appendLineBreakSegment(input_params); - start = pos+1; - pos = new_text.find("\n",start); - } - - std::string str = std::string(new_text,start,new_text.length()-start); - appendTextImpl(str,input_params); + appendTextImpl(new_text,input_params); } void LLTextBase::needsReflow(S32 index) @@ -1731,6 +1719,10 @@ void LLTextBase::appendLineBreakSegment(const LLStyle::Params& style_params) void LLTextBase::appendImageSegment(S32 highlight_part, const LLStyle::Params& style_params) { + if(getPlainText()) + { + return; + } segment_vec_t segments; LLStyleConstSP sp(new LLStyle(style_params)); segments.push_back(new LLImageTextSegment(sp, getLength(),*this)); @@ -1810,13 +1802,10 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig } } -void LLTextBase::appendAndHighlightText(const std::string &new_text, bool prepend_newline, S32 highlight_part, const LLStyle::Params& style_params) +void LLTextBase::appendAndHighlightText(const std::string &new_text, S32 highlight_part, const LLStyle::Params& style_params) { if (new_text.empty()) return; - if(prepend_newline) - appendLineBreakSegment(style_params); - std::string::size_type start = 0; std::string::size_type pos = new_text.find("\n",start); @@ -1917,7 +1906,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, { // Figure out which line we're nearest to. LLRect visible_region = getVisibleDocumentRect(); - + // binary search for line that starts before local_y line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), local_y - mVisibleTextRect.mBottom + visible_region.mBottom, compare_bottom()); @@ -1927,7 +1916,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, } S32 pos = getLength(); - S32 start_x = mVisibleTextRect.mLeft + line_iter->mRect.mLeft; + S32 start_x = mVisibleTextRect.mLeft + line_iter->mRect.mLeft - visible_region.mLeft; segment_set_t::iterator line_seg_iter; S32 line_seg_offset; @@ -2772,6 +2761,12 @@ void LLInlineViewSegment::linkToDocument(LLTextBase* editor) editor->addDocumentChild(mView); } +LLLineBreakTextSegment::LLLineBreakTextSegment(S32 pos):LLTextSegment(pos,pos+1) +{ + LLStyleSP s( new LLStyle(LLStyle::Params().visible(true))); + + mFontHeight = llceil(s->getFont()->getLineHeight()); +} LLLineBreakTextSegment::LLLineBreakTextSegment(LLStyleConstSP style,S32 pos):LLTextSegment(pos,pos+1) { mFontHeight = llceil(style->getFont()->getLineHeight()); @@ -2814,7 +2809,7 @@ bool LLImageTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width height = llceil(mStyle->getFont()->getLineHeight());; LLUIImagePtr image = mStyle->getImage(); - if( image.notNull()) + if( num_chars>0 && image.notNull()) { width += image->getWidth() + IMAGE_HPAD; height = llmax(height, image->getHeight() + IMAGE_HPAD ); @@ -2826,13 +2821,13 @@ S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin { LLUIImagePtr image = mStyle->getImage(); S32 image_width = image->getWidth(); - if(num_pixels>image_width + IMAGE_HPAD) + if(line_offset == 0 || num_pixels>image_width + IMAGE_HPAD) { return 1; } - return 0; } + F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { if ( (start >= 0) && (end <= mEnd - mStart)) diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 7041b9a109..25c538951a 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -86,6 +86,7 @@ public: track_end, read_only, allow_scroll, + plain_text, wrap, use_ellipses, allow_html, @@ -177,6 +178,9 @@ public: void setReadOnly(bool read_only) { mReadOnly = read_only; } bool getReadOnly() { return mReadOnly; } + void setPlainText(bool value) { mPlainText = value;} + bool getPlainText() const { return mPlainText; } + // cursor manipulation bool setCursor(S32 row, S32 column); bool setCursorPos(S32 cursor_pos, bool keep_cursor_offset = false); @@ -274,7 +278,7 @@ protected: S32 insertStringNoUndo(S32 pos, const LLWString &wstr, segment_vec_t* segments = NULL); // returns num of chars actually inserted S32 removeStringNoUndo(S32 pos, S32 length); S32 overwriteCharNoUndo(S32 pos, llwchar wc); - void appendAndHighlightText(const std::string &new_text, bool prepend_newline, S32 highlight_part, const LLStyle::Params& stylep); + void appendAndHighlightText(const std::string &new_text, S32 highlight_part, const LLStyle::Params& stylep); // manage segments @@ -370,6 +374,7 @@ protected: bool mReadOnly; bool mBGVisible; // render background? bool mClipPartial; // false if we show lines that are partially inside bounding rect + bool mPlainText; // didn't use Image or Icon segments S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes // support widgets @@ -523,6 +528,7 @@ class LLLineBreakTextSegment : public LLTextSegment public: LLLineBreakTextSegment(LLStyleConstSP style,S32 pos); + LLLineBreakTextSegment(S32 pos); ~LLLineBreakTextSegment(); bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; diff --git a/indra/mac_crash_logger/llcrashloggermac.cpp b/indra/mac_crash_logger/llcrashloggermac.cpp index 16efa4fe2c..90de39ba27 100644 --- a/indra/mac_crash_logger/llcrashloggermac.cpp +++ b/indra/mac_crash_logger/llcrashloggermac.cpp @@ -211,89 +211,6 @@ bool LLCrashLoggerMac::init(void) void LLCrashLoggerMac::gatherPlatformSpecificFiles() { updateApplication("Gathering hardware information..."); - char path[MAX_PATH]; - FSRef folder; - - if(FSFindFolder(kUserDomain, kLogsFolderType, false, &folder) == noErr) - { - // folder is an FSRef to ~/Library/Logs/ - if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr) - { - struct stat dw_stat; - std::string mBuf; - bool isLeopard = false; - // Try the 10.3 path first... - std::string dw_file_name = std::string(path) + std::string("/CrashReporter/Second Life.crash.log"); - int res = stat(dw_file_name.c_str(), &dw_stat); - - if (res) - { - // Try the 10.2 one next... - dw_file_name = std::string(path) + std::string("/Second Life.crash.log"); - res = stat(dw_file_name.c_str(), &dw_stat); - } - - if(res) - { - //10.5: Like 10.3+, except it puts the crash time in the file instead of dividing it up - //using asterisks. Get a directory listing, search for files starting with second life, - //use the last one found. - std::string old_file_name, current_file_name, pathname, mask; - pathname = std::string(path) + std::string("/CrashReporter/"); - mask = "Second Life*"; - while(gDirUtilp->getNextFileInDir(pathname, mask, current_file_name, false)) - { - old_file_name = current_file_name; - } - if(old_file_name != "") - { - dw_file_name = pathname + old_file_name; - res=stat(dw_file_name.c_str(), &dw_stat); - isLeopard = true; - } - } - - if (!res) - { - std::ifstream fp(dw_file_name.c_str()); - std::stringstream str; - if(!fp.is_open()) return; - str << fp.rdbuf(); - mBuf = str.str(); - - if(!isLeopard) - { - // Crash logs consist of a number of entries, one per crash. - // Each entry is preceeded by "**********" on a line by itself. - // We want only the most recent (i.e. last) one. - const char *sep = "**********"; - const char *start = mBuf.c_str(); - const char *cur = start; - const char *temp = strstr(cur, sep); - - while(temp != NULL) - { - // Skip past the marker we just found - cur = temp + strlen(sep); /* Flawfinder: ignore */ - - // and try to find another - temp = strstr(cur, sep); - } - - // If there's more than one entry in the log file, strip all but the last one. - if(cur != start) - { - mBuf.erase(0, cur - start); - } - } - mCrashInfo["CrashLog"] = mBuf; - } - else - { - llwarns << "Couldn't find any CrashReporter files..." << llendl; - } - } - } } bool LLCrashLoggerMac::mainLoop() diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index 3b73e04786..9f0ff654fc 100644 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -42,12 +42,12 @@ set(media_plugin_gstreamer010_HEADER_FILES llmediaimplgstreamertriviallogging.h ) -if (${CXX_VERSION_NUMBER} MATCHES "4[23].") +if (${CXX_VERSION_NUMBER} MATCHES "4[23456789].") # Work around a bad interaction between broken gstreamer headers and - # g++ 4.3's increased strictness. + # g++ >= 4.2's increased strictness. set_source_files_properties(llmediaimplgstreamervidplug.cpp PROPERTIES COMPILE_FLAGS -Wno-write-strings) -endif (${CXX_VERSION_NUMBER} MATCHES "4[23].") +endif (${CXX_VERSION_NUMBER} MATCHES "4[23456789].") add_library(media_plugin_gstreamer010 SHARED diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 033c4ba2f3..e6d2ad3edc 100644 --- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp @@ -544,8 +544,12 @@ MediaPluginGStreamer010::pause() { DEBUGMSG("pausing media..."); // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); - return true; + if (mDoneInit && mPlaybin) + { + llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); + return true; + } + return false; } bool @@ -553,8 +557,12 @@ MediaPluginGStreamer010::stop() { DEBUGMSG("stopping media..."); // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_READY); - return true; + if (mDoneInit && mPlaybin) + { + llgst_element_set_state(mPlaybin, GST_STATE_READY); + return true; + } + return false; } bool @@ -564,8 +572,12 @@ MediaPluginGStreamer010::play(double rate) DEBUGMSG("playing media... rate=%f", rate); // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); - return true; + if (mDoneInit && mPlaybin) + { + llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); + return true; + } + return false; } bool @@ -608,7 +620,7 @@ bool MediaPluginGStreamer010::getTimePos(double &sec_out) { bool got_position = false; - if (mPlaybin) + if (mDoneInit && mPlaybin) { gint64 pos; GstFormat timefmt = GST_FORMAT_TIME; @@ -688,6 +700,7 @@ MediaPluginGStreamer010::load() this); llgst_object_unref (bus); +#if 0 // not quite stable/correct yet // get a visualizer element (bonus feature!) char* vis_name = getenv("LL_GST_VIS_NAME"); if (!vis_name || @@ -714,6 +727,7 @@ MediaPluginGStreamer010::load() } } } +#endif if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) { // instantiate a custom video sink diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 0cd6e48d14..6990354486 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -297,11 +297,8 @@ private: // append details to agent string LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent ); - // TODO: Remove this ifdef when the Linux version of llqtwebkit gets updated with the new WOB constant. -#if !LL_LINUX // Set up window open behavior LLQtWebKit::getInstance()->setWindowOpenBehavior(mBrowserWindowId, LLQtWebKit::WOB_SIMULATE_BLANK_HREF_CLICK); -#endif #if !LL_QTWEBKIT_USES_PIXMAPS // don't flip bitmap diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index cb5623a743..038c7a17ed 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -215,6 +215,7 @@ set(viewer_SOURCE_FILES llfloaterurldisplay.cpp llfloaterurlentry.cpp llfloatervoicedevicesettings.cpp + llfloatervoiceeffect.cpp llfloaterwater.cpp llfloaterwhitelistentry.cpp llfloaterwindlight.cpp @@ -307,6 +308,7 @@ set(viewer_SOURCE_FILES llnotificationstorage.cpp llnotificationtiphandler.cpp lloutfitslist.cpp + lloutfitobserver.cpp lloutputmonitorctrl.cpp llpanelavatar.cpp llpanelavatartag.cpp @@ -357,6 +359,8 @@ set(viewer_SOURCE_FILES llpanelprofileview.cpp llpanelteleporthistory.cpp llpaneltiptoast.cpp + llpanelvoiceeffect.cpp + llpaneltopinfobar.cpp llpanelvolume.cpp llpanelvolumepulldown.cpp llparcelselection.cpp @@ -737,6 +741,7 @@ set(viewer_HEADER_FILES llfloaterurldisplay.h llfloaterurlentry.h llfloatervoicedevicesettings.h + llfloatervoiceeffect.h llfloaterwater.h llfloaterwhitelistentry.h llfloaterwindlight.h @@ -824,6 +829,7 @@ set(viewer_HEADER_FILES llnotificationmanager.h llnotificationstorage.h lloutfitslist.h + lloutfitobserver.h lloutputmonitorctrl.h llpanelavatar.h llpanelavatartag.h @@ -874,6 +880,8 @@ set(viewer_HEADER_FILES llpanelprofileview.h llpanelteleporthistory.h llpaneltiptoast.h + llpanelvoiceeffect.h + llpaneltopinfobar.h llpanelvolume.h llpanelvolumepulldown.h llparcelselection.h @@ -1068,7 +1076,6 @@ set(viewer_HEADER_FILES llwearabletype.h llweb.h llwind.h - llwindebug.h llwlanimator.h llwldaycycle.h llwlparammanager.h @@ -1142,12 +1149,10 @@ endif (LINUX) if (WINDOWS) list(APPEND viewer_SOURCE_FILES llappviewerwin32.cpp - llwindebug.cpp ) list(APPEND viewer_HEADER_FILES llappviewerwin32.h - llwindebug.h ) # precompiled header configuration @@ -1704,6 +1709,29 @@ if (LINUX) add_dependencies(package linux-updater-target) check_message_template(package) endif (NOT INSTALL) + + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched + COMMAND ${PYTHON_EXECUTABLE} + ARGS + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + --arch=${ARCH} + --actions=copy + --artwork=${ARTWORK_DIR} + --build=${CMAKE_CURRENT_BINARY_DIR} + --buildtype=${CMAKE_BUILD_TYPE} + --configuration=${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged + --grid=${GRID} + --source=${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${COPY_INPUT_DEPENDENCIES} + COMMENT "Performing viewer_manifest copy" + ) + + add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched) + add_dependencies(copy_l_viewer_manifest "${VIEWER_BINARY_NAME}" linux-crash-logger-target linux-updater-target) endif (LINUX) if (DARWIN) @@ -1738,52 +1766,30 @@ if (DARWIN) DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) - add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger) if (PACKAGE) add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME}) check_message_template(package) - add_dependencies(package mac-updater mac-crash-logger) add_custom_command( TARGET package POST_BUILD COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - --grid=${GRID} - --buildtype=${CMAKE_BUILD_TYPE} - --configuration=${CMAKE_CFG_INTDIR} - --channel=${VIEWER_CHANNEL} - --login_channel=${VIEWER_LOGIN_CHANNEL} - --source=${CMAKE_CURRENT_SOURCE_DIR} --artwork=${ARTWORK_DIR} --build=${CMAKE_CURRENT_BINARY_DIR} - --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app - --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - ) - - - add_custom_command( - TARGET package POST_BUILD - COMMAND ${PYTHON_EXECUTABLE} - ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - --grid=${GRID} --buildtype=${CMAKE_BUILD_TYPE} - --configuration=${CMAKE_CFG_INTDIR} --channel=${VIEWER_CHANNEL} + --configuration=${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app + --grid=${GRID} --login_channel=${VIEWER_LOGIN_CHANNEL} --source=${CMAKE_CURRENT_SOURCE_DIR} - --artwork=${ARTWORK_DIR} - --build=${CMAKE_CURRENT_BINARY_DIR} - --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) - endif (PACKAGE) endif (DARWIN) @@ -1791,6 +1797,45 @@ if (INSTALL) include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake) endif (INSTALL) +if (PACKAGE) + if (WINDOWS) + set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-windows.tar.bz2") + set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX} slplugin.exe") + set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}") + set(VIEWER_COPY_MANIFEST copy_w_viewer_manifest) + endif (WINDOWS) + if (DARWIN) + set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2") + set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin") + set(VIEWER_LIB_GLOB "*.dylib") + endif (DARWIN) + if (LINUX) + set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/packaged") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2") + set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin") + set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*") + set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest) + endif (LINUX) + + add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}" + COMMAND "${PYTHON_EXECUTABLE}" + ARGS + "${CMAKE_CURRENT_SOURCE_DIR}/generate_breakpad_symbols.py" + "${VIEWER_DIST_DIR}" + "${VIEWER_EXE_GLOBS}" + "${VIEWER_LIB_GLOB}" + "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/bin/dump_syms" + "${VIEWER_SYMBOL_FILE}" + DEPENDS generate_breakpad_symbols.py + VERBATIM + ) + add_custom_target(generate_breakpad_symbols ALL DEPENDS "${VIEWER_SYMBOL_FILE}") + add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}") + add_dependencies(package generate_breakpad_symbols) +endif (PACKAGE) + if (LL_TESTS) # To add a viewer unit test, just add the test .cpp file below # This creates a separate test project per file listed. diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index 4831dc7273..fc531f93d4 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -2,6 +2,6 @@ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 2.0.2.0"; -CFBundleGetInfoString = "Second Life version 2.0.2.0, Copyright 2004-2009 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 2.1.0.0"; +CFBundleGetInfoString = "Second Life version 2.1.0.0, Copyright 2004-2009 Linden Research, Inc."; diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index fa2adac10c..97e24a0bd5 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -60,7 +60,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>2.0.2.0</string> + <string>2.1.0.0</string> <key>CSResourcesFileMapped</key> <true/> </dict> diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 16e39fc1c4..937c4e4c6a 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -41,6 +41,8 @@ </array> <key>tags</key> <array> + <!-- sample entry for debugging a specific item --> +<!-- <string>Voice</string> --> </array> </map> </array> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c05c08168a..92524f3f6d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1,6 +1,17 @@ <?xml version="1.0" ?> <llsd> <map> + <key>CrashHostUrl</key> + <map> + <key>Comment</key> + <string>A URL pointing to a crash report handler; overrides cluster negotiation to locate crash handler.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string /> + </map> <key>AFKTimeout</key> <map> <key>Comment</key> @@ -583,7 +594,7 @@ <key>Type</key> <string>U32</string> <key>Value</key> - <integer>0</integer> + <integer>120</integer> </map> <key>AvatarSex</key> <map> @@ -2830,6 +2841,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>FeatureManagerHTTPTable</key> + <map> + <key>Comment</key> + <string>Base directory for HTTP feature/gpu table fetches</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://viewer-settings.secondlife.com</string> + </map> <key>FPSLogFrequency</key> <map> <key>Comment</key> @@ -3534,6 +3556,17 @@ <key>Value</key> <real>9.0</real> </map> + <key>ForceAssetFail</key> + <map> + <key>Comment</key> + <string>Force wearable fetches to fail for this asset type.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>255</integer> + </map> <key>ForceShowGrid</key> <map> <key>Comment</key> @@ -3567,17 +3600,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>FullScreen</key> - <map> - <key>Comment</key> - <string>Run SL in fullscreen mode</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>FullScreenAspectRatio</key> <map> <key>Comment</key> @@ -3587,7 +3609,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>1.33329999447</real> + <real>3</real> </map> <key>FullScreenAutoDetectAspectRatio</key> <map> @@ -3598,29 +3620,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> - </map> - <key>FullScreenHeight</key> - <map> - <key>Comment</key> - <string>Fullscreen resolution in height</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>768</integer> - </map> - <key>FullScreenWidth</key> - <map> - <key>Comment</key> - <string>Fullscreen resolution in width</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>1024</integer> + <integer>0</integer> </map> <key>GesturesMarketplaceURL</key> <map> @@ -3862,7 +3862,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>InBandwidth</key> <map> @@ -4656,7 +4656,381 @@ <string>String</string> <key>Value</key> <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> - </map> + </map> + <key>MarketplaceURL_objectFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Attachments Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/attachments</string> + </map> + <key>MarketplaceURL_objectMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Attachments Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/attachments</string> + </map> + <key>MarketplaceURL_clothingFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Clothing Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/clothing_female_avatar</string> + </map> + <key>MarketplaceURL_clothingMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Clothing Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/clothing_male_avatar</string> + </map> + <key>MarketplaceURL_bodypartFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Bodyparts Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> + </map> + <key>MarketplaceURL_bodypartMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Bodyparts Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> + </map> + <key>MarketplaceURL_glovesMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Gloves Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men</string> + </map> + <key>MarketplaceURL_glovesFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Gloves Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men</string> + </map> + <key>MarketplaceURL_jacketFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Jacket Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/jacket_womens</string> + </map> + <key>MarketplaceURL_jacketMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Jacket Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/jacket_mens</string> + </map> + <key>MarketplaceURL_shirtFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shirt Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/shirt_womens</string> + </map> + <key>MarketplaceURL_shirtMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shirt Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/shirt_mens</string> + </map> + <key>MarketplaceURL_undershirtFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Undershirt Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/undershirt_womens</string> + </map> + <key>MarketplaceURL_undershirtMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Undershirt Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/undershirt_mens</string> + </map> + <key>MarketplaceURL_skirtFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Skirt Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/skirts_women</string> + </map> + <key>MarketplaceURL_skirtMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Skirt Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/skirts_women</string> + </map> + <key>MarketplaceURL_pantsFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Pants Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/pants_women</string> + </map> + <key>MarketplaceURL_pantsMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Pants Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/pants_men</string> + </map> + <key>MarketplaceURL_underpantsFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Underwear Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/underwear_women</string> + </map> + <key>MarketplaceURL_underpantsMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Underwear Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/underwear_men</string> + </map> + <key>MarketplaceURL_shoesFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shoes Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/shoes_women</string> + </map> + <key>MarketplaceURL_shoesMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shoes Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/shoes_men</string> + </map> + <key>MarketplaceURL_socksFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Socks Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/socks_women</string> + </map> + <key>MarketplaceURL_socksMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Socks Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/socks_women</string> + </map> + <key>MarketplaceURL_tattooMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Tattoo Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men</string> + </map> + <key>MarketplaceURL_tattooFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Tattoo Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men</string> + </map> + <key>MarketplaceURL_hairFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Hair Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_hair</string> + </map> + <key>MarketplaceURL_hairMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Hair Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_hair</string> + </map> + <key>MarketplaceURL_eyesFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Eyes Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_eyes</string> + </map> + <key>MarketplaceURL_eyesMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Eyes Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_eyes</string> + </map> + <key>MarketplaceURL_shapeFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shape Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_shape</string> + </map> + <key>MarketplaceURL_shapeMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shape Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_shape</string> + </map> + <key>MarketplaceURL_skinFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Skin Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_skin</string> + </map> + <key>MarketplaceURL_skinMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Skins Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_skin</string> + </map> <key>MaxDragDistance</key> <map> <key>Comment</key> @@ -4679,6 +5053,17 @@ <key>Value</key> <real>64.0</real> </map> + <key>MaxWearableWaitTime</key> + <map> + <key>Comment</key> + <string>Max seconds to wait for wearable assets to fetch.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>60.0</real> + </map> <key>MeanCollisionBump</key> <map> <key>Comment</key> @@ -6202,7 +6587,7 @@ <key>Type</key> <string>S32</string> <key>Value</key> - <integer>35</integer> + <integer>12</integer> </map> <key>RenderAvatarVP</key> <map> @@ -8393,6 +8778,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowMiniLocationPanel</key> + <map> + <key>Comment</key> + <string>Show/Hide Mini-Location Panel</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> @@ -10536,7 +10932,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>UseStartScreen</key> <map> @@ -10792,6 +11188,28 @@ <key>Value</key> <integer>0</integer> </map> + <key>VoiceEffectExpiryWarningTime</key> + <map> + <key>Comment</key> + <string>How much notice to give of Voice Morph subscriptions expiry, in seconds.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>259200</integer> + </map> + <key>VoiceMorphingEnabled</key> + <map> + <key>Comment</key> + <string>Whether or not to enable Voice Morphs and show the UI.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>AutoDisengageMic</key> <map> <key>Comment</key> @@ -11428,5 +11846,27 @@ <key>Value</key> <integer>1</integer> </map> + <key>OutfitOperationsTimeout</key> + <map> + <key>Comment</key> + <string>Timeout for outfit related operations.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>180</integer> + </map> + <key>HeightUnits</key> + <map> + <key>Comment</key> + <string>Determines which metric units are used: 1(TRUE) for meter and 0(FALSE) for foot.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 3ce32a05b0..dc76a4e518 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1,26 +1,26 @@ <llsd> <map> - <key>BusyModeResponse</key> + <key>BusyResponseChanged</key> <map> <key>Comment</key> - <string>Auto response to instant messages while in busy mode.</string> + <string>Does user's busy mode message differ from default?</string> <key>Persist</key> <integer>1</integer> <key>Type</key> - <string>String</string> + <string>Boolean</string> <key>Value</key> - <string>The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string> + <integer>0</integer> </map> - <key>BusyModeResponse2</key> + <key>BusyModeResponse</key> <map> <key>Comment</key> - <string>Auto response to instant messages while in busy mode, clean (unencoded) version of BusyModeResponse</string> + <string>Auto response to instant messages while in busy mode.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>String</string> <key>Value</key> - <string>|TOKEN COPY BusyModeResponse|</string> + <string>The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string> </map> <key>InstantMessageLogPath</key> <map> @@ -99,6 +99,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>VoiceEffectDefault</key> + <map> + <key>Comment</key> + <string>Selected Voice Morph</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>00000000-0000-0000-0000-000000000000</string> + </map> <!-- Settings below are for back compatibility only. They are not used in current viewer anymore. But they can't be removed to avoid diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index de4d787d65..e8591ca086 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -26,7 +26,7 @@ list all RenderAnisotropic 1 0 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 -RenderAvatarMaxVisible 1 35 +RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 1 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index adda7cec4d..779490c9f7 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -26,7 +26,7 @@ list all RenderAnisotropic 1 0 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 -RenderAvatarMaxVisible 1 35 +RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 1 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 82886d7e2c..47033efc47 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -26,7 +26,7 @@ list all RenderAnisotropic 1 0 RenderAvatarCloth 0 0 RenderAvatarLODFactor 1 1.0 -RenderAvatarMaxVisible 1 35 +RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 0 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py new file mode 100644 index 0000000000..1f42004bb7 --- /dev/null +++ b/indra/newview/generate_breakpad_symbols.py @@ -0,0 +1,135 @@ +#!/usr/bin/env python +# @file generate_breakpad_symbols.py +# @author Brad Kittenbrink <brad@lindenlab.com> +# @brief Simple tool for generating google_breakpad symbol information +# for the crash reporter. +# +# $LicenseInfo:firstyear=2010&license=viewergpl$ +# +# Copyright (c) 2010-2010, Linden Research, Inc. +# +# Second Life Viewer Source Code +# The source code in this file ("Source Code") is provided by Linden Lab +# to you under the terms of the GNU General Public License, version 2.0 +# ("GPL"), unless you have obtained a separate licensing agreement +# ("Other License"), formally executed by you and Linden Lab. Terms of +# the GPL can be found in doc/GPL-license.txt in this distribution, or +# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 +# +# There are special exceptions to the terms and conditions of the GPL as +# it is applied to this Source Code. View the full text of the exception +# in the file doc/FLOSS-exception.txt in this software distribution, or +# online at +# http://secondlifegrid.net/programs/open_source/licensing/flossexception +# +# By copying, modifying or distributing this software, you acknowledge +# that you have read and understood your obligations described above, +# and agree to abide by those obligations. +# +# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO +# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +# COMPLETENESS OR PERFORMANCE. +# $/LicenseInfo$ + + +import collections +import fnmatch +import itertools +import operator +import os +import sys +import shlex +import subprocess +import tarfile +import StringIO + +def usage(): + print >>sys.stderr, "usage: %s viewer_dir viewer_exes libs_suffix dump_syms_tool viewer_symbol_file" % sys.argv[0] + +class MissingModuleError(Exception): + def __init__(self, modules): + Exception.__init__(self, "Failed to find required modules: %r" % modules) + self.modules = modules + +def main(viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file): + print "generate_breakpad_symbols run with args: %s" % str((viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file)) + + # split up list of viewer_exes + # "'Second Life' SLPlugin" becomes ['Second Life', 'SLPlugin'] + viewer_exes = shlex.split(viewer_exes) + + found_required = dict([(module, False) for module in viewer_exes]) + + def matches(f): + if f in viewer_exes: + found_required[f] = True + return True + return fnmatch.fnmatch(f, libs_suffix) + + def list_files(): + for (dirname, subdirs, filenames) in os.walk(viewer_dir): + #print "scanning '%s' for modules..." % dirname + for f in itertools.ifilter(matches, filenames): + yield os.path.join(dirname, f) + + def dump_module(m): + print "dumping module '%s' with '%s'..." % (m, dump_syms_tool) + child = subprocess.Popen([dump_syms_tool, m] , stdout=subprocess.PIPE) + out, err = child.communicate() + return (m,child.returncode, out, err) + + out = tarfile.open(viewer_symbol_file, 'w:bz2') + + for (filename,status,symbols,err) in itertools.imap(dump_module, list_files()): + if status == 0: + module_line = symbols[:symbols.index('\n')] + module_line = module_line.split() + hash_id = module_line[3] + module = ' '.join(module_line[4:]) + if sys.platform in ['win32', 'cygwin']: + mod_name = module[:module.rindex('.pdb')] + else: + mod_name = module + symbolfile = StringIO.StringIO(symbols) + info = tarfile.TarInfo("%(module)s/%(hash_id)s/%(mod_name)s.sym" % dict(module=module, hash_id=hash_id, mod_name=mod_name)) + info.size = symbolfile.len + out.addfile(info, symbolfile) + else: + print >>sys.stderr, "warning: failed to dump symbols for '%s': %s" % (filename, err) + + out.close() + + missing_modules = [m for (m,_) in + itertools.ifilter(lambda (k,v): not v, found_required.iteritems()) + ] + if missing_modules: + print >> sys.stderr, "failed to generate %s" % viewer_symbol_file + os.remove(viewer_symbol_file) + raise MissingModuleError(missing_modules) + + symbols = tarfile.open(viewer_symbol_file, 'r:bz2') + tarfile_members = symbols.getnames() + symbols.close() + + for required_module in viewer_exes: + def match_module_basename(m): + return os.path.splitext(required_module)[0].lower() \ + == os.path.splitext(os.path.basename(m))[0].lower() + # there must be at least one .sym file in tarfile_members that matches + # each required module (ignoring file extensions) + if not reduce(operator.or_, itertools.imap(match_module_basename, tarfile_members)): + print >> sys.stderr, "failed to find required %s in generated %s" \ + % (required_module, viewer_symbol_file) + os.remove(viewer_symbol_file) + raise MissingModuleError([required_module]) + + print "successfully generated %s including required modules '%s'" % (viewer_symbol_file, viewer_exes) + + return 0 + +if __name__ == "__main__": + if len(sys.argv) != 6: + usage() + sys.exit(1) + sys.exit(main(*sys.argv[1:])) + diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 5aad295cb1..62766f9229 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -204,8 +204,8 @@ NVIDIA GeForce 7200 .*NVIDIA.*GeForce 72.* 1 1 NVIDIA GeForce 7300 .*NVIDIA.*GeForce 73.* 1 1 NVIDIA GeForce 7500 .*NVIDIA.*GeForce 75.* 1 1 NVIDIA GeForce 7600 .*NVIDIA.*GeForce 76.* 1 1 -NVIDIA GeForce 7800 .*NVIDIA.*GeForce.*78.* 1 1 -NVIDIA GeForce 7900 .*NVIDIA.*GeForce.*79.* 1 1 +NVIDIA GeForce 7800 .*NVIDIA.*GeForce 78.* 1 1 +NVIDIA GeForce 7900 .*NVIDIA.*GeForce 79.* 1 1 NVIDIA GeForce 8100 .*NVIDIA.*GeForce 81.* 1 1 NVIDIA GeForce 8200 .*NVIDIA.*GeForce 82.* 1 1 NVIDIA GeForce 8300 .*NVIDIA.*GeForce 83.* 1 1 @@ -259,6 +259,7 @@ NVIDIA G84 .*G84.* 1 1 NVIDIA G92 .*G92.* 3 1 NVIDIA G94 .*G94.* 3 1 NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1 +NVIDIA ION .*NVIDIA ION.* 1 1 NVIDIA NB9M .*GeForce NB9M.* 1 1 NVIDIA NB9P .*GeForce NB9P.* 1 1 NVIDIA GeForce PCX .*GeForce PCX.* 0 1 diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index d2e55f88a0..03efcadc98 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3589,10 +3589,10 @@ void LLAgent::sendAgentSetAppearance() if (isAgentAvatarValid() && !gAgentAvatarp->isBakedTextureFinal((LLVOAvatarDefines::EBakedTextureIndex)baked_index)) { generate_valid_hash = FALSE; + llinfos << "Not caching baked texture upload for " << (U32)baked_index << " due to being uploaded at low resolution." << llendl; } - LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index, generate_valid_hash); - + const LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index, generate_valid_hash); if (hash.notNull()) { ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex) baked_index); diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 47f290ad3b..9cf0a659c1 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -207,13 +207,13 @@ void LLAgentCamera::init() mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); - mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3("CameraOffsetRearView"); - mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3("CameraOffsetFrontView"); - mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3("CameraOffsetGroupView"); + mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("CameraOffsetRearView"); + mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("CameraOffsetFrontView"); + mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("CameraOffsetGroupView"); - mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3d("FocusOffsetRearView"); - mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3d("FocusOffsetFrontView"); - mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3d("FocusOffsetGroupView"); + mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("FocusOffsetRearView"); + mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("FocusOffsetFrontView"); + mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("FocusOffsetGroupView"); mCameraCollidePlane.clearVec(); mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale"); @@ -1643,8 +1643,8 @@ LLVector3d LLAgentCamera::calcThirdPersonFocusOffset() agent_rot *= ((LLViewerObject*)(gAgentAvatarp->getParent()))->getRenderRotation(); } - focus_offset = mFocusOffsetInitial[mCameraPreset] * agent_rot; - return focus_offset; + focus_offset = convert_from_llsd<LLVector3d>(mFocusOffsetInitial[mCameraPreset]->get(), TYPE_VEC3D, ""); + return focus_offset * agent_rot; } void LLAgentCamera::setupSitCamera() @@ -1978,7 +1978,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) LLVector3 LLAgentCamera::getCameraOffsetInitial() { - return mCameraOffsetInitial[mCameraPreset]; + return convert_from_llsd<LLVector3>(mCameraOffsetInitial[mCameraPreset]->get(), TYPE_VEC3, ""); } @@ -2084,6 +2084,9 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate) // visibility changes at end of animation gViewerWindow->getWindow()->resetBusyCount(); + // Menus should not remain open on switching to mouselook... + LLMenuGL::sMenuContainer->hideMenus(); + // unpause avatar animation gAgent.unpauseAnimation(); @@ -2312,12 +2315,6 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came startCameraAnimation(); } - // Remove any pitch from the avatar - //LLVector3 at = gAgent.getFrameAgent().getAtAxis(); - //at.mV[VZ] = 0.f; - //at.normalize(); - //gAgent.resetAxes(at); - if (mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR) { updateLastCamera(); @@ -2338,9 +2335,11 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came if (isAgentAvatarValid()) { if(avatar_animate) - { - // Remove any pitch from the avatar - LLVector3 at = gAgent.getFrameAgent().getAtAxis(); + { + // slamming the avatar's axis to the camera so that when the rotation + // completes it correctly points to the front of the avatar + // Remove any pitch or rotation from the avatar + LLVector3 at = LLViewerCamera::getInstance()->getAtAxis(); at.mV[VZ] = 0.f; at.normalize(); gAgent.resetAxes(at); @@ -2360,7 +2359,11 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came mAnimationDuration = gSavedSettings.getF32("ZoomTime"); } } + + // this is what sets the avatar as the mFocusTargetGlobal setFocusGlobal(LLVector3d::zero); + + gAgentAvatarp->updateMeshTextures(); } else { diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 5cbb1de6f4..7afb5c0ed9 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -39,6 +39,7 @@ class LLPickInfo; class LLVOAvatarSelf; +class LLControlVariable; //-------------------------------------------------------------------- // Types @@ -121,10 +122,10 @@ private: ECameraPreset mCameraPreset; /** Initial camera offsets */ - std::map<ECameraPreset, LLVector3> mCameraOffsetInitial; + std::map<ECameraPreset, LLPointer<LLControlVariable> > mCameraOffsetInitial; /** Initial focus offsets */ - std::map<ECameraPreset, LLVector3d> mFocusOffsetInitial; + std::map<ECameraPreset, LLPointer<LLControlVariable> > mFocusOffsetInitial; //-------------------------------------------------------------------- // Position diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e0104eddf0..5728256dba 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -47,6 +47,7 @@ #include "llinventorypanel.h" #include "llmd5.h" #include "llnotificationsutil.h" +#include "lloutfitobserver.h" #include "llpaneloutfitsinventory.h" #include "llsidepanelappearance.h" #include "llsidetray.h" @@ -64,6 +65,25 @@ BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; using namespace LLVOAvatarDefines; +/////////////////////////////////////////////////////////////////////////////// + +// Callback to wear and start editing an item that has just been created. +class LLWearAndEditCallback : public LLInventoryCallback +{ + void fire(const LLUUID& inv_item) + { + if (inv_item.isNull()) return; + + // Request editing the item after it gets worn. + gAgentWearables.requestEditingWearable(inv_item); + + // Wear it. + LLAppearanceMgr::instance().wearItemOnAvatar(inv_item); + } +}; + +/////////////////////////////////////////////////////////////////////////////// + // HACK: For EXT-3923: Pants item shows in inventory with skin icon and messes with "current look" // Some db items are corrupted, have inventory flags = 0, implying wearable type = shape, even though // wearable type stored in asset is some other value. @@ -147,6 +167,7 @@ struct LLAgentDumper LLAgentWearables::LLAgentWearables() : mWearablesLoaded(FALSE) +, mCOFChangeInProgress(false) { } @@ -159,6 +180,14 @@ void LLAgentWearables::cleanup() { } +// static +void LLAgentWearables::initClass() +{ + // this can not be called from constructor because its instance is global and is created too early. + // Subscribe to "COF is Saved" signal to notify observers about this (Loading indicator for ex.). + LLOutfitObserver::instance().addCOFSavedCallback(boost::bind(&LLAgentWearables::notifyLoadingFinished, &gAgentWearables)); +} + void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar) { if (avatar) @@ -732,7 +761,7 @@ U32 LLAgentWearables::pushWearable(const LLWearableType::EType type, LLWearable void LLAgentWearables::wearableUpdated(LLWearable *wearable) { - gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); + gAgentAvatarp->wearableUpdated(wearable->getType(), FALSE); wearable->refreshName(); wearable->setLabelUpdated(); @@ -776,7 +805,7 @@ void LLAgentWearables::popWearable(const LLWearableType::EType type, U32 index) if (wearable) { mWearableDatas[type].erase(mWearableDatas[type].begin() + index); - gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); + gAgentAvatarp->wearableUpdated(wearable->getType(), FALSE); wearable->setLabelUpdated(); } } @@ -901,13 +930,19 @@ BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const // static // ! BACKWARDS COMPATIBILITY ! When we stop supporting viewer1.23, we can assume // that viewers have a Current Outfit Folder and won't need this message, and thus -// we can remove/ignore this whole function. +// we can remove/ignore this whole function. EXCEPT gAgentWearables.notifyLoadingStarted void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data) { // We should only receive this message a single time. Ignore subsequent AgentWearablesUpdates // that may result from AgentWearablesRequest having been sent more than once. if (mInitialWearablesUpdateReceived) return; + + // notify subscribers that wearables started loading. See EXT-7777 + // *TODO: find more proper place to not be called from deprecated method. + // Seems such place is found: LLInitialWearablesFetch::processContents() + gAgentWearables.notifyLoadingStarted(); + mInitialWearablesUpdateReceived = true; LLUUID agent_id; @@ -1189,7 +1224,7 @@ void LLAgentWearables::createStandardWearablesAllDone() mWearablesLoaded = TRUE; checkWearablesLoaded(); - mLoadedSignal(); + notifyLoadingFinished(); updateServer(); @@ -1441,7 +1476,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); - mLoadedSignal(); + notifyLoadingFinished(); queryWearableCache(); updateServer(); @@ -1638,10 +1673,6 @@ LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextur { LLUUID asset_id = wearable->getAssetID(); hash.update((const unsigned char*)asset_id.mData, UUID_BYTES); - if (!generate_valid_hash) - { - hash.update((const unsigned char*)asset_id.mData, UUID_BYTES); - } hash_computed = true; } } @@ -1649,6 +1680,15 @@ LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextur if (hash_computed) { hash.update((const unsigned char*)baked_dict->mWearablesHashID.mData, UUID_BYTES); + + // Add some garbage into the hash so that it becomes invalid. + if (!generate_valid_hash) + { + if (isAgentAvatarValid()) + { + hash.update((const unsigned char*)gAgentAvatarp->getID().mData, UUID_BYTES); + } + } hash.finalize(); hash.raw_digest(hash_id.mData); } @@ -1921,7 +1961,7 @@ void LLAgentWearables::updateWearablesLoaded() mWearablesLoaded = (itemUpdatePendingCount()==0); if (mWearablesLoaded) { - mLoadedSignal(); + notifyLoadingFinished(); } } @@ -1982,10 +2022,12 @@ bool LLAgentWearables::moveWearable(const LLViewerInventoryItem* item, bool clos // static void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, const LLUUID& parent_id) { + if (type == LLWearableType::WT_INVALID || type == LLWearableType::WT_NONE) return; + LLWearable* wearable = LLWearableList::instance().createNewWearable(type); LLAssetType::EType asset_type = wearable->getAssetType(); LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE; - LLPointer<LLInventoryCallback> cb = wear ? new WearOnAvatarCallback : NULL; + LLPointer<LLInventoryCallback> cb = wear ? new LLWearAndEditCallback : NULL; LLUUID folder_id; if (parent_id.notNull()) @@ -2008,17 +2050,44 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con // static void LLAgentWearables::editWearable(const LLUUID& item_id) { - LLViewerInventoryItem* item; - LLWearable* wearable; + LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id); + if (!item) + { + llwarns << "Failed to get linked item" << llendl; + return; + } + + LLWearable* wearable = gAgentWearables.getWearableFromItemID(item_id); + if (!wearable) + { + llwarns << "Cannot get wearable" << llendl; + return; + } + + if (!gAgentWearables.isWearableModifiable(item->getUUID())) + { + llwarns << "Cannot modify wearable" << llendl; + return; + } + + LLPanel* panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); + LLSidepanelAppearance::editWearable(wearable, panel); +} + +// Request editing the item after it gets worn. +void LLAgentWearables::requestEditingWearable(const LLUUID& item_id) +{ + mItemToEdit = gInventory.getLinkedItemID(item_id); +} - if ((item = gInventory.getLinkedItem(item_id)) && - (wearable = gAgentWearables.getWearableFromAssetID(item->getAssetUUID())) && - gAgentWearables.isWearableModifiable(item->getUUID()) && - item->isFinished()) +// Start editing the item if previously requested. +void LLAgentWearables::editWearableIfRequested(const LLUUID& item_id) +{ + if (mItemToEdit.notNull() && + mItemToEdit == gInventory.getLinkedItemID(item_id)) { - LLPanel* panel = LLSideTray::getInstance()->showPanel("panel_outfit_edit", LLSD()); - // copied from LLPanelOutfitEdit::onEditWearableClicked() - LLSidepanelAppearance::editWearable(wearable, panel->getParent()); + LLAgentWearables::editWearable(item_id); + mItemToEdit.setNull(); } } @@ -2046,7 +2115,25 @@ void LLAgentWearables::populateMyOutfitsFolder(void) } } +boost::signals2::connection LLAgentWearables::addLoadingStartedCallback(loading_started_callback_t cb) +{ + return mLoadingStartedSignal.connect(cb); +} + boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_t cb) { return mLoadedSignal.connect(cb); } + +void LLAgentWearables::notifyLoadingStarted() +{ + mCOFChangeInProgress = true; + mLoadingStartedSignal(); +} + +void LLAgentWearables::notifyLoadingFinished() +{ + mCOFChangeInProgress = false; + mLoadedSignal(); +} +// EOF diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 679ecefa6f..8122971db6 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -33,9 +33,13 @@ #ifndef LL_LLAGENTWEARABLES_H #define LL_LLAGENTWEARABLES_H +// libraries #include "llmemory.h" +#include "llui.h" #include "lluuid.h" #include "llinventory.h" + +// newview #include "llinventorymodel.h" #include "llviewerinventory.h" #include "llvoavatardefines.h" @@ -47,7 +51,7 @@ class LLInitialWearablesFetch; class LLViewerObject; class LLTexLayerTemplate; -class LLAgentWearables +class LLAgentWearables : public LLInitClass<LLAgentWearables> { //-------------------------------------------------------------------- // Constructors / destructors / Initializers @@ -61,6 +65,9 @@ public: void createStandardWearables(BOOL female); void cleanup(); void dump(); + + // LLInitClass interface + static void initClass(); protected: void createStandardWearablesDone(S32 type, U32 index/* = 0*/); void createStandardWearablesAllDone(); @@ -75,6 +82,7 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; + bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } void updateWearablesLoaded(); void checkWearablesLoaded() const; bool canMoveWearable(const LLUUID& item_id, bool closer_to_body); @@ -148,6 +156,12 @@ public: static void editWearable(const LLUUID& item_id); bool moveWearable(const LLViewerInventoryItem* item, bool closer_to_body); + void requestEditingWearable(const LLUUID& item_id); + void editWearableIfRequested(const LLUUID& item_id); + +private: + LLUUID mItemToEdit; + //-------------------------------------------------------------------- // Removing wearables //-------------------------------------------------------------------- @@ -218,11 +232,19 @@ public: // Signals //-------------------------------------------------------------------- public: + typedef boost::function<void()> loading_started_callback_t; + typedef boost::signals2::signal<void()> loading_started_signal_t; + boost::signals2::connection addLoadingStartedCallback(loading_started_callback_t cb); + typedef boost::function<void()> loaded_callback_t; typedef boost::signals2::signal<void()> loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); + void notifyLoadingStarted(); + void notifyLoadingFinished(); + private: + loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded //-------------------------------------------------------------------- @@ -236,6 +258,11 @@ private: static BOOL mInitialWearablesUpdateReceived; BOOL mWearablesLoaded; std::set<LLUUID> mItemsAwaitingWearableUpdate; + + /** + * True if agent's outfit is being changed now. + */ + BOOL mCOFChangeInProgress; //-------------------------------------------------------------------------------- // Support classes diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index ef0b97d376..931aba1d41 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -121,6 +121,7 @@ void LLInitialWearablesFetch::processContents() LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); if (wearable_array.count() > 0) { + gAgentWearables.notifyLoadingStarted(); LLAppearanceMgr::instance().updateAppearanceFromCOF(); } else diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e6f363028a..405cc5b282 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -38,11 +38,13 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llcommandhandler.h" +#include "lleventtimer.h" #include "llgesturemgr.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "llnotificationsutil.h" +#include "lloutfitobserver.h" #include "llpaneloutfitsinventory.h" #include "llselectmgr.h" #include "llsidepanelappearance.h" @@ -55,6 +57,34 @@ char ORDER_NUMBER_SEPARATOR('@'); +class LLOutfitUnLockTimer: public LLEventTimer +{ +public: + LLOutfitUnLockTimer(F32 period) : LLEventTimer(period) + { + // restart timer on BOF changed event + LLOutfitObserver::instance().addBOFChangedCallback(boost::bind( + &LLOutfitUnLockTimer::reset, this)); + stop(); + } + + /*virtual*/ + BOOL tick() + { + if(mEventTimer.hasExpired()) + { + LLAppearanceMgr::instance().setOutfitLocked(false); + } + return FALSE; + } + void stop() { mEventTimer.stop(); } + void start() { mEventTimer.start(); } + void reset() { mEventTimer.reset(); } + BOOL getStarted() { return mEventTimer.getStarted(); } + + LLTimer& getEventTimer() { return mEventTimer;} +}; + // support for secondlife:///app/appearance SLapps class LLAppearanceHandler : public LLCommandHandler { @@ -147,7 +177,13 @@ class LLUpdateDirtyState: public LLInventoryCallback { public: LLUpdateDirtyState() {} - virtual ~LLUpdateDirtyState(){ LLAppearanceMgr::getInstance()->updateIsDirty(); } + virtual ~LLUpdateDirtyState() + { + if (LLAppearanceMgr::instanceExists()) + { + LLAppearanceMgr::getInstance()->updateIsDirty(); + } + } virtual void fire(const LLUUID&) {} }; @@ -171,7 +207,9 @@ void LLUpdateAppearanceOnDestroy::fire(const LLUUID& inv_item) { LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(inv_item); const std::string item_name = item ? item->getName() : "ITEM NOT FOUND"; +#ifndef LL_RELEASE_FOR_DOWNLOAD llinfos << "callback fired [ name:" << item_name << " UUID:" << inv_item << " count:" << mFireCount << " ] " << llendl; +#endif mFireCount++; } @@ -186,13 +224,15 @@ struct LLFoundData const LLUUID& asset_id, const std::string& name, const LLAssetType::EType& asset_type, - const LLWearableType::EType& wearable_type + const LLWearableType::EType& wearable_type, + const bool is_replacement = false ) : mItemID(item_id), mAssetID(asset_id), mName(name), mAssetType(asset_type), mWearableType(wearable_type), + mIsReplacement(is_replacement), mWearable( NULL ) {} LLUUID mItemID; @@ -201,6 +241,7 @@ struct LLFoundData LLAssetType::EType mAssetType; LLWearableType::EType mWearableType; LLWearable* mWearable; + bool mIsReplacement; }; @@ -223,8 +264,18 @@ public: void onWearableAssetFetch(LLWearable *wearable); void onAllComplete(); - + typedef std::list<LLFoundData> found_list_t; + found_list_t& getFoundList(); + void eraseTypeToLink(LLWearableType::EType type); + void eraseTypeToRecover(LLWearableType::EType type); + void setObjItems(const LLInventoryModel::item_array_t& items); + void setGestItems(const LLInventoryModel::item_array_t& items); + bool isMostRecent(); + void handleLateArrivals(); + void resetTime(F32 timeout); + +private: found_list_t mFoundList; LLInventoryModel::item_array_t mObjItems; LLInventoryModel::item_array_t mGestItems; @@ -234,34 +285,94 @@ public: S32 mResolved; LLTimer mWaitTime; bool mFired; + typedef std::set<LLWearableHoldingPattern*> type_set_hp; + static type_set_hp sActiveHoldingPatterns; + bool mIsMostRecent; + std::set<LLWearable*> mLateArrivals; + bool mIsAllComplete; }; +LLWearableHoldingPattern::type_set_hp LLWearableHoldingPattern::sActiveHoldingPatterns; + LLWearableHoldingPattern::LLWearableHoldingPattern(): mResolved(0), - mFired(false) + mFired(false), + mIsMostRecent(true), + mIsAllComplete(false) { + if (sActiveHoldingPatterns.size()>0) + { + llinfos << "Creating LLWearableHoldingPattern when " + << sActiveHoldingPatterns.size() + << " other attempts are active." + << " Flagging others as invalid." + << llendl; + for (type_set_hp::iterator it = sActiveHoldingPatterns.begin(); + it != sActiveHoldingPatterns.end(); + ++it) + { + (*it)->mIsMostRecent = false; + } + + } + sActiveHoldingPatterns.insert(this); } LLWearableHoldingPattern::~LLWearableHoldingPattern() { + sActiveHoldingPatterns.erase(this); +} + +bool LLWearableHoldingPattern::isMostRecent() +{ + return mIsMostRecent; +} + +LLWearableHoldingPattern::found_list_t& LLWearableHoldingPattern::getFoundList() +{ + return mFoundList; +} + +void LLWearableHoldingPattern::eraseTypeToLink(LLWearableType::EType type) +{ + mTypesToLink.erase(type); +} + +void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) +{ + mTypesToRecover.erase(type); +} + +void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) +{ + mObjItems = items; +} + +void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t& items) +{ + mGestItems = items; } bool LLWearableHoldingPattern::isFetchCompleted() { - return (mResolved >= (S32)mFoundList.size()); // have everything we were waiting for? + return (mResolved >= (S32)getFoundList().size()); // have everything we were waiting for? } bool LLWearableHoldingPattern::isTimedOut() { - static F32 max_wait_time = 60.0; // give up if wearable fetches haven't completed in max_wait_time seconds. - return mWaitTime.getElapsedTimeF32() > max_wait_time; + return mWaitTime.hasExpired(); } void LLWearableHoldingPattern::checkMissingWearables() { + if (!isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + std::vector<S32> found_by_type(LLWearableType::WT_COUNT,0); std::vector<S32> requested_by_type(LLWearableType::WT_COUNT,0); - for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it) + for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it) { LLFoundData &data = *it; if (data.mWearableType < LLWearableType::WT_COUNT) @@ -292,7 +403,7 @@ void LLWearableHoldingPattern::checkMissingWearables() } } - mWaitTime.reset(); + resetTime(60.0F); if (!pollMissingWearables()) { doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollMissingWearables,this)); @@ -301,6 +412,11 @@ void LLWearableHoldingPattern::checkMissingWearables() void LLWearableHoldingPattern::onAllComplete() { + if (!isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + // Activate all gestures in this folder if (mGestItems.count() > 0) { @@ -336,16 +452,31 @@ void LLWearableHoldingPattern::onAllComplete() // Only safe to delete if all wearable callbacks and all missing wearables completed. delete this; } + else + { + mIsAllComplete = true; + handleLateArrivals(); + } } void LLWearableHoldingPattern::onFetchCompletion() { + if (!isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + checkMissingWearables(); } // Runs as an idle callback until all wearables are fetched (or we time out). bool LLWearableHoldingPattern::pollFetchCompletion() { + if (!isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + bool completed = isFetchCompleted(); bool timed_out = isTimedOut(); bool done = completed || timed_out; @@ -378,8 +509,13 @@ public: } void fire(const LLUUID& item_id) { + if (!mHolder->isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + llinfos << "Recovered item link for type " << mType << llendl; - mHolder->mTypesToLink.erase(mType); + mHolder->eraseTypeToLink(mType); // Add wearable to FoundData for actual wearing LLViewerInventoryItem *item = gInventory.getItem(item_id); LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; @@ -391,13 +527,14 @@ public: if (item) { LLFoundData found(linked_item->getUUID(), - linked_item->getAssetUUID(), - linked_item->getName(), - linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID - ); + linked_item->getAssetUUID(), + linked_item->getName(), + linked_item->getType(), + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID, + true // is replacement + ); found.mWearable = mWearable; - mHolder->mFoundList.push_front(found); + mHolder->getFoundList().push_front(found); } else { @@ -426,11 +563,16 @@ public: } void fire(const LLUUID& item_id) { + if (!mHolder->isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + llinfos << "Recovered item for type " << mType << llendl; LLViewerInventoryItem *itemp = gInventory.getItem(item_id); mWearable->setItemID(item_id); LLPointer<LLInventoryCallback> cb = new RecoveredItemLinkCB(mType,mWearable,mHolder); - mHolder->mTypesToRecover.erase(mType); + mHolder->eraseTypeToRecover(mType); llassert(itemp); if (itemp) { @@ -451,6 +593,11 @@ private: void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type) { + if (!isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) @@ -481,7 +628,7 @@ bool LLWearableHoldingPattern::isMissingCompleted() void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() { - for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it) + for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it) { LLFoundData &data = *it; if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) @@ -495,6 +642,11 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() bool LLWearableHoldingPattern::pollMissingWearables() { + if (!isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + bool timed_out = isTimedOut(); bool missing_completed = isMissingCompleted(); bool done = timed_out || missing_completed; @@ -508,16 +660,122 @@ bool LLWearableHoldingPattern::pollMissingWearables() if (done) { gAgentAvatarp->debugWearablesLoaded(); - clearCOFLinksForMissingWearables(); + + // BAP - if we don't call clearCOFLinksForMissingWearables() + // here, we won't have to add the link back in later if the + // wearable arrives late. This is to avoid corruption of + // wearable ordering info. Also has the effect of making + // unworn item links visible in the COF under some + // circumstances. + + //clearCOFLinksForMissingWearables(); onAllComplete(); } return done; } +// Handle wearables that arrived after the timeout period expired. +void LLWearableHoldingPattern::handleLateArrivals() +{ + // Only safe to run if we have previously finished the missing + // wearables and other processing - otherwise we could be in some + // intermediate state - but have not been superceded by a later + // outfit change request. + if (mLateArrivals.size() == 0) + { + // Nothing to process. + return; + } + if (!isMostRecent()) + { + llwarns << "Late arrivals not handled - outfit change no longer valid" << llendl; + } + if (!mIsAllComplete) + { + llwarns << "Late arrivals not handled - in middle of missing wearables processing" << llendl; + } + + llinfos << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << llendl; + + // Update mFoundList using late-arriving wearables. + std::set<LLWearableType::EType> replaced_types; + for (LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); + iter != getFoundList().end(); ++iter) + { + LLFoundData& data = *iter; + for (std::set<LLWearable*>::iterator wear_it = mLateArrivals.begin(); + wear_it != mLateArrivals.end(); + ++wear_it) + { + LLWearable *wearable = *wear_it; + + if(wearable->getAssetID() == data.mAssetID) + { + data.mWearable = wearable; + + replaced_types.insert(data.mWearableType); + + // BAP - if we didn't call + // clearCOFLinksForMissingWearables() earlier, we + // don't need to restore the link here. Fixes + // wearable ordering problems. + + // LLAppearanceMgr::instance().addCOFItemLink(data.mItemID,false); + + // BAP failing this means inventory or asset server + // are corrupted in a way we don't handle. + llassert((data.mWearableType < LLWearableType::WT_COUNT) && (wearable->getType() == data.mWearableType)); + break; + } + } + } + + // Remove COF links for any default wearables previously used to replace the late arrivals. + // All this pussyfooting around with a while loop and explicit + // iterator incrementing is to allow removing items from the list + // without clobbering the iterator we're using to navigate. + LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); + while (iter != getFoundList().end()) + { + LLFoundData& data = *iter; + + // If an item of this type has recently shown up, removed the corresponding replacement wearable from COF. + if (data.mWearable && data.mIsReplacement && + replaced_types.find(data.mWearableType) != replaced_types.end()) + { + LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false); + std::list<LLFoundData>::iterator clobber_ator = iter; + ++iter; + getFoundList().erase(clobber_ator); + } + else + { + ++iter; + } + } + + // Clear contents of late arrivals. + mLateArrivals.clear(); + + // Update appearance based on mFoundList + LLAppearanceMgr::instance().updateAgentWearables(this, false); +} + +void LLWearableHoldingPattern::resetTime(F32 timeout) +{ + mWaitTime.reset(); + mWaitTime.setTimerExpirySec(timeout); +} + void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) { + if (!isMostRecent()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } + mResolved += 1; // just counting callbacks, not successes. - llinfos << "onWearableAssetFetch, resolved count " << mResolved << " of requested " << mFoundList.size() << llendl; + llinfos << "onWearableAssetFetch, resolved count " << mResolved << " of requested " << getFoundList().size() << llendl; if (wearable) { llinfos << "wearable found, type " << wearable->getType() << " asset " << wearable->getAssetID() << llendl; @@ -530,6 +788,14 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) if (mFired) { llwarns << "called after holder fired" << llendl; + if (wearable) + { + mLateArrivals.insert(wearable); + if (mIsAllComplete) + { + handleLateArrivals(); + } + } return; } @@ -538,8 +804,8 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) return; } - for (LLWearableHoldingPattern::found_list_t::iterator iter = mFoundList.begin(); - iter != mFoundList.end(); ++iter) + for (LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); + iter != getFoundList().end(); ++iter) { LLFoundData& data = *iter; if(wearable->getAssetID() == data.mAssetID) @@ -614,6 +880,13 @@ const LLViewerInventoryItem* LLAppearanceMgr::getBaseOutfitLink() const LLViewerInventoryCategory *cat = item->getLinkedCategory(); if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT) { + const LLUUID parent_id = cat->getParentUUID(); + LLViewerInventoryCategory* parent_cat = gInventory.getCategory(parent_id); + // if base outfit moved to trash it means that we don't have base outfit + if (parent_cat != NULL && parent_cat->getPreferredType() == LLFolderType::FT_TRASH) + { + return NULL; + } return item; } } @@ -656,15 +929,45 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up { if (item_id_to_wear.isNull()) return false; - //only the item from a user's inventory is allowed - if (!gInventory.isObjectDescendentOf(item_id_to_wear, gInventory.getRootFolderID())) return false; + // *TODO: issue with multi-wearable should be fixed: + // in this case this method will be called N times - loading started for each item + // and than N times will be called - loading completed for each item. + // That means subscribers will be notified that loading is done after first item in a batch is worn. + // (loading indicator disappears for example before all selected items are worn) + // Have not fix this issue for 2.1 because of stability reason. EXT-7777. + gAgentWearables.notifyLoadingStarted(); LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear); if (!item_to_wear) return false; + if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getLibraryRootFolderID())) + { + LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(replace); + copy_inventory_item(gAgent.getID(), item_to_wear->getPermissions().getOwner(), item_to_wear->getUUID(), LLUUID::null, std::string(),cb); + return false; + } + else if (!gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getRootFolderID())) + { + return false; // not in library and not in agent's inventory + } + else if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH))) + { + LLNotificationsUtil::add("CannotWearTrash"); + return false; + } + switch (item_to_wear->getType()) { case LLAssetType::AT_CLOTHING: + if (gAgentWearables.areWearablesLoaded()) + { + S32 wearable_count = gAgentWearables.getWearableCount(item_to_wear->getWearableType()); + if ((replace && wearable_count != 0) || + (wearable_count >= LLAgentWearables::MAX_CLOTHING_PER_TYPE) ) + { + removeCOFItemLinks(gAgentWearables.getWearableItemID(item_to_wear->getWearableType(), wearable_count-1), false); + } + } case LLAssetType::AT_BODYPART: // Don't wear anything until initial wearables are loaded, can // destroy clothing items. @@ -676,7 +979,7 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up // Remove the existing wearables of the same type. // Remove existing body parts anyway because we must not be able to wear e.g. two skins. - if (replace || item_to_wear->getType() == LLAssetType::AT_BODYPART) + if (item_to_wear->getType() == LLAssetType::AT_BODYPART) { removeCOFLinksOfType(item_to_wear->getWearableType(), false); } @@ -740,6 +1043,27 @@ void LLAppearanceMgr::onOutfitRename(const LLSD& notification, const LLSD& respo } } +void LLAppearanceMgr::setOutfitLocked(bool locked) +{ + if (mOutfitLocked == locked) + { + return; + } + + mOutfitLocked = locked; + if (locked) + { + mUnlockOutfitTimer->reset(); + mUnlockOutfitTimer->start(); + } + else + { + mUnlockOutfitTimer->stop(); + } + + LLOutfitObserver::instance().notifyOutfitLockChanged(); +} + void LLAppearanceMgr::addCategoryToCurrentOutfit(const LLUUID& cat_id) { LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); @@ -750,7 +1074,7 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) { LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - LLFindWorn collector; + LLFindWearablesEx collector(/*is_worn=*/ true, /*include_body_parts=*/ false); gInventory.collectDescendentsIf(cat_id, cats, items, FALSE, collector); @@ -892,18 +1216,10 @@ bool LLAppearanceMgr::getCanRemoveOutfit(const LLUUID& outfit_cat_id) return false; } - // Check if the folder contains worn items. - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLFindWorn filter_worn; - gInventory.collectDescendentsIf(outfit_cat_id, cats, items, false, filter_worn); - if (!items.empty()) - { - return false; - } - // Check for the folder's non-removable descendants. LLFindNonRemovableObjects filter_non_removable; + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; LLInventoryModel::item_array_t::const_iterator it; gInventory.collectDescendentsIf(outfit_cat_id, cats, items, false, filter_non_removable); if (!cats.empty() || !items.empty()) @@ -914,6 +1230,34 @@ bool LLAppearanceMgr::getCanRemoveOutfit(const LLUUID& outfit_cat_id) return true; } +// static +bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id) +{ + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(outfit_cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + is_worn); + return items.size() > 0; +} + +// static +bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id) +{ + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(outfit_cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + return items.size() > 0; +} + void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category) { LLInventoryModel::cat_array_t cats; @@ -996,8 +1340,9 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid, const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_uuid); const std::string cat_name = cat ? cat->getName() : "CAT NOT FOUND"; - - llinfos << "Linking Item [ name:" << item->getName() << " UUID:" << item->getUUID() << " ] to Category [ name:" << cat_name << " UUID:" << cat_uuid << " ] " << llendl; // Seraph remove for 2.1 +#ifndef LL_RELEASE_FOR_DOWNLOAD + llinfos << "Linking Item [ name:" << item->getName() << " UUID:" << item->getUUID() << " ] to Category [ name:" << cat_name << " UUID:" << cat_uuid << " ] " << llendl; +#endif } } @@ -1027,9 +1372,12 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) // - Body parts: always include COF contents as a fallback in case any // required parts are missing. + // Preserve body parts from COF if appending. LLInventoryModel::item_array_t body_items; getDescendentsOfAssetType(cof, body_items, LLAssetType::AT_BODYPART, false); getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART, false); + if (append) + reverse(body_items.begin(), body_items.end()); // Reduce body items to max of one per type. removeDuplicateItems(body_items); filterWearableItems(body_items, 1); @@ -1066,13 +1414,24 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) llinfos << "creating LLUpdateAppearanceOnDestroy" << llendl; LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; - llinfos << "Linking body items" << llendl; // Seraph remove for 2.1 +#ifndef LL_RELEASE_FOR_DOWNLOAD + llinfos << "Linking body items" << llendl; +#endif linkAll(cof, body_items, link_waiter); - llinfos << "Linking wear items" << llendl; // Seraph remove for 2.1 + +#ifndef LL_RELEASE_FOR_DOWNLOAD + llinfos << "Linking wear items" << llendl; +#endif linkAll(cof, wear_items, link_waiter); - llinfos << "Linking obj items" << llendl; // Seraph remove for 2.1 + +#ifndef LL_RELEASE_FOR_DOWNLOAD + llinfos << "Linking obj items" << llendl; +#endif linkAll(cof, obj_items, link_waiter); - llinfos << "Linking gesture items" << llendl; // Seraph remove for 2.1 + +#ifndef LL_RELEASE_FOR_DOWNLOAD + llinfos << "Linking gesture items" << llendl; +#endif linkAll(cof, gest_items, link_waiter); // Add link to outfit if category is an outfit. @@ -1117,12 +1476,11 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo LLInventoryItem::item_array_t items; LLDynamicArray< LLWearable* > wearables; - // For each wearable type, find the first instance in the category - // that we recursed through. + // For each wearable type, find the wearables of that type. for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ ) { - for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); - iter != holder->mFoundList.end(); ++iter) + for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->getFoundList().begin(); + iter != holder->getFoundList().end(); ++iter) { LLFoundData& data = *iter; LLWearable* wearable = data.mWearable; @@ -1214,8 +1572,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF() LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; - holder->mObjItems = obj_items; - holder->mGestItems = gest_items; + holder->setObjItems(obj_items); + holder->setGestItems(gest_items); // Note: can't do normal iteration, because if all the // wearables can be resolved immediately, then the @@ -1226,6 +1584,12 @@ void LLAppearanceMgr::updateAppearanceFromCOF() { LLViewerInventoryItem *item = wear_items.get(i); LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; + + // Fault injection: use debug setting to test asset + // fetch failures (should be replaced by new defaults in + // lost&found). + U32 skip_type = gSavedSettings.getU32("ForceAssetFail"); + if (item && item->getIsLinkType() && linked_item) { LLFoundData found(linked_item->getUUID(), @@ -1235,18 +1599,12 @@ void LLAppearanceMgr::updateAppearanceFromCOF() linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); -#if 0 - // Fault injection: uncomment this block to test asset - // fetch failures (should be replaced by new defaults in - // lost&found). - if (found.mWearableType == LLWearableType::WT_SHAPE || found.mWearableType == LLWearableType::WT_JACKET) + if (skip_type != LLWearableType::WT_INVALID && skip_type == found.mWearableType) { found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB - } -#endif //pushing back, not front, to preserve order of wearables for LLAgentWearables - holder->mFoundList.push_back(found); + holder->getFoundList().push_back(found); } else { @@ -1261,8 +1619,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF() } } - for (LLWearableHoldingPattern::found_list_t::iterator it = holder->mFoundList.begin(); - it != holder->mFoundList.end(); ++it) + for (LLWearableHoldingPattern::found_list_t::iterator it = holder->getFoundList().begin(); + it != holder->getFoundList().end(); ++it) { LLFoundData& found = *it; @@ -1277,6 +1635,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF() } + holder->resetTime(gSavedSettings.getF32("MaxWearableWaitTime")); if (!holder->pollFetchCompletion()) { doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollFetchCompletion,holder)); @@ -1335,6 +1694,7 @@ void LLAppearanceMgr::getUserDescendents(const LLUUID& category, void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append) { + gAgentWearables.notifyLoadingStarted(); if(!category) return; llinfos << "wearInventoryCategory( " << category->getName() @@ -1559,6 +1919,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update item_array, LLInventoryModel::EXCLUDE_TRASH); bool linked_already = false; + U32 count = 0; for (S32 i=0; i<item_array.count(); i++) { // Are these links to the same object? @@ -1576,15 +1937,21 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update } // Are these links to different items of the same body part // type? If so, new item will replace old. - // TODO: MULTI-WEARABLE: check for wearable limit for clothing types - else if (is_body_part && (vitem->isWearableType()) && (vitem->getWearableType() == wearable_type)) + else if ((vitem->isWearableType()) && (vitem->getWearableType() == wearable_type)) { - if (inv_item->getIsLinkType() && (vitem->getWearableType() == wearable_type)) + ++count; + if (is_body_part && inv_item->getIsLinkType() && (vitem->getWearableType() == wearable_type)) + { + gInventory.purgeObject(inv_item->getUUID()); + } + else if (count >= LLAgentWearables::MAX_CLOTHING_PER_TYPE) { + // MULTI-WEARABLES: make sure we don't go over MAX_CLOTHING_PER_TYPE gInventory.purgeObject(inv_item->getUUID()); } } } + if (linked_already) { if (do_update) @@ -1781,6 +2148,16 @@ void LLAppearanceMgr::onFirstFullyVisible() bool LLAppearanceMgr::updateBaseOutfit() { + if (isOutfitLocked()) + { + // don't allow modify locked outfit + llassert(!isOutfitLocked()); + return false; + } + setOutfitLocked(true); + + gAgentWearables.notifyLoadingStarted(); + const LLUUID base_outfit_id = getBaseOutfitUUID(); if (base_outfit_id.isNull()) return false; @@ -1912,13 +2289,19 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id) class LLShowCreatedOutfit: public LLInventoryCallback { public: - LLShowCreatedOutfit(LLUUID& folder_id): mFolderID(folder_id) + LLShowCreatedOutfit(LLUUID& folder_id, bool show_panel = true): mFolderID(folder_id), mShowPanel(show_panel) {} virtual ~LLShowCreatedOutfit() { LLSD key; - LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + + //EXT-7727. For new accounts LLShowCreatedOutfit is created during login process + // add may be processed after login process is finished + if (mShowPanel) + { + LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + } LLPanelOutfitsInventory *outfit_panel = dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); if (outfit_panel) @@ -1934,6 +2317,7 @@ public: } LLAppearanceMgr::getInstance()->updateIsDirty(); + gAgentWearables.notifyLoadingFinished(); // New outfit is saved. LLAppearanceMgr::getInstance()->updatePanelOutfitName(""); } @@ -1942,12 +2326,15 @@ public: private: LLUUID mFolderID; + bool mShowPanel; }; -LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name) +LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, bool show_panel) { if (!isAgentAvatarValid()) return LLUUID::null; + gAgentWearables.notifyLoadingStarted(); + // First, make a folder in the My Outfits directory. const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); LLUUID folder_id = gInventory.createNewCategory( @@ -1957,7 +2344,7 @@ LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name) updateClothingOrderingInfo(); - LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id); + LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id,show_panel); shallowCopyCategoryContents(getCOF(),folder_id, cb); createBaseOutfitLink(folder_id, cb); @@ -2051,7 +2438,7 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b bool result = false; if (result = gAgentWearables.moveWearable(item, closer_to_body)) { - gAgentAvatarp->wearableUpdated(item->getWearableType(), TRUE); + gAgentAvatarp->wearableUpdated(item->getWearableType(), FALSE); } setOutfitDirty(true); @@ -2109,6 +2496,14 @@ LLAppearanceMgr::LLAppearanceMgr(): mAttachmentInvLinkEnabled(false), mOutfitIsDirty(false) { + LLOutfitObserver& outfit_observer = LLOutfitObserver::instance(); + + // unlock outfit on save operation completed + outfit_observer.addCOFSavedCallback(boost::bind( + &LLAppearanceMgr::setOutfitLocked, this, false)); + + mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer(gSavedSettings.getS32( + "OutfitOperationsTimeout"))); } LLAppearanceMgr::~LLAppearanceMgr() @@ -2146,7 +2541,9 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) if (mAttachmentInvLinkEnabled) { - LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. + // we have to pass do_update = true to call LLAppearanceMgr::updateAppearanceFromCOF. + // it will trigger gAgentWariables.notifyLoadingFinished() + LLAppearanceMgr::addCOFItemLink(item_id, true); // Add COF link for item. } else { @@ -2176,7 +2573,7 @@ void LLAppearanceMgr::linkRegisteredAttachments() ++it) { LLUUID item_id = *it; - addCOFItemLink(item_id, false); + addCOFItemLink(item_id, true); } mRegisteredAttachments.clear(); } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index f1beef5857..8ded32a53d 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -42,10 +42,12 @@ class LLWearable; class LLWearableHoldingPattern; class LLInventoryCallback; +class LLOutfitUnLockTimer; class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr> { friend class LLSingleton<LLAppearanceMgr>; + friend class LLOutfitUnLockTimer; public: typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t; @@ -73,6 +75,12 @@ public: // Determine whether a given outfit can be removed. bool getCanRemoveOutfit(const LLUUID& outfit_cat_id); + // Determine whether we're wearing any of the outfit contents (excluding body parts). + static bool getCanRemoveFromCOF(const LLUUID& outfit_cat_id); + + // Determine whether we can add anything (but body parts) from the outfit contents to COF. + static bool getCanAddToCOF(const LLUUID& outfit_cat_id); + // Copy all items in a category. void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb); @@ -149,7 +157,7 @@ public: void removeItemFromAvatar(const LLUUID& item_id); - LLUUID makeNewOutfitLinks(const std::string& new_folder_name); + LLUUID makeNewOutfitLinks(const std::string& new_folder_name,bool show_panel = true); bool moveWearable(LLViewerInventoryItem* item, bool closer_to_body); @@ -162,6 +170,8 @@ public: // COF is processed if cat_id is not specified void updateClothingOrderingInfo(LLUUID cat_id = LLUUID::null); + bool isOutfitLocked() { return mOutfitLocked; } + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); @@ -186,10 +196,20 @@ private: static void onOutfitRename(const LLSD& notification, const LLSD& response); + void setOutfitLocked(bool locked); + std::set<LLUUID> mRegisteredAttachments; bool mAttachmentInvLinkEnabled; bool mOutfitIsDirty; + /** + * Lock for blocking operations on outfit until server reply or timeout exceed + * to avoid unsynchronized outfit state or performing duplicate operations. + */ + bool mOutfitLocked; + + std::auto_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer; + ////////////////////////////////////////////////////////////////////////////////// // Item-specific convenience functions public: diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 531aca7a82..63094f7f20 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -104,8 +104,8 @@ // Third party library includes #include <boost/bind.hpp> + #if LL_WINDOWS - #include "llwindebug.h" # include <share.h> // For _SH_DENYWR in initMarkerFile #else # include <sys/file.h> // For initMarkerFile support @@ -331,10 +331,6 @@ const char *VFS_INDEX_FILE_BASE = "index.db2.x."; static std::string gWindowTitle; -std::string gLoginPage; -std::vector<std::string> gLoginURIs; -static std::string gHelperURI; - LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ; void idle_afk_check() @@ -413,7 +409,7 @@ static void settings_to_globals() LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor"); LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor"); - LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); + LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible"); LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); // clamp auto-open time to some minimum usable value LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); @@ -600,6 +596,11 @@ bool LLAppViewer::init() if (!initConfiguration()) return false; + // write Google Breakpad minidump files to our log directory + std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + logdir += gDirUtilp->getDirDelimiter(); + setMiniDumpDir(logdir); + // Although initLogging() is the right place to mess with // setFatalFunction(), we can't query gSavedSettings until after // initConfiguration(). @@ -890,14 +891,20 @@ bool LLAppViewer::init() LLViewerMedia::initClass(); - LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); - LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); - LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames")); - LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames")); - LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat")); + //EXT-7013 - On windows for some locale (Japanese) standard + //datetime formatting functions didn't support some parameters such as "weekday". + std::string language = LLControlGroup::getInstance(sGlobalSettingsName)->getString("Language"); + if(language == "ja") + { + LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); + LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); + LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames")); + LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames")); + LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat")); - LLStringOps::sAM = LLTrans::getString("dateTimeAM"); - LLStringOps::sPM = LLTrans::getString("dateTimePM"); + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + } return true; } @@ -1234,6 +1241,14 @@ bool LLAppViewer::cleanup() // workaround for DEV-35406 crash on shutdown LLEventPumps::instance().reset(); + // remove any old breakpad minidump files from the log directory + if (! isError()) + { + std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + logdir += gDirUtilp->getDirDelimiter(); + gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp"); + } + // *TODO - generalize this and move DSO wrangling to a helper class -brad std::set<struct apr_dso_handle_t *>::const_iterator i; for(i = mPlugins.begin(); i != mPlugins.end(); ++i) @@ -2289,17 +2304,7 @@ void LLAppViewer::checkForCrash(void) { #if LL_SEND_CRASH_REPORTS - //*NOTE:Mani The current state of the crash handler has the MacOSX - // sending all crash reports as freezes, in order to let - // the MacOSX CrashRepoter generate stacks before spawning the - // SL crash logger. - // The Linux and Windows clients generate their own stacks and - // spawn the SL crash logger immediately. This may change in the future. -#if LL_DARWIN - if(gLastExecEvent != LAST_EXEC_NORMAL) -#else if (gLastExecEvent == LAST_EXEC_FROZE) -#endif { llinfos << "Last execution froze, requesting to send crash report." << llendl; // @@ -2357,16 +2362,9 @@ bool LLAppViewer::initWindow() LLNotificationsUI::LLNotificationManager::getInstance(); - if (gSavedSettings.getBOOL("FullScreen")) - { - // request to go full screen... which will be delayed until login - gViewerWindow->toggleFullscreen(FALSE); - } - if (gSavedSettings.getBOOL("WindowMaximized")) { gViewerWindow->mWindow->maximize(); - gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); } if (!gNoRender) @@ -2440,11 +2438,10 @@ void LLAppViewer::cleanupSavedSettings() } } - // save window position if not fullscreen + // save window position if not maximized // as we don't track it in callbacks - BOOL fullscreen = gViewerWindow->mWindow->getFullscreen(); BOOL maximized = gViewerWindow->mWindow->getMaximized(); - if (!fullscreen && !maximized) + if (!maximized) { LLCoordScreen window_pos; @@ -2509,6 +2506,15 @@ void LLAppViewer::writeSystemInfo() // If the crash is handled by LLAppViewer::handleViewerCrash, ie not a freeze, // then the value of "CrashNotHandled" will be set to true. gDebugInfo["CrashNotHandled"] = (LLSD::Boolean)true; + + // Insert crash host url (url to post crash log to) if configured. This insures + // that the crash report will go to the proper location in the case of a + // prior freeze. + std::string crashHostUrl = gSavedSettings.get<std::string>("CrashHostUrl"); + if(crashHostUrl != "") + { + gDebugInfo["CrashHostUrl"] = crashHostUrl; + } // Dump some debugging info LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME") @@ -2530,13 +2536,6 @@ void LLAppViewer::writeSystemInfo() writeDebugInfo(); // Save out debug_info.log early, in case of crash. } -void LLAppViewer::handleSyncViewerCrash() -{ - LLAppViewer* pApp = LLAppViewer::instance(); - // Call to pure virtual, handled by platform specific llappviewer instance. - pApp->handleSyncCrashTrace(); -} - void LLAppViewer::handleViewerCrash() { llinfos << "Handle viewer crash entry." << llendl; @@ -2560,9 +2559,13 @@ void LLAppViewer::handleViewerCrash() return; } pApp->mReportedCrash = TRUE; - - // Make sure the watchdog gets turned off... -// pApp->destroyMainloopTimeout(); // SJB: Bah. This causes the crash handler to hang, not sure why. + + // Insert crash host url (url to post crash log to) if configured. + std::string crashHostUrl = gSavedSettings.get<std::string>("CrashHostUrl"); + if(crashHostUrl != "") + { + gDebugInfo["CrashHostUrl"] = crashHostUrl; + } //We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version //to check against no matter what @@ -2594,6 +2597,12 @@ void LLAppViewer::handleViewerCrash() gDebugInfo["FirstLogin"] = (LLSD::Boolean) gAgent.isFirstLogin(); gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall"); + char *minidump_file = pApp->getMiniDumpFilename(); + if(minidump_file && minidump_file[0] != 0) + { + gDebugInfo["MinidumpPath"] = minidump_file; + } + if(gLogoutInProgress) { gDebugInfo["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH; @@ -2671,10 +2680,6 @@ void LLAppViewer::handleViewerCrash() LLError::logToFile(""); -// On Mac, we send the report on the next run, since we need macs crash report -// for a stack trace, so we have to let it the app fail. -#if !LL_DARWIN - // Remove the marker file, since otherwise we'll spawn a process that'll keep it locked if(gDebugInfo["LastExecEvent"].asInteger() == LAST_EXEC_LOGOUT_CRASH) { @@ -2687,8 +2692,6 @@ void LLAppViewer::handleViewerCrash() // Call to pure virtual, handled by platform specific llappviewer instance. pApp->handleCrashReporting(); - -#endif //!LL_DARWIN return; } @@ -3332,13 +3335,6 @@ void LLAppViewer::badNetworkHandler() mPurgeOnExit = TRUE; -#if LL_WINDOWS - // Generates the minidump. - LLWinDebug::generateCrashStacks(NULL); -#endif - LLAppViewer::handleSyncViewerCrash(); - LLAppViewer::handleViewerCrash(); - std::ostringstream message; message << "The viewer has detected mangled network data indicative\n" @@ -3351,6 +3347,8 @@ void LLAppViewer::badNetworkHandler() "If the problem continues, see the Tech Support FAQ at: \n" "www.secondlife.com/support"; forceDisconnect(message.str()); + + LLApp::instance()->writeMiniDump(); } // This routine may get called more than once during the shutdown process. diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 6e6a382e46..cac580e896 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -92,9 +92,7 @@ public: virtual bool restoreErrorTrap() = 0; // Require platform specific override to reset error handling mechanism. // return false if the error trap needed restoration. virtual void handleCrashReporting(bool reportFreeze = false) = 0; // What to do with crash report? - virtual void handleSyncCrashTrace() = 0; // any low-level crash-prep that has to happen in the context of the crashing thread before the crash report is delivered. static void handleViewerCrash(); // Hey! The viewer crashed. Do this, soon. - static void handleSyncViewerCrash(); // Hey! The viewer crashed. Do this right NOW in the context of the crashing thread. void checkForCrash(); // Thread accessors diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 78b0f7ba83..78afdc8995 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -46,23 +46,6 @@ #include <exception> -#if LL_LINUX -# include <dlfcn.h> // RTLD_LAZY -# include <execinfo.h> // backtrace - glibc only -#elif LL_SOLARIS -# include <sys/types.h> -# include <unistd.h> -# include <fcntl.h> -# include <ucontext.h> -#endif - -#ifdef LL_ELFBIN -# ifdef __GNUC__ -# include <cxxabi.h> // for symbol demangling -# endif -# include "ELFIO/ELFIO.h" // for better backtraces -#endif - #if LL_DBUS_ENABLED # include "llappviewerlinux_api_dbus.h" @@ -86,7 +69,6 @@ static void exceptionTerminateHandler() // reinstall default terminate() handler in case we re-terminate. if (gOldTerminateHandler) std::set_terminate(gOldTerminateHandler); // treat this like a regular viewer crash, with nice stacktrace etc. - LLAppViewer::handleSyncViewerCrash(); LLAppViewer::handleViewerCrash(); // we've probably been killed-off before now, but... gOldTerminateHandler(); // call old terminate() handler @@ -109,7 +91,6 @@ int main( int argc, char **argv ) gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler); // install crash handlers viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash); - viewer_app_ptr->setSyncErrorHandler(LLAppViewer::handleSyncViewerCrash); bool ok = viewer_app_ptr->init(); if(!ok) @@ -138,201 +119,6 @@ int main( int argc, char **argv ) return 0; } -#ifdef LL_SOLARIS -static inline BOOL do_basic_glibc_backtrace() -{ - BOOL success = FALSE; - - std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); - llinfos << "Opening stack trace file " << strace_filename << llendl; - LLFILE* StraceFile = LLFile::fopen(strace_filename, "w"); - if (!StraceFile) - { - llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; - StraceFile = stderr; - } - - printstack(fileno(StraceFile)); - - if (StraceFile != stderr) - fclose(StraceFile); - - return success; -} -#else -#define MAX_STACK_TRACE_DEPTH 40 -// This uses glibc's basic built-in stack-trace functions for a not very -// amazing backtrace. -static inline BOOL do_basic_glibc_backtrace() -{ - void *stackarray[MAX_STACK_TRACE_DEPTH]; - size_t size; - char **strings; - size_t i; - BOOL success = FALSE; - - size = backtrace(stackarray, MAX_STACK_TRACE_DEPTH); - strings = backtrace_symbols(stackarray, size); - - std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); - llinfos << "Opening stack trace file " << strace_filename << llendl; - LLFILE* StraceFile = LLFile::fopen(strace_filename, "w"); // Flawfinder: ignore - if (!StraceFile) - { - llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; - StraceFile = stderr; - } - - if (size) - { - for (i = 0; i < size; i++) - { - // the format of the StraceFile is very specific, to allow (kludgy) machine-parsing - fprintf(StraceFile, "%-3lu ", (unsigned long)i); - fprintf(StraceFile, "%-32s\t", "unknown"); - fprintf(StraceFile, "%p ", stackarray[i]); - fprintf(StraceFile, "%s\n", strings[i]); - } - - success = TRUE; - } - - if (StraceFile != stderr) - fclose(StraceFile); - - free (strings); - return success; -} - -#if LL_ELFBIN -// This uses glibc's basic built-in stack-trace functions together with -// ELFIO's ability to parse the .symtab ELF section for better symbol -// extraction without exporting symbols (which'd cause subtle, fatal bugs). -static inline BOOL do_elfio_glibc_backtrace() -{ - void *stackarray[MAX_STACK_TRACE_DEPTH]; - size_t btsize; - char **strings; - BOOL success = FALSE; - - std::string appfilename = gDirUtilp->getExecutablePathAndName(); - - std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); - llinfos << "Opening stack trace file " << strace_filename << llendl; - LLFILE* StraceFile = LLFile::fopen(strace_filename, "w"); // Flawfinder: ignore - if (!StraceFile) - { - llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; - StraceFile = stderr; - } - - // get backtrace address list and basic symbol info - btsize = backtrace(stackarray, MAX_STACK_TRACE_DEPTH); - strings = backtrace_symbols(stackarray, btsize); - - // create ELF reader for our app binary - IELFI* pReader; - const IELFISection* pSec = NULL; - IELFISymbolTable* pSymTbl = 0; - if (ERR_ELFIO_NO_ERROR != ELFIO::GetInstance()->CreateELFI(&pReader) || - ERR_ELFIO_NO_ERROR != pReader->Load(appfilename.c_str()) || - // find symbol table, create reader-object - NULL == (pSec = pReader->GetSection( ".symtab" )) || - ERR_ELFIO_NO_ERROR != pReader->CreateSectionReader(IELFI::ELFI_SYMBOL, pSec, (void**)&pSymTbl) ) - { - // Failed to open our binary and read its symbol table somehow - llinfos << "Could not initialize ELF symbol reading - doing basic backtrace." << llendl; - if (StraceFile != stderr) - fclose(StraceFile); - // note that we may be leaking some of the above ELFIO - // objects now, but it's expected that we'll be dead soon - // and we want to tread delicately until we get *some* kind - // of useful backtrace. - return do_basic_glibc_backtrace(); - } - - // iterate over trace and symtab, looking for plausible symbols - std::string name; - Elf32_Addr value; - Elf32_Word ssize; - unsigned char bind; - unsigned char type; - Elf32_Half section; - int nSymNo = pSymTbl->GetSymbolNum(); - size_t btpos; - for (btpos = 0; btpos < btsize; ++btpos) - { - // the format of the StraceFile is very specific, to allow (kludgy) machine-parsing - fprintf(StraceFile, "%-3ld ", (long)btpos); - int symidx; - for (symidx = 0; symidx < nSymNo; ++symidx) - { - if (ERR_ELFIO_NO_ERROR == - pSymTbl->GetSymbol(symidx, name, value, ssize, - bind, type, section)) - { - // check if trace address within symbol range - if (uintptr_t(stackarray[btpos]) >= value && - uintptr_t(stackarray[btpos]) < value+ssize) - { - // symbol is inside viewer - fprintf(StraceFile, "%-32s\t", "com.secondlife.indra.viewer"); - fprintf(StraceFile, "%p ", stackarray[btpos]); - - char *demangled_str = NULL; - int demangle_result = 1; - demangled_str = - abi::__cxa_demangle - (name.c_str(), NULL, NULL, - &demangle_result); - if (0 == demangle_result && - NULL != demangled_str) { - fprintf(StraceFile, - "%s", demangled_str); - free(demangled_str); - } - else // failed demangle; print it raw - { - fprintf(StraceFile, - "%s", name.c_str()); - } - // print offset from symbol start - fprintf(StraceFile, - " + %lu\n", - uintptr_t(stackarray[btpos]) - - value); - goto got_sym; // early escape - } - } - } - // Fallback: - // Didn't find a suitable symbol in the binary - it's probably - // a symbol in a DSO; use glibc's idea of what it should be. - fprintf(StraceFile, "%-32s\t", "unknown"); - fprintf(StraceFile, "%p ", stackarray[btpos]); - fprintf(StraceFile, "%s\n", strings[btpos]); - got_sym:; - } - - if (StraceFile != stderr) - fclose(StraceFile); - - pSymTbl->Release(); - pSec->Release(); - pReader->Release(); - - free(strings); - - llinfos << "Finished generating stack trace." << llendl; - - success = TRUE; - return success; -} -#endif // LL_ELFBIN - -#endif // LL_SOLARIS - - LLAppViewerLinux::LLAppViewerLinux() { } @@ -541,16 +327,6 @@ bool LLAppViewerLinux::sendURLToOtherInstance(const std::string& url) } #endif // LL_DBUS_ENABLED -void LLAppViewerLinux::handleSyncCrashTrace() -{ - // This backtrace writes into stack_trace.log -# if LL_ELFBIN - do_elfio_glibc_backtrace(); // more useful backtrace -# else - do_basic_glibc_backtrace(); // only slightly useful backtrace -# endif // LL_ELFBIN -} - void LLAppViewerLinux::handleCrashReporting(bool reportFreeze) { std::string cmd =gDirUtilp->getExecutableDir(); @@ -686,6 +462,8 @@ bool LLAppViewerLinux::beingDebugged() bool LLAppViewerLinux::initLogging() { // Remove the last stack trace, if any + // This file is no longer created, since the move to Google Breakpad + // The code is left here to clean out any old state in the log dir std::string old_stack_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); LLFile::remove(old_stack_file); diff --git a/indra/newview/llappviewerlinux.h b/indra/newview/llappviewerlinux.h index 230c0dc24b..b17380d4d8 100644 --- a/indra/newview/llappviewerlinux.h +++ b/indra/newview/llappviewerlinux.h @@ -68,7 +68,6 @@ protected: virtual bool restoreErrorTrap(); virtual void handleCrashReporting(bool reportFreeze); - virtual void handleSyncCrashTrace(); virtual bool initLogging(); virtual bool initParseCommandLine(LLCommandLineParser& clp); diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 0b5f18c330..1e66e55f3d 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -264,11 +264,6 @@ bool LLAppViewerMacOSX::restoreErrorTrap() return reset_count == 0; } -void LLAppViewerMacOSX::handleSyncCrashTrace() -{ - // do nothing -} - static OSStatus CarbonEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void* inUserData) @@ -384,38 +379,6 @@ void LLAppViewerMacOSX::handleCrashReporting(bool reportFreeze) } } - - if(!reportFreeze) - { - _exit(1); - } - - // TODO from palmer: Find a better way to handle managing old crash logs - // when this is a separate imbedable module. Ideally just sort crash stack - // logs based on date, and grab the latest one as opposed to deleting them - // for thoughts on what the module would look like. - // See: https://wiki.lindenlab.com/wiki/Viewer_Crash_Reporter_Round_4 - - // Remove the crash stack log from previous executions. - // Since we've started logging a new instance of the app, we can assume - // The old crash stack is invalid for the next crash report. - char path[MAX_PATH]; - FSRef folder; - if(FSFindFolder(kUserDomain, kLogsFolderType, false, &folder) == noErr) - { - // folder is an FSRef to ~/Library/Logs/ - if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr) - { - std::string pathname = std::string(path) + std::string("/CrashReporter/"); - std::string mask = "Second Life*"; - std::string file_name; - while(gDirUtilp->getNextFileInDir(pathname, mask, file_name, false)) - { - LLFile::remove(pathname + file_name); - } - } - } - } std::string LLAppViewerMacOSX::generateSerialNumber() diff --git a/indra/newview/llappviewermacosx.h b/indra/newview/llappviewermacosx.h index cbf7e6c209..3d7bb55556 100644 --- a/indra/newview/llappviewermacosx.h +++ b/indra/newview/llappviewermacosx.h @@ -55,7 +55,6 @@ public: protected: virtual bool restoreErrorTrap(); virtual void handleCrashReporting(bool reportFreeze); - virtual void handleSyncCrashTrace(); std::string generateSerialNumber(); virtual bool initParseCommandLine(LLCommandLineParser& clp); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 60a6d2f072..e3ef04d03d 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -57,8 +57,6 @@ #include "llweb.h" #include "llsecondlifeurls.h" -#include "llwindebug.h" - #include "llviewernetwork.h" #include "llmd5.h" #include "llfindlocale.h" @@ -81,51 +79,6 @@ extern "C" { const std::string LLAppViewerWin32::sWindowClass = "Second Life"; -LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *exception_infop) -{ - // *NOTE:Mani - this code is stolen from LLApp, where its never actually used. - //OSMessageBox("Attach Debugger Now", "Error", OSMB_OK); - // *TODO: Translate the signals/exceptions into cross-platform stuff - // Windows implementation - _tprintf( _T("Entering Windows Exception Handler...\n") ); - llinfos << "Entering Windows Exception Handler..." << llendl; - - // Make sure the user sees something to indicate that the app crashed. - LONG retval; - - if (LLApp::isError()) - { - _tprintf( _T("Got another fatal signal while in the error handler, die now!\n") ); - llwarns << "Got another fatal signal while in the error handler, die now!" << llendl; - - retval = EXCEPTION_EXECUTE_HANDLER; - return retval; - } - - // Generate a minidump if we can. - // Before we wake the error thread... - // Which will start the crash reporting. - LLWinDebug::generateCrashStacks(exception_infop); - - // Flag status to error, so thread_error starts its work - LLApp::setError(); - - // Block in the exception handler until the app has stopped - // This is pretty sketchy, but appears to work just fine - while (!LLApp::isStopped()) - { - ms_sleep(10); - } - - // - // At this point, we always want to exit the app. There's no graceful - // recovery for an unhandled exception. - // - // Just kill the process. - retval = EXCEPTION_EXECUTE_HANDLER; - return retval; -} - // Create app mutex creates a unique global windows object. // If the object can be created it returns true, otherwise // it returns false. The false result can be used to determine @@ -191,8 +144,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, gIconResource = MAKEINTRESOURCE(IDI_LL_ICON); LLAppViewerWin32* viewer_app_ptr = new LLAppViewerWin32(lpCmdLine); - - LLWinDebug::initExceptionHandler(viewer_windows_exception_handler); viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash); @@ -405,12 +356,6 @@ bool LLAppViewerWin32::cleanup() bool LLAppViewerWin32::initLogging() { - // Remove the crash stack log from previous executions. - // Since we've started logging a new instance of the app, we can assume - // *NOTE: This should happen before the we send a 'previous instance froze' - // crash report, but it must happen after we initialize the DirUtil. - LLWinDebug::clearCrashStacks(); - return LLAppViewer::initLogging(); } @@ -529,13 +474,9 @@ bool LLAppViewerWin32::initParseCommandLine(LLCommandLineParser& clp) } bool LLAppViewerWin32::restoreErrorTrap() -{ - return LLWinDebug::checkExceptionHandler(); -} - -void LLAppViewerWin32::handleSyncCrashTrace() -{ - // do nothing +{ + return true; + //return LLWinDebug::checkExceptionHandler(); } void LLAppViewerWin32::handleCrashReporting(bool reportFreeze) diff --git a/indra/newview/llappviewerwin32.h b/indra/newview/llappviewerwin32.h index 13454edeec..52dcc583a4 100644 --- a/indra/newview/llappviewerwin32.h +++ b/indra/newview/llappviewerwin32.h @@ -57,7 +57,6 @@ protected: virtual bool restoreErrorTrap(); virtual void handleCrashReporting(bool reportFreeze); - virtual void handleSyncCrashTrace(); virtual bool sendURLToOtherInstance(const std::string& url); diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 27dcb9f1c7..116c4cafc2 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -203,19 +203,13 @@ void LLAssetUploadResponder::uploadComplete(const LLSD& content) LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, const LLUUID& vfile_id, - LLAssetType::EType asset_type, - boost::function<void(const LLUUID& uuid)> callback) -: LLAssetUploadResponder(post_data, vfile_id, asset_type), - mCallback(callback) + LLAssetType::EType asset_type) +: LLAssetUploadResponder(post_data, vfile_id, asset_type) { } -LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, - const std::string& file_name, - LLAssetType::EType asset_type, - boost::function<void(const LLUUID& uuid)> callback) -: LLAssetUploadResponder(post_data, file_name, asset_type), - mCallback(callback) +LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, const std::string& file_name, LLAssetType::EType asset_type) +: LLAssetUploadResponder(post_data, file_name, asset_type) { } @@ -293,12 +287,6 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) creation_date_now); gInventory.updateItem(item); gInventory.notifyObservers(); - - if (mCallback) - { - // call the callback with the new Asset UUID - mCallback(item->getAssetUUID()); - } // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. @@ -346,11 +334,13 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) U32 group_perms = mPostData.has("group_mask") ? mPostData.get("group_mask" ).asInteger() : PERM_NONE; U32 next_owner_perms = mPostData.has("next_owner_mask") ? mPostData.get("next_owner_mask").asInteger() : PERM_NONE; std::string display_name = LLStringUtil::null; + LLAssetStorage::LLStoreAssetCallback callback = NULL; + void *userdata = NULL; upload_new_resource(next_file, asset_name, asset_name, - LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, next_owner_perms, group_perms, everyone_perms, display_name, - NULL, expected_upload_cost); + callback, expected_upload_cost, userdata); } } diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h index 2358aeb39d..91fb39916d 100644 --- a/indra/newview/llassetuploadresponders.h +++ b/indra/newview/llassetuploadresponders.h @@ -33,7 +33,6 @@ #ifndef LL_LLASSETUPLOADRESPONDER_H #define LL_LLASSETUPLOADRESPONDER_H -#include "llassetstorage.h" #include "llhttpclient.h" // Abstract class for supporting asset upload @@ -67,15 +66,10 @@ class LLNewAgentInventoryResponder : public LLAssetUploadResponder public: LLNewAgentInventoryResponder(const LLSD& post_data, const LLUUID& vfile_id, - LLAssetType::EType asset_type, - boost::function<void(const LLUUID& uuid)> callback = NULL); - LLNewAgentInventoryResponder(const LLSD& post_data, - const std::string& file_name, - LLAssetType::EType asset_type, - boost::function<void(const LLUUID& uuid)> callback = NULL); + LLAssetType::EType asset_type); + LLNewAgentInventoryResponder(const LLSD& post_data, const std::string& file_name, + LLAssetType::EType asset_type); virtual void uploadComplete(const LLSD& content); - - boost::function<void(const LLUUID& uuid)> mCallback; }; struct LLBakedUploadData; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 02dbfd0af6..d3345f0904 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -543,11 +543,10 @@ namespace action_give_inventory // iterate through avatars for(S32 i = 0; i < count; ++i) { - const std::string& avatar_name = LLShareInfo::instance().mAvatarNames[i].getLegacyName(); const LLUUID& avatar_uuid = LLShareInfo::instance().mAvatarUuids[i]; - // Start up IM before give the item - const LLUUID session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, avatar_uuid); + // We souldn't open IM session, just calculate session ID for logging purpose. See EXT-6710 + const LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, avatar_uuid); uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end(); @@ -648,6 +647,8 @@ void LLAvatarActions::shareWithAvatars() LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE); picker->setOkBtnEnableCb(boost::bind(is_give_inventory_acceptable)); + picker->openFriendsTab(); + LLNotificationsUtil::add("ShareNotification"); } // static diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 7a3eddf7a6..41f5fe64a1 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -203,7 +203,9 @@ LLBottomTray::~LLBottomTray() // override effect of save_visibility=true. // this attribute is necessary to button.initial_callback=Button.SetFloaterToggle works properly: // i.g when floater changes its visibility - button changes its toggle state. + getChild<LLUICtrl>("build_btn")->setControlValue(false); getChild<LLUICtrl>("search_btn")->setControlValue(false); + getChild<LLUICtrl>("world_map_btn")->setControlValue(false); } // *TODO Vadim: why void* ? diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 9120990813..8af8403870 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -97,7 +97,7 @@ static void* create_non_avatar_caller(void*) return new LLNonAvatarCaller; } -LLVoiceChannel* LLCallFloater::sCurrentVoiceCanel = NULL; +LLVoiceChannel* LLCallFloater::sCurrentVoiceChannel = NULL; LLCallFloater::LLCallFloater(const LLSD& key) : LLTransientDockableFloater(NULL, false, key) @@ -115,7 +115,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), voice_left_remove_delay); mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::instance().addObserver(this); LLTransientFloaterMgr::getInstance()->addControlView(this); // force docked state since this floater doesn't save it between recreations @@ -160,7 +160,6 @@ BOOL LLCallFloater::postBuild() initAgentData(); - connectToChannel(LLVoiceChannel::getCurrentVoiceChannel()); setIsChrome(true); @@ -206,7 +205,7 @@ void LLCallFloater::draw() } // virtual -void LLCallFloater::onChange() +void LLCallFloater::onParticipantsChanged() { if (NULL == mParticipants) return; updateParticipantsVoiceState(); @@ -289,22 +288,22 @@ void LLCallFloater::updateSession() if (NULL == mSpeakerManager) { - // by default let show nearby chat participants + // By default show nearby chat participants mSpeakerManager = LLLocalSpeakerMgr::getInstance(); LL_DEBUGS("Voice") << "Set DEFAULT speaker manager" << LL_ENDL; mVoiceType = VC_LOCAL_CHAT; } updateTitle(); - - //hide "Leave Call" button for nearby chat + + // Hide "Leave Call" button for nearby chat bool is_local_chat = mVoiceType == VC_LOCAL_CHAT; childSetVisible("leave_call_btn_panel", !is_local_chat); refreshParticipantList(); updateAgentModeratorState(); - //show floater for voice calls & only in CONNECTED to voice channel state + // Show floater for voice calls & only in CONNECTED to voice channel state if (!is_local_chat && voice_channel && LLVoiceChannel::STATE_CONNECTED == voice_channel->getState()) @@ -370,7 +369,7 @@ void LLCallFloater::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) // *NOTE: if signal was sent for voice channel with LLVoiceChannel::STATE_NO_CHANNEL_INFO // it sill be sent for the same channel again (when state is changed). // So, lets ignore this call. - if (channel == sCurrentVoiceCanel) return; + if (channel == sCurrentVoiceChannel) return; LLCallFloater* call_floater = LLFloaterReg::getTypedInstance<LLCallFloater>("voice_controls"); @@ -743,9 +742,9 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel) { mVoiceChannelStateChangeConnection.disconnect(); - sCurrentVoiceCanel = channel; + sCurrentVoiceChannel = channel; - mVoiceChannelStateChangeConnection = sCurrentVoiceCanel->setStateChangedCallback(boost::bind(&LLCallFloater::onVoiceChannelStateChanged, this, _1, _2)); + mVoiceChannelStateChangeConnection = sCurrentVoiceChannel->setStateChangedCallback(boost::bind(&LLCallFloater::onVoiceChannelStateChanged, this, _1, _2)); updateState(channel->getState()); } @@ -765,7 +764,7 @@ void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old void LLCallFloater::updateState(const LLVoiceChannel::EState& new_state) { - LL_DEBUGS("Voice") << "Updating state: " << new_state << ", session name: " << sCurrentVoiceCanel->getSessionName() << LL_ENDL; + LL_DEBUGS("Voice") << "Updating state: " << new_state << ", session name: " << sCurrentVoiceChannel->getSessionName() << LL_ENDL; if (LLVoiceChannel::STATE_CONNECTED == new_state) { updateSession(); diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 4ec594a23a..5eafede482 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -48,15 +48,15 @@ class LLSpeakerMgr; class LLSpeakersDelayActionsStorage; /** - * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button. - * It can be torn-off and freely positioned onscreen. + * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron + * on the Speak button. It can be torn-off and freely positioned onscreen. * - * When the Resident is engaged in Nearby Voice Chat, the Voice Control Panel provides control over - * the Resident's own microphone input volume, the audible volume of each of the other participants, - * the Resident's own Voice Morphing settings (if she has subscribed to enable the feature), and Voice Recording. + * When the Resident is engaged in Voice Chat, the Voice Control Panel provides control + * over the audible volume of each of the other participants, the Resident's own Voice + * Morphing settings (if she has subscribed to enable the feature), and Voice Recording. * - * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel also provides an - * 'Leave Call' button to allow the Resident to leave that voice channel. + * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel + * also provides a 'Leave Call' button to allow the Resident to leave that voice channel. */ class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipantObserver { @@ -76,7 +76,7 @@ public: * * Refreshes list to display participants not in voice as disabled. */ - /*virtual*/ void onChange(); + /*virtual*/ void onParticipantsChanged(); static void sOnCurrentChannelChanged(const LLUUID& session_id); @@ -264,7 +264,7 @@ private: * * @see sOnCurrentChannelChanged() */ - static LLVoiceChannel* sCurrentVoiceCanel; + static LLVoiceChannel* sCurrentVoiceChannel; /* virtual */ LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 67d5d21b2a..cd279fa10a 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -149,7 +149,6 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) { BOOL handled = FALSE; - // ALT-RETURN is reserved for windowed/fullscreen toggle if( KEY_RETURN == key ) { if (mask == MASK_CONTROL) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index b7bccf46be..4309d43498 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -256,7 +256,7 @@ public: mSourceType = chat.mSourceType; //*TODO overly defensive thing, source type should be maintained out there - if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM) + if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM && chat.mFromID.isNull()) { mSourceType = CHAT_SOURCE_SYSTEM; } @@ -605,6 +605,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); + if(mEditor) + { + mEditor->setPlainText(use_plain_text_chat_history); + } + if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); @@ -715,7 +720,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // (don't let object names with hyperlinks override our objectim Url) LLStyle::Params link_params(style_params); link_params.color.control = "HTMLLinkColor"; - link_params.link_href = url; + link_params.link_href = LLURI::escape(url); mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter, false, link_params); } diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 79ce2f8f6b..aa8cc01f7d 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -34,6 +34,8 @@ #include "llcofwearables.h" +#include "llaccordionctrl.h" +#include "llaccordionctrltab.h" #include "llagentdata.h" #include "llagentwearables.h" #include "llappearancemgr.h" @@ -58,13 +60,19 @@ static const LLWearableItemNameComparator WEARABLE_NAME_COMPARATOR; class CofContextMenu : public LLListContextMenu { protected: - static void updateCreateWearableLabel(LLMenuGL* menu, const LLUUID& item_id) + CofContextMenu(LLCOFWearables* cof_wearables) + : mCOFWearables(cof_wearables) + { + llassert(mCOFWearables); + } + + void updateCreateWearableLabel(LLMenuGL* menu, const LLUUID& item_id) { LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new"); + LLWearableType::EType w_type = getWearableType(item_id); // Hide the "Create new <WEARABLE_TYPE>" if it's irrelevant. - LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id); - if (!item || !item->isWearableType()) + if (w_type == LLWearableType::WT_NONE) { menu_item->setVisible(FALSE); return; @@ -72,25 +80,67 @@ protected: // Set proper label for the "Create new <WEARABLE_TYPE>" menu item. LLStringUtil::format_map_t args; - LLWearableType::EType w_type = item->getWearableType(); args["[WEARABLE_TYPE]"] = LLWearableType::getTypeDefaultNewName(w_type); std::string new_label = LLTrans::getString("CreateNewWearable", args); menu_item->setLabel(new_label); } - static void createNew(const LLUUID& item_id) + void createNew(const LLUUID& item_id) + { + LLAgentWearables::createWearable(getWearableType(item_id), true); + } + + // Get wearable type of the given item. + // + // There is a special case: so-called "dummy items" + // (i.e. the ones that are there just to indicate that you're not wearing + // any wearables of the corresponding type. They are currently grayed out + // and suffixed with "not worn"). + // Those items don't have an UUID, but they do have an associated wearable type. + // If the user has invoked context menu for such item, + // we ignore the passed item_id and retrieve wearable type from the item. + LLWearableType::EType getWearableType(const LLUUID& item_id) { - LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id); - if (!item || !item->isWearableType()) return; + if (!isDummyItem(item_id)) + { + LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id); + if (item && item->isWearableType()) + { + return item->getWearableType(); + } + } + else if (mCOFWearables) // dummy item selected + { + LLPanelDummyClothingListItem* item; + + item = dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem()); + if (item) + { + return item->getWearableType(); + } + } - LLAgentWearables::createWearable(item->getWearableType(), true); + return LLWearableType::WT_NONE; } + + static bool isDummyItem(const LLUUID& item_id) + { + return item_id.isNull(); + } + + LLCOFWearables* mCOFWearables; }; ////////////////////////////////////////////////////////////////////////// -class CofAttachmentContextMenu : public LLListContextMenu +class CofAttachmentContextMenu : public CofContextMenu { +public: + CofAttachmentContextMenu(LLCOFWearables* cof_wearables) + : CofContextMenu(cof_wearables) + { + } + protected: /*virtual*/ LLContextMenu* createMenu() @@ -108,8 +158,13 @@ protected: class CofClothingContextMenu : public CofContextMenu { -protected: +public: + CofClothingContextMenu(LLCOFWearables* cof_wearables) + : CofContextMenu(cof_wearables) + { + } +protected: /*virtual*/ LLContextMenu* createMenu() { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; @@ -121,7 +176,7 @@ protected: registrar.add("Clothing.MoveUp", boost::bind(moveWearable, selected_id, false)); registrar.add("Clothing.MoveDown", boost::bind(moveWearable, selected_id, true)); registrar.add("Clothing.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); - registrar.add("Clothing.Create", boost::bind(createNew, selected_id)); + registrar.add("Clothing.Create", boost::bind(&CofClothingContextMenu::createNew, this, selected_id)); enable_registrar.add("Clothing.OnEnable", boost::bind(&CofClothingContextMenu::onEnable, this, _2)); @@ -153,7 +208,7 @@ protected: } else if ("edit" == param) { - return gAgentWearables.isWearableModifiable(selected_id); + return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id); } return true; } @@ -171,8 +226,13 @@ protected: class CofBodyPartContextMenu : public CofContextMenu { -protected: +public: + CofBodyPartContextMenu(LLCOFWearables* cof_wearables) + : CofContextMenu(cof_wearables) + { + } +protected: /*virtual*/ LLContextMenu* createMenu() { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; @@ -184,7 +244,7 @@ protected: LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit")); registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked, panel_oe, selected_id)); registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); - registrar.add("BodyPart.Create", boost::bind(createNew, selected_id)); + registrar.add("BodyPart.Create", boost::bind(&CofBodyPartContextMenu::createNew, this, selected_id)); enable_registrar.add("BodyPart.OnEnable", boost::bind(&CofBodyPartContextMenu::onEnable, this, _2)); @@ -204,7 +264,7 @@ protected: if ("edit" == param) { - return gAgentWearables.isWearableModifiable(selected_id); + return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id); } return true; @@ -219,9 +279,9 @@ LLCOFWearables::LLCOFWearables() : LLPanel(), mBodyParts(NULL), mLastSelectedList(NULL) { - mClothingMenu = new CofClothingContextMenu(); - mAttachmentMenu = new CofAttachmentContextMenu(); - mBodyPartMenu = new CofBodyPartContextMenu(); + mClothingMenu = new CofClothingContextMenu(this); + mAttachmentMenu = new CofAttachmentContextMenu(this); + mBodyPartMenu = new CofBodyPartContextMenu(this); }; LLCOFWearables::~LLCOFWearables() @@ -387,7 +447,7 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); //turning on gray separator line for the last item in the items group of the same wearable type - item_panel->childSetVisible("wearable_type_separator_panel", last); + item_panel->childSetVisible("wearable_type_separator_icon", last); return item_panel; } @@ -421,7 +481,7 @@ LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLView llassert(item); if (!item) return NULL; - LLPanelDeletableWearableListItem* item_panel = LLPanelDeletableWearableListItem::create(item); + LLPanelAttachmentListItem* item_panel = LLPanelAttachmentListItem::create(item); if (!item_panel) return NULL; //setting callbacks @@ -499,6 +559,14 @@ LLPanel* LLCOFWearables::getSelectedItem() return mLastSelectedList->getSelectedItem(); } +void LLCOFWearables::getSelectedItems(std::vector<LLPanel*>& selected_items) const +{ + if (mLastSelectedList) + { + mLastSelectedList->getSelectedItems(selected_items); + } +} + void LLCOFWearables::clear() { mAttachments->clear(); @@ -506,6 +574,33 @@ void LLCOFWearables::clear() mBodyParts->clear(); } +LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType() +{ + typedef std::map<std::string, LLAssetType::EType> type_map_t; + + static type_map_t type_map; + static LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("cof_wearables_accordion"); + + if (type_map.empty()) + { + type_map["tab_clothing"] = LLAssetType::AT_CLOTHING; + type_map["tab_attachments"] = LLAssetType::AT_OBJECT; + type_map["tab_body_parts"] = LLAssetType::AT_BODYPART; + } + + const LLAccordionCtrlTab* tab = accordion_ctrl->getExpandedTab(); + LLAssetType::EType result = LLAssetType::AT_NONE; + + if (tab) + { + type_map_t::iterator i = type_map.find(tab->getName()); + llassert(i != type_map.end()); + result = i->second; + } + + return result; +} + void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu) { if(menu) diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index f99f2662e6..62f4cfc692 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -78,10 +78,13 @@ public: bool getSelectedUUIDs(uuid_vec_t& selected_ids); LLPanel* getSelectedItem(); + void getSelectedItems(std::vector<LLPanel*>& selected_items) const; void refresh(); void clear(); + LLAssetType::EType getExpandedAccordionAssetType(); + LLCOFCallbacks& getCOFCallbacks() { return mCOFCallbacks; } protected: diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index d079da3b36..b83e4fe830 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -338,7 +338,11 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus) if (!pickerp) { pickerp = new LLFloaterColorPicker(this, mCanApplyImmediately); - //gFloaterView->getParentFloater(this)->addDependentFloater(pickerp); + LLFloater* parent = gFloaterView->getParentFloater(this); + if (parent) + { + parent->addDependentFloater(pickerp); + } mPickerHandle = pickerp->getHandle(); } diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 38eda5bd2e..3f9d3fdbef 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1366,10 +1366,11 @@ void LLSpatialBridge::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL imm BOOL LLSpatialBridge::updateMove() { - llassert(mDrawable); - llassert(mDrawable->getRegion()); + llassert_always(mDrawable); + llassert_always(mDrawable->mVObjp); + llassert_always(mDrawable->getRegion()); LLSpatialPartition* part = mDrawable->getRegion()->getSpatialPartition(mPartitionType); - llassert(part); + llassert_always(part); mOctree->balance(); if (part) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index e0e5b32299..dbbcb6e7c4 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -862,11 +862,14 @@ void LLFace::updateRebuildFlags() } } +static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom"); + BOOL LLFace::getGeometryVolume(const LLVolume& volume, const S32 &f, const LLMatrix4& mat_vert, const LLMatrix3& mat_normal, const U16 &index_offset) { + LLFastTimer t(FTM_FACE_GET_GEOM); const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mVertices.size(); S32 num_indices = LLPipeline::sUseTriStrips ? (S32)vf.mTriStrip.size() : (S32) vf.mIndices.size(); diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 4fdb010162..f32fcd6b7f 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -496,11 +496,11 @@ private: void fetch_table(std::string table) { - const std::string base = "http://viewer-settings.s3.amazonaws.com/"; + const std::string base = gSavedSettings.getString("FeatureManagerHTTPTable"); const std::string filename = llformat(table.c_str(), LLVersionInfo::getVersion().c_str()); - const std::string url = base + filename; + const std::string url = base + "/" + filename; const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 56bc4a7933..4bd3151f2e 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -135,10 +135,10 @@ BOOL LLFloaterAbout::postBuild() // Render the LLSD from getInfo() as a format_map_t LLStringUtil::format_map_t args; - // For reasons I don't yet understand, [ReleaseNotes] is not part of the - // default substitution strings whereas [APP_NAME] is. But it works to - // simply copy it into these specific args. + + // allow the "Release Notes" URL label to be localized args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes"); + for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap()); ii != iend; ++ii) { @@ -293,14 +293,14 @@ LLSD LLFloaterAbout::getInfo() static std::string get_viewer_release_notes_url() { - LLSD query; - query["channel"] = gSavedSettings.getString("VersionChannelName"); - query["version"] = LLVersionInfo::getVersion(); - - std::ostringstream url; - url << LLTrans::getString("RELEASE_NOTES_BASE_URL") << LLURI::mapToQueryString(query); - - return LLWeb::escapeURL(url.str()); + // return a URL to the release notes for this viewer, such as: + // http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0 + std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL"); + if (! LLStringUtil::endsWith(url, "/")) + url += "/"; + url += gSavedSettings.getString("VersionChannelName") + "/"; + url += LLVersionInfo::getShortVersion(); + return LLWeb::escapeURL(url); } class LLFloaterAboutListener: public LLEventAPI diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 043f753e01..f14e64e3e4 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -1001,18 +1001,19 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata) { std::string name = floaterp->childGetValue("name_form").asString(); std::string desc = floaterp->childGetValue("description_form").asString(); + LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + void *userdata = NULL; upload_new_resource(floaterp->mTransactionID, // tid LLAssetType::AT_ANIMATION, name, desc, + 0, LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION, - LLFloaterPerms::getNextOwnerPerms(), - LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), name, - NULL, - expected_upload_cost); + callback, expected_upload_cost, userdata); } else { diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 972565743e..7ed6539387 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -529,6 +529,19 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, return TRUE; } + +void LLFloaterAvatarPicker::openFriendsTab() +{ + LLTabContainer* tab_container = getChild<LLTabContainer>("ResidentChooserTabs"); + if (tab_container == NULL) + { + llassert(tab_container != NULL); + return; + } + + tab_container->selectTabByName("FriendsPanel"); +} + // static void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void**) { diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index c6f96bee24..2607500dd8 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -68,6 +68,8 @@ public: void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); + void openFriendsTab(); + private: void editKeystroke(class LLLineEditor* caller, void* user_data); diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 46b3695511..d359856443 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -254,7 +254,6 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), - inv_item->getIsLinkType(), inv_item->getFlags(), item_is_multi); row["columns"][0]["column"] = "icon"; diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index c35653178a..9bde3b1dac 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -223,7 +223,6 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), - inv_item->getIsLinkType(), inv_item->getFlags(), item_is_multi); row["columns"][0]["column"] = "icon"; diff --git a/indra/newview/llfloaterbuycurrencyhtml.cpp b/indra/newview/llfloaterbuycurrencyhtml.cpp index 5815df36d1..d45df37092 100644 --- a/indra/newview/llfloaterbuycurrencyhtml.cpp +++ b/indra/newview/llfloaterbuycurrencyhtml.cpp @@ -87,8 +87,11 @@ void LLFloaterBuyCurrencyHTML::navigateToFinalURL() replace[ "[MSG]" ] = LLURI::escape( mMessage ); LLStringUtil::format( buy_currency_url, replace ); + // write final URL to debug console + llinfos << "Buy currency HTML prased URL is " << buy_currency_url << llendl; + // kick off the navigation - mBrowser->navigateTo( buy_currency_url ); + mBrowser->navigateTo( buy_currency_url, "text/html" ); } //////////////////////////////////////////////////////////////////////////////// @@ -98,6 +101,9 @@ void LLFloaterBuyCurrencyHTML::handleMediaEvent( LLPluginClassMedia* self, EMedi // placeholder for now - just in case we want to catch media events if ( LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_COMPLETE == event ) { + // update currency after we complete a navigation since there are many ways + // this can result in a different L$ balance + LLStatusBar::sendMoneyBalanceRequest(); }; } @@ -105,6 +111,9 @@ void LLFloaterBuyCurrencyHTML::handleMediaEvent( LLPluginClassMedia* self, EMedi // void LLFloaterBuyCurrencyHTML::onClose( bool app_quitting ) { + // update L$ balanace one more time + LLStatusBar::sendMoneyBalanceRequest(); + destroy(); } diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index ca346138fb..d6effb2b21 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -49,6 +49,9 @@ static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item"); +const F32 NUDGE_TIME = 0.25f; // in seconds +const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed + // Constants const F32 CAMERA_BUTTON_DELAY = 0.0f; @@ -75,6 +78,7 @@ protected: void onZoomPlusHeldDown(); void onZoomMinusHeldDown(); void onSliderValueChanged(); + F32 getOrbitRate(F32 time); private: LLButton* mPlusBtn; @@ -155,8 +159,8 @@ LLPanelCameraZoom::LLPanelCameraZoom() mMinusBtn( NULL ), mSlider( NULL ) { - mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this)); - mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this)); + mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this)); + mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this)); mCommitCallbackRegistrar.add("Slider.value_changed", boost::bind(&LLPanelCameraZoom::onSliderValueChanged, this)); } @@ -179,9 +183,9 @@ void LLPanelCameraZoom::onZoomPlusHeldDown() F32 val = mSlider->getValueF32(); F32 inc = mSlider->getIncrement(); mSlider->setValue(val - inc); - // commit only if value changed - if (val != mSlider->getValueF32()) - mSlider->onCommit(); + F32 time = mPlusBtn->getHeldDownTime(); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitInKey(getOrbitRate(time)); } void LLPanelCameraZoom::onZoomMinusHeldDown() @@ -189,9 +193,22 @@ void LLPanelCameraZoom::onZoomMinusHeldDown() F32 val = mSlider->getValueF32(); F32 inc = mSlider->getIncrement(); mSlider->setValue(val + inc); - // commit only if value changed - if (val != mSlider->getValueF32()) - mSlider->onCommit(); + F32 time = mMinusBtn->getHeldDownTime(); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitOutKey(getOrbitRate(time)); +} + +F32 LLPanelCameraZoom::getOrbitRate(F32 time) +{ + if( time < NUDGE_TIME ) + { + F32 rate = ORBIT_NUDGE_RATE + time * (1 - ORBIT_NUDGE_RATE)/ NUDGE_TIME; + return rate; + } + else + { + return 1; + } } void LLPanelCameraZoom::onSliderValueChanged() diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index 8fa7a53996..564e38d02d 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -39,7 +39,6 @@ #include "llflatlistview.h" class LLJoystickCameraRotate; -class LLJoystickCameraZoom; class LLJoystickCameraTrack; class LLFloaterReg; class LLPanelCameraZoom; diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index b2564eb2b6..480e4ce3a4 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -143,10 +143,9 @@ void LLFloaterHardwareSettings::apply() LLWindow* window = gViewerWindow->getWindow(); LLCoordScreen size; window->getSize(&size); - gViewerWindow->changeDisplaySettings(window->getFullscreen(), - size, - gSavedSettings.getBOOL("DisableVerticalSync"), - logged_in); + gViewerWindow->changeDisplaySettings(size, + gSavedSettings.getBOOL("DisableVerticalSync"), + logged_in); } else if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic) { diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h index 473d2b189d..dc719bdafe 100644 --- a/indra/newview/llfloaterinventory.h +++ b/indra/newview/llfloaterinventory.h @@ -66,6 +66,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getPanel(); + LLPanelMainInventory* getMainInventoryPanel() { return mPanelMainInventory;} private: LLPanelMainInventory* mPanelMainInventory; }; diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index c259659083..e74bfae026 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -54,7 +54,10 @@ // Constants // const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f; - +const S32 MAP_PADDING_LEFT = 0; +const S32 MAP_PADDING_TOP = 2; +const S32 MAP_PADDING_RIGHT = 2; +const S32 MAP_PADDING_BOTTOM = 0; // // Member functions // @@ -106,7 +109,8 @@ BOOL LLFloaterMap::postBuild() mPopupMenu->setItemEnabled ("Stop Tracking", false); } - stretchMiniMap(getRect().getWidth(),getRect().getHeight()); + stretchMiniMap(getRect().getWidth() - MAP_PADDING_LEFT - MAP_PADDING_RIGHT + ,getRect().getHeight() - MAP_PADDING_TOP - MAP_PADDING_BOTTOM); updateMinorDirections(); @@ -238,7 +242,7 @@ void LLFloaterMap::stretchMiniMap(S32 width,S32 height) if(mMap) { LLRect map_rect; - map_rect.setLeftTopAndSize( 0, getRect().getHeight(), width, height); + map_rect.setLeftTopAndSize( MAP_PADDING_LEFT, getRect().getHeight() - MAP_PADDING_TOP, width, height); mMap->reshape( width, height, 1); mMap->setRect(map_rect); } @@ -248,7 +252,8 @@ void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) { LLFloater::reshape(width, height, called_from_parent); - stretchMiniMap(width, height); + stretchMiniMap(width - MAP_PADDING_LEFT - MAP_PADDING_RIGHT + ,height - MAP_PADDING_TOP - MAP_PADDING_BOTTOM); updateMinorDirections(); } diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 5c343ecb22..159ce41b79 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -169,14 +169,16 @@ void LLFloaterNameDesc::onBtnOK( ) { childDisable("ok_btn"); // don't allow inadvertent extra uploads + LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). + void *nruserdata = NULL; std::string display_name = LLStringUtil::null; upload_new_resource(mFilenameAndPath, // file childGetValue("name_form").asString(), childGetValue("description_form").asString(), - LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), - display_name, NULL, expected_upload_cost); + display_name, callback, expected_upload_cost, nruserdata); closeFloater(false); } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 6087312a68..9064604d23 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -349,9 +349,28 @@ BOOL LLFloaterPreference::postBuild() std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); childSetText("cache_location", cache_location); + // if floater is opened before login set default localized busy message + if (LLStartUp::getStartupState() < STATE_STARTED) + { + gSavedPerAccountSettings.setString("BusyModeResponse", LLTrans::getString("BusyModeResponseDefault")); + } + return TRUE; } +void LLFloaterPreference::onBusyResponseChanged() +{ + // set "BusyResponseChanged" TRUE if user edited message differs from default, FALSE otherwise + if(LLTrans::getString("BusyModeResponseDefault") != getChild<LLUICtrl>("busy_response")->getValue().asString()) + { + gSavedPerAccountSettings.setBOOL("BusyResponseChanged", TRUE ); + } + else + { + gSavedPerAccountSettings.setBOOL("BusyResponseChanged", FALSE ); + } +} + LLFloaterPreference::~LLFloaterPreference() { // clean up user data @@ -465,8 +484,6 @@ void LLFloaterPreference::apply() gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility); } } - - applyResolution(); } void LLFloaterPreference::cancel() @@ -506,6 +523,22 @@ void LLFloaterPreference::cancel() void LLFloaterPreference::onOpen(const LLSD& key) { + // this variable and if that follows it are used to properly handle busy mode response message + static bool initialized = FALSE; + // if user is logged in and we haven't initialized busy_response yet, do it + if (!initialized && LLStartUp::getStartupState() == STATE_STARTED) + { + // Special approach is used for busy response localization, because "BusyModeResponse" is + // in non-localizable xml, and also because it may be changed by user and in this case it shouldn't be localized. + // To keep track of whether busy response is default or changed by user additional setting BusyResponseChanged + // was added into per account settings. + + // initialization should happen once,so setting variable to TRUE + initialized = TRUE; + // this connection is needed to properly set "BusyResponseChanged" setting when user makes changes in + // busy response message. + gSavedPerAccountSettings.getControl("BusyModeResponse")->getSignal()->connect(boost::bind(&LLFloaterPreference::onBusyResponseChanged, this)); + } gAgent.sendAgentUserInfoRequest(); /////////////////////////// From LLPanelGeneral ////////////////////////// @@ -520,7 +553,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) if (can_choose_maturity) { // if they're not adult or a god, they shouldn't see the adult selection, so delete it - if (!gAgent.isAdult() && !gAgent.isGodlike()) + if (!gAgent.isAdult() && !gAgent.isGodlikeWithoutAdminMenuFakery()) { // we're going to remove the adult entry from the combo LLScrollListCtrl* maturity_list = maturity_combo->findChild<LLScrollListCtrl>("ComboBox"); @@ -559,6 +592,16 @@ void LLFloaterPreference::onVertexShaderEnable() refreshEnabledGraphics(); } +//static +void LLFloaterPreference::initBusyResponse() + { + if (!gSavedPerAccountSettings.getBOOL("BusyResponseChanged")) + { + //LLTrans::getString("BusyModeResponseDefault") is used here for localization (EXT-5885) + gSavedPerAccountSettings.setString("BusyModeResponse", LLTrans::getString("BusyModeResponseDefault")); + } + } + void LLFloaterPreference::setHardwareDefaults() { LLFeatureManager::getInstance()->applyRecommendedSettings(); @@ -979,18 +1022,6 @@ void LLFloaterPreference::onChangeQuality(const LLSD& data) refresh(); } -// static -// DEV-24146 - needs to be removed at a later date. jan-2009 -void LLFloaterPreference::cleanupBadSetting() -{ - if (gSavedPerAccountSettings.getString("BusyModeResponse2") == "|TOKEN COPY BusyModeResponse|") - { - llinfos << "cleaning old BusyModeResponse" << llendl; - //LLTrans::getString("BusyModeResponseDefault") is used here for localization (EXT-5885) - gSavedPerAccountSettings.setString("BusyModeResponse2", LLTrans::getString("BusyModeResponseDefault")); - } -} - void LLFloaterPreference::onClickSetKey() { LLVoiceSetKeyDialog* dialog = LLFloaterReg::showTypedInstance<LLVoiceSetKeyDialog>("voice_set_key", LLSD(), TRUE); @@ -1199,31 +1230,6 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b } } -void LLFloaterPreference::applyResolution() -{ - gGL.flush(); - - // Screen resolution - S32 num_resolutions; - LLWindow::LLWindowResolution* supported_resolutions = - gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions); - S32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex(); - if (resIndex == -1) - { - // use highest resolution if nothing selected - resIndex = num_resolutions - 1; - } - gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth); - gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight); - - gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("FullScreen")); - - send_agent_update(TRUE); - - // Update enable/disable - refresh(); -} - void LLFloaterPreference::onChangeMaturity() { U8 sim_access = gSavedSettings.getU32("PreferredMaturity"); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 71aa5d3189..b45e09db7d 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -80,6 +80,9 @@ public: // refresh all the graphics preferences menus static void refreshEnabledGraphics(); + // translate user's busy response message according to current locale if message is default, otherwise do nothing + static void initBusyResponse(); + protected: void onBtnOK(); void onBtnCancel(); @@ -87,6 +90,9 @@ protected: void onClickBrowserClearCache(); + // set value of "BusyResponseChanged" in account settings depending on whether busy response + // string differs from default after user changes. + void onBusyResponseChanged(); // if the custom settings box is clicked void onChangeCustom(); void updateMeterText(LLUICtrl* ctrl); @@ -140,7 +146,6 @@ public: void buildPopupLists(); static void refreshSkin(void* data); - static void cleanupBadSetting(); private: static std::string sSkin; bool mGotPersonalInfo; diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 5bea3325a8..f3baa482a0 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -39,33 +39,28 @@ // Viewer includes #include "llagent.h" #include "llagentcamera.h" -#include "llagentui.h" -#include "llavatarpropertiesprocessor.h" -#include "llbottomtray.h" -#include "llbutton.h" #include "llcallbacklist.h" -#include "llcheckboxctrl.h" -#include "llcombobox.h" #include "llcriticaldamp.h" -#include "lleconomy.h" -#include "llfloaterpostcard.h" +#include "llui.h" #include "llfocusmgr.h" -#include "lllandmarkactions.h" -#include "llradiogroup.h" +#include "llbutton.h" +#include "llcombobox.h" +#include "lleconomy.h" #include "llsliderctrl.h" -#include "llslurl.h" #include "llspinctrl.h" -#include "lltoolfocus.h" -#include "lltoolmgr.h" -#include "llui.h" -#include "lluictrlfactory.h" -#include "llviewercamera.h" #include "llviewercontrol.h" -#include "llviewermenufile.h" // upload_new_resource() +#include "lluictrlfactory.h" #include "llviewerstats.h" +#include "llviewercamera.h" #include "llviewerwindow.h" -#include "llweb.h" +#include "llviewermenufile.h" // upload_new_resource() +#include "llfloaterpostcard.h" +#include "llcheckboxctrl.h" +#include "llradiogroup.h" +#include "lltoolfocus.h" +#include "lltoolmgr.h" #include "llworld.h" +#include "llagentui.h" // Linden library includes #include "llfontgl.h" @@ -119,7 +114,6 @@ public: enum ESnapshotType { SNAPSHOT_POSTCARD, - SNAPSHOT_WEB, SNAPSHOT_TEXTURE, SNAPSHOT_LOCAL }; @@ -168,11 +162,8 @@ public: void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; } void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f); LLFloaterPostcard* savePostcard(); - void confirmSavingTexture(bool set_as_profile_pic = false); - bool onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic); - void saveTexture(bool set_as_profile_pic = false); + void saveTexture(); BOOL saveLocal(); - void saveWeb(std::string url); BOOL setThumbnailImageSize() ; void generateThumbnailImage(BOOL force_update = FALSE) ; @@ -181,9 +172,6 @@ public: // Returns TRUE when snapshot generated, FALSE otherwise. static BOOL onIdle( void* snapshot_preview ); - - // callback for region name resolve - void regionNameCallback(std::string url, LLSD body, const std::string& name, S32 x, S32 y, S32 z); private: LLColor4 mColor; @@ -305,7 +293,7 @@ F32 LLSnapshotLivePreview::getAspect() F32 image_aspect_ratio = ((F32)mWidth[mCurImageIndex]) / ((F32)mHeight[mCurImageIndex]); F32 window_aspect_ratio = ((F32)getRect().getWidth()) / ((F32)getRect().getHeight()); - if (!mKeepAspectRatio) + if (!mKeepAspectRatio)//gSavedSettings.getBOOL("KeepAspectForSnapshot")) { return image_aspect_ratio; } @@ -638,20 +626,20 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize() F32 window_aspect_ratio = ((F32)window_width) / ((F32)window_height); // UI size for thumbnail - LLFloater* floater = LLFloaterReg::getInstance("snapshot"); - mThumbnailWidth = floater->getChild<LLView>("thumbnail_placeholder")->getRect().getWidth(); - mThumbnailHeight = floater->getChild<LLView>("thumbnail_placeholder")->getRect().getHeight(); - + S32 max_width = LLFloaterSnapshot::getUIWinWidth() - 20; + S32 max_height = 90; - if (window_aspect_ratio > (F32)mThumbnailWidth / mThumbnailHeight) + if (window_aspect_ratio > (F32)max_width / max_height) { // image too wide, shrink to width - mThumbnailHeight = llround((F32)mThumbnailWidth / window_aspect_ratio); + mThumbnailWidth = max_width; + mThumbnailHeight = llround((F32)max_width / window_aspect_ratio); } else { // image too tall, shrink to height - mThumbnailWidth = llround((F32)mThumbnailHeight * window_aspect_ratio); + mThumbnailHeight = max_height; + mThumbnailWidth = llround((F32)max_height * window_aspect_ratio); } if(mThumbnailWidth > window_width || mThumbnailHeight > window_height) @@ -837,21 +825,10 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) { // delete any existing image previewp->mFormattedImage = NULL; - // now create the new one of the appropriate format. - // note: postcards and web hardcoded to use jpeg always. - LLFloaterSnapshot::ESnapshotFormat format; - - if (previewp->getSnapshotType() == SNAPSHOT_POSTCARD || - previewp->getSnapshotType() == SNAPSHOT_WEB) - { - format = LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; - } - else - { - format = previewp->getSnapshotFormat(); - } - + // note: postcards hardcoded to use jpeg always. + LLFloaterSnapshot::ESnapshotFormat format = previewp->getSnapshotType() == SNAPSHOT_POSTCARD + ? LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG : previewp->getSnapshotFormat(); switch(format) { case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: @@ -978,41 +955,13 @@ LLFloaterPostcard* LLSnapshotLivePreview::savePostcard() return floater; } -// Callback for asset upload -void profile_pic_upload_callback(const LLUUID& uuid) -{ - LLFloaterSnapshot* floater = LLFloaterReg::getTypedInstance<LLFloaterSnapshot>("snapshot"); - floater->setAsProfilePic(uuid); -} - -void LLSnapshotLivePreview::confirmSavingTexture(bool set_as_profile_pic) -{ - LLSD args; - args["AMOUNT"] = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - LLNotificationsUtil::add("UploadConfirmation", args, LLSD(), - boost::bind(&LLSnapshotLivePreview::onSavingTextureConfirmed, this, _1, _2, set_as_profile_pic)); -} - -bool LLSnapshotLivePreview::onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - if (option == 0) - { - saveTexture(set_as_profile_pic); - } - - return false; -} - - -void LLSnapshotLivePreview::saveTexture(bool set_as_profile_pic) +void LLSnapshotLivePreview::saveTexture() { // gen a new uuid for this asset LLTransactionID tid; tid.generate(); LLAssetID new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - + LLPointer<LLImageJ2C> formatted = new LLImageJ2C; LLPointer<LLImageRaw> scaled = new LLImageRaw(mPreviewImage->getData(), mPreviewImage->getWidth(), @@ -1023,30 +972,26 @@ void LLSnapshotLivePreview::saveTexture(bool set_as_profile_pic) if (formatted->encode(scaled, 0.0f)) { - boost::function<void(const LLUUID& uuid)> callback = NULL; - - if (set_as_profile_pic) - { - callback = profile_pic_upload_callback; - } - LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE); std::string pos_string; LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL); std::string who_took_it; LLAgentUI::buildFullname(who_took_it); + LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + void *userdata = NULL; upload_new_resource(tid, // tid LLAssetType::AT_TEXTURE, "Snapshot : " + pos_string, "Taken by " + who_took_it + " at " + pos_string, + 0, LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, // Note: Snapshots to inventory is a special case of content upload PERM_NONE, // that ignores the user's premissions preferences and continues to PERM_NONE, // always use these fairly permissive hard-coded initial perms. - MG "Snapshot : " + pos_string, - callback, expected_upload_cost); + callback, expected_upload_cost, userdata); gViewerWindow->playSnapshotAnimAndSound(); } else @@ -1076,81 +1021,6 @@ BOOL LLSnapshotLivePreview::saveLocal() return success; } - -class LLSendWebResponder : public LLHTTPClient::Responder -{ -public: - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - LLNotificationsUtil::add("ShareToWebFailed"); - } - - virtual void result(const LLSD& content) - { - std::string response_url = content["response_url"].asString(); - - if (!response_url.empty()) - { - LLWeb::loadURLExternal(response_url); - } - else - { - LLNotificationsUtil::add("ShareToWebFailed"); - } - } - -}; - -void LLSnapshotLivePreview::saveWeb(std::string url) -{ - if (url.empty()) - { - llwarns << "No share to web url" << llendl; - return; - } - - LLImageJPEG* jpg = dynamic_cast<LLImageJPEG*>(mFormattedImage.get()); - if(!jpg) - { - llwarns << "Formatted image not a JPEG" << llendl; - return; - } - -/* figure out if there's a better way to serialize */ - LLSD body; - std::vector<U8> binary_image; - U8* data = jpg->getData(); - for (int i = 0; i < jpg->getDataSize(); i++) - { - binary_image.push_back(data[i]); - } - - body["image"] = binary_image; - - body["description"] = getChild<LLLineEditor>("description")->getText(); - - std::string name; - LLAgentUI::buildFullname(name); - - body["avatar_name"] = name; - - LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(gAgentCamera.getCameraPositionGlobal(), - boost::bind(&LLSnapshotLivePreview::regionNameCallback, this, url, body, _1, _2, _3, _4)); - - gViewerWindow->playSnapshotAnimAndSound(); -} - - -void LLSnapshotLivePreview::regionNameCallback(std::string url, LLSD body, const std::string& name, S32 x, S32 y, S32 z) -{ - body["slurl"] = LLSLURL(name, LLVector3d(x, y, z)).getSLURLString(); - - LLHTTPClient::post(url, body, - new LLSendWebResponder()); -} - ///---------------------------------------------------------------------------- /// Class LLFloaterSnapshot::Impl ///---------------------------------------------------------------------------- @@ -1170,6 +1040,9 @@ public: mAvatarPauseHandles.clear(); } + static void onClickDiscard(void* data); + static void onClickKeep(void* data); + static void onCommitSave(LLUICtrl* ctrl, void* data); static void onClickNewSnapshot(void* data); static void onClickAutoSnap(LLUICtrl *ctrl, void* data); //static void onClickAdvanceSnap(LLUICtrl *ctrl, void* data); @@ -1184,11 +1057,9 @@ public: static void updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update = TRUE); static void onCommitFreezeFrame(LLUICtrl* ctrl, void* data); static void onCommitLayerTypes(LLUICtrl* ctrl, void*data); + static void onCommitSnapshotType(LLUICtrl* ctrl, void* data); static void onCommitSnapshotFormat(LLUICtrl* ctrl, void* data); static void onCommitCustomResolution(LLUICtrl *ctrl, void* data); - static void onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type); - static void onCommitProfilePic(LLFloaterSnapshot* view); - static void onToggleAdvanced(LLUICtrl *ctrl, void* data); static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ; static BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value); @@ -1196,8 +1067,10 @@ public: static void setResolution(LLFloaterSnapshot* floater, const std::string& comboname); static void updateControls(LLFloaterSnapshot* floater); static void updateLayout(LLFloaterSnapshot* floater); + static void updateResolutionTextEntry(LLFloaterSnapshot* floater); private: + static LLSnapshotLivePreview::ESnapshotType getTypeIndex(LLFloaterSnapshot* floater); static ESnapshotFormat getFormatIndex(LLFloaterSnapshot* floater); static LLViewerWindow::ESnapshotType getLayerType(LLFloaterSnapshot* floater); static void comboSetCustom(LLFloaterSnapshot *floater, const std::string& comboname); @@ -1220,6 +1093,22 @@ LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot } // static +LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(LLFloaterSnapshot* floater) +{ + LLSnapshotLivePreview::ESnapshotType index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; + LLSD value = floater->childGetValue("snapshot_type_radio"); + const std::string id = value.asString(); + if (id == "postcard") + index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; + else if (id == "texture") + index = LLSnapshotLivePreview::SNAPSHOT_TEXTURE; + else if (id == "local") + index = LLSnapshotLivePreview::SNAPSHOT_LOCAL; + return index; +} + + +// static LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getFormatIndex(LLFloaterSnapshot* floater) { ESnapshotFormat index = SNAPSHOT_FORMAT_PNG; @@ -1267,12 +1156,20 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) { LLSnapshotLivePreview* previewp = getPreviewView(floaterp); + S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ; + if(!gSavedSettings.getBOOL("AdvanceSnapshot")) //set to original window resolution { previewp->mKeepAspectRatio = TRUE; - floaterp->getChild<LLComboBox>("snapshot_size_combo")->setCurrentByIndex(0); - gSavedSettings.setS32("SnapshotLastResolution", 0); + floaterp->getChild<LLComboBox>("postcard_size_combo")->setCurrentByIndex(0); + gSavedSettings.setS32("SnapshotPostcardLastResolution", 0); + + floaterp->getChild<LLComboBox>("texture_size_combo")->setCurrentByIndex(0); + gSavedSettings.setS32("SnapshotTextureLastResolution", 0); + + floaterp->getChild<LLComboBox>("local_size_combo")->setCurrentByIndex(0); + gSavedSettings.setS32("SnapshotLocalLastResolution", 0); LLSnapshotLivePreview* previewp = getPreviewView(floaterp); previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); @@ -1285,6 +1182,9 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) // stop all mouse events at fullscreen preview layer floaterp->getParent()->setMouseOpaque(TRUE); + // shrink to smaller layout + floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getUIWinHeightLong() + delta_height); + // can see and interact with fullscreen preview now if (previewp) { @@ -1313,6 +1213,7 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) else // turning off freeze frame mode { floaterp->getParent()->setMouseOpaque(FALSE); + floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getUIWinHeightLong() + delta_height); if (previewp) { previewp->setVisible(FALSE); @@ -1341,27 +1242,127 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) // static void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) { + LLRadioGroup* snapshot_type_radio = floater->getChild<LLRadioGroup>("snapshot_type_radio"); + snapshot_type_radio->setSelectedIndex(gSavedSettings.getS32("LastSnapshotType")); + LLSnapshotLivePreview::ESnapshotType shot_type = getTypeIndex(floater); + ESnapshotFormat shot_format = (ESnapshotFormat)gSavedSettings.getS32("SnapshotFormat"); //getFormatIndex(floater); LLViewerWindow::ESnapshotType layer_type = getLayerType(floater); + LLViewerWindow::ESnapshotType layer_type = getLayerType(floater); + + floater->childSetVisible("postcard_size_combo", FALSE); + floater->childSetVisible("texture_size_combo", FALSE); + floater->childSetVisible("local_size_combo", FALSE); + + floater->getChild<LLComboBox>("postcard_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotPostcardLastResolution")); + floater->getChild<LLComboBox>("texture_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotTextureLastResolution")); + floater->getChild<LLComboBox>("local_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotLocalLastResolution")); + floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat")); + + floater->childSetVisible("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE); + floater->childSetVisible("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD); + floater->childSetVisible("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); + floater->childSetEnabled("keep_aspect_check", shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !floater->impl.mAspectRatioCheckOff); + floater->childSetEnabled("layer_types", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); + + BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot"); + BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL; + BOOL show_slider = + shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD + || (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); + + floater->childSetVisible("more_btn", !is_advance); // the only item hidden in advanced mode + floater->childSetVisible("less_btn", is_advance); + floater->childSetVisible("type_label2", is_advance); + floater->childSetVisible("format_label", is_advance && is_local); + floater->childSetVisible("local_format_combo", is_advance && is_local); + floater->childSetVisible("layer_types", is_advance); + floater->childSetVisible("layer_type_label", is_advance); + floater->childSetVisible("snapshot_width", is_advance); + floater->childSetVisible("snapshot_height", is_advance); + floater->childSetVisible("keep_aspect_check", is_advance); + floater->childSetVisible("ui_check", is_advance); + floater->childSetVisible("hud_check", is_advance); + floater->childSetVisible("keep_open_check", is_advance); + floater->childSetVisible("freeze_frame_check", is_advance); + floater->childSetVisible("auto_snapshot_check", is_advance); + floater->childSetVisible("image_quality_slider", is_advance && show_slider); + LLSnapshotLivePreview* previewp = getPreviewView(floater); - if (NULL == previewp) - { - return; + BOOL got_bytes = previewp && previewp->getDataSize() > 0; + BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); + + floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE); + floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap); + floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap); + + LLLocale locale(LLLocale::USER_LOCALE); + std::string bytes_string; + if (got_snap) + { + LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); + } + S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + floater->childSetLabelArg("texture", "[AMOUNT]", llformat("%d",upload_cost)); + floater->childSetLabelArg("upload_btn", "[AMOUNT]", llformat("%d",upload_cost)); + floater->childSetTextArg("file_size_label", "[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); + floater->childSetColor("file_size_label", + shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD + && got_bytes + && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); + + switch(shot_type) + { + case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: + layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; + floater->childSetValue("layer_types", "colors"); + if(is_advance) + { + setResolution(floater, "postcard_size_combo"); + } + break; + case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: + layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; + floater->childSetValue("layer_types", "colors"); + if(is_advance) + { + setResolution(floater, "texture_size_combo"); + } + break; + case LLSnapshotLivePreview::SNAPSHOT_LOCAL: + if(is_advance) + { + setResolution(floater, "local_size_combo"); + } + break; + default: + break; } - // Disable buttons until Snapshot is ready. EXT-6534 - BOOL got_snap = previewp->getSnapshotUpToDate(); + updateResolutionTextEntry(floater); - // process Main buttons - floater->childSetEnabled("share", got_snap); - floater->childSetEnabled("save", got_snap); - floater->childSetEnabled("set_profile_pic", got_snap); + if (previewp) + { + previewp->setSnapshotType(shot_type); + previewp->setSnapshotFormat(shot_format); + previewp->setSnapshotBufferType(layer_type); + } +} - // process Share actions buttons - floater->childSetEnabled("share_to_web", got_snap); - floater->childSetEnabled("share_to_email", got_snap); +// static +void LLFloaterSnapshot::Impl::updateResolutionTextEntry(LLFloaterSnapshot* floater) +{ + LLSpinCtrl* width_spinner = floater->getChild<LLSpinCtrl>("snapshot_width"); + LLSpinCtrl* height_spinner = floater->getChild<LLSpinCtrl>("snapshot_height"); - // process Save actions buttons - floater->childSetEnabled("save_to_inventory", got_snap); - floater->childSetEnabled("save_to_computer", got_snap); + if(getTypeIndex(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + width_spinner->setAllowEdit(FALSE); + height_spinner->setAllowEdit(FALSE); + } + else + { + width_spinner->setAllowEdit(TRUE); + height_spinner->setAllowEdit(TRUE); + } } // static @@ -1375,6 +1376,70 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp, } // static +void LLFloaterSnapshot::Impl::onClickDiscard(void* data) +{ + LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + + if (view) + { + view->closeFloater(); + } +} + + +// static +void LLFloaterSnapshot::Impl::onCommitSave(LLUICtrl* ctrl, void* data) +{ + if (ctrl->getValue().asString() == "save as") + { + gViewerWindow->resetSnapshotLoc(); + } + onClickKeep(data); +} + +// static +void LLFloaterSnapshot::Impl::onClickKeep(void* data) +{ + LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + LLSnapshotLivePreview* previewp = getPreviewView(view); + + if (previewp) + { + if (previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_POSTCARD) + { + LLFloaterPostcard* floater = previewp->savePostcard(); + // if still in snapshot mode, put postcard floater in snapshot floaterview + // and link it to snapshot floater + if (floater && !gSavedSettings.getBOOL("CloseSnapshotOnKeep")) + { + gFloaterView->removeChild(floater); + gSnapshotFloaterView->addChild(floater); + view->addDependentFloater(floater, FALSE); + } + } + else if (previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + previewp->saveTexture(); + } + else + { + previewp->saveLocal(); + } + + if (gSavedSettings.getBOOL("CloseSnapshotOnKeep")) + { + view->closeFloater(); + } + else + { + checkAutoSnapshot(previewp); + } + + updateControls(view); + } +} + +// static void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data) { LLSnapshotLivePreview* previewp = getPreviewView((LLFloaterSnapshot *)data); @@ -1610,8 +1675,10 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL } // save off all selected resolution values - gSavedSettings.setS32("SnapshotLastResolution", view->getChild<LLComboBox>("snapshot_size_combo")->getCurrentIndex()); - + gSavedSettings.setS32("SnapshotPostcardLastResolution", view->getChild<LLComboBox>("postcard_size_combo")->getCurrentIndex()); + gSavedSettings.setS32("SnapshotTextureLastResolution", view->getChild<LLComboBox>("texture_size_combo")->getCurrentIndex()); + gSavedSettings.setS32("SnapshotLocalLastResolution", view->getChild<LLComboBox>("local_size_combo")->getCurrentIndex()); + std::string sdstring = combobox->getSelectedValue(); LLSD sdres; std::stringstream sstream(sdstring); @@ -1691,130 +1758,17 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data) } //static -void LLFloaterSnapshot::Impl::onToggleAdvanced(LLUICtrl* ctrl, void* data) +void LLFloaterSnapshot::Impl::onCommitSnapshotType(LLUICtrl* ctrl, void* data) { - LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; - - LLPanel* advanced_panel = view->getChild<LLPanel>("snapshot_advanced"); - - if (advanced_panel->getVisible()) - { - advanced_panel->setVisible(false); - - // shrink floater back to original size - view->reshape(view->getRect().getWidth() - advanced_panel->getRect().getWidth(), view->getRect().getHeight()); - - view->getChild<LLButton>("hide_advanced")->setVisible(false); - view->getChild<LLButton>("show_advanced")->setVisible(true); - } - else - { - advanced_panel->setVisible(true); - // stretch the floater so it can accommodate the advanced panel - view->reshape(view->getRect().getWidth() + advanced_panel->getRect().getWidth(), view->getRect().getHeight()); - - view->getChild<LLButton>("hide_advanced")->setVisible(true); - view->getChild<LLButton>("show_advanced")->setVisible(false); - } -} - -// This object represents a pending request for avatar properties information -class LLAvatarDataRequest : public LLAvatarPropertiesObserver -{ -public: - LLAvatarDataRequest(const LLUUID& avatar_id, const LLUUID& image_id, LLFloaterSnapshot* floater) - : mAvatarID(avatar_id), - mImageID(image_id), - mSnapshotFloater(floater) - - { - } - - ~LLAvatarDataRequest() - { - // remove ourselves as an observer - LLAvatarPropertiesProcessor::getInstance()-> - removeObserver(mAvatarID, this); - } - - void processProperties(void* data, EAvatarProcessorType type) - { - // route the data to the inspector - if (data - && type == APT_PROPERTIES) - { - - LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data); - - LLAvatarData new_data(*avatar_data); - new_data.image_id = mImageID; - - LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate(&new_data); - - delete this; - } - } - - // Store avatar ID so we can un-register the observer on destruction - LLUUID mAvatarID; - LLUUID mImageID; - LLFloaterSnapshot* mSnapshotFloater; -}; - -void LLFloaterSnapshot::Impl::onCommitProfilePic(LLFloaterSnapshot* view) -{ - //first save to harddrive - LLSnapshotLivePreview* previewp = getPreviewView(view); - - if(previewp) + LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + if (view) { - previewp->confirmSavingTexture(true); + gSavedSettings.setS32("LastSnapshotType", getTypeIndex(view)); + getPreviewView(view)->updateSnapshot(TRUE); + updateControls(view); } } -void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type) -{ - LLSnapshotLivePreview* previewp = getPreviewView(view); - - if (previewp) - { - previewp->setSnapshotType(type); - - if (type == LLSnapshotLivePreview::SNAPSHOT_WEB) - { - previewp->saveWeb(view->getString("share_to_web_url")); - } - else if (type == LLSnapshotLivePreview::SNAPSHOT_LOCAL) - { - previewp->saveLocal(); - } - else if (type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) - { - previewp->confirmSavingTexture(); - } - else if (type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD) - { - LLFloaterPostcard* floater = previewp->savePostcard(); - // if still in snapshot mode, put postcard floater in snapshot floaterview - // and link it to snapshot floater - if (floater && !gSavedSettings.getBOOL("CloseSnapshotOnKeep")) - { - gFloaterView->removeChild(floater); - gSnapshotFloaterView->addChild(floater); - view->addDependentFloater(floater, FALSE); - } - } - - if (gSavedSettings.getBOOL("CloseSnapshotOnKeep")) - { - view->closeFloater(); - } - else - { - checkAutoSnapshot(previewp); - } - } -} //static void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data) @@ -1828,6 +1782,8 @@ void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data) } } + + // Sets the named size combo to "custom" mode. // static void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const std::string& comboname) @@ -1836,11 +1792,24 @@ void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const s combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index - gSavedSettings.setS32("SnapshotLastResolution", combo->getCurrentIndex()); + if(comboname == "postcard_size_combo") + { + gSavedSettings.setS32("SnapshotPostcardLastResolution", combo->getCurrentIndex()); + } + else if(comboname == "texture_size_combo") + { + gSavedSettings.setS32("SnapshotTextureLastResolution", combo->getCurrentIndex()); + } + else if(comboname == "local_size_combo") + { + gSavedSettings.setS32("SnapshotLocalLastResolution", combo->getCurrentIndex()); + } checkAspectRatio(floater, -1); // -1 means custom } + + //static BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value) { @@ -1981,7 +1950,9 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat previewp->setSize(w,h); checkAutoSnapshot(previewp, FALSE); previewp->updateSnapshot(FALSE, TRUE); - comboSetCustom(view, "snapshot_size_combo"); + comboSetCustom(view, "postcard_size_combo"); + comboSetCustom(view, "texture_size_combo"); + comboSetCustom(view, "local_size_combo"); } } @@ -1998,7 +1969,7 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat // Default constructor LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key) - : LLTransientDockableFloater(NULL, true, key), + : LLFloater(key), impl (*(new Impl)) { //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_snapshot.xml", FALSE); @@ -2023,20 +1994,7 @@ LLFloaterSnapshot::~LLFloaterSnapshot() BOOL LLFloaterSnapshot::postBuild() { - - getChild<LLButton>("share")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_SHARE)); - getChild<LLButton>("save")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_SAVE)); - getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_MAIN)); - - getChild<LLButton>("share_to_web")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_WEB)); - getChild<LLButton>("share_to_email")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_POSTCARD)); - getChild<LLButton>("save_to_inventory")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_TEXTURE)); - getChild<LLButton>("save_to_computer")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_LOCAL)); - getChild<LLButton>("set_profile_pic")->setCommitCallback(boost::bind(&Impl::onCommitProfilePic, this)); - - childSetCommitCallback("show_advanced", Impl::onToggleAdvanced, this); - childSetCommitCallback("hide_advanced", Impl::onToggleAdvanced, this); - + childSetCommitCallback("snapshot_type_radio", Impl::onCommitSnapshotType, this); childSetCommitCallback("local_format_combo", Impl::onCommitSnapshotFormat, this); childSetAction("new_snapshot_btn", Impl::onClickNewSnapshot, this); @@ -2044,6 +2002,11 @@ BOOL LLFloaterSnapshot::postBuild() childSetAction("more_btn", Impl::onClickMore, this); childSetAction("less_btn", Impl::onClickLess, this); + childSetAction("upload_btn", Impl::onClickKeep, this); + childSetAction("send_btn", Impl::onClickKeep, this); + childSetCommitCallback("save_btn", Impl::onCommitSave, this); + childSetAction("discard_btn", Impl::onClickDiscard, this); + childSetCommitCallback("image_quality_slider", Impl::onCommitQuality, this); childSetValue("image_quality_slider", gSavedSettings.getS32("SnapshotQuality")); @@ -2064,6 +2027,7 @@ BOOL LLFloaterSnapshot::postBuild() childSetCommitCallback("layer_types", Impl::onCommitLayerTypes, this); childSetValue("layer_types", "colors"); + childSetEnabled("layer_types", FALSE); childSetValue("snapshot_width", gSavedSettings.getS32(lastSnapshotWidthName())); childSetValue("snapshot_height", gSavedSettings.getS32(lastSnapshotHeightName())); @@ -2074,7 +2038,9 @@ BOOL LLFloaterSnapshot::postBuild() childSetValue("auto_snapshot_check", gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", Impl::onClickAutoSnap, this); - childSetCommitCallback("snapshot_size_combo", Impl::onCommitResolution, this); + childSetCommitCallback("postcard_size_combo", Impl::onCommitResolution, this); + childSetCommitCallback("texture_size_combo", Impl::onCommitResolution, this); + childSetCommitCallback("local_size_combo", Impl::onCommitResolution, this); // create preview window LLRect full_screen_rect = getRootView()->getRect(); @@ -2095,14 +2061,8 @@ BOOL LLFloaterSnapshot::postBuild() impl.mPreviewHandle = previewp->getHandle(); impl.updateControls(this); impl.updateLayout(this); - - //save off the refresh button's rectangle so we can apply offsets with thumbnail resize - mRefreshBtnRect = getChild<LLButton>("new_snapshot_btn")->getRect(); - - // make sure we share/hide the general buttons - updateButtons(SNAPSHOT_MAIN); - return LLDockableFloater::postBuild(); + return TRUE; } void LLFloaterSnapshot::draw() @@ -2115,19 +2075,15 @@ void LLFloaterSnapshot::draw() return; } - LLDockableFloater::draw(); - - LLButton* refresh_btn = getChild<LLButton>("new_snapshot_btn"); - // revert the refresh button to original intended position - LLRect refresh_rect = mRefreshBtnRect; + LLFloater::draw(); if (previewp) { if(previewp->getThumbnailImage()) { - LLRect thumbnail_rect = getChild<LLView>("thumbnail_placeholder")->getRect(); + LLRect thumbnail_rect = getChild<LLUICtrl>("thumbnail_placeholder")->getRect(); - S32 offset_x = (thumbnail_rect.getWidth() - previewp->getThumbnailWidth()) / 2 + thumbnail_rect.mLeft; + S32 offset_x = (getRect().getWidth() - previewp->getThumbnailWidth()) / 2 ; S32 offset_y = thumbnail_rect.mBottom + (thumbnail_rect.getHeight() - previewp->getThumbnailHeight()) / 2 ; glMatrixMode(GL_MODELVIEW); @@ -2136,14 +2092,8 @@ void LLFloaterSnapshot::draw() previewp->getThumbnailImage(), LLColor4::white); previewp->drawPreviewRect(offset_x, offset_y) ; - - refresh_rect.translate(offset_x - thumbnail_rect.mLeft, offset_y - thumbnail_rect.mBottom); } } - - refresh_btn->setRect(refresh_rect); - drawChild(refresh_btn); - } void LLFloaterSnapshot::onOpen(const LLSD& key) @@ -2157,12 +2107,6 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) gSnapshotFloaterView->setEnabled(TRUE); gSnapshotFloaterView->setVisible(TRUE); gSnapshotFloaterView->adjustToFitScreen(this, FALSE); - - LLButton *snapshots = LLBottomTray::getInstance()->getChild<LLButton>("snapshots"); - - setDockControl(new LLDockControl( - snapshots, this, - getDockTongue(), LLDockControl::TOP)); } void LLFloaterSnapshot::onClose(bool app_quitting) @@ -2190,33 +2134,6 @@ void LLFloaterSnapshot::update() } } -bool LLFloaterSnapshot::updateButtons(ESnapshotMode mode) -{ - childSetVisible("share", mode == SNAPSHOT_MAIN); - childSetVisible("save", mode == SNAPSHOT_MAIN); - childSetVisible("set_profile_pic", mode == SNAPSHOT_MAIN); - -// childSetVisible("share_to_web", mode == SNAPSHOT_SHARE); - childSetVisible("share_to_email", mode == SNAPSHOT_SHARE); - - childSetVisible("save_to_inventory", mode == SNAPSHOT_SAVE); - childSetVisible("save_to_computer", mode == SNAPSHOT_SAVE); - - childSetVisible("cancel", mode != SNAPSHOT_MAIN); - - return true; -} - -void LLFloaterSnapshot::setAsProfilePic(const LLUUID& image_id) -{ - LLAvatarDataRequest* avatar_data_request = new LLAvatarDataRequest(gAgent.getID(), image_id, this); - - LLAvatarPropertiesProcessor* processor = - LLAvatarPropertiesProcessor::getInstance(); - - processor->addObserver(gAgent.getID(), avatar_data_request); - processor->sendAvatarPropertiesRequest(gAgent.getID()); -} ///---------------------------------------------------------------------------- /// Class LLSnapshotFloaterView diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 931d355748..1333497bd2 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -34,10 +34,9 @@ #define LL_LLFLOATERSNAPSHOT_H #include "llfloater.h" -#include "lltransientdockablefloater.h" -class LLFloaterSnapshot : public LLTransientDockableFloater +class LLFloaterSnapshot : public LLFloater { public: typedef enum e_snapshot_format @@ -47,13 +46,6 @@ public: SNAPSHOT_FORMAT_BMP } ESnapshotFormat; - enum ESnapshotMode - { - SNAPSHOT_SHARE, - SNAPSHOT_SAVE, - SNAPSHOT_MAIN - }; - LLFloaterSnapshot(const LLSD& key); virtual ~LLFloaterSnapshot(); @@ -64,10 +56,6 @@ public: static void update(); - void setAsProfilePic(const LLUUID& image_id); - - bool updateButtons(ESnapshotMode mode); - static S32 getUIWinHeightLong() {return sUIWinHeightLong ;} static S32 getUIWinHeightShort() {return sUIWinHeightShort ;} static S32 getUIWinWidth() {return sUIWinWidth ;} @@ -79,8 +67,6 @@ private: static S32 sUIWinHeightLong ; static S32 sUIWinHeightShort ; static S32 sUIWinWidth ; - - LLRect mRefreshBtnRect; }; class LLSnapshotFloaterView : public LLFloaterView diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp new file mode 100644 index 0000000000..ca1f142760 --- /dev/null +++ b/indra/newview/llfloatervoiceeffect.cpp @@ -0,0 +1,288 @@ +/** + * @file llfloatervoiceeffect.cpp + * @author Aimee + * @brief Selection and preview of voice effect. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatervoiceeffect.h" + +#include "llscrolllistctrl.h" +#include "lltrans.h" +#include "llweb.h" + +LLFloaterVoiceEffect::LLFloaterVoiceEffect(const LLSD& key) + : LLFloater(key) +{ + mCommitCallbackRegistrar.add("VoiceEffect.Record", boost::bind(&LLFloaterVoiceEffect::onClickRecord, this)); + mCommitCallbackRegistrar.add("VoiceEffect.Play", boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); + mCommitCallbackRegistrar.add("VoiceEffect.Stop", boost::bind(&LLFloaterVoiceEffect::onClickStop, this)); +// mCommitCallbackRegistrar.add("VoiceEffect.Activate", boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); +} + +// virtual +LLFloaterVoiceEffect::~LLFloaterVoiceEffect() +{ + if(LLVoiceClient::instanceExists()) + { + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->removeObserver(this); + } + } +} + +// virtual +BOOL LLFloaterVoiceEffect::postBuild() +{ + setDefaultBtn("record_btn"); + getChild<LLButton>("record_btn")->setFocus(true); + childSetTextArg("voice_morphing_link", "[URL]", LLTrans::getString("voice_morphing_url")); + + mVoiceEffectList = getChild<LLScrollListCtrl>("voice_effect_list"); + if (mVoiceEffectList) + { + mVoiceEffectList->setCommitCallback(boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); +// mVoiceEffectList->setDoubleClickCallback(boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); + } + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->addObserver(this); + + // Disconnect from the current voice channel ready to record a voice sample for previewing + effect_interface->enablePreviewBuffer(true); + } + + refreshEffectList(); + updateControls(); + + return TRUE; +} + +// virtual +void LLFloaterVoiceEffect::onClose(bool app_quitting) +{ + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->enablePreviewBuffer(false); + } +} + +void LLFloaterVoiceEffect::refreshEffectList() +{ + if (!mVoiceEffectList) + { + return; + } + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (!effect_interface) + { + mVoiceEffectList->setEnabled(false); + return; + } + + LL_DEBUGS("Voice")<< "Rebuilding Voice Morph list."<< LL_ENDL; + + // Preserve selected items and scroll position + S32 scroll_pos = mVoiceEffectList->getScrollPos(); + uuid_vec_t selected_items; + std::vector<LLScrollListItem*> items = mVoiceEffectList->getAllSelected(); + for(std::vector<LLScrollListItem*>::const_iterator it = items.begin(); it != items.end(); it++) + { + selected_items.push_back((*it)->getUUID()); + } + + mVoiceEffectList->deleteAllItems(); + + { + // Add the "No Voice Morph" entry + LLSD element; + + element["id"] = LLUUID::null; + element["columns"][NAME_COLUMN]["column"] = "name"; + element["columns"][NAME_COLUMN]["value"] = getString("no_voice_effect"); + element["columns"][NAME_COLUMN]["font"]["style"] = "BOLD"; + + LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); + // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( + if(sl_item) + { + ((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(LLFontGL::BOLD); + } + } + + // Add each Voice Morph template, if there are any (template list includes all usable effects) + const voice_effect_list_t& template_list = effect_interface->getVoiceEffectTemplateList(); + if (!template_list.empty()) + { + for (voice_effect_list_t::const_iterator it = template_list.begin(); it != template_list.end(); ++it) + { + const LLUUID& effect_id = it->second; + std::string effect_name = it->first; + + LLSD effect_properties = effect_interface->getVoiceEffectProperties(effect_id); + + // Tag the active effect. + if (effect_id == LLVoiceClient::instance().getVoiceEffectDefault()) + { + effect_name += " " + getString("active_voice_effect"); + } + + // Tag available effects that are new this session + if (effect_properties["is_new"].asBoolean()) + { + effect_name += " " + getString("new_voice_effect"); + } + + LLDate expiry_date = effect_properties["expiry_date"].asDate(); + bool is_template_only = effect_properties["template_only"].asBoolean(); + + std::string font_style = "NORMAL"; + if (!is_template_only) + { + font_style = "BOLD"; + } + + LLSD element; + element["id"] = effect_id; + + element["columns"][NAME_COLUMN]["column"] = "name"; + element["columns"][NAME_COLUMN]["value"] = effect_name; + element["columns"][NAME_COLUMN]["font"]["style"] = font_style; + + element["columns"][1]["column"] = "expires"; + if (!is_template_only) + { + element["columns"][DATE_COLUMN]["value"] = expiry_date; + element["columns"][DATE_COLUMN]["type"] = "date"; + } + else { + element["columns"][DATE_COLUMN]["value"] = getString("unsubscribed_voice_effect"); + } +// element["columns"][DATE_COLUMN]["font"]["style"] = "NORMAL"; + + LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); + // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( + if(sl_item) + { + LLFontGL::StyleFlags style = is_template_only ? LLFontGL::NORMAL : LLFontGL::BOLD; + dynamic_cast<LLScrollListText*>(sl_item->getColumn(0))->setFontStyle(style); + } + } + } + + // Re-select items that were selected before, and restore the scroll position + for(uuid_vec_t::iterator it = selected_items.begin(); it != selected_items.end(); it++) + { + mVoiceEffectList->selectByID(*it); + } + mVoiceEffectList->setScrollPos(scroll_pos); + mVoiceEffectList->setEnabled(true); +} + +void LLFloaterVoiceEffect::updateControls() +{ + bool recording = false; + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + recording = effect_interface->isPreviewRecording(); + } + + getChild<LLButton>("record_btn")->setVisible(!recording); + getChild<LLButton>("record_stop_btn")->setVisible(recording); +} + +// virtual +void LLFloaterVoiceEffect::onVoiceEffectChanged(bool effect_list_updated) +{ + if (effect_list_updated) + { + refreshEffectList(); + } + updateControls(); +} + +void LLFloaterVoiceEffect::onClickRecord() +{ + LL_DEBUGS("Voice") << "Record clicked" << LL_ENDL; + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->recordPreviewBuffer(); + } + updateControls(); +} + +void LLFloaterVoiceEffect::onClickPlay() +{ + LL_DEBUGS("Voice") << "Play clicked" << LL_ENDL; + if (!mVoiceEffectList) + { + return; + } + + const LLUUID& effect_id = mVoiceEffectList->getCurrentID(); + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->playPreviewBuffer(effect_id); + } + updateControls(); +} + +void LLFloaterVoiceEffect::onClickStop() +{ + LL_DEBUGS("Voice") << "Stop clicked" << LL_ENDL; + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->stopPreviewBuffer(); + } + updateControls(); +} + +//void LLFloaterVoiceEffect::onClickActivate() +//{ +// LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); +// if (effect_interface && mVoiceEffectList) +// { +// effect_interface->setVoiceEffect(mVoiceEffectList->getCurrentID()); +// } +//} + diff --git a/indra/newview/llfloatervoiceeffect.h b/indra/newview/llfloatervoiceeffect.h new file mode 100644 index 0000000000..fe207a05c3 --- /dev/null +++ b/indra/newview/llfloatervoiceeffect.h @@ -0,0 +1,78 @@ +/** + * @file llfloatervoiceeffect.h + * @author Aimee + * @brief Selection and preview of voice effects. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERVOICEEFFECT_H +#define LL_LLFLOATERVOICEEFFECT_H + +#include "llfloater.h" +#include "llvoiceclient.h" + +class LLButton; +class LLScrollListCtrl; + +class LLFloaterVoiceEffect + : public LLFloater + , public LLVoiceEffectObserver +{ +public: + LOG_CLASS(LLFloaterVoiceEffect); + + LLFloaterVoiceEffect(const LLSD& key); + virtual ~LLFloaterVoiceEffect(); + + virtual BOOL postBuild(); + virtual void onClose(bool app_quitting); + +private: + enum ColumnIndex + { + NAME_COLUMN = 0, + DATE_COLUMN = 1, + }; + + void refreshEffectList(); + void updateControls(); + + /// Called by voice effect provider when voice effect list is changed. + virtual void onVoiceEffectChanged(bool effect_list_updated); + + void onClickRecord(); + void onClickPlay(); + void onClickStop(); +// void onClickActivate(); + + LLUUID mSelectedID; + LLScrollListCtrl* mVoiceEffectList; +}; + +#endif diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index a87f7288fa..f241d18a21 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -88,6 +88,10 @@ const S32 MIN_ITEM_WIDTH_VISIBLE = LLFolderViewItem::ICON_WIDTH + /*first few characters*/ 40; const S32 MINIMUM_RENAMER_WIDTH = 80; +// *TODO: move in params in xml if necessary. Requires modification of LLFolderView & LLInventoryPanel Params. +const S32 STATUS_TEXT_HPAD = 6; +const S32 STATUS_TEXT_VPAD = 8; + enum { SIGNAL_NO_KEYBOARD_FOCUS = 1, SIGNAL_KEYBOARD_FOCUS = 2 @@ -181,6 +185,7 @@ LLFolderView::LLFolderView(const Params& p) mRenameItem( NULL ), mNeedsScroll( FALSE ), mEnableScroll( true ), + mUseLabelSuffix(p.use_label_suffix), mPinningSelectedItem(FALSE), mNeedsAutoSelect( FALSE ), mAutoSelectOverride(FALSE), @@ -246,6 +251,10 @@ LLFolderView::LLFolderView(const Params& p) text_p.font(font); text_p.visible(false); text_p.allow_html(true); + text_p.wrap(true); // allow multiline text. See EXT-7564, EXT-7047 + // set text padding the same as in People panel. EXT-7047, EXT-4837 + text_p.h_pad(STATUS_TEXT_HPAD); + text_p.v_pad(STATUS_TEXT_VPAD); mStatusTextBox = LLUICtrlFactory::create<LLTextBox> (text_p); mStatusTextBox->setFollowsLeft(); mStatusTextBox->setFollowsTop(); @@ -954,6 +963,23 @@ void LLFolderView::draw() mStatusTextBox->setValue(mStatusText); mStatusTextBox->setVisible( TRUE ); + // firstly reshape message textbox with current size. This is necessary to + // LLTextBox::getTextPixelHeight works properly + const LLRect local_rect = getLocalRect(); + mStatusTextBox->setShape(local_rect); + + // get preferable text height... + S32 pixel_height = mStatusTextBox->getTextPixelHeight(); + bool height_changed = local_rect.getHeight() != pixel_height; + if (height_changed) + { + // ... if it does not match current height, lets rearrange current view. + // This will indirectly call ::arrange and reshape of the status textbox. + // We should call this method to also notify parent about required rect. + // See EXT-7564, EXT-7047. + arrangeFromRoot(); + } + } LLFolderViewFolder::draw(); @@ -2310,7 +2336,7 @@ void LLFolderView::updateRenamerPosition() bool LLFolderView::selectFirstItem() { for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) + iter != mFolders.end();++iter) { LLFolderViewFolder* folder = (*iter ); if (folder->getVisible()) @@ -2347,7 +2373,7 @@ bool LLFolderView::selectLastItem() } } for (folders_t::reverse_iterator iter = mFolders.rbegin(); - iter != mFolders.rend();) + iter != mFolders.rend();++iter) { LLFolderViewFolder* folder = (*iter); if (folder->getVisible()) diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 8efd645521..e3af29a4aa 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -96,6 +96,7 @@ public: Mandatory<LLPanel*> parent_panel; Optional<LLUUID> task_id; Optional<std::string> title; + Optional<bool> use_label_suffix; }; LLFolderView(const Params&); virtual ~LLFolderView( void ); @@ -273,6 +274,7 @@ public: virtual S32 notify(const LLSD& info) ; void setEnableScroll(bool enable_scroll) { mEnableScroll = enable_scroll; } + bool useLabelSuffix() { return mUseLabelSuffix; } private: void updateRenamerPosition(); @@ -309,6 +311,7 @@ protected: BOOL mNeedsAutoSelect; BOOL mAutoSelectOverride; BOOL mNeedsAutoRename; + bool mUseLabelSuffix; BOOL mDebugFilters; U32 mSortOrder; diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h index 0e2185bde5..d672978f46 100644 --- a/indra/newview/llfoldervieweventlistener.h +++ b/indra/newview/llfoldervieweventlistener.h @@ -37,6 +37,7 @@ #include "llinventorytype.h" #include "llpermissionsflags.h" #include "llpointer.h" +#include "llwearabletype.h" class LLFolderViewItem; @@ -89,6 +90,7 @@ public: virtual BOOL hasChildren() const = 0; virtual LLInventoryType::EType getInventoryType() const = 0; virtual void performAction(LLInventoryModel* model, std::string action) = 0; + virtual LLWearableType::EType getWearableType() const = 0; // This method should be called when a drag begins. returns TRUE // if the drag can begin, otherwise FALSE. diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 54e9bd5383..50b35bfc69 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -96,6 +96,7 @@ void LLFolderViewItem::cleanupClass() LLFolderViewItem::Params::Params() : icon(), icon_open(), + icon_overlay(), root(), listener(), folder_arrow_image("folder_arrow_image"), @@ -133,6 +134,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mCreationDate(p.creation_date), mIcon(p.icon), mIconOpen(p.icon_open), + mIconOverlay(p.icon_overlay), mListener(p.listener), mHidden(false), mShowLoadStatus(false) @@ -287,8 +289,11 @@ void LLFolderViewItem::refreshFromListener() mCreationDate = mListener->getCreationDate(); dirtyFilter(); } - mLabelStyle = mListener->getLabelStyle(); - mLabelSuffix = mListener->getLabelSuffix(); + if (mRoot->useLabelSuffix()) + { + mLabelStyle = mListener->getLabelStyle(); + mLabelSuffix = mListener->getLabelSuffix(); + } } } @@ -617,6 +622,7 @@ const std::string& LLFolderViewItem::getSearchableLabel() const LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void) { + if (!getListener()) return NULL; return gInventory.getItem(getListener()->getUUID()); } @@ -948,7 +954,8 @@ void LLFolderViewItem::draw() mDragAndDropTarget = FALSE; } - + const LLViewerInventoryItem *item = getInventoryItem(); + const BOOL highlight_link = mIconOverlay && item && item->getIsLinkType(); //--------------------------------------------------------------------------------// // Draw open icon // @@ -962,6 +969,10 @@ void LLFolderViewItem::draw() mIcon->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); } + if (highlight_link) + { + mIconOverlay->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); + } //--------------------------------------------------------------------------------// // Exit if no label to draw @@ -972,8 +983,7 @@ void LLFolderViewItem::draw() } LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; - const LLViewerInventoryItem *item = getInventoryItem(); - if (item && item->getIsLinkType()) color = sLinkColor; + if (highlight_link) color = sLinkColor; if (in_library) color = sLibraryColor; F32 right_x = 0; diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 894b9df967..b0fbcfd138 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -97,6 +97,7 @@ public: { Optional<LLUIImage*> icon; Optional<LLUIImage*> icon_open; // used for folders + Optional<LLUIImage*> icon_overlay; // for links Optional<LLFolderView*> root; Optional<LLFolderViewEventListener*> listener; @@ -147,6 +148,7 @@ protected: LLUIImagePtr mIcon; std::string mStatusText; LLUIImagePtr mIconOpen; + LLUIImagePtr mIconOverlay; BOOL mHasVisibleChildren; S32 mIndentation; S32 mItemHeight; diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index aebf1b4c26..6470e9d6fe 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -300,15 +300,15 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im // compute id of possible IM session with agent that has "to_agent" id LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, to_agent); // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat. + LLSD args; + args["user_id"] = to_agent; if (im_session_id.notNull()) { - LLSD args; gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args); } // If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat. else if (LLIMModel::getInstance()->findIMSession(session_id)) { - LLSD args; gIMMgr->addSystemMessage(session_id, "inventory_item_offered", args); } // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 1c1d9343aa..38bb96fd6f 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -61,8 +61,14 @@ #include "llinventorymodel.h" #include "llrootview.h" #include "llspeakers.h" +#include "llsidetray.h" +static const S32 RECT_PADDING_NOT_INIT = -1; +static const S32 RECT_PADDING_NEED_RECALC = -2; + +S32 LLIMFloater::sAllowedRectRightPadding = RECT_PADDING_NOT_INIT; + LLIMFloater::LLIMFloater(const LLUUID& session_id) : LLTransientDockableFloater(NULL, true, session_id), mControlPanel(NULL), @@ -468,19 +474,44 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) return floater; } +//static +bool LLIMFloater::resetAllowedRectPadding(const LLSD& newvalue) +{ + //reset allowed rect right padding if "SidebarCameraMovement" option + //or sidebar state changed + sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC ; + return true; +} + void LLIMFloater::getAllowedRect(LLRect& rect) { + if (sAllowedRectRightPadding == RECT_PADDING_NOT_INIT) //wasn't initialized + { + gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLIMFloater::resetAllowedRectPadding, _2)); + + LLSideTray* side_bar = LLSideTray::getInstance(); + side_bar->getCollapseSignal().connect(boost::bind(&LLIMFloater::resetAllowedRectPadding, _2)); + sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC; + } + rect = gViewerWindow->getWorldViewRectScaled(); - static S32 right_padding = 0; - if (right_padding == 0) + if (sAllowedRectRightPadding == RECT_PADDING_NEED_RECALC) //recalc allowed rect right padding { LLPanel* side_bar_tabs = gViewerWindow->getRootView()->getChild<LLPanel> ( "side_bar_tabs"); - right_padding = side_bar_tabs->getRect().getWidth(); + sAllowedRectRightPadding = side_bar_tabs->getRect().getWidth(); LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs); + + if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE) + { + LLSideTray* side_bar = LLSideTray::getInstance(); + + if (side_bar->getVisible() && !side_bar->getCollapsed()) + sAllowedRectRightPadding += side_bar->getRect().getWidth(); + } } - rect.mRight -= right_padding; + rect.mRight -= sAllowedRectRightPadding; } void LLIMFloater::setDocked(bool docked, bool pop_on_undock) diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index addb218651..89f57aa8bb 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -162,6 +162,10 @@ private: static void closeHiddenIMToasts(); + static bool resetAllowedRectPadding(const LLSD& newvalue); + //need to keep this static for performance issues + static S32 sAllowedRectRightPadding; + static void confirmLeaveCallCallback(const LLSD& notification, const LLSD& response); LLPanelChatControlPanel* mControlPanel; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d0bb98fc8c..92227ec2b3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2358,12 +2358,20 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess } else // going to IM session { + message = LLTrans::getString(message_name + "-im"); + message.setArgs(args); if (hasSession(session_id)) { - message = LLTrans::getString(message_name + "-im"); - message.setArgs(args); gIMMgr->addMessage(session_id, LLUUID::null, SYSTEM_FROM, message.getString()); } + // log message to file + else + { + std::string session_name; + // since we select user to share item with - his name is already in cache + gCacheName->getFullName(args["user_id"], session_name); + LLIMModel::instance().logToFile(session_name, SYSTEM_FROM, LLUUID::null, message.getString()); + } } } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bad4697d17..1e0b90bb29 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -66,6 +66,7 @@ #include "llsidetray.h" #include "lltrans.h" #include "llviewerassettype.h" +#include "llviewerfoldertype.h" #include "llviewermenu.h" #include "llviewermessage.h" #include "llviewerobjectlist.h" @@ -104,7 +105,6 @@ void dec_busy_count() } // Function declarations -void wear_add_inventory_item_on_avatar(LLInventoryItem* item); void remove_inventory_category_from_avatar(LLInventoryCategory* category); void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id); bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*); @@ -1195,18 +1195,18 @@ void LLItemBridge::buildDisplayName(LLInventoryItem* item, std::string& name) LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const { U8 font = LLFontGL::NORMAL; + const LLViewerInventoryItem* item = getItem(); if (get_is_item_worn(mUUID)) { // llinfos << "BOLD" << llendl; font |= LLFontGL::BOLD; } - - const LLViewerInventoryItem* item = getItem(); - if (item && item->getIsLinkType()) + else if(item && item->getIsLinkType()) { font |= LLFontGL::ITALIC; } + return (LLFontGL::StyleFlags)font; } @@ -2210,13 +2210,7 @@ void LLFolderBridge::determineFolderType() BOOL LLFolderBridge::isItemRenameable() const { - LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)getCategory(); - if(cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) - && (cat->getOwnerID() == gAgent.getID())) - { - return TRUE; - } - return FALSE; + return get_is_category_renameable(getInventoryModel(), mUUID); } void LLFolderBridge::restoreItem() @@ -2257,58 +2251,14 @@ LLUIImagePtr LLFolderBridge::getIcon() const } // static -LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type, BOOL is_link) +LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type) { - // Bypassing LLViewerFolderType::lookup() since - // we aren't using different system folder icons - if (is_link) - { - if (preferred_type == LLFolderType::FT_OUTFIT) - return LLUI::getUIImage("Inv_LookFolderClosed_Link"); - else - return LLUI::getUIImage("Inv_FolderClosed_Link"); - } - - switch (preferred_type) - { - case LLFolderType::FT_OUTFIT: - return LLUI::getUIImage("Inv_LookFolderClosed"); - case LLFolderType::FT_LOST_AND_FOUND: - return LLUI::getUIImage("Inv_LostClosed"); - case LLFolderType::FT_TRASH: - return LLUI::getUIImage("Inv_TrashClosed"); - case LLFolderType::FT_NONE: - return LLUI::getUIImage("Inv_FolderClosed"); - default: - return LLUI::getUIImage("Inv_SysClosed"); - } + return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, FALSE)); } LLUIImagePtr LLFolderBridge::getOpenIcon() const { - // Bypassing LLViewerFolderType::lookup() since - // we aren't using different system folder icons - if (isLink()) - { - if (getPreferredType() == LLFolderType::FT_OUTFIT) - return LLUI::getUIImage("Inv_LookFolderOpen_Link"); - else - return LLUI::getUIImage("Inv_FolderOpen_Link"); - } - - switch (getPreferredType()) - { - case LLFolderType::FT_OUTFIT: - return LLUI::getUIImage("Inv_LookFolderOpen"); - case LLFolderType::FT_LOST_AND_FOUND: - return LLUI::getUIImage("Inv_LostOpen"); - case LLFolderType::FT_TRASH: - return LLUI::getUIImage("Inv_TrashOpen"); - case LLFolderType::FT_NONE: - return LLUI::getUIImage("Inv_FolderOpen"); - default: - return LLUI::getUIImage("Inv_SysOpen"); - } + return LLUI::getUIImage(LLViewerFolderType::lookupIconName(getPreferredType(), TRUE)); } @@ -2540,7 +2490,7 @@ void LLFolderBridge::folderOptionsMenu() mItems.push_back(std::string("Wear As Ensemble")); } mItems.push_back(std::string("Remove From Outfit")); - if (!areAnyContentsWorn(model)) + if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) { disabled_items.push_back(std::string("Remove From Outfit")); } @@ -2565,19 +2515,6 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv return ((item_array.count() > 0) ? TRUE : FALSE ); } -BOOL LLFolderBridge::areAnyContentsWorn(LLInventoryModel* model) const -{ - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t item_array; - LLFindWorn is_worn; - model->collectDescendentsIf(mUUID, - cat_array, - item_array, - LLInventoryModel::EXCLUDE_TRASH, - is_worn); - return (item_array.size() > 0); -} - // Flags unused void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { @@ -2632,9 +2569,9 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) mItems.push_back(std::string("New Clothes")); mItems.push_back(std::string("New Body Parts")); - // Changing folder types is just a debug feature; this is fairly unsupported +#if SUPPORT_ENSEMBLES + // Changing folder types is an unfinished unsupported feature // and can lead to unexpected behavior if enabled. -#if !LL_RELEASE_FOR_DOWNLOAD mItems.push_back(std::string("Change Type")); const LLViewerInventoryCategory *cat = getCategory(); if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType())) @@ -3178,7 +3115,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLUIImagePtr LLTextureBridge::getIcon() const { - return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType, mIsLink); + return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType); } void LLTextureBridge::openItem() @@ -3330,7 +3267,7 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, LLUIImagePtr LLLandmarkBridge::getIcon() const { - return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mIsLink, mVisited, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE); } void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -3529,7 +3466,7 @@ LLUIImagePtr LLCallingCardBridge::getIcon() const { online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); } - return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, mIsLink, online, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE); } std::string LLCallingCardBridge::getLabelSuffix() const @@ -3968,7 +3905,7 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, LLUIImagePtr LLObjectBridge::getIcon() const { - return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, mInvType, mIsLink, mAttachPt, mIsMultiObject); + return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, mInvType, mAttachPt, mIsMultiObject); } LLInventoryObject* LLObjectBridge::getObject() const @@ -4037,24 +3974,6 @@ void LLObjectBridge::openItem() get_is_item_worn(mUUID) ? "detach" : "attach"); } -LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const -{ - U8 font = LLFontGL::NORMAL; - - if(get_is_item_worn( mUUID ) ) - { - font |= LLFontGL::BOLD; - } - - LLInventoryItem* item = getItem(); - if (item && item->getIsLinkType()) - { - font |= LLFontGL::ITALIC; - } - - return (LLFontGL::StyleFlags)font; -} - std::string LLObjectBridge::getLabelSuffix() const { if (get_is_item_worn(mUUID)) @@ -4303,33 +4222,6 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, mInvType = inv_type; } -// *NOTE: hack to get from avatar inventory to avatar -void wear_inventory_item_on_avatar( LLInventoryItem* item ) -{ - if(item) - { - lldebugs << "wear_inventory_item_on_avatar( " << item->getName() - << " )" << llendl; - - LLAppearanceMgr::getInstance()->wearItemOnAvatar(item->getUUID(), true, false); - } -} - -void wear_add_inventory_item_on_avatar( LLInventoryItem* item ) -{ - if(item) - { - lldebugs << "wear_add_inventory_item_on_avatar( " << item->getName() - << " )" << llendl; - - LLWearableList::instance().getAsset(item->getAssetUUID(), - item->getName(), - item->getType(), - LLWearableBridge::onWearAddOnAvatarArrived, - new LLUUID(item->getUUID())); - } -} - void remove_inventory_category_from_avatar( LLInventoryCategory* category ) { if(!category) return; @@ -4480,7 +4372,7 @@ std::string LLWearableBridge::getLabelSuffix() const LLUIImagePtr LLWearableBridge::getIcon() const { - return LLInventoryIcon::getIcon(mAssetType, mInvType, mIsLink, mWearableType, FALSE); + return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, FALSE); } // virtual @@ -4599,6 +4491,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Wearable Wear")); items.push_back(std::string("Wearable Add")); disabled_items.push_back(std::string("Take Off")); + disabled_items.push_back(std::string("Wearable Edit")); } break; default: @@ -4645,21 +4538,7 @@ void LLWearableBridge::wearOnAvatar() LLViewerInventoryItem* item = getItem(); if(item) { - if(!isAgentInventory()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else - { - wear_inventory_item_on_avatar(item); - } + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, true); } } @@ -4676,21 +4555,7 @@ void LLWearableBridge::wearAddOnAvatar() LLViewerInventoryItem* item = getItem(); if(item) { - if(!isAgentInventory()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else - { - wear_add_inventory_item_on_avatar(item); - } + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, false); } } @@ -4933,7 +4798,7 @@ LLUIImagePtr LLLinkFolderBridge::getIcon() const } } } - return LLFolderBridge::getIcon(folder_type, TRUE); + return LLFolderBridge::getIcon(folder_type); } void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -5215,41 +5080,7 @@ class LLWearableBridgeAction: public LLInvFVBridgeAction public: virtual void doIt() { - if(isItemInTrash()) - { - LLNotificationsUtil::add("CannotWearTrash"); - } - else if(isAgentInventory()) - { - if(!get_is_item_worn(mUUID)) - { - wearOnAvatar(); - } - } - else - { - // must be in the inventory library. copy it to our inventory - // and put it on right away. - LLViewerInventoryItem* item = getItem(); - if(item && item->isFinished()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else if(item) - { - // *TODO: We should fetch the item details, and then do - // the operation above. - LLNotificationsUtil::add("CannotWearInfoNotComplete"); - } - } - LLInvFVBridgeAction::doIt(); + wearOnAvatar(); } virtual ~LLWearableBridgeAction(){} protected: @@ -5288,21 +5119,7 @@ void LLWearableBridgeAction::wearOnAvatar() LLViewerInventoryItem* item = getItem(); if(item) { - if(!isAgentInventory()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else - { - wear_inventory_item_on_avatar(item); - } + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, true); } } @@ -5363,12 +5180,12 @@ void LLRecentItemsFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) menuentry_vec_t disabled_items, items = getMenuItems(); - items.erase(std::find(items.begin(), items.end(), std::string("New Folder"))); - items.erase(std::find(items.begin(), items.end(), std::string("New Script"))); - items.erase(std::find(items.begin(), items.end(), std::string("New Note"))); - items.erase(std::find(items.begin(), items.end(), std::string("New Gesture"))); - items.erase(std::find(items.begin(), items.end(), std::string("New Clothes"))); - items.erase(std::find(items.begin(), items.end(), std::string("New Body Parts"))); + items.erase(std::remove(items.begin(), items.end(), std::string("New Body Parts")), items.end()); + items.erase(std::remove(items.begin(), items.end(), std::string("New Clothes")), items.end()); + items.erase(std::remove(items.begin(), items.end(), std::string("New Note")), items.end()); + items.erase(std::remove(items.begin(), items.end(), std::string("New Gesture")), items.end()); + items.erase(std::remove(items.begin(), items.end(), std::string("New Script")), items.end()); + items.erase(std::remove(items.begin(), items.end(), std::string("New Folder")), items.end()); hide_context_entries(menu, items, disabled_items); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 59c1f3d6fb..64d0f8d254 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -123,6 +123,7 @@ public: EDragAndDropType cargo_type, void* cargo_data) { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return mInvType; } + virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } //-------------------------------------------------------------------- // Convenience functions for adding various common menu options. @@ -245,7 +246,7 @@ public: virtual LLFolderType::EType getPreferredType() const; virtual LLUIImagePtr getIcon() const; virtual LLUIImagePtr getOpenIcon() const; - static LLUIImagePtr getIcon(LLFolderType::EType preferred_type, BOOL is_link = FALSE); + static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); virtual BOOL renameItem(const std::string& new_name); @@ -294,7 +295,6 @@ protected: static void createNewEyes(void* user_data); BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); - BOOL areAnyContentsWorn(LLInventoryModel* model) const; void modifyOutfit(BOOL append); void determineFolderType(); @@ -436,7 +436,6 @@ public: virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual LLFontGL::StyleFlags getLabelStyle() const; virtual std::string getLabelSuffix() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL renameItem(const std::string& new_name); @@ -472,6 +471,7 @@ public: virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual std::string getLabelSuffix() const; virtual BOOL renameItem(const std::string& new_name); + virtual LLWearableType::EType getWearableType() const { return mWearableType; } static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu static BOOL canWearOnAvatar( void* userdata ); @@ -592,8 +592,6 @@ public: U32 flags = 0x00) const; }; -void wear_inventory_item_on_avatar(LLInventoryItem* item); - void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index c90919e8fd..6e829f2dc2 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -49,6 +49,7 @@ LLInventoryFilter::FilterOps::FilterOps() : mFilterObjectTypes(0xffffffffffffffffULL), mFilterCategoryTypes(0xffffffffffffffffULL), + mFilterWearableTypes(0xffffffffffffffffULL), mMinDate(time_min()), mMaxDate(time_max()), mHoursAgo(0), @@ -139,8 +140,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con return FALSE; } } - // - //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -164,8 +163,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con if ((1LL << cat->getPreferredType() & mFilterOps.mFilterCategoryTypes) == U64(0)) return FALSE; } - // - //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -178,8 +175,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con if (object->getLinkedUUID() != mFilterOps.mFilterUUID) return FALSE; } - // - //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -201,8 +196,18 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con listener->getCreationDate() > mFilterOps.mMaxDate) return FALSE; } - // + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_WEARABLE + // Pass if this item is a wearable of the appropriate type + if (filterTypes & FILTERTYPE_WEARABLE) + { + LLWearableType::EType type = listener->getWearableType(); + if ((0x1LL << type & mFilterOps.mFilterWearableTypes) == 0) + { + return FALSE; + } + } return TRUE; } @@ -238,6 +243,8 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const BOOL LLInventoryFilter::isNotDefault() const { return mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes + || mFilterOps.mFilterCategoryTypes != mDefaultFilterOps.mFilterCategoryTypes + || mFilterOps.mFilterWearableTypes != mDefaultFilterOps.mFilterWearableTypes || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT || mFilterSubString.size() || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions @@ -249,6 +256,8 @@ BOOL LLInventoryFilter::isNotDefault() const BOOL LLInventoryFilter::isActive() const { return mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL + || mFilterOps.mFilterCategoryTypes != 0xffffffffffffffffULL + || mFilterOps.mFilterWearableTypes != 0xffffffffffffffffULL || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT || mFilterSubString.size() || mFilterOps.mPermissions != PERM_NONE @@ -322,7 +331,35 @@ void LLInventoryFilter::setFilterCategoryTypes(U64 types) setModified(FILTER_MORE_RESTRICTIVE); } } - mFilterOps.mFilterTypes |= FILTERTYPE_CATEGORY; + mFilterOps.mFilterTypes |= FILTERTYPE_OBJECT; +} + +void LLInventoryFilter::setFilterWearableTypes(U64 types) +{ + if (mFilterOps.mFilterWearableTypes != types) + { + // keep current items only if no type bits getting turned off + BOOL fewer_bits_set = (mFilterOps.mFilterWearableTypes & ~types); + BOOL more_bits_set = (~mFilterOps.mFilterWearableTypes & types); + + mFilterOps.mFilterWearableTypes = types; + if (more_bits_set && fewer_bits_set) + { + // neither less or more restrive, both simultaneously + // so we need to filter from scratch + setModified(FILTER_RESTART); + } + else if (more_bits_set) + { + // target is only one of all requested types so more type bits == less restrictive + setModified(FILTER_LESS_RESTRICTIVE); + } + else if (fewer_bits_set) + { + setModified(FILTER_MORE_RESTRICTIVE); + } + } + mFilterOps.mFilterTypes |= FILTERTYPE_WEARABLE; } void LLInventoryFilter::setFilterUUID(const LLUUID& object_id) diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 3ef51baefc..f740a6b333 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -59,10 +59,11 @@ public: enum EFilterType { FILTERTYPE_NONE = 0, - FILTERTYPE_OBJECT = 1, // normal default search-by-object-type - FILTERTYPE_CATEGORY = 2, // search by folder type - FILTERTYPE_UUID = 4, // find the object with UUID and any links to it - FILTERTYPE_DATE = 8 // search by date range + FILTERTYPE_OBJECT = 0x1 << 0, // normal default search-by-object-type + FILTERTYPE_CATEGORY = 0x1 << 1, // search by folder type + FILTERTYPE_UUID = 0x1 << 2, // find the object with UUID and any links to it + FILTERTYPE_DATE = 0x1 << 3, // search by date range + FILTERTYPE_WEARABLE = 0x1 << 4 // search by wearable type }; // REFACTOR: Change this to an enum. @@ -81,6 +82,7 @@ public: BOOL isFilterObjectTypesWith(LLInventoryType::EType t) const; void setFilterCategoryTypes(U64 types); void setFilterUUID(const LLUUID &object_id); + void setFilterWearableTypes(U64 types); void setFilterSubString(const std::string& string); const std::string& getFilterSubString(BOOL trim = FALSE) const; @@ -168,6 +170,7 @@ private: U32 mFilterTypes; U64 mFilterObjectTypes; // For _OBJECT + U64 mFilterWearableTypes; U64 mFilterCategoryTypes; // For _CATEGORY LLUUID mFilterUUID; // for UUID diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 817da34c61..37088064c6 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -52,6 +52,7 @@ #include "llappearancemgr.h" #include "llappviewer.h" //#include "llfirstuse.h" +#include "llfloaterinventory.h" #include "llfocusmgr.h" #include "llfolderview.h" #include "llgesturemgr.h" @@ -63,6 +64,7 @@ #include "llinventorypanel.h" #include "lllineeditor.h" #include "llmenugl.h" +#include "llpanelmaininventory.h" #include "llpreviewanim.h" #include "llpreviewgesture.h" #include "llpreviewnotecard.h" @@ -74,6 +76,7 @@ #include "llscrollcontainer.h" #include "llselectmgr.h" #include "llsidetray.h" +#include "llsidepanelinventory.h" #include "lltabcontainer.h" #include "lltooldraganddrop.h" #include "lluictrlfactory.h" @@ -185,8 +188,6 @@ void remove_category(LLInventoryModel* model, const LLUUID& cat_id) } } - // go ahead and do the normal remove if no 'last calling - // cards' are being removed. LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); if (cat) { @@ -311,6 +312,11 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) { + if (!model) + { + return FALSE; + } + LLViewerInventoryCategory* cat = model->getCategory(id); if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) && @@ -321,6 +327,11 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) return FALSE; } +void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id) +{ + LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", item_uuid).with("object", object_id)); +} + void show_item_profile(const LLUUID& item_uuid) { LLUUID linked_uuid = gInventory.getLinkedItemID(item_uuid); @@ -329,9 +340,59 @@ void show_item_profile(const LLUUID& item_uuid) void show_item_original(const LLUUID& item_uuid) { + //sidetray inventory panel + LLSidepanelInventory *sidepanel_inventory = + dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + + bool reset_inventory_filter = !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory"); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(); - if (!active_panel) return; + if (!active_panel) + { + //this may happen when there is no floatera and other panel is active in inventory tab + + if (sidepanel_inventory) + { + sidepanel_inventory->showInventoryPanel(); + } + } + + active_panel = LLInventoryPanel::getActiveInventoryPanel(); + if (!active_panel) + { + return; + } active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO); + + if(reset_inventory_filter) + { + //inventory floater + bool floater_inventory_visible = false; + + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) + { + LLFloaterInventory* floater_inventory = dynamic_cast<LLFloaterInventory*>(*iter); + if (floater_inventory) + { + LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel(); + + main_inventory->onFilterEdit(""); + } + + if(floater_inventory->getVisible()) + { + floater_inventory_visible = true; + } + + } + if(sidepanel_inventory && !floater_inventory_visible) + { + LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); + + main_inventory->onFilterEdit(""); + } + } } ///---------------------------------------------------------------------------- @@ -517,6 +578,31 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat, return FALSE; } +LLFindWearablesEx::LLFindWearablesEx(bool is_worn, bool include_body_parts) +: mIsWorn(is_worn) +, mIncludeBodyParts(include_body_parts) +{} + +bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); + if (!vitem) return false; + + // Skip non-wearables. + if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT) + { + return false; + } + + // Skip body parts if requested. + if (!mIncludeBodyParts && vitem->getType() == LLAssetType::AT_BODYPART) + { + return false; + } + + return (bool) get_is_item_worn(item->getUUID()) == mIsWorn; +} + bool LLFindWearablesOfType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (!item) return false; @@ -537,11 +623,6 @@ void LLFindWearablesOfType::setType(LLWearableType::EType type) mWearableType = type; } -bool LLFindWorn::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - return item && get_is_item_worn(item->getUUID()); -} - bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (item) diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 33b52cfd5e..6619a50d28 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -53,6 +53,7 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id); BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id); void show_item_profile(const LLUUID& item_uuid); +void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id); void show_item_original(const LLUUID& item_uuid); @@ -271,6 +272,32 @@ public: // // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLFindByMask : public LLInventoryCollectFunctor +{ +public: + LLFindByMask(U64 mask) + : mFilterMask(mask) + {} + + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if(item && (mFilterMask & (1LL << item->getInventoryType())) ) + { + return true; + } + + return false; + } + +private: + U64 mFilterMask; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFindNonLinksByMask +// +// +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLFindNonLinksByMask : public LLInventoryCollectFunctor { public: @@ -311,6 +338,21 @@ public: LLInventoryItem* item); }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFindWearablesEx +// +// Collects wearables based on given criteria. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLFindWearablesEx : public LLInventoryCollectFunctor +{ +public: + LLFindWearablesEx(bool is_worn, bool include_body_parts = true); + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); +private: + bool mIncludeBodyParts; + bool mIsWorn; +}; + //Inventory collect functor collecting wearables of a specific wearable type class LLFindWearablesOfType : public LLInventoryCollectFunctor { @@ -324,13 +366,17 @@ private: LLWearableType::EType mWearableType; }; -// Find worn items. -class LLFindWorn : public LLInventoryCollectFunctor +/** Filter out wearables-links */ +class LLFindActualWearablesOfType : public LLFindWearablesOfType { public: - LLFindWorn() {} - virtual ~LLFindWorn() {} - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); + LLFindActualWearablesOfType(LLWearableType::EType type) : LLFindWearablesOfType(type) {} + virtual ~LLFindActualWearablesOfType() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if (item && item->getIsLinkType()) return false; + return LLFindWearablesOfType::operator()(cat, item); + } }; // Collect non-removable folders and items. diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp index 2fb55f4c1f..3090371a73 100644 --- a/indra/newview/llinventoryicon.cpp +++ b/indra/newview/llinventoryicon.cpp @@ -40,13 +40,10 @@ struct IconEntry : public LLDictionaryEntry { - IconEntry(const std::string &item_name, - const std::string &link_name) + IconEntry(const std::string &item_name) : - LLDictionaryEntry(item_name), - mLinkName(link_name) + LLDictionaryEntry(item_name) {} - const std::string mLinkName; }; class LLIconDictionary : public LLSingleton<LLIconDictionary>, @@ -58,52 +55,51 @@ public: LLIconDictionary::LLIconDictionary() { - addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture", "Inv_Texture_Link")); - addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Texture", "Inv_Texture_Link")); - addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard", "Inv_CallingCard_Link")); - addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard", "Inv_CallingCard_Link")); - addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark", "Inv_Landmark_Link")); - addEntry(LLInventoryIcon::ICONNAME_LANDMARK_VISITED, new IconEntry("Inv_Landmark", "Inv_Landmark_Link")); - addEntry(LLInventoryIcon::ICONNAME_SCRIPT, new IconEntry("Inv_Script", "Inv_Script_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING, new IconEntry("Inv_Clothing", "Inv_Clothing_Link")); - addEntry(LLInventoryIcon::ICONNAME_OBJECT, new IconEntry("Inv_Object", "Inv_Object_Link")); - addEntry(LLInventoryIcon::ICONNAME_OBJECT_MULTI, new IconEntry("Inv_Object_Multi", "Inv_Object_Multi_Link")); - addEntry(LLInventoryIcon::ICONNAME_NOTECARD, new IconEntry("Inv_Notecard", "Inv_Notecard_Link")); - addEntry(LLInventoryIcon::ICONNAME_BODYPART, new IconEntry("Inv_Skin", "Inv_Skin_Link")); - addEntry(LLInventoryIcon::ICONNAME_SNAPSHOT, new IconEntry("Inv_Snapshot", "Inv_Snapshot_Link")); + addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture")); + addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Texture")); + addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard")); + addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard")); + addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark")); + addEntry(LLInventoryIcon::ICONNAME_LANDMARK_VISITED, new IconEntry("Inv_Landmark")); + addEntry(LLInventoryIcon::ICONNAME_SCRIPT, new IconEntry("Inv_Script")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING, new IconEntry("Inv_Clothing")); + addEntry(LLInventoryIcon::ICONNAME_OBJECT, new IconEntry("Inv_Object")); + addEntry(LLInventoryIcon::ICONNAME_OBJECT_MULTI, new IconEntry("Inv_Object_Multi")); + addEntry(LLInventoryIcon::ICONNAME_NOTECARD, new IconEntry("Inv_Notecard")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART, new IconEntry("Inv_Skin")); + addEntry(LLInventoryIcon::ICONNAME_SNAPSHOT, new IconEntry("Inv_Snapshot")); - addEntry(LLInventoryIcon::ICONNAME_BODYPART_SHAPE, new IconEntry("Inv_BodyShape", "Inv_BodyShape_Link")); - addEntry(LLInventoryIcon::ICONNAME_BODYPART_SKIN, new IconEntry("Inv_Skin", "Inv_Skin_Link")); - addEntry(LLInventoryIcon::ICONNAME_BODYPART_HAIR, new IconEntry("Inv_Hair", "Inv_Hair_Link")); - addEntry(LLInventoryIcon::ICONNAME_BODYPART_EYES, new IconEntry("Inv_Eye", "Inv_Eye_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_SHAPE, new IconEntry("Inv_BodyShape")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_SKIN, new IconEntry("Inv_Skin")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_HAIR, new IconEntry("Inv_Hair")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_EYES, new IconEntry("Inv_Eye")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, new IconEntry("Inv_Shirt", "Inv_Shirt_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PANTS, new IconEntry("Inv_Pants", "Inv_Pants_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHOES, new IconEntry("Inv_Shoe", "Inv_Shoe_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, new IconEntry("Inv_Socks", "Inv_Socks_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_JACKET, new IconEntry("Inv_Jacket", "Inv_Jacket_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, new IconEntry("Inv_Gloves", "Inv_Gloves_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("Inv_Undershirt", "Inv_Undershirt_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("Inv_Underpants", "Inv_Underpants_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt", "Inv_Skirt_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha", "Inv_Alpha_Link")); - addEntry(LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo", "Inv_Tattoo_Link")); - addEntry(LLInventoryIcon::ICONNAME_ANIMATION, new IconEntry("Inv_Animation", "Inv_Animation_Link")); - addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture", "Inv_Gesture_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, new IconEntry("Inv_Shirt")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PANTS, new IconEntry("Inv_Pants")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHOES, new IconEntry("Inv_Shoe")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, new IconEntry("Inv_Socks")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_JACKET, new IconEntry("Inv_Jacket")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, new IconEntry("Inv_Gloves")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("Inv_Undershirt")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("Inv_Underpants")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo")); + addEntry(LLInventoryIcon::ICONNAME_ANIMATION, new IconEntry("Inv_Animation")); + addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture")); - addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem", "Inv_LinkItem")); - addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkItem", "Inv_LinkItem")); + addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem")); + addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkItem")); - addEntry(LLInventoryIcon::ICONNAME_NONE, new IconEntry("NONE", "NONE")); + addEntry(LLInventoryIcon::ICONNAME_NONE, new IconEntry("NONE")); } LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type, - BOOL item_is_link, U32 misc_flag, BOOL item_is_multi) { - const std::string& icon_name = getIconName(asset_type, inventory_type, item_is_link, misc_flag, item_is_multi); + const std::string& icon_name = getIconName(asset_type, inventory_type, misc_flag, item_is_multi); return LLUI::getUIImage(icon_name); } @@ -114,7 +110,6 @@ LLUIImagePtr LLInventoryIcon::getIcon(EIconName idx) const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type, - BOOL item_is_link, U32 misc_flag, BOOL item_is_multi) { @@ -169,14 +164,13 @@ const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, break; } - return getIconName(idx, item_is_link); + return getIconName(idx); } -const std::string& LLInventoryIcon::getIconName(EIconName idx, BOOL item_is_link) +const std::string& LLInventoryIcon::getIconName(EIconName idx) { const IconEntry *entry = LLIconDictionary::instance().lookup(idx); - if (item_is_link) return entry->mLinkName; return entry->mName; } diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h index 4cb7a123c4..6e29012c4c 100644 --- a/indra/newview/llinventoryicon.h +++ b/indra/newview/llinventoryicon.h @@ -86,15 +86,12 @@ public: static const std::string& getIconName(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, - BOOL item_is_link = FALSE, U32 misc_flag = 0, // different meanings depending on item type BOOL item_is_multi = FALSE); - static const std::string& getIconName(EIconName idx, - BOOL item_is_link = FALSE); + static const std::string& getIconName(EIconName idx); static LLUIImagePtr getIcon(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, - BOOL item_is_link = FALSE, U32 misc_flag = 0, // different meanings depending on item type BOOL item_is_multi = FALSE); static LLUIImagePtr getIcon(EIconName idx); diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 750cdfb678..14de5442d6 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -70,16 +70,21 @@ void LLPanelInventoryListItemBase::draw() { if (getNeedsRefresh()) { - updateItem(); + if (mItem) + { + updateItem(mItem->getName()); + } setNeedsRefresh(false); } LLPanel::draw(); } -void LLPanelInventoryListItemBase::updateItem() +// virtual +void LLPanelInventoryListItemBase::updateItem(const std::string& name, + const LLStyle::Params& input_params) { setIconImage(mIconImage); - setTitle(mItem->getName(), mHighlightedText); + setTitle(name, mHighlightedText, input_params); } void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/) @@ -132,7 +137,11 @@ BOOL LLPanelInventoryListItemBase::postBuild() setIconCtrl(getChild<LLIconCtrl>("item_icon")); setTitleCtrl(getChild<LLTextBox>("item_name")); - mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getIsLinkType(), mItem->getFlags(), FALSE); + if (mItem) + { + mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getFlags(), FALSE); + updateItem(mItem->getName()); + } setNeedsRefresh(true); @@ -161,6 +170,42 @@ void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask) LLPanel::onMouseLeave(x, y, mask); } +const std::string& LLPanelInventoryListItemBase::getItemName() const +{ + if (!mItem) + { + return LLStringUtil::null; + } + return mItem->getName(); +} + +LLAssetType::EType LLPanelInventoryListItemBase::getType() const +{ + if (!mItem) + { + return LLAssetType::AT_NONE; + } + return mItem->getType(); +} + +LLWearableType::EType LLPanelInventoryListItemBase::getWearableType() const +{ + if (!mItem) + { + return LLWearableType::WT_NONE; + } + return mItem->getWearableType(); +} + +const std::string& LLPanelInventoryListItemBase::getDescription() const +{ + if (!mItem) + { + return LLStringUtil::null; + } + return mItem->getDescription(); +} + S32 LLPanelInventoryListItemBase::notify(const LLSD& info) { S32 rv = 0; @@ -168,7 +213,7 @@ S32 LLPanelInventoryListItemBase::notify(const LLSD& info) { mHighlightedText = info["match_filter"].asString(); - std::string test(mItem->getName()); + std::string test(mTitleCtrl->getText()); LLStringUtil::toUpper(test); if(mHighlightedText.empty() || std::string::npos != test.find(mHighlightedText)) @@ -242,15 +287,30 @@ void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image) } } -void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text) +void LLPanelInventoryListItemBase::setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params) { + mTitleCtrl->setToolTip(title); + LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, - LLStyle::Params(), + input_params, title, highlit_text); } +BOOL LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask) +{ + LLRect text_box_rect = mTitleCtrl->getRect(); + if (text_box_rect.pointInRect(x, y) && + mTitleCtrl->getTextPixelWidth() <= text_box_rect.getWidth()) + { + return FALSE; + } + return LLPanel::handleToolTip(x, y, mask); +} + void LLPanelInventoryListItemBase::reshapeLeftWidgets() { S32 widget_left = 0; diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index 03ad7c2184..5dc0bfe3de 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -122,16 +122,16 @@ public: /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); /** Get the name of a corresponding inventory item */ - const std::string& getItemName() const { return mItem->getName(); } + const std::string& getItemName() const; /** Get the asset type of a corresponding inventory item */ - LLAssetType::EType getType() const { return mItem->getType(); } + LLAssetType::EType getType() const; /** Get the wearable type of a corresponding inventory item */ - LLWearableType::EType getWearableType() const { return mItem->getWearableType(); } + LLWearableType::EType getWearableType() const; /** Get the description of a corresponding inventory item */ - const std::string& getDescription() const { return mItem->getDescription(); } + const std::string& getDescription() const; /** Get the associated inventory item */ LLViewerInventoryItem* getItem() const { return mItem; } @@ -152,7 +152,8 @@ protected: /** * Called after inventory item was updated, update panel widgets to reflect inventory changes. */ - virtual void updateItem(); + virtual void updateItem(const std::string& name, + const LLStyle::Params& input_params = LLStyle::Params()); /** setter for mIconCtrl */ void setIconCtrl(LLIconCtrl* icon) { mIconCtrl = icon; } @@ -177,7 +178,16 @@ protected: void setIconImage(const LLUIImagePtr& image); /** Set item title - inventory item name usually */ - void setTitle(const std::string& title, const std::string& highlit_text); + virtual void setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params = LLStyle::Params()); + + /** + * Show tool tip if item name text size > panel size + */ + virtual BOOL handleToolTip( S32 x, S32 y, MASK mask); + + LLViewerInventoryItem* mItem; private: @@ -193,7 +203,6 @@ private: /** reshape remaining widgets */ void reshapeMiddleWidgets(); - LLViewerInventoryItem* mItem; LLIconCtrl* mIconCtrl; LLTextBox* mTitleCtrl; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 06a688d115..b9e9f0fc0b 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -35,6 +35,7 @@ #include "llagent.h" #include "llagentwearables.h" +#include "llappearancemgr.h" #include "llinventorypanel.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -720,9 +721,20 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) // Valid UUID; set the item UUID and rename it new_item->setCreator(id); std::string avatar_name; - // Fetch the currect name - gCacheName->get(id, false, - boost::bind(&LLViewerInventoryItem::onCallingCardNameLookup, new_item.get(), _1, _2, _3)); + + if (gCacheName->getFullName(id, avatar_name)) + { + new_item->rename(avatar_name); + mask |= LLInventoryObserver::LABEL; + } + else + { + // Fetch the current name + gCacheName->get(id, FALSE, + boost::bind(&LLViewerInventoryItem::onCallingCardNameLookup, new_item.get(), + _1, _2, _3)); + } + } } else if (new_item->getType() == LLAssetType::AT_GESTURE) @@ -1250,12 +1262,6 @@ void LLInventoryModel::addCategory(LLViewerInventoryCategory* category) void LLInventoryModel::addItem(LLViewerInventoryItem* item) { - /* - const LLViewerInventoryCategory* cat = gInventory.getCategory(item->getParentUUID()); // Seraph remove for 2.1 - const std::string cat_name = cat ? cat->getName() : "CAT NOT FOUND"; // Seraph remove for 2.1 - llinfos << "Added item [ name:" << item->getName() << " UUID:" << item->getUUID() << " type:" << item->getActualType() << " ] to folder [ name:" << cat_name << " uuid:" << item->getParentUUID() << " ]" << llendl; // Seraph remove for 2.1 - */ - llassert(item); if(item) { @@ -2441,7 +2447,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) } LLUUID tid; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, tid); +#ifndef LL_RELEASE_FOR_DOWNLOAD llinfos << "Bulk inventory: " << tid << llendl; +#endif update_map_t update; cat_array_t folders; @@ -2562,7 +2570,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { LLViewerInventoryItem* wearable_item; wearable_item = gInventory.getItem(wearable_ids[i]); - wear_inventory_item_on_avatar(wearable_item); + LLAppearanceMgr::instance().wearItemOnAvatar(wearable_item->getUUID(), true, true); } } diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index b4f0947b2c..ce44e37017 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -33,15 +33,14 @@ #include "llviewerprecompiledheaders.h" #include "llinventorymodelbackgroundfetch.h" -// Seraph clean this up #include "llagent.h" +#include "llappviewer.h" +#include "llcallbacklist.h" #include "llinventorypanel.h" #include "llviewercontrol.h" #include "llviewermessage.h" -#include "llviewerwindow.h" -#include "llappviewer.h" #include "llviewerregion.h" -#include "llcallbacklist.h" +#include "llviewerwindow.h" const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f; const S32 MAX_FETCH_RETRIES = 10; @@ -63,47 +62,47 @@ LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() { } -bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() +bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() const { return mFetchQueue.empty() && mBulkFetchCount<=0; } -bool LLInventoryModelBackgroundFetch::libraryFetchStarted() +bool LLInventoryModelBackgroundFetch::libraryFetchStarted() const { return mRecursiveLibraryFetchStarted; } -bool LLInventoryModelBackgroundFetch::libraryFetchCompleted() +bool LLInventoryModelBackgroundFetch::libraryFetchCompleted() const { return libraryFetchStarted() && fetchQueueContainsNoDescendentsOf(gInventory.getLibraryRootFolderID()); } -bool LLInventoryModelBackgroundFetch::libraryFetchInProgress() +bool LLInventoryModelBackgroundFetch::libraryFetchInProgress() const { return libraryFetchStarted() && !libraryFetchCompleted(); } -bool LLInventoryModelBackgroundFetch::inventoryFetchStarted() +bool LLInventoryModelBackgroundFetch::inventoryFetchStarted() const { return mRecursiveInventoryFetchStarted; } -bool LLInventoryModelBackgroundFetch::inventoryFetchCompleted() +bool LLInventoryModelBackgroundFetch::inventoryFetchCompleted() const { return inventoryFetchStarted() && fetchQueueContainsNoDescendentsOf(gInventory.getRootFolderID()); } -bool LLInventoryModelBackgroundFetch::inventoryFetchInProgress() +bool LLInventoryModelBackgroundFetch::inventoryFetchInProgress() const { return inventoryFetchStarted() && !inventoryFetchCompleted(); } -bool LLInventoryModelBackgroundFetch::isEverythingFetched() +bool LLInventoryModelBackgroundFetch::isEverythingFetched() const { return mAllFoldersFetched; } -BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() +BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() const { return mBackgroundFetchActive; } @@ -132,7 +131,7 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive } else { - // specific folder requests go to front of queue + // Specific folder requests go to front of queue. if (mFetchQueue.empty() || mFetchQueue.front().mCatUUID != cat_id) { mFetchQueue.push_front(FetchQueueInfo(cat_id, recursive)); @@ -187,7 +186,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() { if (mBackgroundFetchActive && gAgent.getRegion()) { - //If we'll be using the capability, we'll be sending batches and the background thing isn't as important. + // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); if (!url.empty()) { @@ -195,8 +194,12 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() return; } - //DEPRECATED OLD CODE FOLLOWS. - // no more categories to fetch, stop fetch process +#if 1 + //-------------------------------------------------------------------------------- + // DEPRECATED OLD CODE + // + + // No more categories to fetch, stop fetch process. if (mFetchQueue.empty()) { llinfos << "Inventory fetch completed" << llendl; @@ -209,11 +212,11 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() F32 slow_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.5f); if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() > slow_fetch_time) { - // double timeouts on failure + // Double timeouts on failure. mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f); mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f); llinfos << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; - // fetch is no longer considered "timely" although we will wait for full time-out + // fetch is no longer considered "timely" although we will wait for full time-out. mTimelyFetchPending = FALSE; } @@ -226,14 +229,14 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if(gDisconnected) { - // just bail if we are disconnected. + // Just bail if we are disconnected. break; } const FetchQueueInfo info = mFetchQueue.front(); LLViewerInventoryCategory* cat = gInventory.getCategory(info.mCatUUID); - // category has been deleted, remove from queue. + // Category has been deleted, remove from queue. if (!cat) { mFetchQueue.pop_front(); @@ -243,8 +246,8 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) { - // category exists but has no children yet, fetch the descendants - // for now, just request every time and rely on retry timer to throttle + // Category exists but has no children yet, fetch the descendants + // for now, just request every time and rely on retry timer to throttle. if (cat->fetch()) { mFetchTimer.reset(); @@ -258,13 +261,13 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() break; } } - // do I have all my children? + // Do I have all my children? else if (gInventory.isCategoryComplete(info.mCatUUID)) { - // finished with this category, remove from queue + // Finished with this category, remove from queue. mFetchQueue.pop_front(); - // add all children to queue + // Add all children to queue. LLInventoryModel::cat_array_t* categories; LLInventoryModel::item_array_t* items; gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); @@ -275,10 +278,10 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); } - // we received a response in less than the fast time + // We received a response in less than the fast time. if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) { - // shrink timeouts based on success + // Shrink timeouts based on success. mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); //llinfos << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; @@ -289,8 +292,8 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) { - // received first packet, but our num descendants does not match db's num descendants - // so try again later + // Received first packet, but our num descendants does not match db's num descendants + // so try again later. mFetchQueue.pop_front(); if (mNumFetchRetries++ < MAX_FETCH_RETRIES) @@ -303,9 +306,14 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() break; } - // not enough time has elapsed to do a new fetch + // Not enough time has elapsed to do a new fetch break; } + + // + // DEPRECATED OLD CODE + //-------------------------------------------------------------------------------- +#endif } } @@ -333,10 +341,10 @@ protected: BOOL getIsRecursive(const LLUUID& cat_id) const; private: LLSD mRequestSD; - uuid_vec_t mRecursiveCatUUIDs; // Hack for storing away which cat fetches are recursive. + uuid_vec_t mRecursiveCatUUIDs; // hack for storing away which cat fetches are recursive }; -//If we get back a normal response, handle it here +// If we get back a normal response, handle it here. void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) { LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance(); @@ -428,7 +436,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) gInventory.updateItem(titem); } - // set version and descendentcount according to message. + // Set version and descendentcount according to message. LLViewerInventoryCategory* cat = gInventory.getCategory(parent_id); if(cat) { @@ -448,7 +456,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) { LLSD folder_sd = *folder_it; - //These folders failed on the dataserver. We probably don't want to retry them. + // These folders failed on the dataserver. We probably don't want to retry them. llinfos << "Folder " << folder_sd["folder_id"].asString() << "Error: " << folder_sd["error"].asString() << llendl; } @@ -465,7 +473,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) gInventory.notifyObservers("fetchDescendents"); } -//If we get back an error (not found, etc...), handle it here +// If we get back an error (not found, etc...), handle it here. void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::string& reason) { LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance(); @@ -475,7 +483,7 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str fetcher->incrBulkFetch(-1); - if (status==499) // Timed out. + if (status==499) // timed out { for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray(); folder_it != mRequestSD["folders"].endArray(); @@ -502,7 +510,8 @@ BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat return (std::find(mRecursiveCatUUIDs.begin(),mRecursiveCatUUIDs.end(), cat_id) != mRecursiveCatUUIDs.end()); } -//static Bundle up a bunch of requests to send all at once. +// Bundle up a bunch of requests to send all at once. +// static void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) { //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. @@ -521,7 +530,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) (mBulkFetchCount > max_concurrent_fetches) || (mFetchTimer.getElapsedTimeF32() < mMinTimeBetweenFetches)) { - return; // just bail if we are disconnected. + return; // just bail if we are disconnected } U32 folder_count=0; diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index c1e37eda8f..04f96586d7 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -33,39 +33,15 @@ #ifndef LL_LLINVENTORYMODELBACKGROUNDFETCH_H #define LL_LLINVENTORYMODELBACKGROUNDFETCH_H -// Seraph clean this up -#include "llassettype.h" -#include "llfoldertype.h" -#include "lldarray.h" -#include "llframetimer.h" -#include "llhttpclient.h" +#include "llsingleton.h" #include "lluuid.h" -#include "llpermissionsflags.h" -#include "llstring.h" -#include <map> -#include <set> -#include <string> -#include <vector> - -// Seraph clean this up -class LLInventoryObserver; -class LLInventoryObject; -class LLInventoryItem; -class LLInventoryCategory; -class LLViewerInventoryItem; -class LLViewerInventoryCategory; -class LLViewerInventoryItem; -class LLViewerInventoryCategory; -class LLMessageSystem; -class LLInventoryCollectFunctor; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryModelBackgroundFetch // -// This class handles background fetch. +// This class handles background fetches, which are fetches of +// inventory folder. Fetches can be recursive or not. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackgroundFetch> { friend class LLInventoryModelFetchDescendentsResponder; @@ -75,48 +51,37 @@ public: ~LLInventoryModelBackgroundFetch(); // Start and stop background breadth-first fetching of inventory contents. - // This gets triggered when performing a filter-search + // This gets triggered when performing a filter-search. void start(const LLUUID& cat_id = LLUUID::null, BOOL recursive = TRUE); - BOOL backgroundFetchActive(); - bool isEverythingFetched(); - void incrBulkFetch(S16 fetching); - void stopBackgroundFetch(); // stop fetch process - bool isBulkFetchProcessingComplete(); - // Add categories to a list to be fetched in bulk. - void bulkFetch(std::string url); + BOOL backgroundFetchActive() const; + bool isEverythingFetched() const; // completing the fetch once per session should be sufficient - bool libraryFetchStarted(); - bool libraryFetchCompleted(); - bool libraryFetchInProgress(); + bool libraryFetchStarted() const; + bool libraryFetchCompleted() const; + bool libraryFetchInProgress() const; - bool inventoryFetchStarted(); - bool inventoryFetchCompleted(); - bool inventoryFetchInProgress(); - void findLostItems(); + bool inventoryFetchStarted() const; + bool inventoryFetchCompleted() const; + bool inventoryFetchInProgress() const; - void setAllFoldersFetched(); + void findLostItems(); +protected: + void incrBulkFetch(S16 fetching); + bool isBulkFetchProcessingComplete() const; + void bulkFetch(std::string url); - static void backgroundFetchCB(void*); // background fetch idle function void backgroundFetch(); - - struct FetchQueueInfo - { - FetchQueueInfo(const LLUUID& id, BOOL recursive) : - mCatUUID(id), mRecursive(recursive) - { - } - LLUUID mCatUUID; - BOOL mRecursive; - }; -protected: + static void backgroundFetchCB(void*); // background fetch idle function + void stopBackgroundFetch(); // stop fetch process + + void setAllFoldersFetched(); bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const; private: BOOL mRecursiveInventoryFetchStarted; BOOL mRecursiveLibraryFetchStarted; BOOL mAllFoldersFetched; - // completing the fetch once per session should be sufficient BOOL mBackgroundFetchActive; S16 mBulkFetchCount; BOOL mTimelyFetchPending; @@ -126,6 +91,15 @@ private: F32 mMinTimeBetweenFetches; F32 mMaxTimeBetweenFetches; + struct FetchQueueInfo + { + FetchQueueInfo(const LLUUID& id, BOOL recursive) : + mCatUUID(id), mRecursive(recursive) + { + } + LLUUID mCatUUID; + BOOL mRecursive; + }; typedef std::deque<FetchQueueInfo> fetch_queue_t; fetch_queue_t mFetchQueue; }; diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index d2b402fe14..8cb263d9a7 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -62,13 +62,9 @@ #include "llsdutil.h" #include <deque> -// If the viewer gets a notification, your observer assumes -// that that notification is for itself and then tries to process -// the results. The notification could be for something else (e.g. -// you're fetching an item and a notification gets triggered because -// you renamed some other item). This counter is to specify how many -// notification to wait for before giving up. -static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 127; +const U32 LLInventoryFetchItemsObserver::MAX_NUM_ATTEMPTS_TO_PROCESS = 10; +const F32 LLInventoryFetchItemsObserver::FETCH_TIMER_EXPIRY = 10.0f; + LLInventoryObserver::LLInventoryObserver() { @@ -149,7 +145,7 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id) LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id) : LLInventoryFetchObserver(item_id), - mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS) + mNumTries(MAX_NUM_ATTEMPTS_TO_PROCESS) { mIDs.clear(); mIDs.push_back(item_id); @@ -158,35 +154,47 @@ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids) : LLInventoryFetchObserver(item_ids), - mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS) + mNumTries(MAX_NUM_ATTEMPTS_TO_PROCESS) { } void LLInventoryFetchItemsObserver::changed(U32 mask) { - BOOL any_items_missing = FALSE; - // scan through the incomplete items and move or erase them as // appropriate. if (!mIncomplete.empty()) { + // if period of an attempt expired... + if (mFetchingPeriod.hasExpired()) + { + // ...reset timer and reduce count of attempts + mFetchingPeriod.reset(); + mFetchingPeriod.setTimerExpirySec(FETCH_TIMER_EXPIRY); + + --mNumTries; + + LL_INFOS("InventoryFetch") << "LLInventoryFetchItemsObserver: " << this << ", attempt(s) left: " << (S32)mNumTries << LL_ENDL; + } + + // do we still have any attempts? + bool timeout_expired = mNumTries <= 0; + for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) { const LLUUID& item_id = (*it); LLViewerInventoryItem* item = gInventory.getItem(item_id); if (!item) { - any_items_missing = TRUE; - if (mNumTries > 0) + if (timeout_expired) { - // Keep trying. - ++it; + // Just concede that this item hasn't arrived in reasonable time and continue on. + LL_WARNS("InventoryFetch") << "Fetcher timed out when fetching inventory item UUID: " << item_id << LL_ENDL; + it = mIncomplete.erase(it); } else { - // Just concede that this item hasn't arrived in reasonable time and continue on. - llwarns << "Fetcher timed out when fetching inventory item assetID:" << item_id << llendl; - it = mIncomplete.erase(it); + // Keep trying. + ++it; } continue; } @@ -198,14 +206,10 @@ void LLInventoryFetchItemsObserver::changed(U32 mask) } ++it; } - if (any_items_missing) - { - mNumTries--; - } if (mIncomplete.empty()) { - mNumTries = MAX_NUM_NOTIFICATIONS_TO_PROCESS; + mNumTries = MAX_NUM_ATTEMPTS_TO_PROCESS; done(); } } @@ -304,7 +308,16 @@ void LLInventoryFetchItemsObserver::startFetch() // assume it's agent inventory. owner_id = gAgent.getID(); } - + + // Ignore categories since they're not items. We + // could also just add this to mComplete but not sure what the + // side-effects would be, so ignoring to be safe. + LLViewerInventoryCategory* cat = gInventory.getCategory(*it); + if (cat) + { + continue; + } + // It's incomplete, so put it on the incomplete container, and // pack this on the message. mIncomplete.push_back(*it); @@ -315,6 +328,10 @@ void LLInventoryFetchItemsObserver::startFetch() item_entry["item_id"] = (*it); items_llsd.append(item_entry); } + + mFetchingPeriod.resetWithExpiry(FETCH_TIMER_EXPIRY); + mNumTries = MAX_NUM_ATTEMPTS_TO_PROCESS; + fetch_items_from_llsd(items_llsd); } @@ -506,8 +523,14 @@ void LLInventoryAddItemByAssetObserver::changed(U32 mask) return; } - LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem; LLMessageSystem* msg = gMessageSystem; + if (!(msg->getMessageName() && (0 == strcmp(msg->getMessageName(), "UpdateCreateInventoryItem")))) + { + // this is not our message + return; // to prevent a crash. EXT-7921; + } + + LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem; S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData); for(S32 i = 0; i < num_blocks; ++i) { diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 6d5a86a6fc..72c13f55c6 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -110,6 +110,22 @@ public: /*virtual*/ void changed(U32 mask); private: S8 mNumTries; // Number of times changed() was called without success + LLFrameTimer mFetchingPeriod; + + /** + * If the viewer gets a notification, your observer assumes + * that that notification is for itself and then tries to process + * the results. The notification could be for something else (e.g. + * you're fetching an item and a notification gets triggered because + * you renamed some other item). This counter is to specify how many + * periods of time to wait for before giving up. + */ + static const U32 MAX_NUM_ATTEMPTS_TO_PROCESS; + + /** + * Period of waiting a notification when requested items get added into inventory. + */ + static const F32 FETCH_TIMER_EXPIRY; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index bb3f34dde2..72d35af3b7 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -87,6 +87,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mSortOrderSetting(p.sort_order_setting), mInventory(p.inventory), mAllowMultiSelect(p.allow_multi_select), + mShowItemLinkOverlays(p.show_item_link_overlays), mViewsInitialized(false), mStartFolderString(p.start_folder), mBuildDefaultHierarchy(true), @@ -109,7 +110,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : } } -BOOL LLInventoryPanel::postBuild() +void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) { LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD); @@ -127,6 +128,7 @@ BOOL LLInventoryPanel::postBuild() p.rect = folder_rect; p.parent_panel = this; p.tool_tip = p.name; + p.use_label_suffix = params.use_label_suffix; mFolderRoot = LLUICtrlFactory::create<LLFolderView>(p); mFolderRoot->setAllowMultiSelect(mAllowMultiSelect); } @@ -173,8 +175,6 @@ BOOL LLInventoryPanel::postBuild() setSortOrder(gSavedSettings.getU32(DEFAULT_SORT_ORDER)); } mFolderRoot->setSortOrder(getFilter()->getSortOrder()); - - return TRUE; } LLInventoryPanel::~LLInventoryPanel() @@ -188,6 +188,8 @@ LLInventoryPanel::~LLInventoryPanel() } } + gIdleCallbacks.deleteFunction(onIdle, this); + // LLView destructor will take care of the sub-views. mInventory->removeObserver(mInventoryObserver); delete mInventoryObserver; @@ -223,6 +225,11 @@ void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask) getFilter()->setFilterPermissions(filter_perm_mask); } +void LLInventoryPanel::setFilterWearableTypes(U64 types) +{ + getFilter()->setFilterWearableTypes(types); +} + void LLInventoryPanel::setFilterSubString(const std::string& string) { getFilter()->setFilterSubString(string); @@ -522,6 +529,10 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) params.name = new_listener->getDisplayName(); params.icon = new_listener->getIcon(); params.icon_open = new_listener->getOpenIcon(); + if (mShowItemLinkOverlays) // if false, then links show up just like normal items + { + params.icon_overlay = LLUI::getUIImage("Inv_Link"); + } params.root = mFolderRoot; params.listener = new_listener; params.tool_tip = params.name; @@ -560,6 +571,10 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) params.name = new_listener->getDisplayName(); params.icon = new_listener->getIcon(); params.icon_open = new_listener->getOpenIcon(); + if (mShowItemLinkOverlays) // if false, then links show up just like normal items + { + params.icon_overlay = LLUI::getUIImage("Inv_Link"); + } params.creation_date = new_listener->getCreationDate(); params.root = mFolderRoot; params.listener = new_listener; @@ -766,7 +781,6 @@ void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& it fv->startRenamingSelectedItem(); } } - // Seraph - Put determineFolderType in here for ensemble typing? } void LLInventoryPanel::doToSelected(const LLSD& userdata) diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 4373cedf66..84603e8b4f 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -84,15 +84,19 @@ public: Optional<std::string> sort_order_setting; Optional<LLInventoryModel*> inventory; Optional<bool> allow_multi_select; + Optional<bool> show_item_link_overlays; Optional<Filter> filter; Optional<std::string> start_folder; + Optional<bool> use_label_suffix; Params() : sort_order_setting("sort_order_setting"), inventory("", &gInventory), allow_multi_select("allow_multi_select", true), + show_item_link_overlays("show_item_link_overlays", false), filter("filter"), - start_folder("start_folder") + start_folder("start_folder"), + use_label_suffix("use_label_suffix", true) {} }; @@ -101,6 +105,7 @@ public: //-------------------------------------------------------------------- protected: LLInventoryPanel(const Params&); + void initFromParams(const Params&); friend class LLUICtrlFactory; public: virtual ~LLInventoryPanel(); @@ -108,8 +113,6 @@ public: public: LLInventoryModel* getModel() { return mInventory; } - BOOL postBuild(); - // LLView methods void draw(); BOOL handleHover(S32 x, S32 y, MASK mask); @@ -136,6 +139,7 @@ public: U32 getFilterObjectTypes() const { return mFolderRoot->getFilterObjectTypes(); } void setFilterPermMask(PermissionMask filter_perm_mask); U32 getFilterPermMask() const { return mFolderRoot->getFilterPermissions(); } + void setFilterWearableTypes(U64 filter); void setFilterSubString(const std::string& string); const std::string getFilterSubString() { return mFolderRoot->getFilterSubString(); } void setSinceLogoff(BOOL sl); @@ -177,6 +181,7 @@ protected: LLInventoryModel* mInventory; LLInventoryObserver* mInventoryObserver; BOOL mAllowMultiSelect; + BOOL mShowItemLinkOverlays; // Shows link graphic over inventory item icons LLFolderView* mFolderRoot; LLScrollContainer* mScroller; diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index 9e1dc3a4b0..c2a1923dfe 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -53,7 +53,6 @@ static LLDefaultChildRegistry::Register<LLJoystickAgentSlide> r1("joystick_slide"); static LLDefaultChildRegistry::Register<LLJoystickAgentTurn> r2("joystick_turn"); static LLDefaultChildRegistry::Register<LLJoystickCameraRotate> r3("joystick_rotate"); -static LLDefaultChildRegistry::Register<LLJoystickCameraZoom> r4("joystick_zoom"); static LLDefaultChildRegistry::Register<LLJoystickCameraTrack> r5("joystick_track"); @@ -647,155 +646,3 @@ void LLJoystickCameraTrack::onHeldDown() gAgentCamera.setPanDownKey(getOrbitRate()); } } - - - -//------------------------------------------------------------------------------- -// LLJoystickCameraZoom -//------------------------------------------------------------------------------- - -LLJoystickCameraZoom::LLJoystickCameraZoom(const LLJoystickCameraZoom::Params& p) -: LLJoystick(p), - mInTop( FALSE ), - mInBottom( FALSE ), - mPlusInImage(p.plus_image), - mMinusInImage(p.minus_image) -{ -} - -BOOL LLJoystickCameraZoom::handleMouseDown(S32 x, S32 y, MASK mask) -{ - BOOL handled = LLJoystick::handleMouseDown(x, y, mask); - - if( handled ) - { - if (mFirstMouse.mY > getRect().getHeight() / 2) - { - mInitialQuadrant = JQ_UP; - } - else - { - mInitialQuadrant = JQ_DOWN; - } - } - return handled; -} - - -void LLJoystickCameraZoom::onHeldDown() -{ - updateSlop(); - - const F32 FAST_RATE = 2.5f; // two and a half times the normal rate - - S32 dy = mLastMouse.mY - mFirstMouse.mY + mInitialOffset.mY; - - if (dy > mVertSlopFar) - { - // Zoom in fast - gAgentCamera.unlockView(); - gAgentCamera.setOrbitInKey(FAST_RATE); - } - else if (dy > mVertSlopNear) - { - // Zoom in slow - gAgentCamera.unlockView(); - gAgentCamera.setOrbitInKey(getOrbitRate()); - } - else if (dy < -mVertSlopFar) - { - // Zoom out fast - gAgentCamera.unlockView(); - gAgentCamera.setOrbitOutKey(FAST_RATE); - } - else if (dy < -mVertSlopNear) - { - // Zoom out slow - gAgentCamera.unlockView(); - gAgentCamera.setOrbitOutKey(getOrbitRate()); - } -} - -// Only used for drawing -void LLJoystickCameraZoom::setToggleState( BOOL top, BOOL bottom ) -{ - mInTop = top; - mInBottom = bottom; -} - -void LLJoystickCameraZoom::draw() -{ - if( mInTop ) - { - mPlusInImage->draw(0,0); - } - else - if( mInBottom ) - { - mMinusInImage->draw(0,0); - } - else - { - getImageUnselected()->draw( 0, 0 ); - } -} - -void LLJoystickCameraZoom::updateSlop() -{ - mVertSlopNear = getRect().getHeight() / 4; - mVertSlopFar = getRect().getHeight() / 2; - - mHorizSlopNear = getRect().getWidth() / 4; - mHorizSlopFar = getRect().getWidth() / 2; - - // Compute initial mouse offset based on initial quadrant. - // Place the mouse evenly between the near and far zones. - switch (mInitialQuadrant) - { - case JQ_ORIGIN: - mInitialOffset.set(0, 0); - break; - - case JQ_UP: - mInitialOffset.mX = 0; - mInitialOffset.mY = (mVertSlopNear + mVertSlopFar) / 2; - break; - - case JQ_DOWN: - mInitialOffset.mX = 0; - mInitialOffset.mY = - (mVertSlopNear + mVertSlopFar) / 2; - break; - - case JQ_LEFT: - mInitialOffset.mX = - (mHorizSlopNear + mHorizSlopFar) / 2; - mInitialOffset.mY = 0; - break; - - case JQ_RIGHT: - mInitialOffset.mX = (mHorizSlopNear + mHorizSlopFar) / 2; - mInitialOffset.mY = 0; - break; - - default: - llerrs << "LLJoystick::LLJoystick() - bad switch case" << llendl; - break; - } - - return; -} - - -F32 LLJoystickCameraZoom::getOrbitRate() -{ - F32 time = getElapsedHeldDownTime(); - if( time < NUDGE_TIME ) - { - F32 rate = ORBIT_NUDGE_RATE + time * (1 - ORBIT_NUDGE_RATE)/ NUDGE_TIME; -// llinfos << "rate " << rate << " time " << time << llendl; - return rate; - } - else - { - return 1; - } -} diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index 2b071a8999..1dd30036ab 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -183,44 +183,4 @@ public: virtual void onHeldDown(); }; - -// Zoom the camera in and out -class LLJoystickCameraZoom -: public LLJoystick -{ -public: - struct Params - : public LLInitParam::Block<Params, LLJoystick::Params> - { - Optional<LLUIImage*> plus_image; - Optional<LLUIImage*> minus_image; - - Params() - : plus_image ("plus_image", NULL), - minus_image ("minus_image", NULL) - { - held_down_delay.seconds(0.0); - } - }; - LLJoystickCameraZoom(const Params&); - - virtual void setToggleState( BOOL top, BOOL bottom ); - - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual void onHeldDown(); - virtual void draw(); - -protected: - virtual void updateSlop(); - F32 getOrbitRate(); - -protected: - BOOL mInTop; - BOOL mInBottom; - LLUIImagePtr mPlusInImage; - LLUIImagePtr mMinusInImage; -}; - - - #endif // LL_LLJOYSTICKBUTTON_H diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index a2450fcdd2..3d15f8288f 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -75,7 +75,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) // public void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, - BOOL enabled, std::string& suffix) + BOOL enabled, const std::string& suffix) { //llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl; @@ -271,7 +271,7 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p LLScrollListItem* LLNameListCtrl::addNameItemRow( const LLNameListCtrl::NameItem& name_item, EAddPosition pos, - std::string& suffix) + const std::string& suffix) { LLUUID id = name_item.value().asUUID(); LLNameListItem* item = NULL; diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 54237f4305..64f595968c 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -92,11 +92,11 @@ public: // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. void addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, - BOOL enabled = TRUE, std::string& suffix = LLStringUtil::null); + BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null); void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); - LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, std::string& suffix = LLStringUtil::null); + LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null); // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e5548007bd..fce666c9d4 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -48,6 +48,7 @@ #include "lllandmarkactions.h" #include "lllocationhistory.h" #include "lllocationinputctrl.h" +#include "llpaneltopinfobar.h" #include "llteleporthistory.h" #include "llsearchcombobox.h" #include "llsidetray.h" @@ -714,6 +715,7 @@ void LLNavigationBar::onNavigationButtonHeldUp(LLButton* nav_button) void LLNavigationBar::handleLoginComplete() { LLTeleportHistory::getInstance()->handleLoginComplete(); + LLPanelTopInfoBar::instance().handleLoginComplete(); mCmbLocation->handleLoginComplete(); } diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 631d1fcac7..525c648555 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -49,7 +49,6 @@ #include "llchannelmanager.h" #include "llagent.h" // gAgent -#include "llfloaterscriptdebug.h" #include "llchathistory.h" #include "llstylemap.h" @@ -157,25 +156,6 @@ std::string appendTime() void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) { - if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) - { - if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) - return; - if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) - { - - LLColor4 txt_color; - - LLViewerChat::getChatColor(chat,txt_color); - - LLFloaterScriptDebug::addScriptLine(chat.mText, - chat.mFromName, - txt_color, - chat.mFromID); - return; - } - } - LLChat& tmp_chat = const_cast<LLChat&>(chat); if(tmp_chat.mTimeStr.empty()) diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 46f531fdd9..a300e15edd 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -433,7 +433,6 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask ) { BOOL handled = FALSE; - // ALT-RETURN is reserved for windowed/fullscreen toggle if( KEY_RETURN == key && mask == MASK_CONTROL) { // shout diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 9824517ed1..1fadb126e4 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -32,10 +32,12 @@ #include "llviewerprecompiledheaders.h" +#include "llagentdata.h" // for gAgentID #include "llnearbychathandler.h" #include "llbottomtray.h" #include "llchatitemscontainerctrl.h" +#include "llfloaterscriptdebug.h" #include "llnearbychat.h" #include "llrecentpeople.h" @@ -287,7 +289,7 @@ void LLNearbyChatScreenChannel::showToastsBottom() toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); - bottom += toast_rect.getHeight() + margin; + bottom += toast_rect.getHeight() - toast->getTopPad() + margin; } // use reverse order to provide correct z-order and avoid toast blinking @@ -358,6 +360,36 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) // tmp_chat.mFromName = tmp_chat.mFromID.asString(); } + + // don't show toast and add message to chat history on receive debug message + // with disabled setting showing script errors or enabled setting to show script + // errors in separate window. + if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) + { + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + + // don't process debug messages from not owned objects, see EXT-7762 + if (gAgentID != chat_msg.mOwnerID) + { + return; + } + + if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) + { + + LLColor4 txt_color; + + LLViewerChat::getChatColor(chat_msg,txt_color); + + LLFloaterScriptDebug::addScriptLine(chat_msg.mText, + chat_msg.mFromName, + txt_color, + chat_msg.mFromID); + return; + } + } + nearby_chat->addMessage(chat_msg, true, args); if( nearby_chat->getVisible() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index df6f04b6ea..a06a5770a2 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -106,11 +106,16 @@ bool LLTipHandler::processNotification(const LLSD& notify) } } + std::string session_name = notification->getPayload()["SESSION_NAME"]; const std::string name = notification->getSubstitutions()["NAME"]; + if (session_name.empty()) + { + session_name = name; + } LLUUID from_id = notification->getPayload()["from_id"]; if (LLHandlerUtil::canLogToIM(notification)) { - LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, name, name, + LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name, notification->getMessage(), from_id, from_id); } diff --git a/indra/newview/lloutfitobserver.cpp b/indra/newview/lloutfitobserver.cpp new file mode 100644 index 0000000000..03414b9964 --- /dev/null +++ b/indra/newview/lloutfitobserver.cpp @@ -0,0 +1,147 @@ +/** + * @file lloutfitobserver.cpp + * @brief Outfit observer facade. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llappearancemgr.h" +#include "lloutfitobserver.h" +#include "llinventorymodel.h" +#include "llviewerinventory.h" + +LLOutfitObserver::LLOutfitObserver() : + mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN) +{ + gInventory.addObserver(this); +} + +LLOutfitObserver::~LLOutfitObserver() +{ + if (gInventory.containsObserver(this)) + { + gInventory.removeObserver(this); + } +} + +void LLOutfitObserver::changed(U32 mask) +{ + if (!gInventory.isInventoryUsable()) + return; + + checkCOF(); + + checkBaseOutfit(); +} + +// static +S32 LLOutfitObserver::getCategoryVersion(const LLUUID& cat_id) +{ + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (!cat) + return LLViewerInventoryCategory::VERSION_UNKNOWN; + + return cat->getVersion(); +} + +// static +const std::string& LLOutfitObserver::getCategoryName(const LLUUID& cat_id) +{ + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (!cat) + return LLStringUtil::null; + + return cat->getName(); +} + +bool LLOutfitObserver::checkCOF() +{ + LLUUID cof = LLAppearanceMgr::getInstance()->getCOF(); + if (cof.isNull()) + return false; + + S32 cof_version = getCategoryVersion(cof); + + if (cof_version == mCOFLastVersion) + return false; + + mCOFLastVersion = cof_version; + + // dirtiness state should be updated before sending signal + LLAppearanceMgr::getInstance()->updateIsDirty(); + mCOFChanged(); + + return true; +} + +void LLOutfitObserver::checkBaseOutfit() +{ + LLUUID baseoutfit_id = + LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); + + if (baseoutfit_id == mBaseOutfitId) + { + if (baseoutfit_id.isNull()) + return; + + const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id); + const std::string& baseoutfit_name = getCategoryName(baseoutfit_id); + + if (baseoutfit_ver == mBaseOutfitLastVersion + // renaming category doesn't change version, so it's need to check it + && baseoutfit_name == mLastBaseOutfitName) + return; + } + else + { + mBaseOutfitId = baseoutfit_id; + mBOFReplaced(); + + if (baseoutfit_id.isNull()) + return; + } + + mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId); + mLastBaseOutfitName = getCategoryName(baseoutfit_id); + + LLAppearanceMgr& app_mgr = LLAppearanceMgr::instance(); + // dirtiness state should be updated before sending signal + app_mgr.updateIsDirty(); + mBOFChanged(); + + if (mLastOutfitDirtiness != app_mgr.isOutfitDirty()) + { + if(!app_mgr.isOutfitDirty()) + { + mCOFSaved(); + } + mLastOutfitDirtiness = app_mgr.isOutfitDirty(); + } +} diff --git a/indra/newview/lloutfitobserver.h b/indra/newview/lloutfitobserver.h new file mode 100644 index 0000000000..3a66b5ea9f --- /dev/null +++ b/indra/newview/lloutfitobserver.h @@ -0,0 +1,99 @@ +/** + * @file lloutfitobserver.h + * @brief Outfit observer facade. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_OUTFITOBSERVER_H +#define LL_OUTFITOBSERVER_H + +#include "llsingleton.h" + +/** + * Outfit observer facade that provides simple possibility to subscribe on + * BOF(base outfit) replaced, BOF changed, COF(current outfit) changed events. + */ +class LLOutfitObserver: public LLInventoryObserver, public LLSingleton<LLOutfitObserver> +{ +public: + virtual ~LLOutfitObserver(); + + friend class LLSingleton<LLOutfitObserver>; + + virtual void changed(U32 mask); + + void notifyOutfitLockChanged() { mOutfitLockChanged(); } + + typedef boost::signals2::signal<void (void)> signal_t; + + void addBOFReplacedCallback(const signal_t::slot_type& cb) { mBOFReplaced.connect(cb); } + + void addBOFChangedCallback(const signal_t::slot_type& cb) { mBOFChanged.connect(cb); } + + void addCOFChangedCallback(const signal_t::slot_type& cb) { mCOFChanged.connect(cb); } + + void addCOFSavedCallback(const signal_t::slot_type& cb) { mCOFSaved.connect(cb); } + + void addOutfitLockChangedCallback(const signal_t::slot_type& cb) { mOutfitLockChanged.connect(cb); } + +protected: + LLOutfitObserver(); + + /** Get a version of an inventory category specified by its UUID */ + static S32 getCategoryVersion(const LLUUID& cat_id); + + static const std::string& getCategoryName(const LLUUID& cat_id); + + bool checkCOF(); + + void checkBaseOutfit(); + + //last version number of a COF category + S32 mCOFLastVersion; + + LLUUID mBaseOutfitId; + + S32 mBaseOutfitLastVersion; + std::string mLastBaseOutfitName; + + bool mLastOutfitDirtiness; + +private: + signal_t mBOFReplaced; + signal_t mBOFChanged; + signal_t mCOFChanged; + signal_t mCOFSaved; + + /** + * Signal for changing state of outfit lock. + */ + signal_t mOutfitLockChanged; +}; + +#endif /* LL_OUTFITOBSERVER_H */ diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 77db280487..c5043e1c3d 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -44,6 +44,7 @@ #include "llinventorymodel.h" #include "lllistcontextmenu.h" #include "llnotificationsutil.h" +#include "lloutfitobserver.h" #include "llsidetray.h" #include "lltransutil.h" #include "llviewermenu.h" @@ -53,6 +54,20 @@ static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y); +static const LLOutfitTabNameComparator OUTFIT_TAB_NAME_COMPARATOR; + +/*virtual*/ +bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const +{ + std::string name1 = tab1->getTitle(); + std::string name2 = tab2->getTitle(); + + LLStringUtil::toUpper(name1); + LLStringUtil::toUpper(name2); + + return name1 < name2; +} + ////////////////////////////////////////////////////////////////////////// class OutfitContextMenu : public LLListContextMenu @@ -75,35 +90,43 @@ protected: registrar.add("Outfit.Delete", boost::bind(deleteOutfit, selected_id)); enable_registrar.add("Outfit.OnEnable", boost::bind(&OutfitContextMenu::onEnable, this, _2)); + enable_registrar.add("Outfit.OnVisible", boost::bind(&OutfitContextMenu::onVisible, this, _2)); return createFromFile("menu_outfit_tab.xml"); } - bool onEnable(const LLSD& data) + bool onEnable(LLSD::String param) { - std::string param = data.asString(); LLUUID outfit_cat_id = mUUIDs.back(); - bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id; - if ("wear_replace" == param) + if ("rename" == param) { - return !is_worn; + return get_is_category_renameable(&gInventory, outfit_cat_id); } else if ("wear_add" == param) { - return !is_worn; + return LLAppearanceMgr::getCanAddToCOF(outfit_cat_id); } else if ("take_off" == param) { - return is_worn; + return LLAppearanceMgr::getCanRemoveFromCOF(outfit_cat_id); } - else if ("edit" == param) + + return true; + } + + bool onVisible(LLSD::String param) + { + LLUUID outfit_cat_id = mUUIDs.back(); + bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id; + + if ("edit" == param) { return is_worn; } - else if ("rename" == param) + else if ("wear_replace" == param) { - return get_is_category_renameable(&gInventory, outfit_cat_id); + return !is_worn; } else if ("delete" == param) { @@ -138,6 +161,7 @@ LLOutfitsList::LLOutfitsList() , mAccordion(NULL) , mListCommands(NULL) , mIsInitialized(false) + , mItemSelected(false) { mCategoriesObserver = new LLInventoryCategoriesObserver(); @@ -158,6 +182,7 @@ LLOutfitsList::~LLOutfitsList() BOOL LLOutfitsList::postBuild() { mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); + mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR); return TRUE; } @@ -184,12 +209,21 @@ void LLOutfitsList::onOpen(const LLSD& /*info*/) mCategoriesObserver->addCategory(outfits, boost::bind(&LLOutfitsList::refreshList, this, outfits)); + const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); + + // Start observing changes in Current Outfit category. + mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this)); + + LLOutfitObserver::instance().addBOFChangedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this)); + LLOutfitObserver::instance().addBOFReplacedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this)); + // Fetch "My Outfits" contents and refresh the list to display // initially fetched items. If not all items are fetched now // the observer will refresh the list as soon as the new items // arrive. category->fetch(); refreshList(outfits); + highlightBaseOutfit(); mIsInitialized = true; } @@ -251,9 +285,6 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) tab->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onAccordionTabRightClick, this, _1, _2, _3, cat_id)); - tab->setDoubleClickCallback(boost::bind(&LLOutfitsList::onAccordionTabDoubleClick, this, - _1, _2, _3, cat_id)); - // Setting tab focus callback to monitor currently selected outfit. tab->setFocusReceivedCallback(boost::bind(&LLOutfitsList::changeOutfitSelection, this, list, cat_id)); @@ -301,19 +332,13 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) // 1. Remove outfit category from observer to stop monitoring its changes. mCategoriesObserver->removeCategory(outfit_id); - // 2. Remove selected lists map entry. - mSelectedListsMap.erase(outfit_id); + // 2. Remove the outfit from selection. + deselectOutfit(outfit_id); - // 3. Reset currently selected outfit id if it is being removed. - if (outfit_id == mSelectedOutfitUUID) - { - mSelectedOutfitUUID = LLUUID(); - } - - // 4. Remove category UUID to accordion tab mapping. + // 3. Remove category UUID to accordion tab mapping. mOutfitsMap.erase(outfits_iter); - // 5. Remove outfit tab from accordion. + // 4. Remove outfit tab from accordion. mAccordion->removeCollapsibleCtrl(tab); } } @@ -328,7 +353,26 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) updateOutfitTab(*items_iter); } - mAccordion->arrange(); + mAccordion->sort(); +} + +void LLOutfitsList::highlightBaseOutfit() +{ + // id of base outfit + LLUUID base_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); + if (base_id != mHighlightedOutfitUUID) + { + if (mOutfitsMap[mHighlightedOutfitUUID]) + { + mOutfitsMap[mHighlightedOutfitUUID]->setTitleFontStyle("NORMAL"); + } + + mHighlightedOutfitUUID = base_id; + } + if (mOutfitsMap[base_id]) + { + mOutfitsMap[base_id]->setTitleFontStyle("BOLD"); + } } void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl) @@ -370,6 +414,16 @@ void LLOutfitsList::setFilterSubString(const std::string& string) mFilterSubString = string; } +boost::signals2::connection LLOutfitsList::addSelectionChangeCallback(selection_change_callback_t cb) +{ + return mSelectionChangeSignal.connect(cb); +} + +bool LLOutfitsList::hasItemSelected() +{ + return mItemSelected; +} + ////////////////////////////////////////////////////////////////////////// // Private methods ////////////////////////////////////////////////////////////////////////// @@ -455,8 +509,36 @@ void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUI mSelectedListsMap.clear(); } + mItemSelected = list && (list->getSelectedItem() != NULL); + mSelectedListsMap.insert(wearables_lists_map_value_t(category_id, list)); - mSelectedOutfitUUID = category_id; + setSelectedOutfitUUID(category_id); +} + +void LLOutfitsList::setSelectedOutfitUUID(const LLUUID& category_id) +{ + mSelectionChangeSignal(mSelectedOutfitUUID = category_id); +} + +void LLOutfitsList::deselectOutfit(const LLUUID& category_id) +{ + // Remove selected lists map entry. + mSelectedListsMap.erase(category_id); + + // Reset selection if the outfit is selected. + if (category_id == mSelectedOutfitUUID) + { + setSelectedOutfitUUID(LLUUID::null); + } +} + +void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id) +{ + // Try restoring outfit selection after filtering. + if (mAccordion->getSelectedTab() == tab) + { + setSelectedOutfitUUID(category_id); + } } void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) @@ -475,31 +557,14 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); if (list != ctrl) continue; - std::string title = tab->getTitle(); - LLStringUtil::toUpper(title); - - std::string cur_filter = mFilterSubString; - LLStringUtil::toUpper(cur_filter); - - if (std::string::npos == title.find(cur_filter)) - { - // hide tab if its title doesn't pass filter - // and it has no visible items - tab->setVisible(list->size() != 0); - - // remove title highlighting because it might - // have been previously highlighted by less restrictive filter - tab->setTitle(tab->getTitle()); - } - else - { - tab->setTitle(tab->getTitle(), cur_filter); - } + applyFilterToTab(iter->first, tab, mFilterSubString); } } void LLOutfitsList::applyFilter(const std::string& new_filter_substring) { + mAccordion->setFilterSubString(new_filter_substring); + for (outfits_map_t::iterator iter = mOutfitsMap.begin(), iter_end = mOutfitsMap.end(); @@ -531,26 +596,7 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring) if (!new_filter_substring.empty()) { - std::string title = tab->getTitle(); - LLStringUtil::toUpper(title); - - std::string cur_filter = new_filter_substring; - LLStringUtil::toUpper(cur_filter); - - if (std::string::npos == title.find(cur_filter)) - { - // hide tab if its title doesn't pass filter - // and it has no visible items - tab->setVisible(list->size() != 0); - - // remove title highlighting because it might - // have been previously highlighted by less restrictive filter - tab->setTitle(tab->getTitle()); - } - else - { - tab->setTitle(tab->getTitle(), cur_filter); - } + applyFilterToTab(iter->first, tab, new_filter_substring); if (tab->getVisible()) { @@ -571,10 +617,50 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring) //restore accordion state after all those accodrion tab manipulations tab->notifyChildren(LLSD().with("action","restore_state")); + + // Try restoring the tab selection. + restoreOutfitSelection(tab, iter->first); } } } +void LLOutfitsList::applyFilterToTab( + const LLUUID& category_id, + LLAccordionCtrlTab* tab, + const std::string& filter_substring) +{ + if (!tab) return; + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); + if (!list) return; + + std::string title = tab->getTitle(); + LLStringUtil::toUpper(title); + + std::string cur_filter = filter_substring; + LLStringUtil::toUpper(cur_filter); + + tab->setTitle(tab->getTitle(), cur_filter); + + if (std::string::npos == title.find(cur_filter)) + { + // hide tab if its title doesn't pass filter + // and it has no visible items + tab->setVisible(list->size() > 0); + + // remove title highlighting because it might + // have been previously highlighted by less restrictive filter + tab->setTitle(tab->getTitle()); + + // Remove the tab from selection. + deselectOutfit(category_id); + } + else + { + // Try restoring the tab selection. + restoreOutfitSelection(tab, category_id); + } +} + void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) { LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); @@ -593,18 +679,6 @@ void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const } } -void LLOutfitsList::onAccordionTabDoubleClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) -{ - LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); - if(is_tab_header_clicked(tab, y) && cat_id.notNull()) - { - LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - if (!cat) return; - - LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, FALSE ); - } -} - void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y) { LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl); @@ -628,6 +702,43 @@ void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y) LLWearableItemsList::ContextMenu::instance().show(list, selected_uuids, x, y); } +void LLOutfitsList::onCOFChanged() +{ + LLInventoryModel::changed_items_t changed_linked_items; + + const LLInventoryModel::changed_items_t& changed_items = gInventory.getChangedIDs(); + for (LLInventoryModel::changed_items_t::const_iterator iter = changed_items.begin(); + iter != changed_items.end(); + ++iter) + { + LLViewerInventoryItem* item = gInventory.getItem(*iter); + if (item) + { + // From gInventory we get the UUIDs of new links added to COF + // or removed from COF. These links UUIDs are not the same UUIDs + // that we have in each wearable items list. So we collect base items + // UUIDs to find all items or links that point to same base items in wearable + // items lists and update their worn state there. + changed_linked_items.insert(item->getLinkedUUID()); + } + } + + for (outfits_map_t::iterator iter = mOutfitsMap.begin(); + iter != mOutfitsMap.end(); + ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if (!tab) continue; + + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); + if (!list) continue; + + // Every list updates the labels of changed items or + // the links that point to these items. + list->updateChangedItems(changed_linked_items); + } +} + bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y) { if(!tab || !tab->getHeaderVisible()) return false; diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 44f6ec908b..df65f7187b 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -32,18 +32,34 @@ #ifndef LL_LLOUTFITSLIST_H #define LL_LLOUTFITSLIST_H +#include "llaccordionctrl.h" #include "llpanel.h" // newview #include "llinventorymodel.h" #include "llinventoryobserver.h" -class LLAccordionCtrl; class LLAccordionCtrlTab; class LLWearableItemsList; class LLListContextMenu; /** + * @class LLOutfitTabNameComparator + * + * Comparator of outfit tabs. + */ +class LLOutfitTabNameComparator : public LLAccordionCtrl::LLTabComparator +{ + LOG_CLASS(LLOutfitTabNameComparator); + +public: + LLOutfitTabNameComparator() {}; + virtual ~LLOutfitTabNameComparator() {}; + + /*virtual*/ bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const; +}; + +/** * @class LLOutfitsList * * A list of agents's outfits from "My Outfits" inventory category @@ -55,6 +71,9 @@ class LLListContextMenu; class LLOutfitsList : public LLPanel { public: + typedef boost::function<void (const LLUUID&)> selection_change_callback_t; + typedef boost::signals2::signal<void (const LLUUID&)> selection_change_signal_t; + LLOutfitsList(); virtual ~LLOutfitsList(); @@ -64,12 +83,22 @@ public: void refreshList(const LLUUID& category_id); + // highlits currently worn outfit tab text and unhighlights previously worn + void highlightBaseOutfit(); + void performAction(std::string action); void setFilterSubString(const std::string& string); const LLUUID& getSelectedOutfitUUID() const { return mSelectedOutfitUUID; } + boost::signals2::connection addSelectionChangeCallback(selection_change_callback_t cb); + + /** + * Returns true if there is a selection inside currently selected outfit + */ + bool hasItemSelected(); + private: /** * Reads xml with accordion tab and Flat list from xml file. @@ -94,6 +123,23 @@ private: void changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id); /** + * Saves newly selected outfit ID. + */ + void setSelectedOutfitUUID(const LLUUID& category_id); + + /** + * Removes the outfit from selection. + */ + void deselectOutfit(const LLUUID& category_id); + + /** + * Try restoring selection for a temporary hidden tab. + * + * A tab may be hidden if it doesn't match current filter. + */ + void restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id); + + /** * Called upon list refresh event to update tab visibility depending on * the results of applying filter to the title and list items of the tab. */ @@ -104,9 +150,16 @@ private: */ void applyFilter(const std::string& new_filter_substring); + /** + * Applies filter to the given tab + * + * @see applyFilter() + */ + void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring); + void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id); - void onAccordionTabDoubleClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id); void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y); + void onCOFChanged(); void onSelectionChange(LLUICtrl* ctrl); @@ -122,6 +175,9 @@ private: wearables_lists_map_t mSelectedListsMap; LLUUID mSelectedOutfitUUID; + // id of currently highlited outfit + LLUUID mHighlightedOutfitUUID; + selection_change_signal_t mSelectionChangeSignal; std::string mFilterSubString; @@ -132,6 +188,10 @@ private: LLListContextMenu* mOutfitMenu; bool mIsInitialized; + /** + * True if there is a selection inside currently selected outfit + */ + bool mItemSelected; }; #endif //LL_LLOUTFITSLIST_H diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 36f2d05fab..4402b2130f 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -51,6 +51,7 @@ #include "llagentwearables.h" #include "llscrollingpanelparam.h" #include "llradiogroup.h" +#include "llnotificationsutil.h" #include "llcolorswatch.h" #include "lltexturectrl.h" @@ -60,6 +61,9 @@ #include "llagentcamera.h" #include "llmorphview.h" +#include "llcommandhandler.h" +#include "lltextutil.h" + // register panel with appropriate XML static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable"); @@ -520,7 +524,8 @@ static void init_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, co LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName); if (color_swatch_ctrl) { - color_swatch_ctrl->setOriginal(self->getWearable()->getClothesColor(entry->mTextureIndex)); + // Can't get the color from the wearable here, since the wearable may not be set when this is called. + color_swatch_ctrl->setOriginal(LLColor4::white); } } @@ -606,6 +611,36 @@ LLPanelEditWearable::~LLPanelEditWearable() } +bool LLPanelEditWearable::changeHeightUnits(const LLSD& new_value) +{ + updateMetricLayout( new_value.asBoolean() ); + updateTypeSpecificControls(LLWearableType::WT_SHAPE); + return true; +} + +void LLPanelEditWearable::updateMetricLayout(BOOL new_value) +{ + LLUIString current_metric, replacment_metric; + current_metric = new_value ? mMeters : mFeet; + replacment_metric = new_value ? mFeet : mMeters; + mHeigthValue.setArg( "[METRIC1]", current_metric.getString() ); + mReplacementMetricUrl.setArg( "[URL_METRIC2]", std::string("[secondlife:///app/metricsystem ") + replacment_metric.getString() + std::string("]")); +} + +void LLPanelEditWearable::updateAvatarHeightLabel() +{ + mTxtAvatarHeight->setText(LLStringUtil::null); + LLStyle::Params param; + param.color = mAvatarHeigthLabelColor; + mTxtAvatarHeight->appendText(mHeigth, false, param); + param.color = mAvatarHeigthValueLabelColor; + mTxtAvatarHeight->appendText(mHeigthValue, false, param); + param.color = mAvatarHeigthLabelColor; // using mAvatarHeigthLabelColor for '/' separator + mTxtAvatarHeight->appendText(" / ", false, param); + mTxtAvatarHeight->appendText(this->mReplacementMetricUrl, false, param); +} + + // virtual BOOL LLPanelEditWearable::postBuild() { @@ -617,12 +652,13 @@ BOOL LLPanelEditWearable::postBuild() // handled at appearance panel level? //mBtnBack->setClickedCallback(boost::bind(&LLPanelEditWearable::onBackButtonClicked, this)); - mTextEditor = getChild<LLTextEditor>("description"); + mNameEditor = getChild<LLLineEditor>("description"); mPanelTitle = getChild<LLTextBox>("edit_wearable_title"); mDescTitle = getChild<LLTextBox>("description_text"); getChild<LLRadioGroup>("sex_radio")->setCommitCallback(boost::bind(&LLPanelEditWearable::onCommitSexChange, this)); + getChild<LLButton>("save_as_button")->setCommitCallback(boost::bind(&LLPanelEditWearable::onSaveAsButtonClicked, this)); // The following panels will be shown/hidden based on what wearable we're editing // body parts @@ -654,6 +690,63 @@ BOOL LLPanelEditWearable::postBuild() configureAlphaCheckbox(LLVOAvatarDefines::TEX_EYES_ALPHA, "eye alpha texture invisible"); configureAlphaCheckbox(LLVOAvatarDefines::TEX_HAIR_ALPHA, "hair alpha texture invisible"); + // configure tab expanded callbacks + for (U32 type_index = 0; type_index < (U32)LLWearableType::WT_COUNT; ++type_index) + { + LLWearableType::EType type = (LLWearableType::EType) type_index; + const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); + if (!wearable_entry) + { + llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; + continue; + } + U8 num_subparts = wearable_entry->mSubparts.size(); + + for (U8 index = 0; index < num_subparts; ++index) + { + // dive into data structures to get the panel we need + ESubpart subpart_e = wearable_entry->mSubparts[index]; + const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); + + if (!subpart_entry) + { + llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + continue; + } + + const std::string accordion_tab = subpart_entry->mAccordionTab; + + LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab); + + if (!tab) + { + llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; + continue; + } + + // initialize callback to ensure camera view changes appropriately. + tab->setDropDownStateChangedCallback(boost::bind(&LLPanelEditWearable::onTabExpandedCollapsed,this,_2,index)); + } + + // initialize texture and color picker controls + for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); + for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); + } + + // init all strings + mMeters = mPanelShape->getString("meters"); + mFeet = mPanelShape->getString("feet"); + mHeigth = mPanelShape->getString("height") + " "; + mHeigthValue = "[HEIGHT] [METRIC1]"; + mReplacementMetricUrl = "[URL_METRIC2]"; + + std::string color = mPanelShape->getString("heigth_label_color"); + mAvatarHeigthLabelColor = LLUIColorTable::instance().getColor(color, LLColor4::green); + color = mPanelShape->getString("heigth_value_label_color"); + mAvatarHeigthValueLabelColor = LLUIColorTable::instance().getColor(color, LLColor4::green); + gSavedSettings.getControl("HeightUnits")->getSignal()->connect(boost::bind(&LLPanelEditWearable::changeHeightUnits, this, _2)); + updateMetricLayout(gSavedSettings.getBOOL("HeightUnits")); + return TRUE; } @@ -665,7 +758,7 @@ BOOL LLPanelEditWearable::isDirty() const if (mWearablePtr) { if (mWearablePtr->isDirty() || - mWearablePtr->getName().compare(mTextEditor->getText()) != 0) + mWearablePtr->getName().compare(mNameEditor->getText()) != 0) { isDirty = TRUE; } @@ -690,10 +783,9 @@ void LLPanelEditWearable::setWearable(LLWearable *wearable) showWearable(mWearablePtr, FALSE); mWearablePtr = wearable; showWearable(mWearablePtr, TRUE); - - initializePanel(); } + //static void LLPanelEditWearable::onRevertButtonClicked(void* userdata) { @@ -701,6 +793,28 @@ void LLPanelEditWearable::onRevertButtonClicked(void* userdata) panel->revertChanges(); } +void LLPanelEditWearable::onSaveAsButtonClicked() +{ + LLSD args; + args["DESC"] = mNameEditor->getText(); + + LLNotificationsUtil::add("SaveWearableAs", args, LLSD(), boost::bind(&LLPanelEditWearable::saveAsCallback, this, _1, _2)); +} + +void LLPanelEditWearable::saveAsCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option) + { + std::string wearable_name = response["message"].asString(); + LLStringUtil::trim(wearable_name); + if( !wearable_name.empty() ) + { + mNameEditor->setText(wearable_name); + saveChanges(); + } + } +} void LLPanelEditWearable::onCommitSexChange() { @@ -842,10 +956,10 @@ void LLPanelEditWearable::saveChanges() U32 index = gAgentWearables.getWearableIndex(mWearablePtr); - if (mWearablePtr->getName().compare(mTextEditor->getText()) != 0) + if (mWearablePtr->getName().compare(mNameEditor->getText()) != 0) { // the name of the wearable has changed, re-save wearable with new name - gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, mTextEditor->getText(), FALSE); + gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, mNameEditor->getText(), FALSE); } else { @@ -862,7 +976,7 @@ void LLPanelEditWearable::revertChanges() } mWearablePtr->revertValues(); - mTextEditor->setText(mWearablePtr->getName()); + mNameEditor->setText(mWearablePtr->getName()); } void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) @@ -880,29 +994,89 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) std::string title; std::string description_title; - const LLEditWearableDictionary::WearableEntry *entry = LLEditWearableDictionary::getInstance()->getWearable(type); - if (!entry) + const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); + if (!wearable_entry) { llwarns << "called LLPanelEditWearable::showWearable with an invalid wearable type! (" << type << ")" << llendl; return; } targetPanel = getPanel(type); - title = getString(entry->mTitle); - description_title = getString(entry->mDescTitle); + title = getString(wearable_entry->mTitle); + description_title = getString(wearable_entry->mDescTitle); + + // Update picker controls state + for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); + for_each_picker_ctrl_entry <LLTextureCtrl> (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2)); targetPanel->setVisible(show); + toggleTypeSpecificControls(type); + if (show) { mPanelTitle->setText(title); mDescTitle->setText(description_title); - } + + // set name + mNameEditor->setText(wearable->getName()); - // Update picker controls state - for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); - for_each_picker_ctrl_entry <LLTextureCtrl> (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2)); + updatePanelPickerControls(type); + updateTypeSpecificControls(type); - showDefaultSubpart(); + // clear and rebuild visual param list + U8 num_subparts = wearable_entry->mSubparts.size(); + + for (U8 index = 0; index < num_subparts; ++index) + { + // dive into data structures to get the panel we need + ESubpart subpart_e = wearable_entry->mSubparts[index]; + const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); + + if (!subpart_entry) + { + llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + continue; + } + + const std::string scrolling_panel = subpart_entry->mParamList; + const std::string accordion_tab = subpart_entry->mAccordionTab; + + LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel); + LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab); + + if (!panel_list) + { + llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl; + continue; + } + + if (!tab) + { + llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; + continue; + } + + // what edit group do we want to extract params for? + const std::string edit_group = subpart_entry->mEditGroup; + + // storage for ordered list of visual params + value_map_t sorted_params; + getSortedParams(sorted_params, edit_group); + + LLJoint* jointp = gAgentAvatarp->getJoint( subpart_entry->mTargetJoint ); + if (!jointp) + { + jointp = gAgentAvatarp->getJoint("mHead"); + } + + buildParamList(panel_list, sorted_params, tab, jointp); + + updateScrollingPanelUI(); + } + showDefaultSubpart(); + + updateVerbs(); + } } void LLPanelEditWearable::showDefaultSubpart() @@ -967,91 +1141,6 @@ void LLPanelEditWearable::updateScrollingPanelList() updateScrollingPanelUI(); } -void LLPanelEditWearable::initializePanel() -{ - if (!mWearablePtr) - { - // cannot initialize with a null reference. - return; - } - - LLWearableType::EType type = mWearablePtr->getType(); - - // set name - mTextEditor->setText(mWearablePtr->getName()); - - // toggle wearable type-specific controls - toggleTypeSpecificControls(type); - - // clear and rebuild visual param list - const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); - if (!wearable_entry) - { - llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; - return; - } - U8 num_subparts = wearable_entry->mSubparts.size(); - - for (U8 index = 0; index < num_subparts; ++index) - { - // dive into data structures to get the panel we need - ESubpart subpart_e = wearable_entry->mSubparts[index]; - const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); - - if (!subpart_entry) - { - llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; - continue; - } - - const std::string scrolling_panel = subpart_entry->mParamList; - const std::string accordion_tab = subpart_entry->mAccordionTab; - - LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel); - LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab); - - if (!panel_list) - { - llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl; - continue; - } - - if (!tab) - { - llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; - continue; - } - - // what edit group do we want to extract params for? - const std::string edit_group = subpart_entry->mEditGroup; - - // initialize callback to ensure camera view changes appropriately. - tab->setDropDownStateChangedCallback(boost::bind(&LLPanelEditWearable::onTabExpandedCollapsed,this,_2,index)); - - // storage for ordered list of visual params - value_map_t sorted_params; - getSortedParams(sorted_params, edit_group); - - buildParamList(panel_list, sorted_params, tab); - - updateScrollingPanelUI(); - } - - // initialize texture and color picker controls - for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); - for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); - - showDefaultSubpart(); - updateVerbs(); - - if (getWearable()) - { - LLWearableType::EType type = getWearable()->getType(); - updatePanelPickerControls(type); - updateTypeSpecificControls(type); - } -} - void LLPanelEditWearable::toggleTypeSpecificControls(LLWearableType::EType type) { // Toggle controls specific to shape editing panel. @@ -1065,12 +1154,22 @@ void LLPanelEditWearable::toggleTypeSpecificControls(LLWearableType::EType type) void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type) { + const F32 ONE_METER = 1.0; + const F32 ONE_FOOT = 0.3048 * ONE_METER; // in meters // Update controls specific to shape editing panel. if (type == LLWearableType::WT_SHAPE) { // Update avatar height - std::string avatar_height_str = llformat("%.2f", gAgentAvatarp->mBodySize.mV[VZ]); - mTxtAvatarHeight->setTextArg("[HEIGHT]", avatar_height_str); + F32 new_size = gAgentAvatarp->mBodySize.mV[VZ]; + if (gSavedSettings.getBOOL("HeightUnits") == FALSE) + { + // convert meters to feet + new_size = new_size / ONE_FOOT; + } + + std::string avatar_height_str = llformat("%.2f", new_size); + mHeigthValue.setArg("[HEIGHT]", avatar_height_str); + updateAvatarHeightLabel(); } if (LLWearableType::WT_ALPHA == type) @@ -1217,7 +1316,7 @@ void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std: } } -void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab) +void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab, LLJoint* jointp) { // sorted_params is sorted according to magnitude of effect from // least to greatest. Adding to the front of the child list @@ -1231,7 +1330,7 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value { LLPanel::Params p; p.name("LLScrollingPanelParam"); - LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable()); + LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable(), jointp); height = panel_list->addPanel( panel_param ); } } @@ -1339,4 +1438,21 @@ void LLPanelEditWearable::initPreviousAlphaTextureEntry(LLVOAvatarDefines::EText } } +// handle secondlife:///app/metricsystem +class LLMetricSystemHandler : public LLCommandHandler +{ +public: + LLMetricSystemHandler() : LLCommandHandler("metricsystem", UNTRUSTED_THROTTLE) { } + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + // change height units TRUE for meters and FALSE for feet + BOOL new_value = (gSavedSettings.getBOOL("HeightUnits") == FALSE) ? TRUE : FALSE; + gSavedSettings.setBOOL("HeightUnits", new_value); + return true; + } +}; + +LLMetricSystemHandler gMetricSystemHandler; + // EOF diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index b6b8c0c781..61441435cd 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -41,13 +41,14 @@ class LLCheckBoxCtrl; class LLWearable; -class LLTextEditor; class LLTextBox; class LLViewerInventoryItem; class LLViewerVisualParam; class LLVisualParamHint; class LLViewerJointMesh; class LLAccordionCtrlTab; +class LLJoint; +class LLLineEditor; class LLPanelEditWearable : public LLPanel { @@ -72,17 +73,18 @@ public: static void onRevertButtonClicked(void* userdata); void onCommitSexChange(); + void onSaveAsButtonClicked(); + void saveAsCallback(const LLSD& notification, const LLSD& response); private: typedef std::map<F32, LLViewerVisualParam*> value_map_t; void showWearable(LLWearable* wearable, BOOL show); - void initializePanel(); void updateScrollingPanelUI(); LLPanel* getPanel(LLWearableType::EType type); void getSortedParams(value_map_t &sorted_params, const std::string &edit_group); - void buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab); + void buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab, LLJoint* jointp); // update bottom bar buttons ("Save", "Revert", etc) void updateVerbs(); @@ -102,6 +104,15 @@ private: void initPreviousAlphaTextures(); void initPreviousAlphaTextureEntry(LLVOAvatarDefines::ETextureIndex te); + // callback for HeightUnits parameter. + bool changeHeightUnits(const LLSD& new_value); + + // updates current metric and replacemet metric label text + void updateMetricLayout(BOOL new_value); + + // updates avatar height label + void updateAvatarHeightLabel(); + // the pointer to the wearable we're editing. NULL means we're not editing a wearable. LLWearable *mWearablePtr; LLViewerInventoryItem* mWearableItem; @@ -115,9 +126,21 @@ private: LLTextBox *mTxtAvatarHeight; + // localized and parametrized strings that used to build avatar_height_label + std::string mMeters; + std::string mFeet; + std::string mHeigth; + LLUIString mHeigthValue; + LLUIString mReplacementMetricUrl; + + // color for mHeigth string + LLUIColor mAvatarHeigthLabelColor; + // color for mHeigthValue string + LLUIColor mAvatarHeigthValueLabelColor; + // This text editor reference will change each time we edit a new wearable - // it will be grabbed from the currently visible panel - LLTextEditor *mTextEditor; + LLLineEditor *mNameEditor; // The following panels will be shown/hidden based on what wearable we're editing // body parts diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 4e8f0b5448..18a38880ef 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -339,7 +339,6 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item) std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), - inv_item->getIsLinkType(), item_is_multi ); mCreateInventoryIcon->setValue(icon_name); diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 7adabba2de..c44baea444 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -815,6 +815,8 @@ void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id) if(mRoleDescription) mRoleDescription->clear(); if(mRoleTitle) mRoleTitle->clear(); + mHasRoleChange = FALSE; + setFooterEnabled(FALSE); LLPanelGroupSubTab::setGroupID(id); diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 7fb46fc84f..ce1131f45c 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -334,7 +334,7 @@ void LLLandmarksPanel::updateVerbs() bool landmark_selected = isLandmarkSelected(); mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport")); mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info")); - mShowOnMapBtn->setEnabled(true); + mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map")); // TODO: mantipov: Uncomment when mShareBtn is supported // Share button should be enabled when neither a folder nor a landmark is selected diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index aa8dd4ef45..d5c640ad25 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1175,7 +1175,10 @@ void LLPanelLogin::onSelectServer(LLUICtrl*, void*) void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe) { - if (!sInstance) return; + if (!sInstance) + { + return; + } LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); if(fe == combo) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 54d1b46016..9eece81861 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -604,7 +604,7 @@ void LLPanelMainInventory::toggleFindOptions() finder->openFloater(); LLFloater* parent_floater = gFloaterView->getParentFloater(this); - if (parent_floater) // Seraph: Fix this, shouldn't be null even for sidepanel + if (parent_floater) parent_floater->addDependentFloater(mFinderHandle); // start background fetch of folders LLInventoryModelBackgroundFetch::instance().start(); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 5a068373f5..82b72ac224 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -84,6 +84,7 @@ public: void setSelectCallback(const LLFolderView::signal_t::slot_type& cb); + void onFilterEdit(const std::string& search_string ); protected: // // Misc functions @@ -98,7 +99,7 @@ protected: void onClearSearch(); static void onFoldersByName(void *user_data); static BOOL checkFoldersByName(void *user_data); - void onFilterEdit(const std::string& search_string ); + static BOOL incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward); void onFilterSelected(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index c557e9b85d..ca1361c84b 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -114,6 +114,7 @@ public: virtual time_t getCreationDate() const; virtual LLUIImagePtr getIcon() const; virtual void openItem(); + virtual BOOL canOpenItem() const { return FALSE; } virtual void closeItem() {} virtual void previewItem(); virtual void selectItem() {} @@ -135,6 +136,8 @@ public: virtual BOOL isUpToDate() const { return TRUE; } virtual BOOL hasChildren() const { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } + virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } + // LLDragAndDropBridge functionality virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, @@ -174,16 +177,7 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const void LLTaskInvFVBridge::showProperties() { - show_item_profile(mUUID); - - // Disable old properties floater; this is replaced by the sidepanel. - /* - LLFloaterProperties* floater = LLFloaterReg::showTypedInstance<LLFloaterProperties>("properties", mUUID); - if (floater) - { - floater->setObjectID(mPanel->getTaskUUID()); - } - */ + show_task_item_profile(mUUID, mPanel->getTaskUUID()); } struct LLBuyInvItemData @@ -351,7 +345,7 @@ LLUIImagePtr LLTaskInvFVBridge::getIcon() const { const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS); - return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, 0, item_is_multi ); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, 0, item_is_multi ); } void LLTaskInvFVBridge::openItem() @@ -674,7 +668,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } - else + else if (canOpenItem()) { items.push_back(std::string("Task Open")); if (!isItemCopyable()) @@ -720,6 +714,8 @@ public: virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data); + virtual BOOL canOpenItem() const { return TRUE; } + virtual void openItem(); }; LLTaskCategoryBridge::LLTaskCategoryBridge( @@ -754,7 +750,8 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { std::vector<std::string> items; std::vector<std::string> disabled_items; - items.push_back(std::string("Task Open")); + items.push_back(std::string("--no options--")); + disabled_items.push_back(std::string("--no options--")); hide_context_entries(menu, items, disabled_items); } @@ -765,6 +762,10 @@ BOOL LLTaskCategoryBridge::hasChildren() const return FALSE; } +void LLTaskCategoryBridge::openItem() +{ +} + BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { //llinfos << "LLTaskInvFVBridge::startDrag()" << llendl; @@ -871,6 +872,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); }; @@ -897,6 +899,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -973,9 +976,8 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } - else + else if (canOpenItem()) { - items.push_back(std::string("Task Open")); if (!isItemCopyable()) { disabled_items.push_back(std::string("Task Open")); @@ -1060,6 +1062,7 @@ public: const std::string& name) : LLTaskScriptBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); //virtual void buildContextMenu(LLMenuGL& menu); @@ -1121,6 +1124,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; @@ -1160,6 +1164,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; @@ -1193,6 +1198,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; @@ -1236,7 +1242,7 @@ public: LLUIImagePtr LLTaskWearableBridge::getIcon() const { - return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, mFlags, FALSE ); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE ); } diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 4982e98f8e..5fac7efb84 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -39,6 +39,7 @@ #include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "lloutfitobserver.h" #include "llcofwearables.h" #include "llfilteredwearablelist.h" #include "llinventory.h" @@ -59,17 +60,21 @@ #include "llinventorybridge.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" +#include "llloadingindicator.h" #include "llpaneloutfitsinventory.h" #include "lluiconstants.h" #include "llsaveoutfitcombobtn.h" #include "llscrolllistctrl.h" #include "lltextbox.h" +#include "lltrans.h" #include "lluictrlfactory.h" #include "llsdutil.h" #include "llsidepanelappearance.h" #include "lltoggleablemenu.h" #include "llwearablelist.h" #include "llwearableitemslist.h" +#include "llwearabletype.h" +#include "llweb.h" static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit"); @@ -79,6 +84,65 @@ const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK; static const std::string REVERT_BTN("revert_btn"); +class LLShopURLDispatcher +{ +public: + std::string resolveURL(LLWearableType::EType wearable_type, ESex sex); + std::string resolveURL(LLAssetType::EType asset_type, ESex sex); +}; + +std::string LLShopURLDispatcher::resolveURL(LLWearableType::EType wearable_type, ESex sex) +{ + const std::string prefix = "MarketplaceURL"; + const std::string sex_str = (sex == SEX_MALE) ? "Male" : "Female"; + const std::string type_str = LLWearableType::getTypeName(wearable_type); + + std::string setting_name = prefix; + + switch (wearable_type) + { + case LLWearableType::WT_ALPHA: + case LLWearableType::WT_NONE: + case LLWearableType::WT_INVALID: // just in case, this shouldn't happen + case LLWearableType::WT_COUNT: // just in case, this shouldn't happen + break; + + default: + setting_name += '_'; + setting_name += type_str; + setting_name += sex_str; + break; + } + + return gSavedSettings.getString(setting_name); +} + +std::string LLShopURLDispatcher::resolveURL(LLAssetType::EType asset_type, ESex sex) +{ + const std::string prefix = "MarketplaceURL"; + const std::string sex_str = (sex == SEX_MALE) ? "Male" : "Female"; + const std::string type_str = LLAssetType::lookup(asset_type); + + std::string setting_name = prefix; + + switch (asset_type) + { + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_OBJECT: + case LLAssetType::AT_BODYPART: + setting_name += '_'; + setting_name += type_str; + setting_name += sex_str; + break; + + // to suppress warnings + default: + break; + } + + return gSavedSettings.getString(setting_name); +} + class LLPanelOutfitEditGearMenu { public: @@ -143,100 +207,6 @@ private: } }; -class LLCOFObserver : public LLInventoryObserver -{ -public: - LLCOFObserver(LLPanelOutfitEdit *panel) : mPanel(panel), - mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN) - { - gInventory.addObserver(this); - } - - virtual ~LLCOFObserver() - { - if (gInventory.containsObserver(this)) - { - gInventory.removeObserver(this); - } - } - - virtual void changed(U32 mask) - { - if (!gInventory.isInventoryUsable()) return; - - bool panel_updated = checkCOF(); - - if (!panel_updated) - { - checkBaseOutfit(); - } - } - -protected: - - /** Get a version of an inventory category specified by its UUID */ - static S32 getCategoryVersion(const LLUUID& cat_id) - { - LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - if (!cat) return LLViewerInventoryCategory::VERSION_UNKNOWN; - - return cat->getVersion(); - } - - bool checkCOF() - { - LLUUID cof = LLAppearanceMgr::getInstance()->getCOF(); - if (cof.isNull()) return false; - - S32 cof_version = getCategoryVersion(cof); - - if (cof_version == mCOFLastVersion) return false; - - mCOFLastVersion = cof_version; - - mPanel->update(); - - return true; - } - - void checkBaseOutfit() - { - LLUUID baseoutfit_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); - - if (baseoutfit_id == mBaseOutfitId) - { - if (baseoutfit_id.isNull()) return; - - const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id); - - if (baseoutfit_ver == mBaseOutfitLastVersion) return; - } - else - { - mBaseOutfitId = baseoutfit_id; - mPanel->updateCurrentOutfitName(); - - if (baseoutfit_id.isNull()) return; - - mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId); - } - - mPanel->updateVerbs(); - } - - - - - LLPanelOutfitEdit *mPanel; - - //last version number of a COF category - S32 mCOFLastVersion; - - LLUUID mBaseOutfitId; - - S32 mBaseOutfitLastVersion; -}; - class LLCOFDragAndDropObserver : public LLInventoryAddItemByAssetObserver { public: @@ -277,25 +247,31 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() mSearchFilter(NULL), mCOFWearables(NULL), mInventoryItemsPanel(NULL), - mCOFObserver(NULL), mGearMenu(NULL), mCOFDragAndDropObserver(NULL), mInitialized(false), mAddWearablesPanel(NULL), - mWearableListMaskCollector(NULL), - mWearableListTypeCollector(NULL) + mFolderViewFilterCmbBox(NULL), + mListViewFilterCmbBox(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); - mCOFObserver = new LLCOFObserver(this); + + LLOutfitObserver& observer = LLOutfitObserver::instance(); + observer.addBOFReplacedCallback(boost::bind(&LLPanelOutfitEdit::updateCurrentOutfitName, this)); + observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this)); + observer.addOutfitLockChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this)); + observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::update, this)); + + gAgentWearables.addLoadingStartedCallback(boost::bind(&LLPanelOutfitEdit::onOutfitChanging, this, true)); + gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitEdit::onOutfitChanging, this, false)); - mLookItemTypes.reserve(NUM_LOOK_ITEM_TYPES); - for (U32 i = 0; i < NUM_LOOK_ITEM_TYPES; i++) + mFolderViewItemTypes.reserve(NUM_FOLDER_VIEW_ITEM_TYPES); + for (U32 i = 0; i < NUM_FOLDER_VIEW_ITEM_TYPES; i++) { - mLookItemTypes.push_back(LLLookItemType()); + mFolderViewItemTypes.push_back(LLLookItemType()); } - } @@ -303,20 +279,42 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit() { delete mSavedFolderState; - delete mCOFObserver; delete mCOFDragAndDropObserver; - delete mWearableListMaskCollector; - delete mWearableListTypeCollector; + while (!mListViewItemTypes.empty()) { + delete mListViewItemTypes.back(); + mListViewItemTypes.pop_back(); + } } BOOL LLPanelOutfitEdit::postBuild() { // gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels - - mLookItemTypes[LIT_ALL] = LLLookItemType(getString("Filter.All"), ALL_ITEMS_MASK); - mLookItemTypes[LIT_WEARABLE] = LLLookItemType(getString("Filter.Clothes/Body"), WEARABLE_MASK); - mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); + + mFolderViewItemTypes[FVIT_ALL] = LLLookItemType(getString("Filter.All"), ALL_ITEMS_MASK); + mFolderViewItemTypes[FVIT_WEARABLE] = LLLookItemType(getString("Filter.Clothes/Body"), WEARABLE_MASK); + mFolderViewItemTypes[FVIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); + + //order is important, see EListViewItemType for order information + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindByMask(ALL_ITEMS_MASK))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsType(LLAssetType::AT_CLOTHING))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsType(LLAssetType::AT_BODYPART))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Objects"), new LLFindByMask(ATTACHMENT_MASK)));; + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("shape"), new LLFindActualWearablesOfType(LLWearableType::WT_SHAPE))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("skin"), new LLFindActualWearablesOfType(LLWearableType::WT_SKIN))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("hair"), new LLFindActualWearablesOfType(LLWearableType::WT_HAIR))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("eyes"), new LLFindActualWearablesOfType(LLWearableType::WT_EYES))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("shirt"), new LLFindActualWearablesOfType(LLWearableType::WT_SHIRT))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("pants"), new LLFindActualWearablesOfType(LLWearableType::WT_PANTS))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("shoes"), new LLFindActualWearablesOfType(LLWearableType::WT_SHOES))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("socks"), new LLFindActualWearablesOfType(LLWearableType::WT_SOCKS))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("jacket"), new LLFindActualWearablesOfType(LLWearableType::WT_JACKET))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("gloves"), new LLFindActualWearablesOfType(LLWearableType::WT_GLOVES))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("undershirt"), new LLFindActualWearablesOfType(LLWearableType::WT_UNDERSHIRT))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("underpants"), new LLFindActualWearablesOfType(LLWearableType::WT_UNDERPANTS))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("skirt"), new LLFindActualWearablesOfType(LLWearableType::WT_SKIRT))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("alpha"), new LLFindActualWearablesOfType(LLWearableType::WT_ALPHA))); + mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("tattoo"), new LLFindActualWearablesOfType(LLWearableType::WT_TATTOO))); mCurrentOutfitName = getChild<LLTextBox>("curr_outfit_name"); mStatus = getChild<LLTextBox>("status"); @@ -325,12 +323,14 @@ BOOL LLPanelOutfitEdit::postBuild() mListViewBtn = getChild<LLButton>("list_view_btn"); childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); - childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredFolderWearablesPanel, this), NULL); - childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredWearablesPanel, this), NULL); + childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesFolderView, this), NULL); + childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesListView, this), NULL); childSetCommitCallback("wearables_gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); + childSetCommitCallback("gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); + childSetCommitCallback("shop_btn", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list"); - mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); + mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this)); mCOFWearables->getCOFCallbacks().mAddWearable = boost::bind(&LLPanelOutfitEdit::onAddWearableClicked, this); mCOFWearables->getCOFCallbacks().mEditWearable = boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this); @@ -340,7 +340,7 @@ BOOL LLPanelOutfitEdit::postBuild() mAddWearablesPanel = getChild<LLPanel>("add_wearables_panel"); - mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items"); + mInventoryItemsPanel = getChild<LLInventoryPanel>("folder_view"); mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); @@ -348,19 +348,29 @@ BOOL LLPanelOutfitEdit::postBuild() mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel()); - LLComboBox* type_filter = getChild<LLComboBox>("filter_wearables_combobox"); - type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1)); - type_filter->removeall(); - for (U32 i = 0; i < mLookItemTypes.size(); ++i) + mFolderViewFilterCmbBox = getChild<LLComboBox>("folder_view_filter_combobox"); + mFolderViewFilterCmbBox->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onFolderViewFilterCommitted, this, _1)); + mFolderViewFilterCmbBox->removeall(); + for (U32 i = 0; i < mFolderViewItemTypes.size(); ++i) { - type_filter->add(mLookItemTypes[i].displayName); + mFolderViewFilterCmbBox->add(mFolderViewItemTypes[i].displayName); } - type_filter->setCurrentByIndex(LIT_ALL); + mFolderViewFilterCmbBox->setCurrentByIndex(FVIT_ALL); + mListViewFilterCmbBox = getChild<LLComboBox>("list_view_filter_combobox"); + mListViewFilterCmbBox->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onListViewFilterCommitted, this, _1)); + mListViewFilterCmbBox->removeall(); + for (U32 i = 0; i < mListViewItemTypes.size(); ++i) + { + mListViewFilterCmbBox->add(mListViewItemTypes[i]->displayName); + } + mListViewFilterCmbBox->setCurrentByIndex(LVIT_ALL); + mSearchFilter = getChild<LLFilterEditor>("look_item_filter"); mSearchFilter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onSearchEdit, this, _2)); - childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::toggleAddWearablesPanel, this)); + childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::onAddMoreButtonClicked, this)); + childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this)); mEditWearableBtn = getChild<LLButton>("edit_wearable_btn"); @@ -370,11 +380,8 @@ BOOL LLPanelOutfitEdit::postBuild() childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); - mWearableListMaskCollector = new LLFindNonLinksByMask(ALL_ITEMS_MASK); - mWearableListTypeCollector = new LLFindWearablesOfType(LLWearableType::WT_NONE); - - mWearableItemsPanel = getChild<LLPanel>("filtered_wearables_panel"); - mWearableItemsList = getChild<LLInventoryItemsList>("filtered_wearables_list"); + mWearablesListViewPanel = getChild<LLPanel>("filtered_wearables_panel"); + mWearableItemsList = getChild<LLInventoryItemsList>("list_view"); mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); return TRUE; @@ -387,7 +394,7 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key) { // *TODO: this method is called even panel is not visible to user because its parent layout panel is hidden. // So, we can defer initializing a bit. - mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mWearableListMaskCollector); + mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mListViewItemTypes[LVIT_ALL]->collector); mWearableListManager->populateList(); displayCurrentOutfit(); mInitialized = true; @@ -415,13 +422,17 @@ void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables) childSetValue("show_add_wearables_btn", show_add_wearables); - childSetVisible("filter_wearables_combobox", show_add_wearables); + updateFiltersVisibility(); childSetVisible("filter_button", show_add_wearables); //search filter should be disabled if (!show_add_wearables) { childSetValue("filter_button", false); + + mFolderViewFilterCmbBox->setVisible(false); + mListViewFilterCmbBox->setVisible(false); + showWearablesFilter(); } @@ -443,41 +454,43 @@ void LLPanelOutfitEdit::showWearablesFilter() } } -void LLPanelOutfitEdit::showFilteredWearablesPanel() +void LLPanelOutfitEdit::showWearablesListView() { - if(switchPanels(mInventoryItemsPanel, mWearableItemsPanel)) + if(switchPanels(mInventoryItemsPanel, mWearablesListViewPanel)) { mFolderViewBtn->setToggleState(FALSE); mFolderViewBtn->setImageOverlay(getString("folder_view_off"), mFolderViewBtn->getImageOverlayHAlign()); mListViewBtn->setImageOverlay(getString("list_view_on"), mListViewBtn->getImageOverlayHAlign()); + updateFiltersVisibility(); } mListViewBtn->setToggleState(TRUE); } -void LLPanelOutfitEdit::showFilteredFolderWearablesPanel() +void LLPanelOutfitEdit::showWearablesFolderView() { - if(switchPanels(mWearableItemsPanel, mInventoryItemsPanel)) + if(switchPanels(mWearablesListViewPanel, mInventoryItemsPanel)) { mListViewBtn->setToggleState(FALSE); mListViewBtn->setImageOverlay(getString("list_view_off"), mListViewBtn->getImageOverlayHAlign()); mFolderViewBtn->setImageOverlay(getString("folder_view_on"), mFolderViewBtn->getImageOverlayHAlign()); + updateFiltersVisibility(); } mFolderViewBtn->setToggleState(TRUE); } -void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl) +void LLPanelOutfitEdit::updateFiltersVisibility() { - LLComboBox* type_filter = dynamic_cast<LLComboBox*>(ctrl); - llassert(type_filter); - if (type_filter) - { - U32 curr_filter_type = type_filter->getCurrentIndex(); - mInventoryItemsPanel->setFilterTypes(mLookItemTypes[curr_filter_type].inventoryMask); + mListViewFilterCmbBox->setVisible(mWearablesListViewPanel->getVisible()); + mFolderViewFilterCmbBox->setVisible(mInventoryItemsPanel->getVisible()); +} + +void LLPanelOutfitEdit::onFolderViewFilterCommitted(LLUICtrl* ctrl) +{ + S32 curr_filter_type = mFolderViewFilterCmbBox->getCurrentIndex(); + if (curr_filter_type < 0) return; + + mInventoryItemsPanel->setFilterTypes(mFolderViewItemTypes[curr_filter_type].inventoryMask); - mWearableListMaskCollector->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask); - mWearableListManager->setFilterCollector(mWearableListMaskCollector); - } - mSavedFolderState->setApply(TRUE); mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); @@ -488,6 +501,14 @@ void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl) LLInventoryModelBackgroundFetch::instance().start(); } +void LLPanelOutfitEdit::onListViewFilterCommitted(LLUICtrl* ctrl) +{ + S32 curr_filter_type = mListViewFilterCmbBox->getCurrentIndex(); + if (curr_filter_type < 0) return; + + mWearableListManager->setFilterCollector(mListViewItemTypes[curr_filter_type]->collector); +} + void LLPanelOutfitEdit::onSearchEdit(const std::string& string) { if (mSearchString != string) @@ -545,7 +566,7 @@ void LLPanelOutfitEdit::onAddToOutfitClicked(void) selected_id = listenerp->getUUID(); } - else if (mWearableItemsPanel->getVisible()) + else if (mWearablesListViewPanel->getVisible()) { selected_id = mWearableItemsList->getSelectedUUID(); } @@ -561,7 +582,7 @@ void LLPanelOutfitEdit::onAddWearableClicked(void) if(item) { - showFilteredWearableItemsList(item->getWearableType()); + showFilteredWearablesListView(item->getWearableType()); } } @@ -571,10 +592,50 @@ void LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id if (item && item->getType() == LLAssetType::AT_BODYPART) { - showFilteredWearableItemsList(item->getWearableType()); + showFilteredWearablesListView(item->getWearableType()); } } +void LLPanelOutfitEdit::onShopButtonClicked() +{ + static LLShopURLDispatcher url_resolver; + + std::string url; + std::vector<LLPanel*> selected_items; + mCOFWearables->getSelectedItems(selected_items); + + ESex sex = gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE; + + if (selected_items.size() == 1) + { + LLWearableType::EType type = LLWearableType::WT_NONE; + LLPanel* item = selected_items.front(); + + // LLPanelDummyClothingListItem is lower then LLPanelInventoryListItemBase in hierarchy tree + if (LLPanelDummyClothingListItem* dummy_item = dynamic_cast<LLPanelDummyClothingListItem*>(item)) + { + type = dummy_item->getWearableType(); + } + else if (LLPanelInventoryListItemBase* real_item = dynamic_cast<LLPanelInventoryListItemBase*>(item)) + { + type = real_item->getWearableType(); + } + + // WT_INVALID comes for attachments + if (type != LLWearableType::WT_INVALID) + { + url = url_resolver.resolveURL(type, sex); + } + } + + if (url.empty()) + { + url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex); + } + + LLWeb::loadURLExternal(url); +} + void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void) { LLUUID id_to_remove = mCOFWearables->getSelectedUUID(); @@ -585,35 +646,10 @@ void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void) void LLPanelOutfitEdit::onEditWearableClicked(void) { - LLUUID id_to_edit = mCOFWearables->getSelectedUUID(); - LLViewerInventoryItem * item_to_edit = gInventory.getItem(id_to_edit); - - if (item_to_edit) + LLUUID selected_item_id = mCOFWearables->getSelectedUUID(); + if (selected_item_id.notNull()) { - // returns null if not a wearable (attachment, etc). - LLWearable* wearable_to_edit = gAgentWearables.getWearableFromAssetID(item_to_edit->getAssetUUID()); - if(wearable_to_edit) - { - bool can_modify = false; - bool is_complete = item_to_edit->isFinished(); - // if item_to_edit is a link, its properties are not appropriate, - // lets get original item with actual properties - LLViewerInventoryItem* original_item = gInventory.getItem(wearable_to_edit->getItemID()); - if(original_item) - { - can_modify = original_item->getPermissions().allowModifyBy(gAgentID); - is_complete = original_item->isFinished(); - } - - if (can_modify && is_complete) - { - LLSidepanelAppearance::editWearable(wearable_to_edit, getParent()); - if (mEditWearableBtn->getVisible()) - { - mEditWearableBtn->setVisible(FALSE); - } - } - } + gAgentWearables.editWearable(selected_item_id); } } @@ -653,24 +689,87 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView current_item->addChild(mAddToLookBtn); */ } -void LLPanelOutfitEdit::onOutfitItemSelectionChange(void) -{ - LLUUID item_id = mCOFWearables->getSelectedUUID(); - //*TODO show Edit Wearable Button +void LLPanelOutfitEdit::applyFolderViewFilter(EFolderViewItemType type) +{ + mFolderViewFilterCmbBox->setCurrentByIndex(type); + mFolderViewFilterCmbBox->onCommit(); +} - LLViewerInventoryItem* item_to_remove = gInventory.getItem(item_id); - if (!item_to_remove) return; +void LLPanelOutfitEdit::applyListViewFilter(EListViewItemType type) +{ + mListViewFilterCmbBox->setCurrentByIndex(type); + mListViewFilterCmbBox->onCommit(); +} - switch (item_to_remove->getType()) +void LLPanelOutfitEdit::filterWearablesBySelectedItem(void) +{ + if (!mAddWearablesPanel->getVisible()) return; + + uuid_vec_t ids; + mCOFWearables->getSelectedUUIDs(ids); + + bool nothing_selected = ids.empty(); + bool one_selected = ids.size() == 1; + bool more_than_one_selected = ids.size() > 1; + bool is_dummy_item = (ids.size() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem())); + + //resetting selection if no item is selected or than one item is selected + if (nothing_selected || more_than_one_selected) { - case LLAssetType::AT_CLOTHING: - case LLAssetType::AT_OBJECT: - default: - break; + if (nothing_selected) + { + showWearablesFolderView(); + applyFolderViewFilter(FVIT_ALL); + } + + if (more_than_one_selected) + { + showWearablesListView(); + applyListViewFilter(LVIT_ALL); + } + + return; + } + + + //filter wearables by a type represented by a dummy item + if (one_selected && is_dummy_item) + { + onAddWearableClicked(); + return; + } + + LLViewerInventoryItem* item = gInventory.getItem(ids[0]); + if (!item && ids[0].notNull()) + { + //Inventory misses an item with non-zero id + showWearablesListView(); + applyListViewFilter(LVIT_ALL); + return; } + + if (one_selected && !is_dummy_item) + { + if (item->isWearableType()) + { + //single clothing or bodypart item is selected + showFilteredWearablesListView(item->getWearableType()); + return; + } + else + { + //attachment is selected + showWearablesListView(); + applyListViewFilter(LVIT_ATTACHMENT); + return; + } + } + } + + void LLPanelOutfitEdit::update() { mCOFWearables->refresh(); @@ -756,19 +855,18 @@ void LLPanelOutfitEdit::updateCurrentOutfitName() //private void LLPanelOutfitEdit::updateVerbs() { - //*TODO implement better handling of COF dirtiness - LLAppearanceMgr::getInstance()->updateIsDirty(); - bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); + bool outfit_locked = LLAppearanceMgr::getInstance()->isOutfitLocked(); bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull(); - mSaveComboBtn->setSaveBtnEnabled(outfit_is_dirty); + mSaveComboBtn->setSaveBtnEnabled(!outfit_locked && outfit_is_dirty); childSetEnabled(REVERT_BTN, outfit_is_dirty && has_baseoutfit); - mSaveComboBtn->setMenuItemEnabled("save_outfit", outfit_is_dirty); + mSaveComboBtn->setMenuItemEnabled("save_outfit", !outfit_locked && outfit_is_dirty); mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing")); + updateCurrentOutfitName(); } bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel) @@ -793,12 +891,42 @@ void LLPanelOutfitEdit::onGearButtonClick(LLUICtrl* clicked_button) LLMenuGL::showPopup(clicked_button, mGearMenu, 0, menu_y); } -void LLPanelOutfitEdit::showFilteredWearableItemsList(LLWearableType::EType type) +void LLPanelOutfitEdit::onAddMoreButtonClicked() +{ + toggleAddWearablesPanel(); + filterWearablesBySelectedItem(); +} + +void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type) { - mWearableListTypeCollector->setType(type); - mWearableListManager->setFilterCollector(mWearableListTypeCollector); showAddWearablesPanel(true); - showFilteredWearablesPanel(); + showWearablesListView(); + + //e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE + applyListViewFilter((EListViewItemType) (LVIT_SHAPE + type)); +} + +static void update_status_widget_rect(LLView * widget, S32 right_border) +{ + LLRect rect = widget->getRect(); + rect.mRight = right_border; + + widget->setShape(rect); +} + +void LLPanelOutfitEdit::onOutfitChanging(bool started) +{ + static LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("edit_outfit_loading_indicator"); + static LLView* status_panel = getChild<LLView>("outfit_name_and_status"); + static S32 indicator_delta = status_panel->getRect().getWidth() - indicator->getRect().mLeft; + + S32 delta = started ? indicator_delta : 0; + S32 right_border = status_panel->getRect().getWidth() - delta; + + update_status_widget_rect(mCurrentOutfitName, right_border); + update_status_widget_rect(mStatus, right_border); + + indicator->setVisible(started); } // EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 802386c573..484f3fcb9f 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -42,14 +42,16 @@ #include "llremoteparcelrequest.h" #include "llinventory.h" +#include "llinventoryfunctions.h" #include "llinventoryitemslist.h" #include "llinventorymodel.h" class LLButton; class LLCOFWearables; +class LLComboBox; class LLTextBox; class LLInventoryCategory; -class LLCOFObserver; +class LLOutfitObserver; class LLCOFDragAndDropObserver; class LLInventoryPanel; class LLSaveFolderState; @@ -68,21 +70,59 @@ class LLPanelOutfitEdit : public LLPanel LOG_CLASS(LLPanelOutfitEdit); public: - // NOTE: initialize mLookItemTypes at the index of any new enum you add in the LLPanelOutfitEdit() constructor - typedef enum e_look_item_type + // NOTE: initialize mFolderViewItemTypes at the index of any new enum you add in the LLPanelOutfitEdit() constructor + typedef enum e_folder_view_item_type { - LIT_ALL = 0, - LIT_WEARABLE, // clothing or shape - LIT_ATTACHMENT, - NUM_LOOK_ITEM_TYPES - } ELookItemType; + FVIT_ALL = 0, + FVIT_WEARABLE, // clothing or shape + FVIT_ATTACHMENT, + NUM_FOLDER_VIEW_ITEM_TYPES + } EFolderViewItemType; + //should reflect order from LLWearableType::EType + typedef enum e_list_view_item_type + { + LVIT_ALL = 0, + LVIT_CLOTHING, + LVIT_BODYPART, + LVIT_ATTACHMENT, + LVIT_SHAPE, + LVIT_SKIN, + LVIT_HAIR, + LVIT_EYES, + LVIT_SHIRT, + LVIT_PANTS, + LVIT_SHOES, + LVIT_SOCKS, + LVIT_JACKET, + LVIT_GLOVES, + LVIT_UNDERSHIRT, + LVIT_UNDERPANTS, + LVIT_SKIRT, + LVIT_ALPHA, + LVIT_TATTOO, + NUM_LIST_VIEW_ITEM_TYPES + } EListViewItemType; + struct LLLookItemType { std::string displayName; U64 inventoryMask; LLLookItemType() : displayName("NONE"), inventoryMask(0) {} LLLookItemType(std::string name, U64 mask) : displayName(name), inventoryMask(mask) {} }; + + struct LLFilterItem { + std::string displayName; + LLInventoryCollectFunctor* collector; + LLFilterItem() : displayName("NONE"), collector(NULL) {} + LLFilterItem(std::string name, LLInventoryCollectFunctor* _collector) : displayName(name), collector(_collector) {} + ~LLFilterItem() { delete collector; } + + //the struct is not supposed to by copied, either way the destructor kills collector + //LLPointer is not used as it requires LLInventoryCollectFunctor to extend LLRefCount what it doesn't do + private: + LLFilterItem(const LLFilterItem& filter_item) {}; + }; LLPanelOutfitEdit(); /*virtual*/ ~LLPanelOutfitEdit(); @@ -94,19 +134,36 @@ public: void toggleAddWearablesPanel(); void showAddWearablesPanel(bool show__add_wearables); + + //following methods operate with "add wearables" panel void showWearablesFilter(); - void showFilteredWearablesPanel(); - void showFilteredFolderWearablesPanel(); + void showWearablesListView(); + void showWearablesFolderView(); - void onTypeFilterChanged(LLUICtrl* ctrl); + void updateFiltersVisibility(); + + void onFolderViewFilterCommitted(LLUICtrl* ctrl); + void onListViewFilterCommitted(LLUICtrl* ctrl); void onSearchEdit(const std::string& string); void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); void onAddToOutfitClicked(void); - void onOutfitItemSelectionChange(void); + + void applyFolderViewFilter(EFolderViewItemType type); + void applyListViewFilter(EListViewItemType type); + + /** + * Filter items in views of Add Wearables Panel and show appropriate view depending on currently selected COF item(s) + * No COF items selected - shows the folder view, reset filter + * 1 COF item selected - shows the list view and filters wearables there by a wearable type of the selected item + * More than 1 COF item selected - shows the list view and filters it by a type of the selected item (attachment or clothing) + */ + void filterWearablesBySelectedItem(void); + void onRemoveFromOutfitClicked(void); void onEditWearableClicked(void); void onAddWearableClicked(void); void onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id); + void onShopButtonClicked(); void displayCurrentOutfit(); void updateCurrentOutfitName(); @@ -132,7 +189,9 @@ public: private: void onGearButtonClick(LLUICtrl* clicked_button); - void showFilteredWearableItemsList(LLWearableType::EType type); + void onAddMoreButtonClicked(); + void showFilteredWearablesListView(LLWearableType::EType type); + void onOutfitChanging(bool started); LLTextBox* mCurrentOutfitName; @@ -145,24 +204,26 @@ private: LLButton* mFolderViewBtn; LLButton* mListViewBtn; LLPanel* mAddWearablesPanel; - - LLFindNonLinksByMask* mWearableListMaskCollector; - LLFindWearablesOfType* mWearableListTypeCollector; + + LLComboBox* mFolderViewFilterCmbBox; + LLComboBox* mListViewFilterCmbBox; LLFilteredWearableListManager* mWearableListManager; LLInventoryItemsList* mWearableItemsList; - LLPanel* mWearableItemsPanel; + LLPanel* mWearablesListViewPanel; - LLCOFObserver* mCOFObserver; LLCOFDragAndDropObserver* mCOFDragAndDropObserver; - std::vector<LLLookItemType> mLookItemTypes; + std::vector<LLLookItemType> mFolderViewItemTypes; + std::vector<LLFilterItem*> mListViewItemTypes; LLCOFWearables* mCOFWearables; LLMenuGL* mGearMenu; bool mInitialized; std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn; + + }; #endif // LL_LLPANELOUTFITEDIT_H diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 5f67f3d989..714d9cd4c5 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -50,6 +50,7 @@ #include "lllineeditor.h" #include "llmodaldialog.h" #include "llnotificationsutil.h" +#include "lloutfitobserver.h" #include "lloutfitslist.h" #include "llsaveoutfitcombobtn.h" #include "llsidepanelappearance.h" @@ -85,11 +86,11 @@ public: registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this)); registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this)); - registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitListGearMenu::onEnable, this, _2)); + enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenu::onVisible, this, _2)); mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>( "menu_outfit_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -98,6 +99,28 @@ public: LLMenuGL* getMenu() { return mMenu; } + void show(LLView* spawning_view) + { + if (!mMenu) return; + + updateItemsVisibility(); + mMenu->buildDrawLabels(); + mMenu->updateParent(LLMenuGL::sMenuContainer); + S32 menu_x = 0; + S32 menu_y = spawning_view->getRect().getHeight() + mMenu->getRect().getHeight(); + LLMenuGL::showPopup(spawning_view, mMenu, menu_x, menu_y); + } + + void updateItemsVisibility() + { + if (!mMenu) return; + + bool have_selection = getSelectedOutfitID().notNull(); + mMenu->setItemVisible("sepatator1", have_selection); + mMenu->setItemVisible("sepatator2", have_selection); + mMenu->arrangeAndClear(); // update menu height + } + private: const LLUUID& getSelectedOutfitID() { @@ -135,15 +158,6 @@ private: } } - void onRename() - { - const LLUUID& selected_outfit_id = getSelectedOutfitID(); - if (selected_outfit_id.notNull()) - { - LLAppearanceMgr::instance().renameOutfit(selected_outfit_id); - } - } - void onDelete() { const LLUUID& selected_outfit_id = getSelectedOutfitID(); @@ -168,23 +182,36 @@ private: bool onEnable(LLSD::String param) { const LLUUID& selected_outfit_id = getSelectedOutfitID(); - bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id; + if (selected_outfit_id.isNull()) // no selection or invalid outfit selected + { + return false; + } - if ("wear" == param) + if ("delete" == param) { - return !is_worn; + return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id); } else if ("take_off" == param) { - return is_worn; + return LLAppearanceMgr::getCanRemoveFromCOF(selected_outfit_id); } - else if ("rename" == param) + + return true; + } + + bool onVisible(LLSD::String param) + { + const LLUUID& selected_outfit_id = getSelectedOutfitID(); + if (selected_outfit_id.isNull()) // no selection or invalid outfit selected { - return get_is_category_renameable(&gInventory, selected_outfit_id); + return false; } - else if ("delete" == param) + + bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id; + + if ("wear" == param) { - return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id); + return !is_worn; } return true; @@ -197,13 +224,18 @@ private: LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mMyOutfitsPanel(NULL), mCurrentOutfitPanel(NULL), - mParent(NULL), mGearMenu(NULL), mInitialized(false) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this)); + gAgentWearables.addLoadingStartedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoading, this)); + + LLOutfitObserver& observer = LLOutfitObserver::instance(); + observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); + observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); + observer.addOutfitLockChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); } LLPanelOutfitsInventory::~LLPanelOutfitsInventory() @@ -281,11 +313,6 @@ void LLPanelOutfitsInventory::updateVerbs() } } -void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) -{ - mParent = parent; -} - // virtual void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) { @@ -336,7 +363,6 @@ void LLPanelOutfitsInventory::onWearButtonClick() if (!isCOFPanelActive()) { mMyOutfitsPanel->performAction("replaceoutfit"); - setWearablesLoading(true); } else { @@ -516,29 +542,22 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() void LLPanelOutfitsInventory::updateListCommands() { bool trash_enabled = isActionEnabled("delete"); - bool wear_enabled = isActionEnabled("wear"); - bool make_outfit_enabled = isActionEnabled("make_outfit"); + bool wear_enabled = !gAgentWearables.isCOFChangeInProgress() && isActionEnabled("wear"); + bool wear_visible = !isCOFPanelActive(); + bool make_outfit_enabled = isActionEnabled("save_outfit"); mListCommands->childSetEnabled("trash_btn", trash_enabled); mListCommands->childSetEnabled("wear_btn", wear_enabled); - mListCommands->childSetVisible("wear_btn", wear_enabled); - mSaveComboBtn->setSaveBtnEnabled(make_outfit_enabled); + mListCommands->childSetVisible("wear_btn", wear_visible); + mSaveComboBtn->setMenuItemEnabled("save_outfit", make_outfit_enabled); } void LLPanelOutfitsInventory::showGearMenu() { - LLMenuGL* menu = mGearMenu ? mGearMenu->getMenu() : NULL; - if (menu) - { - menu->buildDrawLabels(); - menu->updateParent(LLMenuGL::sMenuContainer); - LLView* spawning_view = getChild<LLView>("options_gear_btn"); - S32 menu_x, menu_y; - //show menu in co-ordinates of panel - spawning_view->localPointToOtherView(0, spawning_view->getRect().getHeight(), &menu_x, &menu_y, this); - menu_y += menu->getRect().getHeight(); - LLMenuGL::showPopup(this, menu, menu_x, menu_y); - } + if (!mGearMenu) return; + + LLView* spawning_view = getChild<LLView>("options_gear_btn"); + mGearMenu->show(spawning_view); } void LLPanelOutfitsInventory::onTrashButtonClick() @@ -549,11 +568,25 @@ void LLPanelOutfitsInventory::onTrashButtonClick() void LLPanelOutfitsInventory::onClipboardAction(const LLSD& userdata) { std::string command_name = userdata.asString(); - // TODO: add handling "My Outfits" tab. if (isCOFPanelActive()) { getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); } + else // "My Outfits" tab active + { + if (command_name == "delete") + { + const LLUUID& selected_outfit_id = mMyOutfitsPanel->getSelectedOutfitUUID(); + if (selected_outfit_id.notNull()) + { + remove_category(&gInventory, selected_outfit_id); + } + } + else + { + llwarns << "Unrecognized action" << llendl; + } + } updateListCommands(); updateVerbs(); } @@ -608,7 +641,6 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) { BOOL can_delete = FALSE; - // TODO: add handling "My Outfits" tab. if (isCOFPanelActive()) { LLFolderView* root = getActivePanel()->getRootFolder(); @@ -624,10 +656,16 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) LLFolderViewItem *item = root->getItemByID(item_id); can_delete &= item->getListener()->isItemRemovable(); } - return can_delete; } } - return FALSE; + else // "My Outfits" tab active + { + const LLUUID& selected_outfit = mMyOutfitsPanel->getSelectedOutfitUUID(); + // first condition prevents trash btn from enabling when items are selected inside outfit (EXT-7847) + can_delete = !mMyOutfitsPanel->hasItemSelected() && LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit); + } + + return can_delete; } if (command_name == "remove_link") { @@ -662,10 +700,14 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) { return FALSE; } + return hasItemsSelected(); } - if (command_name == "make_outfit") + if (command_name == "save_outfit") { - return TRUE; + bool outfit_locked = LLAppearanceMgr::getInstance()->isOutfitLocked(); + bool outfit_dirty =LLAppearanceMgr::getInstance()->isOutfitDirty(); + // allow save only if outfit isn't locked and is dirty + return !outfit_locked && outfit_dirty; } if (command_name == "edit" || @@ -681,7 +723,6 @@ bool LLPanelOutfitsInventory::hasItemsSelected() { bool has_items_selected = false; - // TODO: add handling "My Outfits" tab. if (isCOFPanelActive()) { LLFolderView* root = getActivePanel()->getRootFolder(); @@ -691,6 +732,10 @@ bool LLPanelOutfitsInventory::hasItemsSelected() has_items_selected = (selection_set.size() > 0); } } + else // My Outfits Tab is active + { + has_items_selected = mMyOutfitsPanel->getSelectedOutfitUUID().notNull(); + } return has_items_selected; } @@ -721,6 +766,7 @@ void LLPanelOutfitsInventory::initTabPanels() mCurrentOutfitPanel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, mCurrentOutfitPanel, _1, _2)); mMyOutfitsPanel = getChild<LLOutfitsList>(OUTFITS_TAB_NAME); + mMyOutfitsPanel->addSelectionChangeCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); mAppearanceTabs = getChild<LLTabContainer>("appearance_tabs"); mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this)); @@ -776,12 +822,6 @@ BOOL LLPanelOutfitsInventory::isCOFPanelActive() const void LLPanelOutfitsInventory::setWearablesLoading(bool val) { mListCommands->childSetEnabled("wear_btn", !val); - - llassert(mParent); - if (mParent) - { - mParent->setWearablesLoading(val); - } } void LLPanelOutfitsInventory::onWearablesLoaded() @@ -789,6 +829,12 @@ void LLPanelOutfitsInventory::onWearablesLoaded() setWearablesLoading(false); } +void LLPanelOutfitsInventory::onWearablesLoading() +{ + setWearablesLoading(true); +} + +// static LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP() { static LLSidepanelAppearance* panel_appearance = diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index aff7839bcc..eabfda7f8c 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -72,10 +72,9 @@ public: // If a compatible listener type is selected, then return a pointer to that. // Otherwise, return NULL. LLFolderViewEventListener* getCorrectListenerForAction(); - void setParent(LLSidepanelAppearance *parent); LLFolderView* getRootFolder(); - LLSidepanelAppearance* getAppearanceSP(); + static LLSidepanelAppearance* getAppearanceSP(); static LLPanelOutfitsInventory* findInstance(); @@ -84,7 +83,6 @@ protected: bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const; private: - LLSidepanelAppearance* mParent; LLSaveFolderState* mSavedFolderState; LLTabContainer* mAppearanceTabs; std::string mFilterSubString; @@ -127,6 +125,7 @@ protected: bool hasItemsSelected(); void setWearablesLoading(bool val); void onWearablesLoaded(); + void onWearablesLoading(); private: LLPanel* mListCommands; LLOutfitListGearMenu* mGearMenu; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 7f20079d14..08f412721d 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1449,6 +1449,8 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded() LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion"); accordion->arrange(); + // *TODO: new no_matched_tabs_text attribute was implemented in accordion (EXT-7368). + // this code should be refactored to use it // keep help text in a synchronization with accordions visibility. updateFriendListHelpText(); } diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 2a8249f4b6..d962b15419 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -86,7 +86,9 @@ LLPanelPlaceProfile::LLPanelPlaceProfile() // virtual LLPanelPlaceProfile::~LLPanelPlaceProfile() -{} +{ + gIdleCallbacks.deleteFunction(&LLPanelPlaceProfile::updateYouAreHereBanner, this); +} // virtual BOOL LLPanelPlaceProfile::postBuild() diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 028440562d..705b196ef1 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -1038,7 +1038,7 @@ void LLPanelPlaces::showAddedLandmarkInfo(const uuid_vec_t& items) ++item_iter) { const LLUUID& item_id = (*item_iter); - if(!highlight_offered_item(item_id)) + if(!highlight_offered_object(item_id)) { continue; } diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index e8b6c6bfe5..1048e3fcc0 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -564,6 +564,7 @@ void LLTeleportHistoryPanel::updateVerbs() { mTeleportBtn->setEnabled(false); mShowProfile->setEnabled(false); + mShowOnMapBtn->setEnabled(false); return; } @@ -571,7 +572,7 @@ void LLTeleportHistoryPanel::updateVerbs() mTeleportBtn->setEnabled(NULL != itemp); mShowProfile->setEnabled(NULL != itemp); - mShowOnMapBtn->setEnabled(true); + mShowOnMapBtn->setEnabled(NULL != itemp); } void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date) @@ -647,16 +648,18 @@ void LLTeleportHistoryPanel::refresh() LLDate tab_boundary_date = LLDate::now(); LLFlatListView* curr_flat_view = NULL; + std::string filter_string = sFilterSubString; + LLStringUtil::toUpper(filter_string); U32 added_items = 0; while (mCurrentItem >= 0) { // Filtering - if (!sFilterSubString.empty()) + if (!filter_string.empty()) { std::string landmark_title(items[mCurrentItem].mTitle); LLStringUtil::toUpper(landmark_title); - if( std::string::npos == landmark_title.find(sFilterSubString) ) + if( std::string::npos == landmark_title.find(filter_string) ) { mCurrentItem--; continue; @@ -705,7 +708,7 @@ void LLTeleportHistoryPanel::refresh() .getFlatItemForPersistentItem(&mContextMenu, items[mCurrentItem], mCurrentItem, - sFilterSubString); + filter_string); if ( !curr_flat_view->addItem(item, LLUUID::null, ADD_BOTTOM, false) ) llerrs << "Couldn't add flat item to teleport history." << llendl; if (mLastSelectedItemIndex == mCurrentItem) @@ -728,6 +731,8 @@ void LLTeleportHistoryPanel::refresh() } } + mHistoryAccordion->setFilterSubString(sFilterSubString); + mHistoryAccordion->arrange(); updateVerbs(); diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp new file mode 100644 index 0000000000..68dc1cdf71 --- /dev/null +++ b/indra/newview/llpaneltopinfobar.cpp @@ -0,0 +1,426 @@ +/** + * @file llpaneltopinfobar.cpp + * @brief Coordinates and Parcel Settings information panel definition + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpaneltopinfobar.h" + +#include "llagent.h" +#include "llagentui.h" +#include "llclipboard.h" +#include "lllandmarkactions.h" +#include "lllocationinputctrl.h" +#include "llnotificationsutil.h" +#include "llparcel.h" +#include "llsidetray.h" +#include "llslurl.h" +#include "llstatusbar.h" +#include "llviewercontrol.h" +#include "llviewerinventory.h" +#include "llviewermenu.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" + +class LLPanelTopInfoBar::LLParcelChangeObserver : public LLParcelObserver +{ +public: + LLParcelChangeObserver(LLPanelTopInfoBar* topInfoBar) : mTopInfoBar(topInfoBar) {} + +private: + /*virtual*/ void changed() + { + if (mTopInfoBar) + { + mTopInfoBar->updateParcelIcons(); + } + } + + LLPanelTopInfoBar* mTopInfoBar; +}; + +LLPanelTopInfoBar::LLPanelTopInfoBar(): mParcelChangedObserver(0) +{ + LLUICtrl::CommitCallbackRegistry::currentRegistrar() + .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2)); + + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_topinfo_bar.xml"); +} + +LLPanelTopInfoBar::~LLPanelTopInfoBar() +{ + if (mParcelChangedObserver) + { + LLViewerParcelMgr::getInstance()->removeObserver(mParcelChangedObserver); + delete mParcelChangedObserver; + } + + if (mParcelPropsCtrlConnection.connected()) + { + mParcelPropsCtrlConnection.disconnect(); + } + + if (mParcelMgrConnection.connected()) + { + mParcelMgrConnection.disconnect(); + } + + if (mShowCoordsCtrlConnection.connected()) + { + mShowCoordsCtrlConnection.disconnect(); + } +} + +void LLPanelTopInfoBar::initParcelIcons() +{ + mParcelIcon[VOICE_ICON] = getChild<LLIconCtrl>("voice_icon"); + mParcelIcon[FLY_ICON] = getChild<LLIconCtrl>("fly_icon"); + mParcelIcon[PUSH_ICON] = getChild<LLIconCtrl>("push_icon"); + mParcelIcon[BUILD_ICON] = getChild<LLIconCtrl>("build_icon"); + mParcelIcon[SCRIPTS_ICON] = getChild<LLIconCtrl>("scripts_icon"); + mParcelIcon[DAMAGE_ICON] = getChild<LLIconCtrl>("damage_icon"); + + mParcelIcon[VOICE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, VOICE_ICON)); + mParcelIcon[FLY_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, FLY_ICON)); + mParcelIcon[PUSH_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, PUSH_ICON)); + mParcelIcon[BUILD_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, BUILD_ICON)); + mParcelIcon[SCRIPTS_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, SCRIPTS_ICON)); + mParcelIcon[DAMAGE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, DAMAGE_ICON)); + + mDamageText->setText(LLStringExplicit("100%")); +} + +void LLPanelTopInfoBar::handleLoginComplete() +{ + // An agent parcel update hasn't occurred yet, so + // we have to manually set location and the icons. + update(); +} + +BOOL LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + show_topinfobar_context_menu(this, x, y); + return TRUE; +} + +BOOL LLPanelTopInfoBar::postBuild() +{ + mInfoBtn = getChild<LLButton>("place_info_btn"); + mInfoBtn->setClickedCallback(boost::bind(&LLPanelTopInfoBar::onInfoButtonClicked, this)); + + mParcelInfoText = getChild<LLTextBox>("parcel_info_text"); + mDamageText = getChild<LLTextBox>("damage_text"); + + initParcelIcons(); + + mParcelChangedObserver = new LLParcelChangeObserver(this); + LLViewerParcelMgr::getInstance()->addObserver(mParcelChangedObserver); + + // Connecting signal for updating parcel icons on "Show Parcel Properties" setting change. + LLControlVariable* ctrl = gSavedSettings.getControl("NavBarShowParcelProperties").get(); + if (ctrl) + { + mParcelPropsCtrlConnection = ctrl->getSignal()->connect(boost::bind(&LLPanelTopInfoBar::updateParcelIcons, this)); + } + + // Connecting signal for updating parcel text on "Show Coordinates" setting change. + ctrl = gSavedSettings.getControl("NavBarShowCoordinates").get(); + if (ctrl) + { + mShowCoordsCtrlConnection = ctrl->getSignal()->connect(boost::bind(&LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged, this)); + } + + mParcelMgrConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( + boost::bind(&LLPanelTopInfoBar::onAgentParcelChange, this)); + + return TRUE; +} + +void LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged() +{ + std::string new_text; + + // don't need to have separate show_coords variable; if user requested the coords to be shown + // they will be added during the next call to the draw() method. + buildLocationString(new_text, false); + setParcelInfoText(new_text); +} + +void LLPanelTopInfoBar::draw() +{ + updateParcelInfoText(); + updateHealth(); + + LLPanel::draw(); +} + +void LLPanelTopInfoBar::buildLocationString(std::string& loc_str, bool show_coords) +{ + LLAgentUI::ELocationFormat format = + (show_coords ? LLAgentUI::LOCATION_FORMAT_FULL : LLAgentUI::LOCATION_FORMAT_NO_COORDS); + + if (!LLAgentUI::buildLocationString(loc_str, format)) + { + loc_str = "???"; + } +} + +void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text) +{ + const LLFontGL* font = mParcelInfoText->getDefaultFont(); + S32 new_text_width = font->getWidth(new_text); + + mParcelInfoText->setText(new_text); + + LLRect rect = mParcelInfoText->getRect(); + rect.setOriginAndSize(rect.mLeft, rect.mBottom, new_text_width, rect.getHeight()); + + mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), TRUE); + mParcelInfoText->setRect(rect); + layoutParcelIcons(); +} + +void LLPanelTopInfoBar::update() +{ + std::string new_text; + + // don't need to have separate show_coords variable; if user requested the coords to be shown + // they will be added during the next call to the draw() method. + buildLocationString(new_text, false); + setParcelInfoText(new_text); + + updateParcelIcons(); +} + +void LLPanelTopInfoBar::updateParcelInfoText() +{ + static LLUICachedControl<bool> show_coords("NavBarShowCoordinates", false); + + if (show_coords) + { + std::string new_text; + + buildLocationString(new_text, show_coords); + setParcelInfoText(new_text); + } +} + +void LLPanelTopInfoBar::updateParcelIcons() +{ + LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); + + LLViewerRegion* agent_region = gAgent.getRegion(); + LLParcel* agent_parcel = vpm->getAgentParcel(); + if (!agent_region || !agent_parcel) + return; + + if (gSavedSettings.getBOOL("NavBarShowParcelProperties")) + { + LLParcel* current_parcel; + LLViewerRegion* selection_region = vpm->getSelectionRegion(); + LLParcel* selected_parcel = vpm->getParcelSelection()->getParcel(); + + // If agent is in selected parcel we use its properties because + // they are updated more often by LLViewerParcelMgr than agent parcel properties. + // See LLViewerParcelMgr::processParcelProperties(). + // This is needed to reflect parcel restrictions changes without having to leave + // the parcel and then enter it again. See EXT-2987 + if (selected_parcel && selected_parcel->getLocalID() == agent_parcel->getLocalID() + && selection_region == agent_region) + { + current_parcel = selected_parcel; + } + else + { + current_parcel = agent_parcel; + } + + bool allow_voice = vpm->allowAgentVoice(agent_region, current_parcel); + bool allow_fly = vpm->allowAgentFly(agent_region, current_parcel); + bool allow_push = vpm->allowAgentPush(agent_region, current_parcel); + bool allow_build = vpm->allowAgentBuild(current_parcel); // true when anyone is allowed to build. See EXT-4610. + bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel); + bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); + + // Most icons are "block this ability" + mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); + mParcelIcon[FLY_ICON]->setVisible( !allow_fly ); + mParcelIcon[PUSH_ICON]->setVisible( !allow_push ); + mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); + mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); + mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); + mDamageText->setVisible(allow_damage); + + layoutParcelIcons(); + } + else + { + for (S32 i = 0; i < ICON_COUNT; ++i) + { + mParcelIcon[i]->setVisible(false); + } + mDamageText->setVisible(false); + } +} + +void LLPanelTopInfoBar::updateHealth() +{ + static LLUICachedControl<bool> show_icons("NavBarShowParcelProperties", false); + + // *FIXME: Status bar owns health information, should be in agent + if (show_icons && gStatusBar) + { + static S32 last_health = -1; + S32 health = gStatusBar->getHealth(); + if (health != last_health) + { + std::string text = llformat("%d%%", health); + mDamageText->setText(text); + last_health = health; + } + } +} + +void LLPanelTopInfoBar::layoutParcelIcons() +{ + // TODO: remove hard-coded values and read them as xml parameters + static const int FIRST_ICON_HPAD = 32; + static const int LAST_ICON_HPAD = 11; + + S32 left = mParcelInfoText->getRect().mRight + FIRST_ICON_HPAD; + + left = layoutWidget(mDamageText, left); + + for (int i = ICON_COUNT - 1; i >= 0; --i) + { + left = layoutWidget(mParcelIcon[i], left); + } + + LLRect rect = getRect(); + rect.set(rect.mLeft, rect.mTop, left + LAST_ICON_HPAD, rect.mBottom); + setRect(rect); +} + +S32 LLPanelTopInfoBar::layoutWidget(LLUICtrl* ctrl, S32 left) +{ + // TODO: remove hard-coded values and read them as xml parameters + static const int ICON_HPAD = 2; + + if (ctrl->getVisible()) + { + LLRect rect = ctrl->getRect(); + rect.mRight = left + rect.getWidth(); + rect.mLeft = left; + + ctrl->setRect(rect); + left += rect.getWidth() + ICON_HPAD; + } + + return left; +} + +void LLPanelTopInfoBar::onParcelIconClick(EParcelIcon icon) +{ + switch (icon) + { + case VOICE_ICON: + LLNotificationsUtil::add("NoVoice"); + break; + case FLY_ICON: + LLNotificationsUtil::add("NoFly"); + break; + case PUSH_ICON: + LLNotificationsUtil::add("PushRestricted"); + break; + case BUILD_ICON: + LLNotificationsUtil::add("NoBuild"); + break; + case SCRIPTS_ICON: + { + LLViewerRegion* region = gAgent.getRegion(); + if(region && region->getRegionFlags() & REGION_FLAGS_ESTATE_SKIP_SCRIPTS) + { + LLNotificationsUtil::add("ScriptsStopped"); + } + else if(region && region->getRegionFlags() & REGION_FLAGS_SKIP_SCRIPTS) + { + LLNotificationsUtil::add("ScriptsNotRunning"); + } + else + { + LLNotificationsUtil::add("NoOutsideScripts"); + } + break; + } + case DAMAGE_ICON: + LLNotificationsUtil::add("NotSafe"); + break; + case ICON_COUNT: + break; + // no default to get compiler warning when a new icon gets added + } +} + +void LLPanelTopInfoBar::onAgentParcelChange() +{ + update(); +} + +void LLPanelTopInfoBar::onContextMenuItemClicked(const LLSD::String& item) +{ + if (item == "landmark") + { + LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos(); + + if(landmark == NULL) + { + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); + } + else + { + LLSideTray::getInstance()->showPanel("panel_places", + LLSD().with("type", "landmark").with("id",landmark->getUUID())); + } + } + else if (item == "copy") + { + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl, false); + LLUIString location_str(slurl.getSLURLString()); + + gClipboard.copyFromString(location_str); + } +} + +void LLPanelTopInfoBar::onInfoButtonClicked() +{ + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); +} diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h new file mode 100644 index 0000000000..e417a06a64 --- /dev/null +++ b/indra/newview/llpaneltopinfobar.h @@ -0,0 +1,159 @@ +/** + * @file llpaneltopinfobar.h + * @brief Coordinates and Parcel Settings information panel definition + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LLPANELTOPINFOBAR_H_ +#define LLPANELTOPINFOBAR_H_ + +#include "llpanel.h" + +class LLButton; +class LLTextBox; +class LLIconCtrl; +class LLParcelChangeObserver; + +class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar> +{ + LOG_CLASS(LLPanelTopInfoBar); + +public: + LLPanelTopInfoBar(); + ~LLPanelTopInfoBar(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void draw(); + + /** + * Updates location and parcel icons on login complete + */ + void handleLoginComplete(); + +private: + class LLParcelChangeObserver; + + friend class LLParcelChangeObserver; + + enum EParcelIcon + { + VOICE_ICON = 0, + FLY_ICON, + PUSH_ICON, + BUILD_ICON, + SCRIPTS_ICON, + DAMAGE_ICON, + ICON_COUNT + }; + + /** + * Initializes parcel icons controls. Called from the constructor. + */ + void initParcelIcons(); + + BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + + /** + * Handles clicks on the parcel icons. + */ + void onParcelIconClick(EParcelIcon icon); + + /** + * Handles clicks on the info buttons. + */ + void onInfoButtonClicked(); + + /** + * Called when agent changes the parcel. + */ + void onAgentParcelChange(); + + /** + * Called when context menu item is clicked. + */ + void onContextMenuItemClicked(const LLSD::String& userdata); + + /** + * Called when user checks/unchecks Show Coordinates menu item. + */ + void onNavBarShowParcelPropertiesCtrlChanged(); + + /** + * Shorthand to call updateParcelInfoText() and updateParcelIcons(). + */ + void update(); + + /** + * Updates parcel info text (mParcelInfoText). + */ + void updateParcelInfoText(); + + /** + * Updates parcel icons (mParcelIcon[]). + */ + void updateParcelIcons(); + + /** + * Updates health information (mDamageText). + */ + void updateHealth(); + + /** + * Lays out all parcel icons starting from right edge of the mParcelInfoText + 11px + * (see screenshots in EXT-5808 for details). + */ + void layoutParcelIcons(); + + /** + * Lays out a widget. Widget's rect mLeft becomes equal to the 'left' argument. + */ + S32 layoutWidget(LLUICtrl* ctrl, S32 left); + + /** + * Generates location string and returns it in the loc_str parameter. + */ + void buildLocationString(std::string& loc_str, bool show_coords); + + /** + * Sets new value to the mParcelInfoText and updates the size of the top bar. + */ + void setParcelInfoText(const std::string& new_text); + + LLButton* mInfoBtn; + LLTextBox* mParcelInfoText; + LLTextBox* mDamageText; + LLIconCtrl* mParcelIcon[ICON_COUNT]; + LLParcelChangeObserver* mParcelChangedObserver; + + boost::signals2::connection mParcelPropsCtrlConnection; + boost::signals2::connection mShowCoordsCtrlConnection; + boost::signals2::connection mParcelMgrConnection; +}; + +#endif /* LLPANELTOPINFOBAR_H_ */ diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp new file mode 100644 index 0000000000..fd470798ee --- /dev/null +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -0,0 +1,169 @@ +/** + * @file llpanelvoiceeffect.cpp + * @author Aimee + * @brief Panel to select Voice Morphs. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanelvoiceeffect.h" + +#include "llcombobox.h" +#include "llfloaterreg.h" +#include "llpanel.h" +#include "lltrans.h" +#include "lltransientfloatermgr.h" +#include "llvoiceclient.h" + +static LLRegisterPanelClassWrapper<LLPanelVoiceEffect> t_panel_voice_effect("panel_voice_effect"); + +LLPanelVoiceEffect::LLPanelVoiceEffect() + : mVoiceEffectCombo(NULL) +{ + mCommitCallbackRegistrar.add("Voice.CommitVoiceEffect", boost::bind(&LLPanelVoiceEffect::onCommitVoiceEffect, this)); +} + +LLPanelVoiceEffect::~LLPanelVoiceEffect() +{ + LLView* combo_list_view = mVoiceEffectCombo->getChildView("ComboBox"); + LLTransientFloaterMgr::getInstance()->removeControlView(combo_list_view); + + if(LLVoiceClient::instanceExists()) + { + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->removeObserver(this); + } + } +} + +// virtual +BOOL LLPanelVoiceEffect::postBuild() +{ + mVoiceEffectCombo = getChild<LLComboBox>("voice_effect"); + + // Need to tell LLTransientFloaterMgr about the combo list, otherwise it can't + // be clicked while in a docked floater as it extends outside the floater area. + LLView* combo_list_view = mVoiceEffectCombo->getChildView("ComboBox"); + LLTransientFloaterMgr::getInstance()->addControlView(combo_list_view); + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->addObserver(this); + } + + update(true); + + return TRUE; +} + +////////////////////////////////////////////////////////////////////////// +/// PRIVATE SECTION +////////////////////////////////////////////////////////////////////////// + +void LLPanelVoiceEffect::onCommitVoiceEffect() +{ + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (!effect_interface) + { + mVoiceEffectCombo->setEnabled(false); + return; + } + + LLSD value = mVoiceEffectCombo->getValue(); + if (value.asInteger() == PREVIEW_VOICE_EFFECTS) + { + // Open the Voice Morph preview floater + LLFloaterReg::showInstance("voice_effect"); + } + else if (value.asInteger() == GET_VOICE_EFFECTS) + { + // Open the voice morphing info web page + LLWeb::loadURL(LLTrans::getString("voice_morphing_url")); + } + else + { + effect_interface->setVoiceEffect(value.asUUID()); + } + + mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect()); +} + +// virtual +void LLPanelVoiceEffect::onVoiceEffectChanged(bool effect_list_updated) +{ + update(effect_list_updated); +} + +void LLPanelVoiceEffect::update(bool list_updated) +{ + if (mVoiceEffectCombo) + { + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (list_updated) + { + // Add the default "No Voice Morph" entry. + mVoiceEffectCombo->removeall(); + mVoiceEffectCombo->add(getString("no_voice_effect"), LLUUID::null); + mVoiceEffectCombo->addSeparator(); + + // Add entries for each Voice Morph. + const voice_effect_list_t& effect_list = effect_interface->getVoiceEffectList(); + if (!effect_list.empty()) + { + for (voice_effect_list_t::const_iterator it = effect_list.begin(); it != effect_list.end(); ++it) + { + mVoiceEffectCombo->add(it->first, it->second, ADD_BOTTOM); + } + + mVoiceEffectCombo->addSeparator(); + } + + // Add the fixed entries to go to the preview floater or marketing page. + mVoiceEffectCombo->add(getString("preview_voice_effects"), PREVIEW_VOICE_EFFECTS); + mVoiceEffectCombo->add(getString("get_voice_effects"), GET_VOICE_EFFECTS); + } + + if (effect_interface && LLVoiceClient::instance().isVoiceWorking()) + { + // Select the current Voice Morph. + mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect()); + mVoiceEffectCombo->setEnabled(true); + } + else + { + // If voice isn't working or Voice Effects are not supported disable the control. + mVoiceEffectCombo->setValue(LLUUID::null); + mVoiceEffectCombo->setEnabled(false); + } + } +} diff --git a/indra/newview/llpanelvoiceeffect.h b/indra/newview/llpanelvoiceeffect.h new file mode 100644 index 0000000000..b5bf2f05a8 --- /dev/null +++ b/indra/newview/llpanelvoiceeffect.h @@ -0,0 +1,73 @@ +/** + * @file llpanelvoiceeffect.h + * @author Aimee + * @brief Panel to select Voice Effects. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_PANELVOICEEFFECT_H +#define LL_PANELVOICEEFFECT_H + +#include "llpanel.h" +#include "llvoiceclient.h" + +class LLComboBox; + +class LLPanelVoiceEffect + : public LLPanel + , public LLVoiceEffectObserver +{ +public: + LOG_CLASS(LLPanelVoiceEffect); + + LLPanelVoiceEffect(); + virtual ~LLPanelVoiceEffect(); + + virtual BOOL postBuild(); + +private: + void onCommitVoiceEffect(); + void update(bool list_updated); + + /// Called by voice effect provider when voice effect list is changed. + virtual void onVoiceEffectChanged(bool effect_list_updated); + + // Fixed entries in the Voice Morph list + typedef enum e_voice_effect_combo_items + { + NO_VOICE_EFFECT = 0, + PREVIEW_VOICE_EFFECTS = 1, + GET_VOICE_EFFECTS = 2 + } EVoiceEffectComboItems; + + LLComboBox* mVoiceEffectCombo; +}; + + +#endif //LL_PANELVOICEEFFECT_H diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 986f71ae7b..a39dc6cef9 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -52,6 +52,18 @@ static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR; +// helper function to update AvatarList Item's indicator in the voice participant list +static void update_speaker_indicator(const LLAvatarList* const avatar_list, const LLUUID& avatar_uuid, bool is_muted) +{ + LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(avatar_list->getItemByValue(avatar_uuid)); + if (item) + { + LLOutputMonitorCtrl* indicator = item->getChild<LLOutputMonitorCtrl>("speaking_indicator"); + indicator->setIsMuted(is_muted); + } +} + + // See EXT-4301. /** * class LLAvalineUpdater - observe the list of voice participants in session and check @@ -94,7 +106,7 @@ public: mAvalineCallers.insert(avaline_caller_id); } - void onChange() + void onParticipantsChanged() { uuid_set_t participant_uuids; LLVoiceClient::getInstance()->getParticipantList(participant_uuids); @@ -369,6 +381,20 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) } } } + + // update voice mute state of all items. See EXT-7235 + LLSpeakerMgr::speaker_list_t speaker_list; + + // Use also participants which are not in voice session now (the second arg is TRUE). + // They can already have mModeratorMutedVoice set from the previous voice session + // and LLSpeakerVoiceModerationEvent will not be sent when speaker manager is updated next time. + mSpeakerMgr->getSpeakerList(&speaker_list, TRUE); + for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) + { + const LLPointer<LLSpeaker>& speakerp = *it; + + update_speaker_indicator(list, speakerp->mID, speakerp->mModeratorMutedVoice); + } } } @@ -521,12 +547,7 @@ bool LLParticipantList::onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event // update UI on confirmation of moderator mutes if (event->getValue().asString() == "voice") { - LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mAvatarList->getItemByValue(speakerp->mID)); - if (item) - { - LLOutputMonitorCtrl* indicator = item->getChild<LLOutputMonitorCtrl>("speaking_indicator"); - indicator->setIsMuted(speakerp->mModeratorMutedVoice); - } + update_speaker_indicator(mAvatarList, speakerp->mID, speakerp->mModeratorMutedVoice); } return true; } diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 2e061b235d..ff315d3c53 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -31,55 +31,31 @@ */ #include "llviewerprecompiledheaders.h" - #include "llpreviewgesture.h" -#include <algorithm> - -// libraries -#include "lldatapacker.h" -#include "lldarray.h" -#include "llstring.h" -#include "lldir.h" +#include "llagent.h" +#include "llanimstatelabels.h" +#include "llanimationstates.h" +#include "llappviewer.h" // gVFS +#include "llassetuploadresponders.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "lldelayedgestureerror.h" #include "llfloaterreg.h" +#include "llgesturemgr.h" #include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" #include "llmultigesture.h" #include "llnotificationsutil.h" -#include "llvfile.h" - -// newview -#include "llagent.h" // todo: remove -#include "llanimationstates.h" -#include "llassetuploadresponders.h" -#include "llbutton.h" -#include "llcheckboxctrl.h" -#include "llcombobox.h" -#include "lldelayedgestureerror.h" -#include "llfloatergesture.h" // for some label constants -#include "llgesturemgr.h" -#include "llkeyboard.h" -#include "lllineeditor.h" #include "llradiogroup.h" -#include "llscrolllistctrl.h" -#include "llscrolllistitem.h" -#include "llscrolllistcell.h" -#include "lltextbox.h" -#include "lluictrlfactory.h" -#include "llviewerinventory.h" -#include "llviewerobject.h" +#include "llresmgr.h" +#include "lltrans.h" +#include "llvfile.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "llviewerstats.h" -#include "llviewerwindow.h" // busycount -#include "llvoavatarself.h" -#include "llappviewer.h" // gVFS -#include "llanimstatelabels.h" -#include "llresmgr.h" -#include "lltrans.h" - std::string NONE_LABEL; std::string SHIFT_LABEL; @@ -832,7 +808,9 @@ void LLPreviewGesture::loadAsset() const LLInventoryItem* item = getItem(); if (!item) { - mAssetStatus = PREVIEW_ASSET_ERROR; + // Don't set asset status here; we may not have set the item id yet + // (e.g. when this gets called initially) + //mAssetStatus = PREVIEW_ASSET_ERROR; return; } diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 5968e936ef..b141b14445 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -34,10 +34,9 @@ #define LL_LLPREVIEWGESTURE_H #include "llassettype.h" -#include "llmultigesture.h" #include "llpreview.h" +#include "llmultigesture.h" -class LLMultiGesture; class LLLineEditor; class LLTextBox; class LLCheckBoxCtrl; @@ -45,7 +44,6 @@ class LLComboBox; class LLScrollListCtrl; class LLScrollListItem; class LLButton; -class LLGestureStep; class LLRadioGroup; class LLVFS; @@ -140,7 +138,7 @@ protected: static void onDonePreview(LLMultiGesture* gesture, void* data); -protected: +private: // LLPreview contains mDescEditor LLLineEditor* mTriggerEditor; LLTextBox* mReplaceText; @@ -173,4 +171,4 @@ protected: BOOL mDirty; }; -#endif +#endif // LL_LLPREVIEWGESTURE_H diff --git a/indra/newview/llsaveoutfitcombobtn.cpp b/indra/newview/llsaveoutfitcombobtn.cpp index b9b577084b..9518b0cbb3 100644 --- a/indra/newview/llsaveoutfitcombobtn.cpp +++ b/indra/newview/llsaveoutfitcombobtn.cpp @@ -34,6 +34,7 @@ #include "llappearancemgr.h" #include "llpaneloutfitsinventory.h" +#include "llsidepanelappearance.h" #include "llsaveoutfitcombobtn.h" #include "llviewermenu.h" diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index 242af6981c..6f5238f0a1 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -56,7 +56,7 @@ const S32 LLScrollingPanelParam::PARAM_HINT_HEIGHT = 128; S32 LLScrollingPanelParam::sUpdateDelayFrames = 0; LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable ) + LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp ) : LLScrollingPanel( panel_params ), mParam(param), mAllowModify(allow_modify), @@ -73,9 +73,9 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param F32 min_weight = param->getMinWeight(); F32 max_weight = param->getMaxWeight(); - mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, min_weight); + mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, min_weight, jointp); pos_x = getChild<LLViewBorder>("right_border")->getRect().mLeft + left_border->getBorderWidth(); - mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, max_weight ); + mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, max_weight, jointp ); mHintMin->setAllowsUpdates( FALSE ); mHintMax->setAllowsUpdates( FALSE ); diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h index fe4ce07166..3cdfd188a8 100644 --- a/indra/newview/llscrollingpanelparam.h +++ b/indra/newview/llscrollingpanelparam.h @@ -42,12 +42,13 @@ class LLViewerVisualParam; class LLWearable; class LLVisualParamHint; class LLViewerVisualParam; +class LLJoint; class LLScrollingPanelParam : public LLScrollingPanel { public: LLScrollingPanelParam( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable ); + LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp ); virtual ~LLScrollingPanelParam(); virtual void draw(); diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index d315f40ff3..668c04cf15 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -257,7 +257,6 @@ public: LLObjectSelection(); void updateEffects(); - void cleanupNodes(); BOOL isEmpty() const; @@ -281,11 +280,6 @@ public: template <typename T> bool getSelectedTEValue(LLSelectedTEGetFunctor<T>* func, T& res); template <typename T> bool isMultipleTEValue(LLSelectedTEGetFunctor<T>* func, const T& ignore_value); - void addNode(LLSelectNode *nodep); - void addNodeAtEnd(LLSelectNode *nodep); - void moveNodeToFront(LLSelectNode *nodep); - void removeNode(LLSelectNode *nodep); - void deleteAllNodes(); // Delete all nodes S32 getNumNodes(); LLSelectNode* findNode(LLViewerObject* objectp); @@ -313,6 +307,15 @@ public: ESelectType getSelectType() const { return mSelectType; } private: + void addNode(LLSelectNode *nodep); + void addNodeAtEnd(LLSelectNode *nodep); + void moveNodeToFront(LLSelectNode *nodep); + void removeNode(LLSelectNode *nodep); + void deleteAllNodes(); + void cleanupNodes(); + + +private: list_t mList; const LLObjectSelection &operator=(const LLObjectSelection &); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index b66789448f..0d1be91125 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -42,6 +42,7 @@ #include "llfloaterreg.h" #include "llfloaterworldmap.h" #include "llfoldervieweventlistener.h" +#include "lloutfitobserver.h" #include "llpaneleditwearable.h" #include "llpaneloutfitsinventory.h" #include "llsidetray.h" @@ -73,26 +74,6 @@ private: LLSidepanelAppearance *mPanel; }; -class LLWatchForOutfitRenameObserver : public LLInventoryObserver -{ -public: - LLWatchForOutfitRenameObserver(LLSidepanelAppearance *panel) : - mPanel(panel) - {} - virtual void changed(U32 mask); - -private: - LLSidepanelAppearance *mPanel; -}; - -void LLWatchForOutfitRenameObserver::changed(U32 mask) -{ - if (mask & LABEL) - { - mPanel->refreshCurrentOutfitName(); - } -} - LLSidepanelAppearance::LLSidepanelAppearance() : LLPanel(), mFilterSubString(LLStringUtil::null), @@ -101,12 +82,17 @@ LLSidepanelAppearance::LLSidepanelAppearance() : mCurrOutfitPanel(NULL), mOpened(false) { + LLOutfitObserver& outfit_observer = LLOutfitObserver::instance(); + outfit_observer.addBOFReplacedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); + outfit_observer.addBOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); + outfit_observer.addCOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); + + gAgentWearables.addLoadingStartedCallback(boost::bind(&LLSidepanelAppearance::setWearablesLoading, this, true)); + gAgentWearables.addLoadedCallback(boost::bind(&LLSidepanelAppearance::setWearablesLoading, this, false)); } LLSidepanelAppearance::~LLSidepanelAppearance() { - gInventory.removeObserver(mOutfitRenameWatcher); - delete mOutfitRenameWatcher; } // virtual @@ -131,7 +117,6 @@ BOOL LLSidepanelAppearance::postBuild() } mPanelOutfitsInventory = dynamic_cast<LLPanelOutfitsInventory *>(getChild<LLPanel>("panel_outfits_inventory")); - mPanelOutfitsInventory->setParent(this); mOutfitEdit = dynamic_cast<LLPanelOutfitEdit*>(getChild<LLPanel>("panel_outfit_edit")); if (mOutfitEdit) @@ -160,8 +145,6 @@ BOOL LLSidepanelAppearance::postBuild() mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook"); - mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this); - gInventory.addObserver(mOutfitRenameWatcher); setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChange,this,_2)); @@ -209,7 +192,7 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility) { if ((mOutfitEdit && mOutfitEdit->getVisible()) || (mEditWearable && mEditWearable->getVisible())) { - if (!gAgentCamera.cameraCustomizeAvatar()) + if (!gAgentCamera.cameraCustomizeAvatar() && gSavedSettings.getBOOL("AppearanceCameraMovement")) { gAgentCamera.changeCameraToCustomizeAvatar(); } @@ -217,9 +200,10 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility) } else { - if (gAgentCamera.cameraCustomizeAvatar()) + if (gAgentCamera.cameraCustomizeAvatar() && gSavedSettings.getBOOL("AppearanceCameraMovement")) { gAgentCamera.changeCameraToDefault(); + gAgentCamera.resetView(); } } } @@ -345,6 +329,7 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam else if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) { gAgentCamera.changeCameraToDefault(); + gAgentCamera.resetView(); } } @@ -370,12 +355,12 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we if (visible) { - mEditWearable->setWearable(wearable); - mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) { gAgentCamera.changeCameraToCustomizeAvatar(); } + mEditWearable->setWearable(wearable); + mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency } else { @@ -384,6 +369,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) { gAgentCamera.changeCameraToDefault(); + gAgentCamera.resetView(); } } } @@ -403,7 +389,9 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) mCurrentLookName->setText(outfit_name); return; } - mCurrentLookName->setText(getString("No Outfit")); + + std::string look_name = gAgentWearables.isCOFChangeInProgress() ? "" : getString("No Outfit"); + mCurrentLookName->setText(look_name); mOpenOutfitBtn->setEnabled(FALSE); } else diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 30022ae375..812d6362ef 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -40,7 +40,6 @@ class LLFilterEditor; class LLCurrentlyWornFetchObserver; -class LLWatchForOutfitRenameObserver; class LLPanelEditWearable; class LLWearable; class LLPanelOutfitsInventory; @@ -97,9 +96,6 @@ private: // Used to make sure the user's inventory is in memory. LLCurrentlyWornFetchObserver* mFetchWorn; - // Used to update title when currently worn outfit gets renamed. - LLWatchForOutfitRenameObserver* mOutfitRenameWatcher; - // Search string for filtering landmarks and teleport // history locations std::string mFilterSubString; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index fc5143d33b..63b6fe5ef0 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -88,6 +88,8 @@ BOOL LLSidepanelInventory::postBuild() mPanelMainInventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); mPanelMainInventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2)); + LLTabContainer* tabs = mPanelMainInventory->getChild<LLTabContainer>("inventory filter tabs"); + tabs->setCommitCallback(boost::bind(&LLSidepanelInventory::updateVerbs, this)); /* EXT-4846 : "Can we suppress the "Landmarks" and "My Favorites" folder since they have their own Task Panel?" diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 2dc17e741d..13275d14c0 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -51,8 +51,13 @@ public: /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any. + LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; } BOOL isMainInventoryPanelActive() const; + void showItemInfoPanel(); + void showTaskInfoPanel(); + void showInventoryPanel(); + protected: // Tracks highlighted (selected) item in inventory panel. LLInventoryItem *getSelectedItem(); @@ -62,9 +67,6 @@ protected: void performActionOnSelection(const std::string &action); bool canShare(); - void showItemInfoPanel(); - void showTaskInfoPanel(); - void showInventoryPanel(); void updateVerbs(); // diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 475a6b1da7..f71a4a475b 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -80,6 +80,7 @@ static LLRegisterPanelClassWrapper<LLSidepanelTaskInfo> t_task_info("sidepanel_t LLSidepanelTaskInfo::LLSidepanelTaskInfo() { setMouseOpaque(FALSE); + LLSelectMgr::instance().mUpdateSignal.connect(boost::bind(&LLSidepanelTaskInfo::refreshAll, this)); } @@ -271,7 +272,6 @@ void LLSidepanelTaskInfo::refresh() // BUG: fails if a root and non-root are both single-selected. const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); - const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); S32 string_index = 0; std::string MODIFY_INFO_STRINGS[] = @@ -365,14 +365,14 @@ void LLSidepanelTaskInfo::refresh() if (is_one_object) { - if (keyboard_focus_view != LineEditorObjectName) + if (!LineEditorObjectName->hasFocus()) { childSetText("Object Name",nodep->mName); } if (LineEditorObjectDesc) { - if (keyboard_focus_view != LineEditorObjectDesc) + if (!LineEditorObjectDesc->hasFocus()) { LineEditorObjectDesc->setText(nodep->mDescription); } @@ -1178,9 +1178,30 @@ void LLSidepanelTaskInfo::save() onCommitIncludeInSearch(getChild<LLCheckBoxCtrl>("search_check"), this); } +// removes keyboard focus so that all fields can be updated +// and then restored focus +void LLSidepanelTaskInfo::refreshAll() +{ + // update UI as soon as we have an object + // but remove keyboard focus first so fields are free to update + LLFocusableElement* focus = NULL; + if (hasFocus()) + { + focus = gFocusMgr.getKeyboardFocus(); + setFocus(FALSE); + } + refresh(); + if (focus) + { + focus->setFocus(TRUE); + } +} + + void LLSidepanelTaskInfo::setObjectSelection(LLObjectSelectionHandle selection) { mObjectSelection = selection; + refreshAll(); } LLSidepanelTaskInfo* LLSidepanelTaskInfo::getActivePanel() diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 15274c90db..010173e84e 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -67,6 +67,8 @@ protected: /*virtual*/ void save(); /*virtual*/ void updateVerbs(); + void refreshAll(); // ignore current keyboard focus and update all fields + // statics static void onClickClaim(void*); static void onClickRelease(void*); @@ -120,7 +122,7 @@ protected: LLViewerObject* getObject(); private: LLViewerObject* mObject; - LLObjectSelectionHandle mObjectSelection; + LLObjectSelectionHandle mObjectSelection; static LLSidepanelTaskInfo* sActivePanel; }; diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 3c97f01887..fed39c362e 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -35,6 +35,7 @@ #include "lltextbox.h" #include "llagentcamera.h" +#include "llappviewer.h" #include "llbottomtray.h" #include "llsidetray.h" #include "llviewerwindow.h" @@ -272,9 +273,18 @@ BOOL LLSideTray::postBuild() collapseSideBar(); setMouseOpaque(false); + + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSideTray::handleLoginComplete, this)); + return true; } +void LLSideTray::handleLoginComplete() +{ + //reset tab to "home" tab if it was changesd during login process + selectTabByName("sidebar_home"); +} + LLSideTrayTab* LLSideTray::getTab(const std::string& name) { return getChild<LLSideTrayTab>(name,false); @@ -469,6 +479,9 @@ void LLSideTray::reflectCollapseChange() } gFloaterView->refresh(); + + LLSD new_value = mCollapsed; + mCollapseSignal(this,new_value); } void LLSideTray::arrange() diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index e8fdee9430..3a8d308425 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -159,6 +159,10 @@ public: void updateSidetrayVisibility(); + commit_signal_t& getCollapseSignal() { return mCollapseSignal; } + + void handleLoginComplete(); + protected: LLSideTrayTab* getTab (const std::string& name); @@ -187,6 +191,8 @@ private: child_vector_t mTabs; LLSideTrayTab* mActiveTab; + commit_signal_t mCollapseSignal; + LLButton* mCollapseButton; bool mCollapsed; diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index ff7e479368..0df7035f84 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -48,8 +48,9 @@ const char* LLSLURL::SLURL_COM = "slurl.com"; // text with www.slurl.com or a link explicitly pointing at www.slurl.com so testing for this // version is required also. -const char* LLSLURL::WWW_SLURL_COM = "www.slurl.com"; -const char* LLSLURL::MAPS_SECONDLIFE_COM = "maps.secondlife.com"; +const char* LLSLURL::WWW_SLURL_COM = "www.slurl.com"; +const char* LLSLURL::SECONDLIFE_COM = "secondlife.com"; +const char* LLSLURL::MAPS_SECONDLIFE_COM = "maps.secondlife.com"; const char* LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME = "x-grid-location-info"; const char* LLSLURL::SLURL_APP_PATH = "app"; const char* LLSLURL::SLURL_REGION_PATH = "region"; @@ -187,6 +188,15 @@ LLSLURL::LLSLURL(const std::string& slurl) (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) || (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME)) { + // *HACK: ignore http://secondlife.com/ URLs so that we can use + // http://secondlife.com/app/ redirect URLs + // This is only necessary while the server returns Release Note + // urls using this format rather that pointing to the wiki + if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME || + slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) && + slurl_uri.hostName() == LLSLURL::SECONDLIFE_COM) + return; + // We're dealing with either a Standalone style slurl or slurl.com slurl if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) || (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) || diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index 1210c398f1..e9b0e7f52a 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -47,6 +47,7 @@ public: static const char* SLURL_SECONDLIFE_PATH; static const char* SLURL_COM; static const char* WWW_SLURL_COM; + static const char* SECONDLIFE_COM; static const char* MAPS_SECONDLIFE_COM; static const char* SLURL_X_GRID_LOCATION_INFO_SCHEME; static LLSLURL START_LOCATION; diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 29237946d2..ea7601517d 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -107,7 +107,7 @@ private: * So, method does not calculate difference between these list it only switches off already * switched on indicators and switches on indicators of voice channel participants */ - void onChange(); + void onParticipantsChanged(); /** * Changes state of indicators specified by LLUUIDs @@ -205,7 +205,7 @@ void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_ mSwitchedIndicatorsOn.clear(); } -void SpeakingIndicatorManager::onChange() +void SpeakingIndicatorManager::onParticipantsChanged() { LL_DEBUGS("SpeakingIndicator") << "Voice participant list was changed, updating indicators" << LL_ENDL; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 89178fc30c..45c42dc208 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -200,7 +200,6 @@ #include "llstartuplistener.h" #if LL_WINDOWS -#include "llwindebug.h" #include "lldxhardware.h" #endif @@ -781,9 +780,6 @@ bool idle_startup() gViewerWindow->getWindow()->show(); display_startup(); - //DEV-10530. do cleanup. remove at some later date. jan-2009 - LLFloaterPreference::cleanupBadSetting(); - // DEV-16927. The following code removes errant keystrokes that happen while the window is being // first made visible. #ifdef _WIN32 @@ -1120,8 +1116,6 @@ bool idle_startup() LLVoiceClient::getInstance()->userAuthorized(gUserCredential->userID(), gAgentID); // create the default proximal channel LLVoiceChannel::initClass(); - // update the voice settings - LLVoiceClient::getInstance()->updateSettings(); LLGridManager::getInstance()->setFavorite(); LLStartUp::setStartupState( STATE_WORLD_INIT); } @@ -1295,6 +1289,10 @@ bool idle_startup() LLStartUp::initNameCache(); + // update the voice settings *after* gCacheName initialization + // so that we can construct voice UI that relies on the name cache + LLVoiceClient::getInstance()->updateSettings(); + //gCacheName is required for nearby chat history loading //so I just moved nearby history loading a few states further if (!gNoRender && gSavedPerAccountSettings.getBOOL("LogShowHistory")) @@ -2488,8 +2486,7 @@ void LLStartUp::saveInitialOutfit() { sWearablesLoadedCon.disconnect(); } - - LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit); + LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false); } std::string& LLStartUp::getInitialOutfitName() @@ -2632,12 +2629,6 @@ void reset_login() //--------------------------------------------------------------------------- - -bool LLStartUp::canGoFullscreen() -{ - return gStartupState >= STATE_WORLD_INIT; -} - // Initialize all plug-ins except the web browser (which was initialized // early, before the login screen). JC void LLStartUp::multimediaInit() diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 21d403b453..0cf683e2bd 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -81,9 +81,6 @@ extern LLPointer<LLViewerTexture> gStartTexture; class LLStartUp { public: - static bool canGoFullscreen(); - // returns true if we are far enough along in startup to allow - // going full screen // Always use this to set gStartupState so changes are logged static void setStartupState( EStartupState state ); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 5628205dd4..8c8fbdc88c 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -371,8 +371,7 @@ void LLStatusBar::refresh() void LLStatusBar::setVisibleForMouselook(bool visible) { mTextTime->setVisible(visible); - getChild<LLUICtrl>("buycurrency")->setVisible(visible); - getChild<LLUICtrl>("buyL")->setVisible(visible); + getChild<LLUICtrl>("balance_bg")->setVisible(visible); mBtnVolume->setVisible(visible); mMediaToggle->setVisible(visible); mSGBandwidth->setVisible(visible); @@ -394,18 +393,21 @@ void LLStatusBar::setBalance(S32 balance) { std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance ); - LLButton* btn_buy_currency = getChild<LLButton>("buycurrency"); + LLTextBox* balance_box = getChild<LLTextBox>("balance"); LLStringUtil::format_map_t string_args; string_args["[AMT]"] = llformat("%s", money_str.c_str()); std::string label_str = getString("buycurrencylabel", string_args); - btn_buy_currency->setLabel(label_str); + balance_box->setValue(label_str); - // Resize the balance button so that the label fits it, and the button expands to the left. - // *TODO: LLButton should have an option where to expand. + // Resize the L$ balance background to be wide enough for your balance plus the buy button { - S32 saved_right = btn_buy_currency->getRect().mRight; - btn_buy_currency->autoResize(); - btn_buy_currency->translate(saved_right - btn_buy_currency->getRect().mRight, 0); + const S32 HPAD = 24; + LLRect balance_rect = balance_box->getTextBoundingRect(); + LLRect buy_rect = getChildView("buyL")->getRect(); + LLView* balance_bg_view = getChildView("balance_bg"); + LLRect balance_bg_rect = balance_bg_view->getRect(); + balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + balance_rect.getWidth() + HPAD); + balance_bg_view->setShape(balance_bg_rect); } if (mBalance && (fabs((F32)(mBalance - balance)) > gSavedSettings.getF32("UISndMoneyChangeThreshold"))) diff --git a/indra/newview/lltexglobalcolor.cpp b/indra/newview/lltexglobalcolor.cpp index d7840fb435..347f8bf627 100644 --- a/indra/newview/lltexglobalcolor.cpp +++ b/indra/newview/lltexglobalcolor.cpp @@ -1,6 +1,6 @@ /** * @file lltexlayerglobalcolor.cpp - * @brief SERAPH - ADD IN + * @brief Color for texture layers. * * $LicenseInfo:firstyear=2008&license=viewergpl$ * diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 1d74a7be8c..5d51e32515 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -165,6 +165,7 @@ void LLTexLayerSetBuffer::dumpTotalByteCount() void LLTexLayerSetBuffer::requestUpdate() { + conditionalRestartUploadTimer(); mNeedsUpdate = TRUE; // If we're in the middle of uploading a baked texture, we don't care about it any more. // When it's downloaded, ignore it. @@ -173,17 +174,26 @@ void LLTexLayerSetBuffer::requestUpdate() void LLTexLayerSetBuffer::requestUpload() { + conditionalRestartUploadTimer(); + mNeedsUpload = TRUE; + mNumLowresUploads = 0; + mUploadPending = TRUE; +} + +void LLTexLayerSetBuffer::conditionalRestartUploadTimer() +{ // If we requested a new upload but haven't even uploaded // a low res version of our last upload request, then // keep the timer ticking instead of resetting it. if (mNeedsUpload && (mNumLowresUploads == 0)) { + mNeedsUploadTimer.unpause(); + } + else + { mNeedsUploadTimer.reset(); + mNeedsUploadTimer.start(); } - mNeedsUpload = TRUE; - mNumLowresUploads = 0; - mUploadPending = TRUE; - mNeedsUploadTimer.unpause(); } void LLTexLayerSetBuffer::cancelUpload() @@ -307,11 +317,26 @@ BOOL LLTexLayerSetBuffer::render() return success; } -bool LLTexLayerSetBuffer::isInitialized(void) const +BOOL LLTexLayerSetBuffer::isInitialized(void) const { return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated(); } +BOOL LLTexLayerSetBuffer::uploadPending() const +{ + return mUploadPending; +} + +BOOL LLTexLayerSetBuffer::uploadNeeded() const +{ + return mNeedsUpload; +} + +BOOL LLTexLayerSetBuffer::uploadInProgress() const +{ + return !mUploadID.isNull(); +} + BOOL LLTexLayerSetBuffer::isReadyToUpload() const { if (!mNeedsUpload) return FALSE; // Don't need to upload if we haven't requested one. @@ -353,40 +378,33 @@ BOOL LLTexLayerSetBuffer::updateImmediate() void LLTexLayerSetBuffer::readBackAndUpload() { - // pointers for storing data to upload - U8* baked_color_data = new U8[ mFullWidth * mFullHeight * 4 ]; - - glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data ); - stop_glerror(); - - llinfos << "Baked " << mTexLayerSet->getBodyRegionName() << llendl; + llinfos << "Uploading baked " << mTexLayerSet->getBodyRegionName() << llendl; LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); - // We won't need our caches since we're baked now. (Techically, we won't - // really be baked until this image is sent to the server and the Avatar - // Appearance message is received.) + // Don't need caches since we're baked now. (note: we won't *really* be baked + // until this image is sent to the server and the Avatar Appearance message is received.) mTexLayerSet->deleteCaches(); - LLGLSUIDefault gls_ui; + // Get the COLOR information from our texture + U8* baked_color_data = new U8[ mFullWidth * mFullHeight * 4 ]; + glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data ); + stop_glerror(); + // Get the MASK information from our texture + LLGLSUIDefault gls_ui; LLPointer<LLImageRaw> baked_mask_image = new LLImageRaw(mFullWidth, mFullHeight, 1 ); U8* baked_mask_data = baked_mask_image->getData(); - mTexLayerSet->gatherMorphMaskAlpha(baked_mask_data, mFullWidth, mFullHeight); - // writes into baked_color_data - const char* comment_text = NULL; - S32 baked_image_components = 5; // red green blue [bump] clothing + // Create the baked image from our color and mask information + const S32 baked_image_components = 5; // red green blue [bump] clothing LLPointer<LLImageRaw> baked_image = new LLImageRaw( mFullWidth, mFullHeight, baked_image_components ); U8* baked_image_data = baked_image->getData(); - - comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // 5 channels: rgb, heightfield/alpha, mask - S32 i = 0; - for( S32 u = 0; u < mFullWidth; u++ ) + for (S32 u=0; u < mFullWidth; u++) { - for( S32 v = 0; v < mFullHeight; v++ ) + for (S32 v=0; v < mFullHeight; v++) { baked_image_data[5*i + 0] = baked_color_data[4*i + 0]; baked_image_data[5*i + 1] = baked_color_data[4*i + 1]; @@ -399,21 +417,19 @@ void LLTexLayerSetBuffer::readBackAndUpload() LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C; compressedImage->setRate(0.f); - LLTransactionID tid; - LLAssetID asset_id; - tid.generate(); - asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - - BOOL res = false; - if( compressedImage->encode(baked_image, comment_text)) + const char* comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // writes into baked_color_data. 5 channels (rgb, heightfield/alpha, mask) + if (compressedImage->encode(baked_image, comment_text)) { - res = LLVFile::writeFile(compressedImage->getData(), compressedImage->getDataSize(), - gVFS, asset_id, LLAssetType::AT_TEXTURE); - if (res) + LLTransactionID tid; + tid.generate(); + const LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); + if (LLVFile::writeFile(compressedImage->getData(), compressedImage->getDataSize(), + gVFS, asset_id, LLAssetType::AT_TEXTURE)) { - LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; + // Read back the file and validate. BOOL valid = FALSE; - S32 file_size; + LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; + S32 file_size = 0; U8* data = LLVFile::readFile(gVFS, asset_id, LLAssetType::AT_TEXTURE, &file_size); if (data) { @@ -424,31 +440,26 @@ void LLTexLayerSetBuffer::readBackAndUpload() integrity_test->setLastError("Unable to read entire file"); } - if( valid ) + if (valid) { - // baked_upload_data is owned by the responder and deleted after the request completes + // Baked_upload_data is owned by the responder and deleted after the request completes. LLBakedUploadData* baked_upload_data = new LLBakedUploadData(gAgentAvatarp, this->mTexLayerSet, asset_id); mUploadID = asset_id; - const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); - - // upload the image - std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture"); + // Upload the image + const std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture"); if(!url.empty() - && !LLPipeline::sForceOldBakedUpload) // Toggle the debug setting UploadBakedTexOld to change between the new caps method and old method + && !LLPipeline::sForceOldBakedUpload) // toggle debug setting UploadBakedTexOld to change between the new caps method and old method { - llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl; - LLSD body = LLSD::emptyMap(); + // The responder will call LLTexLayerSetBuffer::onTextureUploadComplete() LLHTTPClient::post(url, body, new LLSendTexLayerResponder(body, mUploadID, LLAssetType::AT_TEXTURE, baked_upload_data)); - // Responder will call LLTexLayerSetBuffer::onTextureUploadComplete() + llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl; } else { - llinfos << "Baked texture upload via Asset Store." << llendl; - // gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE); gAssetStorage->storeAssetData(tid, LLAssetType::AT_TEXTURE, LLTexLayerSetBuffer::onTextureUploadComplete, @@ -456,49 +467,53 @@ void LLTexLayerSetBuffer::readBackAndUpload() TRUE, // temp_file TRUE, // is_priority TRUE); // store_local + llinfos << "Baked texture upload via Asset Store." << llendl; } - if (gSavedSettings.getBOOL("DebugAvatarRezTime")) - { - std::string lod_str = highest_lod ? "HighRes" : "LowRes"; - LLSD args; - args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); - args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); - args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); - args["RESOLUTION"] = lod_str; - LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); - llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl; - } - + const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); if (highest_lod) { - // Sending the final LOD for the baked texture. - // All done, pause the upload timer so we know how long it took. + // Sending the final LOD for the baked texture. All done, pause + // the upload timer so we know how long it took. mNeedsUpload = FALSE; mNeedsUploadTimer.pause(); } else { - // Sending a lower level LOD for the baked texture. - // Restart the upload timer. + // Sending a lower level LOD for the baked texture. Restart the upload timer. mNumLowresUploads++; mNeedsUploadTimer.unpause(); mNeedsUploadTimer.reset(); } + + // Print out notification that we uploaded this texture. + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + std::string lod_str = highest_lod ? "HighRes" : "LowRes"; + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); + args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); + args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); + args["RESOLUTION"] = lod_str; + LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); + llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl; + } } else { + // The read back and validate operation failed. Remove the uploaded file. mUploadPending = FALSE; - llinfos << "unable to create baked upload file: corrupted" << llendl; LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE, LLVFile::WRITE); file.remove(); + llinfos << "Unable to create baked upload file (reason: corrupted)." << llendl; } } } - if (!res) + else { + // The VFS write file operation failed. mUploadPending = FALSE; - llinfos << "unable to create baked upload file" << llendl; + llinfos << "Unable to create baked upload file (reason: failed to write file)" << llendl; } delete [] baked_color_data; @@ -2277,10 +2292,15 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const BOOL is_high_res = !mNeedsUpload; const U32 num_low_res = mNumLowresUploads; const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); - const BOOL is_uploaded = !mUploadPending; const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); - std::string text = llformat("[ HiRes:%d LoRes:%d Uploaded:%d ] [ Timer:%d ] %s", - is_high_res, num_low_res, is_uploaded, + + std::string status = "CREATING "; + if (!uploadNeeded()) status = "DONE "; + if (uploadInProgress()) status = "UPLOADING"; + + std::string text = llformat("[%s] [HiRes:%d LoRes:%d] [Elapsed:%d] %s", + status.c_str(), + is_high_res, num_low_res, upload_time, local_texture_info.c_str()); return text; diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index 2ee609fe60..cb2e1faaa6 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -275,12 +275,16 @@ public: virtual void postRender(BOOL success); virtual BOOL render(); BOOL updateImmediate(); - bool isInitialized(void) const; + + BOOL isInitialized(void) const; + BOOL uploadPending() const; // We are expecting a new texture to be uploaded at some point + BOOL uploadNeeded() const; // We need to upload a new texture + BOOL uploadInProgress() const; // We have started uploading a new texture and are awaiting the result + /*virtual*/ BOOL needsRender(); void requestUpdate(); void requestUpload(); void cancelUpload(); - BOOL uploadPending() const { return mUploadPending; } BOOL render(S32 x, S32 y, S32 width, S32 height); void readBackAndUpload(); static void onTextureUploadComplete(const LLUUID& uuid, @@ -290,15 +294,19 @@ public: const std::string dumpTextureInfo() const; virtual void restoreGLTexture(); virtual void destroyGLTexture(); + + protected: void pushProjection() const; void popProjection() const; BOOL isReadyToUpload() const; + void conditionalRestartUploadTimer(); + private: LLTexLayerSet* const mTexLayerSet; BOOL mNeedsUpdate; // whether we need to update our baked textures BOOL mNeedsUpload; // whether we need to send our baked textures to the server - U32 mNumLowresUploads; // mumber of times we've sent a lowres version of our baked textures to the server + U32 mNumLowresUploads; // number of times we've sent a lowres version of our baked textures to the server BOOL mUploadPending; // whether we have received back the new baked textures LLUUID mUploadID; // the current upload process (null if none). Used to avoid overlaps, e.g. when the user rapidly makes two changes outside of Face Edit. static S32 sGLByteCount; diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index 35acf883c7..f2d1b5d032 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -1,6 +1,6 @@ /** * @file lltexlayerparams.cpp - * @brief SERAPH - ADD IN + * @brief Texture layer parameters * * $LicenseInfo:firstyear=2002&license=viewergpl$ * diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index cf3bce2ec1..ceed90e210 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -329,11 +329,7 @@ public: partial = true; } } - else - { - worker->setGetStatus(status, reason); -// llwarns << status << ": " << reason << llendl; - } + if (!success) { worker->setGetStatus(status, reason); @@ -586,14 +582,26 @@ bool LLTextureFetchWorker::doWork(S32 param) { LLMutexLock lock(&mWorkMutex); - if ((mFetcher->isQuitting() || mImagePriority < 1.0f || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) + if ((mFetcher->isQuitting() || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) { if (mState < DECODE_IMAGE) { return true; // abort } } - + if(mImagePriority < 1.0f) + { + if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR) + { + return true; // abort + } + } + if(mState > CACHE_POST && !mCanUseNET && !mCanUseHTTP) + { + //nowhere to get data, abort. + return true ; + } + if (mFetcher->mDebugPause) { return false; // debug: don't do any work @@ -753,17 +761,22 @@ bool LLTextureFetchWorker::doWork(S32 param) if (region) { - std::string http_url = region->getCapability("GetTexture"); + std::string http_url = region->getHttpUrl() ; if (!http_url.empty()) { mUrl = http_url + "/?texture_id=" + mID.asString().c_str(); mWriteToCacheState = CAN_WRITE ; //because this texture has a fixed texture id. } + else + { + mCanUseHTTP = false ; + } } else { // This will happen if not logged in or if a region deoes not have HTTP Texture enabled //llwarns << "Region not found for host: " << mHost << llendl; + mCanUseHTTP = false; } } if (mCanUseHTTP && !mUrl.empty()) @@ -776,7 +789,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } // don't return, fall through to next state } - else if (mSentRequest == UNSENT) + else if (mSentRequest == UNSENT && mCanUseNET) { // Add this to the network queue and sit here. // LLTextureFetch::update() will send off a request which will change our state @@ -829,6 +842,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == SEND_HTTP_REQ) { + if(mCanUseHTTP) { const S32 HTTP_QUEUE_MAX_SIZE = 8; // *TODO: Integrate this with llviewerthrottle @@ -894,6 +908,10 @@ bool LLTextureFetchWorker::doWork(S32 param) } // fall through } + else //can not use http fetch. + { + return true ; //abort + } } if (mState == WAIT_HTTP_REQ) @@ -907,7 +925,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mGetStatus == HTTP_NOT_FOUND) { mHTTPFailCount = max_attempts = 1; // Don't retry - //llwarns << "Texture missing from server (404): " << mUrl << llendl; + llwarns << "Texture missing from server (404): " << mUrl << llendl; //roll back to try UDP if(mCanUseNET) @@ -927,6 +945,17 @@ bool LLTextureFetchWorker::doWork(S32 param) max_attempts = mHTTPFailCount+1; // Keep retrying LL_INFOS_ONCE("Texture") << "Texture server busy (503): " << mUrl << LL_ENDL; } + else if(mGetStatus >= HTTP_MULTIPLE_CHOICES && mGetStatus < HTTP_BAD_REQUEST) //http re-direct + { + ++mHTTPFailCount; + max_attempts = 5 ; //try at most 5 times to avoid infinite redirection loop. + + llwarns << "HTTP GET failed because of redirection: " << mUrl + << " Status: " << mGetStatus << " Reason: '" << mGetReason << llendl ; + + //assign to the new url + mUrl = mGetReason ; + } else { const S32 HTTP_MAX_RETRY_COUNT = 3; @@ -936,6 +965,7 @@ bool LLTextureFetchWorker::doWork(S32 param) << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; } + if (mHTTPFailCount >= max_attempts) { if (cur_size > 0) diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 377449cc8b..8ea4dbeb04 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -418,10 +418,10 @@ void LLAvatarTexBar::draw() const S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); const S32 v_offset = 0; + const S32 l_offset = 3; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; - LLColor4 text_color(1.f, 1.f, 1.f, 1.f); LLColor4 color; U32 line_num = 1; @@ -434,19 +434,36 @@ void LLAvatarTexBar::draw() if (!layerset) continue; const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite(); if (!layerset_buffer) continue; + + LLColor4 text_color = LLColor4::white; + + if (layerset_buffer->uploadNeeded()) + { + text_color = LLColor4::red; + } + if (layerset_buffer->uploadInProgress()) + { + text_color = LLColor4::magenta; + } std::string text = layerset_buffer->dumpTextureInfo(); - LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*line_num, + LLFontGL::getFontMonospace()->renderUTF8(text, 0, l_offset, v_offset + line_height*line_num, text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); line_num++; } const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout"); const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + LLColor4 header_color(1.f, 1.f, 1.f, 0.9f); + const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled"; const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled"; std::string header_text = llformat("[ Timeout('AvatarBakedTextureTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str()); - LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, 0, v_offset + line_height*line_num, - text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); + LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, l_offset, v_offset + line_height*line_num, + header_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); + line_num++; + std::string section_text = "Avatar Textures Information:"; + LLFontGL::getFontMonospace()->renderUTF8(section_text, 0, 0, v_offset + line_height*line_num, + header_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); } BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) @@ -457,7 +474,7 @@ BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) LLRect LLAvatarTexBar::getRequiredRect() { LLRect rect; - rect.mTop = 85; + rect.mTop = 100; if (!gSavedSettings.getBOOL("DebugAvatarRezTime")) rect.mTop = 0; return rect; } diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 6c6eda2e68..7ba256c870 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -172,6 +172,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal params.tab_stop(false); params.wrap(true); params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP); + params.allow_scroll(true); LLTextBox * msg_box = LLUICtrlFactory::create<LLTextBox> (params); // Compute max allowable height for the dialog text, so we can allocate @@ -180,9 +181,16 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal gFloaterView->getRect().getHeight() - LINE_HEIGHT // title bar - 3*VPAD - BTN_HEIGHT; + // reshape to calculate real text width and height msg_box->reshape( MAX_ALLOWED_MSG_WIDTH, max_allowed_msg_height ); msg_box->setValue(msg); - msg_box->reshapeToFitText(); + + S32 pixel_width = msg_box->getTextPixelWidth(); + S32 pixel_height = msg_box->getTextPixelHeight(); + + // We should use some space to prevent set textbox's scroller visible when it is unnecessary. + msg_box->reshape( llmin(MAX_ALLOWED_MSG_WIDTH,pixel_width + 2 * msg_box->getHPad() + HPAD), + llmin(max_allowed_msg_height,pixel_height + 2 * msg_box->getVPad()) ) ; const LLRect& text_rect = msg_box->getRect(); S32 dialog_width = llmax( btn_total_width, text_rect.getWidth() ) + 2 * HPAD; @@ -239,35 +247,6 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal msg_box->setRect( rect ); LLToastPanel::addChild(msg_box); - // Buttons - S32 button_left = (LLToastPanel::getRect().getWidth() - btn_total_width) / 2; - - for( S32 i = 0; i < num_options; i++ ) - { - LLRect button_rect; - - LLButton* btn = LLUICtrlFactory::getInstance()->createFromFile<LLButton>("alert_button.xml", this, LLPanel::child_registry_t::instance()); - if(btn) - { - btn->setName(options[i].first); - btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT )); - btn->setLabel(options[i].second); - btn->setFont(font); - - btn->setClickedCallback(boost::bind(&LLToastAlertPanel::onButtonPressed, this, _2, i)); - - mButtonData[i].mButton = btn; - - LLToastPanel::addChild(btn); - - if( i == mDefaultOption ) - { - btn->setFocus(TRUE); - } - } - button_left += button_width + BTN_HPAD; - } - // (Optional) Edit Box if (!edit_text_name.empty()) { @@ -299,7 +278,61 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor->setDrawAsterixes(is_password); setEditTextArgs(notification->getSubstitutions()); + + mLineEditor->setFollowsLeft(); + mLineEditor->setFollowsRight(); + + // find form text input field + LLSD form_text; + for (LLSD::array_const_iterator it = form_sd.beginArray(); it != form_sd.endArray(); ++it) + { + std::string type = (*it)["type"].asString(); + if (type == "text") + { + form_text = (*it); + } + } + + // if form text input field has width attribute + if (form_text.has("width")) + { + // adjust floater width to fit line editor + S32 editor_width = form_text["width"]; + LLRect editor_rect = mLineEditor->getRect(); + U32 width_delta = editor_width - editor_rect.getWidth(); + LLRect toast_rect = getRect(); + reshape(toast_rect.getWidth() + width_delta, toast_rect.getHeight()); + } + } + } + + // Buttons + S32 button_left = (LLToastPanel::getRect().getWidth() - btn_total_width) / 2; + + for( S32 i = 0; i < num_options; i++ ) + { + LLRect button_rect; + + LLButton* btn = LLUICtrlFactory::getInstance()->createFromFile<LLButton>("alert_button.xml", this, LLPanel::child_registry_t::instance()); + if(btn) + { + btn->setName(options[i].first); + btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT )); + btn->setLabel(options[i].second); + btn->setFont(font); + + btn->setClickedCallback(boost::bind(&LLToastAlertPanel::onButtonPressed, this, _2, i)); + + mButtonData[i].mButton = btn; + + LLToastPanel::addChild(btn); + + if( i == mDefaultOption ) + { + btn->setFocus(TRUE); + } } + button_left += button_width + BTN_HPAD; } std::string ignore_label; diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 404eab9249..d45915499a 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -212,23 +212,16 @@ void LLToolBar::layoutButtons() // this function may be called before postBuild(), in which case mResizeHandle won't have been set up yet. if(mResizeHandle != NULL) { - if(!gViewerWindow->getWindow()->getFullscreen()) - { - // Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar. - width -= RESIZE_HANDLE_WIDTH; - - LLRect r; - r.mLeft = width - pad; - r.mBottom = 0; - r.mRight = r.mLeft + RESIZE_HANDLE_WIDTH; - r.mTop = r.mBottom + RESIZE_HANDLE_HEIGHT; - mResizeHandle->setRect(r); - mResizeHandle->setVisible(TRUE); - } - else - { - mResizeHandle->setVisible(FALSE); - } + // Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar. + width -= RESIZE_HANDLE_WIDTH; + + LLRect r; + r.mLeft = width - pad; + r.mBottom = 0; + r.mRight = r.mLeft + RESIZE_HANDLE_WIDTH; + r.mTop = r.mBottom + RESIZE_HANDLE_HEIGHT; + mResizeHandle->setRect(r); + mResizeHandle->setVisible(TRUE); } #endif // LL_DARWIN } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index bc77ac5fd1..c862c02b82 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1878,24 +1878,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return ACCEPT_NO; } - - if (mSource == SOURCE_LIBRARY) - { - // create item based on that one, and put it on if that - // was a success. - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else - { - wear_inventory_item_on_avatar( item ); - } + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(),true, !(mask & MASK_CONTROL)); } return ACCEPT_YES_MULTI; } diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index cae5e93545..9bd08287f3 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -886,28 +886,6 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask) // Not dragging. Just showing affordances void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) { - const F32 ROTATE_ANGLE_PER_SECOND = 40.f * DEG_TO_RAD; - const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped; - - // Look for cursor against the edge of the screen - // Only works in fullscreen - if (gSavedSettings.getBOOL("FullScreen")) - { - if (gAgentCamera.cameraThirdPerson() ) - { - if (x == 0) - { - gAgent.yaw(rotate_angle); - //gAgent.setControlFlags(AGENT_CONTROL_YAW_POS); - } - else if (x == (gViewerWindow->getWorldViewWidthScaled() - 1) ) - { - gAgent.yaw(-rotate_angle); - //gAgent.setControlFlags(AGENT_CONTROL_YAW_NEG); - } - } - } - // JC - TODO - change cursor based on gGrabBtnVertical, gGrabBtnSpin lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (inactive-not over editable object)" << llendl; gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB); diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index c1dc1de5e5..fa21b1a866 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -79,7 +79,8 @@ LLVisualParamHint::LLVisualParamHint( LLViewerJointMesh *mesh, LLViewerVisualParam *param, LLWearable *wearable, - F32 param_weight) + F32 param_weight, + LLJoint* jointp) : LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, TRUE ), mNeedsUpdate( TRUE ), @@ -91,11 +92,11 @@ LLVisualParamHint::LLVisualParamHint( mAllowsUpdates( TRUE ), mDelayFrames( 0 ), mRect( pos_x, pos_y + height, pos_x + width, pos_y ), - mLastParamWeight(0.f) + mLastParamWeight(0.f), + mCamTargetJoint(jointp) { LLVisualParamHint::sInstances.insert( this ); - mBackgroundp = LLUI::getUIImage("avatar_thumb_bkgrnd.j2c"); - + mBackgroundp = LLUI::getUIImage("avatar_thumb_bkgrnd.png"); llassert(width != 0); llassert(height != 0); @@ -196,21 +197,6 @@ BOOL LLVisualParamHint::render() mNeedsUpdate = FALSE; mIsVisible = TRUE; - LLViewerJointMesh* cam_target_joint = NULL; - const std::string& cam_target_mesh_name = mVisualParam->getCameraTargetName(); - if( !cam_target_mesh_name.empty() ) - { - cam_target_joint = (LLViewerJointMesh*)gAgentAvatarp->getJoint( cam_target_mesh_name ); - } - if( !cam_target_joint ) - { - cam_target_joint = (LLViewerJointMesh*)gMorphView->getCameraTargetJoint(); - } - if( !cam_target_joint ) - { - cam_target_joint = (LLViewerJointMesh*)gAgentAvatarp->getJoint("mHead"); - } - LLQuaternion avatar_rotation; LLJoint* root_joint = gAgentAvatarp->getRootJoint(); if( root_joint ) @@ -218,7 +204,7 @@ BOOL LLVisualParamHint::render() avatar_rotation = root_joint->getWorldRotation(); } - LLVector3 target_joint_pos = cam_target_joint->getWorldPosition(); + LLVector3 target_joint_pos = mCamTargetJoint->getWorldPosition(); LLVector3 target_offset( 0, 0, mVisualParam->getCameraElevation() ); LLVector3 target_pos = target_joint_pos + (target_offset * avatar_rotation); @@ -234,9 +220,9 @@ BOOL LLVisualParamHint::render() LLViewerCamera::getInstance()->setAspect((F32)mFullWidth / (F32)mFullHeight); LLViewerCamera::getInstance()->setOriginAndLookAt( - camera_pos, // camera - LLVector3(0.f, 0.f, 1.f), // up - target_pos ); // point of interest + camera_pos, // camera + LLVector3::z_axis, // up + target_pos ); // point of interest LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h index 3bffefaa55..cbab5e765f 100644 --- a/indra/newview/lltoolmorph.h +++ b/indra/newview/lltoolmorph.h @@ -47,6 +47,7 @@ class LLViewerJointMesh; class LLPolyMesh; class LLViewerObject; +class LLJoint; //----------------------------------------------------------------------------- // LLVisualParamHint @@ -63,7 +64,8 @@ public: LLViewerJointMesh *mesh, LLViewerVisualParam *param, LLWearable *wearable, - F32 param_weight); + F32 param_weight, + LLJoint* jointp); /*virtual*/ S8 getType() const ; @@ -96,6 +98,7 @@ protected: S32 mDelayFrames; // updates are blocked for this many frames LLRect mRect; F32 mLastParamWeight; + LLJoint* mCamTargetJoint; // joint to target with preview camera LLUIImagePtr mBackgroundp; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index f02e15706d..f2c9fbf78d 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -74,6 +74,7 @@ #include "llfloatertools.h" #include "llpaneloutfitsinventory.h" #include "llpanellogin.h" +#include "llpaneltopinfobar.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -461,7 +462,11 @@ bool toggle_agent_pause(const LLSD& newvalue) bool toggle_show_navigation_panel(const LLSD& newvalue) { - LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean()); + bool value = newvalue.asBoolean(); + + LLNavigationBar::getInstance()->showNavigationPanel(value); + gSavedSettings.setBOOL("ShowMiniLocationPanel", !value); + return true; } @@ -471,6 +476,16 @@ bool toggle_show_favorites_panel(const LLSD& newvalue) return true; } +bool toggle_show_mini_location_panel(const LLSD& newvalue) +{ + bool value = newvalue.asBoolean(); + + LLPanelTopInfoBar::getInstance()->setVisible(value); + gSavedSettings.setBOOL("ShowNavbarNavigationPanel", !value); + + return true; +} + bool toggle_show_object_render_cost(const LLSD& newvalue) { LLFloaterTools::sShowObjectCost = newvalue.asBoolean(); @@ -615,6 +630,7 @@ void settings_setup_listeners() gSavedSettings.getControl("AgentPause")->getSignal()->connect(boost::bind(&toggle_agent_pause, _2)); gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2)); gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); + gSavedSettings.getControl("ShowMiniLocationPanel")->getSignal()->connect(boost::bind(&toggle_show_mini_location_panel, _2)); gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3e30911847..41667007d6 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -597,7 +597,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLPipeline::sFastAlpha = gSavedSettings.getBOOL("RenderFastAlpha"); LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip"); - LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); + LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible"); LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate"); S32 occlusion = LLPipeline::sUseOcclusion; @@ -699,8 +699,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // Doing this here gives hardware occlusion queries extra time to complete LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages"); LLError::LLCallStacks::clear() ; - llpushcallstacks ; - + { LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE); LLFastTimer t(FTM_IMAGE_UPDATE); @@ -718,7 +717,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLImageGL::deleteDeadTextures(); stop_glerror(); } - llpushcallstacks ; /////////////////////////////////// // // StateSort diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 49ea0348f9..efe59744bc 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -103,6 +103,7 @@ #include "llfloateruipreview.h" #include "llfloaterurldisplay.h" #include "llfloatervoicedevicesettings.h" +#include "llfloatervoiceeffect.h" #include "llfloaterwater.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindlight.h" @@ -255,7 +256,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>); - + LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>); + LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>); LLFloaterWindowSizeUtil::registerFloater(); LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>); diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index 033d35d80a..3105a6ec43 100644 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -43,13 +43,16 @@ struct ViewerFolderEntry : public LLDictionaryEntry { // Constructor for non-ensembles ViewerFolderEntry(const std::string &new_category_name, // default name when creating a new category of this type - const std::string &icon_name, // name of the folder icon - BOOL is_quiet // folder doesn't need a UI update when changed + const std::string &icon_name_open, // name of the folder icon + const std::string &icon_name_closed, + BOOL is_quiet, // folder doesn't need a UI update when changed + const std::string &dictionary_name = empty_string // no reverse lookup needed on non-ensembles, so in most cases just leave this blank ) : - LLDictionaryEntry(empty_string), // no reverse lookup needed on non-ensembles, so just leave this blank - mIconName(icon_name), + LLDictionaryEntry(dictionary_name), mNewCategoryName(new_category_name), + mIconNameOpen(icon_name_open), + mIconNameClosed(icon_name_closed), mIsQuiet(is_quiet) { mAllowedNames.clear(); @@ -63,7 +66,11 @@ struct ViewerFolderEntry : public LLDictionaryEntry ) : LLDictionaryEntry(xui_name), - mIconName(icon_name), + /* Just use default icons until we actually support ensembles + mIconNameOpen(icon_name), + mIconNameClosed(icon_name), + */ + mIconNameOpen("Inv_FolderOpen"), mIconNameClosed("Inv_FolderClosed"), mNewCategoryName(new_category_name), mIsQuiet(FALSE) { @@ -84,7 +91,8 @@ struct ViewerFolderEntry : public LLDictionaryEntry } return false; } - const std::string mIconName; + const std::string mIconNameOpen; + const std::string mIconNameClosed; const std::string mNewCategoryName; typedef std::vector<std::string> name_vec_t; name_vec_t mAllowedNames; @@ -102,33 +110,40 @@ protected: LLViewerFolderDictionary::LLViewerFolderDictionary() { - initEnsemblesFromFile(); - - // NEW CATEGORY NAME FOLDER ICON NAME QUIET? - // |-------------------------|-------------------------------|-----------| - addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "inv_folder_texture.tga", FALSE)); - addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "inv_folder_sound.tga", FALSE)); - addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "inv_folder_callingcard.tga", FALSE)); - addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "inv_folder_landmark.tga", FALSE)); - addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "inv_folder_clothing.tga", FALSE)); - addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "inv_folder_object.tga", FALSE)); - addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "inv_folder_notecard.tga", FALSE)); - addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "", FALSE)); - addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "inv_folder_script.tga", FALSE)); - addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "inv_folder_bodypart.tga", FALSE)); - addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "inv_folder_trash.tga", TRUE)); - addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "inv_folder_snapshot.tga", FALSE)); - addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "inv_folder_lostandfound.tga", TRUE)); - addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "inv_folder_animation.tga", FALSE)); - addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "inv_folder_gesture.tga", FALSE)); - addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "inv_folder_plain_closed.tga", FALSE)); + // NEW CATEGORY NAME FOLDER OPEN FOLDER CLOSED QUIET? + // |-------------------------|-----------------------|----------------------|-----------| + addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", TRUE)); + addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", TRUE)); + addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", FALSE)); - addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "inv_folder_current_outfit.tga",TRUE)); - addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "inv_folder_outfit.tga", TRUE)); - addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "inv_folder_my_outfits.tga", TRUE)); - addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "inv_folder_inbox.tga", FALSE)); + addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", TRUE)); + addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE)); + addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE)); + addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE)); - addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "inv_folder_plain_closed.tga", FALSE)); + addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, "default")); + +#if SUPPORT_ENSEMBLES + initEnsemblesFromFile(); +#else + for (U32 type = (U32)LLFolderType::FT_ENSEMBLE_START; type <= (U32)LLFolderType::FT_ENSEMBLE_END; ++type) + { + addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE)); + } +#endif } bool LLViewerFolderDictionary::initEnsemblesFromFile() @@ -213,13 +228,25 @@ LLFolderType::EType LLViewerFolderType::lookupTypeFromXUIName(const std::string return LLViewerFolderDictionary::getInstance()->lookup(name); } -const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder_type) +const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder_type, BOOL is_open) { const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); if (entry) { - return entry->mIconName; + if (is_open) + return entry->mIconNameOpen; + else + return entry->mIconNameClosed; + } + + // Error condition. Return something so that we don't show a grey box in inventory view. + const ViewerFolderEntry *default_entry = LLViewerFolderDictionary::getInstance()->lookup(LLFolderType::FT_NONE); + if (default_entry) + { + return default_entry->mIconNameClosed; } + + // Should not get here unless there's something corrupted with the FT_NONE entry. return badLookup(); } diff --git a/indra/newview/llviewerfoldertype.h b/indra/newview/llviewerfoldertype.h index dd9360da90..3744ac20f8 100644 --- a/indra/newview/llviewerfoldertype.h +++ b/indra/newview/llviewerfoldertype.h @@ -44,7 +44,7 @@ public: static const std::string& lookupXUIName(EType folder_type); // name used by the UI static LLFolderType::EType lookupTypeFromXUIName(const std::string& name); - static const std::string& lookupIconName(EType folder_type); // folder icon name + static const std::string& lookupIconName(EType folder_type, BOOL is_open = FALSE); // folder icon name static BOOL lookupIsQuietType(EType folder_type); // folder doesn't require UI update when changes have occured static const std::string& lookupNewCategoryName(EType folder_type); // default name when creating new category static LLFolderType::EType lookupTypeFromNewCategoryName(const std::string& name); // default name when creating new category diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 7ba54b5069..e429734415 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -875,7 +875,7 @@ void WearOnAvatarCallback::fire(const LLUUID& inv_item) LLViewerInventoryItem *item = gInventory.getItem(inv_item); if (item) { - wear_inventory_item_on_avatar(item); + LLAppearanceMgr::instance().wearItemOnAvatar(inv_item, true, mReplace); } } @@ -883,12 +883,8 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) { LLAppearanceMgr::instance().updateAppearanceFromCOF(); - if (LLSideTray::getInstance()->isPanelActive("sidepanel_appearance")) - { - // *HACK: Edit the wearable that has just been worn - // only if the Appearance SP is currently opened. - LLAgentWearables::editWearable(inv_item); - } + // Start editing the item if previously requested. + gAgentWearables.editWearableIfRequested(inv_item); // TODO: camera mode may not be changed if a debug setting is tweaked if( gAgentCamera.cameraCustomizeAvatar() ) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 3c841d93c6..31e2417476 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -243,7 +243,13 @@ public: class WearOnAvatarCallback : public LLInventoryCallback { +public: + WearOnAvatarCallback(bool do_replace = false) : mReplace(do_replace) {} + void fire(const LLUUID& inv_item); + +protected: + bool mReplace; }; class ModifiedCOFCallback : public LLInventoryCallback diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 14e58f4167..d7190f26a3 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1776,29 +1776,22 @@ void LLViewerMediaImpl::loadURI() llinfos << "Asking media source to load URI: " << uri << llendl; mMediaSource->loadURI( uri ); - + + // A non-zero mPreviousMediaTime means that either this media was previously unloaded by the priority code while playing/paused, + // or a seek happened before the media loaded. In either case, seek to the saved time. + if(mPreviousMediaTime != 0.0f) + { + seek(mPreviousMediaTime); + } + if(mPreviousMediaState == MEDIA_PLAYING) { // This media was playing before this instance was unloaded. - - if(mPreviousMediaTime != 0.0f) - { - // Seek back to where we left off, if possible. - seek(mPreviousMediaTime); - } - start(); } else if(mPreviousMediaState == MEDIA_PAUSED) { // This media was paused before this instance was unloaded. - - if(mPreviousMediaTime != 0.0f) - { - // Seek back to where we left off, if possible. - seek(mPreviousMediaTime); - } - pause(); } else @@ -1857,6 +1850,10 @@ void LLViewerMediaImpl::pause() { mMediaSource->pause(); } + else + { + mPreviousMediaState = MEDIA_PAUSED; + } } ////////////////////////////////////////////////////////////////////////////////////////// @@ -1866,6 +1863,10 @@ void LLViewerMediaImpl::start() { mMediaSource->start(); } + else + { + mPreviousMediaState = MEDIA_PLAYING; + } } ////////////////////////////////////////////////////////////////////////////////////////// @@ -1875,6 +1876,11 @@ void LLViewerMediaImpl::seek(F32 time) { mMediaSource->seek(time); } + else + { + // Save the seek time to be set when the media is loaded. + mPreviousMediaTime = time; + } } ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 23e12d4896..bf87e58cb6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3226,16 +3226,6 @@ void handle_buy_object(LLSaleInfo sale_info) return; } - S32 price = sale_info.getSalePrice(); - - if (price > 0 && price > gStatusBar->getBalance()) - { - LLStringUtil::format_map_t args; - args["AMOUNT"] = llformat("%d", price); - LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price ); - return; - } - LLFloaterBuy::show(sale_info); } @@ -3732,17 +3722,6 @@ class LLViewMouselook : public view_listener_t } }; -class LLViewFullscreen : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - // we no longer permit full screen mode EXT-6775 - // gViewerWindow->toggleFullscreen(TRUE); - llwarns << "full screen mode no longer supported" << llendl; - return true; - } -}; - class LLViewDefaultUISize : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -4498,6 +4477,16 @@ void handle_buy() BOOL valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); if (!valid) return; + S32 price = sale_info.getSalePrice(); + + if (price > 0 && price > gStatusBar->getBalance()) + { + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price ); + return; + } + if (sale_info.getSaleType() == LLSaleInfo::FS_CONTENTS) { handle_buy_contents(sale_info); @@ -7153,7 +7142,7 @@ void handle_web_browser_test(const LLSD& param) { url = "about:blank"; } - LLWeb::loadURL(url); + LLWeb::loadURLInternal(url); } void handle_buy_currency_test(void*) @@ -7439,10 +7428,13 @@ class LLEditTakeOff : public view_listener_t else { LLWearableType::EType type = LLWearableType::typeNameToType(clothing); - if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) + if (type >= LLWearableType::WT_SHAPE + && type < LLWearableType::WT_COUNT + && (gAgentWearables.getWearableCount(type) > 0)) { - // MULTI-WEARABLES - LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,0)); + // MULTI-WEARABLES: assuming user wanted to remove top shirt. + U32 wearable_index = gAgentWearables.getWearableCount(type) - 1; + LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,wearable_index)); LLWearableBridge::removeItemFromAvatar(item); } @@ -7655,6 +7647,31 @@ void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y) LLMenuGL::showPopup(ctrl, show_navbar_context_menu, x, y); } +void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y) +{ + static LLMenuGL* show_topbarinfo_context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_topinfobar.xml", + gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + + LLMenuItemGL* landmark_item = show_topbarinfo_context_menu->getChild<LLMenuItemGL>("Landmark"); + if (!LLLandmarkActions::landmarkAlreadyExists()) + { + landmark_item->setLabel(LLTrans::getString("AddLandmarkNavBarMenu")); + } + else + { + landmark_item->setLabel(LLTrans::getString("EditLandmarkNavBarMenu")); + } + + if(gMenuHolder->hasVisibleMenu()) + { + gMenuHolder->hideMenus(); + } + + show_topbarinfo_context_menu->buildDrawLabels(); + show_topbarinfo_context_menu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(ctrl, show_topbarinfo_context_menu, x, y); +} + void initialize_edit_menu() { view_listener_t::addMenu(new LLEditUndo(), "Edit.Undo"); @@ -7734,7 +7751,6 @@ void initialize_menus() view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut"); view_listener_t::addMenu(new LLZoomer(1/1.2f), "View.ZoomIn"); view_listener_t::addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault"); - view_listener_t::addMenu(new LLViewFullscreen(), "View.Fullscreen"); view_listener_t::addMenu(new LLViewDefaultUISize(), "View.DefaultUISize"); view_listener_t::addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index ad88fcea9a..e0497139a5 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -53,6 +53,7 @@ void toggle_debug_menus(void*); void show_context_menu( S32 x, S32 y, MASK mask ); void show_build_mode_context_menu(S32 x, S32 y, MASK mask); void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y); +void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y); BOOL enable_save_into_inventory(void*); void handle_reset_view(); void handle_cut(void*); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 5570fe5fec..f741e1bc10 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -318,11 +318,13 @@ class LLFileUploadBulk : public view_listener_t LLStringUtil::trim(asset_name); std::string display_name = LLStringUtil::null; + LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - upload_new_resource(filename, asset_name, asset_name, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + void *userdata = NULL; + upload_new_resource(filename, asset_name, asset_name, 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), display_name, - NULL, expected_upload_cost); + callback, expected_upload_cost, userdata); // *NOTE: Ew, we don't iterate over the file list here, // we handle the next files in upload_done_callback() @@ -478,15 +480,16 @@ void handle_compress_image(void*) } void upload_new_resource(const std::string& src_filename, std::string name, - std::string desc, + std::string desc, S32 compression_info, LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, U32 everyone_perms, const std::string& display_name, - boost::function<void(const LLUUID& uuid)> callback, - S32 expected_upload_cost) + LLAssetStorage::LLStoreAssetCallback callback, + S32 expected_upload_cost, + void *userdata) { // Generate the temporary UUID. std::string filename = gDirUtilp->getTempFilename(); @@ -768,9 +771,9 @@ void upload_new_resource(const std::string& src_filename, std::string name, { t_disp_name = src_filename; } - upload_new_resource(tid, asset_type, name, desc, + upload_new_resource(tid, asset_type, name, desc, compression_info, // tid destination_folder_type, inv_type, next_owner_perms, group_perms, everyone_perms, - display_name, callback, expected_upload_cost); + display_name, callback, expected_upload_cost, userdata); } else { @@ -889,28 +892,30 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt LLStringUtil::trim(asset_name); std::string display_name = LLStringUtil::null; + LLAssetStorage::LLStoreAssetCallback callback = NULL; + void *userdata = NULL; upload_new_resource(next_file, asset_name, asset_name, // file - LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, PERM_NONE, PERM_NONE, PERM_NONE, display_name, - NULL, - expected_upload_cost); // assuming next in a group of uploads is of roughly the same type, i.e. same upload cost - + callback, + expected_upload_cost, // assuming next in a group of uploads is of roughly the same type, i.e. same upload cost + userdata); } } -void upload_new_resource(const LLTransactionID &tid, - LLAssetType::EType asset_type, +void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_type, std::string name, - std::string desc, + std::string desc, S32 compression_info, LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, U32 everyone_perms, const std::string& display_name, - boost::function<void(const LLUUID& uuid)> callback, - S32 expected_upload_cost) + LLAssetStorage::LLStoreAssetCallback callback, + S32 expected_upload_cost, + void *userdata) { if(gDisconnected) { @@ -954,26 +959,79 @@ void upload_new_resource(const LLTransactionID &tid, upload_message.append(display_name); LLUploadDialog::modalUploadDialog(upload_message); + llinfos << "*** Uploading: " << llendl; + llinfos << "Type: " << LLAssetType::lookup(asset_type) << llendl; + llinfos << "UUID: " << uuid << llendl; + llinfos << "Name: " << name << llendl; + llinfos << "Desc: " << desc << llendl; + llinfos << "Expected Upload Cost: " << expected_upload_cost << llendl; + lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << llendl; + lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl; std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory"); - - if (url.empty()) { - llwarns << "Could not get NewFileAgentInventory capability" << llendl; - return; - } + if (!url.empty()) + { + llinfos << "New Agent Inventory via capability" << llendl; + LLSD body; + body["folder_id"] = gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type); + body["asset_type"] = LLAssetType::lookup(asset_type); + body["inventory_type"] = LLInventoryType::lookup(inv_type); + body["name"] = name; + body["description"] = desc; + body["next_owner_mask"] = LLSD::Integer(next_owner_perms); + body["group_mask"] = LLSD::Integer(group_perms); + body["everyone_mask"] = LLSD::Integer(everyone_perms); + body["expected_upload_cost"] = LLSD::Integer(expected_upload_cost); + + //std::ostringstream llsdxml; + //LLSDSerialize::toPrettyXML(body, llsdxml); + //llinfos << "posting body to capability: " << llsdxml.str() << llendl; - llinfos << "New Agent Inventory via capability" << llendl; - LLSD body; - body["folder_id"] = gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type); - body["asset_type"] = LLAssetType::lookup(asset_type); - body["inventory_type"] = LLInventoryType::lookup(inv_type); - body["name"] = name; - body["description"] = desc; - body["next_owner_mask"] = LLSD::Integer(next_owner_perms); - body["group_mask"] = LLSD::Integer(group_perms); - body["everyone_mask"] = LLSD::Integer(everyone_perms); - body["expected_upload_cost"] = LLSD::Integer(expected_upload_cost); + LLHTTPClient::post(url, body, new LLNewAgentInventoryResponder(body, uuid, asset_type)); + } + else + { + llinfos << "NewAgentInventory capability not found, new agent inventory via asset system." << llendl; + // check for adequate funds + // TODO: do this check on the sim + if (LLAssetType::AT_SOUND == asset_type || + LLAssetType::AT_TEXTURE == asset_type || + LLAssetType::AT_ANIMATION == asset_type) + { + S32 balance = gStatusBar->getBalance(); + if (balance < expected_upload_cost) + { + LLStringUtil::format_map_t args; + args["NAME"] = name; + args["AMOUNT"] = llformat("%d", expected_upload_cost); + // insufficient funds, bail on this upload + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("UploadingCosts", args), expected_upload_cost ); + return; + } + } - LLHTTPClient::post(url, body, new LLNewAgentInventoryResponder(body, uuid, asset_type, callback)); + LLResourceData* data = new LLResourceData; + data->mAssetInfo.mTransactionID = tid; + data->mAssetInfo.mUuid = uuid; + data->mAssetInfo.mType = asset_type; + data->mAssetInfo.mCreatorID = gAgentID; + data->mInventoryType = inv_type; + data->mNextOwnerPerm = next_owner_perms; + data->mExpectedUploadCost = expected_upload_cost; + data->mUserData = userdata; + data->mAssetInfo.setName(name); + data->mAssetInfo.setDescription(desc); + data->mPreferredLocation = destination_folder_type; + + LLAssetStorage::LLStoreAssetCallback asset_callback = &upload_done_callback; + if (callback) + { + asset_callback = callback; + } + gAssetStorage->storeAssetData(data->mAssetInfo.mTransactionID, data->mAssetInfo.mType, + asset_callback, + (void*)data, + FALSE); + } } void init_menu_file() diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 33f8243ac0..1e6d13f1c6 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -34,35 +34,41 @@ #define LLVIEWERMENUFILE_H #include "llfoldertype.h" +#include "llassetstorage.h" #include "llinventorytype.h" class LLTransactionID; + void init_menu_file(); void upload_new_resource(const std::string& src_filename, std::string name, std::string desc, + S32 compression_info, LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, U32 everyone_perms, const std::string& display_name, - boost::function<void(const LLUUID& uuid)> callback, - S32 expected_upload_cost); + LLAssetStorage::LLStoreAssetCallback callback, + S32 expected_upload_cost, + void *userdata); void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType type, std::string name, std::string desc, + S32 compression_info, LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, U32 everyone_perms, const std::string& display_name, - boost::function<void(const LLUUID& uuid)> callback, - S32 expected_upload_cost); + LLAssetStorage::LLStoreAssetCallback callback, + S32 expected_upload_cost, + void *userdata); #endif diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4d3a6c24e2..b8f5768719 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -112,10 +112,6 @@ #include <boost/algorithm/string/split.hpp> // #include <boost/regex.hpp> -#if LL_WINDOWS // For Windows specific error handler -#include "llwindebug.h" // For the invalid message handler -#endif - #include "llnotificationmanager.h" // #if LL_MSVC @@ -710,7 +706,7 @@ static void highlight_inventory_items_in_panel(const std::vector<LLUUID>& items, ++item_iter) { const LLUUID& item_id = (*item_iter); - if(!highlight_offered_item(item_id)) + if(!highlight_offered_object(item_id)) { continue; } @@ -761,6 +757,18 @@ public: const std::string& from_name) : LLInventoryFetchItemsObserver(object_id), mFromName(from_name) {} + /*virtual*/ void startFetch() + { + for (uuid_vec_t::const_iterator it = mIDs.begin(); it < mIDs.end(); ++it) + { + LLViewerInventoryCategory* cat = gInventory.getCategory(*it); + if (cat) + { + mComplete.push_back((*it)); + } + } + LLInventoryFetchItemsObserver::startFetch(); + } /*virtual*/ void done() { open_inventory_offer(mComplete, mFromName); @@ -1073,111 +1081,119 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) } } -void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name) +void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name) { - for (uuid_vec_t::const_iterator item_iter = items.begin(); - item_iter != items.end(); - ++item_iter) + for (uuid_vec_t::const_iterator obj_iter = objects.begin(); + obj_iter != objects.end(); + ++obj_iter) { - const LLUUID& item_id = (*item_iter); - if(!highlight_offered_item(item_id)) + const LLUUID& obj_id = (*obj_iter); + if(!highlight_offered_object(obj_id)) { continue; } - LLInventoryItem* item = gInventory.getItem(item_id); - llassert(item); - if (!item) { + const LLInventoryObject *obj = gInventory.getObject(obj_id); + if (!obj) + { + llwarns << "Cannot find object [ itemID:" << obj_id << " ] to open." << llendl; continue; } - //////////////////////////////////////////////////////////////////////////////// - // Special handling for various types. - const LLAssetType::EType asset_type = item->getActualType(); - if (check_offer_throttle(from_name, false)) // If we are throttled, don't display - { - LL_DEBUGS("Messaging") << "Highlighting inventory item: " << item->getUUID() << LL_ENDL; - // If we opened this ourselves, focus it - const BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO; - switch(asset_type) + const LLAssetType::EType asset_type = obj->getActualType(); + + // Either an inventory item or a category. + const LLInventoryItem* item = dynamic_cast<const LLInventoryItem*>(obj); + if (item) + { + //////////////////////////////////////////////////////////////////////////////// + // Special handling for various types. + if (check_offer_throttle(from_name, false)) // If we are throttled, don't display { - case LLAssetType::AT_NOTECARD: - { - LLFloaterReg::showInstance("preview_notecard", LLSD(item_id), take_focus); - break; - } - case LLAssetType::AT_LANDMARK: - { - LLInventoryCategory* parent_folder = gInventory.getCategory(item->getParentUUID()); - if ("inventory_handler" == from_name) + LL_DEBUGS("Messaging") << "Highlighting inventory item: " << item->getUUID() << LL_ENDL; + // If we opened this ourselves, focus it + const BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO; + switch(asset_type) + { + case LLAssetType::AT_NOTECARD: { - //we have to filter inventory_handler messages to avoid notification displaying - LLSideTray::getInstance()->showPanel("panel_places", - LLSD().with("type", "landmark").with("id", item->getUUID())); + LLFloaterReg::showInstance("preview_notecard", LLSD(obj_id), take_focus); + break; } - else if("group_offer" == from_name) + case LLAssetType::AT_LANDMARK: { - // "group_offer" is passed by LLOpenTaskGroupOffer - // Notification about added landmark will be generated under the "from_name.empty()" called from LLOpenTaskOffer::done(). - LLSD args; - args["type"] = "landmark"; - args["id"] = item_id; - LLSideTray::getInstance()->showPanel("panel_places", args); - - continue; + LLInventoryCategory* parent_folder = gInventory.getCategory(item->getParentUUID()); + if ("inventory_handler" == from_name) + { + //we have to filter inventory_handler messages to avoid notification displaying + LLSideTray::getInstance()->showPanel("panel_places", + LLSD().with("type", "landmark").with("id", item->getUUID())); + } + else if("group_offer" == from_name) + { + // "group_offer" is passed by LLOpenTaskGroupOffer + // Notification about added landmark will be generated under the "from_name.empty()" called from LLOpenTaskOffer::done(). + LLSD args; + args["type"] = "landmark"; + args["id"] = obj_id; + LLSideTray::getInstance()->showPanel("panel_places", args); + + continue; + } + else if(from_name.empty()) + { + // we receive a message from LLOpenTaskOffer, it mean that new landmark has been added. + LLSD args; + args["LANDMARK_NAME"] = item->getName(); + args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown"); + LLNotificationsUtil::add("LandmarkCreated", args); + } } - else if(from_name.empty()) + break; + case LLAssetType::AT_TEXTURE: { - // we receive a message from LLOpenTaskOffer, it mean that new landmark has been added. - LLSD args; - args["LANDMARK_NAME"] = item->getName(); - args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown"); - LLNotificationsUtil::add("LandmarkCreated", args); + LLFloaterReg::showInstance("preview_texture", LLSD(obj_id), take_focus); + break; } + case LLAssetType::AT_ANIMATION: + LLFloaterReg::showInstance("preview_anim", LLSD(obj_id), take_focus); + break; + case LLAssetType::AT_SCRIPT: + LLFloaterReg::showInstance("preview_script", LLSD(obj_id), take_focus); + break; + case LLAssetType::AT_SOUND: + LLFloaterReg::showInstance("preview_sound", LLSD(obj_id), take_focus); + break; + default: + break; } - break; - case LLAssetType::AT_TEXTURE: - { - LLFloaterReg::showInstance("preview_texture", LLSD(item_id), take_focus); - break; - } - case LLAssetType::AT_ANIMATION: - LLFloaterReg::showInstance("preview_anim", LLSD(item_id), take_focus); - break; - case LLAssetType::AT_SCRIPT: - LLFloaterReg::showInstance("preview_script", LLSD(item_id), take_focus); - break; - case LLAssetType::AT_SOUND: - LLFloaterReg::showInstance("preview_sound", LLSD(item_id), take_focus); - break; - default: - break; } } - + //////////////////////////////////////////////////////////////////////////////// // Highlight item if it's not in the trash, lost+found, or COF - const BOOL auto_open = gSavedSettings.getBOOL("ShowInInventory") && + const BOOL auto_open = + gSavedSettings.getBOOL("ShowInInventory") && (asset_type != LLAssetType::AT_CALLINGCARD) && - (item->getInventoryType() != LLInventoryType::IT_ATTACHMENT) && + !(item && item->getInventoryType() != LLInventoryType::IT_ATTACHMENT) && !from_name.empty(); LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open); if(active_panel) { - LL_DEBUGS("Messaging") << "Highlighting" << item_id << LL_ENDL; + LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL; LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); - active_panel->setSelection(item_id, TAKE_FOCUS_NO); + active_panel->setSelection(obj_id, TAKE_FOCUS_NO); gFocusMgr.setKeyboardFocus(focus_ctrl); } } } -bool highlight_offered_item(const LLUUID& item_id) +bool highlight_offered_object(const LLUUID& obj_id) { - LLInventoryItem* item = gInventory.getItem(item_id); - if(!item) + const LLInventoryObject* obj = gInventory.getObject(obj_id); + if(!obj) { - LL_WARNS("Messaging") << "Unable to show inventory item: " << item_id << LL_ENDL; + LL_WARNS("Messaging") << "Unable to show inventory item: " << obj_id << LL_ENDL; return false; } @@ -1186,7 +1202,7 @@ bool highlight_offered_item(const LLUUID& item_id) // notification (e.g. trash, cof, lost-and-found). if(!gAgent.getAFK()) { - const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(item_id); + const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(obj_id); if (parent) { const LLFolderType::EType parent_type = parent->getPreferredType(); @@ -2064,6 +2080,19 @@ void notification_display_name_callback(const LLUUID& id, LLNotificationsUtil::add(name, substitutions, payload); } +class LLPostponedIMSystemTipNotification: public LLPostponedNotification +{ +protected: + /* virtual */ + void modifyNotificationParams() + { + LLSD payload = mParams.payload; + payload["SESSION_NAME"] = mName; + mParams.payload = payload; + } + +}; + void process_improved_im(LLMessageSystem *msg, void **user_data) { if (gNoRender) @@ -2136,13 +2165,18 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; LLSD payload; + LLNotification::Params params; + switch(dialog) { case IM_CONSOLE_AND_CHAT_HISTORY: - // *TODO: Translate args["MESSAGE"] = message; payload["from_id"] = from_id; - LLNotificationsUtil::add("IMSystemMessageTip",args, payload); + + params.name = "IMSystemMessageTip"; + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedIMSystemTipNotification>(params, from_id, false); break; case IM_NOTHING_SPECIAL: @@ -2164,7 +2198,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // initiated by the other party) then... std::string my_name; LLAgentUI::buildFullname(my_name); - std::string response = gSavedPerAccountSettings.getString("BusyModeResponse2"); + std::string response = gSavedPerAccountSettings.getString("BusyModeResponse"); pack_instant_message( gMessageSystem, gAgent.getID(), @@ -2854,7 +2888,7 @@ void busy_message (LLMessageSystem* msg, LLUUID from_id) { std::string my_name; LLAgentUI::buildFullname(my_name); - std::string response = gSavedPerAccountSettings.getString("BusyModeResponse2"); + std::string response = gSavedPerAccountSettings.getString("BusyModeResponse"); pack_instant_message( gMessageSystem, gAgent.getID(), diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 72ad3c8926..eca253ee03 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -207,7 +207,7 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name) // Returns true if item is not in certain "quiet" folder which don't need UI // notification (e.g. trash, cof, lost-and-found) and agent is not AFK, false otherwise. // Returns false if item is not found. -bool highlight_offered_item(const LLUUID& item_id); +bool highlight_offered_object(const LLUUID& obj_id); void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 0ef38b2d7c..56bc0b383c 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -220,6 +220,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mColoName("unknown"), mProductSKU("unknown"), mProductName("unknown"), + mHttpUrl(""), mCacheLoaded(FALSE), mCacheEntriesCount(0), mCacheID(), @@ -1563,6 +1564,10 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u else { mCapabilities[name] = url; + if(name == "GetTexture") + { + mHttpUrl = url ; + } } } diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 400180a01c..b0169c33c0 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -296,6 +296,7 @@ public: friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion); /// implements LLCapabilityProvider virtual std::string getDescription() const; + std::string getHttpUrl() const { return mHttpUrl ;} LLSpatialPartition* getSpatialPartition(U32 type); public: @@ -388,6 +389,7 @@ private: std::string mColoName; std::string mProductSKU; std::string mProductName; + std::string mHttpUrl ; // Maps local ids to cache entries. diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d8a9ce9374..9b5b210bf7 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -541,11 +541,6 @@ void LLViewerTexture::setBoostLevel(S32 level) if(mBoostLevel != LLViewerTexture::BOOST_NONE) { setNoDelete() ; - - if(LLViewerTexture::BOOST_AVATAR_BAKED_SELF == mBoostLevel || LLViewerTexture::BOOST_AVATAR_BAKED == mBoostLevel) - { - mCanResetMaxVirtualSize = false ; - } } if(gAuditTexture) { @@ -596,6 +591,11 @@ void LLViewerTexture::forceImmediateUpdate() { } +void LLViewerTexture::setResetMaxVirtualSizeFlag(bool flag) +{ + mCanResetMaxVirtualSize = flag ; +} + void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const { if(needs_gltexture) @@ -1447,8 +1447,14 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height) //virtual void LLViewerFetchedTexture::processTextureStats() { - if(mFullyLoaded)//already loaded + if(mFullyLoaded) { + if(mDesiredDiscardLevel <= mMinDesiredDiscardLevel)//already loaded + { + return ; + } + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ; + mFullyLoaded = FALSE ; return ; } @@ -1482,6 +1488,7 @@ void LLViewerFetchedTexture::processTextureStats() mDesiredDiscardLevel = (S8)llmin(log((F32)mFullWidth / mKnownDrawWidth) / log_2, log((F32)mFullHeight / mKnownDrawHeight) / log_2) ; mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()) ; + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ; } mKnownDrawSizeChanged = FALSE ; @@ -1514,7 +1521,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } if(mFullyLoaded && !mForceToSaveRawImage)//already loaded for static texture { - return -4.0f ; //alreay fetched + return -1.0f ; //alreay fetched } S32 cur_discard = getCurrentDiscardLevelForFetching(); @@ -1528,16 +1535,16 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } else if(mDesiredDiscardLevel >= cur_discard && cur_discard > -1) { - priority = -1.0f ; + priority = -2.0f ; } else if(mCachedRawDiscardLevel > -1 && mDesiredDiscardLevel >= mCachedRawDiscardLevel) { - priority = -1.0f; + priority = -3.0f; } else if (mDesiredDiscardLevel > getMaxDiscardLevel()) { // Don't decode anything we don't need - priority = -1.0f; + priority = -4.0f; } else if ((mBoostLevel == LLViewerTexture::BOOST_UI || mBoostLevel == LLViewerTexture::BOOST_ICON) && !have_all_data) { @@ -1551,9 +1558,14 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // Always want high boosted images priority = 1.f; } + else if(mForceToSaveRawImage) + { + //force to fetch the raw image. + priority = 1.f; + } else { - priority = -1.f; //stop fetching + priority = -5.f; //stop fetching } } else if (cur_discard < 0) @@ -1569,7 +1581,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() else if ((mMinDiscardLevel > 0) && (cur_discard <= mMinDiscardLevel)) { // larger mips are corrupted - priority = -3.0f; + priority = -6.0f; } else { @@ -2052,10 +2064,13 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() bool run_raw_callbacks = false; bool need_readback = false; + mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { LLLoadedCallbackEntry *entryp = *iter++; + mMinDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel, (S8)entryp->mDesiredDiscard) ; + if (entryp->mNeedsImageRaw) { if (mNeedsAux) @@ -2187,6 +2202,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() if (mLoadedCallbackList.empty()) { gTextureList.mCallbackList.erase(this); + mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; } // Done with any raw image data at this point (will be re-created if we still have callbacks) diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 1bd4cc793d..361f56e02f 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -166,6 +166,7 @@ public: void addTextureStats(F32 virtual_size, BOOL needs_gltexture = TRUE) const; void resetTextureStats(); + void setResetMaxVirtualSizeFlag(bool flag) ; virtual F32 getMaxVirtualSize() ; diff --git a/indra/newview/llviewervisualparam.cpp b/indra/newview/llviewervisualparam.cpp index 422e530dc6..1dc09a64ac 100644 --- a/indra/newview/llviewervisualparam.cpp +++ b/indra/newview/llviewervisualparam.cpp @@ -99,8 +99,6 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) node->getFastAttributeF32( camera_angle_string, mCamAngle ); // in degrees static LLStdStringHandle camera_elevation_string = LLXmlTree::addAttributeString("camera_elevation"); node->getFastAttributeF32( camera_elevation_string, mCamElevation ); - static LLStdStringHandle camera_target_string = LLXmlTree::addAttributeString("camera_target"); - node->getFastAttributeString( camera_target_string, mCamTargetName ); mCamAngle += 180; diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h index 1a3975eb99..f38c01fa6c 100644 --- a/indra/newview/llviewervisualparam.h +++ b/indra/newview/llviewervisualparam.h @@ -60,7 +60,6 @@ protected: F32 mCamDist; F32 mCamAngle; // degrees F32 mCamElevation; - std::string mCamTargetName; F32 mEditGroupDisplayOrder; BOOL mShowSimple; // show edit controls when in "simple ui" mode? F32 mSimpleMin; // when in simple UI, apply this minimum, range 0.f to 100.f @@ -104,7 +103,6 @@ public: F32 getCameraDistance() const { return getInfo()->mCamDist; } F32 getCameraAngle() const { return getInfo()->mCamAngle; } // degrees F32 getCameraElevation() const { return getInfo()->mCamElevation; } - const std::string& getCameraTargetName() const { return getInfo()->mCamTargetName; } BOOL getShowSimple() const { return getInfo()->mShowSimple; } F32 getSimpleMin() const { return getInfo()->mSimpleMin; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 96a6f56605..2f1723649b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -202,6 +202,7 @@ #include "llnearbychat.h" #include "llviewerwindowlistener.h" +#include "llpaneltopinfobar.h" #if LL_WINDOWS #include <tchar.h> // For Unicode conversion methods @@ -1118,28 +1119,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) mActive = TRUE; send_agent_resume(); gAgent.clearAFK(); - if (mWindow->getFullscreen() && !mIgnoreActivate) - { - if (!LLApp::isExiting() ) - { - if (LLStartUp::getStartupState() >= STATE_STARTED) - { - // if we're in world, show a progress bar to hide reloading of textures - llinfos << "Restoring GL during activate" << llendl; - restoreGL(LLTrans::getString("ProgressRestoring")); - } - else - { - // otherwise restore immediately - restoreGL(); - } - } - else - { - llwarns << "Activating while quitting" << llendl; - } - } - + // Unmute audio audio_update_volume(); } @@ -1159,12 +1139,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) } send_agent_pause(); - - if (mWindow->getFullscreen() && !mIgnoreActivate) - { - llinfos << "Stopping GL during deactivation" << llendl; - stopGL(); - } + // Mute audio audio_update_volume(); } @@ -1327,12 +1302,10 @@ LLViewerWindow::LLViewerWindow( const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, - BOOL fullscreen, BOOL ignore_pixel_depth) + BOOL fullscreen, BOOL ignore_pixel_depth) // fullscreen is no longer used : mWindow(NULL), mActive(TRUE), - mWantFullscreen(fullscreen), - mShowFullscreenProgress(FALSE), mWindowRectRaw(0, height, width, 0), mWindowRectScaled(0, height, width, 0), mWorldViewRectRaw(0, height, width, 0), @@ -1347,7 +1320,6 @@ LLViewerWindow::LLViewerWindow( mIgnoreActivate( FALSE ), mResDirty(false), mStatesDirty(false), - mIsFullscreenChecked(false), mCurrResolutionIndex(0), mViewerWindowListener(new LLViewerWindowListener(this)), mProgressView(NULL) @@ -1587,6 +1559,9 @@ void LLViewerWindow::initBase() gDebugView->init(); gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view"); + // Initialize busy response message when logged in + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLFloaterPreference::initBusyResponse)); + // Add the progress bar view (startup view), which overrides everything mProgressView = getRootView()->getChild<LLProgressView>("progress_view"); setShowProgress(FALSE); @@ -1666,6 +1641,20 @@ void LLViewerWindow::initWorldUI() navbar->showFavoritesPanel(FALSE); } + // Top Info bar + LLPanel* topinfo_bar_container = getRootView()->getChild<LLPanel>("topinfo_bar_container"); + LLPanelTopInfoBar* topinfo_bar = LLPanelTopInfoBar::getInstance(); + + topinfo_bar->setShape(topinfo_bar_container->getLocalRect()); + + topinfo_bar_container->addChild(topinfo_bar); + topinfo_bar_container->setVisible(TRUE); + + if (!gSavedSettings.getBOOL("ShowMiniLocationPanel")) + { + topinfo_bar->setVisible(FALSE); + } + if ( gHUDView == NULL ) { LLRect hud_rect = full_window; @@ -1890,24 +1879,17 @@ void LLViewerWindow::reshape(S32 width, S32 height) sendShapeToSim(); - - // store the mode the user wants (even if not there yet) - gSavedSettings.setBOOL("FullScreen", mWantFullscreen); - // store new settings for the mode we are in, regardless - if (!mWindow->getFullscreen()) - { - // Only save size if not maximized - BOOL maximized = mWindow->getMaximized(); - gSavedSettings.setBOOL("WindowMaximized", maximized); + // Only save size if not maximized + BOOL maximized = mWindow->getMaximized(); + gSavedSettings.setBOOL("WindowMaximized", maximized); - LLCoordScreen window_size; - if (!maximized - && mWindow->getSize(&window_size)) - { - gSavedSettings.setS32("WindowWidth", window_size.mX); - gSavedSettings.setS32("WindowHeight", window_size.mY); - } + LLCoordScreen window_size; + if (!maximized + && mWindow->getSize(&window_size)) + { + gSavedSettings.setS32("WindowWidth", window_size.mX); + gSavedSettings.setS32("WindowHeight", window_size.mY); } LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width); @@ -2441,7 +2423,7 @@ void LLViewerWindow::updateUI() LLLayoutStack::updateClass(); // use full window for world view when not rendering UI - bool world_view_uses_full_window = !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI); + bool world_view_uses_full_window = gAgentCamera.cameraMouselook() || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI); updateWorldViewRect(world_view_uses_full_window); LLView::sMouseHandlerMessage.clear(); @@ -3785,18 +3767,7 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height) BORDERHEIGHT = size.mY- y; LLCoordScreen new_size(new_width + BORDERWIDTH, new_height + BORDERHEIGHT); - BOOL disable_sync = gSavedSettings.getBOOL("DisableVerticalSync"); - if (gViewerWindow->mWindow->getFullscreen()) - { - gViewerWindow->changeDisplaySettings(FALSE, - new_size, - disable_sync, - TRUE); - } - else - { - gViewerWindow->mWindow->setSize(new_size); - } + gViewerWindow->mWindow->setSize(new_size); } } @@ -4582,51 +4553,12 @@ void LLViewerWindow::initFonts(F32 zoom_factor) LLFontGL::loadDefaultFonts(); } -void LLViewerWindow::toggleFullscreen(BOOL show_progress) -{ - if (mWindow) - { - mWantFullscreen = mWindow->getFullscreen() ? FALSE : TRUE; - mIsFullscreenChecked = mWindow->getFullscreen() ? FALSE : TRUE; - mShowFullscreenProgress = show_progress; - } -} - -void LLViewerWindow::getTargetWindow(BOOL& fullscreen, S32& width, S32& height) const -{ - fullscreen = mWantFullscreen; - - if (mWindow - && mWindow->getFullscreen() == mWantFullscreen) - { - width = getWindowWidthRaw(); - height = getWindowHeightRaw(); - } - else if (mWantFullscreen) - { - width = gSavedSettings.getS32("FullScreenWidth"); - height = gSavedSettings.getS32("FullScreenHeight"); - } - else - { - width = gSavedSettings.getS32("WindowWidth"); - height = gSavedSettings.getS32("WindowHeight"); - } -} - void LLViewerWindow::requestResolutionUpdate() { mResDirty = true; } -void LLViewerWindow::requestResolutionUpdate(bool fullscreen_checked) -{ - mResDirty = true; - mWantFullscreen = fullscreen_checked; - mIsFullscreenChecked = fullscreen_checked; -} - -BOOL LLViewerWindow::checkSettings() +void LLViewerWindow::checkSettings() { if (mStatesDirty) { @@ -4638,70 +4570,9 @@ BOOL LLViewerWindow::checkSettings() // We want to update the resolution AFTER the states getting refreshed not before. if (mResDirty) { - if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio")) - { - getWindow()->setNativeAspectRatio(0.f); - } - else - { - getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); - } - reshape(getWindowWidthRaw(), getWindowHeightRaw()); - - // force aspect ratio - if (mIsFullscreenChecked) - { - LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() ); - } - mResDirty = false; - } - - BOOL is_fullscreen = mWindow->getFullscreen(); - if(mWantFullscreen) - { - LLCoordScreen screen_size; - LLCoordScreen desired_screen_size(gSavedSettings.getS32("FullScreenWidth"), - gSavedSettings.getS32("FullScreenHeight")); - getWindow()->getSize(&screen_size); - if(!is_fullscreen || - screen_size.mX != desired_screen_size.mX - || screen_size.mY != desired_screen_size.mY) - { - if (!LLStartUp::canGoFullscreen()) - { - return FALSE; - } - - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - changeDisplaySettings(TRUE, - desired_screen_size, - gSavedSettings.getBOOL("DisableVerticalSync"), - mShowFullscreenProgress); - - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - mStatesDirty = true; - return TRUE; - } - } - else - { - if(is_fullscreen) - { - // Changing to windowed mode. - changeDisplaySettings(FALSE, - LLCoordScreen(gSavedSettings.getS32("WindowWidth"), - gSavedSettings.getS32("WindowHeight")), - TRUE, - mShowFullscreenProgress); - mStatesDirty = true; - return TRUE; - } - } - return FALSE; + } } void LLViewerWindow::restartDisplay(BOOL show_progress_bar) @@ -4718,38 +4589,23 @@ void LLViewerWindow::restartDisplay(BOOL show_progress_bar) } } -BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar) +BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar) { BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized"); - mWantFullscreen = fullscreen; - mShowFullscreenProgress = show_progress_bar; - gSavedSettings.setBOOL("FullScreen", mWantFullscreen); //gResizeScreenTexture = TRUE; - BOOL old_fullscreen = mWindow->getFullscreen(); - if (!old_fullscreen && fullscreen && !LLStartUp::canGoFullscreen()) - { - // Not allowed to switch to fullscreen now, so exit early. - // *NOTE: This case should never be reached, but just-in-case. - return TRUE; - } - U32 fsaa = gSavedSettings.getU32("RenderFSAASamples"); U32 old_fsaa = mWindow->getFSAASamples(); - // going from windowed to windowed - if (!old_fullscreen && !fullscreen) + // if not maximized, use the request size + if (!mWindow->getMaximized()) { - // if not maximized, use the request size - if (!mWindow->getMaximized()) - { - mWindow->setSize(size); - } + mWindow->setSize(size); + } - if (fsaa == old_fsaa) - { - return TRUE; - } + if (fsaa == old_fsaa) + { + return TRUE; } // Close floaters that don't handle settings change @@ -4766,23 +4622,15 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, LLCoordScreen old_size; LLCoordScreen old_pos; mWindow->getSize(&old_size); - BOOL got_position = mWindow->getPosition(&old_pos); - if (!old_fullscreen && fullscreen && got_position) - { - // switching from windowed to fullscreen, so save window position - gSavedSettings.setS32("WindowX", old_pos.mX); - gSavedSettings.setS32("WindowY", old_pos.mY); - } - mWindow->setFSAASamples(fsaa); - result_first_try = mWindow->switchContext(fullscreen, size, disable_vsync); + result_first_try = mWindow->switchContext(false, size, disable_vsync); if (!result_first_try) { // try to switch back mWindow->setFSAASamples(old_fsaa); - result_second_try = mWindow->switchContext(old_fullscreen, old_size, disable_vsync); + result_second_try = mWindow->switchContext(false, old_size, disable_vsync); if (!result_second_try) { @@ -4814,19 +4662,8 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, } BOOL success = result_first_try || result_second_try; - if (success) - { -#if LL_WINDOWS - // Only trigger a reshape after switching to fullscreen; otherwise rely on the windows callback - // (otherwise size is wrong; this is the entire window size, reshape wants the visible window size) - if (fullscreen && result_first_try) -#endif - { - reshape(size.mX, size.mY); - } - } - if (!mWindow->getFullscreen() && success) + if (success) { // maximize window if was maximized, else reposition if (was_maximized) @@ -4844,45 +4681,14 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, mIgnoreActivate = FALSE; gFocusMgr.setKeyboardFocus(keyboard_focus); - mWantFullscreen = mWindow->getFullscreen(); - mShowFullscreenProgress = FALSE; return success; } - -F32 LLViewerWindow::getDisplayAspectRatio() const -{ - if (mWindow->getFullscreen()) - { - if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio")) - { - return mWindow->getNativeAspectRatio(); - } - else - { - return gSavedSettings.getF32("FullScreenAspectRatio"); - } - } - else - { - return mWindow->getNativeAspectRatio(); - } -} - - F32 LLViewerWindow::getWorldViewAspectRatio() const { F32 world_aspect = (F32)mWorldViewRectRaw.getWidth() / (F32)mWorldViewRectRaw.getHeight(); - //F32 window_aspect = (F32)mWindowRectRaw.getWidth() / (F32)mWindowRectRaw.getHeight(); - if (mWindow->getFullscreen()) - { - return world_aspect * mWindow->getPixelAspectRatio(); - } - else - { - return world_aspect; - } + return world_aspect; } void LLViewerWindow::calcDisplayScale() @@ -4890,27 +4696,13 @@ void LLViewerWindow::calcDisplayScale() F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor"); LLVector2 display_scale; display_scale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f)); - F32 height_normalization = gSavedSettings.getBOOL("UIAutoScale") ? ((F32)mWindowRectRaw.getHeight() / display_scale.mV[VY]) / 768.f : 1.f; - if(mWindow->getFullscreen()) - { - display_scale *= (ui_scale_factor * height_normalization); - } - else - { - display_scale *= ui_scale_factor; - } + display_scale *= ui_scale_factor; // limit minimum display scale if (display_scale.mV[VX] < MIN_DISPLAY_SCALE || display_scale.mV[VY] < MIN_DISPLAY_SCALE) { display_scale *= MIN_DISPLAY_SCALE / llmin(display_scale.mV[VX], display_scale.mV[VY]); } - - if (mWindow->getFullscreen()) - { - display_scale.mV[0] = llround(display_scale.mV[0], 2.0f/(F32) mWindowRectRaw.getWidth()); - display_scale.mV[1] = llround(display_scale.mV[1], 2.0f/(F32) mWindowRectRaw.getHeight()); - } if (display_scale != mDisplayScale) { diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 410445d97f..1e0200a075 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -262,10 +262,6 @@ public: // Is window of our application frontmost? BOOL getActive() const { return mActive; } - void getTargetWindow(BOOL& fullscreen, S32& width, S32& height) const; - // The 'target' is where the user wants the window to be. It may not be - // there yet, because we may be supressing fullscreen prior to login. - const std::string& getInitAlert() { return mInitAlert; } // @@ -380,17 +376,12 @@ public: // Prints window implementation details void dumpState(); - // Request display setting changes - void toggleFullscreen(BOOL show_progress); - // handle shutting down GL and bringing it back up - void requestResolutionUpdate(bool fullscreen_checked); - void requestResolutionUpdate(); // doesn't affect fullscreen - BOOL checkSettings(); + void requestResolutionUpdate(); + void checkSettings(); void restartDisplay(BOOL show_progress_bar); - BOOL changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar); + BOOL changeDisplaySettings(LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar); BOOL getIgnoreDestroyWindow() { return mIgnoreActivate; } - F32 getDisplayAspectRatio() const; F32 getWorldViewAspectRatio() const; const LLVector2& getDisplayScale() const { return mDisplayScale; } void calcDisplayScale(); @@ -415,8 +406,6 @@ public: protected: BOOL mActive; - BOOL mWantFullscreen; - BOOL mShowFullscreenProgress; LLRect mWindowRectRaw; // whole window, including UI LLRect mWindowRectScaled; // whole window, scaled by UI size @@ -470,7 +459,6 @@ protected: bool mResDirty; bool mStatesDirty; - bool mIsFullscreenChecked; // Did the user check the fullscreen checkbox in the display settings U32 mCurrResolutionIndex; boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index dc458418d0..facaf01062 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -600,7 +600,7 @@ LLVOAvatarSkeletonInfo* LLVOAvatar::sAvatarSkeletonInfo = NULL; LLVOAvatar::LLVOAvatarXmlInfo* LLVOAvatar::sAvatarXmlInfo = NULL; LLVOAvatarDictionary *LLVOAvatar::sAvatarDictionary = NULL; S32 LLVOAvatar::sFreezeCounter = 0; -S32 LLVOAvatar::sMaxVisible = 50; +U32 LLVOAvatar::sMaxVisible = 12; F32 LLVOAvatar::sRenderDistance = 256.f; S32 LLVOAvatar::sNumVisibleAvatars = 0; S32 LLVOAvatar::sNumLODChangesThisFrame = 0; @@ -3314,23 +3314,23 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { // muted avatars update at 16 hz mUpdatePeriod = 16; } - else if (visible && mVisibilityRank <= LLVOAvatar::sMaxVisible * 0.25f) + else if (visible && mVisibilityRank <= LLVOAvatar::sMaxVisible) { //first 25% of max visible avatars are not impostored mUpdatePeriod = 1; } - else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 0.75f) - { //back 25% of max visible avatars are slow updating impostors - mUpdatePeriod = 8; - } - else if (visible && mVisibilityRank > (U32) LLVOAvatar::sMaxVisible) + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 4) { //background avatars are REALLY slow updating impostors mUpdatePeriod = 16; } + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 3) + { //back 25% of max visible avatars are slow updating impostors + mUpdatePeriod = 8; + } else if (visible && mImpostorPixelArea <= impostor_area) { // stuff in between gets an update period based on pixel area mUpdatePeriod = llclamp((S32) sqrtf(impostor_area*4.f/mImpostorPixelArea), 2, 8); } - else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 0.25f) + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible) { // force nearby impostors in ultra crowded areas mUpdatePeriod = 2; } @@ -3692,7 +3692,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED, // AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); - const F32 STEP_VOLUME = 0.5f; + const F32 STEP_VOLUME = 0.1f; const LLUUID& step_sound_id = getStepSound(); LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); @@ -4351,9 +4351,14 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); mMinPixelArea = llmin(pixel_area, mMinPixelArea); imagep->resetTextureStats(); + imagep->setResetMaxVirtualSizeFlag(false) ; imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->setBoostLevel(boost_level); + if(boost_level == LLViewerTexture::BOOST_AVATAR_BAKED_SELF) + { + imagep->setAdditionalDecodePriority(1.0f) ; + } } //virtual diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 384ab88816..e9c2589865 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -232,8 +232,8 @@ public: public: static S32 sRenderName; static BOOL sRenderGroupTitles; - static S32 sMaxVisible; - static F32 sRenderDistance; //distance at which avatars will render (affected by control "RenderAvatarMaxVisible") + static U32 sMaxVisible; //(affected by control "RenderAvatarMaxVisible") + static F32 sRenderDistance; //distance at which avatars will render. static BOOL sShowAnimationDebug; // show animation debug info static BOOL sUseImpostors; //use impostors for far away avatars static BOOL sShowFootPlane; // show foot collision plane reported by server diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 462c442954..91af5fefde 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -975,12 +975,6 @@ void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_re const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second; const LLVOAvatarDefines::EBakedTextureIndex index = baked_iter->first; - // if we're editing our appearance, ensure that we're not using baked textures - // The baked texture for alpha masks is set explicitly when you hit "save" - if (gAgentCamera.cameraCustomizeAvatar()) - { - setNewBakedTexture(index,IMG_DEFAULT_AVATAR); - } if (baked_dict) { for (LLVOAvatarDefines::wearables_vec_t::const_iterator type_iter = baked_dict->mWearables.begin(); @@ -1273,7 +1267,8 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset) //----------------------------------------------------------------------------- BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) const { - const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + // const U32 desired_tex_discard_level = 0; // hack to not bake textures on lower discard levels. for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { @@ -1289,7 +1284,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { - if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level)) + if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(desired_tex_discard_level)) { return FALSE; } @@ -1304,7 +1299,8 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const { - const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + // const U32 desired_tex_discard_level = 0; // hack to not bake textures on lower discard levels for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { @@ -1318,7 +1314,7 @@ BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { - if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level)) + if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(desired_tex_discard_level)) { return FALSE; } @@ -1334,7 +1330,7 @@ BOOL LLVOAvatarSelf::isBakedTextureFinal(const LLVOAvatarDefines::EBakedTextureI if (!layerset) return FALSE; const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite(); if (!layerset_buffer) return FALSE; - return !layerset_buffer->uploadPending(); + return !layerset_buffer->uploadNeeded(); } BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index) const @@ -1882,7 +1878,7 @@ const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLTexLayer if (layerset == mBakedTextureDatas[baked_index].mTexLayerSet) { const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second; - text += llformat("[%d] '%s' ( ",baked_index, baked_dict->mName.c_str()); + text += llformat("%d-%s ( ",baked_index, baked_dict->mName.c_str()); for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin(); local_tex_iter != baked_dict->mLocalTextures.end(); ++local_tex_iter) @@ -1975,37 +1971,47 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const ++iter) { const ETextureIndex t_index = (*iter); - lldebugs << "Checking index " << (U32) t_index << llendl; - // MULTI-WEARABLE: old method. replace. - const LLUUID& texture_id = getTEImage( t_index )->getID(); - if (texture_id != IMG_DEFAULT_AVATAR) - { - // Search inventory for this texture. - LLViewerInventoryCategory::cat_array_t cats; - LLViewerInventoryItem::item_array_t items; - LLAssetIDMatches asset_id_matches(texture_id); - gInventory.collectDescendentsIf(LLUUID::null, - cats, - items, - LLInventoryModel::INCLUDE_TRASH, - asset_id_matches); - - BOOL can_grab = FALSE; - lldebugs << "item count for asset " << texture_id << ": " << items.count() << llendl; - if (items.count()) + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(t_index); + U32 count = gAgentWearables.getWearableCount(wearable_type); + lldebugs << "Checking index " << (U32) t_index << " count: " << count << llendl; + + for (U32 wearable_index = 0; wearable_index < count; ++wearable_index) + { + LLWearable *wearable = gAgentWearables.getWearable(wearable_type, wearable_index); + if (wearable) { - // search for full permissions version - for (S32 i = 0; i < items.count(); i++) + const LLLocalTextureObject *texture = wearable->getLocalTextureObject((S32)t_index); + const LLUUID& texture_id = texture->getID(); + if (texture_id != IMG_DEFAULT_AVATAR) { - LLViewerInventoryItem* itemp = items[i]; - if (itemp->getIsFullPerm()) + // Search inventory for this texture. + LLViewerInventoryCategory::cat_array_t cats; + LLViewerInventoryItem::item_array_t items; + LLAssetIDMatches asset_id_matches(texture_id); + gInventory.collectDescendentsIf(LLUUID::null, + cats, + items, + LLInventoryModel::INCLUDE_TRASH, + asset_id_matches); + + BOOL can_grab = FALSE; + lldebugs << "item count for asset " << texture_id << ": " << items.count() << llendl; + if (items.count()) { - can_grab = TRUE; - break; + // search for full permissions version + for (S32 i = 0; i < items.count(); i++) + { + LLViewerInventoryItem* itemp = items[i]; + if (itemp->getIsFullPerm()) + { + can_grab = TRUE; + break; + } + } } + if (!can_grab) return FALSE; } } - if (!can_grab) return FALSE; } } @@ -2024,7 +2030,11 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe F32 desired_pixels; desired_pixels = llmin(mPixelArea, (F32)getTexImageArea()); imagep->setBoostLevel(getAvatarBoostLevel()); + + imagep->resetTextureStats(); + imagep->setResetMaxVirtualSizeFlag(false) ; imagep->addTextureStats( desired_pixels / texel_area_ratio ); + imagep->setAdditionalDecodePriority(1.0f) ; imagep->forceUpdateBindStats() ; if (imagep->getDiscardLevel() < 0) { diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 1b4471a9fe..070663e22f 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -897,9 +897,9 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s else { LL_WARNS("Voice") << "incoming SIP URL is not provided. Channel may not work properly." << LL_ENDL; - // In case of incoming AvaLine call generated URI will be differ from original one. - // This is because Avatar-2-Avatar URI is based on avatar UUID but Avaline is not. - // See LLVoiceClient::sessionAddedEvent() -> setUUIDFromStringHash() + // In the case of an incoming AvaLine call, the generated URI will be different from the + // original one. This is because the P2P URI is based on avatar UUID but Avaline is not. + // See LLVoiceClient::sessionAddedEvent() setURI(LLVoiceClient::getInstance()->sipURIFromID(mOtherUserID)); } diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 1784ceaa12..ee843435bc 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -116,7 +116,7 @@ protected: void doSetState(const EState& state); void setURI(std::string uri); - // there can be two directions ICOMING and OUTGOING + // there can be two directions INCOMING and OUTGOING EDirection mCallDirection; std::string mURI; diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 42e44634b6..e8635d7f1a 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -35,6 +35,7 @@ #include "llviewerwindow.h" #include "llvoicevivox.h" #include "llviewernetwork.h" +#include "llcommandhandler.h" #include "llhttpnode.h" #include "llnotificationsutil.h" #include "llsdserialize.h" @@ -46,6 +47,39 @@ const F32 LLVoiceClient::VOLUME_MIN = 0.f; const F32 LLVoiceClient::VOLUME_DEFAULT = 0.5f; const F32 LLVoiceClient::VOLUME_MAX = 1.0f; + +// Support for secondlife:///app/voice SLapps +class LLVoiceHandler : public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLVoiceHandler() : LLCommandHandler("voice", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + if (params[0].asString() == "effects") + { + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + // If the voice client doesn't support voice effects, we can't handle effects SLapps + if (!effect_interface) + { + return false; + } + + // Support secondlife:///app/voice/effects/refresh to update the voice effect list with new effects + if (params[1].asString() == "refresh") + { + effect_interface->refreshVoiceEffectLists(false); + return true; + } + } + return false; + } +}; +LLVoiceHandler gVoiceHandler; + + + std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserver::EStatusType inStatus) { std::string result = "UNKNOWN"; @@ -77,13 +111,14 @@ std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserv - /////////////////////////////////////////////////////////////////////////////////////////////// LLVoiceClient::LLVoiceClient() : mVoiceModule(NULL), - m_servicePump(NULL) + m_servicePump(NULL), + mVoiceEffectEnabled(LLCachedControl<bool>(gSavedSettings, "VoiceMorphingEnabled")), + mVoiceEffectDefault(LLCachedControl<std::string>(gSavedPerAccountSettings, "VoiceEffectDefault")) { } @@ -567,7 +602,7 @@ std::string LLVoiceClient::getDisplayName(const LLUUID& id) } } -bool LLVoiceClient::isVoiceWorking() +bool LLVoiceClient::isVoiceWorking() const { if (mVoiceModule) { @@ -710,6 +745,10 @@ std::string LLVoiceClient::sipURIFromID(const LLUUID &id) } } +LLVoiceEffectInterface* LLVoiceClient::getVoiceEffectInterface() const +{ + return getVoiceEffectEnabled() ? dynamic_cast<LLVoiceEffectInterface*>(mVoiceModule) : NULL; +} /////////////////// // version checking diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index e08fed7ae9..0e3d9a5435 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -42,6 +42,7 @@ class LLVOAvatar; #include "llviewerregion.h" #include "llcallingcard.h" // for LLFriendObserver #include "llsecapi.h" +#include "llcontrol.h" // devices @@ -52,7 +53,7 @@ class LLVoiceClientParticipantObserver { public: virtual ~LLVoiceClientParticipantObserver() { } - virtual void onChange() = 0; + virtual void onParticipantsChanged() = 0; }; @@ -109,7 +110,7 @@ public: virtual void updateSettings()=0; // call after loading settings and whenever they change - virtual bool isVoiceWorking()=0; // connected to a voice server and voice channel + virtual bool isVoiceWorking() const = 0; // connected to a voice server and voice channel virtual const LLVoiceVersionInfo& getVersion()=0; @@ -217,8 +218,6 @@ public: ////////////////////////// /// @name nearby speaker accessors //@{ - - virtual BOOL getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar virtual std::string getDisplayName(const LLUUID& id)=0; virtual BOOL isOnlineSIP(const LLUUID &id)=0; @@ -261,6 +260,63 @@ public: }; +////////////////////////////////// +/// @class LLVoiceEffectObserver +class LLVoiceEffectObserver +{ +public: + virtual ~LLVoiceEffectObserver() { } + virtual void onVoiceEffectChanged(bool effect_list_updated) = 0; +}; + +typedef std::multimap<const std::string, const LLUUID, LLDictionaryLess> voice_effect_list_t; + +////////////////////////////////// +/// @class LLVoiceEffectInterface +/// @brief Voice effect module interface +/// +/// Voice effect modules should provide an implementation for this interface. +///////////////////////////////// + +class LLVoiceEffectInterface +{ +public: + LLVoiceEffectInterface() {} + virtual ~LLVoiceEffectInterface() {} + + ////////////////////////// + /// @name Accessors + //@{ + virtual bool setVoiceEffect(const LLUUID& id) = 0; + virtual const LLUUID getVoiceEffect() = 0; + virtual LLSD getVoiceEffectProperties(const LLUUID& id) = 0; + + virtual void refreshVoiceEffectLists(bool clear_lists) = 0; + virtual const voice_effect_list_t &getVoiceEffectList() const = 0; + virtual const voice_effect_list_t &getVoiceEffectTemplateList() const = 0; + //@} + + ////////////////////////////// + /// @name Status notification + //@{ + virtual void addObserver(LLVoiceEffectObserver* observer) = 0; + virtual void removeObserver(LLVoiceEffectObserver* observer) = 0; + //@} + + ////////////////////////////// + /// @name Preview buffer + //@{ + virtual void enablePreviewBuffer(bool enable) = 0; + virtual void recordPreviewBuffer() = 0; + virtual void playPreviewBuffer(const LLUUID& effect_id = LLUUID::null) = 0; + virtual void stopPreviewBuffer() = 0; + + virtual bool isPreviewRecording() = 0; + virtual bool isPreviewPlaying() = 0; + //@} +}; + + class LLVoiceClient: public LLSingleton<LLVoiceClient> { LOG_CLASS(LLVoiceClient); @@ -281,7 +337,7 @@ public: void updateSettings(); // call after loading settings and whenever they change - bool isVoiceWorking(); // connected to a voice server and voice channel + bool isVoiceWorking() const; // connected to a voice server and voice channel // tuning void tuningStart(); @@ -403,10 +459,23 @@ public: void removeObserver(LLVoiceClientParticipantObserver* observer); std::string sipURIFromID(const LLUUID &id); - + + ////////////////////////// + /// @name Voice effects + //@{ + bool getVoiceEffectEnabled() const { return mVoiceEffectEnabled; }; + LLUUID getVoiceEffectDefault() const { return LLUUID(mVoiceEffectDefault); }; + + // Returns NULL if voice effects are not supported, or not enabled. + LLVoiceEffectInterface* getVoiceEffectInterface() const; + //@} + protected: LLVoiceModuleInterface* mVoiceModule; LLPumpIO *m_servicePump; + + LLCachedControl<bool> mVoiceEffectEnabled; + LLCachedControl<std::string> mVoiceEffectDefault; }; /** diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index e8ff3f6d49..25c4914c13 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -64,6 +64,7 @@ #include "llviewerparcelmgr.h" //#include "llfirstuse.h" #include "llspeakers.h" +#include "lltrans.h" #include "llviewerwindow.h" #include "llviewercamera.h" @@ -71,15 +72,11 @@ #include "llviewernetwork.h" #include "llnotificationsutil.h" +#include "stringize.h" + // for base64 decoding #include "apr_base64.h" -// for SHA1 hash -#include "apr_sha1.h" - -// for MD5 hash -#include "llmd5.h" - #define USE_SESSION_GROUPS 0 const F32 VOLUME_SCALE_VIVOX = 0.01f; @@ -104,14 +101,15 @@ const int MAX_LOGIN_RETRIES = 12; // blocked is VERY rare and it's better to sacrifice response time in this situation for the sake of stability. const int MAX_NORMAL_JOINING_SPATIAL_NUM = 50; +// How often to check for expired voice fonts in seconds +const F32 VOICE_FONT_EXPIRY_INTERVAL = 10.f; +// Time of day at which Vivox expires voice font subscriptions. +// Used to replace the time portion of received expiry timestamps. +static const std::string VOICE_FONT_EXPIRY_TIME = "T05:00:00Z"; + +// Maximum length of capture buffer recordings in seconds. +const F32 CAPTURE_BUFFER_MAX_TIME = 10.f; -static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str) -{ - LLMD5 md5_uuid; - md5_uuid.update((const unsigned char*)str.data(), str.size()); - md5_uuid.finalize(); - md5_uuid.raw_digest(uuid.mData); -} static int scale_mic_volume(float volume) { @@ -329,6 +327,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mBuddyListMapPopulated(false), mBlockRulesListReceived(false), mAutoAcceptRulesListReceived(false), + mCaptureDeviceDirty(false), mRenderDeviceDirty(false), mSpatialCoordsDirty(false), @@ -352,10 +351,17 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mVoiceEnabled(false), mWriteInProgress(false), - mLipSyncEnabled(false) - + mLipSyncEnabled(false), + mVoiceFontsReceived(false), + mVoiceFontsNew(false), + mVoiceFontListDirty(false), + mCaptureBufferMode(false), + mCaptureBufferRecording(false), + mCaptureBufferRecorded(false), + mCaptureBufferPlaying(false), + mPlayRequestCount(0) { mSpeakerVolume = scale_speaker_volume(0); @@ -400,19 +406,16 @@ void LLVivoxVoiceClient::init(LLPumpIO *pump) void LLVivoxVoiceClient::terminate() { - -// leaveAudioSession(); - logout(); - // As of SDK version 4885, this should no longer be necessary. It will linger after the socket close if it needs to. - // ms_sleep(2000); - connectorShutdown(); - closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. - - // This will do unpleasant things on windows. -// killGateway(); - - - + if(mConnected) + { + logout(); + connectorShutdown(); + closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. + } + else + { + killGateway(); + } } const LLVoiceVersionInfo& LLVivoxVoiceClient::getVersion() @@ -658,6 +661,11 @@ std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState) CASE(stateMicTuningStart); CASE(stateMicTuningRunning); CASE(stateMicTuningStop); + CASE(stateCaptureBufferPaused); + CASE(stateCaptureBufferRecStart); + CASE(stateCaptureBufferRecording); + CASE(stateCaptureBufferPlayStart); + CASE(stateCaptureBufferPlaying); CASE(stateConnectorStart); CASE(stateConnectorStarting); CASE(stateConnectorStarted); @@ -666,6 +674,8 @@ std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState) CASE(stateNeedsLogin); CASE(stateLoggingIn); CASE(stateLoggedIn); + CASE(stateVoiceFontsWait); + CASE(stateVoiceFontsReceived); CASE(stateCreatingSessionGroup); CASE(stateNoChannel); CASE(stateJoiningSession); @@ -779,8 +789,10 @@ void LLVivoxVoiceClient::stateMachine() // Clean up and reset everything. closeSocket(); deleteAllSessions(); - deleteAllBuddies(); - + deleteAllBuddies(); + deleteAllVoiceFonts(); + deleteVoiceFontTemplates(); + mConnectorHandle.clear(); mAccountHandle.clear(); mAccountPassword.clear(); @@ -1130,8 +1142,97 @@ void LLVivoxVoiceClient::stateMachine() } break; - - //MARK: stateConnectorStart + + //MARK: stateCaptureBufferPaused + case stateCaptureBufferPaused: + if (!mCaptureBufferMode) + { + // Leaving capture mode. + + mCaptureBufferRecording = false; + mCaptureBufferRecorded = false; + mCaptureBufferPlaying = false; + + // Return to stateNoChannel to trigger reconnection to a channel. + setState(stateNoChannel); + } + else if (mCaptureBufferRecording) + { + setState(stateCaptureBufferRecStart); + } + else if (mCaptureBufferPlaying) + { + setState(stateCaptureBufferPlayStart); + } + break; + + //MARK: stateCaptureBufferRecStart + case stateCaptureBufferRecStart: + captureBufferRecordStartSendMessage(); + + // Flag that something is recorded to allow playback. + mCaptureBufferRecorded = true; + + // Start the timer, recording will be stopped when it expires. + mCaptureTimer.start(); + mCaptureTimer.setTimerExpirySec(CAPTURE_BUFFER_MAX_TIME); + + // Update UI, should really use a separate callback. + notifyVoiceFontObservers(); + + setState(stateCaptureBufferRecording); + break; + + //MARK: stateCaptureBufferRecording + case stateCaptureBufferRecording: + if (!mCaptureBufferMode || !mCaptureBufferRecording || + mCaptureBufferPlaying || mCaptureTimer.hasExpired()) + { + // Stop recording + captureBufferRecordStopSendMessage(); + mCaptureBufferRecording = false; + + // Update UI, should really use a separate callback. + notifyVoiceFontObservers(); + + setState(stateCaptureBufferPaused); + } + break; + + //MARK: stateCaptureBufferPlayStart + case stateCaptureBufferPlayStart: + captureBufferPlayStartSendMessage(mPreviewVoiceFont); + + // Store the voice font being previewed, so that we know to restart if it changes. + mPreviewVoiceFontLast = mPreviewVoiceFont; + + // Update UI, should really use a separate callback. + notifyVoiceFontObservers(); + + setState(stateCaptureBufferPlaying); + break; + + //MARK: stateCaptureBufferPlaying + case stateCaptureBufferPlaying: + if (mCaptureBufferPlaying && mPreviewVoiceFont != mPreviewVoiceFontLast) + { + // If the preview voice font changes, restart playing with the new font. + setState(stateCaptureBufferPlayStart); + } + else if (!mCaptureBufferMode || !mCaptureBufferPlaying || mCaptureBufferRecording) + { + // Stop playing. + captureBufferPlayStopSendMessage(); + mCaptureBufferPlaying = false; + + // Update UI, should really use a separate callback. + notifyVoiceFontObservers(); + + setState(stateCaptureBufferPaused); + } + break; + + //MARK: stateConnectorStart case stateConnectorStart: if(!mVoiceEnabled) { @@ -1226,6 +1327,18 @@ void LLVivoxVoiceClient::stateMachine() notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGGED_IN); + if (LLVoiceClient::instance().getVoiceEffectEnabled()) + { + // Request the set of available voice fonts. + setState(stateVoiceFontsWait); + refreshVoiceEffectLists(true); + } + else + { + // If voice effects are disabled, pretend we've received them and carry on. + setState(stateVoiceFontsReceived); + } + // request the current set of block rules (we'll need them when updating the friends list) accountListBlockRulesSendMessage(); @@ -1257,12 +1370,25 @@ void LLVivoxVoiceClient::stateMachine() writeString(stream.str()); } } + break; + + //MARK: stateVoiceFontsWait + case stateVoiceFontsWait: // Await voice font list + // accountGetSessionFontsResponse() will transition from here to + // stateVoiceFontsReceived, to ensure we have the voice font list + // before attempting to create a session. + break; + //MARK: stateVoiceFontsReceived + case stateVoiceFontsReceived: // Voice font list received + // Set up the timer to check for expiring voice fonts + mVoiceFontExpiryTimer.start(); + mVoiceFontExpiryTimer.setTimerExpirySec(VOICE_FONT_EXPIRY_INTERVAL); + #if USE_SESSION_GROUPS // create the main session group - sessionGroupCreateSendMessage(); - setState(stateCreatingSessionGroup); + sessionGroupCreateSendMessage(); #else // Not using session groups -- skip the stateCreatingSessionGroup state. setState(stateNoChannel); @@ -1310,6 +1436,10 @@ void LLVivoxVoiceClient::stateMachine() mTuningExitState = stateNoChannel; setState(stateMicTuningStart); } + else if(mCaptureBufferMode) + { + setState(stateCaptureBufferPaused); + } else if(sessionNeedsRelog(mNextAudioSession)) { requestRelog(); @@ -1320,6 +1450,7 @@ void LLVivoxVoiceClient::stateMachine() sessionState *oldSession = mAudioSession; mAudioSession = mNextAudioSession; + mAudioSessionChanged = true; if(!mAudioSession->mReconnect) { mNextAudioSession = NULL; @@ -1482,6 +1613,13 @@ void LLVivoxVoiceClient::stateMachine() enforceTether(); } + // Do notifications for expiring Voice Fonts. + if (mVoiceFontExpiryTimer.hasExpired()) + { + expireVoiceFonts(); + mVoiceFontExpiryTimer.setTimerExpirySec(VOICE_FONT_EXPIRY_INTERVAL); + } + // Send an update only if the ptt or mute state has changed (which shouldn't be able to happen that often // -- the user can only click so fast) or every 10hz, whichever is sooner. // Sending for every volume update causes an excessive flood of messages whenever a volume slider is dragged. @@ -1551,6 +1689,8 @@ void LLVivoxVoiceClient::stateMachine() mAccountHandle.clear(); deleteAllSessions(); deleteAllBuddies(); + deleteAllVoiceFonts(); + deleteVoiceFontTemplates(); if(mVoiceEnabled && !mRelogRequested) { @@ -1631,15 +1771,15 @@ void LLVivoxVoiceClient::stateMachine() } - if(mAudioSession && mAudioSession->mParticipantsChanged) + if (mAudioSessionChanged) { - mAudioSession->mParticipantsChanged = false; - mAudioSessionChanged = true; + mAudioSessionChanged = false; + notifyParticipantObservers(); + notifyVoiceFontObservers(); } - - if(mAudioSessionChanged) + else if (mAudioSession && mAudioSession->mParticipantsChanged) { - mAudioSessionChanged = false; + mAudioSession->mParticipantsChanged = false; notifyParticipantObservers(); } } @@ -1755,8 +1895,11 @@ void LLVivoxVoiceClient::sessionGroupCreateSendMessage() void LLVivoxVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAudio, bool startText) { - LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; - + LL_DEBUGS("Voice") << "Requesting create: " << session->mSIPURI << LL_ENDL; + + S32 font_index = getVoiceFontIndex(session->mVoiceFontID); + LL_DEBUGS("Voice") << "With voice font: " << session->mVoiceFontID << " (" << font_index << ")" << LL_ENDL; + session->mCreateInProgress = true; if(startAudio) { @@ -1780,10 +1923,11 @@ void LLVivoxVoiceClient::sessionCreateSendMessage(sessionState *session, bool st << "<Password>" << LLURI::escape(session->mHash, allowed_chars) << "</Password>" << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>"; } - + stream << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" + << "<VoiceFontID>" << font_index << "</VoiceFontID>" << "<Name>" << mChannelName << "</Name>" << "</Request>\n\n\n"; writeString(stream.str()); @@ -1791,8 +1935,11 @@ void LLVivoxVoiceClient::sessionCreateSendMessage(sessionState *session, bool st void LLVivoxVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio, bool startText) { - LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; - + LL_DEBUGS("Voice") << "Requesting create: " << session->mSIPURI << LL_ENDL; + + S32 font_index = getVoiceFontIndex(session->mVoiceFontID); + LL_DEBUGS("Voice") << "With voice font: " << session->mVoiceFontID << " (" << font_index << ")" << LL_ENDL; + session->mCreateInProgress = true; if(startAudio) { @@ -1818,6 +1965,7 @@ void LLVivoxVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session << "<Name>" << mChannelName << "</Name>" << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" + << "<VoiceFontID>" << font_index << "</VoiceFontID>" << "<Password>" << password << "</Password>" << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>" << "</Request>\n\n\n" @@ -1828,7 +1976,10 @@ void LLVivoxVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session void LLVivoxVoiceClient::sessionMediaConnectSendMessage(sessionState *session) { - LL_DEBUGS("Voice") << "connecting audio to session handle: " << session->mHandle << LL_ENDL; + LL_DEBUGS("Voice") << "Connecting audio to session handle: " << session->mHandle << LL_ENDL; + + S32 font_index = getVoiceFontIndex(session->mVoiceFontID); + LL_DEBUGS("Voice") << "With voice font: " << session->mVoiceFontID << " (" << font_index << ")" << LL_ENDL; session->mMediaConnectInProgress = true; @@ -1838,6 +1989,7 @@ void LLVivoxVoiceClient::sessionMediaConnectSendMessage(sessionState *session) << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.MediaConnect.1\">" << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<VoiceFontID>" << font_index << "</VoiceFontID>" << "<Media>Audio</Media>" << "</Request>\n\n\n"; @@ -3164,7 +3316,7 @@ void LLVivoxVoiceClient::sessionAddedEvent( else { LL_INFOS("Voice") << "Could not generate caller id from uri, using hash of uri " << session->mSIPURI << LL_ENDL; - setUUIDFromStringHash(session->mCallerID, session->mSIPURI); + session->mCallerID.generate(session->mSIPURI); session->mSynthesizedCallerID = true; // Can't look up the name in this case -- we have to extract it from the URI. @@ -3442,6 +3594,26 @@ void LLVivoxVoiceClient::accountLoginStateChangeEvent( } } +void LLVivoxVoiceClient::mediaCompletionEvent(std::string &sessionGroupHandle, std::string &mediaCompletionType) +{ + if (mediaCompletionType == "AuxBufferAudioCapture") + { + mCaptureBufferRecording = false; + } + else if (mediaCompletionType == "AuxBufferAudioRender") + { + // Ignore all but the last stop event + if (--mPlayRequestCount <= 0) + { + mCaptureBufferPlaying = false; + } + } + else + { + LL_DEBUGS("Voice") << "Unknown MediaCompletionType: " << mediaCompletionType << LL_ENDL; + } +} + void LLVivoxVoiceClient::mediaStreamUpdatedEvent( std::string &sessionHandle, std::string &sessionGroupHandle, @@ -4150,8 +4322,8 @@ LLVivoxVoiceClient::participantState *LLVivoxVoiceClient::sessionState::addParti else { // Create a UUID by hashing the URI, but do NOT set mAvatarIDValid. - // This tells code in LLVivoxVoiceClient that the ID will not be in the name cache. - setUUIDFromStringHash(result->mAvatarID, uri); + // This indicates that the ID will not be in the name cache. + result->mAvatarID.generate(uri); } } @@ -4646,7 +4818,7 @@ BOOL LLVivoxVoiceClient::isOnlineSIP(const LLUUID &id) return result; } -bool LLVivoxVoiceClient::isVoiceWorking() +bool LLVivoxVoiceClient::isVoiceWorking() const { //Added stateSessionTerminated state to avoid problems with call in parcels with disabled voice (EXT-4758) // Condition with joining spatial num was added to take into account possible problems with connection to voice @@ -5120,6 +5292,7 @@ void LLVivoxVoiceClient::setVoiceEnabled(bool enabled) LLVoiceChannel::getCurrentVoiceChannel()->deactivate(); status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED; } + notifyStatusObservers(status); } } @@ -5667,7 +5840,12 @@ LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::addSession(const std::stri result = new sessionState(); result->mSIPURI = uri; result->mHandle = handle; - + + if (LLVoiceClient::instance().getVoiceEffectEnabled()) + { + result->mVoiceFontID = LLVoiceClient::instance().getVoiceEffectDefault(); + } + mSessions.insert(result); if(!result->mHandle.empty()) @@ -6092,8 +6270,8 @@ void LLVivoxVoiceClient::notifyParticipantObservers() ) { LLVoiceClientParticipantObserver* observer = *it; - observer->onChange(); - // In case onChange() deleted an entry. + observer->onParticipantsChanged(); + // In case onParticipantsChanged() deleted an entry. it = mParticipantObservers.upper_bound(observer); } } @@ -6258,6 +6436,660 @@ void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string } } +bool LLVivoxVoiceClient::setVoiceEffect(const LLUUID& id) +{ + if (!mAudioSession) + { + return false; + } + + if (!id.isNull()) + { + if (mVoiceFontMap.empty()) + { + LL_DEBUGS("Voice") << "Voice fonts not available." << LL_ENDL; + return false; + } + else if (mVoiceFontMap.find(id) == mVoiceFontMap.end()) + { + LL_DEBUGS("Voice") << "Invalid voice font " << id << LL_ENDL; + return false; + } + } + + // *TODO: Check for expired fonts? + mAudioSession->mVoiceFontID = id; + + // *TODO: Separate voice font defaults for spatial chat and IM? + gSavedPerAccountSettings.setString("VoiceEffectDefault", id.asString()); + + sessionSetVoiceFontSendMessage(mAudioSession); + notifyVoiceFontObservers(); + + return true; +} + +const LLUUID LLVivoxVoiceClient::getVoiceEffect() +{ + return mAudioSession ? mAudioSession->mVoiceFontID : LLUUID::null; +} + +LLSD LLVivoxVoiceClient::getVoiceEffectProperties(const LLUUID& id) +{ + LLSD sd; + + voice_font_map_t::iterator iter = mVoiceFontMap.find(id); + if (iter != mVoiceFontMap.end()) + { + sd["template_only"] = false; + } + else + { + // Voice effect is not in the voice font map, see if there is a template + iter = mVoiceFontTemplateMap.find(id); + if (iter == mVoiceFontTemplateMap.end()) + { + LL_WARNS("Voice") << "Voice effect " << id << "not found." << LL_ENDL; + return sd; + } + sd["template_only"] = true; + } + + voiceFontEntry *font = iter->second; + sd["name"] = font->mName; + sd["expiry_date"] = font->mExpirationDate; + sd["is_new"] = font->mIsNew; + + return sd; +} + +LLVivoxVoiceClient::voiceFontEntry::voiceFontEntry(LLUUID& id) : + mID(id), + mFontIndex(0), + mFontType(VOICE_FONT_TYPE_NONE), + mFontStatus(VOICE_FONT_STATUS_NONE), + mIsNew(false) +{ + mExpiryTimer.stop(); + mExpiryWarningTimer.stop(); +} + +LLVivoxVoiceClient::voiceFontEntry::~voiceFontEntry() +{ +} + +void LLVivoxVoiceClient::refreshVoiceEffectLists(bool clear_lists) +{ + if (clear_lists) + { + mVoiceFontsReceived = false; + deleteAllVoiceFonts(); + deleteVoiceFontTemplates(); + } + + accountGetSessionFontsSendMessage(); + accountGetTemplateFontsSendMessage(); +} + +const voice_effect_list_t& LLVivoxVoiceClient::getVoiceEffectList() const +{ + return mVoiceFontList; +} + +const voice_effect_list_t& LLVivoxVoiceClient::getVoiceEffectTemplateList() const +{ + return mVoiceFontTemplateList; +} + +void LLVivoxVoiceClient::addVoiceFont(const S32 font_index, + const std::string &name, + const std::string &description, + const LLDate &expiration_date, + bool has_expired, + const S32 font_type, + const S32 font_status, + const bool template_font) +{ + // Vivox SessionFontIDs are not guaranteed to remain the same between + // sessions or grids so use a UUID for the name. + + // If received name is not a UUID, fudge one by hashing the name and type. + LLUUID font_id; + if (LLUUID::validate(name)) + { + font_id = LLUUID(name); + } + else + { + font_id.generate(STRINGIZE(font_type << ":" << name)); + } + + voiceFontEntry *font = NULL; + + voice_font_map_t& font_map = template_font ? mVoiceFontTemplateMap : mVoiceFontMap; + voice_effect_list_t& font_list = template_font ? mVoiceFontTemplateList : mVoiceFontList; + + // Check whether we've seen this font before. + voice_font_map_t::iterator iter = font_map.find(font_id); + bool new_font = (iter == font_map.end()); + + // Override the has_expired flag if we have passed the expiration_date as a double check. + if (expiration_date.secondsSinceEpoch() < (LLDate::now().secondsSinceEpoch() + VOICE_FONT_EXPIRY_INTERVAL)) + { + has_expired = true; + } + + if (has_expired) + { + LL_DEBUGS("Voice") << "Expired " << (template_font ? "Template " : "") + << expiration_date.asString() << " " << font_id + << " (" << font_index << ") " << name << LL_ENDL; + + // Remove existing session fonts that have expired since we last saw them. + if (!new_font && !template_font) + { + deleteVoiceFont(font_id); + } + return; + } + + if (new_font) + { + // If it is a new font create a new entry. + font = new voiceFontEntry(font_id); + } + else + { + // Not a new font, update the existing entry + font = iter->second; + } + + if (font) + { + font->mFontIndex = font_index; + // Use the description for the human readable name if available, as the + // "name" may be a UUID. + font->mName = description.empty() ? name : description; + font->mFontType = font_type; + font->mFontStatus = font_status; + + // If the font is new or the expiration date has changed the expiry timers need updating. + if (!template_font && (new_font || font->mExpirationDate != expiration_date)) + { + font->mExpirationDate = expiration_date; + + // Set the expiry timer to trigger a notification when the voice font can no longer be used. + font->mExpiryTimer.start(); + font->mExpiryTimer.setExpiryAt(expiration_date.secondsSinceEpoch() - VOICE_FONT_EXPIRY_INTERVAL); + + // Set the warning timer to some interval before actual expiry. + S32 warning_time = gSavedSettings.getS32("VoiceEffectExpiryWarningTime"); + if (warning_time != 0) + { + font->mExpiryWarningTimer.start(); + F64 expiry_time = (expiration_date.secondsSinceEpoch() - (F64)warning_time); + font->mExpiryWarningTimer.setExpiryAt(expiry_time - VOICE_FONT_EXPIRY_INTERVAL); + } + else + { + // Disable the warning timer. + font->mExpiryWarningTimer.stop(); + } + + // Only flag new session fonts after the first time we have fetched the list. + if (mVoiceFontsReceived) + { + font->mIsNew = true; + mVoiceFontsNew = true; + } + } + + LL_DEBUGS("Voice") << (template_font ? "Template " : "") + << font->mExpirationDate.asString() << " " << font->mID + << " (" << font->mFontIndex << ") " << name << LL_ENDL; + + if (new_font) + { + font_map.insert(voice_font_map_t::value_type(font->mID, font)); + font_list.insert(voice_effect_list_t::value_type(font->mName, font->mID)); + } + + mVoiceFontListDirty = true; + + // Debugging stuff + + if (font_type < VOICE_FONT_TYPE_NONE || font_type >= VOICE_FONT_TYPE_UNKNOWN) + { + LL_DEBUGS("Voice") << "Unknown voice font type: " << font_type << LL_ENDL; + } + if (font_status < VOICE_FONT_STATUS_NONE || font_status >= VOICE_FONT_STATUS_UNKNOWN) + { + LL_DEBUGS("Voice") << "Unknown voice font status: " << font_status << LL_ENDL; + } + } +} + +void LLVivoxVoiceClient::expireVoiceFonts() +{ + // *TODO: If we are selling voice fonts in packs, there are probably + // going to be a number of fonts with the same expiration time, so would + // be more efficient to just keep a list of expiration times rather + // than checking each font individually. + + bool have_expired = false; + bool will_expire = false; + bool expired_in_use = false; + + LLUUID current_effect = LLVoiceClient::instance().getVoiceEffectDefault(); + + voice_font_map_t::iterator iter; + for (iter = mVoiceFontMap.begin(); iter != mVoiceFontMap.end(); ++iter) + { + voiceFontEntry* voice_font = iter->second; + LLFrameTimer& expiry_timer = voice_font->mExpiryTimer; + LLFrameTimer& warning_timer = voice_font->mExpiryWarningTimer; + + // Check for expired voice fonts + if (expiry_timer.getStarted() && expiry_timer.hasExpired()) + { + // Check whether it is the active voice font + if (voice_font->mID == current_effect) + { + // Reset to no voice effect. + setVoiceEffect(LLUUID::null); + expired_in_use = true; + } + + LL_DEBUGS("Voice") << "Voice Font " << voice_font->mName << " has expired." << LL_ENDL; + deleteVoiceFont(voice_font->mID); + have_expired = true; + } + + // Check for voice fonts that will expire in less that the warning time + if (warning_timer.getStarted() && warning_timer.hasExpired()) + { + LL_DEBUGS("Voice") << "Voice Font " << voice_font->mName << " will expire soon." << LL_ENDL; + will_expire = true; + warning_timer.stop(); + } + } + + LLSD args; + args["URL"] = LLTrans::getString("voice_morphing_url"); + + // Give a notification if any voice fonts have expired. + if (have_expired) + { + if (expired_in_use) + { + LLNotificationsUtil::add("VoiceEffectsExpiredInUse", args); + } + else + { + LLNotificationsUtil::add("VoiceEffectsExpired", args); + } + + // Refresh voice font lists in the UI. + notifyVoiceFontObservers(); + } + + // Give a warning notification if any voice fonts are due to expire. + if (will_expire) + { + S32 seconds = gSavedSettings.getS32("VoiceEffectExpiryWarningTime"); + args["INTERVAL"] = llformat("%d", seconds / SEC_PER_DAY); + + LLNotificationsUtil::add("VoiceEffectsWillExpire", args); + } +} + +void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id) +{ + // Remove the entry from the voice font list. + voice_effect_list_t::iterator list_iter = mVoiceFontList.begin(); + while (list_iter != mVoiceFontList.end()) + { + if (list_iter->second == id) + { + LL_DEBUGS("Voice") << "Removing " << id << " from the voice font list." << LL_ENDL; + mVoiceFontList.erase(list_iter++); + mVoiceFontListDirty = true; + } + else + { + ++list_iter; + } + } + + // Find the entry in the voice font map and erase its data. + voice_font_map_t::iterator map_iter = mVoiceFontMap.find(id); + if (map_iter != mVoiceFontMap.end()) + { + delete map_iter->second; + } + + // Remove the entry from the voice font map. + mVoiceFontMap.erase(map_iter); +} + +void LLVivoxVoiceClient::deleteAllVoiceFonts() +{ + mVoiceFontList.clear(); + + voice_font_map_t::iterator iter; + for (iter = mVoiceFontMap.begin(); iter != mVoiceFontMap.end(); ++iter) + { + delete iter->second; + } + mVoiceFontMap.clear(); +} + +void LLVivoxVoiceClient::deleteVoiceFontTemplates() +{ + mVoiceFontTemplateList.clear(); + + voice_font_map_t::iterator iter; + for (iter = mVoiceFontTemplateMap.begin(); iter != mVoiceFontTemplateMap.end(); ++iter) + { + delete iter->second; + } + mVoiceFontTemplateMap.clear(); +} + +S32 LLVivoxVoiceClient::getVoiceFontIndex(const LLUUID& id) const +{ + S32 result = 0; + if (!id.isNull()) + { + voice_font_map_t::const_iterator it = mVoiceFontMap.find(id); + if (it != mVoiceFontMap.end()) + { + result = it->second->mFontIndex; + } + else + { + LL_DEBUGS("Voice") << "Selected voice font " << id << " is not available." << LL_ENDL; + } + } + return result; +} + +S32 LLVivoxVoiceClient::getVoiceFontTemplateIndex(const LLUUID& id) const +{ + S32 result = 0; + if (!id.isNull()) + { + voice_font_map_t::const_iterator it = mVoiceFontTemplateMap.find(id); + if (it != mVoiceFontTemplateMap.end()) + { + result = it->second->mFontIndex; + } + else + { + LL_DEBUGS("Voice") << "Selected voice font template " << id << " is not available." << LL_ENDL; + } + } + return result; +} + +void LLVivoxVoiceClient::accountGetSessionFontsSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Requesting voice font list." << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.GetSessionFonts.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::accountGetTemplateFontsSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Requesting voice font template list." << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.GetTemplateFonts.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::sessionSetVoiceFontSendMessage(sessionState *session) +{ + S32 font_index = getVoiceFontIndex(session->mVoiceFontID); + LL_DEBUGS("Voice") << "Requesting voice font: " << session->mVoiceFontID << " (" << font_index << "), session handle: " << session->mHandle << LL_ENDL; + + std::ostringstream stream; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetVoiceFont.1\">" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<SessionFontID>" << font_index << "</SessionFontID>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::accountGetSessionFontsResponse(int statusCode, const std::string &statusString) +{ + // Voice font list entries were updated via addVoiceFont() during parsing. + if(getState() == stateVoiceFontsWait) + { + setState(stateVoiceFontsReceived); + } + + notifyVoiceFontObservers(); + mVoiceFontsReceived = true; +} + +void LLVivoxVoiceClient::accountGetTemplateFontsResponse(int statusCode, const std::string &statusString) +{ + // Voice font list entries were updated via addVoiceFont() during parsing. + notifyVoiceFontObservers(); +} +void LLVivoxVoiceClient::addObserver(LLVoiceEffectObserver* observer) +{ + mVoiceFontObservers.insert(observer); +} + +void LLVivoxVoiceClient::removeObserver(LLVoiceEffectObserver* observer) +{ + mVoiceFontObservers.erase(observer); +} + +void LLVivoxVoiceClient::notifyVoiceFontObservers() +{ + LL_DEBUGS("Voice") << "Notifying voice effect observers. Lists changed: " << mVoiceFontListDirty << LL_ENDL; + + for (voice_font_observer_set_t::iterator it = mVoiceFontObservers.begin(); + it != mVoiceFontObservers.end(); + ) + { + LLVoiceEffectObserver* observer = *it; + observer->onVoiceEffectChanged(mVoiceFontListDirty); + // In case onVoiceEffectChanged() deleted an entry. + it = mVoiceFontObservers.upper_bound(observer); + } + mVoiceFontListDirty = false; + + // If new Voice Fonts have been added notify the user. + if (mVoiceFontsNew) + { + if(mVoiceFontsReceived) + { + LLNotificationsUtil::add("VoiceEffectsNew"); + } + mVoiceFontsNew = false; + } +} + +void LLVivoxVoiceClient::enablePreviewBuffer(bool enable) +{ + mCaptureBufferMode = enable; + if(mCaptureBufferMode && getState() >= stateNoChannel) + { + LL_DEBUGS("Voice") << "no channel" << LL_ENDL; + sessionTerminate(); + } +} + +void LLVivoxVoiceClient::recordPreviewBuffer() +{ + if (!mCaptureBufferMode) + { + LL_DEBUGS("Voice") << "Not in voice effect preview mode, cannot start recording." << LL_ENDL; + mCaptureBufferRecording = false; + return; + } + + mCaptureBufferRecording = true; +} + +void LLVivoxVoiceClient::playPreviewBuffer(const LLUUID& effect_id) +{ + if (!mCaptureBufferMode) + { + LL_DEBUGS("Voice") << "Not in voice effect preview mode, no buffer to play." << LL_ENDL; + mCaptureBufferRecording = false; + return; + } + + if (!mCaptureBufferRecorded) + { + // Can't play until we have something recorded! + mCaptureBufferPlaying = false; + return; + } + + mPreviewVoiceFont = effect_id; + mCaptureBufferPlaying = true; +} + +void LLVivoxVoiceClient::stopPreviewBuffer() +{ + mCaptureBufferRecording = false; + mCaptureBufferPlaying = false; +} + +bool LLVivoxVoiceClient::isPreviewRecording() +{ + return (mCaptureBufferMode && mCaptureBufferRecording); +} + +bool LLVivoxVoiceClient::isPreviewPlaying() +{ + return (mCaptureBufferMode && mCaptureBufferPlaying); +} + +void LLVivoxVoiceClient::captureBufferRecordStartSendMessage() +{ if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Starting audio capture to buffer." << LL_ENDL; + + // Start capture + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.StartBufferCapture.1\">" + << "</Request>" + << "\n\n\n"; + + // Unmute the mic + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>false</Value>" + << "</Request>\n\n\n"; + + // Dirty the PTT state so that it will get reset when we finishing previewing + mPTTDirty = true; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::captureBufferRecordStopSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Stopping audio capture to buffer." << LL_ENDL; + + // Mute the mic. PTT state was dirtied at recording start, so will be reset when finished previewing. + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>true</Value>" + << "</Request>\n\n\n"; + + // Stop capture + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStop.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::captureBufferPlayStartSendMessage(const LLUUID& voice_font_id) +{ + if(!mAccountHandle.empty()) + { + // Track how may play requests are sent, so we know how many stop events to + // expect before play actually stops. + ++mPlayRequestCount; + + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Starting audio buffer playback." << LL_ENDL; + + S32 font_index = getVoiceFontTemplateIndex(voice_font_id); + LL_DEBUGS("Voice") << "With voice font: " << voice_font_id << " (" << font_index << ")" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.PlayAudioBuffer.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<TemplateFontID>" << font_index << "</TemplateFontID>" + << "<FontDelta />" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::captureBufferPlayStopSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Stopping audio buffer playback." << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStop.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} LLVivoxProtocolParser::LLVivoxProtocolParser() { @@ -6476,7 +7308,30 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) { LLVivoxVoiceClient::getInstance()->deleteAllAutoAcceptRules(); } - + else if (!stricmp("SessionFont", tag)) + { + id = 0; + nameString.clear(); + descriptionString.clear(); + expirationDate = LLDate(); + hasExpired = false; + fontType = 0; + fontStatus = 0; + } + else if (!stricmp("TemplateFont", tag)) + { + id = 0; + nameString.clear(); + descriptionString.clear(); + expirationDate = LLDate(); + hasExpired = false; + fontType = 0; + fontStatus = 0; + } + else if (!stricmp("MediaCompletionType", tag)) + { + mediaCompletionType.clear(); + } } } responseDepth++; @@ -6622,8 +7477,43 @@ void LLVivoxProtocolParser::EndTag(const char *tag) subscriptionHandle = string; else if (!stricmp("SubscriptionType", tag)) subscriptionType = string; - - + else if (!stricmp("SessionFont", tag)) + { + LLVivoxVoiceClient::getInstance()->addVoiceFont(id, nameString, descriptionString, expirationDate, hasExpired, fontType, fontStatus, false); + } + else if (!stricmp("TemplateFont", tag)) + { + LLVivoxVoiceClient::getInstance()->addVoiceFont(id, nameString, descriptionString, expirationDate, hasExpired, fontType, fontStatus, true); + } + else if (!stricmp("ID", tag)) + { + id = strtol(string.c_str(), NULL, 10); + } + else if (!stricmp("Description", tag)) + { + descriptionString = string; + } + else if (!stricmp("ExpirationDate", tag)) + { + expirationDate = expiryTimeStampToLLDate(string); + } + else if (!stricmp("Expired", tag)) + { + hasExpired = !stricmp(string.c_str(), "1"); + } + else if (!stricmp("Type", tag)) + { + fontType = strtol(string.c_str(), NULL, 10); + } + else if (!stricmp("Status", tag)) + { + fontStatus = strtol(string.c_str(), NULL, 10); + } + else if (!stricmp("MediaCompletionType", tag)) + { + mediaCompletionType = string;; + } + textBuffer.clear(); accumulateText= false; @@ -6652,6 +7542,21 @@ void LLVivoxProtocolParser::CharData(const char *buffer, int length) // -------------------------------------------------------------------------------- +LLDate LLVivoxProtocolParser::expiryTimeStampToLLDate(const std::string& vivox_ts) +{ + // *HACK: Vivox reports the time incorrectly. LLDate also only parses a + // subset of valid ISO 8601 dates (only handles Z, not offsets). + // So just use the date portion and fix the time here. + std::string time_stamp = vivox_ts.substr(0, 10); + time_stamp += VOICE_FONT_EXPIRY_TIME; + + LL_DEBUGS("VivoxProtocolParser") << "Vivox timestamp " << vivox_ts << " modified to: " << time_stamp << LL_ENDL; + + return LLDate(time_stamp); +} + +// -------------------------------------------------------------------------------- + void LLVivoxProtocolParser::processResponse(std::string tag) { LL_DEBUGS("VivoxProtocolParser") << tag << LL_ENDL; @@ -6705,7 +7610,17 @@ void LLVivoxProtocolParser::processResponse(std::string tag) </Event> */ LLVivoxVoiceClient::getInstance()->mediaStreamUpdatedEvent(sessionHandle, sessionGroupHandle, statusCode, statusString, state, incoming); - } + } + else if (!stricmp(eventTypeCstr, "MediaCompletionEvent")) + { + /* + <Event type="MediaCompletionEvent"> + <SessionGroupHandle /> + <MediaCompletionType>AuxBufferAudioCapture</MediaCompletionType> + </Event> + */ + LLVivoxVoiceClient::getInstance()->mediaCompletionEvent(sessionGroupHandle, mediaCompletionType); + } else if (!stricmp(eventTypeCstr, "TextStreamUpdatedEvent")) { /* @@ -6766,6 +7681,9 @@ void LLVivoxProtocolParser::processResponse(std::string tag) } else if (!stricmp(eventTypeCstr, "AuxAudioPropertiesEvent")) { + // These are really spammy in tuning mode + squelchDebugOutput = true; + LLVivoxVoiceClient::getInstance()->auxAudioPropertiesEvent(energy); } else if (!stricmp(eventTypeCstr, "BuddyPresenceEvent")) @@ -6880,6 +7798,14 @@ void LLVivoxProtocolParser::processResponse(std::string tag) // We don't need to process these, but they're so spammy we don't want to log them. squelchDebugOutput = true; } + else if (!stricmp(actionCstr, "Account.GetSessionFonts.1")) + { + LLVivoxVoiceClient::getInstance()->accountGetSessionFontsResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Account.GetTemplateFonts.1")) + { + LLVivoxVoiceClient::getInstance()->accountGetTemplateFontsResponse(statusCode, statusString); + } /* else if (!stricmp(actionCstr, "Account.ChannelGetList.1")) { diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 341f22bd73..d382cb0a70 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -57,15 +57,9 @@ class LLVivoxVoiceClientMuteListObserver; class LLVivoxVoiceClientFriendsObserver; -class LLVivoxVoiceClientParticipantObserver -{ -public: - virtual ~LLVivoxVoiceClientParticipantObserver() { } - virtual void onChange() = 0; -}; - - -class LLVivoxVoiceClient: public LLSingleton<LLVivoxVoiceClient>, virtual public LLVoiceModuleInterface +class LLVivoxVoiceClient : public LLSingleton<LLVivoxVoiceClient>, + virtual public LLVoiceModuleInterface, + virtual public LLVoiceEffectInterface { LOG_CLASS(LLVivoxVoiceClient); public: @@ -84,7 +78,7 @@ public: virtual void updateSettings(); // call after loading settings and whenever they change // Returns true if vivox has successfully logged in and is not in error state - virtual bool isVoiceWorking(); + virtual bool isVoiceWorking() const; ///////////////////// /// @name Tuning @@ -232,15 +226,49 @@ public: virtual void removeObserver(LLFriendObserver* observer); virtual void addObserver(LLVoiceClientParticipantObserver* observer); virtual void removeObserver(LLVoiceClientParticipantObserver* observer); - - - //@} virtual std::string sipURIFromID(const LLUUID &id); //@} - + /// @name LLVoiceEffectInterface virtual implementations + /// @see LLVoiceEffectInterface + //@{ + + ////////////////////////// + /// @name Accessors + //@{ + virtual bool setVoiceEffect(const LLUUID& id); + virtual const LLUUID getVoiceEffect(); + virtual LLSD getVoiceEffectProperties(const LLUUID& id); + + virtual void refreshVoiceEffectLists(bool clear_lists); + virtual const voice_effect_list_t& getVoiceEffectList() const; + virtual const voice_effect_list_t& getVoiceEffectTemplateList() const; + //@} + + ////////////////////////////// + /// @name Status notification + //@{ + virtual void addObserver(LLVoiceEffectObserver* observer); + virtual void removeObserver(LLVoiceEffectObserver* observer); + //@} + + ////////////////////////////// + /// @name Effect preview buffer + //@{ + virtual void enablePreviewBuffer(bool enable); + virtual void recordPreviewBuffer(); + virtual void playPreviewBuffer(const LLUUID& effect_id = LLUUID::null); + virtual void stopPreviewBuffer(); + + virtual bool isPreviewRecording(); + virtual bool isPreviewPlaying(); + //@} + + //@} + + protected: ////////////////////// // Vivox Specific definitions @@ -278,14 +306,13 @@ protected: bool mIsSpeaking; bool mIsModeratorMuted; bool mOnMuteList; // true if this avatar is on the user's mute list (and should be muted) - bool mVolumeSet; // true if incoming volume messages should not change the volume + bool mVolumeSet; // true if incoming volume messages should not change the volume bool mVolumeDirty; // true if this participant needs a volume command sent (either mOnMuteList or mUserVolume has changed) bool mAvatarIDValid; bool mIsSelf; }; typedef std::map<const std::string, participantState*> participantMap; - typedef std::map<const LLUUID, participantState*> participantUUIDMap; struct sessionState @@ -332,14 +359,17 @@ protected: bool mIncoming; bool mVoiceEnabled; bool mReconnect; // Whether we should try to reconnect to this session if it's dropped - // Set to true when the mute state of someone in the participant list changes. + + // Set to true when the volume/mute state of someone in the participant list changes. // The code will have to walk the list to find the changed participant(s). bool mVolumeDirty; - bool mMuteDirty; - + bool mMuteDirty; + bool mParticipantsChanged; participantMap mParticipantsByURI; participantUUIDMap mParticipantsByUUID; + + LLUUID mVoiceFontID; }; // internal state for a simple state machine. This is used to deal with the asynchronous nature of some of the messages. @@ -356,6 +386,11 @@ protected: stateMicTuningStart, stateMicTuningRunning, stateMicTuningStop, + stateCaptureBufferPaused, + stateCaptureBufferRecStart, + stateCaptureBufferRecording, + stateCaptureBufferPlayStart, + stateCaptureBufferPlaying, stateConnectorStart, // connector needs to be started stateConnectorStarting, // waiting for connector handle stateConnectorStarted, // connector handle received @@ -364,6 +399,8 @@ protected: stateNeedsLogin, // send login request stateLoggingIn, // waiting for account handle stateLoggedIn, // account handle received + stateVoiceFontsWait, // Awaiting the list of voice fonts + stateVoiceFontsReceived, // List of voice fonts received stateCreatingSessionGroup, // Creating the main session group stateNoChannel, // stateJoiningSession, // waiting for session handle @@ -436,8 +473,6 @@ protected: void tuningCaptureStartSendMessage(int duration); void tuningCaptureStopSendMessage(); - bool inTuningStates(); - //---------------------------------- // devices void clearCaptureDevices(); @@ -464,6 +499,7 @@ protected: void connectorShutdownResponse(int statusCode, std::string &statusString); void accountLoginStateChangeEvent(std::string &accountHandle, int statusCode, std::string &statusString, int state); + void mediaCompletionEvent(std::string &sessionGroupHandle, std::string &mediaCompletionType); void mediaStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, int statusCode, std::string &statusString, int state, bool incoming); void textStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, bool enabled, int state, bool incoming); void sessionAddedEvent(std::string &uriString, std::string &alias, std::string &sessionHandle, std::string &sessionGroupHandle, bool isChannel, bool incoming, std::string &nameString, std::string &applicationString); @@ -591,8 +627,8 @@ protected: void deleteAllAutoAcceptRules(void); void addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy); void accountListBlockRulesResponse(int statusCode, const std::string &statusString); - void accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString); - + void accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString); + ///////////////////////////// // session control messages @@ -621,7 +657,21 @@ protected: void lookupName(const LLUUID &id); void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name); void avatarNameResolved(const LLUUID &id, const std::string &name); - + + ///////////////////////////// + // Voice fonts + + void addVoiceFont(const S32 id, + const std::string &name, + const std::string &description, + const LLDate &expiration_date, + bool has_expired, + const S32 font_type, + const S32 font_status, + const bool template_font = false); + void accountGetSessionFontsResponse(int statusCode, const std::string &statusString); + void accountGetTemplateFontsResponse(int statusCode, const std::string &statusString); + private: LLVoiceVersionInfo mVoiceVersion; @@ -804,6 +854,88 @@ private: typedef std::set<LLFriendObserver*> friend_observer_set_t; friend_observer_set_t mFriendObservers; void notifyFriendObservers(); + + // Voice Fonts + + void expireVoiceFonts(); + void deleteVoiceFont(const LLUUID& id); + void deleteAllVoiceFonts(); + void deleteVoiceFontTemplates(); + + S32 getVoiceFontIndex(const LLUUID& id) const; + S32 getVoiceFontTemplateIndex(const LLUUID& id) const; + + void accountGetSessionFontsSendMessage(); + void accountGetTemplateFontsSendMessage(); + void sessionSetVoiceFontSendMessage(sessionState *session); + + void notifyVoiceFontObservers(); + + typedef enum e_voice_font_type + { + VOICE_FONT_TYPE_NONE = 0, + VOICE_FONT_TYPE_ROOT = 1, + VOICE_FONT_TYPE_USER = 2, + VOICE_FONT_TYPE_UNKNOWN + } EVoiceFontType; + + typedef enum e_voice_font_status + { + VOICE_FONT_STATUS_NONE = 0, + VOICE_FONT_STATUS_FREE = 1, + VOICE_FONT_STATUS_NOT_FREE = 2, + VOICE_FONT_STATUS_UNKNOWN + } EVoiceFontStatus; + + struct voiceFontEntry + { + voiceFontEntry(LLUUID& id); + ~voiceFontEntry(); + + LLUUID mID; + S32 mFontIndex; + std::string mName; + LLDate mExpirationDate; + S32 mFontType; + S32 mFontStatus; + bool mIsNew; + + LLFrameTimer mExpiryTimer; + LLFrameTimer mExpiryWarningTimer; + }; + + bool mVoiceFontsReceived; + bool mVoiceFontsNew; + bool mVoiceFontListDirty; + voice_effect_list_t mVoiceFontList; + voice_effect_list_t mVoiceFontTemplateList; + + typedef std::map<const LLUUID, voiceFontEntry*> voice_font_map_t; + voice_font_map_t mVoiceFontMap; + voice_font_map_t mVoiceFontTemplateMap; + + typedef std::set<LLVoiceEffectObserver*> voice_font_observer_set_t; + voice_font_observer_set_t mVoiceFontObservers; + + LLFrameTimer mVoiceFontExpiryTimer; + + + // Audio capture buffer + + void captureBufferRecordStartSendMessage(); + void captureBufferRecordStopSendMessage(); + void captureBufferPlayStartSendMessage(const LLUUID& voice_font_id = LLUUID::null); + void captureBufferPlayStopSendMessage(); + + bool mCaptureBufferMode; // Disconnected from voice channels while using the capture buffer. + bool mCaptureBufferRecording; // A voice sample is being captured. + bool mCaptureBufferRecorded; // A voice sample is captured in the buffer ready to play. + bool mCaptureBufferPlaying; // A voice sample is being played. + + LLTimer mCaptureTimer; + LLUUID mPreviewVoiceFont; + LLUUID mPreviewVoiceFontLast; + S32 mPlayRequestCount; }; /** @@ -890,7 +1022,13 @@ protected: int numberOfAliases; std::string subscriptionHandle; std::string subscriptionType; - + S32 id; + std::string descriptionString; + LLDate expirationDate; + bool hasExpired; + S32 fontType; + S32 fontStatus; + std::string mediaCompletionType; // Members for processing text between tags std::string textBuffer; @@ -907,11 +1045,9 @@ protected: void StartTag(const char *tag, const char **attr); void EndTag(const char *tag); void CharData(const char *buffer, int length); - + LLDate expiryTimeStampToLLDate(const std::string& vivox_ts); }; #endif //LL_VIVOX_VOICE_CLIENT_H - - diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d6453111d7..24e2f745d4 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1978,9 +1978,13 @@ bool LLVOVolume::hasMediaPermission(const LLMediaEntry* media_entry, MediaPermTy } // Group permissions - else if (0 != (media_perms & LLMediaEntry::PERM_GROUP) && permGroupOwner()) + else if (0 != (media_perms & LLMediaEntry::PERM_GROUP)) { - return true; + LLPermissions* obj_perm = LLSelectMgr::getInstance()->findObjectPermissions(this); + if (obj_perm && gAgent.isInGroup(obj_perm->getGroup())) + { + return true; + } } // Owner permissions diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 9e9b46473e..46c736c853 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -656,7 +656,7 @@ void LLWearable::writeToAvatar() image_id = LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te); } LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE ); - // MULTI-WEARABLE: replace hard-coded 0 + // MULTI-WEARABLE: assume index 0 will be used when writing to avatar. TODO: eliminate the need for this. gAgentAvatarp->setLocalTextureTE(te, image, 0); } } @@ -705,7 +705,7 @@ void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake } gAgentAvatarp->updateVisualParams(); - gAgentAvatarp->wearableUpdated(type, TRUE); + gAgentAvatarp->wearableUpdated(type, FALSE); // if( upload_bake ) // { diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index c35b45d446..9c308359fa 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -38,10 +38,10 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llinventoryfunctions.h" -#include "llinventorymodel.h" #include "llmenugl.h" // for LLContextMenu #include "lltransutil.h" #include "llviewerattachmenu.h" +#include "llvoavatarself.h" class LLFindOutfitItems : public LLInventoryCollectFunctor { @@ -106,29 +106,25 @@ LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryIt return list_item; } -BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask) +LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item) +: LLPanelInventoryListItemBase(item) { - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLUUID id = item->getUUID(); - - if (get_is_item_worn(id)) - { - LLAppearanceMgr::getInstance()->removeItemFromAvatar(id); - } - else - { - LLAppearanceMgr::getInstance()->wearItemOnAvatar(id, true, false); - } - } - - return LLUICtrl::handleDoubleClick(x, y, mask); } -LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item) -: LLPanelInventoryListItemBase(item) +// virtual +void LLPanelWearableOutfitItem::updateItem(const std::string& name, + const LLStyle::Params& input_params) { + std::string search_label = name; + LLStyle::Params style_params = input_params; + + if (mItem && get_is_item_worn(mItem->getUUID())) + { + search_label += LLTrans::getString("worn"); + style_params.font.style("BOLD"); + } + + LLPanelInventoryListItemBase::updateItem(search_label, style_params); } ////////////////////////////////////////////////////////////////////////// @@ -168,7 +164,7 @@ BOOL LLPanelClothingListItem::postBuild() addWidgetToRightSide("btn_move_up"); addWidgetToRightSide("btn_move_down"); addWidgetToRightSide("btn_lock"); - addWidgetToRightSide("btn_edit"); + addWidgetToRightSide("btn_edit_panel"); setWidgetsVisible(false); reshapeWidgets(); @@ -211,7 +207,7 @@ BOOL LLPanelBodyPartsListItem::postBuild() LLPanelInventoryListItemBase::postBuild(); addWidgetToRightSide("btn_lock"); - addWidgetToRightSide("btn_edit"); + addWidgetToRightSide("btn_edit_panel"); return TRUE; } @@ -256,6 +252,33 @@ BOOL LLPanelDeletableWearableListItem::postBuild() } +// static +LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryItem* item) +{ + LLPanelAttachmentListItem* list_item = NULL; + if(item) + { + list_item = new LLPanelAttachmentListItem(item); + list_item->init(); + } + return list_item; +} + +void LLPanelAttachmentListItem::setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params) +{ + std::string title_joint = title; + + if (mItem && isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(mItem->getLinkedUUID())) + { + std::string joint = LLTrans::getString(gAgentAvatarp->getAttachedPointName(mItem->getLinkedUUID())); + title_joint = title + " (" + joint + ")"; + } + + LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text, input_params); +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -267,22 +290,16 @@ LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableTyp return list_item; } -void LLPanelDummyClothingListItem::updateItem() -{ - std::string title = wearableTypeToString(mWearableType); - setTitle(title, LLStringUtil::null); -} - BOOL LLPanelDummyClothingListItem::postBuild() { LLIconCtrl* icon = getChild<LLIconCtrl>("item_icon"); setIconCtrl(icon); setTitleCtrl(getChild<LLTextBox>("item_name")); - addWidgetToRightSide("btn_add"); + addWidgetToRightSide("btn_add_panel"); - setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, FALSE, mWearableType, FALSE)); - updateItem(); + setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE)); + updateItem(wearableTypeToString(mWearableType)); // Make it look loke clothing item - reserve space for 'delete' button setLeftWidgetsWidth(icon->getRect().mLeft); @@ -427,15 +444,17 @@ static const LLWearableItemTypeNameComparator WEARABLE_TYPE_NAME_COMPARATOR; static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list"); LLWearableItemsList::Params::Params() -: use_internal_context_menu("use_internal_context_menu", true) +: standalone("standalone", true) {} LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) : LLInventoryItemsList(p) { setComparator(&WEARABLE_TYPE_NAME_COMPARATOR); - if (p.use_internal_context_menu) + mIsStandalone = p.standalone; + if (mIsStandalone) { + // Use built-in context menu. setRightMouseDownCallback(boost::bind(&LLWearableItemsList::onRightClick, this, _2, _3)); } } @@ -482,6 +501,37 @@ void LLWearableItemsList::updateList(const LLUUID& category_id) refreshList(item_array); } +void LLWearableItemsList::updateChangedItems(const LLInventoryModel::changed_items_t& changed_items_uuids) +{ + typedef std::vector<LLPanel*> item_panel_list_t; + + item_panel_list_t items; + getItems(items); + + for (item_panel_list_t::iterator items_iter = items.begin(); + items_iter != items.end(); + ++items_iter) + { + LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(*items_iter); + if (!item) continue; + + LLViewerInventoryItem* inv_item = item->getItem(); + if (!inv_item) continue; + + LLUUID linked_uuid = inv_item->getLinkedUUID(); + + for (LLInventoryModel::changed_items_t::const_iterator iter = changed_items_uuids.begin(); + iter != changed_items_uuids.end(); + ++iter) + { + if (linked_uuid == *iter) + { + item->setNeedsRefresh(true); + } + } + } +} + void LLWearableItemsList::onRightClick(S32 x, S32 y) { uuid_vec_t selected_uuids; @@ -499,6 +549,18 @@ void LLWearableItemsList::onRightClick(S32 x, S32 y) /// ContextMenu ////////////////////////////////////////////////////////////////////////// +LLWearableItemsList::ContextMenu::ContextMenu() +: mParent(NULL) +{ +} + +void LLWearableItemsList::ContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y) +{ + mParent = dynamic_cast<LLWearableItemsList*>(spawning_view); + LLListContextMenu::show(spawning_view, uuids, x, y); + mParent = NULL; // to avoid dereferencing an invalid pointer +} + // virtual LLContextMenu* LLWearableItemsList::ContextMenu::createMenu() { @@ -506,11 +568,13 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu() const uuid_vec_t& ids = mUUIDs; // selected items IDs LLUUID selected_id = ids.front(); // ID of the first selected item - functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false); + functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, true); + functor_t add = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false); functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); // Register handlers common for all wearable types. registrar.add("Wearable.Wear", boost::bind(handleMultiple, wear, ids)); + registrar.add("Wearable.Add", boost::bind(handleMultiple, add, ids)); registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids)); registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id)); registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id)); @@ -584,17 +648,22 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu } } // for + bool standalone = mParent ? mParent->isStandalone() : false; + // *TODO: eliminate multiple traversals over the menu items + setMenuItemVisible(menu, "wear_add", mask == MASK_CLOTHING && n_worn == 0); + setMenuItemEnabled(menu, "wear_add", n_items == 1 && canAddWearable(ids.front())); setMenuItemVisible(menu, "wear", n_worn == 0); - setMenuItemVisible(menu, "edit", mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1); - setMenuItemEnabled(menu, "edit", n_editable == 1 && n_worn == 1); + setMenuItemVisible(menu, "edit", !standalone && mask & (MASK_CLOTHING|MASK_BODYPART)); + setMenuItemEnabled(menu, "edit", n_editable == 1 && n_worn == 1 && n_items == 1); setMenuItemVisible(menu, "create_new", mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1); + setMenuItemVisible(menu, "show_original", !standalone); setMenuItemEnabled(menu, "show_original", n_items == 1 && n_links == n_items); setMenuItemVisible(menu, "take_off", mask == MASK_CLOTHING && n_worn == n_items); setMenuItemVisible(menu, "detach", mask == MASK_ATTACHMENT && n_worn == n_items); setMenuItemVisible(menu, "take_off_or_detach", mask == (MASK_ATTACHMENT|MASK_CLOTHING)); setMenuItemEnabled(menu, "take_off_or_detach", n_worn == n_items); - setMenuItemVisible(menu, "object_profile", mask & (MASK_ATTACHMENT|MASK_CLOTHING)); + setMenuItemVisible(menu, "object_profile", !standalone); setMenuItemEnabled(menu, "object_profile", n_items == 1); // Populate or hide the "Attach to..." / "Attach to HUD..." submenus. @@ -677,4 +746,23 @@ void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id) LLAgentWearables::createWearable(item->getWearableType(), true); } +// Can we wear another wearable of the given item's wearable type? +// static +bool LLWearableItemsList::ContextMenu::canAddWearable(const LLUUID& item_id) +{ + if (!gAgentWearables.areWearablesLoaded()) + { + return false; + } + + LLViewerInventoryItem* item = gInventory.getItem(item_id); + if (!item || item->getType() != LLAssetType::AT_CLOTHING) + { + return false; + } + + U32 wearable_count = gAgentWearables.getWearableCount(item->getWearableType()); + return wearable_count < LLAgentWearables::MAX_CLOTHING_PER_TYPE; +} + // EOF diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 0ed480a92a..5dc06284c3 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -84,13 +84,12 @@ public: static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item); /** - * Puts item on if it is not worn by agent - * otherwise takes it off on double click. - */ - /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + * Updates item name and (worn) suffix. + */ + /*virtual*/ void updateItem(const std::string& name, + const LLStyle::Params& input_params = LLStyle::Params()); protected: - LLPanelWearableOutfitItem(LLViewerInventoryItem* item); }; @@ -116,6 +115,23 @@ protected: /*virtual*/ void init(); }; +/** Outfit list item for an attachment */ +class LLPanelAttachmentListItem : public LLPanelDeletableWearableListItem +{ + LOG_CLASS(LLPanelAttachmentListItem); +public: + static LLPanelAttachmentListItem* create(LLViewerInventoryItem* item); + virtual ~LLPanelAttachmentListItem() {}; + + /** Set item title. Joint name is added to the title in parenthesis */ + /*virtual*/ void setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params = LLStyle::Params()); + +protected: + LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {}; +}; + /** * @class LLPanelClothingListItem * @@ -139,7 +155,7 @@ public: inline void setShowMoveDownButton(bool show) { setShowWidget("btn_move_down", show); } inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } - inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } protected: @@ -164,7 +180,7 @@ public: * Make button visible during mouse over event. */ inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } - inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } protected: LLPanelBodyPartsListItem(LLViewerInventoryItem* item); @@ -183,7 +199,6 @@ class LLPanelDummyClothingListItem : public LLPanelWearableListItem public: static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); - /*virtual*/ void updateItem(); /*virtual*/ BOOL postBuild(); LLWearableType::EType getWearableType() const; @@ -310,6 +325,10 @@ public: */ class ContextMenu : public LLListContextMenu, public LLSingleton<ContextMenu> { + public: + ContextMenu(); + /*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); + protected: enum { MASK_CLOTHING = 0x01, @@ -325,11 +344,14 @@ public: static void setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val); static void updateMask(U32& mask, LLAssetType::EType at); static void createNewWearable(const LLUUID& item_id); + static bool canAddWearable(const LLUUID& item_id); + + LLWearableItemsList* mParent; }; struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params> { - Optional<bool> use_internal_context_menu; + Optional<bool> standalone; Params(); }; @@ -340,11 +362,21 @@ public: void updateList(const LLUUID& category_id); + /** + * Update items that match UUIDs from changed_items_uuids + * or links that point at such items. + */ + void updateChangedItems(const LLInventoryModel::changed_items_t& changed_items_uuids); + + bool isStandalone() const { return mIsStandalone; } + protected: friend class LLUICtrlFactory; LLWearableItemsList(const LLWearableItemsList::Params& p); void onRightClick(S32 x, S32 y); + + bool mIsStandalone; }; #endif //LL_LLWEARABLEITEMSLIST_H diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp deleted file mode 100644 index 59bc9dc62b..0000000000 --- a/indra/newview/llwindebug.cpp +++ /dev/null @@ -1,912 +0,0 @@ -/** - * @file llwindebug.cpp - * @brief Windows debugging functions - * - * $LicenseInfo:firstyear=2004&license=viewergpl$ - * - * Copyright (c) 2004-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include <tchar.h> -#include <tlhelp32.h> -#include "llwindebug.h" -#include "llviewercontrol.h" -#include "lldir.h" -#include "llsd.h" -#include "llsdserialize.h" - -#pragma warning(disable: 4200) //nonstandard extension used : zero-sized array in struct/union -#pragma warning(disable: 4100) //unreferenced formal parameter - - -/* -LLSD Block for Windows Dump Information -<llsd> - <map> - <key>Platform</key> - <string></string> - <key>Process</key> - <string></string> - <key>Module</key> - <string></string> - <key>DateModified</key> - <string></string> - <key>ExceptionCode</key> - <string></string> - <key>ExceptionRead/WriteAddress</key> - <string></string> - <key>Instruction</key> - <string></string> - <key>Registers</key> - <map> - <!-- Continued for all registers --> - <key>EIP</key> - <string>...</string> - <!-- ... --> - </map> - <key>Call Stack</key> - <array> - <!-- One map per stack frame --> - <map> - <key>ModuleName</key> - <string></string> - <key>ModuleBaseAddress</key> - <string></string> - <key>ModuleOffsetAddress</key> - <string></string> - <key>Parameters</key> - <array> - <string></string> - </array> - </map> - <!-- ... --> - </array> - </map> -</llsd> - -*/ - - -extern void (*gCrashCallback)(void); - -// based on dbghelp.h -typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam - ); - -MINIDUMPWRITEDUMP f_mdwp = NULL; - -#undef UNICODE - -static LPTOP_LEVEL_EXCEPTION_FILTER gFilterFunc = NULL; - -HMODULE hDbgHelp; - -// Tool Help functions. -typedef HANDLE (WINAPI * CREATE_TOOL_HELP32_SNAPSHOT)(DWORD dwFlags, DWORD th32ProcessID); -typedef BOOL (WINAPI * MODULE32_FIRST)(HANDLE hSnapshot, LPMODULEENTRY32 lpme); -typedef BOOL (WINAPI * MODULE32_NEST)(HANDLE hSnapshot, LPMODULEENTRY32 lpme); - -CREATE_TOOL_HELP32_SNAPSHOT CreateToolhelp32Snapshot_; -MODULE32_FIRST Module32First_; -MODULE32_NEST Module32Next_; - -#define DUMP_SIZE_MAX 8000 //max size of our dump -#define CALL_TRACE_MAX ((DUMP_SIZE_MAX - 2000) / (MAX_PATH + 40)) //max number of traced calls -#define NL L"\r\n" //new line - - -typedef struct STACK -{ - STACK * Ebp; - PBYTE Ret_Addr; - DWORD Param[0]; -} STACK, * PSTACK; - -BOOL WINAPI Get_Module_By_Ret_Addr(PBYTE Ret_Addr, LPWSTR Module_Name, PBYTE & Module_Addr); -void WINAPI Get_Call_Stack(const EXCEPTION_RECORD* exception_record, - const CONTEXT* context_record, - LLSD& info); - -void printError( CHAR* msg ) -{ - DWORD eNum; - TCHAR sysMsg[256]; - TCHAR* p; - - eNum = GetLastError( ); - FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, eNum, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - sysMsg, 256, NULL ); - - // Trim the end of the line and terminate it with a null - p = sysMsg; - while( ( *p > 31 ) || ( *p == 9 ) ) - ++p; - do { *p-- = 0; } while( ( p >= sysMsg ) && - ( ( *p == '.' ) || ( *p < 33 ) ) ); - - // Display the message - printf( "\n WARNING: %s failed with error %d (%s)", msg, eNum, sysMsg ); -} - -BOOL GetProcessThreadIDs(DWORD process_id, std::vector<DWORD>& thread_ids) -{ - HANDLE hThreadSnap = INVALID_HANDLE_VALUE; - THREADENTRY32 te32; - - // Take a snapshot of all running threads - hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 ); - if( hThreadSnap == INVALID_HANDLE_VALUE ) - return( FALSE ); - - // Fill in the size of the structure before using it. - te32.dwSize = sizeof(THREADENTRY32 ); - - // Retrieve information about the first thread, - // and exit if unsuccessful - if( !Thread32First( hThreadSnap, &te32 ) ) - { - printError( "Thread32First" ); // Show cause of failure - CloseHandle( hThreadSnap ); // Must clean up the snapshot object! - return( FALSE ); - } - - // Now walk the thread list of the system, - // and display information about each thread - // associated with the specified process - do - { - if( te32.th32OwnerProcessID == process_id ) - { - thread_ids.push_back(te32.th32ThreadID); - } - } while( Thread32Next(hThreadSnap, &te32 ) ); - -// Don't forget to clean up the snapshot object. - CloseHandle( hThreadSnap ); - return( TRUE ); -} - -BOOL GetThreadCallStack(DWORD thread_id, LLSD& info) -{ - if(GetCurrentThreadId() == thread_id) - { - // Early exit for the current thread. - // Suspending the current thread would be a bad idea. - // Plus you can't retrieve a valid current thread context. - return false; - } - - HANDLE thread_handle = INVALID_HANDLE_VALUE; - thread_handle = OpenThread(THREAD_ALL_ACCESS, FALSE, thread_id); - if(INVALID_HANDLE_VALUE == thread_handle) - { - return FALSE; - } - - BOOL result = false; - if(-1 != SuspendThread(thread_handle)) - { - CONTEXT context_struct; - context_struct.ContextFlags = CONTEXT_FULL; - if(GetThreadContext(thread_handle, &context_struct)) - { - Get_Call_Stack(NULL, &context_struct, info); - result = true; - } - ResumeThread(thread_handle); - } - else - { - // Couldn't suspend thread. - } - - CloseHandle(thread_handle); - return result; -} - - -//Windows Call Stack Construction idea from -//http://www.codeproject.com/tools/minidump.asp - -//**************************************************************************************** -BOOL WINAPI Get_Module_By_Ret_Addr(PBYTE Ret_Addr, LPWSTR Module_Name, PBYTE & Module_Addr) -//**************************************************************************************** -// Find module by Ret_Addr (address in the module). -// Return Module_Name (full path) and Module_Addr (start address). -// Return TRUE if found. -{ - MODULEENTRY32 M = {sizeof(M)}; - HANDLE hSnapshot; - - bool found = false; - - if (CreateToolhelp32Snapshot_) - { - hSnapshot = CreateToolhelp32Snapshot_(TH32CS_SNAPMODULE, 0); - - if ((hSnapshot != INVALID_HANDLE_VALUE) && - Module32First_(hSnapshot, &M)) - { - do - { - if (DWORD(Ret_Addr - M.modBaseAddr) < M.modBaseSize) - { - lstrcpyn(Module_Name, M.szExePath, MAX_PATH); - Module_Addr = M.modBaseAddr; - found = true; - break; - } - } while (Module32Next_(hSnapshot, &M)); - } - - CloseHandle(hSnapshot); - } - - return found; -} //Get_Module_By_Ret_Addr - -bool has_valid_call_before(PDWORD cur_stack_loc) -{ - PBYTE p_first_byte = (PBYTE)(*cur_stack_loc - 1); - PBYTE p_second_byte = (PBYTE)(*cur_stack_loc -2); - PBYTE p_fifth_byte = (PBYTE)(*cur_stack_loc - 5); - PBYTE p_sixth_byte = (PBYTE)(*cur_stack_loc - 6); - - // make sure we can read it - if(IsBadReadPtr(p_sixth_byte, 6 * sizeof(BYTE))) - { - return false; - } - - // check for 9a + 4 bytes - if(*p_fifth_byte == 0x9A) - { - return true; - } - - // Check for E8 + 4 bytes and last byte is 00 or FF - if(*p_fifth_byte == 0xE8 && (*p_first_byte == 0x00 || *p_first_byte == 0xFF)) - { - return true; - } - - // the other is six bytes - if(*p_sixth_byte == 0xFF || *p_second_byte == 0xFF) - { - return true; - } - - return false; -} - -PBYTE get_valid_frame(PBYTE esp) -{ - PDWORD cur_stack_loc = NULL; - const int max_search = 400; - WCHAR module_name[MAX_PATH]; - PBYTE module_addr = 0; - - // round to highest multiple of four - esp = (esp + (4 - ((int)esp % 4)) % 4); - - // scroll through stack a few hundred places. - for (cur_stack_loc = (PDWORD) esp; cur_stack_loc < (PDWORD)esp + max_search; cur_stack_loc += 1) - { - // if you can read the pointer, - if (IsBadReadPtr(cur_stack_loc, sizeof(PDWORD))) - { - continue; - } - - // check if it's in a module - if (!Get_Module_By_Ret_Addr((PBYTE)*cur_stack_loc, module_name, module_addr)) - { - continue; - } - - // check if the code before the instruction ptr is a call - if(!has_valid_call_before(cur_stack_loc)) - { - continue; - } - - // if these all pass, return that ebp, otherwise continue till we're dead - return (PBYTE)(cur_stack_loc - 1); - } - - return NULL; -} - -bool shouldUseStackWalker(PSTACK Ebp, int max_depth) -{ - WCHAR Module_Name[MAX_PATH]; - PBYTE Module_Addr = 0; - int depth = 0; - - while (depth < max_depth) - { - if (IsBadReadPtr(Ebp, sizeof(PSTACK)) || - IsBadReadPtr(Ebp->Ebp, sizeof(PSTACK)) || - Ebp->Ebp < Ebp || - Ebp->Ebp - Ebp > 0xFFFFFF || - IsBadCodePtr(FARPROC(Ebp->Ebp->Ret_Addr)) || - !Get_Module_By_Ret_Addr(Ebp->Ebp->Ret_Addr, Module_Name, Module_Addr)) - { - return true; - } - depth++; - Ebp = Ebp->Ebp; - } - - return false; -} - -//****************************************************************** -void WINAPI Get_Call_Stack(const EXCEPTION_RECORD* exception_record, - const CONTEXT* context_record, - LLSD& info) -//****************************************************************** -// Fill Str with call stack info. -// pException can be either GetExceptionInformation() or NULL. -// If pException = NULL - get current call stack. -{ - LPWSTR Module_Name = new WCHAR[MAX_PATH]; - PBYTE Module_Addr = 0; - LLSD params; - PBYTE Esp = NULL; - LLSD tmp_info; - - bool fake_frame = false; - bool ebp_used = false; - const int HEURISTIC_MAX_WALK = 20; - int heuristic_walk_i = 0; - int Ret_Addr_I = 0; - - STACK Stack = {0, 0}; - PSTACK Ebp; - - if (exception_record && context_record) //fake frame for exception address - { - Stack.Ebp = (PSTACK)(context_record->Ebp); - Stack.Ret_Addr = (PBYTE)exception_record->ExceptionAddress; - Ebp = &Stack; - Esp = (PBYTE) context_record->Esp; - fake_frame = true; - } - else if(context_record) - { - Ebp = (PSTACK)(context_record->Ebp); - Esp = (PBYTE)(context_record->Esp); - } - else - { - Ebp = (PSTACK)&exception_record - 1; //frame addr of Get_Call_Stack() - Esp = (PBYTE)&exception_record; - - // Skip frame of Get_Call_Stack(). - if (!IsBadReadPtr(Ebp, sizeof(PSTACK))) - Ebp = Ebp->Ebp; //caller ebp - } - - // Trace CALL_TRACE_MAX calls maximum - not to exceed DUMP_SIZE_MAX. - // Break trace on wrong stack frame. - for (Ret_Addr_I = 0; - heuristic_walk_i < HEURISTIC_MAX_WALK && - Ret_Addr_I < CALL_TRACE_MAX && !IsBadReadPtr(Ebp, sizeof(PSTACK)) && !IsBadCodePtr(FARPROC(Ebp->Ret_Addr)); - Ret_Addr_I++) - { - // If module with Ebp->Ret_Addr found. - if (Get_Module_By_Ret_Addr(Ebp->Ret_Addr, Module_Name, Module_Addr)) - { - // Save module's address and full path. - tmp_info["CallStack"][Ret_Addr_I]["ModuleName"] = ll_convert_wide_to_string(Module_Name); - tmp_info["CallStack"][Ret_Addr_I]["ModuleAddress"] = (int)Module_Addr; - tmp_info["CallStack"][Ret_Addr_I]["CallOffset"] = (int)(Ebp->Ret_Addr - Module_Addr); - - // Save 5 params of the call. We don't know the real number of params. - if (fake_frame && !Ret_Addr_I) //fake frame for exception address - params[0] = "Exception Offset"; - else if (!IsBadReadPtr(Ebp, sizeof(PSTACK) + 5 * sizeof(DWORD))) - { - for(int j = 0; j < 5; ++j) - { - params[j] = (int)Ebp->Param[j]; - } - } - tmp_info["CallStack"][Ret_Addr_I]["Parameters"] = params; - } - - tmp_info["CallStack"][Ret_Addr_I]["ReturnAddress"] = (int)Ebp->Ret_Addr; - - // get ready for next frame - // Set ESP to just after return address. Not the real esp, but just enough after the return address - if(!fake_frame) { - Esp = (PBYTE)Ebp + 8; - } - else - { - fake_frame = false; - } - - // is next ebp valid? - // only run if we've never found a good ebp - // and make sure the one after is valid as well - if( !ebp_used && - shouldUseStackWalker(Ebp, 2)) - { - heuristic_walk_i++; - PBYTE new_ebp = get_valid_frame(Esp); - if (new_ebp != NULL) - { - Ebp = (PSTACK)new_ebp; - } - } - else - { - ebp_used = true; - Ebp = Ebp->Ebp; - } - } -/* TODO remove or turn this code back on to edit the stack after i see a few raw ones. -Palmer - // Now go back through and edit out heuristic stacks that could very well be bogus. - // Leave the top and the last 3 stack chosen by the heuristic, however. - if(heuristic_walk_i > 2) - { - info["CallStack"][0] = tmp_info["CallStack"][0]; - std::string ttest = info["CallStack"][0]["ModuleName"]; - for(int cur_frame = 1; - (cur_frame + heuristic_walk_i - 2 < Ret_Addr_I); - ++cur_frame) - { - // edit out the middle heuristic found frames - info["CallStack"][cur_frame] = tmp_info["CallStack"][cur_frame + heuristic_walk_i - 2]; - } - } - else - { - info = tmp_info; - } -*/ - info = tmp_info; - info["HeuristicWalkI"] = heuristic_walk_i; - info["EbpUsed"] = ebp_used; - -} //Get_Call_Stack - -//*********************************** -void WINAPI Get_Version_Str(LLSD& info) -//*********************************** -// Fill Str with Windows version. -{ - OSVERSIONINFOEX V = {sizeof(OSVERSIONINFOEX)}; //EX for NT 5.0 and later - - if (!GetVersionEx((POSVERSIONINFO)&V)) - { - ZeroMemory(&V, sizeof(V)); - V.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx((POSVERSIONINFO)&V); - } - - if (V.dwPlatformId != VER_PLATFORM_WIN32_NT) - V.dwBuildNumber = LOWORD(V.dwBuildNumber); //for 9x HIWORD(dwBuildNumber) = 0x04xx - - info["Platform"] = llformat("Windows: %d.%d.%d, SP %d.%d, Product Type %d", //SP - service pack, Product Type - VER_NT_WORKSTATION,... - V.dwMajorVersion, V.dwMinorVersion, V.dwBuildNumber, V.wServicePackMajor, V.wServicePackMinor, V.wProductType); -} //Get_Version_Str - -//************************************************************* -LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) -//************************************************************* -// Allocate Str[DUMP_SIZE_MAX] and return Str with dump, if !pException - just return call stack in Str. -{ - LLSD info; - LPWSTR Str; - int Str_Len; -// int i; - LPWSTR Module_Name = new WCHAR[MAX_PATH]; - PBYTE Module_Addr; - HANDLE hFile; - FILETIME Last_Write_Time; - FILETIME Local_File_Time; - SYSTEMTIME T; - - Str = new WCHAR[DUMP_SIZE_MAX]; - Str_Len = 0; - if (!Str) - return NULL; - - Get_Version_Str(info); - - GetModuleFileName(NULL, Str, MAX_PATH); - info["Process"] = ll_convert_wide_to_string(Str); - info["ThreadID"] = (S32)GetCurrentThreadId(); - - // If exception occurred. - if (pException) - { - EXCEPTION_RECORD & E = *pException->ExceptionRecord; - CONTEXT & C = *pException->ContextRecord; - - // If module with E.ExceptionAddress found - save its path and date. - if (Get_Module_By_Ret_Addr((PBYTE)E.ExceptionAddress, Module_Name, Module_Addr)) - { - info["Module"] = ll_convert_wide_to_string(Module_Name); - - if ((hFile = CreateFile(Module_Name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL)) != INVALID_HANDLE_VALUE) - { - if (GetFileTime(hFile, NULL, NULL, &Last_Write_Time)) - { - FileTimeToLocalFileTime(&Last_Write_Time, &Local_File_Time); - FileTimeToSystemTime(&Local_File_Time, &T); - - info["DateModified"] = llformat("%02d/%02d/%d", T.wMonth, T.wDay, T.wYear); - } - CloseHandle(hFile); - } - } - else - { - info["ExceptionAddr"] = (int)E.ExceptionAddress; - } - - info["ExceptionCode"] = (int)E.ExceptionCode; - - /* - //TODO: Fix this - if (E.ExceptionCode == EXCEPTION_ACCESS_VIOLATION) - { - // Access violation type - Write/Read. - LLSD exception_info; - exception_info["Type"] = E.ExceptionInformation[0] ? "Write" : "Read"; - exception_info["Address"] = llformat("%08x", E.ExceptionInformation[1]); - info["Exception Information"] = exception_info; - } - */ - - - // Save instruction that caused exception. - /* - std::string str; - for (i = 0; i < 16; i++) - str += llformat(" %02X", PBYTE(E.ExceptionAddress)[i]); - info["Instruction"] = str; - */ - LLSD registers; - registers["EAX"] = (int)C.Eax; - registers["EBX"] = (int)C.Ebx; - registers["ECX"] = (int)C.Ecx; - registers["EDX"] = (int)C.Edx; - registers["ESI"] = (int)C.Esi; - registers["EDI"] = (int)C.Edi; - registers["ESP"] = (int)C.Esp; - registers["EBP"] = (int)C.Ebp; - registers["EIP"] = (int)C.Eip; - registers["EFlags"] = (int)C.EFlags; - info["Registers"] = registers; - } //if (pException) - - // Save call stack info. - Get_Call_Stack(pException->ExceptionRecord, pException->ContextRecord, info); - - return info; -} //Get_Exception_Info - -#define UNICODE - - -class LLMemoryReserve { -public: - LLMemoryReserve(); - ~LLMemoryReserve(); - void reserve(); - void release(); -protected: - unsigned char *mReserve; - static const size_t MEMORY_RESERVATION_SIZE; -}; - -LLMemoryReserve::LLMemoryReserve() : - mReserve(NULL) -{ -}; - -LLMemoryReserve::~LLMemoryReserve() -{ - release(); -} - -// I dunno - this just seemed like a pretty good value. -const size_t LLMemoryReserve::MEMORY_RESERVATION_SIZE = 5 * 1024 * 1024; - -void LLMemoryReserve::reserve() -{ - if(NULL == mReserve) - mReserve = new unsigned char[MEMORY_RESERVATION_SIZE]; -}; - -void LLMemoryReserve::release() -{ - delete [] mReserve; - mReserve = NULL; -}; - -static LLMemoryReserve gEmergencyMemoryReserve; - -#ifndef _M_IX86 - #error "The following code only works for x86!" -#endif -LPTOP_LEVEL_EXCEPTION_FILTER WINAPI MyDummySetUnhandledExceptionFilter( - LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter) -{ - if(lpTopLevelExceptionFilter == gFilterFunc) - return gFilterFunc; - - llinfos << "Someone tried to set the exception filter. Listing call stack modules" << llendl; - LLSD cs_info; - Get_Call_Stack(NULL, NULL, cs_info); - - if(cs_info.has("CallStack") && cs_info["CallStack"].isArray()) - { - LLSD cs = cs_info["CallStack"]; - for(LLSD::array_iterator i = cs.beginArray(); - i != cs.endArray(); - ++i) - { - llinfos << "Module: " << (*i)["ModuleName"] << llendl; - } - } - - return gFilterFunc; -} - -BOOL PreventSetUnhandledExceptionFilter() -{ - HMODULE hKernel32 = LoadLibrary(_T("kernel32.dll")); - if (hKernel32 == NULL) - return FALSE; - - void *pOrgEntry = GetProcAddress(hKernel32, "SetUnhandledExceptionFilter"); - if(pOrgEntry == NULL) - return FALSE; - - unsigned char newJump[ 100 ]; - DWORD dwOrgEntryAddr = (DWORD)pOrgEntry; - dwOrgEntryAddr += 5; // add 5 for 5 op-codes for jmp far - void *pNewFunc = &MyDummySetUnhandledExceptionFilter; - DWORD dwNewEntryAddr = (DWORD) pNewFunc; - DWORD dwRelativeAddr = dwNewEntryAddr - dwOrgEntryAddr; - - newJump[ 0 ] = 0xE9; // JMP absolute - memcpy(&newJump[ 1 ], &dwRelativeAddr, sizeof(pNewFunc)); - SIZE_T bytesWritten; - BOOL bRet = WriteProcessMemory(GetCurrentProcess(), - pOrgEntry, newJump, sizeof(pNewFunc) + 1, &bytesWritten); - return bRet; -} - -// static -void LLWinDebug::initExceptionHandler(LPTOP_LEVEL_EXCEPTION_FILTER filter_func) -{ - - static bool s_first_run = true; - // Load the dbghelp dll now, instead of waiting for the crash. - // Less potential for stack mangling - - if (s_first_run) - { - // First, try loading from the directory that the app resides in. - std::string local_dll_name = gDirUtilp->findFile("dbghelp.dll", gDirUtilp->getWorkingDir(), gDirUtilp->getExecutableDir()); - - HMODULE hDll = NULL; - hDll = LoadLibraryA(local_dll_name.c_str()); - if (!hDll) - { - hDll = LoadLibrary(L"dbghelp.dll"); - } - - if (!hDll) - { - LL_WARNS("AppInit") << "Couldn't find dbghelp.dll!" << LL_ENDL; - } - else - { - f_mdwp = (MINIDUMPWRITEDUMP) GetProcAddress(hDll, "MiniDumpWriteDump"); - - if (!f_mdwp) - { - FreeLibrary(hDll); - hDll = NULL; - } - } - - gEmergencyMemoryReserve.reserve(); - - s_first_run = false; - } - - // Try to get Tool Help library functions. - HMODULE hKernel32; - hKernel32 = GetModuleHandle(_T("KERNEL32")); - CreateToolhelp32Snapshot_ = (CREATE_TOOL_HELP32_SNAPSHOT)GetProcAddress(hKernel32, "CreateToolhelp32Snapshot"); - Module32First_ = (MODULE32_FIRST)GetProcAddress(hKernel32, "Module32FirstW"); - Module32Next_ = (MODULE32_NEST)GetProcAddress(hKernel32, "Module32NextW"); - - LPTOP_LEVEL_EXCEPTION_FILTER prev_filter; - prev_filter = SetUnhandledExceptionFilter(filter_func); - - // *REMOVE:Mani - //PreventSetUnhandledExceptionFilter(); - - if(prev_filter != gFilterFunc) - { - LL_WARNS("AppInit") - << "Replacing unknown exception (" << (void *)prev_filter << ") with (" << (void *)filter_func << ") !" << LL_ENDL; - } - - gFilterFunc = filter_func; -} - -bool LLWinDebug::checkExceptionHandler() -{ - bool ok = true; - LPTOP_LEVEL_EXCEPTION_FILTER prev_filter; - prev_filter = SetUnhandledExceptionFilter(gFilterFunc); - - if (prev_filter != gFilterFunc) - { - LL_WARNS("AppInit") << "Our exception handler (" << (void *)gFilterFunc << ") replaced with " << prev_filter << "!" << LL_ENDL; - ok = false; - } - - if (prev_filter == NULL) - { - ok = FALSE; - if (gFilterFunc == NULL) - { - LL_WARNS("AppInit") << "Exception handler uninitialized." << LL_ENDL; - } - else - { - LL_WARNS("AppInit") << "Our exception handler (" << (void *)gFilterFunc << ") replaced with NULL!" << LL_ENDL; - } - } - - return ok; -} - -void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename) -{ - if(f_mdwp == NULL || gDirUtilp == NULL) - { - return; - //write_debug("No way to generate a minidump, no MiniDumpWriteDump function!\n"); - } - else - { - std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename); - - HANDLE hFile = CreateFileA(dump_path.c_str(), - GENERIC_WRITE, - FILE_SHARE_WRITE, - NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (hFile != INVALID_HANDLE_VALUE) - { - // Write the dump, ignoring the return value - f_mdwp(GetCurrentProcess(), - GetCurrentProcessId(), - hFile, - type, - ExInfop, - NULL, - NULL); - - CloseHandle(hFile); - } - - } -} - -// static -void LLWinDebug::generateCrashStacks(struct _EXCEPTION_POINTERS *exception_infop) -{ - // *NOTE:Mani - This method is no longer the exception handler. - // Its called from viewer_windows_exception_handler() and other places. - - // - // Let go of a bunch of reserved memory to give library calls etc - // a chance to execute normally in the case that we ran out of - // memory. - // - LLSD info; - std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, - "SecondLifeException"); - std::string log_path = dump_path + ".log"; - - if (exception_infop) - { - // Since there is exception info... Release the hounds. - gEmergencyMemoryReserve.release(); - - if(gSavedSettings.getControl("SaveMinidump").notNull() && gSavedSettings.getBOOL("SaveMinidump")) - { - _MINIDUMP_EXCEPTION_INFORMATION ExInfo; - - ExInfo.ThreadId = ::GetCurrentThreadId(); - ExInfo.ExceptionPointers = exception_infop; - ExInfo.ClientPointers = NULL; - - writeDumpToFile(MiniDumpNormal, &ExInfo, "SecondLife.dmp"); - writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "SecondLifePlus.dmp"); - } - - info = Get_Exception_Info(exception_infop); - } - - LLSD threads; - std::vector<DWORD> thread_ids; - GetProcessThreadIDs(GetCurrentProcessId(), thread_ids); - - for(std::vector<DWORD>::iterator th_itr = thread_ids.begin(); - th_itr != thread_ids.end(); - ++th_itr) - { - LLSD thread_info; - if(*th_itr != GetCurrentThreadId()) - { - GetThreadCallStack(*th_itr, thread_info); - } - - if(thread_info) - { - threads[llformat("ID %d", *th_itr)] = thread_info; - } - } - - info["Threads"] = threads; - - llofstream out_file(log_path); - LLSDSerialize::toPrettyXML(info, out_file); - out_file.close(); -} - -void LLWinDebug::clearCrashStacks() -{ - LLSD info; - std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLifeException.log"); - LLFile::remove(dump_path); -} diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h deleted file mode 100644 index f4a6a2d54d..0000000000 --- a/indra/newview/llwindebug.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file llwindebug.h - * @brief LLWinDebug class header file - * - * $LicenseInfo:firstyear=2004&license=viewergpl$ - * - * Copyright (c) 2004-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#ifndef LL_LLWINDEBUG_H -#define LL_LLWINDEBUG_H - -#include "stdtypes.h" -#include <dbghelp.h> - -class LLWinDebug -{ -public: - - /** - * @brief initialize the llwindebug exception filter callback - * - * Hand a windows unhandled exception filter to LLWinDebug - * This method should only be called to change the - * exception filter used by llwindebug. - * - * Setting filter_func to NULL will clear any custom filters. - **/ - static void initExceptionHandler(LPTOP_LEVEL_EXCEPTION_FILTER filter_func); - - /** - * @brief check the status of the exception filter. - * - * Resets unhandled exception filter to the filter specified - * w/ initExceptionFilter). - * Returns false if the exception filter was modified. - * - * *NOTE:Mani In the past mozlib has been accused of - * overriding the exception filter. If the mozlib filter - * is required, perhaps we can chain calls from our - * filter to mozlib's. - **/ - static bool checkExceptionHandler(); - - static void generateCrashStacks(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL); - static void clearCrashStacks(); // Delete the crash stack file(s). - - static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename); -private: -}; - -#endif // LL_LLWINDEBUG_H diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index 06040a574c..09c5b9b196 100644 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -193,6 +193,9 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**) U32 x_world = (U32)(x_regions) * REGION_WIDTH_UNITS; U32 y_world = (U32)(y_regions) * REGION_WIDTH_UNITS; + // name shouldn't be empty, see EXT-4568 + llassert(!name.empty()); + // Insert that region in the world map, if failure, flag it as a "null_sim" if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags))) { diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index a8ac0c0c90..1d10ec7b28 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -513,7 +513,7 @@ void LLXMLRPCTransaction::Impl::setStatus(EStatus status, // Usually this means that there's a problem with the login server, // not with the client. Direct user to status page. mStatusMessage = LLTrans::getString("server_is_down"); - mStatusURI = "http://secondlife.com/status/"; + mStatusURI = "http://status.secondlifegrid.net/"; } } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ccd0f61fc1..baf0462e87 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2210,7 +2210,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) //LLVertexBuffer::unbind(); grabReferences(result); - llpushcallstacks ; for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) { LLSpatialGroup* group = *iter; @@ -2228,7 +2227,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } } - llpushcallstacks ; for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) { LLSpatialGroup* group = *iter; @@ -2244,7 +2242,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } - llpushcallstacks ; if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD) { for (LLCullResult::bridge_list_t::iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) @@ -2271,12 +2268,13 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } } - + llpushcallstacks ; { LLFastTimer ftm(FTM_CLIENT_COPY); LLVertexBuffer::clientCopy(); } - + llpushcallstacks ; + postSort(camera); llpushcallstacks ; } @@ -7121,7 +7119,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) skip_avatar_update = TRUE; } - llpushcallstacks ; if (!skip_avatar_update) { gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON); @@ -7220,7 +7217,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) (1 << LLPipeline::RENDER_TYPE_WL_SKY)); static LLCullResult result; updateCull(camera, result); - llpushcallstacks ; stateSort(camera, result); mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) | (1 << LLPipeline::RENDER_TYPE_CLOUDS) | @@ -7255,7 +7251,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLGLUserClipPlane clip_plane(plane, mat, projection); LLGLDisable cull(GL_CULL_FACE); updateCull(camera, ref_result, 1); - llpushcallstacks ; stateSort(camera, ref_result); } @@ -7312,7 +7307,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLGLUserClipPlane clip_plane(LLPlane(-pnorm, -(pd+pad)), mat, projection); static LLCullResult result; updateCull(camera, result, water_clip); - llpushcallstacks ; stateSort(camera, result); gGL.setColorMask(true, true); @@ -7351,7 +7345,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) { gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode()); } - llpushcallstacks ; } } diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc index 731953f9bb..df2fb2a6ea 100644 --- a/indra/newview/res/viewerRes.rc +++ b/indra/newview/res/viewerRes.rc @@ -129,8 +129,8 @@ TOOLSIT CURSOR "toolsit.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,2,0 - PRODUCTVERSION 2,0,2,0 + FILEVERSION 2,1,0,0 + PRODUCTVERSION 2,1,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -147,12 +147,12 @@ BEGIN BEGIN VALUE "CompanyName", "Linden Lab" VALUE "FileDescription", "Second Life" - VALUE "FileVersion", "2.0.2.0" + VALUE "FileVersion", "2.1.0.0" VALUE "InternalName", "Second Life" VALUE "LegalCopyright", "Copyright 2001-2008, Linden Research, Inc." VALUE "OriginalFilename", "SecondLife.exe" VALUE "ProductName", "Second Life" - VALUE "ProductVersion", "2.0.2.0" + VALUE "ProductVersion", "2.1.0.0" END END BLOCK "VarFileInfo" diff --git a/indra/newview/skins/default/textures/avatar_thumb_bkgrnd.png b/indra/newview/skins/default/textures/avatar_thumb_bkgrnd.png Binary files differnew file mode 100644 index 0000000000..84cc2159c1 --- /dev/null +++ b/indra/newview/skins/default/textures/avatar_thumb_bkgrnd.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Link.png b/indra/newview/skins/default/textures/icons/Inv_Link.png Binary files differnew file mode 100644 index 0000000000..c1543dacb5 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Inv_Link.png diff --git a/indra/newview/skins/default/textures/map_infohub.tga b/indra/newview/skins/default/textures/map_infohub.tga Binary files differindex 545b8e532c..d0134fa5fe 100644 --- a/indra/newview/skins/default/textures/map_infohub.tga +++ b/indra/newview/skins/default/textures/map_infohub.tga diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index b3314aa32f..2f258c96e7 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -114,7 +114,7 @@ with the same filename but different name <texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" /> <texture name="DownArrow" file_name="bottomtray/DownArrow.png" preload="false" /> - <texture name="DownArrow_Off" file_name="icons/DownArrow_off.png" preload="false" /> + <texture name="DownArrow_Off" file_name="icons/DownArrow_Off.png" preload="false" /> <texture name="Dragbar" file_name="windows/Dragbar.png" preload="false" scale.left="35" scale.top="5" scale.right="29" scale.bottom="5" /> <texture name="DropDown_Disabled" file_name="widgets/DropDown_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> @@ -228,39 +228,7 @@ with the same filename but different name <texture name="Inv_TrashOpen" file_name="icons/Inv_TrashOpen.png" preload="false" /> <texture name="Inv_Underpants" file_name="icons/Inv_Underpants.png" preload="false" /> <texture name="Inv_Undershirt" file_name="icons/Inv_Undershirt.png" preload="false" /> - - <texture name="Inv_Alpha_Link" file_name="icons/Inv_Alpha_Link.png" preload="false" /> - <texture name="Inv_Animation_Link" file_name="icons/Inv_Animation_Link.png" preload="false" /> - <texture name="Inv_BodyShape_Link" file_name="icons/Inv_BodyShape_Link.png" preload="false" /> - <texture name="Inv_CallingCard_Link" file_name="icons/Inv_CallingCard_Link.png" preload="false" /> - <texture name="Inv_Clothing_Link" file_name="icons/Inv_Clothing_Link.png" preload="false" /> - <texture name="Inv_Eye_Link" file_name="icons/Inv_Eye_Link.png" preload="false" /> - <texture name="Inv_FolderClosed_Link" file_name="icons/Inv_FolderClosed_Link.png" preload="false" /> - <texture name="Inv_FolderOpen_Link" file_name="icons/Inv_FolderOpen_Link.png" preload="false" /> - <texture name="Inv_Gesture_Link" file_name="icons/Inv_Gesture_Link.png" preload="false" /> - <texture name="Inv_Gloves_Link" file_name="icons/Inv_Gloves_Link.png" preload="false" /> - <texture name="Inv_Hair_Link" file_name="icons/Inv_Hair_Link.png" preload="false" /> - <texture name="Inv_LinkFolder_Link" file_name="icons/Inv_LinkFolder_Link.png" preload="false" /> - <texture name="Inv_Jacket_Link" file_name="icons/Inv_Jacket_Link.png" preload="false" /> - <texture name="Inv_LookFolderOpen_Link" file_name="icons/Inv_LookFolderOpen_Link.png" preload="false" /> - <texture name="Inv_LookFolderClosed_Link" file_name="icons/Inv_LookFolderClosed_Link.png" preload="false" /> - <texture name="Inv_Landmark_Link" file_name="icons/Inv_Landmark_Link.png" preload="false" /> - <texture name="Inv_Notecard_Link" file_name="icons/Inv_Notecard_Link.png" preload="false" /> - <texture name="Inv_Object_Link" file_name="icons/Inv_Object_Link.png" preload="false" /> - <texture name="Inv_Object_Multi_Link" file_name="icons/Inv_Object_Multi_Link.png" preload="false" /> - <texture name="Inv_Pants_Link" file_name="icons/Inv_Pants_Link.png" preload="false" /> - <texture name="Inv_Script_Link" file_name="icons/Inv_Script_Link.png" preload="false" /> - <texture name="Inv_Shirt_Link" file_name="icons/Inv_Shirt_Link.png" preload="false" /> - <texture name="Inv_Shoe_Link" file_name="icons/Inv_Shoe_Link.png" preload="false" /> - <texture name="Inv_Skin_Link" file_name="icons/Inv_Skin_Link.png" preload="false" /> - <texture name="Inv_Skirt_Link" file_name="icons/Inv_Skirt_Link.png" preload="false" /> - <texture name="Inv_Snapshot_Link" file_name="icons/Inv_Snapshot_Link.png" preload="false" /> - <texture name="Inv_Socks_Link" file_name="icons/Inv_Socks_Link.png" preload="false" /> - <texture name="Inv_Sound_Link" file_name="icons/Inv_Sound_Link.png" preload="false" /> - <texture name="Inv_Tattoo_Link" file_name="icons/Inv_Tattoo_Link.png" preload="false" /> - <texture name="Inv_Texture_Link" file_name="icons/Inv_Texture_Link.png" preload="false" /> - <texture name="Inv_Underpants_Link" file_name="icons/Inv_Underpants_Link.png" preload="false" /> - <texture name="Inv_Undershirt_Link" file_name="icons/Inv_Undershirt_Link.png" preload="false" /> + <texture name="Inv_Link" file_name="icons/Inv_Link.png" preload="false" /> <texture name="Linden_Dollar_Alert" file_name="widgets/Linden_Dollar_Alert.png"/> <texture name="Linden_Dollar_Background" file_name="widgets/Linden_Dollar_Background.png"/> @@ -570,6 +538,8 @@ with the same filename but different name <texture name="VoicePTT_Off" file_name="bottomtray/VoicePTT_Off.png" preload="false" /> <texture name="VoicePTT_On" file_name="bottomtray/VoicePTT_On.png" preload="false" /> + <texture name="Wearables_Divider" file_name="windows/Wearables_Divider.png" preload="false" /> + <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> @@ -670,7 +640,7 @@ with the same filename but different name <texture name="Progress_11" file_name="icons/Progress_11.png" preload="true" /> <texture name="Progress_12" file_name="icons/Progress_12.png" preload="true" /> - <texture name="bevel_background" file_name="widgets/bevel_background.png" preload="true" scale.left="12" scale.top="15" scale.right="120" scale.bottom="2"/> + <texture name="bevel_background" file_name="widgets/bevel_background.png" preload="true" scale.left="12" scale.top="15" scale.right="108" scale.bottom="2"/> <texture name="buy_off" file_name="widgets/buy_off.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> <texture name="buy_over" file_name="widgets/buy_over.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> <texture name="buy_press" file_name="widgets/buy_press.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> diff --git a/indra/newview/skins/default/textures/widgets/buy_off.png b/indra/newview/skins/default/textures/widgets/buy_off.png Binary files differindex 961ad071d4..ee5979046f 100644 --- a/indra/newview/skins/default/textures/widgets/buy_off.png +++ b/indra/newview/skins/default/textures/widgets/buy_off.png diff --git a/indra/newview/skins/default/textures/widgets/buy_over.png b/indra/newview/skins/default/textures/widgets/buy_over.png Binary files differindex 0be19f8a31..93adb68c86 100644 --- a/indra/newview/skins/default/textures/widgets/buy_over.png +++ b/indra/newview/skins/default/textures/widgets/buy_over.png diff --git a/indra/newview/skins/default/textures/widgets/buy_press.png b/indra/newview/skins/default/textures/widgets/buy_press.png Binary files differindex d6f587464d..3f442d6eaa 100644 --- a/indra/newview/skins/default/textures/widgets/buy_press.png +++ b/indra/newview/skins/default/textures/widgets/buy_press.png diff --git a/indra/newview/skins/default/textures/windows/Wearables_Divider.png b/indra/newview/skins/default/textures/windows/Wearables_Divider.png Binary files differnew file mode 100644 index 0000000000..9dce7bf45c --- /dev/null +++ b/indra/newview/skins/default/textures/windows/Wearables_Divider.png diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 435c7f4907..2e9d003848 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -29,7 +29,7 @@ libcurl Version: [LIBCURL_VERSION] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] Qt Webkit Version: [QT_WEBKIT_VERSION] -Vivox Version: [VIVOX_VERSION] +Voice Server Version: [VOICE_VERSION] </floater.string> <floater.string name="none"> (ingen) diff --git a/indra/newview/skins/default/xui/da/floater_about_land.xml b/indra/newview/skins/default/xui/da/floater_about_land.xml index fd1fe4aa19..053fe4d9d9 100644 --- a/indra/newview/skins/default/xui/da/floater_about_land.xml +++ b/indra/newview/skins/default/xui/da/floater_about_land.xml @@ -63,6 +63,9 @@ Pacel ikke valgt. Gå til 'Verden' > 'Om land' eller vælg en anden parcel for at se detaljer. </panel.string> + <panel.string name="time_stamp_template"> + [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + </panel.string> <text name="Name:"> Navn: </text> diff --git a/indra/newview/skins/default/xui/da/floater_avatar_textures.xml b/indra/newview/skins/default/xui/da/floater_avatar_textures.xml index e405a1beb8..d0d766eaab 100644 --- a/indra/newview/skins/default/xui/da/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/da/floater_avatar_textures.xml @@ -3,41 +3,48 @@ <floater.string name="InvalidAvatar"> UGYLDING AVATAR </floater.string> - <text name="composite_label"> - Blandede teksturer - </text> - <button label="Drop" label_selected="Dump" name="Dump"/> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> - <texture_picker label="Hår" name="hair-baked"/> - <texture_picker label="Hår" name="hair_grain"/> - <texture_picker label="Alpha - hår" name="hair_alpha"/> - <texture_picker label="Hoved" name="head-baked"/> - <texture_picker label="Makeup" name="head_bodypaint"/> - <texture_picker label="Alpha - hoved" name="head_alpha"/> - <texture_picker label="Tatovering - hoved" name="head_tattoo"/> - <texture_picker label="Eyes" name="eyes-baked"/> - <texture_picker label="Øje" name="eyes_iris"/> - <texture_picker label="Alpha - øjne" name="eyes_alpha"/> - <texture_picker label="Overkrop" name="upper-baked"/> - <texture_picker label="Bodypaint - overkrop" name="upper_bodypaint"/> - <texture_picker label="Undertrøje" name="upper_undershirt"/> - <texture_picker label="Handsker" name="upper_gloves"/> - <texture_picker label="Trøje" name="upper_shirt"/> - <texture_picker label="Jakke - foroven" name="upper_jacket"/> - <texture_picker label="Alpha - øvre" name="upper_alpha"/> - <texture_picker label="Tatovering - øvre" name="upper_tattoo"/> - <texture_picker label="Ben" name="lower-baked"/> - <texture_picker label="Bodypaint - ben" name="lower_bodypaint"/> - <texture_picker label="Underbukser" name="lower_underpants"/> - <texture_picker label="Strømper" name="lower_socks"/> - <texture_picker label="Sko" name="lower_shoes"/> - <texture_picker label="Bukser" name="lower_pants"/> - <texture_picker label="Jakke" name="lower_jacket"/> - <texture_picker label="Alpha - nedre" name="lower_alpha"/> - <texture_picker label="Tatovering - nedre" name="lower_tattoo"/> - <texture_picker label="Nederdel" name="skirt-baked"/> - <texture_picker label="Nederdel" name="skirt"/> + <text name="label"> + Gemte +teksturer + </text> + <text name="composite_label"> + Sammensatte +teksturer + </text> + <button label="Vis IDs på skærm" label_selected="Dump" name="Dump"/> + <panel name="scroll_content_panel"> + <texture_picker label="Hår" name="hair-baked"/> + <texture_picker label="Hår" name="hair_grain"/> + <texture_picker label="Alpha - hår" name="hair_alpha"/> + <texture_picker label="Hoved" name="head-baked"/> + <texture_picker label="Makeup" name="head_bodypaint"/> + <texture_picker label="Alpha - hoved" name="head_alpha"/> + <texture_picker label="Tatovering - hovede" name="head_tattoo"/> + <texture_picker label="Øjne" name="eyes-baked"/> + <texture_picker label="Øje" name="eyes_iris"/> + <texture_picker label="Alpha øjne" name="eyes_alpha"/> + <texture_picker label="Overkrop" name="upper-baked"/> + <texture_picker label="Øverste bodyPaint" name="upper_bodypaint"/> + <texture_picker label="Undertrøje" name="upper_undershirt"/> + <texture_picker label="Handsker" name="upper_gloves"/> + <texture_picker label="Trøje" name="upper_shirt"/> + <texture_picker label="Jakke øverst" name="upper_jacket"/> + <texture_picker label="Alpha - øverst" name="upper_alpha"/> + <texture_picker label="Tatovering - øverst" name="upper_tattoo"/> + <texture_picker label="Underkrop" name="lower-baked"/> + <texture_picker label="BodyPaint - nederst" name="lower_bodypaint"/> + <texture_picker label="Underbukser" name="lower_underpants"/> + <texture_picker label="Strømper" name="lower_socks"/> + <texture_picker label="Sko" name="lower_shoes"/> + <texture_picker label="Bukser" name="lower_pants"/> + <texture_picker label="Jakke" name="lower_jacket"/> + <texture_picker label="Alpha - nederst" name="lower_alpha"/> + <texture_picker label="Tatovering - nederst" name="lower_tattoo"/> + <texture_picker label="Nederdel" name="skirt-baked"/> + <texture_picker label="Nederdel" name="skirt"/> + </panel> </panel> </scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/da/floater_buy_currency_html.xml new file mode 100644 index 0000000000..e32b25ca17 --- /dev/null +++ b/indra/newview/skins/default/xui/da/floater_buy_currency_html.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_buy_currency_html" title="KØB VALUTA"/> diff --git a/indra/newview/skins/default/xui/da/floater_buy_land.xml b/indra/newview/skins/default/xui/da/floater_buy_land.xml index 970491b41f..f6ee78fa6d 100644 --- a/indra/newview/skins/default/xui/da/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/da/floater_buy_land.xml @@ -126,9 +126,6 @@ gennemført. <floater.string name="no_parcel_selected"> (intet parcel er valgt) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/da/floater_map.xml b/indra/newview/skins/default/xui/da/floater_map.xml index 82897d545a..cd6c03058b 100644 --- a/indra/newview/skins/default/xui/da/floater_map.xml +++ b/indra/newview/skins/default/xui/da/floater_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Map" title="Mini-kort"> +<floater name="Map" title=""> <floater.string name="mini_map_north"> N </floater.string> diff --git a/indra/newview/skins/default/xui/da/floater_moveview.xml b/indra/newview/skins/default/xui/da/floater_moveview.xml index 8385924bda..14d3604b43 100644 --- a/indra/newview/skins/default/xui/da/floater_moveview.xml +++ b/indra/newview/skins/default/xui/da/floater_moveview.xml @@ -6,18 +6,48 @@ <string name="walk_back_tooltip"> Gå baglæns (Tryk på Ned piletast eller S) </string> + <string name="walk_left_tooltip"> + Gå til venstre (tryk Shift + venstre pil eller A) + </string> + <string name="walk_right_tooltip"> + Gå til højre (tryk Shift + højre pil eller D) + </string> <string name="run_forward_tooltip"> Løb forlæns (Tryk på Op piletast eller W) </string> <string name="run_back_tooltip"> Løb baglæns (Tryk på Ned piletast eller S) </string> + <string name="run_left_tooltip"> + Løb til venstre (tryk Shift + venstre pil eller A) + </string> + <string name="run_right_tooltip"> + Løb til højre (tryk Shift + højre pil eller D) + </string> <string name="fly_forward_tooltip"> Flyv frem (Tryk på Op piletast eller W) </string> <string name="fly_back_tooltip"> Flyv baglæns (Tryk på Ned piletast eller S) </string> + <string name="fly_left_tooltip"> + Flyv til venstre (tryk Shift + venstre pil eller A) + </string> + <string name="fly_right_tooltip"> + Flyv til højre (tryk Shift + højre pil eller D) + </string> + <string name="fly_up_tooltip"> + Flyv op (tryk E) + </string> + <string name="fly_down_tooltip"> + Flyv ned (tryk C) + </string> + <string name="jump_tooltip"> + Hop (tryk E) + </string> + <string name="crouch_tooltip"> + Kryb (tryk C) + </string> <string name="walk_title"> Gå </string> @@ -28,10 +58,12 @@ Flyv </string> <panel name="panel_actions"> + <button label="" label_selected="" name="move up btn" tool_tip="Flyv op (tryk E)"/> <button label="" label_selected="" name="turn left btn" tool_tip="xxx Drej til venstre (Tryk på venstre piletast eller A)"/> + <joystick_slide name="move left btn" tool_tip="Gå til venstre (tryk Shift + venstre pil eller A)"/> + <button label="" label_selected="" name="move down btn" tool_tip="Flyv ned (tryk C)"/> <button label="" label_selected="" name="turn right btn" tool_tip="Drej til højre (Tryk på højre piletast eller D)"/> - <button label="" label_selected="" name="move up btn" tool_tip="Flyv op, tryk E"/> - <button label="" label_selected="" name="move down btn" tool_tip="Flyv ned, tryk C"/> + <joystick_slide name="move right btn" tool_tip="Gå til højre (tryk Shift + højre pil eller D)"/> <joystick_turn name="forward btn" tool_tip="Gå frem (Tryk på Op piletast eller W)"/> <joystick_turn name="backward btn" tool_tip="Gå tilbage (Tryk på Ned piletast eller S)"/> </panel> diff --git a/indra/newview/skins/default/xui/da/floater_preview_notecard.xml b/indra/newview/skins/default/xui/da/floater_preview_notecard.xml index e600a774ec..5a0f5a32c0 100644 --- a/indra/newview/skins/default/xui/da/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/da/floater_preview_notecard.xml @@ -9,9 +9,6 @@ <floater.string name="Title"> Note: [NAME] </floater.string> - <floater.string label="Gem" label_selected="Gem" name="Save"> - Gem - </floater.string> <text name="desc txt"> Beskrivelse: </text> @@ -19,4 +16,5 @@ Indlæser... </text_editor> <button label="Gem" label_selected="Gem" name="Save"/> + <button label="Slet" label_selected="Slet" name="Delete"/> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_tools.xml b/indra/newview/skins/default/xui/da/floater_tools.xml index b501722e92..a84af9adc0 100644 --- a/indra/newview/skins/default/xui/da/floater_tools.xml +++ b/indra/newview/skins/default/xui/da/floater_tools.xml @@ -67,8 +67,8 @@ <text name="RenderingCost" tool_tip="Hvis beregnede rendering omkostninger for dette objekt"> þ: [COUNT] </text> - <check_box name="checkbox uniform"/> - <text name="checkbox uniform label"> + <check_box label="" name="checkbox uniform"/> + <text label="Stræk begge sider" name="checkbox uniform label"> Stræk begge sider </text> <check_box initial_value="true" label="Stræk teksturer" name="checkbox stretch textures"/> @@ -443,8 +443,6 @@ <check_box label="Vend" name="checkbox flip s"/> <spinner label="Lodret (V)" name="TexScaleV"/> <check_box label="Vend" name="checkbox flip t"/> - <spinner label="Rotation˚"/> - <spinner label="Gentagelser pr. m."/> <button label="Gem" label_selected="Gem" left_delta="62" name="button apply"/> <text name="tex offset"> Tekstur offset @@ -477,14 +475,7 @@ Areal: [AREA] m² </text> <button label="Om land" label_selected="Om land" name="button about land"/> - <check_box label="Vis ejere" name="checkbox show owners" tool_tip="Farver grunde afhængigt af ejerskab: - -Grøn = Dit land -Turkis = Din gruppes land -Rød = Ejet af andre -Gul = Til salg -Lilla = På auktion -Grå = Offentligt ejet"/> + <check_box label="Vis ejere" name="checkbox show owners" tool_tip="Farver grunde afhængigt af ejerskab: Grøn = Dit land Turkis = Din gruppes land Rød = Ejet af andre Gul = Til salg Lilla = På auktion Grå = Offentligt ejet"/> <text name="label_parcel_modify"> Redigere grund </text> diff --git a/indra/newview/skins/default/xui/da/menu_attachment_self.xml b/indra/newview/skins/default/xui/da/menu_attachment_self.xml index d8bd78fa23..bf52e5d57f 100644 --- a/indra/newview/skins/default/xui/da/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/da/menu_attachment_self.xml @@ -5,7 +5,7 @@ <menu_item_call label="Tag af" name="Detach"/> <menu_item_call label="Smid" name="Drop"/> <menu_item_call label="Stå op" name="Stand Up"/> - <menu_item_call label="Udseende" name="Appearance..."/> + <menu_item_call label="Skift sæt" name="Change Outfit"/> <menu_item_call label="Venner" name="Friends..."/> <menu_item_call label="Grupper" name="Groups..."/> <menu_item_call label="Profil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/da/menu_avatar_self.xml b/indra/newview/skins/default/xui/da/menu_avatar_self.xml index 39f3e49702..ec85bd05a5 100644 --- a/indra/newview/skins/default/xui/da/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/da/menu_avatar_self.xml @@ -20,7 +20,9 @@ <context_menu label="Tag af ▶" name="Object Detach"/> <menu_item_call label="Tag alt af" name="Detach All"/> </context_menu> - <menu_item_call label="Udseende" name="Appearance..."/> + <menu_item_call label="Skift sæt" name="Chenge Outfit"/> + <menu_item_call label="Redigér mit sæt" name="Edit Outfit"/> + <menu_item_call label="Redigér min form" name="Edit My Shape"/> <menu_item_call label="Venner" name="Friends..."/> <menu_item_call label="Grupper" name="Groups..."/> <menu_item_call label="Profil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/da/menu_bottomtray.xml b/indra/newview/skins/default/xui/da/menu_bottomtray.xml index dbdeefeaff..e979e35a91 100644 --- a/indra/newview/skins/default/xui/da/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/da/menu_bottomtray.xml @@ -4,6 +4,11 @@ <menu_item_check label="Bevægelse knap" name="ShowMoveButton"/> <menu_item_check label="Vis knap" name="ShowCameraButton"/> <menu_item_check label="Foto knap" name="ShowSnapshotButton"/> + <menu_item_check label="Sidepanel knap" name="ShowSidebarButton"/> + <menu_item_check label="Bygge knap" name="ShowBuildButton"/> + <menu_item_check label="Søge knap" name="ShowSearchButton"/> + <menu_item_check label="Kort knap" name="ShowWorldMapButton"/> + <menu_item_check label="Mini-Map button" name="ShowMiniMapButton"/> <menu_item_call label="Klip" name="NearbyChatBar_Cut"/> <menu_item_call label="Kopiér" name="NearbyChatBar_Copy"/> <menu_item_call label="Sæt ind" name="NearbyChatBar_Paste"/> diff --git a/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml index aeef2ccb23..c226d06404 100644 --- a/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <menu name="Gear Menu"> <menu_item_call label="Stå op" name="stand_up"/> - <menu_item_call label="Udseende" name="my_appearance"/> + <menu_item_call label="Skift sæt" name="change_outfit"/> <menu_item_call label="Profil" name="my_profile"/> <menu_item_call label="Venner" name="my_friends"/> <menu_item_call label="Grupper" name="my_groups"/> diff --git a/indra/newview/skins/default/xui/da/menu_inventory.xml b/indra/newview/skins/default/xui/da/menu_inventory.xml index 0ea21dc409..ff70ec7886 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory.xml @@ -52,6 +52,7 @@ <menu_item_call label="Slet ting" name="Purge Item"/> <menu_item_call label="Genskab ting" name="Restore Item"/> <menu_item_call label="åben" name="Open"/> + <menu_item_call label="Åben original" name="Open Original"/> <menu_item_call label="Egenskaber" name="Properties"/> <menu_item_call label="Omdøb" name="Rename"/> <menu_item_call label="Kopiér asset UUID" name="Copy Asset UUID"/> diff --git a/indra/newview/skins/default/xui/da/menu_login.xml b/indra/newview/skins/default/xui/da/menu_login.xml index 36e82e8bc4..1231c4c08d 100644 --- a/indra/newview/skins/default/xui/da/menu_login.xml +++ b/indra/newview/skins/default/xui/da/menu_login.xml @@ -2,7 +2,7 @@ <menu_bar name="Login Menu"> <menu label="Mig" name="File"> <menu_item_call label="Indstillinger" name="Preferences..."/> - <menu_item_call label="Afslut" name="Quit"/> + <menu_item_call label="Afslut [APP_NAME]" name="Quit"/> </menu> <menu label="Hjælp" name="Help"> <menu_item_call label="[SECOND_LIFE] hjælp" name="Second Life Help"/> diff --git a/indra/newview/skins/default/xui/da/menu_participant_list.xml b/indra/newview/skins/default/xui/da/menu_participant_list.xml index 02b7e8466b..2bd28e10de 100644 --- a/indra/newview/skins/default/xui/da/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/da/menu_participant_list.xml @@ -14,8 +14,8 @@ <context_menu label="Moderator muligheder >" name="Moderator Options"> <menu_item_check label="Tillad tekst chat" name="AllowTextChat"/> <menu_item_call label="Sluk for denne deltager" name="ModerateVoiceMuteSelected"/> - <menu_item_call label="Sluk for alle andre" name="ModerateVoiceMuteOthers"/> <menu_item_call label="Fjern slukning for denne deltager" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="Fjern slukning for alle andre" name="ModerateVoiceUnMuteOthers"/> + <menu_item_call label="Sluk lyd for alle" name="ModerateVoiceMute"/> + <menu_item_call label="Tænd lyd for alle" name="ModerateVoiceUnmute"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index e195ebfeed..a061292eb0 100644 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -5,7 +5,7 @@ <menu_item_call label="Mit instrumentpanel" name="Manage My Account"/> <menu_item_call label="Køb L$" name="Buy and Sell L$"/> <menu_item_call label="Profil" name="Profile"/> - <menu_item_call label="Udseende" name="Appearance"/> + <menu_item_call label="Skift sæt" name="ChangeOutfit"/> <menu_item_check label="Beholdning" name="Inventory"/> <menu_item_check label="Min beholdning" name="ShowSidetrayInventory"/> <menu_item_check label="Mine bevægelser" name="Gestures"/> @@ -160,6 +160,7 @@ <menu_item_check label="Fleksible objekter" name="Flexible Objects"/> </menu> <menu_item_check label="Kør flere 'threats'" name="Run Multiple Threads"/> + <menu_item_check label="Benyt "Plugin Read Thread"" name="Use Plugin Read Thread"/> <menu_item_call label="Tøm gruppe cache" name="ClearGroupCache"/> <menu_item_check label="Muse udjævning" name="Mouse Smoothing"/> <menu label="Shortcuts" name="Shortcuts"> @@ -186,7 +187,6 @@ <menu_item_call label="Zoom ind" name="Zoom In"/> <menu_item_call label="Zoom standard" name="Zoom Default"/> <menu_item_call label="Zoom ud" name="Zoom Out"/> - <menu_item_call label="Skift fuld-skærm" name="Toggle Fullscreen"/> </menu> <menu_item_call label="Vis debug valg" name="Debug Settings"/> <menu_item_check label="Vis udviklingsmenu" name="Debug Mode"/> diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index afccc1e904..72a1ab6a29 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -208,6 +208,9 @@ Du skal skrive både fornavn og efternavn på din figur. Du har brug for en konto for at logge ind i [SECOND_LIFE]. Vil du oprette en nu? <usetemplate name="okcancelbuttons" notext="Prøv igen" yestext="Lav ny konto"/> </notification> + <notification name="InvalidCredentialFormat"> + Du skal indtaste både fornavn og efternavn i din avatars brugernavn felt og derefter logge på igen. + </notification> <notification name="AddClassified"> Annoncer vil vises i 'Annoncer' sektionen i søge biblioteket og på [http://secondlife.com/community/classifieds secondlife.com] i en uge. Udfyld din annonce og klik på 'Udgiv...' for at tilf'je den til biblioteket. @@ -279,6 +282,11 @@ Gå til [_URL] for information om køb af L$? <notification name="CannotEncodeFile"> Kunne ikke 'forstå' filen: [FILE] </notification> + <notification name="CorruptedProtectedDataStore"> + Vi kan ikke læse dine beskyttede data så de nulstilles. + Dette kan ske hvis du ændrer din netværksopsætning. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="DoNotSupportBulkAnimationUpload"> [APP_NAME] understøtter p.t. ikke at send flere animationsfiler ad gangen. </notification> @@ -404,6 +412,12 @@ Tilbyd venskab til [NAME]? <button name="Cancel" text="Annullér"/> </form> </notification> + <notification name="ConfirmItemDeleteHasLinks"> + Mindst en af genstandene har lænkede genstande der peger på den. Hvis du sletter denne genstand, vil lænkninger ikke virke mere. Det anbefales kraftigt at fjerne lænkninger først. + +Er du sikker på at du vil slette disse genstande? + <usetemplate name="okcancelbuttons" notext="Annullér" yestext="OK"/> + </notification> <notification name="ErrorMessage"> <usetemplate name="okbutton" yestext="OK"/> </notification> @@ -438,6 +452,42 @@ Vend tilbage til [http://join.secondlife.com secondlife.com] for at oprette en n Du kan enten checke din Internet forbindelse og prøve igen om lidt, klikke på Hjælp for at se [SUPPORT_SITE] siden, eller klikke på Teleport for at forsøge at teleportere hjem. </notification> + <notification name="CantTeleportToGrid"> + Kunne ikke teleportere til [SLURL] da den er på et andet net ([GRID]) end det nuværende net ([CURRENT_GRID]). Luk venligst din klient og prøv igen. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="GeneralCertificateError"> + Kunne ikke opnå forbindelse til server. +[REASON] + +Vedrørende: [SUBJECT_NAME_STRING] +Fra: [ISSUER_NAME_STRING] +Valid fra: [VALID_FROM] +Valid til: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +SHA1 Fingerprint: [MD5_DIGEST] +Key Usage: [KEYUSAGE] +Extended Key Usage: [EXTENDEDKEYUSAGE] +Subject Key Identifier: [SUBJECTKEYIDENTIFIER] + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TrustCertificateError"> + Certifikationsmyndighed for denne server er ikke kendt. + +Certifikat information: +Vedrørende: [SUBJECT_NAME_STRING] +Fra: [ISSUER_NAME_STRING] +Valid fra: [VALID_FROM] +Valid til: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +SHA1 Fingerprint: [MD5_DIGEST] +Key Usage: [KEYUSAGE] +Extended Key Usage: [EXTENDEDKEYUSAGE] +Subject Key Identifier: [SUBJECTKEYIDENTIFIER] + +Ønsker du at stole på denne myndighed? + <usetemplate name="okcancelbuttons" notext="Annullér" yestext="Stol på"/> + </notification> <notification name="NotEnoughCurrency"> [NAME] L$ [PRICE] Du har ikke nok L$ til dette. </notification> @@ -627,9 +677,9 @@ Gå til 'Knowledge Base' for mere information om indholdsratings. Du har ikke adgang til denne region på grund af din valgte indholdsrating. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Du har ikke adgang til denne region på grund af din indholdsrating præferencer. + Du har ikke adgang til den region, da din indholdsrating ikke tillader dette. -Du kan klikke på 'Ændre præference' for at ændre din indholdsrating nu og dermed opnå adgang. Du vil så få mulighed for at søge og tilgå [REGIONMATURITY] fra da af. Hvis du senere ønsker at ændre denne opsætning tilbage, gå til Mig > Indstillinger > Generelt. +Klik på "Ændre præference" for at forhøje din indholdsrating for direkte adgang nu. Ved at gøre dette vil du få lov til at søge og få adgang til [REGIONMATURITY] indhold. Hvis du ønsker at ændre denne opsætning senere, kan du gøre dette fra Mig > Indstillinger > Generelt. <form name="form"> <button name="OK" text="Ændre indstillinger"/> <button name="Cancel" text="Luk"/> @@ -1176,15 +1226,6 @@ Prøv igen om lidt. <button name="Mute" text="Blokér"/> </form> </notification> - <notification name="ObjectGiveItemUnknownUser"> - Et objekt med navnet [OBJECTFROMNAME] ejet af (en ukendt beboer) har givet dig denne/dette [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button name="Keep" text="Behold"/> - <button name="Discard" text="Smid væk"/> - <button name="Mute" text="Blokér"/> - </form> - </notification> <notification name="UserGiveItem"> [NAME_SLURL] har givet dig denne/dette [OBJECTTYPE]: [ITEM_SLURL] @@ -1487,8 +1528,53 @@ Knappen vil blive vist når der er nok plads til den. <notification name="ShareNotification"> Træk genstande fra beholdning til en person i beboer vælgeren </notification> + <notification name="DeedToGroupFail"> + Dedikering til gruppe fejlede. + </notification> <notification name="AvatarRezNotification"> - Avatar '[NAME]' rezzed på [TIME] sekunder. + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' declouded in [TIME] seconds. + </notification> + <notification name="AvatarRezSelfNotification"> + ( [EXISTENCE] sekunder i live ) +Du afsluttede klargøring af dit sæt på [TIME] sekunder. + </notification> + <notification name="AvatarRezCloudNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' blev til "sky". + </notification> + <notification name="AvatarRezArrivedNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' appeared. + </notification> + <notification name="AvatarRezLeftCloudNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' forsvandt efter [TIME] sekunder som "sky". + </notification> + <notification name="AvatarRezEnteredAppearanceNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' skiftede til udseende modus. + </notification> + <notification name="AvatarRezLeftAppearanceNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' har forladt udseende modus. + </notification> + <notification name="AvatarRezLeftNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' forsvandt helt "uploaded". + </notification> + <notification name="ConfirmLeaveCall"> + Er du sikker på at du vil forlade dette opkald? + <usetemplate ignoretext="Bekræft før jeg forlader opkald" name="okcancelignore" notext="Nej" yestext="Ja"/> + </notification> + <notification name="ConfirmMuteAll"> + Du har valgt at slukke for lyden for alle deltagere i gruppeopkaldet. +Dette vil også betyde, at alle beboere der slutter sig til opkaldet +vil have lyden slukket - selv efter de har forladt kaldet. + + +Sluk for alles lyd? + <usetemplate ignoretext="Bekræft før jeg slukker for alle deltageres lyd i gruppe-kald" name="okcancelignore" notext="OK" yestext="Annullér"/> </notification> <global name="UnsupportedGLRequirements"> Det ser ikke ud til at din hardware opfylder minimumskravene til [APP_NAME]. [APP_NAME] kræver et OpenGL grafikkort som understøter 'multitexture'. Check eventuelt om du har de nyeste drivere for grafikkortet, og de nyeste service-packs og patches til dit operativsystem. diff --git a/indra/newview/skins/default/xui/da/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/da/panel_body_parts_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_body_parts_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/da/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..4cbcdebbe4 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Skift" name="switch_btn"/> + <button label="Køb >" name="bodyparts_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_bottomtray.xml b/indra/newview/skins/default/xui/da/panel_bottomtray.xml index 4a038e89ba..2d288a9494 100644 --- a/indra/newview/skins/default/xui/da/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/da/panel_bottomtray.xml @@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="bottom_tray"> - <string name="SpeakBtnToolTip"> - Slukker/tænder mikrofon - </string> - <string name="VoiceControlBtnToolTip"> - Skjuler/viser stemme kontrol panel - </string> + <string name="SpeakBtnToolTip" value="Slå mikrofon til/fra"/> + <string name="VoiceControlBtnToolTip" value="Vis/skjul stemme kontrolpanel"/> <layout_stack name="toolbar_stack"> <layout_panel name="speak_panel"> <talk_button name="talk"> @@ -24,6 +20,21 @@ <layout_panel name="snapshot_panel"> <button label="" name="snapshots" tool_tip="Tag foto"/> </layout_panel> + <layout_panel name="sidebar_btn_panel"> + <button label="Sidepanel" name="sidebar_btn" tool_tip="Vis/skjul sidepanel"/> + </layout_panel> + <layout_panel name="build_btn_panel"> + <button label="Byg" name="build_btn" tool_tip="Vis/skjul byggeværktøjer"/> + </layout_panel> + <layout_panel name="search_btn_panel"> + <button label="Søg" name="search_btn" tool_tip="Vis/skjul søgning"/> + </layout_panel> + <layout_panel name="world_map_btn_panel"> + <button label="Kort" name="world_map_btn" tool_tip="Vis/skjul verdenskort"/> + </layout_panel> + <layout_panel name="mini_map_btn_panel"> + <button label="Mini-kort" name="mini_map_btn" tool_tip="Vis/skjul Mini-kort"/> + </layout_panel> <layout_panel name="im_well_panel"> <chiclet_im_well name="im_well"> <button name="Unread IM messages" tool_tip="Konversationer"/> diff --git a/indra/newview/skins/default/xui/da/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/da/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..c08d095c66 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_clothing_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Tilføj +" name="add_btn"/> + <button label="Køb >" name="clothing_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/da/panel_clothing_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_cof_wearables.xml b/indra/newview/skins/default/xui/da/panel_cof_wearables.xml new file mode 100644 index 0000000000..92d78b01a2 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_cof_wearables.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="cof_wearables"> + <accordion name="cof_wearables_accordion"> + <accordion_tab name="tab_attachments" title="Attachments"/> + <accordion_tab name="tab_clothing" title="Tøj"/> + <accordion_tab name="tab_body_parts" title="Kropsdele"/> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/da/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..91d90a5660 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_deletable_wearable_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="deletable_wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/da/panel_dummy_clothing_list_item.xml new file mode 100644 index 0000000000..6af84de0c7 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_dummy_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="dummy_clothing_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_shape.xml b/indra/newview/skins/default/xui/da/panel_edit_shape.xml index 1c8567d27c..4360fe35f5 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_shape.xml @@ -1,14 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shape_panel"> - <panel name="avatar_sex_panel"> - <text name="gender_text"> - Køn: - </text> - <radio_group name="sex_radio"> - <radio_item label="Kvinde" name="radio"/> - <radio_item label="Mand" name="radio2"/> - </radio_group> - </panel> + <text name="avatar_height"> + [HEIGHT] meter høj + </text> <panel label="Trøje" name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="shape_body_tab" title="Krop"/> diff --git a/indra/newview/skins/default/xui/da/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/da/panel_edit_tattoo.xml index 4a133d8693..d4a12209db 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_tattoo.xml @@ -4,5 +4,6 @@ <texture_picker label="Hoved tatovering" name="Head Tattoo" tool_tip="Klik for at vælge et billede"/> <texture_picker label="Øvre tatovering" name="Upper Tattoo" tool_tip="Klik for at vælge et billede"/> <texture_picker label="Nedre tatovering" name="Lower Tattoo" tool_tip="Klik for at vælge et billede"/> + <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml index 4afb7ba45c..8e6990fe31 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml @@ -93,6 +93,12 @@ <text name="edit_wearable_title" value="Redigerer kropsbygning"/> <panel label="Trøje" name="wearable_type_panel"> <text name="description_text" value="Kropsbygning:"/> + <radio_group name="sex_radio"> + <radio_item label="" name="sex_male" tool_tip="Mand" value="1"/> + <radio_item label="" name="sex_female" tool_tip="Kvinde" value="0"/> + </radio_group> + <icon name="male_icon" tool_tip="Mandlig"/> + <icon name="female_icon" tool_tip="Kvindelig"/> </panel> <panel label="gear_buttom_panel" name="gear_buttom_panel"> <button name="friends_viewsort_btn" tool_tip="Valg"/> diff --git a/indra/newview/skins/default/xui/da/panel_group_land_money.xml b/indra/newview/skins/default/xui/da/panel_group_land_money.xml index 9b0267529c..efad4d0c34 100644 --- a/indra/newview/skins/default/xui/da/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/da/panel_group_land_money.xml @@ -6,6 +6,9 @@ <panel.string name="cant_view_group_land_text"> Du har ikke tilladelse til at se gruppeejet land. </panel.string> + <panel.string name="epmty_view_group_land_text"> + Intet indhold + </panel.string> <panel.string name="cant_view_group_accounting_text"> Du har ikke tilladelse til at se gruppens økonomiinformationer. </panel.string> diff --git a/indra/newview/skins/default/xui/da/panel_group_notices.xml b/indra/newview/skins/default/xui/da/panel_group_notices.xml index 7046ac4d7c..d8e8cb3c2a 100644 --- a/indra/newview/skins/default/xui/da/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/da/panel_group_notices.xml @@ -42,6 +42,7 @@ Maksimum er 200 pr. gruppe pr. dag <text name="string"> Træk og slip en gensand for at vedhæfte den: </text> + <button label="Beholdning" name="open_inventory" tool_tip="Åben beholdning"/> <button label="Fjern" label_selected="Fjern bilag" name="remove_attachment" tool_tip="Fjern vedhæng fra din note"/> <button label="Send" label_selected="Send" name="send_notice"/> <group_drop_target name="drop_target" tool_tip="Træk en genstand fra din beholdning til dette felt for at sende den med denne besked. Du skal have rettigheder til at kopiere og overdrage denne genstand for at kunne vedhæfte den."/> diff --git a/indra/newview/skins/default/xui/da/panel_login.xml b/indra/newview/skins/default/xui/da/panel_login.xml index 1e60174909..d4bf9a7d78 100644 --- a/indra/newview/skins/default/xui/da/panel_login.xml +++ b/indra/newview/skins/default/xui/da/panel_login.xml @@ -11,14 +11,10 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> - <text name="first_name_text"> - Fornavn: + <text name="username_text"> + Brugernavn: </text> - <line_editor label="Fornavn" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/> - <text name="last_name_text"> - Efternavn: - </text> - <line_editor label="Efternavn" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/> + <line_editor label="Brugernavn" name="username_edit" tool_tip="[SECOND_LIFE] Brugernavn"/> <text name="password_text"> Password: </text> diff --git a/indra/newview/skins/default/xui/da/panel_main_inventory.xml b/indra/newview/skins/default/xui/da/panel_main_inventory.xml index 16bd22c21a..d6406939c1 100644 --- a/indra/newview/skins/default/xui/da/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/da/panel_main_inventory.xml @@ -9,62 +9,20 @@ <text name="ItemcountText"> Genstande: </text> - <menu_bar name="Inventory Menu"> - <menu label="Filer" name="File"> - <menu_item_call label="Åben" name="Open"/> - <menu label="Send fil" name="upload"> - <menu_item_call label="Billede (L$[COST])..." name="Upload Image"/> - <menu_item_call label="Lyd (L$[COST])..." name="Upload Sound"/> - <menu_item_call label="Animation (L$[COST])..." name="Upload Animation"/> - <menu_item_call label="Flere filer (L$[COST] pr. fil)..." name="Bulk Upload"/> - </menu> - <menu_item_call label="Nyt vindue" name="New Window"/> - <menu_item_call label="Vis filtre" name="Show Filters"/> - <menu_item_call label="Nulstil filtre" name="Reset Current"/> - <menu_item_call label="Luk alle mapper" name="Close All Folders"/> - <menu_item_call label="Tøm papirkurv" name="Empty Trash"/> - <menu_item_call label="Tøm fundne genstande" name="Empty Lost And Found"/> - </menu> - <menu label="Opret" name="Create"> - <menu_item_call label="Ny mappe" name="New Folder"/> - <menu_item_call label="Nyt script" name="New Script"/> - <menu_item_call label="Ny note" name="New Note"/> - <menu_item_call label="Ny bevægelse" name="New Gesture"/> - <menu label="Nyt tøj" name="New Clothes"> - <menu_item_call label="Ny trøje" name="New Shirt"/> - <menu_item_call label="Nye bukser" name="New Pants"/> - <menu_item_call label="Nye sko" name="New Shoes"/> - <menu_item_call label="Nye strømper" name="New Socks"/> - <menu_item_call label="Ny jakke" name="New Jacket"/> - <menu_item_call label="Ny nederdel" name="New Skirt"/> - <menu_item_call label="Nye handsker" name="New Gloves"/> - <menu_item_call label="Ny undertrøje" name="New Undershirt"/> - <menu_item_call label="Nye underbukser" name="New Underpants"/> - <menu_item_call label="Nyt alpha lag" name="New Alpha"/> - <menu_item_call label="Ny tatovering" name="New Tattoo"/> - </menu> - <menu label="Nye kropsdele" name="New Body Parts"> - <menu_item_call label="Ny kropsbygning" name="New Shape"/> - <menu_item_call label="Ny hud" name="New Skin"/> - <menu_item_call label="Nyt hår" name="New Hair"/> - <menu_item_call label="Nye øjne" name="New Eyes"/> - </menu> - </menu> - <menu label="Sortér" name="Sort"> - <menu_item_check label="Efter navn" name="By Name"/> - <menu_item_check label="Efter dato" name="By Date"/> - <menu_item_check label="Altid mapper efter navn" name="Folders Always By Name"/> - <menu_item_check label="System-mapper i toppen" name="System Folders To Top"/> - </menu> - </menu_bar> <filter_editor label="Filter" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Alle ting" name="All Items"/> - <inventory_panel label="Nye ting" name="Recent Items"/> + <recent_inventory_panel label="Nye ting" name="Recent Items"/> </tab_container> - <panel name="bottom_panel"> - <button name="options_gear_btn" tool_tip="Vis flere valgmuligheder"/> - <button name="add_btn" tool_tip="Opret ny genstand"/> - <dnd_button name="trash_btn" tool_tip="Fjern valgt genstand"/> - </panel> + <layout_stack name="bottom_panel"> + <layout_panel name="options_gear_btn_panel"> + <button name="options_gear_btn" tool_tip="Vis yderligere valg"/> + </layout_panel> + <layout_panel name="add_btn_panel"> + <button name="add_btn" tool_tip="Tilføj ny genstand"/> + </layout_panel> + <layout_panel name="trash_btn_panel"> + <dnd_button name="trash_btn" tool_tip="Fjern valgte genstand"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_outfit_edit.xml b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml index de68366610..9aa9fd14cc 100644 --- a/indra/newview/skins/default/xui/da/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml @@ -2,6 +2,8 @@ <!-- Side tray Outfit Edit panel --> <panel label="Redigér sæt" name="outfit_edit"> <string name="No Outfit" value="Intet sæt"/> + <string name="unsaved_changes" value="Ikke gemte ændringer"/> + <string name="now_editing" value="Redigerer nu"/> <panel.string name="not_available"> (Ikke relevant) </panel.string> @@ -15,24 +17,19 @@ <text name="title" value="Redigér sæt"/> <panel label="bottom_panel" name="header_panel"> <panel label="bottom_panel" name="outfit_name_and_status"> - <text name="status" value="Retter..."/> + <text name="status" value="Redigerer nu..."/> <text name="curr_outfit_name" value="[Current Outfit]"/> </panel> </panel> <layout_stack name="im_panels"> <layout_panel label="IM kontrolpanel" name="outfit_wearables_panel"> - <scroll_list name="look_items_list"> - <scroll_list.columns label="Se genstand" name="look_item"/> - <scroll_list.columns label="Sorter genstande i sæt" name="look_item_sort"/> - </scroll_list> <panel label="bottom_panel" name="edit_panel"/> </layout_panel> <layout_panel name="add_wearables_panel"> - <filter_editor label="Filter" name="look_item_filter"/> + <text name="add_to_outfit_label" value="Tilføj til sæt:"/> <layout_stack name="filter_panels"> - <layout_panel label="IM kontrolpanel" name="filter_button_panel"> - <text name="add_to_outfit_label" value="Tilføj til sæt:"/> - <button label="O" name="filter_button"/> + <layout_panel label="IM kontrolpanel" name="filter_panel"> + <filter_editor label="Filter" name="look_item_filter"/> </layout_panel> </layout_stack> <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> diff --git a/indra/newview/skins/default/xui/da/panel_people.xml b/indra/newview/skins/default/xui/da/panel_people.xml index db72125b84..5d8474259c 100644 --- a/indra/newview/skins/default/xui/da/panel_people.xml +++ b/indra/newview/skins/default/xui/da/panel_people.xml @@ -2,9 +2,9 @@ <!-- Side tray panel --> <panel label="Personer" name="people_panel"> <string name="no_recent_people" value="Ingen tidligere personer. Leder du efter nogen at være sammen med? Prøv [secondlife:///app/search/people Search] eller [secondlife:///app/worldmap World Map]."/> - <string name="no_filtered_recent_people" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]."/> + <string name="no_filtered_recent_people" value="Fandt du ikke det du søgte? Prøv [secondlife:///app/search/people/[SEARCH_TERM] Search]."/> <string name="no_one_near" value="Ingen i nærheden. Leder du efter nogen at være sammen med? Prøv [secondlife:///app/search/people Search] eller [secondlife:///app/worldmap World Map]."/> - <string name="no_one_filtered_near" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]."/> + <string name="no_one_filtered_near" value="Fandt du ikke det du søgte? Prøv [secondlife:///app/search/people/[SEARCH_TERM] Search]."/> <string name="no_friends_online" value="Ingen venner online"/> <string name="no_friends" value="Ingen venner"/> <string name="no_friends_msg"> @@ -12,11 +12,11 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap World Map]. </string> <string name="no_filtered_friends_msg"> - Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]. + Fandt du ikke det du søgte? Prøv [secondlife:///app/search/people/[SEARCH_TERM] Search]. </string> <string name="people_filter_label" value="Filtrér personer"/> <string name="groups_filter_label" value="Filtrér grupper"/> - <string name="no_filtered_groups_msg" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/groups Search]."/> + <string name="no_filtered_groups_msg" value="Fandt du ikke det du søgte? Prøv [secondlife:///app/search/groups/[SEARCH_TERM] Search]."/> <string name="no_groups_msg" value="Leder du efter grupper at være med i? Prøv [secondlife:///app/search/groups Search]."/> <filter_editor label="Filtrér" name="filter_input"/> <tab_container name="tabs"> @@ -55,7 +55,7 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap Worl <button label="Profil" name="view_profile_btn" tool_tip="Vis billede, gruppe og anden information om beboer"/> <button label="IM" name="im_btn" tool_tip="Chat privat med denne person"/> <button label="Opkald" name="call_btn" tool_tip="Opkald til denne beboer"/> - <button label="Del" name="share_btn"/> + <button label="Del" name="share_btn" tool_tip="Del en genstand i beholdning"/> <button label="Teleport" name="teleport_btn" tool_tip="Tilbyd teleport"/> <button label="Group profil" name="group_info_btn" tool_tip="Vis gruppe information"/> <button label="Gruppe chat" name="chat_btn" tool_tip="Åben chat session"/> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml index 4d505db30e..807d7939b8 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml @@ -13,6 +13,7 @@ </text> <check_box label="Byg/Redigér" name="edit_camera_movement" tool_tip="Benyt automatisk kamera positionering ved start og slut af editerings modus"/> <check_box label="Udseende" name="appearance_camera_movement" tool_tip="Benyt automatisk kamera positionering ved redigering"/> + <check_box initial_value="1" label="Sidepanel" name="appearance_sidebar_positioning" tool_tip="Benyt automatisk positionering af kamera"/> <check_box label="Vis avatar i førsteperson" name="first_person_avatar_visible"/> <check_box label="Piletaster bruges altid til bevægelse" name="arrow_keys_move_avatar_check"/> <check_box label="Tast-tast-hold for at løbe" name="tap_tap_hold_to_run"/> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml index df97193598..20a376f152 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml @@ -45,6 +45,7 @@ </text> <check_box initial_value="true" label="Afspil skrive animation ved chat" name="play_typing_animation"/> <check_box label="Send e-mail til mig når jeg modtager IM og er offline" name="send_im_to_email"/> + <check_box label="Åben for almindelig tekst i IM og chat historik" name="plain_text_chat_history"/> <text name="show_ims_in_label"> Vis IM'er i: </text> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml index 07e3aec72a..586896041d 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Grafik" name="Display panel"> - <text name="UI Size:"> - UI størrelse: - </text> <text name="QualitySpeed"> Kvalitet og hastighed: </text> @@ -53,6 +50,10 @@ m </text> <slider label="Maks. antal partikler:" name="MaxParticleCount"/> + <slider label="Maks. avatar optegningsafstand:" name="MaxAvatarDrawDistance"/> + <text name="DrawDistanceMeterText3"> + m + </text> <slider label="Efterbehandlingskvalitet:" name="RenderPostProcess"/> <text name="MeshDetailText"> Netmaske detaljer: diff --git a/indra/newview/skins/default/xui/da/sidepanel_appearance.xml b/indra/newview/skins/default/xui/da/sidepanel_appearance.xml index 43ddfdada7..be049bea38 100644 --- a/indra/newview/skins/default/xui/da/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/da/sidepanel_appearance.xml @@ -1,9 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Sæt" name="appearance panel"> <string name="No Outfit" value="Intet sæt"/> + <string name="Unsaved Changes" value="Ikke gemte ændringer"/> + <string name="Now Wearing" value="Bærer nu..."/> <panel name="panel_currentlook"> - <text name="currentlook_title"> - (ikke gemt) + <button label="E" name="editappearance_btn"/> + <button label="O" name="openoutfit_btn"/> + <text name="currentlook_status"> + (Status) </text> </panel> <filter_editor label="Filtrér sæt" name="Filter"/> diff --git a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml index 9a2a348f58..767d74ca3f 100644 --- a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml @@ -4,6 +4,7 @@ <panel name="button_panel"> <button label="Profil" name="info_btn"/> <button label="Del" name="share_btn"/> + <button label="Køb ind" name="shop_btn"/> <button label="Bær" name="wear_btn"/> <button label="Afspil" name="play_btn"/> <button label="Teleportér" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml index bd5ab62be9..5ceb0612a8 100644 --- a/indra/newview/skins/default/xui/da/strings.xml +++ b/indra/newview/skins/default/xui/da/strings.xml @@ -88,6 +88,24 @@ <string name="LoginDownloadingClothing"> Henter tøj... </string> + <string name="InvalidCertificate"> + Serveren returnerede et ugyldigt eller ødelagt certifikat. Kontakt venligst administrator af dette net. + </string> + <string name="CertInvalidHostname"> + Et ugyldig hostnavn blev brugt for at få adgang til serveren. Check venligst din SLURL eller navnet på hosten. + </string> + <string name="CertExpired"> + Certifikat returneret fra nettet ser ud til at være udløbet. Check venligst din systemtid eller kontakt administratoren af dette net. + </string> + <string name="CertKeyUsage"> + Det certifikat der blev returneret af serveren kan ikke benyttes til SSL. Kontakt venligst administrator af dette net. + </string> + <string name="CertBasicConstraints"> + For mange certifikater i serverens certifikat streng. Kontakt venligst administrator af dette net. + </string> + <string name="CertInvalidSignature"> + Certifikat signaturen returneret på dette net kan ikke bekræftes. Kontakt venligst administrator af dette net. + </string> <string name="LoginFailedNoNetwork"> Netværksfejl: Kunne ikke etablere forbindelse, check venligst din netværksforbindelse. </string> @@ -816,6 +834,42 @@ <string name="invalid"> ugyldig </string> + <string name="shirt_not_worn"> + Trøje - ikke på + </string> + <string name="pants_not_worn"> + Bukser - ikke på + </string> + <string name="shoes_not_worn"> + Sko - ikke på + </string> + <string name="socks_not_worn"> + Strømper - ikke på + </string> + <string name="jacket_not_worn"> + Jakke - ikke på + </string> + <string name="gloves_not_worn"> + Handsker - ikke på + </string> + <string name="undershirt_not_worn"> + Undertrøje - ikke på + </string> + <string name="underpants_not_worn"> + Underbukser - ikke på + </string> + <string name="skirt_not_worn"> + Nederdel - ikke på + </string> + <string name="alpha_not_worn"> + Alpha ikke benyttet + </string> + <string name="tattoo_not_worn"> + Tatovering ikke benyttet + </string> + <string name="invalid_not_worn"> + ugyldig + </string> <string name="NewWearable"> Ny [WEARABLE_ITEM] </string> @@ -886,7 +940,10 @@ Tryk ESC for at skift til normalt udsyn </string> <string name="InventoryNoMatchingItems"> - Fandt du ikke hvad du ledte efter. Prøv [secondlife:///app/search/all Search]. + Fandt du ikke hvad du søgte? Prøv [secondlife:///app/search/all/[SEARCH_TERM] Search]. + </string> + <string name="PlacesNoMatchingItems"> + Fandt du ikke hvad du søgte? Prøv [secondlife:///app/search/places/[SEARCH_TERM] Search]. </string> <string name="FavoritesNoMatchingItems"> Træk et landemærke hertil for at tilføje den som favorit. @@ -916,6 +973,7 @@ <string name="Wave" value=" Vink "/> <string name="HelloAvatar" value=" Hej, avatar! "/> <string name="ViewAllGestures" value=" Se alle >>"/> + <string name="GetMoreGestures" value="Få mere >>"/> <string name="Animations" value=" Animationer,"/> <string name="Calling Cards" value=" Visitkort,"/> <string name="Clothing" value=" Tøj,"/> @@ -1528,16 +1586,19 @@ Beboeren du sendte en besked er 'optaget', hvilket betyder at han/hun ikke vil forstyrres. Din besked vil blive vis i hans/hendes IM panel til senere visning. </string> <string name="MuteByName"> - (efter navn) + (Efter navn) </string> <string name="MuteAgent"> (beboer) </string> <string name="MuteObject"> - (objekt) + (Objekt) </string> <string name="MuteGroup"> - (gruppe) + (Gruppe) + </string> + <string name="MuteExternal"> + (Ekstern) </string> <string name="RegionNoCovenant"> Der er ingen regler for dette estate. @@ -3297,11 +3358,14 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="answered_call"> Dit opkald er blevet besvaret </string> - <string name="started_call"> - startede et stemme opkald + <string name="you_started_call"> + Du startede dette stemme kald + </string> + <string name="you_joined_call"> + Du er nu med i stemme opkald </string> - <string name="joined_call"> - tilsluttede stemme opkald + <string name="name_started_call"> + [NAME] startede et stemmekald </string> <string name="ringing-im"> Tilslutter stemme opkald... @@ -3500,6 +3564,90 @@ Krænkelsesanmeldelse <string name="Contents"> Indhold </string> + <string name="Gesture"> + Bevægelse + </string> + <string name="Male Gestures"> + Mandlige bevægelser + </string> + <string name="Female Gestures"> + Kvindelige bevægelser + </string> + <string name="Other Gestures"> + Andre bevægelser + </string> + <string name="Speech Gestures"> + Tale bevægelser + </string> + <string name="Common Gestures"> + Almindelige bevægelser + </string> + <string name="Male - Excuse me"> + Mand - Undskyld mig + </string> + <string name="Male - Get lost"> + Mand - Skrid! + </string> + <string name="Male - Blow kiss"> + Mand - Pust et kys + </string> + <string name="Male - Boo"> + Mand - Boo + </string> + <string name="Male - Bored"> + Mand - Keder sig + </string> + <string name="Male - Hey"> + Mand - Hey + </string> + <string name="Male - Laugh"> + Mand - Latter + </string> + <string name="Male - Repulsed"> + Mand - Frastødt + </string> + <string name="Male - Shrug"> + Mand - Skuldertræk + </string> + <string name="Male - Stick tougue out"> + Mand - Stik tunge ud + </string> + <string name="Male - Wow"> + Mand - Wow + </string> + <string name="FeMale - Excuse me"> + Kvinde - Undskyld mig + </string> + <string name="FeMale - Get lost"> + Kvinde - Skrid! + </string> + <string name="FeMale - Blow kiss"> + Kvinde - Pust et kys + </string> + <string name="FeMale - Boo"> + Kvinde - Boo + </string> + <string name="Female - Bored"> + Kvinde - Keder sig + </string> + <string name="Female - Hey"> + Kvinde - Hey + </string> + <string name="Female - Laugh"> + Kvinde - Latter + </string> + <string name="Female - Repulsed"> + Kvinde - Frastødt + </string> + <string name="Female - Shrug"> + Kvinde - Skuldertræk + </string> + <string name="Female - Stick tougue out"> + Kvinde - Stik tungen ud + </string> + <string name="Female - Wow"> + Kvinde - Wow + </string> <string name="AvatarBirthDateFormat"> [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] </string> diff --git a/indra/newview/skins/default/xui/de/floater_buy_land.xml b/indra/newview/skins/default/xui/de/floater_buy_land.xml index 5708a3f80a..5369155cf9 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_land.xml @@ -124,9 +124,6 @@ unterstützt [AMOUNT2] Objekte <floater.string name="no_parcel_selected"> (keine Parzelle ausgewählt) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/de/floater_camera.xml b/indra/newview/skins/default/xui/de/floater_camera.xml index 87371b05e3..418e717bf6 100644 --- a/indra/newview/skins/default/xui/de/floater_camera.xml +++ b/indra/newview/skins/default/xui/de/floater_camera.xml @@ -9,35 +9,28 @@ <floater.string name="move_tooltip"> Kamera nach oben, unten, links und rechts bewegen </floater.string> - <floater.string name="orbit_mode_title"> - Kreisen + <floater.string name="camera_modes_title"> + Kameramodi </floater.string> <floater.string name="pan_mode_title"> - Schwenken + Kreisen - Zoomen - Schwenken </floater.string> - <floater.string name="avatar_view_mode_title"> - Voreinstellungen + <floater.string name="presets_mode_title"> + Ansichten </floater.string> <floater.string name="free_mode_title"> Objekt ansehen </floater.string> <panel name="controls"> - <joystick_track name="cam_track_stick" tool_tip="Kamera nach oben, unten, links und rechts bewegen"/> <panel name="zoom" tool_tip="Kamera auf Fokus zoomen"> + <joystick_rotate name="cam_rotate_stick" tool_tip="Kamera um Fokus kreisen"/> <slider_bar name="zoom_slider" tool_tip="Kamera auf Fokus zoomen"/> - </panel> - <joystick_rotate name="cam_rotate_stick" tool_tip="Kamera um Fokus kreisen"/> - <panel name="camera_presets"> - <button name="rear_view" tool_tip="Hinteransicht"/> - <button name="group_view" tool_tip="Gruppen-Ansicht"/> - <button name="front_view" tool_tip="Vorderansicht"/> - <button name="mouselook_view" tool_tip="Mouselook"/> + <joystick_track name="cam_track_stick" tool_tip="Kamera nach oben, unten, links und rechts bewegen"/> </panel> </panel> <panel name="buttons"> - <button label="" name="orbit_btn" tool_tip="Kamera kreisen"/> - <button label="" name="pan_btn" tool_tip="Kamera schwenken"/> - <button label="" name="avatarview_btn" tool_tip="Voreinstellungen"/> - <button label="" name="freecamera_btn" tool_tip="Objekt ansehen"/> + <button label="" name="presets_btn" tool_tip="Ansichten"/> + <button label="" name="pan_btn" tool_tip="Kreisen - Zoomen - Schwenken"/> + <button label="" name="avatarview_btn" tool_tip="Kameramodi"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_incoming_call.xml b/indra/newview/skins/default/xui/de/floater_incoming_call.xml index 740085599f..0312f7dfe9 100644 --- a/indra/newview/skins/default/xui/de/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/de/floater_incoming_call.xml @@ -16,7 +16,13 @@ ist einem Voice-Konferenz-Chat beigetreten. </floater.string> <floater.string name="VoiceInviteGroup"> - ist einem Voice-Chat mit der Gruppe [GROUP] beigetreten. + ist dem '[GROUP]' Voice-Kanal beigetreten. + </floater.string> + <floater.string name="VoiceInviteQuestionGroup"> + Möchten Sie [CURRENT_CHAT] verlassen und dem Gespräch mit '[GROUP]' beitreten? + </floater.string> + <floater.string name="VoiceInviteQuestionDefault"> + Möchten Sie [CURRENT_CHAT] verlassen und diesem Voice-Chat beitreten? </floater.string> <text name="question"> Möchten Sie [CURRENT_CHAT] verlassen und diesem Voice-Chat beitreten? diff --git a/indra/newview/skins/default/xui/de/floater_snapshot.xml b/indra/newview/skins/default/xui/de/floater_snapshot.xml index 4c417710bd..a656ffb894 100644 --- a/indra/newview/skins/default/xui/de/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/de/floater_snapshot.xml @@ -5,12 +5,19 @@ </floater.string> <button label="Foto aktualisieren" name="new_snapshot_btn"/> <line_editor label="Beschreibung" name="description"/> - <button label="Foto freigeben" name="share"/> - <button label="Ins Internet stellen" name="share_to_web"/> - <button label="Objekt in meinem Inventar speichern" name="save_to_inventory"/> - <button label="Foto speichern" name="save"/> - <button label="Foto per E-Mail senden" name="share_to_email"/> - <button label="Auf meinem Computer speichern" name="save_to_computer"/> - <button label="Als Profilbild festlegen" name="set_profile_pic"/> - <button label="Zurück" name="cancel"/> + <panel name="panel_snapshot_main"> + <button label="Foto freigeben" name="share"/> + <button label="Foto speichern" name="save"/> + <button label="Als Profilbild festlegen" name="set_profile_pic"/> + </panel> + <panel name="panel_snapshot_share"> + <button label="Ins Internet stellen" name="share_to_web"/> + <button label="Foto per E-Mail senden" name="share_to_email"/> + <button label="Zurück" name="cancel_share"/> + </panel> + <panel name="panel_snapshot_save"> + <button label="Objekt in meinem Inventar speichern" name="save_to_inventory"/> + <button label="Auf meinem Computer speichern" name="save_to_computer"/> + <button label="Zurück" name="cancel_save"/> + </panel> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_voice_controls.xml b/indra/newview/skins/default/xui/de/floater_voice_controls.xml index aa582838a4..07b7689cd0 100644 --- a/indra/newview/skins/default/xui/de/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/de/floater_voice_controls.xml @@ -19,8 +19,10 @@ <layout_panel name="my_panel"> <text name="user_text" value="Mein Avatar:"/> </layout_panel> - <layout_panel name="leave_call_btn_panel"> - <button label="Anruf beenden" name="leave_call_btn"/> - </layout_panel> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Anruf beenden" name="leave_call_btn"/> + </layout_panel> + </layout_stack> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_voice_effect.xml b/indra/newview/skins/default/xui/de/floater_voice_effect.xml new file mode 100644 index 0000000000..8de0133ead --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_voice_effect.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater label="Orte" name="voice_effects" title="VOICE-MORPHING AUSPROBIEREN"> + <string name="no_voice_effect"> + (Kein Voice-Morphing) + </string> + <string name="active_voice_effect"> + (Aktiv) + </string> + <string name="unsubscribed_voice_effect"> + (nicht abonniert) + </string> + <string name="new_voice_effect"> + (Neu!) + </string> + <text name="status_text"> + Um die Voice-Morph-Effekte auszuprobieren, einfach auf die Schaltfläche „Aufnahme“ klicken und kurz ins Mikrofon sprechen. Klicken Sie dann auf einen beliebigen Effekt in der Liste, um zu hören, wie der Effekt Ihre Stimme verändert. + +Schließen Sie dieses Fenster, um wieder mit dem Voice-Chat in der Nähe verbunden zu werden. + </text> + <button label="Aufnahme" name="record_btn" tool_tip="Nehmen Sie Ihre Stimme auf."/> + <button label="Stopp" name="record_stop_btn"/> + <text name="voice_morphing_link"> + [[URL]Voice-Morphing abonnieren] + </text> + <scroll_list name="voice_effect_list" tool_tip="Nehmen Sie Ihre Stimme auf und klicken Sie dann auf einen Effekt, um diesen auszuprobieren."> + <scroll_list.columns label="Voice-Morphing" name="name"/> + <scroll_list.columns label="Gültig bis" name="expires"/> + </scroll_list> +</floater> diff --git a/indra/newview/skins/default/xui/de/inspect_object.xml b/indra/newview/skins/default/xui/de/inspect_object.xml index ede14a37d7..72b8235828 100644 --- a/indra/newview/skins/default/xui/de/inspect_object.xml +++ b/indra/newview/skins/default/xui/de/inspect_object.xml @@ -8,7 +8,7 @@ Von [CREATOR] </string> <string name="CreatorAndOwner"> - von [CREATOR] + Von [CREATOR] Besitzer [OWNER] </string> <string name="Price"> @@ -23,16 +23,16 @@ Besitzer [OWNER] <string name="Sit"> Sitzen </string> - <text name="object_name" value="Wirklich langen Objektnamen als Test eingeben"/> + <text name="object_name" value="Test für ein Objektname der sehr lange ist und über zwei Zeilen geht."/> <text name="object_creator"> von secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about Besitzer secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about </text> <text name="price_text"> - 300.000 L$ + 30.000 L$ </text> <text name="object_description"> - Dies ist eine wirklich lange Beschreibung für ein Objekt, mindestens 80 Zeichen lang oder jetzt schon 120 Zeichen. Niemand weiß es genau. + Dies ist eine wirklich lange Beschreibung für ein Objekt, mindestens 80 Zeichen lang oder jetzt schon mindestens 120 Zeichen lang und länger als der englische Originaltext. Niemand weiß es genau. </text> <text name="object_media_url"> http://www.superdupertest.com diff --git a/indra/newview/skins/default/xui/de/menu_cof_attachment.xml b/indra/newview/skins/default/xui/de/menu_cof_attachment.xml new file mode 100644 index 0000000000..05d3dfca9d --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_cof_attachment.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="COF Attachment"> + <menu_item_call label="Abnehmen" name="detach"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/de/menu_cof_body_part.xml b/indra/newview/skins/default/xui/de/menu_cof_body_part.xml new file mode 100644 index 0000000000..07960a525c --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_cof_body_part.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="COF Body"> + <menu_item_call label="Ersetzen" name="replace"/> + <menu_item_call label="Bearbeiten" name="edit"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/de/menu_cof_clothing.xml b/indra/newview/skins/default/xui/de/menu_cof_clothing.xml new file mode 100644 index 0000000000..5cf31791ba --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_cof_clothing.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="COF Clothing"> + <menu_item_call label="Ausziehen" name="take_off"/> + <menu_item_call label="Eine Kategorie nach oben" name="move_up"/> + <menu_item_call label="Eine Kategorie nach unten" name="move_down"/> + <menu_item_call label="Bearbeiten" name="edit"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/de/menu_cof_gear.xml b/indra/newview/skins/default/xui/de/menu_cof_gear.xml new file mode 100644 index 0000000000..54b218d22f --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_cof_gear.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="Gear COF"> + <menu label="Neue Kleider" name="COF.Gear.New_Clothes"/> + <menu label="Neue Körperteile" name="COF.Geear.New_Body_Parts"/> +</menu> diff --git a/indra/newview/skins/default/xui/de/menu_hide_navbar.xml b/indra/newview/skins/default/xui/de/menu_hide_navbar.xml index 32a6823b35..9acf96dc6d 100644 --- a/indra/newview/skins/default/xui/de/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/de/menu_hide_navbar.xml @@ -2,4 +2,5 @@ <menu name="hide_navbar_menu"> <menu_item_check label="Navigationsleiste anzeigen" name="ShowNavbarNavigationPanel"/> <menu_item_check label="Favoritenleiste anzeigen" name="ShowNavbarFavoritesPanel"/> + <menu_item_check label="Mini-Standortleiste anzeigen" name="ShowMiniLocationPanel"/> </menu> diff --git a/indra/newview/skins/default/xui/de/menu_inventory.xml b/indra/newview/skins/default/xui/de/menu_inventory.xml index 306ef19de3..f6139a0ea0 100644 --- a/indra/newview/skins/default/xui/de/menu_inventory.xml +++ b/indra/newview/skins/default/xui/de/menu_inventory.xml @@ -80,6 +80,7 @@ <menu label="An HUD hängen" name="Attach To HUD"/> <menu_item_call label="Bearbeiten" name="Wearable Edit"/> <menu_item_call label="Anziehen" name="Wearable Wear"/> + <menu_item_call label="Hinzufügen" name="Wearable Add"/> <menu_item_call label="Ausziehen" name="Take Off"/> <menu_item_call label="--keine Optionen--" name="--no options--"/> </menu> diff --git a/indra/newview/skins/default/xui/de/menu_outfit_gear.xml b/indra/newview/skins/default/xui/de/menu_outfit_gear.xml new file mode 100644 index 0000000000..411dfc42c0 --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_outfit_gear.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="Gear Outfit"> + <menu_item_call label="Anziehen - Aktuelles Outfit ersetzen" name="wear"/> + <menu_item_call label="Ausziehen - Aus aktuellem Outfit entfernen" name="take_off"/> + <menu label="Neue Kleider" name="New Clothes"> + <menu_item_call label="Neues Hemd" name="New Shirt"/> + <menu_item_call label="Neue Hose" name="New Pants"/> + <menu_item_call label="Neue Schuhe" name="New Shoes"/> + <menu_item_call label="Neue Socken" name="New Socks"/> + <menu_item_call label="Neue Jacke" name="New Jacket"/> + <menu_item_call label="Neuer Rock" name="New Skirt"/> + <menu_item_call label="Neue Handschuhe" name="New Gloves"/> + <menu_item_call label="Neues Unterhemd" name="New Undershirt"/> + <menu_item_call label="Neue Unterhose" name="New Underpants"/> + <menu_item_call label="Neues Alpha" name="New Alpha"/> + <menu_item_call label="Neue Tätowierung" name="New Tattoo"/> + </menu> + <menu label="Neue Körperteile" name="New Body Parts"> + <menu_item_call label="Neue Form" name="New Shape"/> + <menu_item_call label="Neue Haut" name="New Skin"/> + <menu_item_call label="Neues Haar" name="New Hair"/> + <menu_item_call label="Neue Augen" name="New Eyes"/> + </menu> + <menu_item_call label="Outfit neu benennen" name="rename"/> + <menu_item_call label="Outfit löschen" name="delete_outfit"/> +</menu> diff --git a/indra/newview/skins/default/xui/de/menu_outfit_tab.xml b/indra/newview/skins/default/xui/de/menu_outfit_tab.xml new file mode 100644 index 0000000000..605dee9b33 --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_outfit_tab.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="Outfit"> + <menu_item_call label="Anziehen - Aktuelles Outfit ersetzen" name="wear_replace"/> + <menu_item_call label="Anziehen - Aktuelles Outfit hinzufügen" name="wear_add"/> + <menu_item_call label="Ausziehen - Aus aktuellem Outfit entfernen" name="take_off"/> + <menu_item_call label="Outfit bearbeiten" name="edit"/> + <menu_item_call label="Umbenennen" name="rename"/> + <menu_item_call label="Outfit löschen" name="delete"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/de/menu_save_outfit.xml b/indra/newview/skins/default/xui/de/menu_save_outfit.xml index 70bca077ab..986c78b318 100644 --- a/indra/newview/skins/default/xui/de/menu_save_outfit.xml +++ b/indra/newview/skins/default/xui/de/menu_save_outfit.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <toggleable_menu name="save_outfit_menu"> <menu_item_call label="Speichern" name="save_outfit"/> - <menu_item_call label="Als neue Datei speichern" name="save_as_new_outfit"/> + <menu_item_call label="Speichern unter" name="save_as_new_outfit"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index c416ebd7c1..38ef1b0421 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -7,10 +7,10 @@ </menu_item_call> <menu_item_call label="L$ kaufen" name="Buy and Sell L$"/> <menu_item_call label="Mein Profil" name="Profile"/> - <menu_item_call label="Mein Aussehen" name="Appearance"/> <menu_item_check label="Mein Inventar" name="Inventory"/> <menu_item_check label="Mein Inventar" name="ShowSidetrayInventory"/> <menu_item_check label="Meine Gesten" name="Gestures"/> + <menu_item_check label="Meine Stimme" name="ShowVoice"/> <menu label="Mein Status" name="Status"> <menu_item_call label="Abwesend" name="Set Away"/> <menu_item_call label="Beschäftigt" name="Set Busy"/> @@ -70,6 +70,12 @@ <menu_item_call label="Verknüpfung" name="Link"/> <menu_item_call label="Verknüpfung auflösen" name="Unlink"/> <menu_item_check label="Verknüpfte Teile bearbeiten" name="Edit Linked Parts"/> + <menu label="Verknüpfte Teile auswählen" name="Select Linked Parts"> + <menu_item_call label="Nächstes Teil auswählen" name="Select Next Part"/> + <menu_item_call label="Vorheriges Teil auswählen" name="Select Previous Part"/> + <menu_item_call label="Nächsten Teil mit einsschließen" name="Include Next Part"/> + <menu_item_call label="Vorherige Teile mit einschließen" name="Include Previous Part"/> + </menu> <menu_item_call label="Fokus auf Auswahl" name="Focus on Selection"/> <menu_item_call label="Auf Auswahl zoomen" name="Zoom to Selection"/> <menu label="Objekt" name="Object"> @@ -100,11 +106,11 @@ <menu_item_call label="Auswahl für Raster verwenden" name="Use Selection for Grid"/> <menu_item_call label="Rasteroptionen" name="Grid Options"/> </menu> - <menu label="Verknüpfte Teile auswählen" name="Select Linked Parts"> - <menu_item_call label="Nächstes Teil auswählen" name="Select Next Part"/> - <menu_item_call label="Vorheriges Teil auswählen" name="Select Previous Part"/> - <menu_item_call label="Nächsten Teil mit einsschließen" name="Include Next Part"/> - <menu_item_call label="Vorherige Teile mit einschließen" name="Include Previous Part"/> + <menu label="Hochladen" name="Upload"> + <menu_item_call label="Bild ([COST] L$)..." name="Upload Image"/> + <menu_item_call label="Sound ([COST] L$)..." name="Upload Sound"/> + <menu_item_call label="Animation ([COST] L$)..." name="Upload Animation"/> + <menu_item_call label="Mehrfach-Upload ([COST] L$ pro Datei)..." name="Bulk Upload"/> </menu> </menu> <menu label="Hilfe" name="Help"> @@ -189,7 +195,6 @@ <menu_item_call label="Hineinzoomen" name="Zoom In"/> <menu_item_call label="Zoom-Standard" name="Zoom Default"/> <menu_item_call label="Wegzoomen" name="Zoom Out"/> - <menu_item_call label="Vollbild" name="Toggle Fullscreen"/> </menu> <menu_item_call label="Debug-Einstellungen anzeigen" name="Debug Settings"/> <menu_item_check label="Menü „Entwickler“ anzeigen" name="Debug Mode"/> diff --git a/indra/newview/skins/default/xui/de/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/de/menu_wearable_list_item.xml new file mode 100644 index 0000000000..a4bf75a497 --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_wearable_list_item.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="Outfit Wearable Context Menu"> + <menu_item_call label="Anziehen" name="wear"/> + <menu_item_call label="Hinzufügen" name="wear_add"/> + <menu_item_call label="Ausziehen / Abnehmen" name="take_off_or_detach"/> + <menu_item_call label="Abnehmen" name="detach"/> + <context_menu label="Anhängen an ▶" name="wearable_attach_to"/> + <context_menu label="An HUD hängen ▶" name="wearable_attach_to_hud"/> + <menu_item_call label="Ausziehen" name="take_off"/> + <menu_item_call label="Bearbeiten" name="edit"/> + <menu_item_call label="Objektprofil" name="object_profile"/> + <menu_item_call label="Original anzeigen" name="show_original"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index aa1ee71c3f..408ece9690 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -479,7 +479,9 @@ Sie können die Grafikqualität unter Einstellungen > Grafik wieder erhöhen. Die Region [REGION] erlaubt kein Terraforming. </notification> <notification name="CannotCopyWarning"> - Sie sind nicht berechtigt, dieses Objekt zu kopieren und verlieren es aus Ihrem Inventar, wenn Sie es weggeben. Möchten Sie dieses Objekt anbieten? + Sie sind nicht berechtigt, die folgenden Objekte zu kopieren: +[ITEMS] +Wenn Sie diese weitergeben, werden sie aus Ihrem Inventar entfernt. Möchten Sie diese Objekte wirklich weggeben? <usetemplate name="okcancelbuttons" notext="Nein" yestext="Ja"/> </notification> <notification name="CannotGiveItem"> @@ -947,6 +949,26 @@ Sie sind nicht berechtigt, Land für die aktive Gruppe zu kaufen. <button name="Cancel" text="Abbrechen"/> </form> </notification> + <notification label="Kleidungstyp speichern" name="SaveWearableAs"> + Objekt in meinem Inventar speichern als: + <form name="form"> + <input name="message"> + [DESC] (neu) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Abbrechen"/> + </form> + </notification> + <notification label="Outfit neu benennen" name="RenameOutfit"> + Neuer Outfit-Name: + <form name="form"> + <input name="new_name"> + [NAME] + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Abbrechen"/> + </form> + </notification> <notification name="RemoveFromFriends"> Möchten Sie [FIRST_NAME] [LAST_NAME] aus Ihrer Freundesliste entfernen? <usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/> @@ -1522,9 +1544,9 @@ Möchten Sie unsere Knowledgebase besuchen, um mehr Informationen über Alterein Aufgrund Ihrer Alterseinstufung dürfen Sie diese Region nicht betreten. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Sie dürfen diese Region aufgrund der Einstellung Ihrer Alterseinstufung nicht betreten. + Sie dürfen diese Region aufgrund der Einstellung Ihrer Inhaltseinstufung nicht betreten. -Klicken Sie auf „Einstellung ändern“, um Ihre Einstellung für Altereinstufung sofort zu ändern und Zugang zu erhalten. Sie können ab sofort [REGIONMATURITY]-Inhalt suchen und auf diesen zugreifen. Falls Sie diese Einstellung später rückgängig machen möchten, gehen Sie zu Bearbeiten > Einstellungen > Allgemein. +Bitte ändern Sie Ihre Einstellungen bezüglich der Inhaltseinstufung, um die gewünschte Region zu betreten. Danach können Sie nach [REGIONMATURITY]-Inhalt suchen und auf diesen zugreifen. Um die Veränderungen rückgängig zu machen, gehen Sie zu Ich > Einstellungen > Allgemein. <form name="form"> <button name="OK" text="Einstellung ändern"/> <button name="Cancel" text="Schließen"/> @@ -2297,15 +2319,6 @@ Versuchen Sie es in einigen Minuten erneut. <button name="Mute" text="Ignorieren"/> </form> </notification> - <notification name="ObjectGiveItemUnknownUser"> - Ein Objekt namens [OBJECTFROMNAME] von (einem unbekannten Einwohner) hat Ihnen folgendes übergeben [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button name="Keep" text="Behalten"/> - <button name="Discard" text="Verwerfen"/> - <button name="Mute" text="Ignorieren"/> - </form> - </notification> <notification name="UserGiveItem"> [NAME_SLURL] hat Ihnen folgendes [OBJECTTYPE] übergeben: [ITEM_SLURL] @@ -2551,6 +2564,21 @@ Klicken Sie auf 'Akzeptieren ', um dem Chat beizutreten, oder auf &a <notification name="VoiceLoginRetry"> Wir erstellen einen Voice-Kanal für Sie. Bitte warten Sie einen Moment. </notification> + <notification name="VoiceEffectsExpired"> + Ein oder mehrere Ihrer Voice-Morph-Abos ist/sind abgelaufen. +[[URL] Hier klicken], um Ihr Abo zu erneuern. + </notification> + <notification name="VoiceEffectsExpiredInUse"> + Das aktive Voice-Morph-Abo ist abgelaufen. Ihre normalen Voice-Einstellungen werden angewendet. +[[URL] Hier klicken], um Ihr Abo zu erneuern. + </notification> + <notification name="VoiceEffectsWillExpire"> + Ein oder mehrere Ihrer Voice-Morph-Abos werden in weniger als [INTERVAL] Tagen ablaufen. +[[URL] Hier klicken], um Ihr Abo zu erneuern. + </notification> + <notification name="VoiceEffectsNew"> + Neue Voice-Morph-Effekte sind erhältlich! + </notification> <notification name="Cannot enter parcel: not a group member"> Nur Mitglieder einer bestimmten Gruppe dürfen diesen Bereich betreten. </notification> @@ -2617,10 +2645,58 @@ Diese werden für ein paar Sekunden sicherheitshalber gesperrt. Die Schaltfläche wird angezeigt, wenn genügend Platz vorhanden ist. </notification> <notification name="ShareNotification"> - Artikel aus Inventar auf eine Person im Fenster „Einwohner auswählen“ ziehen. + Wählen Sie Einwohner aus, für die Sie das Objekt freigeben möchten. + </notification> + <notification name="ShareItemsConfirmation"> + Möchten Sie diese Objekte wirklich für andere freigeben: + +[ITEMS] + +Für folgende Einwohner: + +[RESIDENTS] + <usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/> + </notification> + <notification name="ItemsShared"> + Objekte wurden erfolgreich freigegeben. </notification> <notification name="AvatarRezNotification"> - Avatar '[NAME]' wurde in [TIME] Sekunden gerezzt. + (Seit [EXISTENCE] Sekunden inworld ) +Avatar '[NAME]' wurde in [TIME] Sekunden gerezzt. + </notification> + <notification name="AvatarRezSelfBakedDoneNotification"> + (Seit [EXISTENCE] Sekunden inworld ) +Ihr Outfit wurde in [TIME] Sekunden gebacken. + </notification> + <notification name="AvatarRezSelfBakedUpdateNotification"> + (Seit [EXISTENCE] Sekunden inworld ) +Nach [TIME] Sekunden wurde eine Aktualisierung Ihres Aussehens gesendet. +[STATUS] + </notification> + <notification name="NoConnect"> + Es gibt Probleme mit der Verbindung mit [PROTOCOL] [HOSTID]. +Bitte überprüfen Sie Ihre Netzwerk- und Firewalleinstellungen. + <form name="form"> + <button name="OK" text="OK"/> + </form> + </notification> + <notification name="NoVoiceConnect"> + Verbindung mit Voice-Server ist leider nicht möglich: + +[HOSTID] + +Voice-Kommunikation ist leider nicht verfügbar. +Bitte überprüfen Sie Ihr Netzwerk- und Firewall-Setup. + <form name="form"> + <button name="OK" text="OK"/> + </form> + </notification> + <notification name="AvatarRezSelfBakeNotification"> + (Seit [EXISTENCE] Sekunden inworld ) +Die [RESOLUTION]-gebakene Textur für '[BODYREGION]' wurde in [TIME] Sekunden hochgeladen. + </notification> + <notification name="ConfirmMuteAll"> + <usetemplate ignoretext="Confirm before I mute all participants in a group call" name="okcancelignore" notext="Abbrechen" yestext="OK"/> </notification> <global name="UnsupportedCPU"> - Ihre CPU-Geschwindigkeit entspricht nicht den Mindestanforderungen. diff --git a/indra/newview/skins/default/xui/de/panel_bottomtray.xml b/indra/newview/skins/default/xui/de/panel_bottomtray.xml index d52b8dcf4d..83f67344ca 100644 --- a/indra/newview/skins/default/xui/de/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/de/panel_bottomtray.xml @@ -9,7 +9,7 @@ <layout_stack name="toolbar_stack"> <layout_panel name="speak_panel"> <talk_button name="talk"> - <speak_button label="Sprechen" label_selected="Sprechen" name="speak_btn" halign="right" /> + <speak_button label="Sprechen" label_selected="Sprechen" name="speak_btn" /> </talk_button> </layout_panel> <layout_panel name="gesture_panel"> diff --git a/indra/newview/skins/default/xui/de/panel_edit_shape.xml b/indra/newview/skins/default/xui/de/panel_edit_shape.xml index 393a586903..d04dba7a3b 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_shape.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shape_panel"> - <panel name="avatar_sex_panel"> - <text name="gender_text"> - Geschlecht: - </text> - <radio_group name="sex_radio"> - <radio_item label="weiblich" name="radio"/> - <radio_item label="Männlich" name="radio2"/> - </radio_group> - </panel> + <string name="meters"> + Meter + </string> + <string name="feet"> + Fuß + </string> + <string name="height"> + Höhe: + </string> <panel label="Hemd" name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="shape_body_tab" title="Körper"/> diff --git a/indra/newview/skins/default/xui/de/panel_edit_wearable.xml b/indra/newview/skins/default/xui/de/panel_edit_wearable.xml index 17a632b46e..7294a0b34f 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_wearable.xml @@ -72,7 +72,7 @@ <string name="jacket_desc_text"> Jacke: </string> - <string name="skirt_skirt_desc_text"> + <string name="skirt_desc_text"> Rock: </string> <string name="gloves_desc_text"> @@ -94,11 +94,6 @@ <panel label="Hemd" name="wearable_type_panel"> <text name="description_text" value="Form:"/> </panel> - <panel label="gear_buttom_panel" name="gear_buttom_panel"> - <button name="friends_viewsort_btn" tool_tip="Optionen"/> - <button name="add_btn" tool_tip="TODO"/> - <button name="del_btn" tool_tip="TODO"/> - </panel> <panel name="button_panel"> <button label="Speichern unter" name="save_as_button"/> <button label="Zurücksetzen" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/de/panel_landmark_info.xml b/indra/newview/skins/default/xui/de/panel_landmark_info.xml index 9cef7b6d35..10cf34c170 100644 --- a/indra/newview/skins/default/xui/de/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/de/panel_landmark_info.xml @@ -18,9 +18,6 @@ <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> <button name="back_btn" tool_tip="Hinten"/> <text name="title" value="Ortsprofil"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/de/panel_outfit_edit.xml b/indra/newview/skins/default/xui/de/panel_outfit_edit.xml index 5ff088d41c..91ba94b3d6 100644 --- a/indra/newview/skins/default/xui/de/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/de/panel_outfit_edit.xml @@ -11,7 +11,7 @@ <string name="Filter.All" value="Alle"/> <string name="Filter.Clothes/Body" value="Kleider/Körper"/> <string name="Filter.Objects" value="Objekte"/> - <button label="Bearbeiten" name="edit_wearable_btn"/> + <string name="Filter.Custom" value="Benutzerspezifischer Filter"/> <text name="title" value="Outfit bearbeiten"/> <panel label="bottom_panel" name="header_panel"> <panel label="bottom_panel" name="outfit_name_and_status"> @@ -21,25 +21,16 @@ </panel> <layout_stack name="im_panels"> <layout_panel label="IM Steuerkonsole" name="outfit_wearables_panel"> - <scroll_list name="look_items_list"> - <scroll_list.columns label="Look-Artikel" name="look_item"/> - <scroll_list.columns label="Outfit-Artikel sortieren" name="look_item_sort"/> - </scroll_list> - <panel label="bottom_panel" name="edit_panel"/> - </layout_panel> - <layout_panel name="add_wearables_panel"> - <filter_editor label="Filter" name="look_item_filter"/> <layout_stack name="filter_panels"> - <layout_panel label="IM Steuerkonsole" name="filter_button_panel"> - <text name="add_to_outfit_label" value="Zum Outfit hinzufügen:"/> - <button label="O" name="filter_button"/> + <layout_panel name="add_button_and_combobox"> + <button label="Mehr hinzufügen" name="show_add_wearables_btn"/> + </layout_panel> + <layout_panel name="filter_panel"> + <filter_editor label="Tragbare Inventarobjekte filtern" name="look_item_filter"/> </layout_panel> </layout_stack> - <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> - <button label="O" name="folder_view_btn"/> - <button label="L" name="list_view_btn"/> - </panel> </layout_panel> + <layout_panel name="add_wearables_panel"/> </layout_stack> <panel name="save_revert_button_bar"> <button label="Speichern" name="save_btn"/> diff --git a/indra/newview/skins/default/xui/de/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/de/panel_outfits_inventory.xml index f695d67d1b..8b04cecd68 100644 --- a/indra/newview/skins/default/xui/de/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/de/panel_outfits_inventory.xml @@ -7,8 +7,7 @@ <panel name="bottom_panel"> <button name="options_gear_btn" tool_tip="Zusätzliche Optionen anzeigen"/> <dnd_button name="trash_btn" tool_tip="Auswahl löschen"/> - <button label="Outfit speichern" name="make_outfit_btn" tool_tip="Aussehen als Outfit speichern"/> + <button label="Speichern unter" name="save_btn"/> <button label="Anziehen" name="wear_btn" tool_tip="Ausgewähltes Outfit tragen"/> - <button label="Outfit bearbeiten" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_place_profile.xml b/indra/newview/skins/default/xui/de/panel_place_profile.xml index ed1421aa60..9d1a582b7c 100644 --- a/indra/newview/skins/default/xui/de/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/de/panel_place_profile.xml @@ -41,21 +41,6 @@ <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> - <string name="icon_Voice" value="parcel_drk_Voice"/> - <string name="icon_VoiceNo" value="parcel_drk_VoiceNo"/> - <string name="icon_Fly" value="parcel_drk_Fly"/> - <string name="icon_FlyNo" value="parcel_drk_FlyNo"/> - <string name="icon_Push" value="parcel_drk_Push"/> - <string name="icon_PushNo" value="parcel_drk_PushNo"/> - <string name="icon_Build" value="parcel_drk_Build"/> - <string name="icon_BuildNo" value="parcel_drk_BuildNo"/> - <string name="icon_Scripts" value="parcel_drk_Scripts"/> - <string name="icon_ScriptsNo" value="parcel_drk_ScriptsNo"/> - <string name="icon_Damage" value="parcel_drk_Damage"/> - <string name="icon_DamageNo" value="parcel_drk_DamageNo"/> <button name="back_btn" tool_tip="Hinten"/> <text name="title" value="Ortsprofil"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/de/panel_places.xml b/indra/newview/skins/default/xui/de/panel_places.xml index 37ccdbeb7d..bd5c1c8ffe 100644 --- a/indra/newview/skins/default/xui/de/panel_places.xml +++ b/indra/newview/skins/default/xui/de/panel_places.xml @@ -5,12 +5,12 @@ <filter_editor label="Meine Orte filtern" name="Filter"/> <panel name="button_panel"> <button label="Teleportieren" name="teleport_btn" tool_tip="Zu ausgewähltem Standort teleportieren"/> - <button label="Karte" name="map_btn" width="60"/> + <button label="Karte" name="map_btn" tool_tip="Den entsprechenden Standort auf der Karte anzeigen" width="60"/> <button label="Bearbeiten" name="edit_btn" tool_tip="Landmarken-Info bearbeiten"/> <button label="▼" name="overflow_btn" tool_tip="Zusätzliche Optionen anzeigen"/> <button label="Speichern" name="save_btn" width="66"/> <button label="Abbrechen" name="cancel_btn" width="66"/> <button label="Schließen" name="close_btn"/> - <button label="Profil" name="profile_btn"/> + <button label="Profil" name="profile_btn" tool_tip="Ortsprofil anzeigen"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml index f9d5c93dc0..52e616a402 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml @@ -13,6 +13,7 @@ </text> <check_box label="Bauen/Bearbeiten" name="edit_camera_movement" tool_tip="Automatische Kamerapositionierung bei Wechsel in und aus dem Bearbeitungsmodus verwenden"/> <check_box label="Aussehen" name="appearance_camera_movement" tool_tip="Automatische Kamerapositionierung im Bearbeitenmodus verwenden"/> + <check_box initial_value="true" label="Sidebar" name="appearance_sidebar_positioning" tool_tip="Use automatic camera positioning for sidebar"/> <check_box label="Mich im Mouselook anzeigen" name="first_person_avatar_visible"/> <check_box label="Mit Pfeiltasten bewegen" name="arrow_keys_move_avatar_check"/> <check_box label="2-mal-drücken-halten, um zu rennen" name="tap_tap_hold_to_run"/> diff --git a/indra/newview/skins/default/xui/de/panel_status_bar.xml b/indra/newview/skins/default/xui/de/panel_status_bar.xml index 3dc6997320..005290c1ff 100644 --- a/indra/newview/skins/default/xui/de/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/de/panel_status_bar.xml @@ -21,8 +21,10 @@ <panel.string name="buycurrencylabel"> [AMT] L$ </panel.string> - <button label="" label_selected="" name="buycurrency" tool_tip="Mein Kontostand"/> - <button label="L$ kaufen" name="buyL" tool_tip="Hier klicken, um mehr L$ zu kaufen"/> + <panel name="balance_bg"> + <text name="balance" tool_tip="Mein Kontostand" value="20 L$"/> + <button label="L$ kaufen" name="buyL" tool_tip="Hier klicken, um mehr L$ zu kaufen"/> + </panel> <text name="TimeText" tool_tip="Aktuelle Zeit (Pazifik)"> 24:00 H PST </text> diff --git a/indra/newview/skins/default/xui/de/panel_voice_effect.xml b/indra/newview/skins/default/xui/de/panel_voice_effect.xml new file mode 100644 index 0000000000..363ee013e3 --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_voice_effect.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_voice_effect"> + <string name="no_voice_effect"> + Kein Voice-Morphing + </string> + <string name="preview_voice_effects"> + Voice-Morphing ausprobieren ▶ + </string> + <string name="get_voice_effects"> + Voice-Morphing abonnieren ▶ + </string> + <combo_box name="voice_effect" tool_tip="Wählen Sie einen Voice-Morph-Effekt aus, um Ihre Stimme zu verändern."> + <combo_box.item label="Kein Voice-Morphing" name="no_voice_effect"/> + </combo_box> +</panel> diff --git a/indra/newview/skins/default/xui/de/sidepanel_inventory.xml b/indra/newview/skins/default/xui/de/sidepanel_inventory.xml index 26bde94ffd..96dd181854 100644 --- a/indra/newview/skins/default/xui/de/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/de/sidepanel_inventory.xml @@ -2,11 +2,12 @@ <panel label="Sonstiges" name="objects panel"> <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> - <button label="Profil" name="info_btn"/> - <button label="Teilen" name="share_btn"/> - <button label="Anziehen" name="wear_btn"/> + <button label="Profil" name="info_btn" tool_tip="Objektprofil anzeigen"/> + <button label="Teilen" name="share_btn" tool_tip="Inventarobjekt teilen"/> + <button label="Shop" name="shop_btn" tool_tip="Marktplatz-Webseite öffnen"/> + <button label="Anziehen" name="wear_btn" tool_tip="Ausgewähltes Outfit tragen"/> <button label="Wiedergeben" name="play_btn"/> - <button label="Teleportieren" name="teleport_btn"/> + <button label="Teleportieren" name="teleport_btn" tool_tip="Zu ausgewähltem Standort teleportieren"/> </panel> </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 03c858c880..bc4f20df26 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -100,6 +100,12 @@ <string name="LoginDownloadingClothing"> Kleidung wird geladen... </string> + <string name="CertExpired"> + Das vom Grid ausgegebene Zertifikate ist abgelaufen. Bitte überprüfen Sie Ihre Systemuhr oder kontaktieren Sie Ihren Grid-Administrator. + </string> + <string name="CertInvalidSignature"> + Die Zertifikatsunterschrift des Gridservers konnte nicht bestätigt werden. Bitte kontaktieren Sie Ihren Grid-Administrator. + </string> <string name="LoginFailedNoNetwork"> Netzwerk Fehler: Eine Verbindung konnte nicht hergestellt werden. Bitte überprüfen Sie Ihre Netzwerkverbindung. </string> @@ -735,6 +741,12 @@ <string name="land_type_unknown"> (unbekannt) </string> + <string name="Estate / Full Region"> + Grundstück / Vollständige Region + </string> + <string name="Mainland / Full Region"> + Mainland / Vollständige Region + </string> <string name="all_files"> Alle Dateien </string> @@ -843,6 +855,9 @@ <string name="NewWearable"> Neue/r/s [WEARABLE_ITEM] </string> + <string name="CreateNewWearable"> + [WEARABLE_TYPE] erstellen + </string> <string name="next"> Weiter </string> @@ -3390,12 +3405,6 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ <string name="answered_call"> Ihr Anruf wurde entgegengenommen </string> - <string name="started_call"> - haben/hat einen Anruf initiiert - </string> - <string name="joined_call"> - ist dem Gespräch beigetreten - </string> <string name="ringing-im"> Verbindung wird hergestellt... </string> @@ -3486,6 +3495,9 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ <string name="session_initialization_timed_out_error"> Die Initialisierung der Sitzung ist fehlgeschlagen </string> + <string name="voice_morphing_url"> + http://secondlife.com/landing/voicemorphing + </string> <string name="paid_you_ldollars"> [NAME] hat Ihnen [AMOUNT] L$ bezahlt. </string> @@ -3605,6 +3617,18 @@ Missbrauchsbericht <string name="Contents"> Inhalt </string> + <string name="Female - Excuse me"> + Weiblich - Räuspern + </string> + <string name="Female - Get lost"> + Weiblich - Get lost + </string> + <string name="Female - Blow kiss"> + Weiblich - Kusshand + </string> + <string name="Female - Boo"> + Weiblich - Buh + </string> <string name="AvatarBirthDateFormat"> [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] </string> @@ -3614,4 +3638,32 @@ Missbrauchsbericht <string name="texture_load_dimensions_error"> Bilder, die größer sind als [WIDTH]*[HEIGHT] können nicht geladen werden </string> + <string name="words_separator" value=","/> + <string name="server_is_down"> + Trotz all unserer Bemühungen ist ein unerwarteter Fehler aufgetreten. + + Bitte überprüfen Sie status.secondlifegrid.net, um festzustellen, ob ein Problem besteht. + Falls Sie weiterhin Problem haben, überprüfen Sie bitte Ihre Netzwerk- und Firewalleinstellungen. + </string> + <string name="dateTimeWeekdaysNames"> + Sonntag:Montag:Dienstag:Mittwoch:Donnerstag:Freitag:Samstag + </string> + <string name="dateTimeWeekdaysShortNames"> + So:Mo:Di:Mi:Do:Fr:Sa + </string> + <string name="dateTimeMonthNames"> + Januar:Februar:März:April:Mai:Juni:Juli:August:September:Oktober:November:Dezember + </string> + <string name="dateTimeMonthShortNames"> + Jan:Feb:Mär:Apr:Mai:Jun:Jul:Aug:Sep:Okt:Nov:Dez + </string> + <string name="dateTimeDayFormat"> + [MDAY] + </string> + <string name="dateTimeAM"> + Uhr + </string> + <string name="dateTimePM"> + Uhr + </string> </strings> diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 914268a9d2..33e89d52de 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -826,7 +826,7 @@ Leyla Linden </text> name="Simulator primitive usage:" top_pad="4" width="364"> - Primative usage: + Primitive usage: </text> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml index 4643f66bd8..4b990fa566 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml @@ -1,27 +1,27 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater - legacy_header_height="18" can_resize="false" - height="280" + can_close="true" + width="422" + height="202" layout="topleft" - min_height="280" - min_width="450" name="floater_buy_currency_html" help_topic="floater_buy_currency_html" save_rect="true" single_instance="true" title="BUY CURRENCY" - width="452"> - <floater.string - name="buy_currency_url" translate="false"> - https://quick-buy-www.jeff.ooze.lindenlab.com/en/display - </floater.string> - <web_browser - bottom="278" - follows="left|right|top|bottom" - layout="topleft" - left="2" - name="browser" - top="18" - width="450" /> +> + <floater.string + name="buy_currency_url" translate="false"> + https://quick-buy.secondlife.com/[LANGUAGE]/display/?sa=[SPECIFIC_AMOUNT]&sum=[SUM]&msg=[MSG]&bal=[BAL] + </floater.string> + <web_browser + follows="all" + layout="topleft" + left="1" + right="-1" + top="1" + bottom="-1" + ignore_ui_scale="false" + name="browser"/> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index d8a929eee2..3b4cf2c0b7 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -174,12 +174,15 @@ supports [AMOUNT2] objects </floater.string> <floater.string name="icon_PG" + translate="false" value="Parcel_PG_Dark"/> <floater.string name="icon_M" + translate="false" value="Parcel_M_Dark"/> <floater.string name="icon_R" + translate="false" value="Parcel_R_Dark"/> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_critical.xml b/indra/newview/skins/default/xui/en/floater_critical.xml index 7b5451553f..05c958e051 100644 --- a/indra/newview/skins/default/xui/en/floater_critical.xml +++ b/indra/newview/skins/default/xui/en/floater_critical.xml @@ -6,6 +6,7 @@ height="500" layout="topleft" name="modal container" + open_centered="true" width="600"> <button height="20" @@ -16,15 +17,6 @@ name="Continue" top="465" width="100" /> - <button - height="20" - label="Cancel" - label_selected="Cancel" - layout="topleft" - left_delta="-468" - name="Cancel" - top_delta="0" - width="100" /> <text type="string" length="1" @@ -32,9 +24,9 @@ font="SansSerif" height="20" layout="topleft" - left_delta="4" + left="20" name="tos_heading" - top_delta="-450" + top="20" width="552"> Please read the following message carefully. </text> 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 f537c81860..c9b013099b 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -33,7 +33,6 @@ name="panel_im_control_panel" layout="topleft" follows="left" - label="IM Control Panel" min_width="115" auto_resize="false" user_resize="true" /> diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml index 70dac7e41c..c02d607586 100644 --- a/indra/newview/skins/default/xui/en/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml @@ -182,7 +182,7 @@ </button> </layout_panel> <layout_panel - height="20" + height="40" layout="topleft" left_delta="0" name="external_controls" @@ -190,7 +190,7 @@ user_resize="false" width="540"> <web_browser - bottom="-10" + bottom="-30" follows="left|right|top|bottom" layout="topleft" left="0" @@ -206,9 +206,9 @@ name="open_browser" top_pad="5" width="185"> - <button.commit_callback - function="MediaBrowser.OpenWebBrowser" /> - </button> + <button.commit_callback + function="MediaBrowser.OpenWebBrowser" /> + </button> <check_box control_name="UseExternalBrowser" follows="bottom|left" diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index f766fe5a5d..6281bc5272 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -39,28 +39,6 @@ name="Title"> Gesture: [NAME] </floater.string> - <text - type="string" - length="1" - follows="top|left" - font="SansSerifSmall" - height="10" - layout="topleft" - left="10" - name="name_text" - top="20" - font.style="BOLD" - width="100"> - Name: - </text> - <line_editor - follows="left|top" - height="20" - layout="topleft" - left_delta="84" - name="name" - top_delta="-4" - width="180" /> <text type="string" length="1" @@ -70,7 +48,7 @@ layout="topleft" left="10" name="desc_label" - top_pad="10" + top_pad="25" font.style="BOLD" width="100"> Description: @@ -79,10 +57,10 @@ follows="left|top" height="20" layout="topleft" - left_delta="84" + left_delta="89" name="desc" top_delta="-4" - width="180" /> + width="175" /> <text type="string" length="1" @@ -101,11 +79,11 @@ follows="left|top" height="20" layout="topleft" - left_delta="84" + left_delta="89" max_length="31" name="trigger_editor" top_delta="-4" - width="180" /> + width="175" /> <text type="string" length="1" @@ -125,12 +103,12 @@ follows="left|top" height="20" layout="topleft" - left_delta="84" + left_delta="89" max_length="31" name="replace_editor" tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture" top_delta="-4" - width="180" /> + width="175" /> <text type="string" length="1" @@ -149,7 +127,7 @@ height="20" label="None" layout="topleft" - left_delta="84" + left_delta="89" name="modifier_combo" top_delta="-4" width="75" /> @@ -171,7 +149,7 @@ left="10" font.style="BOLD" name="library_label" - top="135" + top_delta="25" width="100"> Library: </text> @@ -181,7 +159,7 @@ layout="topleft" left="10" name="library_list" - top="150" + top_delta="15" width="180"> <scroll_list.rows value="Animation" /> @@ -199,7 +177,7 @@ layout="topleft" left_pad="10" name="add_btn" - top_delta="0" + top_delta="-1" width="70" /> <text type="string" @@ -230,7 +208,7 @@ layout="topleft" left_pad="10" name="up_btn" - top_delta="0" + top_delta="-1" width="70" /> <button follows="top|left" @@ -256,23 +234,25 @@ layout="topleft" left="15" name="options_text" - top="330" - width="205" /> + top="315" + width="205"> + (options) + </text> <combo_box follows="top|left" height="20" layout="topleft" left_delta="15" name="animation_list" - top="345" - width="100" /> + top="330" + width="100"/> <combo_box follows="top|left" height="20" layout="topleft" left_delta="0" name="sound_list" - top_delta="0" + top="330" width="100" /> <line_editor follows="top|left" @@ -281,7 +261,7 @@ left_delta="0" max_length="127" name="chat_editor" - top_delta="0" + top="330" width="100" /> <radio_group draw_border="false" @@ -290,7 +270,7 @@ layout="topleft" left_pad="8" name="animation_trigger_type" - top_delta="0" + top="330" width="80"> <radio_item height="16" @@ -298,7 +278,7 @@ layout="topleft" left="3" name="start" - top="-51" + top_delta="45" width="80" /> <radio_item height="16" @@ -306,7 +286,7 @@ layout="topleft" left_delta="0" name="stop" - top_pad="10" + top_pad="3" width="80" /> </radio_group> <check_box @@ -314,14 +294,14 @@ height="20" label="until animations are done" layout="topleft" - left="16" + left="28" name="wait_anim_check" - top="340" + top="330" width="100" /> <check_box follows="top|left" height="20" - label="time in seconds" + label="time in seconds:" layout="topleft" left_delta="0" name="wait_time_check" @@ -331,10 +311,10 @@ follows="top|left" height="20" layout="topleft" - left_pad="5" + left_pad="10" max_length="15" name="wait_time_editor" - top_delta="0" + top_delta="1" width="50" /> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml index e94af2c8d5..d1db5c17ba 100644 --- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml +++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml @@ -18,6 +18,7 @@ max_length="2147483647" name="Chat History Editor" parse_highlights="true" + read_only="true" width="420" word_wrap="true" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index f3d297c303..452b2ac664 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -1,128 +1,399 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - can_minimize="true" - can_close="false" + can_minimize="false" + can_close="true" follows="left|top" - height="340" + height="516" layout="topleft" name="Snapshot" help_topic="snapshot" save_rect="true" save_visibility="true" - can_dock="true" - title="Snapshot" - width="250"> - <floater.string - name="unknown"> - unknown - </floater.string> - <floater.string - name="share_to_web_url" translate="false"> - http://pdp36.lindenlab.com:12777/ - </floater.string> - <view - height="160" - width="230" + title="SNAPSHOT PREVIEW" + width="215"> + <floater.string + name="share_to_web_url" translate="false"> +http://pdp36.lindenlab.com:12777/ + </floater.string> + <floater.string + name="unknown"> + unknown + </floater.string> + <radio_group + height="58" + label="Snapshot type" + layout="topleft" + left="10" + name="snapshot_type_radio" + top="25" + width="205"> + <radio_item + bottom="19" + height="16" + label="Email" + layout="topleft" + name="postcard" /> + <radio_item + bottom="38" + height="16" + label="My inventory (L$[AMOUNT])" + layout="topleft" + name="texture" /> + <radio_item + bottom="57" + height="16" + label="Save to my computer" + layout="topleft" + name="local" /> + </radio_group> + <ui_ctrl + height="90" + width="125" layout="topleft" name="thumbnail_placeholder" - top_pad="30" + top_pad="6" follows="left|top" left="10" /> - <button - follows="left|top" - height="22" - image_overlay="Refresh_Off" - layout="topleft" - left="20" - top_pad="-30" - name="new_snapshot_btn" - width="23" /> - <line_editor - border_style="line" - border_thickness="1" - follows="left|top" - height="20" - layout="topleft" - left="10" - max_length="500" - name="description" - top_pad="15" - width="230" - label="Description"/> - <button - label="Share Snapshot" - name="share" - top_pad="20" - left="10" - width="130"/> - <button - label="Share to Web" - name="share_to_web" - top_delta="0" - left="10" - visible="false" - width="130"/> - <button - label="Save to My Inventory" - name="save_to_inventory" - top_delta="0" - left="10" - width="130"/> - <button - label="Save Snapshot" - name="save" - top_pad="7" - left="10" - width="130"/> - <button - label="Email Snapshot" - name="share_to_email" - top_delta="0" - left="10" - width="130"/> - <button - label="Save to My Computer" - name="save_to_computer" - top_delta="0" - left="10" - width="130"/> - <button - label="Set As Profile Pic" - name="set_profile_pic" - top_pad="7" - left="10" - width="130"/> - <button - label="Back" - name="cancel" - top_delta="0" - left="10" - width="130"/> - <button - follows="left" - height="22" + <text + type="string" + font="SansSerifSmall" + length="1" + follows="left|top" + height="14" layout="topleft" - left="210" - name="show_advanced" - image_overlay="TabIcon_Close_Off" - top_delta="1" - width="30"/> - <button - follows="left" + right="-5" + left_delta="0" + halign="right" + name="file_size_label" + top_pad="10" + width="195"> + [SIZE] KB + </text> + <button + follows="left|top" height="22" + image_overlay="Refresh_Off" + layout="topleft" + left="10" + name="new_snapshot_btn" + width="23" /> + <button + follows="left|top" + height="23" + label="Send" + layout="topleft" + left_pad="5" + right="-5" + name="send_btn" + width="100" /> + <button + follows="left|top" + height="23" + label="Save (L$[AMOUNT])" + layout="topleft" + right="-5" + name="upload_btn" + top_delta="0" + width="100" /> + <flyout_button + follows="left|top" + height="23" + label="Save" + layout="topleft" + right="-5" + name="save_btn" + tool_tip="Save image to a file" + top_delta="0" + width="100"> + <flyout_button.item + label="Save" + name="save_item" + value="save" /> + <flyout_button.item + label="Save As..." + name="saveas_item" + value="save as" /> + </flyout_button> + <button + follows="left|top" + height="23" + label="More" + layout="topleft" + left="10" + name="more_btn" + tool_tip="Advanced options" + width="80" /> + <button + follows="left|top" + height="23" + label="Less" + layout="topleft" + left_delta="0" + name="less_btn" + tool_tip="Advanced options" + top_delta="0" + width="80" /> + <button + follows="left|top" + height="23" + label="Cancel" + layout="topleft" + right="-5" + left_pad="5" + name="discard_btn" + width="100" /> + <text + type="string" + length="1" + follows="top|left" + height="12" + layout="topleft" + left="10" + name="type_label2" + top_pad="5" + width="127"> + Size + </text> + <text + type="string" + length="1" + follows="top|left" + height="12" + layout="topleft" + left_pad="5" + name="format_label" + top_delta="0" + width="70"> + Format + </text> + <combo_box + height="23" + label="Resolution" + layout="topleft" + left="10" + name="postcard_size_combo" + width="120"> + <combo_box.item + label="Current Window" + name="CurrentWindow" + value="[i0,i0]" /> + <combo_box.item + label="640x480" + name="640x480" + value="[i640,i480]" /> + <combo_box.item + label="800x600" + name="800x600" + value="[i800,i600]" /> + <combo_box.item + label="1024x768" + name="1024x768" + value="[i1024,i768]" /> + <combo_box.item + label="Custom" + name="Custom" + value="[i-1,i-1]" /> + </combo_box> + <combo_box + height="23" + label="Resolution" layout="topleft" - left="210" - visible="false" - name="hide_advanced" - image_overlay="TabIcon_Open_Off" + left_delta="0" + name="texture_size_combo" top_delta="0" - width="30"/> - <panel - visible="false" - left="250" - top="17" - name="snapshot_advanced" - filename="panel_snapshot_advanced.xml"/> + width="127"> + <combo_box.item + label="Current Window" + name="CurrentWindow" + value="[i0,i0]" /> + <combo_box.item + label="Small (128x128)" + name="Small(128x128)" + value="[i128,i128]" /> + <combo_box.item + label="Medium (256x256)" + name="Medium(256x256)" + value="[i256,i256]" /> + <combo_box.item + label="Large (512x512)" + name="Large(512x512)" + value="[i512,i512]" /> + <combo_box.item + label="Custom" + name="Custom" + value="[i-1,i-1]" /> + </combo_box> + <combo_box + height="23" + label="Resolution" + layout="topleft" + left_delta="0" + name="local_size_combo" + top_delta="0" + width="127"> + <combo_box.item + label="Current Window" + name="CurrentWindow" + value="[i0,i0]" /> + <combo_box.item + label="320x240" + name="320x240" + value="[i320,i240]" /> + <combo_box.item + label="640x480" + name="640x480" + value="[i640,i480]" /> + <combo_box.item + label="800x600" + name="800x600" + value="[i800,i600]" /> + <combo_box.item + label="1024x768" + name="1024x768" + value="[i1024,i768]" /> + <combo_box.item + label="1280x1024" + name="1280x1024" + value="[i1280,i1024]" /> + <combo_box.item + label="1600x1200" + name="1600x1200" + value="[i1600,i1200]" /> + <combo_box.item + label="Custom" + name="Custom" + value="[i-1,i-1]" /> + </combo_box> + <combo_box + height="23" + label="Format" + layout="topleft" + left_pad="5" + name="local_format_combo" + width="70"> + <combo_box.item + label="PNG" + name="PNG" /> + <combo_box.item + label="JPEG" + name="JPEG" /> + <combo_box.item + label="BMP" + name="BMP" /> + </combo_box> + <spinner + allow_text_entry="false" + decimal_digits="0" + follows="left|top" + height="20" + increment="32" + label="Width" + label_width="40" + layout="topleft" + left="10" + max_val="6016" + min_val="32" + name="snapshot_width" + top_pad="10" + width="95" /> + <spinner + allow_text_entry="false" + decimal_digits="0" + follows="left|top" + height="20" + increment="32" + label="Height" + label_width="40" + layout="topleft" + left_pad="5" + max_val="6016" + min_val="32" + name="snapshot_height" + top_delta="0" + width="95" /> + <check_box + bottom_delta="20" + label="Constrain proportions" + layout="topleft" + left="10" + name="keep_aspect_check" /> + <slider + decimal_digits="0" + follows="left|top" + height="15" + increment="1" + initial_value="75" + label="Image quality" + label_width="100" + layout="topleft" + left_delta="0" + max_val="100" + name="image_quality_slider" + top_pad="5" + width="205" /> + <text + type="string" + length="1" + follows="left|top" + height="13" + layout="topleft" + left="10" + name="layer_type_label" + top_pad="5" + width="50"> + Capture: + </text> + <combo_box + height="23" + label="Image Layers" + layout="topleft" + left="30" + name="layer_types" + width="145"> + <combo_box.item + label="Colors" + name="Colors" + value="colors" /> + <combo_box.item + label="Depth" + name="Depth" + value="depth" /> + </combo_box> + <check_box + label="Interface" + layout="topleft" + left="30" + top_pad="10" + width="180" + name="ui_check" /> + <check_box + label="HUDs" + layout="topleft" + left="30" + top_pad="10" + width="180" + name="hud_check" /> + <check_box + label="Keep open after saving" + layout="topleft" + left="10" + top_pad="8" + width="180" + name="keep_open_check" /> + <check_box + label="Freeze frame (fullscreen)" + layout="topleft" + left="10" + top_pad="8" + width="180" + name="freeze_frame_check" /> + <check_box + label="Auto-refresh" + layout="topleft" + left="10" + top_pad="8" + width="180" + name="auto_snapshot_check" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 5b77f11d71..bf5bd87ad6 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -3,7 +3,7 @@ can_resize="true" can_minimize="true" can_close="false" - height="202" + height="205" layout="topleft" min_height="124" min_width="190" @@ -47,10 +47,10 @@ width="263"> <layout_panel follows="top|left|right" - user_resize="false" - auto_resize="false" + user_resize="false" + auto_resize="false" layout="topleft" - height="26" + height="20" name="my_panel"> <avatar_icon enabled="false" @@ -86,29 +86,44 @@ visible="true" width="20" /> </layout_panel> - <layout_panel - auto_resize="false" - user_resize="false" - follows="top|left" - height="26" - visible="true" - layout="topleft" - name="leave_call_btn_panel" - width="100"> - <button - follows="right|top" - height="23" - top_pad="0" - label="Leave Call" - name="leave_call_btn" - width="100" /> - </layout_panel> + <layout_stack + clip="true" + auto_resize="false" + follows="left|top|right" + height="26" + layout="topleft" + mouse_opaque="false" + name="voice_effect_and_leave_call_stack" + orientation="horizontal" + width="262"> + <panel + class="panel_voice_effect" + name="panel_voice_effect" + visiblity_control="VoiceMorphingEnabled" + filename="panel_voice_effect.xml" /> + <layout_panel + auto_resize="false" + user_resize="false" + follows="top|right" + height="23" + visible="true" + layout="topleft" + name="leave_call_btn_panel" + width="100"> + <button + follows="right|top" + height="23" + label="Leave Call" + name="leave_call_btn" + width="100" /> + </layout_panel> + </layout_stack> <layout_panel follows="all" layout="topleft" left="2" top_pad="0" - height="132" + height="132" name="callers_panel" user_resize="false" width="280"> diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml new file mode 100644 index 0000000000..9bf9cc6c77 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="27" + can_resize="true" + height="500" + name="voice_effects" + help_topic="voice_effects" + title="VOICE MORPHING" + background_visible="true" + follows="all" + label="Places" + layout="topleft" + min_height="360" + min_width="200" + width="300"> + <string name="no_voice_effect"> + (No Voice Morph) + </string> + <string name="active_voice_effect"> + (Active) + </string> + <string name="unsubscribed_voice_effect"> + (Unsubscribed) + </string> + <string name="new_voice_effect"> + (New!) + </string> + <text + height="16" + word_wrap="true" + use_ellipses="true" + type="string" + follows="left|top|right" + layout="topleft" + font="SansSerifBold" + color="White" + left="10" + name="preview_text" + right="-10" + top="27">To Preview + </text> + <text + height="23" + word_wrap="true" + use_ellipses="true" + type="string" + follows="left|top|right" + layout="topleft" + left="10" + name="status_text" + right="-5" + top_pad="0"> +Record a sample, then click on a voice to hear how it will sound. + </text> + <button + follows="left|top" + height="23" + label="Record" + layout="topleft" + left="10" + name="record_btn" + tool_tip="Record a sample of your voice." + top_pad="5" + width="100"> + <button.commit_callback + function="VoiceEffect.Record" /> + </button> + <button + follows="left|top" + height="23" + label="Stop" + layout="topleft" + left_delta="0" + name="record_stop_btn" + top_delta="0" + width="100"> + <button.commit_callback + function="VoiceEffect.Stop" /> + </button> + <text + height="23" + halign="right" + use_ellipses="true" + type="string" + follows="left|top|right" + layout="topleft" + left_pad="10" + top_delta="10" + name="voice_morphing_link" + right="-10"> + [[URL] Subscribe Now] + </text> + <scroll_list + bottom="-10" + draw_heading="true" + follows="all" + layout="topleft" + left="10" + multi_select="false" + name="voice_effect_list" + right="-10" + tool_tip="Record a sample of your voice, then click an effect to preview." + top="95"> + <scroll_list.columns + label="Voice Name" + name="name" + relative_width="0.60" /> + <scroll_list.columns + dynamic_width="true" + label="Expires" + name="expires" + relative_width="0.30" /> + </scroll_list> + +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index ad40cafe61..ece406f9b1 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -178,16 +178,16 @@ width="90"> Land Sale </text> - <icon - color="1 1 0.25 1" + <icon + color="0.5 0.25 1 1" follows="top|right" height="16" image_name="legend.tga" layout="topleft" mouse_opaque="true" name="square2" - left="41" - top_pad="-2" + left="20" + top_pad="2" width="16" /> <text type="string" @@ -196,21 +196,21 @@ height="16" layout="topleft" left_pad="0" - name="by_owner_label" + name="auction_label" top_delta="3" - width="100"> - by owner + width="170"> + land auction </text> - <icon - color="0.5 0.25 1 1" + <icon + color="1 1 0.25 1" follows="top|right" height="16" image_name="legend.tga" layout="topleft" mouse_opaque="true" name="square2" - left="41" - top_pad="-3" + left="20" + top_pad="-5" width="16" /> <text type="string" @@ -219,10 +219,10 @@ height="16" layout="topleft" left_pad="0" - name="auction_label" + name="by_owner_label" top_delta="3" - width="170"> - land auction + width="100"> + by owner </text> <button diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index d8410a26dd..72ab6195bc 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -73,6 +73,17 @@ mouse_opaque="false" name="hud container" width="500"> + <panel auto_resize="false" + follows="left|top" + height="19" + left="0" + mouse_opaque="false" + name="topinfo_bar_container" + tab_stop="false" + top="0" + user_resize="false" + visible="false" + width="1024"/> <panel follows="right|top|bottom" height="500" mouse_opaque="false" diff --git a/indra/newview/skins/default/xui/en/menu_hide_navbar.xml b/indra/newview/skins/default/xui/en/menu_hide_navbar.xml index a175b3103f..3f38d734b9 100644 --- a/indra/newview/skins/default/xui/en/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/en/menu_hide_navbar.xml @@ -12,10 +12,10 @@ label="Show Navigation Bar" layout="topleft" name="ShowNavbarNavigationPanel"> - <menu_item_check.on_click + <on_click function="ToggleControl" parameter="ShowNavbarNavigationPanel" /> - <menu_item_check.on_check + <on_check function="CheckControl" parameter="ShowNavbarNavigationPanel" /> </menu_item_check> @@ -23,11 +23,22 @@ label="Show Favorites Bar" layout="topleft" name="ShowNavbarFavoritesPanel"> - <menu_item_check.on_click + <on_click function="ToggleControl" parameter="ShowNavbarFavoritesPanel" /> - <menu_item_check.on_check + <on_check function="CheckControl" parameter="ShowNavbarFavoritesPanel" /> </menu_item_check> + <menu_item_check + label="Show Mini-Location Bar" + layout="topleft" + name="ShowMiniLocationPanel"> + <on_click + function="ToggleControl" + parameter="ShowMiniLocationPanel" /> + <on_check + function="CheckControl" + parameter="ShowMiniLocationPanel" /> + </menu_item_check> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 11459ad0e6..221457ac1f 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -662,6 +662,14 @@ parameter="wear" /> </menu_item_call> <menu_item_call + label="Add" + layout="topleft" + name="Wearable Add"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="wear_add" /> + </menu_item_call> + <menu_item_call label="Take Off" layout="topleft" name="Take Off"> diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml index 4e6a07d020..62365f7cc2 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml @@ -61,14 +61,6 @@ <menu_item_separator layout="topleft" /> <menu_item_call - label="Empty Trash" - layout="topleft" - name="empty_trash"> - <on_click - function="Inventory.GearDefault.Custom.Action" - parameter="empty_trash" /> - </menu_item_call> - <menu_item_call label="Empty Lost and Found" layout="topleft" name="empty_lostnfound"> @@ -111,4 +103,15 @@ function="Inventory.GearDefault.Enable" parameter="find_links" /> </menu_item_call> + <menu_item_separator + layout="topleft" /> + + <menu_item_call + label="Empty Trash" + layout="topleft" + name="empty_trash"> + <on_click + function="Inventory.GearDefault.Custom.Action" + parameter="empty_trash" /> + </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml index b5eda8e999..16b33eff89 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -11,6 +11,9 @@ <on_enable function="Gear.OnEnable" parameter="wear" /> + <on_visible + function="Gear.OnVisible" + parameter="wear" /> </menu_item_call> <menu_item_call label="Take Off - Remove from Current Outfit" @@ -21,9 +24,12 @@ <on_enable function="Gear.OnEnable" parameter="take_off" /> + <on_visible + function="Gear.OnVisible" + parameter="take_off" /> </menu_item_call> - <menu_item_separator /> + <menu_item_separator name="sepatator1" /> <!-- copied (with minor modifications) from menu_inventory_add.xml --> <!-- *TODO: generate dynamically? --> <menu @@ -168,17 +174,7 @@ </menu> <!-- copied from menu_inventory_add.xml --> - <menu_item_separator /> - <menu_item_call - label="Rename" - layout="topleft" - name="rename"> - <on_click - function="Gear.Rename" /> - <on_enable - function="Gear.OnEnable" - parameter="rename" /> - </menu_item_call> + <menu_item_separator name="sepatator2" /> <menu_item_call label="Delete Outfit" layout="topleft" @@ -188,5 +184,8 @@ <on_enable function="Gear.OnEnable" parameter="delete" /> + <on_visible + function="Gear.OnVisible" + parameter="delete" /> </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml index 67559638d9..9c3151fe07 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml @@ -8,8 +8,8 @@ name="wear_replace"> <on_click function="Outfit.WearReplace" /> - <on_enable - function="Outfit.OnEnable" + <on_visible + function="Outfit.OnVisible" parameter="wear_replace" /> </menu_item_call> <menu_item_call @@ -21,6 +21,9 @@ <on_enable function="Outfit.OnEnable" parameter="wear_add" /> + <on_visible + function="Outfit.OnVisible" + parameter="wear_add" /> </menu_item_call> <menu_item_call label="Take Off - Remove from Current Outfit" @@ -31,6 +34,9 @@ <on_enable function="Outfit.OnEnable" parameter="take_off" /> + <on_visible + function="Outfit.OnVisible" + parameter="take_off" /> </menu_item_call> <menu_item_call label="Edit Outfit" @@ -38,13 +44,13 @@ name="edit"> <on_click function="Outfit.Edit" /> - <on_enable - function="Outfit.OnEnable" + <on_visible + function="Outfit.OnVisible" parameter="edit" /> </menu_item_call> <menu_item_separator /> <menu_item_call - label="Rename" + label="Rename Outfit" layout="topleft" name="rename"> <on_click @@ -59,8 +65,8 @@ name="delete"> <on_click function="Outfit.Delete" /> - <on_enable - function="Outfit.OnEnable" + <on_visible + function="Outfit.OnVisible" parameter="delete" /> </menu_item_call> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_topinfobar.xml b/indra/newview/skins/default/xui/en/menu_topinfobar.xml new file mode 100644 index 0000000000..cbe249ed4d --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_topinfobar.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu + height="201" + layout="topleft" + left="100" + mouse_opaque="false" + name="menu_topinfobar" + top="624" + visible="false" + width="128"> + <menu_item_check + label="Show Coordinates" + name="Show Coordinates"> + <on_click + function="ToggleControl" + parameter="NavBarShowCoordinates" /> + <on_check + function="CheckControl" + parameter="NavBarShowCoordinates" /> + </menu_item_check> + <menu_item_check + label="Show Parcel Properties" + name="Show Parcel Properties"> + <on_click + function="ToggleControl" + parameter="NavBarShowParcelProperties" /> + <on_check + function="CheckControl" + parameter="NavBarShowParcelProperties" /> + </menu_item_check> + <menu_item_separator + name="Separator" /> + <!-- Label of 'Landmark' item is changing in runtime, + see AddLandmarkNavBarMenu/EditLandmarkNavBarMenu in strings.xml --> + <menu_item_call + label="Landmark" + name="Landmark"> + <on_click + function="TopInfoBar.Action" + parameter="landmark" /> + </menu_item_call> + <menu_item_separator + name="Separator" /> + <menu_item_call + label="Copy" + name="Copy"> + <on_click + function="TopInfoBar.Action" + parameter="copy" /> + </menu_item_call> +</menu> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 56ecf061d5..a8fe1bc984 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -80,6 +80,17 @@ function="Floater.Toggle" parameter="gestures" /> </menu_item_check> + <menu_item_check + label="My Voice" + name="ShowVoice" + visibility_control="VoiceMorphingEnabled"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="voice_effect" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="voice_effect" /> + </menu_item_check> <menu label="My Status" name="Status" @@ -916,7 +927,7 @@ <menu_item_check label="Show Advanced Menu" name="Show Advanced Menu" - shortcut="control|alt|D"> + shortcut="control|alt|shift|D"> <on_check function="CheckControl" parameter="UseDebugMenus" /> @@ -1466,6 +1477,18 @@ <menu_item_call.on_click function="View.DefaultUISize" /> </menu_item_call> + <!-- This second, alternative shortcut for Show Advanced Menu is for backward compatibility. The main shortcut has been changed so it's Linux-friendly, where the old shortcut is typically eaten by the window manager. --> + <menu_item_check + label="Show Advanced Menu - legacy shortcut" + name="Show Advanced Menu - legacy shortcut" + shortcut="control|alt|D"> + <on_check + function="CheckControl" + parameter="UseDebugMenus" /> + <on_click + function="ToggleControl" + parameter="UseDebugMenus" /> + </menu_item_check> <menu_item_separator/> <menu_item_check label="Always Run" @@ -1641,7 +1664,6 @@ function="ToggleControl" parameter="QAMode" /> </menu_item_check> - </menu> <menu create_jump_keys="true" @@ -3273,4 +3295,4 @@ </menu> </menu> </menu> -</menu_bar>
\ No newline at end of file +</menu_bar> diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml index e645702f93..efea2ae3e8 100644 --- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml @@ -2,13 +2,20 @@ <context_menu name="Outfit Wearable Context Menu"> <menu_item_call - label="Wear" + label="Replace" layout="topleft" name="wear"> <on_click function="Wearable.Wear" /> </menu_item_call> <menu_item_call + label="Add" + layout="topleft" + name="wear_add"> + <on_click + function="Wearable.Add" /> + </menu_item_call> + <menu_item_call label="Take Off / Detach" layout="topleft" name="take_off_or_detach"> @@ -31,13 +38,6 @@ layout="topleft" name="wearable_attach_to_hud" /> <menu_item_call - label="Object Profile" - layout="topleft" - name="object_profile"> - <on_click - function="Attachment.Profile" /> - </menu_item_call> - <menu_item_call label="Take Off" layout="topleft" name="take_off"> @@ -52,6 +52,13 @@ function="Wearable.Edit" /> </menu_item_call> <menu_item_call + label="Object Profile" + layout="topleft" + name="object_profile"> + <on_click + function="Attachment.Profile" /> + </menu_item_call> + <menu_item_call label="Show Original" layout="topleft" name="show_original"> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 08302432ad..fc24cc00e2 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1397,8 +1397,7 @@ Unable to encode file: [FILE] icon="alertmodal.tga" name="CorruptedProtectedDataStore" type="alertmodal"> - We are unable to read your protected data so it is being reset. - This may happen when you change network setup. + We can't fill in your username and password. This may happen when you change network setup <usetemplate name="okbutton" @@ -2052,16 +2051,40 @@ Would you be my friend? name="Cancel" text="Cancel"/> </form> + <unique/> </notification> <notification + icon="alertmodal.tga" + label="Save Wearable" + name="SaveWearableAs" + type="alertmodal"> + Save item to my inventory as: + <form name="form"> + <input name="message" type="text"> + [DESC] (new) + </input> + <button + default="true" + index="0" + name="Offer" + text="OK"/> + <button + index="1" + name="Cancel" + text="Cancel"/> + </form> + </notification> + + + <notification icon="alertmodal.tga" label="Rename Outfit" name="RenameOutfit" type="alertmodal"> New outfit name: <form name="form"> - <input name="new_name" type="text"> + <input name="new_name" type="text" width="300"> [NAME] </input> <button @@ -4571,18 +4594,6 @@ Uploading in-world and web site snapshots... </notification> <notification - icon="alertmodal.tga" - name="UploadConfirmation" - type="alertmodal"> -Uploading costs L$[AMOUNT]. -Do you wish to proceed? - <usetemplate - name="okcancelbuttons" - notext="Cancel" - yestext="Upload"/> - </notification> - - <notification icon="notify.tga" name="UploadPayment" persist="true" @@ -5581,14 +5592,6 @@ Failed to find [TYPE] named [DESC] in database. <notification icon="notify.tga" - name="ShareToWebFailed" - persist="true" - type="notify"> - Failed to upload image to web. - </notification> - - <notification - icon="notify.tga" name="InvalidWearable" persist="true" type="notify"> @@ -6058,6 +6061,50 @@ We are creating a voice channel for you. This may take up to one minute. </notification> <notification + icon="notify.tga" + name="VoiceEffectsExpired" + sound="UISndAlert" + persist="true" + type="notify"> +One or more of your subscribed Voice Morphs has expired. +[[URL] Click here] to renew your subscription. + <unique/> + </notification> + + <notification + icon="notify.tga" + name="VoiceEffectsExpiredInUse" + sound="UISndAlert" + persist="true" + type="notify"> +The active Voice Morph has expired, your normal voice settings have been applied. +[[URL] Click here] to renew your subscription. + <unique/> + </notification> + + <notification + icon="notify.tga" + name="VoiceEffectsWillExpire" + sound="UISndAlert" + persist="true" + type="notify"> +One or more of your Voice Morphs will expire in less than [INTERVAL] days. +[[URL] Click here] to renew your subscription. + <unique/> + </notification> + LLNotificationsUtil::add("VoiceEffectsNew"); + + <notification + icon="notify.tga" + name="VoiceEffectsNew" + sound="UISndAlert" + persist="true" + type="notify"> +New Voice Morphs are available! + <unique/> + </notification> + + <notification icon="notifytip.tga" name="Cannot enter parcel: not a group member" type="notifytip"> @@ -6217,7 +6264,7 @@ The button will be shown when there is enough space for it. icon="notifytip.tga" name="ShareNotification" type="notifytip"> -Drag items from inventory onto a person in the resident picker +Select residents to share with. </notification> <notification icon="notifytip.tga" @@ -6239,7 +6286,7 @@ With the following Residents: icon="notifytip.tga" name="ItemsShared" type="notifytip"> -Items are successfully shared. +Items successfully shared. </notification> <notification icon="notifytip.tga" @@ -6314,36 +6361,39 @@ Avatar '[NAME]' entered appearance mode. Avatar '[NAME]' left appearance mode. </notification> - <notification + <notification icon="alertmodal.tga" name="NoConnect" type="alertmodal"> - We're having trouble connecting using [PROTOCOL] [HOSTID]. - Please check your network and firewall setup. - <form name="form"> - <button - default="true" - index="0" - name="OK" - text="OK"/> - </form> - </notification> +We're having trouble connecting using [PROTOCOL] [HOSTID]. +Please check your network and firewall setup. + <form name="form"> + <button + default="true" + index="0" + name="OK" + text="OK"/> + </form> + </notification> - <notification - icon="alertmodal.tga" - name="NoVoiceConnect" - type="alertmodal"> - We're having trouble connecting your voiceserver using [HOSTID]. - Voice communications will not be available. - Please check your network and firewall setup. - <form name="form"> - <button - default="true" - index="0" - name="OK" - text="OK"/> - </form> - </notification> + <notification + icon="alertmodal.tga" + name="NoVoiceConnect" + type="alertmodal"> +We're having trouble connecting to your voice server: + +[HOSTID] + +Voice communications will not be available. +Please check your network and firewall setup. + <form name="form"> + <button + default="true" + index="0" + name="OK" + text="OK"/> + </form> + </notification> <notification icon="notifytip.tga" @@ -6371,7 +6421,7 @@ Are you sure you want to leave this call? name="okcancelignore" notext="No" yestext="Yes"/> - <unique/> + <unique/> </notification> <notification @@ -6388,7 +6438,7 @@ Mute everyone? name="okcancelignore" yestext="Ok" notext="Cancel"/> - <unique/> + <unique/> </notification> <global name="UnsupportedCPU"> diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml index 44437d01eb..bdfa928b1d 100644 --- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml +++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml @@ -19,6 +19,6 @@ multi_select="true" name="wearable_items_list" translate="false" - use_internal_context_menu="false" + standalone="false" /> </accordion_tab> diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml index 2edd643cc5..4f989a6f6f 100644 --- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml @@ -9,22 +9,22 @@ width="380"> <icon follows="top|right|left" - height="23" + height="22" image_name="ListItem_Over" layout="topleft" left="0" name="hovered_icon" - top="0" + top="1" visible="false" width="380" /> <icon - height="23" + height="22" follows="top|right|left" image_name="ListItem_Select" layout="topleft" left="0" name="selected_icon" - top="0" + top="1" visible="false" width="380" /> <icon @@ -45,7 +45,7 @@ use_ellipses="true" name="item_name" text_color="white" - top="4" + top="5" value="..." width="359" /> <panel @@ -53,12 +53,12 @@ name="btn_lock" layout="topleft" follows="top|right" - image_name="Locked_Icon" top="0" left="0" height="23" width="23" - tab_stop="false"> + tab_stop="false" + tool_tip="You don't have permission to edit"> <icon name="btn_lock1" layout="topleft" @@ -70,24 +70,36 @@ width="9" tab_stop="false" /> </panel> - <button - name="btn_edit" + <panel + background_visible="false" + name="btn_edit_panel" layout="topleft" follows="top|right" - image_overlay="Edit_Wrench" - top="0" + top="1" left_pad="3" height="23" - width="23" - tab_stop="false" /> - <panel - background_visible="true" - bg_alpha_color="0.4 0.4 0.4 1.0" - bottom="0" + width="26" + tab_stop="false"> + <button + name="btn_edit" + layout="topleft" + follows="top|right" + image_overlay="Edit_Wrench" + top="0" + left="0" + height="23" + width="23" + tab_stop="false" + tool_tip="Edit this shape"/> + </panel> + <icon follows="left|right|top" - height="1" + height="3" + image_name="Wearables_Divider" layout="bottomleft" left="0" - name="wearable_type_separator_panel" + name="wearable_type_separator_icon" + top="0" + visible="true" width="380"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 82b2405ec9..4eff5bc48a 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -90,7 +90,7 @@ label="Speak" label_selected="Speak" name="speak_btn" - pad_right="22" + pad_right="20" tab_stop="true" use_ellipses="true" /> </talk_button> diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index 859cc82e81..976f6d6cd0 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -47,7 +47,7 @@ layout="topleft" name="back_btn" picture_style="true" - left="9" + left="10" tab_stop="false" top="2" width="30" /> @@ -56,7 +56,7 @@ font="SansSerifHugeBold" height="26" layout="topleft" - left_pad="10" + left_pad="4" name="title" text_color="LtGray" top="0" diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml index 035e8607ec..93d7720c57 100644 --- a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml @@ -9,22 +9,22 @@ width="380"> <icon follows="top|right|left" - height="23" + height="22" image_name="ListItem_Over" layout="topleft" left="0" name="hovered_icon" - top="0" + top="1" visible="false" width="380" /> <icon - height="23" + height="22" follows="top|right|left" image_name="ListItem_Select" layout="topleft" left="0" name="selected_icon" - top="0" + top="1" visible="false" width="380" /> <button @@ -33,11 +33,12 @@ follows="top|left" image_unselected="Toast_CloseBtn" image_selected="Toast_CloseBtn" - top="0" + top="3" left="0" - height="20" - width="20" - tab_stop="false" /> + height="18" + width="18" + tab_stop="false" + tool_tip="Remove from outfit" /> <icon height="16" follows="top|left" @@ -56,7 +57,7 @@ use_ellipses="true" name="item_name" text_color="white" - top="4" + top="5" value="..." width="359" /> <button @@ -64,7 +65,7 @@ layout="topleft" follows="top|right" image_overlay="UpArrow_Off" - top="0" + top="1" left="0" height="23" width="23" @@ -74,7 +75,7 @@ layout="topleft" follows="top|right" image_overlay="DownArrow_Off" - top="0" + top="1" left_pad="3" height="23" width="23" @@ -84,12 +85,12 @@ name="btn_lock" layout="topleft" follows="top|right" - image_name="Locked_Icon" top="0" left="0" height="23" width="23" - tab_stop="false"> + tab_stop="false" + tool_tip="You don't have permission to edit"> <icon name="btn_lock1" layout="topleft" @@ -101,25 +102,36 @@ width="9" tab_stop="false" /> </panel> - <button - name="btn_edit" + <panel + background_visible="false" + name="btn_edit_panel" layout="topleft" follows="top|right" - image_overlay="Edit_Wrench" top="0" left_pad="3" height="23" - width="23" - tab_stop="false" /> - <panel - background_visible="true" - bg_alpha_color="0.4 0.4 0.4 1.0" - bottom="0" + width="26" + tab_stop="false"> + <button + name="btn_edit" + layout="topleft" + follows="top|right" + image_overlay="Edit_Wrench" + top="1" + left="0" + height="23" + width="23" + tab_stop="false" + tool_tip="Edit this wearable"/> + </panel> + <icon follows="left|right|top" - height="1" + height="3" + image_name="Wearables_Divider" layout="bottomleft" left="0" - name="wearable_type_separator_panel" + name="wearable_type_separator_icon" + top="0" visible="false" width="380"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index 5f34c24bca..f016c27b0a 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -11,7 +11,7 @@ <accordion fit_parent="true" follows="all" - height="200" + height="198" layout="topleft" left="0" single_expansion="true" @@ -28,6 +28,7 @@ allow_select="true" follows="all" height="10" + item_pad="3" layout="topleft" left="0" multi_select="true" @@ -43,6 +44,7 @@ allow_select="true" follows="all" height="10" + item_pad="3" layout="topleft" left="0" multi_select="true" @@ -58,6 +60,7 @@ allow_select="true" follows="all" height="10" + item_pad="3" layout="topleft" left="0" multi_select="true" diff --git a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml index 2f37b9d3c9..75b5fd1532 100644 --- a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml @@ -9,22 +9,22 @@ width="380"> <icon follows="top|right|left" - height="20" + height="22" image_name="ListItem_Over" layout="topleft" left="0" name="hovered_icon" - top="0" + top="1" visible="false" width="380" /> <icon - height="20" + height="22" follows="top|right|left" image_name="ListItem_Select" layout="topleft" left="0" name="selected_icon" - top="0" + top="1" visible="false" width="380" /> <button @@ -33,11 +33,12 @@ follows="top|left" image_unselected="Toast_CloseBtn" image_selected="Toast_CloseBtn" - top="0" + top="3" left="0" - height="20" - width="20" - tab_stop="false" /> + height="18" + width="18" + tab_stop="false" + tool_tip="Remove from outfit"/> <icon height="16" follows="top|left" @@ -56,18 +57,17 @@ use_ellipses="true" name="item_name" text_color="white" - top="4" + top="5" value="..." width="359" /> - <panel - background_visible="true" - bg_alpha_color="0.4 0.4 0.4 1.0" - bottom="0" + <icon follows="left|right|top" - height="1" + height="3" + image_name="Wearables_Divider" layout="bottomleft" left="0" - name="wearable_type_separator_panel" + name="wearable_type_separator_icon" + top="0" visible="true" width="380"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml index 06371b7489..a5dd34bd22 100644 --- a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml @@ -9,22 +9,22 @@ width="380"> <icon follows="top|right|left" - height="23" + height="22" image_name="ListItem_Over" layout="topleft" left="0" name="hovered_icon" - top="0" + top="1" visible="false" width="380" /> <icon - height="23" + height="22" follows="top|right|left" image_name="ListItem_Select" layout="topleft" left="0" name="selected_icon" - top="0" + top="1" visible="false" width="380" /> <icon @@ -49,24 +49,35 @@ top="4" value="..." width="359" /> - <button - name="btn_add" + <panel + name="btn_add_panel" layout="topleft" follows="top|right" - image_overlay="AddItem_Off" top="0" left="0" height="23" - width="23" - tab_stop="false" /> - <panel - background_visible="true" - bg_alpha_color="0.4 0.4 0.4 1.0" - bottom="0" + width="26" + tab_stop="false"> + <button + name="btn_add" + layout="topleft" + follows="top|right" + image_overlay="AddItem_Off" + top="0" + left="0" + height="23" + width="23" + tab_stop="false" + tool_tip="Add more items of this type" /> + </panel> + <icon follows="left|right|top" - height="1" + height="3" + image_name="Wearables_Divider" layout="bottomleft" left="0" - name="wearable_type_separator_panel" + name="wearable_type_separator_icon" + top="0" + visible="true" width="380"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml index cfcdc25f81..7bcd4962d2 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml @@ -21,126 +21,131 @@ name="avatar_alpha_color_panel" top="0" width="313" > + <check_box + control_name="LowerAlphaTextureInvisible" + follows="left" + height="16" + layout="topleft" + left="5" + name="lower alpha texture invisible" + top="10" + width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Lower Alpha" layout="topleft" - left="30" + left_pad="5" name="Lower Alpha" tool_tip="Click to choose a picture" top="10" - width="94" > + width="115" > <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> + <check_box - control_name="LowerAlphaTextureInvisible" + control_name="UpperAlphaTextureInvisible" follows="left" height="16" layout="topleft" - left_pad="6" - name="lower alpha texture invisible" - top_delta="4" + left_pad="20" + name="upper alpha texture invisible" + top="10" width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Upper Alpha" layout="topleft" - left_pad="20" + left_pad="5" name="Upper Alpha" tool_tip="Click to choose a picture" top="10" - width="94"> + width="115"> <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> + <check_box - control_name="UpperAlphaTextureInvisible" + control_name="HeadAlphaTextureInvisible" follows="left" height="16" layout="topleft" - left_pad="6" - name="upper alpha texture invisible" - top_delta="4" + left="5" + name="head alpha texture invisible" + top_pad="15" width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Head Alpha" layout="topleft" - left="30" + left_pad="5" name="Head Alpha" tool_tip="Click to choose a picture" - top="120" - width="94" > + top_delta="0" + width="115" > <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> + <check_box - control_name="HeadAlphaTextureInvisible" + control_name="Eye AlphaTextureInvisible" follows="left" height="16" layout="topleft" - left_pad="6" - name="head alpha texture invisible" - top_delta="4" + left_pad="20" + name="eye alpha texture invisible" + top_delta="0" width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Eye Alpha" layout="topleft" - left_pad="20" + left_pad="5" name="Eye Alpha" tool_tip="Click to choose a picture" - top="120" - width="94" > + top_delta="0" + width="115" > <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> + <check_box - control_name="Eye AlphaTextureInvisible" + control_name="HairAlphaTextureInvisible" follows="left" height="16" layout="topleft" - left_pad="6" - name="eye alpha texture invisible" - top_delta="4" + left="5" + name="hair alpha texture invisible" + top_pad="15" width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Hair Alpha" layout="topleft" left="30" name="Hair Alpha" tool_tip="Click to choose a picture" - top="230" - width="94" > + top_delta="0" + width="115" > <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> - <check_box - control_name="HairAlphaTextureInvisible" - follows="left" - height="16" - layout="topleft" - left_pad="6" - name="hair alpha texture invisible" - top_delta="4" - width="16" /> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml index 1b4f547f9d..6744a7b9c2 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml @@ -31,7 +31,7 @@ layout="topleft" name="back_btn" picture_style="true" - left="7" + left="10" tab_stop="false" top="2" width="30" /> @@ -42,7 +42,7 @@ font="SansSerifHugeBold" height="26" layout="topleft" - left_pad="10" + left_pad="4" name="title" text_color="LtGray" top="0" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml index 589ea10e8d..dc83b334b5 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -24,7 +24,7 @@ image_unselected="BackButton_Off" layout="topleft" name="back_btn" - left="7" + left="10" tab_stop="false" top="2" width="30" /> @@ -35,10 +35,10 @@ font="SansSerifHugeBold" height="26" layout="topleft" - left_pad="10" + left_pad="4" name="title" text_color="LtGray" - top="0" + top="2" width="250"> Edit Pick </text> diff --git a/indra/newview/skins/default/xui/en/panel_edit_shape.xml b/indra/newview/skins/default/xui/en/panel_edit_shape.xml index cf15fb0455..d295f5fe4a 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml @@ -8,19 +8,22 @@ name="edit_shape_panel" top_pad="10" width="333" > - <text - follows="top|left|right" - font="SansSerifSmallBold" - halign="right" - height="12" - layout="topleft" - left="0" - name="avatar_height" - text_color="EmphasisColor" - top="0" - width="310"> - [HEIGHT] Meters tall - </text> + <string name="meters">Meters</string> + <string name="feet">Feet</string> + <string name="height">Height:</string> + <string name="heigth_label_color" translate="false">White_50</string> + <string name="heigth_value_label_color" translate="false">White</string> + <text + follows="top|left|right" + font="SansSerifSmallBold" + halign="right" + height="12" + layout="topleft" + left="0" + name="avatar_height" + top="0" + width="310"> + </text> <panel border="false" bg_alpha_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index 67ff71cef1..3106ed34ff 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -7,6 +7,7 @@ label="Wearable" layout="topleft" left="0" + help_topic="edit_wearable" name="panel_edit_wearable" top="0" width="333"> @@ -140,15 +141,16 @@ left="0" layout="topleft" name="back_btn" left="11" - top="7" /> + top="3" /> <text follows="top|left" font="SansSerifHugeBold" height="22" layout="topleft" - left_pad="15" + left_pad="8" name="edit_wearable_title" text_color="white" + top="3" value="Editing Shape" width="270" /> <panel @@ -223,19 +225,21 @@ left="0" tool_tip="Female" top="7" width="16" /> - <text_editor - follows="all" - height="23" - left="10" - layout="topleft" - max_length="300" - name="description" - top_pad="3" - width="290" /> + <line_editor + follows="all" + height="23" + layout="topleft" + left="10" + max_length="300" + name="description" + prevalidate_callback="ascii" + text_color="black" + top_pad="3" + width="290" /> </panel> <panel follows="all" - height="408" + height="433" layout="topleft" left="0" name="edit_subpanel_container" @@ -246,7 +250,7 @@ left="0" <panel filename="panel_edit_shape.xml" follows="all" - height="408" + height="433" layout="topleft" left="0" name="edit_shape_panel" @@ -256,7 +260,7 @@ left="0" <panel filename="panel_edit_skin.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_skin_panel" @@ -266,7 +270,7 @@ left="0" <panel filename="panel_edit_hair.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_hair_panel" @@ -276,7 +280,7 @@ left="0" <panel filename="panel_edit_eyes.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_eyes_panel" @@ -286,7 +290,7 @@ left="0" <panel filename="panel_edit_shirt.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_shirt_panel" @@ -296,7 +300,7 @@ left="0" <panel filename="panel_edit_pants.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_pants_panel" @@ -306,7 +310,7 @@ left="0" <panel filename="panel_edit_shoes.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_shoes_panel" @@ -316,7 +320,7 @@ left="0" <panel filename="panel_edit_socks.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_socks_panel" @@ -326,7 +330,7 @@ left="0" <panel filename="panel_edit_jacket.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_jacket_panel" @@ -336,7 +340,7 @@ left="0" <panel filename="panel_edit_skirt.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_skirt_panel" @@ -346,7 +350,7 @@ left="0" <panel filename="panel_edit_gloves.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_gloves_panel" @@ -356,7 +360,7 @@ left="0" <panel filename="panel_edit_undershirt.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_undershirt_panel" @@ -366,7 +370,7 @@ left="0" <panel filename="panel_edit_underpants.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_underpants_panel" @@ -376,7 +380,7 @@ left="0" <panel filename="panel_edit_alpha.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_alpha_panel" @@ -386,7 +390,7 @@ left="0" <panel filename="panel_edit_tattoo.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_tattoo_panel" @@ -394,65 +398,7 @@ left="0" visible="false" width="333" /> </panel> - <panel - follows="bottom|left|right" - height="25" - label="gear_buttom_panel" - layout="topleft" - left="0" - name="gear_buttom_panel" - top_pad="0" - width="333"> - <button - follows="bottom|left" - tool_tip="Options" - height="25" - image_hover_unselected="Toolbar_Left_Over" - image_disabled="OptionsMenu_Disabled" - image_overlay="OptionsMenu_Off" - image_selected="Toolbar_Left_Selected" - image_unselected="Toolbar_Left_Off" - layout="topleft" - left="10" - name="friends_viewsort_btn" - top="0" - width="31" /> - <button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="AddItem_Off" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - image_disabled="AddItem_Disabled" - layout="topleft" - left_pad="1" - name="add_btn" - tool_tip="TODO" - width="31" /> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="dummy_right_icon" - width="218" > - </icon> - <button - follows="bottom|right" - height="25" - image_hover_unselected="Toolbar_Right_Over" - image_overlay="TrashItem_Off" - image_selected="Toolbar_Right_Selected" - image_unselected="Toolbar_Right_Off" - image_disabled="TrashItem_Disabled" - layout="topleft" - left_pad="1" - name="del_btn" - tool_tip="TODO" - width="31" /> - </panel> + <panel follows="bottom|left|right" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index f90db86975..f48440b34d 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -242,7 +242,7 @@ Hover your mouse over the options for more help. top_pad="4" width="190"> <combo_item name="select_mature" value="Select"> - - Select Mature - + - Select maturity rating - </combo_item> <combo_box.item label="Moderate Content" diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 58b78cfa02..e894fc8fb8 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -57,9 +57,9 @@ background_visible="true" font="SansSerifHugeBold" h_pad="0" height="26" - left_pad="10" + left_pad="8" text_color="LtGray" - top="0" + top="1" use_ellipses="true" width="275" follows="top|left|right" @@ -95,7 +95,8 @@ background_visible="true" name="group_accordions" follows="all" layout="topleft" - auto_resize="true"> + auto_resize="true" + width="313"> <accordion left="0" top="0" @@ -103,7 +104,8 @@ background_visible="true" fit_parent="true" follows="all" layout="topleft" - name="groups_accordion"> + name="groups_accordion" + width="313"> <accordion_tab expanded="true" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 19fe2ea874..6523b0d491 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -74,16 +74,14 @@ Maximum 200 per group daily </text> <button follows="top|left" - height="18" - image_selected="AddItem_Press" - image_unselected="AddItem_Off" - image_disabled="AddItem_Disabled" + height="23" + image_overlay="AddItem_Off" layout="topleft" left="5" name="create_new_notice" tool_tip="Create a new notice" - top_delta="-3" - width="18" /> + top_delta="-3" + width="23" /> <button follows="top|left" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 25674a1a39..55fef5aaf7 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -46,12 +46,15 @@ <!-- Texture names for rating icons --> <string name="icon_PG" + translate="false" value="Parcel_PG_Dark" /> <string name="icon_M" + translate="false" value="Parcel_M_Dark" /> <string name="icon_R" + translate="false" value="Parcel_R_Dark" /> <button follows="top|right" @@ -60,7 +63,7 @@ image_pressed="BackButton_Press" image_unselected="BackButton_Off" layout="topleft" - left="8" + left="9" name="back_btn" tool_tip="Back" tab_stop="false" @@ -71,10 +74,10 @@ font="SansSerifHugeBold" height="26" layout="topleft" - left_pad="10" + left_pad="7" name="title" text_color="LtGray" - top="2" + top="3" use_ellipses="true" value="Place Profile" width="280" /> diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index d65b86f007..2a53b3e2fa 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -42,7 +42,7 @@ <filter_editor text_pad_left="10" follows="left|top|right" - height="23" + height="23" label="Filter Inventory" layout="topleft" left="10" @@ -68,10 +68,10 @@ top_pad="10" width="312"> <inventory_panel - bg_opaque_color="DkGray2" - bg_alpha_color="DkGray2" - background_visible="true" - background_opaque="true" + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" border="false" bevel_style="none" follows="all" @@ -82,13 +82,14 @@ left="0" name="All Items" sort_order_setting="InventorySortOrder" + show_item_link_overlays="true" top="16" width="288" /> <recent_inventory_panel - bg_opaque_color="DkGray2" - bg_alpha_color="DkGray2" - background_visible="true" - background_opaque="true" + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" border="false" bevel_style="none" follows="all" @@ -98,6 +99,7 @@ layout="topleft" left_delta="0" name="Recent Items" + show_item_link_overlays="true" width="290" /> </tab_container> <layout_stack diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index 76e5e20498..c0cab487b3 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -5,8 +5,8 @@ border="false" height="600" follows="all" - label="Outfit Edit" layout="topleft" + help_topic="edit_outfit" left="0" min_height="350" name="outfit_edit" @@ -51,6 +51,8 @@ <string name="Filter.All" value="All"/> <string name="Filter.Clothes/Body" value="Clothes/Body"/> <string name="Filter.Objects" value="Objects"/> + <string name="Filter.Clothing" value="Clothing"/> + <string name="Filter.Bodyparts" value="Body parts"/> <button @@ -63,14 +65,14 @@ name="back_btn" left="5" tab_stop="false" - top="2" + top="1" width="30" /> <text follows="top|right" font="SansSerifHugeBold" height="26" layout="topleft" - left_pad="20" + left_pad="10" name="title" text_color="LtGray" top="0" @@ -85,7 +87,6 @@ bevel_style="none" follows="top|left|right" height="40" - label="bottom_panel" layout="topleft" left="6" name="header_panel" @@ -105,8 +106,7 @@ <panel bevel_style="none" follows="top|right" - height="38" - label="bottom_panel" + height="37" layout="topleft" left_pad="5" name="outfit_name_and_status" @@ -122,18 +122,26 @@ top="2" value="Now editing..." use_ellipses="true" - width="270" /> + width="245" /> <text follows="bottom|left|right" font="SansSerifLargeBold" - height="26" + height="18" layout="topleft" name="curr_outfit_name" text_color="LtGray" top_pad="2" value="[Current Outfit]" use_ellipses="true" - width="270" /> + width="245" /> + <loading_indicator + follows="right|top" + height="24" + layout="topleft" + right="-2" + name="edit_outfit_loading_indicator" + top="6" + width="24" /> </panel> </panel> @@ -144,7 +152,7 @@ Required height for dragbar (icon in spec) is 10, so resizebar height should be It is calculated as border_size + 2*UIResizeBarOverlap --> <layout_stack - animate="false" + animate="true" border_size="8" clip="false" default_tab_group="2" @@ -160,7 +168,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap <layout_panel layout="topleft" height="187" - label="IM Control Panel" min_height="100" name="outfit_wearables_panel" width="313" @@ -183,7 +190,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap bg_alpha_color="DkGray2" layout="topleft" height="154" - label="add_button_and_combobox" name="add_button_and_combobox" width="311" user_resize="false" @@ -205,12 +211,16 @@ It is calculated as border_size + 2*UIResizeBarOverlap <button follows="left|bottom" height="22" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" label="Add More..." layout="topleft" left="2" name="show_add_wearables_btn" top_pad="2" + tool_tip="Open/Close" width="125" /> <combo_box @@ -218,15 +228,27 @@ It is calculated as border_size + 2*UIResizeBarOverlap height="22" layout="topleft" left_pad="5" - name="filter_wearables_combobox" + name="list_view_filter_combobox" top_delta="0" visible="false" width="152"/> - + <combo_box + follows="left|right|bottom" + height="22" + layout="topleft" + left_delta="0" + name="folder_view_filter_combobox" + top_delta="0" + visible="false" + width="152"/> + <button follows="bottom|right" height="22" image_overlay="Search_Icon" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" layout="topleft" name="filter_button" @@ -250,15 +272,14 @@ It is calculated as border_size + 2*UIResizeBarOverlap background_image="TextField_Search_Off" enabled="true" follows="left|right|top" - font="SansSerif" - label="Filter" + label="Filter Inventory Wearables" layout="topleft" left="5" width="290" height="25" name="look_item_filter" + search_button_visible="true" text_color="black" - text_pad_left="25" visible="true"/> </layout_panel> @@ -271,7 +292,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap bg_alpha_color="DkGray2" auto_resize="true" default_tab_group="3" - height="211" + height="450" min_height="210" name="add_wearables_panel" width="313" @@ -294,11 +315,11 @@ It is calculated as border_size + 2*UIResizeBarOverlap background_visible="false" border="false" follows="left|top|right|bottom" - height="210" + height="442" layout="topleft" left="0" mouse_opaque="false" - name="inventory_items" + name="folder_view" top_pad="5" width="310" visible="false"/> @@ -309,21 +330,21 @@ It is calculated as border_size + 2*UIResizeBarOverlap layout="topleft" follows="left|top|right|bottom" border="false" - height="210" + height="449" left="0" mouse_opaque="false" - width="311" + width="310" top_delta="0" visible="true"> <wearable_items_list color="0.107 0.107 0.107 1" - name="filtered_wearables_list" + name="list_view" allow_select="true" layout="topleft" follows="all" multi_select="true" width="310" - height="210" + height="449" left="0" top="0"/> </panel> @@ -338,7 +359,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap bevel_style="none" follows="bottom|left|right" height="27" - label="bottom_panel" layout="topleft" left="5" name="no_add_wearables_button_bar" @@ -363,7 +383,19 @@ It is calculated as border_size + 2*UIResizeBarOverlap layout="topleft" left_pad="1" name="dummy_right_icon" - width="281" /> + width="246" /> + <button + follows="bottom|right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="0" + name="shop_btn" + top="1" + width="31" /> </panel> @@ -373,7 +405,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap bevel_style="none" follows="left|right|bottom" height="27" - label="add_wearables_button_bar" layout="topleft" left="5" name="add_wearables_button_bar" @@ -479,10 +510,11 @@ It is calculated as border_size + 2*UIResizeBarOverlap follows="bottom|left|right" height="23" left_pad="12" - label="Revert" + label="Undo Changes" layout="topleft" name="revert_btn" top="0" + tool_tip="Revert to last saved version" width="147" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 13e1f5ba5c..a59070496e 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -30,6 +30,7 @@ height="490" name="outfitslist_tab" background_visible="true" + help_topic="my_outfits_tab" follows="all" label="MY OUTFITS" layout="topleft" @@ -47,6 +48,7 @@ mouse_opaque="true" name="cof_tab" start_folder="Current Outfit" + use_label_suffix="true" width="315" /> </tab_container> <panel @@ -92,7 +94,7 @@ layout="topleft" left_pad="1" name="trash_btn" - tool_tip="Remove selected item" + tool_tip="Delete selected outfit" width="31"/> <button follows="bottom|left" @@ -128,4 +130,4 @@ width="152" /> </panel> -</panel>
\ No newline at end of file +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml index 5cf94c25d7..d0c44c4328 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml @@ -14,6 +14,8 @@ background_visible="true" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" + no_matched_tabs_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]." + no_visible_tabs_text.value="There are no any outfits. Try [secondlife:///app/search/all/ Search]." follows="all" height="400" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml index 49e1d16f6a..1d01bcb8a5 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_info.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml @@ -18,7 +18,7 @@ image_unselected="BackButton_Off" layout="topleft" name="back_btn" - left="7" + left="10" tab_stop="false" top="2" width="30" /> @@ -27,10 +27,10 @@ font="SansSerifHugeBold" height="26" layout="topleft" - left_pad="10" + left_pad="4" name="title" text_color="LtGray" - top="0" + top="2" value="Pick Info" use_ellipses="true" width="275" /> diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 57ac79686d..55e0184282 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -2,7 +2,7 @@ <panel background_visible="true" follows="all" - height="570" + height="610" layout="topleft" left="0" min_height="350" @@ -95,48 +95,63 @@ <!-- Texture names for parcel permissions icons --> <string name="icon_PG" + translate="false" value="Parcel_PG_Dark" /> <string name="icon_M" + translate="false" value="Parcel_M_Dark" /> <string name="icon_R" + translate="false" value="Parcel_R_Dark" /> <string name="icon_Voice" + translate="false" value="Parcel_Voice_Dark" /> <string name="icon_VoiceNo" + translate="false" value="Parcel_VoiceNo_Dark" /> <string name="icon_Fly" + translate="false" value="Parcel_Fly_Dark" /> <string name="icon_FlyNo" + translate="false" value="Parcel_FlyNo_Dark" /> <string name="icon_Push" + translate="false" value="Parcel_Push_Dark" /> <string name="icon_PushNo" + translate="false" value="Parcel_PushNo_Dark" /> <string name="icon_Build" + translate="false" value="Parcel_Build_Dark" /> <string name="icon_BuildNo" + translate="false" value="Parcel_BuildNo_Dark" /> <string name="icon_Scripts" + translate="false" value="Parcel_Scripts_Dark" /> <string name="icon_ScriptsNo" + translate="false" value="Parcel_ScriptsNo_Dark" /> <string name="icon_Damage" + translate="false" value="Parcel_Damage_Dark" /> <string name="icon_DamageNo" + translate="false" value="Parcel_DamageNo_Dark" /> <button follows="top|right" @@ -145,7 +160,7 @@ image_pressed="BackButton_Press" image_unselected="BackButton_Off" layout="topleft" - left="7" + left="8" name="back_btn" tool_tip="Back" tab_stop="false" @@ -159,14 +174,14 @@ left_pad="10" name="title" text_color="LtGray" - top="2" + top="4" use_ellipses="true" value="Place Profile" width="280" /> <scroll_container color="DkGray2" follows="all" - height="532" + height="572" layout="topleft" left="9" name="place_scroll" @@ -176,7 +191,7 @@ <panel bg_alpha_color="DkGray2" follows="left|top|right" - height="540" + height="580" layout="topleft" left="0" min_height="300" @@ -322,21 +337,22 @@ <accordion fit_parent="true" follows="all" - height="223" + height="268" layout="topleft" single_expansion="true" left="0" name="advanced_info_accordion" - top_pad="10" + top_pad="5" width="313"> <accordion_tab - height="170" + fit_panel="false" + height="175" layout="topleft" name="parcel_characteristics_tab" title="Parcel"> <panel follows="all" - height="160" + height="175" layout="topleft" left="0" name="parcel_characteristics_panel" @@ -533,8 +549,8 @@ name="about_land_btn" right="-5" tab_stop="false" - top="138" - width="90"> + top_pad="2" + width="140"> <click_callback function="Floater.Show" parameter="about_land" /> @@ -543,7 +559,8 @@ </accordion_tab> <accordion_tab expanded="false" - height="150" + fit_panel="false" + height="125" layout="topleft" name="region_information_tab" title="Region"> @@ -662,7 +679,8 @@ name="region_info_btn" right="-5" tab_stop="false" - width="105"> + top_pad="2" + width="180"> <click_callback function="Floater.Show" parameter="region_info" /> @@ -671,13 +689,14 @@ </accordion_tab> <accordion_tab expanded="false" - height="190" + fit_panel="false" + height="180" layout="topleft" name="estate_information_tab" title="Estate"> <panel follows="all" - height="189" + height="180" layout="topleft" left="0" name="estate_information_panel" @@ -760,13 +779,14 @@ </accordion_tab> <accordion_tab expanded="false" - height="320" + fit_panel="false" + height="290" layout="topleft" name="sales_tab" title="For Sale"> <panel follows="all" - height="300" + height="290" layout="topleft" left="0" name="sales_panel" diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index a7a0efcdb3..638e190e8f 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -37,6 +37,7 @@ background_visible="true" left="6" name="Places Tabs" tab_min_width="80" + tab_max_width="157" tab_height="30" tab_group="1" tab_position="top" @@ -89,6 +90,7 @@ background_visible="true" layout="topleft" left_pad="3" name="map_btn" + tool_tip="Show the corresponding area on the World Map" width="85" /> <button follows="bottom|left" @@ -141,6 +143,7 @@ background_visible="true" layout="topleft" name="profile_btn" right="-1" + tool_tip="Show place profile" top="1" width="111" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index ead5ff8ae4..2cf4118e19 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -388,7 +388,7 @@ Busy mode response: </text> <text_editor - control_name="BusyModeResponse2" + control_name="BusyModeResponse" text_readonly_color="LabelDisabledColor" bg_writeable_color="LtGray" use_ellipses="false" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 266fd6cb5e..f4694180a1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -372,29 +372,17 @@ decimal_digits="0" follows="left|top" height="16" - increment="2" - initial_value="35" - label="Max. avatar draw distance:" + increment="1" + initial_value="12" + label="Max. # of non-impostor avatars:" label_width="185" layout="topleft" left_delta="0" max_val="65" min_val="1" - name="MaxAvatarDrawDistance" + name="MaxNumberAvatarDrawn" top_pad="4" width="290" /> - <text - type="string" - length="1" - follows="left|top" - height="12" - layout="topleft" - left_delta="291" - name="DrawDistanceMeterText3" - top_delta="0" - width="128"> - m - </text> <slider control_name="RenderGlowResolutionPow" decimal_digits="0" diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml index d6d6fa4975..9745f89e31 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml @@ -24,7 +24,7 @@ image_unselected="BackButton_Off" layout="topleft" name="back" - left="9" + left="10" tab_stop="false" top="2" width="30" /> @@ -38,10 +38,10 @@ font="SansSerifHugeBold" height="26" layout="topleft" - left_pad="10" + left_pad="5" name="user_name" text_color="LtGray" - top="0" + top="2" value="(Loading...)" use_ellipses="true" width="275" /> diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index 19eb4bb0d6..78d64620a5 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -12,6 +12,8 @@ layout="topleft" left="12" name="min param text" + text_color="EmphasisColor" + font_shadow="hard" top="120" width="120" /> <text @@ -20,6 +22,8 @@ layout="topleft" left="155" name="max param text" + text_color="EmphasisColor" + font_shadow="hard" top_delta="0" width="120" /> <text diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 008aa1acc0..43513e1ab6 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -41,32 +41,35 @@ name="buycurrencylabel"> L$ [AMT] </panel.string> - <button + <panel + height="18" + left="-315" + width="95" + top="1" + follows="right|top" + name="balance_bg" + bg_visible="true" + background_opaque="true" + bg_opaque_image="bevel_background"> + <text auto_resize="true" halign="center" - enabled="false" font="SansSerifSmall" - follows="right|top" - image_overlay="" - image_selected="bevel_background" - image_unselected="bevel_background" - image_pressed="bevel_background" + follows="all" height="18" - right="-275" - label_shadow="false" - name="buycurrency" - label_color_disabled="ButtonLabelColor" - image_color_disabled="White" + left="0" + name="balance" tool_tip="My Balance" - pad_left="12" - pad_right="12" + v_pad="4" top="0" + wrap="false" + value="L$20" width="40" /> <button auto_resize="true" halign="center" font="SansSerifSmall" - follows="right|top" + follows="right|top|bottom" image_hover_unselected="buy_over" image_unselected="buy_off" image_pressed="buy_press" @@ -81,6 +84,7 @@ tool_tip="Click to buy more L$" top="0" width="55" /> + </panel> <text type="string" font="SansSerifSmall" diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml index 21addb8e6f..daa4356c83 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -5,14 +5,16 @@ background_visible="true" bg_alpha_color="DkGray"> <accordion + no_matched_tabs_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search]." + no_visible_tabs_text.value="Teleport history is empty. Try [secondlife:///app/search/places/ Search]." follows="left|top|right|bottom" height="373" layout="topleft" left="3" top="0" name="history_accordion" - background_visible="true" - bg_alpha_color="DkGray2" + background_visible="true" + bg_alpha_color="DkGray2" width="307"> <accordion_tab layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml new file mode 100644 index 0000000000..d3fb77f135 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> +<panel + background_visible="true" + background_opaque="false" + bg_opaque_color="Black_50" + bg_alpha_color="Black_50" + follows="left|top|right" + height="19" + layout="topleft" + name="topinfo_bar" + width="1024"> + <button + border="true" + follows="left|top" + height="16" + hover_glow_amount="0.15" + image_disabled="Info_Off" + image_disabled_selected="Info_Off" + image_selected="Info_Off" + image_unselected="Info_Off" + left="11" + name="place_info_btn" + top="1" + width="16"/> + <text + follows="left|top|right" + font="DejaVu" + height="16" + layout="topleft" + left_pad="11" + length="1" + name="parcel_info_text" + top="1" + type="string" + width="1"/> + <icon + enabled="true" + follows="right|top" + height="18" + image_name="Parcel_VoiceNo_Light" + name="voice_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="18" + image_name="Parcel_FlyNo_Light" + name="fly_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="18" + image_name="Parcel_PushNo_Light" + name="push_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="18" + image_name="Parcel_BuildNo_Light" + name="build_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="18" + image_name="Parcel_ScriptsNo_Light" + name="scripts_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="13" + image_name="Parcel_Health_Dark" + left="2" + name="damage_icon" + top="3" + visible="false" + width="14" + /> + <text + follows="right|top" + font="SansSerifSmall" + halign="right" + height="18" + name="damage_text" + top="5" + visible="false" + width="35" + /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_voice_effect.xml b/indra/newview/skins/default/xui/en/panel_voice_effect.xml new file mode 100644 index 0000000000..93e79b7328 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_voice_effect.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="all" + height="26" + layout="topleft" + name="panel_voice_effect" + width="200"> + <string name="no_voice_effect"> + Voice Morphing Off + </string> + <string name="preview_voice_effects"> + Preview Voice Morphing ▶ + </string> + <string name="get_voice_effects"> + Get Voice Morphing ▶ + </string> + <combo_box + enabled="false" + follows="left|top|right" + height="23" + name="voice_effect" + tool_tip="Select a Voice Morph to change your voice" + top_pad="0" + width="200"> + <combo_box.item + label="Voice Morphing Off" + name="no_voice_effect" + top_pad="0" + value="0" /> + <combo_box.commit_callback + function="Voice.CommitVoiceEffect" /> + </combo_box> +</panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 3d7b0b7edc..e189d11d35 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -92,6 +92,7 @@ width="333"> layout="topleft" left="265" name="edit_outfit_btn" + tool_tip="Edit this outfit" top="7" width="30" /> <loading_indicator @@ -111,6 +112,7 @@ width="333"> label="Filter Outfits" max_length="300" name="Filter" + search_button_visible="true" top_pad="10" width="303" /> <panel @@ -143,7 +145,7 @@ width="333"> left="5" min_height="410" name="panel_outfit_edit" - top="5" + top="2" visible="false" width="320"/> <panel diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 4c42d1f750..6c9acae35e 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -45,6 +45,7 @@ layout="topleft" left="0" name="info_btn" + tool_tip="Show object profile" top="0" width="102" /> <button @@ -55,6 +56,7 @@ layout="topleft" left="105" name="share_btn" + tool_tip="Share an inventory item" top="0" width="102" /> <button @@ -65,6 +67,7 @@ layout="topleft" left="210" name="shop_btn" + tool_tip="Open Marketplace webpage" top="0" width="102" /> <button @@ -75,6 +78,7 @@ layout="topleft" left="210" name="wear_btn" + tool_tip="Wear seleceted outfit" top="0" width="102" /> <button @@ -95,6 +99,7 @@ layout="topleft" left="210" name="teleport_btn" + tool_tip="Teleport to the selected area" top="0" width="102" /> </panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index 8d19ab15b1..c723a5da42 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -55,10 +55,10 @@ font="SansSerifHugeBold" height="26" layout="topleft" - left_pad="10" + left_pad="3" name="title" text_color="LtGray" - top="0" + top="2" use_ellipses="true" value="Object Profile" width="275" /> @@ -159,51 +159,49 @@ name="LabelCreatorName" top_delta="6" width="180"> - Nicole Linden - </text> - <button - follows="top|right" - height="16" - image_selected="Inspector_I" - image_unselected="Inspector_I" - layout="topleft" - right="-5" - name="BtnCreator" - top_delta="-6" - width="16" /> - <text - type="string" - length="1" - follows="left|top" - height="23" - layout="topleft" - left="5" - name="LabelOwnerTitle" - top_pad="10" - width="78"> - Owner: - </text> - <avatar_icon - follows="top|left" - height="20" - default_icon_name="Generic_Person" - layout="topleft" - left_pad="0" - top_delta="-6" - mouse_opaque="true" - width="20" /> - <text - type="string" - follows="left|right|top" - font="SansSerifSmall" - height="15" - layout="topleft" - left_pad="5" - name="LabelOwnerName" - top_delta="6" + </text> + <button + follows="top|right" + height="16" + image_selected="Inspector_I" + image_unselected="Inspector_I" + layout="topleft" + right="-5" + name="BtnCreator" + top_delta="-6" + width="16" /> + <text + type="string" + length="1" + follows="left|top" + height="23" + layout="topleft" + left="5" + name="LabelOwnerTitle" + top_pad="10" + width="78"> + Owner: + </text> + <avatar_icon + follows="top|left" + height="20" + default_icon_name="Generic_Person" + layout="topleft" + left_pad="0" + top_delta="-6" + mouse_opaque="true" + width="20" /> + <text + type="string" + follows="left|right|top" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" + name="LabelOwnerName" + top_delta="6" width="180"> - Thrax Linden - </text> + </text> <button follows="top|right" height="16" @@ -236,7 +234,6 @@ top_pad="10" name="LabelAcquiredDate" top_delta="0" width="222"> - Wed May 24 12:50:46 2006 </text> <panel border="false" @@ -395,7 +392,7 @@ top_pad="10" label_width="75" left="120" width="170" - min_val="1" + min_val="0" height="23" max_val="999999999" top_pad="10"/> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 5f1d4e6ca6..8f05527099 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -137,7 +137,7 @@ <string name="RetrievingData">Retrieving...</string> <string name="ReleaseNotes">Release Notes</string> - <string name="RELEASE_NOTES_BASE_URL">http://secondlife.com/app/releasenotes/</string> + <string name="RELEASE_NOTES_BASE_URL">http://wiki.secondlife.com/wiki/Release_Notes/</string> <!-- Indicates something is being loaded. Maybe should be merged with RetrievingData --> <string name="LoadingData">Loading...</string> @@ -3094,6 +3094,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. The session initialization is timed out </string> + <string name="voice_morphing_url">http://secondlife.com/landing/voicemorphing</string> + <!-- Financial operations strings --> <string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT] [REASON].</string> <string name="paid_you_ldollars_no_reason">[NAME] paid you L$[AMOUNT].</string> @@ -3183,28 +3185,23 @@ Abuse Report</string> <!-- language specific white-space characters, delimiters, spacers, item separation symbols --> <string name="sentences_separator" value=" "></string> - <string name="words_separator">, </string> + <string name="words_separator" value=", "/> <string name="server_is_down"> Despite our best efforts, something unexpected has gone wrong. - Please check secondlife.com/status to see if there is a known problem with the service. + Please check status.secondlifegrid.net to see if there is a known problem with the service. If you continue to experience problems, please check your network and firewall setup. </string> <!-- overriding datetime formating. - leave emtpy in for current localization this is not needed - list of values should be separated with ':' - example: - <string name="dateTimeWeekdaysShortNames"> - Son:Mon:Tue:Wed:Thu:Fri:Sat - </string> + didn't translate if this is not needed for current localization --> - <string name="dateTimeWeekdaysNames"></string> - <string name="dateTimeWeekdaysShortNames"></string> - <string name="dateTimeMonthNames"></string> - <string name="dateTimeMonthShortNames"></string> - <string name="dateTimeDayFormat"></string> - <string name="dateTimeAM"></string> - <string name="dateTimePM"></string> + <string name="dateTimeWeekdaysNames">Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday</string> + <string name="dateTimeWeekdaysShortNames">Sun:Mon:Tue:Wed:Thu:Fri:Sat</string> + <string name="dateTimeMonthNames">January:February:March:April:May:June:July:August:September:October:November:December</string> + <string name="dateTimeMonthShortNames">Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec</string> + <string name="dateTimeDayFormat">[MDAY]</string> + <string name="dateTimeAM">AM</string> + <string name="dateTimePM">PM</string> </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/accordion.xml b/indra/newview/skins/default/xui/en/widgets/accordion.xml new file mode 100644 index 0000000000..19f8234389 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/accordion.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<accordion + height="100" + name="accordion" + width="200"> + <no_matched_tabs_text + follows="all" + height="100" + h_pad="10" + name="no_matched_tabs_msg" + v_pad="15" + width="200" + wrap="true "/> + <!-- This widget will not be created in viewer. Only its value will be used for empty accordion without filter. --> + <no_visible_tabs_text + name="no_visible_tabs_msg" + visible="false"/> +</accordion> diff --git a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml index dfd301a770..48b987d7e8 100644 --- a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml +++ b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml @@ -4,5 +4,6 @@ name="color_swatch"> <color_swatch.caption_text name="caption" halign="center" - follows="left|right|bottom"/> + follows="left|right|bottom" + v_pad="2"/> </color_swatch> diff --git a/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml b/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml index a71b293f31..e05ddf9815 100644 --- a/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml +++ b/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml @@ -11,6 +11,6 @@ name="no_items_msg" v_pad="10" h_pad="10" - value="There are no any items in the list" + value="No matches found" wrap="true" /> </flat_list_view>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml index 33c3475eb2..757f0f49d1 100644 --- a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml +++ b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml @@ -3,7 +3,8 @@ <multiselect_text font="SansSerifSmall"/> <caption_text text="Multiple" halign="center" - font="SansSerifSmall"/> + font="SansSerifSmall" + v_pad="2"/> <border bevel_style="in"/> </texture_picker> diff --git a/indra/newview/skins/default/xui/es/floater_buy_land.xml b/indra/newview/skins/default/xui/es/floater_buy_land.xml index a40f65d5d0..74243a4d06 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_land.xml @@ -126,9 +126,6 @@ para cubrir esta parcela. <floater.string name="no_parcel_selected"> (No se ha seleccionado una parcela) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Región: </text> diff --git a/indra/newview/skins/default/xui/fr/floater_buy_land.xml b/indra/newview/skins/default/xui/fr/floater_buy_land.xml index 7c9a31a4c3..b7f8f36f81 100644 --- a/indra/newview/skins/default/xui/fr/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_buy_land.xml @@ -124,9 +124,6 @@ prend en charge [AMOUNT2] objets <floater.string name="no_parcel_selected"> (aucune parcelle sélectionnée) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Région : </text> diff --git a/indra/newview/skins/default/xui/fr/panel_landmark_info.xml b/indra/newview/skins/default/xui/fr/panel_landmark_info.xml index 4001616034..bd29bd676c 100644 --- a/indra/newview/skins/default/xui/fr/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/fr/panel_landmark_info.xml @@ -18,9 +18,6 @@ <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> <button name="back_btn" tool_tip="Précédent"/> <text name="title" value="Profil du lieu"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/fr/panel_place_profile.xml b/indra/newview/skins/default/xui/fr/panel_place_profile.xml index 598e94166e..731e045019 100644 --- a/indra/newview/skins/default/xui/fr/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/fr/panel_place_profile.xml @@ -41,21 +41,6 @@ <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> - <string name="icon_Voice" value="parcel_drk_Voice"/> - <string name="icon_VoiceNo" value="parcel_drk_VoiceNo"/> - <string name="icon_Fly" value="parcel_drk_Fly"/> - <string name="icon_FlyNo" value="parcel_drk_FlyNo"/> - <string name="icon_Push" value="parcel_drk_Push"/> - <string name="icon_PushNo" value="parcel_drk_PushNo"/> - <string name="icon_Build" value="parcel_drk_Build"/> - <string name="icon_BuildNo" value="parcel_drk_BuildNo"/> - <string name="icon_Scripts" value="parcel_drk_Scripts"/> - <string name="icon_ScriptsNo" value="parcel_drk_ScriptsNo"/> - <string name="icon_Damage" value="parcel_drk_Damage"/> - <string name="icon_DamageNo" value="parcel_drk_DamageNo"/> <button name="back_btn" tool_tip="Précédent"/> <text name="title" value="Profil du lieu"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/it/floater_about.xml b/indra/newview/skins/default/xui/it/floater_about.xml index 55e699612c..026b7b7616 100644 --- a/indra/newview/skins/default/xui/it/floater_about.xml +++ b/indra/newview/skins/default/xui/it/floater_about.xml @@ -27,9 +27,9 @@ Scheda grafica: [GRAPHICS_CARD] Versione libcurl: [LIBCURL_VERSION] Versione J2C Decoder: [J2C_VERSION] -Versione Audio Driver: [AUDIO_DRIVER_VERSION] +Versione Driver audio: [AUDIO_DRIVER_VERSION] Versione Qt Webkit: [QT_WEBKIT_VERSION] -Versione Vivox: [VIVOX_VERSION] +Versione Server voice: [VOICE_VERSION] </floater.string> <floater.string name="none"> (nessuno) diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml index c55f79738e..942b79b7d3 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -63,6 +63,9 @@ Nessun appezzamento selezionato. Vai al menu Mondo > Informazioni sul terreno oppure seleziona un altro appezzamento per vederne i dettagli. </panel.string> + <panel.string name="time_stamp_template"> + [wkday,datetime,local] [day,datetime,local] [mth,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + </panel.string> <text name="Name:"> Nome: </text> diff --git a/indra/newview/skins/default/xui/it/floater_avatar_textures.xml b/indra/newview/skins/default/xui/it/floater_avatar_textures.xml index 2935f0fdb6..b6376973cd 100644 --- a/indra/newview/skins/default/xui/it/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/it/floater_avatar_textures.xml @@ -3,41 +3,48 @@ <floater.string name="InvalidAvatar"> AVATAR NON VALIDO </floater.string> - <text name="composite_label"> - Texture Composite - </text> - <button label="Deposito" label_selected="Deposito" name="Dump"/> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> - <texture_picker label="Capigliature" name="hair-baked"/> - <texture_picker label="Capigliature" name="hair_grain"/> - <texture_picker label="Alpha dei capelli" name="hair_alpha"/> - <texture_picker label="Testa" name="head-baked"/> - <texture_picker label="Makeup" name="head_bodypaint"/> - <texture_picker label="Alpha della testa" name="head_alpha"/> - <texture_picker label="Tatuaggio della testa" name="head_tattoo"/> - <texture_picker label="Occhi" name="eyes-baked"/> - <texture_picker label="Occhio" name="eyes_iris"/> - <texture_picker label="Alpha degli occhi" name="eyes_alpha"/> - <texture_picker label="Parte superiore del corpo" name="upper-baked"/> - <texture_picker label="Bodypaint parte superiore del corpo" name="upper_bodypaint"/> - <texture_picker label="Maglietta intima" name="upper_undershirt"/> - <texture_picker label="Guanti" name="upper_gloves"/> - <texture_picker label="Camicia" name="upper_shirt"/> - <texture_picker label="Parte superiore della giacca" name="upper_jacket"/> - <texture_picker label="Alpha superiore" name="upper_alpha"/> - <texture_picker label="Tatuaggio superiore" name="upper_tattoo"/> - <texture_picker label="Parte inferiore del corpo" name="lower-baked"/> - <texture_picker label="Bodypaint parte inferiore del corpo" name="lower_bodypaint"/> - <texture_picker label="Slip" name="lower_underpants"/> - <texture_picker label="Calzini" name="lower_socks"/> - <texture_picker label="Scarpe" name="lower_shoes"/> - <texture_picker label="Pantaloni" name="lower_pants"/> - <texture_picker label="Giacca" name="lower_jacket"/> - <texture_picker label="Alpha inferiore" name="lower_alpha"/> - <texture_picker label="Tattuaggio inferiore" name="lower_tattoo"/> - <texture_picker label="Gonna" name="skirt-baked"/> - <texture_picker label="Gonna" name="skirt"/> + <text name="label"> + Baking delle +texture + </text> + <text name="composite_label"> + Composito +Texture + </text> + <button label="Memorizza gli ID sulla console" label_selected="Dump" name="Dump"/> + <panel name="scroll_content_panel"> + <texture_picker label="Capigliature" name="hair-baked"/> + <texture_picker label="Capigliature" name="hair_grain"/> + <texture_picker label="Alpha dei capelli" name="hair_alpha"/> + <texture_picker label="Testa" name="head-baked"/> + <texture_picker label="Makeup" name="head_bodypaint"/> + <texture_picker label="Alpha della testa" name="head_alpha"/> + <texture_picker label="Tatuaggio della testa" name="head_tattoo"/> + <texture_picker label="Occhi" name="eyes-baked"/> + <texture_picker label="Occhio" name="eyes_iris"/> + <texture_picker label="Alpha degli occhi" name="eyes_alpha"/> + <texture_picker label="Parte superiore del corpo" name="upper-baked"/> + <texture_picker label="Bodypaint parte superiore del corpo" name="upper_bodypaint"/> + <texture_picker label="Maglietta intima" name="upper_undershirt"/> + <texture_picker label="Guanti" name="upper_gloves"/> + <texture_picker label="Camicia" name="upper_shirt"/> + <texture_picker label="Parte superiore della giacca" name="upper_jacket"/> + <texture_picker label="Alpha superiore" name="upper_alpha"/> + <texture_picker label="Tatuaggio superiore" name="upper_tattoo"/> + <texture_picker label="Parte inferiore del corpo" name="lower-baked"/> + <texture_picker label="BodyPaint parte inferiore del corpo" name="lower_bodypaint"/> + <texture_picker label="Slip" name="lower_underpants"/> + <texture_picker label="Calzini" name="lower_socks"/> + <texture_picker label="Scarpe" name="lower_shoes"/> + <texture_picker label="Pantaloni" name="lower_pants"/> + <texture_picker label="Giacca" name="lower_jacket"/> + <texture_picker label="Alpha inferiore" name="lower_alpha"/> + <texture_picker label="Tattuaggio inferiore" name="lower_tattoo"/> + <texture_picker label="Gonna" name="skirt-baked"/> + <texture_picker label="Gonna" name="skirt"/> + </panel> </panel> </scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/it/floater_buy_currency_html.xml new file mode 100644 index 0000000000..4a1bf33403 --- /dev/null +++ b/indra/newview/skins/default/xui/it/floater_buy_currency_html.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_buy_currency_html" title="ACQUISTA VALUTA"/> diff --git a/indra/newview/skins/default/xui/it/floater_buy_land.xml b/indra/newview/skins/default/xui/it/floater_buy_land.xml index 2e78168209..f3b30f7048 100644 --- a/indra/newview/skins/default/xui/it/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/it/floater_buy_land.xml @@ -124,9 +124,6 @@ consente [AMOUNT2] oggetti <floater.string name="no_parcel_selected"> (nessun terreno selezionato) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Regione: </text> diff --git a/indra/newview/skins/default/xui/it/floater_camera.xml b/indra/newview/skins/default/xui/it/floater_camera.xml index febbfd2739..f524bf9874 100644 --- a/indra/newview/skins/default/xui/it/floater_camera.xml +++ b/indra/newview/skins/default/xui/it/floater_camera.xml @@ -9,35 +9,28 @@ <floater.string name="move_tooltip"> Muovi la telecamera su e giù e a sinistra e destra </floater.string> - <floater.string name="orbit_mode_title"> - Ruota visuale + <floater.string name="camera_modes_title"> + Modalità della fotocamera </floater.string> <floater.string name="pan_mode_title"> - Panoramica + Ruota visuale - Ingrandisci - Panoramica </floater.string> - <floater.string name="avatar_view_mode_title"> - Valori predefiniti + <floater.string name="presets_mode_title"> + Visuali predefinite </floater.string> <floater.string name="free_mode_title"> Vedi oggetto </floater.string> <panel name="controls"> - <joystick_track name="cam_track_stick" tool_tip="Sposta la visuale in su e in giù, a sinistra e a destra"/> <panel name="zoom" tool_tip="Avvicina la telecamera nell'inquadratura"> + <joystick_rotate name="cam_rotate_stick" tool_tip="Ruota la visuale intorno al punto focale"/> <slider_bar name="zoom_slider" tool_tip="Zoom verso il centro focale"/> - </panel> - <joystick_rotate name="cam_rotate_stick" tool_tip="Ruota la visuale intorno al punto focale"/> - <panel name="camera_presets"> - <button name="rear_view" tool_tip="Visuale posteriore"/> - <button name="group_view" tool_tip="Visuale di gruppo"/> - <button name="front_view" tool_tip="Visuale frontale"/> - <button name="mouselook_view" tool_tip="Visuale soggettiva"/> + <joystick_track name="cam_track_stick" tool_tip="Sposta la visuale in su e in giù, a sinistra e a destra"/> </panel> </panel> <panel name="buttons"> - <button label="" name="orbit_btn" tool_tip="Ruota la visuale"/> - <button label="" name="pan_btn" tool_tip="Visuale panoramica"/> - <button label="" name="avatarview_btn" tool_tip="Valori predefiniti"/> - <button label="" name="freecamera_btn" tool_tip="Vedi oggetto"/> + <button label="" name="presets_btn" tool_tip="Visuali predefinite"/> + <button label="" name="pan_btn" tool_tip="Ruota visuale - Ingrandisci - Panoramica"/> + <button label="" name="avatarview_btn" tool_tip="Modalità della fotocamera"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_incoming_call.xml b/indra/newview/skins/default/xui/it/floater_incoming_call.xml index 81a6ea7a60..4d9c1b98dd 100644 --- a/indra/newview/skins/default/xui/it/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/it/floater_incoming_call.xml @@ -16,7 +16,13 @@ ha aderito ad una chiamata in chat vocale in conferenza. </floater.string> <floater.string name="VoiceInviteGroup"> - ha accettato una chiamata in Chat vocale con il gruppo [GROUP]. + ha appena aderito al canale voce '[GROUP]'. + </floater.string> + <floater.string name="VoiceInviteQuestionGroup"> + Vuoi abbandonare [CURRENT_CHAT] e aderire alla chiamata con '[GROUP]'? + </floater.string> + <floater.string name="VoiceInviteQuestionDefault"> + Vuoi abbandonare [CURRENT_CHAT] e aderire a questa voice chat? </floater.string> <text name="question"> Vuoi abbandonare [CURRENT_CHAT] e aderire a questa voice chat? diff --git a/indra/newview/skins/default/xui/it/floater_map.xml b/indra/newview/skins/default/xui/it/floater_map.xml index 70ab8dcb5a..d1e9c98e79 100644 --- a/indra/newview/skins/default/xui/it/floater_map.xml +++ b/indra/newview/skins/default/xui/it/floater_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Map" title="Mini mappa"> +<floater name="Map" title=""> <floater.string name="mini_map_north"> N </floater.string> diff --git a/indra/newview/skins/default/xui/it/floater_moveview.xml b/indra/newview/skins/default/xui/it/floater_moveview.xml index 26d861c566..cdafdb0089 100644 --- a/indra/newview/skins/default/xui/it/floater_moveview.xml +++ b/indra/newview/skins/default/xui/it/floater_moveview.xml @@ -6,18 +6,48 @@ <string name="walk_back_tooltip"> Cammina indietro (premi freccia giù o S) </string> + <string name="walk_left_tooltip"> + Cammina a sinistra (premi Maiusc + freccia sinistra o A) + </string> + <string name="walk_right_tooltip"> + Cammina a destra (premi Maiusc + freccia destra o D) + </string> <string name="run_forward_tooltip"> Corri in avanti (premi freccia su o W) </string> <string name="run_back_tooltip"> Corri indietro (premi freccia giù o S) </string> + <string name="run_left_tooltip"> + Corri a sinistra (premi Maiusc + freccia sinistra o A) + </string> + <string name="run_right_tooltip"> + Corri a destra (premi Maiusc + freccia destra o D) + </string> <string name="fly_forward_tooltip"> Vola in avanti (premi freccia su o W) </string> <string name="fly_back_tooltip"> Vola indietro (premi freccia giù o S) </string> + <string name="fly_left_tooltip"> + Vola a sinistra (premi Maiusc + freccia sinistra o A) + </string> + <string name="fly_right_tooltip"> + Vola a destra (premi Maiusc + freccia destra o D) + </string> + <string name="fly_up_tooltip"> + Vola in alto (premi E) + </string> + <string name="fly_down_tooltip"> + Vola in basso (premi C) + </string> + <string name="jump_tooltip"> + Salta (premi E) + </string> + <string name="crouch_tooltip"> + Accovacciarsi (premi C) + </string> <string name="walk_title"> Cammina </string> @@ -28,10 +58,12 @@ Vola </string> <panel name="panel_actions"> + <button label="" label_selected="" name="move up btn" tool_tip="Vola in alto (premi E)"/> <button label="" label_selected="" name="turn left btn" tool_tip="Gira a sinistra (premi freccia sinistra o A)"/> + <joystick_slide name="move left btn" tool_tip="Cammina a sinistra (premi Maiusc + freccia sinistra o A)"/> + <button label="" label_selected="" name="move down btn" tool_tip="Vola in basso (premi C)"/> <button label="" label_selected="" name="turn right btn" tool_tip="Gira a destra (premi freccia destra o D)"/> - <button label="" label_selected="" name="move up btn" tool_tip="Vola in alto, premi E"/> - <button label="" label_selected="" name="move down btn" tool_tip="Vola in basso, premi C"/> + <joystick_slide name="move right btn" tool_tip="Cammina a destra (premi Maiusc + freccia destra o D)"/> <joystick_turn name="forward btn" tool_tip="Cammina in avanti (premi freccia su o W)"/> <joystick_turn name="backward btn" tool_tip="Cammina indietro (premi freccia giù o S)"/> </panel> diff --git a/indra/newview/skins/default/xui/it/floater_preview_notecard.xml b/indra/newview/skins/default/xui/it/floater_preview_notecard.xml index 70e28dde35..7ec229f9d3 100644 --- a/indra/newview/skins/default/xui/it/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/it/floater_preview_notecard.xml @@ -9,9 +9,6 @@ <floater.string name="Title"> Biglietto: [NAME] </floater.string> - <floater.string label="Salva" label_selected="Salva" name="Save"> - Salva - </floater.string> <text name="desc txt"> Descrizione: </text> @@ -19,4 +16,5 @@ In caricamento... </text_editor> <button label="Salva" label_selected="Salva" name="Save"/> + <button label="Elimina" label_selected="Elimina" name="Delete"/> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_snapshot.xml b/indra/newview/skins/default/xui/it/floater_snapshot.xml index 2f5c86985c..d2ba980f62 100644 --- a/indra/newview/skins/default/xui/it/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/it/floater_snapshot.xml @@ -5,12 +5,19 @@ </floater.string> <button label="Aggiorna la fotografia" name="new_snapshot_btn"/> <line_editor label="Descrizione" name="description"/> - <button label="Condividi foto" name="share"/> - <button label="Condividi su Web" name="share_to_web"/> - <button label="Salva nell'inventario" name="save_to_inventory"/> - <button label="Salva foto" name="save"/> - <button label="Invia foto via e-mail" name="share_to_email"/> - <button label="Salva sul mio computer" name="save_to_computer"/> - <button label="Imposta come foto del profilo" name="set_profile_pic"/> - <button label="Indietro" name="cancel"/> + <panel name="panel_snapshot_main"> + <button label="Condividi foto" name="share"/> + <button label="Salva foto" name="save"/> + <button label="Imposta come foto del profilo" name="set_profile_pic"/> + </panel> + <panel name="panel_snapshot_share"> + <button label="Condividi su Web" name="share_to_web"/> + <button label="Invia foto via e-mail" name="share_to_email"/> + <button label="Indietro" name="cancel_share"/> + </panel> + <panel name="panel_snapshot_save"> + <button label="Salva nell'inventario" name="save_to_inventory"/> + <button label="Salva sul mio computer" name="save_to_computer"/> + <button label="Indietro" name="cancel_save"/> + </panel> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index 04d61b97ff..68d193ff33 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -67,9 +67,9 @@ <text name="RenderingCost" tool_tip="Mostra il costo di rendering calcolato per questo oggetto"> þ: [COUNT] </text> - <check_box name="checkbox uniform"/> - <text name="checkbox uniform label"> - Ridimens. simmetricamente + <check_box label="" name="checkbox uniform"/> + <text label="Allunga entrambi i lati" name="checkbox uniform label"> + Allunga entrambi i lati </text> <check_box initial_value="true" label="Ridimensiona le texture" name="checkbox stretch textures"/> <check_box initial_value="true" label="Posiziona nella griglia" name="checkbox snap to grid"/> @@ -445,8 +445,8 @@ <check_box label="Inverti" name="checkbox flip s"/> <spinner label="Verticale (V)" name="TexScaleV"/> <check_box label="Inverti" name="checkbox flip t"/> - <spinner label="Rotazione˚" name="TexRot" /> - <spinner label="Ripetizioni / Metro" name="rptctrl" /> + <spinner label="Rotazione˚" name="TexRot"/> + <spinner label="Ripetizioni / Metro" name="rptctrl"/> <button label="Applica" label_selected="Applica" name="button apply"/> <text name="tex offset"> Bilanciamento della texture diff --git a/indra/newview/skins/default/xui/it/floater_voice_controls.xml b/indra/newview/skins/default/xui/it/floater_voice_controls.xml index 07368da0dd..d2fd462062 100644 --- a/indra/newview/skins/default/xui/it/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/it/floater_voice_controls.xml @@ -19,8 +19,10 @@ <layout_panel name="my_panel"> <text name="user_text" value="Il mio avatar:"/> </layout_panel> - <layout_panel name="leave_call_btn_panel"> - <button label="Abbandona chiamata" name="leave_call_btn"/> - </layout_panel> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Abbandona chiamata" name="leave_call_btn"/> + </layout_panel> + </layout_stack> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_voice_effect.xml b/indra/newview/skins/default/xui/it/floater_voice_effect.xml new file mode 100644 index 0000000000..202be752c9 --- /dev/null +++ b/indra/newview/skins/default/xui/it/floater_voice_effect.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater label="Luoghi" name="voice_effects" title="ANTEPRIMA MANIPOLAZIONE VOCE"> + <string name="no_voice_effect"> + (Nessuna manipolazione voce) + </string> + <string name="active_voice_effect"> + (Attivato) + </string> + <string name="unsubscribed_voice_effect"> + (Iscrizione annullata) + </string> + <string name="new_voice_effect"> + (Nuovo!) + </string> + <text name="status_text"> + Per ascoltare un'anteprima degli effetti di manipolazione della voce, clicca sul pulsante Registra per registrare un campione di voce, quindi fai clic su uno degli effetti per ascoltare il risultato. + +Per ricollegarti alla voce nei dintorni, chiudi la finestra. + </text> + <button label="Registra campione" name="record_btn" tool_tip="Registra un campione della tua voce."/> + <button label="Ferma" name="record_stop_btn"/> + <text name="voice_morphing_link"> + [[URL] Ottieni manipolazione voce] + </text> + <scroll_list name="voice_effect_list" tool_tip="Registra un campione della tua voce, quindi fai clic su uno degli effetti per un'anteprima del risultato."> + <scroll_list.columns label="Manipolazione voce" name="name"/> + <scroll_list.columns label="Scade il" name="expires"/> + </scroll_list> +</floater> diff --git a/indra/newview/skins/default/xui/it/inspect_object.xml b/indra/newview/skins/default/xui/it/inspect_object.xml index fd58c18e0b..d8ab10cfda 100644 --- a/indra/newview/skins/default/xui/it/inspect_object.xml +++ b/indra/newview/skins/default/xui/it/inspect_object.xml @@ -9,7 +9,7 @@ </string> <string name="CreatorAndOwner"> Di [CREATOR] -proprietario [OWNER] +Proprietario [OWNER] </string> <string name="Price"> L$ [AMOUNT] @@ -23,6 +23,13 @@ proprietario [OWNER] <string name="Sit"> Siediti </string> + <text name="object_name" value="Nome oggetto di prova che si trova su due righe ed è molto lungo"/> + <text name="price_text"> + L$ 30.000 + </text> + <text name="object_description"> + Questa è una descrizione di un oggetto che è molto lunga ed è di almeno 80 caratteri, ma potrebbe essere di 120 caratteri a questo punto. Chi lo sa veramente? + </text> <button label="Acquista" name="buy_btn"/> <button label="Paga" name="pay_btn"/> <button label="Prendi copia" name="take_free_copy_btn"/> diff --git a/indra/newview/skins/default/xui/it/menu_attachment_self.xml b/indra/newview/skins/default/xui/it/menu_attachment_self.xml index 054f4802e6..c480a2fe0e 100644 --- a/indra/newview/skins/default/xui/it/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/it/menu_attachment_self.xml @@ -5,7 +5,7 @@ <menu_item_call label="Stacca" name="Detach"/> <menu_item_call label="Lascia" name="Drop"/> <menu_item_call label="Alzati" name="Stand Up"/> - <menu_item_call label="Il mio aspetto" name="Appearance..."/> + <menu_item_call label="Cambia vestiario" name="Change Outfit"/> <menu_item_call label="I miei amici..." name="Friends..."/> <menu_item_call label="I miei gruppi" name="Groups..."/> <menu_item_call label="Il mio profilo" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/it/menu_avatar_self.xml b/indra/newview/skins/default/xui/it/menu_avatar_self.xml index d73d97d499..7796d41286 100644 --- a/indra/newview/skins/default/xui/it/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/it/menu_avatar_self.xml @@ -20,7 +20,9 @@ <context_menu label="Stacca ▶" name="Object Detach"/> <menu_item_call label="Stacca tutto" name="Detach All"/> </context_menu> - <menu_item_call label="Il mio aspetto" name="Appearance..."/> + <menu_item_call label="Cambia vestiario" name="Chenge Outfit"/> + <menu_item_call label="Modifica il mio vestiario" name="Edit Outfit"/> + <menu_item_call label="Modifica la figura corporea" name="Edit My Shape"/> <menu_item_call label="I miei amici..." name="Friends..."/> <menu_item_call label="I miei gruppi" name="Groups..."/> <menu_item_call label="Il mio profilo" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/it/menu_bottomtray.xml b/indra/newview/skins/default/xui/it/menu_bottomtray.xml index 7203d002d2..8ca5b24b48 100644 --- a/indra/newview/skins/default/xui/it/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/it/menu_bottomtray.xml @@ -4,6 +4,11 @@ <menu_item_check label="Tasto Movimento" name="ShowMoveButton"/> <menu_item_check label="Tasto Visuale" name="ShowCameraButton"/> <menu_item_check label="Tasto Foto" name="ShowSnapshotButton"/> + <menu_item_check label="Pulsante barra laterale" name="ShowSidebarButton"/> + <menu_item_check label="Pulsante Costruisci" name="ShowBuildButton"/> + <menu_item_check label="Pulsante Cerca" name="ShowSearchButton"/> + <menu_item_check label="Pulsante Mappa" name="ShowWorldMapButton"/> + <menu_item_check label="Pulsante Mini mappa" name="ShowMiniMapButton"/> <menu_item_call label="Taglia" name="NearbyChatBar_Cut"/> <menu_item_call label="Copia" name="NearbyChatBar_Copy"/> <menu_item_call label="Incolla" name="NearbyChatBar_Paste"/> diff --git a/indra/newview/skins/default/xui/it/menu_cof_attachment.xml b/indra/newview/skins/default/xui/it/menu_cof_attachment.xml new file mode 100644 index 0000000000..699490c8f1 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_cof_attachment.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="COF Attachment"> + <menu_item_call label="Stacca" name="detach"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_cof_body_part.xml b/indra/newview/skins/default/xui/it/menu_cof_body_part.xml new file mode 100644 index 0000000000..1e3658ef45 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_cof_body_part.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="COF Body"> + <menu_item_call label="Sostituisci" name="replace"/> + <menu_item_call label="Modifica" name="edit"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_cof_clothing.xml b/indra/newview/skins/default/xui/it/menu_cof_clothing.xml new file mode 100644 index 0000000000..5b4f8c0642 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_cof_clothing.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="COF Clothing"> + <menu_item_call label="Togli" name="take_off"/> + <menu_item_call label="Un livello in alto" name="move_up"/> + <menu_item_call label="Un livello in basso" name="move_down"/> + <menu_item_call label="Modifica" name="edit"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_cof_gear.xml b/indra/newview/skins/default/xui/it/menu_cof_gear.xml new file mode 100644 index 0000000000..10524ba92d --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_cof_gear.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="Gear COF"> + <menu label="Nuovi abiti" name="COF.Gear.New_Clothes"/> + <menu label="Nuove parti del corpo" name="COF.Geear.New_Body_Parts"/> +</menu> diff --git a/indra/newview/skins/default/xui/it/menu_hide_navbar.xml b/indra/newview/skins/default/xui/it/menu_hide_navbar.xml index ee50a18ba5..2c2c6c4bc5 100644 --- a/indra/newview/skins/default/xui/it/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/it/menu_hide_navbar.xml @@ -2,4 +2,5 @@ <menu name="hide_navbar_menu"> <menu_item_check label="Mostra la barra di navigazione" name="ShowNavbarNavigationPanel"/> <menu_item_check label="Mostra la barra dei Preferiti" name="ShowNavbarFavoritesPanel"/> + <menu_item_check label="Mostra mini barra del luogo" name="ShowMiniLocationPanel"/> </menu> diff --git a/indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml index 33229bb7c0..80edae8a2b 100644 --- a/indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <menu name="Gear Menu"> <menu_item_call label="Alzati" name="stand_up"/> - <menu_item_call label="Il mio aspetto" name="my_appearance"/> + <menu_item_call label="Cambia vestiario" name="change_outfit"/> <menu_item_call label="Il mio profilo" name="my_profile"/> <menu_item_call label="I miei amici..." name="my_friends"/> <menu_item_call label="I miei gruppi" name="my_groups"/> diff --git a/indra/newview/skins/default/xui/it/menu_inventory.xml b/indra/newview/skins/default/xui/it/menu_inventory.xml index 3b36198774..fb8361ad05 100644 --- a/indra/newview/skins/default/xui/it/menu_inventory.xml +++ b/indra/newview/skins/default/xui/it/menu_inventory.xml @@ -54,6 +54,7 @@ <menu_item_call label="Elimina oggetto" name="Purge Item"/> <menu_item_call label="Ripristina oggetto" name="Restore Item"/> <menu_item_call label="Apri" name="Open"/> + <menu_item_call label="Apri originale" name="Open Original"/> <menu_item_call label="Proprietà" name="Properties"/> <menu_item_call label="Rinomina" name="Rename"/> <menu_item_call label="Copia UUID dell'oggetto" name="Copy Asset UUID"/> @@ -80,6 +81,7 @@ <menu label="Attacca all'HUD" name="Attach To HUD"/> <menu_item_call label="Modifica" name="Wearable Edit"/> <menu_item_call label="Indossa" name="Wearable Wear"/> + <menu_item_call label="Aggiungi" name="Wearable Add"/> <menu_item_call label="Togli" name="Take Off"/> <menu_item_call label="--nessuna opzione--" name="--no options--"/> </menu> diff --git a/indra/newview/skins/default/xui/it/menu_login.xml b/indra/newview/skins/default/xui/it/menu_login.xml index 904b819198..0a6d803058 100644 --- a/indra/newview/skins/default/xui/it/menu_login.xml +++ b/indra/newview/skins/default/xui/it/menu_login.xml @@ -2,7 +2,7 @@ <menu_bar name="Login Menu"> <menu label="Io" name="File"> <menu_item_call label="Preferenze" name="Preferences..."/> - <menu_item_call label="Chiudi" name="Quit"/> + <menu_item_call label="Esci da [APP_NAME]" name="Quit"/> </menu> <menu label="Aiuto" name="Help"> <menu_item_call label="Aiuto di [SECOND_LIFE]" name="Second Life Help"/> diff --git a/indra/newview/skins/default/xui/it/menu_outfit_gear.xml b/indra/newview/skins/default/xui/it/menu_outfit_gear.xml new file mode 100644 index 0000000000..cf39779b67 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_outfit_gear.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="Gear Outfit"> + <menu_item_call label="Indossa - Sostituisci vestiario attuale" name="wear"/> + <menu_item_call label="Togli - Rimuovi dal vestiario attuale" name="take_off"/> + <menu label="Nuovi abiti" name="New Clothes"> + <menu_item_call label="Nuova camicia" name="New Shirt"/> + <menu_item_call label="Nuovi pantaloni" name="New Pants"/> + <menu_item_call label="Nuove scarpe" name="New Shoes"/> + <menu_item_call label="Nuove calze" name="New Socks"/> + <menu_item_call label="Nuova giacca" name="New Jacket"/> + <menu_item_call label="Nuova gonna" name="New Skirt"/> + <menu_item_call label="Nuovi guanti" name="New Gloves"/> + <menu_item_call label="Nuova maglietta intima" name="New Undershirt"/> + <menu_item_call label="Nuovi slip" name="New Underpants"/> + <menu_item_call label="Nuovo Alpha (trasparenza)" name="New Alpha"/> + <menu_item_call label="Nuovo tatuaggio" name="New Tattoo"/> + </menu> + <menu label="Nuove parti del corpo" name="New Body Parts"> + <menu_item_call label="Nuova figura corporea" name="New Shape"/> + <menu_item_call label="Nuova pelle" name="New Skin"/> + <menu_item_call label="Nuovi capelli" name="New Hair"/> + <menu_item_call label="Nuovi occhi" name="New Eyes"/> + </menu> + <menu_item_call label="Cambia nome del vestiario" name="rename"/> + <menu_item_call label="Elimina vestito" name="delete_outfit"/> +</menu> diff --git a/indra/newview/skins/default/xui/it/menu_outfit_tab.xml b/indra/newview/skins/default/xui/it/menu_outfit_tab.xml new file mode 100644 index 0000000000..4e0caf832c --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_outfit_tab.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="Outfit"> + <menu_item_call label="Indossa - Sostituisci vestiario attuale" name="wear_replace"/> + <menu_item_call label="Indossa - Aggiungi al vestiario attuale" name="wear_add"/> + <menu_item_call label="Togli - Rimuovi dal vestiario attuale" name="take_off"/> + <menu_item_call label="Modifica vestiario" name="edit"/> + <menu_item_call label="Modifica nome" name="rename"/> + <menu_item_call label="Elimina vestito" name="delete"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_participant_list.xml b/indra/newview/skins/default/xui/it/menu_participant_list.xml index 71f1a9a0da..f70b886a1e 100644 --- a/indra/newview/skins/default/xui/it/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/it/menu_participant_list.xml @@ -14,8 +14,8 @@ <context_menu label="Opzioni moderatore >" name="Moderator Options"> <menu_item_check label="Consenti chat di testo" name="AllowTextChat"/> <menu_item_call label="Disattiva audio di questo participante" name="ModerateVoiceMuteSelected"/> - <menu_item_call label="Disattiva audio di tutti gli altri" name="ModerateVoiceMuteOthers"/> <menu_item_call label="Riattiva audio di questo participante" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="Riattiva audio di tutti gli altri" name="ModerateVoiceUnMuteOthers"/> + <menu_item_call label="Disattiva audio di tutti" name="ModerateVoiceMute"/> + <menu_item_call label="Riattiva audio di tutti" name="ModerateVoiceUnmute"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_save_outfit.xml b/indra/newview/skins/default/xui/it/menu_save_outfit.xml index ac7b40ca48..4882a8ac64 100644 --- a/indra/newview/skins/default/xui/it/menu_save_outfit.xml +++ b/indra/newview/skins/default/xui/it/menu_save_outfit.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <toggleable_menu name="save_outfit_menu"> <menu_item_call label="Salva" name="save_outfit"/> - <menu_item_call label="Salva come nuovo" name="save_as_new_outfit"/> + <menu_item_call label="Salva con nome" name="save_as_new_outfit"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index a5923ac42b..693f4f158e 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -7,10 +7,11 @@ </menu_item_call> <menu_item_call label="Compra L$" name="Buy and Sell L$"/> <menu_item_call label="Il mio profilo" name="Profile"/> - <menu_item_call label="Il mio aspetto" name="Appearance"/> + <menu_item_call label="Cambia vestiario" name="ChangeOutfit"/> <menu_item_check label="Il mio inventario" name="Inventory"/> <menu_item_check label="Il mio inventario" name="ShowSidetrayInventory"/> <menu_item_check label="Le mie gesture" name="Gestures"/> + <menu_item_check label="La mia voce" name="ShowVoice"/> <menu label="Il mio stato" name="Status"> <menu_item_call label="Assente" name="Set Away"/> <menu_item_call label="Non disponibile" name="Set Busy"/> @@ -70,6 +71,12 @@ <menu_item_call label="Collegamento" name="Link"/> <menu_item_call label="Scollega" name="Unlink"/> <menu_item_check label="Modifica le parti collegate" name="Edit Linked Parts"/> + <menu label="Seleziona parti collegate" name="Select Linked Parts"> + <menu_item_call label="Seleziona parte successiva" name="Select Next Part"/> + <menu_item_call label="Seleziona parte precedente" name="Select Previous Part"/> + <menu_item_call label="Includi parte successiva" name="Include Next Part"/> + <menu_item_call label="Includi parte precedente" name="Include Previous Part"/> + </menu> <menu_item_call label="Ingrandisci selezione" name="Focus on Selection"/> <menu_item_call label="Zoom sulla selezione" name="Zoom to Selection"/> <menu label="Oggetto" name="Object"> @@ -100,11 +107,11 @@ <menu_item_call label="Usa la selezione per la griglia" name="Use Selection for Grid"/> <menu_item_call label="Opzioni della griglia" name="Grid Options"/> </menu> - <menu label="Seleziona parti collegate" name="Select Linked Parts"> - <menu_item_call label="Seleziona parte successiva" name="Select Next Part"/> - <menu_item_call label="Seleziona parte precedente" name="Select Previous Part"/> - <menu_item_call label="Includi parte successiva" name="Include Next Part"/> - <menu_item_call label="Includi parte precedente" name="Include Previous Part"/> + <menu label="Carica sul server" name="Upload"> + <menu_item_call label="Immagine ([COST] L$)..." name="Upload Image"/> + <menu_item_call label="Suono ([COST] L$)..." name="Upload Sound"/> + <menu_item_call label="Animazione ([COST] L$)..." name="Upload Animation"/> + <menu_item_call label="In blocco ([COST] L$ per file)..." name="Bulk Upload"/> </menu> </menu> <menu label="Aiuto" name="Help"> @@ -162,6 +169,7 @@ <menu_item_check label="Oggetti flessibili" name="Flexible Objects"/> </menu> <menu_item_check label="Esegui thread multipli" name="Run Multiple Threads"/> + <menu_item_check label="Usa thread lettura plugin" name="Use Plugin Read Thread"/> <menu_item_call label="Pulisci cache di gruppo" name="ClearGroupCache"/> <menu_item_check label="Fluidità mouse" name="Mouse Smoothing"/> <menu label="Scorciatoie" name="Shortcuts"> @@ -188,7 +196,6 @@ <menu_item_call label="Zoom avanti" name="Zoom In"/> <menu_item_call label="Zoom predefinito" name="Zoom Default"/> <menu_item_call label="Zoom indietro" name="Zoom Out"/> - <menu_item_call label="Alterna schermo intero" name="Toggle Fullscreen"/> </menu> <menu_item_call label="Mostra impostazioni di debug" name="Debug Settings"/> <menu_item_check label="Mostra menu sviluppo" name="Debug Mode"/> diff --git a/indra/newview/skins/default/xui/it/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/it/menu_wearable_list_item.xml new file mode 100644 index 0000000000..79ef188993 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_wearable_list_item.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="Outfit Wearable Context Menu"> + <menu_item_call label="Indossa" name="wear"/> + <menu_item_call label="Aggiungi" name="wear_add"/> + <menu_item_call label="Togli / Stacca" name="take_off_or_detach"/> + <menu_item_call label="Stacca" name="detach"/> + <context_menu label="Attacca a ▶" name="wearable_attach_to"/> + <context_menu label="Attacca a HUD ▶" name="wearable_attach_to_hud"/> + <menu_item_call label="Togli" name="take_off"/> + <menu_item_call label="Modifica" name="edit"/> + <menu_item_call label="Profilo dell'oggetto" name="object_profile"/> + <menu_item_call label="Mostra originale" name="show_original"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index 4739e5cce9..9f1472fc6f 100644 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -326,6 +326,9 @@ Hai bisogno di un account per entrare in [SECOND_LIFE]. Ne vuoi creare uno adess </url> <usetemplate name="okcancelbuttons" notext="Riprova" yestext="Crea un nuovo account"/> </notification> + <notification name="InvalidCredentialFormat"> + Immetti sia il nome che il cognome del tuo avatar nel campo del nome utente, quindi effettua l'accesso. + </notification> <notification name="AddClassified"> L'inserzione comparirà nella sezione 'Annunci' della Ricerca e su [http://secondlife.com/community/classifieds secondlife.com] per una settimana. Compila la tua inserzione, quindi clicca 'Pubblica...' per aggiungerla all'elenco degli annunci. @@ -469,8 +472,9 @@ La qualità grafica può essere aumentata in Preferenze > Grafica. La regione [REGION] non consente di terraformare. </notification> <notification name="CannotCopyWarning"> - Non hai il permesso di copiare questo elemento e lo perderai dal tuo inventario se lo regali. -Confermi veramente di offrire questo elemento? + Non hai l'autorizzazione a copiare i seguenti oggetti: +[ITEMS] +e se li dai via, verranno eliminati dal tuo inventario. Sicuro di volere offrire questi oggetti? <usetemplate name="okcancelbuttons" notext="No" yestext="Si"/> </notification> <notification name="CannotGiveItem"> @@ -608,6 +612,11 @@ Attese [VALIDS] <notification name="CannotEncodeFile"> Impossibile codificare il file: [FILE] </notification> + <notification name="CorruptedProtectedDataStore"> + Poiché non è possibile leggere i dati protetti, ora verranno ripristinati. + Ciò può succedere alla modifica delle impostazioni di rete. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="CorruptResourceFile"> File risorsa corrotto: [FILE] </notification> @@ -934,6 +943,26 @@ Offri l'amicizia a [NAME]? <button name="Cancel" text="Annulla"/> </form> </notification> + <notification label="Salva capo da indossare" name="SaveWearableAs"> + Salva oggetto nel mio inventario come: + <form name="form"> + <input name="message"> + [DESC] (nuovo) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Annulla"/> + </form> + </notification> + <notification label="Cambia nome del vestiario" name="RenameOutfit"> + Nuovo nome per il vestiario: + <form name="form"> + <input name="new_name"> + [NAME] + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Annulla"/> + </form> + </notification> <notification name="RemoveFromFriends"> Vuoi rimuovere remove [FIRST_NAME] [LAST_NAME] dalla lista dei tuoi amici? <usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/> @@ -968,6 +997,12 @@ su TUTTI I TERRENI di questa sim? Introduci un prezzo più alto. </notification> + <notification name="ConfirmItemDeleteHasLinks"> + Almeno uno degli oggetti selezionati è collegato tramite link ad altri oggetti. Se elimini l'oggetto, i relativi link non funzioneranno più. Pertanto si consiglia vivamente di eliminare prima i link. + +Sei sicuro di volere eliminare gli oggetti? + <usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/> + </notification> <notification name="ConfirmObjectDeleteLock"> Almeno uno degli elementi selezionati è bloccato. @@ -1117,6 +1152,42 @@ Premi F1 in qualunque momento per la guida o per apprendere altre cose di [SECON Scegli un avatar maschile o femminile. Puoi sempre cambiare idea più tardi. <usetemplate name="okcancelbuttons" notext="Femminile" yestext="Maschile"/> </notification> + <notification name="CantTeleportToGrid"> + Impossibile effettuare il teleport su [SLURL], in quanto si trova su una griglia ([GRID]) diversa da quella attuale ([CURRENT_GRID]). Chiudi il viewer e prova nuovamente. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="GeneralCertificateError"> + Impossibile collegarsi al server. +[REASON] + +Nome oggetto: [SUBJECT_NAME_STRING] +Nome emittente: [ISSUER_NAME_STRING] +Valido da: [VALID_FROM] +Valido fino a: [VALID_TO] +Impronta MD5: [SHA1_DIGEST] +Impronta SHA1: [MD5_DIGEST] +Uso chiave: [KEYUSAGE] +Uso chiave estesa: [EXTENDEDKEYUSAGE] +Identificatore chiave oggetto: [SUBJECTKEYIDENTIFIER] + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TrustCertificateError"> + Autorità di certificazione di questo server sconosciuta. + +Informazioni sul certificato: +Nome oggetto: [SUBJECT_NAME_STRING] +Nome emittente: [ISSUER_NAME_STRING] +Valido da: [VALID_FROM] +Valido fino a: [VALID_TO] +Impronta MD5: [SHA1_DIGEST] +Impronta SHA1: [MD5_DIGEST] +Uso chiave: [KEYUSAGE] +Uso chiave estesa: [EXTENDEDKEYUSAGE] +Identificatore chiave oggetto: [SUBJECTKEYIDENTIFIER] + +Accettare questa autorità? + <usetemplate name="okcancelbuttons" notext="Annulla" yestext="Accetta"/> + </notification> <notification name="NotEnoughCurrency"> [NAME] [PRICE]L$ Non hai abbastanza L$ per farlo. </notification> @@ -1510,9 +1581,9 @@ Vuoi andare alla Knowledge Base per ulteriori informazioni sulle categorie di ac Non sei ammesso in questa regione a causa della tua categoria d'accesso. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Non ti è consentito entrare in quella regione a causa della tua categoria di accesso impostata nelle preferenze. + Non ti è consentito entrare in quella regione a causa della categoria di accesso impostata nelle preferenze. -Puoi cliccare su Cambia preferenze per modificare la categoria di accesso e quindi riuscire ad entrare. Da adesso potrai accedere ai contenuti [REGIONMATURITY] ed effettuare ricerche in questa categoria. Se in seguito tu volessi cambiare di nuovo le tue impostazioni, apri la finestra di dialogo da Io > Preferenze > Generale. +Per entrare nella regione, dovrai modificare la tua categoria di accesso. Ciò ti consentirà inoltre di effettuare ricerche di contenuti di categoria [REGIONMATURITY]. Per annullare le modifiche in un secondo momento, vai a Io > Preferenze > Generali. <form name="form"> <button name="OK" text="Cambia preferenza"/> <button default="true" name="Cancel" text="Chiudi"/> @@ -2283,15 +2354,6 @@ Riprova tra qualche istante. <button name="Mute" text="Blocca"/> </form> </notification> - <notification name="ObjectGiveItemUnknownUser"> - Un oggetto chiamato [OBJECTFROMNAME] di proprietà di (residente sconosciuto) ti ha dato questo [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button name="Keep" text="Prendi"/> - <button name="Discard" text="Rifiuta"/> - <button name="Mute" text="Blocca"/> - </form> - </notification> <notification name="UserGiveItem"> [NAME_SLURL] ti ha dato questo [OBJECTTYPE]: [ITEM_SLURL] @@ -2536,6 +2598,21 @@ Clicca su Accetta per unirti alla chat oppure su Declina per declinare l'in <notification name="VoiceLoginRetry"> Stiamo creando una canale voice per te. Questo può richiedere fino a un minuto. </notification> + <notification name="VoiceEffectsExpired"> + Almeno una delle manipolazioni vocali alle quali sei iscritto è scaduta. +[[URL] Fai clic qui] per rinnovare l'abbonamento. + </notification> + <notification name="VoiceEffectsExpiredInUse"> + Poiché la manipolazione vocale attiva è scaduta, sono state applicate le tue impostazioni normali. +[[URL] Fai clic qui] per rinnovare l'abbonamento. + </notification> + <notification name="VoiceEffectsWillExpire"> + Almeno una delle tue manipolazioni vocali scadrà tra meno di [INTERVAL] giorni. +[[URL] Fai clic qui] per rinnovare l'abbonamento. + </notification> + <notification name="VoiceEffectsNew"> + Sono disponibili nuove manipolazioni vocali. + </notification> <notification name="Cannot enter parcel: not a group member"> Soltanto i membri di un determinato gruppo possono visitare questa zona. </notification> @@ -2602,10 +2679,94 @@ Per sicurezza, verranno bloccati per alcuni secondi. Il pulsante verrà visualizzato quando lo spazio sarà sufficiente. </notification> <notification name="ShareNotification"> - Trascina articoli dell'inventario su una persona nel selettore residenti + Scegli i residenti con i quali condividere. + </notification> + <notification name="ShareItemsConfirmation"> + Sei sicuro di volere condividere gli oggetti + +[ITEMS] + +Con i seguenti residenti? + +[RESIDENTS] + <usetemplate name="okcancelbuttons" notext="Annulla" yestext="Ok"/> + </notification> + <notification name="ItemsShared"> + Gli oggetti sono stati condivisi. + </notification> + <notification name="DeedToGroupFail"> + Cessione al gruppo non riuscita. </notification> <notification name="AvatarRezNotification"> - Avatar '[NAME]' rezzato in [TIME] secondi. + ( in esistenza da [EXISTENCE] secondi ) +Nuvola avatar '[NAME]' dileguata dopo [TIME] secondi. + </notification> + <notification name="AvatarRezSelfBakedDoneNotification"> + ( in esistenza da [EXISTENCE] secondi ) +Baking dei vestiti terminato dopo [TIME] secondi. + </notification> + <notification name="AvatarRezSelfBakedUpdateNotification"> + ( in esistenza da [EXISTENCE] secondi ) +Hai inviato un aggiornamento al tuo aspetto dopo [TIME] secondi. +[STATUS] + </notification> + <notification name="AvatarRezCloudNotification"> + ( presente da [EXISTENCE] secondi ) +Avatar '[NAME]' trasformato in nuvola. + </notification> + <notification name="AvatarRezArrivedNotification"> + ( presente da [EXISTENCE] secondi ) +È comparso l'avatar '[NAME]'. + </notification> + <notification name="AvatarRezLeftCloudNotification"> + ( presente da [EXISTENCE] secondi ) +Avatar '[NAME]' partito dopo [TIME] secondi sotto forma di nuvola. + </notification> + <notification name="AvatarRezEnteredAppearanceNotification"> + ( presente da [EXISTENCE] secondi ) +Avatar '[NAME]' è entrato nella modalità aspetto. + </notification> + <notification name="AvatarRezLeftAppearanceNotification"> + ( presente da [EXISTENCE] secondi ) +Avatar '[NAME]' ha lasciato la modalità aspetto. + </notification> + <notification name="NoConnect"> + Ci sono problemi di connessione tramite [PROTOCOL] [HOSTID]. +Ti consigliamo di controllare le tue impostazioni di rete e della firewall. + <form name="form"> + <button name="OK" text="OK"/> + </form> + </notification> + <notification name="NoVoiceConnect"> + A causa di problemi di connessione al server vocale + +[HOSTID] + +le comunicazioni tramite voce non saranno disponibili. +Ti consigliamo di controllare le tue impostazioni di rete e della firewall. + <form name="form"> + <button name="OK" text="OK"/> + </form> + </notification> + <notification name="AvatarRezLeftNotification"> + ( presente da [EXISTENCE] secondi ) +Avatar '[NAME]' è partito completamente caricato. + </notification> + <notification name="AvatarRezSelfBakeNotification"> + ( in esistenza da [EXISTENCE] secondi ) +Hai caricato una texture [RESOLUTION] completata per '[BODYREGION]' dopo [TIME] secondi. + </notification> + <notification name="ConfirmLeaveCall"> + Sei sicuro di volere uscire dalla chiamata? + <usetemplate ignoretext="Conferma prima di uscire dalla chiamata" name="okcancelignore" notext="No" yestext="Sì"/> + </notification> + <notification name="ConfirmMuteAll"> + Hai scelto di disattivare l'audio di tutti i partecipanti alla chiamata di gruppo. +In questo modo verrà disattivato l'audio anche di tutti i residenti che si +uniscono alla chiamata in un secondo momento, anche dopo che tu ti fossi scollegato. + +Disattiva audio di tutti? + <usetemplate ignoretext="Conferma prima di disattivare l'audio di tutti i partecipanti alla chiamata di gruppo" name="okcancelignore" notext="Annulla" yestext="Ok"/> </notification> <global name="UnsupportedCPU"> - La velocità della tua CPU non soddisfa i requisiti minimi. diff --git a/indra/newview/skins/default/xui/it/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/it/panel_body_parts_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_body_parts_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/it/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..8fc23d34f1 --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Cambia" name="switch_btn"/> + <button label="Acquista >" name="bodyparts_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_bottomtray.xml b/indra/newview/skins/default/xui/it/panel_bottomtray.xml index c0218fad5e..e4d99cc402 100644 --- a/indra/newview/skins/default/xui/it/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/it/panel_bottomtray.xml @@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="bottom_tray"> - <string name="SpeakBtnToolTip"> - Accende o spegne il microfono - </string> - <string name="VoiceControlBtnToolTip"> - Mostra o nasconde il pannello di regolazione voce - </string> + <string name="SpeakBtnToolTip" value="Accende o spegne il microfono"/> + <string name="VoiceControlBtnToolTip" value="Mostra o nasconde il pannello di regolazione voce"/> <layout_stack name="toolbar_stack"> <layout_panel name="speak_panel"> <talk_button name="talk"> @@ -24,6 +20,21 @@ <layout_panel name="snapshot_panel"> <button label="" name="snapshots" tool_tip="Scatta una foto"/> </layout_panel> + <layout_panel name="sidebar_btn_panel"> + <button label="Barra laterale" name="sidebar_btn" tool_tip="Mostra o nasconde la barra laterale"/> + </layout_panel> + <layout_panel name="build_btn_panel"> + <button label="Costruisci" name="build_btn" tool_tip="Mostra o nasconde gli strumenti di costruzione"/> + </layout_panel> + <layout_panel name="search_btn_panel"> + <button label="Cerca" name="search_btn" tool_tip="Mostra o nasconde la ricerca"/> + </layout_panel> + <layout_panel name="world_map_btn_panel"> + <button label="Mappa" name="world_map_btn" tool_tip="Mostra o nasconde la mappa del mondo"/> + </layout_panel> + <layout_panel name="mini_map_btn_panel"> + <button label="Mini mappa" name="mini_map_btn" tool_tip="Mostra o nasconde la mini mappa"/> + </layout_panel> <layout_panel name="im_well_panel"> <chiclet_im_well name="im_well"> <button name="Unread IM messages" tool_tip="Conversazioni"/> diff --git a/indra/newview/skins/default/xui/it/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/it/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..e9d9795b3a --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_clothing_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Aggiungi +" name="add_btn"/> + <button label="Acquista >" name="clothing_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/it/panel_clothing_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_cof_wearables.xml b/indra/newview/skins/default/xui/it/panel_cof_wearables.xml new file mode 100644 index 0000000000..d914a5740f --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_cof_wearables.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="cof_wearables"> + <accordion name="cof_wearables_accordion"> + <accordion_tab name="tab_attachments" title="Allegati"/> + <accordion_tab name="tab_clothing" title="Vestiario"/> + <accordion_tab name="tab_body_parts" title="Parti del corpo"/> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/it/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..91d90a5660 --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_deletable_wearable_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="deletable_wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/it/panel_dummy_clothing_list_item.xml new file mode 100644 index 0000000000..6af84de0c7 --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_dummy_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="dummy_clothing_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_shape.xml b/indra/newview/skins/default/xui/it/panel_edit_shape.xml index 7e1ba43756..fd6a7af69c 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_shape.xml @@ -1,14 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shape_panel"> - <panel name="avatar_sex_panel"> - <text name="gender_text"> - Sesso: - </text> - <radio_group name="sex_radio"> - <radio_item label="Femmina" name="radio"/> - <radio_item label="Maschio" name="radio2"/> - </radio_group> - </panel> + <string name="meters"> + Metri + </string> + <string name="feet"> + Piedi + </string> + <string name="height"> + Statura: + </string> + <text name="avatar_height"/> <panel label="Camicia" name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="shape_body_tab" title="Corpo"/> diff --git a/indra/newview/skins/default/xui/it/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/it/panel_edit_tattoo.xml index d8cfa15b25..d76fb62c53 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_tattoo.xml @@ -4,5 +4,6 @@ <texture_picker label="Tatuaggio della testa" name="Head Tattoo" tool_tip="Clicca per scegliere una fotografia"/> <texture_picker label="Tatuaggio superiore" name="Upper Tattoo" tool_tip="Clicca per scegliere una fotografia"/> <texture_picker label="Tattuaggio inferiore" name="Lower Tattoo" tool_tip="Clicca per scegliere una fotografia"/> + <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_wearable.xml b/indra/newview/skins/default/xui/it/panel_edit_wearable.xml index 1135a582f5..5eaae828d8 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_wearable.xml @@ -72,8 +72,8 @@ <string name="jacket_desc_text"> Giacca: </string> - <string name="skirt_skirt_desc_text"> - Giacca: + <string name="skirt_desc_text"> + Gonna: </string> <string name="gloves_desc_text"> Guanti: @@ -93,11 +93,12 @@ <text name="edit_wearable_title" value="Modifica della figura corporea"/> <panel label="Camicia" name="wearable_type_panel"> <text name="description_text" value="Figura corporea:"/> - </panel> - <panel label="gear_buttom_panel" name="gear_buttom_panel"> - <button name="friends_viewsort_btn" tool_tip="Opzioni"/> - <button name="add_btn" tool_tip="TODO"/> - <button name="del_btn" tool_tip="TODO"/> + <radio_group name="sex_radio"> + <radio_item label="" name="sex_male" tool_tip="Maschio" value="1"/> + <radio_item label="" name="sex_female" tool_tip="Femmina" value="0"/> + </radio_group> + <icon name="male_icon" tool_tip="Maschio"/> + <icon name="female_icon" tool_tip="Femmina"/> </panel> <panel name="button_panel"> <button label="Salva con nome" name="save_as_button"/> diff --git a/indra/newview/skins/default/xui/it/panel_group_land_money.xml b/indra/newview/skins/default/xui/it/panel_group_land_money.xml index 1e3ef5e657..16cc91cd9d 100644 --- a/indra/newview/skins/default/xui/it/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/it/panel_group_land_money.xml @@ -6,6 +6,9 @@ <panel.string name="cant_view_group_land_text"> Non sei autorizzato a vedere quali terreni appartengono al gruppo. </panel.string> + <panel.string name="epmty_view_group_land_text"> + Nessuna voce + </panel.string> <panel.string name="cant_view_group_accounting_text"> Non sei autorizzato a visionare le informazioni finanziarie del gruppo. </panel.string> diff --git a/indra/newview/skins/default/xui/it/panel_group_notices.xml b/indra/newview/skins/default/xui/it/panel_group_notices.xml index 9dac282de9..8dd945830e 100644 --- a/indra/newview/skins/default/xui/it/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/it/panel_group_notices.xml @@ -40,6 +40,7 @@ Massimo 200 per gruppo al giorno <text name="string"> Trascina e rilascia qui l'oggetto da allegare: </text> + <button label="Inventario" name="open_inventory" tool_tip="Apri l'inventario"/> <button label="Rimuovi" label_selected="Rimuovi allegato" name="remove_attachment" tool_tip="Rimuovi allegato dal tuo avviso"/> <button label="Invia" label_selected="Invia" name="send_notice"/> <group_drop_target name="drop_target" tool_tip="Trascina un oggetto dall'inventario ín questa casella per spedirlo con questo avviso. Devi avere i diritti per la copia e il trasferimento per poter allegare l'oggetto."/> diff --git a/indra/newview/skins/default/xui/it/panel_login.xml b/indra/newview/skins/default/xui/it/panel_login.xml index 287e938d57..473bcfa88d 100644 --- a/indra/newview/skins/default/xui/it/panel_login.xml +++ b/indra/newview/skins/default/xui/it/panel_login.xml @@ -8,18 +8,15 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> - <text name="first_name_text"> - Nome: + <text name="username_text"> + Nome utente: </text> - <line_editor label="Nome" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/> - <text name="last_name_text"> - Cognome: - </text> - <line_editor label="Cognome" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/> + <line_editor label="Nome utente" name="username_edit" tool_tip="Nome utente [SECOND_LIFE]"/> <text name="password_text"> Password: </text> <check_box label="Ricorda password" name="remember_check"/> + <button label="Accedi" name="connect_btn"/> <text name="start_location_text"> Inizia da: </text> @@ -28,7 +25,6 @@ <combo_box.item label="Casa mia" name="MyHome"/> <combo_box.item label="<Scrivi nome regione>" name="Typeregionname"/> </combo_box> - <button label="Accedi" name="connect_btn"/> </layout_panel> <layout_panel name="links"> <text name="create_new_account_text"> diff --git a/indra/newview/skins/default/xui/it/panel_main_inventory.xml b/indra/newview/skins/default/xui/it/panel_main_inventory.xml index 878daf1e6b..446b51ffa3 100644 --- a/indra/newview/skins/default/xui/it/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/it/panel_main_inventory.xml @@ -9,62 +9,20 @@ <text name="ItemcountText"> Oggetti: </text> - <menu_bar name="Inventory Menu"> - <menu label="File" name="File"> - <menu_item_call label="Apri" name="Open"/> - <menu label="Carica nel server" name="upload"> - <menu_item_call label="Immagine ([COST]L$)..." name="Upload Image"/> - <menu_item_call label="Suono ([COST]L$)..." name="Upload Sound"/> - <menu_item_call label="Animazione ([COST]L$)..." name="Upload Animation"/> - <menu_item_call label="In blocco ([COST]L$ per file)..." name="Bulk Upload"/> - </menu> - <menu_item_call label="Nuova finestra" name="New Window"/> - <menu_item_call label="Mostra filtri" name="Show Filters"/> - <menu_item_call label="Ripristina filtri" name="Reset Current"/> - <menu_item_call label="Chiudi tutte le cartelle" name="Close All Folders"/> - <menu_item_call label="Svuota cestino" name="Empty Trash"/> - <menu_item_call label="Svuota oggetti smarriti" name="Empty Lost And Found"/> - </menu> - <menu label="Crea" name="Create"> - <menu_item_call label="Nuova cartella" name="New Folder"/> - <menu_item_call label="Nuovo script" name="New Script"/> - <menu_item_call label="Nuovo biglietto" name="New Note"/> - <menu_item_call label="Nuova gesture" name="New Gesture"/> - <menu label="Maglietta intima" name="New Clothes"> - <menu_item_call label="Nuova camicia" name="New Shirt"/> - <menu_item_call label="Nuovi pantaloni" name="New Pants"/> - <menu_item_call label="Nuove scarpe" name="New Shoes"/> - <menu_item_call label="Nuove calze" name="New Socks"/> - <menu_item_call label="Nuova giacca" name="New Jacket"/> - <menu_item_call label="Nuova gonna" name="New Skirt"/> - <menu_item_call label="Nuovi guanti" name="New Gloves"/> - <menu_item_call label="Nuova maglietta intima" name="New Undershirt"/> - <menu_item_call label="Nuovi slip" name="New Underpants"/> - <menu_item_call label="Nuovo Alfa (trasparenza)" name="New Alpha"/> - <menu_item_call label="Nuovo tatuaggio" name="New Tattoo"/> - </menu> - <menu label="Nuove parti del corpo" name="New Body Parts"> - <menu_item_call label="Nuova figura corporea" name="New Shape"/> - <menu_item_call label="Nuova pelle" name="New Skin"/> - <menu_item_call label="Nuovi capelli" name="New Hair"/> - <menu_item_call label="Nuovi occhi" name="New Eyes"/> - </menu> - </menu> - <menu label="Ordina" name="Sort"> - <menu_item_check label="In base al nome" name="By Name"/> - <menu_item_check label="In base alla data" name="By Date"/> - <menu_item_check label="Cartelle sempre in base al nome" name="Folders Always By Name"/> - <menu_item_check label="Cartelle di sistema all'inizio" name="System Folders To Top"/> - </menu> - </menu_bar> <filter_editor label="Filtro" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Tutti gli elementi" name="All Items"/> - <inventory_panel label="Elementi recenti" name="Recent Items"/> + <recent_inventory_panel label="Elementi recenti" name="Recent Items"/> </tab_container> - <panel name="bottom_panel"> - <button name="options_gear_btn" tool_tip="Mostra opzioni addizionali"/> - <button name="add_btn" tool_tip="Aggiungi nuovo elemento"/> - <dnd_button name="trash_btn" tool_tip="Rimuovi l'articolo selezionato"/> - </panel> + <layout_stack name="bottom_panel"> + <layout_panel name="options_gear_btn_panel"> + <button name="options_gear_btn" tool_tip="Mostra opzioni addizionali"/> + </layout_panel> + <layout_panel name="add_btn_panel"> + <button name="add_btn" tool_tip="Aggiungi nuovo elemento"/> + </layout_panel> + <layout_panel name="trash_btn_panel"> + <dnd_button name="trash_btn" tool_tip="Rimuovi l'articolo selezionato"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_outfit_edit.xml b/indra/newview/skins/default/xui/it/panel_outfit_edit.xml index 516181e0e9..57168096d5 100644 --- a/indra/newview/skins/default/xui/it/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/it/panel_outfit_edit.xml @@ -2,6 +2,8 @@ <!-- Side tray Outfit Edit panel --> <panel label="Modifica del vestiario" name="outfit_edit"> <string name="No Outfit" value="Nessun vestiario"/> + <string name="unsaved_changes" value="Modifiche non salvate"/> + <string name="now_editing" value="Modifica di"/> <panel.string name="not_available"> (non pert.) </panel.string> @@ -11,35 +13,26 @@ <string name="Filter.All" value="Tutto"/> <string name="Filter.Clothes/Body" value="Abiti/corpo"/> <string name="Filter.Objects" value="Oggetti"/> - <button label="modifica" name="edit_wearable_btn"/> + <string name="Filter.Custom" value="Filtro personalizzato"/> <text name="title" value="Modifica vestiario"/> <panel label="bottom_panel" name="header_panel"> <panel label="bottom_panel" name="outfit_name_and_status"> - <text name="status" value="Modifica..."/> + <text name="status" value="Modifica di..."/> <text name="curr_outfit_name" value="[Current Outfit]"/> </panel> </panel> <layout_stack name="im_panels"> <layout_panel label="Pannello di controllo IM" name="outfit_wearables_panel"> - <scroll_list name="look_items_list"> - <scroll_list.columns label="Articolo look" name="look_item"/> - <scroll_list.columns label="Ordina in base agli articoli del vestiario" name="look_item_sort"/> - </scroll_list> - <panel label="bottom_panel" name="edit_panel"/> - </layout_panel> - <layout_panel name="add_wearables_panel"> - <filter_editor label="Filtro" name="look_item_filter"/> <layout_stack name="filter_panels"> - <layout_panel label="Pannello di controllo IM" name="filter_button_panel"> - <text name="add_to_outfit_label" value="Aggiungi al vestiario:"/> - <button label="V" name="filter_button"/> + <layout_panel name="add_button_and_combobox"> + <button label="Aggiungi altri..." name="show_add_wearables_btn"/> + </layout_panel> + <layout_panel name="filter_panel"> + <filter_editor label="Filtra capi da indossare dell'inventario" name="look_item_filter"/> </layout_panel> </layout_stack> - <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> - <button label="C" name="folder_view_btn"/> - <button label="E" name="list_view_btn"/> - </panel> </layout_panel> + <layout_panel name="add_wearables_panel"/> </layout_stack> <panel name="save_revert_button_bar"> <button label="Salva" name="save_btn"/> diff --git a/indra/newview/skins/default/xui/it/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/it/panel_outfits_inventory.xml index 932788eaa3..8f8f7a25f4 100644 --- a/indra/newview/skins/default/xui/it/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/it/panel_outfits_inventory.xml @@ -7,8 +7,7 @@ <panel name="bottom_panel"> <button name="options_gear_btn" tool_tip="Mostra opzioni addizionali"/> <dnd_button name="trash_btn" tool_tip="Rimuovi l'articolo selezionato"/> - <button label="Salva vestiario" name="make_outfit_btn" tool_tip="Salva questo aspetto fisico come un vestito"/> + <button label="Salva con nome" name="save_btn"/> <button label="Indossa" name="wear_btn" tool_tip="Indossa il vestiario selezionato"/> - <button label="Modifica vestiario" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_people.xml b/indra/newview/skins/default/xui/it/panel_people.xml index c469da014a..056e424436 100644 --- a/indra/newview/skins/default/xui/it/panel_people.xml +++ b/indra/newview/skins/default/xui/it/panel_people.xml @@ -2,9 +2,9 @@ <!-- Side tray panel --> <panel label="Persone" name="people_panel"> <string name="no_recent_people" value="Nessuna persona recente. Stai cercando persone da frequentare? Prova la [secondlife:///app/search/people Ricerca] o la [secondlife:///app/worldmap Mappa del mondo]."/> - <string name="no_filtered_recent_people" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people Cerca]."/> + <string name="no_filtered_recent_people" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people/[SEARCH_TERM] Cerca]."/> <string name="no_one_near" value="Nessuno vicino. Stai cercando persone da frequentare? Try la [secondlife:///app/search/people Ricerca] o la [secondlife:///app/worldmap Mappa del mondo]."/> - <string name="no_one_filtered_near" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people Cerca]."/> + <string name="no_one_filtered_near" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people/[SEARCH_TERM] Cerca]."/> <string name="no_friends_online" value="Nessun amico online"/> <string name="no_friends" value="Nessun amico"/> <string name="no_friends_msg"> @@ -12,11 +12,11 @@ Stai cercando persone da frequentare? Prova la [secondlife:///app/worldmap Mappa del mondo]. </string> <string name="no_filtered_friends_msg"> - Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people Cerca]. + Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people/[SEARCH_TERM] Cerca]. </string> <string name="people_filter_label" value="Filtro persone"/> <string name="groups_filter_label" value="Filtro gruppi"/> - <string name="no_filtered_groups_msg" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/groups Cerca]."/> + <string name="no_filtered_groups_msg" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/groups/[SEARCH_TERM] Cerca]."/> <string name="no_groups_msg" value="Stai cercando gruppi di cui far parte? Prova [secondlife:///app/search/groups Cerca]."/> <filter_editor label="Filtro" name="filter_input"/> <tab_container name="tabs"> @@ -55,7 +55,7 @@ Stai cercando persone da frequentare? Prova la [secondlife:///app/worldmap Mappa <button label="Profilo" name="view_profile_btn" tool_tip="Mostra immagine, gruppi e altre informazioni del residente"/> <button label="IM" name="im_btn" tool_tip="Apri una sessione messaggio istantaneo"/> <button label="Chiama" name="call_btn" tool_tip="Chiama questo residente"/> - <button label="Condividi" name="share_btn"/> + <button label="Condividi" name="share_btn" tool_tip="Condividi un oggetto dell'inventario"/> <button label="Teleport" name="teleport_btn" tool_tip="Offri teleport"/> <button label="Profilo del gruppo" name="group_info_btn" tool_tip="Mostra informazioni gruppo"/> <button label="Chat di gruppo" name="chat_btn" tool_tip="Apri sessione chat"/> diff --git a/indra/newview/skins/default/xui/it/panel_places.xml b/indra/newview/skins/default/xui/it/panel_places.xml index 3b242b1805..9a052068f7 100644 --- a/indra/newview/skins/default/xui/it/panel_places.xml +++ b/indra/newview/skins/default/xui/it/panel_places.xml @@ -5,12 +5,12 @@ <filter_editor label="Filtra i miei luoghi" name="Filter"/> <panel name="button_panel"> <button label="Teleport" name="teleport_btn" tool_tip="Teleport alla zona selezionata"/> - <button label="Mappa" name="map_btn"/> + <button label="Mappa" name="map_btn" tool_tip="Mostra la zona corrispondente nella mappa del Mondo"/> <button label="Modifica" name="edit_btn" tool_tip="Modifica le informazioni del punto di riferimento"/> <button label="▼" name="overflow_btn" tool_tip="Mostra opzioni addizionali"/> <button label="Salva" name="save_btn"/> <button label="Annulla" name="cancel_btn"/> <button label="Chiudi" name="close_btn"/> - <button label="Profilo" name="profile_btn"/> + <button label="Profilo" name="profile_btn" tool_tip="Mostra il profilo del luogo"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml index 09e19f4bc0..842daaa331 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml @@ -13,6 +13,7 @@ </text> <check_box label="Costruire/Modificare" name="edit_camera_movement" tool_tip="Utilizza il posizionamento automatico della fotocamera entrando o uscendo dalla modalità modifica"/> <check_box label="Aspetto fisico" name="appearance_camera_movement" tool_tip="Utilizza il posizionamento automatico della camera in modalità modifica"/> + <check_box initial_value="vero" label="Barra laterale" name="appearance_sidebar_positioning" tool_tip="Utilizza il posizionamento automatico della fotocamera per la barra laterale"/> <check_box label="Visualizzami in modalità soggettiva" name="first_person_avatar_visible"/> <check_box label="Le frecce di direzione mi fanno sempre spostare" name="arrow_keys_move_avatar_check"/> <check_box label="Doppio click e tieni premuto per correre" name="tap_tap_hold_to_run"/> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_chat.xml b/indra/newview/skins/default/xui/it/panel_preferences_chat.xml index 28df9d2e43..fb8ddf607d 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_chat.xml @@ -45,6 +45,7 @@ </text> <check_box initial_value="true" label="Simula la battitura tasti quando scrivi" name="play_typing_animation"/> <check_box label="Quando sono OFF-LINE, spediscimi gli IM in una e-mail" name="send_im_to_email"/> + <check_box label="Attiva IM in testo semplice e cronologia chat" name="plain_text_chat_history"/> <text name="show_ims_in_label"> Mostra gli IM in: </text> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml index 5bd0cfb106..37857473aa 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Grafica" name="Display panel"> - <text name="UI Size:"> - Dimensioni UI: - </text> <text name="QualitySpeed"> Qualità e velocità: </text> @@ -52,6 +49,10 @@ m </text> <slider label="Conteggio massimo particelle:" name="MaxParticleCount"/> + <slider label="Distanza visual. max avatar:" name="MaxAvatarDrawDistance"/> + <text name="DrawDistanceMeterText3"> + m + </text> <slider label="Qualità in post-produzione:" name="RenderPostProcess"/> <text name="MeshDetailText"> Dettagli reticolo: diff --git a/indra/newview/skins/default/xui/it/panel_status_bar.xml b/indra/newview/skins/default/xui/it/panel_status_bar.xml index 4c860ff479..6b1a8aa71b 100644 --- a/indra/newview/skins/default/xui/it/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/it/panel_status_bar.xml @@ -21,8 +21,10 @@ <panel.string name="buycurrencylabel"> L$ [AMT] </panel.string> - <button label="" label_selected="" name="buycurrency" tool_tip="Il mio saldo"/> - <button label="Acquista L$" name="buyL" tool_tip="Clicca per comprare più L$"/> + <panel name="balance_bg"> + <text name="balance" tool_tip="Il mio saldo" value="L$ 20"/> + <button label="ACQUISTA L$" name="buyL" tool_tip="Clicca per acquistare più L$"/> + </panel> <text name="TimeText" tool_tip="Orario attuale (Pacifico)"> 24:00, ora del Pacifico </text> diff --git a/indra/newview/skins/default/xui/it/panel_voice_effect.xml b/indra/newview/skins/default/xui/it/panel_voice_effect.xml new file mode 100644 index 0000000000..78ce1ff24a --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_voice_effect.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_voice_effect"> + <string name="no_voice_effect"> + Nessuna manipolazione voce + </string> + <string name="preview_voice_effects"> + Anteprima manipolazione voce ▶ + </string> + <string name="get_voice_effects"> + Ottieni manipolazione voce ▶ + </string> + <combo_box name="voice_effect" tool_tip="Scegli un effetto di manipolazione per modificare il suono della tua voce."> + <combo_box.item label="Nessuna manipolazione voce" name="no_voice_effect"/> + </combo_box> +</panel> diff --git a/indra/newview/skins/default/xui/it/sidepanel_appearance.xml b/indra/newview/skins/default/xui/it/sidepanel_appearance.xml index c2e99b5573..df25772ffb 100644 --- a/indra/newview/skins/default/xui/it/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/it/sidepanel_appearance.xml @@ -1,9 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Vestiario" name="appearance panel"> <string name="No Outfit" value="Nessun vestiario"/> + <string name="Unsaved Changes" value="Modifiche non salvate"/> + <string name="Now Wearing" value="Abbigliamento attuale..."/> <panel name="panel_currentlook"> - <text name="currentlook_title"> - (non salvato) + <button label="M" name="editappearance_btn"/> + <button label="A" name="openoutfit_btn"/> + <text name="currentlook_status"> + (Stato) </text> </panel> <filter_editor label="Filtri per il vestiario" name="Filter"/> diff --git a/indra/newview/skins/default/xui/it/sidepanel_inventory.xml b/indra/newview/skins/default/xui/it/sidepanel_inventory.xml index 8a391c882c..3944f8e306 100644 --- a/indra/newview/skins/default/xui/it/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/it/sidepanel_inventory.xml @@ -2,11 +2,12 @@ <panel label="Cose" name="objects panel"> <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> - <button label="Profilo" name="info_btn"/> - <button label="Condividi" name="share_btn"/> - <button label="Indossa" name="wear_btn"/> + <button label="Profilo" name="info_btn" tool_tip="Mostra profilo dell'oggetto"/> + <button label="Condividi" name="share_btn" tool_tip="Condividi un oggetto dell'inventario"/> + <button label="Acquisti" name="shop_btn" tool_tip="Apri pagina web di Marketplace"/> + <button label="Indossa" name="wear_btn" tool_tip="Indossa il vestiario selezionato"/> <button label="Riproduci" name="play_btn"/> - <button label="Teleport" name="teleport_btn"/> + <button label="Teleport" name="teleport_btn" tool_tip="Teleport alla zona selezionata"/> </panel> </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 9a6c648c8e..d601c27d28 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -94,6 +94,24 @@ <string name="LoginDownloadingClothing"> Sto caricando i vestiti... </string> + <string name="InvalidCertificate"> + Il server ha inviato un certificato non valido o errato. Rivolgiti all'amministratore della griglia. + </string> + <string name="CertInvalidHostname"> + Per accedere al server è stato utilizzato un nome host non valido; controlla lo SLURL o il nome host della griglia. + </string> + <string name="CertExpired"> + Il certificato inviato dalla griglia sembra essere scaduto. Controlla l'orologio del sistema o rivolgiti all'amministratore della griglia. + </string> + <string name="CertKeyUsage"> + Impossibile utilizzare per SSl il certificato inviato dal server. Rivolgiti all'amministratore della griglia. + </string> + <string name="CertBasicConstraints"> + Nella catena dei certificati del server erano presenti troppi certificati. Rivolgiti all'amministratore della griglia. + </string> + <string name="CertInvalidSignature"> + Impossibile verificare la firma del certificato inviato dal server della griglia. Rivolgiti all'amministratore della griglia. + </string> <string name="LoginFailedNoNetwork"> Errore di rete: Non è stato possibile stabilire un collegamento, controlla la tua connessione. </string> @@ -720,6 +738,12 @@ <string name="land_type_unknown"> (sconosciuto) </string> + <string name="Estate / Full Region"> + Proprietà immobiliare / Regione completa + </string> + <string name="Mainland / Full Region"> + Continente / Regione completa + </string> <string name="all_files"> Tutti i file </string> @@ -825,9 +849,48 @@ <string name="invalid"> non valido </string> + <string name="shirt_not_worn"> + Camicia non indossata + </string> + <string name="pants_not_worn"> + Pantaloni non indossati + </string> + <string name="shoes_not_worn"> + Scarpe non indossate + </string> + <string name="socks_not_worn"> + Calzini non indossati + </string> + <string name="jacket_not_worn"> + Giacca non indossata + </string> + <string name="gloves_not_worn"> + Guanti non indossati + </string> + <string name="undershirt_not_worn"> + Maglietta intima non indossata + </string> + <string name="underpants_not_worn"> + Slip non indossati + </string> + <string name="skirt_not_worn"> + Gonna non indossata + </string> + <string name="alpha_not_worn"> + Alpha non portato + </string> + <string name="tattoo_not_worn"> + Tatuaggio non portato + </string> + <string name="invalid_not_worn"> + non valido + </string> <string name="NewWearable"> Nuovo [WEARABLE_ITEM] </string> + <string name="CreateNewWearable"> + Crea [WEARABLE_TYPE] + </string> <string name="next"> Avanti </string> @@ -895,7 +958,10 @@ Premi ESC per tornare in visualizzazione normale </string> <string name="InventoryNoMatchingItems"> - Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/all Cerca]. + Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/all/[SEARCH_TERM] Cerca]. + </string> + <string name="PlacesNoMatchingItems"> + Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/places/[SEARCH_TERM] Cerca]. </string> <string name="FavoritesNoMatchingItems"> Trascina qui un punto di riferimento per aggiungerlo ai Preferiti. @@ -925,6 +991,7 @@ <string name="Wave" value="Saluta con la mano"/> <string name="HelloAvatar" value="Ciao, avatar!"/> <string name="ViewAllGestures" value="Visualizza tutto >>"/> + <string name="GetMoreGestures" value="Altre >>"/> <string name="Animations" value="Animazioni,"/> <string name="Calling Cards" value="Biglietti da visita,"/> <string name="Clothing" value="Vestiti,"/> @@ -1537,16 +1604,19 @@ Il residente al quale hai inviato un messaggio è in modalità 'occupato', ovvero ha chiesto di non essere disturbato. Il tuo messaggio comparirà nel suo pannello IM, dove potrà essere letto in un secondo momento. </string> <string name="MuteByName"> - (in base al nome) + (In base al nome) </string> <string name="MuteAgent"> (Residente) </string> <string name="MuteObject"> - (oggetto) + (Oggetto) </string> <string name="MuteGroup"> - (gruppo) + (Gruppo) + </string> + <string name="MuteExternal"> + (esterno) </string> <string name="RegionNoCovenant"> Non esiste alcun regolamento per questa proprietà. @@ -3306,11 +3376,14 @@ Se il messaggio persiste, contatta [SUPPORT_SITE]. <string name="answered_call"> Risposto alla chiamata </string> - <string name="started_call"> - Chiamata vocale iniziata + <string name="you_started_call"> + Hai iniziato una chiamata vocale + </string> + <string name="you_joined_call"> + Ti sei collegato alla chiamata in voce </string> - <string name="joined_call"> - Si è collegato alla chiamata in voce + <string name="name_started_call"> + [NAME] ha iniziato una chiamata vocale </string> <string name="ringing-im"> Collegamento alla chiamata vocale... @@ -3390,6 +3463,9 @@ Se il messaggio persiste, contatta [SUPPORT_SITE]. <string name="session_initialization_timed_out_error"> Sessione di inizializzazione scaduta </string> + <string name="voice_morphing_url"> + http://secondlife.com/landing/voicemorphing + </string> <string name="paid_you_ldollars"> [NAME] ti ha inviato un pagamento di L$[AMOUNT]. </string> @@ -3509,6 +3585,90 @@ Segnala abuso <string name="Contents"> Contenuto </string> + <string name="Gesture"> + Gesture + </string> + <string name="Male Gestures"> + Gesture maschili + </string> + <string name="Female Gestures"> + Gesture femminili + </string> + <string name="Other Gestures"> + Altre gesture + </string> + <string name="Speech Gestures"> + Gesture del parlato + </string> + <string name="Common Gestures"> + Gesture comuni + </string> + <string name="Male - Excuse me"> + Maschio - Chiedere scusa + </string> + <string name="Male - Get lost"> + Maschio - Levati dai piedi! + </string> + <string name="Male - Blow kiss"> + Maschio - Butta un bacio + </string> + <string name="Male - Boo"> + Maschio - Bu + </string> + <string name="Male - Bored"> + Maschio - Annoiato + </string> + <string name="Male - Hey"> + Maschio - Ehi + </string> + <string name="Male - Laugh"> + Maschio - Ridere + </string> + <string name="Male - Repulsed"> + Maschio - Disgustato + </string> + <string name="Male - Shrug"> + Maschio - Spallucce + </string> + <string name="Male - Stick tougue out"> + Maschio - Tira fuori la lingua + </string> + <string name="Male - Wow"> + Maschio - Accipicchia + </string> + <string name="Female - Excuse me"> + Femmina - Chiedere scusa + </string> + <string name="Female - Get lost"> + Femmina - Levati dai piedi! + </string> + <string name="Female - Blow kiss"> + Femmina - Butta un bacio + </string> + <string name="Female - Boo"> + Femmina - Bu + </string> + <string name="Female - Bored"> + Femmina - Annoiata + </string> + <string name="Female - Hey"> + Femmina - Ehi + </string> + <string name="Female - Laugh"> + Femmina - Ridere + </string> + <string name="Female - Repulsed"> + Femmina - Disgustata + </string> + <string name="Female - Shrug"> + Femmina - Spallucce + </string> + <string name="Female - Stick tougue out"> + Femmina - Tira fuori la lingua + </string> + <string name="Female - Wow"> + Femmina - Accipicchia + </string> <string name="AvatarBirthDateFormat"> [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] </string> @@ -3518,4 +3678,32 @@ Segnala abuso <string name="texture_load_dimensions_error"> Impossibile caricare immagini di dimensioni superiori a [WIDTH]*[HEIGHT] </string> + <string name="words_separator" value=","/> + <string name="server_is_down"> + Nonostante i nostri tentativi, si è verificato un errore imprevisto. + + Consulta la pagina status.secondlifegrid.net per determinare se si sia verificato un problema noto con il servizio. + Se il problema continua, ti consigliamo di controllare le tue impostazioni di rete e della firewall. + </string> + <string name="dateTimeWeekdaysNames"> + lunedì:martedì:mercoledì:giovedì:venerdì:sabato:domenica + </string> + <string name="dateTimeWeekdaysShortNames"> + lun:mar:mer:gio:ven:sab:dom + </string> + <string name="dateTimeMonthNames"> + gennaio:febbraio:marzo:aprile:maggio:giugno:luglio:agosto:settembre:ottobre:novembre:dicembre + </string> + <string name="dateTimeMonthShortNames"> + gen:feb:mar:apr:mag:giu:lug:ago:sett:ott:nov:dic + </string> + <string name="dateTimeDayFormat"> + [MDAY] + </string> + <string name="dateTimeAM"> + antemeridiane + </string> + <string name="dateTimePM"> + pomeridiane + </string> </strings> diff --git a/indra/newview/skins/default/xui/ja/floater_buy_land.xml b/indra/newview/skins/default/xui/ja/floater_buy_land.xml index a274e25326..34f9d38de1 100644 --- a/indra/newview/skins/default/xui/ja/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_buy_land.xml @@ -124,9 +124,6 @@ <floater.string name="no_parcel_selected"> (区画が選定されていません) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> 地域: </text> diff --git a/indra/newview/skins/default/xui/ja/menu_bottomtray.xml b/indra/newview/skins/default/xui/ja/menu_bottomtray.xml index 0e69671f06..e5703c559b 100644 --- a/indra/newview/skins/default/xui/ja/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/ja/menu_bottomtray.xml @@ -4,11 +4,11 @@ <menu_item_check label="移動ボタン" name="ShowMoveButton"/> <menu_item_check label="視界ボタン" name="ShowCameraButton"/> <menu_item_check label="スナップショットボタン" name="ShowSnapshotButton"/> - <menu_item_check label="サイドバーのボタン" name="ShowSidebarButton"/> - <menu_item_check label="制作のボタン" name="ShowBuildButton"/> - <menu_item_check label="検索のボタン" name="ShowSearchButton"/> - <menu_item_check label="地図のボタン" name="ShowWorldMapButton"/> - <menu_item_check label="ミニマップのボタン" name="ShowMiniMapButton"/> + <menu_item_check label="サイドバーボタン" name="ShowSidebarButton"/> + <menu_item_check label="制作ボタン" name="ShowBuildButton"/> + <menu_item_check label="検索ボタン" name="ShowSearchButton"/> + <menu_item_check label="地図ボタン" name="ShowWorldMapButton"/> + <menu_item_check label="ミニマップボタン" name="ShowMiniMapButton"/> <menu_item_call label="切り取り" name="NearbyChatBar_Cut"/> <menu_item_call label="コピー" name="NearbyChatBar_Copy"/> <menu_item_call label="貼り付け" name="NearbyChatBar_Paste"/> diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index 1ac7677b07..c82f1198a4 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -349,7 +349,7 @@ L$ が不足しているのでこのグループに参加することができ <usetemplate name="okcancelbuttons" notext="もう一度試す" yestext="新しいアカウントを作成"/> </notification> <notification name="InvalidCredentialFormat"> - 「ユーザー名」欄にアバターのファーストネームとラストネーム両方を入力してからログインしてください。 + 「ユーザーネーム」欄にアバターのファーストネームとラストネーム両方を入力してからログインしてください。 </notification> <notification name="AddClassified"> クラシファイド広告は、検索ディレクトリと [http://secondlife.com/community/classifieds secondlife.com] の「クラシファイド広告」セクションに一週間掲載されます。 diff --git a/indra/newview/skins/default/xui/ja/panel_landmark_info.xml b/indra/newview/skins/default/xui/ja/panel_landmark_info.xml index 87477c2651..7fca66f90f 100644 --- a/indra/newview/skins/default/xui/ja/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/ja/panel_landmark_info.xml @@ -18,9 +18,6 @@ <string name="acquired_date"> [year,datetime,local] [mth,datetime,local] [day,datetime,local] [wkday,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> <button name="back_btn" tool_tip="戻る"/> <text name="title" value="場所のプロフィール"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/ja/panel_login.xml b/indra/newview/skins/default/xui/ja/panel_login.xml index f0ebc67ef5..47d7a88b4c 100644 --- a/indra/newview/skins/default/xui/ja/panel_login.xml +++ b/indra/newview/skins/default/xui/ja/panel_login.xml @@ -9,9 +9,9 @@ <layout_stack name="login_widgets"> <layout_panel name="login"> <text name="username_text"> - ユーザー名: + ユーザーネーム: </text> - <line_editor label="ユーザー名" name="username_edit" tool_tip="[SECOND_LIFE] ユーザー名"/> + <line_editor label="ユーザーネーム" name="username_edit" tool_tip="[SECOND_LIFE] ユーザーネーム"/> <text name="password_text"> パスワード: </text> diff --git a/indra/newview/skins/default/xui/ja/panel_place_profile.xml b/indra/newview/skins/default/xui/ja/panel_place_profile.xml index 9de04f0d6a..b897e1d748 100644 --- a/indra/newview/skins/default/xui/ja/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/ja/panel_place_profile.xml @@ -41,21 +41,6 @@ <string name="acquired_date"> [year,datetime,local] [mth,datetime,local] [day,datetime,local] [wkday,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> - <string name="icon_Voice" value="parcel_drk_Voice"/> - <string name="icon_VoiceNo" value="parcel_drk_VoiceNo"/> - <string name="icon_Fly" value="parcel_drk_Fly"/> - <string name="icon_FlyNo" value="parcel_drk_FlyNo"/> - <string name="icon_Push" value="parcel_drk_Push"/> - <string name="icon_PushNo" value="parcel_drk_PushNo"/> - <string name="icon_Build" value="parcel_drk_Build"/> - <string name="icon_BuildNo" value="parcel_drk_BuildNo"/> - <string name="icon_Scripts" value="parcel_drk_Scripts"/> - <string name="icon_ScriptsNo" value="parcel_drk_ScriptsNo"/> - <string name="icon_Damage" value="parcel_drk_Damage"/> - <string name="icon_DamageNo" value="parcel_drk_DamageNo"/> <button name="back_btn" tool_tip="戻る"/> <text name="title" value="場所のプロフィール"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index dfc12bc1cb..d59699552d 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -3762,22 +3762,4 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ <string name="texture_load_dimensions_error"> [WIDTH]*[HEIGHT] 以上の画像は読み込めません </string> - <!-- overriding datetime formating. leave emtpy in for current localization this is not needed --> - <string name="dateTimeWeekdaysNames"> - Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday - </string> - <string name="dateTimeWeekdaysShortNames"> - Son:Mon:Tue:Wed:Thu:Fri:Sat - </string> - <string name="dateTimeMonthNames"> - January:February:March:April:May:June:July:August:September:October:November:December - </string> - <string name="dateTimeMonthNames"> - Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec - </string> - <string name="dateTimeDayFormat"> - [MDAY] D - </string> - <string name="dateTimeAM">AM</string> - <string name="dateTimePM">PM</string> </strings> diff --git a/indra/newview/skins/default/xui/pl/floater_buy_land.xml b/indra/newview/skins/default/xui/pl/floater_buy_land.xml index 3d01129d9b..7b4f459b4e 100644 --- a/indra/newview/skins/default/xui/pl/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/pl/floater_buy_land.xml @@ -125,9 +125,6 @@ używanie Posiadłości żeby sfinalizować ten zakup. <floater.string name="no_parcel_selected"> (Posiadłość nie została wybrana) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_about.xml b/indra/newview/skins/default/xui/pt/floater_about.xml index 7671f58691..4044110b47 100644 --- a/indra/newview/skins/default/xui/pt/floater_about.xml +++ b/indra/newview/skins/default/xui/pt/floater_about.xml @@ -26,9 +26,9 @@ Placa gráfica: [GRAPHICS_CARD] Versão libcurl: [LIBCURL_VERSION] Versão J2C Decoder: [J2C_VERSION] -Versão do driver de áudio: [AUDIO_DRIVER_VERSION] +Versão do driver de áudio: [AUDIO_DRIVER_VERSION] Versão Qt Webkit: [QT_WEBKIT_VERSION] -Versão Vivox: [VIVOX_VERSION] +Versão do servidor de voz: [VOICE_VERSION] </floater.string> <floater.string name="none"> (nenhum) diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml index 787836a8bd..56ffcbdece 100644 --- a/indra/newview/skins/default/xui/pt/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml @@ -63,6 +63,9 @@ Nenhum lote selecionado. Vá para o menu Mundo > Sobre o terreno ou selecione outro lote para mostrar os detalhes. </panel.string> + <panel.string name="time_stamp_template"> + [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + </panel.string> <text name="Name:"> Nome: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml b/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml index 5fb64f64b3..9473ee7ce9 100644 --- a/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml @@ -3,41 +3,48 @@ <floater.string name="InvalidAvatar"> AVATAR INVÁLIDO </floater.string> - <text name="composite_label"> - Texturas compostas - </text> - <button label="Tombar" label_selected="Tombar" name="Dump"/> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> - <texture_picker label="Cabelo" name="hair-baked"/> - <texture_picker label="Cabelo" name="hair_grain"/> - <texture_picker label="Cabelo alpha" name="hair_alpha"/> - <texture_picker label="Cabeça" name="head-baked"/> - <texture_picker label="Maquilagem" name="head_bodypaint"/> - <texture_picker label="Cabeça Alpha" name="head_alpha"/> - <texture_picker label="Tatuagem na cabeça" name="head_tattoo"/> - <texture_picker label="Olhos" name="eyes-baked"/> - <texture_picker label="Olho" name="eyes_iris"/> - <texture_picker label="Olhos Alpha" name="eyes_alpha"/> - <texture_picker label="Cintura acima" name="upper-baked"/> - <texture_picker label="Pintura corporal, cintura para cima" name="upper_bodypaint"/> - <texture_picker label="Camiseta" name="upper_undershirt"/> - <texture_picker label="Luvas" name="upper_gloves"/> - <texture_picker label="Camisa" name="upper_shirt"/> - <texture_picker label="Jaqueta (cima)" name="upper_jacket"/> - <texture_picker label="Alpha de cima" name="upper_alpha"/> - <texture_picker label="Tatuagem parte de cima" name="upper_tattoo"/> - <texture_picker label="Cintura para baixo" name="lower-baked"/> - <texture_picker label="Pintura corporal, cintura para baixo" name="lower_bodypaint"/> - <texture_picker label="Roupa de baixo" name="lower_underpants"/> - <texture_picker label="Meias" name="lower_socks"/> - <texture_picker label="Sapatos" name="lower_shoes"/> - <texture_picker label="Calças" name="lower_pants"/> - <texture_picker label="Jaqueta" name="lower_jacket"/> - <texture_picker label="Alpha inferior" name="lower_alpha"/> - <texture_picker label="Tatuagem de baixo" name="lower_tattoo"/> - <texture_picker label="Saia" name="skirt-baked"/> - <texture_picker label="Saia" name="skirt"/> + <text name="label"> + Pronto +Texturas + </text> + <text name="composite_label"> + Compósito: +Texturas + </text> + <button label="Enviar IDs para painel" label_selected="Dump" name="Dump"/> + <panel name="scroll_content_panel"> + <texture_picker label="Cabelo" name="hair-baked"/> + <texture_picker label="Cabelo" name="hair_grain"/> + <texture_picker label="Cabelo alpha" name="hair_alpha"/> + <texture_picker label="Cabeça" name="head-baked"/> + <texture_picker label="Maquilagem" name="head_bodypaint"/> + <texture_picker label="Cabeça Alpha" name="head_alpha"/> + <texture_picker label="Tatuagem na cabeça" name="head_tattoo"/> + <texture_picker label="Olhos" name="eyes-baked"/> + <texture_picker label="Olho" name="eyes_iris"/> + <texture_picker label="Olhos Alpha" name="eyes_alpha"/> + <texture_picker label="Cintura acima" name="upper-baked"/> + <texture_picker label="Pintura corporal, cintura para cima" name="upper_bodypaint"/> + <texture_picker label="Camiseta" name="upper_undershirt"/> + <texture_picker label="Luvas" name="upper_gloves"/> + <texture_picker label="Camisa" name="upper_shirt"/> + <texture_picker label="Jaqueta (cima)" name="upper_jacket"/> + <texture_picker label="Alpha de cima" name="upper_alpha"/> + <texture_picker label="Tatuagem parte de cima" name="upper_tattoo"/> + <texture_picker label="Cintura para baixo" name="lower-baked"/> + <texture_picker label="Cintura para baixo" name="lower_bodypaint"/> + <texture_picker label="Roupa de baixo" name="lower_underpants"/> + <texture_picker label="Meias" name="lower_socks"/> + <texture_picker label="Sapatos" name="lower_shoes"/> + <texture_picker label="Calças" name="lower_pants"/> + <texture_picker label="Jaqueta" name="lower_jacket"/> + <texture_picker label="Alpha inferior" name="lower_alpha"/> + <texture_picker label="Tatuagem de baixo" name="lower_tattoo"/> + <texture_picker label="Saia" name="skirt-baked"/> + <texture_picker label="Saia" name="skirt"/> + </panel> </panel> </scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/pt/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/pt/floater_buy_currency_html.xml new file mode 100644 index 0000000000..24e41ac8c8 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/floater_buy_currency_html.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_buy_currency_html" title="COMPRAR MOEDA"/> diff --git a/indra/newview/skins/default/xui/pt/floater_buy_land.xml b/indra/newview/skins/default/xui/pt/floater_buy_land.xml index 73b483acf2..5c5ee3b7a0 100644 --- a/indra/newview/skins/default/xui/pt/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_buy_land.xml @@ -124,9 +124,6 @@ contribuídas para cobrir este lote antes da aquisição se completar. <floater.string name="no_parcel_selected"> (nenhum lote selecionado) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Região: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_map.xml b/indra/newview/skins/default/xui/pt/floater_map.xml index 3a04528228..f8e4e76752 100644 --- a/indra/newview/skins/default/xui/pt/floater_map.xml +++ b/indra/newview/skins/default/xui/pt/floater_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Map" title="Mini Mapa"> +<floater name="Map" title=""> <floater.string name="mini_map_north"> N </floater.string> diff --git a/indra/newview/skins/default/xui/pt/floater_moveview.xml b/indra/newview/skins/default/xui/pt/floater_moveview.xml index 9c02570076..b1dc65e3af 100644 --- a/indra/newview/skins/default/xui/pt/floater_moveview.xml +++ b/indra/newview/skins/default/xui/pt/floater_moveview.xml @@ -6,18 +6,48 @@ <string name="walk_back_tooltip"> Andar para trás (flecha para baixo ou S) </string> + <string name="walk_left_tooltip"> + Andar para a esquerda (Shift + Seta esquerda ou A) + </string> + <string name="walk_right_tooltip"> + Andar para a direita (Shift + Seta direita ou D) + </string> <string name="run_forward_tooltip"> Correr para frente (flecha para cima ou W) </string> <string name="run_back_tooltip"> Correr para trás (flecha para baixo ou S) </string> + <string name="run_left_tooltip"> + Correr para a esquerda (Shift + Seta esquerda ou A) + </string> + <string name="run_right_tooltip"> + Correr para a direita (Shift + Seta direita ou D) + </string> <string name="fly_forward_tooltip"> Voar para frente (flecha para cima ou W) </string> <string name="fly_back_tooltip"> Voar para trás (flecha para baixo ou S) </string> + <string name="fly_left_tooltip"> + Voar para a esquerda (Shift + Seta esquerda ou A) + </string> + <string name="fly_right_tooltip"> + Voar para a direita (Shift + Seta direita ou D) + </string> + <string name="fly_up_tooltip"> + Voar para cima (tecla E) + </string> + <string name="fly_down_tooltip"> + Voar para baixo (tecla C) + </string> + <string name="jump_tooltip"> + Pular (tecla E) + </string> + <string name="crouch_tooltip"> + Agachar (tecla C) + </string> <string name="walk_title"> Andar </string> @@ -28,10 +58,12 @@ Voar </string> <panel name="panel_actions"> - <button label="" label_selected="" name="turn left btn" tool_tip="Virar à esquerda (flecha ESQ ou A)"/> - <button label="" label_selected="" name="turn right btn" tool_tip="Virar à direita (flecha DIR ou D)"/> <button label="" label_selected="" name="move up btn" tool_tip="Voar para cima (tecla E)"/> + <button label="" label_selected="" name="turn left btn" tool_tip="Virar à esquerda (flecha ESQ ou A)"/> + <joystick_slide name="move left btn" tool_tip="Andar para a esquerda (Shift + Seta esquerda ou A)"/> <button label="" label_selected="" name="move down btn" tool_tip="Voar para baixo (tecla C)"/> + <button label="" label_selected="" name="turn right btn" tool_tip="Virar à direita (flecha DIR ou D)"/> + <joystick_slide name="move right btn" tool_tip="Andar para a direita (Shift + Seta direita ou D)"/> <joystick_turn name="forward btn" tool_tip="Andar para frente (flecha para cima ou W)"/> <joystick_turn name="backward btn" tool_tip="Andar para trás (flecha para baixo ou S)"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml b/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml index e648a7d873..d094c1b63a 100644 --- a/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml @@ -9,9 +9,6 @@ <floater.string name="Title"> Anotação: [NAME] </floater.string> - <floater.string label="Salvar" label_selected="Salvar" name="Save"> - Salvar - </floater.string> <text name="desc txt"> Descrição: </text> @@ -19,4 +16,5 @@ Carregando... </text_editor> <button label="Salvar" label_selected="Salvar" name="Save"/> + <button label="Excluir" label_selected="Excluir" name="Delete"/> </floater> diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml index 74b45f1d1e..dbc8b3ffbe 100644 --- a/indra/newview/skins/default/xui/pt/floater_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_tools.xml @@ -67,9 +67,9 @@ <text name="RenderingCost" tool_tip="Mostra o cálculo do custo de renderização do objeto"> þ: [COUNT] </text> - <check_box name="checkbox uniform"/> - <text name="checkbox uniform label"> - Esticar ambos os lados + <check_box label="" name="checkbox uniform"/> + <text label="Esticar ambos lados" name="checkbox uniform label"> + Esticar ambos lados </text> <check_box initial_value="true" label="Esticar texturas" name="checkbox stretch textures"/> <check_box initial_value="true" label="Mostrar na grade" name="checkbox snap to grid"/> diff --git a/indra/newview/skins/default/xui/pt/floater_world_map.xml b/indra/newview/skins/default/xui/pt/floater_world_map.xml index 65e48b4bfd..878d0b1973 100644 --- a/indra/newview/skins/default/xui/pt/floater_world_map.xml +++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml @@ -6,7 +6,7 @@ </text> </panel> <panel name="layout_panel_2"> - <button font="SansSerifSmall" label="Mostra minha localização" label_selected="Mostra minha localização" left_delta="91" name="Show My Location" tool_tip="Centrar o mapa na localização do meu avatar" width="135"/> + <button font="SansSerifSmall" label="Mostra minha localização" label_selected="Mostra minha localização" left_delta="91" name="Show My Location" tool_tip="Centrar o mapa na localização do meu avatar" /> <text name="me_label"> Eu </text> diff --git a/indra/newview/skins/default/xui/pt/menu_attachment_self.xml b/indra/newview/skins/default/xui/pt/menu_attachment_self.xml index de3178b946..5cb1b211cf 100644 --- a/indra/newview/skins/default/xui/pt/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/pt/menu_attachment_self.xml @@ -5,7 +5,7 @@ <menu_item_call label="Tirar" name="Detach"/> <menu_item_call label="Largar" name="Drop"/> <menu_item_call label="Ficar de pé" name="Stand Up"/> - <menu_item_call label="Minha aparência" name="Appearance..."/> + <menu_item_call label="Trocar de look" name="Change Outfit"/> <menu_item_call label="Meus amigos" name="Friends..."/> <menu_item_call label="Meus grupos" name="Groups..."/> <menu_item_call label="Meu perfil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/pt/menu_avatar_self.xml b/indra/newview/skins/default/xui/pt/menu_avatar_self.xml index ccbb921ebc..62055303b5 100644 --- a/indra/newview/skins/default/xui/pt/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/pt/menu_avatar_self.xml @@ -20,7 +20,9 @@ <context_menu label="Tirar ▶" name="Object Detach"/> <menu_item_call label="Tirar tudo" name="Detach All"/> </context_menu> - <menu_item_call label="Minha aparência" name="Appearance..."/> + <menu_item_call label="Trocar de look" name="Chenge Outfit"/> + <menu_item_call label="Editar meu look" name="Edit Outfit"/> + <menu_item_call label="Editar meu corpo" name="Edit My Shape"/> <menu_item_call label="Meus amigos" name="Friends..."/> <menu_item_call label="Meus grupos" name="Groups..."/> <menu_item_call label="Meu perfil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/pt/menu_bottomtray.xml b/indra/newview/skins/default/xui/pt/menu_bottomtray.xml index 43b446a67e..479d02512f 100644 --- a/indra/newview/skins/default/xui/pt/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/pt/menu_bottomtray.xml @@ -4,6 +4,11 @@ <menu_item_check label="Botão de movimento" name="ShowMoveButton"/> <menu_item_check label="Botão de ver" name="ShowCameraButton"/> <menu_item_check label="Botão de fotos" name="ShowSnapshotButton"/> + <menu_item_check label="Botão da Barra lateral" name="ShowSidebarButton"/> + <menu_item_check label="Botão Construir" name="ShowBuildButton"/> + <menu_item_check label="Botão Buscar" name="ShowSearchButton"/> + <menu_item_check label="Botão Mapa" name="ShowWorldMapButton"/> + <menu_item_check label="Botão do Mini Mapa" name="ShowMiniMapButton"/> <menu_item_call label="Cortar" name="NearbyChatBar_Cut"/> <menu_item_call label="Copiar" name="NearbyChatBar_Copy"/> <menu_item_call label="Colar" name="NearbyChatBar_Paste"/> diff --git a/indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml index effc970eb8..c3e0608954 100644 --- a/indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <menu name="Gear Menu"> <menu_item_call label="Ficar de pé" name="stand_up"/> - <menu_item_call label="Minha aparência" name="my_appearance"/> + <menu_item_call label="Trocar de look" name="change_outfit"/> <menu_item_call label="Meu perfil" name="my_profile"/> <menu_item_call label="Meus amigos" name="my_friends"/> <menu_item_call label="Meus grupos" name="my_groups"/> diff --git a/indra/newview/skins/default/xui/pt/menu_inventory.xml b/indra/newview/skins/default/xui/pt/menu_inventory.xml index 345534261a..1b86b37075 100644 --- a/indra/newview/skins/default/xui/pt/menu_inventory.xml +++ b/indra/newview/skins/default/xui/pt/menu_inventory.xml @@ -54,6 +54,7 @@ <menu_item_call label="Remover item" name="Purge Item"/> <menu_item_call label="Restaurar item" name="Restore Item"/> <menu_item_call label="Abrir" name="Open"/> + <menu_item_call label="Abrir original" name="Open Original"/> <menu_item_call label="Propriedades" name="Properties"/> <menu_item_call label="Renomear" name="Rename"/> <menu_item_call label="Copiar item UUID" name="Copy Asset UUID"/> diff --git a/indra/newview/skins/default/xui/pt/menu_login.xml b/indra/newview/skins/default/xui/pt/menu_login.xml index 8ea87a06d1..a43ac271a9 100644 --- a/indra/newview/skins/default/xui/pt/menu_login.xml +++ b/indra/newview/skins/default/xui/pt/menu_login.xml @@ -2,7 +2,7 @@ <menu_bar name="Login Menu"> <menu label="Eu" name="File"> <menu_item_call label="Preferências" name="Preferences..."/> - <menu_item_call label="Sair" name="Quit"/> + <menu_item_call label="Sair do [APP_NAME]" name="Quit"/> </menu> <menu label="Ajuda" name="Help"> <menu_item_call label="Ajuda do [SECOND_LIFE]" name="Second Life Help"/> diff --git a/indra/newview/skins/default/xui/pt/menu_participant_list.xml b/indra/newview/skins/default/xui/pt/menu_participant_list.xml index c0db7752af..01f1d4ef80 100644 --- a/indra/newview/skins/default/xui/pt/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/pt/menu_participant_list.xml @@ -14,8 +14,8 @@ <context_menu label="Opções do moderador >" name="Moderator Options"> <menu_item_check label="Pode bater papo por escrito" name="AllowTextChat"/> <menu_item_call label="Silenciar este participante" name="ModerateVoiceMuteSelected"/> - <menu_item_call label="Silenciar os demais" name="ModerateVoiceMuteOthers"/> <menu_item_call label="Desfazer silenciar deste participante" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="Desfazer silenciar dos demais" name="ModerateVoiceUnMuteOthers"/> + <menu_item_call label="Silenciar todos" name="ModerateVoiceMute"/> + <menu_item_call label="Desfazer silenciar para todos" name="ModerateVoiceUnmute"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index 84ad056df6..b091cc2c97 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -7,7 +7,7 @@ </menu_item_call> <menu_item_call label="Comprar L$" name="Buy and Sell L$"/> <menu_item_call label="Meu perfil" name="Profile"/> - <menu_item_call label="Minha aparência" name="Appearance"/> + <menu_item_call label="Trocar de look" name="ChangeOutfit"/> <menu_item_check label="Meu inventário" name="Inventory"/> <menu_item_check label="Meu inventário" name="ShowSidetrayInventory"/> <menu_item_check label="Meus gestos" name="Gestures"/> @@ -162,6 +162,7 @@ <menu_item_check label="Objetos flexíveis" name="Flexible Objects"/> </menu> <menu_item_check label="Executar diversas instâncias" name="Run Multiple Threads"/> + <menu_item_check label="Usar plugin de leitura de threads" name="Use Plugin Read Thread"/> <menu_item_call label="Limpar cache de grupo" name="ClearGroupCache"/> <menu_item_check label="Smoothing de mouse" name="Mouse Smoothing"/> <menu label="Atalhos" name="Shortcuts"> @@ -188,7 +189,6 @@ <menu_item_call label="Mais zoom" name="Zoom In"/> <menu_item_call label="Zoom padrão" name="Zoom Default"/> <menu_item_call label="Menos zoom" name="Zoom Out"/> - <menu_item_call label="Alternar tela inteira" name="Toggle Fullscreen"/> </menu> <menu_item_call label="Mostrar configurações de depuração" name="Debug Settings"/> <menu_item_check label="Show Develop Menu" name="Debug Mode"/> diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index 462dcf2b21..e64940ecb1 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -323,6 +323,9 @@ Você precisa de uma conta para entrar no [SECOND_LIFE]. Você gostaria de abrir </url> <usetemplate name="okcancelbuttons" notext="Tentar novamente" yestext="Abrir conta"/> </notification> + <notification name="InvalidCredentialFormat"> + Digite o nome e sobrenome do seu avatar no campo Nome de usuário, depois faça o login novamente. + </notification> <notification name="AddClassified"> Os anúncios serão publicados na seção 'Classificados' das buscas e em [http://secondlife.com/community/classifieds secondlife.com] durante uma semana. Escreva seu anúncio e clique em 'Publicar...' @@ -603,6 +606,11 @@ Esperada [VALIDS] <notification name="CannotEncodeFile"> Impossível codificar o arquivo: [FILE] </notification> + <notification name="CorruptedProtectedDataStore"> + Não foi possível fazer a leitura dos dados protegidos, redefinindo. + Isso pode ocorrer após mudanças na configuração da rede. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="CorruptResourceFile"> Fonte do arquivo corrompida: [FILE] </notification> @@ -962,6 +970,12 @@ em TODOS OS TERRENOS deste sim? Por favor, insira um valor maior. </notification> + <notification name="ConfirmItemDeleteHasLinks"> + Pelo menos um dos itens possui links que levam a ele. Ao excluir o item, os links não funcionarão mais. Por isso, recomendamos excluir os links primeiro. + +Tem certeza de que quer excluir estes items? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> + </notification> <notification name="ConfirmObjectDeleteLock"> Pelo menos um dos itens que você selecionou está trancado. @@ -1103,6 +1117,42 @@ Pressione a tecla F1 para ajuda ou aprender mais sobre [SECOND_LIFE]. Por favor, escolha se o seu avatar é feminino ou masculino. Você pode mudar de idéia depois. <usetemplate name="okcancelbuttons" notext="Feminino" yestext="Masculino"/> </notification> + <notification name="CantTeleportToGrid"> + Não foi possível ir para [SLURL], que fica em outro grid ([GRID]) em relação ao grid atual, ([CURRENT_GRID]). Feche o Visualizador e tente novamente. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="GeneralCertificateError"> + Falha de conexão com o servidor. +[REASON] + +SubjectName: [SUBJECT_NAME_STRING] +IssuerName: [ISSUER_NAME_STRING] +Válido de: [VALID_FROM] +Válido até: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +Impressão digital SHA1: [MD5_DIGEST] +Uso da chave: [KEYUSAGE] +Uso estendido da chave: [EXTENDEDKEYUSAGE] +Identificador chave de assunto: [SUBJECTKEYIDENTIFIER] + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TrustCertificateError"> + A autoridade de certificação deste servidor é desconhecida. + +Dados do certificado: +SubjectName: [SUBJECT_NAME_STRING] +IssuerName: [ISSUER_NAME_STRING] +Válido de: [VALID_FROM] +Válido até: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +Impressão digital SHA1: [MD5_DIGEST] +Uso da chave: [KEYUSAGE] +Uso estendido da chave: [EXTENDEDKEYUSAGE] +Identificador chave de assunto: [SUBJECTKEYIDENTIFIER] + +Confiar nesta autoridade? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Confiança"/> + </notification> <notification name="NotEnoughCurrency"> [NAME] L$ [PRICE] Você não possui suficientes L$ para fazer isso. </notification> @@ -1493,9 +1543,9 @@ Ir para o Banco de Conhecimento para maiores informações sobre Classificaçõe Você não é permitido nesta região devido à sua Classificação de maturidade. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Você não pode entrar nessa região devido à sua seleção de maturidade. + Você não pode entrar nessa região devido à sua seleção de maturidade. -Clique em 'Mudar preferência' para aumentar o nível de maturidade e entrar nessa região. De agora em diante você pode buscar e acessar conteúdo [REGIONMATURITY] . Para modificar esta configuração, vá à Eu > Preferências > Geral. +Clique em 'Mudar preferência' para aumentar seu nível de maturidade e ganhar acesso imediato. Você então poderá fazer buscas e acessar conteúdo [REGIONMATURITY]. Para modificar o nível de maturidade, use o menu Eu > Preferências > Gerais. <form name="form"> <button name="OK" text="Mudar preferência"/> <button default="true" name="Cancel" text="Fechar"/> @@ -2262,15 +2312,6 @@ Por favor, tente novamente em alguns instantes. <button name="Mute" text="Bloquear"/> </form> </notification> - <notification name="ObjectGiveItemUnknownUser"> - Um objeto chamado [OBJECTFROMNAME] de (residente desconhecido) lhe deu [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button name="Keep" text="Segure"/> - <button name="Discard" text="Descarte"/> - <button name="Mute" text="Bloquear"/> - </form> - </notification> <notification name="UserGiveItem"> [NAME_SLURL] lhe deu [OBJECTTYPE]: [ITEM_SLURL] @@ -2583,8 +2624,52 @@ O botão será exibido quando houver espaço suficente. <notification name="ShareNotification"> Arraste itens do inventário para uma pessoa no seletor de residentes </notification> + <notification name="DeedToGroupFail"> + Ocorreu uma falha durante a doação ao grupo. + </notification> <notification name="AvatarRezNotification"> - O avatar de '[NAME]' renderizou em [TIME] s. + ( [EXISTENCE] segundos de vida ) +O avatar de '[NAME]' emergiu em [TIME] segundos. + </notification> + <notification name="AvatarRezSelfNotification"> + ( [EXISTENCE] segundos de vida ) +Você confeccionou seu look em [TIME] segundos. + </notification> + <notification name="AvatarRezCloudNotification"> + ( [EXISTENCE] segundos de vida ) +Avatar '[NAME]' transformou-se em nuvem. + </notification> + <notification name="AvatarRezArrivedNotification"> + ( [EXISTENCE] segundos de vida ) +Avatar '[NAME]' surgiu. + </notification> + <notification name="AvatarRezLeftCloudNotification"> + ( [EXISTENCE] segundos de vida ) +O avatar de '[NAME]' transformou-se em nuvem depois de [TIME] segundos. + </notification> + <notification name="AvatarRezEnteredAppearanceNotification"> + ( [EXISTENCE] segundos de vida ) +Avatar '[NAME]' entrou no modo aparência. + </notification> + <notification name="AvatarRezLeftAppearanceNotification"> + ( [EXISTENCE] segundos de vida ) +Avatar '[NAME]' sair do modo aparecer. + </notification> + <notification name="AvatarRezLeftNotification"> + ( [EXISTENCE] segundos de vida ) +Avatar '[NAME]' saiu totalmente carregado. + </notification> + <notification name="ConfirmLeaveCall"> + Tem certeza de que quer sair desta ligação? + <usetemplate ignoretext="Confirmar antes de deixar ligação" name="okcancelignore" notext="Não" yestext="Sim"/> + </notification> + <notification name="ConfirmMuteAll"> + Você silenciou todos os participantes de uma ligação de grupo. +Todos os demais residentes que entrarem na ligação mais tarde também serão silenciados, mesmo se você sair da ligação. + + +Silenciar todos? + <usetemplate ignoretext="Confirmar antes de silenciar todos os participantes em ligações de grupo." name="okcancelignore" notext="OK" yestext="Cancelar"/> </notification> <global name="UnsupportedCPU"> - A velocidade da sua CPU não suporta os requisitos mínimos exigidos. diff --git a/indra/newview/skins/default/xui/pt/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/pt/panel_body_parts_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_body_parts_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/pt/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..094a03553b --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Trocar" name="switch_btn"/> + <button label="Comprar >" name="bodyparts_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_bottomtray.xml b/indra/newview/skins/default/xui/pt/panel_bottomtray.xml index 092135bd42..9fd7da55df 100644 --- a/indra/newview/skins/default/xui/pt/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/pt/panel_bottomtray.xml @@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="bottom_tray"> - <string name="SpeakBtnToolTip"> - Liga e desliga o microfone - </string> - <string name="VoiceControlBtnToolTip"> - Mostra/oculta os controles de voz - </string> + <string name="SpeakBtnToolTip" value="Liga e desliga o microfone"/> + <string name="VoiceControlBtnToolTip" value="Mostra/oculta os controles de voz"/> <layout_stack name="toolbar_stack"> <layout_panel name="speak_panel"> <talk_button name="talk"> @@ -24,6 +20,21 @@ <layout_panel name="snapshot_panel"> <button label="" name="snapshots" tool_tip="Tirar foto"/> </layout_panel> + <layout_panel name="sidebar_btn_panel"> + <button label="Barra lateral" name="sidebar_btn" tool_tip="Mostra/oculta a barra lateral"/> + </layout_panel> + <layout_panel name="build_btn_panel"> + <button label="Construir" name="build_btn" tool_tip="Mostra/oculta ferramentas de Construção"/> + </layout_panel> + <layout_panel name="search_btn_panel"> + <button label="Busca" name="search_btn" tool_tip="Mostra/oculta os gestos"/> + </layout_panel> + <layout_panel name="world_map_btn_panel"> + <button label="Mapa" name="world_map_btn" tool_tip="Mostra/oculta o Mapa Múndi"/> + </layout_panel> + <layout_panel name="mini_map_btn_panel"> + <button label="Mini Mapa" name="mini_map_btn" tool_tip="Mostra/oculta o Mini Mapa"/> + </layout_panel> <layout_panel name="im_well_panel"> <chiclet_im_well name="im_well"> <button name="Unread IM messages" tool_tip="Conversas"/> diff --git a/indra/newview/skins/default/xui/pt/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/pt/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..bfdc7290d2 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_clothing_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Adicionar +" name="add_btn"/> + <button label="Comprar >" name="clothing_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/pt/panel_clothing_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_cof_wearables.xml b/indra/newview/skins/default/xui/pt/panel_cof_wearables.xml new file mode 100644 index 0000000000..3e4b12b001 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_cof_wearables.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="cof_wearables"> + <accordion name="cof_wearables_accordion"> + <accordion_tab name="tab_attachments" title="Anexos"/> + <accordion_tab name="tab_clothing" title="Vestuário"/> + <accordion_tab name="tab_body_parts" title="Corpo"/> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/pt/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..91d90a5660 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_deletable_wearable_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="deletable_wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/pt/panel_dummy_clothing_list_item.xml new file mode 100644 index 0000000000..6af84de0c7 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_dummy_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="dummy_clothing_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_shape.xml b/indra/newview/skins/default/xui/pt/panel_edit_shape.xml index 504486c3bb..6b9ac94cac 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_shape.xml @@ -1,14 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shape_panel"> - <panel name="avatar_sex_panel"> - <text name="gender_text"> - Sexo: - </text> - <radio_group name="sex_radio"> - <radio_item label="Feminino" name="radio"/> - <radio_item label="Masculino" name="radio2"/> - </radio_group> - </panel> + <text name="avatar_height"> + [HEIGHT] metros de altura + </text> <panel label="Camisa" name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="shape_body_tab" title="Corpo"/> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/pt/panel_edit_tattoo.xml index 23cde50acc..f85bb3c499 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_tattoo.xml @@ -4,5 +4,6 @@ <texture_picker label="Tatuagem de cabeça" name="Head Tattoo" tool_tip="Clique para escolher uma foto"/> <texture_picker label="Tatuagem superior" name="Upper Tattoo" tool_tip="Selecione uma foto"/> <texture_picker label="Tatuagem inferior" name="Lower Tattoo" tool_tip="Selecione uma foto"/> + <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml b/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml index a78539f274..f14a04f440 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml @@ -93,6 +93,12 @@ <text name="edit_wearable_title" value="Editando forma"/> <panel label="Camisa" name="wearable_type_panel"> <text name="description_text" value="Forma:"/> + <radio_group name="sex_radio"> + <radio_item label="" name="sex_male" tool_tip="Masculino" value="1"/> + <radio_item label="" name="sex_female" tool_tip="Feminino" value="0"/> + </radio_group> + <icon name="male_icon" tool_tip="Masculino"/> + <icon name="female_icon" tool_tip="Feminino"/> </panel> <panel label="gear_buttom_panel" name="gear_buttom_panel"> <button name="friends_viewsort_btn" tool_tip="Opções"/> diff --git a/indra/newview/skins/default/xui/pt/panel_group_land_money.xml b/indra/newview/skins/default/xui/pt/panel_group_land_money.xml index 6f21b78b10..e57a85a726 100644 --- a/indra/newview/skins/default/xui/pt/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/pt/panel_group_land_money.xml @@ -6,6 +6,9 @@ <panel.string name="cant_view_group_land_text"> Você não está autorizado a acessar terrenos de grupos </panel.string> + <panel.string name="epmty_view_group_land_text"> + Nada consta + </panel.string> <panel.string name="cant_view_group_accounting_text"> Você não está autorizado a acessar os dados de contabilidade do grupo. </panel.string> diff --git a/indra/newview/skins/default/xui/pt/panel_group_notices.xml b/indra/newview/skins/default/xui/pt/panel_group_notices.xml index 4b5a00c761..9ccb85cdf6 100644 --- a/indra/newview/skins/default/xui/pt/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/pt/panel_group_notices.xml @@ -39,6 +39,7 @@ Cada grupo pode enviar no máximo 200 avisos/dia <text name="string"> Arrastar e soltar o item aqui para anexá-lo: </text> + <button label="Inventário" name="open_inventory" tool_tip="Inventário aberto"/> <button label="Tirar" label_selected="Remover o anexo" name="remove_attachment" tool_tip="Remover anexo da notificação."/> <button label="Enviar" label_selected="Enviar" name="send_notice"/> <group_drop_target name="drop_target" tool_tip="Arrastar um item do inventário para a caixa para enviá-lo com o aviso. É preciso ter autorização de cópia e transferência do item para anexá-lo ao aviso."/> diff --git a/indra/newview/skins/default/xui/pt/panel_login.xml b/indra/newview/skins/default/xui/pt/panel_login.xml index 588b8deaa3..94a885960a 100644 --- a/indra/newview/skins/default/xui/pt/panel_login.xml +++ b/indra/newview/skins/default/xui/pt/panel_login.xml @@ -8,18 +8,15 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> - <text name="first_name_text"> - Primeiro nome: + <text name="username_text"> + Nome de usuário: </text> - <line_editor label="Nome" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/> - <text name="last_name_text"> - Sobrenome: - </text> - <line_editor label="Sobrenome" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/> + <line_editor label="Nome de usuário" name="username_edit" tool_tip="[SECOND_LIFE] Nome de usuário"/> <text name="password_text"> Senha: </text> <check_box label="Lembrar senha" name="remember_check"/> + <button label="conectar" name="connect_btn"/> <text name="start_location_text"> Começar em: </text> @@ -27,7 +24,6 @@ <combo_box.item label="Última posição" name="MyLastLocation"/> <combo_box.item label="Meu início" name="MyHome"/> </combo_box> - <button label="conectar" name="connect_btn"/> </layout_panel> <layout_panel name="links"> <text name="create_new_account_text"> diff --git a/indra/newview/skins/default/xui/pt/panel_main_inventory.xml b/indra/newview/skins/default/xui/pt/panel_main_inventory.xml index 104c3bface..dbf8e4fa52 100644 --- a/indra/newview/skins/default/xui/pt/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/pt/panel_main_inventory.xml @@ -9,62 +9,20 @@ <text name="ItemcountText"> Itens: </text> - <menu_bar name="Inventory Menu"> - <menu label="Arquivo" name="File"> - <menu_item_call label="Abrir" name="Open"/> - <menu label="Upload" name="upload"> - <menu_item_call label="Imagem (L$[COST])..." name="Upload Image"/> - <menu_item_call label="Som (L$[COST])..." name="Upload Sound"/> - <menu_item_call label="Animação (L$[COST])..." name="Upload Animation"/> - <menu_item_call label="Volume (L$[COST] per file)..." name="Bulk Upload"/> - </menu> - <menu_item_call label="Nova janela" name="New Window"/> - <menu_item_call label="Mostrar filtros" name="Show Filters"/> - <menu_item_call label="Restabelecer filtros" name="Reset Current"/> - <menu_item_call label="Fechar todas as pastas" name="Close All Folders"/> - <menu_item_call label="Esvaziar lixeira" name="Empty Trash"/> - <menu_item_call label="Esvaziar achados e perdidos" name="Empty Lost And Found"/> - </menu> - <menu label="Crie" name="Create"> - <menu_item_call label="Nova pasta" name="New Folder"/> - <menu_item_call label="Novo script" name="New Script"/> - <menu_item_call label="Nova anotação" name="New Note"/> - <menu_item_call label="Novo gesto" name="New Gesture"/> - <menu label="Novas roupas" name="New Clothes"> - <menu_item_call label="Nova camisa" name="New Shirt"/> - <menu_item_call label="Novas calças" name="New Pants"/> - <menu_item_call label="Novos sapatos" name="New Shoes"/> - <menu_item_call label="Novas meias" name="New Socks"/> - <menu_item_call label="Nova blusa" name="New Jacket"/> - <menu_item_call label="Nova saia" name="New Skirt"/> - <menu_item_call label="Novas luvas" name="New Gloves"/> - <menu_item_call label="Nova camiseta" name="New Undershirt"/> - <menu_item_call label="Novas roupa de baixo" name="New Underpants"/> - <menu_item_call label="Novo alpha" name="New Alpha"/> - <menu_item_call label="Nova tatuagem" name="New Tattoo"/> - </menu> - <menu label="Nova parte do corpo" name="New Body Parts"> - <menu_item_call label="Nova forma" name="New Shape"/> - <menu_item_call label="Nova pele" name="New Skin"/> - <menu_item_call label="Novo cabelo" name="New Hair"/> - <menu_item_call label="Novos olhos" name="New Eyes"/> - </menu> - </menu> - <menu label="Classificar" name="Sort"> - <menu_item_check label="Por nome" name="By Name"/> - <menu_item_check label="Por data" name="By Date"/> - <menu_item_check label="Pastas sempre por nome" name="Folders Always By Name"/> - <menu_item_check label="Pastas do sistema no topo" name="System Folders To Top"/> - </menu> - </menu_bar> <filter_editor label="Filtro" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Todos os itens" name="All Items"/> - <inventory_panel label="Itens recentes" name="Recent Items"/> + <recent_inventory_panel label="Itens recentes" name="Recent Items"/> </tab_container> - <panel name="bottom_panel"> - <button name="options_gear_btn" tool_tip="Mostrar opções adicionais"/> - <button name="add_btn" tool_tip="Adicionar novo item"/> - <dnd_button name="trash_btn" tool_tip="Remover item selecionado"/> - </panel> + <layout_stack name="bottom_panel"> + <layout_panel name="options_gear_btn_panel"> + <button name="options_gear_btn" tool_tip="Mostrar opções adicionais"/> + </layout_panel> + <layout_panel name="add_btn_panel"> + <button name="add_btn" tool_tip="Adicionar novo item"/> + </layout_panel> + <layout_panel name="trash_btn_panel"> + <dnd_button name="trash_btn" tool_tip="Remover item selecionado"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_outfit_edit.xml b/indra/newview/skins/default/xui/pt/panel_outfit_edit.xml index 3dc8b4cc75..61e470586e 100644 --- a/indra/newview/skins/default/xui/pt/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/pt/panel_outfit_edit.xml @@ -2,6 +2,8 @@ <!-- Side tray Outfit Edit panel --> <panel label="Editar look" name="outfit_edit"> <string name="No Outfit" value="Nenhum"/> + <string name="unsaved_changes" value="Mudanças não salvas"/> + <string name="now_editing" value="Editando..."/> <panel.string name="not_available"> (N\A) </panel.string> @@ -21,18 +23,13 @@ </panel> <layout_stack name="im_panels"> <layout_panel label="Painel de controle de MIs" name="outfit_wearables_panel"> - <scroll_list name="look_items_list"> - <scroll_list.columns label="Ver item" name="look_item"/> - <scroll_list.columns label="Ordenar itens" name="look_item_sort"/> - </scroll_list> <panel label="bottom_panel" name="edit_panel"/> </layout_panel> <layout_panel name="add_wearables_panel"> - <filter_editor label="Filtro" name="look_item_filter"/> + <text name="add_to_outfit_label" value="Adicionar ao look:"/> <layout_stack name="filter_panels"> - <layout_panel label="Painel de controle de MIs" name="filter_button_panel"> - <text name="add_to_outfit_label" value="Adicionar ao look:"/> - <button label="O" name="filter_button"/> + <layout_panel label="Painel de controle de MIs" name="filter_panel"> + <filter_editor label="Filtro" name="look_item_filter"/> </layout_panel> </layout_stack> <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> diff --git a/indra/newview/skins/default/xui/pt/panel_people.xml b/indra/newview/skins/default/xui/pt/panel_people.xml index 17f5b6cbac..efeea89fa9 100644 --- a/indra/newview/skins/default/xui/pt/panel_people.xml +++ b/indra/newview/skins/default/xui/pt/panel_people.xml @@ -2,9 +2,9 @@ <!-- Side tray panel --> <panel label="Pessoas" name="people_panel"> <string name="no_recent_people" value="Ninguém, recentemente. Em busca de alguém para conversar? Use a [secondlife:///app/search/people Busca] ou o [secondlife:///app/worldmap Mapa-Múndi]."/> - <string name="no_filtered_recent_people" value="Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]."/> + <string name="no_filtered_recent_people" value="Não encontrou o que procura? Tente buscar no [secondlife:///app/search/people/[SEARCH_TERM] Search]."/> <string name="no_one_near" value="Ninguém por perto Em busca de alguém para conversar? Use a [secondlife:///app/search/people Busca] ou o [secondlife:///app/worldmap Mapa-Múndi]."/> - <string name="no_one_filtered_near" value="Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]."/> + <string name="no_one_filtered_near" value="Não encontrou o que procura? Tente buscar no [secondlife:///app/search/people/[SEARCH_TERM] Search]."/> <string name="no_friends_online" value="Nenhum amigo online"/> <string name="no_friends" value="Nenhum amigo"/> <string name="no_friends_msg"> @@ -12,11 +12,11 @@ Em busca de alguém para conversar? Procure no [secondlife:///app/worldmap Mapa-Múndi]. </string> <string name="no_filtered_friends_msg"> - Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]. + Não encontrou o que procura? Tente buscar no [secondlife:///app/search/people/[SEARCH_TERM] Search]. </string> <string name="people_filter_label" value="Filtro de pessoas"/> <string name="groups_filter_label" value="Filtro de grupos"/> - <string name="no_filtered_groups_msg" value="Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]."/> + <string name="no_filtered_groups_msg" value="Não encontrou o que procura? Tente buscar no [secondlife:///app/search/groups/[SEARCH_TERM] Search]."/> <string name="no_groups_msg" value="À procura de grupos interessantes? Tente fazer uma [secondlife:///app/search/groups Busca]."/> <filter_editor label="Filtro" name="filter_input"/> <tab_container name="tabs"> @@ -55,8 +55,8 @@ Em busca de alguém para conversar? Procure no [secondlife:///app/worldmap Mapa- <button label="Perfil" name="view_profile_btn" tool_tip="Exibir fotografia, grupos e outras informações dos residentes" width="50"/> <button label="MI" name="im_btn" tool_tip="Iniciar MI" width="24"/> <button label="Chamada" name="call_btn" tool_tip="Ligar para este residente" width="61"/> - <button label="Compartilhar" name="share_btn" width="82"/> - <button label="Teletransporte" name="teleport_btn" tool_tip="Oferecer teletransporte" width="86"/> + <button label="Compartilhar" name="share_btn" tool_tip="Compartilhar item de inventário" width="82"/> + <button label="Teletransporte" name="teleport_btn" tool_tip="Oferecer teletransporte" width="86"/> <button label="Perfil do grupo" name="group_info_btn" tool_tip="Exibir informação de grupo"/> <button label="Bate-papo de grupo" name="chat_btn" tool_tip="Iniciar bate-papo"/> <button label="Ligar para o grupo" name="group_call_btn" tool_tip="Ligar para este grupo"/> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml index 6f2cae0476..885aafc350 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml @@ -13,6 +13,7 @@ </text> <check_box label="Construção/Edição" name="edit_camera_movement" tool_tip="Use o posicionamento automático da câmera quando entrar e sair do modo de edição"/> <check_box label="Aparência" name="appearance_camera_movement" tool_tip="Use o posicionamento automático da câmera quando em modo de edição"/> + <check_box initial_value="1" label="Barra lateral" name="appearance_sidebar_positioning" tool_tip="Usar posicionamento automático da câmera na barra lateral"/> <check_box label="Mostre-me em visão de mouse" name="first_person_avatar_visible"/> <check_box label="Teclas de seta sempre me movem" name="arrow_keys_move_avatar_check"/> <check_box label="Dê dois toques e pressione para correr" name="tap_tap_hold_to_run"/> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml index e566fde27c..02b0ef35fe 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml @@ -45,6 +45,7 @@ </text> <check_box initial_value="true" label="Executar animação digitada quando estiver conversando" name="play_typing_animation"/> <check_box label="Enviar MIs por email se estiver desconectado" name="send_im_to_email"/> + <check_box label="Ativar MIs e bate-papos de texto simples" name="plain_text_chat_history"/> <text name="show_ims_in_label"> Mostrar MIs em: </text> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml index eb38323940..ccf213099e 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Gráficos" name="Display panel"> - <text name="UI Size:"> - Interface: - </text> <text name="QualitySpeed"> Qualidade e velocidade: </text> @@ -53,6 +50,10 @@ rápido m </text> <slider label="Contador máx. de partículas:" name="MaxParticleCount"/> + <slider label="Distância máx. desenho avatar:" name="MaxAvatarDrawDistance"/> + <text name="DrawDistanceMeterText3"> + m + </text> <slider label="Qualidade de Pós-processamento:" name="RenderPostProcess"/> <text name="MeshDetailText"> Detalhes de Malha: diff --git a/indra/newview/skins/default/xui/pt/sidepanel_appearance.xml b/indra/newview/skins/default/xui/pt/sidepanel_appearance.xml index b8bbb4051a..f075f45b8f 100644 --- a/indra/newview/skins/default/xui/pt/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/pt/sidepanel_appearance.xml @@ -1,9 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Looks" name="appearance panel"> <string name="No Outfit" value="Nenhum"/> + <string name="Unsaved Changes" value="Mudanças não salvas"/> + <string name="Now Wearing" value="Look atual..."/> <panel name="panel_currentlook"> - <text name="currentlook_title"> - (não salvo) + <button label="E" name="editappearance_btn"/> + <button label="O" name="openoutfit_btn"/> + <text name="currentlook_status"> + (Status) </text> </panel> <filter_editor label="Filtrar looks" name="Filter"/> diff --git a/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml b/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml index f634236cd2..31c96cad4c 100644 --- a/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml @@ -4,6 +4,7 @@ <panel name="button_panel"> <button label="Perfil" name="info_btn"/> <button label="Compartilhar" name="share_btn"/> + <button label="Comprar" name="shop_btn"/> <button label="Vestir" name="wear_btn"/> <button label="Tocar" name="play_btn"/> <button label="Teletransportar" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 66fbbfc916..829070418f 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -88,6 +88,24 @@ <string name="LoginDownloadingClothing"> Baixando roupas... </string> + <string name="InvalidCertificate"> + O servidor respondeu com um certificado inválido ou corrompido. Por favor contate o administrador do Grid. + </string> + <string name="CertInvalidHostname"> + Um hostname inválido foi usado para acessar o servidor. Verifique o SLURL ou hostname do Grid. + </string> + <string name="CertExpired"> + O certificado dado pelo Grid parece estar vencido. Verifique o relógio do sistema ou contate o administrador do Grid. + </string> + <string name="CertKeyUsage"> + O certificado dado pelo servidor não pôde ser usado para SSL. Por favor contate o administrador do Grid. + </string> + <string name="CertBasicConstraints"> + A cadeia de certificados do servidor tinha certificados demais. Por favor contate o administrador do Grid. + </string> + <string name="CertInvalidSignature"> + A assinatura do certificado dado pelo servidor do Grid não pôde ser verificada. Por favor contate o administrador do Grid. + </string> <string name="LoginFailedNoNetwork"> Erro de rede: Não foi possível estabelecer a conexão, verifique sua conexão de rede. </string> @@ -819,6 +837,42 @@ <string name="invalid"> Inválido </string> + <string name="shirt_not_worn"> + Camisa não vestida + </string> + <string name="pants_not_worn"> + Calças não vestidas + </string> + <string name="shoes_not_worn"> + Sapatos não calçados + </string> + <string name="socks_not_worn"> + Meias não calçadas + </string> + <string name="jacket_not_worn"> + Jaqueta não vestida + </string> + <string name="gloves_not_worn"> + Luvas não calçadas + </string> + <string name="undershirt_not_worn"> + Camiseta não vestida + </string> + <string name="underpants_not_worn"> + Roupa de baixo não vestida + </string> + <string name="skirt_not_worn"> + Saia não vestida + </string> + <string name="alpha_not_worn"> + Alpha não vestido + </string> + <string name="tattoo_not_worn"> + Tatuagem não usada + </string> + <string name="invalid_not_worn"> + inválido + </string> <string name="NewWearable"> Novo [WEARABLE_ITEM] </string> @@ -889,7 +943,10 @@ Pressione ESC para retornar para visão do mundo </string> <string name="InventoryNoMatchingItems"> - Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]. + Não encontrou o que procura? Tente buscar no [secondlife:///app/search/people/[SEARCH_TERM] Search]. + </string> + <string name="PlacesNoMatchingItems"> + Não encontrou o que procura? Tente buscar no [secondlife:///app/search/groups/[SEARCH_TERM] Search]. </string> <string name="FavoritesNoMatchingItems"> Arraste um marco para adicioná-lo aos seus favoritos. @@ -919,6 +976,7 @@ <string name="Wave" value="Acenar"/> <string name="HelloAvatar" value="Olá, avatar!"/> <string name="ViewAllGestures" value="Ver todos>>"/> + <string name="GetMoreGestures" value="Mais >>"/> <string name="Animations" value="Animações,"/> <string name="Calling Cards" value="Cartões de visitas,"/> <string name="Clothing" value="Vestuário,"/> @@ -1542,6 +1600,9 @@ <string name="MuteGroup"> (grupo) </string> + <string name="MuteExternal"> + (Externo) + </string> <string name="RegionNoCovenant"> Não foi definido um contrato para essa região. </string> @@ -3299,11 +3360,14 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="answered_call"> Ligação atendida </string> - <string name="started_call"> - Iniciou uma ligação de voz + <string name="you_started_call"> + Você iniciou uma ligação de voz + </string> + <string name="you_joined_call"> + Você entrou na ligação </string> - <string name="joined_call"> - Entrou na ligação + <string name="name_started_call"> + [NAME] iniciou uma ligação de voz </string> <string name="ringing-im"> Entrando em ligação de voz... @@ -3502,6 +3566,90 @@ Denunciar abuso <string name="Contents"> Conteúdo </string> + <string name="Gesture"> + Gesto + </string> + <string name="Male Gestures"> + Gestos masculinos + </string> + <string name="Female Gestures"> + Gestos femininos + </string> + <string name="Other Gestures"> + Outros gestos + </string> + <string name="Speech Gestures"> + Gestos da fala + </string> + <string name="Common Gestures"> + Gestos comuns + </string> + <string name="Male - Excuse me"> + Perdão - masculino + </string> + <string name="Male - Get lost"> + Deixe-me em paz - masculino + </string> + <string name="Male - Blow kiss"> + Mandar beijo - masculino + </string> + <string name="Male - Boo"> + Vaia - masculino + </string> + <string name="Male - Bored"> + Maçante - masculino + </string> + <string name="Male - Hey"> + Ôpa! - masculino + </string> + <string name="Male - Laugh"> + Risada - masculino + </string> + <string name="Male - Repulsed"> + Quero distância! - masculino + </string> + <string name="Male - Shrug"> + Encolher de ombros - masculino + </string> + <string name="Male - Stick tougue out"> + Mostrar a língua - masculino + </string> + <string name="Male - Wow"> + Wow - masculino + </string> + <string name="FeMale - Excuse me"> + Perdão - masc/fem + </string> + <string name="FeMale - Get lost"> + Deixe-me em paz - feminino + </string> + <string name="FeMale - Blow kiss"> + Mandar beijo - masc/fem + </string> + <string name="FeMale - Boo"> + Vaia - masc/fem + </string> + <string name="Female - Bored"> + Maçante - feminino + </string> + <string name="Female - Hey"> + Ôpa - feminino + </string> + <string name="Female - Laugh"> + Risada - feminina + </string> + <string name="Female - Repulsed"> + Quero distância! - feminino + </string> + <string name="Female - Shrug"> + Encolher ombros - feminino + </string> + <string name="Female - Stick tougue out"> + Mostrar a língua - feminino + </string> + <string name="Female - Wow"> + Wow - feminino + </string> <string name="AvatarBirthDateFormat"> [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] </string> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c887097575..0fd3cf5b3b 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -41,9 +41,12 @@ from llmanifest import LLManifest, main, proper_windows_path, path_ancestors class ViewerManifest(LLManifest): def is_packaging_viewer(self): - # This is overridden by the WindowsManifest sub-class, - # which has different behavior if it is not packaging the viewer. - return True + # Some commands, files will only be included + # if we are packaging the viewer on windows. + # This manifest is also used to copy + # files during the build (see copy_w_viewer_manifest + # and copy_l_viewer_manifest targets) + return 'package' in self.args['actions'] def construct(self): super(ViewerManifest, self).construct() @@ -175,13 +178,6 @@ class WindowsManifest(ViewerManifest): else: return ''.join(self.channel().split()) + '.exe' - def is_packaging_viewer(self): - # Some commands, files will only be included - # if we are packaging the viewer on windows. - # This manifest is also used to copy - # files during the build. - return 'package' in self.args['actions'] - def test_msvcrt_and_copy_action(self, src, dst): # This is used to test a dll manifest. # It is used as a temporary override during the construct method @@ -355,7 +351,6 @@ class WindowsManifest(ViewerManifest): self.path("qtwebkitd4.dll") self.path("qtxmlpatternsd4.dll") self.path("ssleay32.dll") - self.path("winmm.dll") # For WebKit/Qt plugin runtimes (image format plugins) if self.prefix(src="imageformats", dst="imageformats"): @@ -564,6 +559,10 @@ class WindowsManifest(ViewerManifest): class DarwinManifest(ViewerManifest): + def is_packaging_viewer(self): + # darwin requires full app bundle packaging even for debugging. + return True + def construct(self): # copy over the build result (this is a no-op if run within the xcode script) self.path(self.args['configuration'] + "/Second Life.app", dst="") @@ -642,7 +641,9 @@ class DarwinManifest(ViewerManifest): if dylibs["llcommon"]: for libfile in ("libapr-1.0.3.7.dylib", "libaprutil-1.0.3.8.dylib", - "libexpat.0.5.0.dylib"): + "libexpat.0.5.0.dylib", + "libexception_handler.dylib", + ): self.path(os.path.join(libdir, libfile), libfile) #libfmodwrapper.dylib @@ -663,7 +664,9 @@ class DarwinManifest(ViewerManifest): for libfile in ("libllcommon.dylib", "libapr-1.0.3.7.dylib", "libaprutil-1.0.3.8.dylib", - "libexpat.0.5.0.dylib"): + "libexpat.0.5.0.dylib", + "libexception_handler.dylib", + ): target_lib = os.path.join('../../..', libfile) self.run_command("ln -sf %(target)r %(link)r" % {'target': target_lib, @@ -894,6 +897,7 @@ class Linux_i686Manifest(LinuxManifest): if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): self.path("libapr-1.so.0") self.path("libaprutil-1.so.0") + self.path("libbreakpad_client.so.0.0.0", "libbreakpad_client.so.0") self.path("libdb-4.2.so") self.path("libcrypto.so.0.9.7") self.path("libexpat.so.1") @@ -931,7 +935,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libvivoxplatform.so") self.end_prefix("lib") - if self.args['buildtype'].lower() == 'release': + if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" self.run_command("find %(d)r/bin %(d)r/lib -type f | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure diff --git a/indra/win_crash_logger/llcrashloggerwindows.cpp b/indra/win_crash_logger/llcrashloggerwindows.cpp index c9e01c8418..2884231299 100644 --- a/indra/win_crash_logger/llcrashloggerwindows.cpp +++ b/indra/win_crash_logger/llcrashloggerwindows.cpp @@ -299,7 +299,6 @@ void LLCrashLoggerWindows::gatherPlatformSpecificFiles() // At this point we're responsive enough the user could click the close button SetCursor(gCursorArrow); mDebugLog["DisplayDeviceInfo"] = gDXHardware.getDisplayInfo(); - mFileMap["CrashLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLifeException.log"); } bool LLCrashLoggerWindows::mainLoop() |