diff options
Diffstat (limited to 'indra')
75 files changed, 1211 insertions, 682 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index b99166991f..90d0c28eb1 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -104,7 +104,6 @@ BOOL LLApp::sLogInSignal = FALSE; // Keeps track of application status LLScalarCond<LLApp::EAppStatus> LLApp::sStatus{LLApp::APP_STATUS_STOPPED}; LLAppErrorHandler LLApp::sErrorHandler = NULL; -BOOL LLApp::sErrorThreadRunning = FALSE; LLApp::LLApp() @@ -787,13 +786,8 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) return; } - // Flag status to ERROR, so thread_error does its work. + // Flag status to ERROR LLApp::setError(); - // Block in the signal handler until somebody says that we're done. - while (LLApp::sErrorThreadRunning && !LLApp::isStopped()) - { - ms_sleep(10); - } if (LLApp::sLogInSignal) { diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index c832c8b142..a892bfeb1e 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -291,7 +291,6 @@ protected: static void setStatus(EAppStatus status); // Use this to change the application status. static LLScalarCond<EAppStatus> sStatus; // Reflects current application status - static BOOL sErrorThreadRunning; // Set while the error thread is running static BOOL sDisableCrashlogger; // Let the OS handle crashes for us. std::wstring mCrashReportPipeStr; //Name of pipe to use for crash reporting. diff --git a/indra/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h index 5800ec5e5d..3e86767d7e 100644 --- a/indra/llcommon/lldictionary.h +++ b/indra/llcommon/lldictionary.h @@ -87,11 +87,10 @@ protected: } void addEntry(Index index, Entry *entry) { - if (lookup(index)) + if (!insert(value_type(index, entry)).second) { LL_ERRS() << "Dictionary entry already added (attempted to add duplicate entry)" << LL_ENDL; } - (*this)[index] = entry; } }; diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h index 9a6453ea48..96ccfb481e 100644 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -46,33 +46,32 @@ template <class Type> class LLPointer { public: - - LLPointer() : + LLPointer() : mPointer(NULL) { } - LLPointer(Type* ptr) : + LLPointer(Type* ptr) : mPointer(ptr) { ref(); } - LLPointer(const LLPointer<Type>& ptr) : + LLPointer(const LLPointer<Type>& ptr) : mPointer(ptr.mPointer) { ref(); } - // support conversion up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. + // Support conversion up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. template<typename Subclass> - LLPointer(const LLPointer<Subclass>& ptr) : + LLPointer(const LLPointer<Subclass>& ptr) : mPointer(ptr.get()) { ref(); } - ~LLPointer() + ~LLPointer() { unref(); } @@ -83,39 +82,39 @@ public: const Type& operator*() const { return *mPointer; } Type& operator*() { return *mPointer; } - operator BOOL() const { return (mPointer != NULL); } - operator bool() const { return (mPointer != NULL); } + operator BOOL() const { return (mPointer != NULL); } + operator bool() const { return (mPointer != NULL); } bool operator!() const { return (mPointer == NULL); } bool isNull() const { return (mPointer == NULL); } bool notNull() const { return (mPointer != NULL); } - operator Type*() const { return mPointer; } - bool operator !=(Type* ptr) const { return (mPointer != ptr); } - bool operator ==(Type* ptr) const { return (mPointer == ptr); } - bool operator ==(const LLPointer<Type>& ptr) const { return (mPointer == ptr.mPointer); } - bool operator < (const LLPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); } - bool operator > (const LLPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); } + operator Type*() const { return mPointer; } + bool operator !=(Type* ptr) const { return (mPointer != ptr); } + bool operator ==(Type* ptr) const { return (mPointer == ptr); } + bool operator ==(const LLPointer<Type>& ptr) const { return (mPointer == ptr.mPointer); } + bool operator < (const LLPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); } + bool operator > (const LLPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); } - LLPointer<Type>& operator =(Type* ptr) - { + LLPointer<Type>& operator =(Type* ptr) + { assign(ptr); - return *this; + return *this; } - LLPointer<Type>& operator =(const LLPointer<Type>& ptr) - { + LLPointer<Type>& operator =(const LLPointer<Type>& ptr) + { assign(ptr); - return *this; + return *this; } // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. template<typename Subclass> - LLPointer<Type>& operator =(const LLPointer<Subclass>& ptr) - { + LLPointer<Type>& operator =(const LLPointer<Subclass>& ptr) + { assign(ptr.get()); - return *this; + return *this; } - + // Just exchange the pointers, which will not change the reference counts. static void swap(LLPointer<Type>& a, LLPointer<Type>& b) { @@ -129,16 +128,6 @@ protected: void ref(); void unref(); #else - - void assign(const LLPointer<Type>& ptr) - { - if( mPointer != ptr.mPointer ) - { - unref(); - mPointer = ptr.mPointer; - ref(); - } - } void ref() { if (mPointer) @@ -161,7 +150,18 @@ protected: } } } -#endif +#endif // LL_LIBRARY_INCLUDE + + void assign(const LLPointer<Type>& ptr) + { + if (mPointer != ptr.mPointer) + { + unref(); + mPointer = ptr.mPointer; + ref(); + } + } + protected: Type* mPointer; }; @@ -169,18 +169,18 @@ protected: template <class Type> class LLConstPointer { public: - LLConstPointer() : + LLConstPointer() : mPointer(NULL) { } - LLConstPointer(const Type* ptr) : + LLConstPointer(const Type* ptr) : mPointer(ptr) { ref(); } - LLConstPointer(const LLConstPointer<Type>& ptr) : + LLConstPointer(const LLConstPointer<Type>& ptr) : mPointer(ptr.mPointer) { ref(); @@ -188,7 +188,7 @@ public: // support conversion up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. template<typename Subclass> - LLConstPointer(const LLConstPointer<Subclass>& ptr) : + LLConstPointer(const LLConstPointer<Subclass>& ptr) : mPointer(ptr.get()) { ref(); @@ -203,55 +203,55 @@ public: const Type* operator->() const { return mPointer; } const Type& operator*() const { return *mPointer; } - operator BOOL() const { return (mPointer != NULL); } - operator bool() const { return (mPointer != NULL); } + operator BOOL() const { return (mPointer != NULL); } + operator bool() const { return (mPointer != NULL); } bool operator!() const { return (mPointer == NULL); } bool isNull() const { return (mPointer == NULL); } bool notNull() const { return (mPointer != NULL); } - operator const Type*() const { return mPointer; } - bool operator !=(const Type* ptr) const { return (mPointer != ptr); } - bool operator ==(const Type* ptr) const { return (mPointer == ptr); } - bool operator ==(const LLConstPointer<Type>& ptr) const { return (mPointer == ptr.mPointer); } - bool operator < (const LLConstPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); } - bool operator > (const LLConstPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); } + operator const Type*() const { return mPointer; } + bool operator !=(const Type* ptr) const { return (mPointer != ptr); } + bool operator ==(const Type* ptr) const { return (mPointer == ptr); } + bool operator ==(const LLConstPointer<Type>& ptr) const { return (mPointer == ptr.mPointer); } + bool operator < (const LLConstPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); } + bool operator > (const LLConstPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); } - LLConstPointer<Type>& operator =(const Type* ptr) + LLConstPointer<Type>& operator =(const Type* ptr) { if( mPointer != ptr ) { - unref(); - mPointer = ptr; + unref(); + mPointer = ptr; ref(); } - return *this; + return *this; } - LLConstPointer<Type>& operator =(const LLConstPointer<Type>& ptr) - { + LLConstPointer<Type>& operator =(const LLConstPointer<Type>& ptr) + { if( mPointer != ptr.mPointer ) { - unref(); + unref(); mPointer = ptr.mPointer; ref(); } - return *this; + return *this; } // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. template<typename Subclass> - LLConstPointer<Type>& operator =(const LLConstPointer<Subclass>& ptr) - { + LLConstPointer<Type>& operator =(const LLConstPointer<Subclass>& ptr) + { if( mPointer != ptr.get() ) { - unref(); + unref(); mPointer = ptr.get(); ref(); } - return *this; + return *this; } - + // Just exchange the pointers, which will not change the reference counts. static void swap(LLConstPointer<Type>& a, LLConstPointer<Type>& b) { @@ -262,11 +262,11 @@ public: protected: #ifdef LL_LIBRARY_INCLUDE - void ref(); + void ref(); void unref(); -#else - void ref() - { +#else // LL_LIBRARY_INCLUDE + void ref() + { if (mPointer) { mPointer->ref(); @@ -277,9 +277,9 @@ protected: { if (mPointer) { - const Type *tempp = mPointer; + const Type *temp = mPointer; mPointer = NULL; - tempp->unref(); + temp->unref(); if (mPointer != NULL) { LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL; @@ -287,7 +287,8 @@ protected: } } } -#endif +#endif // LL_LIBRARY_INCLUDE + protected: const Type* mPointer; }; @@ -297,13 +298,13 @@ class LLCopyOnWritePointer : public LLPointer<Type> { public: typedef LLCopyOnWritePointer<Type> self_t; - typedef LLPointer<Type> pointer_t; - - LLCopyOnWritePointer() + typedef LLPointer<Type> pointer_t; + + LLCopyOnWritePointer() : mStayUnique(false) {} - LLCopyOnWritePointer(Type* ptr) + LLCopyOnWritePointer(Type* ptr) : LLPointer<Type>(ptr), mStayUnique(false) {} diff --git a/indra/llcommon/llrefcount.cpp b/indra/llcommon/llrefcount.cpp index 6852b5536a..3da94e7a8d 100644 --- a/indra/llcommon/llrefcount.cpp +++ b/indra/llcommon/llrefcount.cpp @@ -30,7 +30,7 @@ #include "llerror.h" // maximum reference count before sounding memory leak alarm -const S32 gMaxRefCount = S32_MAX; +const S32 gMaxRefCount = LL_REFCOUNT_FREE; LLRefCount::LLRefCount(const LLRefCount& other) : mRef(0) @@ -49,7 +49,7 @@ LLRefCount::LLRefCount() : } LLRefCount::~LLRefCount() -{ +{ if (mRef != LL_REFCOUNT_FREE && mRef != 0) { LL_ERRS() << "deleting non-zero reference" << LL_ENDL; diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h index 2080da1565..15e7175fc8 100644 --- a/indra/llcommon/llrefcount.h +++ b/indra/llcommon/llrefcount.h @@ -51,24 +51,20 @@ protected: public: LLRefCount(); - inline void validateRefCount() const - { - llassert(mRef > 0); // ref count below 0, likely corrupted - llassert(mRef < gMaxRefCount); // ref count excessive, likely memory leak - } - inline void ref() const - { - mRef++; - validateRefCount(); - } + { + llassert(mRef != LL_REFCOUNT_FREE); // object is deleted + mRef++; + llassert(mRef < gMaxRefCount); // ref count excessive, likely memory leak + } inline S32 unref() const { - validateRefCount(); + llassert(mRef != LL_REFCOUNT_FREE); // object is deleted + llassert(mRef > 0); // ref count below 1, likely corrupted if (0 == --mRef) { - mRef = LL_REFCOUNT_FREE; // set to nonsense yet recognizable value to aid in debugging + mRef = LL_REFCOUNT_FREE; // set to nonsense yet recognizable value to aid in debugging delete this; return 0; } @@ -82,8 +78,8 @@ public: return mRef; } -private: - mutable S32 mRef; +private: + mutable S32 mRef; }; @@ -106,7 +102,7 @@ protected: public: LLThreadSafeRefCount(); LLThreadSafeRefCount(const LLThreadSafeRefCount&); - LLThreadSafeRefCount& operator=(const LLThreadSafeRefCount& ref) + LLThreadSafeRefCount& operator=(const LLThreadSafeRefCount& ref) { mRef = 0; return *this; @@ -114,8 +110,8 @@ public: void ref() { - mRef++; - } + mRef++; + } void unref() { @@ -136,36 +132,36 @@ public: return currentVal; } -private: - LLAtomicS32 mRef; +private: + LLAtomicS32 mRef; }; /** * intrusive pointer support for LLThreadSafeRefCount * this allows you to use boost::intrusive_ptr with any LLThreadSafeRefCount-derived type */ -inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p) +inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p) { p->ref(); } -inline void intrusive_ptr_release(LLThreadSafeRefCount* p) +inline void intrusive_ptr_release(LLThreadSafeRefCount* p) { - p->unref(); + p->unref(); } /** * intrusive pointer support * this allows you to use boost::intrusive_ptr with any LLRefCount-derived type */ -inline void intrusive_ptr_add_ref(LLRefCount* p) +inline void intrusive_ptr_add_ref(LLRefCount* p) { p->ref(); } -inline void intrusive_ptr_release(LLRefCount* p) +inline void intrusive_ptr_release(LLRefCount* p) { - p->unref(); + p->unref(); } #endif diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp index d5adf11264..22bbff4478 100644 --- a/indra/llcommon/threadpool.cpp +++ b/indra/llcommon/threadpool.cpp @@ -21,11 +21,12 @@ #include "llevents.h" #include "stringize.h" -LL::ThreadPool::ThreadPool(const std::string& name, size_t threads, size_t capacity): +LL::ThreadPool::ThreadPool(const std::string& name, size_t threads, size_t capacity, bool auto_shutdown): super(name), mQueue(name, capacity), mName("ThreadPool:" + name), - mThreadCount(threads) + mThreadCount(threads), + mAutomaticShutdown(auto_shutdown) {} void LL::ThreadPool::start() @@ -39,6 +40,13 @@ void LL::ThreadPool::start() run(tname); }); } + + // Some threads might need to run longer than LLEventPumps + if (!mAutomaticShutdown) + { + return; + } + // Listen on "LLApp", and when the app is shutting down, close the queue // and join the workers. LLEventPumps::instance().obtain("LLApp").listen( diff --git a/indra/llcommon/threadpool.h b/indra/llcommon/threadpool.h index f8eec3b457..22c875edb9 100644 --- a/indra/llcommon/threadpool.h +++ b/indra/llcommon/threadpool.h @@ -31,7 +31,7 @@ namespace LL * Pass ThreadPool a string name. This can be used to look up the * relevant WorkQueue. */ - ThreadPool(const std::string& name, size_t threads=1, size_t capacity=1024); + ThreadPool(const std::string& name, size_t threads=1, size_t capacity=1024, bool auto_shutdown = true); virtual ~ThreadPool(); /** @@ -66,6 +66,7 @@ namespace LL std::string mName; size_t mThreadCount; std::vector<std::pair<std::string, std::thread>> mThreads; + bool mAutomaticShutdown; }; } // namespace LL diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index 97b543f3b6..5756ddb32b 100644 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -90,6 +90,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp() if (signature[0] != 'B' || signature[1] != 'M') { LL_WARNS() << "Not a BMP" << LL_ENDL; + mWarning = "IncorrectFormat"; return false; } @@ -140,6 +141,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng() if (memcmp(signature, png_magic, PNG_MAGIC_SIZE) != 0) { LL_WARNS() << "Not a PNG" << LL_ENDL; + mWarning = "IncorrectFormat"; return false; } @@ -183,6 +185,7 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0) { LL_WARNS() << "Not a JPEG" << LL_ENDL; + mWarning = "IncorrectFormat"; return false; } fseek(fp, 0, SEEK_SET); // go back to start of the file diff --git a/indra/llimage/llimagedimensionsinfo.h b/indra/llimage/llimagedimensionsinfo.h index 8f716c5d02..ade283bb85 100644 --- a/indra/llimage/llimagedimensionsinfo.h +++ b/indra/llimage/llimagedimensionsinfo.h @@ -55,6 +55,12 @@ public: { return mLastError; } + + const std::string& getWarningName() + { + return mWarning; + } + protected: void clean() @@ -129,6 +135,7 @@ protected: std::string mSrcFilename; std::string mLastError; + std::string mWarning; U8* mData; diff --git a/indra/llui/llcontainerview.cpp b/indra/llui/llcontainerview.cpp index 727fbe850e..1c33088e8d 100644 --- a/indra/llui/llcontainerview.cpp +++ b/indra/llui/llcontainerview.cpp @@ -288,7 +288,7 @@ void LLContainerView::setLabel(const std::string& label) mLabel = label; } -void LLContainerView::setDisplayChildren(const BOOL displayChildren) +void LLContainerView::setDisplayChildren(BOOL displayChildren) { mDisplayChildren = displayChildren; for (child_list_const_iter_t child_iter = getChildList()->begin(); diff --git a/indra/llui/llcontainerview.h b/indra/llui/llcontainerview.h index 99267d978a..8e75aaef6e 100644 --- a/indra/llui/llcontainerview.h +++ b/indra/llui/llcontainerview.h @@ -78,7 +78,7 @@ public: void setLabel(const std::string& label); void showLabel(BOOL show) { mShowLabel = show; } - void setDisplayChildren(const BOOL displayChildren); + void setDisplayChildren(BOOL displayChildren); BOOL getDisplayChildren() { return mDisplayChildren; } void setScrollContainer(LLScrollContainer* scroll) {mScrollContainer = scroll;} diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 5319af1b60..8883626d78 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -182,14 +182,18 @@ LLFolderViewItem::~LLFolderViewItem() BOOL LLFolderViewItem::postBuild() { - LLFolderViewModelItem& vmi = *getViewModelItem(); - // getDisplayName() is expensive (due to internal getLabelSuffix() and name building) - // it also sets search strings so it requires a filter reset - mLabel = vmi.getDisplayName(); - setToolTip(vmi.getName()); + LLFolderViewModelItem* vmi = getViewModelItem(); + llassert(vmi); // not supposed to happen, if happens, find out why and fix + if (vmi) + { + // getDisplayName() is expensive (due to internal getLabelSuffix() and name building) + // it also sets search strings so it requires a filter reset + mLabel = vmi->getDisplayName(); + setToolTip(vmi->getName()); - // Dirty the filter flag of the model from the view (CHUI-849) - vmi.dirtyFilter(); + // Dirty the filter flag of the model from the view (CHUI-849) + vmi->dirtyFilter(); + } // Don't do full refresh on constructor if it is possible to avoid // it significantly slows down bulk view creation. diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 69e338ddb9..341ddb83f3 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -479,7 +479,7 @@ LLTrace::BlockTimerStatHandle FTM_SYNTAX_COLORING("Syntax Coloring"); // Walk through a string, applying the rules specified by the keyword token list and // create a list of color segments. -void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLWString& wtext, const LLColor4 &defaultColor, LLTextEditor& editor) +void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLWString& wtext, LLTextEditor& editor, LLStyleConstSP style) { LL_RECORD_BLOCK_TIME(FTM_SYNTAX_COLORING); seg_list->clear(); @@ -491,7 +491,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW S32 text_len = wtext.size() + 1; - seg_list->push_back( new LLNormalTextSegment( defaultColor, 0, text_len, editor ) ); + seg_list->push_back( new LLNormalTextSegment( style, 0, text_len, editor ) ); const llwchar* base = wtext.c_str(); const llwchar* cur = base; @@ -501,9 +501,9 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW { if( *cur == '\n' ) { - LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(cur-base); + LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, cur-base); text_segment->setToken( 0 ); - insertSegment( *seg_list, text_segment, text_len, defaultColor, editor); + insertSegment( *seg_list, text_segment, text_len, style, editor); cur++; if( !*cur || *cur == '\n' ) { @@ -541,7 +541,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW S32 seg_end = cur - base; //create segments from seg_start to seg_end - insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); + insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, style, editor); line_done = TRUE; // to break out of second loop. break; } @@ -648,7 +648,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW seg_end = seg_start + between_delimiters + cur_delimiter->getLengthHead(); } - insertSegments(wtext, *seg_list,cur_delimiter, text_len, seg_start, seg_end, defaultColor, editor); + insertSegments(wtext, *seg_list,cur_delimiter, text_len, seg_start, seg_end, style, editor); /* LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_delimiter->getColor(), seg_start, seg_end, editor ); text_segment->setToken( cur_delimiter ); @@ -682,7 +682,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW // LL_INFOS("SyntaxLSL") << "Seg: [" << word.c_str() << "]" << LL_ENDL; - insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); + insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, style, editor); } cur += seg_len; continue; @@ -697,30 +697,32 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW } } -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 ) +void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* cur_token, S32 text_len, S32 seg_start, S32 seg_end, LLStyleConstSP style, LLTextEditor& editor ) { std::string::size_type pos = wtext.find('\n',seg_start); + + LLStyleConstSP cur_token_style = new LLStyle(LLStyle::Params().font(style->getFont()).color(cur_token->getColor())); 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 ); + LLTextSegmentPtr text_segment = new LLNormalTextSegment(cur_token_style, seg_start, pos, editor); text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + insertSegment( seg_list, text_segment, text_len, style, editor); } - LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(pos); + LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, pos); text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + insertSegment( seg_list, text_segment, text_len, style, editor); seg_start = pos+1; pos = wtext.find('\n',seg_start); } - LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, seg_end, editor ); + LLTextSegmentPtr text_segment = new LLNormalTextSegment(cur_token_style, seg_start, seg_end, editor); text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + insertSegment( seg_list, text_segment, text_len, style, editor); } void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor ) @@ -744,6 +746,27 @@ void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSe } } +void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, LLStyleConstSP style, LLTextEditor& editor ) +{ + LLTextSegmentPtr last = seg_list.back(); + S32 new_seg_end = new_segment->getEnd(); + + if( new_segment->getStart() == last->getStart() ) + { + seg_list.pop_back(); + } + else + { + last->setEnd( new_segment->getStart() ); + } + seg_list.push_back( new_segment ); + + if( new_seg_end < text_len ) + { + seg_list.push_back( new LLNormalTextSegment( style, new_seg_end, text_len, editor ) ); + } +} + #ifdef _DEBUG void LLKeywords::dump() { diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 18e2ed06c5..2410fe7d5a 100644 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -29,6 +29,7 @@ #include "lldir.h" +#include "llstyle.h" #include "llstring.h" #include "v3color.h" #include "v4color.h" @@ -115,8 +116,8 @@ public: void findSegments(std::vector<LLTextSegmentPtr> *seg_list, const LLWString& text, - const LLColor4 &defaultColor, - class LLTextEditor& editor); + class LLTextEditor& editor, + LLStyleConstSP style); void initialize(LLSD SyntaxXML); void processTokens(); @@ -181,9 +182,11 @@ protected: S32 text_len, S32 seg_start, S32 seg_end, - const LLColor4 &defaultColor, + LLStyleConstSP style, LLTextEditor& editor); + void insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, LLStyleConstSP style, LLTextEditor& editor ); + bool mLoaded; LLSD mSyntax; word_token_map_t mWordTokenMap; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 16c27da56a..73ac72ac56 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1774,7 +1774,8 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p) mNeedsArrange(FALSE), mAlwaysShowMenu(FALSE), mResetScrollPositionOnShow(true), - mShortcutPad(p.shortcut_pad) + mShortcutPad(p.shortcut_pad), + mFont(p.font) { typedef boost::tokenizer<boost::char_separator<char> > tokenizer; boost::char_separator<char> sep("_"); @@ -3633,6 +3634,7 @@ BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu ) p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor"); p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); + p.font = menu->getFont(); LLMenuItemBranchDownGL* branch = LLUICtrlFactory::create<LLMenuItemBranchDownGL>(p); success &= branch->addToAcceleratorList(&mAccelerators); diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 9d3be8d94f..8194501f79 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -555,7 +555,9 @@ public: // add a context menu branch BOOL appendContextSubMenu(LLMenuGL *menu); -protected: + const LLFontGL *getFont() const { return mFont; } + + protected: void createSpilloverBranch(); void cleanupSpilloverBranch(); // Add the menu item to this menu. @@ -587,6 +589,9 @@ protected: BOOL mKeepFixedSize; BOOL mNeedsArrange; + // Font for top menu items only + const LLFontGL* mFont; + private: diff --git a/indra/llui/llstatview.cpp b/indra/llui/llstatview.cpp index bb4969c81f..03f2fb7cc0 100644 --- a/indra/llui/llstatview.cpp +++ b/indra/llui/llstatview.cpp @@ -58,10 +58,7 @@ LLStatView::~LLStatView() } } - static StatViewRegistry::Register<LLStatBar> r1("stat_bar"); static StatViewRegistry::Register<LLStatView> r2("stat_view"); // stat_view can be a child of panels/etc. static LLDefaultChildRegistry::Register<LLStatView> r3("stat_view"); - - diff --git a/indra/llui/llstatview.h b/indra/llui/llstatview.h index af4db7d7ea..044f0a8679 100644 --- a/indra/llui/llstatview.h +++ b/indra/llui/llstatview.h @@ -63,7 +63,7 @@ protected: friend class LLUICtrlFactory; protected: - std::string mSetting; - + const std::string mSetting; }; + #endif // LL_STATVIEW_ diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 8732a7ce45..26a38bd541 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -3431,7 +3431,7 @@ BOOL LLNormalTextSegment::handleToolTip(S32 x, S32 y, MASK mask) if (mToken && !mToken->getToolTip().empty()) { const LLWString& wmsg = mToken->getToolTip(); - LLToolTipMgr::instance().show(wstring_to_utf8str(wmsg)); + LLToolTipMgr::instance().show(wstring_to_utf8str(wmsg), (mToken->getType() == LLKeywordToken::TT_FUNCTION)); return TRUE; } // or do we have an explicitly set tooltip (e.g., for Urls) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3d2a426913..c83ed4c3e1 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1779,7 +1779,8 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) else { if (mEnableTooltipPaste && - LLToolTipMgr::instance().toolTipVisible() && + LLToolTipMgr::instance().toolTipVisible() && + LLToolTipMgr::instance().isTooltipPastable() && KEY_TAB == key) { // Paste the first line of a tooltip into the editor std::string message; diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 2f56a8b1d0..c4b132317f 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -154,7 +154,8 @@ LLToolTip::Params::Params() text_color("text_color"), time_based_media("time_based_media", false), web_based_media("web_based_media", false), - media_playing("media_playing", false) + media_playing("media_playing", false), + allow_paste_tooltip("allow_paste_tooltip", false) { changeDefault(chrome, true); } @@ -166,7 +167,8 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p) mTextBox(NULL), mInfoButton(NULL), mPlayMediaButton(NULL), - mHomePageButton(NULL) + mHomePageButton(NULL), + mIsTooltipPastable(p.allow_paste_tooltip) { LLTextBox::Params params; params.name = params.initial_value().asString(); @@ -308,6 +310,8 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p) mTextBox->reshape(mTextBox->getRect().getWidth(), llmax(mTextBox->getRect().getHeight(), tooltip_rect.getHeight() - 2 * mPadding)); setShape(tooltip_rect); + + mIsTooltipPastable = p.allow_paste_tooltip; } void LLToolTip::setVisible(BOOL visible) @@ -469,9 +473,9 @@ void LLToolTipMgr::createToolTip(const LLToolTip::Params& params) } -void LLToolTipMgr::show(const std::string& msg) +void LLToolTipMgr::show(const std::string& msg, bool allow_paste_tooltip) { - show(LLToolTip::Params().message(msg)); + show(LLToolTip::Params().message(msg).allow_paste_tooltip(allow_paste_tooltip)); } void LLToolTipMgr::show(const LLToolTip::Params& params) @@ -612,5 +616,13 @@ void LLToolTipMgr::getToolTipMessage(std::string & message) } } +bool LLToolTipMgr::isTooltipPastable() +{ + if (toolTipVisible()) + { + return mToolTip->isTooltipPastable(); + } + return false; + } // EOF diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index 0b1fbe5367..6ff7c0671a 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -91,6 +91,8 @@ public: padding; Optional<bool> wrap; + Optional<bool> allow_paste_tooltip; + Params(); }; /*virtual*/ void draw(); @@ -106,6 +108,7 @@ public: void initFromParams(const LLToolTip::Params& params); void getToolTipMessage(std::string & message); + bool isTooltipPastable() { return mIsTooltipPastable; } private: class LLTextBox* mTextBox; @@ -117,6 +120,8 @@ private: LLFrameTimer mVisibleTimer; bool mHasClickCallback; S32 mPadding; // pixels + + bool mIsTooltipPastable; }; // used for the inspector tooltips which need different background images etc. @@ -134,7 +139,7 @@ class LLToolTipMgr : public LLSingleton<LLToolTipMgr> public: void show(const LLToolTip::Params& params); - void show(const std::string& message); + void show(const std::string& message, bool allow_paste_tooltip = false); void unblockToolTips(); void blockToolTips(); @@ -146,6 +151,7 @@ public: void updateToolTipVisibility(); void getToolTipMessage(std::string & message); + bool isTooltipPastable(); private: void createToolTip(const LLToolTip::Params& params); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 2e560ddb0a..01e38fcc9d 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -828,6 +828,7 @@ void LLWindowWin32::close() // Is window is already closed? if (!mWindowHandle) { + mWindowThread->close(); return; } @@ -4590,7 +4591,7 @@ std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList() #endif // LL_WINDOWS inline LLWindowWin32::LLWindowWin32Thread::LLWindowWin32Thread() - : ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE) + : ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, false) { ThreadPool::start(); } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 816b7b7c92..6383e8570e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5420,6 +5420,17 @@ <key>Value</key> <string>http://wiki.secondlife.com/wiki/[LSL_STRING]</string> </map> + <key>LSLFontSizeName</key> + <map> + <key>Comment</key> + <string>Text font size in LSL editor</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>Monospace</string> + </map> <key>GridStatusRSS</key> <map> <key>Comment</key> @@ -7485,10 +7496,21 @@ <key>Value</key> <integer>1</integer> </map> + <key>OpenDebugStatBasic</key> + <map> + <key>Comment</key> + <string>Expand Basic performance stats display</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>OpenDebugStatAdvanced</key> <map> <key>Comment</key> - <string>Expand advanced performance stats display</string> + <string>Expand Advanced performance stats display</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -7496,10 +7518,10 @@ <key>Value</key> <integer>0</integer> </map> - <key>OpenDebugStatBasic</key> + <key>OpenDebugStatRender</key> <map> <key>Comment</key> - <string>Expand basic performance stats display</string> + <string>Expand Render performance stats display</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -7507,10 +7529,21 @@ <key>Value</key> <integer>1</integer> </map> - <key>OpenDebugStatNet</key> + <key>OpenDebugStatTexture</key> + <map> + <key>Comment</key> + <string>Expand Texture performance stats display</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>OpenDebugStatMemory</key> <map> <key>Comment</key> - <string>Expand network stats display</string> + <string>Expand Memory Usage stats display</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -7518,10 +7551,10 @@ <key>Value</key> <integer>1</integer> </map> - <key>OpenDebugStatRender</key> + <key>OpenDebugStatNet</key> <map> <key>Comment</key> - <string>Expand render stats display</string> + <string>Expand Network performance stats display</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -7532,7 +7565,7 @@ <key>OpenDebugStatSim</key> <map> <key>Comment</key> - <string>Expand simulator performance stats display</string> + <string>Expand Simulator performance stats display</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -7540,10 +7573,10 @@ <key>Value</key> <integer>1</integer> </map> - <key>OpenDebugStatTexture</key> + <key>OpenDebugStatPhysicsDetails</key> <map> <key>Comment</key> - <string>Expand Texture performance stats display</string> + <string>Expand Physics Details performance stats display</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -7551,10 +7584,10 @@ <key>Value</key> <integer>0</integer> </map> - <key>OpenDebugStatPhysicsDetails</key> + <key>OpenDebugStatPathfinding</key> <map> <key>Comment</key> - <string>Expand Physics Details performance stats display</string> + <string>Expand Pathfinding performance stats display</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 2cdd86267e..3a333b7faf 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -1928,8 +1928,8 @@ edit_group_order="10" label_min="Small Hands" label_max="Large Hands" - value_min="-.3" - value_max=".3" + value_min="-.5" + value_max=".5" camera_elevation=".1" camera_distance="1.4" camera_angle="0"> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 31a87bbde1..7d78d2743c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2950,13 +2950,14 @@ bool LLAppViewer::initConfiguration() if (mSecondInstance) { - // This is the second instance of SL. Turn off voice support, + // This is the second instance of SL. Mute voice, // but make sure the setting is *not* persisted. - LLControlVariable* disable_voice = gSavedSettings.getControl("CmdLineDisableVoice"); - if(disable_voice) + // Also see LLVivoxVoiceClient::voiceEnabled() + LLControlVariable* enable_voice = gSavedSettings.getControl("EnableVoiceChat"); + if(enable_voice) { const BOOL DO_NOT_PERSIST = FALSE; - disable_voice->setValue(LLSD(TRUE), DO_NOT_PERSIST); + enable_voice->setValue(LLSD(FALSE), DO_NOT_PERSIST); } } diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 9ec4fb085b..9e043dbac0 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -90,6 +90,8 @@ LLConversationItem::~LLConversationItem() { mAvatarNameCacheConnection.disconnect(); } + + clearChildren(); } //virtual @@ -254,6 +256,11 @@ LLConversationItemSession::LLConversationItemSession(const LLUUID& uuid, LLFolde mConvType = CONV_SESSION_UNKNOWN; } +LLConversationItemSession::~LLConversationItemSession() +{ + clearAndDeparentModels(); +} + bool LLConversationItemSession::hasChildren() const { return getChildrenCount() > 0; diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 7c6980a7e6..07e60d7f62 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -156,6 +156,7 @@ class LLConversationItemSession : public LLConversationItem public: LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + ~LLConversationItemSession(); /*virtual*/ bool hasChildren() const; LLPointer<LLUIImage> getIcon() const { return NULL; } diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index cdce6f7156..c1d8828229 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -320,6 +320,7 @@ public: if (item) { + LLFavoritesBarCtrl::sWaitingForCallabck = 0.f; LLFavoritesOrderStorage::instance().setSortIndex(item, mSortField); item->setComplete(TRUE); @@ -365,6 +366,9 @@ struct LLFavoritesSort } }; + +F64 LLFavoritesBarCtrl::sWaitingForCallabck = 0.f; + LLFavoritesBarCtrl::Params::Params() : image_drag_indication("image_drag_indication"), more_button("more_button"), @@ -381,7 +385,7 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p) mShowDragMarker(FALSE), mLandingTab(NULL), mLastTab(NULL), - mTabsHighlightEnabled(TRUE), + mItemsListDirty(false), mUpdateDropDownItems(true), mRestoreOverflowMenu(false), mGetPrevItems(true), @@ -618,6 +622,9 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con int sortField = 0; LLPointer<LLItemCopiedCallback> cb; + const F64 CALLBACK_WAIT_TIME = 30.f; + sWaitingForCallabck = LLTimer::getTotalSeconds() + CALLBACK_WAIT_TIME; + // current order is saved by setting incremental values (1, 2, 3, ...) for the sort field for (LLInventoryModel::item_array_t::iterator i = mItems.begin(); i != mItems.end(); ++i) { @@ -691,16 +698,22 @@ void LLFavoritesBarCtrl::changed(U32 mask) LLFavoritesOrderStorage::instance().getSLURL((*i)->getAssetUUID()); } - updateButtons(); - if (!mItemsChangedTimer.getStarted()) - { - mItemsChangedTimer.start(); - } - else - { - mItemsChangedTimer.reset(); - } - + if (sWaitingForCallabck < LLTimer::getTotalSeconds()) + { + updateButtons(); + if (!mItemsChangedTimer.getStarted()) + { + mItemsChangedTimer.start(); + } + else + { + mItemsChangedTimer.reset(); + } + } + else + { + mItemsListDirty = true; + } } } @@ -754,6 +767,18 @@ void LLFavoritesBarCtrl::draw() mItemsChangedTimer.start(); } + if (mItemsListDirty && sWaitingForCallabck < LLTimer::getTotalSeconds()) + { + updateButtons(); + if (!mItemsChangedTimer.getStarted()) + { + mItemsChangedTimer.start(); + } + else + { + mItemsChangedTimer.reset(); + } + } } const LLButton::Params& LLFavoritesBarCtrl::getButtonParams() @@ -782,6 +807,7 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update) return; } + mItemsListDirty = false; mItems.clear(); if (!collectFavoriteItems(mItems)) diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index 3b439b31fd..68a679e27f 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -53,6 +53,7 @@ public: protected: LLFavoritesBarCtrl(const Params&); friend class LLUICtrlFactory; + friend class LLItemCopiedCallback; public: virtual ~LLFavoritesBarCtrl(); @@ -84,7 +85,6 @@ protected: void onButtonRightClick(LLUUID id,LLView* button,S32 x,S32 y,MASK mask); void onButtonMouseDown(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask); - void onOverflowMenuItemMouseDown(LLUUID id, LLUICtrl* item, S32 x, S32 y, MASK mask); void onButtonMouseUp(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask); void onEndDrag(); @@ -164,7 +164,8 @@ private: BOOL mStartDrag; LLInventoryModel::item_array_t mItems; - BOOL mTabsHighlightEnabled; + static F64 sWaitingForCallabck; + bool mItemsListDirty; S32 mMouseX; S32 mMouseY; diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 4cd91c53d8..eb7bd843d3 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -522,6 +522,8 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, // errors in separate window. if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) { + if (LLFloater::isQuitRequested()) return; + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) return; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9ea49e935f..42b1c87314 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -114,6 +114,7 @@ #include "llpresetsmanager.h" #include "llviewercontrol.h" #include "llpresetsmanager.h" +#include "llinventoryfunctions.h" #include "llsearchableui.h" #include "llperfstats.h" @@ -1609,25 +1610,6 @@ void LLFloaterPreference::onChangeMaturity() getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); } -std::string get_category_path(LLUUID cat_id) -{ - LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - std::string localized_cat_name; - if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName())) - { - localized_cat_name = cat->getName(); - } - - if (cat->getParentUUID().notNull()) - { - return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name; - } - else - { - return localized_cat_name; - } -} - std::string get_category_path(LLFolderType::EType cat_type) { LLUUID cat_id = gInventory.findUserDefinedCategoryUUIDForType(cat_type); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index d4eb40ff92..187ac9d323 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -144,7 +144,7 @@ public: const LLUUID& invoice, const sparam_t& strings); - LLSD getIDs( sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count ); + static LLSD getIDs( sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count ); }; @@ -2450,11 +2450,12 @@ bool LLDispatchSetEstateAccess::operator()( return true; } +// static LLSD LLDispatchSetEstateExperience::getIDs( sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count ) { LLSD idList = LLSD::emptyArray(); LLUUID id; - while(count--> 0) + while (count-- > 0 && it < end) { memcpy(id.mData, (*(it++)).data(), UUID_BYTES); idList.append(id); @@ -2468,7 +2469,7 @@ LLSD LLDispatchSetEstateExperience::getIDs( sparam_t::const_iterator it, sparam_ // strings[2] = str(num blocked) // strings[3] = str(num trusted) // strings[4] = str(num allowed) -// strings[8] = bin(uuid) ... +// strings[5] = bin(uuid) ... // ... bool LLDispatchSetEstateExperience::operator()( const LLDispatcher* dispatcher, @@ -2477,23 +2478,30 @@ bool LLDispatchSetEstateExperience::operator()( const sparam_t& strings) { LLPanelRegionExperiences* panel = LLFloaterRegionInfo::getPanelExperiences(); - if (!panel) return true; + if (!panel) + return true; + + const sparam_t::size_type MIN_SIZE = 5; + if (strings.size() < MIN_SIZE) + return true; + // Skip 2 parameters sparam_t::const_iterator it = strings.begin(); ++it; // U32 estate_id = strtol((*it).c_str(), NULL, 10); ++it; // U32 send_to_agent_only = strtoul((*(++it)).c_str(), NULL, 10); + // Read 3 parameters LLUUID id; S32 num_blocked = strtol((*(it++)).c_str(), NULL, 10); S32 num_trusted = strtol((*(it++)).c_str(), NULL, 10); S32 num_allowed = strtol((*(it++)).c_str(), NULL, 10); LLSD ids = LLSD::emptyMap() - .with("blocked", getIDs(it, strings.end(), num_blocked)) - .with("trusted", getIDs(it + (num_blocked), strings.end(), num_trusted)) - .with("allowed", getIDs(it + (num_blocked+num_trusted), strings.end(), num_allowed)); + .with("blocked", getIDs(it, strings.end(), num_blocked)) + .with("trusted", getIDs(it + num_blocked, strings.end(), num_trusted)) + .with("allowed", getIDs(it + num_blocked + num_trusted, strings.end(), num_allowed)); - panel->processResponse(ids); + panel->processResponse(ids); return true; } diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index ab6a64157c..a45246eedc 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -898,6 +898,15 @@ void LLHUDNameTag::shift(const LLVector3& offset) mPositionAgent += offset; } +F32 LLHUDNameTag::getWorldHeight() const +{ + const LLViewerCamera* camera = LLViewerCamera::getInstance(); + F32 height_meters = mLastDistance * (F32)tan(camera->getView() / 2.f); + F32 height_pixels = camera->getViewHeightInPixels() / 2.f; + F32 meters_per_pixel = height_meters / height_pixels; + return mHeight * meters_per_pixel * gViewerWindow->getDisplayScale().mV[VY]; +} + //static void LLHUDNameTag::addPickable(std::set<LLViewerObject*> &pick_list) { diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h index 361e4d4f4b..592ab5518f 100644 --- a/indra/newview/llhudnametag.h +++ b/indra/newview/llhudnametag.h @@ -127,11 +127,12 @@ public: /*virtual*/ void markDead(); friend class LLHUDObject; /*virtual*/ F32 getDistance() const { return mLastDistance; } - S32 getLOD() { return mLOD; } - BOOL getVisible() { return mVisible; } + S32 getLOD() const { return mLOD; } + BOOL getVisible() const { return mVisible; } BOOL getHidden() const { return mHidden; } void setHidden( BOOL hide ) { mHidden = hide; } void shift(const LLVector3& offset); + F32 getWorldHeight() const; BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render = FALSE); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 145814ab41..b814cc98d1 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1999,6 +1999,24 @@ void move_items_to_new_subfolder(const uuid_vec_t& selected_uuids, const std::st } +std::string get_category_path(LLUUID cat_id) +{ + LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); + std::string localized_cat_name; + if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName())) + { + localized_cat_name = cat->getName(); + } + + if (cat->getParentUUID().notNull()) + { + return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name; + } + else + { + return localized_cat_name; + } +} ///---------------------------------------------------------------------------- /// LLInventoryCollectFunctor implementations ///---------------------------------------------------------------------------- diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 8c8bd789c2..039ec45d68 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -107,6 +107,7 @@ void move_items_to_new_subfolder(const uuid_vec_t& selected_uuids, const std::st void move_items_to_folder(const LLUUID& new_cat_uuid, const uuid_vec_t& selected_uuids); bool is_only_cats_selected(const uuid_vec_t& selected_uuids); bool is_only_items_selected(const uuid_vec_t& selected_uuids); +std::string get_category_path(LLUUID cat_id); /** Miscellaneous global functions ** ** diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index de8db69e19..72ef365a6d 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -982,6 +982,9 @@ bool LLLocalBitmapMgr::checkTextureDimensions(std::string filename) LLImageDimensionsInfo image_info; if (!image_info.load(filename,codec)) { + LLSD args; + args["NAME"] = gDirUtilp->getBaseFileName(filename); + LLNotificationsUtil::add(image_info.getWarningName(), args); return false; } diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 495153981b..ab8fdd6716 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -248,7 +248,7 @@ void LLModelPreview::updateDimentionsAndOffsets() { accounted.insert(instance.mModel); - //update instance skin info for each lods pelvisZoffset + // update instance skin info for each lods pelvisZoffset for (int j = 0; j<LLModel::NUM_LODS; ++j) { if (instance.mLOD[j]) @@ -270,6 +270,7 @@ void LLModelPreview::rebuildUploadData() { assert_main_thread(); + mDefaultPhysicsShapeP = NULL; mUploadData.clear(); mTextureSet.clear(); @@ -309,7 +310,7 @@ void LLModelPreview::rebuildUploadData() mat *= scale_mat; for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end();) - { //for each instance with said transform applied + { // for each instance with said transform applied LLModelInstance instance = *model_iter++; LLModel* base_model = instance.mModel; @@ -572,7 +573,7 @@ void LLModelPreview::rebuildUploadData() else if (getLoadState() == LLModelLoader::ERROR_MATERIALS || getLoadState() == LLModelLoader::WARNING_BIND_SHAPE_ORIENTATION) { - // This is only valid for these two error types because they are + // This is only valid for these two error types because they are // only used inside rebuildUploadData() and updateStatusMessages() // updateStatusMessages() is called after rebuildUploadData() setLoadState(LLModelLoader::DONE); @@ -774,7 +775,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable // it tends to force the UI into strange checkbox options // which cannot be altered. - //only try to load from slm if viewer is configured to do so and this is the + //only try to load from slm if viewer is configured to do so and this is the //initial model load (not an LoD or physics shape) mModelLoader->mTrySLM = gSavedSettings.getBOOL("MeshImportUseSLM") && mUploadData.empty(); } @@ -860,12 +861,13 @@ void LLModelPreview::clearIncompatible(S32 lod) // Check if already started bool subscribe_for_generation = mLodsQuery.empty(); - + // Remove previously scheduled work mLodsQuery.clear(); LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance; - if (!fmp) return; + if (!fmp) + return; // Schedule new work for (S32 i = LLModel::LOD_HIGH; i >= 0; --i) @@ -1695,7 +1697,7 @@ F32 LLModelPreview::genMeshOptimizerPerFace(LLModel *base_model, LLModel *target ll_aligned_free_16(output_indices); ll_aligned_free_16(shadow_indices); - + if (size_new_indices < 3) { // At least one triangle is needed @@ -1880,7 +1882,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d { precise_ratio = genMeshOptimizerPerModel(base, target_model, indices_decimator, lod_error_threshold, MESH_OPTIMIZER_NO_UVS); } - + if (precise_ratio < 0 || (precise_ratio * allowed_ratio_drift < indices_decimator)) { // Try sloppy variant if normal one failed to simplify model enough. diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 1b4684d073..a1d305789f 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -97,7 +97,7 @@ enum ESubpart { SUBPART_SKIRT, SUBPART_ALPHA, SUBPART_TATTOO, - SUBPART_UNIVERSAL, + SUBPART_UNIVERSAL, SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, @@ -120,7 +120,7 @@ class LLEditWearableDictionary : public LLSingleton<LLEditWearableDictionary> //-------------------------------------------------------------------- LLSINGLETON(LLEditWearableDictionary); virtual ~LLEditWearableDictionary(); - + //-------------------------------------------------------------------- // Wearable Types //-------------------------------------------------------------------- @@ -214,7 +214,6 @@ public: LLEditWearableDictionary::LLEditWearableDictionary() { - } //virtual @@ -227,23 +226,23 @@ LLEditWearableDictionary::Wearables::Wearables() // note the subpart that is listed first is treated as "default", regardless of what order is in enum. // Please match the order presented in XUI. -Nyx // this will affect what camera angle is shown when first editing a wearable - addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS})); - addEntry(LLWearableType::WT_SKIN, new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text", texture_vec_t(), texture_vec_t{TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT}, subpart_vec_t{SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL})); - addEntry(LLWearableType::WT_HAIR, new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text", texture_vec_t(), texture_vec_t{TEX_HAIR}, subpart_vec_t{SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL})); - addEntry(LLWearableType::WT_EYES, new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text", texture_vec_t(), texture_vec_t{TEX_EYES_IRIS}, subpart_vec_t{SUBPART_EYES})); - addEntry(LLWearableType::WT_SHIRT, new WearableEntry(LLWearableType::WT_SHIRT,"edit_shirt_title","shirt_desc_text", texture_vec_t{TEX_UPPER_SHIRT}, texture_vec_t{TEX_UPPER_SHIRT}, subpart_vec_t{SUBPART_SHIRT})); - addEntry(LLWearableType::WT_PANTS, new WearableEntry(LLWearableType::WT_PANTS,"edit_pants_title","pants_desc_text", texture_vec_t{TEX_LOWER_PANTS}, texture_vec_t{TEX_LOWER_PANTS}, subpart_vec_t{SUBPART_PANTS})); - addEntry(LLWearableType::WT_SHOES, new WearableEntry(LLWearableType::WT_SHOES,"edit_shoes_title","shoes_desc_text", texture_vec_t{TEX_LOWER_SHOES}, texture_vec_t{TEX_LOWER_SHOES}, subpart_vec_t{SUBPART_SHOES})); - addEntry(LLWearableType::WT_SOCKS, new WearableEntry(LLWearableType::WT_SOCKS,"edit_socks_title","socks_desc_text", texture_vec_t{TEX_LOWER_SOCKS}, texture_vec_t{TEX_LOWER_SOCKS}, subpart_vec_t{SUBPART_SOCKS})); + addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS})); + addEntry(LLWearableType::WT_SKIN, new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text", texture_vec_t(), texture_vec_t{TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT}, subpart_vec_t{SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL})); + addEntry(LLWearableType::WT_HAIR, new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text", texture_vec_t(), texture_vec_t{TEX_HAIR}, subpart_vec_t{SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL})); + addEntry(LLWearableType::WT_EYES, new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text", texture_vec_t(), texture_vec_t{TEX_EYES_IRIS}, subpart_vec_t{SUBPART_EYES})); + addEntry(LLWearableType::WT_SHIRT, new WearableEntry(LLWearableType::WT_SHIRT,"edit_shirt_title","shirt_desc_text", texture_vec_t{TEX_UPPER_SHIRT}, texture_vec_t{TEX_UPPER_SHIRT}, subpart_vec_t{SUBPART_SHIRT})); + addEntry(LLWearableType::WT_PANTS, new WearableEntry(LLWearableType::WT_PANTS,"edit_pants_title","pants_desc_text", texture_vec_t{TEX_LOWER_PANTS}, texture_vec_t{TEX_LOWER_PANTS}, subpart_vec_t{SUBPART_PANTS})); + addEntry(LLWearableType::WT_SHOES, new WearableEntry(LLWearableType::WT_SHOES,"edit_shoes_title","shoes_desc_text", texture_vec_t{TEX_LOWER_SHOES}, texture_vec_t{TEX_LOWER_SHOES}, subpart_vec_t{SUBPART_SHOES})); + addEntry(LLWearableType::WT_SOCKS, new WearableEntry(LLWearableType::WT_SOCKS,"edit_socks_title","socks_desc_text", texture_vec_t{TEX_LOWER_SOCKS}, texture_vec_t{TEX_LOWER_SOCKS}, subpart_vec_t{SUBPART_SOCKS})); addEntry(LLWearableType::WT_JACKET, new WearableEntry(LLWearableType::WT_JACKET,"edit_jacket_title","jacket_desc_text", texture_vec_t{TEX_UPPER_JACKET}, texture_vec_t{TEX_UPPER_JACKET, TEX_LOWER_JACKET}, subpart_vec_t{SUBPART_JACKET})); addEntry(LLWearableType::WT_GLOVES, new WearableEntry(LLWearableType::WT_GLOVES,"edit_gloves_title","gloves_desc_text", texture_vec_t{TEX_UPPER_GLOVES}, texture_vec_t{TEX_UPPER_GLOVES}, subpart_vec_t{SUBPART_GLOVES})); addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(LLWearableType::WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text", texture_vec_t{TEX_UPPER_UNDERSHIRT}, texture_vec_t{TEX_UPPER_UNDERSHIRT}, subpart_vec_t{SUBPART_UNDERSHIRT})); addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(LLWearableType::WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text", texture_vec_t{TEX_LOWER_UNDERPANTS}, texture_vec_t{TEX_LOWER_UNDERPANTS}, subpart_vec_t{SUBPART_UNDERPANTS})); - addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text", texture_vec_t{TEX_SKIRT}, texture_vec_t{TEX_SKIRT}, subpart_vec_t{SUBPART_SKIRT})); - addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text", texture_vec_t(), texture_vec_t{TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA}, subpart_vec_t{SUBPART_ALPHA})); + addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text", texture_vec_t{TEX_SKIRT}, texture_vec_t{TEX_SKIRT}, subpart_vec_t{SUBPART_SKIRT})); + addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text", texture_vec_t(), texture_vec_t{TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA}, subpart_vec_t{SUBPART_ALPHA})); addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text", texture_vec_t{TEX_HEAD_TATTOO}, texture_vec_t{TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO}, subpart_vec_t{SUBPART_TATTOO})); - addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(LLWearableType::WT_UNIVERSAL, "edit_universal_title", "universal_desc_text", texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO }, texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO, TEX_UPPER_UNIVERSAL_TATTOO, TEX_LOWER_UNIVERSAL_TATTOO, TEX_SKIRT_TATTOO, TEX_HAIR_TATTOO, TEX_EYES_TATTOO, TEX_LEFT_ARM_TATTOO, TEX_LEFT_LEG_TATTOO, TEX_AUX1_TATTOO, TEX_AUX2_TATTOO, TEX_AUX3_TATTOO }, subpart_vec_t{ SUBPART_UNIVERSAL })); - addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED})); + addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(LLWearableType::WT_UNIVERSAL, "edit_universal_title", "universal_desc_text", texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO }, texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO, TEX_UPPER_UNIVERSAL_TATTOO, TEX_LOWER_UNIVERSAL_TATTOO, TEX_SKIRT_TATTOO, TEX_HAIR_TATTOO, TEX_EYES_TATTOO, TEX_LEFT_ARM_TATTOO, TEX_LEFT_LEG_TATTOO, TEX_AUX1_TATTOO, TEX_AUX2_TATTOO, TEX_AUX3_TATTOO }, subpart_vec_t{ SUBPART_UNIVERSAL })); + addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS, "edit_physics_title", "physics_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{ SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED })); } LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type, @@ -259,52 +258,59 @@ LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType typ mSubparts(subparts), mColorSwatchCtrls(color_swatches), mTextureCtrls(texture_pickers) -{} +{ +} LLEditWearableDictionary::Subparts::Subparts() { - addEntry(SUBPART_SHAPE_WHOLE, new SubpartEntry(SUBPART_SHAPE_WHOLE, "mPelvis", "shape_body","shape_body_param_list", "shape_body_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); - addEntry(SUBPART_SHAPE_HEAD, new SubpartEntry(SUBPART_SHAPE_HEAD, "mHead", "shape_head", "shape_head_param_list", "shape_head_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - addEntry(SUBPART_SHAPE_EYES, new SubpartEntry(SUBPART_SHAPE_EYES, "mHead", "shape_eyes", "shape_eyes_param_list", "shape_eyes_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - addEntry(SUBPART_SHAPE_EARS, new SubpartEntry(SUBPART_SHAPE_EARS, "mHead", "shape_ears", "shape_ears_param_list", "shape_ears_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - addEntry(SUBPART_SHAPE_NOSE, new SubpartEntry(SUBPART_SHAPE_NOSE, "mHead", "shape_nose", "shape_nose_param_list", "shape_nose_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - addEntry(SUBPART_SHAPE_MOUTH, new SubpartEntry(SUBPART_SHAPE_MOUTH, "mHead", "shape_mouth", "shape_mouth_param_list", "shape_mouth_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - addEntry(SUBPART_SHAPE_CHIN, new SubpartEntry(SUBPART_SHAPE_CHIN, "mHead", "shape_chin", "shape_chin_param_list", "shape_chin_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - addEntry(SUBPART_SHAPE_TORSO, new SubpartEntry(SUBPART_SHAPE_TORSO, "mTorso", "shape_torso", "shape_torso_param_list", "shape_torso_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH)); - addEntry(SUBPART_SHAPE_LEGS, new SubpartEntry(SUBPART_SHAPE_LEGS, "mPelvis", "shape_legs", "shape_legs_param_list", "shape_legs_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); - - addEntry(SUBPART_SKIN_COLOR, new SubpartEntry(SUBPART_SKIN_COLOR, "mHead", "skin_color", "skin_color_param_list", "skin_color_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + // WT_SHAPE + addEntry(SUBPART_SHAPE_WHOLE, new SubpartEntry(SUBPART_SHAPE_WHOLE, "mPelvis", "shape_body","shape_body_param_list", "shape_body_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); + addEntry(SUBPART_SHAPE_HEAD, new SubpartEntry(SUBPART_SHAPE_HEAD, "mHead", "shape_head", "shape_head_param_list", "shape_head_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + addEntry(SUBPART_SHAPE_EYES, new SubpartEntry(SUBPART_SHAPE_EYES, "mHead", "shape_eyes", "shape_eyes_param_list", "shape_eyes_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + addEntry(SUBPART_SHAPE_EARS, new SubpartEntry(SUBPART_SHAPE_EARS, "mHead", "shape_ears", "shape_ears_param_list", "shape_ears_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + addEntry(SUBPART_SHAPE_NOSE, new SubpartEntry(SUBPART_SHAPE_NOSE, "mHead", "shape_nose", "shape_nose_param_list", "shape_nose_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + addEntry(SUBPART_SHAPE_MOUTH, new SubpartEntry(SUBPART_SHAPE_MOUTH, "mHead", "shape_mouth", "shape_mouth_param_list", "shape_mouth_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + addEntry(SUBPART_SHAPE_CHIN, new SubpartEntry(SUBPART_SHAPE_CHIN, "mHead", "shape_chin", "shape_chin_param_list", "shape_chin_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + addEntry(SUBPART_SHAPE_TORSO, new SubpartEntry(SUBPART_SHAPE_TORSO, "mTorso", "shape_torso", "shape_torso_param_list", "shape_torso_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH)); + addEntry(SUBPART_SHAPE_LEGS, new SubpartEntry(SUBPART_SHAPE_LEGS, "mPelvis", "shape_legs", "shape_legs_param_list", "shape_legs_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); + + // WT_SKIN + addEntry(SUBPART_SKIN_COLOR, new SubpartEntry(SUBPART_SKIN_COLOR, "mHead", "skin_color", "skin_color_param_list", "skin_color_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); addEntry(SUBPART_SKIN_FACEDETAIL, new SubpartEntry(SUBPART_SKIN_FACEDETAIL, "mHead", "skin_facedetail", "skin_face_param_list", "skin_face_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - addEntry(SUBPART_SKIN_MAKEUP, new SubpartEntry(SUBPART_SKIN_MAKEUP, "mHead", "skin_makeup", "skin_makeup_param_list", "skin_makeup_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + addEntry(SUBPART_SKIN_MAKEUP, new SubpartEntry(SUBPART_SKIN_MAKEUP, "mHead", "skin_makeup", "skin_makeup_param_list", "skin_makeup_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); addEntry(SUBPART_SKIN_BODYDETAIL, new SubpartEntry(SUBPART_SKIN_BODYDETAIL, "mPelvis", "skin_bodydetail", "skin_body_param_list", "skin_body_tab", LLVector3d(0.f, 0.f, -0.2f), LLVector3d(-2.5f, 0.5f, 0.5f),SEX_BOTH)); - addEntry(SUBPART_HAIR_COLOR, new SubpartEntry(SUBPART_HAIR_COLOR, "mHead", "hair_color", "hair_color_param_list", "hair_color_tab", LLVector3d(0.f, 0.f, 0.10f), LLVector3d(-0.4f, 0.05f, 0.10f),SEX_BOTH)); - addEntry(SUBPART_HAIR_STYLE, new SubpartEntry(SUBPART_HAIR_STYLE, "mHead", "hair_style", "hair_style_param_list", "hair_style_tab", LLVector3d(0.f, 0.f, 0.10f), LLVector3d(-0.4f, 0.05f, 0.10f),SEX_BOTH)); - addEntry(SUBPART_HAIR_EYEBROWS, new SubpartEntry(SUBPART_HAIR_EYEBROWS, "mHead", "hair_eyebrows", "hair_eyebrows_param_list", "hair_eyebrows_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - addEntry(SUBPART_HAIR_FACIAL, new SubpartEntry(SUBPART_HAIR_FACIAL, "mHead", "hair_facial", "hair_facial_param_list", "hair_facial_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_MALE)); - - addEntry(SUBPART_EYES, new SubpartEntry(SUBPART_EYES, "mHead", "eyes", "eyes_main_param_list", "eyes_main_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); - - addEntry(SUBPART_SHIRT, new SubpartEntry(SUBPART_SHIRT, "mTorso", "shirt", "shirt_main_param_list", "shirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH)); - addEntry(SUBPART_PANTS, new SubpartEntry(SUBPART_PANTS, "mPelvis", "pants", "pants_main_param_list", "pants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); - addEntry(SUBPART_SHOES, new SubpartEntry(SUBPART_SHOES, "mPelvis", "shoes", "shoes_main_param_list", "shoes_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); - addEntry(SUBPART_SOCKS, new SubpartEntry(SUBPART_SOCKS, "mPelvis", "socks", "socks_main_param_list", "socks_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); - addEntry(SUBPART_JACKET, new SubpartEntry(SUBPART_JACKET, "mTorso", "jacket", "jacket_main_param_list", "jacket_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-2.f, 0.1f, 0.3f),SEX_BOTH)); - addEntry(SUBPART_SKIRT, new SubpartEntry(SUBPART_SKIRT, "mPelvis", "skirt", "skirt_main_param_list", "skirt_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); - addEntry(SUBPART_GLOVES, new SubpartEntry(SUBPART_GLOVES, "mTorso", "gloves", "gloves_main_param_list", "gloves_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-1.f, 0.15f, 0.f),SEX_BOTH)); - addEntry(SUBPART_UNDERSHIRT, new SubpartEntry(SUBPART_UNDERSHIRT, "mTorso", "undershirt", "undershirt_main_param_list", "undershirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH)); - addEntry(SUBPART_UNDERPANTS, new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); - addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); - addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); - addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "universal_main_param_list", "universal_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH)); - - addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE)); - addEntry(SUBPART_PHYSICS_BREASTS_INOUT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_INOUT, "mTorso", "physics_breasts_inout", "physics_breasts_inout_param_list", "physics_breasts_inout_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE)); + // WT_HAIR + addEntry(SUBPART_HAIR_COLOR, new SubpartEntry(SUBPART_HAIR_COLOR, "mHead", "hair_color", "hair_color_param_list", "hair_color_tab", LLVector3d(0.f, 0.f, 0.10f), LLVector3d(-0.4f, 0.05f, 0.10f),SEX_BOTH)); + addEntry(SUBPART_HAIR_STYLE, new SubpartEntry(SUBPART_HAIR_STYLE, "mHead", "hair_style", "hair_style_param_list", "hair_style_tab", LLVector3d(0.f, 0.f, 0.10f), LLVector3d(-0.4f, 0.05f, 0.10f), SEX_BOTH)); + addEntry(SUBPART_HAIR_EYEBROWS, new SubpartEntry(SUBPART_HAIR_EYEBROWS, "mHead", "hair_eyebrows", "hair_eyebrows_param_list", "hair_eyebrows_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + addEntry(SUBPART_HAIR_FACIAL, new SubpartEntry(SUBPART_HAIR_FACIAL, "mHead", "hair_facial", "hair_facial_param_list", "hair_facial_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_MALE)); + + // WT_EYES + addEntry(SUBPART_EYES, new SubpartEntry(SUBPART_EYES, "mHead", "eyes", "eyes_main_param_list", "eyes_main_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH)); + + // WT_SHIRT, WT_PANTS, WT_SHOES, WT_SOCKS, WT_JACKET, WT_GLOVES, WT_UNDERSHIRT, WT_UNDERPANTS, WT_SKIRT, WT_ALPHA, WT_TATTOO, WT_UNIVERSAL + addEntry(SUBPART_SHIRT, new SubpartEntry(SUBPART_SHIRT, "mTorso", "shirt", "shirt_main_param_list", "shirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH)); + addEntry(SUBPART_PANTS, new SubpartEntry(SUBPART_PANTS, "mPelvis", "pants", "pants_main_param_list", "pants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); + addEntry(SUBPART_SHOES, new SubpartEntry(SUBPART_SHOES, "mPelvis", "shoes", "shoes_main_param_list", "shoes_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); + addEntry(SUBPART_SOCKS, new SubpartEntry(SUBPART_SOCKS, "mPelvis", "socks", "socks_main_param_list", "socks_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); + addEntry(SUBPART_JACKET, new SubpartEntry(SUBPART_JACKET, "mTorso", "jacket", "jacket_main_param_list", "jacket_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-2.f, 0.1f, 0.3f),SEX_BOTH)); + addEntry(SUBPART_GLOVES, new SubpartEntry(SUBPART_GLOVES, "mTorso", "gloves", "gloves_main_param_list", "gloves_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-1.f, 0.15f, 0.f),SEX_BOTH)); + addEntry(SUBPART_UNDERSHIRT, new SubpartEntry(SUBPART_UNDERSHIRT, "mTorso", "undershirt", "undershirt_main_param_list", "undershirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH)); + addEntry(SUBPART_UNDERPANTS, new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); + addEntry(SUBPART_SKIRT, new SubpartEntry(SUBPART_SKIRT, "mPelvis", "skirt", "skirt_main_param_list", "skirt_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); + addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); + addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); + addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "universal_main_param_list", "universal_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH)); + + // WT_PHYSICS + addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f), SEX_FEMALE)); + addEntry(SUBPART_PHYSICS_BREASTS_INOUT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_INOUT, "mTorso", "physics_breasts_inout", "physics_breasts_inout_param_list", "physics_breasts_inout_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE)); addEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, "mTorso", "physics_breasts_leftright", "physics_breasts_leftright_param_list", "physics_breasts_leftright_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE)); - addEntry(SUBPART_PHYSICS_BELLY_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BELLY_UPDOWN, "mTorso", "physics_belly_updown", "physics_belly_updown_param_list", "physics_belly_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); - addEntry(SUBPART_PHYSICS_BUTT_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BUTT_UPDOWN, "mTorso", "physics_butt_updown", "physics_butt_updown_param_list", "physics_butt_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); - addEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, "mTorso", "physics_butt_leftright", "physics_butt_leftright_param_list", "physics_butt_leftright_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); - addEntry(SUBPART_PHYSICS_ADVANCED, new SubpartEntry(SUBPART_PHYSICS_ADVANCED, "mTorso", "physics_advanced", "physics_advanced_param_list", "physics_advanced_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); + addEntry(SUBPART_PHYSICS_BELLY_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BELLY_UPDOWN, "mTorso", "physics_belly_updown", "physics_belly_updown_param_list", "physics_belly_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); + addEntry(SUBPART_PHYSICS_BUTT_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BUTT_UPDOWN, "mTorso", "physics_butt_updown", "physics_butt_updown_param_list", "physics_butt_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); + addEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, "mTorso", "physics_butt_leftright", "physics_butt_leftright_param_list", "physics_butt_leftright_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); + addEntry(SUBPART_PHYSICS_ADVANCED, new SubpartEntry(SUBPART_PHYSICS_ADVANCED, "mTorso", "physics_advanced", "physics_advanced_param_list", "physics_advanced_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH)); } LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part, @@ -329,55 +335,55 @@ LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part, LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls() { - addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Color/Tint" )); - addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Color/Tint" )); - addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Color/Tint" )); - addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Color/Tint" )); - addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Color/Tint" )); - addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Color/Tint" )); - addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Color/Tint" )); - addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Color/Tint" )); - addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Color/Tint" )); - addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Color/Tint" )); - addEntry (TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Color/Tint")); + addEntry(TEX_UPPER_SHIRT, new PickerControlEntry(TEX_UPPER_SHIRT, "Color/Tint")); + addEntry(TEX_LOWER_PANTS, new PickerControlEntry(TEX_LOWER_PANTS, "Color/Tint")); + addEntry(TEX_LOWER_SHOES, new PickerControlEntry(TEX_LOWER_SHOES, "Color/Tint")); + addEntry(TEX_LOWER_SOCKS, new PickerControlEntry(TEX_LOWER_SOCKS, "Color/Tint")); + addEntry(TEX_UPPER_JACKET, new PickerControlEntry(TEX_UPPER_JACKET, "Color/Tint")); + addEntry(TEX_SKIRT, new PickerControlEntry(TEX_SKIRT, "Color/Tint")); + addEntry(TEX_UPPER_GLOVES, new PickerControlEntry(TEX_UPPER_GLOVES, "Color/Tint")); + addEntry(TEX_UPPER_UNDERSHIRT, new PickerControlEntry(TEX_UPPER_UNDERSHIRT, "Color/Tint")); + addEntry(TEX_LOWER_UNDERPANTS, new PickerControlEntry(TEX_LOWER_UNDERPANTS, "Color/Tint")); + addEntry(TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Color/Tint")); + addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Color/Tint")); } LLEditWearableDictionary::TextureCtrls::TextureCtrls() { - addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head", LLUUID::null, TRUE )); - addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, TRUE )); - addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, TRUE )); - addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), FALSE )); - addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); - addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_HEAD_BODYPAINT, new PickerControlEntry(TEX_HEAD_BODYPAINT, "Head", LLUUID::null, TRUE)); + addEntry(TEX_UPPER_BODYPAINT, new PickerControlEntry(TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, TRUE)); + addEntry(TEX_LOWER_BODYPAINT, new PickerControlEntry(TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, TRUE)); + addEntry(TEX_HAIR, new PickerControlEntry(TEX_HAIR, "Texture", LLUUID(gSavedSettings.getString("UIImgDefaultHairUUID")), FALSE)); + addEntry(TEX_EYES_IRIS, new PickerControlEntry(TEX_EYES_IRIS, "Iris", LLUUID(gSavedSettings.getString("UIImgDefaultEyesUUID")), FALSE)); + addEntry(TEX_UPPER_SHIRT, new PickerControlEntry(TEX_UPPER_SHIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultShirtUUID")), FALSE)); + addEntry(TEX_LOWER_PANTS, new PickerControlEntry(TEX_LOWER_PANTS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultPantsUUID")), FALSE)); + addEntry(TEX_LOWER_SHOES, new PickerControlEntry(TEX_LOWER_SHOES, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultShoesUUID")), FALSE)); + addEntry(TEX_LOWER_SOCKS, new PickerControlEntry(TEX_LOWER_SOCKS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultSocksUUID")), FALSE)); + addEntry(TEX_UPPER_JACKET, new PickerControlEntry(TEX_UPPER_JACKET, "Upper Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultJacketUUID")), FALSE)); + addEntry(TEX_LOWER_JACKET, new PickerControlEntry(TEX_LOWER_JACKET, "Lower Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultJacketUUID")), FALSE)); + addEntry(TEX_SKIRT, new PickerControlEntry(TEX_SKIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultSkirtUUID")), FALSE)); + addEntry(TEX_UPPER_GLOVES, new PickerControlEntry(TEX_UPPER_GLOVES, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultGlovesUUID")), FALSE)); + addEntry(TEX_UPPER_UNDERSHIRT, new PickerControlEntry(TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultUnderwearUUID")), FALSE)); + addEntry(TEX_LOWER_UNDERPANTS, new PickerControlEntry(TEX_LOWER_UNDERPANTS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultUnderwearUUID")), FALSE)); + addEntry(TEX_LOWER_ALPHA, new PickerControlEntry(TEX_LOWER_ALPHA, "Lower Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE)); + addEntry(TEX_UPPER_ALPHA, new PickerControlEntry(TEX_UPPER_ALPHA, "Upper Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE)); + addEntry(TEX_HEAD_ALPHA, new PickerControlEntry(TEX_HEAD_ALPHA, "Head Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE)); + addEntry(TEX_EYES_ALPHA, new PickerControlEntry(TEX_EYES_ALPHA, "Eye Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE)); + addEntry(TEX_HAIR_ALPHA, new PickerControlEntry(TEX_HAIR_ALPHA, "Hair Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE)); + addEntry(TEX_LOWER_TATTOO, new PickerControlEntry(TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_UPPER_TATTOO, new PickerControlEntry(TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE)); + addEntry(TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE)); } LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index, @@ -490,8 +496,8 @@ template <typename CtrlType, class Predicate> const LLEditWearableDictionary::PickerControlEntry* find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred) { - const LLEditWearableDictionary::WearableEntry *wearable_entry - = LLEditWearableDictionary::getInstance()->getWearable(type); + const LLEditWearableDictionary::WearableEntry *wearable_entry = + LLEditWearableDictionary::getInstance()->getWearable(type); if (!wearable_entry) { LL_WARNS() << "could not get wearable dictionary entry for wearable of type: " << type << LL_ENDL; @@ -520,8 +526,7 @@ find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred) } template <typename CtrlType> -void -for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_t fun) +void for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_t fun) { if (!panel) { @@ -542,14 +547,13 @@ for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_ iter != iter_end; ++iter) { const ETextureIndex te = *iter; - const LLEditWearableDictionary::PickerControlEntry* entry - = get_picker_entry<CtrlType>(te); + const LLEditWearableDictionary::PickerControlEntry* entry = get_picker_entry<CtrlType>(te); if (!entry) { LL_WARNS() << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << LL_ENDL; continue; } - fun (panel, entry); + fun(panel, entry); } } @@ -595,7 +599,7 @@ static void update_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const { LLUUID new_id; LLLocalTextureObject *lto = self->getWearable()->getLocalTextureObject(entry->mTextureIndex); - if( lto && (lto->getID() != IMG_DEFAULT_AVATAR) ) + if (lto && (lto->getID() != IMG_DEFAULT_AVATAR)) { new_id = lto->getID(); } @@ -645,7 +649,6 @@ LLPanelEditWearable::LLPanelEditWearable() //virtual LLPanelEditWearable::~LLPanelEditWearable() { - } bool LLPanelEditWearable::changeHeightUnits(const LLSD& new_value) @@ -755,7 +758,7 @@ BOOL LLPanelEditWearable::postBuild() mPanelSkirt = getChild<LLPanel>("edit_skirt_panel"); mPanelAlpha = getChild<LLPanel>("edit_alpha_panel"); mPanelTattoo = getChild<LLPanel>("edit_tattoo_panel"); - mPanelUniversal = getChild<LLPanel>("edit_universal_panel"); + mPanelUniversal = getChild<LLPanel>("edit_universal_panel"); mPanelPhysics = getChild<LLPanel>("edit_physics_panel"); mTxtAvatarHeight = mPanelShape->getChild<LLTextBox>("avatar_height"); @@ -779,29 +782,27 @@ BOOL LLPanelEditWearable::postBuild() continue; } U8 num_subparts = (U8)(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) { LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL; continue; } - + const std::string accordion_tab = subpart_entry->mAccordionTab; - LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab); - if (!tab) { LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL; continue; } - + // initialize callback to ensure camera view changes appropriately. tab->setDropDownStateChangedCallback(boost::bind(&LLPanelEditWearable::onTabExpandedCollapsed,this,_2,index)); } @@ -835,14 +836,16 @@ BOOL LLPanelEditWearable::isDirty() const BOOL isDirty = FALSE; if (mWearablePtr) { - if (mWearablePtr->isDirty() || - ( mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0 )) - { - isDirty = TRUE; - } + if (mWearablePtr->isDirty() || + (mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0)) + { + isDirty = TRUE; + } } return isDirty; } + + //virtual void LLPanelEditWearable::draw() { @@ -858,8 +861,8 @@ void LLPanelEditWearable::draw() void LLPanelEditWearable::onClose() { - // any unsaved changes should be reverted at this point - revertChanges(); + // any unsaved changes should be reverted at this point + revertChanges(); } void LLPanelEditWearable::setVisible(BOOL visible) @@ -881,11 +884,11 @@ void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_c //static void LLPanelEditWearable::onBackButtonClicked(void* userdata) { - LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata; - if ( panel->isDirty() ) - { - LLAppearanceMgr::instance().setOutfitDirty( true ); - } + LLPanelEditWearable* panel = (LLPanelEditWearable*)userdata; + if (panel->isDirty()) + { + LLAppearanceMgr::instance().setOutfitDirty(true); + } } //static @@ -910,7 +913,7 @@ void LLPanelEditWearable::saveAsCallback(const LLSD& notification, const LLSD& r { std::string wearable_name = response["message"].asString(); LLStringUtil::trim(wearable_name); - if( !wearable_name.empty() ) + if (!wearable_name.empty()) { mNameEditor->setText(wearable_name); saveChanges(true); @@ -920,24 +923,27 @@ void LLPanelEditWearable::saveAsCallback(const LLSD& notification, const LLSD& r void LLPanelEditWearable::onCommitSexChange() { - if (!isAgentAvatarValid()) return; + if (!isAgentAvatarValid()) + { + return; + } LLWearableType::EType type = mWearablePtr->getType(); U32 index; - if( !gAgentWearables.getWearableIndex(mWearablePtr, index) || - !gAgentWearables.isWearableModifiable(type, index)) + if (!gAgentWearables.getWearableIndex(mWearablePtr, index) || + !gAgentWearables.isWearableModifiable(type, index)) { - return; + return; } LLViewerVisualParam* param = static_cast<LLViewerVisualParam*>(gAgentAvatarp->getVisualParam( "male" )); - if( !param ) + if (!param) { - return; + return; } bool is_new_sex_male = (gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE) == SEX_MALE; - LLViewerWearable* wearable = gAgentWearables.getViewerWearable(type, index); + LLViewerWearable* wearable = gAgentWearables.getViewerWearable(type, index); if (wearable) { wearable->setVisualParamWeight(param->getID(), is_new_sex_male); @@ -970,23 +976,23 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) { // Set the new version LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(texture_ctrl->getImageAssetID()); - if( image->getID() == IMG_DEFAULT ) + if (image->getID() == IMG_DEFAULT) { image = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR); } if (getWearable()) { - U32 index; - if (gAgentWearables.getWearableIndex(getWearable(), index)) - { - gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index); - LLVisualParamHint::requestHintUpdates(); - gAgentAvatarp->wearableUpdated(type); - } - else - { - LL_WARNS() << "wearable not found in gAgentWearables" << LL_ENDL; - } + U32 index; + if (gAgentWearables.getWearableIndex(getWearable(), index)) + { + gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index); + LLVisualParamHint::requestHintUpdates(); + gAgentAvatarp->wearableUpdated(type); + } + else + { + LL_WARNS() << "wearable not found in gAgentWearables" << LL_ENDL; + } } } else @@ -1002,13 +1008,13 @@ void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl) { LLWearableType::EType type = getWearable()->getType(); const PickerControlEntryNamePredicate name_pred(ctrl->getName()); - const LLEditWearableDictionary::PickerControlEntry* entry - = find_picker_ctrl_entry_if<LLColorSwatchCtrl, PickerControlEntryNamePredicate>(type, name_pred); + const LLEditWearableDictionary::PickerControlEntry* entry = + find_picker_ctrl_entry_if<LLColorSwatchCtrl, PickerControlEntryNamePredicate>(type, name_pred); if (entry) { const LLColor4& old_color = getWearable()->getClothesColor(entry->mTextureIndex); const LLColor4& new_color = LLColor4(ctrl->getValue()); - if( old_color != new_color ) + if (old_color != new_color) { getWearable()->setClothesColor(entry->mTextureIndex, new_color); LLVisualParamHint::requestHintUpdates(); @@ -1026,11 +1032,13 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) { LLPanel* panel = getPanel(type); if (!panel) + { return; + } bool is_modifiable = false; - if(mWearableItem) + if (mWearableItem) { const LLPermissions& perm = mWearableItem->getPermissions(); is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID()); @@ -1052,7 +1060,6 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) void LLPanelEditWearable::incrementCofVersionLegacy() { - } void LLPanelEditWearable::saveChanges(bool force_save_as) @@ -1064,59 +1071,57 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) } U32 index; - if (!gAgentWearables.getWearableIndex(mWearablePtr, index)) - { - LL_WARNS() << "wearable not found" << LL_ENDL; - return; - } + if (!gAgentWearables.getWearableIndex(mWearablePtr, index)) + { + LL_WARNS() << "wearable not found" << LL_ENDL; + return; + } std::string new_name = mNameEditor->getText(); - // Find an existing link to this wearable's inventory item, if any, and its description field. - LLInventoryItem *link_item = NULL; - std::string description; - LLInventoryModel::item_array_t links = - LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID()); - if (links.size()>0) - { - link_item = links.at(0).get(); - if (link_item && link_item->getIsLinkType()) - { - description = link_item->getActualDescription(); - } - } + // Find an existing link to this wearable's inventory item, if any, and its description field. + LLInventoryItem* link_item = NULL; + std::string description; + LLInventoryModel::item_array_t links = + LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID()); + if (links.size() > 0) + { + link_item = links.at(0).get(); + if (link_item && link_item->getIsLinkType()) + { + description = link_item->getActualDescription(); + } + } if (force_save_as) { - // the name of the wearable has changed, re-save wearable with new name - LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(),gAgentAvatarp->mEndCustomizeCallback); - gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE); - mNameEditor->setText(mWearableItem->getName()); + // the name of the wearable has changed, re-save wearable with new name + LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(), gAgentAvatarp->mEndCustomizeCallback); + gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE); + mNameEditor->setText(mWearableItem->getName()); } else { - // Make another copy of this link, with the same - // description. This is needed to bump the COF - // version so texture baking service knows appearance has changed. - if (link_item) - { - // Create new link - LL_DEBUGS("Avatar") << "link refresh, creating new link to " << link_item->getLinkedUUID() - << " removing old link at " << link_item->getUUID() - << " wearable item id " << mWearablePtr->getItemID() << LL_ENDL; - - LLInventoryObject::const_object_list_t obj_array; - obj_array.push_back(LLConstPointer<LLInventoryObject>(link_item)); - link_inventory_array(LLAppearanceMgr::instance().getCOF(), - obj_array, - gAgentAvatarp->mEndCustomizeCallback); - // Remove old link - remove_inventory_item(link_item->getUUID(), gAgentAvatarp->mEndCustomizeCallback); - } - gAgentWearables.saveWearable(mWearablePtr->getType(), index, new_name); - } - - + // Make another copy of this link, with the same + // description. This is needed to bump the COF + // version so texture baking service knows appearance has changed. + if (link_item) + { + // Create new link + LL_DEBUGS("Avatar") << "link refresh, creating new link to " << link_item->getLinkedUUID() + << " removing old link at " << link_item->getUUID() + << " wearable item id " << mWearablePtr->getItemID() << LL_ENDL; + + LLInventoryObject::const_object_list_t obj_array; + obj_array.push_back(LLConstPointer<LLInventoryObject>(link_item)); + link_inventory_array(LLAppearanceMgr::instance().getCOF(), + obj_array, + gAgentAvatarp->mEndCustomizeCallback); + // Remove old link + remove_inventory_item(link_item->getUUID(), gAgentAvatarp->mEndCustomizeCallback); + } + gAgentWearables.saveWearable(mWearablePtr->getType(), index, new_name); + } } void LLPanelEditWearable::revertChanges() @@ -1166,15 +1171,15 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO targetPanel->setVisible(show); toggleTypeSpecificControls(type); - // Update type controls here - updateTypeSpecificControls(type); + // Update type controls here + updateTypeSpecificControls(type); if (show) { mPanelTitle->setText(title); mPanelTitle->setToolTip(title); mDescTitle->setText(description_title); - + // set name mNameEditor->setText(mWearableItem->getName()); @@ -1182,51 +1187,51 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO // clear and rebuild visual param list U8 num_subparts = (U8)(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) { LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL; 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) { LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL; continue; } - + if (!tab) { LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL; continue; } - // Don't show female subparts if you're not female, etc. - if (!(gAgentAvatarp->getSex() & subpart_entry->mSex)) - { - tab->setVisible(FALSE); - continue; - } - else - { - tab->setVisible(TRUE); - } - + // Don't show female subparts if you're not female, etc. + if (!(gAgentAvatarp->getSex() & subpart_entry->mSex)) + { + tab->setVisible(FALSE); + continue; + } + else + { + tab->setVisible(TRUE); + } + // 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); @@ -1238,9 +1243,10 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO } buildParamList(panel_list, sorted_params, tab, jointp); - + updateScrollingPanelUI(); } + if (!disable_camera_switch) { showDefaultSubpart(); @@ -1269,17 +1275,17 @@ void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) { changeCamera(index); } - } void LLPanelEditWearable::changeCamera(U8 subpart) { - // Don't change the camera if this type doesn't have a camera switch. - // Useful for wearables like physics that don't have an associated physical body part. - if (LLWearableType::getInstance()->getDisableCameraSwitch(mWearablePtr->getType())) - { - return; - } + // Don't change the camera if this type doesn't have a camera switch. + // Useful for wearables like physics that don't have an associated physical body part. + if (LLWearableType::getInstance()->getDisableCameraSwitch(mWearablePtr->getType())) + { + return; + } + const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType()); if (!wearable_entry) { @@ -1308,9 +1314,9 @@ void LLPanelEditWearable::changeCamera(U8 subpart) gMorphView->setCameraOffset( subpart_entry->mCameraOffset ); if (gSavedSettings.getBOOL("AppearanceCameraMovement")) { - // Unlock focus from avatar but don't stop animation to not interrupt ANIM_AGENT_CUSTOMIZE - gAgentCamera.setFocusOnAvatar(FALSE, gAgentCamera.getCameraAnimating()); - gMorphView->updateCamera(); + // Unlock focus from avatar but don't stop animation to not interrupt ANIM_AGENT_CUSTOMIZE + gAgentCamera.setFocusOnAvatar(FALSE, gAgentCamera.getCameraAnimating()); + gMorphView->updateCamera(); } } @@ -1369,14 +1375,18 @@ void LLPanelEditWearable::updateScrollingPanelUI() LLWearableType::EType type = mWearablePtr->getType(); LLPanel *panel = getPanel(type); - if(panel && (mWearablePtr->getItemID().notNull())) + if (panel && (mWearablePtr->getItemID().notNull())) { const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); llassert(wearable_entry); - if (!wearable_entry) return; - U8 num_subparts = (U8)(wearable_entry->mSubparts.size()); + if (!wearable_entry) + { + return; + } LLScrollingPanelParam::sUpdateDelayFrames = 0; + + U8 num_subparts = (U8)(wearable_entry->mSubparts.size()); for (U8 index = 0; index < num_subparts; ++index) { // dive into data structures to get the panel we need @@ -1386,13 +1396,13 @@ void LLPanelEditWearable::updateScrollingPanelUI() const std::string scrolling_panel = subpart_entry->mParamList; LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel); - + if (!panel_list) { LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL; continue; } - + panel_list->updatePanels(TRUE); } } @@ -1404,75 +1414,56 @@ LLPanel* LLPanelEditWearable::getPanel(LLWearableType::EType type) { case LLWearableType::WT_SHAPE: return mPanelShape; - break; case LLWearableType::WT_SKIN: return mPanelSkin; - break; case LLWearableType::WT_HAIR: return mPanelHair; - break; case LLWearableType::WT_EYES: return mPanelEyes; - break; case LLWearableType::WT_SHIRT: return mPanelShirt; - break; case LLWearableType::WT_PANTS: return mPanelPants; - break; case LLWearableType::WT_SHOES: return mPanelShoes; - break; case LLWearableType::WT_SOCKS: return mPanelSocks; - break; case LLWearableType::WT_JACKET: return mPanelJacket; - break; case LLWearableType::WT_GLOVES: return mPanelGloves; - break; case LLWearableType::WT_UNDERSHIRT: return mPanelUndershirt; - break; case LLWearableType::WT_UNDERPANTS: return mPanelUnderpants; - break; case LLWearableType::WT_SKIRT: return mPanelSkirt; - break; case LLWearableType::WT_ALPHA: return mPanelAlpha; - break; case LLWearableType::WT_TATTOO: return mPanelTattoo; - break; - - case LLWearableType::WT_UNIVERSAL: - return mPanelUniversal; - break; + + case LLWearableType::WT_UNIVERSAL: + return mPanelUniversal; case LLWearableType::WT_PHYSICS: return mPanelPhysics; - break; - - default: - break; } + return NULL; } @@ -1508,11 +1499,11 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value // sorted_params is sorted according to magnitude of effect from // least to greatest. Adding to the front of the child list // reverses that order. - if( panel_list ) + if (panel_list) { panel_list->clearPanels(); value_map_t::iterator end = sorted_params.end(); - for(value_map_t::iterator it = sorted_params.begin(); it != end; ++it) + for (value_map_t::iterator it = sorted_params.begin(); it != end; ++it) { LLPanel::Params p; p.name("LLScrollingPanelParam"); @@ -1535,7 +1526,7 @@ void LLPanelEditWearable::updateVerbs() { bool can_copy = false; - if(mWearableItem) + if (mWearableItem) { can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID); } @@ -1545,7 +1536,7 @@ void LLPanelEditWearable::updateVerbs() mBtnRevert->setEnabled(is_dirty); getChildView("save_as_button")->setEnabled(is_dirty && can_copy); - if(isAgentAvatarValid()) + if (isAgentAvatarValid()) { // Update viewer's radio buttons (of RadioGroup with control_name="AvatarSex") of Avatar's gender // with value from "AvatarSex" setting @@ -1586,17 +1577,20 @@ void LLPanelEditWearable::configureAlphaCheckbox(LLAvatarAppearanceDefines::ETex void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLAvatarAppearanceDefines::ETextureIndex te) { - if (!checkbox_ctrl) return; - if (!getWearable()) return; + if (!checkbox_ctrl || !getWearable()) + { + return; + } LL_INFOS() << "onInvisibilityCommit, self " << this << " checkbox_ctrl " << checkbox_ctrl << LL_ENDL; - U32 index; - if (!gAgentWearables.getWearableIndex(getWearable(),index)) - { - LL_WARNS() << "wearable not found" << LL_ENDL; - return; - } + U32 index; + if (!gAgentWearables.getWearableIndex(getWearable(), index)) + { + LL_WARNS() << "wearable not found" << LL_ENDL; + return; + } + bool new_invis_state = checkbox_ctrl->get(); if (new_invis_state) { @@ -1604,8 +1598,8 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL mPreviousAlphaTexture[te] = lto->getID(); LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_INVISIBLE ); - gAgentAvatarp->setLocalTexture(te, image, FALSE, index); - gAgentAvatarp->wearableUpdated(getWearable()->getType()); + gAgentAvatarp->setLocalTexture(te, image, FALSE, index); + gAgentAvatarp->wearableUpdated(getWearable()->getType()); } else { @@ -1615,10 +1609,16 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL { prev_id = LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ); } - if (prev_id.isNull()) return; - + if (prev_id.isNull()) + { + return; + } + LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(prev_id); - if (!image) return; + if (!image) + { + return; + } gAgentAvatarp->setLocalTexture(te, image, FALSE, index); gAgentAvatarp->wearableUpdated(getWearable()->getType()); @@ -1629,7 +1629,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL void LLPanelEditWearable::updateAlphaCheckboxes() { - for(string_texture_index_map_t::iterator iter = mAlphaCheckbox2Index.begin(); + for (string_texture_index_map_t::iterator iter = mAlphaCheckbox2Index.begin(); iter != mAlphaCheckbox2Index.end(); ++iter ) { LLAvatarAppearanceDefines::ETextureIndex te = (LLAvatarAppearanceDefines::ETextureIndex)iter->second; diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 6a82a3b35d..d935c01eb8 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -960,9 +960,15 @@ void LLTaskLSLBridge::openItem() LLSD floater_key; floater_key["taskid"] = mPanel->getTaskUUID(); floater_key["itemid"] = mUUID; + LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key, TAKE_FOCUS_YES); if (preview) { + LLSelectNode *node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, TRUE); + if (node && node->mValid) + { + preview->setObjectName(node->mName); + } preview->setObjectID(mPanel->getTaskUUID()); } } diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 0535036cb0..ee48ca4a9b 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -561,7 +561,6 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id) { mPickName->setEnabled(TRUE); mPickDescription->setEnabled(TRUE); - mSetCurrentLocationButton->setVisible(TRUE); } else { @@ -576,7 +575,6 @@ BOOL LLPanelProfilePick::postBuild() mSaveButton = getChild<LLButton>("save_changes_btn"); mCreateButton = getChild<LLButton>("create_changes_btn"); mCancelButton = getChild<LLButton>("cancel_changes_btn"); - mSetCurrentLocationButton = getChild<LLButton>("set_to_curr_location_btn"); mSnapshotCtrl = getChild<LLTextureCtrl>("pick_snapshot"); mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelProfilePick::onSnapshotChanged, this)); @@ -587,7 +585,6 @@ BOOL LLPanelProfilePick::postBuild() mSaveButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSave, this)); mCreateButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSave, this)); mCancelButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickCancel, this)); - mSetCurrentLocationButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSetLocation, this)); mPickName->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1), NULL); mPickName->setEnabled(FALSE); @@ -749,32 +746,6 @@ BOOL LLPanelProfilePick::isDirty() const return FALSE; } -void LLPanelProfilePick::onClickSetLocation() -{ - // Save location for later use. - setPosGlobal(gAgent.getPositionGlobal()); - - std::string parcel_name, region_name; - - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - if (parcel) - { - mParcelId = parcel->getID(); - parcel_name = parcel->getName(); - } - - LLViewerRegion* region = gAgent.getRegion(); - if (region) - { - region_name = region->getName(); - } - - setPickLocation(createLocationText(getLocationNotice(), parcel_name, region_name, getPosGlobal())); - - mLocationChanged = true; - enableSaveButton(TRUE); -} - void LLPanelProfilePick::onClickSave() { sendUpdate(); diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index f84463cc9b..228dfd5958 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -202,11 +202,6 @@ protected: void resetDirty() override; /** - * Callback for "Set Location" button click - */ - void onClickSetLocation(); - - /** * Callback for "Save" and "Create" button click */ void onClickSave(); @@ -228,7 +223,6 @@ protected: LLTextureCtrl* mSnapshotCtrl; LLLineEditor* mPickName; LLTextEditor* mPickDescription; - LLButton* mSetCurrentLocationButton; LLButton* mSaveButton; LLButton* mCreateButton; LLButton* mCancelButton; diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index 28631e2b7b..af57169f3b 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -32,6 +32,7 @@ // Viewer includes #include "llcombobox.h" #include "llsliderctrl.h" +#include "llstartup.h" #include "llviewercontrol.h" #include "llvoiceclient.h" #include "llvoicechannel.h" @@ -70,11 +71,14 @@ BOOL LLPanelVoiceDeviceSettings::postBuild() mCtrlInputDevices = getChild<LLComboBox>("voice_input_device"); mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device"); + mUnmuteBtn = getChild<LLButton>("unmute_btn"); mCtrlInputDevices->setCommitCallback( boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this)); mCtrlOutputDevices->setCommitCallback( boost::bind(&LLPanelVoiceDeviceSettings::onCommitOutputDevice, this)); + mUnmuteBtn->setCommitCallback( + boost::bind(&LLPanelVoiceDeviceSettings::onCommitUnmute, this)); mLocalizedDeviceNames[DEFAULT_DEVICE] = getString("default_text"); mLocalizedDeviceNames["No Device"] = getString("name_no_device"); @@ -108,11 +112,27 @@ void LLPanelVoiceDeviceSettings::draw() // let user know that volume indicator is not yet available bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode(); - getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode); + bool voice_enabled = LLVoiceClient::getInstance()->voiceEnabled(); + if (voice_enabled) + { + getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode); + getChildView("disabled_text")->setVisible(FALSE); + mUnmuteBtn->setVisible(FALSE); + } + else + { + getChildView("wait_text")->setVisible(FALSE); + + static LLCachedControl<bool> chat_enabled(gSavedSettings, "EnableVoiceChat"); + // If voice isn't enabled, it is either disabled or muted + bool voice_disabled = chat_enabled() || LLStartUp::getStartupState() <= STATE_LOGIN_WAIT; + getChildView("disabled_text")->setVisible(voice_disabled); + mUnmuteBtn->setVisible(!voice_disabled); + } LLPanel::draw(); - if (is_in_tuning_mode) + if (is_in_tuning_mode && voice_enabled) { const S32 num_bars = 5; F32 voice_power = LLVoiceClient::getInstance()->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL; @@ -339,3 +359,8 @@ void LLPanelVoiceDeviceSettings::onInputDevicesClicked() { LLVoiceClient::getInstance()->refreshDeviceLists(false); // fill in the pop up menus again if needed. } + +void LLPanelVoiceDeviceSettings::onCommitUnmute() +{ + gSavedSettings.setBOOL("EnableVoiceChat", TRUE); +} diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h index 355bc02b05..e704394d4a 100644 --- a/indra/newview/llpanelvoicedevicesettings.h +++ b/indra/newview/llpanelvoicedevicesettings.h @@ -55,12 +55,14 @@ protected: void onCommitOutputDevice(); void onOutputDevicesClicked(); void onInputDevicesClicked(); + void onCommitUnmute(); F32 mMicVolume; std::string mInputDevice; std::string mOutputDevice; class LLComboBox *mCtrlInputDevices; class LLComboBox *mCtrlOutputDevices; + class LLButton *mUnmuteBtn; BOOL mDevicesUpdated; bool mUseTuningMode; std::map<std::string, std::string> mLocalizedDeviceNames; diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index 6f11e76a72..09038ac95a 100644 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -50,7 +50,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown() { mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2)); mCommitCallbackRegistrar.add("Vol.SetSounds", boost::bind(&LLPanelVolumePulldown::onClickSetSounds, this)); - mCommitCallbackRegistrar.add("Vol.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelVolumePulldown::updateMediaAutoPlayCheckbox, this, _1)); + mCommitCallbackRegistrar.add("Vol.updateCheckbox", boost::bind(&LLPanelVolumePulldown::updateCheckbox, this, _1, _2)); mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2)); buildFromFile( "panel_volume_pulldown.xml"); } @@ -90,19 +90,23 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data) control->set(LLSD(FALSE)); } -void LLPanelVolumePulldown::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) +void LLPanelVolumePulldown::updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data) { - std::string name = ctrl->getName(); + std::string control_name = user_data.asString(); + if (control_name == "MediaAutoPlay") + { + std::string name = ctrl->getName(); - // Disable "Allow Media to auto play" only when both - // "Streaming Music" and "Media" are unchecked. STORM-513. - if ((name == "enable_music") || (name == "enable_media")) - { - bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get(); - bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get(); + // Disable "Allow Media to auto play" only when both + // "Streaming Music" and "Media" are unchecked. STORM-513. + if ((name == "enable_music") || (name == "enable_media")) + { + bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get(); + bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get(); - getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled); - } + getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled); + } + } } void LLPanelVolumePulldown::onClickSetSounds() diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h index e907bb0c78..3243d2e968 100644 --- a/indra/newview/llpanelvolumepulldown.h +++ b/indra/newview/llpanelvolumepulldown.h @@ -43,7 +43,7 @@ class LLPanelVolumePulldown : public LLPanelPulldown void onClickSetSounds(); // Disables "Allow Media to auto play" check box only when both // "Streaming Music" and "Media" are unchecked. Otherwise enables it. - void updateMediaAutoPlayCheckbox(LLUICtrl* ctrl); + void updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data); void onAdvancedButtonClick(const LLSD& user_data); }; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 23c6cc01f5..4207d33afe 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -87,6 +87,9 @@ #include "llexperiencecache.h" #include "llfloaterexperienceprofile.h" #include "llviewerassetupload.h" +#include "lltoggleablemenu.h" +#include "llmenubutton.h" +#include "llinventoryfunctions.h" const std::string HELLO_LSL = "default\n" @@ -323,6 +326,38 @@ void LLFloaterScriptSearch::onSearchBoxCommit() } /// --------------------------------------------------------------------------- + +class LLScriptMovedObserver : public LLInventoryObserver +{ + public: + LLScriptMovedObserver(LLPreviewLSL *floater) : mPreview(floater) { gInventory.addObserver(this); } + virtual ~LLScriptMovedObserver() { gInventory.removeObserver(this); } + virtual void changed(U32 mask); + + private: + LLPreviewLSL *mPreview; +}; + +void LLScriptMovedObserver::changed(U32 mask) +{ + const std::set<LLUUID> &mChangedItemIDs = gInventory.getChangedIDs(); + std::set<LLUUID>::const_iterator it; + + const LLUUID &item_id = mPreview->getScriptID(); + + for (it = mChangedItemIDs.begin(); it != mChangedItemIDs.end(); it++) + { + if (*it == item_id) + { + if ((mask & (LLInventoryObserver::STRUCTURE)) != 0) + { + mPreview->setDirty(); + } + } + } +} + +/// --------------------------------------------------------------------------- /// LLScriptEdCore /// --------------------------------------------------------------------------- @@ -460,6 +495,13 @@ BOOL LLScriptEdCore::postBuild() LLSyntaxIdLSL::getInstance()->initialize(); processKeywords(); + mCommitCallbackRegistrar.add("FontSize.Set", boost::bind(&LLScriptEdCore::onChangeFontSize, this, _2)); + mEnableCallbackRegistrar.add("FontSize.Check", boost::bind(&LLScriptEdCore::isFontSizeChecked, this, _2)); + + LLToggleableMenu *context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>( + "menu_lsl_font_size.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + getChild<LLMenuButton>("font_btn")->setMenu(context_menu, LLMenuButton::MP_BOTTOM_LEFT, true); + return TRUE; } @@ -788,7 +830,7 @@ void LLScriptEdCore::setHelpPage(const std::string& help_string) LLUIString url_string = gSavedSettings.getString("LSLHelpURL"); - url_string.setArg("[LSL_STRING]", help_string); + url_string.setArg("[LSL_STRING]", help_string.empty() ? HELP_LSL_PORTAL_TOPIC : help_string); addHelpItemToHistory(help_string); @@ -1288,7 +1330,21 @@ LLUUID LLScriptEdCore::getAssociatedExperience()const return mAssociatedExperience; } -void LLLiveLSLEditor::setExperienceIds( const LLSD& experience_ids ) +void LLScriptEdCore::onChangeFontSize(const LLSD &userdata) +{ + const std::string font_name = userdata.asString(); + gSavedSettings.setString("LSLFontSizeName", font_name); +} + +bool LLScriptEdCore::isFontSizeChecked(const LLSD &userdata) +{ + const std::string current_size_name = LLScriptEditor::getScriptFontSize(); + const std::string size_name = userdata.asString(); + + return (size_name == current_size_name); +} + + void LLLiveLSLEditor::setExperienceIds( const LLSD& experience_ids ) { mExperienceIds=experience_ids; updateExperiencePanel(); @@ -1476,7 +1532,21 @@ bool LLScriptEdContainer::onExternalChange(const std::string& filename) return true; } -/// --------------------------------------------------------------------------- +BOOL LLScriptEdContainer::handleKeyHere(KEY key, MASK mask) +{ + if (('A' == key) && (MASK_CONTROL == (mask & MASK_MODIFIERS))) + { + mScriptEd->selectAll(); + return TRUE; + } + + if (!LLPreview::handleKeyHere(key, mask)) + { + return mScriptEd->handleKeyHere(key, mask); + } + return TRUE; +} + /// --------------------------------------------------------------------------- /// LLPreviewLSL /// --------------------------------------------------------------------------- @@ -1517,6 +1587,14 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key ) mPendingUploads(0) { mFactoryMap["script panel"] = LLCallbackMap(LLPreviewLSL::createScriptEdPanel, this); + + mItemObserver = new LLScriptMovedObserver(this); +} + +LLPreviewLSL::~LLPreviewLSL() +{ + delete mItemObserver; + mItemObserver = NULL; } // virtual @@ -1528,10 +1606,14 @@ BOOL LLPreviewLSL::postBuild() if (item) { getChild<LLUICtrl>("desc")->setValue(item->getDescription()); + + std::string item_path = get_category_path(item->getParentUUID()); + getChild<LLUICtrl>("path_txt")->setValue(item_path); + getChild<LLUICtrl>("path_txt")->setToolTip(item_path); } childSetCommitCallback("desc", LLPreview::onText, this); getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); - + return LLPreview::postBuild(); } @@ -1543,7 +1625,12 @@ void LLPreviewLSL::draw() setTitle(LLTrans::getString("ScriptWasDeleted")); mScriptEd->setItemRemoved(TRUE); } - + else if (mDirty) + { + std::string item_path = get_category_path(item->getParentUUID()); + getChild<LLUICtrl>("path_txt")->setValue(item_path); + getChild<LLUICtrl>("path_txt")->setToolTip(item_path); + } LLPreview::draw(); } // virtual @@ -1829,7 +1916,8 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) : mPendingUploads(0), mIsModifiable(FALSE), mIsNew(false), - mIsSaving(FALSE) + mIsSaving(FALSE), + mObjectName("") { mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this); } @@ -1966,6 +2054,7 @@ void LLLiveLSLEditor::loadAsset() } refreshFromItem(); + getChild<LLUICtrl>("obj_name")->setValue(mObjectName); // This is commented out, because we don't completely // handle script exports yet. /* diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index f851ff6f3f..36e5253fb6 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -36,6 +36,7 @@ #include "llfloatergotoline.h" #include "lllivefile.h" #include "llsyntaxid.h" +#include "llscripteditor.h" class LLLiveLSLFile; class LLMessageSystem; @@ -52,6 +53,7 @@ class LLViewerInventoryItem; class LLScriptEdContainer; class LLFloaterGotoLine; class LLFloaterExperienceProfile; +class LLScriptMovedObserver; class LLLiveLSLFile : public LLLiveFile { @@ -145,7 +147,13 @@ public: void setAssetID( const LLUUID& asset_id){ mAssetID = asset_id; }; LLUUID getAssetID() { return mAssetID; } -private: + bool isFontSizeChecked(const LLSD &userdata); + void onChangeFontSize(const LLSD &size_name); + + virtual BOOL handleKeyHere(KEY key, MASK mask); + void selectAll() { mEditor->selectAll(); } + + private: void onBtnDynamicHelp(); void onBtnUndoChanges(); @@ -153,8 +161,6 @@ private: void selectFirstError(); - virtual BOOL handleKeyHere(KEY key, MASK mask); - void enableSave(BOOL b) {mEnableSave = b;} protected: @@ -207,6 +213,8 @@ public: LLScriptEdContainer(const LLSD& key); LLScriptEdContainer(const LLSD& key, const bool live); + BOOL handleKeyHere(KEY key, MASK mask); + protected: std::string getTmpFileName(const std::string& script_name); bool onExternalChange(const std::string& filename); @@ -220,6 +228,12 @@ class LLPreviewLSL : public LLScriptEdContainer { public: LLPreviewLSL(const LLSD& key ); + ~LLPreviewLSL(); + + LLUUID getScriptID() { return mItemUUID; } + + void setDirty() { mDirty = true; } + virtual void callbackLSLCompileSucceeded(); virtual void callbackLSLCompileFailed(const LLSD& compile_errors); @@ -250,6 +264,8 @@ protected: // Can safely close only after both text and bytecode are uploaded S32 mPendingUploads; + LLScriptMovedObserver* mItemObserver; + }; @@ -282,6 +298,8 @@ public: void requestExperiences(); void experienceChanged(); void addAssociatedExperience(const LLSD& experience); + + void setObjectName(std::string name) { mObjectName = name; } private: virtual BOOL canClose(); @@ -340,6 +358,7 @@ private: LLSD mExperienceIds; LLHandle<LLFloater> mExperienceProfile; + std::string mObjectName; }; #endif // LL_LLPREVIEWSCRIPT_H diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 3278bd3aa9..693491e7e7 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -30,19 +30,22 @@ #include "llsyntaxid.h" #include "lllocalcliprect.h" +#include "llviewercontrol.h" const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32; static LLDefaultChildRegistry::Register<LLScriptEditor> r("script_editor"); LLScriptEditor::Params::Params() -: show_line_numbers("show_line_numbers", true) +: show_line_numbers("show_line_numbers", true), + default_font_size("default_font_size", false) {} LLScriptEditor::LLScriptEditor(const Params& p) : LLTextEditor(p) -, mShowLineNumbers(p.show_line_numbers) +, mShowLineNumbers(p.show_line_numbers), + mUseDefaultFontSize(p.default_font_size) { if (mShowLineNumbers) { @@ -51,6 +54,12 @@ LLScriptEditor::LLScriptEditor(const Params& p) } } +BOOL LLScriptEditor::postBuild() +{ + gSavedSettings.getControl("LSLFontSizeName")->getCommitSignal()->connect(boost::bind(&LLScriptEditor::onFontSizeChange, this)); + return LLTextEditor::postBuild(); +} + void LLScriptEditor::draw() { { @@ -110,12 +119,11 @@ void LLScriptEditor::drawLineNumbers() // draw the line numbers if(line.mLineNum != last_line_num && line.mRect.mTop <= scrolled_view_rect.mTop) { - const LLFontGL *num_font = LLFontGL::getFontMonospace(); const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum )); BOOL is_cur_line = cursor_line == line.mLineNum; const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL; const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor; - num_font->render( + getScriptFont()->render( ltext, // string to draw 0, // begin offset UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2, // x @@ -143,8 +151,10 @@ void LLScriptEditor::loadKeywords() LL_PROFILE_ZONE_SCOPED; mKeywords.processTokens(); + LLStyleConstSP style = new LLStyle(LLStyle::Params().font(getScriptFont()).color(mDefaultColor.get())); + segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + mKeywords.findSegments(&segment_list, getWText(), *this, style); mSegments.clear(); segment_set_t::iterator insert_it = mSegments.begin(); @@ -159,9 +169,12 @@ void LLScriptEditor::updateSegments() if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) { LL_PROFILE_ZONE_SCOPED; + + LLStyleConstSP style = new LLStyle(LLStyle::Params().font(getScriptFont()).color(mDefaultColor.get())); + // HACK: No non-ascii keywords for now segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + mKeywords.findSegments(&segment_list, getWText(), *this, style); clearSegments(); for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) @@ -211,3 +224,23 @@ void LLScriptEditor::drawSelectionBackground() } } } + +std::string LLScriptEditor::getScriptFontSize() +{ + static LLCachedControl<std::string> size_name(gSavedSettings, "LSLFontSizeName", "Monospace"); + return size_name; +} + +LLFontGL* LLScriptEditor::getScriptFont() +{ + std::string font_size_name = mUseDefaultFontSize ? "Monospace" : getScriptFontSize(); + return LLFontGL::getFont(LLFontDescriptor("Monospace", font_size_name, 0)); +} + +void LLScriptEditor::onFontSizeChange() +{ + if (!mUseDefaultFontSize) + { + needsReflow(); + } +} diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h index f458203a39..ef941f552a 100644 --- a/indra/newview/llscripteditor.h +++ b/indra/newview/llscripteditor.h @@ -37,7 +37,7 @@ public: struct Params : public LLInitParam::Block<Params, LLTextEditor::Params> { Optional<bool> show_line_numbers; - + Optional<bool> default_font_size; Params(); }; @@ -45,6 +45,7 @@ public: // LLView override virtual void draw(); + BOOL postBuild(); void initKeywords(); void loadKeywords(); @@ -52,7 +53,11 @@ public: LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); } LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); } -protected: + static std::string getScriptFontSize(); + LLFontGL* getScriptFont(); + void onFontSizeChange(); + + protected: friend class LLUICtrlFactory; LLScriptEditor(const Params& p); @@ -65,6 +70,7 @@ private: LLKeywords mKeywords; bool mShowLineNumbers; + bool mUseDefaultFontSize; }; #endif // LL_SCRIPTEDITOR_H diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 1ef5d1c50b..5bd203cb65 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -190,6 +190,13 @@ BOOL LLStatusBar::postBuild() LLHints::getInstance()->registerHintTarget("linden_balance", getChild<LLView>("balance_bg")->getHandle()); gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLStatusBar::onVoiceChanged, this, _2)); + + if (!gSavedSettings.getBOOL("EnableVoiceChat") && LLAppViewer::instance()->isSecondInstance()) + { + // Indicate that second instance started without sound + mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off")); + } // Adding Net Stat Graph S32 x = getRect().getWidth() - 2; @@ -640,6 +647,16 @@ void LLStatusBar::onVolumeChanged(const LLSD& newvalue) refresh(); } +void LLStatusBar::onVoiceChanged(const LLSD& newvalue) +{ + if (newvalue.asBoolean()) + { + // Second instance starts with "VoiceMute_Off" icon, fix it + mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off")); + } + refresh(); +} + void LLStatusBar::onUpdateFilterTerm() { LLWString searchValue = utf8str_to_wstring( mFilterEdit->getValue() ); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 3002b91c10..3e9190652d 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -99,12 +99,12 @@ private: void onClickBuyCurrency(); void onVolumeChanged(const LLSD& newvalue); + void onVoiceChanged(const LLSD& newvalue); void onMouseEnterPresetsCamera(); void onMouseEnterPresets(); void onMouseEnterVolume(); void onMouseEnterNearbyMedia(); - void onClickScreen(S32 x, S32 y); static void onClickMediaToggle(void* data); static void onClickBalance(void* data); diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index c37c955e8d..6182c96597 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -253,7 +253,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s try { - res = this->parseResponse(httpResults, parseResult, body, translation, detected_lang, err_msg); + res = parseResponse(httpResults, parseResult, body, translation, detected_lang, err_msg); } catch (std::out_of_range&) { @@ -293,8 +293,6 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s if (!failure.empty()) failure(status, err_msg); } - - } //========================================================================= @@ -353,7 +351,6 @@ private: std::string& translation, std::string& detected_lang); static std::string getAPIKey(); - }; //------------------------------------------------------------------------- @@ -391,36 +388,37 @@ bool LLGoogleTranslationHandler::checkVerificationResponse( // virtual bool LLGoogleTranslationHandler::parseResponse( - const LLSD& http_response, + const LLSD& http_response, int& status, const std::string& body, std::string& translation, std::string& detected_lang, std::string& err_msg) const { + const std::string& text = !body.empty() ? body : http_response["error_body"].asStringRef(); + Json::Value root; Json::Reader reader; - if (!reader.parse(body, root)) + if (reader.parse(text, root)) { - err_msg = reader.getFormatedErrorMessages(); - return false; + if (root.isObject()) + { + // Request succeeded, extract translation from the XML body. + if (parseTranslation(root, translation, detected_lang)) + return true; + + // Request failed. Extract error message from the XML body. + parseErrorResponse(root, status, err_msg); + } } - - if (!root.isObject()) // empty response? should not happen + else { - return false; - } - - if (status != HTTP_OK) - { - // Request failed. Extract error message from the response. - parseErrorResponse(root, status, err_msg); - return false; + // XML parsing failed. Extract error message from the XML parser. + err_msg = reader.getFormatedErrorMessages(); } - // Request succeeded, extract translation from the response. - return parseTranslation(root, translation, detected_lang); + return false; } // virtual @@ -493,7 +491,7 @@ void LLGoogleTranslationHandler::verifyKey(const LLSD &key, LLTranslate::KeyVeri /*virtual*/ void LLGoogleTranslationHandler::initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent) const { - headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN); + headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_JSON); headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); } @@ -503,8 +501,7 @@ void LLGoogleTranslationHandler::initHttpHeader( const std::string& user_agent, const LLSD &key) const { - headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN); - headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); + initHttpHeader(headers, user_agent); } LLSD LLGoogleTranslationHandler::sendMessageAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter, @@ -728,7 +725,7 @@ bool LLAzureTranslationHandler::parseResponse( return false; } - translation = first["text"].asString(); + translation = LLURI::unescape(first["text"].asString()); return true; } @@ -828,8 +825,13 @@ LLSD LLAzureTranslationHandler::sendMessageAndSuspend(LLCoreHttpUtil::HttpCorout { LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray); LLCore::BufferArrayStream outs(rawbody.get()); + + static const std::string allowed_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz " + "0123456789" + "-._~"; + outs << "[{\"text\":\""; - outs << msg; + outs << LLURI::escape(msg, allowed_chars); outs << "\"}]"; return adapter->postRawAndSuspend(request, url, rawbody, options, headers); @@ -1314,5 +1316,4 @@ LLTranslationAPIHandler& LLTranslate::getHandler(EService service) } return azure; - } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index cc59e559e9..a54f66c92e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6150,8 +6150,9 @@ class LLCommunicateNearbyChat : public view_listener_t bool handleEvent(const LLSD& userdata) { LLFloaterIMContainer* im_box = LLFloaterIMContainer::getInstance(); - bool nearby_visible = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->isInVisibleChain(); - if(nearby_visible && im_box->getSelectedSession() == LLUUID() && im_box->getConversationListItemSize() > 1) + LLFloaterIMNearbyChat* floater_nearby = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (floater_nearby->isInVisibleChain() && !floater_nearby->isTornOff() + && im_box->getSelectedSession() == LLUUID() && im_box->getConversationListItemSize() > 1) { im_box->selectNextorPreviousConversation(false); } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index c458c75a40..18c3a582a2 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2365,7 +2365,8 @@ bool LLViewerFetchedTexture::updateFetch() } } - llassert_always(mRawImage.notNull() || (!mNeedsCreateTexture && !mIsRawImageValid)); + llassert_always(mRawImage.notNull() || !mIsRawImageValid); + llassert_always(mRawImage.notNull() || !mNeedsCreateTexture); return mIsFetching ? true : false; } @@ -3741,7 +3742,10 @@ void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep) if(te && te->getID().notNull()) //should have a texture { - LL_ERRS() << "The face does not have a valid texture before media texture." << LL_ENDL; + LL_WARNS_ONCE() << "The face's texture " << te->getID() << " is not valid. Face must have a valid texture before media texture." << LL_ENDL; + // This might break the object, but it likely isn't a 'recoverable' situation. + LLViewerFetchedTexture* tex = LLViewerTextureManager::getFetchedTexture(te->getID()); + mTextureList.push_back(tex); } } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 305c489cc8..250366dbea 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3612,7 +3612,6 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last) local_camera_up.normalize(); local_camera_up = local_camera_up * inv_root_rot; - // position is based on head position, does not require mAvatarOffset here. - Nyx LLVector3 avatar_ellipsoid(mBodySize.mV[VX] * 0.4f, mBodySize.mV[VY] * 0.4f, @@ -3634,6 +3633,25 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last) name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av)); name_position += pixel_up_vec * NAMETAG_VERTICAL_SCREEN_OFFSET; + const F32 water_height = getRegion()->getWaterHeight(); + static const F32 WATER_HEIGHT_DELTA = 0.25f; + if (name_position[VZ] < water_height + WATER_HEIGHT_DELTA) + { + if (LLViewerCamera::getInstance()->getOrigin()[VZ] >= water_height) + { + name_position[VZ] = water_height; + } + else // both camera and HUD are below watermark + { + F32 name_world_height = mNameText->getWorldHeight(); + F32 max_z_position = water_height - name_world_height; + if (name_position[VZ] > max_z_position) + { + name_position[VZ] = max_z_position; + } + } + } + mNameText->setPositionAgent(name_position); } diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 3725510b6a..1b9aef193c 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -951,32 +951,52 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() // cause SLVoice's bind() call to fail with EADDRINUSE. We expect // that eventually the OS will time out previous ports, which is // why we cycle instead of incrementing indefinitely. - U32 portbase = gSavedSettings.getU32("VivoxVoicePort"); - static U32 portoffset = 0; + + static LLCachedControl<U32> portbase(gSavedSettings, "VivoxVoicePort"); + static LLCachedControl<std::string> host(gSavedSettings, "VivoxVoiceHost"); + static LLCachedControl<std::string> loglevel(gSavedSettings, "VivoxDebugLevel"); + static LLCachedControl<std::string> log_folder(gSavedSettings, "VivoxLogDirectory"); + static LLCachedControl<std::string> shutdown_timeout(gSavedSettings, "VivoxShutdownTimeout"); static const U32 portrange = 100; - std::string host(gSavedSettings.getString("VivoxVoiceHost")); - U32 port = portbase + portoffset; + static U32 portoffset = 0; + U32 port = 0; + + if (LLAppViewer::instance()->isSecondInstance()) + { + // Ideally need to know amount of instances and + // to increment instance_offset on EADDRINUSE. + // But for now just use rand + static U32 instance_offset = portrange * ll_rand(20); + port = portbase + portoffset + instance_offset; + } + else + { + // leave main thread with exclusive port set + port = portbase + portoffset; + } portoffset = (portoffset + 1) % portrange; params.args.add("-i"); - params.args.add(STRINGIZE(host << ':' << port)); + params.args.add(STRINGIZE(host() << ':' << port)); - std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); - if (loglevel.empty()) + params.args.add("-ll"); + if (loglevel().empty()) { - loglevel = "0"; + params.args.add("0"); } - params.args.add("-ll"); - params.args.add(loglevel); - - std::string log_folder = gSavedSettings.getString("VivoxLogDirectory"); - - if (log_folder.empty()) + else { - log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + params.args.add(loglevel); } params.args.add("-lf"); - params.args.add(log_folder); + if (log_folder().empty()) + { + params.args.add(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "")); + } + else + { + params.args.add(log_folder); + } // set log file basename and .log params.args.add("-lp"); @@ -992,8 +1012,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() LLFile::rename(new_log, old_log); } - std::string shutdown_timeout = gSavedSettings.getString("VivoxShutdownTimeout"); - if (!shutdown_timeout.empty()) + if (!shutdown_timeout().empty()) { params.args.add("-st"); params.args.add(shutdown_timeout); @@ -1016,7 +1035,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() sGatewayPtr = LLProcess::create(params); - mDaemonHost = LLHost(host.c_str(), port); + mDaemonHost = LLHost(host().c_str(), port); } else { diff --git a/indra/newview/skins/default/textures/icons/Icon_Color_Palette.png b/indra/newview/skins/default/textures/icons/Icon_Color_Palette.png Binary files differnew file mode 100644 index 0000000000..28906001ea --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Icon_Color_Palette.png diff --git a/indra/newview/skins/default/textures/icons/Icon_Font_Size.png b/indra/newview/skins/default/textures/icons/Icon_Font_Size.png Binary files differnew file mode 100644 index 0000000000..37bdde69aa --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Icon_Font_Size.png diff --git a/indra/newview/skins/default/textures/icons/VoiceMute_Off.png b/indra/newview/skins/default/textures/icons/VoiceMute_Off.png Binary files differnew file mode 100644 index 0000000000..425ba267a5 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/VoiceMute_Off.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 7d999a2ffa..d237ddd518 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -63,6 +63,7 @@ with the same filename but different name <texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" /> <texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" /> + <texture name="VoiceMute_Off" file_name="icons/VoiceMute_Off.png" preload="false" /> <texture name="Audio_Off" file_name="icons/Audio_Off.png" preload="false" /> <texture name="Audio_Press" file_name="icons/Audio_Press.png" preload="false" /> @@ -881,4 +882,7 @@ with the same filename but different name <texture name="System_Notification" file_name="icons/SL_Logo.png" preload="true"/> <texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true"/> <texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true"/> + + <texture name="Icon_Color_Palette" file_name="icons/Icon_Color_Palette.png" preload="false"/> + <texture name="Icon_Font_Size" file_name="icons/Icon_Font_Size.png" preload="false"/> </textures> diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml index e8826034f6..88173e68fa 100644 --- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml @@ -4,7 +4,7 @@ bevel_style="none" border_style="line" can_resize="true" - height="582" + height="607" layout="topleft" min_height="271" min_width="328" @@ -45,6 +45,21 @@ name="loading"> Loading... </floater.string> + <text + type="string" + length="1" + follows="left|top|right" + width="490" + use_ellipses="true" + font="SansSerif" + height="18" + layout="topleft" + left="13" + name="obj_name" + text_color="white" + top="21"> + Object name + </text> <panel bevel_style="none" @@ -54,7 +69,7 @@ layout="topleft" left="10" name="script ed panel" - top="16" + top_pad="2" width="501" /> <button follows="left|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index 8e4bcb3eb0..8ae1e74d52 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -335,6 +335,7 @@ layout="topleft" max_length="300" name="Script Preview" + default_font_size="true" text_color="ScriptText" default_color="ScriptText" bg_writeable_color="ScriptBackground" diff --git a/indra/newview/skins/default/xui/en/floater_script_preview.xml b/indra/newview/skins/default/xui/en/floater_script_preview.xml index 91a9e67e4c..91c18035db 100644 --- a/indra/newview/skins/default/xui/en/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_script_preview.xml @@ -2,10 +2,10 @@ <floater legacy_header_height="18" can_resize="true" - height="570" + height="593" layout="topleft" min_height="271" - min_width="290" + min_width="320" name="preview lsl text" help_topic="preview_lsl_text" save_rect="true" @@ -21,7 +21,7 @@ layout="topleft" left="10" name="script panel" - top="42" + top="65" width="497" /> <icon follows="top|right" @@ -36,13 +36,28 @@ <text type="string" length="1" + follows="left|top|right" + width="490" + use_ellipses="true" + font="SansSerif" + height="18" + layout="topleft" + left="13" + name="path_txt" + text_color="white" + top="21"> + File path + </text> + <text + type="string" + length="1" follows="left|top" font="SansSerif" height="19" layout="topleft" left="13" name="desc txt" - top="19" + top_pad="5" width="80"> Description: </text> diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index b9ca0108b6..0fde6a329a 100644 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -25,7 +25,7 @@ name="statistics_view" top="20" width="250" > - <stat_view name="basic" + <stat_view name="basic" label="Basic" setting="OpenDebugStatBasic"> <stat_bar name="fps" @@ -54,7 +54,7 @@ label="jitter" decimal_digits="1" stat="frametimejitter"/> - <stat_bar name="bandwidth" + <stat_bar name="bandwidth" label="UDP Data Received" stat="activemessagedatareceived" decimal_digits="0" @@ -68,7 +68,7 @@ stat="simpingstat"/> </stat_view> - <stat_view name="advanced" + <stat_view name="advanced" label="Advanced" setting="OpenDebugStatAdvanced"> <stat_view name="render" @@ -84,28 +84,29 @@ <stat_bar name="totalobjs" label="Total Objects" stat="numobjectsstat"/> - <stat_bar name="cachedobjs" + <stat_bar name="cachedobjs" label="Cached Objects" stat="numactivecachedobjects"/> - <stat_bar name="newobjs" + <stat_bar name="newobjs" label="New Objects" stat="numnewobjectsstat"/> <stat_bar name="object_cache_hits" label="Object Cache Hit Rate" stat="object_cache_hits" show_history="true"/> - <stat_bar name="occlusion_queries" - label="Occlusion Queries Performed" - stat="occlusion_queries"/> - <stat_bar name="occluded" - label="Objects Occluded" - stat="occluded_objects"/> - <stat_bar name="unoccluded" - label="Object Unoccluded" - stat="unoccluded_objects"/> - </stat_view> + <stat_bar name="occlusion_queries" + label="Occlusion Queries Performed" + stat="occlusion_queries"/> + <stat_bar name="occluded" + label="Objects Occluded" + stat="occluded_objects"/> + <stat_bar name="unoccluded" + label="Object Unoccluded" + stat="unoccluded_objects"/> + </stat_view> <stat_view name="texture" - label="Texture"> + label="Texture" + setting="OpenDebugStatTexture"> <stat_bar name="texture_cache_hits" label="Cache Hit Rate" stat="texture_cache_hits" @@ -133,54 +134,55 @@ label="Bound Mem" stat="glboundmemstat"/> </stat_view> - <stat_view name="memory" - label="Memory Usage"> - <stat_bar name="LLTrace" + <stat_view name="memory" + label="Memory Usage" + setting="OpenDebugStatMemory"> + <stat_bar name="LLTrace" label="LLTrace" stat="LLTrace"/> - <stat_bar name="LLView" + <stat_bar name="LLView" label="UI" stat="LLView"/> - <stat_bar name="LLFontFreetype" + <stat_bar name="LLFontFreetype" label="Fonts" stat="LLFontFreetype"/> - <stat_bar name="LLInventoryObject" + <stat_bar name="LLInventoryObject" label="Inventory" stat="LLInventoryObject"/> - <stat_bar name="LLViewerObject" + <stat_bar name="LLViewerObject" label="Viewer Objects" stat="LLViewerObject"/> - <stat_bar name="LLViewerOctreeGroup" - label="Octree Group Data" - stat="LLViewerOctreeGroup"/> - <stat_bar name="LLViewerOctreeEntry" - label="Octree Data" - stat="LLViewerOctreeEntry"/> - <stat_bar name="LLVOCacheEntry" + <stat_bar name="LLViewerOctreeGroup" + label="Octree Group Data" + stat="LLViewerOctreeGroup"/> + <stat_bar name="LLViewerOctreeEntry" + label="Octree Data" + stat="LLViewerOctreeEntry"/> + <stat_bar name="LLVOCacheEntry" label="Viewer Object Cache" stat="LLVOCacheEntry"/> - <stat_bar name="LLDrawable" + <stat_bar name="LLDrawable" label="Drawables" stat="LLDrawable"/> - <stat_bar name="LLFace" - label="Face Data" - stat="LLFace"/> + <stat_bar name="LLFace" + label="Face Data" + stat="LLFace"/> <stat_bar name="LLDrawInfo" - label="Draw Info" - stat="LLDrawInfo"/> + label="Draw Info" + stat="LLDrawInfo"/> <stat_bar name="LLTexture" - label="Texture Data" - stat="LLTexture"/> - <stat_bar name="LLImage" + label="Texture Data" + stat="LLTexture"/> + <stat_bar name="LLImage" label="Image Data" stat="LLImage"/> - <stat_bar name="LLImageGL" + <stat_bar name="LLImageGL" label="GL Image Data" stat="LLImageGL"/> - <stat_bar name="LLVertexBuffer" + <stat_bar name="LLVertexBuffer" label="Vertex Buffers" stat="LLVertexBuffer"/> - </stat_view> + </stat_view> <stat_view name="network" label="Network" setting="OpenDebugStatNet"> @@ -237,7 +239,8 @@ decimal_digits="1" bar_max="45" /> <stat_view name="physicsdetail" - label="Physics Details"> + label="Physics Details" + setting="OpenDebugStatPhysicsDetails"> <stat_bar name="physicspinnedtasks" label="Pinned Objects" stat="physicspinnedtasks"/> @@ -276,7 +279,8 @@ stat="simscripteps" unit_label="eps"/> <stat_view name="simpathfinding" - label="Pathfinding"> + label="Pathfinding" + setting="OpenDebugStatPathfinding"> <stat_bar name="simsimaistepmsec" label="AI Step Time" stat="simsimaistepmsec"/> @@ -309,7 +313,8 @@ stat="simtotalunackedbytes" decimal_digits="1"/> <stat_view name="simperf" - label="Time"> + label="Time" + setting="OpenDebugStatSimTime"> <stat_bar name="simframemsec" label="Total Frame Time" stat="simframemsec"/> @@ -335,7 +340,8 @@ label="Spare Time" stat="simsparemsec"/> <stat_view name="timedetails" - label="Time Details"> + label="Time Details" + setting="OpenDebugStatSimTimeDetails"> <stat_bar name="simsimphysicsstepmsec" label="Physics Step" stat="simsimphysicsstepmsec"/> diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml index d88c267a95..3c3eb6b66f 100644 --- a/indra/newview/skins/default/xui/en/fonts.xml +++ b/indra/newview/skins/default/xui/en/fonts.xml @@ -170,4 +170,12 @@ comment="Size of small font (points, or 1/72 of an inch)" size="7.6" /> + <font_size name="SmallLSL" + comment="Size of small font for LSL editor (points, or 1/72 of an inch)" + size="7" + /> + <font_size name="HugeLSL" + comment="Size of huge font for LSL editor (points, or 1/72 of an inch)" + size="12" + /> </fonts> diff --git a/indra/newview/skins/default/xui/en/menu_lsl_font_size.xml b/indra/newview/skins/default/xui/en/menu_lsl_font_size.xml new file mode 100644 index 0000000000..39a2bc511c --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_lsl_font_size.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + bottom="806" + layout="topleft" + left="0" + mouse_opaque="false" + name="menu_font_size" + visible="false"> + <menu_item_check + label="Small" + layout="topleft" + name="font_small"> + <on_click + function="FontSize.Set" + parameter="SmallLSL" /> + <on_check + function="FontSize.Check" + parameter="SmallLSL" /> + </menu_item_check> + <menu_item_check + label="Default" + layout="topleft" + name="font_monospace"> + <on_click + function="FontSize.Set" + parameter="Monospace" /> + <on_check + function="FontSize.Check" + parameter="Monospace" /> + </menu_item_check> + <menu_item_check + label="Medium" + layout="topleft" + name="font_medium"> + <on_click + function="FontSize.Set" + parameter="Medium" /> + <on_check + function="FontSize.Check" + parameter="Medium" /> + </menu_item_check> + <menu_item_check + label="Large" + layout="topleft" + name="font_large"> + <on_click + function="FontSize.Set" + parameter="Large" /> + <on_check + function="FontSize.Check" + parameter="Large" /> + </menu_item_check> + <menu_item_check + label="Huge" + layout="topleft" + name="font_huge"> + <on_click + function="FontSize.Set" + parameter="HugeLSL" /> + <on_check + function="FontSize.Check" + parameter="HugeLSL" /> + </menu_item_check> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index a216ef7c0d..a4b73879b8 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -11986,5 +11986,13 @@ Would you like to save them first? notext="No" yestext="Yes"/> </notification> - + + <notification + icon="notifytip.tga" + name="IncorrectFormat" + priority="high" + type="notifytip"> +Unable to upload '[NAME]' due to the following reason: incorrect image format. + </notification> + </notifications> diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml b/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml index b72af7221e..8e2a241661 100644 --- a/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml @@ -71,7 +71,6 @@ name="visibility_show_btn" tool_tip="Show group on my profile" top_delta="0" - right_delta="0" height="20" width="20" follows="right" diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 545c01935b..4ea4a4f38d 100644 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -44,10 +44,12 @@ layout="topleft" left="0" mouse_opaque="false" + font="SansSerif" name="File" width="138"> <menu_item_call label="Save" + shortcut="control|S" layout="topleft" name="Save" /> <menu_item_separator @@ -66,16 +68,6 @@ label="Save to file..." layout="topleft" name="SaveToFile" /> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Colors..." - layout="topleft" - name="Colors"> - <menu_item_call.on_click - function="Floater.Toggle" - parameter="script_colors"/> - </menu_item_call> </menu> <menu top="0" @@ -83,6 +75,7 @@ label="Edit" layout="topleft" mouse_opaque="false" + font="SansSerif" name="Edit" width="139"> <menu_item_call @@ -117,6 +110,7 @@ name="separator2" /> <menu_item_call label="Select All" + shortcut="control|A" layout="topleft" name="Select All" /> <menu_item_call @@ -142,6 +136,7 @@ label="Help" layout="topleft" mouse_opaque="false" + font="SansSerif" name="Help" width="112"> <menu_item_call @@ -150,12 +145,34 @@ name="Keyword Help..." /> </menu> </menu_bar> + <menu_button + follows="right|top" + height="24" + image_overlay="Icon_Font_Size" + layout="topleft" + top_delta="-2" + right="453" + name="font_btn" + width="32" /> + <button + follows="right|top" + height="24" + image_overlay="Icon_Color_Palette" + layout="topleft" + top_delta="0" + right="487" + name="color_btn" + width="32"> + <button.commit_callback + function="Floater.Toggle" + parameter="script_colors"/> + </button> <script_editor left="0" type="string" length="1" follows="left|top|right|bottom" - font="Monospace" + height="376" ignore_tab="false" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml index 3dbb7fb7fc..a1ce99c8be 100644 --- a/indra/newview/skins/default/xui/en/panel_sound_devices.xml +++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml @@ -122,7 +122,7 @@ layout="topleft" left_pad="5" name="wait_text" - top_delta="-1" + top_delta="2" width="110"> Please wait </text> @@ -132,7 +132,7 @@ layout="topleft" left_delta="0" name="bar0" - top_delta="-2" + top_delta="-5" width="20" /> <locate follows="right|top" @@ -166,4 +166,26 @@ name="bar4" top_delta="0" width="20" /> + <text + type="string" + name="disabled_text" + text_color="EmphasisColor" + length="1" + follows="right|top" + height="18" + layout="topleft" + left_delta="-100" + top_delta="5" + width="110"> + Disabled + </text> + <button + follows="right|top" + height="23" + layout="topleft" + left_delta="0" + name="unmute_btn" + label="Unmute" + top_delta="-6" + width="110" /> </panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index b4eb1ade94..3c466022d8 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -199,7 +199,8 @@ top_delta="2" width="350"> <check_box.commit_callback - function="Vol.updateMediaAutoPlayCheckbox"/> + function="Vol.updateCheckbox" + parameter="MediaAutoPlay"/> </check_box> <slider control_name="AudioLevelMedia" @@ -246,7 +247,8 @@ name="enable_media" width="110"> <check_box.commit_callback - function="Vol.updateMediaAutoPlayCheckbox"/> + function="Vol.updateCheckbox" + parameter="MediaAutoPlay"/> </check_box> <slider control_name="AudioLevelVoice" @@ -292,5 +294,6 @@ top_delta="2" left_pad="5" name="enable_voice_check" - width="110"/> + width="110" + /> </panel> diff --git a/indra/newview/skins/default/xui/en/widgets/menu.xml b/indra/newview/skins/default/xui/en/widgets/menu.xml index 13ac84beb2..0e2b478aa5 100644 --- a/indra/newview/skins/default/xui/en/widgets/menu.xml +++ b/indra/newview/skins/default/xui/en/widgets/menu.xml @@ -4,5 +4,6 @@ bg_visible="true" drop_shadow="true" tear_off="false" + font="SansSerifSmall" shortcut_pad="15"> </menu> |