From 77f56a3f3db72b2938eadb0868fc7be975dabafa Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 10 Jul 2009 22:02:26 +0000 Subject: merge QAR-1579: texture-cleanup-1. --- indra/newview/llviewertexturelist.cpp | 1510 +++++++++++++++++++++++++++++++++ 1 file changed, 1510 insertions(+) create mode 100644 indra/newview/llviewertexturelist.cpp (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp new file mode 100644 index 0000000000..c96914975b --- /dev/null +++ b/indra/newview/llviewertexturelist.cpp @@ -0,0 +1,1510 @@ +/** + * @file llviewertexturelist.cpp + * @brief Object for managing the list of images within a region + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llviewertexturelist.h" + +#include "imageids.h" +#include "llgl.h" // fot gathering stats from GL +#include "llimagegl.h" +#include "llimagebmp.h" +#include "llimagej2c.h" +#include "llimagetga.h" +#include "llimagejpeg.h" +#include "llimagepng.h" + +#include "llsdserialize.h" +#include "llsys.h" +#include "llvfs.h" +#include "llvfile.h" +#include "llvfsthread.h" +#include "llxmltree.h" +#include "message.h" + +#include "llagent.h" +#include "lltexturecache.h" +#include "lltexturefetch.h" +#include "llviewercontrol.h" +#include "llviewertexture.h" +#include "llviewermedia.h" +#include "llviewerregion.h" +#include "llviewerstats.h" +#include "pipeline.h" +#include "llappviewer.h" +#include "lluictrlfactory.h" // for LLXUIParser +#include + +//////////////////////////////////////////////////////////////////////////// + +void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; + +const S32 IMAGES_PER_REQUEST = 42; +const S32 IMAGES_MIN_UPDATES = 4; // Always update the highest N images each frame +const S32 IMAGES_MAX_PACKET_UPDATES = 1; // Only send N packets of IMAGES_PER_REQUEST in a frame +const F32 RESEND_IMAGE_REQUEST_TIME = 15.f; // seconds + +LLViewerTextureList gTextureList; + +/////////////////////////////////////////////////////////////////////////////// + +LLViewerTextureList::LLViewerTextureList() + : mForceResetTextureStats(FALSE), + mUpdateStats(FALSE), + mMaxResidentTexMemInMegaBytes(0), + mMaxTotalTextureMemInMegaBytes(0) +{ +} + +void LLViewerTextureList::init() +{ + mNumImages = 0; + mMaxResidentTexMemInMegaBytes = 0; + mMaxTotalTextureMemInMegaBytes = 0 ; + if (gNoRender) + { + // Don't initialize GL stuff if we're not rendering. + return; + } + + mUpdateStats = TRUE; + + // Update how much texture RAM we're allowed to use. + updateMaxResidentTexMem(0); // 0 = use current + + doPreloadImages(); +} + + +void LLViewerTextureList::doPreloadImages() +{ + LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL; + + // Set the "missing asset" image + LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, IMMEDIATE_YES); + + // Set the "white" image + LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, IMMEDIATE_YES); + + LLUIImageList* image_list = LLUIImageList::getInstance(); + + image_list->initFromFile(); + + // turn off clamping and bilinear filtering for uv picking images + //LLViewerFetchedTexture* uv_test = preloadUIImage("uv_test1.tga", LLUUID::null, FALSE); + //uv_test->setClamp(FALSE, FALSE); + //uv_test->setMipFilterNearest(TRUE, TRUE); + //uv_test = preloadUIImage("uv_test2.tga", LLUUID::null, FALSE); + //uv_test->setClamp(FALSE, FALSE); + //uv_test->setMipFilterNearest(TRUE, TRUE); + + // prefetch specific UUIDs + LLViewerTextureManager::getFetchedTexture(IMG_SHOT, TRUE); + LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF, TRUE); + LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", MIPMAP_YES, IMMEDIATE_YES); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_WRAP); + mImagePreloads.insert(image); + } + image = LLViewerTextureManager::getFetchedTextureFromFile("noentrylines.j2c", MIPMAP_YES, IMMEDIATE_YES); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_WRAP); + mImagePreloads.insert(image); + } + image = LLViewerTextureManager::getFetchedTextureFromFile("noentrypasslines.j2c", MIPMAP_YES, IMMEDIATE_YES); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_WRAP); + mImagePreloads.insert(image); + } + image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, IMMEDIATE_YES); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_WRAP); + mImagePreloads.insert(image); + } + image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", MIPMAP_YES, IMMEDIATE_YES, LLViewerTexture::FETCHED_TEXTURE, + 0,0,LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903")); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_WRAP); + mImagePreloads.insert(image); + } + +} + +static std::string get_texture_list_name() +{ + return std::string("texture_list_") + gSavedSettings.getString("LoginLocation") + ".xml"; +} + +void LLViewerTextureList::doPrefetchImages() +{ + if (LLAppViewer::instance()->getPurgeCache()) + { + // cache was purged, no point + return; + } + + // Pre-fetch textures from last logout + LLSD imagelist; + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name()); + llifstream file; + file.open(filename); + if (file.is_open()) + { + LLSDSerialize::fromXML(imagelist, file); + } + for (LLSD::array_iterator iter = imagelist.beginArray(); + iter != imagelist.endArray(); ++iter) + { + LLSD imagesd = *iter; + LLUUID uuid = imagesd["uuid"]; + S32 pixel_area = imagesd["area"]; + S32 texture_type = imagesd["type"]; + + if(LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type) + { + LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, MIPMAP_TRUE, FALSE, texture_type); + if (image) + { + image->addTextureStats((F32)pixel_area); + } + } + } +} + +/////////////////////////////////////////////////////////////////////////////// + +LLViewerTextureList::~LLViewerTextureList() +{ +} + +void LLViewerTextureList::shutdown() +{ + // clear out preloads + mImagePreloads.clear(); + + // Write out list of currently loaded textures for precaching on startup + typedef std::set > image_area_list_t; + image_area_list_t image_area_list; + for (image_priority_list_t::iterator iter = mImageList.begin(); + iter != mImageList.end(); ++iter) + { + LLViewerFetchedTexture* image = *iter; + if (!image->hasGLTexture() || + !image->getUseDiscard() || + image->needsAux() || + image->getTargetHost() != LLHost::invalid) + { + continue; // avoid UI, baked, and other special images + } + S32 desired = image->getDesiredDiscardLevel(); + if (desired >= 0 && desired < MAX_DISCARD_LEVEL) + { + S32 pixel_area = image->getWidth(desired) * image->getHeight(desired); + image_area_list.insert(std::make_pair(pixel_area, image)); + } + } + + LLSD imagelist; + const S32 max_count = 1000; + S32 count = 0; + S32 image_type ; + for (image_area_list_t::reverse_iterator riter = image_area_list.rbegin(); + riter != image_area_list.rend(); ++riter) + { + LLViewerFetchedTexture* image = riter->second; + image_type = (S32)image->getType() ; + imagelist[count]["area"] = riter->first; + imagelist[count]["uuid"] = image->getID(); + imagelist[count]["type"] = image_type; + if (++count >= max_count) + break; + } + + if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty()) + { + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name()); + llofstream file; + file.open(filename); + LLSDSerialize::toPrettyXML(imagelist, file); + } + + // + // Clean up "loaded" callbacks. + // + mCallbackList.clear(); + + // Flush all of the references + mLoadingStreamList.clear(); + mCreateTextureList.clear(); + + mUUIDMap.clear(); + + mImageList.clear(); +} + +void LLViewerTextureList::dump() +{ + llinfos << "LLViewerTextureList::dump()" << llendl; + for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it) + { + LLViewerFetchedTexture* image = *it; + + llinfos << "priority " << image->getDecodePriority() + << " boost " << image->getBoostLevel() + << " size " << image->getWidth() << "x" << image->getHeight() + << " discard " << image->getDiscardLevel() + << " desired " << image->getDesiredDiscardLevel() + << " http://asset.siva.lindenlab.com/" << image->getID() << ".texture" + << llendl; + } +} + +void LLViewerTextureList::destroyGL(BOOL save_state) +{ + LLImageGL::destroyGL(save_state); +} + +void LLViewerTextureList::restoreGL() +{ + LLImageGL::restoreGL(); +} + +/* Vertical tab container button image IDs + Seem to not decode when running app in debug. + + const LLUUID BAD_IMG_ONE("1097dcb3-aef9-8152-f471-431d840ea89e"); + const LLUUID BAD_IMG_TWO("bea77041-5835-1661-f298-47e2d32b7a70"); + */ + +/////////////////////////////////////////////////////////////////////////////// + +LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename, + BOOL usemipmaps, + BOOL level_immediate, + S8 texture_type, + LLGLint internal_format, + LLGLenum primary_format, + const LLUUID& force_id) +{ + if (gNoRender) + { + // Never mind that this ignores image_set_id; + // getImage() will handle that later. + return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE); + } + + std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename); + if (full_path.empty()) + { + llwarns << "Failed to find local image file: " << filename << llendl; + return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE); + } + + // generate UUID based on hash of filename + LLUUID new_id; + if (force_id.notNull()) + { + new_id = force_id; + } + else + { + new_id.generate(full_path); + } + + LLPointer imagep = findImage(new_id); + + if (imagep.isNull()) + { + switch(texture_type) + { + case LLViewerTexture::FETCHED_TEXTURE: + imagep = new LLViewerFetchedTexture(full_path, new_id, usemipmaps); + break ; + case LLViewerTexture::LOD_TEXTURE: + imagep = new LLViewerLODTexture(full_path, new_id, usemipmaps); + break ; + default: + llerrs << "Invalid texture type " << texture_type << llendl ; + } + + if (internal_format && primary_format) + { + imagep->setExplicitFormat(internal_format, primary_format); + } + + addImage(imagep); + + if (level_immediate) + { + imagep->dontDiscard(); + imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI); + } + } + + imagep->setGLTextureCreated(true); + + return imagep; +} + + +LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, + BOOL usemipmaps, + BOOL level_immediate, + S8 texture_type, + LLGLint internal_format, + LLGLenum primary_format, + LLHost request_from_host) +{ + // Return the image with ID image_id + // If the image is not found, creates new image and + // enqueues a request for transmission + + if ((&image_id == NULL) || image_id.isNull()) + { + return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE)); + } + + LLPointer imagep = findImage(image_id); + + if (imagep.isNull()) + { + imagep = createImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ; + } + + imagep->setGLTextureCreated(true); + + return imagep; +} + +//when this function is called, there is no such texture in the gTextureList with image_id. +LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, + BOOL usemipmaps, + BOOL level_immediate, + S8 texture_type, + LLGLint internal_format, + LLGLenum primary_format, + LLHost request_from_host) +{ + LLPointer imagep ; + switch(texture_type) + { + case LLViewerTexture::FETCHED_TEXTURE: + imagep = new LLViewerFetchedTexture(image_id, usemipmaps); + break ; + case LLViewerTexture::LOD_TEXTURE: + imagep = new LLViewerLODTexture(image_id, usemipmaps); + break ; + default: + llerrs << "Invalid texture type " << texture_type << llendl ; + } + + // Might want to request from host other than where the agent is. JC + imagep->setTargetHost(request_from_host); + + if (internal_format && primary_format) + { + imagep->setExplicitFormat(internal_format, primary_format); + } + + addImage(imagep); + + if (level_immediate) + { + imagep->dontDiscard(); + imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI); + } + else + { + //by default, the texure can not be removed from memory even if it is not used. + //here turn this off + //if this texture should be set to NO_DELETE, either pass level_immediate == TRUE here, or call setNoDelete() afterwards. + imagep->forceActive() ; + } + + return imagep ; +} + +LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id) +{ + uuid_map_t::iterator iter = mUUIDMap.find(image_id); + if(iter == mUUIDMap.end()) + return NULL; + return iter->second; +} + +void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) +{ + llassert(image); + if (image->isInImageList()) + { + llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl; + } + llverify((mImageList.insert(image)).second == true); + image->setInImageList(TRUE) ; +} + +void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) +{ + llassert(image); + if (!image->isInImageList()) + { + llinfos << "RefCount: " << image->getNumRefs() << llendl ; + uuid_map_t::iterator iter = mUUIDMap.find(image->getID()); + if(iter == mUUIDMap.end() || iter->second != image) + { + llinfos << "Image is not in mUUIDMap!" << llendl ; + } + llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl; + } + llverify(mImageList.erase(image) == 1); + image->setInImageList(FALSE) ; +} + +void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image) +{ + if (!new_image) + { + llwarning("No image to add to image list", 0); + return; + } + LLUUID image_id = new_image->getID(); + + LLViewerFetchedTexture *image = findImage(image_id); + if (image) + { + llwarns << "Image with ID " << image_id << " already in list" << llendl; + } + mNumImages++; + + addImageToList(new_image); + mUUIDMap[image_id] = new_image; +} + + +void LLViewerTextureList::deleteImage(LLViewerFetchedTexture *image) +{ + if( image) + { + if (image->hasCallbacks()) + { + mCallbackList.erase(image); + } + + llverify(mUUIDMap.erase(image->getID()) == 1); + mNumImages--; + removeImageFromList(image); + } +} + +/////////////////////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////////////// + +void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) +{ + mDirtyTextureList.insert(image); +} + +//////////////////////////////////////////////////////////////////////////// + +void LLViewerTextureList::updateImages(F32 max_time) +{ + LLViewerStats::getInstance()->mNumImagesStat.addValue(mNumImages); + LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount); + LLViewerStats::getInstance()->mGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes)); + LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes)); + LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory)); + LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory)); + + updateImagesDecodePriorities(); + max_time -= updateImagesFetchTextures(max_time); + max_time = llmin(llmax(max_time, 0.001f*10.f*gFrameIntervalSeconds), 0.001f); + max_time -= updateImagesCreateTextures(max_time); + max_time = llmin(llmax(max_time, 0.001f*10.f*gFrameIntervalSeconds), 0.001f); + if (!mDirtyTextureList.empty()) + { + LLFastTimer t(LLFastTimer::FTM_IMAGE_MARK_DIRTY); + gPipeline.dirtyPoolObjectTextures(mDirtyTextureList); + mDirtyTextureList.clear(); + } + bool didone = false; + for (image_list_t::iterator iter = mCallbackList.begin(); + iter != mCallbackList.end(); ) + { + //trigger loaded callbacks on local textures immediately + LLViewerFetchedTexture* image = *iter++; + if (!image->getLocalFileName().empty()) + { + // Do stuff to handle callbacks, update priorities, etc. + didone = image->doLoadedCallbacks(); + } + else if (!didone) + { + // Do stuff to handle callbacks, update priorities, etc. + didone = image->doLoadedCallbacks(); + } + } + if (!gNoRender && !gGLManager.mIsDisabled) + { + LLViewerMedia::updateImagesMediaStreams(); + } + updateImagesUpdateStats(); +} + +void LLViewerTextureList::updateImagesDecodePriorities() +{ + // Update the decode priority for N images each frame + { + const size_t max_update_count = llmin((S32) (1024*gFrameIntervalSeconds) + 1, 32); //target 1024 textures per second + S32 update_counter = llmin(max_update_count, mUUIDMap.size()/10); + uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID); + while(update_counter > 0 && !mUUIDMap.empty()) + { + if (iter == mUUIDMap.end()) + { + iter = mUUIDMap.begin(); + } + mLastUpdateUUID = iter->first; + LLPointer imagep = iter->second; + ++iter; // safe to incrament now + + // + // Flush formatted images using a lazy flush + // + const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding + const F32 MAX_INACTIVE_TIME = 50.f; // actually delete + S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference + if (imagep->hasCallbacks()) + { + min_refs++; // Add an extra reference if we're on the loaded callback list + } + S32 num_refs = imagep->getNumRefs(); + if (num_refs == min_refs) + { + if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > LAZY_FLUSH_TIMEOUT) + { + // Remove the unused image from the image list + deleteImage(imagep); + imagep = NULL; // should destroy the image + } + continue; + } + else + { + if(imagep->isDeleted()) + { + continue ; + } + else if(imagep->isDeletionCandidate()) + { + imagep->destroyTexture() ; + continue ; + } + else if(imagep->isInactive()) + { + if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME) + { + imagep->setDeletionCandidate() ; + } + continue ; + } + else + { + imagep->getLastReferencedTimer()->reset(); + + //reset texture state. + imagep->setInactive() ; + } + } + + imagep->processTextureStats(); + F32 old_priority = imagep->getDecodePriority(); + F32 old_priority_test = llmax(old_priority, 0.0f); + F32 decode_priority = imagep->calcDecodePriority(); + F32 decode_priority_test = llmax(decode_priority, 0.0f); + // Ignore < 20% difference + if ((decode_priority_test < old_priority_test * .8f) || + (decode_priority_test > old_priority_test * 1.25f)) + { + removeImageFromList(imagep); + imagep->setDecodePriority(decode_priority); + addImageToList(imagep); + } + update_counter--; + } + } +} + +/* + static U8 get_image_type(LLViewerFetchedTexture* imagep, LLHost target_host) + { + // Having a target host implies this is a baked image. I don't + // believe that boost level has been set at this point. JC + U8 type_from_host = (target_host.isOk() + ? LLImageBase::TYPE_AVATAR_BAKE + : LLImageBase::TYPE_NORMAL); + S32 boost_level = imagep->getBoostLevel(); + U8 type_from_boost = ( (boost_level == LLViewerFetchedTexture::BOOST_AVATAR_BAKED + || boost_level == LLViewerFetchedTexture::BOOST_AVATAR_BAKED_SELF) + ? LLImageBase::TYPE_AVATAR_BAKE + : LLImageBase::TYPE_NORMAL); + if (type_from_host == LLImageBase::TYPE_NORMAL + && type_from_boost == LLImageBase::TYPE_AVATAR_BAKE) + { + llwarns << "TAT: get_image_type() type_from_host doesn't match type_from_boost" + << " host " << target_host + << " boost " << imagep->getBoostLevel() + << " imageid " << imagep->getID() + << llendl; + imagep->dump(); + } + return type_from_host; + } + */ + +F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) +{ + if (gNoRender || gGLManager.mIsDisabled) return 0.0f; + + // + // Create GL textures for all textures that need them (images which have been + // decoded, but haven't been pushed into GL). + // + LLFastTimer t(LLFastTimer::FTM_IMAGE_CREATE); + + LLTimer create_timer; + image_list_t::iterator enditer = mCreateTextureList.begin(); + for (image_list_t::iterator iter = mCreateTextureList.begin(); + iter != mCreateTextureList.end();) + { + image_list_t::iterator curiter = iter++; + enditer = iter; + LLViewerFetchedTexture *imagep = *curiter; + imagep->createTexture(); + if (create_timer.getElapsedTimeF32() > max_time) + { + break; + } + } + mCreateTextureList.erase(mCreateTextureList.begin(), enditer); + return create_timer.getElapsedTimeF32(); +} + +void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep) +{ + if(!imagep) + { + return ; + } + if(imagep->isInImageList()) + { + removeImageFromList(imagep); + } + + imagep->processTextureStats(); + F32 decode_priority = LLViewerFetchedTexture::maxDecodePriority() ; + imagep->setDecodePriority(decode_priority); + mImageList.insert(imagep); + imagep->setInImageList(TRUE) ; + + return ; +} + +F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) +{ + LLTimer image_op_timer; + + // Update the decode priority for N images each frame + // Make a list with 32 high priority entries + 256 cycled entries + const size_t max_priority_count = llmin((S32) (256*10.f*gFrameIntervalSeconds)+1, 32); + const size_t max_update_count = llmin((S32) (1024*10.f*gFrameIntervalSeconds)+1, 256); + + // 32 high priority entries + std::set entries; + size_t update_counter = llmin(max_priority_count, mImageList.size()); + image_priority_list_t::iterator iter1 = mImageList.begin(); + while(update_counter > 0) + { + // added extra granularity and verbosity for crash logging during 1.19.1 RC. -Brad + if(iter1 == mImageList.end()) + { + llerrs << "DEV-12002: update_counter not calculated correctly!" << llendl; + return 0.f; + } + + LLPointer const & ptr = *iter1; + + LLViewerFetchedTexture * img = ptr.get(); + + // added extra granularity and verbosity for crash logging during 1.19.1 RC. -Brad + if(img == NULL) + { + llwarns << "DEV-12002: image is NULL!" << llendl; + } + + entries.insert(img); + + ++iter1; + update_counter--; + } + + // 256 cycled entries + update_counter = llmin(max_update_count, mUUIDMap.size()); + uuid_map_t::iterator iter2 = mUUIDMap.upper_bound(mLastFetchUUID); + while(update_counter > 0) + { + if (iter2 == mUUIDMap.end()) + { + iter2 = mUUIDMap.begin(); + } + mLastFetchUUID = iter2->first; + entries.insert(iter2->second); + ++iter2; + update_counter--; + } + + S32 min_count = max_priority_count + max_update_count/4; + for (std::set::iterator iter3 = entries.begin(); + iter3 != entries.end(); ) + { + LLPointer imagep = *iter3++; + + imagep->updateFetch(); + if (min_count <= 0 && image_op_timer.getElapsedTimeF32() > max_time) + { + break; + } + min_count--; + } + return image_op_timer.getElapsedTimeF32(); +} + +void LLViewerTextureList::updateImagesUpdateStats() +{ + if (mUpdateStats) + { + for (image_priority_list_t::iterator iter = mImageList.begin(); + iter != mImageList.end(); ) + { + LLViewerFetchedTexture* imagep = *iter++; + imagep->resetTextureStats(mForceResetTextureStats); + } + mUpdateStats = FALSE; + mForceResetTextureStats = FALSE; + } +} + +void LLViewerTextureList::decodeAllImages(F32 max_time) +{ + LLTimer timer; + if(gNoRender) return; + + // Update texture stats and priorities + std::vector > image_list; + for (image_priority_list_t::iterator iter = mImageList.begin(); + iter != mImageList.end(); ) + { + LLViewerFetchedTexture* imagep = *iter++; + image_list.push_back(imagep); + imagep->setInImageList(FALSE) ; + } + mImageList.clear(); + for (std::vector >::iterator iter = image_list.begin(); + iter != image_list.end(); ++iter) + { + LLViewerFetchedTexture* imagep = *iter; + imagep->processTextureStats(); + F32 decode_priority = imagep->calcDecodePriority(); + imagep->setDecodePriority(decode_priority); + mImageList.insert(imagep); + imagep->setInImageList(TRUE) ; + } + image_list.clear(); + + // Update fetch (decode) + for (image_priority_list_t::iterator iter = mImageList.begin(); + iter != mImageList.end(); ) + { + LLViewerFetchedTexture* imagep = *iter++; + imagep->updateFetch(); + } + // Run threads + S32 fetch_pending = 0; + while (1) + { + LLAppViewer::instance()->getTextureCache()->update(1); // unpauses the texture cache thread + LLAppViewer::instance()->getImageDecodeThread()->update(1); // unpauses the image thread + fetch_pending = LLAppViewer::instance()->getTextureFetch()->update(1); // unpauses the texture fetch thread + if (fetch_pending == 0 || timer.getElapsedTimeF32() > max_time) + { + break; + } + } + // Update fetch again + for (image_priority_list_t::iterator iter = mImageList.begin(); + iter != mImageList.end(); ) + { + LLViewerFetchedTexture* imagep = *iter++; + imagep->updateFetch(); + } + max_time -= timer.getElapsedTimeF32(); + max_time = llmax(max_time, .001f); + F32 create_time = updateImagesCreateTextures(max_time); + + LL_DEBUGS("ViewerImages") << "decodeAllImages() took " << timer.getElapsedTimeF32() << " seconds. " + << " fetch_pending " << fetch_pending + << " create_time " << create_time + << LL_ENDL; +} + + +BOOL LLViewerTextureList::createUploadFile(const std::string& filename, + const std::string& out_filename, + const U8 codec) +{ + // First, load the image. + LLPointer raw_image = new LLImageRaw; + + switch (codec) + { + case IMG_CODEC_BMP: + { + LLPointer bmp_image = new LLImageBMP; + + if (!bmp_image->load(filename)) + { + return FALSE; + } + + if (!bmp_image->decode(raw_image, 0.0f)) + { + return FALSE; + } + } + break; + case IMG_CODEC_TGA: + { + LLPointer tga_image = new LLImageTGA; + + if (!tga_image->load(filename)) + { + return FALSE; + } + + if (!tga_image->decode(raw_image)) + { + return FALSE; + } + + if( (tga_image->getComponents() != 3) && + (tga_image->getComponents() != 4) ) + { + tga_image->setLastError( "Image files with less than 3 or more than 4 components are not supported." ); + return FALSE; + } + } + break; + case IMG_CODEC_JPEG: + { + LLPointer jpeg_image = new LLImageJPEG; + + if (!jpeg_image->load(filename)) + { + return FALSE; + } + + if (!jpeg_image->decode(raw_image, 0.0f)) + { + return FALSE; + } + } + break; + case IMG_CODEC_PNG: + { + LLPointer png_image = new LLImagePNG; + + if (!png_image->load(filename)) + { + return FALSE; + } + + if (!png_image->decode(raw_image, 0.0f)) + { + return FALSE; + } + } + break; + default: + return FALSE; + } + + LLPointer compressedImage = convertToUploadFile(raw_image); + + if( !compressedImage->save(out_filename) ) + { + llinfos << "Couldn't create output file " << out_filename << llendl; + return FALSE; + } + + // test to see if the encode and save worked. + LLPointer integrity_test = new LLImageJ2C; + if( !integrity_test->loadAndValidate( out_filename ) ) + { + llinfos << "Image: " << out_filename << " is corrupt." << llendl; + return FALSE; + } + + return TRUE; +} + +// note: modifies the argument raw_image!!!! +LLPointer LLViewerTextureList::convertToUploadFile(LLPointer raw_image) +{ + raw_image->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT); + LLPointer compressedImage = new LLImageJ2C(); + compressedImage->setRate(0.f); + + if (gSavedSettings.getBOOL("LosslessJ2CUpload") && + (raw_image->getWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)) + compressedImage->setReversible(TRUE); + + compressedImage->encode(raw_image, 0.0f); + + return compressedImage; +} + +// Returns min setting for TextureMemory (in MB) +S32 LLViewerTextureList::getMinVideoRamSetting() +{ + S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); + //min texture mem sets to 64M if total physical mem is more than 1.5GB + return (system_ram > 1500) ? 64 : MIN_VIDEO_RAM_IN_MEGA_BYTES ; +} + +//static +// Returns max setting for TextureMemory (in MB) +S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) +{ + S32 max_texmem; + if (gGLManager.mVRAM != 0) + { + // Treat any card with < 32 MB (shudder) as having 32 MB + // - it's going to be swapping constantly regardless + S32 max_vram = gGLManager.mVRAM; + max_vram = llmax(max_vram, getMinVideoRamSetting()); + max_texmem = max_vram; + if (!get_recommended) + max_texmem *= 2; + } + else + { + if (get_recommended) + max_texmem = 128; + else + max_texmem = 512; + llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << llendl; + } + + S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB + //llinfos << "*** DETECTED " << system_ram << " MB of system memory." << llendl; + if (get_recommended) + max_texmem = llmin(max_texmem, (S32)(system_ram/2)); + else + max_texmem = llmin(max_texmem, (S32)(system_ram)); + + max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), MAX_VIDEO_RAM_IN_MEGA_BYTES); + + return max_texmem; +} + +const S32 VIDEO_CARD_FRAMEBUFFER_MEM = 12; // MB +const S32 MIN_MEM_FOR_NON_TEXTURE = 512 ; //MB +void LLViewerTextureList::updateMaxResidentTexMem(S32 mem) +{ + // Initialize the image pipeline VRAM settings + S32 cur_mem = gSavedSettings.getS32("TextureMemory"); + F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple"); + S32 default_mem = getMaxVideoRamSetting(true); // recommended default + if (mem == 0) + { + mem = cur_mem > 0 ? cur_mem : default_mem; + } + else if (mem < 0) + { + mem = default_mem; + } + + // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise + mem = llmin(mem, (S32) (mem_multiplier * (F32) default_mem)); + + mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting()); + if (mem != cur_mem) + { + gSavedSettings.setS32("TextureMemory", mem); + return; //listener will re-enter this function + } + + // TODO: set available resident texture mem based on use by other subsystems + // currently max(12MB, VRAM/4) assumed... + + S32 vb_mem = mem; + S32 fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4); + mMaxResidentTexMemInMegaBytes = (vb_mem - fb_mem) ; //in MB + + mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2; + if (mMaxResidentTexMemInMegaBytes > 640) + { + mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes >> 2); + } + + //system mem + S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB + + //minimum memory reserved for non-texture use. + //if system_raw >= 1GB, reserve at least 512MB for non-texture use; + //otherwise reserve half of the system_ram for non-texture use. + S32 min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ; + + if (mMaxTotalTextureMemInMegaBytes > system_ram - min_non_texture_mem) + { + mMaxTotalTextureMemInMegaBytes = system_ram - min_non_texture_mem ; + } + + llinfos << "Total Video Memory set to: " << vb_mem << " MB" << llendl; + llinfos << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << llendl; +} + +/////////////////////////////////////////////////////////////////////////////// + +// static +void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_data) +{ + LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES); + + // Receive image header, copy into image object and decompresses + // if this is a one-packet image. + + LLUUID id; + + char ip_string[256]; + u32_to_ip_string(msg->getSenderIP(),ip_string); + + if (msg->getReceiveCompressedSize()) + { + gTextureList.mTextureBits += msg->getReceiveCompressedSize() * 8; + } + else + { + gTextureList.mTextureBits += msg->getReceiveSize() * 8; + } + gTextureList.mTexturePackets++; + + U8 codec; + U16 packets; + U32 totalbytes; + msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id); + msg->getU8Fast(_PREHASH_ImageID, _PREHASH_Codec, codec); + msg->getU16Fast(_PREHASH_ImageID, _PREHASH_Packets, packets); + msg->getU32Fast(_PREHASH_ImageID, _PREHASH_Size, totalbytes); + + S32 data_size = msg->getSizeFast(_PREHASH_ImageData, _PREHASH_Data); + if (!data_size) + { + return; + } + if (data_size < 0) + { + // msg->getSizeFast() is probably trying to tell us there + // was an error. + llerrs << "image header chunk size was negative: " + << data_size << llendl; + return; + } + + // this buffer gets saved off in the packet list + U8 *data = new U8[data_size]; + msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); + + LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + if (!image) + { + delete [] data; + return; + } + image->getLastPacketTimer()->reset(); + bool res = LLAppViewer::getTextureFetch()->receiveImageHeader(msg->getSender(), id, codec, packets, totalbytes, data_size, data); + if (!res) + { + delete[] data; + } +} + +// static +void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_data) +{ + LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE); + LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES); + + // Receives image packet, copy into image object, + // checks if all packets received, decompresses if so. + + LLUUID id; + U16 packet_num; + + char ip_string[256]; + u32_to_ip_string(msg->getSenderIP(),ip_string); + + if (msg->getReceiveCompressedSize()) + { + gTextureList.mTextureBits += msg->getReceiveCompressedSize() * 8; + } + else + { + gTextureList.mTextureBits += msg->getReceiveSize() * 8; + } + gTextureList.mTexturePackets++; + + //llprintline("Start decode, image header..."); + msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id); + msg->getU16Fast(_PREHASH_ImageID, _PREHASH_Packet, packet_num); + S32 data_size = msg->getSizeFast(_PREHASH_ImageData, _PREHASH_Data); + + if (!data_size) + { + return; + } + if (data_size < 0) + { + // msg->getSizeFast() is probably trying to tell us there + // was an error. + llerrs << "image data chunk size was negative: " + << data_size << llendl; + return; + } + if (data_size > MTUBYTES) + { + llerrs << "image data chunk too large: " << data_size << " bytes" << llendl; + return; + } + U8 *data = new U8[data_size]; + msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); + + LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + if (!image) + { + delete [] data; + return; + } + image->getLastPacketTimer()->reset(); + bool res = LLAppViewer::getTextureFetch()->receiveImagePacket(msg->getSender(), id, packet_num, data_size, data); + if (!res) + { + delete[] data; + } +} + + +// We've been that the asset server does not contain the requested image id. +// static +void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **user_data) +{ + LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES); + LLUUID image_id; + msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id); + + LLViewerFetchedTexture* image = gTextureList.findImage( image_id ); + if( image ) + { + image->setIsMissingAsset(); + } +} + +/////////////////////////////////////////////////////////////////////////////// + +//static +const U32 SIXTEEN_MEG = 0x1000000; +S32 LLViewerTextureList::calcMaxTextureRAM() +{ + // Decide the maximum amount of RAM we should allow the user to allocate to texture cache + LLMemoryInfo memory_info; + U32 available_memory = memory_info.getPhysicalMemoryClamped(); + + clamp_rescale((F32)available_memory, + (F32)(SIXTEEN_MEG * 16), + (F32)U32_MAX, + (F32)(SIXTEEN_MEG * 4), + (F32)(U32_MAX >> 1)); + return available_memory; +} + +/////////////////////////////////////////////////////////////////////////////// + +// explicitly cleanup resources, as this is a singleton class with process +// lifetime so ability to perform std::map operations in destructor is not +// guaranteed. +void LLUIImageList::cleanUp() +{ + mUIImages.clear(); + mUITextureList.clear() ; +} + +LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id) +{ + // use id as image name + std::string image_name = image_id.asString(); + + // look for existing image + uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name); + if (found_it != mUIImages.end()) + { + return found_it->second; + } + + return loadUIImageByID(image_id); +} + +LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name) +{ + // look for existing image + uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name); + if (found_it != mUIImages.end()) + { + return found_it->second; + } + + return loadUIImageByName(image_name, image_name); +} + +LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect) +{ + LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, IMMEDIATE_YES); + return loadUIImage(imagep, name, use_mips, scale_rect); +} + +LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, BOOL use_mips, const LLRect& scale_rect) +{ + LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, IMMEDIATE_YES); + return loadUIImage(imagep, id.asString(), use_mips, scale_rect); +} + +LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect) +{ + if (!imagep) return NULL; + + imagep->setAddressMode(LLTexUnit::TAM_CLAMP); + + //all UI images are non-deletable + imagep->setNoDelete() ; + + LLUIImagePtr new_imagep = new LLUIImage(name, imagep); + mUIImages.insert(std::make_pair(name, new_imagep)); + mUITextureList.push_back(imagep) ; + + LLUIImageLoadData* datap = new LLUIImageLoadData; + datap->mImageName = name; + datap->mImageScaleRegion = scale_rect; + + imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap); + + return new_imagep; +} + +LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect) +{ + // look for existing image + uuid_ui_image_map_t::iterator found_it = mUIImages.find(name); + if (found_it != mUIImages.end()) + { + // image already loaded! + llerrs << "UI Image " << name << " already loaded." << llendl; + } + + return loadUIImageByName(name, filename, use_mips, scale_rect); +} + +//static +void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* user_data ) +{ + if(!success || !user_data) + { + return; + } + + LLUIImageLoadData* image_datap = (LLUIImageLoadData*)user_data; + std::string ui_image_name = image_datap->mImageName; + LLRect scale_rect = image_datap->mImageScaleRegion; + if (final) + { + delete image_datap; + } + + LLUIImageList* instance = getInstance(); + + uuid_ui_image_map_t::iterator found_it = instance->mUIImages.find(ui_image_name); + if (found_it != instance->mUIImages.end()) + { + LLUIImagePtr imagep = found_it->second; + + // for images grabbed from local files, apply clipping rectangle to restore original dimensions + // from power-of-2 gl image + if (success && imagep.notNull() && src_vi && !src_vi->getLocalFileName().empty()) + { + F32 clip_x = (F32)src_vi->getOriginalWidth() / (F32)src_vi->getFullWidth(); + F32 clip_y = (F32)src_vi->getOriginalHeight() / (F32)src_vi->getFullHeight(); + imagep->setClipRegion(LLRectf(0.f, clip_y, clip_x, 0.f)); + if (scale_rect != LLRect::null) + { + imagep->setScaleRegion( + LLRectf(llclamp((F32)scale_rect.mLeft / (F32)imagep->getWidth(), 0.f, 1.f), + llclamp((F32)scale_rect.mTop / (F32)imagep->getHeight(), 0.f, 1.f), + llclamp((F32)scale_rect.mRight / (F32)imagep->getWidth(), 0.f, 1.f), + llclamp((F32)scale_rect.mBottom / (F32)imagep->getHeight(), 0.f, 1.f))); + } + } + } +} + +struct UIImageDeclaration : public LLInitParam::Block +{ + Mandatory name; + Optional file_name; + Optional preload; + Optional scale_rect; + Optional use_mips; + + UIImageDeclaration() + : name("name"), + file_name("file_name"), + preload("preload", false), + scale_rect("scale"), + use_mips("use_mips", false) + {} +}; + +struct UIImageDeclarations : public LLInitParam::Block +{ + Mandatory version; + Multiple textures; + + UIImageDeclarations() + : version("version"), + textures("texture") + {} +}; + +bool LLUIImageList::initFromFile() +{ + // construct path to canonical textures.xml in default skin dir + std::string base_file_path = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "default", "textures", "textures.xml"); + + LLXMLNodePtr root; + + if (!LLXMLNode::parseFile(base_file_path, root, NULL)) + { + llwarns << "Unable to parse UI image list file " << base_file_path << llendl; + return false; + } + + std::vector paths; + // path to current selected skin + paths.push_back(gDirUtilp->getSkinDir() + + gDirUtilp->getDirDelimiter() + + "textures" + + gDirUtilp->getDirDelimiter() + + "textures.xml"); + // path to user overrides on current skin + paths.push_back(gDirUtilp->getUserSkinDir() + + gDirUtilp->getDirDelimiter() + + "textures" + + gDirUtilp->getDirDelimiter() + + "textures.xml"); + + // apply skinned xml files incrementally + for(std::vector::iterator path_it = paths.begin(); + path_it != paths.end(); + ++path_it) + { + // don't reapply base file to itself + if (!path_it->empty() && (*path_it) != base_file_path) + { + LLXMLNodePtr update_root; + if (LLXMLNode::parseFile(*path_it, update_root, NULL)) + { + LLXMLNode::updateNode(root, update_root); + } + } + } + + UIImageDeclarations images; + LLXUIParser::instance().readXUI(root, images); + + if (!images.validateBlock()) return false; + + enum e_decode_pass + { + PASS_DECODE_NOW, + PASS_DECODE_LATER, + NUM_PASSES + }; + + for (S32 cur_pass = PASS_DECODE_NOW; cur_pass < NUM_PASSES; cur_pass++) + { + for (LLInitParam::ParamIterator::const_iterator image_it = images.textures().begin(); + image_it != images.textures().end(); + ++image_it) + { + std::string file_name = image_it->file_name.isProvided() ? image_it->file_name() : image_it->name(); + + // load high priority textures on first pass (to kick off decode) + enum e_decode_pass decode_pass = image_it->preload ? PASS_DECODE_NOW : PASS_DECODE_LATER; + if (decode_pass != cur_pass) + { + continue; + } + preloadUIImage(image_it->name, file_name, image_it->use_mips, image_it->scale_rect); + } + + if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload")) + { + gTextureList.decodeAllImages(10.f); // decode preloaded images + } + } + return true; +} + + -- cgit v1.3 From ca51e8f33dfa0cd455438f11902fb1d839bf6206 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 27 Jul 2009 16:50:01 +0000 Subject: Merge xui-army-8 to pick up 2+ weeks of art, colors, and dialog layout changes. svn merge -r128075:128364 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/xui-army-8 --- indra/llui/lllineeditor.cpp | 1 + indra/llui/llspinctrl.cpp | 18 +- indra/llui/llspinctrl.h | 4 + indra/newview/app_settings/settings.xml | 78 ++- .../newview/app_settings/settings_per_account.xml | 23 +- indra/newview/llappviewer.cpp | 8 +- indra/newview/llappviewer.h | 4 +- indra/newview/llfirstuse.cpp | 4 +- indra/newview/llfirstuse.h | 2 +- indra/newview/llfloaterchat.cpp | 7 +- indra/newview/llfloaterchat.h | 8 + indra/newview/llfloaterpreference.cpp | 96 +++- indra/newview/llfloaterpreference.h | 5 +- indra/newview/llimpanel.cpp | 22 +- indra/newview/lllocationhistory.cpp | 5 + indra/newview/lllocationhistory.h | 1 + indra/newview/llnavigationbar.cpp | 18 +- indra/newview/llnavigationbar.h | 6 +- indra/newview/llpanelgroupgeneral.cpp | 7 +- indra/newview/llpanelgroupgeneral.h | 1 - indra/newview/llpanelpermissions.cpp | 84 +--- indra/newview/llstartup.cpp | 7 +- indra/newview/llteleporthistory.cpp | 8 + indra/newview/llteleporthistory.h | 3 +- indra/newview/lltoolpie.cpp | 8 +- indra/newview/llviewerdisplay.cpp | 4 +- indra/newview/llviewerparcelmedia.cpp | 6 +- indra/newview/llviewerparcelmgr.cpp | 9 +- indra/newview/llviewertexturelist.cpp | 12 +- indra/newview/llvoavatar.cpp | 7 +- indra/newview/skins/default/colors.xml | 8 +- .../default/textures/bottomtray/DownArrow.png | Bin 0 -> 139 bytes .../default/textures/bottomtray/Unread_IM.png | Bin 0 -> 297 bytes .../default/textures/bottomtray/VoicePTT_Lvl1.png | Bin 0 -> 557 bytes .../default/textures/bottomtray/VoicePTT_Lvl2.png | Bin 0 -> 663 bytes .../default/textures/bottomtray/VoicePTT_Lvl3.png | Bin 0 -> 607 bytes .../default/textures/bottomtray/VoicePTT_Off.png | Bin 0 -> 461 bytes .../default/textures/bottomtray/VoicePTT_On.png | Bin 0 -> 451 bytes .../containers/Accordion_ArrowOpened_Off.png | Bin 0 -> 169 bytes .../skins/default/textures/icons/AddItem_Off.png | Bin 0 -> 184 bytes .../skins/default/textures/icons/AddItem_Over.png | Bin 0 -> 165 bytes .../skins/default/textures/icons/AddItem_Press.png | Bin 0 -> 181 bytes .../skins/default/textures/icons/BackArrow_Off.png | Bin 0 -> 227 bytes .../default/textures/icons/BackArrow_Over.png | Bin 0 -> 214 bytes .../newview/skins/default/textures/icons/Info.png | Bin 0 -> 351 bytes .../default/textures/icons/OptionsMenu_Off.png | Bin 0 -> 336 bytes .../default/textures/icons/OptionsMenu_Over.png | Bin 0 -> 277 bytes .../default/textures/icons/OptionsMenu_Press.png | Bin 0 -> 318 bytes .../skins/default/textures/icons/TrashItem_Off.png | Bin 0 -> 201 bytes .../default/textures/icons/TrashItem_Over.png | Bin 0 -> 201 bytes .../default/textures/icons/TrashItem_Press.png | Bin 0 -> 201 bytes .../skins/default/textures/icons/VoicePTT_Lvl1.png | Bin 0 -> 557 bytes .../skins/default/textures/icons/VoicePTT_Lvl2.png | Bin 0 -> 663 bytes .../skins/default/textures/icons/VoicePTT_Lvl3.png | Bin 0 -> 607 bytes .../skins/default/textures/icons/VoicePTT_Off.png | Bin 0 -> 461 bytes .../skins/default/textures/icons/VoicePTT_On.png | Bin 0 -> 451 bytes .../textures/taskpanel/TabIcon_Close_Off.png | Bin 0 -> 305 bytes .../textures/taskpanel/TabIcon_Home_Off.png | Bin 0 -> 228 bytes .../textures/taskpanel/TabIcon_Home_Selected.png | Bin 0 -> 291 bytes .../default/textures/taskpanel/TabIcon_Me_Off.png | Bin 0 -> 307 bytes .../textures/taskpanel/TabIcon_Me_Selected.png | Bin 0 -> 452 bytes .../textures/taskpanel/TabIcon_Open_Off.png | Bin 0 -> 294 bytes .../textures/taskpanel/TabIcon_People_Off.png | Bin 0 -> 361 bytes .../textures/taskpanel/TabIcon_People_Selected.png | Bin 0 -> 599 bytes .../textures/taskpanel/TabIcon_Places_Off.png | Bin 0 -> 350 bytes .../textures/taskpanel/TabIcon_Places_Selected.png | Bin 0 -> 476 bytes .../textures/taskpanel/TabIcon_Things_Off.png | Bin 0 -> 223 bytes .../textures/taskpanel/TabIcon_Things_Selected.png | Bin 0 -> 297 bytes indra/newview/skins/default/textures/textures.xml | 108 ++++- .../widgets/DisclosureArrow_Closed_Over.png | Bin 0 -> 164 bytes .../widgets/DisclosureArrow_Opened_Off.png | Bin 0 -> 173 bytes .../widgets/DisclosureArrow_Opened_Over.png | Bin 0 -> 165 bytes .../default/textures/widgets/ListItem_Over.png | Bin 0 -> 244 bytes .../default/textures/widgets/ListItem_Select.png | Bin 0 -> 251 bytes .../default/textures/widgets/Stepper_Down_Off.png | Bin 0 -> 300 bytes .../default/textures/widgets/Stepper_Down_Over.png | Bin 0 -> 310 bytes .../textures/widgets/Stepper_Down_Press.png | Bin 0 -> 343 bytes .../default/textures/widgets/Stepper_Up_Off.png | Bin 0 -> 315 bytes .../default/textures/widgets/Stepper_Up_Over.png | Bin 0 -> 314 bytes .../default/textures/widgets/Stepper_Up_Press.png | Bin 0 -> 384 bytes .../skins/default/textures/world/NoEntryLines.png | Bin 0 -> 832 bytes .../default/textures/world/NoEntryPassLines.png | Bin 0 -> 1267 bytes .../newview/skins/default/xui/en/floater_about.xml | 2 +- .../skins/default/xui/en/floater_about_land.xml | 10 +- .../skins/default/xui/en/floater_buy_contents.xml | 34 +- .../skins/default/xui/en/floater_buy_land.xml | 22 +- .../skins/default/xui/en/floater_buy_object.xml | 22 +- .../skins/default/xui/en/floater_gesture.xml | 4 +- .../skins/default/xui/en/floater_god_tools.xml | 2 +- .../skins/default/xui/en/floater_land_holdings.xml | 8 +- .../default/xui/en/floater_live_lsleditor.xml | 2 +- .../skins/default/xui/en/floater_media_browser.xml | 211 ++++----- .../skins/default/xui/en/floater_preferences.xml | 17 +- .../default/xui/en/floater_preview_animation.xml | 40 +- .../skins/default/xui/en/floater_sell_land.xml | 4 +- .../default/xui/en/floater_test_line_editor.xml | 64 +++ .../newview/skins/default/xui/en/floater_tools.xml | 31 +- .../skins/default/xui/en/floater_world_map.xml | 4 +- indra/newview/skins/default/xui/en/menu_navbar.xml | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 44 +- .../newview/skins/default/xui/en/notifications.xml | 175 +++---- .../skins/default/xui/en/panel_edit_pick.xml | 11 +- .../skins/default/xui/en/panel_edit_profile.xml | 39 +- .../skins/default/xui/en/panel_group_general.xml | 151 +++--- .../default/xui/en/panel_group_land_money.xml | 99 ++-- .../skins/default/xui/en/panel_group_notices.xml | 164 +++---- .../skins/default/xui/en/panel_group_roles.xml | 164 +++---- .../skins/default/xui/en/panel_landmarks.xml | 40 +- indra/newview/skins/default/xui/en/panel_notes.xml | 76 ++- .../newview/skins/default/xui/en/panel_people.xml | 397 +++++++++------- .../skins/default/xui/en/panel_pick_info.xml | 25 +- indra/newview/skins/default/xui/en/panel_picks.xml | 75 +-- .../newview/skins/default/xui/en/panel_places.xml | 42 +- .../default/xui/en/panel_preferences_advanced.xml | 39 -- .../default/xui/en/panel_preferences_general.xml | 12 +- .../default/xui/en/panel_preferences_graphics1.xml | 123 +++-- .../newview/skins/default/xui/en/panel_profile.xml | 521 ++++++++++----------- .../skins/default/xui/en/panel_profile_view.xml | 9 +- .../skins/default/xui/en/panel_script_ed.xml | 2 +- .../skins/default/xui/en/panel_side_tray.xml | 8 +- indra/newview/skins/default/xui/en/strings.xml | 2 +- .../skins/default/xui/en/widgets/combo_box.xml | 2 +- .../skins/default/xui/en/widgets/line_editor.xml | 2 +- .../default/xui/en/widgets/location_input.xml | 7 +- .../skins/default/xui/en/widgets/spinner.xml | 15 +- 125 files changed, 1860 insertions(+), 1445 deletions(-) create mode 100644 indra/newview/skins/default/textures/bottomtray/DownArrow.png create mode 100644 indra/newview/skins/default/textures/bottomtray/Unread_IM.png create mode 100644 indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png create mode 100644 indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png create mode 100644 indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3.png create mode 100644 indra/newview/skins/default/textures/bottomtray/VoicePTT_Off.png create mode 100644 indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png create mode 100644 indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Off.png create mode 100644 indra/newview/skins/default/textures/icons/AddItem_Off.png create mode 100644 indra/newview/skins/default/textures/icons/AddItem_Over.png create mode 100644 indra/newview/skins/default/textures/icons/AddItem_Press.png create mode 100644 indra/newview/skins/default/textures/icons/BackArrow_Off.png create mode 100644 indra/newview/skins/default/textures/icons/BackArrow_Over.png create mode 100644 indra/newview/skins/default/textures/icons/Info.png create mode 100644 indra/newview/skins/default/textures/icons/OptionsMenu_Off.png create mode 100644 indra/newview/skins/default/textures/icons/OptionsMenu_Over.png create mode 100644 indra/newview/skins/default/textures/icons/OptionsMenu_Press.png create mode 100644 indra/newview/skins/default/textures/icons/TrashItem_Off.png create mode 100644 indra/newview/skins/default/textures/icons/TrashItem_Over.png create mode 100644 indra/newview/skins/default/textures/icons/TrashItem_Press.png create mode 100644 indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png create mode 100644 indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png create mode 100644 indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png create mode 100644 indra/newview/skins/default/textures/icons/VoicePTT_Off.png create mode 100644 indra/newview/skins/default/textures/icons/VoicePTT_On.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Close_Off.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Selected.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Off.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Open_Off.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_People_Off.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Off.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/ListItem_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/ListItem_Select.png create mode 100644 indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png create mode 100644 indra/newview/skins/default/textures/world/NoEntryLines.png create mode 100644 indra/newview/skins/default/textures/world/NoEntryPassLines.png create mode 100644 indra/newview/skins/default/xui/en/floater_test_line_editor.xml (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index d7c0cf4f7b..43c22cbf5d 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -115,6 +115,7 @@ LLLineEditor::Params::Params() mouse_opaque = true; addSynonym(select_on_focus, "select_all_on_focus_received"); addSynonym(border, "border"); + addSynonym(label, "watermark_text"); } LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 5893fcd64b..2d70432182 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -60,7 +60,9 @@ LLSpinCtrl::Params::Params() decimal_digits("decimal_digits"), allow_text_entry("allow_text_entry", true), text_enabled_color("text_enabled_color"), - text_disabled_color("text_disabled_color") + text_disabled_color("text_disabled_color"), + up_button("up_button"), + down_button("down_button") {} LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) @@ -103,38 +105,28 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) S32 btn_right = btn_left + spinctrl_btn_width; // Spin buttons - LLButton::Params up_button_params; - up_button_params.name(std::string("SpinCtrl Up")); + LLButton::Params up_button_params(p.up_button); up_button_params.rect .left(btn_left) .top(top) .right(btn_right) .height(spinctrl_btn_height); - up_button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM); - up_button_params.image_unselected.name("ScrollArrow_Up"); - up_button_params.image_selected.name("ScrollArrow_Up"); up_button_params.click_callback.function(boost::bind(&LLSpinCtrl::onUpBtn, this, _2)); up_button_params.mouse_held_callback.function(boost::bind(&LLSpinCtrl::onUpBtn, this, _2)); - up_button_params.tab_stop(false); mUpBtn = LLUICtrlFactory::create(up_button_params); addChild(mUpBtn); LLRect down_rect( btn_left, top - spinctrl_btn_height, btn_right, bottom ); - LLButton::Params down_button_params; - down_button_params.name(std::string("SpinCtrl Down")); + LLButton::Params down_button_params(p.down_button); down_button_params.rect .left(btn_left) .right(btn_right) .bottom(bottom) .height(spinctrl_btn_height); - down_button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM); - down_button_params.image_unselected.name("ScrollArrow_Down"); - down_button_params.image_selected.name("ScrollArrow_Down"); down_button_params.click_callback.function(boost::bind(&LLSpinCtrl::onDownBtn, this, _2)); down_button_params.mouse_held_callback.function(boost::bind(&LLSpinCtrl::onDownBtn, this, _2)); - down_button_params.tab_stop(false); mDownBtn = LLUICtrlFactory::create(down_button_params); addChild(mDownBtn); diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index eb1a2eb8a7..0e610b7741 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -35,6 +35,7 @@ #include "stdtypes.h" +#include "llbutton.h" #include "llf32uictrl.h" #include "v4color.h" #include "llrect.h" @@ -53,6 +54,9 @@ public: Optional text_enabled_color; Optional text_disabled_color; + Optional up_button; + Optional down_button; + Params(); }; protected: diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ced072efaa..cb30cada70 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -276,7 +276,7 @@ Value 0.5 - AudioStreaming + AudioSteamingMedia Comment Enable streaming @@ -1112,6 +1112,28 @@ Value + 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 + Persist + 1 + Type + String + Value + + CacheSize Comment @@ -2753,6 +2775,17 @@ Boolean Value 0 + + FirstSelectedEnabledPopups + + Comment + Return false if there is not enable popup selected in the list of floater preferences popups + Persist + 0 + Type + Boolean + Value + 0 FixedWeather @@ -4617,6 +4650,17 @@ Value + NewCacheLocationTopFolder + + Comment + Change the top folder location of the local disk cache to this + Persist + 1 + Type + String + Value + + NextLoginLocation Comment @@ -5887,7 +5931,7 @@ Value 0 - RenderHideGroupTitleAll + RenderShowGroupTitleAll Comment Show group titles in name labels @@ -5896,7 +5940,7 @@ Type Boolean Value - 0 + 1 RenderInitError @@ -5964,17 +6008,6 @@ Value 512 - RenderName - - Comment - Controls display of names above avatars (0 = never, 1 = fade, 2 = always) - Persist - 1 - Type - S32 - Value - 2 - RenderNameFadeDuration Comment @@ -5986,16 +6019,16 @@ Value 1.0 - RenderNameHideSelf + RenderNameShowSelf Comment - Don't display own name above avatar + Display own name above avatar Persist 1 Type Boolean Value - 0 + 1 RenderNameShowTime @@ -6607,6 +6640,17 @@ Boolean Value 0 + + AvatarNameTagMode + + Comment + Select Avatar Name Tag Mode + Persist + 1 + Type + S32 + Value + 1 ShowAxes diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index dab88a5ec3..893e7acd7a 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -22,17 +22,28 @@ Value |TOKEN COPY BusyModeResponse| - IMLogTimestamp + IMLogOptions Comment - Log Timestamp of Instant Messages + Log options for Instant Messages Persist 1 Type - Boolean + S32 Value - 1 + 2 + InstantMessageLogFolder + + Comment + Top level folder to your log files. + Persist + 1 + Type + String + Value + + InstantMessageLogPath Comment @@ -77,10 +88,10 @@ Value 0 - LogChatTimestamp + LogTimestamp Comment - Log Timestamp of Chat + Log Timestamp Persist 1 Type diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 51b6fc81cd..2299a439e6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1775,7 +1775,7 @@ bool LLAppViewer::initConfiguration() LLFirstUse::addConfigVariable("FirstMap"); LLFirstUse::addConfigVariable("FirstGoTo"); LLFirstUse::addConfigVariable("FirstBuild"); - LLFirstUse::addConfigVariable("FirstLeftClickNoHit"); +// LLFirstUse::addConfigVariable("FirstLeftClickNoHit"); LLFirstUse::addConfigVariable("FirstTeleport"); LLFirstUse::addConfigVariable("FirstOverrideKeys"); LLFirstUse::addConfigVariable("FirstAttach"); @@ -1999,7 +1999,9 @@ bool LLAppViewer::initConfiguration() const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) { - gDirUtilp->setSkinFolder(skinfolder->getValue().asString()); + // hack to force the skin to default. + //gDirUtilp->setSkinFolder(skinfolder->getValue().asString()); + gDirUtilp->setSkinFolder("default"); } mYieldTime = gSavedSettings.getS32("YieldTime"); @@ -2874,12 +2876,14 @@ bool LLAppViewer::initCache() gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")); purgeCache(); // purge old cache gSavedSettings.setString("CacheLocation", new_cache_location); + gSavedSettings.setString("CacheLocationTopFolder", gDirUtilp->getBaseFileName(new_cache_location)); } if (!gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"))) { LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL; gSavedSettings.setString("CacheLocation", ""); + gSavedSettings.setString("CacheLocationTopFolder", ""); } if (mPurgeCache) diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 7bda16d256..bbc2b646c4 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -161,6 +161,8 @@ public: LLAllocator & getAllocator() { return mAlloc; } + void purgeCache(); // Clear the local cache. + protected: virtual bool initWindow(); // Initialize the viewer's window. virtual bool initLogging(); // Initialize log files, logging system, return false on failure. @@ -182,7 +184,7 @@ private: void initGridChoice(); bool initCache(); // Initialize local client cache. - void purgeCache(); // Clear the local cache. + // We have switched locations of both Mac and Windows cache, make sure // files migrate and old cache is cleared out. diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 352ca3c863..de079b7123 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -145,7 +145,7 @@ void LLFirstUse::useBuild() LLNotifications::instance().add("FirstBuild"); } } - +/* // static void LLFirstUse::useLeftClickNoHit() { @@ -156,7 +156,7 @@ void LLFirstUse::useLeftClickNoHit() LLNotifications::instance().add("FirstLeftClickNoHit"); } } - +*/ // static void LLFirstUse::useTeleport() { diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h index bb64cdd2c6..7b4f9f516f 100644 --- a/indra/newview/llfirstuse.h +++ b/indra/newview/llfirstuse.h @@ -95,7 +95,7 @@ public: static void useMap(); static void useGoTo(); static void useBuild(); - static void useLeftClickNoHit(); +// static void useLeftClickNoHit(); static void useTeleport(); static void useOverrideKeys(); static void useAttach(); diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index dd0df15348..1ecbdd8e16 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -85,6 +85,7 @@ const F32 INSTANT_MSG_SIZE = 8.0f; const F32 CHAT_MSG_SIZE = 8.0f; + // // Global statics // @@ -203,7 +204,7 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& void log_chat_text(const LLChat& chat) { std::string histstr; - if (gSavedPerAccountSettings.getBOOL("LogChatTimestamp")) + if (gSavedPerAccountSettings.getBOOL("LogTimestamp")) histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + chat.mText; else histstr = chat.mText; @@ -213,7 +214,7 @@ void log_chat_text(const LLChat& chat) // static void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) { - if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file) + if ( (gSavedPerAccountSettings.getS32("IMLogOptions")!=LOG_IM) && log_to_file) { log_chat_text(chat); } @@ -367,7 +368,7 @@ void LLFloaterChat::addChat(const LLChat& chat, } } - if(from_instant_message && gSavedPerAccountSettings.getBOOL("LogChatIM")) + if(from_instant_message && (gSavedPerAccountSettings.getS32("IMLogOptions")== LOG_BOTH_TOGETHER)) log_chat_text(chat); if(from_instant_message && gSavedSettings.getBOOL("IMInChatHistory")) diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h index 042d270aa6..b299d1ad10 100644 --- a/indra/newview/llfloaterchat.h +++ b/indra/newview/llfloaterchat.h @@ -51,6 +51,14 @@ class LLLogChat; class LLVector3d; class LLWindow; +enum ELogOptions +{ + LOG_CHAT = 0, + LOG_IM = 1, + LOG_BOTH_TOGETHER = 2, + LOG_BOTH_SEPARATE = 3 +}; + class LLFloaterChat : public LLFloater { public: diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index f6a50057bc..903471ea94 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -58,6 +58,7 @@ #include "llfloatervoicedevicesettings.h" #include "llkeyboard.h" #include "llmodaldialog.h" +#include "llnavigationbar.h" #include "llpanellogin.h" #include "llradiogroup.h" #include "llsky.h" @@ -169,6 +170,7 @@ void LLVoiceSetKeyDialog::onCancel(void* user_data) void free_web_media(LLMediaBase *media_source); void handleHTMLLinkColorChanged(const LLSD& newvalue); +void handleNameTagOptionChanged(const LLSD& newvalue); LLMediaBase *get_web_media(); bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response); @@ -220,11 +222,20 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response S32 option = LLNotification::getSelectedOption(notification, response); if ( option == 0 ) // YES { + // clean web LLMediaBase *media_source = get_web_media(); if (media_source) media_source->clearCache(); free_web_media(media_source); + + // clean nav bar history + LLNavigationBar::getInstance()->clearHistoryCache(); + + // flag client texture cache for clearing next time the client runs + gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE); + LLNotifications::instance().add("CacheWillClear"); } + return false; } @@ -234,6 +245,18 @@ void handleHTMLLinkColorChanged(const LLSD& newvalue) LLStyleMap::instance().update(); } +void handleNameTagOptionChanged(const LLSD& newvalue) +{ + S32 name_tag_option = S32(newvalue); + if(name_tag_option==2) + { + gSavedSettings.setBOOL("SmallAvatarNames", TRUE); + } + else + { + gSavedSettings.setBOOL("SmallAvatarNames", FALSE); + } +} bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) { @@ -314,8 +337,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this)); mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this)); - mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, (void*)NULL)); - mCommitCallbackRegistrar.add("Pref.WebClearCache", boost::bind(&LLFloaterPreference::onClickBrowserClearCache, (void*)NULL)); +// mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, this)); + mCommitCallbackRegistrar.add("Pref.WebClearCache", boost::bind(&LLFloaterPreference::onClickBrowserClearCache, this)); mCommitCallbackRegistrar.add("Pref.SetCache", boost::bind(&LLFloaterPreference::onClickSetCache, this)); mCommitCallbackRegistrar.add("Pref.ResetCache", boost::bind(&LLFloaterPreference::onClickResetCache, this)); mCommitCallbackRegistrar.add("Pref.ClickSkin", boost::bind(&LLFloaterPreference::onClickSkin, this,_1, _2)); @@ -325,6 +348,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.ClickSkipDialogs", boost::bind(&LLFloaterPreference::onClickSkipDialogs, this)); mCommitCallbackRegistrar.add("Pref.ClickResetDialogs", boost::bind(&LLFloaterPreference::onClickResetDialogs, this)); mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this)); + mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this)); mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this)); mCommitCallbackRegistrar.add("Pref.Logging", boost::bind(&LLFloaterPreference::onCommitLogging, this)); mCommitCallbackRegistrar.add("Pref.OpenHelp", boost::bind(&LLFloaterPreference::onOpenHelp, this)); @@ -338,6 +362,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this)); mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); + gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); } BOOL LLFloaterPreference::postBuild() @@ -345,6 +370,8 @@ BOOL LLFloaterPreference::postBuild() LLTabContainer* tabcontainer = getChild("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); + S32 show_avatar_nametag_options = gSavedSettings.getS32("AvatarNameTagMode"); + handleNameTagOptionChanged(LLSD(show_avatar_nametag_options)); return TRUE; } @@ -366,6 +393,10 @@ void LLFloaterPreference::draw() { BOOL has_first_selected = (getChildRef("disabled_popups").getFirstSelected()!=NULL); gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected); + + has_first_selected = (getChildRef("enabled_popups").getFirstSelected()!=NULL); + gSavedSettings.setBOOL("FirstSelectedEnabledPopups", has_first_selected); + LLFloater::draw(); } @@ -622,17 +653,16 @@ void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl) m1->setVisible(two_digits); m2->setVisible(!two_digits); } - -// static -void LLFloaterPreference::onClickClearCache(void*) +/* +void LLFloaterPreference::onClickClearCache() { // flag client cache for clearing next time the client runs gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE); LLNotifications::instance().add("CacheWillClear"); } +*/ -// static -void LLFloaterPreference::onClickBrowserClearCache(void*) +void LLFloaterPreference::onClickBrowserClearCache() { LLNotifications::instance().add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache); } @@ -640,6 +670,8 @@ void LLFloaterPreference::onClickBrowserClearCache(void*) void LLFloaterPreference::onClickSetCache() { std::string cur_name(gSavedSettings.getString("CacheLocation")); +// std::string cur_top_folder(gDirUtilp->getBaseFileName(cur_name)); + std::string proposed_name(cur_name); LLDirPicker& picker = LLDirPicker::instance(); @@ -651,14 +683,17 @@ void LLFloaterPreference::onClickSetCache() std::string dir_name = picker.getDirName(); if (!dir_name.empty() && dir_name != cur_name) { - childSetText("cache_location", dir_name); + std::string new_top_folder(gDirUtilp->getBaseFileName(dir_name)); LLNotifications::instance().add("CacheWillBeMoved"); gSavedSettings.setString("NewCacheLocation", dir_name); + gSavedSettings.setString("NewCacheLocationTopFolder", new_top_folder); } else { std::string cache_location = gDirUtilp->getCacheDir(); - childSetText("cache_location", cache_location); + gSavedSettings.setString("CacheLocation", cache_location); + std::string top_folder(gDirUtilp->getBaseFileName(cache_location)); + gSavedSettings.setString("CacheLocationTopFolder", top_folder); } } @@ -667,10 +702,13 @@ void LLFloaterPreference::onClickResetCache() if (!gSavedSettings.getString("CacheLocation").empty()) { gSavedSettings.setString("NewCacheLocation", ""); + gSavedSettings.setString("NewCacheLocationTopFolder", ""); LLNotifications::instance().add("CacheWillBeMoved"); } std::string cache_location = gDirUtilp->getCacheDir(true); - childSetText("cache_location", cache_location); + gSavedSettings.setString("CacheLocation", cache_location); + std::string top_folder(gDirUtilp->getBaseFileName(cache_location)); + gSavedSettings.setString("CacheLocationTopFolder", top_folder); } void LLFloaterPreference::onClickSkin(LLUICtrl* ctrl, const LLSD& userdata) @@ -1008,6 +1046,22 @@ void LLFloaterPreference::onClickEnablePopup() buildLists(this); } +void LLFloaterPreference::onClickDisablePopup() +{ + LLScrollListCtrl& enabled_popups = getChildRef("enabled_popups"); + + std::vector items = enabled_popups.getAllSelected(); + std::vector::iterator itor; + for (itor = items.begin(); itor != items.end(); ++itor) + { + LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate(*(std::string*)((*itor)->getUserdata())); + //gSavedSettings.setWarning(templatep->mName, TRUE); + std::string notification_name = templatep->mName; + LLUI::sSettingGroups["ignores"]->setBOOL(notification_name, FALSE); + } + + buildLists(this); +} void LLFloaterPreference::resetAllIgnored() { for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin(); @@ -1036,15 +1090,17 @@ void LLFloaterPreference::setAllIgnored() void LLFloaterPreference::onClickLogPath() { - std::string proposed_name(childGetText("log_path_string")); + std::string proposed_name(gSavedPerAccountSettings.getString("InstantMessageLogPath")); LLDirPicker& picker = LLDirPicker::instance(); if (!picker.getDir(&proposed_name ) ) { return; //Canceled! } - - childSetText("log_path_string", picker.getDirName()); + std::string chat_log_dir = picker.getDirName(); + std::string chat_log_top_folder= gDirUtilp->getBaseFileName(chat_log_dir); + gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir); + gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder); } void LLFloaterPreference::onCommitLogging() @@ -1054,15 +1110,17 @@ void LLFloaterPreference::onCommitLogging() void LLFloaterPreference::enableHistory() { - if (childGetValue("log_instant_messages").asBoolean() || childGetValue("log_chat").asBoolean()) + if (childGetValue("log_instant_messages").asBoolean()) { - childEnable("log_show_history"); + childEnable("ChatIMLogs"); childEnable("log_path_button"); + childEnable("show_timestamps_check_im"); } else { - childDisable("log_show_history"); + childDisable("ChatIMLogs"); childDisable("log_path_button"); + childDisable("show_timestamps_check_im"); } } @@ -1096,10 +1154,10 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im childEnable("send_im_to_email"); childSetValue("send_im_to_email", im_via_email); childEnable("log_instant_messages"); - childEnable("log_chat"); +// childEnable("log_chat"); childEnable("busy_response"); - childEnable("log_instant_messages_timestamp"); - childEnable("log_chat_timestamp"); +// childEnable("log_instant_messages_timestamp"); +// childEnable("log_chat_timestamp"); childEnable("log_chat_IM"); childEnable("log_date_timestamp"); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index cf2ccdce6d..23e05a1ccf 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -87,8 +87,8 @@ protected: void onBtnApply(); void onOpenHelp(); - static void onClickClearCache(void*); - static void onClickBrowserClearCache(void*); +// void onClickClearCache(); + void onClickBrowserClearCache(); // if the custom settings box is clicked void onChangeCustom(); @@ -112,6 +112,7 @@ public: void onClickSkipDialogs(); void onClickResetDialogs(); void onClickEnablePopup(); + void onClickDisablePopup(); void resetAllIgnored(); void setAllIgnored(); void onClickLogPath(); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 0652119f18..5b4f711099 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1377,17 +1377,23 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 prepend_newline = false; } mHistoryEditor->appendColoredText(utf8msg, false, prepend_newline, color); - - if (log_to_file - && gSavedPerAccountSettings.getBOOL("LogInstantMessages") ) + S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions"); + if (log_to_file && (im_log_option!=LOG_CHAT)) { std::string histstr; - if (gSavedPerAccountSettings.getBOOL("IMLogTimestamp")) + if (gSavedPerAccountSettings.getBOOL("LogTimestamp")) histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + name + separator_string + utf8msg; else histstr = name + separator_string + utf8msg; - LLLogChat::saveHistory(getTitle(),histstr); + if(im_log_option==LOG_BOTH_TOGETHER) + { + LLLogChat::saveHistory(std::string("chat"),histstr); + } + else + { + LLLogChat::saveHistory(getTitle(),histstr); + } } if (!isInVisibleChain()) @@ -1922,19 +1928,19 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string { LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata; std::string message = line; - + S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions"); switch (type) { case LLLogChat::LOG_EMPTY: // add warning log enabled message - if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) + if (im_log_option!=LOG_CHAT) { message = LLTrans::getString("IM_logging_string"); } break; case LLLogChat::LOG_END: // add log end message - if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) + if (im_log_option!=LOG_CHAT) { message = LLTrans::getString("IM_logging_string"); } diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index 179eca2532..ed56e3e195 100644 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -55,6 +55,11 @@ void LLLocationHistory::addItem(std::string item) mItems.erase(mItems.begin(), mItems.end()-max_items); } +void LLLocationHistory::removeItems() +{ + mItems.erase(mItems.begin(), mItems.end()); +} + bool LLLocationHistory::getMatchingItems(std::string substring, location_list_t& result) const { diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h index d2a959ae62..b6552c12ca 100644 --- a/indra/newview/lllocationhistory.h +++ b/indra/newview/lllocationhistory.h @@ -50,6 +50,7 @@ public: LLLocationHistory(); void addItem(std::string item); + void removeItems(); size_t getItemCount() const { return mItems.size(); } const location_list_t& getItems() const { return mItems; } bool getMatchingItems(std::string substring, location_list_t& result) const; diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index b4a6e63de8..fbeff2d628 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -176,7 +176,8 @@ LLNavigationBar::LLNavigationBar() mBtnHome(NULL), mBtnHelp(NULL), mCmbLocation(NULL), - mLeSearch(NULL) + mLeSearch(NULL), + mPurgeTPHistoryItems(false) { setIsChrome(TRUE); @@ -247,6 +248,12 @@ BOOL LLNavigationBar::postBuild() void LLNavigationBar::draw() { + if(mPurgeTPHistoryItems) + { + LLTeleportHistory::getInstance()->purgeItems(); + onTeleportHistoryChanged(); + mPurgeTPHistoryItems = false; + } LLPanel::draw(); } @@ -531,3 +538,12 @@ void LLNavigationBar::invokeSearch(std::string search_text) { LLFloaterReg::showInstance("search", LLSD().insert("panel", "all").insert("id", LLSD(search_text))); } + +void LLNavigationBar::clearHistoryCache() +{ + mCmbLocation->removeall(); + LLLocationHistory* lh = LLLocationHistory::getInstance(); + lh->removeItems(); + lh->save(); + mPurgeTPHistoryItems= true; +} diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 4c8375839e..846040e506 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -59,14 +59,15 @@ public: /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); void handleLoginComplete(); - + void clearHistoryCache(); + private: LLNavigationBar(); void rebuildTeleportHistoryMenu(); void showTeleportHistoryMenu(); void invokeSearch(std::string search_text); - + // callbacks bool onLocationContextMenuItemEnabled(const LLSD& userdata); void onLocationContextMenuItemClicked(const LLSD& userdata); @@ -98,6 +99,7 @@ private: LLButton* mBtnHelp; LLLineEditor* mLeSearch; LLLocationInputCtrl* mCmbLocation; + bool mPurgeTPHistoryItems; }; #endif diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 6f8d161001..b1b464b4e4 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -216,8 +216,7 @@ BOOL LLPanelGroupGeneral::postBuild() } mIncompleteMemberDataStr = getString("incomplete_member_data_str"); - mConfirmGroupCreateStr = getString("confirm_group_create_str"); - + // If the group_id is null, then we are creating a new group if (mGroupID.isNull()) { @@ -450,9 +449,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) return false; } - LLSD args; - args["MESSAGE"] = mConfirmGroupCreateStr; - LLNotifications::instance().add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); + LLNotifications::instance().add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); return false; } diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 5d673d5219..c04b40819d 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -87,7 +87,6 @@ private: BOOL mChanged; BOOL mFirstUse; std::string mIncompleteMemberDataStr; - std::string mConfirmGroupCreateStr; LLUUID mDefaultIconID; // Group information (include any updates in updateChanged) diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 96e8cbfd71..371c0f2df3 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -53,7 +53,6 @@ #include "llagent.h" #include "llstatusbar.h" // for getBalance() #include "lllineeditor.h" -#include "llradiogroup.h" #include "llcombobox.h" #include "lluiconstants.h" #include "lldbstrings.h" @@ -63,6 +62,7 @@ #include "llnamebox.h" #include "llviewercontrol.h" #include "lluictrlfactory.h" +#include "llspinctrl.h" #include "roles_constants.h" ///---------------------------------------------------------------------------- @@ -100,6 +100,8 @@ BOOL LLPanelPermissions::postBuild() childSetCommitCallback("checkbox for sale",LLPanelPermissions::onCommitSaleInfo,this); childSetCommitCallback("sale type",LLPanelPermissions::onCommitSaleType,this); + + childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSaleInfo, this); childSetCommitCallback("checkbox next owner can modify",LLPanelPermissions::onCommitNextOwnerModify,this); childSetCommitCallback("checkbox next owner can copy",LLPanelPermissions::onCommitNextOwnerCopy,this); @@ -208,12 +210,9 @@ void LLPanelPermissions::refresh() childSetValue("search_check", FALSE); childSetEnabled("search_check", false); - LLRadioGroup* RadioSaleType = getChild("sale type"); - if(RadioSaleType) - { - RadioSaleType->setSelectedIndex(-1); - RadioSaleType->setEnabled(FALSE); - } + LLComboBox* combo_sale_type = getChild("sale type"); + combo_sale_type->setValue(LLSaleInfo::FS_COPY); + combo_sale_type->setEnabled(FALSE); childSetEnabled("Cost",false); childSetText("Cost",getString("Cost Default")); @@ -417,22 +416,22 @@ void LLPanelPermissions::refresh() childSetText("Cost",getString("Cost Default")); } - LLLineEditor *editPrice = getChild("Edit Cost"); - if(keyboard_focus_view != editPrice) + LLSpinCtrl *edit_price = getChild("Edit Cost"); + if(!edit_price->hasFocus()) { // If the sale price is mixed then set the cost to MIXED, otherwise // set to the actual cost. if (num_for_sale > 0 && is_for_sale_mixed) { - childSetText("Edit Cost",getString("Sale Mixed")); + edit_price->setTentative(TRUE); } else if (num_for_sale > 0 && is_sale_price_mixed) { - childSetText("Edit Cost",getString("Cost Mixed")); + edit_price->setTentative(TRUE); } else { - childSetText("Edit Cost",llformat("%d",individual_sale_price)); + edit_price->setValue(individual_sale_price); } } // The edit fields are only enabled if you can sell this object @@ -742,20 +741,17 @@ void LLPanelPermissions::refresh() BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); LLSaleInfo::EForSale sale_type = sale_info.getSaleType(); - LLRadioGroup* RadioSaleType = getChild("sale type"); - if(RadioSaleType) + LLComboBox* combo_sale_type = getChild("sale type"); + if (valid_sale_info) { - if (valid_sale_info) - { - RadioSaleType->setSelectedIndex((S32)sale_type - 1); - RadioSaleType->setTentative(FALSE); // unfortunately this doesn't do anything at the moment. - } - else - { - // default option is sell copy, determined to be safest - RadioSaleType->setSelectedIndex((S32)LLSaleInfo::FS_COPY - 1); - RadioSaleType->setTentative(TRUE); // unfortunately this doesn't do anything at the moment. - } + combo_sale_type->setValue(sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type); + combo_sale_type->setTentative(FALSE); // unfortunately this doesn't do anything at the moment. + } + else + { + // default option is sell copy, determined to be safest + combo_sale_type->setValue(LLSaleInfo::FS_COPY); + combo_sale_type->setTentative(TRUE); // unfortunately this doesn't do anything at the moment. } childSetValue("checkbox for sale", num_for_sale != 0); @@ -991,44 +987,14 @@ void LLPanelPermissions::setAllSaleInfo() // Set the sale type if the object(s) are for sale. if(checkPurchase && checkPurchase->get()) { - LLRadioGroup* RadioSaleType = getChild("sale type"); - if(RadioSaleType) - { - switch(RadioSaleType->getSelectedIndex()) - { - case 0: - sale_type = LLSaleInfo::FS_ORIGINAL; - break; - case 1: - sale_type = LLSaleInfo::FS_COPY; - break; - case 2: - sale_type = LLSaleInfo::FS_CONTENTS; - break; - default: - sale_type = LLSaleInfo::FS_COPY; - break; - } - } + sale_type = static_cast(getChild("sale type")->getValue().asInteger()); } S32 price = -1; - LLLineEditor *editPrice = getChild("Edit Cost"); - if (editPrice) - { - // Don't extract the price if it's labeled as MIXED or is empty. - const std::string& editPriceString = editPrice->getText(); - if (editPriceString != getString("Cost Mixed") && editPriceString != getString("Sale Mixed") && - !editPriceString.empty()) - { - price = atoi(editPriceString.c_str()); - } - else - { - price = DEFAULT_PRICE; - } - } + LLSpinCtrl *edit_price = getChild("Edit Cost"); + price = (edit_price->getTentative()) ? DEFAULT_PRICE : edit_price->getValue().asInteger(); + // If somehow an invalid price, turn the sale off. if (price < 0) sale_type = LLSaleInfo::FS_NOT; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e6a2ab4ace..d0432e7961 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -891,10 +891,13 @@ bool idle_startup() } //Default the path if one isn't set. - if (gSavedPerAccountSettings.getString("InstantMessageLogPath").empty()) + if (gSavedPerAccountSettings.getString("InstantMessageLogFolder").empty()) { gDirUtilp->setChatLogsDir(gDirUtilp->getOSUserAppDir()); - gSavedPerAccountSettings.setString("InstantMessageLogPath",gDirUtilp->getChatLogsDir()); + std::string chat_log_dir = gDirUtilp->getChatLogsDir(); + std::string chat_log_top_folder=gDirUtilp->getBaseFileName(chat_log_dir); + gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir); + gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder); } else { diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index 99389017cb..9754568f56 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -172,6 +172,14 @@ void LLTeleportHistory::onHistoryChanged() mHistoryChangedSignal(); } +void LLTeleportHistory::purgeItems() +{ + mItems.erase(mItems.begin(), mItems.end()-1); + // reset the count + mRequestedItem = -1; + mCurrentItem = 0; +} + // static std::string LLTeleportHistory::getCurrentLocationTitle() { diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h index c68aabe9a1..775b21e24c 100644 --- a/indra/newview/llteleporthistory.h +++ b/indra/newview/llteleporthistory.h @@ -106,7 +106,7 @@ public: * @return history items. */ const slurl_list_t& getItems() const { return mItems; } - + void purgeItems(); /** * Is the history empty? * @@ -119,7 +119,6 @@ public: * Get index of the current location in the history. */ int getCurrentItemIndex() const { return mCurrentItem; } - /** * Set a callback to be called upon history changes. * diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index a937f156e8..350657538b 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -292,9 +292,11 @@ BOOL LLToolPie::pickLeftMouseDownCallback() return TRUE; } - // Could be first left-click on nothing - LLFirstUse::useLeftClickNoHit(); - + ////////// + // // Could be first left-click on nothing + // LLFirstUse::useLeftClickNoHit(); + ///////// + // Eat the event return LLTool::handleMouseDown(x, y, mask); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index c4ed4db3e2..f08c287529 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -312,8 +312,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLImageGL::updateStats(gFrameTimeSeconds); - LLVOAvatar::sRenderName = gSavedSettings.getS32("RenderName"); - LLVOAvatar::sRenderGroupTitles = !gSavedSettings.getBOOL("RenderHideGroupTitleAll"); + LLVOAvatar::sRenderName = gSavedSettings.getS32("AvatarNameTagMode"); + LLVOAvatar::sRenderGroupTitles = (gSavedSettings.getBOOL("RenderShowGroupTitleAll") && gSavedSettings.getS32("AvatarNameTagMode")); gPipeline.mBackfaceCull = TRUE; gFrameCount++; diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 57f7239a91..26e21133ac 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -208,7 +208,7 @@ void LLViewerParcelMedia::play(LLParcel* parcel) if (!parcel) return; - if (!gSavedSettings.getBOOL("AudioStreaming") || !gSavedSettings.getBOOL("AudioStreamingVideo")) + if (!gSavedSettings.getBOOL("AudioSteamingMedia") || !gSavedSettings.getBOOL("AudioStreamingVideo")) return; std::string media_url = parcel->getMediaURL(); @@ -389,8 +389,8 @@ bool callback_play_media(const LLSD& notification, const LLSD& response, LLParce if (option == 0) { gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); - if(!gSavedSettings.getBOOL("AudioStreaming")) - gSavedSettings.setBOOL("AudioStreaming", TRUE); + if(!gSavedSettings.getBOOL("AudioSteamingMedia")) + gSavedSettings.setBOOL("AudioSteamingMedia", TRUE); LLViewerParcelMedia::play(parcel); } else diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index a702d3a85d..65f341627a 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -143,8 +143,11 @@ LLViewerParcelMgr::LLViewerParcelMgr() mCollisionSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)]; resetSegments(mCollisionSegments); - mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("noentrylines.j2c"); - mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("noentrypasslines.j2c"); + // JC: Resolved a merge conflict here, eliminated + // mBlockedImage->setAddressMode(LLTexUnit::TAM_WRAP); + // because it is done in llviewertexturelist.cpp + mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png"); + mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png"); S32 overlay_size = mParcelsPerEdge * mParcelsPerEdge / PARCEL_OVERLAY_CHUNKS; sPackedOverlay = new U8[overlay_size]; @@ -1710,7 +1713,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use void optionally_start_music(const std::string& music_url) { - if (gSavedSettings.getBOOL("AudioStreamingMusic") && gSavedSettings.getBOOL("AudioStreaming")) + if (gSavedSettings.getBOOL("AudioStreamingMusic") && gSavedSettings.getBOOL("AudioSteamingMedia")) { // Make the user click the start button on the overlay bar. JC // llinfos << "Starting parcel music " << music_url << llendl; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index c96914975b..2f3ed0e68a 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -136,18 +136,26 @@ void LLViewerTextureList::doPreloadImages() image->setAddressMode(LLTexUnit::TAM_WRAP); mImagePreloads.insert(image); } - image = LLViewerTextureManager::getFetchedTextureFromFile("noentrylines.j2c", MIPMAP_YES, IMMEDIATE_YES); + image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", MIPMAP_YES, IMMEDIATE_YES); if (image) { image->setAddressMode(LLTexUnit::TAM_WRAP); mImagePreloads.insert(image); } - image = LLViewerTextureManager::getFetchedTextureFromFile("noentrypasslines.j2c", MIPMAP_YES, IMMEDIATE_YES); + else + { + llinfos << "JAMESDEBUG" << llendl; + } + image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", MIPMAP_YES, IMMEDIATE_YES); if (image) { image->setAddressMode(LLTexUnit::TAM_WRAP); mImagePreloads.insert(image); } + else + { + llinfos << "JAMESDEBUG" << llendl; + } image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, IMMEDIATE_YES); if (image) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 258061190b..714145ce14 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -170,8 +170,8 @@ const LLColor4 DUMMY_COLOR = LLColor4(0.5,0.5,0.5,1.0); enum ERenderName { RENDER_NAME_NEVER, - RENDER_NAME_FADE, - RENDER_NAME_ALWAYS + RENDER_NAME_ALWAYS, + RENDER_NAME_FADE }; //----------------------------------------------------------------------------- @@ -2603,7 +2603,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) { render_name = render_name && !gAgent.cameraMouselook() - && (visible_chat || !gSavedSettings.getBOOL("RenderNameHideSelf")); + && (visible_chat || (gSavedSettings.getBOOL("RenderNameShowSelf") + && gSavedSettings.getS32("AvatarNameTagMode") )); } if ( render_name ) diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 69bd09f0e5..179c790aed 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -260,18 +260,18 @@ - + reference="FloaterDefaultBackgroundColor" /> - + reference="DkGray_66" /> diff --git a/indra/newview/skins/default/textures/bottomtray/DownArrow.png b/indra/newview/skins/default/textures/bottomtray/DownArrow.png new file mode 100644 index 0000000000..82f58b22b9 Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/DownArrow.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Unread_IM.png b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png new file mode 100644 index 0000000000..a355917fca Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png new file mode 100644 index 0000000000..cd18ae310d Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png new file mode 100644 index 0000000000..b0ed6ee8eb Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3.png new file mode 100644 index 0000000000..14ec77b99a Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off.png new file mode 100644 index 0000000000..48be51e9af Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png new file mode 100644 index 0000000000..be4881b64c Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png differ diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Off.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Off.png new file mode 100644 index 0000000000..d506cda5c9 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Off.png differ diff --git a/indra/newview/skins/default/textures/icons/AddItem_Off.png b/indra/newview/skins/default/textures/icons/AddItem_Off.png new file mode 100644 index 0000000000..52d4f9bc80 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/AddItem_Off.png differ diff --git a/indra/newview/skins/default/textures/icons/AddItem_Over.png b/indra/newview/skins/default/textures/icons/AddItem_Over.png new file mode 100644 index 0000000000..cad6e8d52f Binary files /dev/null and b/indra/newview/skins/default/textures/icons/AddItem_Over.png differ diff --git a/indra/newview/skins/default/textures/icons/AddItem_Press.png b/indra/newview/skins/default/textures/icons/AddItem_Press.png new file mode 100644 index 0000000000..acc898e5f4 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/AddItem_Press.png differ diff --git a/indra/newview/skins/default/textures/icons/BackArrow_Off.png b/indra/newview/skins/default/textures/icons/BackArrow_Off.png new file mode 100644 index 0000000000..ff32192856 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/BackArrow_Off.png differ diff --git a/indra/newview/skins/default/textures/icons/BackArrow_Over.png b/indra/newview/skins/default/textures/icons/BackArrow_Over.png new file mode 100644 index 0000000000..b36e03a8cf Binary files /dev/null and b/indra/newview/skins/default/textures/icons/BackArrow_Over.png differ diff --git a/indra/newview/skins/default/textures/icons/Info.png b/indra/newview/skins/default/textures/icons/Info.png new file mode 100644 index 0000000000..e52560281b Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Info.png differ diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png new file mode 100644 index 0000000000..25b055bfc0 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png differ diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png new file mode 100644 index 0000000000..fcabd4c6d3 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png differ diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png new file mode 100644 index 0000000000..6e91dd7159 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png differ diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Off.png b/indra/newview/skins/default/textures/icons/TrashItem_Off.png new file mode 100644 index 0000000000..bb64920ec4 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/TrashItem_Off.png differ diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Over.png b/indra/newview/skins/default/textures/icons/TrashItem_Over.png new file mode 100644 index 0000000000..1a0eea6c67 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/TrashItem_Over.png differ diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Press.png b/indra/newview/skins/default/textures/icons/TrashItem_Press.png new file mode 100644 index 0000000000..c62f833d86 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/TrashItem_Press.png differ diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png new file mode 100644 index 0000000000..cd18ae310d Binary files /dev/null and b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png differ diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png new file mode 100644 index 0000000000..b0ed6ee8eb Binary files /dev/null and b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png differ diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png new file mode 100644 index 0000000000..14ec77b99a Binary files /dev/null and b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png differ diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Off.png b/indra/newview/skins/default/textures/icons/VoicePTT_Off.png new file mode 100644 index 0000000000..48be51e9af Binary files /dev/null and b/indra/newview/skins/default/textures/icons/VoicePTT_Off.png differ diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_On.png b/indra/newview/skins/default/textures/icons/VoicePTT_On.png new file mode 100644 index 0000000000..be4881b64c Binary files /dev/null and b/indra/newview/skins/default/textures/icons/VoicePTT_On.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Close_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Close_Off.png new file mode 100644 index 0000000000..bc4e00c646 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Close_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png new file mode 100644 index 0000000000..1e7d7beafa Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Selected.png new file mode 100644 index 0000000000..a70d3abbbf Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Selected.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Off.png new file mode 100644 index 0000000000..2d36f70361 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png new file mode 100644 index 0000000000..3c20459126 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Open_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Open_Off.png new file mode 100644 index 0000000000..4556602f58 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Open_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Off.png new file mode 100644 index 0000000000..c272372a39 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png new file mode 100644 index 0000000000..3828752606 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png new file mode 100644 index 0000000000..d7ec33af55 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png new file mode 100644 index 0000000000..dd7e361ea9 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Off.png new file mode 100644 index 0000000000..e56eda9802 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png new file mode 100644 index 0000000000..d4ac451c8e Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index e6c9cdb246..7703211c3d 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -1,7 +1,9 @@ + + @@ -30,6 +32,9 @@ + + + @@ -38,6 +43,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -171,8 +265,8 @@ - - + + @@ -248,8 +342,10 @@ + - + + @@ -374,5 +470,11 @@ + + + + + + diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png new file mode 100644 index 0000000000..45bcb0464e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png new file mode 100644 index 0000000000..75057938d2 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png new file mode 100644 index 0000000000..dabbd85b34 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Over.png b/indra/newview/skins/default/textures/widgets/ListItem_Over.png new file mode 100644 index 0000000000..4b2b9ab3e5 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ListItem_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Select.png b/indra/newview/skins/default/textures/widgets/ListItem_Select.png new file mode 100644 index 0000000000..317c672441 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ListItem_Select.png differ diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png new file mode 100644 index 0000000000..cf0d8ee2c1 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png new file mode 100644 index 0000000000..01e0a2d9f1 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png new file mode 100644 index 0000000000..fe3a7beafd Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png new file mode 100644 index 0000000000..133589b8a6 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png new file mode 100644 index 0000000000..2ce84ea5be Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png new file mode 100644 index 0000000000..e83babc519 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png differ diff --git a/indra/newview/skins/default/textures/world/NoEntryLines.png b/indra/newview/skins/default/textures/world/NoEntryLines.png new file mode 100644 index 0000000000..5a1f0ea95e Binary files /dev/null and b/indra/newview/skins/default/textures/world/NoEntryLines.png differ diff --git a/indra/newview/skins/default/textures/world/NoEntryPassLines.png b/indra/newview/skins/default/textures/world/NoEntryPassLines.png new file mode 100644 index 0000000000..e4b8fc6ae2 Binary files /dev/null and b/indra/newview/skins/default/textures/world/NoEntryPassLines.png differ diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index f52c5d6175..ece0cf737f 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -101,7 +101,7 @@ Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C) - To be a success in business, be daring, be first, be different. --Henry Marchant + Oh, Parabuild, why hast thou forsaken me? - [AREA] sq.m. + [AREA] m² @@ -264,7 +264,7 @@ Go to World menu > About Land or select another parcel to show its details. layout="topleft" left="96" name="check deed" - tool_tip="A group officer can deed this land to the group, so it will be supported by the group&apos;s land allocation." + tool_tip="A group officer can deed this land to the group, so it will be supported by the group's land allocation." top="164" width="116" /> + left="1" + follows="left|top" + font="SansSerifSmall" + height="20" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_overlay="Arrow_Left_Off" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + hover_glow_amount="0.15" + layout="topleft" + name="back" + picture_style="true" + tool_tip="Go back to previous location" + width="20"> + + + follows="left|top" + font="SansSerifSmall" + height="20" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_overlay="Arrow_Right_Off" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + hover_glow_amount="0.15" + layout="topleft" + left_pad="2" + name="forward" + picture_style="true" + tool_tip="Go forward one location" + width="20"> + + + + - - + follows="left|right|top" + halign="right" + height="20" + label="Location" + layout="topleft" + left_pad="5" + max_chars="254" + mouse_opaque="false" + top_delta="0" + width="340"> + + - - + width="50"> + + + + + - - - + name="browser" /> diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index b57fd00210..8a76c2167f 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -15,7 +15,7 @@ label="OK" label_selected="OK" layout="topleft" - left="335" + left="427" name="OK" top="435" width="90"> @@ -35,19 +35,6 @@ - + Animation: [NAME] - Description: - diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 8b5591e832..4f559394a6 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -9,7 +9,7 @@ mouse_opaque="false" name="panel_profile" top="10" - width="355"> + width="305"> [ACCTTYPE] [PAYMENTINFO] [AGEVERIFICATION] @@ -67,7 +67,7 @@ None - + + width="280"> + width="250"> (Loading...) - - - - Second Life photo: - + top="20" + width="250"> - - - - First Life photo: - - - - - - - - - - - - - Status: - - - - - - - - What're you up to? - - - Type a message about what you're doing in SL! - - - + - Second Life description: + top_delta="0" + width="125"> + Second Life: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. - + + + - First Life description: + top_delta="0" + width="125"> + Real World: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. + - Second Life groups: + top_pad="20" + width="100"> + Groups: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. @@ -355,26 +223,28 @@ follows="left|top" font="SansSerifBold" height="15" + halign="right" layout="topleft" - left="9" + left="10" name="title_homepage_text" text_color="white" - top_pad="10" + top_pad="20" width="100"> Homepage: + width="125"> TODO Member since: 05/31/1976 @@ -408,34 +280,90 @@ follows="left|top" font="SansSerifBold" height="15" + halign="right" layout="topleft" - left="9" + left="10" + top_pad="20" name="title_acc_status_text" text_color="white" - top_pad="10" width="100"> Account status: Resident. No payment info on file. + + Partner: + + + [FIRST] [LAST] + + + Edit + + + + + width="200"> + width="100"> Update - - Partner: - + left="0" + name="status_panel" + top="155" + width="260"> + + + TBD + + --> + left="0" + name="status_me_panel" + top_pad="20" + width="125"> - [FIRST] [LAST] + left="10" + name="online_me_status_text" + text_color="white" + width="100"> + Status: + + + + + - Edit + left="10" + top_pad="20" + name="status_me_message_text" + text_color="white" + width="250"> + What're you up to? + + Type a message about what you're doing in SL! + - + + + + + + + width="280">