diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index 2325efc38..fb598bbb0 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -38,7 +38,7 @@ //============================================================================ // MAIN THREAD -LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded) : +LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded, bool should_pause) : LLThread(name), mThreaded(threaded), mIdleThread(TRUE), @@ -47,6 +47,11 @@ LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded) : { if (mThreaded) { + if(should_pause) + { + pause() ; //call this before start the thread. + } + start(); } } diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h index f0c36896c..8da383dff 100644 --- a/indra/llcommon/llqueuedthread.h +++ b/indra/llcommon/llqueuedthread.h @@ -154,7 +154,7 @@ public: static handle_t nullHandle() { return handle_t(0); } public: - LLQueuedThread(const std::string& name, bool threaded = true); + LLQueuedThread(const std::string& name, bool threaded = true, bool should_pause = false); virtual ~LLQueuedThread(); virtual void shutdown(); diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index f126b4882..ba2e3f542 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -36,7 +36,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 5; const S32 LL_VERSION_PATCH = 10; -const S32 LL_VERSION_BUILD = 2; +const S32 LL_VERSION_BUILD = 1; const char * const LL_CHANNEL = "Singularity"; diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp index d9adef5fc..7581a012e 100644 --- a/indra/llcommon/llworkerthread.cpp +++ b/indra/llcommon/llworkerthread.cpp @@ -40,8 +40,8 @@ //============================================================================ // Run on MAIN thread -LLWorkerThread::LLWorkerThread(const std::string& name, bool threaded) : - LLQueuedThread(name, threaded) +LLWorkerThread::LLWorkerThread(const std::string& name, bool threaded, bool should_pause) : + LLQueuedThread(name, threaded, should_pause) { mDeleteMutex = new LLMutex; } diff --git a/indra/llcommon/llworkerthread.h b/indra/llcommon/llworkerthread.h index 117dc05cc..76c715076 100644 --- a/indra/llcommon/llworkerthread.h +++ b/indra/llcommon/llworkerthread.h @@ -89,7 +89,7 @@ private: LLMutex* mDeleteMutex; public: - LLWorkerThread(const std::string& name, bool threaded = true); + LLWorkerThread(const std::string& name, bool threaded = true, bool should_pause = false); ~LLWorkerThread(); /*virtual*/ S32 update(U32 max_time_ms); diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index 7a2984459..59e1d3be3 100644 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -1,38 +1,38 @@ /** - * @file message_prehash.cpp - * @brief file of prehashed variables - * - * $LicenseInfo:firstyear=2003&license=viewergpl$ - * - * Copyright (c) 2003-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$ - */ +* @file message_prehash.cpp +* @brief file of prehashed variables +* +* $LicenseInfo:firstyear=2003&license=viewergpl$ +* +* Copyright (c) 2003-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$ +*/ /** - * Generated from message template version number 2.000 - */ +* Generated from message template version number 2.000 +*/ #include "linden_common.h" #include "message.h" @@ -1389,4 +1389,4 @@ char const* const _PREHASH_ProductSKU = LLMessageStringTable::getInstance()->get char const* const _PREHASH_SeeAVs = LLMessageStringTable::getInstance()->getString("SeeAVs"); char const* const _PREHASH_AnyAVSounds = LLMessageStringTable::getInstance()->getString("AnyAVSounds"); char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->getString("GroupAVSounds"); -char const* const _PREHASH_Language = LLMessageStringTable::getInstance()->getString("Language"); \ No newline at end of file +char const* const _PREHASH_Language = LLMessageStringTable::getInstance()->getString("Language"); diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 40baf7b33..48fea8e87 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -68,6 +68,16 @@ BOOL gGLActive = FALSE; std::ofstream gFailLog; +void* gl_get_proc_address(const char *pStr) +{ + void* pPtr = (void*)GLH_EXT_GET_PROC_ADDRESS(pStr); + if(!pPtr) + llinfos << "Failed to find symbol '" << pStr << "'" << llendl; + return pPtr; +} +#undef GLH_EXT_GET_PROC_ADDRESS +#define GLH_EXT_GET_PROC_ADDRESS(p) gl_get_proc_address(p) + void ll_init_fail_log(std::string filename) { gFailLog.open(filename.c_str()); @@ -535,6 +545,8 @@ bool LLGLManager::initGL() // This is called here because it depends on the setting of mIsGF2or4MX, and sets up mHasMultitexture. initExtensions(); + S32 old_vram = mVRAM; + if (mHasATIMemInfo) { //ask the gl how much vram is free at startup and attempt to use no more than half of that S32 meminfo[4]; @@ -549,6 +561,16 @@ bool LLGLManager::initGL() mVRAM = dedicated_memory/1024; } + if (mVRAM < 256) + { //something likely went wrong using the above extensions, fall back to old method + mVRAM = old_vram; + } + if (mHasFragmentShader) + { + GLint num_tex_image_units; + glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units); + mNumTextureImageUnits = llmin(num_tex_image_units, 32); + } if (mHasMultitexture) { GLint num_tex_units; @@ -568,12 +590,6 @@ bool LLGLManager::initGL() return false; } - if (mHasFragmentShader) - { - GLint num_tex_image_units; - glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units); - mNumTextureImageUnits = llmin(num_tex_image_units, 32); - } if (mHasTextureMultisample) { @@ -1304,9 +1320,6 @@ void LLGLState::initClass() sStateMap[GL_MULTISAMPLE_ARB] = GL_FALSE; glDisable(GL_MULTISAMPLE_ARB); - sStateMap[GL_MULTISAMPLE_ARB] = GL_FALSE; - glDisable(GL_MULTISAMPLE_ARB); - glEnableClientState(GL_VERTEX_ARRAY); } diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index d84158342..6647a3390 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -38,6 +38,7 @@ #include "llfile.h" #include "llrender.h" #include "llcontrol.h" +#include "llvertexbuffer.h" #if LL_DARWIN #include "OpenGL/OpenGL.h" @@ -133,7 +134,8 @@ BOOL LLGLSLShader::createShader(vector * attributes, mProgramObject = glCreateProgramObjectARB(); static const LLCachedControl no_texture_indexing("ShyotlUseLegacyTextureBatching",false); - if (gGLManager.mGLVersion < 3.1f || no_texture_indexing) + static const LLCachedControl use_legacy_path("ShyotlUseLegacyRenderPath", false); //Legacy does not jive with new batching. + if (gGLManager.mGLVersion < 3.1f || no_texture_indexing || use_legacy_path) { //force indexed texture channels to 1 if GL version is old (performance improvement for drivers with poor branching shader model support) mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1); } @@ -259,6 +261,13 @@ void LLGLSLShader::attachObjects(GLhandleARB* objects, S32 count) BOOL LLGLSLShader::mapAttributes(const vector * attributes) { + //before linking, make sure reserved attributes always have consistent locations + /*for (U32 i = 0; i < LLShaderMgr::instance()->mReservedAttribs.size(); i++) + { + const char* name = LLShaderMgr::instance()->mReservedAttribs[i].c_str(); + glBindAttribLocationARB(mProgramObject, i, (const GLcharARB *) name); + }*/ + //link the program BOOL res = link(); @@ -332,7 +341,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector * uniforms) for (S32 i = 0; i < (S32) LLShaderMgr::instance()->mReservedUniforms.size(); i++) { if ( (mUniform[i] == -1) - && (LLShaderMgr::instance()->mReservedUniforms[i].compare(0, length, name, LLShaderMgr::instance()->mReservedUniforms[i].length()) == 0)) + && (LLShaderMgr::instance()->mReservedUniforms[i] == name)) { //found it mUniform[i] = location; @@ -346,7 +355,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector * uniforms) for (U32 i = 0; i < uniforms->size(); i++) { if ( (mUniform[i+LLShaderMgr::instance()->mReservedUniforms.size()] == -1) - && ((*uniforms)[i].compare(0, length, name, (*uniforms)[i].length()) == 0)) + && ((*uniforms)[i] == name)) { //found it mUniform[i+LLShaderMgr::instance()->mReservedUniforms.size()] = location; @@ -410,6 +419,7 @@ void LLGLSLShader::bind() gGL.flush(); if (gGLManager.mHasShaderObjects) { + LLVertexBuffer::unbind(); glUseProgramObjectARB(mProgramObject); sCurBoundShader = mProgramObject; sCurBoundShaderPtr = this; @@ -435,6 +445,7 @@ void LLGLSLShader::unbind() stop_glerror(); } } + LLVertexBuffer::unbind(); glUseProgramObjectARB(0); sCurBoundShader = 0; sCurBoundShaderPtr = NULL; @@ -444,9 +455,13 @@ void LLGLSLShader::unbind() void LLGLSLShader::bindNoShader(void) { - glUseProgramObjectARB(0); - sCurBoundShader = 0; - sCurBoundShaderPtr = NULL; + LLVertexBuffer::unbind(); + if (gGLManager.mHasShaderObjects) + { + glUseProgramObjectARB(0); + sCurBoundShader = 0; + sCurBoundShaderPtr = NULL; + } } S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index cf9af9b32..7d9e4bf4c 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1279,13 +1279,13 @@ void LLMenuItemBranchGL::updateBranchParent(LLView* parentp) } } -void LLMenuItemBranchGL::onVisibilityChange( BOOL new_visibility ) +void LLMenuItemBranchGL::handleVisibilityChange( BOOL new_visibility ) { if (new_visibility == FALSE && getBranch() && !getBranch()->getTornOff()) { getBranch()->setVisible(FALSE); } - LLMenuItemGL::onVisibilityChange(new_visibility); + LLMenuItemGL::handleVisibilityChange(new_visibility); } BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) @@ -1501,20 +1501,26 @@ void LLMenuItemBranchDownGL::openMenu( void ) // set the hover status (called by it's menu) void LLMenuItemBranchDownGL::setHighlight( BOOL highlight ) { - if (highlight == getHighlight()) return; + if (highlight == getHighlight()) + return; //NOTE: Purposely calling all the way to the base to bypass auto-open. LLMenuItemGL::setHighlight(highlight); + + LLMenuGL* branch = getBranch(); + if (!branch) + return; + if( !highlight) { - if (getBranch()->getTornOff()) + if (branch->getTornOff()) { - ((LLFloater*)getBranch()->getParent())->setFocus(FALSE); - getBranch()->clearHoverItem(); + ((LLFloater*)branch->getParent())->setFocus(FALSE); + branch->clearHoverItem(); } else { - getBranch()->setVisible( FALSE ); + branch->setVisible( FALSE ); } } } diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 63f9d555d..2150d5584 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -613,7 +613,7 @@ public: virtual void updateBranchParent( LLView* parentp ); // LLView Functionality - virtual void onVisibilityChange( BOOL curVisibilityIn ); + virtual void handleVisibilityChange( BOOL curVisibilityIn ); virtual void draw(); diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index cc7f7bdcc..9b40bfaeb 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -80,6 +80,7 @@ void LLPanel::init() mPanelHandle.bind(this); setTabStop(FALSE); + mVisibleSignal = NULL; } LLPanel::LLPanel() @@ -123,6 +124,7 @@ LLPanel::LLPanel(const std::string& name, const std::string& rect_control, BOOL LLPanel::~LLPanel() { storeRectControl(); + delete mVisibleSignal; } // virtual @@ -364,6 +366,13 @@ BOOL LLPanel::checkRequirements() return TRUE; } +void LLPanel::handleVisibilityChange ( BOOL new_visibility ) +{ + LLUICtrl::handleVisibilityChange ( new_visibility ); + if (mVisibleSignal) + (*mVisibleSignal)(this, LLSD(new_visibility) ); // Pass BOOL as LLSD +} + void LLPanel::setFocus(BOOL b) { if( b ) @@ -1009,6 +1018,16 @@ void LLPanel::childSetControlName(const std::string& id, const std::string& cont } } +boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t::slot_type& cb ) +{ + if (!mVisibleSignal) + { + mVisibleSignal = new commit_signal_t(); + } + + return mVisibleSignal->connect(cb); +} + //virtual LLView* LLPanel::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const { diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index a442a94db..76b8833df 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -76,6 +76,7 @@ public: /*virtual*/ BOOL isPanel() const; /*virtual*/ void draw(); /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ); + /*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); /*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const; // Override to set not found list: virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; @@ -223,11 +224,13 @@ public: static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); + boost::signals2::connection setVisibleCallback( const commit_signal_t::slot_type& cb ); protected: // Override to set not found list LLButton* getDefaultButton() { return mDefaultBtn; } LLCallbackMap::map_t mFactoryMap; + commit_signal_t* mVisibleSignal; // Called when visibility changes, passes new visibility as LLSD() private: // common construction logic void init(); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 339e3b97c..6524f1856 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -644,14 +644,14 @@ void LLView::setVisible(BOOL visible) if (!getParent() || getParent()->isInVisibleChain()) { // tell all children of this view that the visibility may have changed - onVisibilityChange( visible ); + handleVisibilityChange( visible ); } updateBoundingRect(); } } // virtual -void LLView::onVisibilityChange ( BOOL new_visibility ) +void LLView::handleVisibilityChange ( BOOL new_visibility ) { for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) { @@ -659,7 +659,7 @@ void LLView::onVisibilityChange ( BOOL new_visibility ) // only views that are themselves visible will have their overall visibility affected by their ancestors if (viewp->getVisible()) { - viewp->onVisibilityChange ( new_visibility ); + viewp->handleVisibilityChange ( new_visibility ); } } } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 43ee36a4f..fa53862d1 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -94,7 +94,7 @@ virtual void setEnabled(BOOL enabled) { mEnabled = enabled; } LLCheckBoxCtrl, LLComboBox, LLLineEditor, LLMenuGL, LLRadioGroup, etc virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ) { return FALSE; } LLUICtrl, LLButton, LLCheckBoxCtrl, LLLineEditor, LLMenuGL, LLSliderCtrl -virtual void onVisibilityChange ( BOOL curVisibilityIn ); +virtual void handleVisibilityChange ( BOOL curVisibilityIn ); LLMenuGL virtual LLRect getSnapRect() const { return mRect; } *TODO: Make non virtual LLFloater @@ -342,7 +342,7 @@ public: virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); - virtual void onVisibilityChange ( BOOL curVisibilityIn ); + virtual void handleVisibilityChange ( BOOL curVisibilityIn ); void pushVisible(BOOL visible) { mLastVisible = mVisible; setVisible(visible); } void popVisible() { setVisible(mLastVisible); mLastVisible = TRUE; } diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 68162447f..c13ea7086 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2919,7 +2919,6 @@ BOOL LLWindowWin32::resetDisplayResolution() void LLWindowWin32::swapBuffers() { - glFinish(); SwapBuffers(mhDC); } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3d3298acc..ce601470f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -280,6 +280,7 @@ set(viewer_SOURCE_FILES llinventorybackup.cpp llinventorybridge.cpp llinventoryclipboard.cpp + llinventoryicon.cpp llinventorymodel.cpp llinventoryview.cpp lljoystickbutton.cpp @@ -762,6 +763,7 @@ set(viewer_HEADER_FILES llinventorybackup.h llinventorybridge.h llinventoryclipboard.h + llinventoryicon.h llinventorymodel.h llinventoryview.h lljoystickbutton.h diff --git a/indra/newview/app_settings/default_grids.xml b/indra/newview/app_settings/default_grids.xml index 83b33cf15..5d8c2a088 100755 --- a/indra/newview/app_settings/default_grids.xml +++ b/indra/newview/app_settings/default_grids.xml @@ -2,33 +2,34 @@ - default_grids_version1 + default_grids_version2 - gridnicksecondlife - gridnameAgni + gridnameSecond Life platformSecondLife loginurihttps://login.agni.lindenlab.com/cgi-bin/login.cgi - loginpagehttp://secondlife.com/app/login/ + loginpagehttp://viewer-login.agni.lindenlab.com/ helperurihttps://secondlife.com/helpers/ websitehttp://secondlife.com/ supporthttp://secondlife.com/support/ registerhttp://secondlife.com/registration/ passwordhttp://secondlife.com/account/request.php + render_compat1 + inventory_links1 - gridnicksecondlife_beta - gridnameAditi + gridnameSecond Life BETA helperurihttp://aditi-secondlife.webdev.lindenlab.com/helpers/ - loginpagehttp://secondlife.com/app/login/ + loginpagehttp://viewer-login.agni.lindenlab.com/ loginurihttps://login.aditi.lindenlab.com/cgi-bin/login.cgi passwordhttp://secondlife.com/account/request.php platformSecondLife registerhttp://secondlife.com/registration/ render_compat0 + inventory_links1 supporthttp://secondlife.com/support/ version0 websitehttp://secondlife.com/ @@ -37,7 +38,6 @@ - gridnicklocal gridnameLocal Host platformOpenSim loginurihttp://127.0.0.1:9000/ diff --git a/indra/newview/hippogridmanager.cpp b/indra/newview/hippogridmanager.cpp index 22989cb43..85ee8a369 100644 --- a/indra/newview/hippogridmanager.cpp +++ b/indra/newview/hippogridmanager.cpp @@ -796,7 +796,7 @@ void HippoGridManager::loadFromFile() { mDefaultGridsVersion = 0; // load user grid info - parseFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg1.xml"), false); + parseFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg2.xml"), false); // merge default grid info, if newer. Force load, if list of grids is empty. parseFile(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "default_grids.xml"), !mGridInfo.empty()); // merge grid info from web site, if newer. Force load, if list of grids is empty. @@ -957,7 +957,7 @@ void HippoGridManager::saveFile() } // write client grid info file - std::string fileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg1.xml"); + std::string fileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg2.xml"); llofstream file; file.open(fileName.c_str()); if (file.is_open()) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8e2d9f0b1..5dd38f79a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -495,7 +495,8 @@ static void settings_to_globals() static void settings_modify() { - LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderUseFBO"); + bool can_defer = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"); + LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderUseFBO") || (gSavedSettings.getBOOL("RenderDeferred") && can_defer); LLVOAvatar::sUseImpostors = gSavedSettings.getBOOL("RenderUseImpostors"); LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 4de0b48c8..14b2e20f9 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -826,7 +826,8 @@ void LLDrawPoolAvatar::beginSkinned() } } - if (LLGLSLShader::sNoFixedFunction) + //if (LLGLSLShader::sNoFixedFunction) //Singu Note: sNoFixedFunction being false does not imply shaders are off, unlike in V3. + if (gPipeline.canUseVertexShaders()) //Check if shaders are REALLY used. { sVertexProgram->setAlphaRange(0.2f, 1.f); } diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index b7de17cc6..7f598ac5b 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -44,7 +44,7 @@ #include "llalertdialog.h" #include "llinventorymodel.h" // for gInventory #include "llinventorydefines.h" -#include "llinventoryview.h" // for get_item_icon +#include "llinventoryicon.h" #include "llnotificationsutil.h" #include "llselectmgr.h" #include "llscrolllistctrl.h" @@ -156,7 +156,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) LLSD row; // Compute icon for this item - std::string icon_name = get_item_icon_name(LLAssetType::AT_OBJECT, + std::string icon_name = LLInventoryIcon::getIconName(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0x0, FALSE); @@ -258,7 +258,7 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, item_is_multi = TRUE; } - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), item_is_multi); diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index cb72659cb..38ed371f2 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -47,7 +47,8 @@ #include "llcheckboxctrl.h" #include "llinventorymodel.h" // for gInventory #include "llinventorydefines.h" -#include "llinventoryview.h" // for get_item_icon +#include "llinventoryview.h" +#include "llinventoryicon.h" #include "llnotificationsutil.h" #include "llselectmgr.h" #include "llscrolllistctrl.h" @@ -225,7 +226,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, item_is_multi = TRUE; } - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name =LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), item_is_multi); diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index bfc046b7a..af37749c9 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -169,7 +169,7 @@ void LLFloaterChat::onClose(bool app_quitting) setVisible(FALSE); } -void LLFloaterChat::onVisibilityChange(BOOL new_visibility) +void LLFloaterChat::handleVisibilityChange(BOOL new_visibility) { // Hide the chat overlay when our history is visible. updateConsoleVisibility(); @@ -180,7 +180,7 @@ void LLFloaterChat::onVisibilityChange(BOOL new_visibility) LLFloaterChatterBox::getInstance()->setFloaterFlashing(this, FALSE); } - LLFloater::onVisibilityChange(new_visibility); + LLFloater::handleVisibilityChange(new_visibility); } void LLFloaterChat::setMinimized(BOOL minimized) diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h index 775f21be6..4f9a03be5 100644 --- a/indra/newview/llfloaterchat.h +++ b/indra/newview/llfloaterchat.h @@ -62,7 +62,7 @@ public: virtual void draw(); virtual BOOL postBuild(); virtual void onClose(bool app_quitting); - virtual void onVisibilityChange(BOOL cur_visibility); + virtual void handleVisibilityChange(BOOL cur_visibility); virtual void setMinimized(BOOL); void updateConsoleVisibility(); void updateSettings(); diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 5e6f8f1a5..b43d47177 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -53,7 +53,7 @@ #include "lltabcontainervertical.h" #include "llviewerwindow.h" #include "llinventorymodel.h" -#include "llinventoryview.h" +#include "llinventoryicon.h" #include "lltextbox.h" #include "lllineeditor.h" #include "llviewertexturelist.h" @@ -511,7 +511,7 @@ BOOL LLPanelEditWearable::postBuild() /*std::string icon_name = (asset_type == LLAssetType::AT_CLOTHING ? "inv_item_clothing.tga" : "inv_item_skin.tga" );*/ - std::string icon_name = get_item_icon_name(asset_type,LLInventoryType::IT_WEARABLE,mType,FALSE); + std::string icon_name = LLInventoryIcon::getIconName(asset_type,LLInventoryType::IT_WEARABLE,mType,FALSE); childSetValue("icon", icon_name); diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp index d73cfde72..43abcb8c0 100644 --- a/indra/newview/llfloatermediabrowser.cpp +++ b/indra/newview/llfloatermediabrowser.cpp @@ -105,6 +105,7 @@ void LLFloaterMediaBrowser::draw() media_playing = media_plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING; } } + childSetVisible("time_controls", show_time_controls); childSetVisible("rewind", show_time_controls); childSetVisible("play", show_time_controls && ! media_playing); childSetVisible("pause", show_time_controls && media_playing); @@ -139,7 +140,6 @@ BOOL LLFloaterMediaBrowser::postBuild() childSetAction("pause", onClickPlay, this); childSetAction("seek", onClickSeek, this); childSetAction("go", onClickGo, this); - childSetAction("close", onClickClose, this); childSetAction("open_browser", onClickOpenWebBrowser, this); childSetAction("assign", onClickAssign, this); @@ -284,14 +284,6 @@ void LLFloaterMediaBrowser::onClickGo(void* user_data) self->mBrowser->navigateTo(self->mAddressCombo->getValue().asString()); } -//static -void LLFloaterMediaBrowser::onClickClose(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - self->close(); -} - //static void LLFloaterMediaBrowser::onClickOpenWebBrowser(void* user_data) { diff --git a/indra/newview/llfloatermediabrowser.h b/indra/newview/llfloatermediabrowser.h index afdd6e733..c2203670a 100644 --- a/indra/newview/llfloatermediabrowser.h +++ b/indra/newview/llfloatermediabrowser.h @@ -85,7 +85,6 @@ public: static void onClickBack(void* user_data); static void onClickForward(void* user_data); static void onClickGo(void* user_data); - static void onClickClose(void* user_data); static void onClickOpenWebBrowser(void* user_data); static void onClickAssign(void* user_data); static void onClickRewind(void* user_data); diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index 3c319a608..6a762d00a 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -46,8 +46,9 @@ #include "llagent.h" // for agent id #include "llalertdialog.h" -#include "llinventoryview.h" +#include "llinventorybridge.h" #include "llinventorymodel.h" +#include "llinventoryview.h" #include "llpanelinventory.h" #include "llselectmgr.h" #include "lluiconstants.h" diff --git a/indra/newview/llgroupnotify.cpp b/indra/newview/llgroupnotify.cpp index 3648decc4..59ac55138 100644 --- a/indra/newview/llgroupnotify.cpp +++ b/indra/newview/llgroupnotify.cpp @@ -46,7 +46,7 @@ #include "llui.h" #include "llviewercontrol.h" #include "llfloatergroupinfo.h" -#include "llinventoryview.h" +#include "llinventoryicon.h" #include "llinventory.h" #include "llglheaders.h" @@ -218,7 +218,7 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject, { addChild(new NoticeText(std::string("subjecttitle"),LLRect(x,y,x + LABEL_WIDTH,y - LINE_HEIGHT),std::string("Attached: "),LLFontGL::getFontSansSerif())); - LLUIImagePtr item_icon = get_item_icon(mInventoryOffer->mType, + LLUIImagePtr item_icon = LLInventoryIcon::getIcon(mInventoryOffer->mType, LLInventoryType::IT_TEXTURE, 0, FALSE); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index ff574bea8..1278de487 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -2050,7 +2050,7 @@ void LLFloaterIMPanel::onClose(bool app_quitting) destroy(); } -void LLFloaterIMPanel::onVisibilityChange(BOOL new_visibility) +void LLFloaterIMPanel::handleVisibilityChange(BOOL new_visibility) { if (new_visibility) { diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index 5787fc603..6f4e7d43a 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -204,7 +204,7 @@ public: // Check typing timeout timer. /*virtual*/ void draw(); /*virtual*/ void onClose(bool app_quitting = FALSE); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void handleVisibilityChange(BOOL new_visibility); // add target ids to the session. // Return TRUE if successful, otherwise FALSE. diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4cfe6fa91..94e3a4d73 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -37,6 +37,7 @@ #include "llinventoryview.h" #include "llinventorybridge.h" #include "llinventorydefines.h" +#include "llinventoryicon.h" #include "message.h" @@ -122,6 +123,18 @@ #include "llattachmentsmgr.h" // [/RLVa:KB] +typedef std::pair two_uuids_t; +typedef std::list two_uuids_list_t; + +struct LLMoveInv +{ + LLUUID mObjectID; + LLUUID mCategoryID; + two_uuids_list_t mMoveList; + void (*mCallback)(S32, void*); + void* mUserData; +}; + // Helpers // bug in busy count inc/dec right now, logic is complex... do we really need it? void inc_busy_count() @@ -162,47 +175,6 @@ void gotAssetForSaveItemAs(LLVFS *vfs, void* user_data, S32 status, LLExtStat ext_status); // -std::string ICON_NAME[ICON_NAME_COUNT] = -{ - "inv_item_texture.tga", - "inv_item_sound.tga", - "inv_item_callingcard_online.tga", - "inv_item_callingcard_offline.tga", - "inv_item_landmark.tga", - "inv_item_landmark_visited.tga", - "inv_item_script.tga", - "inv_item_clothing.tga", - "inv_item_object.tga", - "inv_item_object_multi.tga", - "inv_item_notecard.tga", - "inv_item_skin.tga", - "inv_item_snapshot.tga", - - "inv_item_shape.tga", - "inv_item_skin.tga", - "inv_item_hair.tga", - "inv_item_eyes.tga", - "inv_item_shirt.tga", - "inv_item_pants.tga", - "inv_item_shoes.tga", - "inv_item_socks.tga", - "inv_item_jacket.tga", - "inv_item_gloves.tga", - "inv_item_undershirt.tga", - "inv_item_underpants.tga", - "inv_item_skirt.tga", - "inv_item_alpha.tga", - "inv_item_tattoo.tga", - "inv_item_physics.png", - - "inv_item_animation.tga", - "inv_item_gesture.tga", - - "inv_link_item.tga", - "inv_link_folder.tga" - "inv_item_mesh.png" -}; - struct LLWearInfo { LLUUID mCategoryID; @@ -1051,7 +1023,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, { llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLScriptBridge(inventory, uuid); + new_listener = new LLItemBridge(inventory, uuid); break; case LLAssetType::AT_OBJECT: @@ -1332,13 +1304,12 @@ LLUIImagePtr LLItemBridge::getIcon() const LLInventoryObject *obj = getInventoryObject(); if (obj) { - return get_item_icon( obj->getType(), - LLInventoryType::IT_NONE, - 0, - mIsLink); + return LLInventoryIcon::getIcon(obj->getType(), + LLInventoryType::IT_NONE, + mIsLink); } - return LLUI::getUIImage(ICON_NAME[OBJECT_ICON_NAME]); + return LLInventoryIcon::getIcon(LLInventoryIcon::ICONNAME_OBJECT); } PermissionMask LLItemBridge::getPermissionMask() const @@ -3167,22 +3138,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, return accept; } -// +=================================================+ -// | LLScriptBridge (DEPRECATED) | -// +=================================================+ - -LLUIImagePtr LLScriptBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); -} - // +=================================================+ // | LLTextureBridge | // +=================================================+ LLUIImagePtr LLTextureBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_TEXTURE, mInvType, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType); } void open_texture(const LLUUID& item_id, @@ -3333,7 +3295,7 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, LLUIImagePtr LLLandmarkBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE); } void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -3538,7 +3500,7 @@ LLUIImagePtr LLCallingCardBridge::getIcon() const { online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); } - return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE); } std::string LLCallingCardBridge::getLabelSuffix() const @@ -4020,7 +3982,7 @@ BOOL LLObjectBridge::isItemRemovable() LLUIImagePtr LLObjectBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_OBJECT, mInvType, mAttachPt, mIsMultiObject ); + return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, mInvType, mAttachPt, mIsMultiObject ); } LLInventoryObject* LLObjectBridge::getObject() const @@ -5255,7 +5217,7 @@ std::string LLWearableBridge::getLabelSuffix() const LLUIImagePtr LLWearableBridge::getIcon() const { - return get_item_icon(mAssetType, mInvType, mWearableType, FALSE); + return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, FALSE); } // virtual @@ -5618,9 +5580,9 @@ LLUIImagePtr LLLinkItemBridge::getIcon() const U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags bool is_multi = LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags(); - return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); + return LLInventoryIcon::getIcon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); } - return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); } void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -5721,7 +5683,7 @@ const LLUUID &LLLinkFolderBridge::getFolderID() const LLUIImagePtr LLMeshBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_TEXTURE, LLInventoryType::IT_TEXTURE, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_MESH, LLInventoryType::IT_MESH, 0, FALSE); } void LLMeshBridge::openItem() diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 5b385f538..f9f99d176 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -47,65 +47,8 @@ class LLMenuGL; class LLCallingCardObserver; class LLViewerJointAttachment; -enum EInventoryIcon -{ - TEXTURE_ICON_NAME, - SOUND_ICON_NAME, - CALLINGCARD_ONLINE_ICON_NAME, - CALLINGCARD_OFFLINE_ICON_NAME, - LANDMARK_ICON_NAME, - LANDMARK_VISITED_ICON_NAME, - SCRIPT_ICON_NAME, - CLOTHING_ICON_NAME, - OBJECT_ICON_NAME, - OBJECT_MULTI_ICON_NAME, - NOTECARD_ICON_NAME, - BODYPART_ICON_NAME, - SNAPSHOT_ICON_NAME, - - BODYPART_SHAPE_ICON_NAME, - BODYPART_SKIN_ICON_NAME, - BODYPART_HAIR_ICON_NAME, - BODYPART_EYES_ICON_NAME, - CLOTHING_SHIRT_ICON_NAME, - CLOTHING_PANTS_ICON_NAME, - CLOTHING_SHOES_ICON_NAME, - CLOTHING_SOCKS_ICON_NAME, - CLOTHING_JACKET_ICON_NAME, - CLOTHING_GLOVES_ICON_NAME, - CLOTHING_UNDERSHIRT_ICON_NAME, - CLOTHING_UNDERPANTS_ICON_NAME, - CLOTHING_SKIRT_ICON_NAME, - CLOTHING_ALPHA_ICON_NAME, - CLOTHING_TATTOO_ICON_NAME, - CLOTHING_PHYSICS_ICON_NAME, - - ANIMATION_ICON_NAME, - GESTURE_ICON_NAME, - - LINKITEM_ICON_NAME, - LINKFOLDER_ICON_NAME, - MESH_ICON_NAME, - - ICON_NAME_COUNT -}; - -extern std::string ICON_NAME[ICON_NAME_COUNT]; - -typedef std::pair two_uuids_t; -typedef std::list two_uuids_list_t; -typedef std::pair uuid_move_list_t; typedef std::vector menuentry_vec_t; -struct LLMoveInv -{ - LLUUID mObjectID; - LLUUID mCategoryID; - two_uuids_list_t mMoveList; - void (*mCallback)(S32, void*); - void* mUserData; -}; - struct LLAttachmentRezAction { LLUUID mItemID; @@ -417,18 +360,6 @@ private: menuentry_vec_t mDisabledItems; }; -// DEPRECATED -class LLScriptBridge : public LLItemBridge -{ - friend class LLInvFVBridge; -public: - LLUIImagePtr getIcon() const; - -protected: - LLScriptBridge( LLInventoryPanel* inventory, const LLUUID& uuid ) : - LLItemBridge(inventory, uuid) {} -}; - class LLTextureBridge : public LLItemBridge { @@ -647,23 +578,30 @@ protected: static std::string sPrefix; }; -class LLMeshBridge : public LLItemBridge -{ - friend class LLInvFVBridge; -public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - virtual void previewItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - -protected: - LLMeshBridge(LLInventoryPanel* inventory, - const LLUUID& uuid) : - LLItemBridge(inventory, uuid) {} +class LLMeshBridge : public LLItemBridge +{ + friend class LLInvFVBridge; +public: + virtual LLUIImagePtr getIcon() const; + virtual void openItem(); + virtual void previewItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + +protected: + LLMeshBridge(LLInventoryPanel* inventory, + const LLUUID& uuid) : + LLItemBridge(inventory, uuid) {} }; void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace = false); +// Move items from an in-world object's "Contents" folder to a specified +// folder in agent inventory. +BOOL move_inv_category_world_to_agent(const LLUUID& object_id, + const LLUUID& category_id, + BOOL drop, + void (*callback)(S32, void*) = NULL, + void* user_data = NULL); #endif // LL_LLINVENTORYBRIDGE_H diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp new file mode 100644 index 000000000..1580dad5e --- /dev/null +++ b/indra/newview/llinventoryicon.cpp @@ -0,0 +1,183 @@ +/** + * @file llinventoryicon.cpp + * @brief Implementation of the inventory icon. + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llinventoryicon.h" + +#include "lldictionary.h" +#include "llinventorydefines.h" +#include "llui.h" +#include "llwearabletype.h" + +struct IconEntry : public LLDictionaryEntry +{ + IconEntry(const std::string &item_name) + : + LLDictionaryEntry(item_name) + {} +}; + +class LLIconDictionary : public LLSingleton, + public LLDictionary +{ +public: + LLIconDictionary(); +}; + +LLIconDictionary::LLIconDictionary() +{ + addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("inv_item_texture.tga")); + addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("inv_item_sound.tga")); + addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("inv_item_callingcard_online.tga")); + addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("inv_item_callingcard_offline.tga")); + addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("inv_item_landmark.tga")); + addEntry(LLInventoryIcon::ICONNAME_LANDMARK_VISITED, new IconEntry("inv_item_landmark_visited.tga")); + addEntry(LLInventoryIcon::ICONNAME_SCRIPT, new IconEntry("inv_item_script.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING, new IconEntry("inv_item_clothing.tga")); + addEntry(LLInventoryIcon::ICONNAME_OBJECT, new IconEntry("inv_item_object.tga")); + addEntry(LLInventoryIcon::ICONNAME_OBJECT_MULTI, new IconEntry("inv_item_object_multi.tga")); + addEntry(LLInventoryIcon::ICONNAME_NOTECARD, new IconEntry("inv_item_notecard.tga")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART, new IconEntry("inv_item_skin.tga")); + addEntry(LLInventoryIcon::ICONNAME_SNAPSHOT, new IconEntry("inv_item_snapshot.tga")); + + addEntry(LLInventoryIcon::ICONNAME_BODYPART_SHAPE, new IconEntry("inv_item_shape.tga")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_SKIN, new IconEntry("inv_item_skin.tga")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_HAIR, new IconEntry("inv_item_hair.tga")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_EYES, new IconEntry("inv_item_eyes.tga")); + + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, new IconEntry("inv_item_skirt.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PANTS, new IconEntry("inv_item_pants.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHOES, new IconEntry("inv_item_shoes.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, new IconEntry("inv_item_socks.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_JACKET, new IconEntry("inv_item_jacket.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, new IconEntry("inv_item_gloves.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("inv_item_undershirt.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("inv_item_underpants.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, new IconEntry("inv_item_skirt.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, new IconEntry("inv_item_alpha.tga")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, new IconEntry("inv_item_tattoo.tga")); + addEntry(LLInventoryIcon::ICONNAME_ANIMATION, new IconEntry("inv_item_animation.tga")); + addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("inv_item_gesture.tga")); + + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, new IconEntry("inv_item_physics.tga")); + + addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("inv_link_item.tga")); + addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("inv_link_folder.tga")); + addEntry(LLInventoryIcon::ICONNAME_MESH, new IconEntry("inv_item_mesh.tga")); + + addEntry(LLInventoryIcon::ICONNAME_INVALID, new IconEntry("Inv_Invalid.png")); + + addEntry(LLInventoryIcon::ICONNAME_NONE, new IconEntry("NONE")); +} + +LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type, + U32 misc_flag, + BOOL item_is_multi) +{ + const std::string& icon_name = getIconName(asset_type, inventory_type, misc_flag, item_is_multi); + return LLUI::getUIImage(icon_name); +} + +LLUIImagePtr LLInventoryIcon::getIcon(EIconName idx) +{ + return LLUI::getUIImage(getIconName(idx)); +} + +const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type, + U32 misc_flag, + BOOL item_is_multi) +{ + EIconName idx = ICONNAME_OBJECT; + if (item_is_multi) + { + idx = ICONNAME_OBJECT_MULTI; + return getIconName(idx); + } + + switch(asset_type) + { + case LLAssetType::AT_TEXTURE: + idx = (inventory_type == LLInventoryType::IT_SNAPSHOT) ? ICONNAME_SNAPSHOT : ICONNAME_TEXTURE; + break; + case LLAssetType::AT_SOUND: + idx = ICONNAME_SOUND; + break; + case LLAssetType::AT_CALLINGCARD: + idx = (misc_flag != 0) ? ICONNAME_CALLINGCARD_ONLINE : ICONNAME_CALLINGCARD_OFFLINE; + break; + case LLAssetType::AT_LANDMARK: + idx = (misc_flag != 0) ? ICONNAME_LANDMARK_VISITED : ICONNAME_LANDMARK; + break; + case LLAssetType::AT_SCRIPT: + case LLAssetType::AT_LSL_TEXT: + case LLAssetType::AT_LSL_BYTECODE: + idx = ICONNAME_SCRIPT; + break; + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + idx = assignWearableIcon(misc_flag); + break; + case LLAssetType::AT_NOTECARD: + idx = ICONNAME_NOTECARD; + break; + case LLAssetType::AT_ANIMATION: + idx = ICONNAME_ANIMATION; + break; + case LLAssetType::AT_GESTURE: + idx = ICONNAME_GESTURE; + break; + case LLAssetType::AT_LINK: + idx = ICONNAME_LINKITEM; + break; + case LLAssetType::AT_LINK_FOLDER: + idx = ICONNAME_LINKFOLDER; + break; + case LLAssetType::AT_OBJECT: + idx = ICONNAME_OBJECT; + break; + case LLAssetType::AT_MESH: + idx = ICONNAME_MESH; + default: + break; + } + + return getIconName(idx); +} + + +const std::string& LLInventoryIcon::getIconName(EIconName idx) +{ + const IconEntry *entry = LLIconDictionary::instance().lookup(idx); + return entry->mName; +} + +LLInventoryIcon::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag) +{ + const LLWearableType::EType wearable_type = LLWearableType::EType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & misc_flag); + return LLWearableType::getIconName(wearable_type); +} diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h new file mode 100644 index 000000000..0144acf52 --- /dev/null +++ b/indra/newview/llinventoryicon.h @@ -0,0 +1,102 @@ +/** + * @file llinventoryfunctions.h + * @brief Miscellaneous inventory-related functions and classes + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLINVENTORYICON_H +#define LL_LLINVENTORYICON_H + +#include "llassettype.h" +#include "llinventorytype.h" +#include "llui.h" + +class LLInventoryIcon +{ +public: + enum EIconName + { + ICONNAME_TEXTURE, + ICONNAME_SOUND, + ICONNAME_CALLINGCARD_ONLINE, + ICONNAME_CALLINGCARD_OFFLINE, + ICONNAME_LANDMARK, + ICONNAME_LANDMARK_VISITED, + ICONNAME_SCRIPT, + ICONNAME_CLOTHING, + ICONNAME_OBJECT, + ICONNAME_OBJECT_MULTI, + ICONNAME_NOTECARD, + ICONNAME_BODYPART, + ICONNAME_SNAPSHOT, + + ICONNAME_BODYPART_SHAPE, + ICONNAME_BODYPART_SKIN, + ICONNAME_BODYPART_HAIR, + ICONNAME_BODYPART_EYES, + ICONNAME_CLOTHING_SHIRT, + ICONNAME_CLOTHING_PANTS, + ICONNAME_CLOTHING_SHOES, + ICONNAME_CLOTHING_SOCKS, + ICONNAME_CLOTHING_JACKET, + ICONNAME_CLOTHING_GLOVES, + ICONNAME_CLOTHING_UNDERSHIRT, + ICONNAME_CLOTHING_UNDERPANTS, + ICONNAME_CLOTHING_SKIRT, + ICONNAME_CLOTHING_ALPHA, + ICONNAME_CLOTHING_TATTOO, + + ICONNAME_ANIMATION, + ICONNAME_GESTURE, + + ICONNAME_CLOTHING_PHYSICS, + + ICONNAME_LINKITEM, + ICONNAME_LINKFOLDER, + ICONNAME_MESH, + + ICONNAME_INVALID, + ICONNAME_COUNT, + ICONNAME_NONE = -1 + }; + + static const std::string& getIconName(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, + U32 misc_flag = 0, // different meanings depending on item type + BOOL item_is_multi = FALSE); + static const std::string& getIconName(EIconName idx); + + static LLUIImagePtr getIcon(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, + U32 misc_flag = 0, // different meanings depending on item type + BOOL item_is_multi = FALSE); + static LLUIImagePtr getIcon(EIconName idx); + +protected: + static EIconName assignWearableIcon(U32 misc_flag); +}; +#endif // LL_LLINVENTORYICON_H + + + diff --git a/indra/newview/llinventoryview.cpp b/indra/newview/llinventoryview.cpp index 8edef568b..078fecb58 100644 --- a/indra/newview/llinventoryview.cpp +++ b/indra/newview/llinventoryview.cpp @@ -1432,147 +1432,6 @@ BOOL LLInventoryView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, return handled; } -std::string get_item_icon_name(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ) -{ - EInventoryIcon idx = OBJECT_ICON_NAME; - if ( item_is_multi ) - { - idx = OBJECT_MULTI_ICON_NAME; - } - - switch(asset_type) - { - case LLAssetType::AT_TEXTURE: - if(LLInventoryType::IT_SNAPSHOT == inventory_type) - { - idx = SNAPSHOT_ICON_NAME; - } - else - { - idx = TEXTURE_ICON_NAME; - } - break; - - case LLAssetType::AT_SOUND: - idx = SOUND_ICON_NAME; - break; - case LLAssetType::AT_CALLINGCARD: - if(attachment_point!= 0) - { - idx = CALLINGCARD_ONLINE_ICON_NAME; - } - else - { - idx = CALLINGCARD_OFFLINE_ICON_NAME; - } - break; - case LLAssetType::AT_LANDMARK: - if(attachment_point!= 0) - { - idx = LANDMARK_VISITED_ICON_NAME; - } - else - { - idx = LANDMARK_ICON_NAME; - } - break; - case LLAssetType::AT_SCRIPT: - case LLAssetType::AT_LSL_TEXT: - case LLAssetType::AT_LSL_BYTECODE: - idx = SCRIPT_ICON_NAME; - break; - case LLAssetType::AT_CLOTHING: - idx = CLOTHING_ICON_NAME; - case LLAssetType::AT_BODYPART : - if(LLAssetType::AT_BODYPART == asset_type) - { - idx = BODYPART_ICON_NAME; - } - switch(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & attachment_point) - { - case LLWearableType::WT_SHAPE: - idx = BODYPART_SHAPE_ICON_NAME; - break; - case LLWearableType::WT_SKIN: - idx = BODYPART_SKIN_ICON_NAME; - break; - case LLWearableType::WT_HAIR: - idx = BODYPART_HAIR_ICON_NAME; - break; - case LLWearableType::WT_EYES: - idx = BODYPART_EYES_ICON_NAME; - break; - case LLWearableType::WT_SHIRT: - idx = CLOTHING_SHIRT_ICON_NAME; - break; - case LLWearableType::WT_PANTS: - idx = CLOTHING_PANTS_ICON_NAME; - break; - case LLWearableType::WT_SHOES: - idx = CLOTHING_SHOES_ICON_NAME; - break; - case LLWearableType::WT_SOCKS: - idx = CLOTHING_SOCKS_ICON_NAME; - break; - case LLWearableType::WT_JACKET: - idx = CLOTHING_JACKET_ICON_NAME; - break; - case LLWearableType::WT_GLOVES: - idx = CLOTHING_GLOVES_ICON_NAME; - break; - case LLWearableType::WT_UNDERSHIRT: - idx = CLOTHING_UNDERSHIRT_ICON_NAME; - break; - case LLWearableType::WT_UNDERPANTS: - idx = CLOTHING_UNDERPANTS_ICON_NAME; - break; - case LLWearableType::WT_SKIRT: - idx = CLOTHING_SKIRT_ICON_NAME; - break; - case LLWearableType::WT_ALPHA: - idx = CLOTHING_ALPHA_ICON_NAME; - break; - case LLWearableType::WT_TATTOO: - idx = CLOTHING_TATTOO_ICON_NAME; - break; - case LLWearableType::WT_PHYSICS: - idx = CLOTHING_PHYSICS_ICON_NAME; - break; - default: - // no-op, go with choice above - break; - } - break; - case LLAssetType::AT_NOTECARD: - idx = NOTECARD_ICON_NAME; - break; - case LLAssetType::AT_ANIMATION: - idx = ANIMATION_ICON_NAME; - break; - case LLAssetType::AT_GESTURE: - idx = GESTURE_ICON_NAME; - break; - case LLAssetType::AT_MESH: - idx = MESH_ICON_NAME; - break; - default: - break; - } - - return ICON_NAME[idx]; -} - -LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi) -{ - const std::string& icon_name = get_item_icon_name(asset_type, inventory_type, attachment_point, item_is_multi ); - return LLUI::getUIImage(icon_name); -} const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventorySortOrder"); const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder"); diff --git a/indra/newview/llinventoryview.h b/indra/newview/llinventoryview.h index 492e79d33..285062468 100644 --- a/indra/newview/llinventoryview.h +++ b/indra/newview/llinventoryview.h @@ -384,24 +384,6 @@ void open_notecard(LLViewerInventoryItem* inv_item, const std::string& title, co void open_landmark(LLViewerInventoryItem* inv_item, const std::string& title, BOOL show_keep_discard, const LLUUID& source_id = LLUUID::null, BOOL take_focus = TRUE); void open_texture(const LLUUID& item_id, const std::string& title, BOOL show_keep_discard, const LLUUID& source_id = LLUUID::null, BOOL take_focus = TRUE); -std::string get_item_icon_name(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ); - -LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ); - -// Move items from an in-world object's "Contents" folder to a specified -// folder in agent inventory. -BOOL move_inv_category_world_to_agent(const LLUUID& object_id, - const LLUUID& category_id, - BOOL drop, - void (*callback)(S32, void*) = NULL, - void* user_data = NULL); - const BOOL TAKE_FOCUS_YES = TRUE; const BOOL TAKE_FOCUS_NO = FALSE; diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 8124e841d..37f263ca8 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -63,7 +63,7 @@ const S32 MAX_TEXTURE_DIMENSION = 2048; static LLRegisterWidget r("web_browser"); LLMediaCtrl::LLMediaCtrl( const std::string& name, const LLRect& rect ) : - LLUICtrl( name, rect, FALSE, NULL, NULL ), + LLUICtrl( name, rect, FALSE, NULL, NULL), LLInstanceTracker(LLUUID::generateNewID()), mTextureDepthBytes( 4 ), mWebBrowserImage( 0 ), @@ -336,6 +336,15 @@ void LLMediaCtrl::onFocusLost() LLUICtrl::onFocusLost(); } +//////////////////////////////////////////////////////////////////////////////// +// + +BOOL LLMediaCtrl::postBuild () +{ + //setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2)); + return true; +} + //////////////////////////////////////////////////////////////////////////////// // BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) @@ -386,10 +395,14 @@ void LLMediaCtrl::handleVisibilityChange ( BOOL new_visibility ) { mMediaSource->setVisible( new_visibility ); } + LLUICtrl::handleVisibilityChange( new_visibility ); + //Hack due to not being derived from LLPanel yet + LLMediaCtrl::onVisibilityChange(LLSD(new_visibility)); } //////////////////////////////////////////////////////////////////////////////// // + BOOL LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char) { BOOL result = FALSE; @@ -407,10 +420,10 @@ BOOL LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char) //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility ) +void LLMediaCtrl::onVisibilityChange ( const LLSD& new_visibility ) { // set state of frequent updates automatically if visibility changes - if ( new_visibility ) + if ( new_visibility.asBoolean() ) { mFrequentUpdates = true; } @@ -418,7 +431,6 @@ void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility ) { mFrequentUpdates = false; } - LLUICtrl::onVisibilityChange(new_visibility); } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index bd5fa03ac..341ea1407 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -133,7 +133,7 @@ class LLMediaCtrl : virtual BOOL handleUnicodeCharHere(llwchar uni_char); virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE); virtual void draw(); - virtual void onVisibilityChange ( BOOL curVisibilityIn ); + virtual BOOL postBuild(); // focus overrides void onFocusLost(); @@ -150,6 +150,7 @@ class LLMediaCtrl : void convertInputCoords(S32& x, S32& y); private: + void onVisibilityChange ( const LLSD& new_visibility ); static bool onClickLinkExternalTarget( const LLSD&, const LLSD& ); const S32 mTextureDepthBytes; diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp index 35f207ab2..a306d4730 100644 --- a/indra/newview/llpaneldirbrowser.cpp +++ b/indra/newview/llpaneldirbrowser.cpp @@ -1286,13 +1286,13 @@ void LLPanelDirBrowser::onKeystrokeName(LLLineEditor* line, void* data) } // setup results when shown -void LLPanelDirBrowser::onVisibilityChange(BOOL new_visibility) +void LLPanelDirBrowser::handleVisibilityChange(BOOL new_visibility) { if (new_visibility) { onCommitList(NULL, this); } - LLPanel::onVisibilityChange(new_visibility); + LLPanel::handleVisibilityChange(new_visibility); } S32 LLPanelDirBrowser::showNextButton(S32 rows) diff --git a/indra/newview/llpaneldirbrowser.h b/indra/newview/llpaneldirbrowser.h index e27b5524c..6fa6d7c47 100644 --- a/indra/newview/llpaneldirbrowser.h +++ b/indra/newview/llpaneldirbrowser.h @@ -57,7 +57,7 @@ public: // Use to get periodic updates. virtual void draw(); - virtual void onVisibilityChange(BOOL curVisibilityIn); + virtual void handleVisibilityChange(BOOL curVisibilityIn); // Redo your search for the prev/next page of results virtual void prevPage(); diff --git a/indra/newview/llpaneldirfind.cpp b/indra/newview/llpaneldirfind.cpp index f960fbb69..94edad4dd 100644 --- a/indra/newview/llpaneldirfind.cpp +++ b/indra/newview/llpaneldirfind.cpp @@ -194,13 +194,13 @@ void LLPanelDirFind::draw() // When we show any browser-based view, we want to hide all // the right-side XUI detail panels. // virtual -void LLPanelDirFind::onVisibilityChange(BOOL new_visibility) +void LLPanelDirFind::handleVisibilityChange(BOOL new_visibility) { if (new_visibility) { mFloaterDirectory->hideAllDetailPanels(); } - LLPanel::onVisibilityChange(new_visibility); + LLPanel::handleVisibilityChange(new_visibility); } // virtual diff --git a/indra/newview/llpaneldirfind.h b/indra/newview/llpaneldirfind.h index 99c9daaf1..670f30c7e 100644 --- a/indra/newview/llpaneldirfind.h +++ b/indra/newview/llpaneldirfind.h @@ -53,7 +53,7 @@ public: /*virtual*/ void draw(); /*virtual*/ BOOL postBuild(); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void handleVisibilityChange(BOOL new_visibility); // Pure virtual. Must be implemented virtual void search(const std::string& search_text) = 0; diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 48115837a..36bd9b809 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -40,7 +40,7 @@ #include "llviewerinventory.h" #include "llinventorymodel.h" #include "llinventorydefines.h" -#include "llinventoryview.h" +#include "llinventoryicon.h" #include "llagent.h" #include "lltooldraganddrop.h" @@ -311,7 +311,7 @@ void LLPanelGroupNotices::setItem(LLPointer inv_item) item_is_multi = TRUE; }; - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), item_is_multi ); @@ -469,7 +469,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) row["columns"][0]["column"] = "icon"; if (has_attachment) { - std::string icon_name = get_item_icon_name( + std::string icon_name = LLInventoryIcon::getIconName( (LLAssetType::EType)asset_type, LLInventoryType::IT_NONE,FALSE, FALSE); row["columns"][0]["type"] = "icon"; @@ -544,7 +544,7 @@ void LLPanelGroupNotices::showNotice(const std::string& subject, { mInventoryOffer = inventory_offer; - std::string icon_name = get_item_icon_name(mInventoryOffer->mType, + std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType, LLInventoryType::IT_TEXTURE, 0, FALSE); diff --git a/indra/newview/llpanelinventory.cpp b/indra/newview/llpanelinventory.cpp index a39ee10db..bfb4ca1d1 100644 --- a/indra/newview/llpanelinventory.cpp +++ b/indra/newview/llpanelinventory.cpp @@ -50,7 +50,9 @@ #include "llfontgl.h" #include "llassetstorage.h" #include "llinventory.h" +#include "llinventorybridge.h" #include "llinventorydefines.h" +#include "llinventoryicon.h" #include "llnotificationsutil.h" #include "llagent.h" @@ -61,7 +63,8 @@ #include "llfolderview.h" #include "llgl.h" #include "llinventorymodel.h" -#include "llinventoryview.h" +#include "llinventoryicon.h" +#include "llinventorybridge.h" #include "llmenugl.h" #include "llpreviewanim.h" #include "llpreviewgesture.h" @@ -361,7 +364,7 @@ LLUIImagePtr LLTaskInvFVBridge::getIcon() const item_is_multi = TRUE; } - return get_item_icon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi ); + return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi ); } void LLTaskInvFVBridge::openItem() @@ -1002,7 +1005,7 @@ LLTaskTextureBridge::LLTaskTextureBridge( LLUIImagePtr LLTaskTextureBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_TEXTURE, mInventoryType, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInventoryType, 0, FALSE); } void LLTaskTextureBridge::openItem() @@ -1062,7 +1065,7 @@ LLTaskSoundBridge::LLTaskSoundBridge( LLUIImagePtr LLTaskSoundBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE); } void LLTaskSoundBridge::openItem() @@ -1196,7 +1199,7 @@ LLTaskLandmarkBridge::LLTaskLandmarkBridge( LLUIImagePtr LLTaskLandmarkBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, 0, FALSE); } @@ -1227,7 +1230,7 @@ LLTaskCallingCardBridge::LLTaskCallingCardBridge( LLUIImagePtr LLTaskCallingCardBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, 0, FALSE); } BOOL LLTaskCallingCardBridge::isItemRenameable() const @@ -1267,7 +1270,7 @@ LLTaskScriptBridge::LLTaskScriptBridge( LLUIImagePtr LLTaskScriptBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); } @@ -1381,7 +1384,7 @@ LLUIImagePtr LLTaskObjectBridge::getIcon() const item_is_multi = TRUE; } - return get_item_icon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi); + return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi); } ///---------------------------------------------------------------------------- @@ -1411,7 +1414,7 @@ LLTaskNotecardBridge::LLTaskNotecardBridge( LLUIImagePtr LLTaskNotecardBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE); } void LLTaskNotecardBridge::openItem() @@ -1485,7 +1488,7 @@ LLTaskGestureBridge::LLTaskGestureBridge( LLUIImagePtr LLTaskGestureBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE); } void LLTaskGestureBridge::openItem() @@ -1545,7 +1548,7 @@ LLTaskAnimationBridge::LLTaskAnimationBridge( LLUIImagePtr LLTaskAnimationBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE); } void LLTaskAnimationBridge::openItem() @@ -1629,7 +1632,7 @@ LLTaskWearableBridge::LLTaskWearableBridge( LLUIImagePtr LLTaskWearableBridge::getIcon() const { - return get_item_icon(mAssetType, LLInventoryType::IT_WEARABLE, mFlags, FALSE ); + return LLInventoryIcon::getIcon(mAssetType, LLInventoryType::IT_WEARABLE, mFlags, FALSE ); } diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index fde18272d..4db5502f4 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -942,7 +942,6 @@ void LLPanelLogin::loadLoginPage() } // Grid - oStr << "&grid=" << LLWeb::curlEscape(LLViewerLogin::getInstance()->getGridLabel()); if (gHippoGridManager->getConnectedGrid()->isSecondLife()) { // find second life grid from login URI @@ -960,6 +959,11 @@ void LLPanelLogin::loadLoginPage() } } } + else + { + oStr << "&grid=" << LLWeb::curlEscape(LLViewerLogin::getInstance()->getGridLabel()); + } + gViewerWindow->setMenuBackgroundColor(false, !LLViewerLogin::getInstance()->isInProductionGrid()); gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index ba88d237a..11e310cb9 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -372,7 +372,7 @@ bool idle_startup() static U64 first_sim_handle = 0; static LLHost first_sim; static std::string first_sim_seed_cap; - static U32 first_sim_size_x = 256; + static U32 first_sim_size_x = 256; static U32 first_sim_size_y = 256; static LLVector3 initial_sun_direction(1.f, 0.f, 0.f); diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index 602c4b1de..ee6e534d2 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -237,7 +237,7 @@ BOOL LLTexLayerParamAlpha::getSkip() const } LLWearableType::EType type = (LLWearableType::EType)getWearableType(); - if ((type != WT_INVALID) && !avatar->isWearingWearableType(type)) + if ((type != LLWearableType::WT_INVALID) && !avatar->isWearingWearableType(type)) { return TRUE; } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 1e09a5154..eee9756dc 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1962,7 +1962,7 @@ bool LLTextureFetchWorker::writeToCacheComplete() // public LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded, bool qa_mode) - : LLWorkerThread("TextureFetch", threaded), + : LLWorkerThread("TextureFetch", threaded, true), mDebugCount(0), mDebugPause(FALSE), mPacketCount(0), diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index b5a78b01d..54ccb94dc 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -445,17 +445,34 @@ static bool handleRenderLocalLightsChanged(const LLSD& newvalue) return true; } +static bool handleRenderDeferredChanged(const LLSD& newvalue) +{ + bool can_defer = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"); + bool old_deferred = !newvalue.asBoolean() && can_defer; + LLRenderTarget::sUseFBO = (newvalue.asBoolean() && can_defer) || gSavedSettings.getBOOL("RenderUseFBO"); + if (gPipeline.isInit()) + { + gPipeline.updateRenderDeferred(); + gPipeline.releaseGLBuffers(); + gPipeline.createGLBuffers(); + gPipeline.resetVertexBuffers(); + if (old_deferred != newvalue.asBoolean()) + { + LLViewerShaderMgr::instance()->setShaders(); + } + } + return true; +} + static bool handleRenderUseFBOChanged(const LLSD& newvalue) { - LLRenderTarget::sUseFBO = newvalue.asBoolean(); + bool can_defer = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"); + LLRenderTarget::sUseFBO = newvalue.asBoolean() || (gSavedSettings.getBOOL("RenderDeferred") && can_defer); if (gPipeline.isInit()) { gPipeline.releaseGLBuffers(); gPipeline.createGLBuffers(); - if (LLPipeline::sRenderDeferred && LLRenderTarget::sUseFBO) - { - LLViewerShaderMgr::instance()->setShaders(); - } + gPipeline.resetVertexBuffers(); } return true; } @@ -682,7 +699,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2)); gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2)); gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2)); - gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); + gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleRenderDeferredChanged, _2)); gSavedSettings.getControl("RenderShadowDetail")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderDeferredSSAO")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderDeferredGI")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 822a41a08..df51698f2 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3681,17 +3681,17 @@ void process_teleport_finish(LLMessageSystem* msg, void**) U32 teleport_flags; msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags); - U32 region_size_x = 256; - msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x); - - U32 region_size_y = 256; - msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y); - - //and a little hack for Second Life compatibility - if (region_size_y == 0 || region_size_x == 0) - { - region_size_x = 256; - region_size_y = 256; + U32 region_size_x = 256; + msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x); + + U32 region_size_y = 256; + msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y); + + //and a little hack for Second Life compatibility + if (region_size_y == 0 || region_size_x == 0) + { + region_size_x = 256; + region_size_y = 256; } std::string seedCap; @@ -4018,17 +4018,17 @@ void process_crossed_region(LLMessageSystem* msg, void**) std::string seedCap; msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap); - U32 region_size_x = 256; - msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x); - - U32 region_size_y = 256; - msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y); - - //and a little hack for Second Life compatibility - if (region_size_y == 0 || region_size_x == 0) - { - region_size_x = 256; - region_size_y = 256; + U32 region_size_x = 256; + msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x); + + U32 region_size_y = 256; + msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y); + + //and a little hack for Second Life compatibility + if (region_size_y == 0 || region_size_x == 0) + { + region_size_x = 256; + region_size_y = 256; } send_complete_agent_movement(sim_host); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index f7f860385..4bc79c3f3 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -426,9 +426,6 @@ void LLViewerShaderMgr::setShaders() deferred_class = 1; } - //make sure framebuffer objects are enabled - gSavedSettings.setBOOL("RenderUseFBO", TRUE); - //make sure hardware skinning is enabled gSavedSettings.setBOOL("RenderAvatarVP", TRUE); } @@ -655,7 +652,8 @@ BOOL LLViewerShaderMgr::loadBasicShaders() S32 ch = gGLManager.mNumTextureImageUnits-1; static const LLCachedControl no_texture_indexing("ShyotlUseLegacyTextureBatching",false); - if (gGLManager.mGLVersion < 3.1f || no_texture_indexing) + static const LLCachedControl use_legacy_path("ShyotlUseLegacyRenderPath", false); //Legacy does not jive with new batching. + if (gGLManager.mGLVersion < 3.1f || no_texture_indexing || use_legacy_path) { //force to 1 texture index channel for old drivers ch = 1; } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 9029a8188..f07c9c37d 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3927,7 +3927,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: S32 texture_index_channels = gGLManager.mNumTextureImageUnits-1; //always reserve one for shiny for now just for simplicity static const LLCachedControl no_texture_indexing("ShyotlUseLegacyTextureBatching",false); - if (gGLManager.mGLVersion < 3.1f || no_texture_indexing) + static const LLCachedControl use_legacy_path("ShyotlUseLegacyRenderPath", false); //Legacy does not jive with new batching. + if (gGLManager.mGLVersion < 3.1f || no_texture_indexing || use_legacy_path) { texture_index_channels = 1; } diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp index 44c1d1e93..18507f262 100644 --- a/indra/newview/llwearabletype.cpp +++ b/indra/newview/llwearabletype.cpp @@ -32,17 +32,26 @@ struct WearableEntry : public LLDictionaryEntry { WearableEntry(const std::string &name, const std::string& default_new_name, - LLAssetType::EType assetType) : + LLAssetType::EType assetType, + LLInventoryIcon::EIconName iconName, + BOOL disable_camera_switch = FALSE, + BOOL allow_multiwear = TRUE) : LLDictionaryEntry(name), mAssetType(assetType), mDefaultNewName(default_new_name), - mLabel(/*(LLTrans::getString*/(name)) + mLabel(/*LLTrans::getString*/(name)), + mIconName(iconName), + mDisableCameraSwitch(disable_camera_switch), + mAllowMultiwear(allow_multiwear) { } const LLAssetType::EType mAssetType; const std::string mLabel; const std::string mDefaultNewName; //keep mLabel for backward compatibility + LLInventoryIcon::EIconName mIconName; + BOOL mDisableCameraSwitch; + BOOL mAllowMultiwear; }; class LLWearableDictionary : public LLSingleton, @@ -54,26 +63,26 @@ public: LLWearableDictionary::LLWearableDictionary() { - addEntry(LLWearableType::WT_SHAPE, new WearableEntry("shape", "New Shape", LLAssetType::AT_BODYPART)); - addEntry(LLWearableType::WT_SKIN, new WearableEntry("skin", "New Skin", LLAssetType::AT_BODYPART)); - addEntry(LLWearableType::WT_HAIR, new WearableEntry("hair", "New Hair", LLAssetType::AT_BODYPART)); - addEntry(LLWearableType::WT_EYES, new WearableEntry("eyes", "New Eyes", LLAssetType::AT_BODYPART)); - addEntry(LLWearableType::WT_SHIRT, new WearableEntry("shirt", "New Shirt", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_PANTS, new WearableEntry("pants", "New Pants", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_SHOES, new WearableEntry("shoes", "New Shoes", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_SOCKS, new WearableEntry("socks", "New Socks", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_JACKET, new WearableEntry("jacket", "New Jacket", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_GLOVES, new WearableEntry("gloves", "New Gloves", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry("undershirt", "New Undershirt", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry("underpants", "New Underpants", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING)); - addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING)); + addEntry(LLWearableType::WT_SHAPE, new WearableEntry("shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_SHAPE, FALSE, FALSE)); + addEntry(LLWearableType::WT_SKIN, new WearableEntry("skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_SKIN, FALSE, FALSE)); + addEntry(LLWearableType::WT_HAIR, new WearableEntry("hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_HAIR, FALSE, FALSE)); + addEntry(LLWearableType::WT_EYES, new WearableEntry("eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_EYES, FALSE, FALSE)); + addEntry(LLWearableType::WT_SHIRT, new WearableEntry("shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE)); + addEntry(LLWearableType::WT_PANTS, new WearableEntry("pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PANTS, FALSE, TRUE)); + addEntry(LLWearableType::WT_SHOES, new WearableEntry("shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHOES, FALSE, TRUE)); + addEntry(LLWearableType::WT_SOCKS, new WearableEntry("socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE)); + addEntry(LLWearableType::WT_JACKET, new WearableEntry("jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_JACKET, FALSE, TRUE)); + addEntry(LLWearableType::WT_GLOVES, new WearableEntry("gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE)); + addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry("undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE)); + addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry("underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE)); + addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE)); + addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE)); + addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE)); - addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING)); + addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); - addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE)); - addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE)); + addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE)); + addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE)); } // static @@ -120,3 +129,30 @@ LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type) return entry->mAssetType; } +// static +LLInventoryIcon::EIconName LLWearableType::getIconName(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + if (!entry) return getIconName(WT_INVALID); + return entry->mIconName; +} + +// static +BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + if (!entry) return FALSE; + return entry->mDisableCameraSwitch; +} + +// static +BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type) +{ + return false; //Disabled + /*const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + if (!entry) return FALSE; + return entry->mAllowMultiwear;*/ +} diff --git a/indra/newview/llwearabletype.h b/indra/newview/llwearabletype.h index 602fae71d..6e6115b69 100644 --- a/indra/newview/llwearabletype.h +++ b/indra/newview/llwearabletype.h @@ -29,6 +29,7 @@ #include "llassettype.h" #include "lldictionary.h" +#include "llinventoryicon.h" #include "llsingleton.h" class LLWearableType @@ -63,6 +64,9 @@ public: static const std::string& getTypeLabel(EType type); static LLAssetType::EType getAssetType(EType type); static EType typeNameToType(const std::string& type_name); + static LLInventoryIcon::EIconName getIconName(EType type); + static BOOL getDisableCameraSwitch(EType type); + static BOOL getAllowMultiwear(EType type); protected: LLWearableType() {} diff --git a/indra/newview/skins/default/textures/go-home-4.png b/indra/newview/skins/default/textures/go-home-4.png new file mode 100644 index 000000000..058c00af4 Binary files /dev/null and b/indra/newview/skins/default/textures/go-home-4.png differ diff --git a/indra/newview/skins/default/textures/go-next-4.png b/indra/newview/skins/default/textures/go-next-4.png new file mode 100644 index 000000000..b4362c1ed Binary files /dev/null and b/indra/newview/skins/default/textures/go-next-4.png differ diff --git a/indra/newview/skins/default/textures/go-previous-4.png b/indra/newview/skins/default/textures/go-previous-4.png new file mode 100644 index 000000000..d5a677ecd Binary files /dev/null and b/indra/newview/skins/default/textures/go-previous-4.png differ diff --git a/indra/newview/skins/default/textures/inv_collapse_all.tga b/indra/newview/skins/default/textures/inv_collapse_all.tga new file mode 100644 index 000000000..e27dc5ecd Binary files /dev/null and b/indra/newview/skins/default/textures/inv_collapse_all.tga differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 3f93a7ef8..c7929b058 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -390,5 +390,10 @@ + + + + + diff --git a/indra/newview/skins/default/textures/view-refresh-5.png b/indra/newview/skins/default/textures/view-refresh-5.png new file mode 100644 index 000000000..cb5d1b97c Binary files /dev/null and b/indra/newview/skins/default/textures/view-refresh-5.png differ diff --git a/indra/newview/skins/default/xui/en-us/floater_directory.xml b/indra/newview/skins/default/xui/en-us/floater_directory.xml index 70475d28a..28151eb71 100644 --- a/indra/newview/skins/default/xui/en-us/floater_directory.xml +++ b/indra/newview/skins/default/xui/en-us/floater_directory.xml @@ -26,12 +26,12 @@ name="search_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" tool_tip="Search Second Life" width="160" spell_check="true" /> -