From dc75235e38e3f2d74476607e6196b26d36955619 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 13 Dec 2010 21:09:52 -0700 Subject: debug code for SH-639: http requests 3X more in viewer 2.4 --- indra/newview/lltexturefetch.cpp | 13 ++++++++++++- indra/newview/lltexturefetch.h | 4 ++++ indra/newview/lltextureview.cpp | 5 +++-- 3 files changed, 19 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index d6d38de225..c1346b6768 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -862,7 +862,7 @@ bool LLTextureFetchWorker::doWork(S32 param) //1, not openning too many file descriptors at the same time; //2, control the traffic of http so udp gets bandwidth. // - static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 32 ; + static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 8 ; if(mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE) { return false ; //wait. @@ -1535,6 +1535,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image mImageDecodeThread(imagedecodethread), mTextureBandwidth(0), mHTTPTextureBits(0), + mTotalHTTPRequests(0), mCurlGetRequest(NULL) { mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); @@ -1678,6 +1679,7 @@ void LLTextureFetch::addToHTTPQueue(const LLUUID& id) { LLMutexLock lock(&mNetworkQueueMutex); mHTTPTextureQueue.insert(id); + mTotalHTTPRequests++; } void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id, S32 received_size) @@ -1740,6 +1742,15 @@ S32 LLTextureFetch::getNumHTTPRequests() return size ; } +U32 LLTextureFetch::getTotalNumHTTPRequests() +{ + mNetworkQueueMutex.lock() ; + U32 size = mTotalHTTPRequests ; + mNetworkQueueMutex.unlock() ; + + return size ; +} + // call lockQueue() first! LLTextureFetchWorker* LLTextureFetch::getWorkerAfterLock(const LLUUID& id) { diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 796109df06..d25031666b 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -75,6 +75,7 @@ public: void dump(); S32 getNumRequests() ; S32 getNumHTTPRequests() ; + U32 getTotalNumHTTPRequests() ; // Public for access by callbacks void lockQueue() { mQueueMutex.lock(); } @@ -129,6 +130,9 @@ private: LLTextureInfo mTextureInfo; U32 mHTTPTextureBits; + + //debug use + U32 mTotalHTTPRequests ; }; #endif // LL_LLTEXTUREFETCH_H diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index b9a15fd1f4..0115115a23 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -516,6 +516,7 @@ void LLGLTexMemBar::draw() S32 v_offset = (S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024); + U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests() ; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; LLColor4 text_color(1.f, 1.f, 1.f, 0.75f); @@ -526,13 +527,13 @@ void LLGLTexMemBar::draw() LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6, text_color, LLFontGL::LEFT, LLFontGL::TOP); - text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB", + text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d", total_mem, max_total_mem, bound_mem, max_bound_mem, LLImageRaw::sGlobalRawMemory >> 20, discard_bias, - cache_usage, cache_max_usage, total_texture_downloaded, total_object_downloaded); + cache_usage, cache_max_usage, total_texture_downloaded, total_object_downloaded, total_http_requests); //, cache_entries, cache_max_entries LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, -- cgit v1.2.3 From da244c7cce6b3d84b011a87cbcabffb51abb3fc8 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 14 Dec 2010 12:16:39 -0700 Subject: a try fix for SH-212: crash at LLViewerObjectList::removeFromLocalIDTable(LLViewerObject const &) [secondlife-bin llviewerobjectlist.cpp] line 173 --- indra/newview/llcapabilityprovider.h | 2 +- indra/newview/llviewerobjectlist.cpp | 22 ++++++++-------------- indra/newview/llviewerobjectlist.h | 2 +- indra/newview/llviewerregion.cpp | 6 ++++++ indra/newview/llviewerregion.h | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcapabilityprovider.h b/indra/newview/llcapabilityprovider.h index a6e743f625..9d91245597 100644 --- a/indra/newview/llcapabilityprovider.h +++ b/indra/newview/llcapabilityprovider.h @@ -46,7 +46,7 @@ public: /** * Get host to which to send that capability request. */ - virtual LLHost getHost() const = 0; + virtual const LLHost& getHost() const = 0; /** * Describe this LLCapabilityProvider for logging etc. */ diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f9bf0543c4..8d5015fd51 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -159,19 +159,13 @@ U64 LLViewerObjectList::getIndex(const U32 local_id, return (((U64)index) << 32) | (U64)local_id; } -BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) +BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) { - if(object.getRegion()) + if(objectp && objectp->getRegion()) { - U32 local_id = object.mLocalID; - LLHost region_host = object.getRegion()->getHost(); - if(!region_host.isOk()) - { - return FALSE ; - } - - U32 ip = region_host.getAddress(); - U32 port = region_host.getPort(); + U32 local_id = objectp->mLocalID; + U32 ip = objectp->getRegion()->getHost().getAddress(); + U32 port = objectp->getRegion()->getHost().getPort(); U64 ipport = (((U64)ip) << 32) | (U64)port; U32 index = sIPAndPortToIndex[ipport]; @@ -186,7 +180,7 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) } // Found existing entry - if (iter->second == object.getID()) + if (iter->second == objectp->getID()) { // Full UUIDs match, so remove the entry sIndexAndLocalIDToUUID.erase(iter); return TRUE; @@ -460,7 +454,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, // << ", regionp " << (U32) regionp << ", object region " << (U32) objectp->getRegion() // << llendl; //} - removeFromLocalIDTable(*objectp); + removeFromLocalIDTable(objectp); setUUIDAndLocal(fullid, local_id, gMessageSystem->getSenderIP(), @@ -849,7 +843,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) // << objectp->getRegion()->getHost().getPort() << llendl; //} - removeFromLocalIDTable(*objectp); + removeFromLocalIDTable(objectp); if (objectp->onActiveList()) { diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index eba5584b57..14e5d78839 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -161,7 +161,7 @@ public: const U32 ip, const U32 port); // Requires knowledge of message system info! - static BOOL removeFromLocalIDTable(const LLViewerObject &object); + static BOOL removeFromLocalIDTable(const LLViewerObject* objectp); // Used ONLY by the orphaned object code. static U64 getIndex(const U32 local_id, const U32 ip, const U32 port); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b684206960..e4dcfa1126 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -321,6 +321,12 @@ LLViewerRegion::~LLViewerRegion() std::for_each(mObjectPartition.begin(), mObjectPartition.end(), DeletePointer()); } +/*virtual*/ +const LLHost& LLViewerRegion::getHost() const +{ + return mHost; +} + void LLViewerRegion::loadObjectCache() { if (mCacheLoaded) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 8b71998f60..49ee061b71 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -244,7 +244,7 @@ public: LLEventPump& getCapAPI() { return mCapabilityListener.getCapAPI(); } /// implements LLCapabilityProvider - virtual LLHost getHost() const { return mHost; } + /*virtual*/ const LLHost& getHost() const; const U64 &getHandle() const { return mHandle; } LLSurface &getLand() const { return *mLandp; } -- cgit v1.2.3 From 57065fe5a9521158b79b7a313d6476b8dcaa13a5 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 15 Dec 2010 17:20:58 -0700 Subject: fix for SH-367: mesh viewer lock up: Problem removing object.cache - errorcode: 13 --- indra/newview/llvocache.cpp | 274 +++++++++++++++++++++++-------------------- indra/newview/llvocache.h | 4 +- indra/newview/llvovolume.cpp | 10 +- 3 files changed, 157 insertions(+), 131 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 1cb3962daa..bbe637d161 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -325,6 +325,8 @@ void LLVOCache::removeCache(ELLPath location) return ; } + llinfos << "about to remove the object cache due to settings." << llendl ; + std::string delem = gDirUtilp->getDirDelimiter(); std::string mask = delem + "*"; std::string cache_dir = gDirUtilp->getExpandedFilename(location, object_cache_dirname); @@ -343,6 +345,8 @@ void LLVOCache::removeCache() return ; } + llinfos << "about to remove the object cache due to some error." << llendl ; + std::string delem = gDirUtilp->getDirDelimiter(); std::string mask = delem + "*"; gDirUtilp->deleteFilesInDir(mObjectCacheDirName, mask); @@ -351,6 +355,43 @@ void LLVOCache::removeCache() writeCacheHeader(); } +void LLVOCache::removeEntry(HeaderEntryInfo* entry) +{ + llassert_always(mInitialized) ; + if(mReadOnly) + { + return ; + } + if(!entry) + { + return ; + } + + header_entry_queue_t::iterator iter = mHeaderEntryQueue.find(entry) ; + if(iter != mHeaderEntryQueue.end()) + { + removeFromCache(entry->mHandle) ; + mHandleEntryMap.erase(entry->mHandle) ; + mHeaderEntryQueue.erase(iter) ; + delete entry ; + + writeCacheHeader() ; + readCacheHeader() ; + mNumEntries = mHandleEntryMap.size() ; + } +} + +void LLVOCache::removeEntry(U64 handle) +{ + handle_entry_map_t::iterator iter = mHandleEntryMap.find(handle) ; + if(iter == mHandleEntryMap.end()) //no cache + { + return ; + } + HeaderEntryInfo* entry = iter->second ; + removeEntry(entry) ; +} + void LLVOCache::clearCacheInMemory() { if(!mHeaderEntryQueue.empty()) @@ -388,30 +429,6 @@ void LLVOCache::removeFromCache(U64 handle) LLAPRFile::remove(filename, mLocalAPRFilePoolp); } -BOOL LLVOCache::checkRead(LLAPRFile* apr_file, void* src, S32 n_bytes) -{ - if(!check_read(apr_file, src, n_bytes)) - { - delete apr_file ; - removeCache() ; - return FALSE ; - } - - return TRUE ; -} - -BOOL LLVOCache::checkWrite(LLAPRFile* apr_file, void* src, S32 n_bytes) -{ - if(!check_write(apr_file, src, n_bytes)) - { - delete apr_file ; - removeCache() ; - return FALSE ; - } - - return TRUE ; -} - void LLVOCache::readCacheHeader() { if(!mEnabled) @@ -422,43 +439,45 @@ void LLVOCache::readCacheHeader() //clear stale info. clearCacheInMemory(); + bool success = true ; if (LLAPRFile::isExist(mHeaderFileName, mLocalAPRFilePoolp)) { - LLAPRFile* apr_file = new LLAPRFile(mHeaderFileName, APR_READ|APR_BINARY, mLocalAPRFilePoolp); + LLAPRFile apr_file(mHeaderFileName, APR_READ|APR_BINARY, mLocalAPRFilePoolp); //read the meta element - if(!checkRead(apr_file, &mMetaInfo, sizeof(HeaderMetaInfo))) - { - return ; - } - - HeaderEntryInfo* entry ; - mNumEntries = 0 ; - while(mNumEntries < MAX_NUM_OBJECT_ENTRIES) + success = check_read(&apr_file, &mMetaInfo, sizeof(HeaderMetaInfo)) ; + + if(success) { - entry = new HeaderEntryInfo() ; - if(!checkRead(apr_file, entry, sizeof(HeaderEntryInfo))) - { - delete entry ; - return ; - } - else if(!entry->mTime) //end of the cache. + HeaderEntryInfo* entry ; + mNumEntries = 0 ; + while(mNumEntries < MAX_NUM_OBJECT_ENTRIES) { - delete entry ; - return ; + entry = new HeaderEntryInfo() ; + success = check_read(&apr_file, entry, sizeof(HeaderEntryInfo)); + + if(!success || !entry->mTime) //failed or end of the cache + { + delete entry ; + break ; + } + + entry->mIndex = mNumEntries++ ; + mHeaderEntryQueue.insert(entry) ; + mHandleEntryMap[entry->mHandle] = entry ; } - - entry->mIndex = mNumEntries++ ; - mHeaderEntryQueue.insert(entry) ; - mHandleEntryMap[entry->mHandle] = entry ; } - - delete apr_file ; } else { writeCacheHeader() ; } + + if(!success) + { + removeCache() ; //failed to read header, clear the cache + } + return ; } void LLVOCache::writeCacheHeader() @@ -468,48 +487,47 @@ void LLVOCache::writeCacheHeader() return ; } - LLAPRFile* apr_file = new LLAPRFile(mHeaderFileName, APR_CREATE|APR_WRITE|APR_BINARY, mLocalAPRFilePoolp); - - //write the meta element - if(!checkWrite(apr_file, &mMetaInfo, sizeof(HeaderMetaInfo))) + bool success = true ; { - return ; - } + LLAPRFile apr_file(mHeaderFileName, APR_CREATE|APR_WRITE|APR_BINARY, mLocalAPRFilePoolp); - mNumEntries = 0 ; - for(header_entry_queue_t::iterator iter = mHeaderEntryQueue.begin() ; iter != mHeaderEntryQueue.end(); ++iter) - { - (*iter)->mIndex = mNumEntries++ ; - if(!checkWrite(apr_file, (void*)*iter, sizeof(HeaderEntryInfo))) + //write the meta element + success = check_write(&apr_file, &mMetaInfo, sizeof(HeaderMetaInfo)) ; + + mNumEntries = 0 ; + for(header_entry_queue_t::iterator iter = mHeaderEntryQueue.begin() ; success && iter != mHeaderEntryQueue.end(); ++iter) { - return ; + (*iter)->mIndex = mNumEntries++ ; + success = check_write(&apr_file, (void*)*iter, sizeof(HeaderEntryInfo)); } - } - - mNumEntries = mHeaderEntryQueue.size() ; - if(mNumEntries < MAX_NUM_OBJECT_ENTRIES) - { - HeaderEntryInfo* entry = new HeaderEntryInfo() ; - for(S32 i = mNumEntries ; i < MAX_NUM_OBJECT_ENTRIES ; i++) + + mNumEntries = mHeaderEntryQueue.size() ; + if(success && mNumEntries < MAX_NUM_OBJECT_ENTRIES) { - //fill the cache with the default entry. - if(!checkWrite(apr_file, entry, sizeof(HeaderEntryInfo))) + HeaderEntryInfo* entry = new HeaderEntryInfo() ; + for(S32 i = mNumEntries ; success && i < MAX_NUM_OBJECT_ENTRIES ; i++) { - mReadOnly = TRUE ; //disable the cache. - return ; + //fill the cache with the default entry. + success = check_write(&apr_file, entry, sizeof(HeaderEntryInfo)) ; } + delete entry ; } - delete entry ; } - delete apr_file ; + + if(!success) + { + clearCacheInMemory() ; + mReadOnly = TRUE ; //disable the cache. + } + return ; } BOOL LLVOCache::updateEntry(const HeaderEntryInfo* entry) { - LLAPRFile* apr_file = new LLAPRFile(mHeaderFileName, APR_WRITE|APR_BINARY, mLocalAPRFilePoolp); - apr_file->seek(APR_SET, entry->mIndex * sizeof(HeaderEntryInfo) + sizeof(HeaderMetaInfo)) ; + LLAPRFile apr_file(mHeaderFileName, APR_WRITE|APR_BINARY, mLocalAPRFilePoolp); + apr_file.seek(APR_SET, entry->mIndex * sizeof(HeaderEntryInfo) + sizeof(HeaderMetaInfo)) ; - return checkWrite(apr_file, (void*)entry, sizeof(HeaderEntryInfo)) ; + return check_write(&apr_file, (void*)entry, sizeof(HeaderEntryInfo)) ; } void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) @@ -526,43 +544,51 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca return ; } - std::string filename; - getObjectCacheFilename(handle, filename); - LLAPRFile* apr_file = new LLAPRFile(filename, APR_READ|APR_BINARY, mLocalAPRFilePoolp); - - LLUUID cache_id ; - if(!checkRead(apr_file, cache_id.mData, UUID_BYTES)) - { - return ; - } - if(cache_id != id) + bool success = true ; { - llinfos << "Cache ID doesn't match for this region, discarding"<< llendl; - - delete apr_file ; - return ; - } + std::string filename; + getObjectCacheFilename(handle, filename); + LLAPRFile apr_file(filename, APR_READ|APR_BINARY, mLocalAPRFilePoolp); + + LLUUID cache_id ; + success = check_read(&apr_file, cache_id.mData, UUID_BYTES) ; + + if(success) + { + if(cache_id != id) + { + llinfos << "Cache ID doesn't match for this region, discarding"<< llendl; + success = false ; + } - S32 num_entries; - if(!checkRead(apr_file, &num_entries, sizeof(S32))) - { - return ; + if(success) + { + S32 num_entries; + success = check_read(&apr_file, &num_entries, sizeof(S32)) ; + + for (S32 i = 0; success && i < num_entries; i++) + { + LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file); + if (!entry->getLocalID()) + { + llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl; + delete entry ; + success = false ; + } + cache_entry_map[entry->getLocalID()] = entry; + } + } + } } - for (S32 i = 0; i < num_entries; i++) + if(!success) { - LLVOCacheEntry* entry = new LLVOCacheEntry(apr_file); - if (!entry->getLocalID()) + if(cache_entry_map.empty()) { - llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl; - delete entry ; - break; + removeEntry(iter->second) ; } - cache_entry_map[entry->getLocalID()] = entry; } - num_entries = cache_entry_map.size() ; - delete apr_file ; return ; } @@ -636,33 +662,31 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: } //write to cache file - std::string filename; - getObjectCacheFilename(handle, filename); - LLAPRFile* apr_file = new LLAPRFile(filename, APR_CREATE|APR_WRITE|APR_BINARY, mLocalAPRFilePoolp); - - if(!checkWrite(apr_file, (void*)id.mData, UUID_BYTES)) - { - return ; - } - - S32 num_entries = cache_entry_map.size() ; - if(!checkWrite(apr_file, &num_entries, sizeof(S32))) + bool success = true ; { - return ; + std::string filename; + getObjectCacheFilename(handle, filename); + LLAPRFile apr_file(filename, APR_CREATE|APR_WRITE|APR_BINARY, mLocalAPRFilePoolp); + + success = check_write(&apr_file, (void*)id.mData, UUID_BYTES) ; + + if(success) + { + S32 num_entries = cache_entry_map.size() ; + success = check_write(&apr_file, &num_entries, sizeof(S32)); + + for (LLVOCacheEntry::vocache_entry_map_t::const_iterator iter = cache_entry_map.begin(); success && iter != cache_entry_map.end(); ++iter) + { + success = iter->second->writeToFile(&apr_file) ; + } + } } - for (LLVOCacheEntry::vocache_entry_map_t::const_iterator iter = cache_entry_map.begin(); iter != cache_entry_map.end(); ++iter) + if(!success) { - if(!iter->second->writeToFile(apr_file)) - { - //failed - delete apr_file ; - removeCache() ; - return ; - } + removeEntry(entry) ; } - delete apr_file ; return ; } diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index ed2bc8bafe..6453886bc5 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -111,6 +111,7 @@ public: void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ; void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache) ; + void removeEntry(U64 handle) ; void setReadOnly(BOOL read_only) {mReadOnly = read_only;} @@ -123,10 +124,9 @@ private: void writeCacheHeader(); void clearCacheInMemory(); void removeCache() ; + void removeEntry(HeaderEntryInfo* entry) ; void purgeEntries(); BOOL updateEntry(const HeaderEntryInfo* entry); - BOOL checkRead(LLAPRFile* apr_file, void* src, S32 n_bytes) ; - BOOL checkWrite(LLAPRFile* apr_file, void* src, S32 n_bytes) ; private: BOOL mEnabled; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 761e12020b..858e0321e1 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -388,10 +388,12 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, // There's something bogus in the data that we're unpacking. dp->dumpBufferToLog(); llwarns << "Flushing cache files" << llendl; - std::string mask; - mask = gDirUtilp->getDirDelimiter() + "*.slc"; - gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), mask); -// llerrs << "Bogus TE data in " << getID() << ", crashing!" << llendl; + + if(LLVOCache::hasInstance() && getRegion()) + { + LLVOCache::getInstance()->removeEntry(getRegion()->getHandle()) ; + } + llwarns << "Bogus TE data in " << getID() << llendl; } else -- cgit v1.2.3 From ac71884a446170a32ec557d5e9f85d0a73e8fa23 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 15 Dec 2010 17:34:18 -0700 Subject: fix for SH-446: viewer crashed after clearing cache and relogging --- indra/newview/llvocache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index bbe637d161..cb48d1db73 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -291,6 +291,7 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version) { return ; } + mInitialized = TRUE ; setDirNames(location); if (!mReadOnly) @@ -301,8 +302,7 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version) MAX_NUM_OBJECT_ENTRIES, NUM_ENTRIES_TO_PURGE); mMetaInfo.mVersion = cache_version; - readCacheHeader(); - mInitialized = TRUE ; + readCacheHeader(); if(mMetaInfo.mVersion != cache_version) { -- cgit v1.2.3 From f137dc0c2f928b81a90e59c58adefeb56f21393e Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 16 Dec 2010 17:13:07 -0700 Subject: fix for SH-445: debug settings -> "CacheNumberOfRegionsForObjects" does not limit the number of object cache files --- indra/newview/llvocache.cpp | 86 +++++++++++++++++++++++++++++---------------- indra/newview/llvocache.h | 9 +++-- 2 files changed, 62 insertions(+), 33 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index cb48d1db73..b53f5c7a20 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -225,7 +225,8 @@ BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const static const char OBJECT_CACHE_FILENAME[] = "objects_%d_%d.slc"; const U32 MAX_NUM_OBJECT_ENTRIES = 128 ; -const U32 NUM_ENTRIES_TO_PURGE = 16 ; +const U32 MIN_ENTRIES_TO_PURGE = 16 ; +const U32 INVALID_TIME = 0 ; const char* object_cache_dirname = "objectcache"; const char* header_filename = "object.cache"; @@ -298,8 +299,7 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version) { LLFile::mkdir(mObjectCacheDirName); } - mCacheSize = llclamp(size, - MAX_NUM_OBJECT_ENTRIES, NUM_ENTRIES_TO_PURGE); + mCacheSize = llclamp(size, MIN_ENTRIES_TO_PURGE, MAX_NUM_OBJECT_ENTRIES); mMetaInfo.mVersion = cache_version; readCacheHeader(); @@ -369,14 +369,12 @@ void LLVOCache::removeEntry(HeaderEntryInfo* entry) header_entry_queue_t::iterator iter = mHeaderEntryQueue.find(entry) ; if(iter != mHeaderEntryQueue.end()) - { - removeFromCache(entry->mHandle) ; + { mHandleEntryMap.erase(entry->mHandle) ; mHeaderEntryQueue.erase(iter) ; + removeFromCache(entry) ; delete entry ; - writeCacheHeader() ; - readCacheHeader() ; mNumEntries = mHandleEntryMap.size() ; } } @@ -417,7 +415,7 @@ void LLVOCache::getObjectCacheFilename(U64 handle, std::string& filename) return ; } -void LLVOCache::removeFromCache(U64 handle) +void LLVOCache::removeFromCache(HeaderEntryInfo* entry) { if(mReadOnly) { @@ -425,8 +423,11 @@ void LLVOCache::removeFromCache(U64 handle) } std::string filename; - getObjectCacheFilename(handle, filename); - LLAPRFile::remove(filename, mLocalAPRFilePoolp); + getObjectCacheFilename(entry->mHandle, filename); + LLAPRFile::remove(filename, mLocalAPRFilePoolp); + + entry->mTime = INVALID_TIME ; + updateEntry(entry) ; //update the head file. } void LLVOCache::readCacheHeader() @@ -449,24 +450,49 @@ void LLVOCache::readCacheHeader() if(success) { - HeaderEntryInfo* entry ; + HeaderEntryInfo* entry = NULL ; mNumEntries = 0 ; - while(mNumEntries < MAX_NUM_OBJECT_ENTRIES) + U32 num_read = 0 ; + while(num_read++ < MAX_NUM_OBJECT_ENTRIES) { - entry = new HeaderEntryInfo() ; + if(!entry) + { + entry = new HeaderEntryInfo() ; + } success = check_read(&apr_file, entry, sizeof(HeaderEntryInfo)); - - if(!success || !entry->mTime) //failed or end of the cache + + if(!success) //failed { - delete entry ; + delete entry ; + entry = NULL ; break ; - } + } + else if(entry->mTime == INVALID_TIME) + { + continue ; //an empty entry + } entry->mIndex = mNumEntries++ ; mHeaderEntryQueue.insert(entry) ; mHandleEntryMap[entry->mHandle] = entry ; + entry = NULL ; + } + if(entry) + { + delete entry ; } } + + //--------- + //debug code + //---------- + //std::string name ; + //for(header_entry_queue_t::iterator iter = mHeaderEntryQueue.begin() ; success && iter != mHeaderEntryQueue.end(); ++iter) + //{ + // getObjectCacheFilename((*iter)->mHandle, name) ; + // llinfos << name << llendl ; + //} + //----------- } else { @@ -505,6 +531,7 @@ void LLVOCache::writeCacheHeader() if(success && mNumEntries < MAX_NUM_OBJECT_ENTRIES) { HeaderEntryInfo* entry = new HeaderEntryInfo() ; + entry->mTime = INVALID_TIME ; for(S32 i = mNumEntries ; success && i < MAX_NUM_OBJECT_ENTRIES ; i++) { //fill the cache with the default entry. @@ -594,20 +621,17 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca void LLVOCache::purgeEntries() { - U32 limit = mCacheSize - NUM_ENTRIES_TO_PURGE ; - while(mHeaderEntryQueue.size() > limit) + while(mHeaderEntryQueue.size() >= mCacheSize) { header_entry_queue_t::iterator iter = mHeaderEntryQueue.begin() ; HeaderEntryInfo* entry = *iter ; - - removeFromCache(entry->mHandle) ; + mHandleEntryMap.erase(entry->mHandle) ; mHeaderEntryQueue.erase(iter) ; + removeFromCache(entry) ; delete entry ; } - writeCacheHeader() ; - readCacheHeader() ; mNumEntries = mHandleEntryMap.size() ; } @@ -623,16 +647,15 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: { return ; } + if(mNumEntries >= mCacheSize) + { + purgeEntries() ; + } HeaderEntryInfo* entry; handle_entry_map_t::iterator iter = mHandleEntryMap.find(handle) ; if(iter == mHandleEntryMap.end()) //new entry - { - if(mNumEntries >= mCacheSize) - { - purgeEntries() ; - } - + { entry = new HeaderEntryInfo(); entry->mHandle = handle ; entry->mTime = time(NULL) ; @@ -642,11 +665,12 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: } else { - entry = iter->second ; - entry->mTime = time(NULL) ; + entry = iter->second ; //resort mHeaderEntryQueue.erase(entry) ; + + entry->mTime = time(NULL) ; mHeaderEntryQueue.insert(entry) ; } diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 6453886bc5..1070fcaae9 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -95,7 +95,12 @@ private: { bool operator()(const HeaderEntryInfo* lhs, const HeaderEntryInfo* rhs) const { - return lhs->mTime < rhs->mTime; // older entry in front of queue (set) + if(lhs->mTime == rhs->mTime) + { + return lhs < rhs ; + } + + return lhs->mTime < rhs->mTime ; // older entry in front of queue (set) } }; typedef std::set header_entry_queue_t; @@ -119,7 +124,7 @@ private: void setDirNames(ELLPath location); // determine the cache filename for the region from the region handle void getObjectCacheFilename(U64 handle, std::string& filename); - void removeFromCache(U64 handle); + void removeFromCache(HeaderEntryInfo* entry); void readCacheHeader(); void writeCacheHeader(); void clearCacheInMemory(); -- cgit v1.2.3 From ba1266043f36fd0a576fe888120bbb3f7b7dc2f3 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 7 Jan 2011 15:04:36 -0700 Subject: trivial: for VWR-22353: remove debug code for EXT-6791. --- indra/newview/lldynamictexture.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index a3d2941114..f781d5f3ff 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -177,10 +177,6 @@ void LLViewerDynamicTexture::postRender(BOOL success) generateGLTexture() ; } - if(gGLManager.mDebugGPU) - { - LLGLState::dumpStates() ; - } success = mGLTexturep->setSubImageFromFrameBuffer(0, 0, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight); } } @@ -220,12 +216,6 @@ BOOL LLViewerDynamicTexture::updateAllInstances() LLViewerDynamicTexture *dynamicTexture = *iter; if (dynamicTexture->needsRender()) { - if(gGLManager.mDebugGPU) - { - llinfos << "class type: " << (S32)dynamicTexture->getType() << llendl; - LLGLState::dumpStates() ; - } - glClear(GL_DEPTH_BUFFER_BIT); gDepthDirty = TRUE; -- cgit v1.2.3 From e3e1d9b4c3446ea87d1938d1cb0c4a5a9e5d448d Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 11 Jan 2011 18:55:22 +0200 Subject: STORM-715 FIXED Don't expand default ("Clothing") accordion tab when docking/undocking the Appearance SP. There is a side effect: we don't reset the accordion when switching between sidepanels anymore. But I guess it's ok because other sidepanels (People, Me) don't reset their state either (e.g. if you open a group profile, then switch to My Inventory, then back to People, the group profile will still be opened). --- indra/newview/llsidepanelappearance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index b316171604..363fe5f12b 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -185,7 +185,7 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility) { LLSD visibility; visibility["visible"] = new_visibility.asBoolean(); - visibility["reset_accordion"] = true; + visibility["reset_accordion"] = false; updateToVisibility(visibility); } -- cgit v1.2.3 From 3703f0bb0d7cd20c801d88cb77632c239010d26b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 12 Jan 2011 08:24:38 -0500 Subject: STORM-844 "More" should be "Less" when Media Control is open --- indra/newview/skins/default/xui/en/panel_nearby_media.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index 8c13ced8f3..aac3608e13 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -69,7 +69,7 @@ width="66" height="22" label="More >>" - label_selected="Less <<"> + label_selected="More >>"> @@ -81,8 +81,8 @@ right="-8" width="66" height="22" - label="More >>" - label_selected="Less <<"> + label="<< Less" + label_selected="<< Less"> -- cgit v1.2.3 From ad555098bf599bbb9bdb4db945baef56674c0f2d Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 13 Jan 2011 16:52:25 +0200 Subject: STORM-832 FIXED Two Roles are selected after made changes in one - Clear selection from role that was changed --- indra/newview/llpanelgrouproles.cpp | 21 ++++++++++++++++----- indra/newview/llpanelgrouproles.h | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index d1362d7922..3dbc637318 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1843,7 +1843,8 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg) { lldebugs << "LLPanelGroupRolesSubTab::apply()" << llendl; - saveRoleChanges(); + saveRoleChanges(true); + LLGroupMgr::getInstance()->sendGroupRoleChanges(mGroupID); notifyObservers(); @@ -2022,7 +2023,7 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() return; } - saveRoleChanges(); + saveRoleChanges(false); // Check if there is anything selected. LLScrollListItem* item = mRolesList->getFirstSelected(); @@ -2385,7 +2386,7 @@ void LLPanelGroupRolesSubTab::handleDeleteRole() notifyObservers(); } -void LLPanelGroupRolesSubTab::saveRoleChanges() +void LLPanelGroupRolesSubTab::saveRoleChanges(bool select_saved_role) { LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); @@ -2400,13 +2401,23 @@ void LLPanelGroupRolesSubTab::saveRoleChanges() rd.mRoleDescription = mRoleDescription->getText(); rd.mRoleTitle = mRoleTitle->getText(); + S32 role_members_count = 0; + if (mSelectedRole.isNull()) + { + role_members_count = gdatap->mMemberCount; + } + else if(LLGroupRoleData* grd = get_ptr_in_map(gdatap->mRoles, mSelectedRole)) + { + role_members_count = grd->getTotalMembersInRole(); + } + gdatap->setRoleData(mSelectedRole,rd); mRolesList->deleteSingleItem(mRolesList->getItemIndex(mSelectedRole)); - LLSD row = createRoleItem(mSelectedRole,rd.mRoleName,rd.mRoleTitle,0); + LLSD row = createRoleItem(mSelectedRole,rd.mRoleName,rd.mRoleTitle,role_members_count); LLScrollListItem* item = mRolesList->addElement(row, ADD_BOTTOM, this); - item->setSelected(TRUE); + item->setSelected(select_saved_role); mHasRoleChange = FALSE; } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 270259c16f..a55e264150 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -257,7 +257,7 @@ public: static void onDeleteRole(void*); void handleDeleteRole(); - void saveRoleChanges(); + void saveRoleChanges(bool select_saved_role); virtual void setGroupID(const LLUUID& id); protected: -- cgit v1.2.3 From 8864a1b4db54b1ae5b335dec6372ee763b05ece9 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Fri, 14 Jan 2011 18:10:46 +0200 Subject: STORM-834 FIXED Color picker remains opened after 'Undo changes' button was pressed on 'Edit weareble' panel - Close color picker after color swatch's value updated --- indra/newview/llcolorswatch.cpp | 2 +- indra/newview/llcolorswatch.h | 2 +- indra/newview/llpaneleditwearable.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index 4a1ba6f1b5..6f02192d0a 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -319,7 +319,7 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op ) // This is called when the main floatercustomize panel is closed. // Since this class has pointers up to its parents, we need to cleanup // this class first in order to avoid a crash. -void LLColorSwatchCtrl::onParentFloaterClosed() +void LLColorSwatchCtrl::closeFloaterColorPicker() { LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); if (pickerp) diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index cd859ea128..5bdd1712d2 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -100,7 +100,7 @@ public: /*virtual*/ void setEnabled( BOOL enabled ); static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE ); - void onParentFloaterClosed(); + void closeFloaterColorPicker(); protected: BOOL mValid; diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 90ed8b9e58..4a74b7925c 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -569,6 +569,7 @@ static void update_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, if (color_swatch_ctrl) { color_swatch_ctrl->set(self->getWearable()->getClothesColor(entry->mTextureIndex)); + color_swatch_ctrl->closeFloaterColorPicker(); } } -- cgit v1.2.3 From 8e4d6bb1acca21069b4038a2cdf56e18196d6cb2 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 14 Jan 2011 12:59:42 -0800 Subject: fix CHOP-366, on temporary errors (e.g. version manager returns other than 200) show error dialog instructing the user to manually install the latest viewer. --- indra/newview/lllogininstance.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index d866db1829..efb2e9c0fd 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -214,6 +214,9 @@ void MandatoryUpdateMachine::start(void) case LLUpdaterService::CHECKING_FOR_UPDATE: setCurrentState(new CheckingForUpdate(*this)); break; + case LLUpdaterService::TEMPORARY_ERROR: + setCurrentState(new Error(*this)); + break; case LLUpdaterService::DOWNLOADING: setCurrentState(new WaitingForDownload(*this)); break; @@ -289,6 +292,7 @@ bool MandatoryUpdateMachine::CheckingForUpdate::onEvent(LLSD const & event) case LLUpdaterService::DOWNLOADING: mMachine.setCurrentState(new WaitingForDownload(mMachine)); break; + case LLUpdaterService::TEMPORARY_ERROR: case LLUpdaterService::UP_TO_DATE: case LLUpdaterService::TERMINAL: case LLUpdaterService::FAILURE: @@ -324,7 +328,7 @@ MandatoryUpdateMachine::Error::Error(MandatoryUpdateMachine & machine): void MandatoryUpdateMachine::Error::enter(void) { llinfos << "entering error" << llendl; - LLNotificationsUtil::add("FailedUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2)); + LLNotificationsUtil::add("FailedRequiredUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2)); } -- cgit v1.2.3 From c5d8624ba4fb303ad534a0bb9258c89cafe77303 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sat, 15 Jan 2011 09:09:41 -0500 Subject: renamed temp name flag member in name cache to avoid confusion with similar names in other classes --- indra/newview/llimview.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ce305dcd89..9623554200 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -279,20 +279,20 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name) { - if (av_name.mIsDummy) - { - S32 separator_index = mName.rfind(" "); - std::string name = mName.substr(0, separator_index); - ++separator_index; - std::string conference_word = mName.substr(separator_index, mName.length()); - - // additional check that session name is what we expected - if ("Conference" == conference_word) - { - LLStringUtil::format_map_t args; - args["[AGENT_NAME]"] = name; - LLTrans::findString(mName, "conference-title-incoming", args); - } + if (av_name.mIsTemporaryName) + { + S32 separator_index = mName.rfind(" "); + std::string name = mName.substr(0, separator_index); + ++separator_index; + std::string conference_word = mName.substr(separator_index, mName.length()); + + // additional check that session name is what we expected + if ("Conference" == conference_word) + { + LLStringUtil::format_map_t args; + args["[AGENT_NAME]"] = name; + LLTrans::findString(mName, "conference-title-incoming", args); + } } else { -- cgit v1.2.3 From 6a3d06deca73683514d4668f78adf684d760708c Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sun, 16 Jan 2011 12:10:44 -0500 Subject: STORM-844 Better way of doing "More" should be "Less" when Media Control is open thanks to Twisted Laws --- indra/newview/llpanelnearbymedia.cpp | 5 ++--- .../newview/skins/default/xui/en/panel_nearby_media.xml | 16 ++-------------- 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index fcc67d6840..14e39f2c48 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -958,7 +958,7 @@ void LLPanelNearByMedia::onAdvancedButtonClick() void LLPanelNearByMedia::onMoreLess() { - bool is_more = getChild("more_btn")->getVisible(); + bool is_more = getChild("more_btn")->getToggleState(); mNearbyMediaPanel->setVisible(is_more); // enable resizing when expanded @@ -969,8 +969,7 @@ void LLPanelNearByMedia::onMoreLess() setShape(new_rect); - getChild("more_btn")->setVisible(!is_more); - getChild("less_btn")->setVisible(is_more); + getChild("more_btn")->setVisible(true); } void LLPanelNearByMedia::updateControls() diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index aac3608e13..9bd60b935f 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -68,24 +68,12 @@ right="-8" width="66" height="22" + is_toggle="true" label="More >>" - label_selected="More >>"> + label_selected="<< Less"> - Date: Sun, 16 Jan 2011 21:41:08 -0500 Subject: DN-202: Make avatar name caching more aggressive and error handling more uniform Add logging (mostly at DEBUG level) --- indra/newview/llappviewer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3a98c23e05..e92042bcd4 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3734,6 +3734,7 @@ void LLAppViewer::loadNameCache() // display names cache std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); + LL_INFOS("AvNameCache") << filename << LL_ENDL; llifstream name_cache_stream(filename); if(name_cache_stream.is_open()) { -- cgit v1.2.3 From 1ae76ea43e3ad57ce58e1b432490de531e01dab3 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Mon, 17 Jan 2011 18:01:55 +0200 Subject: STORM-484 FIXED The long name is not truncated in Build tools - Decreased height of text box containing name - Enabled ellipses for these text boxes --- indra/newview/skins/default/xui/en/floater_tools.xml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index e70e1eb61b..1808fea445 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -872,12 +872,13 @@ length="1" follows="left|top" left_pad="0" - height="30" + height="20" layout="topleft" name="Creator Name" top_delta="0" width="190" - word_wrap="true"> + word_wrap="true" + use_ellipses="ture"> Mrs. Esbee Linden (esbee.linden) Owner: @@ -897,13 +898,14 @@ type="string" length="1" follows="left|top" - height="30" + height="20" layout="topleft" name="Owner Name" left_pad="0" top_delta="0" width="190" - word_wrap="true"> + word_wrap="true" + use_ellipses="true"> Mrs. Erica "Moose" Linden (erica.linden) Group: -- cgit v1.2.3 From 7461f1ca2be2851b76ded50d2eb9c0fcc46cfd5f Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Mon, 17 Jan 2011 19:03:49 +0200 Subject: STORM-383 FIXED Added "Restore Item" context menu entry for landmarks and folders in Trash category in Places->My Landmarks->My Inventory accordion tab. --- indra/newview/llpanellandmarks.cpp | 85 ++++++++++++++++++++++ indra/newview/llpanellandmarks.h | 8 ++ .../default/xui/en/menu_places_gear_folder.xml | 8 ++ .../default/xui/en/menu_places_gear_landmark.xml | 8 ++ 4 files changed, 109 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index e8c8273a9d..80f6862169 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -71,6 +71,7 @@ static void collapse_all_folders(LLFolderView* root_folder); static void expand_all_folders(LLFolderView* root_folder); static bool has_expanded_folders(LLFolderView* root_folder); static bool has_collapsed_folders(LLFolderView* root_folder); +static void toggle_restore_menu(LLMenuGL* menu, BOOL visible, BOOL enabled); /** * Functor counting expanded and collapsed folders in folder view tree to know @@ -708,6 +709,9 @@ void LLLandmarksPanel::initListCommandsHandlers() mGearFolderMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_places_gear_folder.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile("menu_place_add_button.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mGearLandmarkMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2)); + mGearFolderMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2)); + mListCommands->childSetAction(ADD_BUTTON_NAME, boost::bind(&LLLandmarksPanel::showActionMenu, this, mMenuAdd, ADD_BUTTON_NAME)); } @@ -1079,6 +1083,60 @@ void LLLandmarksPanel::onCustomAction(const LLSD& userdata) { doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doCreatePick, this, _1)); } + else if ("restore" == command_name && mCurrentSelectedList) + { + mCurrentSelectedList->doToSelected(userdata); + } +} + +void LLLandmarksPanel::onMenuVisibilityChange(LLUICtrl* ctrl, const LLSD& param) +{ + bool new_visibility = param["visibility"].asBoolean(); + + // We don't have to update items visibility if the menu is hiding. + if (!new_visibility) return; + + BOOL are_any_items_in_trash = FALSE; + BOOL are_all_items_in_trash = TRUE; + + LLFolderView* root_folder_view = mCurrentSelectedList ? mCurrentSelectedList->getRootFolder() : NULL; + if(root_folder_view) + { + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + + std::set selected_uuids = root_folder_view->getSelectionList(); + + // Iterate through selected items to find out if any of these items are in Trash + // or all the items are in Trash category. + for (std::set::const_iterator iter = selected_uuids.begin(); iter != selected_uuids.end(); ++iter) + { + LLFolderViewItem* item = root_folder_view->getItemByID(*iter); + + // If no item is found it might be a folder id. + if (!item) + { + item = root_folder_view->getFolderByID(*iter); + } + if (!item) continue; + + LLFolderViewEventListener* listenerp = item->getListener(); + if(!listenerp) continue; + + // Trash category itself should not be included because it can't be + // actually restored from trash. + are_all_items_in_trash &= listenerp->isItemInTrash() && *iter != trash_id; + + // If there are any selected items in Trash including the Trash category itself + // we show "Restore Item" in context menu and hide other irrelevant items. + are_any_items_in_trash |= listenerp->isItemInTrash(); + } + } + + // Display "Restore Item" menu entry if at least one of the selected items + // is in Trash or the Trash category itself is among selected items. + // Hide other menu entries in this case. + // Enable this menu entry only if all selected items are in the Trash category. + toggle_restore_menu((LLMenuGL*)ctrl, are_any_items_in_trash, are_all_items_in_trash); } /* @@ -1414,4 +1472,31 @@ static bool has_collapsed_folders(LLFolderView* root_folder) return true; } + +// Displays "Restore Item" context menu entry while hiding +// all other entries or vice versa. +// Sets "Restore Item" enabled state. +void toggle_restore_menu(LLMenuGL *menu, BOOL visible, BOOL enabled) +{ + if (!menu) return; + + const LLView::child_list_t *list = menu->getChildList(); + for (LLView::child_list_t::const_iterator itor = list->begin(); + itor != list->end(); + ++itor) + { + LLView *menu_item = (*itor); + std::string name = menu_item->getName(); + + if ("restore_item" == name) + { + menu_item->setVisible(visible); + menu_item->setEnabled(enabled); + } + else + { + menu_item->setVisible(!visible); + } + } +} // EOF diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 8dcbca0440..b2f4e92473 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -128,6 +128,14 @@ private: bool isActionEnabled(const LLSD& command_name) const; void onCustomAction(const LLSD& command_name); + /** + * Updates context menu depending on the selected items location. + * + * For items in Trash category the menu includes the "Restore Item" + * context menu entry. + */ + void onMenuVisibilityChange(LLUICtrl* ctrl, const LLSD& param); + /** * Determines if an item can be modified via context/gear menu. * diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml index 6f46165883..1aeb166e01 100644 --- a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml +++ b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml @@ -25,6 +25,14 @@ function="Places.LandmarksGear.Enable" parameter="category" /> + + + + + + Date: Tue, 18 Jan 2011 18:46:35 +0200 Subject: STORM-243 FIXED Disabled the "You just entered a region using a different server version..." pop-up notification. --- indra/newview/app_settings/settings.xml | 11 ----- indra/newview/llviewermessage.cpp | 50 ---------------------- .../newview/skins/default/xui/da/notifications.xml | 3 -- .../newview/skins/default/xui/de/notifications.xml | 3 -- .../newview/skins/default/xui/en/notifications.xml | 9 ---- .../newview/skins/default/xui/es/notifications.xml | 3 -- .../newview/skins/default/xui/fr/notifications.xml | 3 -- .../newview/skins/default/xui/it/notifications.xml | 3 -- .../newview/skins/default/xui/ja/notifications.xml | 3 -- .../newview/skins/default/xui/nl/notifications.xml | 3 -- .../newview/skins/default/xui/pl/notifications.xml | 3 -- .../newview/skins/default/xui/pt/notifications.xml | 3 -- 12 files changed, 97 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ef6f8fd3ee..a22f197b85 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12445,16 +12445,5 @@ Value name - ReleaseNotesURL - - Comment - Release notes URL template - Persist - 1 - Type - String - Value - http://secondlife.com/app/releasenotes/?channel=[CHANNEL]&version=[VERSION] - diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7dc5d96689..6fc85a3944 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -171,31 +171,6 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = FALSE // ControlYourCamera }; -// Extract channel and version from a string like "SL Web Viewer Beta 10.11.29.215604". -// (channel: "SL Web Viewer Beta", version: "10.11.29.215604") -static bool parse_version_info(const std::string& version_info, std::string& channel, std::string& ver) -{ - size_t last_space = version_info.rfind(" "); - channel = version_info; - - if (last_space != std::string::npos) - { - try - { - ver = version_info.substr(last_space + 1); - channel.replace(last_space, ver.length() + 1, ""); // strip version - } - catch (std::out_of_range) - { - return false; - } - - return true; - } - - return false; -} - bool friendship_offer_callback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -3848,31 +3823,6 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) return; } - if (!gLastVersionChannel.empty()) - { - std::string url = regionp->getCapability("ServerReleaseNotes"); - if (url.empty()) - { - // The capability hasn't arrived yet or is not supported, - // fall back to parsing server version channel. - std::string channel, ver; - if (!parse_version_info(version_channel, channel, ver)) - { - llwarns << "Failed to parse server version channel (" << version_channel << ")" << llendl; - } - - url = gSavedSettings.getString("ReleaseNotesURL"); - LLSD args; - args["CHANNEL"] = LLWeb::escapeURL(channel); - args["VERSION"] = LLWeb::escapeURL(ver); - LLStringUtil::format(url, args); - } - - LLSD args; - args["URL"] = url; - LLNotificationsUtil::add("ServerVersionChanged", args); - } - gLastVersionChannel = version_channel; } diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 593e686d4c..27024f4eaa 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -1580,9 +1580,6 @@ Klik på Acceptér for at deltage eller Afvis for at afvise invitationen. Klik p En fejl er opstået under forsøget på at koble sig på stemme chatten [VOICE_CHANNEL_NAME]. Pråv venligst senere. - - Du er netop ankommet til en region der benytter en anden server version, hvilket kan influere på hastigheden. [[URL] For at se yderligere.] - Den SLurl du klikkede på understøttes ikke. diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index a2d0b5a170..c26b02ec8f 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -2691,9 +2691,6 @@ Klicken Sie auf 'Akzeptieren ', um dem Chat beizutreten, oder auf &a Fehler beim Versuch, eine Voice-Chat-Verbindung zu [VOICE_CHANNEL_NAME] herzustellen. Bitte versuchen Sie es erneut. - - Sie haben eine Region betreten, die eine andere Server-Version verwendet. Dies kann sich auf die Leistung auswirken. [[URL] Versionshinweise anzeigen.] - Die SLurl, auf die Sie geklickt haben, wird nicht unterstützt. diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6f21938bdb..f008042a81 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6303,15 +6303,6 @@ An error has occurred while trying to connect to voice chat for [VOICE_CHANNEL_N - -You just entered a region using a different server version, which may affect performance. [[URL] View the release notes.] - - Se ha producido un error al intentar conectarte al [VOICE_CHANNEL_NAME]. Por favor, inténtalo más tarde. - - Acabas de entrar en una región que usa un servidor con una versión distinta, y esto puede influir en el funcionamiento. [[URL] Ver las notas de desarrollo]. - No se admite el formato de la SLurl que has pulsado. diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index f0b0e63af0..2ccac5c19a 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -2674,9 +2674,6 @@ Pour y participer, cliquez sur Accepter. Sinon, cliquez sur Refuser. Pour ignore Une erreur est survenue pendant la connexion au chat vocal pour [VOICE_CHANNEL_NAME]. Veuillez réessayer ultérieurement. - - La région dans laquelle vous avez pénétré utilise une version de serveur différente, ce qui peut avoir un impact sur votre performance. [[URL] Consultez les notes de version.] - La SLurl que vous avez saisie n'est pas prise en charge. diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index 5e53080c77..cce5888598 100644 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -2623,9 +2623,6 @@ Clicca su Accetta per unirti alla chat oppure su Declina per declinare l'in Si è verificato un errore durante il tentativo di collegarti a una voice chat con [VOICE_CHANNEL_NAME]. Riprova più tardi. - - Sei appena entrato in una regione che usa una versione differente del server: ciò potrebbe incidere sule prestazioni. [[URL] Visualizza le note sulla versione.] - Lo SLurl su cui hai cliccato non è valido. diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index f133bb361a..baec8c073c 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -2675,9 +2675,6 @@ M キーを押して変更します。 [VOICE_CHANNEL_NAME] のボイスチャットに接続中に、エラーが発生しました。後でもう一度お試しください。 - - サーバーのバージョンが異なるリージョンに来ました。パフォーマンスに影響することがあります。 [[URL] リリースノートを確認] - クリックした SLurl はサポートされていません。 diff --git a/indra/newview/skins/default/xui/nl/notifications.xml b/indra/newview/skins/default/xui/nl/notifications.xml index be0c17d2ff..f27b83d3f9 100644 --- a/indra/newview/skins/default/xui/nl/notifications.xml +++ b/indra/newview/skins/default/xui/nl/notifications.xml @@ -3012,9 +3012,6 @@ Klik Accepteren om deel te nemen aan de chat of Afwijzen om de uitnodiging af te Er is een fout opgetreden tijdens het verbinden met voice chat voor [VOICE_CHANNEL_NAME]. Probeert u het later alstublieft opnieuw. - - De regio die u bent binnengetreden wordt onder een andere simulatorversie uitgevoerd. Klik dit bericht voor meer details. - De URL die u heeft geklikt kan niet binnen deze webbrowser worden geopend. diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index 57a6b8b8ef..138125ff0b 100644 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -2635,9 +2635,6 @@ Wybierz Zaakceptuj żeby zacząć czat albo Odmów żeby nie przyjąć zaproszen Błąd podczas łączenia z rozmową [VOICE_CHANNEL_NAME]. Spróbuj póżniej. - - Ten region używa innej wersji symulatora. Kliknij na tą wiadomość żeby uzyskać więcej informacji: [[URL] View the release notes.] - Nie można otworzyć wybranego SLurl. diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index a1855f2e89..9c3b9386e0 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -2658,9 +2658,6 @@ Clique em Aceitar para atender ou em Recusar para recusar este convite. Clique Ocorreu um erro enquanto você tentava se conectar à conversa de voz de [VOICE_CHANNEL_NAME]. Favor tentar novamente mais tarde. - - Você chegou a uma região com uma versão diferente de servidor, que pode afetar o desempenho. [[URL] Consultar notas da versão.] - O SLurl no qual você clicou não é suportado. -- cgit v1.2.3 From feb5fbc66e0a4941489a7c0d92cb51341a1c4f39 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 18 Jan 2011 10:41:37 -0700 Subject: debug tool to show texture info for SH-659: small textures not loaded. --- indra/newview/app_settings/settings.xml | 13 +++++- indra/newview/llviewerwindow.cpp | 54 ++++++++++++++++++++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++++ 3 files changed, 73 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7b3f50e4e2..c7302ea607 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1851,10 +1851,21 @@ Value 0 + DebugShowTextureInfo + + Comment + Show inertested texture info + Persist + 1 + Type + Boolean + Value + 0 + DebugShowTime Comment - Show depth buffer contents + Show time info Persist 1 Type diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index fda6f316e6..ed0789bc50 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -296,13 +296,15 @@ private: line_list_t mLineList; LLColor4 mTextColor; -public: - LLDebugText(LLViewerWindow* window) : mWindow(window) {} - void addText(S32 x, S32 y, const std::string &text) { mLineList.push_back(Line(text, x, y)); } + + void clearText() { mLineList.clear(); } + +public: + LLDebugText(LLViewerWindow* window) : mWindow(window) {} void update() { @@ -323,6 +325,8 @@ public: U32 ypos = 64; const U32 y_inc = 20; + clearText(); + if (gSavedSettings.getBOOL("DebugShowTime")) { const U32 y_inc2 = 15; @@ -601,6 +605,50 @@ public: ypos += y_inc; } } + + if (gSavedSettings.getBOOL("DebugShowTextureInfo")) + { + LLViewerObject* objectp = NULL ; + //objectp = = gAgentCamera.getFocusObject(); + + LLSelectNode* nodep = LLSelectMgr::instance().getHoverNode(); + if (nodep) + { + objectp = nodep->getObject(); + } + if (objectp && !objectp->isDead()) + { + S32 num_faces = objectp->mDrawable->getNumFaces() ; + + for(S32 i = 0 ; i < num_faces; i++) + { + LLFace* facep = objectp->mDrawable->getFace(i) ; + if(facep) + { + //addText(xpos, ypos, llformat("ts_min: %.3f ts_max: %.3f tt_min: %.3f tt_max: %.3f", facep->mTexExtents[0].mV[0], facep->mTexExtents[1].mV[0], + // facep->mTexExtents[0].mV[1], facep->mTexExtents[1].mV[1])); + //ypos += y_inc; + + addText(xpos, ypos, llformat("v_size: %.3f: p_size: %.3f", facep->getVirtualSize(), facep->getPixelArea())); + ypos += y_inc; + + //const LLTextureEntry *tep = facep->getTextureEntry(); + //if(tep) + //{ + // addText(xpos, ypos, llformat("scale_s: %.3f: scale_t: %.3f", tep->mScaleS, tep->mScaleT)) ; + // ypos += y_inc; + //} + + LLViewerTexture* tex = facep->getTexture() ; + if(tex) + { + addText(xpos, ypos, llformat("ID: %s v_size: %.3f", tex->getID().asString().c_str(), tex->getMaxVirtualSize())); + ypos += y_inc; + } + } + } + } + } } void draw() diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index b36cf13f1b..e2a3067796 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1916,6 +1916,16 @@ + + + + Date: Tue, 18 Jan 2011 14:08:21 -0700 Subject: fix for SH-659: small textures not loaded --- indra/newview/llface.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index d22950cad3..6ba957870c 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1233,7 +1233,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_tcoord) { LLVector2 tc = vf.mVertices[i].mTexCoord; - + if (texgen != LLTextureEntry::TEX_GEN_DEFAULT) { LLVector3 vec = vf.mVertices[i].mPosition; @@ -1409,7 +1409,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, mTexExtents[0].setVec(0,0); mTexExtents[1].setVec(1,1); xform(mTexExtents[0], cos_ang, sin_ang, os, ot, ms, mt); - xform(mTexExtents[1], cos_ang, sin_ang, os, ot, ms, mt); + xform(mTexExtents[1], cos_ang, sin_ang, os, ot, ms, mt); + + F32 es = vf.mTexCoordExtents[1].mV[0] - vf.mTexCoordExtents[0].mV[0] ; + F32 et = vf.mTexCoordExtents[1].mV[1] - vf.mTexCoordExtents[0].mV[1] ; + mTexExtents[0][0] *= es ; + mTexExtents[1][0] *= es ; + mTexExtents[0][1] *= et ; + mTexExtents[1][1] *= et ; } mLastVertexBuffer = mVertexBuffer; -- cgit v1.2.3 From c46cbafb15ff48515fdff8f1fd78b99391ddd4d7 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 18 Jan 2011 16:46:33 -0700 Subject: fix for SH-761: Texture Saving Does Not Work --- indra/newview/llpreviewtexture.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index fd6b326ef1..ced699b6b2 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -273,6 +273,8 @@ void LLPreviewTexture::saveAs() mSaveFileName = file_picker.getFirstFile(); mLoadingFullImage = TRUE; getWindow()->incBusyCount(); + + mImage->forceToSaveRawImage(0) ;//re-fetch the raw image if the old one is removed. mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, 0, TRUE, FALSE, new LLUUID( mItemUUID ), &mCallbackTextureList ); } -- cgit v1.2.3 From 3571e83b6413e0c1050540a6cddeeaa7c6ca91c1 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 19 Jan 2011 06:02:08 -0500 Subject: STORM-869 Minor irregulaties in settings.xml -- remove duplicate entries, formatting cleanup --- indra/newview/app_settings/settings.xml | 81 +-------------------------------- 1 file changed, 1 insertion(+), 80 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 06992d2b52..ec094eaeb8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -917,39 +917,6 @@ Value 1 - BulkChangeIncludeAnimations - - Comment - Bulk permission changes affect animations - Persist - 1 - Type - Boolean - Value - 1 - - BulkChangeIncludeAnimations - - Comment - Bulk permission changes affect animations - Persist - 1 - Type - Boolean - Value - 1 - - BulkChangeIncludeAnimations - - Comment - Bulk permission changes affect animations - Persist - 1 - Type - Boolean - Value - 1 - BulkChangeIncludeBodyParts Comment @@ -1162,18 +1129,7 @@ CacheLocationTopFolder Comment - Controls the top folder location of the local disk cache - Persist - 1 - Type - String - Value - - - CacheLocationTopFolder - - Comment - Controls the location of the local disk cache + Controls the top folder location of the the local disk cache Persist 1 Type @@ -3085,17 +3041,6 @@ Value http://viewer-settings.secondlife.com - FPSLogFrequency - - Comment - Seconds between display of FPS in log (0 for never) - Persist - 1 - Type - F32 - Value - 60.0 - FPSLogFrequency Comment @@ -6027,17 +5972,6 @@ 0 OutBandwidth - - Comment - Expand render stats display - Persist - 1 - Type - Boolean - Value - 1 - - OutBandwidth Comment Outgoing bandwidth throttle (bps) @@ -11375,8 +11309,6 @@ Type LLSD Value - - VFSOldSize @@ -11532,17 +11464,6 @@ Value - VivoxDebugSIPURIHostName - - Comment - Hostname portion of vivox SIP URIs (empty string for the default). - Persist - 1 - Type - String - Value - - VivoxDebugVoiceAccountServerURI Comment -- cgit v1.2.3 From 6b7a7081c31607bada575dd2f0a226bc5d721fc2 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Wed, 19 Jan 2011 10:28:39 -0500 Subject: STORM-725: add os to updater query url --- indra/newview/llpanellogin.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index c143aff2d4..8d3b1fd7a0 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -35,6 +35,7 @@ #include "llsecondlifeurls.h" #include "v4color.h" +#include "llappviewer.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcommandhandler.h" // for secondlife:///app/login/ @@ -859,6 +860,13 @@ void LLPanelLogin::loadLoginPage() char* curl_grid = curl_escape(LLGridManager::getInstance()->getGridLabel().c_str(), 0); oStr << "&grid=" << curl_grid; curl_free(curl_grid); + + // add OS info + char * os_info = curl_escape(LLAppViewer::instance()->getOSInfo().getOSStringSimple().c_str(), 0); + oStr << "&os=" << os_info; + curl_free(os_info); + + gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); -- cgit v1.2.3 From 0409d98dfb181284bb8815cda54f66f3d4b1c790 Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Wed, 19 Jan 2011 12:16:23 -0800 Subject: sync up with Viewer 2.5 from viewer-beta --- .../newview/skins/default/xui/da/panel_places.xml | 2 +- .../newview/skins/default/xui/da/panel_profile.xml | 2 +- .../newview/skins/default/xui/de/panel_places.xml | 2 +- .../newview/skins/default/xui/de/panel_profile.xml | 2 +- .../skins/default/xui/en/floater_env_settings.xml | 1 + .../skins/default/xui/en/floater_help_browser.xml | 3 +- .../skins/default/xui/en/floater_media_browser.xml | 2 +- .../default/xui/en/floater_windlight_options.xml | 1 + .../skins/default/xui/en/inspect_object.xml | 27 +- indra/newview/skins/default/xui/en/main_view.xml | 8 +- indra/newview/skins/default/xui/en/menu_login.xml | 10 +- .../newview/skins/default/xui/en/menu_mini_map.xml | 11 +- indra/newview/skins/default/xui/en/menu_place.xml | 22 -- indra/newview/skins/default/xui/en/menu_viewer.xml | 51 +++- .../newview/skins/default/xui/en/notifications.xml | 257 ++++++++++++++---- .../default/xui/en/panel_avatar_list_item.xml | 4 +- .../skins/default/xui/en/panel_bottomtray.xml | 1 + .../skins/default/xui/en/panel_bottomtray_lite.xml | 1 + .../skins/default/xui/en/panel_edit_alpha.xml | 24 +- .../skins/default/xui/en/panel_edit_profile.xml | 11 - .../skins/default/xui/en/panel_edit_tattoo.xml | 2 +- .../skins/default/xui/en/panel_group_invite.xml | 2 +- .../default/xui/en/panel_group_land_money.xml | 2 +- .../skins/default/xui/en/panel_group_list_item.xml | 3 +- .../skins/default/xui/en/panel_landmarks.xml | 4 + indra/newview/skins/default/xui/en/panel_login.xml | 27 +- .../skins/default/xui/en/panel_main_inventory.xml | 4 + .../skins/default/xui/en/panel_my_profile.xml | 302 ++++----------------- .../skins/default/xui/en/panel_navigation_bar.xml | 1 + .../skins/default/xui/en/panel_notify_textbox.xml | 66 +++-- .../newview/skins/default/xui/en/panel_places.xml | 2 +- .../default/xui/en/panel_preferences_advanced.xml | 2 +- .../default/xui/en/panel_preferences_colors.xml | 7 +- .../default/xui/en/panel_preferences_privacy.xml | 23 +- .../default/xui/en/panel_preferences_setup.xml | 55 ++-- .../default/xui/en/panel_preferences_sound.xml | 1 + .../newview/skins/default/xui/en/panel_profile.xml | 4 +- .../skins/default/xui/en/panel_script_ed.xml | 1 + .../skins/default/xui/en/panel_status_bar.xml | 2 +- .../skins/default/xui/en/sidepanel_task_info.xml | 11 +- indra/newview/skins/default/xui/en/strings.xml | 4 +- .../skins/default/xui/en/widgets/button.xml | 2 +- .../skins/default/xui/en/widgets/check_box.xml | 8 + .../skins/default/xui/en/widgets/group_icon.xml | 3 +- .../newview/skins/default/xui/es/panel_places.xml | 2 +- .../newview/skins/default/xui/es/panel_profile.xml | 2 +- .../newview/skins/default/xui/fr/panel_places.xml | 2 +- .../newview/skins/default/xui/fr/panel_profile.xml | 2 +- .../newview/skins/default/xui/it/panel_places.xml | 2 +- .../newview/skins/default/xui/it/panel_profile.xml | 2 +- .../newview/skins/default/xui/ja/panel_places.xml | 2 +- .../newview/skins/default/xui/ja/panel_profile.xml | 2 +- .../newview/skins/default/xui/pl/panel_places.xml | 2 +- .../newview/skins/default/xui/pl/panel_profile.xml | 2 +- .../newview/skins/default/xui/pt/panel_places.xml | 2 +- .../newview/skins/default/xui/pt/panel_profile.xml | 2 +- 56 files changed, 538 insertions(+), 466 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/da/panel_places.xml b/indra/newview/skins/default/xui/da/panel_places.xml index ca3d7c71bb..fe8ca69f34 100644 --- a/indra/newview/skins/default/xui/da/panel_places.xml +++ b/indra/newview/skins/default/xui/da/panel_places.xml @@ -21,7 +21,7 @@ diff --git a/indra/newview/skins/default/xui/en/floater_windlight_options.xml b/indra/newview/skins/default/xui/en/floater_windlight_options.xml index 85a5be369c..249ad95c41 100644 --- a/indra/newview/skins/default/xui/en/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/en/floater_windlight_options.xml @@ -594,6 +594,7 @@ left_delta="14" top_pad="10" name="SkyDayCycle" + use_draw_context_alpha="false" width="148" /> + http://www.superdupertest.com @@ -135,16 +146,6 @@ L$30,000 name="open_btn" top_delta="0" width="80" /> - + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/notification_visibility.xml b/indra/newview/skins/default/xui/en/notification_visibility.xml new file mode 100644 index 0000000000..db292100d7 --- /dev/null +++ b/indra/newview/skins/default/xui/en/notification_visibility.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_hint_image.xml b/indra/newview/skins/default/xui/en/panel_hint_image.xml new file mode 100644 index 0000000000..00b6e42497 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_hint_image.xml @@ -0,0 +1,39 @@ + + + + + +